writer 1.25.0__py3-none-any.whl → 1.25.0rc1__py3-none-any.whl
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.
- writer/ai/__init__.py +1 -4
- writer/static/assets/BaseMarkdown-FwGt2vSH.js +1 -0
- writer/static/assets/{BlueprintToolbar-CSKyGsgb.js → BlueprintToolbar-BMXwGb2u.js} +1 -1
- writer/static/assets/{BuilderApp-CXGhU9Dc.js → BuilderApp-Bc8bFIhZ.js} +3 -3
- writer/static/assets/{BuilderApplicationSelect-D4YCpoaq.js → BuilderApplicationSelect-BywbYEbV.js} +2 -2
- writer/static/assets/{BuilderBlueprintLibraryPanel-Bviy4WUX.js → BuilderBlueprintLibraryPanel-S0VfwhtM.js} +1 -1
- writer/static/assets/{BuilderEmbeddedCodeEditor-eTd4Hh29.js → BuilderEmbeddedCodeEditor-D2_cZcVV.js} +6 -6
- writer/static/assets/{BuilderGraphSelect-BSVTkG-Q.js → BuilderGraphSelect-B1Db2C-E.js} +2 -2
- writer/static/assets/{BuilderInsertionLabel-BQTfooyn.js → BuilderInsertionLabel-C0tezdX8.js} +1 -1
- writer/static/assets/{BuilderInsertionOverlay-CirmjKch.js → BuilderInsertionOverlay-CpSJ_I0n.js} +1 -1
- writer/static/assets/{BuilderJournal-Do4CUC4U.js → BuilderJournal-1g17w1GH.js} +2 -2
- writer/static/assets/{BuilderModelSelect-CDg6LxWs.js → BuilderModelSelect-DrR5Rglv.js} +2 -2
- writer/static/assets/{BuilderSettings-D96bVVVm.js → BuilderSettings-X4fk1HYG.js} +5 -5
- writer/static/assets/{BuilderSettingsArtifactAPITriggerDetails-2hONOdPT.js → BuilderSettingsArtifactAPITriggerDetails-Dw1Ri3jn.js} +1 -1
- writer/static/assets/{BuilderSettingsDeploySharedBlueprint-Ct5FVU3z.js → BuilderSettingsDeploySharedBlueprint-CCOpcUFl.js} +1 -1
- writer/static/assets/{BuilderSettingsHandlers-wr4bqW4s.js → BuilderSettingsHandlers-BgYJCyal.js} +1 -1
- writer/static/assets/{BuilderSidebarComponentTree-XfwZ-TqP.js → BuilderSidebarComponentTree-DkH5bpJF.js} +1 -1
- writer/static/assets/{BuilderSidebarToolkit-BAq285RS.js → BuilderSidebarToolkit-CSTGjrbD.js} +2 -2
- writer/static/assets/{BuilderTemplateEditor-DOyCVTe3.js → BuilderTemplateEditor-BVQ9oKC3.js} +1 -1
- writer/static/assets/{BuilderVault-7la3LjZT.js → BuilderVault-B4aITu1c.js} +1 -1
- writer/static/assets/{ComponentRenderer-DRTUw3PP.js → ComponentRenderer-BgoKk-_d.js} +1 -1
- writer/static/assets/{SharedCopyClipboardButton-BAhxC5LU.js → SharedCopyClipboardButton-CXfaup9Y.js} +1 -1
- writer/static/assets/{WdsCheckbox-Bi_HXvVT.js → WdsCheckbox-COE3JsDI.js} +1 -1
- writer/static/assets/{WdsDropdownMenu-BPKaOD8s.js → WdsDropdownMenu-vcOuT7Hf.js} +1 -1
- writer/static/assets/{WdsFieldWrapper-CwqGDrlP.js → WdsFieldWrapper-CH9Jr2FR.js} +1 -1
- writer/static/assets/{WdsTabs-q0kVCXxi.js → WdsTabs-DgEkeI3u.js} +1 -1
- writer/static/assets/{cssMode-BFJ2uFDF.js → cssMode-CIIcCccL.js} +1 -1
- writer/static/assets/{freemarker2-DrweqdQ1.js → freemarker2-CX6rQp7v.js} +1 -1
- writer/static/assets/{handlebars-d2aT2S4T.js → handlebars-BILn7ZdU.js} +1 -1
- writer/static/assets/{html-DkR8jQS-.js → html-BE45IdHd.js} +1 -1
- writer/static/assets/{htmlMode-ChyeBcvP.js → htmlMode--15KzHI6.js} +1 -1
- writer/static/assets/{index-uhDDPaD2.js → index-CzJKxzXJ.js} +1 -1
- writer/static/assets/{index-DHZHZi5W.js → index-DVo1rFbH.js} +1 -1
- writer/static/assets/{index-Bj5EqtwJ.js → index-tflVuual.js} +12 -12
- writer/static/assets/{javascript-DtI3gL80.js → javascript-CjpEwYUU.js} +1 -1
- writer/static/assets/{jsonMode-B9CbMObz.js → jsonMode-Cxnzu5mt.js} +1 -1
- writer/static/assets/{liquid-D620qh4W.js → liquid-DZXffNps.js} +1 -1
- writer/static/assets/{mapbox-gl-IM8CBmd8.js → mapbox-gl-CIiXHAHs.js} +1 -1
- writer/static/assets/{mdx-CrO1Zrq5.js → mdx-4PVV3Q81.js} +1 -1
- writer/static/assets/{pdf-5wahDYbm.js → pdf-UGfOV19v.js} +1 -1
- writer/static/assets/{plotly.min-DmBAN9XQ.js → plotly.min-C53ew1kV.js} +1 -1
- writer/static/assets/{python-BwZnPvHK.js → python-oNRBgtKZ.js} +1 -1
- writer/static/assets/{razor-DIsRzgu4.js → razor-DZZhL_i1.js} +1 -1
- writer/static/assets/{tsMode-CG0rBgC9.js → tsMode-Bqbt_v_d.js} +1 -1
- writer/static/assets/{typescript-BBvXo7TF.js → typescript-DppMnPAt.js} +1 -1
- writer/static/assets/{useBlueprintRun-DQUAcK67.js → useBlueprintRun-BD33TyWf.js} +1 -1
- writer/static/assets/{useKeyValueEditor-vhhDzyE2.js → useKeyValueEditor-5TP3lm3C.js} +1 -1
- writer/static/assets/{useListResources-DGx8U65A.js → useListResources-BzIfongE.js} +1 -1
- writer/static/assets/{xml-nERONKOk.js → xml-B_oO3GDq.js} +1 -1
- writer/static/assets/{yaml-B9E-sHku.js → yaml-COzNYEy2.js} +1 -1
- writer/static/index.html +1 -1
- {writer-1.25.0.dist-info → writer-1.25.0rc1.dist-info}/METADATA +1 -1
- {writer-1.25.0.dist-info → writer-1.25.0rc1.dist-info}/RECORD +56 -56
- writer/static/assets/BaseMarkdown-CsWzSrDd.js +0 -1
- {writer-1.25.0.dist-info → writer-1.25.0rc1.dist-info}/WHEEL +0 -0
- {writer-1.25.0.dist-info → writer-1.25.0rc1.dist-info}/entry_points.txt +0 -0
- {writer-1.25.0.dist-info → writer-1.25.0rc1.dist-info}/licenses/LICENSE.txt +0 -0
writer/static/assets/{BuilderEmbeddedCodeEditor-eTd4Hh29.js → BuilderEmbeddedCodeEditor-D2_cZcVV.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
function __vite__mapDeps(indexes) {
|
|
2
2
|
if (!__vite__mapDeps.viteFileDeps) {
|
|
3
|
-
__vite__mapDeps.viteFileDeps = ["./freemarker2-
|
|
3
|
+
__vite__mapDeps.viteFileDeps = ["./freemarker2-CX6rQp7v.js","./index-tflVuual.js","./index-BKNuk68o.css","./handlebars-BILn7ZdU.js","./html-BE45IdHd.js","./javascript-CjpEwYUU.js","./typescript-DppMnPAt.js","./liquid-DZXffNps.js","./mdx-4PVV3Q81.js","./python-oNRBgtKZ.js","./razor-DZZhL_i1.js","./xml-B_oO3GDq.js","./yaml-COzNYEy2.js","./cssMode-CIIcCccL.js","./htmlMode--15KzHI6.js","./jsonMode-Cxnzu5mt.js","./tsMode-Bqbt_v_d.js"]
|
|
4
4
|
}
|
|
5
5
|
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
6
6
|
}
|
|
7
|
-
import{Q as be,d as zz,m as SP,aH as Uz,w as wD,q as $z,a8 as jz,o as Kz,f as qz,g as Gz,G as Zz,_ as Yz}from"./index-Bj5EqtwJ.js";function Mo(o,e=0){return o[o.length-(1+e)]}function Xz(o){if(o.length===0)throw new Error("Invalid tail call");return[o.slice(0,o.length-1),o[o.length-1]]}function ri(o,e,t=(i,n)=>i===n){if(o===e)return!0;if(!o||!e||o.length!==e.length)return!1;for(let i=0,n=o.length;i<n;i++)if(!t(o[i],e[i]))return!1;return!0}function Qz(o,e){const t=o.length-1;e<t&&(o[e]=o[t]),o.pop()}function ov(o,e,t){return Jz(o.length,i=>t(o[i],e))}function Jz(o,e){let t=0,i=o-1;for(;t<=i;){const n=(t+i)/2|0,s=e(n);if(s<0)t=n+1;else if(s>0)i=n-1;else return n}return-(t+1)}function kk(o,e,t){if(o=o|0,o>=e.length)throw new TypeError("invalid index");const i=e[Math.floor(e.length*Math.random())],n=[],s=[],r=[];for(const a of e){const l=t(a,i);l<0?n.push(a):l>0?s.push(a):r.push(a)}return o<n.length?kk(o,n,t):o<n.length+r.length?r[0]:kk(o-(n.length+r.length),s,t)}function yP(o,e){const t=[];let i;for(const n of o.slice(0).sort(e))!i||e(i[0],n)!==0?(i=[n],t.push(i)):i.push(n);return t}function*qM(o,e){let t,i;for(const n of o)i!==void 0&&e(i,n)?t.push(n):(t&&(yield t),t=[n]),i=n;t&&(yield t)}function O7(o,e){for(let t=0;t<=o.length;t++)e(t===0?void 0:o[t-1],t===o.length?void 0:o[t])}function eU(o,e){for(let t=0;t<o.length;t++)e(t===0?void 0:o[t-1],o[t],t+1===o.length?void 0:o[t+1])}function oa(o){return o.filter(e=>!!e)}function LP(o){let e=0;for(let t=0;t<o.length;t++)o[t]&&(o[e]=o[t],e+=1);o.length=e}function F7(o){return!Array.isArray(o)||o.length===0}function Bn(o){return Array.isArray(o)&&o.length>0}function Ld(o,e=t=>t){const t=new Set;return o.filter(i=>{const n=e(i);return t.has(n)?!1:(t.add(n),!0)})}function GM(o,e){return o.length>0?o[0]:e}function ss(o,e){let t=typeof e=="number"?o:0;typeof e=="number"?t=o:(t=0,e=o);const i=[];if(t<=e)for(let n=t;n<e;n++)i.push(n);else for(let n=t;n>e;n--)i.push(n);return i}function QS(o,e,t){const i=o.slice(0,e),n=o.slice(e);return i.concat(t,n)}function SD(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.unshift(e))}function B0(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.push(e))}function Ik(o,e){for(const t of e)o.push(t)}function ZM(o){return Array.isArray(o)?o:[o]}function tU(o,e,t){const i=B7(o,e),n=o.length,s=t.length;o.length=n+s;for(let r=n-1;r>=i;r--)o[r+s]=o[r];for(let r=0;r<s;r++)o[r+i]=t[r]}function DP(o,e,t,i){const n=B7(o,e);let s=o.splice(n,t);return s===void 0&&(s=[]),tU(o,n,i),s}function B7(o,e){return e<0?Math.max(e+o.length,0):Math.min(e,o.length)}var rv;(function(o){function e(s){return s<0}o.isLessThan=e;function t(s){return s<=0}o.isLessThanOrEqual=t;function i(s){return s>0}o.isGreaterThan=i;function n(s){return s===0}o.isNeitherLessOrGreaterThan=n,o.greaterThan=1,o.lessThan=-1,o.neitherLessOrGreaterThan=0})(rv||(rv={}));function Uo(o,e){return(t,i)=>e(o(t),o(i))}function iU(...o){return(e,t)=>{for(const i of o){const n=i(e,t);if(!rv.isNeitherLessOrGreaterThan(n))return n}return rv.neitherLessOrGreaterThan}}const md=(o,e)=>o-e,nU=(o,e)=>md(o?1:0,e?1:0);function W7(o){return(e,t)=>-o(e,t)}class Dd{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;const i=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,i}takeFromEndWhile(e){let t=this.lastIdx;for(;t>=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class nl{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new nl(t=>this.iterate(i=>e(i)?t(i):!0))}map(e){return new nl(t=>this.iterate(i=>t(e(i))))}findLast(e){let t;return this.iterate(i=>(e(i)&&(t=i),!0)),t}findLastMaxBy(e){let t,i=!0;return this.iterate(n=>((i||rv.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0)),t}}nl.empty=new nl(o=>{});function vs(o){return typeof o=="string"}function gs(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function sU(o){const e=Object.getPrototypeOf(Uint8Array);return typeof o=="object"&&o instanceof e}function Uc(o){return typeof o=="number"&&!isNaN(o)}function xP(o){return!!o&&typeof o[Symbol.iterator]=="function"}function V7(o){return o===!0||o===!1}function Ks(o){return typeof o>"u"}function sl(o){return!mo(o)}function mo(o){return Ks(o)||o===null}function wt(o,e){if(!o)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function cc(o){if(mo(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function av(o){return typeof o=="function"}function oU(o,e){const t=Math.min(o.length,e.length);for(let i=0;i<t;i++)rU(o[i],e[i])}function rU(o,e){if(vs(e)){if(typeof o!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if(av(e)){try{if(o instanceof e)return}catch{}if(!mo(o)&&o.constructor===e||e.length===1&&e.call(void 0,o)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function zl(o){if(!o||typeof o!="object"||o instanceof RegExp)return o;const e=Array.isArray(o)?[]:{};return Object.entries(o).forEach(([t,i])=>{e[t]=i&&typeof i=="object"?zl(i):i}),e}function aU(o){if(!o||typeof o!="object")return o;const e=[o];for(;e.length>0;){const t=e.shift();Object.freeze(t);for(const i in t)if(H7.call(t,i)){const n=t[i];typeof n=="object"&&!Object.isFrozen(n)&&!sU(n)&&e.push(n)}}return o}const H7=Object.prototype.hasOwnProperty;function z7(o,e){return Ek(o,e,new Set)}function Ek(o,e,t){if(mo(o))return o;const i=e(o);if(typeof i<"u")return i;if(Array.isArray(o)){const n=[];for(const s of o)n.push(Ek(s,e,t));return n}if(gs(o)){if(t.has(o))throw new Error("Cannot clone recursive data-structure");t.add(o);const n={};for(const s in o)H7.call(o,s)&&(n[s]=Ek(o[s],e,t));return t.delete(o),n}return o}function JS(o,e,t=!0){return gs(o)?(gs(e)&&Object.keys(e).forEach(i=>{i in o?t&&(gs(o[i])&&gs(e[i])?JS(o[i],e[i],t):o[i]=e[i]):o[i]=e[i]}),o):e}function Co(o,e){if(o===e)return!0;if(o==null||e===null||e===void 0||typeof o!=typeof e||typeof o!="object"||Array.isArray(o)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(o)){if(o.length!==e.length)return!1;for(t=0;t<o.length;t++)if(!Co(o[t],e[t]))return!1}else{const n=[];for(i in o)n.push(i);n.sort();const s=[];for(i in e)s.push(i);if(s.sort(),!Co(n,s))return!1;for(t=0;t<n.length;t++)if(!Co(o[n[t]],e[n[t]]))return!1}return!0}function lU(o){let e=[];for(;Object.prototype!==o;)e=e.concat(Object.getOwnPropertyNames(o)),o=Object.getPrototypeOf(o);return e}function YM(o){const e=[];for(const t of lU(o))typeof o[t]=="function"&&e.push(t);return e}function dU(o,e){const t=n=>function(){const s=Array.prototype.slice.call(arguments,0);return e(n,s)},i={};for(const n of o)i[n]=t(n);return i}let cU=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function U7(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),cU&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function m(o,e,...t){return U7(e,t)}function mt(o,e,...t){const i=U7(e,t);return{value:i,original:i}}var yD;const rf="en";let G1=!1,Z1=!1,l1=!1,$7=!1,XM=!1,QM=!1,j7=!1,W0,d1=rf,kP=rf,hU,Rr;const pd=globalThis;let os;typeof pd.vscode<"u"&&typeof pd.vscode.process<"u"?os=pd.vscode.process:typeof process<"u"&&(os=process);const uU=typeof((yD=os==null?void 0:os.versions)===null||yD===void 0?void 0:yD.electron)=="string",gU=uU&&(os==null?void 0:os.type)==="renderer";if(typeof os=="object"){G1=os.platform==="win32",Z1=os.platform==="darwin",l1=os.platform==="linux",l1&&os.env.SNAP&&os.env.SNAP_REVISION,os.env.CI||os.env.BUILD_ARTIFACTSTAGINGDIRECTORY,W0=rf,d1=rf;const o=os.env.VSCODE_NLS_CONFIG;if(o)try{const e=JSON.parse(o),t=e.availableLanguages["*"];W0=e.locale,kP=e.osLocale,d1=t||rf,hU=e._translationsConfigFile}catch{}$7=!0}else typeof navigator=="object"&&!gU?(Rr=navigator.userAgent,G1=Rr.indexOf("Windows")>=0,Z1=Rr.indexOf("Macintosh")>=0,QM=(Rr.indexOf("Macintosh")>=0||Rr.indexOf("iPad")>=0||Rr.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,l1=Rr.indexOf("Linux")>=0,j7=(Rr==null?void 0:Rr.indexOf("Mobi"))>=0,XM=!0,m({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),W0=rf,d1=W0,kP=navigator.language):console.error("Unable to resolve platform.");const Vn=G1,lt=Z1,Cs=l1,Jr=$7,bh=XM,fU=XM&&typeof pd.importScripts=="function",mU=fU?pd.origin:void 0,ra=QM,K7=j7,hl=Rr,pU=d1,_U=typeof pd.postMessage=="function"&&!pd.importScripts,q7=(()=>{if(_U){const o=[];pd.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=o.length;i<n;i++){const s=o[i];if(s.id===t.data.vscodeScheduleAsyncWork){o.splice(i,1),s.callback();return}}});let e=0;return t=>{const i=++e;o.push({id:i,callback:t}),pd.postMessage({vscodeScheduleAsyncWork:i},"*")}}return o=>setTimeout(o)})(),qs=Z1||QM?2:G1?1:3;let IP=!0,EP=!1;function G7(){if(!EP){EP=!0;const o=new Uint8Array(2);o[0]=1,o[1]=2,IP=new Uint16Array(o.buffer)[0]===513}return IP}const Z7=!!(hl&&hl.indexOf("Chrome")>=0),vU=!!(hl&&hl.indexOf("Firefox")>=0),bU=!!(!Z7&&hl&&hl.indexOf("Safari")>=0),CU=!!(hl&&hl.indexOf("Edg/")>=0),wU=!!(hl&&hl.indexOf("Android")>=0),On={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var dt;(function(o){function e(C){return C&&typeof C=="object"&&typeof C[Symbol.iterator]=="function"}o.is=e;const t=Object.freeze([]);function i(){return t}o.empty=i;function*n(C){yield C}o.single=n;function s(C){return e(C)?C:n(C)}o.wrap=s;function r(C){return C||t}o.from=r;function*a(C){for(let w=C.length-1;w>=0;w--)yield C[w]}o.reverse=a;function l(C){return!C||C[Symbol.iterator]().next().done===!0}o.isEmpty=l;function d(C){return C[Symbol.iterator]().next().value}o.first=d;function c(C,w){for(const S of C)if(w(S))return!0;return!1}o.some=c;function h(C,w){for(const S of C)if(w(S))return S}o.find=h;function*u(C,w){for(const S of C)w(S)&&(yield S)}o.filter=u;function*g(C,w){let S=0;for(const L of C)yield w(L,S++)}o.map=g;function*f(...C){for(const w of C)yield*w}o.concat=f;function p(C,w,S){let L=S;for(const x of C)L=w(L,x);return L}o.reduce=p;function*_(C,w,S=C.length){for(w<0&&(w+=C.length),S<0?S+=C.length:S>C.length&&(S=C.length);w<S;w++)yield C[w]}o.slice=_;function v(C,w=Number.POSITIVE_INFINITY){const S=[];if(w===0)return[S,C];const L=C[Symbol.iterator]();for(let x=0;x<w;x++){const I=L.next();if(I.done)return[S,o.empty()];S.push(I.value)}return[S,{[Symbol.iterator](){return L}}]}o.consume=v;async function b(C){const w=[];for await(const S of C)w.push(S);return Promise.resolve(w)}o.asyncToArray=b})(dt||(dt={}));let Wi=class Nk{constructor(e){this.element=e,this.next=Nk.Undefined,this.prev=Nk.Undefined}};Wi.Undefined=new Wi(void 0);class fs{constructor(){this._first=Wi.Undefined,this._last=Wi.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Wi.Undefined}clear(){let e=this._first;for(;e!==Wi.Undefined;){const t=e.next;e.prev=Wi.Undefined,e.next=Wi.Undefined,e=t}this._first=Wi.Undefined,this._last=Wi.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new Wi(e);if(this._first===Wi.Undefined)this._first=i,this._last=i;else if(t){const s=this._last;this._last=i,i.prev=s,s.next=i}else{const s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==Wi.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Wi.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Wi.Undefined&&e.next!==Wi.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Wi.Undefined&&e.next===Wi.Undefined?(this._first=Wi.Undefined,this._last=Wi.Undefined):e.next===Wi.Undefined?(this._last=this._last.prev,this._last.next=Wi.Undefined):e.prev===Wi.Undefined&&(this._first=this._first.next,this._first.prev=Wi.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Wi.Undefined;)yield e.element,e=e.next}}const Y7="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function SU(o=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of Y7)o.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const JM=SU();function eR(o){let e=JM;if(o&&o instanceof RegExp)if(o.global)e=o;else{let t="g";o.ignoreCase&&(t+="i"),o.multiline&&(t+="m"),o.unicode&&(t+="u"),e=new RegExp(o.source,t)}return e.lastIndex=0,e}const X7=new fs;X7.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function lv(o,e,t,i,n){if(e=eR(e),n||(n=dt.first(X7)),t.length>n.maxLen){let d=o-n.maxLen/2;return d<0?d=0:i+=d,t=t.substring(d,o+n.maxLen/2),lv(o,e,t,i,n)}const s=Date.now(),r=o-1-i;let a=-1,l=null;for(let d=1;!(Date.now()-s>=n.timeBudget);d++){const c=r-n.windowSize*d;e.lastIndex=Math.max(0,c);const h=yU(e,t,r,a);if(!h&&l||(l=h,c<=0))break;a=c}if(l){const d={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,d}return null}function yU(o,e,t,i){let n;for(;n=o.exec(e);){const s=n.index||0;if(s<=t&&o.lastIndex>=t)return n;if(i>0&&s>i)return null}return null}const qd=8;class Q7{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class J7{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class ni{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return ey(e,t)}compute(e,t,i){return i}}class D_{constructor(e,t){this.newValue=e,this.didChange=t}}function ey(o,e){if(typeof o!="object"||typeof e!="object"||!o||!e)return new D_(e,o!==e);if(Array.isArray(o)||Array.isArray(e)){const i=Array.isArray(o)&&Array.isArray(e)&&ri(o,e);return new D_(e,!i)}let t=!1;for(const i in e)if(e.hasOwnProperty(i)){const n=ey(o[i],e[i]);n.didChange&&(o[i]=n.newValue,t=!0)}return new D_(o,t)}class Hb{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return ey(e,t)}validate(e){return this.defaultValue}}class Gm{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return ey(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,i){return i}}function ve(o,e){return typeof o>"u"?e:o==="false"?!1:!!o}class gt extends Gm{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return ve(e,this.defaultValue)}}function Yh(o,e,t,i){if(typeof o>"u")return e;let n=parseInt(o,10);return isNaN(n)?e:(n=Math.max(t,n),n=Math.min(i,n),n|0)}class Pt extends Gm{static clampedInt(e,t,i,n){return Yh(e,t,i,n)}constructor(e,t,i,n,s,r=void 0){typeof r<"u"&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=s),super(e,t,i,r),this.minimum=n,this.maximum=s}validate(e){return Pt.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function LU(o,e,t,i){if(typeof o>"u")return e;const n=fr.float(o,e);return fr.clamp(n,t,i)}class fr extends Gm{static clamp(e,t,i){return e<t?t:e>i?i:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,s){typeof s<"u"&&(s.type="number",s.default=i),super(e,t,i,s),this.validationFn=n}validate(e){return this.validationFn(fr.float(e,this.defaultValue))}}class ls extends Gm{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return ls.string(e,this.defaultValue)}}function mi(o,e,t,i){return typeof o!="string"?e:i&&o in i?i[o]:t.indexOf(o)===-1?e:o}class di extends Gm{constructor(e,t,i,n,s=void 0){typeof s<"u"&&(s.type="string",s.enum=n,s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return mi(e,this.defaultValue,this._allowedValues)}}class V0 extends ni{constructor(e,t,i,n,s,r,a=void 0){typeof a<"u"&&(a.type="string",a.enum=s,a.default=n),super(e,t,i,a),this._allowedValues=s,this._convert=r}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function DU(o){switch(o){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class xU extends ni{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[m("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),m("accessibilitySupport.on","Optimize for usage with a Screen Reader."),m("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:m("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return i===0?e.accessibilitySupport:i}}class kU extends ni{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:m("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:m("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:ve(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:ve(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function IU(o){switch(o){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var vn;(function(o){o[o.Line=1]="Line",o[o.Block=2]="Block",o[o.Underline=3]="Underline",o[o.LineThin=4]="LineThin",o[o.BlockOutline=5]="BlockOutline",o[o.UnderlineThin=6]="UnderlineThin"})(vn||(vn={}));function EU(o){switch(o){case"line":return vn.Line;case"block":return vn.Block;case"underline":return vn.Underline;case"line-thin":return vn.LineThin;case"block-outline":return vn.BlockOutline;case"underline-thin":return vn.UnderlineThin}}class NU extends Hb{constructor(){super(141)}compute(e,t,i){const n=["monaco-editor"];return t.get(39)&&n.push(t.get(39)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(74)==="default"?n.push("mouse-default"):t.get(74)==="copy"&&n.push("mouse-copy"),t.get(111)&&n.push("showUnused"),t.get(139)&&n.push("showDeprecated"),n.join(" ")}}class TU extends gt{constructor(){super(37,"emptySelectionClipboard",!0,{description:m("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class MU extends ni{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:m("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[m("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),m("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),m("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:m("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[m("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),m("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),m("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:m("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:m("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:lt},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:m("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:m("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:ve(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":mi(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":mi(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:ve(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:ve(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:ve(t.loop,this.defaultValue.loop)}}}class po extends ni{constructor(){super(51,"fontLigatures",po.OFF,{anyOf:[{type:"boolean",description:m("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:m("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:m("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"||e.length===0?po.OFF:e==="true"?po.ON:e:e?po.ON:po.OFF}}po.OFF='"liga" off, "calt" off';po.ON='"liga" on, "calt" on';class Gr extends ni{constructor(){super(54,"fontVariations",Gr.OFF,{anyOf:[{type:"boolean",description:m("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:m("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:m("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?Gr.OFF:e==="true"?Gr.TRANSLATE:e:e?Gr.TRANSLATE:Gr.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}Gr.OFF="normal";Gr.TRANSLATE="translate";class RU extends Hb{constructor(){super(50)}compute(e,t,i){return e.fontInfo}}class AU extends Gm{constructor(){super(52,"fontSize",As.fontSize,{type:"number",minimum:6,maximum:100,default:As.fontSize,description:m("fontSize","Controls the font size in pixels.")})}validate(e){const t=fr.float(e,this.defaultValue);return t===0?As.fontSize:fr.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class za extends ni{constructor(){super(53,"fontWeight",As.fontWeight,{anyOf:[{type:"number",minimum:za.MINIMUM_VALUE,maximum:za.MAXIMUM_VALUE,errorMessage:m("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:za.SUGGESTION_VALUES}],default:As.fontWeight,description:m("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Pt.clampedInt(e,As.fontWeight,za.MINIMUM_VALUE,za.MAXIMUM_VALUE))}}za.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];za.MINIMUM_VALUE=1;za.MAXIMUM_VALUE=1e3;class PU extends ni{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[m("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),m("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),m("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:m("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:m("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:m("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:m("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:m("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:m("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:m("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:m("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:m("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:m("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:m("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,s,r;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:mi(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:mi(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=a.multipleTypeDefinitions)!==null&&i!==void 0?i:mi(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=a.multipleDeclarations)!==null&&n!==void 0?n:mi(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(s=a.multipleImplementations)!==null&&s!==void 0?s:mi(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(r=a.multipleReferences)!==null&&r!==void 0?r:mi(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:ls.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:ls.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:ls.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:ls.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:ls.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class OU extends ni{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:m("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:m("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:m("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:m("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:m("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ve(t.enabled,this.defaultValue.enabled),delay:Pt.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:ve(t.sticky,this.defaultValue.sticky),hidingDelay:Pt.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:ve(t.above,this.defaultValue.above)}}}class Nf extends Hb{constructor(){super(144)}compute(e,t,i){return Nf.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));const s=(i+e.viewLineCount+n)/(e.pixelRatio*e.height),r=Math.floor(e.viewLineCount/s);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:s,minimapLineCount:r}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,s=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.paddingTop===r.paddingTop&&e.paddingBottom===r.paddingBottom&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,d=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let u=s>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const g=e.minimap.maxColumn,f=e.minimap.size,p=e.minimap.side,_=e.verticalScrollbarWidth,v=e.viewLineCount,b=e.remainingWidth,C=e.isViewportWrapping,w=h?2:3;let S=Math.floor(s*n);const L=S/s;let x=!1,I=!1,T=w*u,H=u/s,P=1;if(f==="fill"||f==="fit"){const{typicalViewportLineCount:Me,extraLinesBeforeFirstLine:me,extraLinesBeyondLastLine:Ge,desiredRatio:Ze,minimapLineCount:Ee}=Nf.computeContainedMinimapLineCount({viewLineCount:v,scrollBeyondLastLine:c,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:l,pixelRatio:s});if(v/Ee>1)x=!0,I=!0,u=1,T=1,H=u/s;else{let Ei=!1,ts=u+1;if(f==="fit"){const $i=Math.ceil((me+v+Ge)*T);C&&a&&b<=t.stableFitRemainingWidth?(Ei=!0,ts=t.stableFitMaxMinimapScale):Ei=$i>S}if(f==="fill"||Ei){x=!0;const $i=u;T=Math.min(l*s,Math.max(1,Math.floor(1/Ze))),C&&a&&b<=t.stableFitRemainingWidth&&(ts=t.stableFitMaxMinimapScale),u=Math.min(ts,Math.max(1,Math.floor(T/w))),u>$i&&(P=Math.min(2,u/$i)),H=u/s/P,S=Math.ceil(Math.max(Me,me+v+Ge)*T),C?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const A=Math.floor(g*H),B=Math.min(A,Math.max(0,Math.floor((b-_-2)*H/(d+H)))+qd);let Z=Math.floor(s*B);const ne=Z/s;Z=Math.floor(Z*P);const pe=h?1:2,Se=p==="left"?0:i-B-_;return{renderMinimap:pe,minimapLeft:Se,minimapWidth:B,minimapHeightIsEditorHeight:x,minimapIsSampling:I,minimapScale:u,minimapLineHeight:T,minimapCanvasInnerWidth:Z,minimapCanvasInnerHeight:S,minimapCanvasOuterWidth:ne,minimapCanvasOuterHeight:L}}static computeLayout(e,t){const i=t.outerWidth|0,n=t.outerHeight|0,s=t.lineHeight|0,r=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,d=t.pixelRatio,c=t.viewLineCount,h=e.get(136),u=h==="inherit"?e.get(135):h,g=u==="inherit"?e.get(131):u,f=e.get(134),p=t.isDominatedByLongLines,_=e.get(57),v=e.get(68).renderType!==0,b=e.get(69),C=e.get(105),w=e.get(84),S=e.get(73),L=e.get(103),x=L.verticalScrollbarSize,I=L.verticalHasArrows,T=L.arrowSize,H=L.horizontalScrollbarSize,P=e.get(43),A=e.get(110)!=="never";let B=e.get(66);P&&A&&(B+=16);let Z=0;if(v){const Zi=Math.max(r,b);Z=Math.round(Zi*l)}let ne=0;_&&(ne=s*t.glyphMarginDecorationLaneCount);let pe=0,Se=pe+ne,Me=Se+Z,me=Me+B;const Ge=i-ne-Z-B;let Ze=!1,Ee=!1,ge=-1;u==="inherit"&&p?(Ze=!0,Ee=!0):g==="on"||g==="bounded"?Ee=!0:g==="wordWrapColumn"&&(ge=f);const Ei=Nf._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:a,pixelRatio:d,scrollBeyondLastLine:C,paddingTop:w.top,paddingBottom:w.bottom,minimap:S,verticalScrollbarWidth:x,viewLineCount:c,remainingWidth:Ge,isViewportWrapping:Ee},t.memory||new J7);Ei.renderMinimap!==0&&Ei.minimapLeft===0&&(pe+=Ei.minimapWidth,Se+=Ei.minimapWidth,Me+=Ei.minimapWidth,me+=Ei.minimapWidth);const ts=Ge-Ei.minimapWidth,$i=Math.max(1,Math.floor((ts-x-2)/a)),Lt=I?T:0;return Ee&&(ge=Math.max(1,$i),g==="bounded"&&(ge=Math.min(ge,f))),{width:i,height:n,glyphMarginLeft:pe,glyphMarginWidth:ne,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:Se,lineNumbersWidth:Z,decorationsLeft:Me,decorationsWidth:B,contentLeft:me,contentWidth:ts,minimap:Ei,viewportColumn:$i,isWordWrapMinified:Ze,isViewportWrapping:Ee,wrappingColumn:ge,verticalScrollbarWidth:x,horizontalScrollbarHeight:H,overviewRuler:{top:Lt,width:x,height:n-2*Lt,right:0}}}}class FU extends ni{constructor(){super(138,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[m("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),m("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:m("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return mi(e,"simple",["simple","advanced"])}compute(e,t,i){return t.get(2)===2?"advanced":i}}var hr;(function(o){o.Off="off",o.OnCode="onCode",o.On="on"})(hr||(hr={}));class BU extends ni{constructor(){const e={enabled:hr.OnCode};super(65,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[hr.Off,hr.OnCode,hr.On],default:e.enabled,enumDescriptions:[m("editor.lightbulb.enabled.off","Disable the code action menu."),m("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),m("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:m("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:mi(e.enabled,this.defaultValue.enabled,[hr.Off,hr.OnCode,hr.On])}}}class WU extends ni{constructor(){const e={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(115,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:m("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:20,description:m("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:m("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:m("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ve(t.enabled,this.defaultValue.enabled),maxLineCount:Pt.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:mi(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:ve(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class VU extends ni{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(140,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:m("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[m("editor.inlayHints.on","Inlay hints are enabled"),m("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",lt?"Ctrl+Option":"Ctrl+Alt"),m("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",lt?"Ctrl+Option":"Ctrl+Alt"),m("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:m("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:m("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:m("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:mi(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Pt.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:ls.string(t.fontFamily,this.defaultValue.fontFamily),padding:ve(t.padding,this.defaultValue.padding)}}}class HU extends ni{constructor(){super(66,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Pt.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?Pt.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}class zU extends fr{constructor(){super(67,"lineHeight",As.lineHeight,e=>fr.clamp(e,0,150),{markdownDescription:m("lineHeight",`Controls the line height.
|
|
7
|
+
import{Q as be,d as zz,m as SP,aH as Uz,w as wD,q as $z,a8 as jz,o as Kz,f as qz,g as Gz,G as Zz,_ as Yz}from"./index-tflVuual.js";function Mo(o,e=0){return o[o.length-(1+e)]}function Xz(o){if(o.length===0)throw new Error("Invalid tail call");return[o.slice(0,o.length-1),o[o.length-1]]}function ri(o,e,t=(i,n)=>i===n){if(o===e)return!0;if(!o||!e||o.length!==e.length)return!1;for(let i=0,n=o.length;i<n;i++)if(!t(o[i],e[i]))return!1;return!0}function Qz(o,e){const t=o.length-1;e<t&&(o[e]=o[t]),o.pop()}function ov(o,e,t){return Jz(o.length,i=>t(o[i],e))}function Jz(o,e){let t=0,i=o-1;for(;t<=i;){const n=(t+i)/2|0,s=e(n);if(s<0)t=n+1;else if(s>0)i=n-1;else return n}return-(t+1)}function kk(o,e,t){if(o=o|0,o>=e.length)throw new TypeError("invalid index");const i=e[Math.floor(e.length*Math.random())],n=[],s=[],r=[];for(const a of e){const l=t(a,i);l<0?n.push(a):l>0?s.push(a):r.push(a)}return o<n.length?kk(o,n,t):o<n.length+r.length?r[0]:kk(o-(n.length+r.length),s,t)}function yP(o,e){const t=[];let i;for(const n of o.slice(0).sort(e))!i||e(i[0],n)!==0?(i=[n],t.push(i)):i.push(n);return t}function*qM(o,e){let t,i;for(const n of o)i!==void 0&&e(i,n)?t.push(n):(t&&(yield t),t=[n]),i=n;t&&(yield t)}function O7(o,e){for(let t=0;t<=o.length;t++)e(t===0?void 0:o[t-1],t===o.length?void 0:o[t])}function eU(o,e){for(let t=0;t<o.length;t++)e(t===0?void 0:o[t-1],o[t],t+1===o.length?void 0:o[t+1])}function oa(o){return o.filter(e=>!!e)}function LP(o){let e=0;for(let t=0;t<o.length;t++)o[t]&&(o[e]=o[t],e+=1);o.length=e}function F7(o){return!Array.isArray(o)||o.length===0}function Bn(o){return Array.isArray(o)&&o.length>0}function Ld(o,e=t=>t){const t=new Set;return o.filter(i=>{const n=e(i);return t.has(n)?!1:(t.add(n),!0)})}function GM(o,e){return o.length>0?o[0]:e}function ss(o,e){let t=typeof e=="number"?o:0;typeof e=="number"?t=o:(t=0,e=o);const i=[];if(t<=e)for(let n=t;n<e;n++)i.push(n);else for(let n=t;n>e;n--)i.push(n);return i}function QS(o,e,t){const i=o.slice(0,e),n=o.slice(e);return i.concat(t,n)}function SD(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.unshift(e))}function B0(o,e){const t=o.indexOf(e);t>-1&&(o.splice(t,1),o.push(e))}function Ik(o,e){for(const t of e)o.push(t)}function ZM(o){return Array.isArray(o)?o:[o]}function tU(o,e,t){const i=B7(o,e),n=o.length,s=t.length;o.length=n+s;for(let r=n-1;r>=i;r--)o[r+s]=o[r];for(let r=0;r<s;r++)o[r+i]=t[r]}function DP(o,e,t,i){const n=B7(o,e);let s=o.splice(n,t);return s===void 0&&(s=[]),tU(o,n,i),s}function B7(o,e){return e<0?Math.max(e+o.length,0):Math.min(e,o.length)}var rv;(function(o){function e(s){return s<0}o.isLessThan=e;function t(s){return s<=0}o.isLessThanOrEqual=t;function i(s){return s>0}o.isGreaterThan=i;function n(s){return s===0}o.isNeitherLessOrGreaterThan=n,o.greaterThan=1,o.lessThan=-1,o.neitherLessOrGreaterThan=0})(rv||(rv={}));function Uo(o,e){return(t,i)=>e(o(t),o(i))}function iU(...o){return(e,t)=>{for(const i of o){const n=i(e,t);if(!rv.isNeitherLessOrGreaterThan(n))return n}return rv.neitherLessOrGreaterThan}}const md=(o,e)=>o-e,nU=(o,e)=>md(o?1:0,e?1:0);function W7(o){return(e,t)=>-o(e,t)}class Dd{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;const i=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,i}takeFromEndWhile(e){let t=this.lastIdx;for(;t>=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}class nl{constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(t=>(e.push(t),!0)),e}filter(e){return new nl(t=>this.iterate(i=>e(i)?t(i):!0))}map(e){return new nl(t=>this.iterate(i=>t(e(i))))}findLast(e){let t;return this.iterate(i=>(e(i)&&(t=i),!0)),t}findLastMaxBy(e){let t,i=!0;return this.iterate(n=>((i||rv.isGreaterThan(e(n,t)))&&(i=!1,t=n),!0)),t}}nl.empty=new nl(o=>{});function vs(o){return typeof o=="string"}function gs(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)&&!(o instanceof RegExp)&&!(o instanceof Date)}function sU(o){const e=Object.getPrototypeOf(Uint8Array);return typeof o=="object"&&o instanceof e}function Uc(o){return typeof o=="number"&&!isNaN(o)}function xP(o){return!!o&&typeof o[Symbol.iterator]=="function"}function V7(o){return o===!0||o===!1}function Ks(o){return typeof o>"u"}function sl(o){return!mo(o)}function mo(o){return Ks(o)||o===null}function wt(o,e){if(!o)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function cc(o){if(mo(o))throw new Error("Assertion Failed: argument is undefined or null");return o}function av(o){return typeof o=="function"}function oU(o,e){const t=Math.min(o.length,e.length);for(let i=0;i<t;i++)rU(o[i],e[i])}function rU(o,e){if(vs(e)){if(typeof o!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if(av(e)){try{if(o instanceof e)return}catch{}if(!mo(o)&&o.constructor===e||e.length===1&&e.call(void 0,o)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function zl(o){if(!o||typeof o!="object"||o instanceof RegExp)return o;const e=Array.isArray(o)?[]:{};return Object.entries(o).forEach(([t,i])=>{e[t]=i&&typeof i=="object"?zl(i):i}),e}function aU(o){if(!o||typeof o!="object")return o;const e=[o];for(;e.length>0;){const t=e.shift();Object.freeze(t);for(const i in t)if(H7.call(t,i)){const n=t[i];typeof n=="object"&&!Object.isFrozen(n)&&!sU(n)&&e.push(n)}}return o}const H7=Object.prototype.hasOwnProperty;function z7(o,e){return Ek(o,e,new Set)}function Ek(o,e,t){if(mo(o))return o;const i=e(o);if(typeof i<"u")return i;if(Array.isArray(o)){const n=[];for(const s of o)n.push(Ek(s,e,t));return n}if(gs(o)){if(t.has(o))throw new Error("Cannot clone recursive data-structure");t.add(o);const n={};for(const s in o)H7.call(o,s)&&(n[s]=Ek(o[s],e,t));return t.delete(o),n}return o}function JS(o,e,t=!0){return gs(o)?(gs(e)&&Object.keys(e).forEach(i=>{i in o?t&&(gs(o[i])&&gs(e[i])?JS(o[i],e[i],t):o[i]=e[i]):o[i]=e[i]}),o):e}function Co(o,e){if(o===e)return!0;if(o==null||e===null||e===void 0||typeof o!=typeof e||typeof o!="object"||Array.isArray(o)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(o)){if(o.length!==e.length)return!1;for(t=0;t<o.length;t++)if(!Co(o[t],e[t]))return!1}else{const n=[];for(i in o)n.push(i);n.sort();const s=[];for(i in e)s.push(i);if(s.sort(),!Co(n,s))return!1;for(t=0;t<n.length;t++)if(!Co(o[n[t]],e[n[t]]))return!1}return!0}function lU(o){let e=[];for(;Object.prototype!==o;)e=e.concat(Object.getOwnPropertyNames(o)),o=Object.getPrototypeOf(o);return e}function YM(o){const e=[];for(const t of lU(o))typeof o[t]=="function"&&e.push(t);return e}function dU(o,e){const t=n=>function(){const s=Array.prototype.slice.call(arguments,0);return e(n,s)},i={};for(const n of o)i[n]=t(n);return i}let cU=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;function U7(o,e){let t;return e.length===0?t=o:t=o.replace(/\{(\d+)\}/g,(i,n)=>{const s=n[0],r=e[s];let a=i;return typeof r=="string"?a=r:(typeof r=="number"||typeof r=="boolean"||r===void 0||r===null)&&(a=String(r)),a}),cU&&(t="["+t.replace(/[aouei]/g,"$&$&")+"]"),t}function m(o,e,...t){return U7(e,t)}function mt(o,e,...t){const i=U7(e,t);return{value:i,original:i}}var yD;const rf="en";let G1=!1,Z1=!1,l1=!1,$7=!1,XM=!1,QM=!1,j7=!1,W0,d1=rf,kP=rf,hU,Rr;const pd=globalThis;let os;typeof pd.vscode<"u"&&typeof pd.vscode.process<"u"?os=pd.vscode.process:typeof process<"u"&&(os=process);const uU=typeof((yD=os==null?void 0:os.versions)===null||yD===void 0?void 0:yD.electron)=="string",gU=uU&&(os==null?void 0:os.type)==="renderer";if(typeof os=="object"){G1=os.platform==="win32",Z1=os.platform==="darwin",l1=os.platform==="linux",l1&&os.env.SNAP&&os.env.SNAP_REVISION,os.env.CI||os.env.BUILD_ARTIFACTSTAGINGDIRECTORY,W0=rf,d1=rf;const o=os.env.VSCODE_NLS_CONFIG;if(o)try{const e=JSON.parse(o),t=e.availableLanguages["*"];W0=e.locale,kP=e.osLocale,d1=t||rf,hU=e._translationsConfigFile}catch{}$7=!0}else typeof navigator=="object"&&!gU?(Rr=navigator.userAgent,G1=Rr.indexOf("Windows")>=0,Z1=Rr.indexOf("Macintosh")>=0,QM=(Rr.indexOf("Macintosh")>=0||Rr.indexOf("iPad")>=0||Rr.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,l1=Rr.indexOf("Linux")>=0,j7=(Rr==null?void 0:Rr.indexOf("Mobi"))>=0,XM=!0,m({key:"ensureLoaderPluginIsLoaded",comment:["{Locked}"]},"_"),W0=rf,d1=W0,kP=navigator.language):console.error("Unable to resolve platform.");const Vn=G1,lt=Z1,Cs=l1,Jr=$7,bh=XM,fU=XM&&typeof pd.importScripts=="function",mU=fU?pd.origin:void 0,ra=QM,K7=j7,hl=Rr,pU=d1,_U=typeof pd.postMessage=="function"&&!pd.importScripts,q7=(()=>{if(_U){const o=[];pd.addEventListener("message",t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=o.length;i<n;i++){const s=o[i];if(s.id===t.data.vscodeScheduleAsyncWork){o.splice(i,1),s.callback();return}}});let e=0;return t=>{const i=++e;o.push({id:i,callback:t}),pd.postMessage({vscodeScheduleAsyncWork:i},"*")}}return o=>setTimeout(o)})(),qs=Z1||QM?2:G1?1:3;let IP=!0,EP=!1;function G7(){if(!EP){EP=!0;const o=new Uint8Array(2);o[0]=1,o[1]=2,IP=new Uint16Array(o.buffer)[0]===513}return IP}const Z7=!!(hl&&hl.indexOf("Chrome")>=0),vU=!!(hl&&hl.indexOf("Firefox")>=0),bU=!!(!Z7&&hl&&hl.indexOf("Safari")>=0),CU=!!(hl&&hl.indexOf("Edg/")>=0),wU=!!(hl&&hl.indexOf("Android")>=0),On={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!0,independentColorPoolPerBracketType:!1}};var dt;(function(o){function e(C){return C&&typeof C=="object"&&typeof C[Symbol.iterator]=="function"}o.is=e;const t=Object.freeze([]);function i(){return t}o.empty=i;function*n(C){yield C}o.single=n;function s(C){return e(C)?C:n(C)}o.wrap=s;function r(C){return C||t}o.from=r;function*a(C){for(let w=C.length-1;w>=0;w--)yield C[w]}o.reverse=a;function l(C){return!C||C[Symbol.iterator]().next().done===!0}o.isEmpty=l;function d(C){return C[Symbol.iterator]().next().value}o.first=d;function c(C,w){for(const S of C)if(w(S))return!0;return!1}o.some=c;function h(C,w){for(const S of C)if(w(S))return S}o.find=h;function*u(C,w){for(const S of C)w(S)&&(yield S)}o.filter=u;function*g(C,w){let S=0;for(const L of C)yield w(L,S++)}o.map=g;function*f(...C){for(const w of C)yield*w}o.concat=f;function p(C,w,S){let L=S;for(const x of C)L=w(L,x);return L}o.reduce=p;function*_(C,w,S=C.length){for(w<0&&(w+=C.length),S<0?S+=C.length:S>C.length&&(S=C.length);w<S;w++)yield C[w]}o.slice=_;function v(C,w=Number.POSITIVE_INFINITY){const S=[];if(w===0)return[S,C];const L=C[Symbol.iterator]();for(let x=0;x<w;x++){const I=L.next();if(I.done)return[S,o.empty()];S.push(I.value)}return[S,{[Symbol.iterator](){return L}}]}o.consume=v;async function b(C){const w=[];for await(const S of C)w.push(S);return Promise.resolve(w)}o.asyncToArray=b})(dt||(dt={}));let Wi=class Nk{constructor(e){this.element=e,this.next=Nk.Undefined,this.prev=Nk.Undefined}};Wi.Undefined=new Wi(void 0);class fs{constructor(){this._first=Wi.Undefined,this._last=Wi.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Wi.Undefined}clear(){let e=this._first;for(;e!==Wi.Undefined;){const t=e.next;e.prev=Wi.Undefined,e.next=Wi.Undefined,e=t}this._first=Wi.Undefined,this._last=Wi.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new Wi(e);if(this._first===Wi.Undefined)this._first=i,this._last=i;else if(t){const s=this._last;this._last=i,i.prev=s,s.next=i}else{const s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==Wi.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Wi.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Wi.Undefined&&e.next!==Wi.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Wi.Undefined&&e.next===Wi.Undefined?(this._first=Wi.Undefined,this._last=Wi.Undefined):e.next===Wi.Undefined?(this._last=this._last.prev,this._last.next=Wi.Undefined):e.prev===Wi.Undefined&&(this._first=this._first.next,this._first.prev=Wi.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Wi.Undefined;)yield e.element,e=e.next}}const Y7="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function SU(o=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of Y7)o.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const JM=SU();function eR(o){let e=JM;if(o&&o instanceof RegExp)if(o.global)e=o;else{let t="g";o.ignoreCase&&(t+="i"),o.multiline&&(t+="m"),o.unicode&&(t+="u"),e=new RegExp(o.source,t)}return e.lastIndex=0,e}const X7=new fs;X7.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function lv(o,e,t,i,n){if(e=eR(e),n||(n=dt.first(X7)),t.length>n.maxLen){let d=o-n.maxLen/2;return d<0?d=0:i+=d,t=t.substring(d,o+n.maxLen/2),lv(o,e,t,i,n)}const s=Date.now(),r=o-1-i;let a=-1,l=null;for(let d=1;!(Date.now()-s>=n.timeBudget);d++){const c=r-n.windowSize*d;e.lastIndex=Math.max(0,c);const h=yU(e,t,r,a);if(!h&&l||(l=h,c<=0))break;a=c}if(l){const d={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,d}return null}function yU(o,e,t,i){let n;for(;n=o.exec(e);){const s=n.index||0;if(s<=t&&o.lastIndex>=t)return n;if(i>0&&s>i)return null}return null}const qd=8;class Q7{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class J7{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class ni{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return ey(e,t)}compute(e,t,i){return i}}class D_{constructor(e,t){this.newValue=e,this.didChange=t}}function ey(o,e){if(typeof o!="object"||typeof e!="object"||!o||!e)return new D_(e,o!==e);if(Array.isArray(o)||Array.isArray(e)){const i=Array.isArray(o)&&Array.isArray(e)&&ri(o,e);return new D_(e,!i)}let t=!1;for(const i in e)if(e.hasOwnProperty(i)){const n=ey(o[i],e[i]);n.didChange&&(o[i]=n.newValue,t=!0)}return new D_(o,t)}class Hb{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return ey(e,t)}validate(e){return this.defaultValue}}class Gm{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return ey(e,t)}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,i){return i}}function ve(o,e){return typeof o>"u"?e:o==="false"?!1:!!o}class gt extends Gm{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return ve(e,this.defaultValue)}}function Yh(o,e,t,i){if(typeof o>"u")return e;let n=parseInt(o,10);return isNaN(n)?e:(n=Math.max(t,n),n=Math.min(i,n),n|0)}class Pt extends Gm{static clampedInt(e,t,i,n){return Yh(e,t,i,n)}constructor(e,t,i,n,s,r=void 0){typeof r<"u"&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=s),super(e,t,i,r),this.minimum=n,this.maximum=s}validate(e){return Pt.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}function LU(o,e,t,i){if(typeof o>"u")return e;const n=fr.float(o,e);return fr.clamp(n,t,i)}class fr extends Gm{static clamp(e,t,i){return e<t?t:e>i?i:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const i=parseFloat(e);return isNaN(i)?t:i}constructor(e,t,i,n,s){typeof s<"u"&&(s.type="number",s.default=i),super(e,t,i,s),this.validationFn=n}validate(e){return this.validationFn(fr.float(e,this.defaultValue))}}class ls extends Gm{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return ls.string(e,this.defaultValue)}}function mi(o,e,t,i){return typeof o!="string"?e:i&&o in i?i[o]:t.indexOf(o)===-1?e:o}class di extends Gm{constructor(e,t,i,n,s=void 0){typeof s<"u"&&(s.type="string",s.enum=n,s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return mi(e,this.defaultValue,this._allowedValues)}}class V0 extends ni{constructor(e,t,i,n,s,r,a=void 0){typeof a<"u"&&(a.type="string",a.enum=s,a.default=n),super(e,t,i,a),this._allowedValues=s,this._convert=r}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function DU(o){switch(o){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class xU extends ni{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[m("accessibilitySupport.auto","Use platform APIs to detect when a Screen Reader is attached."),m("accessibilitySupport.on","Optimize for usage with a Screen Reader."),m("accessibilitySupport.off","Assume a screen reader is not attached.")],default:"auto",tags:["accessibility"],description:m("accessibilitySupport","Controls if the UI should run in a mode where it is optimized for screen readers.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return i===0?e.accessibilitySupport:i}}class kU extends ni{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:m("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:m("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:ve(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:ve(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function IU(o){switch(o){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var vn;(function(o){o[o.Line=1]="Line",o[o.Block=2]="Block",o[o.Underline=3]="Underline",o[o.LineThin=4]="LineThin",o[o.BlockOutline=5]="BlockOutline",o[o.UnderlineThin=6]="UnderlineThin"})(vn||(vn={}));function EU(o){switch(o){case"line":return vn.Line;case"block":return vn.Block;case"underline":return vn.Underline;case"line-thin":return vn.LineThin;case"block-outline":return vn.BlockOutline;case"underline-thin":return vn.UnderlineThin}}class NU extends Hb{constructor(){super(141)}compute(e,t,i){const n=["monaco-editor"];return t.get(39)&&n.push(t.get(39)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(74)==="default"?n.push("mouse-default"):t.get(74)==="copy"&&n.push("mouse-copy"),t.get(111)&&n.push("showUnused"),t.get(139)&&n.push("showDeprecated"),n.join(" ")}}class TU extends gt{constructor(){super(37,"emptySelectionClipboard",!0,{description:m("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class MU extends ni{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:m("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[m("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),m("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),m("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:m("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[m("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),m("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),m("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:m("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:m("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:lt},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:m("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:m("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:ve(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":mi(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":mi(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:ve(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:ve(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:ve(t.loop,this.defaultValue.loop)}}}class po extends ni{constructor(){super(51,"fontLigatures",po.OFF,{anyOf:[{type:"boolean",description:m("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:m("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:m("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"||e.length===0?po.OFF:e==="true"?po.ON:e:e?po.ON:po.OFF}}po.OFF='"liga" off, "calt" off';po.ON='"liga" on, "calt" on';class Gr extends ni{constructor(){super(54,"fontVariations",Gr.OFF,{anyOf:[{type:"boolean",description:m("fontVariations","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.")},{type:"string",description:m("fontVariationSettings","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.")}],description:m("fontVariationsGeneral","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?Gr.OFF:e==="true"?Gr.TRANSLATE:e:e?Gr.TRANSLATE:Gr.OFF}compute(e,t,i){return e.fontInfo.fontVariationSettings}}Gr.OFF="normal";Gr.TRANSLATE="translate";class RU extends Hb{constructor(){super(50)}compute(e,t,i){return e.fontInfo}}class AU extends Gm{constructor(){super(52,"fontSize",As.fontSize,{type:"number",minimum:6,maximum:100,default:As.fontSize,description:m("fontSize","Controls the font size in pixels.")})}validate(e){const t=fr.float(e,this.defaultValue);return t===0?As.fontSize:fr.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class za extends ni{constructor(){super(53,"fontWeight",As.fontWeight,{anyOf:[{type:"number",minimum:za.MINIMUM_VALUE,maximum:za.MAXIMUM_VALUE,errorMessage:m("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:za.SUGGESTION_VALUES}],default:As.fontWeight,description:m("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(Pt.clampedInt(e,As.fontWeight,za.MINIMUM_VALUE,za.MAXIMUM_VALUE))}}za.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];za.MINIMUM_VALUE=1;za.MAXIMUM_VALUE=1e3;class PU extends ni{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[m("editor.gotoLocation.multiple.peek","Show Peek view of the results (default)"),m("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a Peek view"),m("editor.gotoLocation.multiple.goto","Go to the primary result and enable Peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:m("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":{description:m("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleTypeDefinitions":{description:m("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleDeclarations":{description:m("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleImplementations":{description:m("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist."),...t},"editor.gotoLocation.multipleReferences":{description:m("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist."),...t},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:m("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:m("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:m("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:m("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:m("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,s,r;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:mi(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:mi(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=a.multipleTypeDefinitions)!==null&&i!==void 0?i:mi(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=a.multipleDeclarations)!==null&&n!==void 0?n:mi(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(s=a.multipleImplementations)!==null&&s!==void 0?s:mi(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(r=a.multipleReferences)!==null&&r!==void 0?r:mi(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:ls.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:ls.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:ls.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:ls.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:ls.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class OU extends ni{constructor(){const e={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:m("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:m("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:m("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:e.hidingDelay,description:m("hover.hidingDelay","Controls the delay in milliseconds after which the hover is hidden. Requires `editor.hover.sticky` to be enabled.")},"editor.hover.above":{type:"boolean",default:e.above,description:m("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ve(t.enabled,this.defaultValue.enabled),delay:Pt.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:ve(t.sticky,this.defaultValue.sticky),hidingDelay:Pt.clampedInt(t.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:ve(t.above,this.defaultValue.above)}}}class Nf extends Hb{constructor(){super(144)}compute(e,t,i){return Nf.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio,glyphMarginDecorationLaneCount:e.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=Math.floor(e.paddingTop/e.lineHeight);let n=Math.floor(e.paddingBottom/e.lineHeight);e.scrollBeyondLastLine&&(n=Math.max(n,t-1));const s=(i+e.viewLineCount+n)/(e.pixelRatio*e.height),r=Math.floor(e.viewLineCount/s);return{typicalViewportLineCount:t,extraLinesBeforeFirstLine:i,extraLinesBeyondLastLine:n,desiredRatio:s,minimapLineCount:r}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,s=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.paddingTop===r.paddingTop&&e.paddingBottom===r.paddingBottom&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,d=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let u=s>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const g=e.minimap.maxColumn,f=e.minimap.size,p=e.minimap.side,_=e.verticalScrollbarWidth,v=e.viewLineCount,b=e.remainingWidth,C=e.isViewportWrapping,w=h?2:3;let S=Math.floor(s*n);const L=S/s;let x=!1,I=!1,T=w*u,H=u/s,P=1;if(f==="fill"||f==="fit"){const{typicalViewportLineCount:Me,extraLinesBeforeFirstLine:me,extraLinesBeyondLastLine:Ge,desiredRatio:Ze,minimapLineCount:Ee}=Nf.computeContainedMinimapLineCount({viewLineCount:v,scrollBeyondLastLine:c,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,height:n,lineHeight:l,pixelRatio:s});if(v/Ee>1)x=!0,I=!0,u=1,T=1,H=u/s;else{let Ei=!1,ts=u+1;if(f==="fit"){const $i=Math.ceil((me+v+Ge)*T);C&&a&&b<=t.stableFitRemainingWidth?(Ei=!0,ts=t.stableFitMaxMinimapScale):Ei=$i>S}if(f==="fill"||Ei){x=!0;const $i=u;T=Math.min(l*s,Math.max(1,Math.floor(1/Ze))),C&&a&&b<=t.stableFitRemainingWidth&&(ts=t.stableFitMaxMinimapScale),u=Math.min(ts,Math.max(1,Math.floor(T/w))),u>$i&&(P=Math.min(2,u/$i)),H=u/s/P,S=Math.ceil(Math.max(Me,me+v+Ge)*T),C?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const A=Math.floor(g*H),B=Math.min(A,Math.max(0,Math.floor((b-_-2)*H/(d+H)))+qd);let Z=Math.floor(s*B);const ne=Z/s;Z=Math.floor(Z*P);const pe=h?1:2,Se=p==="left"?0:i-B-_;return{renderMinimap:pe,minimapLeft:Se,minimapWidth:B,minimapHeightIsEditorHeight:x,minimapIsSampling:I,minimapScale:u,minimapLineHeight:T,minimapCanvasInnerWidth:Z,minimapCanvasInnerHeight:S,minimapCanvasOuterWidth:ne,minimapCanvasOuterHeight:L}}static computeLayout(e,t){const i=t.outerWidth|0,n=t.outerHeight|0,s=t.lineHeight|0,r=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,d=t.pixelRatio,c=t.viewLineCount,h=e.get(136),u=h==="inherit"?e.get(135):h,g=u==="inherit"?e.get(131):u,f=e.get(134),p=t.isDominatedByLongLines,_=e.get(57),v=e.get(68).renderType!==0,b=e.get(69),C=e.get(105),w=e.get(84),S=e.get(73),L=e.get(103),x=L.verticalScrollbarSize,I=L.verticalHasArrows,T=L.arrowSize,H=L.horizontalScrollbarSize,P=e.get(43),A=e.get(110)!=="never";let B=e.get(66);P&&A&&(B+=16);let Z=0;if(v){const Zi=Math.max(r,b);Z=Math.round(Zi*l)}let ne=0;_&&(ne=s*t.glyphMarginDecorationLaneCount);let pe=0,Se=pe+ne,Me=Se+Z,me=Me+B;const Ge=i-ne-Z-B;let Ze=!1,Ee=!1,ge=-1;u==="inherit"&&p?(Ze=!0,Ee=!0):g==="on"||g==="bounded"?Ee=!0:g==="wordWrapColumn"&&(ge=f);const Ei=Nf._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:a,pixelRatio:d,scrollBeyondLastLine:C,paddingTop:w.top,paddingBottom:w.bottom,minimap:S,verticalScrollbarWidth:x,viewLineCount:c,remainingWidth:Ge,isViewportWrapping:Ee},t.memory||new J7);Ei.renderMinimap!==0&&Ei.minimapLeft===0&&(pe+=Ei.minimapWidth,Se+=Ei.minimapWidth,Me+=Ei.minimapWidth,me+=Ei.minimapWidth);const ts=Ge-Ei.minimapWidth,$i=Math.max(1,Math.floor((ts-x-2)/a)),Lt=I?T:0;return Ee&&(ge=Math.max(1,$i),g==="bounded"&&(ge=Math.min(ge,f))),{width:i,height:n,glyphMarginLeft:pe,glyphMarginWidth:ne,glyphMarginDecorationLaneCount:t.glyphMarginDecorationLaneCount,lineNumbersLeft:Se,lineNumbersWidth:Z,decorationsLeft:Me,decorationsWidth:B,contentLeft:me,contentWidth:ts,minimap:Ei,viewportColumn:$i,isWordWrapMinified:Ze,isViewportWrapping:Ee,wrappingColumn:ge,verticalScrollbarWidth:x,horizontalScrollbarHeight:H,overviewRuler:{top:Lt,width:x,height:n-2*Lt,right:0}}}}class FU extends ni{constructor(){super(138,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[m("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),m("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],type:"string",enum:["simple","advanced"],default:"simple",description:m("wrappingStrategy","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.")}})}validate(e){return mi(e,"simple",["simple","advanced"])}compute(e,t,i){return t.get(2)===2?"advanced":i}}var hr;(function(o){o.Off="off",o.OnCode="onCode",o.On="on"})(hr||(hr={}));class BU extends ni{constructor(){const e={enabled:hr.OnCode};super(65,"lightbulb",e,{"editor.lightbulb.enabled":{type:"string",tags:["experimental"],enum:[hr.Off,hr.OnCode,hr.On],default:e.enabled,enumDescriptions:[m("editor.lightbulb.enabled.off","Disable the code action menu."),m("editor.lightbulb.enabled.onCode","Show the code action menu when the cursor is on lines with code."),m("editor.lightbulb.enabled.on","Show the code action menu when the cursor is on lines with code or on empty lines.")],description:m("enabled","Enables the Code Action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:mi(e.enabled,this.defaultValue.enabled,[hr.Off,hr.OnCode,hr.On])}}}class WU extends ni{constructor(){const e={enabled:!0,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(115,"stickyScroll",e,{"editor.stickyScroll.enabled":{type:"boolean",default:e.enabled,description:m("editor.stickyScroll.enabled","Shows the nested current scopes during the scroll at the top of the editor."),tags:["experimental"]},"editor.stickyScroll.maxLineCount":{type:"number",default:e.maxLineCount,minimum:1,maximum:20,description:m("editor.stickyScroll.maxLineCount","Defines the maximum number of sticky lines to show.")},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:e.defaultModel,description:m("editor.stickyScroll.defaultModel","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.")},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:e.scrollWithEditor,description:m("editor.stickyScroll.scrollWithEditor","Enable scrolling of Sticky Scroll with the editor's horizontal scrollbar.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ve(t.enabled,this.defaultValue.enabled),maxLineCount:Pt.clampedInt(t.maxLineCount,this.defaultValue.maxLineCount,1,20),defaultModel:mi(t.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:ve(t.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class VU extends ni{constructor(){const e={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(140,"inlayHints",e,{"editor.inlayHints.enabled":{type:"string",default:e.enabled,description:m("inlayHints.enable","Enables the inlay hints in the editor."),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[m("editor.inlayHints.on","Inlay hints are enabled"),m("editor.inlayHints.onUnlessPressed","Inlay hints are showing by default and hide when holding {0}",lt?"Ctrl+Option":"Ctrl+Alt"),m("editor.inlayHints.offUnlessPressed","Inlay hints are hidden by default and show when holding {0}",lt?"Ctrl+Option":"Ctrl+Alt"),m("editor.inlayHints.off","Inlay hints are disabled")]},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:m("inlayHints.fontSize","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:m("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:e.padding,description:m("inlayHints.padding","Enables the padding around the inlay hints in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return typeof t.enabled=="boolean"&&(t.enabled=t.enabled?"on":"off"),{enabled:mi(t.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:Pt.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:ls.string(t.fontFamily,this.defaultValue.fontFamily),padding:ve(t.padding,this.defaultValue.padding)}}}class HU extends ni{constructor(){super(66,"lineDecorationsWidth",10)}validate(e){return typeof e=="string"&&/^\d+(\.\d+)?ch$/.test(e)?-parseFloat(e.substring(0,e.length-2)):Pt.clampedInt(e,this.defaultValue,0,1e3)}compute(e,t,i){return i<0?Pt.clampedInt(-i*e.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):i}}class zU extends fr{constructor(){super(67,"lineHeight",As.lineHeight,e=>fr.clamp(e,0,150),{markdownDescription:m("lineHeight",`Controls the line height.
|
|
8
8
|
- Use 0 to automatically compute the line height from the font size.
|
|
9
9
|
- Values between 0 and 8 will be used as a multiplier with the font size.
|
|
10
10
|
- Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,i){return e.fontInfo.lineHeight}}class UU extends ni{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(73,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:m("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.autohide":{type:"boolean",default:e.autohide,description:m("minimap.autohide","Controls whether the minimap is hidden automatically.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[m("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),m("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),m("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:m("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:m("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:m("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:m("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:m("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:m("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ve(t.enabled,this.defaultValue.enabled),autohide:ve(t.autohide,this.defaultValue.autohide),size:mi(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:mi(t.side,this.defaultValue.side,["right","left"]),showSlider:mi(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:ve(t.renderCharacters,this.defaultValue.renderCharacters),scale:Pt.clampedInt(t.scale,1,1,3),maxColumn:Pt.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function $U(o){return o==="ctrlCmd"?lt?"metaKey":"ctrlKey":"altKey"}class jU extends ni{constructor(){super(84,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:m("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:m("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{top:Pt.clampedInt(t.top,0,0,1e3),bottom:Pt.clampedInt(t.bottom,0,0,1e3)}}}class KU extends ni{constructor(){const e={enabled:!0,cycle:!0};super(86,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:m("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:m("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ve(t.enabled,this.defaultValue.enabled),cycle:ve(t.cycle,this.defaultValue.cycle)}}}class qU extends Hb{constructor(){super(142)}compute(e,t,i){return e.pixelRatio}}class GU extends ni{constructor(){const e={other:"on",comments:"off",strings:"off"},t=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[m("on","Quick suggestions show inside the suggest widget"),m("inline","Quick suggestions show as ghost text"),m("off","Quick suggestions are disabled")]}];super(89,"quickSuggestions",e,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:t,default:e.strings,description:m("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{anyOf:t,default:e.comments,description:m("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{anyOf:t,default:e.other,description:m("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}},default:e,markdownDescription:m("quickSuggestions","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","#editor.suggestOnTriggerCharacters#")}),this.defaultValue=e}validate(e){if(typeof e=="boolean"){const d=e?"on":"off";return{comments:d,strings:d,other:d}}if(!e||typeof e!="object")return this.defaultValue;const{other:t,comments:i,strings:n}=e,s=["on","inline","off"];let r,a,l;return typeof t=="boolean"?r=t?"on":"off":r=mi(t,this.defaultValue.other,s),typeof i=="boolean"?a=i?"on":"off":a=mi(i,this.defaultValue.comments,s),typeof n=="boolean"?l=n?"on":"off":l=mi(n,this.defaultValue.strings,s),{other:r,comments:a,strings:l}}}class ZU extends ni{constructor(){super(68,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[m("lineNumbers.off","Line numbers are not rendered."),m("lineNumbers.on","Line numbers are rendered as absolute number."),m("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),m("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:m("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(t=4,i=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:i}}}function Y1(o){const e=o.get(98);return e==="editable"?o.get(91):e!=="on"}class YU extends ni{constructor(){const e=[],t={type:"number",description:m("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(102,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:m("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:m("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){const t=[];for(const i of e)if(typeof i=="number")t.push({column:Pt.clampedInt(i,0,0,1e4),color:null});else if(i&&typeof i=="object"){const n=i;t.push({column:Pt.clampedInt(n.column,0,0,1e4),color:n.color})}return t.sort((i,n)=>i.column-n.column),t}return this.defaultValue}}class XU extends ni{constructor(){super(92,"readOnlyMessage",void 0)}validate(e){return!e||typeof e!="object"?this.defaultValue:e}}function NP(o,e){if(typeof o!="string")return e;switch(o){case"hidden":return 2;case"visible":return 3;default:return 1}}let QU=class extends ni{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1,ignoreHorizontalScrollbarInContentHeight:!1};super(103,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[m("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),m("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),m("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:m("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[m("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),m("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),m("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:m("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:m("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:m("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:m("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")},"editor.scrollbar.ignoreHorizontalScrollbarInContentHeight":{type:"boolean",default:e.ignoreHorizontalScrollbarInContentHeight,description:m("scrollbar.ignoreHorizontalScrollbarInContentHeight","When set, the horizontal scrollbar will not increase the size of the editor's content.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e,i=Pt.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=Pt.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:Pt.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:NP(t.vertical,this.defaultValue.vertical),horizontal:NP(t.horizontal,this.defaultValue.horizontal),useShadows:ve(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:ve(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:ve(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:ve(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:ve(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:Pt.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:Pt.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:ve(t.scrollByPage,this.defaultValue.scrollByPage),ignoreHorizontalScrollbarInContentHeight:ve(t.ignoreHorizontalScrollbarInContentHeight,this.defaultValue.ignoreHorizontalScrollbarInContentHeight)}}};const lo="inUntrustedWorkspace",Ns={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class JU extends ni{constructor(){const e={nonBasicASCII:lo,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:lo,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(125,"unicodeHighlight",e,{[Ns.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,lo],default:e.nonBasicASCII,description:m("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[Ns.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:m("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[Ns.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:m("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[Ns.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,lo],default:e.includeComments,description:m("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to Unicode highlighting.")},[Ns.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,lo],default:e.includeStrings,description:m("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to Unicode highlighting.")},[Ns.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:m("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[Ns.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:m("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&e&&(Co(e.allowedCharacters,t.allowedCharacters)||(e={...e,allowedCharacters:t.allowedCharacters},i=!0)),t.allowedLocales&&e&&(Co(e.allowedLocales,t.allowedLocales)||(e={...e,allowedLocales:t.allowedLocales},i=!0));const n=super.applyUpdate(e,t);return i?new D_(n.newValue,!0):n}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{nonBasicASCII:Tf(t.nonBasicASCII,lo,[!0,!1,lo]),invisibleCharacters:ve(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:ve(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:Tf(t.includeComments,lo,[!0,!1,lo]),includeStrings:Tf(t.includeStrings,lo,[!0,!1,lo]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if(typeof e!="object"||!e)return t;const i={};for(const[n,s]of Object.entries(e))s===!0&&(i[n]=!0);return i}}class e$ extends ni{constructor(){const e={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1,fontFamily:"default"};super(62,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:m("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[m("inlineSuggest.showToolbar.always","Show the inline suggestion toolbar whenever an inline suggestion is shown."),m("inlineSuggest.showToolbar.onHover","Show the inline suggestion toolbar when hovering over an inline suggestion."),m("inlineSuggest.showToolbar.never","Never show the inline suggestion toolbar.")],description:m("inlineSuggest.showToolbar","Controls when to show the inline suggestion toolbar.")},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:e.suppressSuggestions,description:m("inlineSuggest.suppressSuggestions","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.")},"editor.inlineSuggest.fontFamily":{type:"string",default:e.fontFamily,description:m("inlineSuggest.fontFamily","Controls the font family of the inline suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ve(t.enabled,this.defaultValue.enabled),mode:mi(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:mi(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),suppressSuggestions:ve(t.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:ve(t.keepOnBlur,this.defaultValue.keepOnBlur),fontFamily:ls.string(t.fontFamily,this.defaultValue.fontFamily)}}}class t$ extends ni{constructor(){const e={enabled:!1,showToolbar:"onHover",fontFamily:"default",keepOnBlur:!1,backgroundColoring:!1};super(63,"experimentalInlineEdit",e,{"editor.experimentalInlineEdit.enabled":{type:"boolean",default:e.enabled,description:m("inlineEdit.enabled","Controls whether to show inline edits in the editor.")},"editor.experimentalInlineEdit.showToolbar":{type:"string",default:e.showToolbar,enum:["always","onHover","never"],enumDescriptions:[m("inlineEdit.showToolbar.always","Show the inline edit toolbar whenever an inline suggestion is shown."),m("inlineEdit.showToolbar.onHover","Show the inline edit toolbar when hovering over an inline suggestion."),m("inlineEdit.showToolbar.never","Never show the inline edit toolbar.")],description:m("inlineEdit.showToolbar","Controls when to show the inline edit toolbar.")},"editor.experimentalInlineEdit.fontFamily":{type:"string",default:e.fontFamily,description:m("inlineEdit.fontFamily","Controls the font family of the inline edit.")},"editor.experimentalInlineEdit.backgroundColoring":{type:"boolean",default:e.backgroundColoring,description:m("inlineEdit.backgroundColoring","Controls whether to color the background of inline edits.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ve(t.enabled,this.defaultValue.enabled),showToolbar:mi(t.showToolbar,this.defaultValue.showToolbar,["always","onHover","never"]),fontFamily:ls.string(t.fontFamily,this.defaultValue.fontFamily),keepOnBlur:ve(t.keepOnBlur,this.defaultValue.keepOnBlur),backgroundColoring:ve(t.backgroundColoring,this.defaultValue.backgroundColoring)}}}class i$ extends ni{constructor(){const e={enabled:On.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:On.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,markdownDescription:m("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:e.independentColorPoolPerBracketType,description:m("bracketPairColorization.independentColorPoolPerBracketType","Controls whether each bracket type has its own independent color pool.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ve(t.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:ve(t.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class n$ extends ni{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[m("editor.guides.bracketPairs.true","Enables bracket pair guides."),m("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),m("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:m("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[m("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),m("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),m("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:m("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:m("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:m("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[m("editor.guides.highlightActiveIndentation.true","Highlights the active indent guide."),m("editor.guides.highlightActiveIndentation.always","Highlights the active indent guide even if bracket guides are highlighted."),m("editor.guides.highlightActiveIndentation.false","Do not highlight the active indent guide.")],default:e.highlightActiveIndentation,description:m("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{bracketPairs:Tf(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:Tf(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:ve(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:ve(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:Tf(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function Tf(o,e,t){const i=t.indexOf(o);return i===-1?e:t[i]}class s$ extends ni{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(118,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[m("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),m("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:m("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:m("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:m("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:m("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[m("suggest.insertMode.always","Always select a suggestion when automatically triggering IntelliSense."),m("suggest.insertMode.never","Never select a suggestion when automatically triggering IntelliSense."),m("suggest.insertMode.whenTriggerCharacter","Select a suggestion only when triggering IntelliSense from a trigger character."),m("suggest.insertMode.whenQuickSuggestion","Select a suggestion only when triggering IntelliSense as you type.")],default:e.selectionMode,markdownDescription:m("suggest.selectionMode","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:m("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:m("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:m("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:m("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:m("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget.")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:m("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:m("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.matchOnWordStartOnly","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertMode:mi(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:ve(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:ve(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:ve(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:ve(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:mi(t.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:ve(t.showIcons,this.defaultValue.showIcons),showStatusBar:ve(t.showStatusBar,this.defaultValue.showStatusBar),preview:ve(t.preview,this.defaultValue.preview),previewMode:mi(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:ve(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:ve(t.showMethods,this.defaultValue.showMethods),showFunctions:ve(t.showFunctions,this.defaultValue.showFunctions),showConstructors:ve(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:ve(t.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:ve(t.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:ve(t.showFields,this.defaultValue.showFields),showVariables:ve(t.showVariables,this.defaultValue.showVariables),showClasses:ve(t.showClasses,this.defaultValue.showClasses),showStructs:ve(t.showStructs,this.defaultValue.showStructs),showInterfaces:ve(t.showInterfaces,this.defaultValue.showInterfaces),showModules:ve(t.showModules,this.defaultValue.showModules),showProperties:ve(t.showProperties,this.defaultValue.showProperties),showEvents:ve(t.showEvents,this.defaultValue.showEvents),showOperators:ve(t.showOperators,this.defaultValue.showOperators),showUnits:ve(t.showUnits,this.defaultValue.showUnits),showValues:ve(t.showValues,this.defaultValue.showValues),showConstants:ve(t.showConstants,this.defaultValue.showConstants),showEnums:ve(t.showEnums,this.defaultValue.showEnums),showEnumMembers:ve(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:ve(t.showKeywords,this.defaultValue.showKeywords),showWords:ve(t.showWords,this.defaultValue.showWords),showColors:ve(t.showColors,this.defaultValue.showColors),showFiles:ve(t.showFiles,this.defaultValue.showFiles),showReferences:ve(t.showReferences,this.defaultValue.showReferences),showFolders:ve(t.showFolders,this.defaultValue.showFolders),showTypeParameters:ve(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:ve(t.showSnippets,this.defaultValue.showSnippets),showUsers:ve(t.showUsers,this.defaultValue.showUsers),showIssues:ve(t.showIssues,this.defaultValue.showIssues)}}}class o$ extends ni{constructor(){super(113,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:m("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:m("selectSubwords","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:ve(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:ve(e.selectSubwords,this.defaultValue.selectSubwords)}}}class r$ extends ni{constructor(){super(137,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[m("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),m("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),m("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),m("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:m("wrappingIndent","Controls the indentation of wrapped lines."),default:"same"}})}validate(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(e,t,i){return t.get(2)===2?0:i}}class a$ extends Hb{constructor(){super(145)}compute(e,t,i){const n=t.get(144);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}class l$ extends ni{constructor(){const e={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",e,{"editor.dropIntoEditor.enabled":{type:"boolean",default:e.enabled,markdownDescription:m("dropIntoEditor.enabled","Controls whether you can drag and drop a file into a text editor by holding down the `Shift` key (instead of opening the file in an editor).")},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:m("dropIntoEditor.showDropSelector","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped."),enum:["afterDrop","never"],enumDescriptions:[m("dropIntoEditor.showDropSelector.afterDrop","Show the drop selector widget after a file is dropped into the editor."),m("dropIntoEditor.showDropSelector.never","Never show the drop selector widget. Instead the default drop provider is always used.")],default:"afterDrop"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ve(t.enabled,this.defaultValue.enabled),showDropSelector:mi(t.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class d$ extends ni{constructor(){const e={enabled:!0,showPasteSelector:"afterPaste"};super(85,"pasteAs",e,{"editor.pasteAs.enabled":{type:"boolean",default:e.enabled,markdownDescription:m("pasteAs.enabled","Controls whether you can paste content in different ways.")},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:m("pasteAs.showPasteSelector","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted."),enum:["afterPaste","never"],enumDescriptions:[m("pasteAs.showPasteSelector.afterPaste","Show the paste selector widget after content is pasted into the editor."),m("pasteAs.showPasteSelector.never","Never show the paste selector widget. Instead the default pasting behavior is always used.")],default:"afterPaste"}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ve(t.enabled,this.defaultValue.enabled),showPasteSelector:mi(t.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const c$="Consolas, 'Courier New', monospace",h$="Menlo, Monaco, 'Courier New', monospace",u$="'Droid Sans Mono', 'monospace', monospace",As={fontFamily:lt?h$:Cs?u$:c$,fontWeight:"normal",fontSize:lt?12:14,lineHeight:0,letterSpacing:0},af=[];function ie(o){return af[o.id]=o,o}const pa={acceptSuggestionOnCommitCharacter:ie(new gt(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:m("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:ie(new di(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",m("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:m("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:ie(new xU),accessibilityPageSize:ie(new Pt(3,"accessibilityPageSize",10,1,1073741824,{description:m("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),tags:["accessibility"]})),ariaLabel:ie(new ls(4,"ariaLabel",m("editorViewAccessibleLabel","Editor content"))),ariaRequired:ie(new gt(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:ie(new gt(8,"screenReaderAnnounceInlineSuggestion",!0,{description:m("screenReaderAnnounceInlineSuggestion","Control whether inline suggestions are announced by a screen reader."),tags:["accessibility"]})),autoClosingBrackets:ie(new di(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),m("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:m("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingComments:ie(new di(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m("editor.autoClosingComments.languageDefined","Use language configurations to determine when to autoclose comments."),m("editor.autoClosingComments.beforeWhitespace","Autoclose comments only when the cursor is to the left of whitespace."),""],description:m("autoClosingComments","Controls whether the editor should automatically close comments after the user adds an opening comment.")})),autoClosingDelete:ie(new di(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",m("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:m("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:ie(new di(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",m("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:m("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:ie(new di(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),m("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:m("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:ie(new V0(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],DU,{enumDescriptions:[m("editor.autoIndent.none","The editor will not insert indentation automatically."),m("editor.autoIndent.keep","The editor will keep the current line's indentation."),m("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),m("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),m("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:m("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:ie(new gt(13,"automaticLayout",!1)),autoSurround:ie(new di(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[m("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),m("editor.autoSurround.quotes","Surround with quotes but not brackets."),m("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:m("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:ie(new i$),bracketPairGuides:ie(new n$),stickyTabStops:ie(new gt(116,"stickyTabStops",!1,{description:m("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:ie(new gt(17,"codeLens",!0,{description:m("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:ie(new ls(18,"codeLensFontFamily","",{description:m("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:ie(new Pt(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:m("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.")})),colorDecorators:ie(new gt(20,"colorDecorators",!0,{description:m("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),colorDecoratorActivatedOn:ie(new di(147,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[m("editor.colorDecoratorActivatedOn.clickAndHover","Make the color picker appear both on click and hover of the color decorator"),m("editor.colorDecoratorActivatedOn.hover","Make the color picker appear on hover of the color decorator"),m("editor.colorDecoratorActivatedOn.click","Make the color picker appear on click of the color decorator")],description:m("colorDecoratorActivatedOn","Controls the condition to make a color picker appear from a color decorator")})),colorDecoratorsLimit:ie(new Pt(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:m("colorDecoratorsLimit","Controls the max number of color decorators that can be rendered in an editor at once.")})),columnSelection:ie(new gt(22,"columnSelection",!1,{description:m("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:ie(new kU),contextmenu:ie(new gt(24,"contextmenu",!0)),copyWithSyntaxHighlighting:ie(new gt(25,"copyWithSyntaxHighlighting",!0,{description:m("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:ie(new V0(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],IU,{description:m("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:ie(new di(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[m("cursorSmoothCaretAnimation.off","Smooth caret animation is disabled."),m("cursorSmoothCaretAnimation.explicit","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture."),m("cursorSmoothCaretAnimation.on","Smooth caret animation is always enabled.")],description:m("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:ie(new V0(28,"cursorStyle",vn.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],EU,{description:m("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:ie(new Pt(29,"cursorSurroundingLines",0,0,1073741824,{description:m("cursorSurroundingLines","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:ie(new di(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[m("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),m("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],markdownDescription:m("cursorSurroundingLinesStyle","Controls when `#cursorSurroundingLines#` should be enforced.")})),cursorWidth:ie(new Pt(31,"cursorWidth",0,0,1073741824,{markdownDescription:m("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:ie(new gt(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:ie(new gt(33,"disableMonospaceOptimizations",!1)),domReadOnly:ie(new gt(34,"domReadOnly",!1)),dragAndDrop:ie(new gt(35,"dragAndDrop",!0,{description:m("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:ie(new TU),dropIntoEditor:ie(new l$),stickyScroll:ie(new WU),experimentalWhitespaceRendering:ie(new di(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[m("experimentalWhitespaceRendering.svg","Use a new rendering method with svgs."),m("experimentalWhitespaceRendering.font","Use a new rendering method with font characters."),m("experimentalWhitespaceRendering.off","Use the stable rendering method.")],description:m("experimentalWhitespaceRendering","Controls whether whitespace is rendered with a new, experimental method.")})),extraEditorClassName:ie(new ls(39,"extraEditorClassName","")),fastScrollSensitivity:ie(new fr(40,"fastScrollSensitivity",5,o=>o<=0?5:o,{markdownDescription:m("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:ie(new MU),fixedOverflowWidgets:ie(new gt(42,"fixedOverflowWidgets",!1)),folding:ie(new gt(43,"folding",!0,{description:m("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:ie(new di(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[m("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),m("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:m("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:ie(new gt(45,"foldingHighlight",!0,{description:m("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:ie(new gt(46,"foldingImportsByDefault",!1,{description:m("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:ie(new Pt(47,"foldingMaximumRegions",5e3,10,65e3,{description:m("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:ie(new gt(48,"unfoldOnClickAfterEndOfLine",!1,{description:m("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:ie(new ls(49,"fontFamily",As.fontFamily,{description:m("fontFamily","Controls the font family.")})),fontInfo:ie(new RU),fontLigatures2:ie(new po),fontSize:ie(new AU),fontWeight:ie(new za),fontVariations:ie(new Gr),formatOnPaste:ie(new gt(55,"formatOnPaste",!1,{description:m("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:ie(new gt(56,"formatOnType",!1,{description:m("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:ie(new gt(57,"glyphMargin",!0,{description:m("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:ie(new PU),hideCursorInOverviewRuler:ie(new gt(59,"hideCursorInOverviewRuler",!1,{description:m("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:ie(new OU),inDiffEditor:ie(new gt(61,"inDiffEditor",!1)),letterSpacing:ie(new fr(64,"letterSpacing",As.letterSpacing,o=>fr.clamp(o,-5,20),{description:m("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:ie(new BU),lineDecorationsWidth:ie(new HU),lineHeight:ie(new zU),lineNumbers:ie(new ZU),lineNumbersMinChars:ie(new Pt(69,"lineNumbersMinChars",5,1,300)),linkedEditing:ie(new gt(70,"linkedEditing",!1,{description:m("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.")})),links:ie(new gt(71,"links",!0,{description:m("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:ie(new di(72,"matchBrackets","always",["always","near","never"],{description:m("matchBrackets","Highlight matching brackets.")})),minimap:ie(new UU),mouseStyle:ie(new di(74,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:ie(new fr(75,"mouseWheelScrollSensitivity",1,o=>o===0?1:o,{markdownDescription:m("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:ie(new gt(76,"mouseWheelZoom",!1,{markdownDescription:lt?m("mouseWheelZoom.mac","Zoom the font of the editor when using mouse wheel and holding `Cmd`."):m("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:ie(new gt(77,"multiCursorMergeOverlapping",!0,{description:m("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:ie(new V0(78,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],$U,{markdownEnumDescriptions:[m("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),m("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:m({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:ie(new di(79,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[m("multiCursorPaste.spread","Each cursor pastes a single line of the text."),m("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:m("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),multiCursorLimit:ie(new Pt(80,"multiCursorLimit",1e4,1,1e5,{markdownDescription:m("multiCursorLimit","Controls the max number of cursors that can be in an active editor at once.")})),occurrencesHighlight:ie(new di(81,"occurrencesHighlight","singleFile",["off","singleFile","multiFile"],{markdownEnumDescriptions:[m("occurrencesHighlight.off","Does not highlight occurrences."),m("occurrencesHighlight.singleFile","Highlights occurrences only in the current file."),m("occurrencesHighlight.multiFile","Experimental: Highlights occurrences across all valid open files.")],markdownDescription:m("occurrencesHighlight","Controls whether occurrences should be highlighted across open files.")})),overviewRulerBorder:ie(new gt(82,"overviewRulerBorder",!0,{description:m("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:ie(new Pt(83,"overviewRulerLanes",3,0,3)),padding:ie(new jU),pasteAs:ie(new d$),parameterHints:ie(new KU),peekWidgetDefaultFocus:ie(new di(87,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[m("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),m("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:m("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:ie(new gt(88,"definitionLinkOpensInPeek",!1,{description:m("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:ie(new GU),quickSuggestionsDelay:ie(new Pt(90,"quickSuggestionsDelay",10,0,1073741824,{description:m("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:ie(new gt(91,"readOnly",!1)),readOnlyMessage:ie(new XU),renameOnType:ie(new gt(93,"renameOnType",!1,{description:m("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:m("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:ie(new gt(94,"renderControlCharacters",!0,{description:m("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:ie(new di(95,"renderFinalNewline",Cs?"dimmed":"on",["off","on","dimmed"],{description:m("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:ie(new di(96,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",m("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:m("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:ie(new gt(97,"renderLineHighlightOnlyWhenFocus",!1,{description:m("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:ie(new di(98,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:ie(new di(99,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",m("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),m("renderWhitespace.selection","Render whitespace characters only on selected text."),m("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:m("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:ie(new Pt(100,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:ie(new gt(101,"roundedSelection",!0,{description:m("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:ie(new YU),scrollbar:ie(new QU),scrollBeyondLastColumn:ie(new Pt(104,"scrollBeyondLastColumn",4,0,1073741824,{description:m("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:ie(new gt(105,"scrollBeyondLastLine",!0,{description:m("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:ie(new gt(106,"scrollPredominantAxis",!0,{description:m("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:ie(new gt(107,"selectionClipboard",!0,{description:m("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:Cs})),selectionHighlight:ie(new gt(108,"selectionHighlight",!0,{description:m("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:ie(new gt(109,"selectOnLineNumbers",!0)),showFoldingControls:ie(new di(110,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[m("showFoldingControls.always","Always show the folding controls."),m("showFoldingControls.never","Never show the folding controls and reduce the gutter size."),m("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:m("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:ie(new gt(111,"showUnused",!0,{description:m("showUnused","Controls fading out of unused code.")})),showDeprecated:ie(new gt(139,"showDeprecated",!0,{description:m("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:ie(new VU),snippetSuggestions:ie(new di(112,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[m("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),m("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),m("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),m("snippetSuggestions.none","Do not show snippet suggestions.")],description:m("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:ie(new o$),smoothScrolling:ie(new gt(114,"smoothScrolling",!1,{description:m("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:ie(new Pt(117,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:ie(new s$),inlineSuggest:ie(new e$),inlineEdit:ie(new t$),inlineCompletionsAccessibilityVerbose:ie(new gt(148,"inlineCompletionsAccessibilityVerbose",!1,{description:m("inlineCompletionsAccessibilityVerbose","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.")})),suggestFontSize:ie(new Pt(119,"suggestFontSize",0,0,1e3,{markdownDescription:m("suggestFontSize","Font size for the suggest widget. When set to {0}, the value of {1} is used.","`0`","`#editor.fontSize#`")})),suggestLineHeight:ie(new Pt(120,"suggestLineHeight",0,0,1e3,{markdownDescription:m("suggestLineHeight","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:ie(new gt(121,"suggestOnTriggerCharacters",!0,{description:m("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:ie(new di(122,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[m("suggestSelection.first","Always select the first suggestion."),m("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),m("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:m("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:ie(new di(123,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[m("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),m("tabCompletion.off","Disable tab completions."),m("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:m("tabCompletion","Enables tab completions.")})),tabIndex:ie(new Pt(124,"tabIndex",0,-1,1073741824)),unicodeHighlight:ie(new JU),unusualLineTerminators:ie(new di(126,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[m("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),m("unusualLineTerminators.off","Unusual line terminators are ignored."),m("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:m("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:ie(new gt(127,"useShadowDOM",!0)),useTabStops:ie(new gt(128,"useTabStops",!0,{description:m("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordBreak:ie(new di(129,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[m("wordBreak.normal","Use the default line break rule."),m("wordBreak.keepAll","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.")],description:m("wordBreak","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.")})),wordSeparators:ie(new ls(130,"wordSeparators",Y7,{description:m("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:ie(new di(131,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[m("wordWrap.off","Lines will never wrap."),m("wordWrap.on","Lines will wrap at the viewport width."),m({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),m({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:m({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:ie(new ls(132,"wordWrapBreakAfterCharacters"," })]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:ie(new ls(133,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:ie(new Pt(134,"wordWrapColumn",80,1,1073741824,{markdownDescription:m({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:ie(new di(135,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:ie(new di(136,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:ie(new NU),defaultColorDecorators:ie(new gt(146,"defaultColorDecorators",!1,{markdownDescription:m("defaultColorDecorators","Controls whether inline color decorations should be shown using the default document color provider")})),pixelRatio:ie(new qU),tabFocusMode:ie(new gt(143,"tabFocusMode",!1,{markdownDescription:m("tabFocusMode","Controls whether the editor receives tabs or defers them to the workbench for navigation.")})),layoutInfo:ie(new Nf),wrappingInfo:ie(new a$),wrappingIndent:ie(new r$),wrappingStrategy:ie(new FU)};class g${constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?om.isErrorNoTelemetry(e)?new om(e.message+`
|
|
@@ -654,22 +654,22 @@ ${e.toString()}`}}class vS{constructor(e=new a0,t=!1,i,n=Ele){var s;this._servic
|
|
|
654
654
|
* Version: 0.47.0(69991d66135e4a1fc1cf0b1ac4ad25d429866a0d)
|
|
655
655
|
* Released under the MIT license
|
|
656
656
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
657
|
-
*-----------------------------------------------------------------------------*/var eue=Object.defineProperty,tue=Object.getOwnPropertyDescriptor,iue=Object.getOwnPropertyNames,nue=Object.prototype.hasOwnProperty,e3=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of iue(e))!nue.call(o,n)&&n!==t&&eue(o,n,{get:()=>e[n],enumerable:!(i=tue(e,n))||i.enumerable});return o},sue=(o,e,t)=>(e3(o,e,"default"),t&&e3(t,e,"default")),__={};sue(__,vL);var H6={},Zx={},oue=class z6{static getOrCreate(e){return Zx[e]||(Zx[e]=new z6(e)),Zx[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,H6[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function ye(o){const e=o.id;H6[e]=o,__.languages.register(o);const t=oue.getOrCreate(e);__.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),__.languages.onLanguageEncountered(e,async()=>{const i=await t.load();__.languages.setLanguageConfiguration(e,i.conf)})}ye({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>be(()=>import("./abap-D8nrxEjS.js"),[],import.meta.url)});ye({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>be(()=>import("./apex-BrXDlLUW.js"),[],import.meta.url)});ye({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>be(()=>import("./azcli-CElzELwZ.js"),[],import.meta.url)});ye({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>be(()=>import("./bat-CUsyEhik.js"),[],import.meta.url)});ye({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>be(()=>import("./bicep-BtxyJn6H.js"),[],import.meta.url)});ye({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>be(()=>import("./cameligo-ClBCoF8h.js"),[],import.meta.url)});ye({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>be(()=>import("./clojure-B9TqLHAk.js"),[],import.meta.url)});ye({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>be(()=>import("./coffee-DYsfeylR.js"),[],import.meta.url)});ye({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>be(()=>import("./cpp-VVGvvgir.js"),[],import.meta.url)});ye({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>be(()=>import("./cpp-VVGvvgir.js"),[],import.meta.url)});ye({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>be(()=>import("./csharp-Z6z2stHy.js"),[],import.meta.url)});ye({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>be(()=>import("./csp-DgZoLDI1.js"),[],import.meta.url)});ye({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>be(()=>import("./css-KqQ96-gC.js"),[],import.meta.url)});ye({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>be(()=>import("./cypher-CYoSlgTu.js"),[],import.meta.url)});ye({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>be(()=>import("./dart-BGDl7St1.js"),[],import.meta.url)});ye({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>be(()=>import("./dockerfile-CuCtxA7T.js"),[],import.meta.url)});ye({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>be(()=>import("./ecl-BCTFAUpS.js"),[],import.meta.url)});ye({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>be(()=>import("./elixir-C7hRTYZ9.js"),[],import.meta.url)});ye({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>be(()=>import("./flow9-Bi_qi707.js"),[],import.meta.url)});ye({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>be(()=>import("./fsharp-CxaaEKKi.js"),[],import.meta.url)});ye({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>be(()=>import("./freemarker2-DrweqdQ1.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>be(()=>import("./freemarker2-DrweqdQ1.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.TagAngleInterpolationDollar)});ye({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>be(()=>import("./freemarker2-DrweqdQ1.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.TagBracketInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>be(()=>import("./freemarker2-DrweqdQ1.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.TagAngleInterpolationBracket)});ye({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>be(()=>import("./freemarker2-DrweqdQ1.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.TagBracketInterpolationBracket)});ye({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>be(()=>import("./freemarker2-DrweqdQ1.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>be(()=>import("./freemarker2-DrweqdQ1.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.TagAutoInterpolationBracket)});ye({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>be(()=>import("./go-DUImKuGY.js"),[],import.meta.url)});ye({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>be(()=>import("./graphql-D5sGVkLV.js"),[],import.meta.url)});ye({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>be(()=>import("./handlebars-d2aT2S4T.js"),__vite__mapDeps([3,1,2]),import.meta.url)});ye({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>be(()=>import("./hcl-zD_CCkZ1.js"),[],import.meta.url)});ye({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:()=>be(()=>import("./html-DkR8jQS-.js"),__vite__mapDeps([4,1,2]),import.meta.url)});ye({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>be(()=>import("./ini-8kKHd4ZL.js"),[],import.meta.url)});ye({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>be(()=>import("./java-De1axCfe.js"),[],import.meta.url)});ye({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>be(()=>import("./javascript-DtI3gL80.js"),__vite__mapDeps([5,6,1,2]),import.meta.url)});ye({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>be(()=>import("./julia-D3ApGBxz.js"),[],import.meta.url)});ye({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>be(()=>import("./kotlin-GbSrCElU.js"),[],import.meta.url)});ye({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>be(()=>import("./less-DNUaDNdz.js"),[],import.meta.url)});ye({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>be(()=>import("./lexon-Bg9QKxBu.js"),[],import.meta.url)});ye({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>be(()=>import("./lua-Crkvc3mc.js"),[],import.meta.url)});ye({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>be(()=>import("./liquid-D620qh4W.js"),__vite__mapDeps([7,1,2]),import.meta.url)});ye({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>be(()=>import("./m3-DsrzVyM1.js"),[],import.meta.url)});ye({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>be(()=>import("./markdown-CY5IOZuu.js"),[],import.meta.url)});ye({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>be(()=>import("./mdx-CrO1Zrq5.js"),__vite__mapDeps([8,1,2]),import.meta.url)});ye({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>be(()=>import("./mips-BE8RsGBA.js"),[],import.meta.url)});ye({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>be(()=>import("./msdax-N5ajIiFQ.js"),[],import.meta.url)});ye({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>be(()=>import("./mysql-DRxbB97D.js"),[],import.meta.url)});ye({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>be(()=>import("./objective-c-BHUZy23s.js"),[],import.meta.url)});ye({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>be(()=>import("./pascal-BemVzBTY.js"),[],import.meta.url)});ye({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>be(()=>import("./pascaligo-BACCcnx_.js"),[],import.meta.url)});ye({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>be(()=>import("./perl-CuU66Ptk.js"),[],import.meta.url)});ye({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>be(()=>import("./pgsql-CQ6TMH2r.js"),[],import.meta.url)});ye({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>be(()=>import("./php-BvyzZa65.js"),[],import.meta.url)});ye({id:"pla",extensions:[".pla"],loader:()=>be(()=>import("./pla-DrIuu9u1.js"),[],import.meta.url)});ye({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>be(()=>import("./postiats-BR_hrfni.js"),[],import.meta.url)});ye({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>be(()=>import("./powerquery-CKDUeRmd.js"),[],import.meta.url)});ye({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>be(()=>import("./powershell-Dsa4rhA_.js"),[],import.meta.url)});ye({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>be(()=>import("./protobuf-CGsvhooB.js"),[],import.meta.url)});ye({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>be(()=>import("./pug-D2p3uOX2.js"),[],import.meta.url)});ye({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>be(()=>import("./python-BwZnPvHK.js"),__vite__mapDeps([9,1,2]),import.meta.url)});ye({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>be(()=>import("./qsharp-B7F3HtPF.js"),[],import.meta.url)});ye({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>be(()=>import("./r-3aLoi2fs.js"),[],import.meta.url)});ye({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>be(()=>import("./razor-DIsRzgu4.js"),__vite__mapDeps([10,1,2]),import.meta.url)});ye({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>be(()=>import("./redis-jqFeRM5s.js"),[],import.meta.url)});ye({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>be(()=>import("./redshift-BriwQgXR.js"),[],import.meta.url)});ye({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>be(()=>import("./restructuredtext-hbBFZ0w9.js"),[],import.meta.url)});ye({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>be(()=>import("./ruby-ByThyB2Q.js"),[],import.meta.url)});ye({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>be(()=>import("./rust-DIEZMp5R.js"),[],import.meta.url)});ye({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>be(()=>import("./sb-C6Gjjw_x.js"),[],import.meta.url)});ye({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:()=>be(()=>import("./scala-DZNw3jJB.js"),[],import.meta.url)});ye({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>be(()=>import("./scheme-55eqh71t.js"),[],import.meta.url)});ye({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>be(()=>import("./scss-D-OVkc4F.js"),[],import.meta.url)});ye({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>be(()=>import("./shell-DSpi8_qN.js"),[],import.meta.url)});ye({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>be(()=>import("./solidity-BHddiNFS.js"),[],import.meta.url)});ye({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>be(()=>import("./sophia-D6taVZFb.js"),[],import.meta.url)});ye({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>be(()=>import("./sparql-LA0C7mUc.js"),[],import.meta.url)});ye({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>be(()=>import("./sql-C3-3IcFM.js"),[],import.meta.url)});ye({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>be(()=>import("./st-C4g7059C.js"),[],import.meta.url)});ye({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>be(()=>import("./swift-DNI1vH3h.js"),[],import.meta.url)});ye({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>be(()=>import("./systemverilog-DL_FVbcQ.js"),[],import.meta.url)});ye({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>be(()=>import("./systemverilog-DL_FVbcQ.js"),[],import.meta.url)});ye({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>be(()=>import("./tcl-DVJXmIwd.js"),[],import.meta.url)});ye({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>be(()=>import("./twig-BVWDLtw5.js"),[],import.meta.url)});ye({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>be(()=>import("./typescript-BBvXo7TF.js"),__vite__mapDeps([6,1,2]),import.meta.url)});ye({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>be(()=>import("./vb-Btz91-7U.js"),[],import.meta.url)});ye({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>be(()=>import("./wgsl-D8V_buCG.js"),[],import.meta.url)});ye({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:()=>be(()=>import("./xml-nERONKOk.js"),__vite__mapDeps([11,1,2]),import.meta.url)});ye({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>be(()=>import("./yaml-B9E-sHku.js"),__vite__mapDeps([12,1,2]),import.meta.url)});/*!-----------------------------------------------------------------------------
|
|
657
|
+
*-----------------------------------------------------------------------------*/var eue=Object.defineProperty,tue=Object.getOwnPropertyDescriptor,iue=Object.getOwnPropertyNames,nue=Object.prototype.hasOwnProperty,e3=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of iue(e))!nue.call(o,n)&&n!==t&&eue(o,n,{get:()=>e[n],enumerable:!(i=tue(e,n))||i.enumerable});return o},sue=(o,e,t)=>(e3(o,e,"default"),t&&e3(t,e,"default")),__={};sue(__,vL);var H6={},Zx={},oue=class z6{static getOrCreate(e){return Zx[e]||(Zx[e]=new z6(e)),Zx[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,H6[this._languageId].loader().then(e=>this._lazyLoadPromiseResolve(e),e=>this._lazyLoadPromiseReject(e))),this._lazyLoadPromise}};function ye(o){const e=o.id;H6[e]=o,__.languages.register(o);const t=oue.getOrCreate(e);__.languages.registerTokensProviderFactory(e,{create:async()=>(await t.load()).language}),__.languages.onLanguageEncountered(e,async()=>{const i=await t.load();__.languages.setLanguageConfiguration(e,i.conf)})}ye({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>be(()=>import("./abap-D8nrxEjS.js"),[],import.meta.url)});ye({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>be(()=>import("./apex-BrXDlLUW.js"),[],import.meta.url)});ye({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>be(()=>import("./azcli-CElzELwZ.js"),[],import.meta.url)});ye({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>be(()=>import("./bat-CUsyEhik.js"),[],import.meta.url)});ye({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>be(()=>import("./bicep-BtxyJn6H.js"),[],import.meta.url)});ye({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>be(()=>import("./cameligo-ClBCoF8h.js"),[],import.meta.url)});ye({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>be(()=>import("./clojure-B9TqLHAk.js"),[],import.meta.url)});ye({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>be(()=>import("./coffee-DYsfeylR.js"),[],import.meta.url)});ye({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>be(()=>import("./cpp-VVGvvgir.js"),[],import.meta.url)});ye({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>be(()=>import("./cpp-VVGvvgir.js"),[],import.meta.url)});ye({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>be(()=>import("./csharp-Z6z2stHy.js"),[],import.meta.url)});ye({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>be(()=>import("./csp-DgZoLDI1.js"),[],import.meta.url)});ye({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>be(()=>import("./css-KqQ96-gC.js"),[],import.meta.url)});ye({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>be(()=>import("./cypher-CYoSlgTu.js"),[],import.meta.url)});ye({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>be(()=>import("./dart-BGDl7St1.js"),[],import.meta.url)});ye({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>be(()=>import("./dockerfile-CuCtxA7T.js"),[],import.meta.url)});ye({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>be(()=>import("./ecl-BCTFAUpS.js"),[],import.meta.url)});ye({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>be(()=>import("./elixir-C7hRTYZ9.js"),[],import.meta.url)});ye({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>be(()=>import("./flow9-Bi_qi707.js"),[],import.meta.url)});ye({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>be(()=>import("./fsharp-CxaaEKKi.js"),[],import.meta.url)});ye({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>be(()=>import("./freemarker2-CX6rQp7v.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>be(()=>import("./freemarker2-CX6rQp7v.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.TagAngleInterpolationDollar)});ye({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>be(()=>import("./freemarker2-CX6rQp7v.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.TagBracketInterpolationDollar)});ye({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>be(()=>import("./freemarker2-CX6rQp7v.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.TagAngleInterpolationBracket)});ye({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>be(()=>import("./freemarker2-CX6rQp7v.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.TagBracketInterpolationBracket)});ye({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>be(()=>import("./freemarker2-CX6rQp7v.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.TagAutoInterpolationDollar)});ye({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>be(()=>import("./freemarker2-CX6rQp7v.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(o=>o.TagAutoInterpolationBracket)});ye({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>be(()=>import("./go-DUImKuGY.js"),[],import.meta.url)});ye({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>be(()=>import("./graphql-D5sGVkLV.js"),[],import.meta.url)});ye({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>be(()=>import("./handlebars-BILn7ZdU.js"),__vite__mapDeps([3,1,2]),import.meta.url)});ye({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>be(()=>import("./hcl-zD_CCkZ1.js"),[],import.meta.url)});ye({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:()=>be(()=>import("./html-BE45IdHd.js"),__vite__mapDeps([4,1,2]),import.meta.url)});ye({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>be(()=>import("./ini-8kKHd4ZL.js"),[],import.meta.url)});ye({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>be(()=>import("./java-De1axCfe.js"),[],import.meta.url)});ye({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>be(()=>import("./javascript-CjpEwYUU.js"),__vite__mapDeps([5,6,1,2]),import.meta.url)});ye({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>be(()=>import("./julia-D3ApGBxz.js"),[],import.meta.url)});ye({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>be(()=>import("./kotlin-GbSrCElU.js"),[],import.meta.url)});ye({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>be(()=>import("./less-DNUaDNdz.js"),[],import.meta.url)});ye({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>be(()=>import("./lexon-Bg9QKxBu.js"),[],import.meta.url)});ye({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>be(()=>import("./lua-Crkvc3mc.js"),[],import.meta.url)});ye({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>be(()=>import("./liquid-DZXffNps.js"),__vite__mapDeps([7,1,2]),import.meta.url)});ye({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>be(()=>import("./m3-DsrzVyM1.js"),[],import.meta.url)});ye({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>be(()=>import("./markdown-CY5IOZuu.js"),[],import.meta.url)});ye({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>be(()=>import("./mdx-4PVV3Q81.js"),__vite__mapDeps([8,1,2]),import.meta.url)});ye({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>be(()=>import("./mips-BE8RsGBA.js"),[],import.meta.url)});ye({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>be(()=>import("./msdax-N5ajIiFQ.js"),[],import.meta.url)});ye({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>be(()=>import("./mysql-DRxbB97D.js"),[],import.meta.url)});ye({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>be(()=>import("./objective-c-BHUZy23s.js"),[],import.meta.url)});ye({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>be(()=>import("./pascal-BemVzBTY.js"),[],import.meta.url)});ye({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>be(()=>import("./pascaligo-BACCcnx_.js"),[],import.meta.url)});ye({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>be(()=>import("./perl-CuU66Ptk.js"),[],import.meta.url)});ye({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>be(()=>import("./pgsql-CQ6TMH2r.js"),[],import.meta.url)});ye({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>be(()=>import("./php-BvyzZa65.js"),[],import.meta.url)});ye({id:"pla",extensions:[".pla"],loader:()=>be(()=>import("./pla-DrIuu9u1.js"),[],import.meta.url)});ye({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>be(()=>import("./postiats-BR_hrfni.js"),[],import.meta.url)});ye({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>be(()=>import("./powerquery-CKDUeRmd.js"),[],import.meta.url)});ye({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>be(()=>import("./powershell-Dsa4rhA_.js"),[],import.meta.url)});ye({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>be(()=>import("./protobuf-CGsvhooB.js"),[],import.meta.url)});ye({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>be(()=>import("./pug-D2p3uOX2.js"),[],import.meta.url)});ye({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>be(()=>import("./python-oNRBgtKZ.js"),__vite__mapDeps([9,1,2]),import.meta.url)});ye({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>be(()=>import("./qsharp-B7F3HtPF.js"),[],import.meta.url)});ye({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>be(()=>import("./r-3aLoi2fs.js"),[],import.meta.url)});ye({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>be(()=>import("./razor-DZZhL_i1.js"),__vite__mapDeps([10,1,2]),import.meta.url)});ye({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>be(()=>import("./redis-jqFeRM5s.js"),[],import.meta.url)});ye({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>be(()=>import("./redshift-BriwQgXR.js"),[],import.meta.url)});ye({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>be(()=>import("./restructuredtext-hbBFZ0w9.js"),[],import.meta.url)});ye({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>be(()=>import("./ruby-ByThyB2Q.js"),[],import.meta.url)});ye({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>be(()=>import("./rust-DIEZMp5R.js"),[],import.meta.url)});ye({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>be(()=>import("./sb-C6Gjjw_x.js"),[],import.meta.url)});ye({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:()=>be(()=>import("./scala-DZNw3jJB.js"),[],import.meta.url)});ye({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>be(()=>import("./scheme-55eqh71t.js"),[],import.meta.url)});ye({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>be(()=>import("./scss-D-OVkc4F.js"),[],import.meta.url)});ye({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>be(()=>import("./shell-DSpi8_qN.js"),[],import.meta.url)});ye({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>be(()=>import("./solidity-BHddiNFS.js"),[],import.meta.url)});ye({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>be(()=>import("./sophia-D6taVZFb.js"),[],import.meta.url)});ye({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>be(()=>import("./sparql-LA0C7mUc.js"),[],import.meta.url)});ye({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>be(()=>import("./sql-C3-3IcFM.js"),[],import.meta.url)});ye({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>be(()=>import("./st-C4g7059C.js"),[],import.meta.url)});ye({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>be(()=>import("./swift-DNI1vH3h.js"),[],import.meta.url)});ye({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>be(()=>import("./systemverilog-DL_FVbcQ.js"),[],import.meta.url)});ye({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>be(()=>import("./systemverilog-DL_FVbcQ.js"),[],import.meta.url)});ye({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>be(()=>import("./tcl-DVJXmIwd.js"),[],import.meta.url)});ye({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>be(()=>import("./twig-BVWDLtw5.js"),[],import.meta.url)});ye({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>be(()=>import("./typescript-DppMnPAt.js"),__vite__mapDeps([6,1,2]),import.meta.url)});ye({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>be(()=>import("./vb-Btz91-7U.js"),[],import.meta.url)});ye({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>be(()=>import("./wgsl-D8V_buCG.js"),[],import.meta.url)});ye({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:()=>be(()=>import("./xml-B_oO3GDq.js"),__vite__mapDeps([11,1,2]),import.meta.url)});ye({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>be(()=>import("./yaml-COzNYEy2.js"),__vite__mapDeps([12,1,2]),import.meta.url)});/*!-----------------------------------------------------------------------------
|
|
658
658
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
659
659
|
* Version: 0.47.0(69991d66135e4a1fc1cf0b1ac4ad25d429866a0d)
|
|
660
660
|
* Released under the MIT license
|
|
661
661
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
662
|
-
*-----------------------------------------------------------------------------*/var rue=Object.defineProperty,aue=Object.getOwnPropertyDescriptor,lue=Object.getOwnPropertyNames,due=Object.prototype.hasOwnProperty,t3=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of lue(e))!due.call(o,n)&&n!==t&&rue(o,n,{get:()=>e[n],enumerable:!(i=aue(e,n))||i.enumerable});return o},cue=(o,e,t)=>(t3(o,e,"default"),t&&t3(t,e,"default")),dp={};cue(dp,vL);var SA=class{constructor(e,t,i){this._onDidChange=new dp.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}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(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},yA={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}},LA={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},U6=new SA("css",yA,LA),$6=new SA("scss",yA,LA),j6=new SA("less",yA,LA);dp.languages.css={cssDefaults:U6,lessDefaults:j6,scssDefaults:$6};function DA(){return be(()=>import("./cssMode-
|
|
662
|
+
*-----------------------------------------------------------------------------*/var rue=Object.defineProperty,aue=Object.getOwnPropertyDescriptor,lue=Object.getOwnPropertyNames,due=Object.prototype.hasOwnProperty,t3=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of lue(e))!due.call(o,n)&&n!==t&&rue(o,n,{get:()=>e[n],enumerable:!(i=aue(e,n))||i.enumerable});return o},cue=(o,e,t)=>(t3(o,e,"default"),t&&t3(t,e,"default")),dp={};cue(dp,vL);var SA=class{constructor(e,t,i){this._onDidChange=new dp.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}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(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(e){this.setOptions(e)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},yA={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}},LA={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},U6=new SA("css",yA,LA),$6=new SA("scss",yA,LA),j6=new SA("less",yA,LA);dp.languages.css={cssDefaults:U6,lessDefaults:j6,scssDefaults:$6};function DA(){return be(()=>import("./cssMode-CIIcCccL.js"),__vite__mapDeps([13,1,2]),import.meta.url)}dp.languages.onLanguage("less",()=>{DA().then(o=>o.setupMode(j6))});dp.languages.onLanguage("scss",()=>{DA().then(o=>o.setupMode($6))});dp.languages.onLanguage("css",()=>{DA().then(o=>o.setupMode(U6))});/*!-----------------------------------------------------------------------------
|
|
663
663
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
664
664
|
* Version: 0.47.0(69991d66135e4a1fc1cf0b1ac4ad25d429866a0d)
|
|
665
665
|
* Released under the MIT license
|
|
666
666
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
667
|
-
*-----------------------------------------------------------------------------*/var hue=Object.defineProperty,uue=Object.getOwnPropertyDescriptor,gue=Object.getOwnPropertyNames,fue=Object.prototype.hasOwnProperty,i3=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of gue(e))!fue.call(o,n)&&n!==t&&hue(o,n,{get:()=>e[n],enumerable:!(i=uue(e,n))||i.enumerable});return o},mue=(o,e,t)=>(i3(o,e,"default"),t&&i3(t,e,"default")),bL={};mue(bL,vL);var pue=class{constructor(e,t,i){this._onDidChange=new bL.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},_ue={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"},CL={format:_ue,suggest:{},data:{useDefaultDataProvider:!0}};function wL(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===G_,documentFormattingEdits:o===G_,documentRangeFormattingEdits:o===G_}}var G_="html",n3="handlebars",s3="razor",K6=SL(G_,CL,wL(G_)),vue=K6.defaults,q6=SL(n3,CL,wL(n3)),bue=q6.defaults,G6=SL(s3,CL,wL(s3)),Cue=G6.defaults;bL.languages.html={htmlDefaults:vue,razorDefaults:Cue,handlebarDefaults:bue,htmlLanguageService:K6,handlebarLanguageService:q6,razorLanguageService:G6,registerHTMLLanguageService:SL};function wue(){return be(()=>import("./htmlMode
|
|
667
|
+
*-----------------------------------------------------------------------------*/var hue=Object.defineProperty,uue=Object.getOwnPropertyDescriptor,gue=Object.getOwnPropertyNames,fue=Object.prototype.hasOwnProperty,i3=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of gue(e))!fue.call(o,n)&&n!==t&&hue(o,n,{get:()=>e[n],enumerable:!(i=uue(e,n))||i.enumerable});return o},mue=(o,e,t)=>(i3(o,e,"default"),t&&i3(t,e,"default")),bL={};mue(bL,vL);var pue=class{constructor(e,t,i){this._onDidChange=new bL.Emitter,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(e){this._options=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},_ue={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"},CL={format:_ue,suggest:{},data:{useDefaultDataProvider:!0}};function wL(o){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:o===G_,documentFormattingEdits:o===G_,documentRangeFormattingEdits:o===G_}}var G_="html",n3="handlebars",s3="razor",K6=SL(G_,CL,wL(G_)),vue=K6.defaults,q6=SL(n3,CL,wL(n3)),bue=q6.defaults,G6=SL(s3,CL,wL(s3)),Cue=G6.defaults;bL.languages.html={htmlDefaults:vue,razorDefaults:Cue,handlebarDefaults:bue,htmlLanguageService:K6,handlebarLanguageService:q6,razorLanguageService:G6,registerHTMLLanguageService:SL};function wue(){return be(()=>import("./htmlMode--15KzHI6.js"),__vite__mapDeps([14,1,2]),import.meta.url)}function SL(o,e=CL,t=wL(o)){const i=new pue(o,e,t);let n;const s=bL.languages.onLanguage(o,async()=>{n=(await wue()).setupMode(i)});return{defaults:i,dispose(){s.dispose(),n==null||n.dispose(),n=void 0}}}var Sue=class{constructor(e,t,i){this._onDidChange=new V6,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},yue={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},Lue={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},Z6=new Sue("json",yue,Lue),Due=()=>Y6().then(o=>o.getWorker());w0.json={jsonDefaults:Z6,getWorker:Due};function Y6(){return be(()=>import("./jsonMode-Cxnzu5mt.js"),__vite__mapDeps([15,1,2]),import.meta.url)}w0.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});w0.onLanguage("json",()=>{Y6().then(o=>o.setupMode(Z6))});/*!-----------------------------------------------------------------------------
|
|
668
668
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
669
669
|
* Version: 0.47.0(69991d66135e4a1fc1cf0b1ac4ad25d429866a0d)
|
|
670
670
|
* Released under the MIT license
|
|
671
671
|
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
|
672
|
-
*-----------------------------------------------------------------------------*/var xue=Object.defineProperty,kue=Object.getOwnPropertyDescriptor,Iue=Object.getOwnPropertyNames,Eue=Object.prototype.hasOwnProperty,o3=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Iue(e))!Eue.call(o,n)&&n!==t&&xue(o,n,{get:()=>e[n],enumerable:!(i=kue(e,n))||i.enumerable});return o},Nue=(o,e,t)=>(o3(o,e,"default"),t&&o3(t,e,"default")),Tue="5.0.2",Om={};Nue(Om,vL);var X6=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(X6||{}),Q6=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(Q6||{}),J6=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(J6||{}),eV=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(eV||{}),tV=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(tV||{}),iV=class{constructor(o,e,t,i,n){this._onDidChange=new Om.Emitter,this._onDidExtraLibsChange=new Om.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(o),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(n),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(o,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===o)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:o,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let n=this._extraLibs[t];n&&n.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(o){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),o&&o.length>0)for(const e of o){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let n=1;this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(o){this._compilerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(o){this._workerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(o){this._inlayHintsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(o){}setEagerModelSync(o){this._eagerModelSync=o}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(void 0)}},Mue=Tue,nV={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},sV=new iV({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},nV),oV=new iV({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},nV),Rue=()=>yL().then(o=>o.getTypeScriptWorker()),Aue=()=>yL().then(o=>o.getJavaScriptWorker());Om.languages.typescript={ModuleKind:X6,JsxEmit:Q6,NewLineKind:J6,ScriptTarget:eV,ModuleResolutionKind:tV,typescriptVersion:Mue,typescriptDefaults:sV,javascriptDefaults:oV,getTypeScriptWorker:Rue,getJavaScriptWorker:Aue};function yL(){return be(()=>import("./tsMode-CG0rBgC9.js"),__vite__mapDeps([16,1,2]),import.meta.url)}Om.languages.onLanguage("typescript",()=>yL().then(o=>o.setupTypeScript(sV)));Om.languages.onLanguage("javascript",()=>yL().then(o=>o.setupJavaScript(oV)));class Pue extends Vs{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:mt("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:re.map,toggled:q.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:q.has("isInDiffEditor"),menu:{when:q.has("isInDiffEditor"),id:k.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(Qe),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}Wt(Pue);class rV extends Vs{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:mt("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:q.has("isInDiffEditor")})}run(e,...t){const i=e.get(Qe),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}Wt(rV);class aV extends Vs{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:mt("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:q.has("isInDiffEditor")})}run(e,...t){const i=e.get(Qe),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}Wt(aV);wn.appendMenuItem(k.EditorTitle,{command:{id:new aV().desc.id,title:m("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:q.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:q.has("isInDiffEditor")},order:11,group:"1_diff",when:q.and(E.diffEditorRenderSideBySideInlineBreakpointReached,q.has("isInDiffEditor"))});wn.appendMenuItem(k.EditorTitle,{command:{id:new rV().desc.id,title:m("showMoves","Show Moved Code Blocks"),icon:re.move,toggled:Xm.create("config.diffEditor.experimental.showMoves",!0),precondition:q.has("isInDiffEditor")},order:10,group:"1_diff",when:q.has("isInDiffEditor")});const LL=mt("diffEditor","Diff Editor");class Oue extends va{constructor(){super({id:"diffEditor.switchSide",title:mt("switchSide","Switch Side"),icon:re.arrowSwap,precondition:q.has("isInDiffEditor"),f1:!0,category:LL})}runEditorCommand(e,t,i){const n=hp(e);if(n instanceof sh){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}Wt(Oue);class Fue extends va{constructor(){super({id:"diffEditor.exitCompareMove",title:mt("exitCompareMove","Exit Compare Move"),icon:re.close,precondition:E.comparingMovedCode,f1:!1,category:LL,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=hp(e);n instanceof sh&&n.exitCompareMove()}}Wt(Fue);class Bue extends va{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:mt("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:re.fold,precondition:q.has("isInDiffEditor"),f1:!0,category:LL})}runEditorCommand(e,t,...i){const n=hp(e);n instanceof sh&&n.collapseAllUnchangedRegions()}}Wt(Bue);class Wue extends va{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:mt("showAllUnchangedRegions","Show All Unchanged Regions"),icon:re.unfold,precondition:q.has("isInDiffEditor"),f1:!0,category:LL})}runEditorCommand(e,t,...i){const n=hp(e);n instanceof sh&&n.showAllUnchangedRegions()}}Wt(Wue);const lV=mt("accessibleDiffViewer","Accessible Diff Viewer");class cp extends Vs{constructor(){super({id:cp.id,title:mt("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:lV,precondition:q.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=hp(e);t==null||t.accessibleDiffViewerNext()}}cp.id="editor.action.accessibleDiffViewer.next";wn.appendMenuItem(k.EditorTitle,{command:{id:cp.id,title:m("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:q.has("isInDiffEditor")},order:10,group:"2_diff",when:q.and(E.accessibleDiffViewerVisible.negate(),q.has("isInDiffEditor"))});class S0 extends Vs{constructor(){super({id:S0.id,title:mt("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:lV,precondition:q.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=hp(e);t==null||t.accessibleDiffViewerPrev()}}S0.id="editor.action.accessibleDiffViewer.prev";function hp(o){const t=o.get(_t).listDiffEditors(),i=Nn();if(i)for(const n of t){const s=n.getContainerDomNode();if(Vue(s,i))return n}return null}function Vue(o,e){let t=e;for(;t;){if(t===o)return!0;t=t.parentElement}return!1}ct.registerCommandAlias("editor.action.diffReview.next",cp.id);Wt(cp);ct.registerCommandAlias("editor.action.diffReview.prev",S0.id);Wt(S0);var Hue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zue=function(o,e){return function(t,i){e(t,i,o)}},rT;const DL=new de("selectionAnchorSet",!1);let Ed=rT=class{static get(e){return e.getContribution(rT.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=DL.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(_e.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Fn().appendText(m("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),eo(m("anchorSet","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(_e.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()}};Ed.ID="editor.contrib.selectionAnchorController";Ed=rT=Hue([zue(1,Ae)],Ed);class Uue extends he{constructor(){super({id:"editor.action.setSelectionAnchor",label:m("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:Ui(2089,2080),weight:100}})}async run(e,t){var i;(i=Ed.get(t))===null||i===void 0||i.setSelectionAnchor()}}class $ue extends he{constructor(){super({id:"editor.action.goToSelectionAnchor",label:m("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:DL})}async run(e,t){var i;(i=Ed.get(t))===null||i===void 0||i.goToSelectionAnchor()}}class jue extends he{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:m("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:DL,kbOpts:{kbExpr:E.editorTextFocus,primary:Ui(2089,2089),weight:100}})}async run(e,t){var i;(i=Ed.get(t))===null||i===void 0||i.selectFromAnchorToCursor()}}class Kue extends he{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:m("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:DL,kbOpts:{kbExpr:E.editorTextFocus,primary:9,weight:100}})}async run(e,t){var i;(i=Ed.get(t))===null||i===void 0||i.cancelSelectionAnchor()}}vt(Ed.ID,Ed,4);Q(Uue);Q($ue);Q(jue);Q(Kue);const que=N("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},m("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class Gue extends he{constructor(){super({id:"editor.action.jumpToBracket",label:m("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;(i=Sr.get(t))===null||i===void 0||i.jumpToBracket()}}class Zue extends he{constructor(){super({id:"editor.action.selectToBracket",label:m("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:mt("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var n;let s=!0;i&&i.selectBrackets===!1&&(s=!1),(n=Sr.get(t))===null||n===void 0||n.selectToBracket(s)}}class Yue extends he{constructor(){super({id:"editor.action.removeBrackets",label:m("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;(i=Sr.get(t))===null||i===void 0||i.removeBrackets(this.id)}}class Xue{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class Sr extends V{static get(e){return e.getContribution(Sr.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Rt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(72),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(72)&&(this._matchBrackets=this._editor.getOption(72),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 n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let r=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?r=s[1].getStartPosition():s[1].containsPosition(n)&&(r=s[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(n);if(a)r=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(n);l&&l.range&&(r=l.range.getStartPosition())}}return r?new _e(r.lineNumber,r.column,r.lineNumber,r.column):new _e(n.lineNumber,n.column,n.lineNumber,n.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(n=>{const s=n.getStartPosition();let r=t.bracketPairs.matchBracket(s);if(!r&&(r=t.bracketPairs.findEnclosingBrackets(s),!r)){const d=t.bracketPairs.findNextBracket(s);d&&d.range&&(r=t.bracketPairs.matchBracket(d.range.getStartPosition()))}let a=null,l=null;if(r){r.sort(D.compareRangesUsingStarts);const[d,c]=r;if(a=e?d.getStartPosition():d.getEndPosition(),l=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(s)){const h=a;a=l,l=h}}a&&l&&i.push(new _e(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 n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[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 n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let r=0;for(let h=0,u=e.length;h<u;h++){const g=e[h];g.isEmpty()&&(s[r++]=g.getStartPosition())}s.length>1&&s.sort(F.compare);const a=[];let l=0,d=0;const c=n.length;for(let h=0,u=s.length;h<u;h++){const g=s[h];for(;d<c&&n[d].position.isBefore(g);)d++;if(d<c&&n[d].position.equals(g))a[l++]=n[d];else{let f=t.bracketPairs.matchBracket(g,20),p=Sr._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!f&&this._matchBrackets==="always"&&(f=t.bracketPairs.findEnclosingBrackets(g,20),p=Sr._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new Xue(g,f,p)}}this._lastBracketsData=a,this._lastVersionId=i}}Sr.ID="editor.contrib.bracketMatchingController";Sr._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=ze.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:hi(que),position:Do.Center}});Sr._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=ze.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});vt(Sr.ID,Sr,1);Q(Zue);Q(Gue);Q(Yue);wn.appendMenuItem(k.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:m({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class Que{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new D(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new D(i,s,i,s),a)}else{const r=new D(i,s,i,s+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new D(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new _e(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new _e(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class dV extends he{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new Que(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class Jue extends dV{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:m("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:E.writable})}}class ege extends dV{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:m("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:E.writable})}}Q(Jue);Q(ege);class tge extends he{constructor(){super({id:"editor.action.transposeLetters",label:m("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:E.writable,kbOpts:{kbExpr:E.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const r of s){if(!r.isEmpty())continue;const a=r.startLineNumber,l=r.startColumn,d=i.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&d===2))continue;const c=l===d?r.getPosition():Dt.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),h=Dt.leftPosition(i,c),u=Dt.leftPosition(i,h),g=i.getValueInRange(D.fromPositions(u,h)),f=i.getValueInRange(D.fromPositions(h,c)),p=D.fromPositions(u,c);n.push(new Dn(p,f+g))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}Q(tge);const xL=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let o;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?o=crypto.getRandomValues.bind(crypto):o=function(i){for(let n=0;n<i.length;n++)i[n]=Math.floor(Math.random()*256);return i};const e=new Uint8Array(16),t=[];for(let i=0;i<256;i++)t.push(i.toString(16).padStart(2,"0"));return function(){o(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let n=0,s="";return s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s}}();function xA(o){return{asString:async()=>o,asFile:()=>{},value:typeof o=="string"?o:void 0}}function ige(o,e,t){const i={id:xL(),name:o,uri:e,data:t};return{asString:async()=>"",asFile:()=>i,value:void 0}}class cV{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return dt.some(this,([i,n])=>n.asFile())&&t.push("files"),uV(xS(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return xS(e)}}function xS(o){return o.toLowerCase()}function hV(o,e){return uV(xS(o),e.map(xS))}function uV(o,e){if(o==="*/*")return e.length>0;if(e.includes(o))return!0;const t=o.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[i,n,s]=t;return s==="*"?e.some(r=>r.startsWith(n+"/")):!1}const kL=Object.freeze({create:o=>Ld(o.map(e=>e.toString())).join(`\r
|
|
672
|
+
*-----------------------------------------------------------------------------*/var xue=Object.defineProperty,kue=Object.getOwnPropertyDescriptor,Iue=Object.getOwnPropertyNames,Eue=Object.prototype.hasOwnProperty,o3=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Iue(e))!Eue.call(o,n)&&n!==t&&xue(o,n,{get:()=>e[n],enumerable:!(i=kue(e,n))||i.enumerable});return o},Nue=(o,e,t)=>(o3(o,e,"default"),t&&o3(t,e,"default")),Tue="5.0.2",Om={};Nue(Om,vL);var X6=(o=>(o[o.None=0]="None",o[o.CommonJS=1]="CommonJS",o[o.AMD=2]="AMD",o[o.UMD=3]="UMD",o[o.System=4]="System",o[o.ES2015=5]="ES2015",o[o.ESNext=99]="ESNext",o))(X6||{}),Q6=(o=>(o[o.None=0]="None",o[o.Preserve=1]="Preserve",o[o.React=2]="React",o[o.ReactNative=3]="ReactNative",o[o.ReactJSX=4]="ReactJSX",o[o.ReactJSXDev=5]="ReactJSXDev",o))(Q6||{}),J6=(o=>(o[o.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",o[o.LineFeed=1]="LineFeed",o))(J6||{}),eV=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(eV||{}),tV=(o=>(o[o.Classic=1]="Classic",o[o.NodeJs=2]="NodeJs",o))(tV||{}),iV=class{constructor(o,e,t,i,n){this._onDidChange=new Om.Emitter,this._onDidExtraLibsChange=new Om.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(o),this.setDiagnosticsOptions(e),this.setWorkerOptions(t),this.setInlayHintsOptions(i),this.setModeConfiguration(n),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(o,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===o)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:o,version:i},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let n=this._extraLibs[t];n&&n.version===i&&(delete this._extraLibs[t],this._removedExtraLibs[t]=i,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(o){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),o&&o.length>0)for(const e of o){const t=e.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=e.content;let n=1;this._removedExtraLibs[t]&&(n=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(o){this._compilerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(o){this._diagnosticsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(o){this._workerOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(o){this._inlayHintsOptions=o||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(o){}setEagerModelSync(o){this._eagerModelSync=o}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(o){this._modeConfiguration=o||Object.create(null),this._onDidChange.fire(void 0)}},Mue=Tue,nV={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},sV=new iV({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},nV),oV=new iV({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},nV),Rue=()=>yL().then(o=>o.getTypeScriptWorker()),Aue=()=>yL().then(o=>o.getJavaScriptWorker());Om.languages.typescript={ModuleKind:X6,JsxEmit:Q6,NewLineKind:J6,ScriptTarget:eV,ModuleResolutionKind:tV,typescriptVersion:Mue,typescriptDefaults:sV,javascriptDefaults:oV,getTypeScriptWorker:Rue,getJavaScriptWorker:Aue};function yL(){return be(()=>import("./tsMode-Bqbt_v_d.js"),__vite__mapDeps([16,1,2]),import.meta.url)}Om.languages.onLanguage("typescript",()=>yL().then(o=>o.setupTypeScript(sV)));Om.languages.onLanguage("javascript",()=>yL().then(o=>o.setupJavaScript(oV)));class Pue extends Vs{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:mt("toggleCollapseUnchangedRegions","Toggle Collapse Unchanged Regions"),icon:re.map,toggled:q.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:q.has("isInDiffEditor"),menu:{when:q.has("isInDiffEditor"),id:k.EditorTitle,order:22,group:"navigation"}})}run(e,...t){const i=e.get(Qe),n=!i.getValue("diffEditor.hideUnchangedRegions.enabled");i.updateValue("diffEditor.hideUnchangedRegions.enabled",n)}}Wt(Pue);class rV extends Vs{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:mt("toggleShowMovedCodeBlocks","Toggle Show Moved Code Blocks"),precondition:q.has("isInDiffEditor")})}run(e,...t){const i=e.get(Qe),n=!i.getValue("diffEditor.experimental.showMoves");i.updateValue("diffEditor.experimental.showMoves",n)}}Wt(rV);class aV extends Vs{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:mt("toggleUseInlineViewWhenSpaceIsLimited","Toggle Use Inline View When Space Is Limited"),precondition:q.has("isInDiffEditor")})}run(e,...t){const i=e.get(Qe),n=!i.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");i.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",n)}}Wt(aV);wn.appendMenuItem(k.EditorTitle,{command:{id:new aV().desc.id,title:m("useInlineViewWhenSpaceIsLimited","Use Inline View When Space Is Limited"),toggled:q.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:q.has("isInDiffEditor")},order:11,group:"1_diff",when:q.and(E.diffEditorRenderSideBySideInlineBreakpointReached,q.has("isInDiffEditor"))});wn.appendMenuItem(k.EditorTitle,{command:{id:new rV().desc.id,title:m("showMoves","Show Moved Code Blocks"),icon:re.move,toggled:Xm.create("config.diffEditor.experimental.showMoves",!0),precondition:q.has("isInDiffEditor")},order:10,group:"1_diff",when:q.has("isInDiffEditor")});const LL=mt("diffEditor","Diff Editor");class Oue extends va{constructor(){super({id:"diffEditor.switchSide",title:mt("switchSide","Switch Side"),icon:re.arrowSwap,precondition:q.has("isInDiffEditor"),f1:!0,category:LL})}runEditorCommand(e,t,i){const n=hp(e);if(n instanceof sh){if(i&&i.dryRun)return{destinationSelection:n.mapToOtherSide().destinationSelection};n.switchSide()}}}Wt(Oue);class Fue extends va{constructor(){super({id:"diffEditor.exitCompareMove",title:mt("exitCompareMove","Exit Compare Move"),icon:re.close,precondition:E.comparingMovedCode,f1:!1,category:LL,keybinding:{weight:1e4,primary:9}})}runEditorCommand(e,t,...i){const n=hp(e);n instanceof sh&&n.exitCompareMove()}}Wt(Fue);class Bue extends va{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:mt("collapseAllUnchangedRegions","Collapse All Unchanged Regions"),icon:re.fold,precondition:q.has("isInDiffEditor"),f1:!0,category:LL})}runEditorCommand(e,t,...i){const n=hp(e);n instanceof sh&&n.collapseAllUnchangedRegions()}}Wt(Bue);class Wue extends va{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:mt("showAllUnchangedRegions","Show All Unchanged Regions"),icon:re.unfold,precondition:q.has("isInDiffEditor"),f1:!0,category:LL})}runEditorCommand(e,t,...i){const n=hp(e);n instanceof sh&&n.showAllUnchangedRegions()}}Wt(Wue);const lV=mt("accessibleDiffViewer","Accessible Diff Viewer");class cp extends Vs{constructor(){super({id:cp.id,title:mt("editor.action.accessibleDiffViewer.next","Go to Next Difference"),category:lV,precondition:q.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(e){const t=hp(e);t==null||t.accessibleDiffViewerNext()}}cp.id="editor.action.accessibleDiffViewer.next";wn.appendMenuItem(k.EditorTitle,{command:{id:cp.id,title:m("Open Accessible Diff Viewer","Open Accessible Diff Viewer"),precondition:q.has("isInDiffEditor")},order:10,group:"2_diff",when:q.and(E.accessibleDiffViewerVisible.negate(),q.has("isInDiffEditor"))});class S0 extends Vs{constructor(){super({id:S0.id,title:mt("editor.action.accessibleDiffViewer.prev","Go to Previous Difference"),category:lV,precondition:q.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(e){const t=hp(e);t==null||t.accessibleDiffViewerPrev()}}S0.id="editor.action.accessibleDiffViewer.prev";function hp(o){const t=o.get(_t).listDiffEditors(),i=Nn();if(i)for(const n of t){const s=n.getContainerDomNode();if(Vue(s,i))return n}return null}function Vue(o,e){let t=e;for(;t;){if(t===o)return!0;t=t.parentElement}return!1}ct.registerCommandAlias("editor.action.diffReview.next",cp.id);Wt(cp);ct.registerCommandAlias("editor.action.diffReview.prev",S0.id);Wt(S0);var Hue=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zue=function(o,e){return function(t,i){e(t,i,o)}},rT;const DL=new de("selectionAnchorSet",!1);let Ed=rT=class{static get(e){return e.getContribution(rT.ID)}constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=DL.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(_e.fromPositions(e,e),{description:"selection-anchor",stickiness:1,hoverMessage:new Fn().appendText(m("selectionAnchor","Selection Anchor")),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),eo(m("anchorSet","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(_e.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()}};Ed.ID="editor.contrib.selectionAnchorController";Ed=rT=Hue([zue(1,Ae)],Ed);class Uue extends he{constructor(){super({id:"editor.action.setSelectionAnchor",label:m("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:Ui(2089,2080),weight:100}})}async run(e,t){var i;(i=Ed.get(t))===null||i===void 0||i.setSelectionAnchor()}}class $ue extends he{constructor(){super({id:"editor.action.goToSelectionAnchor",label:m("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:DL})}async run(e,t){var i;(i=Ed.get(t))===null||i===void 0||i.goToSelectionAnchor()}}class jue extends he{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:m("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:DL,kbOpts:{kbExpr:E.editorTextFocus,primary:Ui(2089,2089),weight:100}})}async run(e,t){var i;(i=Ed.get(t))===null||i===void 0||i.selectFromAnchorToCursor()}}class Kue extends he{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:m("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:DL,kbOpts:{kbExpr:E.editorTextFocus,primary:9,weight:100}})}async run(e,t){var i;(i=Ed.get(t))===null||i===void 0||i.cancelSelectionAnchor()}}vt(Ed.ID,Ed,4);Q(Uue);Q($ue);Q(jue);Q(Kue);const que=N("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},m("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class Gue extends he{constructor(){super({id:"editor.action.jumpToBracket",label:m("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:3165,weight:100}})}run(e,t){var i;(i=Sr.get(t))===null||i===void 0||i.jumpToBracket()}}class Zue extends he{constructor(){super({id:"editor.action.selectToBracket",label:m("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,metadata:{description:mt("smartSelect.selectToBracketDescription","Select the text inside and including the brackets or curly braces"),args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var n;let s=!0;i&&i.selectBrackets===!1&&(s=!1),(n=Sr.get(t))===null||n===void 0||n.selectToBracket(s)}}class Yue extends he{constructor(){super({id:"editor.action.removeBrackets",label:m("smartSelect.removeBrackets","Remove Brackets"),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:2561,weight:100}})}run(e,t){var i;(i=Sr.get(t))===null||i===void 0||i.removeBrackets(this.id)}}class Xue{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class Sr extends V{static get(e){return e.getContribution(Sr.ID)}constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new Rt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(72),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(72)&&(this._matchBrackets=this._editor.getOption(72),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 n=i.getStartPosition(),s=e.bracketPairs.matchBracket(n);let r=null;if(s)s[0].containsPosition(n)&&!s[1].containsPosition(n)?r=s[1].getStartPosition():s[1].containsPosition(n)&&(r=s[0].getStartPosition());else{const a=e.bracketPairs.findEnclosingBrackets(n);if(a)r=a[1].getStartPosition();else{const l=e.bracketPairs.findNextBracket(n);l&&l.range&&(r=l.range.getStartPosition())}}return r?new _e(r.lineNumber,r.column,r.lineNumber,r.column):new _e(n.lineNumber,n.column,n.lineNumber,n.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(n=>{const s=n.getStartPosition();let r=t.bracketPairs.matchBracket(s);if(!r&&(r=t.bracketPairs.findEnclosingBrackets(s),!r)){const d=t.bracketPairs.findNextBracket(s);d&&d.range&&(r=t.bracketPairs.matchBracket(d.range.getStartPosition()))}let a=null,l=null;if(r){r.sort(D.compareRangesUsingStarts);const[d,c]=r;if(a=e?d.getStartPosition():d.getEndPosition(),l=e?c.getEndPosition():c.getStartPosition(),c.containsPosition(s)){const h=a;a=l,l=h}}a&&l&&i.push(new _e(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 n=i.getPosition();let s=t.bracketPairs.matchBracket(n);s||(s=t.bracketPairs.findEnclosingBrackets(n)),s&&(this._editor.pushUndoStop(),this._editor.executeEdits(e,[{range:s[0],text:""},{range:s[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const e=[];let t=0;for(const i of this._lastBracketsData){const n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[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 n=[];this._lastVersionId===i&&(n=this._lastBracketsData);const s=[];let r=0;for(let h=0,u=e.length;h<u;h++){const g=e[h];g.isEmpty()&&(s[r++]=g.getStartPosition())}s.length>1&&s.sort(F.compare);const a=[];let l=0,d=0;const c=n.length;for(let h=0,u=s.length;h<u;h++){const g=s[h];for(;d<c&&n[d].position.isBefore(g);)d++;if(d<c&&n[d].position.equals(g))a[l++]=n[d];else{let f=t.bracketPairs.matchBracket(g,20),p=Sr._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!f&&this._matchBrackets==="always"&&(f=t.bracketPairs.findEnclosingBrackets(g,20),p=Sr._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new Xue(g,f,p)}}this._lastBracketsData=a,this._lastVersionId=i}}Sr.ID="editor.contrib.bracketMatchingController";Sr._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=ze.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:hi(que),position:Do.Center}});Sr._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=ze.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});vt(Sr.ID,Sr,1);Q(Zue);Q(Gue);Q(Yue);wn.appendMenuItem(k.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:m({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class Que{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,s=this._selection.endColumn;if(!(this._isMovingLeft&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new D(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new D(i,s,i,s),a)}else{const r=new D(i,s,i,s+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new D(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new _e(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new _e(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class dV extends he{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const s of n)i.push(new Que(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class Jue extends dV{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:m("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:E.writable})}}class ege extends dV{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:m("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:E.writable})}}Q(Jue);Q(ege);class tge extends he{constructor(){super({id:"editor.action.transposeLetters",label:m("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:E.writable,kbOpts:{kbExpr:E.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=t.getSelections();for(const r of s){if(!r.isEmpty())continue;const a=r.startLineNumber,l=r.startColumn,d=i.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&d===2))continue;const c=l===d?r.getPosition():Dt.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),h=Dt.leftPosition(i,c),u=Dt.leftPosition(i,h),g=i.getValueInRange(D.fromPositions(u,h)),f=i.getValueInRange(D.fromPositions(h,c)),p=D.fromPositions(u,c);n.push(new Dn(p,f+g))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}Q(tge);const xL=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let o;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?o=crypto.getRandomValues.bind(crypto):o=function(i){for(let n=0;n<i.length;n++)i[n]=Math.floor(Math.random()*256);return i};const e=new Uint8Array(16),t=[];for(let i=0;i<256;i++)t.push(i.toString(16).padStart(2,"0"));return function(){o(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let n=0,s="";return s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+="-",s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s+=t[e[n++]],s}}();function xA(o){return{asString:async()=>o,asFile:()=>{},value:typeof o=="string"?o:void 0}}function ige(o,e,t){const i={id:xL(),name:o,uri:e,data:t};return{asString:async()=>"",asFile:()=>i,value:void 0}}class cV{constructor(){this._entries=new Map}get size(){let e=0;for(const t of this._entries)e++;return e}has(e){return this._entries.has(this.toKey(e))}matches(e){const t=[...this._entries.keys()];return dt.some(this,([i,n])=>n.asFile())&&t.push("files"),uV(xS(e),t)}get(e){var t;return(t=this._entries.get(this.toKey(e)))===null||t===void 0?void 0:t[0]}append(e,t){const i=this._entries.get(e);i?i.push(t):this._entries.set(this.toKey(e),[t])}replace(e,t){this._entries.set(this.toKey(e),[t])}delete(e){this._entries.delete(this.toKey(e))}*[Symbol.iterator](){for(const[e,t]of this._entries)for(const i of t)yield[e,i]}toKey(e){return xS(e)}}function xS(o){return o.toLowerCase()}function hV(o,e){return uV(xS(o),e.map(xS))}function uV(o,e){if(o==="*/*")return e.length>0;if(e.includes(o))return!0;const t=o.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!t)return!1;const[i,n,s]=t;return s==="*"?e.some(r=>r.startsWith(n+"/")):!1}const kL=Object.freeze({create:o=>Ld(o.map(e=>e.toString())).join(`\r
|
|
673
673
|
`),split:o=>o.split(`\r
|
|
674
674
|
`),parse:o=>kL.split(o).filter(e=>!e.startsWith("#"))}),r3={EDITORS:"CodeEditors",FILES:"CodeFiles"};class nge{}const sge={DragAndDropContribution:"workbench.contributions.dragAndDrop"};li.add(sge.DragAndDropContribution,new nge);class fb{constructor(){}static getInstance(){return fb.INSTANCE}hasData(e){return e&&e===this.proto}getData(e){if(this.hasData(e))return this.data}}fb.INSTANCE=new fb;function gV(o){const e=new cV;for(const t of o.items){const i=t.type;if(t.kind==="string"){const n=new Promise(s=>t.getAsString(s));e.append(i,xA(n))}else if(t.kind==="file"){const n=t.getAsFile();n&&e.append(i,oge(n))}}return e}function oge(o){const e=o.path?xe.parse(o.path):void 0;return ige(o.name,e,async()=>new Uint8Array(await o.arrayBuffer()))}const rge=Object.freeze([r3.EDITORS,r3.FILES,Zv.RESOURCES,Zv.INTERNAL_URI_LIST]);function fV(o,e=!1){const t=gV(o),i=t.get(Zv.INTERNAL_URI_LIST);if(i)t.replace(pi.uriList,i);else if(e||!t.has(pi.uriList)){const n=[];for(const s of o.items){const r=s.getAsFile();if(r){const a=r.path;try{a?n.push(xe.file(a).toString()):n.push(xe.parse(r.name,!0).toString())}catch{}}}n.length&&t.replace(pi.uriList,xA(kL.create(n)))}for(const n of rge)t.delete(n);return t}class cr{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const e=this.pos;let t=0,i=this.value.charCodeAt(e),n;if(n=cr._table[i],typeof n=="number")return this.pos+=1,{type:n,pos:e,len:1};if(cr.isDigitCharacter(i)){n=8;do t+=1,i=this.value.charCodeAt(e+t);while(cr.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}if(cr.isVariableCharacter(i)){n=9;do i=this.value.charCodeAt(e+ ++t);while(cr.isVariableCharacter(i)||cr.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}n=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof cr._table[i]>"u"&&!cr.isDigitCharacter(i)&&!cr.isVariableCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}}cr._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class up{constructor(){this._children=[]}appendChild(e){return e instanceof hs&&this._children[this._children.length-1]instanceof hs?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),s=i.children.slice(0);s.splice(n,1,...t),i._children=s,function r(a,l){for(const d of a)d.parent=l,r(d.children,d)}(t,i)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof y0)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class hs extends up{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new hs(this.value)}}class mV extends up{}class Po extends mV{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 gp?this._children[0]:void 0}clone(){const e=new Po(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class gp extends up{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof hs&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const e=new gp;return this.options.forEach(e.appendChild,e),e}}class kA extends up{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))});return!i&&this._children.some(s=>s instanceof Hr&&!!s.elseValue)&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof Hr){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){const e=new kA;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}}class Hr extends up{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":e&&typeof this.ifValue=="string"?this.ifValue:!e&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((i,n)=>n===0?i.charAt(0).toLowerCase()+i.substr(1):i.charAt(0).toUpperCase()+i.substr(1)).join(""):e}clone(){return new Hr(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class mb extends mV{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 hs(t)],!0):!1}clone(){const e=new mb(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function a3(o,e){const t=[...o];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}class y0 extends up{get placeholderInfo(){if(!this._placeholders){const e=[];let t;this.walk(function(i){return i instanceof Po&&(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(n=>n===e?(i=!0,!1):(t+=n.len(),!0)),i?t:-1}fullLen(e){let t=0;return a3([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){const t=[];let{parent:i}=e;for(;i;)i instanceof Po&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof mb&&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 y0;return this._children=this.children.map(t=>t.clone()),e}walk(e){a3(this.children,e)}}class Ju{constructor(){this._scanner=new cr,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){const n=new y0;return this.parseFragment(e,n),this.ensureFinalTabstop(n,i??!1,t??!1),n}parseFragment(e,t){const i=t.children.length;for(this._scanner.text(e),this._token=this._scanner.next();this._parse(t););const n=new Map,s=[];t.walk(l=>(l instanceof Po&&(l.isFinalTabstop?n.set(0,void 0):!n.has(l.index)&&l.children.length>0?n.set(l.index,l.children):s.push(l)),!0));const r=(l,d)=>{const c=n.get(l.index);if(!c)return;const h=new Po(l.index);h.transform=l.transform;for(const u of c){const g=u.clone();h.appendChild(g),g instanceof Po&&n.has(g.index)&&!d.has(g.index)&&(d.add(g.index),r(g,d),d.delete(g.index))}t.replace(l,[h])},a=new Set;for(const l of s)r(l,a);return t.children.slice(i)}ensureFinalTabstop(e,t,i){(t||i&&e.placeholders.length>0)&&(e.placeholders.find(s=>s.index===0)||e.appendChild(new Po(0)))}_accept(e,t){if(e===void 0||this._token.type===e){const i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(this._token.type===14)return!1;if(this._token.type===5){const n=this._scanner.next();if(n.type!==0&&n.type!==4&&n.type!==5)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return(t=this._accept(5,!0))?(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new hs(t)),!0):!1}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new Po(Number(t)):new mb(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const s=new Po(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new hs("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else if(s.index>0&&this._accept(7)){const r=new gp;for(;;){if(this._parseChoiceElement(r)){if(this._accept(2))continue;if(this._accept(7)&&(s.appendChild(r),this._accept(4)))return e.appendChild(s),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseChoiceElement(e){const t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let n;if((n=this._accept(5,!0))?n=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:n=this._accept(void 0,!0),!n)return this._backTo(t),!1;i.push(n)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new hs(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const s=new mb(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new hs("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseTransform(e){const t=new kA;let i="",n="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,i+=s;continue}if(this._token.type!==14){i+=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,t.appendChild(new hs(s));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,n)}catch{return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);const n=this._accept(8,!0);if(n)if(i){if(this._accept(4))return e.appendChild(new Hr(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Hr(Number(n))),!0;else return this._backTo(t),!1;if(this._accept(6)){const s=this._accept(9,!0);return!s||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new Hr(Number(n),s)),!0)}else if(this._accept(11)){const s=this._until(4);if(s)return e.appendChild(new Hr(Number(n),void 0,s,void 0)),!0}else if(this._accept(12)){const s=this._until(4);if(s)return e.appendChild(new Hr(Number(n),void 0,void 0,s)),!0}else if(this._accept(13)){const s=this._until(1);if(s){const r=this._until(4);if(r)return e.appendChild(new Hr(Number(n),void 0,s,r)),!0}}else{const s=this._until(4);if(s)return e.appendChild(new Hr(Number(n),void 0,void 0,s)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new hs(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}function pV(o,e,t){var i,n,s,r;return(typeof t.insertText=="string"?t.insertText==="":t.insertText.snippet==="")?{edits:(n=(i=t.additionalEdit)===null||i===void 0?void 0:i.edits)!==null&&n!==void 0?n:[]}:{edits:[...e.map(a=>new Rc(o,{range:a,text:typeof t.insertText=="string"?Ju.escape(t.insertText)+"$0":t.insertText.snippet,insertAsSnippet:!0})),...(r=(s=t.additionalEdit)===null||s===void 0?void 0:s.edits)!==null&&r!==void 0?r:[]]}}function _V(o){var e;function t(a,l){return"providerId"in a&&a.providerId===l.providerId||"mimeType"in a&&a.mimeType===l.handledMimeType}const i=new Map;for(const a of o)for(const l of(e=a.yieldTo)!==null&&e!==void 0?e:[])for(const d of o)if(d!==a&&t(l,d)){let c=i.get(a);c||(c=[],i.set(a,c)),c.push(d)}if(!i.size)return Array.from(o);const n=new Set,s=[];function r(a){if(!a.length)return[];const l=a[0];if(s.includes(l))return console.warn(`Yield to cycle detected for ${l.providerId}`),a;if(n.has(l))return r(a.slice(1));let d=[];const c=i.get(l);return c&&(s.push(l),d=r(c),s.pop()),n.add(l),[...d,l,...r(a.slice(1))]}return r(Array.from(o))}var age=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lge=function(o,e){return function(t,i){e(t,i,o)}};const dge=ze.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:S9,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class IL extends V{constructor(e,t,i,n,s){super(),this.typeId=e,this.editor=t,this.range=i,this.delegate=s,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(n),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(e){this.domNode=J(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=e;const t=J("span.icon");this.domNode.append(t),t.classList.add(...Ne.asClassNameArray(re.loading),"codicon-modifier-spin");const i=()=>{const n=this.editor.getOption(67);this.domNode.style.height=`${n}px`,this.domNode.style.width=`${Math.ceil(.8*n)}px`};i(),this._register(this.editor.onDidChangeConfiguration(n=>{(n.hasChanged(52)||n.hasChanged(67))&&i()})),this._register($(this.domNode,se.CLICK,n=>{this.delegate.cancel()}))}getId(){return IL.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)}}IL.baseId="editor.widget.inlineProgressWidget";let kS=class extends V{constructor(e,t,i){super(),this.id=e,this._editor=t,this._instantiationService=i,this._showDelay=500,this._showPromise=this._register(new hn),this._currentWidget=new hn,this._operationIdPool=0,this._currentDecorations=t.createDecorationsCollection()}async showWhile(e,t,i){const n=this._operationIdPool++;this._currentOperation=n,this.clear(),this._showPromise.value=Gc(()=>{const s=D.fromPositions(e);this._currentDecorations.set([{range:s,options:dge}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(IL,this.id,this._editor,s,t,i))},this._showDelay);try{return await i}finally{this._currentOperation===n&&(this.clear(),this._currentOperation=void 0)}}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};kS=age([lge(2,Ie)],kS);var vV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Z_=function(o,e){return function(t,i){e(t,i,o)}},aT;let IS=aT=class extends V{constructor(e,t,i,n,s,r,a,l,d,c){super(),this.typeId=e,this.editor=t,this.showCommand=n,this.range=s,this.edits=r,this.onSelectNewEdit=a,this._contextMenuService=l,this._keybindingService=c,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=i.bindTo(d),this.visibleContext.set(!0),this._register(Le(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register(Le(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(h=>{s.containsPosition(h.position)||this.dispose()})),this._register(ae.runAndSubscribe(c.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var e;const t=(e=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||e===void 0?void 0:e.getLabel();this.button.element.title=this.showCommand.label+(t?` (${t})`:"")}create(){this.domNode=J(".post-edit-widget"),this.button=this._register(new mS(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register($(this.domNode,se.CLICK,()=>this.showSelector()))}getId(){return aT.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const e=Mi(this.button.element);return{x:e.left+e.width,y:e.top+e.height}},getActions:()=>this.edits.allEdits.map((e,t)=>Rf({id:"",label:e.label,checked:t===this.edits.activeEditIndex,run:()=>{if(t!==this.edits.activeEditIndex)return this.onSelectNewEdit(t)}}))})}};IS.baseId="editor.widget.postEditWidget";IS=aT=vV([Z_(7,so),Z_(8,Ae),Z_(9,Et)],IS);let ES=class extends V{constructor(e,t,i,n,s,r){super(),this._id=e,this._editor=t,this._visibleContext=i,this._showCommand=n,this._instantiationService=s,this._bulkEditService=r,this._currentWidget=this._register(new hn),this._register(ae.any(t.onDidChangeModel,t.onDidChangeModelContent)(()=>this.clear()))}async applyEditAndShowIfNeeded(e,t,i,n){const s=this._editor.getModel();if(!s||!e.length)return;const r=t.allEdits[t.activeEditIndex];if(!r)return;const a=pV(s.uri,e,r),l=e[0],d=s.deltaDecorations([],[{range:l,options:{description:"paste-line-suffix",stickiness:0}}]);let c,h;try{c=await this._bulkEditService.apply(a,{editor:this._editor,token:n}),h=s.getDecorationRange(d[0])}finally{s.deltaDecorations(d,[])}i&&c.isApplied&&t.allEdits.length>1&&this.show(h??l,t,async u=>{const g=this._editor.getModel();g&&(await g.undo(),this.applyEditAndShowIfNeeded(e,{activeEditIndex:u,allEdits:t.allEdits},i,n))})}show(e,t,i){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(IS,this._id,this._editor,this._visibleContext,this._showCommand,e,t,i))}clear(){this._currentWidget.clear()}tryShowSelector(){var e;(e=this._currentWidget.value)===null||e===void 0||e.showSelector()}};ES=vV([Z_(4,Ie),Z_(5,c0)],ES);var cge=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},l3=function(o,e){return function(t,i){e(t,i,o)}},F1;let bs=F1=class{static get(e){return e.getContribution(F1.ID)}constructor(e,t,i){this._openerService=i,this._messageWidget=new hn,this._messageListeners=new X,this._mouseOverMessage=!1,this._editor=e,this._visible=F1.MESSAGE_VISIBLE.bindTo(t)}dispose(){var e;(e=this._message)===null||e===void 0||e.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){eo(ll(e)?e.value:e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=ll(e)?jy(e,{actionHandler:{callback:n=>{this.closeMessage(),O2(this._openerService,n,ll(e)?e.isTrusted:void 0)},disposables:this._messageListeners}}):void 0,this._messageWidget.value=new d3(this._editor,t,typeof e=="string"?e:this._message.element),this._messageListeners.add(ae.debounce(this._editor.onDidBlurEditorText,(n,s)=>s,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&Cn(Nn(),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($(this._messageWidget.value.getDomNode(),se.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add($(this._messageWidget.value.getDomNode(),se.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{n.target.position&&(i?i.containsPosition(n.target.position)||this.closeMessage():i=new D(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(d3.fadeOut(this._messageWidget.value))}};bs.ID="editor.contrib.messageController";bs.MESSAGE_VISIBLE=new de("messageVisible",!1,m("messageVisible","Whether the editor is currently showing an inline message"));bs=F1=cge([l3(1,Ae),l3(2,Hs)],bs);const hge=un.bindToContribution(bs.get);le(new hge({id:"leaveEditorMessage",precondition:bs.MESSAGE_VISIBLE,handler:o=>o.closeMessage(),kbOpts:{weight:130,primary:9}}));let d3=class{static fadeOut(e){const t=()=>{e.dispose(),clearTimeout(i),e.getDomNode().removeEventListener("animationend",t)},i=setTimeout(t,110);return e.getDomNode().addEventListener("animationend",t),e.getDomNode().classList.add("fadeOut"),{dispose:t}}constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i},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 r=document.createElement("div");typeof n=="string"?(r.classList.add("message"),r.textContent=n):(n.classList.add("message"),r.appendChild(n)),this._domNode.appendChild(r);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(e){this._domNode.classList.toggle("below",e===2)}};vt(bs.ID,bs,4);var uge=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Hg=function(o,e){return function(t,i){e(t,i,o)}},lT;const bV="editor.changePasteType",CV=new de("pasteWidgetVisible",!1,m("pasteWidgetVisible","Whether the paste widget is showing")),Yx="application/vnd.code.copyMetadata";let Nd=lT=class extends V{static get(e){return e.getContribution(lT.ID)}constructor(e,t,i,n,s,r,a){super(),this._bulkEditService=i,this._clipboardService=n,this._languageFeaturesService=s,this._quickInputService=r,this._progressService=a,this._editor=e;const l=e.getContainerDomNode();this._register($(l,"copy",d=>this.handleCopy(d))),this._register($(l,"cut",d=>this.handleCopy(d))),this._register($(l,"paste",d=>this.handlePaste(d),!0)),this._pasteProgressManager=this._register(new kS("pasteIntoEditor",e,t)),this._postPasteWidgetManager=this._register(t.createInstance(ES,"pasteIntoEditor",e,CV,{id:bV,label:m("postPasteWidgetTitle","Show paste options...")}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(e){this._editor.focus();try{this._pasteAsActionContext={preferredId:e},Ym().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(85).enabled&&!this._editor.getOption(91)}async finishedPaste(){await this._currentPasteOperation}handleCopy(e){var t,i;if(!this._editor.hasTextFocus()||(bh&&this._clipboardService.writeResources([]),!e.clipboardData||!this.isPasteAsEnabled()))return;const n=this._editor.getModel(),s=this._editor.getSelections();if(!n||!(s!=null&&s.length))return;const r=this._editor.getOption(37);let a=s;const l=s.length===1&&s[0].isEmpty();if(l){if(!r)return;a=[new D(a[0].startLineNumber,1,a[0].startLineNumber,1+n.getLineLength(a[0].startLineNumber))]}const d=(t=this._editor._getViewModel())===null||t===void 0?void 0:t.getPlainTextToCopy(s,r,Vn),h={multicursorText:Array.isArray(d)?d:null,pasteOnNewLine:l,mode:null},u=this._languageFeaturesService.documentPasteEditProvider.ordered(n).filter(v=>!!v.prepareDocumentPaste);if(!u.length){this.setCopyMetadata(e.clipboardData,{defaultPastePayload:h});return}const g=gV(e.clipboardData),f=u.flatMap(v=>{var b;return(b=v.copyMimeTypes)!==null&&b!==void 0?b:[]}),p=xL();this.setCopyMetadata(e.clipboardData,{id:p,providerCopyMimeTypes:f,defaultPastePayload:h});const _=tn(async v=>{const b=oa(await Promise.all(u.map(async C=>{try{return await C.prepareDocumentPaste(n,a,g,v)}catch(w){console.error(w);return}})));b.reverse();for(const C of b)for(const[w,S]of C)g.replace(w,S);return g});(i=this._currentCopyOperation)===null||i===void 0||i.dataTransferPromise.cancel(),this._currentCopyOperation={handle:p,dataTransferPromise:_}}async handlePaste(e){var t,i,n,s,r;if(!e.clipboardData||!this._editor.hasTextFocus())return;(t=bs.get(this._editor))===null||t===void 0||t.closeMessage(),(i=this._currentPasteOperation)===null||i===void 0||i.cancel(),this._currentPasteOperation=void 0;const a=this._editor.getModel(),l=this._editor.getSelections();if(!(l!=null&&l.length)||!a||!this.isPasteAsEnabled()&&!this._pasteAsActionContext)return;const d=this.fetchCopyMetadata(e),c=fV(e.clipboardData);c.delete(Yx);const h=[...e.clipboardData.types,...(n=d==null?void 0:d.providerCopyMimeTypes)!==null&&n!==void 0?n:[],pi.uriList],u=this._languageFeaturesService.documentPasteEditProvider.ordered(a).filter(g=>{var f,p;return!((f=this._pasteAsActionContext)===null||f===void 0)&&f.preferredId&&this._pasteAsActionContext.preferredId!==g.id?!1:(p=g.pasteMimeTypes)===null||p===void 0?void 0:p.some(_=>hV(_,h))});if(!u.length){!((s=this._pasteAsActionContext)===null||s===void 0)&&s.preferredId&&this.showPasteAsNoEditMessage(l,(r=this._pasteAsActionContext)===null||r===void 0?void 0:r.preferredId);return}e.preventDefault(),e.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,u,l,c,d,{trigger:"explicit",only:this._pasteAsActionContext.preferredId}):this.doPasteInline(u,l,c,d,{trigger:"implicit"})}showPasteAsNoEditMessage(e,t){var i;(i=bs.get(this._editor))===null||i===void 0||i.showMessage(m("pasteAsError","No paste edits for '{0}' found",t),e[0].getStartPosition())}doPasteInline(e,t,i,n,s){const r=tn(async a=>{const l=this._editor;if(!l.hasModel())return;const d=l.getModel(),c=new oh(l,3,void 0,a);try{if(await this.mergeInDataFromCopy(i,n,c.token),c.token.isCancellationRequested)return;const h=e.filter(g=>c3(g,i));if(!h.length||h.length===1&&h[0].id==="text"){await this.applyDefaultPasteHandler(i,n,c.token);return}const u=await this.getPasteEdits(h,i,d,t,s,c.token);if(c.token.isCancellationRequested)return;if(u.length===1&&u[0].providerId==="text"){await this.applyDefaultPasteHandler(i,n,c.token);return}if(u.length){const g=l.getOption(85).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(t,{activeEditIndex:0,allEdits:u},g,c.token)}await this.applyDefaultPasteHandler(i,n,c.token)}finally{c.dispose(),this._currentPasteOperation===r&&(this._currentPasteOperation=void 0)}});this._pasteProgressManager.showWhile(t[0].getEndPosition(),m("pasteIntoEditorProgress","Running paste handlers. Click to cancel"),r),this._currentPasteOperation=r}showPasteAsPick(e,t,i,n,s,r){const a=tn(async l=>{const d=this._editor;if(!d.hasModel())return;const c=d.getModel(),h=new oh(d,3,void 0,l);try{if(await this.mergeInDataFromCopy(n,s,h.token),h.token.isCancellationRequested)return;let u=t.filter(_=>c3(_,n));e&&(u=u.filter(_=>_.id===e));const g=await this.getPasteEdits(u,n,c,i,r,h.token);if(h.token.isCancellationRequested)return;if(!g.length){r.only&&this.showPasteAsNoEditMessage(i,r.only);return}let f;if(e)f=g.at(0);else{const _=await this._quickInputService.pick(g.map(v=>({label:v.label,description:v.providerId,detail:v.detail,edit:v})),{placeHolder:m("pasteAsPickerPlaceholder","Select Paste Action")});f=_==null?void 0:_.edit}if(!f)return;const p=pV(c.uri,i,f);await this._bulkEditService.apply(p,{editor:this._editor})}finally{h.dispose(),this._currentPasteOperation===a&&(this._currentPasteOperation=void 0)}});this._progressService.withProgress({location:10,title:m("pasteAsProgress","Running paste handlers")},()=>a)}setCopyMetadata(e,t){e.setData(Yx,JSON.stringify(t))}fetchCopyMetadata(e){var t;if(!e.clipboardData)return;const i=e.clipboardData.getData(Yx);if(i)try{return JSON.parse(i)}catch{return}const[n,s]=rE.getTextData(e.clipboardData);if(s)return{defaultPastePayload:{mode:s.mode,multicursorText:(t=s.multicursorText)!==null&&t!==void 0?t:null,pasteOnNewLine:!!s.isFromEmptySelection}}}async mergeInDataFromCopy(e,t,i){var n;if(t!=null&&t.id&&((n=this._currentCopyOperation)===null||n===void 0?void 0:n.handle)===t.id){const s=await this._currentCopyOperation.dataTransferPromise;if(i.isCancellationRequested)return;for(const[r,a]of s)e.replace(r,a)}if(!e.has(pi.uriList)){const s=await this._clipboardService.readResources();if(i.isCancellationRequested)return;s.length&&e.append(pi.uriList,xA(kL.create(s)))}}async getPasteEdits(e,t,i,n,s,r){const a=await qb(Promise.all(e.map(async d=>{var c;try{const h=await((c=d.provideDocumentPasteEdits)===null||c===void 0?void 0:c.call(d,i,n,t,s,r));if(h)return{...h,providerId:d.id}}catch(h){console.error(h)}})),r),l=oa(a??[]);return _V(l)}async applyDefaultPasteHandler(e,t,i){var n,s,r;const a=(n=e.get(pi.text))!==null&&n!==void 0?n:e.get("text");if(!a)return;const l=await a.asString();if(i.isCancellationRequested)return;const d={text:l,pasteOnNewLine:(s=t==null?void 0:t.defaultPastePayload.pasteOnNewLine)!==null&&s!==void 0?s:!1,multicursorText:(r=t==null?void 0:t.defaultPastePayload.multicursorText)!==null&&r!==void 0?r:null,mode:null};this._editor.trigger("keyboard","paste",d)}};Nd.ID="editor.contrib.copyPasteActionController";Nd=lT=uge([Hg(1,Ie),Hg(2,c0),Hg(3,Fd),Hg(4,fe),Hg(5,wa),Hg(6,vW)],Nd);function c3(o,e){var t;return!!(!((t=o.pasteMimeTypes)===null||t===void 0)&&t.some(i=>e.matches(i)))}const eg="9_cutcopypaste",gge=Jr||document.queryCommandSupported("cut"),wV=Jr||document.queryCommandSupported("copy"),fge=typeof navigator.clipboard>"u"||qo?document.queryCommandSupported("paste"):!0;function IA(o){return o.register(),o}const mge=gge?IA(new Qm({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:Jr?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:k.MenubarEditMenu,group:"2_ccp",title:m({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:k.EditorContext,group:eg,title:m("actions.clipboard.cutLabel","Cut"),when:E.writable,order:1},{menuId:k.CommandPalette,group:"",title:m("actions.clipboard.cutLabel","Cut"),order:1},{menuId:k.SimpleEditorContext,group:eg,title:m("actions.clipboard.cutLabel","Cut"),when:E.writable,order:1}]})):void 0,pge=wV?IA(new Qm({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:Jr?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:k.MenubarEditMenu,group:"2_ccp",title:m({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:k.EditorContext,group:eg,title:m("actions.clipboard.copyLabel","Copy"),order:2},{menuId:k.CommandPalette,group:"",title:m("actions.clipboard.copyLabel","Copy"),order:1},{menuId:k.SimpleEditorContext,group:eg,title:m("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;wn.appendMenuItem(k.MenubarEditMenu,{submenu:k.MenubarCopy,title:mt("copy as","Copy As"),group:"2_ccp",order:3});wn.appendMenuItem(k.EditorContext,{submenu:k.EditorContextCopy,title:mt("copy as","Copy As"),group:eg,order:3});wn.appendMenuItem(k.EditorContext,{submenu:k.EditorContextShare,title:mt("share","Share"),group:"11_share",order:-1,when:q.and(q.notEquals("resourceScheme","output"),E.editorTextFocus)});wn.appendMenuItem(k.EditorTitleContext,{submenu:k.EditorTitleContextShare,title:mt("share","Share"),group:"11_share",order:-1});wn.appendMenuItem(k.ExplorerContext,{submenu:k.ExplorerContextShare,title:mt("share","Share"),group:"11_share",order:-1});const Xx=fge?IA(new Qm({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:Jr?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:k.MenubarEditMenu,group:"2_ccp",title:m({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:k.EditorContext,group:eg,title:m("actions.clipboard.pasteLabel","Paste"),when:E.writable,order:4},{menuId:k.CommandPalette,group:"",title:m("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:k.SimpleEditorContext,group:eg,title:m("actions.clipboard.pasteLabel","Paste"),when:E.writable,order:4}]})):void 0;class _ge extends he{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:m("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:E.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(37)&&t.getSelection().isEmpty()||(sE.forceCopyWithSyntaxHighlighting=!0,t.focus(),t.getContainerDomNode().ownerDocument.execCommand("copy"),sE.forceCopyWithSyntaxHighlighting=!1)}}function SV(o,e){o&&(o.addImplementation(1e4,"code-editor",(t,i)=>{const n=t.get(_t).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const s=n.getOption(37),r=n.getSelection();return r&&r.isEmpty()&&!s||n.getContainerDomNode().ownerDocument.execCommand(e),!0}return!1}),o.addImplementation(0,"generic-dom",(t,i)=>(Ym().execCommand(e),!0)))}SV(mge,"cut");SV(pge,"copy");Xx&&(Xx.addImplementation(1e4,"code-editor",(o,e)=>{var t,i;const n=o.get(_t),s=o.get(Fd),r=n.getFocusedCodeEditor();return r&&r.hasTextFocus()?r.getContainerDomNode().ownerDocument.execCommand("paste")?(i=(t=Nd.get(r))===null||t===void 0?void 0:t.finishedPaste())!==null&&i!==void 0?i:Promise.resolve():bh?(async()=>{const l=await s.readText();if(l!==""){const d=Mv.INSTANCE.get(l);let c=!1,h=null,u=null;d&&(c=r.getOption(37)&&!!d.isFromEmptySelection,h=typeof d.multicursorText<"u"?d.multicursorText:null,u=d.mode),r.trigger("keyboard","paste",{text:l,pasteOnNewLine:c,multicursorText:h,mode:u})}})():!0:!1}),Xx.addImplementation(0,"generic-dom",(o,e)=>(Ym().execCommand("paste"),!0)));wV&&Q(_ge);class Pe{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+Pe.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new Pe(this.value+Pe.sep+e)}}Pe.sep=".";Pe.None=new Pe("@@none@@");Pe.Empty=new Pe("");Pe.QuickFix=new Pe("quickfix");Pe.Refactor=new Pe("refactor");Pe.RefactorExtract=Pe.Refactor.append("extract");Pe.RefactorInline=Pe.Refactor.append("inline");Pe.RefactorMove=Pe.Refactor.append("move");Pe.RefactorRewrite=Pe.Refactor.append("rewrite");Pe.Notebook=new Pe("notebook");Pe.Source=new Pe("source");Pe.SourceOrganizeImports=Pe.Source.append("organizeImports");Pe.SourceFixAll=Pe.Source.append("fixAll");Pe.SurroundWith=Pe.Refactor.append("surround");var to;(function(o){o.Refactor="refactor",o.RefactorPreview="refactor preview",o.Lightbulb="lightbulb",o.Default="other (default)",o.SourceAction="source action",o.QuickFix="quick fix action",o.FixAll="fix all",o.OrganizeImports="organize imports",o.AutoFix="auto fix",o.QuickFixHover="quick fix hover window",o.OnSave="save participants",o.ProblemsView="problems view"})(to||(to={}));function vge(o,e){return!(o.include&&!o.include.intersects(e)||o.excludes&&o.excludes.some(t=>yV(e,t,o.include))||!o.includeSourceActions&&Pe.Source.contains(e))}function bge(o,e){const t=e.kind?new Pe(e.kind):void 0;return!(o.include&&(!t||!o.include.contains(t))||o.excludes&&t&&o.excludes.some(i=>yV(t,i,o.include))||!o.includeSourceActions&&t&&Pe.Source.contains(t)||o.onlyIncludePreferredActions&&!e.isPreferred)}function yV(o,e,t){return!(!e.contains(o)||t&&e.contains(t))}class Ya{static fromUser(e,t){return!e||typeof e!="object"?new Ya(t.kind,t.apply,!1):new Ya(Ya.getKindFromUser(e,t.kind),Ya.getApplyFromUser(e,t.apply),Ya.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 Pe(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}}class Cge{constructor(e,t,i){this.action=e,this.provider=t,this.highlightRange=i}async resolve(e){var t;if(!((t=this.provider)===null||t===void 0)&&t.resolveCodeAction&&!this.action.edit){let i;try{i=await this.provider.resolveCodeAction(this.action,e)}catch(n){Fi(n)}i&&(this.action.edit=i.edit)}return this}}const LV="editor.action.codeAction",EA="editor.action.quickFix",DV="editor.action.autoFix",xV="editor.action.refactor",kV="editor.action.sourceAction",NA="editor.action.organizeImports",TA="editor.action.fixAll";class Y_ extends V{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:Bn(e.diagnostics)?Bn(t.diagnostics)?Y_.codeActionsPreferredComparator(e,t):-1:Bn(t.diagnostics)?1:Y_.codeActionsPreferredComparator(e,t)}constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(Y_.codeActionsComparator),this.validActions=this.allActions.filter(({action:n})=>!n.disabled)}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&Pe.QuickFix.contains(new Pe(e.kind))&&!!e.isPreferred)}get hasAIFix(){return this.validActions.some(({action:e})=>!!e.isAI)}get allAIFixes(){return this.validActions.every(({action:e})=>!!e.isAI)}}const h3={actions:[],documentation:void 0};async function X_(o,e,t,i,n,s){var r;const a=i.filter||{},l={...a,excludes:[...a.excludes||[],Pe.Notebook]},d={only:(r=a.include)===null||r===void 0?void 0:r.value,trigger:i.type},c=new CA(e,s),h=i.type===2,u=wge(o,e,h?l:a),g=new X,f=u.map(async _=>{try{n.report(_);const v=await _.provideCodeActions(e,t,d,c.token);if(v&&g.add(v),c.token.isCancellationRequested)return h3;const b=((v==null?void 0:v.actions)||[]).filter(w=>w&&bge(a,w)),C=yge(_,b,a.include);return{actions:b.map(w=>new Cge(w,_)),documentation:C}}catch(v){if(_a(v))throw v;return Fi(v),h3}}),p=o.onDidChange(()=>{const _=o.all(e);ri(_,u)||c.cancel()});try{const _=await Promise.all(f),v=_.map(C=>C.actions).flat(),b=[...oa(_.map(C=>C.documentation)),...Sge(o,e,i,v)];return new Y_(v,b,g)}finally{p.dispose(),c.dispose()}}function wge(o,e,t){return o.all(e).filter(i=>i.providedCodeActionKinds?i.providedCodeActionKinds.some(n=>vge(t,new Pe(n))):!0)}function*Sge(o,e,t,i){var n,s,r;if(e&&i.length)for(const a of o.all(e))a._getAdditionalMenuItems&&(yield*(n=a._getAdditionalMenuItems)===null||n===void 0?void 0:n.call(a,{trigger:t.type,only:(r=(s=t.filter)===null||s===void 0?void 0:s.include)===null||r===void 0?void 0:r.value},i.map(l=>l.action)))}function yge(o,e,t){if(!o.documentation)return;const i=o.documentation.map(n=>({kind:new Pe(n.kind),command:n.command}));if(t){let n;for(const s of i)s.kind.contains(t)&&(n?n.kind.contains(s.kind)&&(n=s):n=s);if(n)return n==null?void 0:n.command}for(const n of e)if(n.kind){for(const s of i)if(s.kind.contains(new Pe(n.kind)))return s.command}}var em;(function(o){o.OnSave="onSave",o.FromProblemsView="fromProblemsView",o.FromCodeActions="fromCodeActions",o.FromAILightbulb="fromAILightbulb"})(em||(em={}));async function Lge(o,e,t,i,n=st.None){var s;const r=o.get(c0),a=o.get(ai),l=o.get(Jn),d=o.get(Ri);if(l.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred,reason:t}),await e.resolve(n),!n.isCancellationRequested&&!(!((s=e.action.edit)===null||s===void 0)&&s.edits.length&&!(await r.apply(e.action.edit,{editor:i==null?void 0:i.editor,label:e.action.title,quotableLabel:e.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:t!==em.OnSave,showPreview:i==null?void 0:i.preview})).isApplied)&&e.action.command)try{await a.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(c){const h=Dge(c);d.error(typeof h=="string"?h:m("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}function Dge(o){return typeof o=="string"?o:o instanceof Error&&typeof o.message=="string"?o.message:void 0}ct.registerCommand("_executeCodeActionProvider",async function(o,e,t,i,n){if(!(e instanceof xe))throw $o();const{codeActionProvider:s}=o.get(fe),r=o.get(si).getModel(e);if(!r)throw $o();const a=_e.isISelection(t)?_e.liftSelection(t):D.isIRange(t)?r.validateRange(t):void 0;if(!a)throw $o();const l=typeof i=="string"?new Pe(i):void 0,d=await X_(s,r,a,{type:1,triggerAction:to.Default,filter:{includeSourceActions:!0,include:l}},Cd.None,st.None),c=[],h=Math.min(d.validActions.length,typeof n=="number"?n:0);for(let u=0;u<h;u++)c.push(d.validActions[u].resolve(st.None));try{return await Promise.all(c),d.validActions.map(u=>u.action)}finally{setTimeout(()=>d.dispose(),100)}});var xge=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},kge=function(o,e){return function(t,i){e(t,i,o)}},dT;let NS=dT=class{constructor(e){this.keybindingService=e}getResolver(){const e=new yl(()=>this.keybindingService.getKeybindings().filter(t=>dT.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command===NA?i={kind:Pe.SourceOrganizeImports.value}:t.command===TA&&(i={kind:Pe.SourceFixAll.value}),{resolvedKeybinding:t.resolvedKeybinding,...Ya.fromUser(i,{kind:Pe.None,apply:"never"})}}));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.value);return i==null?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new Pe(e.kind);return t.filter(n=>n.kind.contains(i)).filter(n=>n.preferred?e.isPreferred:!0).reduceRight((n,s)=>n?n.kind.contains(s.kind)?s:n:s,void 0)}};NS.codeActionCommands=[xV,LV,kV,NA,TA];NS=dT=xge([kge(0,Et)],NS);N("symbolIcon.arrayForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.booleanForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},m("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.colorForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.constantForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},m("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},m("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},m("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},m("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},m("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.fileForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.folderForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},m("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},m("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.keyForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.keywordForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},m("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.moduleForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.namespaceForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.nullForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.numberForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.objectForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.operatorForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.packageForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.propertyForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.referenceForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.snippetForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.stringForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.structForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.textForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.typeParameterForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.unitForeground",{dark:oe,light:oe,hcDark:oe,hcLight:oe},m("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));N("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},m("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));const IV=Object.freeze({kind:Pe.Empty,title:m("codeAction.widget.id.more","More Actions...")}),Ige=Object.freeze([{kind:Pe.QuickFix,title:m("codeAction.widget.id.quickfix","Quick Fix")},{kind:Pe.RefactorExtract,title:m("codeAction.widget.id.extract","Extract"),icon:re.wrench},{kind:Pe.RefactorInline,title:m("codeAction.widget.id.inline","Inline"),icon:re.wrench},{kind:Pe.RefactorRewrite,title:m("codeAction.widget.id.convert","Rewrite"),icon:re.wrench},{kind:Pe.RefactorMove,title:m("codeAction.widget.id.move","Move"),icon:re.wrench},{kind:Pe.SurroundWith,title:m("codeAction.widget.id.surround","Surround With"),icon:re.surroundWith},{kind:Pe.Source,title:m("codeAction.widget.id.source","Source Action"),icon:re.symbolFile},IV]);function Ege(o,e,t){if(!e)return o.map(s=>{var r;return{kind:"action",item:s,group:IV,disabled:!!s.action.disabled,label:s.action.disabled||s.action.title,canPreview:!!(!((r=s.action.edit)===null||r===void 0)&&r.edits.length)}});const i=Ige.map(s=>({group:s,actions:[]}));for(const s of o){const r=s.action.kind?new Pe(s.action.kind):Pe.None;for(const a of i)if(a.group.kind.contains(r)){a.actions.push(s);break}}const n=[];for(const s of i)if(s.actions.length){n.push({kind:"header",group:s.group});for(const r of s.actions){const a=s.group;n.push({kind:"action",item:r,group:r.action.isAI?{title:a.title,kind:a.kind,icon:re.sparkle}:a,label:r.action.title,disabled:!!r.action.disabled,keybinding:t(r.action)})}}return n}var Nge=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},u3=function(o,e){return function(t,i){e(t,i,o)}},cT,xf;(function(o){o.Hidden={type:0};class e{constructor(i,n,s,r){this.actions=i,this.trigger=n,this.editorPosition=s,this.widgetPosition=r,this.type=1}}o.Showing=e})(xf||(xf={}));let tg=cT=class extends V{constructor(e,t,i){super(),this._editor=e,this._keybindingService=t,this._onClick=this._register(new O),this.onClick=this._onClick.event,this._state=xf.Hidden,this._iconClasses=[],this._domNode=J("div.lightBulbWidget"),this._register(Ft.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{const s=this._editor.getModel();(this.state.type!==1||!s||this.state.editorPosition.lineNumber>=s.getLineCount())&&this.hide()})),this._register(gK(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();const{top:s,height:r}=Mi(this._domNode),a=this._editor.getOption(67);let l=Math.floor(a/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(l+=a),this._onClick.fire({x:n.posx,y:s+r+l,actions:this.state.actions,trigger:this.state.trigger})})),this._register($(this._domNode,"mouseenter",n=>{(n.buttons&1)===1&&this.hide()})),this._register(ae.runAndSubscribe(this._keybindingService.onDidUpdateKeybindings,()=>{var n,s,r,a;this._preferredKbLabel=(s=(n=this._keybindingService.lookupKeybinding(DV))===null||n===void 0?void 0:n.getLabel())!==null&&s!==void 0?s:void 0,this._quickFixKbLabel=(a=(r=this._keybindingService.lookupKeybinding(EA))===null||r===void 0?void 0:r.getLabel())!==null&&a!==void 0?a:void 0,this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();if(!this._editor.getOptions().get(65).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:r,column:a}=s.validatePosition(i),l=s.getOptions().tabSize,d=this._editor.getOptions().get(50),c=s.getLineContent(r),h=Oy(c,l),u=d.spaceWidth*h>22,g=_=>_>2&&this._editor.getTopForLineNumber(_)===this._editor.getTopForLineNumber(_-1);let f=r,p=1;if(!u){if(r>1&&!g(r-1))f-=1;else if(r<s.getLineCount()&&!g(r+1))f+=1;else if(a*d.spaceWidth<22)return this.hide();p=/^\S\s*$/.test(s.getLineContent(f))?2:1}this.state=new xf.Showing(e,t,i,{position:{lineNumber:f,column:p},preference:cT._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==xf.Hidden&&(this.state=xf.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this._domNode.classList.remove(...this._iconClasses),this._iconClasses=[],this.state.type!==1)return;let e,t=!1;this.state.actions.allAIFixes?(e=re.sparkleFilled,this.state.actions.validActions.length===1&&(t=!0)):this.state.actions.hasAutoFix?this.state.actions.hasAIFix?e=re.lightbulbSparkleAutofix:e=re.lightbulbAutofix:this.state.actions.hasAIFix?e=re.lightbulbSparkle:e=re.lightBulb,this._updateLightbulbTitle(this.state.actions.hasAutoFix,t),this._iconClasses=Ne.asClassNameArray(e),this._domNode.classList.add(...this._iconClasses)}_updateLightbulbTitle(e,t){this.state.type===1&&(t?this.title=m("codeActionAutoRun","Run: {0}",this.state.actions.validActions[0].action.title):e&&this._preferredKbLabel?this.title=m("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",this._preferredKbLabel):!e&&this._quickFixKbLabel?this.title=m("codeActionWithKb","Show Code Actions ({0})",this._quickFixKbLabel):e||(this.title=m("codeAction","Show Code Actions")))}set title(e){this._domNode.title=e}};tg.ID="editor.contrib.lightbulbWidget";tg._posPref=[0];tg=cT=Nge([u3(1,Et),u3(2,ai)],tg);var EV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hT=function(o,e){return function(t,i){e(t,i,o)}};const NV="acceptSelectedCodeAction",TV="previewSelectedCodeAction";class Tge{get templateId(){return"header"}renderTemplate(e){e.classList.add("group-header");const t=document.createElement("span");return e.append(t),{container:e,text:t}}renderElement(e,t,i){var n,s;i.text.textContent=(s=(n=e.group)===null||n===void 0?void 0:n.title)!==null&&s!==void 0?s:""}disposeTemplate(e){}}let uT=class{get templateId(){return"action"}constructor(e,t){this._supportsPreview=e,this._keybindingService=t}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 n=new ap(e,qs);return{container:e,icon:t,text:i,keybinding:n}}renderElement(e,t,i){var n,s,r;if(!((n=e.group)===null||n===void 0)&&n.icon?(i.icon.className=Ne.asClassName(e.group.icon),e.group.icon.color&&(i.icon.style.color=ce(e.group.icon.color.id))):(i.icon.className=Ne.asClassName(re.lightBulb),i.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!e.item||!e.label)return;i.text.textContent=MV(e.label),i.keybinding.set(e.keybinding),IK(!!e.keybinding,i.keybinding.element);const a=(s=this._keybindingService.lookupKeybinding(NV))===null||s===void 0?void 0:s.getLabel(),l=(r=this._keybindingService.lookupKeybinding(TV))===null||r===void 0?void 0:r.getLabel();i.container.classList.toggle("option-disabled",e.disabled),e.disabled?i.container.title=e.label:a&&l?this._supportsPreview&&e.canPreview?i.container.title=m({key:"label-preview",comment:['placeholders are keybindings, e.g "F2 to apply, Shift+F2 to preview"']},"{0} to apply, {1} to preview",a,l):i.container.title=m({key:"label",comment:['placeholder is a keybinding, e.g "F2 to apply"']},"{0} to apply",a):i.container.title=""}disposeTemplate(e){}};uT=EV([hT(1,Et)],uT);class Mge extends UIEvent{constructor(){super("acceptSelectedAction")}}class g3 extends UIEvent{constructor(){super("previewSelectedAction")}}function Rge(o){if(o.kind==="action")return o.label}let gT=class extends V{constructor(e,t,i,n,s,r){super(),this._delegate=n,this._contextViewService=s,this._keybindingService=r,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new _i),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const a={getHeight:l=>l.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:l=>l.kind};this._list=this._register(new No(e,this.domNode,a,[new uT(t,this._keybindingService),new Tge],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:Rge},accessibilityProvider:{getAriaLabel:l=>{if(l.kind==="action"){let d=l.label?MV(l==null?void 0:l.label):"";return l.disabled&&(d=m({key:"customQuickFixWidget.labels",comment:["Action widget labels for accessibility."]},"{0}, Disabled Reason: {1}",d,l.disabled)),d}return null},getWidgetAriaLabel:()=>m({key:"customQuickFixWidget",comment:["An action widget option"]},"Action Widget"),getRole:l=>l.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(kh),this._register(this._list.onMouseClick(l=>this.onListClick(l))),this._register(this._list.onMouseOver(l=>this.onListHover(l))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(l=>this.onListSelection(l))),this._allMenuItems=i,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(e){return!e.disabled&&e.kind==="action"}hide(e){this._delegate.onHide(e),this.cts.cancel(),this._contextViewService.hideContextView()}layout(e){const t=this._allMenuItems.filter(l=>l.kind==="header").length,n=this._allMenuItems.length*this._actionLineHeight+t*this._headerLineHeight-t*this._actionLineHeight;this._list.layout(n);let s=e;if(this._allMenuItems.length>=50)s=380;else{const l=this._allMenuItems.map((d,c)=>{const h=this.domNode.ownerDocument.getElementById(this._list.getElementID(c));if(h){h.style.width="auto";const u=h.getBoundingClientRect().width;return h.style.width="",u}return 0});s=Math.max(...l,e)}const a=Math.min(n,this.domNode.ownerDocument.body.clientHeight*.7);return this._list.layout(a,s),this.domNode.style.height=`${a}px`,this._list.domFocus(),s}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(e){const t=this._list.getFocus();if(t.length===0)return;const i=t[0],n=this._list.element(i);if(!this.focusCondition(n))return;const s=e?new g3:new Mge;this._list.setSelection([i],s)}onListSelection(e){if(!e.elements.length)return;const t=e.elements[0];t.item&&this.focusCondition(t)?this._delegate.onSelect(t.item,e.browserEvent instanceof g3):this._list.setSelection([])}onFocus(){var e,t;const i=this._list.getFocus();if(i.length===0)return;const n=i[0],s=this._list.element(n);(t=(e=this._delegate).onFocus)===null||t===void 0||t.call(e,s.item)}async onListHover(e){const t=e.element;if(t&&t.item&&this.focusCondition(t)){if(this._delegate.onHover&&!t.disabled&&t.kind==="action"){const i=await this._delegate.onHover(t.item,this.cts.token);t.canPreview=i?i.canPreview:void 0}e.index&&this._list.splice(e.index,1,[t])}this._list.setFocus(typeof e.index=="number"?[e.index]:[])}onListClick(e){e.element&&this.focusCondition(e.element)&&this._list.setFocus([])}};gT=EV([hT(4,kl),hT(5,Et)],gT);function MV(o){return o.replace(/\r\n|\r|\n/g," ")}var Age=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Qx=function(o,e){return function(t,i){e(t,i,o)}};N("actionBar.toggledBackground",{dark:mu,light:mu,hcDark:mu,hcLight:mu},m("actionBar.toggledBackground","Background color for toggled action items in action bar."));const ig={Visible:new de("codeActionMenuVisible",!1,m("codeActionMenuVisible","Whether the action widget list is visible"))},Lg=ot("actionWidgetService");let ng=class extends V{get isVisible(){return ig.Visible.getValue(this._contextKeyService)||!1}constructor(e,t,i){super(),this._contextViewService=e,this._contextKeyService=t,this._instantiationService=i,this._list=this._register(new hn)}show(e,t,i,n,s,r,a){const l=ig.Visible.bindTo(this._contextKeyService),d=this._instantiationService.createInstance(gT,e,t,i,n);this._contextViewService.showContextView({getAnchor:()=>s,render:c=>(l.set(!0),this._renderWidget(c,d,a??[])),onHide:c=>{l.reset(),this._onWidgetClosed(c)}},r,!1)}acceptSelected(e){var t;(t=this._list.value)===null||t===void 0||t.acceptSelected(e)}focusPrevious(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusPrevious()}focusNext(){var e,t;(t=(e=this._list)===null||e===void 0?void 0:e.value)===null||t===void 0||t.focusNext()}hide(){var e;(e=this._list.value)===null||e===void 0||e.hide(),this._list.clear()}_renderWidget(e,t,i){var n;const s=document.createElement("div");if(s.classList.add("action-widget"),e.appendChild(s),this._list.value=t,this._list.value)s.appendChild(this._list.value.domNode);else throw new Error("List has no value");const r=new X,a=document.createElement("div"),l=e.appendChild(a);l.classList.add("context-view-block"),r.add($(l,se.MOUSE_DOWN,f=>f.stopPropagation()));const d=document.createElement("div"),c=e.appendChild(d);c.classList.add("context-view-pointerBlock"),r.add($(c,se.POINTER_MOVE,()=>c.remove())),r.add($(c,se.MOUSE_DOWN,()=>c.remove()));let h=0;if(i.length){const f=this._createActionBar(".action-widget-action-bar",i);f&&(s.appendChild(f.getContainer().parentElement),r.add(f),h=f.getContainer().offsetWidth)}const u=(n=this._list.value)===null||n===void 0?void 0:n.layout(h);s.style.width=`${u}px`;const g=r.add(la(e));return r.add(g.onDidBlur(()=>this.hide())),r}_createActionBar(e,t){if(!t.length)return;const i=J(e),n=new Yo(i);return n.push(t,{icon:!1,label:!0}),n}_onWidgetClosed(e){var t;(t=this._list.value)===null||t===void 0||t.hide(e)}};ng=Age([Qx(0,kl),Qx(1,Ae),Qx(2,Ie)],ng);ht(Lg,ng,1);const L0=1100;Wt(class extends Vs{constructor(){super({id:"hideCodeActionWidget",title:mt("hideCodeActionWidget.title","Hide action widget"),precondition:ig.Visible,keybinding:{weight:L0,primary:9,secondary:[1033]}})}run(o){o.get(Lg).hide()}});Wt(class extends Vs{constructor(){super({id:"selectPrevCodeAction",title:mt("selectPrevCodeAction.title","Select previous action"),precondition:ig.Visible,keybinding:{weight:L0,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(o){const e=o.get(Lg);e instanceof ng&&e.focusPrevious()}});Wt(class extends Vs{constructor(){super({id:"selectNextCodeAction",title:mt("selectNextCodeAction.title","Select next action"),precondition:ig.Visible,keybinding:{weight:L0,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(o){const e=o.get(Lg);e instanceof ng&&e.focusNext()}});Wt(class extends Vs{constructor(){super({id:NV,title:mt("acceptSelected.title","Accept selected action"),precondition:ig.Visible,keybinding:{weight:L0,primary:3,secondary:[2137]}})}run(o){const e=o.get(Lg);e instanceof ng&&e.acceptSelected()}});Wt(class extends Vs{constructor(){super({id:TV,title:mt("previewSelected.title","Preview selected action"),precondition:ig.Visible,keybinding:{weight:L0,primary:2051}})}run(o){const e=o.get(Lg);e instanceof ng&&e.acceptSelected(!0)}});const RV=new de("supportedCodeAction",""),f3="_typescript.applyFixAllCodeAction";class Pge extends V{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new Dr),this._register(this._markerService.onMarkerChanged(s=>this._onMarkerChanges(s))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);this._signalChange(t?{trigger:e,selection:t}:void 0)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some(i=>a2(i,t.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:to.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getSelection();if(e.type===1)return t;const i=this._editor.getOption(65).enabled;if(i!==hr.Off){{if(i===hr.On)return t;if(i===hr.OnCode){if(!t.isEmpty())return t;const s=this._editor.getModel(),{lineNumber:r,column:a}=t.getPosition(),l=s.getLineContent(r);if(l.length===0)return;if(a===1){if(/\s/.test(l[0]))return}else if(a===s.getLineMaxColumn(r)){if(/\s/.test(l[l.length-1]))return}else if(/\s/.test(l[a-2])&&/\s/.test(l[a-1]))return}}return t}}}var uu;(function(o){o.Empty={type:0};class e{constructor(i,n,s){this.trigger=i,this.position=n,this._cancellablePromise=s,this.type=1,this.actions=s.catch(r=>{if(_a(r))return AV;throw r})}cancel(){this._cancellablePromise.cancel()}}o.Triggered=e})(uu||(uu={}));const AV=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1,hasAIFix:!1,allAIFixes:!1});class Oge extends V{constructor(e,t,i,n,s,r){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=s,this._configurationService=r,this._codeActionOracle=this._register(new hn),this._state=uu.Empty,this._onDidChangeState=this._register(new O),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=RV.bindTo(n),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(a=>{a.hasChanged(65)&&this._update()})),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(uu.Empty,!0))}_settingEnabledNearbyQuickfixes(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickFixes",{resource:t==null?void 0:t.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(uu.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(91)){const t=this._registry.all(e).flatMap(i=>{var n;return(n=i.providedCodeActionKinds)!==null&&n!==void 0?n:[]});this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new Pge(this._editor,this._markerService,i=>{var n;if(!i){this.setState(uu.Empty);return}const s=i.selection.getStartPosition(),r=tn(async a=>{var l,d,c,h,u,g,f,p,_,v;if(this._settingEnabledNearbyQuickfixes()&&i.trigger.type===1&&(i.trigger.triggerAction===to.QuickFix||!((d=(l=i.trigger.filter)===null||l===void 0?void 0:l.include)===null||d===void 0)&&d.contains(Pe.QuickFix))){const b=await X_(this._registry,e,i.selection,i.trigger,Cd.None,a),C=[...b.allActions];if(a.isCancellationRequested)return AV;const w=(c=b.validActions)===null||c===void 0?void 0:c.some(L=>L.action.kind?Pe.QuickFix.contains(new Pe(L.action.kind)):!1),S=this._markerService.read({resource:e.uri});if(w){for(const L of b.validActions)!((u=(h=L.action.command)===null||h===void 0?void 0:h.arguments)===null||u===void 0)&&u.some(x=>typeof x=="string"&&x.includes(f3))&&(L.action.diagnostics=[...S.filter(x=>x.relatedInformation)]);return{validActions:b.validActions,allActions:C,documentation:b.documentation,hasAutoFix:b.hasAutoFix,hasAIFix:b.hasAIFix,allAIFixes:b.allAIFixes,dispose:()=>{b.dispose()}}}else if(!w&&S.length>0){const L=i.selection.getPosition();let x=L,I=Number.MAX_VALUE;const T=[...b.validActions];for(const P of S){const A=P.endColumn,B=P.endLineNumber,Z=P.startLineNumber;if(B===L.lineNumber||Z===L.lineNumber){x=new F(B,A);const ne={type:i.trigger.type,triggerAction:i.trigger.triggerAction,filter:{include:!((g=i.trigger.filter)===null||g===void 0)&&g.include?(f=i.trigger.filter)===null||f===void 0?void 0:f.include:Pe.QuickFix},autoApply:i.trigger.autoApply,context:{notAvailableMessage:((p=i.trigger.context)===null||p===void 0?void 0:p.notAvailableMessage)||"",position:x}},pe=new _e(x.lineNumber,x.column,x.lineNumber,x.column),Se=await X_(this._registry,e,pe,ne,Cd.None,a);if(Se.validActions.length!==0){for(const Me of Se.validActions)!((v=(_=Me.action.command)===null||_===void 0?void 0:_.arguments)===null||v===void 0)&&v.some(me=>typeof me=="string"&&me.includes(f3))&&(Me.action.diagnostics=[...S.filter(me=>me.relatedInformation)]);b.allActions.length===0&&C.push(...Se.allActions),Math.abs(L.column-A)<I?T.unshift(...Se.validActions):T.push(...Se.validActions)}I=Math.abs(L.column-A)}}const H=T.filter((P,A,B)=>B.findIndex(Z=>Z.action.title===P.action.title)===A);return H.sort((P,A)=>P.action.isPreferred&&!A.action.isPreferred?-1:!P.action.isPreferred&&A.action.isPreferred||P.action.isAI&&!A.action.isAI?1:!P.action.isAI&&A.action.isAI?-1:0),{validActions:H,allActions:C,documentation:b.documentation,hasAutoFix:b.hasAutoFix,hasAIFix:b.hasAIFix,allAIFixes:b.allAIFixes,dispose:()=>{b.dispose()}}}}return X_(this._registry,e,i.selection,i.trigger,Cd.None,a)});i.trigger.type===1&&((n=this._progressService)===null||n===void 0||n.showWhile(r,250)),this.setState(new uu.Triggered(i.trigger,s,r))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:to.Default})}else this._supportedCodeActions.reset()}trigger(e){var t;(t=this._codeActionOracle.value)===null||t===void 0||t.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!this._disposed&&this._onDidChangeState.fire(e))}}var Fge=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Al=function(o,e){return function(t,i){e(t,i,o)}},ef;const Bge="quickfix-edit-highlight";let rh=ef=class extends V{static get(e){return e.getContribution(ef.ID)}constructor(e,t,i,n,s,r,a,l,d,c){super(),this._commandService=a,this._configurationService=l,this._actionWidgetService=d,this._instantiationService=c,this._activeCodeActions=this._register(new hn),this._showDisabled=!1,this._disposed=!1,this._editor=e,this._model=this._register(new Oge(this._editor,s.codeActionProvider,t,i,r,l)),this._register(this._model.onDidChangeState(h=>this.update(h))),this._lightBulbWidget=new yl(()=>{const h=this._editor.getContribution(tg.ID);return h&&this._register(h.onClick(u=>this.showCodeActionsFromLightbulb(u.actions,u))),h}),this._resolver=n.createInstance(NS),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],n=i.action.command;n&&n.id==="inlineChat.start"&&n.arguments&&n.arguments.length>=1&&(n.arguments[0]={...n.arguments[0],autoSend:!1}),await this._applyCodeAction(i,!1,!1,em.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,n){var s;if(!this._editor.hasModel())return;(s=bs.get(this._editor))===null||s===void 0||s.closeMessage();const r=this._editor.getPosition();this._trigger({type:1,triggerAction:t,filter:i,autoApply:n,context:{notAvailableMessage:e,position:r}})}_trigger(e){return this._model.trigger(e)}async _applyCodeAction(e,t,i,n){try{await this._instantiationService.invokeFunction(Lge,e,n,{preview:i,editor:this._editor})}finally{t&&this._trigger({type:2,triggerAction:to.QuickFix,filter:{}})}}async update(e){var t,i,n,s,r,a,l;if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let d;try{d=await e.actions}catch(c){Ve(c);return}if(!this._disposed)if((i=this._lightBulbWidget.value)===null||i===void 0||i.update(d,e.trigger,e.position),e.trigger.type===1){if(!((n=e.trigger.filter)===null||n===void 0)&&n.include){const h=this.tryGetValidActionToApply(e.trigger,d);if(h){try{(s=this._lightBulbWidget.value)===null||s===void 0||s.hide(),await this._applyCodeAction(h,!1,!1,em.FromCodeActions)}finally{d.dispose()}return}if(e.trigger.context){const u=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,d);if(u&&u.action.disabled){(r=bs.get(this._editor))===null||r===void 0||r.showMessage(u.action.disabled,e.trigger.context.position),d.dispose();return}}}const c=!!(!((a=e.trigger.filter)===null||a===void 0)&&a.include);if(e.trigger.context&&(!d.allActions.length||!c&&!d.validActions.length)){(l=bs.get(this._editor))===null||l===void 0||l.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=d,d.dispose();return}this._activeCodeActions.value=d,this.showCodeActionList(d,this.toCoords(e.position),{includeDisabledActions:c,fromLightbulb:!1})}else this._actionWidgetService.isVisible?d.dispose():this._activeCodeActions.value=d}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]}async showCodeActionList(e,t,i){const n=this._editor.createDecorationsCollection(),s=this._editor.getDomNode();if(!s)return;const r=i.includeDisabledActions&&(this._showDisabled||e.validActions.length===0)?e.allActions:e.validActions;if(!r.length)return;const a=F.isIPosition(t)?this.toCoords(t):t,l={onSelect:async(d,c)=>{this._applyCodeAction(d,!0,!!c,em.FromCodeActions),this._actionWidgetService.hide(),n.clear()},onHide:()=>{var d;(d=this._editor)===null||d===void 0||d.focus(),n.clear()},onHover:async(d,c)=>{var h;if(!c.isCancellationRequested)return{canPreview:!!(!((h=d.action.edit)===null||h===void 0)&&h.edits.length)}},onFocus:d=>{var c,h;if(d&&d.action){const u=d.action.ranges,g=d.action.diagnostics;if(n.clear(),u&&u.length>0){const f=g&&(g==null?void 0:g.length)>1?g.map(p=>({range:p,options:ef.DECORATION})):u.map(p=>({range:p,options:ef.DECORATION}));n.set(f)}else if(g&&g.length>0){const f=g.map(_=>({range:_,options:ef.DECORATION}));n.set(f);const p=g[0];if(p.startLineNumber&&p.startColumn){const _=(h=(c=this._editor.getModel())===null||c===void 0?void 0:c.getWordAtPosition({lineNumber:p.startLineNumber,column:p.startColumn}))===null||h===void 0?void 0:h.word;gl(m("editingNewSelection","Context: {0} at line {1} and column {2}.",_,p.startLineNumber,p.startColumn))}}}else n.clear()}};this._actionWidgetService.show("codeActionWidget",!0,Ege(r,this._shouldShowHeaders(),this._resolver.getResolver()),l,a,s,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=Mi(this._editor.getDomNode()),n=i.left+t.left,s=i.top+t.top+t.height;return{x:n,y:s}}_shouldShowHeaders(){var e;const t=(e=this._editor)===null||e===void 0?void 0:e.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:t==null?void 0:t.uri})}_getActionBarActions(e,t,i){if(i.fromLightbulb)return[];const n=e.documentation.map(s=>{var r;return{id:s.id,label:s.title,tooltip:(r=s.tooltip)!==null&&r!==void 0?r:"",class:void 0,enabled:!0,run:()=>{var a;return this._commandService.executeCommand(s.id,...(a=s.arguments)!==null&&a!==void 0?a:[])}}});return i.includeDisabledActions&&e.validActions.length>0&&e.allActions.length!==e.validActions.length&&n.push(this._showDisabled?{id:"hideMoreActions",label:m("hideMoreActions","Hide Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(e,t,i))}:{id:"showMoreActions",label:m("showMoreActions","Show Disabled"),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(e,t,i))}),n}};rh.ID="editor.contrib.codeActionController";rh.DECORATION=ze.register({description:"quickfix-highlight",className:Bge});rh=ef=Fge([Al(1,Il),Al(2,Ae),Al(3,Ie),Al(4,fe),Al(5,Dh),Al(6,ai),Al(7,Qe),Al(8,Lg),Al(9,Ie)],rh);Qo((o,e)=>{((n,s)=>{s&&e.addRule(`.monaco-editor ${n} { background-color: ${s}; }`)})(".quickfix-edit-highlight",o.getColor(ad));const i=o.getColor(mc);i&&e.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${na(o.type)?"dotted":"solid"} ${i}; box-sizing: border-box; }`)});function D0(o){return q.regex(RV.keys()[0],new RegExp("(\\s|^)"+So(o.value)+"\\b"))}const MA={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:m("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:m("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[m("args.schema.apply.first","Always apply the first returned code action."),m("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),m("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:m("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};function Dg(o,e,t,i,n=to.Default){if(o.hasModel()){const s=rh.get(o);s==null||s.manualTriggerAtCurrentPosition(e,n,t,i)}}class Wge extends he{constructor(){super({id:EA,label:m("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:q.and(E.writable,E.hasCodeActionsProvider),kbOpts:{kbExpr:E.textInputFocus,primary:2137,weight:100}})}run(e,t){return Dg(t,m("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0,to.QuickFix)}}class Vge extends un{constructor(){super({id:LV,precondition:q.and(E.writable,E.hasCodeActionsProvider),metadata:{description:"Trigger a code action",args:[{name:"args",schema:MA}]}})}runEditorCommand(e,t,i){const n=Ya.fromUser(i,{kind:Pe.Empty,apply:"ifSingle"});return Dg(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?m("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):m("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?m("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):m("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class Hge extends he{constructor(){super({id:xV,label:m("refactor.label","Refactor..."),alias:"Refactor...",precondition:q.and(E.writable,E.hasCodeActionsProvider),kbOpts:{kbExpr:E.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:q.and(E.writable,D0(Pe.Refactor))},metadata:{description:"Refactor...",args:[{name:"args",schema:MA}]}})}run(e,t,i){const n=Ya.fromUser(i,{kind:Pe.Refactor,apply:"never"});return Dg(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?m("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):m("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?m("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):m("editor.action.refactor.noneMessage","No refactorings available"),{include:Pe.Refactor.contains(n.kind)?n.kind:Pe.None,onlyIncludePreferredActions:n.preferred},n.apply,to.Refactor)}}class zge extends he{constructor(){super({id:kV,label:m("source.label","Source Action..."),alias:"Source Action...",precondition:q.and(E.writable,E.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:q.and(E.writable,D0(Pe.Source))},metadata:{description:"Source Action...",args:[{name:"args",schema:MA}]}})}run(e,t,i){const n=Ya.fromUser(i,{kind:Pe.Source,apply:"never"});return Dg(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?m("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):m("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?m("editor.action.source.noneMessage.preferred","No preferred source actions available"):m("editor.action.source.noneMessage","No source actions available"),{include:Pe.Source.contains(n.kind)?n.kind:Pe.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply,to.SourceAction)}}class Uge extends he{constructor(){super({id:NA,label:m("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:q.and(E.writable,D0(Pe.SourceOrganizeImports)),kbOpts:{kbExpr:E.textInputFocus,primary:1581,weight:100}})}run(e,t){return Dg(t,m("editor.action.organize.noneMessage","No organize imports action available"),{include:Pe.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",to.OrganizeImports)}}class $ge extends he{constructor(){super({id:TA,label:m("fixAll.label","Fix All"),alias:"Fix All",precondition:q.and(E.writable,D0(Pe.SourceFixAll))})}run(e,t){return Dg(t,m("fixAll.noneMessage","No fix all action available"),{include:Pe.SourceFixAll,includeSourceActions:!0},"ifSingle",to.FixAll)}}class jge extends he{constructor(){super({id:DV,label:m("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:q.and(E.writable,D0(Pe.QuickFix)),kbOpts:{kbExpr:E.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(e,t){return Dg(t,m("editor.action.autoFix.noneMessage","No auto fixes available"),{include:Pe.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",to.AutoFix)}}vt(rh.ID,rh,3);vt(tg.ID,tg,4);Q(Wge);Q(Hge);Q(zge);Q(Uge);Q(jge);Q($ge);le(new Vge);li.as(ba.Configuration).registerConfiguration({...Ky,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:m("showCodeActionHeaders","Enable/disable showing group headers in the Code Action menu."),default:!0}}});li.as(ba.Configuration).registerConfiguration({...Ky,properties:{"editor.codeActionWidget.includeNearbyQuickFixes":{type:"boolean",scope:5,description:m("includeNearbyQuickFixes","Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."),default:!0}}});class fT{constructor(){this.lenses=[],this._disposables=new X}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}async function PV(o,e,t){const i=o.ordered(e),n=new Map,s=new fT,r=i.map(async(a,l)=>{n.set(a,l);try{const d=await Promise.resolve(a.provideCodeLenses(e,t));d&&s.add(d,a)}catch(d){Fi(d)}});return await Promise.all(r),s.lenses=s.lenses.sort((a,l)=>a.symbol.range.startLineNumber<l.symbol.range.startLineNumber?-1:a.symbol.range.startLineNumber>l.symbol.range.startLineNumber?1:n.get(a.provider)<n.get(l.provider)?-1:n.get(a.provider)>n.get(l.provider)?1:a.symbol.range.startColumn<l.symbol.range.startColumn?-1:a.symbol.range.startColumn>l.symbol.range.startColumn?1:0),s}ct.registerCommand("_executeCodeLensProvider",function(o,...e){let[t,i]=e;wt(xe.isUri(t)),wt(typeof i=="number"||!i);const{codeLensProvider:n}=o.get(fe),s=o.get(si).getModel(t);if(!s)throw $o();const r=[],a=new X;return PV(n,s,st.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(s,c.symbol,st.None)).then(h=>r.push(h||c.symbol)));return Promise.all(d)}).then(()=>r).finally(()=>{setTimeout(()=>a.dispose(),100)})});var Kge=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qge=function(o,e){return function(t,i){e(t,i,o)}};const OV=ot("ICodeLensCache");class m3{constructor(e,t){this.lineCount=e,this.data=t}}let mT=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Sh(20,.75);const t="codelens/cache";e_(Tt,()=>e.remove(t,1));const i="codelens/cache2",n=e.get(i,1,"{}");this._deserialize(n),ae.once(e.onWillSaveState)(s=>{s.reason===Yv.SHUTDOWN&&e.store(i,this._serialize(),1,1)})}put(e,t){const i=t.lenses.map(r=>{var a;return{range:r.symbol.range,command:r.symbol.command&&{id:"",title:(a=r.symbol.command)===null||a===void 0?void 0:a.title}}}),n=new fT;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const s=new m3(e.getLineCount(),n);this._cache.set(e.uri.toString(),s)}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 n=new Set;for(const s of i.data.lenses)n.add(s.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const i in t){const n=t[i],s=[];for(const a of n.lines)s.push({range:new D(a,1,a,11)});const r=new fT;r.add({lenses:s,dispose(){}},this._fakeProvider),this._cache.set(i,new m3(n.lineCount,r))}}catch{}}};mT=Kge([qge(0,kr)],mT);ht(OV,mT,1);class Gge{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class pb{constructor(e,t){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${pb._idPool++}`,this.updatePosition(t),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(e,t){this._commands.clear();const i=[];let n=!1;for(let s=0;s<e.length;s++){const r=e[s];if(r&&(n=!0,r.command)){const a=Mc(r.command.title.trim());if(r.command.id){const l=`c${pb._idPool++}`;i.push(J("a",{id:l,title:r.command.tooltip,role:"button"},...a)),this._commands.set(l,r.command)}else i.push(J("span",{title:r.command.tooltip},...a));s+1<e.length&&i.push(J("span",void 0," | "))}}n?(Tn(this._domNode,...i),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):Tn(this._domNode,J("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}}pb._idPool=0;class Jx{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)}removeDecoration(e){this._removeDecorations.push(e)}commit(e){const t=e.deltaDecorations(this._removeDecorations,this._addDecorations);for(let i=0,n=t.length;i<n;i++)this._addDecorationsCallbacks[i](t[i])}}const p3=ze.register({collapseOnReplaceEdit:!0,description:"codelens"});class _3{constructor(e,t,i,n,s,r){this._isDisposed=!1,this._editor=t,this._data=e,this._decorationIds=[];let a;const l=[];this._data.forEach((d,c)=>{d.symbol.command&&l.push(d.symbol),i.addDecoration({range:d.symbol.range,options:p3},h=>this._decorationIds[c]=h),a?a=D.plusRange(a,d.symbol.range):a=D.lift(d.symbol.range)}),this._viewZone=new Gge(a.startLineNumber-1,s,r),this._viewZoneId=n.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new pb(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t==null||t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!!(i&&D.isEmpty(n.range)===i.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((i,n)=>{t.addDecoration({range:i.symbol.range,options:p3},s=>this._decorationIds[n]=s)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;t<this._decorationIds.length;t++){const i=e.getDecorationRange(this._decorationIds[t]);i&&(this._data[t].symbol.range=i)}return this._data}updateCommands(e){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(e,!0);for(let t=0;t<this._data.length;t++){const i=e[t];if(i){const{symbol:n}=this._data[t];n.command=i.command||n.command}}}getCommand(e){var t;return(t=this._contentWidget)===null||t===void 0?void 0:t.getCommand(e)}getLineNumber(){const e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1}update(e){if(this.isValid()){const t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);t&&(this._viewZone.afterLineNumber=t.startLineNumber-1,e.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(t.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}}var Zge=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},$p=function(o,e){return function(t,i){e(t,i,o)}};let Fm=class{constructor(e,t,i,n,s,r){this._editor=e,this._languageFeaturesService=t,this._commandService=n,this._notificationService=s,this._codeLensCache=r,this._disposables=new X,this._localToDispose=new X,this._lenses=[],this._oldCodeLensModels=new X,this._provideCodeLensDebounce=i.for(t.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=i.for(t.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new Rt(()=>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(50)||a.hasChanged(19)||a.hasChanged(18))&&this._updateLensStyle(),a.hasChanged(17)&&this._onModelChange()})),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose()}_getLayoutInfo(){const e=Math.max(1.3,this._editor.getOption(67)/this._editor.getOption(52));let t=this._editor.getOption(19);return(!t||t<5)&&(t=this._editor.getOption(52)*.9|0),{fontSize:t,codeLensHeight:t*e|0}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(18),n=this._editor.getOption(50),{style:s}=this._editor.getContainerDomNode();s.setProperty("--vscode-editorCodeLens-lineHeight",`${e}px`),s.setProperty("--vscode-editorCodeLens-fontSize",`${t}px`),s.setProperty("--vscode-editorCodeLens-fontFeatureSettings",n.fontFeatureSettings),i&&(s.setProperty("--vscode-editorCodeLens-fontFamily",i),s.setProperty("--vscode-editorCodeLens-fontFamilyDefault",As.fontFamily)),this._editor.changeViewZones(r=>{for(const a of this._lenses)a.updateHeight(e,r)})}_localDispose(){var e,t,i;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(i=this._currentCodeLensModel)===null||i===void 0||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(17)||e.isTooLargeForTokenization())return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e)){t&&Gc(()=>{const n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3,this._localToDispose);return}for(const n of this._languageFeaturesService.codeLensProvider.all(e))if(typeof n.onDidChange=="function"){const s=n.onDidChange(()=>i.schedule());this._localToDispose.add(s)}const i=new Rt(()=>{var n;const s=Date.now();(n=this._getCodeLensModelPromise)===null||n===void 0||n.cancel(),this._getCodeLensModelPromise=tn(r=>PV(this._languageFeaturesService.codeLensProvider,e,r)),this._getCodeLensModelPromise.then(r=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=r,this._codeLensCache.put(e,r);const a=this._provideCodeLensDebounce.update(e,Date.now()-s);i.delay=a,this._renderCodeLensSymbols(r),this._resolveCodeLensesInViewportSoon()},Ve)},this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(Le(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var n;this._editor.changeDecorations(s=>{this._editor.changeViewZones(r=>{const a=[];let l=-1;this._lenses.forEach(c=>{!c.isValid()||l===c.getLineNumber()?a.push(c):(c.update(r),l=c.getLineNumber())});const d=new Jx;a.forEach(c=>{c.dispose(d,r),this._lenses.splice(this._lenses.indexOf(c),1)}),d.commit(s)})}),i.schedule(),this._resolveCodeLensesScheduler.cancel(),(n=this._resolveCodeLensesPromise)===null||n===void 0||n.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{i.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{i.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Le(()=>{if(this._editor.getModel()){const n=ma.capture(this._editor);this._editor.changeDecorations(s=>{this._editor.changeViewZones(r=>{this._disposeAllLenses(s,r)})}),n.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(n=>{if(n.target.type!==9)return;let s=n.target.element;if((s==null?void 0:s.tagName)==="SPAN"&&(s=s.parentElement),(s==null?void 0:s.tagName)==="A")for(const r of this._lenses){const a=r.getCommand(s);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),i.schedule()}_disposeAllLenses(e,t){const i=new Jx;for(const n of this._lenses)n.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 n;for(const a of e.lenses){const l=a.symbol.range.startLineNumber;l<1||l>t||(n&&n[n.length-1].symbol.range.startLineNumber===l?n.push(a):(n=[a],i.push(n)))}if(!i.length&&!this._lenses.length)return;const s=ma.capture(this._editor),r=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const d=new Jx;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 _3(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 _3(i[h],this._editor,d,l,r.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),h++;d.commit(a)})}),s.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(t);l&&(i.push(l),n.push(a))}),i.length===0)return;const s=Date.now(),r=tn(a=>{const l=i.map((d,c)=>{const h=new Array(d.length),u=d.map((g,f)=>!g.symbol.command&&typeof g.provider.resolveCodeLens=="function"?Promise.resolve(g.provider.resolveCodeLens(t,g.symbol,a)).then(p=>{h[f]=p},Fi):(h[f]=g.symbol,Promise.resolve(void 0)));return Promise.all(u).then(()=>{!a.isCancellationRequested&&!n[c].isDisposed()&&n[c].updateCommands(h)})});return Promise.all(l)});this._resolveCodeLensesPromise=r,this._resolveCodeLensesPromise.then(()=>{const a=this._resolveCodeLensesDebounce.update(t,Date.now()-s);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{Ve(a),r===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}async getModel(){var e;return await this._getCodeLensModelPromise,await this._resolveCodeLensesPromise,!((e=this._currentCodeLensModel)===null||e===void 0)&&e.isDisposed?void 0:this._currentCodeLensModel}};Fm.ID="css.editor.codeLens";Fm=Zge([$p(1,fe),$p(2,Jo),$p(3,ai),$p(4,Ri),$p(5,OV)],Fm);vt(Fm.ID,Fm,1);Q(class extends he{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:E.hasCodeLensProvider,label:m("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}async run(e,t){if(!t.hasModel())return;const i=e.get(wa),n=e.get(ai),s=e.get(Ri),r=t.getSelection().positionLineNumber,a=t.getContribution(Fm.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("placeHolder","Select a command")});if(!c)return;let h=c.command;if(l.isDisposed){const u=await a.getModel(),g=u==null?void 0:u.lenses.find(f=>{var p;return f.symbol.range.startLineNumber===r&&((p=f.symbol.command)===null||p===void 0?void 0:p.title)===h.title});if(!g||!g.symbol.command)return;h=g.symbol.command}try{await n.executeCommand(h.id,...h.arguments||[])}catch(u){s.error(u)}}});var Yge=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ek=function(o,e){return function(t,i){e(t,i,o)}};class RA{constructor(e,t){this._editorWorkerClient=new FR(e,!1,"editorWorkerService",t)}async provideDocumentColors(e,t){return this._editorWorkerClient.computeDefaultDocumentColors(e.uri)}provideColorPresentations(e,t,i){const n=t.range,s=t.color,r=s.alpha,a=new z(new ut(Math.round(255*s.red),Math.round(255*s.green),Math.round(255*s.blue),r)),l=r?z.Format.CSS.formatRGB(a):z.Format.CSS.formatRGBA(a),d=r?z.Format.CSS.formatHSL(a):z.Format.CSS.formatHSLA(a),c=r?z.Format.CSS.formatHex(a):z.Format.CSS.formatHexA(a),h=[];return h.push({label:l,textEdit:{range:n,text:l}}),h.push({label:d,textEdit:{range:n,text:d}}),h.push({label:c,textEdit:{range:n,text:c}}),h}}let pT=class extends V{constructor(e,t,i){super(),this._register(i.colorProvider.register("*",new RA(e,t)))}};pT=Yge([ek(0,si),ek(1,Vt),ek(2,fe)],pT);_0(pT);async function FV(o,e,t,i=!0){return AA(new Xge,o,e,t,i)}function BV(o,e,t,i){return Promise.resolve(t.provideColorPresentations(o,e,i))}class Xge{constructor(){}async compute(e,t,i,n){const s=await e.provideDocumentColors(t,i);if(Array.isArray(s))for(const r of s)n.push({colorInfo:r,provider:e});return Array.isArray(s)}}class Qge{constructor(){}async compute(e,t,i,n){const s=await e.provideDocumentColors(t,i);if(Array.isArray(s))for(const r of s)n.push({range:r.range,color:[r.color.red,r.color.green,r.color.blue,r.color.alpha]});return Array.isArray(s)}}class Jge{constructor(e){this.colorInfo=e}async compute(e,t,i,n){const s=await e.provideColorPresentations(t,this.colorInfo,st.None);return Array.isArray(s)&&n.push(...s),Array.isArray(s)}}async function AA(o,e,t,i,n){let s=!1,r;const a=[],l=e.ordered(t);for(let d=l.length-1;d>=0;d--){const c=l[d];if(c instanceof RA)r=c;else try{await o.compute(c,t,i,a)&&(s=!0)}catch(h){Fi(h)}}return s?a:r&&n?(await o.compute(r,t,i,a),a):[]}function WV(o,e){const{colorProvider:t}=o.get(fe),i=o.get(si).getModel(e);if(!i)throw $o();const n=o.get(Qe).getValue("editor.defaultColorDecorators",{resource:e});return{model:i,colorProviderRegistry:t,isDefaultColorDecoratorsEnabled:n}}ct.registerCommand("_executeDocumentColorProvider",function(o,...e){const[t]=e;if(!(t instanceof xe))throw $o();const{model:i,colorProviderRegistry:n,isDefaultColorDecoratorsEnabled:s}=WV(o,t);return AA(new Qge,n,i,st.None,s)});ct.registerCommand("_executeColorPresentationProvider",function(o,...e){const[t,i]=e,{uri:n,range:s}=i;if(!(n instanceof xe)||!Array.isArray(t)||t.length!==4||!D.isIRange(s))throw $o();const{model:r,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:l}=WV(o,n),[d,c,h,u]=t;return AA(new Jge({range:s,color:{red:d,green:c,blue:h,alpha:u}}),a,r,st.None,l)});var efe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},tk=function(o,e){return function(t,i){e(t,i,o)}},_T;const VV=Object.create({});let ah=_T=class extends V{constructor(e,t,i,n){super(),this._editor=e,this._configurationService=t,this._languageFeaturesService=i,this._localToDispose=this._register(new X),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new e0(this._editor),this._decoratorLimitReporter=new tfe,this._colorDecorationClassRefs=this._register(new X),this._debounceInformation=n.for(i.colorProvider,"Document Colors",{min:_T.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(s=>{const r=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(146);const a=r!==this._isColorDecoratorsEnabled||s.hasChanged(21),l=s.hasChanged(146);(a||l)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(146),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 n=i.colorDecorators;if(n&&n.enable!==void 0&&!n.enable)return n.enable}return this._editor.getOption(20)}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 Dr,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(e)))})),this.beginCompute())}async beginCompute(){this._computePromise=tn(async e=>{const t=this._editor.getModel();if(!t)return[];const i=new Hn(!1),n=await FV(this._languageFeaturesService.colorProvider,t,e,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(t,i.elapsed()),n});try{const e=await this._computePromise;this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}catch(e){Ve(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:ze.EMPTY}));this._editor.changeDecorations(i=>{this._decorationsIds=i.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((n,s)=>this._colorDatas.set(n,e[s]))})}updateColorDecorators(e){this._colorDecorationClassRefs.clear();const t=[],i=this._editor.getOption(21);for(let s=0;s<e.length&&t.length<i;s++){const{red:r,green:a,blue:l,alpha:d}=e[s].colorInfo.color,c=new ut(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[s].colorInfo.range.startLineNumber,startColumn:e[s].colorInfo.range.startColumn,endLineNumber:e[s].colorInfo.range.endLineNumber,endColumn:e[s].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:S9,inlineClassName:`${u.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:VV}}})}const n=i<e.length?i:!1;this._decoratorLimitReporter.update(e.length,n),this._colorDecoratorIds.set(t)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(e){const t=this._editor.getModel();if(!t)return null;const i=t.getDecorationsInRange(D.fromPositions(e,e)).filter(n=>this._colorDatas.has(n.id));return i.length===0?null:this._colorDatas.get(i[0].id)}isColorDecoration(e){return this._colorDecoratorIds.has(e)}};ah.ID="editor.contrib.colorDetector";ah.RECOMPUTE_TIME=1e3;ah=_T=efe([tk(1,Qe),tk(2,fe),tk(3,Jo)],ah);class tfe{constructor(){this._onDidChange=new O,this._computed=0,this._limited=!1}update(e,t){(e!==this._computed||t!==this._limited)&&(this._computed=e,this._limited=t,this._onDidChange.fire())}}vt(ah.ID,ah,1);class ife{get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new O,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new O,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new O,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){let i=-1;for(let n=0;n<this.colorPresentations.length;n++)if(t.toLowerCase()===this.colorPresentations[n].label){i=n;break}if(i===-1){const n=t.split("(")[0].toLowerCase();for(let s=0;s<this.colorPresentations.length;s++)if(this.colorPresentations[s].label.toLowerCase().startsWith(n)){i=s;break}}i!==-1&&i!==this.presentationIndex&&(this.presentationIndex=i,this._onDidChangePresentation.fire(this.presentation))}flushColor(){this._onColorFlushed.fire(this._color)}}const vo=J;class nfe extends V{constructor(e,t,i,n=!1){super(),this.model=t,this.showingStandaloneColorPicker=n,this._closeButton=null,this._domNode=vo(".colorpicker-header"),Y(e,this._domNode),this._pickedColorNode=Y(this._domNode,vo(".picked-color")),Y(this._pickedColorNode,vo("span.codicon.codicon-color-mode")),this._pickedColorPresentation=Y(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");const s=m("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this._pickedColorNode.setAttribute("title",s),this._originalColorNode=Y(this._domNode,vo(".original-color")),this._originalColorNode.style.backgroundColor=z.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=i.getColorTheme().getColor(Sw)||z.white,this._register(i.onDidColorThemeChange(r=>{this.backgroundColor=r.getColor(Sw)||z.white})),this._register($(this._pickedColorNode,se.CLICK,()=>this.model.selectNextColorPresentation())),this._register($(this._originalColorNode,se.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=z.Format.CSS.format(t.color)||"",this._pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new sfe(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(e){this._pickedColorNode.style.backgroundColor=z.Format.CSS.format(e)||"",this._pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}class sfe extends V{constructor(e){super(),this._onClicked=this._register(new O),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),Y(e,this._button);const t=document.createElement("div");t.classList.add("close-button-inner-div"),Y(this._button,t),Y(t,vo(".button"+Ne.asCSSSelector(Ii("color-picker-close",re.close,m("closeIcon","Icon to close the color picker"))))).classList.add("close-icon"),this._register($(this._button,se.CLICK,()=>{this._onClicked.fire()}))}}class ofe extends V{constructor(e,t,i,n=!1){super(),this.model=t,this.pixelRatio=i,this._insertButton=null,this._domNode=vo(".colorpicker-body"),Y(e,this._domNode),this._saturationBox=new rfe(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new afe(this._domNode,this.model,n),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new lfe(this._domNode,this.model,n),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),n&&(this._insertButton=this._register(new dfe(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new z(new Xa(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new z(new Xa(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=(1-e)*360;this.model.color=new z(new Xa(i===360?0:i,t.s,t.v,t.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}class rfe extends V{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new O,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new O,this.onColorFlushed=this._onColorFlushed.event,this._domNode=vo(".saturation-wrap"),Y(e,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",Y(this._domNode,this._canvas),this.selection=vo(".saturation-selection"),Y(this._domNode,this.selection),this.layout(),this._register($(this._domNode,se.POINTER_DOWN,n=>this.onPointerDown(n))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;this.monitor=this._register(new tp);const t=Mi(this._domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>this.onDidChangePosition(n.pageX-t.left,n.pageY-t.top),()=>null);const i=$(e.target.ownerDocument,se.POINTER_UP,()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this._domNode.offsetWidth,this.height=this._domNode.offsetHeight,this._canvas.width=this.width*this.pixelRatio,this._canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new z(new Xa(e.h,1,1,1)),i=this._canvas.getContext("2d"),n=i.createLinearGradient(0,0,this._canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const s=i.createLinearGradient(0,0,0,this._canvas.height);s.addColorStop(0,"rgba(0, 0, 0, 0)"),s.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this._canvas.width,this._canvas.height),i.fillStyle=z.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=s,i.fill()}paintSelection(e,t){this.selection.style.left=`${e*this.width}px`,this.selection.style.top=`${this.height-t*this.height}px`}onDidChangeColor(e){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const t=e.hsva;this.paintSelection(t.s,t.v)}}class HV extends V{constructor(e,t,i=!1){super(),this.model=t,this._onDidChange=new O,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new O,this.onColorFlushed=this._onColorFlushed.event,i?(this.domNode=Y(e,vo(".standalone-strip")),this.overlay=Y(this.domNode,vo(".standalone-overlay"))):(this.domNode=Y(e,vo(".strip")),this.overlay=Y(this.domNode,vo(".overlay"))),this.slider=Y(this.domNode,vo(".slider")),this.slider.style.top="0px",this._register($(this.domNode,se.POINTER_DOWN,n=>this.onPointerDown(n))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onDidChangeColor(e){const t=this.getValue(e);this.updateSliderPosition(t)}onPointerDown(e){if(!e.target||!(e.target instanceof Element))return;const t=this._register(new tp),i=Mi(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.pointerId,e.buttons,s=>this.onDidChangeTop(s.pageY-i.top),()=>null);const n=$(e.target.ownerDocument,se.POINTER_UP,()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=`${(1-e)*this.height}px`}}class afe extends HV{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){super.onDidChangeColor(e);const{r:t,g:i,b:n}=e.rgba,s=new z(new ut(t,i,n,1)),r=new z(new ut(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${s} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class lfe extends HV{constructor(e,t,i=!1){super(e,t,i),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class dfe extends V{constructor(e){super(),this._onClicked=this._register(new O),this.onClicked=this._onClicked.event,this._button=Y(e,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._register($(this._button,se.CLICK,()=>{this._onClicked.fire()}))}get button(){return this._button}}class cfe extends Eo{constructor(e,t,i,n,s=!1){super(),this.model=t,this.pixelRatio=i,this._register(mv.getInstance(ke(e)).onDidChange(()=>this.layout()));const r=vo(".colorpicker-widget");e.appendChild(r),this.header=this._register(new nfe(r,this.model,n,s)),this.body=this._register(new ofe(r,this.model,this.pixelRatio,s))}layout(){this.body.layout()}}var zV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},UV=function(o,e){return function(t,i){e(t,i,o)}};class hfe{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let TS=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=2}computeSync(e,t){return[]}computeAsync(e,t,i){return Pi.fromPromise(this._computeAsync(e,t,i))}async _computeAsync(e,t,i){if(!this._editor.hasModel())return[];const n=ah.get(this._editor);if(!n)return[];for(const s of t){if(!n.isColorDecoration(s))continue;const r=n.getColorData(s.range.getStartPosition());if(r)return[await $V(this,this._editor.getModel(),r.colorInfo,r.provider)]}return[]}renderHoverParts(e,t){return jV(this,this._editor,this._themeService,t,e)}};TS=zV([UV(1,nn)],TS);class ufe{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n}}let _b=class{constructor(e,t){this._editor=e,this._themeService=t,this._color=null}async createColorHover(e,t,i){if(!this._editor.hasModel()||!ah.get(this._editor))return null;const s=await FV(i,this._editor.getModel(),st.None);let r=null,a=null;for(const h of s){const u=h.colorInfo;D.containsRange(u.range,e.range)&&(r=u,a=h.provider)}const l=r??e,d=a??t,c=!!r;return{colorHover:await $V(this,this._editor.getModel(),l,d),foundInEditor:c}}async updateEditorModel(e){if(!this._editor.hasModel())return;const t=e.model;let i=new D(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn);this._color&&(await B1(this._editor.getModel(),t,this._color,i,e),i=KV(this._editor,i,t))}renderHoverParts(e,t){return jV(this,this._editor,this._themeService,t,e)}set color(e){this._color=e}get color(){return this._color}};_b=zV([UV(1,nn)],_b);async function $V(o,e,t,i){const n=e.getValueInRange(t.range),{red:s,green:r,blue:a,alpha:l}=t.color,d=new ut(Math.round(s*255),Math.round(r*255),Math.round(a*255),l),c=new z(d),h=await BV(e,t,i,st.None),u=new ife(c,[],0);return u.colorPresentations=h||[],u.guessColorPresentation(c,n),o instanceof TS?new hfe(o,D.lift(t.range),u,i):new ufe(o,D.lift(t.range),u,i)}function jV(o,e,t,i,n){if(i.length===0||!e.hasModel())return V.None;if(n.setMinimumDimensions){const u=e.getOption(67)+8;n.setMinimumDimensions(new bt(302,u))}const s=new X,r=i[0],a=e.getModel(),l=r.model,d=s.add(new cfe(n.fragment,l,e.getOption(142),t,o instanceof _b));n.setColorPicker(d);let c=!1,h=new D(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn);if(o instanceof _b){const u=i[0].model.color;o.color=u,B1(a,l,u,h,r),s.add(l.onColorFlushed(g=>{o.color=g}))}else s.add(l.onColorFlushed(async u=>{await B1(a,l,u,h,r),c=!0,h=KV(e,h,l)}));return s.add(l.onDidChangeColor(u=>{B1(a,l,u,h,r)})),s.add(e.onDidChangeModelContent(u=>{c?c=!1:(n.hide(),e.focus())})),s}function KV(o,e,t){var i,n;const s=[],r=(i=t.presentation.textEdit)!==null&&i!==void 0?i:{range:e,text:t.presentation.label,forceMoveMarkers:!1};s.push(r),t.presentation.additionalTextEdits&&s.push(...t.presentation.additionalTextEdits);const a=D.lift(r.range),l=o.getModel()._setTrackedRange(null,a,3);return o.executeEdits("colorpicker",s),o.pushUndoStop(),(n=o.getModel()._getTrackedRange(l))!==null&&n!==void 0?n:a}async function B1(o,e,t,i,n){const s=await BV(o,{range:i,color:{red:t.rgba.r/255,green:t.rgba.g/255,blue:t.rgba.b/255,alpha:t.rgba.a}},n.provider,st.None);e.colorPresentations=s||[]}function vT(o,e){return!!o[e]}class ik{constructor(e,t){this.target=e.target,this.isLeftClick=e.event.leftButton,this.isMiddleClick=e.event.middleButton,this.isRightClick=e.event.rightButton,this.hasTriggerModifier=vT(e.event,t.triggerModifier),this.hasSideBySideModifier=vT(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class v3{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=vT(e,t.triggerModifier)}}class AC{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function b3(o){return o==="altKey"?lt?new AC(57,"metaKey",6,"altKey"):new AC(5,"ctrlKey",6,"altKey"):lt?new AC(6,"altKey",57,"metaKey"):new AC(6,"altKey",5,"ctrlKey")}class EL extends V{constructor(e,t){var i;super(),this._onMouseMoveOrRelevantKeyDown=this._register(new O),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new O),this.onExecute=this._onExecute.event,this._onCancel=this._register(new O),this.onCancel=this._onCancel.event,this._editor=e,this._extractLineNumberFromMouseEvent=(i=t==null?void 0:t.extractLineNumberFromMouseEvent)!==null&&i!==void 0?i:n=>n.target.position?n.target.position.lineNumber:0,this._opts=b3(this._editor.getOption(78)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(n=>{if(n.hasChanged(78)){const s=b3(this._editor.getOption(78));if(this._opts.equals(s))return;this._opts=s,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(n=>this._onEditorMouseMove(new ik(n,this._opts)))),this._register(this._editor.onMouseDown(n=>this._onEditorMouseDown(new ik(n,this._opts)))),this._register(this._editor.onMouseUp(n=>this._onEditorMouseUp(new ik(n,this._opts)))),this._register(this._editor.onKeyDown(n=>this._onEditorKeyDown(new v3(n,this._opts)))),this._register(this._editor.onKeyUp(n=>this._onEditorKeyUp(new v3(n,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(n=>this._onDidChangeCursorSelection(n))),this._register(this._editor.onDidChangeModel(n=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(n=>{(n.scrollTopChanged||n.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(e)}_onEditorMouseUp(e){const t=this._extractLineNumberFromMouseEvent(e);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}var gfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Pl=function(o,e){return function(t,i){e(t,i,o)}};let lh=class extends Lm{constructor(e,t,i,n,s,r,a,l,d,c,h,u,g){super(e,{...n.getRawOptions(),overflowWidgetsDomNode:n.getOverflowWidgetsDomNode()},i,s,r,a,l,d,c,h,u,g),this._parentEditor=n,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(n.onDidChangeConfiguration(f=>this._onParentConfigurationChanged(f)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){JS(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};lh=gfe([Pl(4,Ie),Pl(5,_t),Pl(6,ai),Pl(7,Ae),Pl(8,nn),Pl(9,Ri),Pl(10,xr),Pl(11,Vt),Pl(12,fe)],lh);const C3=new z(new ut(0,122,204)),ffe={showArrow:!0,showFrame:!0,className:"",frameColor:C3,arrowColor:C3,keepEditorSelection:!1},mfe="vs.editor.contrib.zoneWidget";class pfe{constructor(e,t,i,n,s,r,a,l){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this.showInHiddenAreas=a,this.ordinal=l,this._onDomNodeTop=s,this._onComputedHeight=r}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class _fe{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class NL{constructor(e){this._editor=e,this._ruleName=NL._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),AI(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){AI(this._ruleName),hw(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){e.column===1&&(e={lineNumber:e.lineNumber,column:2}),this._decorations.set([{range:D.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}NL._IdGenerator=new A2(".arrow-decoration-");class vfe{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new X,this.container=null,this._isShowing=!1,this.editor=e,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=zl(t),JS(this.options,ffe,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange(i=>{const n=this._getWidth(i);this.domNode.style.width=n+"px",this.domNode.style.left=this._getLeft(i)+"px",this._onWidth(n)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new NL(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){const e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){var t;if(this.domNode.style.height=`${e}px`,this.container){const i=e-this._decoratingElementsHeight();this.container.style.height=`${i}px`;const n=this.editor.getLayoutInfo();this._doLayout(i,this._getWidth(n))}(t=this._resizeSash)===null||t===void 0||t.layout()}get position(){const e=this._positionMarkerId.getRange(0);if(e)return e.getStartPosition()}show(e,t){const i=D.isIRange(e)?D.lift(e):D.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId.set([{range:i,options:ze.EMPTY}])}hide(){var e;this._viewZone&&(this.editor.changeViewZones(t=>{this._viewZone&&t.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(e=this._arrow)===null||e===void 0||e.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const e=this.editor.getOption(67);let t=0;if(this.options.showArrow){const i=Math.round(e/3);t+=2*i}if(this.options.showFrame){const i=Math.round(e/9);t+=2*i}return t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),s=this._getWidth(n);this.domNode.style.width=`${s}px`,this.domNode.style.left=this._getLeft(n)+"px";const r=document.createElement("div");r.style.overflow="hidden";const a=this.editor.getOption(67);if(!this.options.allowUnlimitedHeight){const u=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,u)}let l=0,d=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(a/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(d=Math.round(a/9)),this.editor.changeViewZones(u=>{this._viewZone&&u.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new pfe(r,i.lineNumber,i.column,t,g=>this._onViewZoneTop(g),g=>this._onViewZoneHeight(g),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=u.addZone(this._viewZone),this._overlayWidget=new _fe(mfe+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const u=this.options.frameWidth?this.options.frameWidth:d;this.container.style.borderTopWidth=u+"px",this.container.style.borderBottomWidth=u+"px"}const c=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=c+"px",this.container.style.overflow="hidden"),this._doLayout(c,s),this.options.keepEditorSelection||this.editor.setSelection(e);const h=this.editor.getModel();if(h){const u=h.validateRange(new D(e.startLineNumber,1,e.endLineNumber+1,1));this.revealRange(u,u.startLineNumber===h.getLineCount())}}revealRange(e,t){t?this.editor.revealLineNearTop(e.endLineNumber,0):this.editor.revealRange(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones(t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new Pn(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let e;this._disposables.add(this._resizeSash.onDidStart(t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{e=void 0})),this._disposables.add(this._resizeSash.onDidChange(t=>{if(e){const i=(t.currentY-e.startY)/this.editor.getOption(67),n=i<0?Math.ceil(i):Math.floor(i),s=e.heightInLines+n;s>5&&s<35&&this._relayout(s)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}var qV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},GV=function(o,e){return function(t,i){e(t,i,o)}};const ZV=ot("IPeekViewService");ht(ZV,class{constructor(){this._widgets=new Map}addExclusiveWidget(o,e){const t=this._widgets.get(o);t&&(t.listener.dispose(),t.widget.dispose());const i=()=>{const n=this._widgets.get(o);n&&n.widget===e&&(n.listener.dispose(),this._widgets.delete(o))};this._widgets.set(o,{widget:e,listener:e.onDidClose(i)})}},1);var Fs;(function(o){o.inPeekEditor=new de("inReferenceSearchEditor",!0,m("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),o.notInPeekEditor=o.inPeekEditor.toNegated()})(Fs||(Fs={}));let vb=class{constructor(e,t){e instanceof lh&&Fs.inPeekEditor.bindTo(t)}dispose(){}};vb.ID="editor.contrib.referenceController";vb=qV([GV(1,Ae)],vb);vt(vb.ID,vb,0);function bfe(o){const e=o.get(_t).getFocusedCodeEditor();return e instanceof lh?e.getParentEditor():e}const Cfe={headerBackgroundColor:z.white,primaryHeadingColor:z.fromHex("#333333"),secondaryHeadingColor:z.fromHex("#6c6c6cb3")};let MS=class extends vfe{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new O,this.onDidClose=this._onDidClose.event,JS(this.options,Cfe,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){const t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();const e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=J(".head"),this._bodyElement=J(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){this._titleElement=J(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),vi(this._titleElement,"click",s=>this._onTitleClick(s))),Y(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=J("span.filename"),this._secondaryHeading=J("span.dirname"),this._metaHeading=J("span.meta"),Y(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const i=J(".peekview-actions");Y(this._headElement,i);const n=this._getActionBarOptions();this._actionbarWidget=new Yo(i,n),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new Zs("peekview.close",m("label.close","Close"),Ne.asClassName(re.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:TW.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:Wn(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,js(this._metaHeading)):ds(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const i=Math.ceil(this.editor.getOption(67)*1.2),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};MS=qV([GV(2,Ie)],MS);const wfe=N("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:z.black,hcLight:z.white},m("peekViewTitleBackground","Background color of the peek view title area.")),YV=N("peekViewTitleLabel.foreground",{dark:z.white,light:z.black,hcDark:z.white,hcLight:_r},m("peekViewTitleForeground","Color of the peek view title.")),XV=N("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},m("peekViewTitleInfoForeground","Color of the peek view title info.")),Sfe=N("peekView.border",{dark:Rs,light:Rs,hcDark:at,hcLight:at},m("peekViewBorder","Color of the peek view borders and arrow.")),yfe=N("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:z.black,hcLight:z.white},m("peekViewResultsBackground","Background color of the peek view result list."));N("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:z.white,hcLight:_r},m("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list."));N("peekViewResult.fileForeground",{dark:z.white,light:"#1E1E1E",hcDark:z.white,hcLight:_r},m("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list."));N("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},m("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list."));N("peekViewResult.selectionForeground",{dark:z.white,light:"#6C6C6C",hcDark:z.white,hcLight:_r},m("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list."));const Sc=N("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:z.black,hcLight:z.white},m("peekViewEditorBackground","Background color of the peek view editor."));N("peekViewEditorGutter.background",{dark:Sc,light:Sc,hcDark:Sc,hcLight:Sc},m("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor."));N("peekViewEditorStickyScroll.background",{dark:Sc,light:Sc,hcDark:Sc,hcLight:Sc},m("peekViewEditorStickScrollBackground","Background color of sticky scroll in the peek view editor."));N("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},m("peekViewResultsMatchHighlight","Match highlight color in the peek view result list."));N("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},m("peekViewEditorMatchHighlight","Match highlight color in the peek view editor."));N("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:Yt,hcLight:Yt},m("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));class dh{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=WE.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?m({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"{0} in {1} on line {2} at column {3}",t.value,Zo(this.uri),this.range.startLineNumber,this.range.startColumn):m("aria.oneReference","in {0} on line {1} at column {2}",Zo(this.uri),this.range.startLineNumber,this.range.startColumn)}}class Lfe{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:s,endLineNumber:r,endColumn:a}=e,l=i.getWordUntilPosition({lineNumber:n,column:s-t}),d=new D(n,l.startColumn,n,s),c=new D(r,a,r,1073741824),h=i.getValueInRange(d).replace(/^\s+/,""),u=i.getValueInRange(e),g=i.getValueInRange(c).replace(/\s+$/,"");return{value:h+u+g,highlight:{start:h.length,end:h.length+u.length}}}}class bb{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new Di}dispose(){kt(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?m("aria.fileReferences.1","1 symbol in {0}, full path {1}",Zo(this.uri),this.uri.fsPath):m("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Zo(this.uri),this.uri.fsPath)}async resolve(e){if(this._previews.size!==0)return this;for(const t of this.children)if(!this._previews.has(t.uri))try{const i=await e.createModelReference(t.uri);this._previews.set(t.uri,new Lfe(i))}catch(i){Ve(i)}return this}}class Xs{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new O,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;e.sort(Xs._compareReferences);let n;for(const s of e)if((!n||!Xt.isEqual(n.uri,s.uri,!0))&&(n=new bb(this,s.uri),this.groups.push(n)),n.children.length===0||Xs._compareReferences(s,n.children[n.children.length-1])!==0){const r=new dh(i===s,n,s,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(r),n.children.push(r)}}dispose(){kt(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new Xs(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?m("aria.result.0","No results found"):this.references.length===1?m("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?m("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):m("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){const{parent:i}=e;let n=i.children.indexOf(e);const s=i.children.length,r=i.parent.groups.length;return r===1||t&&n+1<s||!t&&n>0?(t?n=(n+1)%s:n=(n+s-1)%s,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%r,i.parent.groups[n].children[0]):(n=(n+r-1)%r,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map((n,s)=>({idx:s,prefixLen:jc(n.uri.toString(),e.toString()),offsetDist:Math.abs(n.range.startLineNumber-t.lineNumber)*100+Math.abs(n.range.startColumn-t.column)})).sort((n,s)=>n.prefixLen>s.prefixLen?-1:n.prefixLen<s.prefixLen?1:n.offsetDist<s.offsetDist?-1:n.offsetDist>s.offsetDist?1:0)[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&D.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return Xt.compare(e.uri,t.uri)||D.compareRangesUsingStarts(e.range,t.range)}}var TL=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ML=function(o,e){return function(t,i){e(t,i,o)}},bT;let CT=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof Xs||e instanceof bb}getChildren(e){if(e instanceof Xs)return e.groups;if(e instanceof bb)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};CT=TL([ML(0,Ws)],CT);class Dfe{getHeight(){return 23}getTemplateId(e){return e instanceof bb?Cb.id:x0.id}}let wT=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof dh){const i=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(i)return i.value}return Zo(e.uri)}};wT=TL([ML(0,Et)],wT);class xfe{getId(e){return e instanceof dh?e.id:e.uri}}let ST=class extends V{constructor(e,t){super(),this._labelService=t;const i=document.createElement("div");i.classList.add("reference-file"),this.file=this._register(new fS(i,{supportHighlights:!0})),this.badge=new SN(Y(i,J(".count")),{},EW),e.appendChild(i)}set(e,t){const i=By(e.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(e.uri),this._labelService.getUriLabel(i,{relative:!0}),{title:this._labelService.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(m("referencesCount","{0} references",n)):this.badge.setTitleFormat(m("referenceCount","{0} reference",n))}};ST=TL([ML(1,xm)],ST);let Cb=bT=class{constructor(e){this._instantiationService=e,this.templateId=bT.id}renderTemplate(e){return this._instantiationService.createInstance(ST,e)}renderElement(e,t,i){i.set(e.element,d0(e.filterData))}disposeTemplate(e){e.dispose()}};Cb.id="FileReferencesRenderer";Cb=bT=TL([ML(0,Ie)],Cb);class kfe{constructor(e){this.label=new Pc(e)}set(e,t){var i;const n=(i=e.parent.getPreview(e))===null||i===void 0?void 0:i.preview(e.range);if(!n||!n.value)this.label.set(`${Zo(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:s,highlight:r}=n;t&&!sa.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(s,d0(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(s,[r]))}}}class x0{constructor(){this.templateId=x0.id}renderTemplate(e){return new kfe(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}x0.id="OneReferenceRenderer";class Ife{getWidgetAriaLabel(){return m("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var Efe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ol=function(o,e){return function(t,i){e(t,i,o)}};class RL{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new X,this._callOnModelChange=new X,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e){for(const t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],i=[];for(let n=0,s=e.children.length;n<s;n++){const r=e.children[n];this._decorationIgnoreSet.has(r.id)||r.uri.toString()===this._editor.getModel().uri.toString()&&(t.push({range:r.range,options:RL.DecorationOptions}),i.push(n))}this._editor.changeDecorations(n=>{const s=n.deltaDecorations([],t);for(let r=0;r<s.length;r++)this._decorations.set(s[r],e.children[i[r]])})}_onDecorationChanged(){const e=[],t=this._editor.getModel();if(t){for(const[i,n]of this._decorations){const s=t.getDecorationRange(i);if(!s)continue;let r=!1;if(!D.equalsRange(s,n.range)){if(D.spansMultipleLines(s))r=!0;else{const a=n.range.endColumn-n.range.startColumn,l=s.endColumn-s.startColumn;a!==l&&(r=!0)}r?(this._decorationIgnoreSet.add(n.id),e.push(i)):n.range=s}}for(let i=0,n=e.length;i<n;i++)this._decorations.delete(e[i]);this._editor.removeDecorations(e)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}}RL.DecorationOptions=ze.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class Nfe{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,i;try{const n=JSON.parse(e);t=n.ratio,i=n.heightInLines}catch{}return{ratio:t||.7,heightInLines:i||18}}}class Tfe extends pN{}let yT=class extends MS{constructor(e,t,i,n,s,r,a,l,d,c,h,u){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},r),this._defaultTreeKeyboardSupport=t,this.layoutData=i,this._textModelResolverService=s,this._instantiationService=r,this._peekViewService=a,this._uriLabel=l,this._undoRedoService=d,this._keybindingService=c,this._languageService=h,this._languageConfigurationService=u,this._disposeOnNewModel=new X,this._callOnDispose=new X,this._onDidSelectReference=new O,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new bt(0,0),this._applyTheme(n.getColorTheme()),this._callOnDispose.add(n.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),kt(this._preview),kt(this._previewNotAvailableMessage),kt(this._tree),kt(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){const t=e.getColor(Sfe)||z.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(wfe)||z.transparent,primaryHeadingColor:e.getColor(YV),secondaryHeadingColor:e.getColor(XV)})}show(e){super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=Y(e,J("div.messages")),ds(this._messageContainer),this._splitView=new AW(e,{orientation:1}),this._previewContainer=Y(e,J("div.preview.inline"));const t={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!0},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(lh,this._previewContainer,t,{},this.editor),ds(this._previewContainer),this._previewNotAvailableMessage=new ml(m("missingPreviewMessage","no preview available"),wo,ml.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=Y(e,J("div.ref-tree.inline"));const i={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new Ife,keyboardNavigationLabelProvider:this._instantiationService.createInstance(wT),identityProvider:new xfe,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:yfe}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(vi(this._treeContainer,"keydown",s=>{s.equals(9)&&(this._keybindingService.dispatchEvent(s,s.target),s.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(Tfe,"ReferencesWidget",this._treeContainer,new Dfe,[this._instantiationService.createInstance(Cb),this._instantiationService.createInstance(x0)],this._instantiationService.createInstance(CT),i),this._splitView.addView({onDidChange:ae.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:s=>{this._preview.layout({height:this._dim.height,width:s})}},lS.Distribute),this._splitView.addView({onDidChange:ae.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:s=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${s}px`,this._tree.layout(this._dim.height,s)}},lS.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const n=(s,r)=>{s instanceof dh&&(r==="show"&&this._revealReference(s,!1),this._onDidSelectReference.fire({element:s,kind:r,source:"tree"}))};this._tree.onDidOpen(s=>{s.sideBySide?n(s.element,"side"):s.editorOptions.pinned?n(s.element,"goto"):n(s.element,"show")}),ds(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new bt(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then(()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))})}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=m("noResults","No results"),js(this._messageContainer),Promise.resolve(void 0)):(ds(this._messageContainer),this._decorationsManager=new RL(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(e=>this._tree.rerender(e))),this._disposeOnNewModel.add(this._preview.onMouseDown(e=>{const{event:t,target:i}=e;if(t.detail!==2)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),js(this._treeContainer),js(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof dh)return e;if(e instanceof bb&&e.children.length>0)return e.children[0]}async revealReference(e){await this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}async _revealReference(e,t){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Ue.inMemory?this.setTitle(Wee(e.uri),this._uriLabel.getUriLabel(By(e.uri))):this.setTitle(m("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),await this._tree.expand(e.parent),this._tree.reveal(e));const n=await i;if(!this._model){n.dispose();return}kt(this._previewModelReference);const s=n.object;if(s){const r=this._preview.getModel()===s.textEditorModel?0:1,a=D.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(s.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,r)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}};yT=Efe([Ol(3,nn),Ol(4,Ws),Ol(5,Ie),Ol(6,ZV),Ol(7,xm),Ol(8,Wy),Ol(9,Et),Ol(10,Qt),Ol(11,Vt)],yT);var Mfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zg=function(o,e){return function(t,i){e(t,i,o)}},W1;const xg=new de("referenceSearchVisible",!1,m("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let ch=W1=class{static get(e){return e.getContribution(W1.ID)}constructor(e,t,i,n,s,r,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=s,this._instantiationService=r,this._storageService=a,this._configurationService=l,this._disposables=new X,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=xg.bindTo(i)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const s="peekViewLayout",r=Nfe.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance(yT,this._editor,this._defaultTreeKeyboardSupport,r),this._widget.setTitle(m("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose(()=>{t.cancel(),this._widget&&(this._storageService.store(s,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(l=>{const{element:d,kind:c}=l;if(d)switch(c){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(d,!1,!1);break;case"side":this.openReference(d,!0,!1);break;case"goto":i?this._gotoReference(d,!0):this.openReference(d,!1,!0);break}}));const a=++this._requestIdPool;t.then(l=>{var d;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(d=this._model)===null||d===void 0||d.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(m("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));const c=this._editor.getModel().uri,h=new F(e.startLineNumber,e.startColumn),u=this._model.nearestReference(c,h);if(u)return this._widget.setSelection(u).then(()=>{this._widget&&this._editor.getOption(87)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(e){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),s=this._editor.hasTextFocus(),r=this._widget.isPreviewEditorFocused();await this._widget.setSelection(n),await this._gotoReference(n,!1),s?this._editor.focus():this._widget&&r&&this._widget.focusOnPreviewEditor()}async revealReference(e){!this._editor.hasModel()||!this._model||!this._widget||await this._widget.revealReference(e)}closeWidget(e=!0){var t,i;(t=this._widget)===null||t===void 0||t.dispose(),(i=this._model)===null||i===void 0||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(e,t){var i;(i=this._widget)===null||i===void 0||i.hide(),this._ignoreModelChangeEvent=!0;const n=D.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:n,selectionSource:"code.jump",pinned:t}},this._editor).then(s=>{var r;if(this._ignoreModelChangeEvent=!1,!s||!this._widget){this.closeWidget();return}if(this._editor===s)this._widget.show(n),this._widget.focusOnReferenceTree();else{const a=W1.get(s),l=this._model.clone();this.closeWidget(),s.focus(),a==null||a.toggleWidget(n,tn(d=>Promise.resolve(l)),(r=this._peekMode)!==null&&r!==void 0?r:!1)}},s=>{this._ignoreModelChangeEvent=!1,Ve(s)})}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:s}=e;this._editorService.openCodeEditor({resource:n,options:{selection:s,selectionSource:"code.jump",pinned:i}},this._editor,t)}};ch.ID="editor.contrib.referencesController";ch=W1=Mfe([zg(2,Ae),zg(3,_t),zg(4,Ri),zg(5,Ie),zg(6,kr),zg(7,Qe)],ch);function kg(o,e){const t=bfe(o);if(!t)return;const i=ch.get(t);i&&e(i)}Os.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Ui(2089,60),when:q.or(xg,Fs.inPeekEditor),handler(o){kg(o,e=>{e.changeFocusBetweenPreviewAndReferences()})}});Os.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:q.or(xg,Fs.inPeekEditor),handler(o){kg(o,e=>{e.goToNextOrPreviousReference(!0)})}});Os.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:q.or(xg,Fs.inPeekEditor),handler(o){kg(o,e=>{e.goToNextOrPreviousReference(!1)})}});ct.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");ct.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");ct.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");ct.registerCommand("closeReferenceSearch",o=>kg(o,e=>e.closeWidget()));Os.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:q.and(Fs.inPeekEditor,q.not("config.editor.stablePeek"))});Os.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:q.and(xg,q.not("config.editor.stablePeek"),q.or(E.editorTextFocus,mae.negate()))});Os.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:q.and(xg,XW,eA.negate(),tA.negate()),handler(o){var e;const i=(e=o.get(tr).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof dh&&kg(o,n=>n.revealReference(i[0]))}});Os.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:q.and(xg,XW,eA.negate(),tA.negate()),handler(o){var e;const i=(e=o.get(tr).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof dh&&kg(o,n=>n.openReference(i[0],!0,!0))}});ct.registerCommand("openReference",o=>{var e;const i=(e=o.get(tr).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof dh&&kg(o,n=>n.openReference(i[0],!1,!0))});var QV=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},v_=function(o,e){return function(t,i){e(t,i,o)}};const PA=new de("hasSymbols",!1,m("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),AL=ot("ISymbolNavigationService");let LT=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=PA.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new DT(this._editorService),n=i.onDidChange(s=>{if(this._ignoreEditorChange)return;const r=this._editorService.getActiveCodeEditor();if(!r)return;const a=r.getModel(),l=r.getPosition();if(!a||!l)return;let d=!1,c=!1;for(const h of t.references)if(a2(h.uri,a.uri))d=!0,c=c||D.containsPosition(h.range,l);else if(d)break;(!d||!c)&&this.reset()});this._currentState=wr(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:D.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?m("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):m("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};LT=QV([v_(0,Ae),v_(1,_t),v_(2,Ri),v_(3,Et)],LT);ht(AL,LT,1);le(new class extends un{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:PA,kbOpts:{weight:100,primary:70}})}runEditorCommand(o,e){return o.get(AL).revealNext(e)}});Os.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:PA,primary:9,handler(o){o.get(AL).reset()}});let DT=class{constructor(e){this._listener=new Map,this._disposables=new X,this._onDidChange=new O,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),kt(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,wr(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};DT=QV([v_(0,_t)],DT);async function k0(o,e,t,i){const s=t.ordered(o).map(a=>Promise.resolve(i(a,o,e)).then(void 0,l=>{Fi(l)})),r=await Promise.all(s);return oa(r.flat())}function PL(o,e,t,i){return k0(e,t,o,(n,s,r)=>n.provideDefinition(s,r,i))}function JV(o,e,t,i){return k0(e,t,o,(n,s,r)=>n.provideDeclaration(s,r,i))}function eH(o,e,t,i){return k0(e,t,o,(n,s,r)=>n.provideImplementation(s,r,i))}function tH(o,e,t,i){return k0(e,t,o,(n,s,r)=>n.provideTypeDefinition(s,r,i))}function OL(o,e,t,i,n){return k0(e,t,o,async(s,r,a)=>{const l=await s.provideReferences(r,a,{includeDeclaration:!0},n);if(!i||!l||l.length!==2)return l;const d=await s.provideReferences(r,a,{includeDeclaration:!1},n);return d&&d.length===1?d:l})}async function I0(o){const e=await o(),t=new Xs(e,""),i=t.references.map(n=>n.link);return t.dispose(),i}xl("_executeDefinitionProvider",(o,e,t)=>{const i=o.get(fe),n=PL(i.definitionProvider,e,t,st.None);return I0(()=>n)});xl("_executeTypeDefinitionProvider",(o,e,t)=>{const i=o.get(fe),n=tH(i.typeDefinitionProvider,e,t,st.None);return I0(()=>n)});xl("_executeDeclarationProvider",(o,e,t)=>{const i=o.get(fe),n=JV(i.declarationProvider,e,t,st.None);return I0(()=>n)});xl("_executeReferenceProvider",(o,e,t)=>{const i=o.get(fe),n=OL(i.referenceProvider,e,t,!1,st.None);return I0(()=>n)});xl("_executeImplementationProvider",(o,e,t)=>{const i=o.get(fe),n=eH(i.implementationProvider,e,t,st.None);return I0(()=>n)});var jp,Kp,qp,PC,OC,FC,BC,WC;wn.appendMenuItem(k.EditorContext,{submenu:k.EditorContextPeek,title:m("peek.submenu","Peek"),group:"navigation",order:100});class Bm{static is(e){return!e||typeof e!="object"?!1:!!(e instanceof Bm||F.isIPosition(e.position)&&e.model)}constructor(e,t){this.model=e,this.position=t}}class Yn extends va{static all(){return Yn._allSymbolNavigationCommands.values()}static _patchConfig(e){const t={...e,f1:!0};if(t.menu)for(const i of dt.wrap(t.menu))(i.id===k.EditorContext||i.id===k.EditorContextPeek)&&(i.when=q.and(e.precondition,i.when));return t}constructor(e,t){super(Yn._patchConfig(t)),this.configuration=e,Yn._allSymbolNavigationCommands.set(t.id,this)}runEditorCommand(e,t,i,n){if(!t.hasModel())return Promise.resolve(void 0);const s=e.get(Ri),r=e.get(_t),a=e.get(Dh),l=e.get(AL),d=e.get(fe),c=e.get(Ie),h=t.getModel(),u=t.getPosition(),g=Bm.is(i)?i:new Bm(h,u),f=new oh(t,5),p=qb(this._getLocationModel(d,g.model,g.position,f.token),f.token).then(async _=>{var v;if(!_||f.token.isCancellationRequested)return;eo(_.ariaMessage);let b;if(_.referenceAt(h.uri,u)){const w=this._getAlternativeCommand(t);!Yn._activeAlternativeCommands.has(w)&&Yn._allSymbolNavigationCommands.has(w)&&(b=Yn._allSymbolNavigationCommands.get(w))}const C=_.references.length;if(C===0){if(!this.configuration.muteMessage){const w=h.getWordAtPosition(u);(v=bs.get(t))===null||v===void 0||v.showMessage(this._getNoResultFoundMessage(w),u)}}else if(C===1&&b)Yn._activeAlternativeCommands.add(this.desc.id),c.invokeFunction(w=>b.runEditorCommand(w,t,i,n).finally(()=>{Yn._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(r,l,t,_,n)},_=>{s.error(_)}).finally(()=>{f.dispose()});return a.showWhile(p,250),p}async _onResult(e,t,i,n,s){const r=this._getGoToPreference(i);if(!(i instanceof lh)&&(this.configuration.openInPeek||r==="peek"&&n.references.length>1))this._openInPeek(i,n,s);else{const a=n.firstReference(),l=n.references.length>1&&r==="gotoAndPeek",d=await this._openReference(i,e,a,this.configuration.openToSide,!l);l&&d?this._openInPeek(d,n,s):n.dispose(),r==="goto"&&t.put(a)}}async _openReference(e,t,i,n,s){let r;if(G$(i)&&(r=i.targetSelectionRange),r||(r=i.range),!r)return;const a=await t.openCodeEditor({resource:i.uri,options:{selection:D.collapseToStart(r),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(a){if(s){const l=a.getModel(),d=a.createDecorationsCollection([{range:r,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&d.clear()},350)}return a}}_openInPeek(e,t,i){const n=ch.get(e);n&&e.hasModel()?n.toggleWidget(i??e.getSelection(),tn(s=>Promise.resolve(t)),this.configuration.openInPeek):t.dispose()}}Yn._allSymbolNavigationCommands=new Map;Yn._activeAlternativeCommands=new Set;class E0 extends Yn{async _getLocationModel(e,t,i,n){return new Xs(await PL(e.definitionProvider,t,i,n),m("def.title","Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?m("noResultWord","No definition found for '{0}'",e.word):m("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleDefinitions}}Wt((jp=class extends E0{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:jp.id,title:{...mt("actions.goToDecl.label","Go to Definition"),mnemonicTitle:m({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},precondition:E.hasDefinitionProvider,keybinding:[{when:E.editorTextFocus,primary:70,weight:100},{when:q.and(E.editorTextFocus,qW),primary:2118,weight:100}],menu:[{id:k.EditorContext,group:"navigation",order:1.1},{id:k.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),ct.registerCommandAlias("editor.action.goToDeclaration",jp.id)}},jp.id="editor.action.revealDefinition",jp));Wt((Kp=class extends E0{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:Kp.id,title:mt("actions.goToDeclToSide.label","Open Definition to the Side"),precondition:q.and(E.hasDefinitionProvider,E.isInEmbeddedEditor.toNegated()),keybinding:[{when:E.editorTextFocus,primary:Ui(2089,70),weight:100},{when:q.and(E.editorTextFocus,qW),primary:Ui(2089,2118),weight:100}]}),ct.registerCommandAlias("editor.action.openDeclarationToTheSide",Kp.id)}},Kp.id="editor.action.revealDefinitionAside",Kp));Wt((qp=class extends E0{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:qp.id,title:mt("actions.previewDecl.label","Peek Definition"),precondition:q.and(E.hasDefinitionProvider,Fs.notInPeekEditor,E.isInEmbeddedEditor.toNegated()),keybinding:{when:E.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:k.EditorContextPeek,group:"peek",order:2}}),ct.registerCommandAlias("editor.action.previewDeclaration",qp.id)}},qp.id="editor.action.peekDefinition",qp));class iH extends Yn{async _getLocationModel(e,t,i,n){return new Xs(await JV(e.declarationProvider,t,i,n),m("decl.title","Declarations"))}_getNoResultFoundMessage(e){return e&&e.word?m("decl.noResultWord","No declaration found for '{0}'",e.word):m("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(58).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(58).multipleDeclarations}}Wt((PC=class extends iH{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:PC.id,title:{...mt("actions.goToDeclaration.label","Go to Declaration"),mnemonicTitle:m({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},precondition:q.and(E.hasDeclarationProvider,E.isInEmbeddedEditor.toNegated()),menu:[{id:k.EditorContext,group:"navigation",order:1.3},{id:k.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(e){return e&&e.word?m("decl.noResultWord","No declaration found for '{0}'",e.word):m("decl.generic.noResults","No declaration found")}},PC.id="editor.action.revealDeclaration",PC));Wt(class extends iH{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:mt("actions.peekDecl.label","Peek Declaration"),precondition:q.and(E.hasDeclarationProvider,Fs.notInPeekEditor,E.isInEmbeddedEditor.toNegated()),menu:{id:k.EditorContextPeek,group:"peek",order:3}})}});class nH extends Yn{async _getLocationModel(e,t,i,n){return new Xs(await tH(e.typeDefinitionProvider,t,i,n),m("typedef.title","Type Definitions"))}_getNoResultFoundMessage(e){return e&&e.word?m("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):m("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(58).multipleTypeDefinitions}}Wt((OC=class extends nH{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:OC.ID,title:{...mt("actions.goToTypeDefinition.label","Go to Type Definition"),mnemonicTitle:m({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},precondition:E.hasTypeDefinitionProvider,keybinding:{when:E.editorTextFocus,primary:0,weight:100},menu:[{id:k.EditorContext,group:"navigation",order:1.4},{id:k.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},OC.ID="editor.action.goToTypeDefinition",OC));Wt((FC=class extends nH{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:FC.ID,title:mt("actions.peekTypeDefinition.label","Peek Type Definition"),precondition:q.and(E.hasTypeDefinitionProvider,Fs.notInPeekEditor,E.isInEmbeddedEditor.toNegated()),menu:{id:k.EditorContextPeek,group:"peek",order:4}})}},FC.ID="editor.action.peekTypeDefinition",FC));class sH extends Yn{async _getLocationModel(e,t,i,n){return new Xs(await eH(e.implementationProvider,t,i,n),m("impl.title","Implementations"))}_getNoResultFoundMessage(e){return e&&e.word?m("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):m("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(58).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(58).multipleImplementations}}Wt((BC=class extends sH{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:BC.ID,title:{...mt("actions.goToImplementation.label","Go to Implementations"),mnemonicTitle:m({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},precondition:E.hasImplementationProvider,keybinding:{when:E.editorTextFocus,primary:2118,weight:100},menu:[{id:k.EditorContext,group:"navigation",order:1.45},{id:k.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},BC.ID="editor.action.goToImplementation",BC));Wt((WC=class extends sH{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:WC.ID,title:mt("actions.peekImplementation.label","Peek Implementations"),precondition:q.and(E.hasImplementationProvider,Fs.notInPeekEditor,E.isInEmbeddedEditor.toNegated()),keybinding:{when:E.editorTextFocus,primary:3142,weight:100},menu:{id:k.EditorContextPeek,group:"peek",order:5}})}},WC.ID="editor.action.peekImplementation",WC));class oH extends Yn{_getNoResultFoundMessage(e){return e?m("references.no","No references found for '{0}'",e.word):m("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(58).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(58).multipleReferences}}Wt(class extends oH{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{...mt("goToReferences.label","Go to References"),mnemonicTitle:m({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},precondition:q.and(E.hasReferenceProvider,Fs.notInPeekEditor,E.isInEmbeddedEditor.toNegated()),keybinding:{when:E.editorTextFocus,primary:1094,weight:100},menu:[{id:k.EditorContext,group:"navigation",order:1.45},{id:k.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}async _getLocationModel(e,t,i,n){return new Xs(await OL(e.referenceProvider,t,i,!0,n),m("ref.title","References"))}});Wt(class extends oH{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:mt("references.action.label","Peek References"),precondition:q.and(E.hasReferenceProvider,Fs.notInPeekEditor,E.isInEmbeddedEditor.toNegated()),menu:{id:k.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(e,t,i,n){return new Xs(await OL(e.referenceProvider,t,i,!1,n),m("ref.title","References"))}});class Rfe extends Yn{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",title:mt("label.generic","Go to Any Symbol"),precondition:q.and(Fs.notInPeekEditor,E.isInEmbeddedEditor.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}async _getLocationModel(e,t,i,n){return new Xs(this._references,m("generic.title","Locations"))}_getNoResultFoundMessage(e){return e&&m("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}ct.registerCommand({id:"editor.action.goToLocations",metadata:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:xe},{name:"position",description:"The position at which to start",constraint:F.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:async(o,e,t,i,n,s,r)=>{wt(xe.isUri(e)),wt(F.isIPosition(t)),wt(Array.isArray(i)),wt(typeof n>"u"||typeof n=="string"),wt(typeof r>"u"||typeof r=="boolean");const a=o.get(_t),l=await a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(Cl(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(d=>{const c=new class extends Rfe{_getNoResultFoundMessage(h){return s||super._getNoResultFoundMessage(h)}}({muteMessage:!s,openInPeek:!!r,openToSide:!1},i,n);d.get(Ie).invokeFunction(c.run.bind(c),l)})}});ct.registerCommand({id:"editor.action.peekLocations",metadata:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:xe},{name:"position",description:"The position at which to start",constraint:F.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto`"}]},handler:async(o,e,t,i,n)=>{o.get(ai).executeCommand("editor.action.goToLocations",e,t,i,n,void 0,!0)}});ct.registerCommand({id:"editor.action.findReferences",handler:(o,e,t)=>{wt(xe.isUri(e)),wt(F.isIPosition(t));const i=o.get(fe),n=o.get(_t);return n.openCodeEditor({resource:e},n.getFocusedCodeEditor()).then(s=>{if(!Cl(s)||!s.hasModel())return;const r=ch.get(s);if(!r)return;const a=tn(d=>OL(i.referenceProvider,s.getModel(),F.lift(t),!1,d).then(c=>new Xs(c,m("ref.title","References")))),l=new D(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(r.toggleWidget(l,a,!1))})}});ct.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");var Afe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nk=function(o,e){return function(t,i){e(t,i,o)}},b_;let sg=b_=class{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new X,this.toUnhookForKeyboard=new X,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e,this.linkDecorations=this.editor.createDecorationsCollection();const s=new EL(e);this.toUnhook.add(s),this.toUnhook.add(s.onMouseMoveOrRelevantKeyDown(([r,a])=>{this.startFindDefinitionFromMouse(r,a??void 0)})),this.toUnhook.add(s.onExecute(r=>{this.isEnabled(r)&&this.gotoDefinition(r.target.position,r.hasSideBySideModifier).catch(a=>{Ve(a)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(s.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(b_.ID)}async startFindDefinitionFromCursor(e){await this.startFindDefinition(e),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const i=e.target.position;this.startFindDefinition(i)}async startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const i=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!i){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return;this.currentWordAtPosition=i;const n=new P6(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=tn(a=>this.findDefinition(e,a));let s;try{s=await this.previousPromise}catch(a){Ve(a);return}if(!s||!s.length||!n.validate(this.editor)){this.removeLinkDecorations();return}const r=s[0].originSelectionRange?D.lift(s[0].originSelectionRange):new D(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);if(s.length>1){let a=r;for(const{originSelectionRange:l}of s)l&&(a=D.plusRange(a,l));this.addDecoration(a,new Fn().appendText(m("multipleResults","Click to show {0} definitions.",s.length)))}else{const a=s[0];if(!a.uri)return;this.textModelResolverService.createModelReference(a.uri).then(l=>{if(!l.object||!l.object.textEditorModel){l.dispose();return}const{object:{textEditorModel:d}}=l,{startLineNumber:c}=a.range;if(c<1||c>d.getLineCount()){l.dispose();return}const h=this.getPreviewValue(d,c,a),u=this.languageService.guessLanguageIdByFilepathOrFirstLine(d.uri);this.addDecoration(r,h?new Fn().appendCodeblock(u||"",h):void 0),l.dispose()})}}getPreviewValue(e,t,i){let n=i.range;return n.endLineNumber-n.startLineNumber>=b_.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let s=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a<i.endLineNumber;a++){const l=e.getLineFirstNonWhitespaceColumn(a);s=Math.min(s,l)}return e.getValueInRange(i).replace(new RegExp(`^\\s{${s-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,t){const i=e.getLineFirstNonWhitespaceColumn(t),n=Math.min(e.getLineCount(),t+b_.MAX_SOURCE_PREVIEW_LINES);let s=t+1;for(;s<n;s++){const r=e.getLineFirstNonWhitespaceColumn(s);if(i===r)break}return new D(t,1,s+1,1)}addDecoration(e,t){const i={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations.set([i])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(e,t){var i;return this.editor.hasModel()&&e.isLeftClick&&e.isNoneOrSingleMouseDown&&e.target.type===6&&!(((i=e.target.detail.injectedText)===null||i===void 0?void 0:i.options)instanceof ih)&&(e.hasTriggerModifier||(t?t.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel();return i?PL(this.languageFeaturesService.definitionProvider,i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(i=>{const n=!t&&this.editor.getOption(88)&&!this.isInPeekEditor(i);return new E0({openToSide:t,openInPeek:n,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(i)})}isInPeekEditor(e){const t=e.get(Ae);return Fs.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};sg.ID="editor.contrib.gotodefinitionatposition";sg.MAX_SOURCE_PREVIEW_LINES=8;sg=b_=Afe([nk(1,Ws),nk(2,Qt),nk(3,fe)],sg);vt(sg.ID,sg,2);let Pfe=class{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}};class rH extends V{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new O),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new Rt(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new Rt(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new Rt(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=Aj(e=>this._computer.computeAsync(e)),(async()=>{try{for await(const e of this._asyncIterable)e&&(this._result.push(e),this._fireResult());this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(e){Ve(e)}})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const e=this._state===0,t=this._state===4;this._onResult.fire(new Pfe(this._result.slice(0),e,t))}start(e){if(e===0)this._state===0&&(this._setState(1),this._firstWaitScheduler.schedule(this._firstWaitTime),this._loadingMessageScheduler.schedule(this._loadingMessageTime));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}class sk{constructor(e,t,i,n){this.priority=e,this.range=t,this.initialMousePosX=i,this.initialMousePosY=n,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class Ru{constructor(e,t,i,n,s,r){this.priority=e,this.owner=t,this.range=i,this.initialMousePosX=n,this.initialMousePosY=s,this.supportsMarkerHover=r,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}const Nh=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}};class OA{constructor(){this._onDidWillResize=new O,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new O,this.onDidResize=this._onDidResize.event,this._sashListener=new X,this._size=new bt(0,0),this._minSize=new bt(0,0),this._maxSize=new bt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Pn(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Pn(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Pn(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:rS.North}),this._southSash=new Pn(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:rS.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,i=0;this._sashListener.add(ae.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)})),this._sashListener.add(ae.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(ae.any(this._eastSash.onDidReset,this._westSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(ae.any(this._northSash.onDidReset,this._southSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:n}=this._minSize,{height:s,width:r}=this._maxSize;e=Math.max(i,Math.min(s,e)),t=Math.max(n,Math.min(r,t));const a=new bt(t,e);bt.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}const Ofe=30,Ffe=24;class Bfe extends V{constructor(e,t=new bt(10,10)){super(),this._editor=e,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new OA),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=bt.lift(t),this._resizableNode.layout(t.height,t.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(i=>{this._resize(new bt(i.dimension.width,i.dimension.height)),i.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var e;return!((e=this._contentPosition)===null||e===void 0)&&e.position?F.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);return!t||!i?void 0:Mi(t).top+i.top-Ofe}_availableVerticalSpaceBelow(e){const t=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(e);if(!t||!i)return;const n=Mi(t),s=Id(t.ownerDocument.body),r=n.top+i.top+i.height;return s.height-r-Ffe}_findPositionPreference(e,t){var i,n;const s=Math.min((i=this._availableVerticalSpaceBelow(t))!==null&&i!==void 0?i:1/0,e),r=Math.min((n=this._availableVerticalSpaceAbove(t))!==null&&n!==void 0?n:1/0,e),a=Math.min(Math.max(r,s),e),l=Math.min(e,a);let d;return this._editor.getOption(60).above?d=l<=r?1:2:d=l<=s?2:1,d===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),d}_resize(e){this._resizableNode.layout(e.height,e.width)}}var FA=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yu=function(o,e){return function(t,i){e(t,i,o)}},V1,Aa;const w3=J;let RS=V1=class extends V{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._currentResult=null,this._widget=this._register(this._instantiationService.createInstance(Bc,this._editor)),this._participants=[];for(const n of Nh.getAll())this._participants.push(this._instantiationService.createInstance(n,this._editor));this._participants.sort((n,s)=>n.hoverOrdinal-s.hoverOrdinal),this._computer=new PS(this._editor,this._participants),this._hoverOperation=this._register(new rH(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{if(!this._computer.anchor)return;const s=n.hasLoadingMessage?this._addLoadingMessage(n.value):n.value;this._withResult(new aH(this._computer.anchor,s,n.isComplete))})),this._register(vi(this._widget.getDomNode(),"keydown",n=>{n.equals(9)&&this.hide()})),this._register(ci.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}_startShowingOrUpdateHover(e,t,i,n,s){return!this._widget.position||!this._currentResult?e?(this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):!1:this._editor.getOption(60).sticky&&s&&this._widget.isMouseGettingCloser(s.event.posx,s.event.posy)?(e&&this._startHoverOperationIfNecessary(e,t,i,n,!0),!0):e?e&&this._currentResult.anchor.equals(e)?!0:e.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(e)),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(e,t,i,n,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(e,t,i,n,s){this._computer.anchor&&this._computer.anchor.equals(e)||(this._hoverOperation.cancel(),this._computer.anchor=e,this._computer.shouldFocus=n,this._computer.source=i,this._computer.insistOnKeepingHoverVisible=s,this._hoverOperation.start(t))}_setCurrentResult(e){this._currentResult!==e&&(e&&e.messages.length===0&&(e=null),this._currentResult=e,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}_addLoadingMessage(e){if(this._computer.anchor){for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}}return e}_withResult(e){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!e.isComplete||this._computer.insistOnKeepingHoverVisible&&e.messages.length===0)||this._setCurrentResult(e)}_renderMessages(e,t){const{showAtPosition:i,showAtSecondaryPosition:n,highlightRange:s}=V1.computeHoverRanges(this._editor,e.range,t),r=new X,a=r.add(new AS(this._keybindingService)),l=document.createDocumentFragment();let d=null;const c={fragment:l,statusBar:a,setColorPicker:u=>d=u,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:u=>this._widget.setMinimumDimensions(u),hide:()=>this.hide()};for(const u of this._participants){const g=t.filter(f=>f.owner===u);g.length>0&&r.add(u.renderHoverParts(c,g))}const h=t.some(u=>u.isBeforeContent);if(a.hasContent&&l.appendChild(a.hoverElement),l.hasChildNodes()){if(s){const u=this._editor.createDecorationsCollection();u.set([{range:s,options:V1._DECORATION_OPTIONS}]),r.add(Le(()=>{u.clear()}))}this._widget.showAt(l,new Vfe(e.initialMousePosX,e.initialMousePosY,d,i,n,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,h,r))}else r.dispose()}static computeHoverRanges(e,t,i){let n=1;if(e.hasModel()){const h=e._getViewModel(),u=h.coordinatesConverter,g=u.convertModelRangeToViewRange(t),f=new F(g.startLineNumber,h.getLineMinColumn(g.startLineNumber));n=u.convertViewPositionToModelPosition(f).column}const s=t.startLineNumber;let r=t.startColumn,a=i[0].range,l=null;for(const h of i)a=D.plusRange(a,h.range),h.range.startLineNumber===s&&h.range.endLineNumber===s&&(r=Math.max(Math.min(r,h.range.startColumn),n)),h.forceShowAtRange&&(l=h.range);const d=l?l.getStartPosition():new F(s,t.startColumn),c=l?l.getStartPosition():new F(s,r);return{showAtPosition:d,showAtSecondaryPosition:c,highlightRange:a}}showsOrWillShow(e){if(this._widget.isResizing)return!0;const t=[];for(const n of this._participants)if(n.suggestHoverAnchor){const s=n.suggestHoverAnchor(e);s&&t.push(s)}const i=e.target;if(i.type===6&&t.push(new sk(0,i.range,e.event.posx,e.event.posy)),i.type===7){const n=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&typeof i.detail.horizontalDistanceToText=="number"&&i.detail.horizontalDistanceToText<n&&t.push(new sk(0,i.range,e.event.posx,e.event.posy))}return t.length===0?this._startShowingOrUpdateHover(null,0,0,!1,e):(t.sort((n,s)=>s.priority-n.priority),this._startShowingOrUpdateHover(t[0],0,0,!1,e))}startShowingAtRange(e,t,i,n){this._startShowingOrUpdateHover(new sk(0,e,void 0,void 0),t,i,n,null)}containsNode(e){return e?this._widget.getDomNode().contains(e):!1}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}get widget(){return this._widget}};RS._DECORATION_OPTIONS=ze.register({description:"content-hover-highlight",className:"hoverHighlight"});RS=V1=FA([yu(1,Ie),yu(2,Et)],RS);class aH{constructor(e,t,i){this.anchor=e,this.messages=t,this.isComplete=i}filter(e){const t=this.messages.filter(i=>i.isValidForHoverAnchor(e));return t.length===this.messages.length?this:new Wfe(this,this.anchor,t,this.isComplete)}}class Wfe extends aH{constructor(e,t,i,n){super(t,i,n),this.original=e}filter(e){return this.original.filter(e)}}class Vfe{constructor(e,t,i,n,s,r,a,l,d,c){this.initialMousePosX=e,this.initialMousePosY=t,this.colorPicker=i,this.showAtPosition=n,this.showAtSecondaryPosition=s,this.preferAbove=r,this.stoleFocus=a,this.source=l,this.isBeforeContent=d,this.disposables=c,this.closestMouseDistance=void 0}}const S3=30,ok=10,Hfe=6;let Bc=Aa=class extends Bfe{get isColorPickerVisible(){var e;return!!(!((e=this._visibleData)===null||e===void 0)&&e.colorPicker)}get isVisibleFromKeyboard(){var e;return((e=this._visibleData)===null||e===void 0?void 0:e.source)===1}get isVisible(){var e;return(e=this._hoverVisibleKey.get())!==null&&e!==void 0?e:!1}get isFocused(){var e;return(e=this._hoverFocusedKey.get())!==null&&e!==void 0?e:!1}constructor(e,t,i,n,s){const r=e.getOption(67)+8,a=150,l=new bt(a,r);super(e,l),this._configurationService=i,this._accessibilityService=n,this._keybindingService=s,this._hover=this._register(new D2),this._minimumSize=l,this._hoverVisibleKey=E.hoverVisible.bindTo(t),this._hoverFocusedKey=E.hoverFocused.bindTo(t),Y(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>{this.isVisible&&this._updateMaxDimensions()})),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(50)&&this._updateFont()}));const d=this._register(la(this._resizableNode.domNode));this._register(d.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(d.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._editor.addContentWidget(this)}dispose(){var e;super.dispose(),(e=this._visibleData)===null||e===void 0||e.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return Aa.ID}static _applyDimensions(e,t,i){const n=typeof t=="number"?`${t}px`:t,s=typeof i=="number"?`${i}px`:i;e.style.width=n,e.style.height=s}_setContentsDomNodeDimensions(e,t){const i=this._hover.contentsDomNode;return Aa._applyDimensions(i,e,t)}_setContainerDomNodeDimensions(e,t){const i=this._hover.containerDomNode;return Aa._applyDimensions(i,e,t)}_setHoverWidgetDimensions(e,t){this._setContentsDomNodeDimensions(e,t),this._setContainerDomNodeDimensions(e,t),this._layoutContentWidget()}static _applyMaxDimensions(e,t,i){const n=typeof t=="number"?`${t}px`:t,s=typeof i=="number"?`${i}px`:i;e.style.maxWidth=n,e.style.maxHeight=s}_setHoverWidgetMaxDimensions(e,t){Aa._applyMaxDimensions(this._hover.contentsDomNode,e,t),Aa._applyMaxDimensions(this._hover.containerDomNode,e,t),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof e=="number"?`${e}px`:e),this._layoutContentWidget()}_hasHorizontalScrollbar(){const e=this._hover.scrollbar.getScrollDimensions();return e.scrollWidth>e.width}_adjustContentsBottomPadding(){const e=this._hover.contentsDomNode,t=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;e.style.paddingBottom!==t&&(e.style.paddingBottom=t)}_setAdjustedHoverWidgetDimensions(e){this._setHoverWidgetMaxDimensions("none","none");const t=e.width,i=e.height;this._setHoverWidgetDimensions(t,i),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(t,i-ok))}_updateResizableNodeMaxDimensions(){var e,t;const i=(e=this._findMaximumRenderingWidth())!==null&&e!==void 0?e:1/0,n=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._resizableNode.maxSize=new bt(i,n),this._setHoverWidgetMaxDimensions(i,n)}_resize(e){var t,i;Aa._lastDimensions=new bt(e.width,e.height),this._setAdjustedHoverWidgetDimensions(e),this._resizableNode.layout(e.height,e.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(i=(t=this._visibleData)===null||t===void 0?void 0:t.colorPicker)===null||i===void 0||i.layout()}_findAvailableSpaceVertically(){var e;const t=(e=this._visibleData)===null||e===void 0?void 0:e.showAtPosition;if(t)return this._positionPreference===1?this._availableVerticalSpaceAbove(t):this._availableVerticalSpaceBelow(t)}_findMaximumRenderingHeight(){const e=this._findAvailableSpaceVertically();if(!e)return;let t=Hfe;return Array.from(this._hover.contentsDomNode.children).forEach(i=>{t+=i.clientHeight}),this._hasHorizontalScrollbar()&&(t+=ok),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-2;return e||this._hover.containerDomNode.clientWidth<t?Id(this._hover.containerDomNode.ownerDocument.body).width-14:this._hover.containerDomNode.clientWidth+2}isMouseGettingCloser(e,t){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX>"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=e,this._visibleData.initialMousePosY=t,!1;const i=Mi(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=y3(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,i.left,i.top,i.width,i.height));const n=y3(e,t,i.left,i.top,i.width,i.height);return n>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,n),!0)}_setHoverData(e){var t;(t=this._visibleData)===null||t===void 0||t.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!e),this._hover.containerDomNode.classList.toggle("hidden",!e)}_updateFont(){const{fontSize:e,lineHeight:t}=this._editor.getOption(50),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,Aa._lastDimensions.height),t=Math.max(this._editor.getLayoutInfo().width*.66,500,Aa._lastDimensions.width);this._setHoverWidgetMaxDimensions(t,e)}_render(e,t){this._setHoverData(t),this._updateFont(),this._updateContent(e),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var e;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[(e=this._positionPreference)!==null&&e!==void 0?e:1]}:null}showAt(e,t){var i,n,s,r;if(!this._editor||!this._editor.hasModel())return;this._render(e,t);const a=td(this._hover.containerDomNode),l=t.showAtPosition;this._positionPreference=(i=this._findPositionPreference(a,l))!==null&&i!==void 0?i:1,this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),(n=t.colorPicker)===null||n===void 0||n.layout();const c=this._hover.containerDomNode.ownerDocument.activeElement===this._hover.containerDomNode&&sW(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(r=(s=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||s===void 0?void 0:s.getAriaLabel())!==null&&r!==void 0?r:"");c&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+c)}hide(){if(!this._visibleData)return;const e=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new bt(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")}_adjustHoverHeightForScrollbar(e){var t;const i=this._hover.containerDomNode,n=this._hover.contentsDomNode,s=(t=this._findMaximumRenderingHeight())!==null&&t!==void 0?t:1/0;this._setContainerDomNodeDimensions(rs(i),Math.min(s,e)),this._setContentsDomNodeDimensions(rs(n),Math.min(s,e-ok))}setMinimumDimensions(e){this._minimumSize=new bt(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 bt(e,this._minimumSize.height)}onContentsChanged(){var e;this._removeConstraintsRenderNormally();const t=this._hover.containerDomNode;let i=td(t),n=rs(t);if(this._resizableNode.layout(i,n),this._setHoverWidgetDimensions(n,i),i=td(t),n=rs(t),this._contentWidth=n,this._updateMinimumWidth(),this._resizableNode.layout(i,n),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(i)),!((e=this._visibleData)===null||e===void 0)&&e.showAtPosition){const s=td(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(s,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e-t.lineHeight})}scrollDown(){const e=this._hover.scrollbar.getScrollPosition().scrollTop,t=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:e+t.lineHeight})}scrollLeft(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e-S3})}scrollRight(){const e=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:e+S3})}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})}};Bc.ID="editor.contrib.resizableContentHoverWidget";Bc._lastDimensions=new bt(0,0);Bc=Aa=FA([yu(1,Ae),yu(2,Qe),yu(3,xr),yu(4,Et)],Bc);let AS=class extends V{get hasContent(){return this._hasContent}constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=w3("div.hover-row.status-bar"),this.actionsElement=Y(this.hoverElement,w3("div.actions"))}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(zy.render(this.actionsElement,e,i))}append(e){const t=Y(this.actionsElement,e);return this._hasContent=!0,t}};AS=FA([yu(0,Et)],AS);class PS{get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}get source(){return this._source}set source(e){this._source=e}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(e){this._insistOnKeepingHoverVisible=e}constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(e,t){if(t.type!==1&&!t.supportsMarkerHover)return[];const i=e.getModel(),n=t.range.startLineNumber;if(n>i.getLineCount())return[];const s=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter(r=>{if(r.options.isWholeLine)return!0;const a=r.range.startLineNumber===n?r.range.startColumn:1,l=r.range.endLineNumber===n?r.range.endColumn:s;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){const t=this._anchor;if(!this._editor.hasModel()||!t)return Pi.EMPTY;const i=PS._getLineDecorations(this._editor,t);return Pi.merge(this._participants.map(n=>n.computeAsync?n.computeAsync(t,i,e):Pi.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=PS._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return oa(t)}}function y3(o,e,t,i,n,s){const r=t+n/2,a=i+s/2,l=Math.max(Math.abs(o-r)-n/2,0),d=Math.max(Math.abs(e-a)-s/2,0);return Math.sqrt(l*l+d*d)}const L3=J;class tm extends V{constructor(e,t,i){super(),this._renderDisposeables=this._register(new X),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new D2),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new pl({editor:this._editor},t,i)),this._computer=new zfe(this._editor),this._hoverOperation=this._register(new rH(this._editor,this._computer)),this._register(this._hoverOperation.onResult(n=>{this._withResult(n.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(50)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return tm.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e,t){this._computer.lineNumber===e&&this._computer.lane===t||(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._computer.lane=t,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const n of t){const s=L3("div.hover-row.markdown-hover"),r=Y(s,L3("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(n.value));r.appendChild(a.element),i.appendChild(s)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),s=this._editor.getOption(67),r=this._hover.containerDomNode.clientHeight,a=i-n-(r-s)/2,l=t.glyphMarginLeft+t.glyphMarginWidth+(this._computer.lane==="lineNo"?t.lineNumbersWidth:0);this._hover.containerDomNode.style.left=`${l}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}}tm.ID="editor.contrib.modesGlyphHoverWidget";class zfe{get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}get lane(){return this._laneOrLine}set lane(e){this._laneOrLine=e}constructor(e){this._editor=e,this._lineNumber=-1,this._laneOrLine=ul.Center}computeSync(){var e,t;const i=a=>({value:a}),n=this._editor.getLineDecorations(this._lineNumber),s=[],r=this._laneOrLine==="lineNo";if(!n)return s;for(const a of n){const l=(t=(e=a.options.glyphMargin)===null||e===void 0?void 0:e.position)!==null&&t!==void 0?t:ul.Center;if(!r&&l!==this._laneOrLine)continue;const d=r?a.options.lineNumberHoverMessage:a.options.glyphMarginHoverMessage;!d||Dm(d)||s.push(...ZM(d).map(i))}return s}}class Ufe{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}async function $fe(o,e,t,i,n){try{const s=await Promise.resolve(o.provideHover(t,i,n));if(s&&Kfe(s))return new Ufe(o,s,e)}catch(s){Fi(s)}}function BA(o,e,t,i){const s=o.ordered(e).map((r,a)=>$fe(r,a,e,t,i));return Pi.fromPromises(s).coalesce()}function jfe(o,e,t,i){return BA(o,e,t,i).map(n=>n.hover).toPromise()}xl("_executeHoverProvider",(o,e,t)=>{const i=o.get(fe);return jfe(i.hoverProvider,e,t,st.None)});function Kfe(o){const e=typeof o.range<"u",t=typeof o.contents<"u"&&o.contents&&o.contents.length>0;return e&&t}var qfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},VC=function(o,e){return function(t,i){e(t,i,o)}};const D3=J;class Zr{constructor(e,t,i,n,s){this.owner=e,this.range=t,this.contents=i,this.isBeforeContent=n,this.ordinal=s}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let OS=class{constructor(e,t,i,n,s){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=s,this.hoverOrdinal=3}createLoadingMessage(e){return new Zr(this,e.range,[new Fn().appendText(m("modesContentHover.loading","Loading..."))],!1,2e3)}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),r=[];let a=1e3;const l=i.getLineLength(n),d=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),c=this._editor.getOption(117),h=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:d});let u=!1;c>=0&&l>c&&e.range.startColumn>=c&&(u=!0,r.push(new Zr(this,e.range,[{value:m("stopped rendering","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.")}],!1,a++))),!u&&typeof h=="number"&&l>=h&&r.push(new Zr(this,e.range,[{value:m("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],!1,a++));let g=!1;for(const f of t){const p=f.range.startLineNumber===n?f.range.startColumn:1,_=f.range.endLineNumber===n?f.range.endColumn:s,v=f.options.hoverMessage;if(!v||Dm(v))continue;f.options.beforeContentClassName&&(g=!0);const b=new D(e.range.startLineNumber,p,e.range.startLineNumber,_);r.push(new Zr(this,b,ZM(v),g,a++))}return r}computeAsync(e,t,i){if(!this._editor.hasModel()||e.type!==1)return Pi.EMPTY;const n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return Pi.EMPTY;const s=new F(e.range.startLineNumber,e.range.startColumn);return BA(this._languageFeaturesService.hoverProvider,n,s,i).filter(r=>!Dm(r.hover.contents)).map(r=>{const a=r.hover.range?D.lift(r.hover.range):e.range;return new Zr(this,a,r.hover.contents,!1,r.ordinal)})}renderHoverParts(e,t){return lH(e,t,this._editor,this._languageService,this._openerService)}};OS=qfe([VC(1,Qt),VC(2,Hs),VC(3,Qe),VC(4,fe)],OS);function lH(o,e,t,i,n){e.sort((r,a)=>r.ordinal-a.ordinal);const s=new X;for(const r of e)for(const a of r.contents){if(Dm(a))continue;const l=D3("div.hover-row.markdown-hover"),d=Y(l,D3("div.hover-contents")),c=s.add(new pl({editor:t},i,n));s.add(c.onDidRenderAsync(()=>{d.className="hover-contents code-hover-contents",o.onContentsChanged()}));const h=s.add(c.render(a));d.appendChild(h.element),o.fragment.appendChild(l)}return s}var dH=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},FS=function(o,e){return function(t,i){e(t,i,o)}};class x3{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let xT=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new O,this.onDidChange=this._onDidChange.event,this._dispoables=new X,this._markers=[],this._nextIdx=-1,xe.isUri(e)?this._resourceFilter=a=>a.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),s=(a,l)=>{let d=uv(a.resource.toString(),l.resource.toString());return d===0&&(n==="position"?d=D.compareRangesUsingStarts(a,l)||gi.compare(a.severity,l.severity):d=gi.compare(a.severity,l.severity)||D.compareRangesUsingStarts(a,l)),d},r=()=>{this._markers=this._markerService.read({resource:xe.isUri(e)?e:void 0,severities:gi.Error|gi.Warning|gi.Info}),typeof e=="function"&&(this._markers=this._markers.filter(a=>this._resourceFilter(a.resource))),this._markers.sort(s)};r(),this._dispoables.add(t.onMarkerChanged(a=>{(!this._resourceFilter||a.some(l=>this._resourceFilter(l)))&&(r(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new x3(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,s=this._markers.findIndex(r=>r.resource.toString()===e.uri.toString());s<0&&(s=ov(this._markers,{resource:e.uri},(r,a)=>uv(r.resource.toString(),a.resource.toString())),s<0&&(s=~s));for(let r=s;r<this._markers.length;r++){let a=D.lift(this._markers[r]);if(a.isEmpty()){const l=e.getWordAtPosition(a.getStartPosition());l&&(a=new D(a.startLineNumber,l.startColumn,a.startLineNumber,l.endColumn))}if(t&&(a.containsPosition(t)||t.isBeforeOrEqual(a.getStartPosition()))){this._nextIdx=r,n=!0;break}if(this._markers[r].resource.toString()!==e.uri.toString())break}n||(this._nextIdx=i?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,t,i){if(this._markers.length===0)return!1;const n=this._nextIdx;return this._nextIdx===-1?this._initIdx(t,i,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),n!==this._nextIdx}find(e,t){let i=this._markers.findIndex(n=>n.resource.toString()===e.toString());if(!(i<0)){for(;i<this._markers.length;i++)if(D.containsPosition(this._markers[i],t))return new x3(this._markers[i],i+1,this._markers.length)}}};xT=dH([FS(1,Il),FS(2,Qe)],xT);const cH=ot("IMarkerNavigationService");let kT=class{constructor(e,t){this._markerService=e,this._configService=t,this._provider=new fs}getMarkerList(e){for(const t of this._provider){const i=t.getMarkerList(e);if(i)return i}return new xT(e,this._markerService,this._configService)}};kT=dH([FS(0,Il),FS(1,Qe)],kT);ht(cH,kT,1);var IT;(function(o){function e(t){switch(t){case Li.Ignore:return"severity-ignore "+Ne.asClassName(re.info);case Li.Info:return Ne.asClassName(re.info);case Li.Warning:return Ne.asClassName(re.warning);case Li.Error:return Ne.asClassName(re.error);default:return""}}o.className=e})(IT||(IT={}));var Gfe=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ug=function(o,e){return function(t,i){e(t,i,o)}},ET;class Zfe{constructor(e,t,i,n,s){this._openerService=n,this._labelService=s,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new X,this._editor=t;const r=document.createElement("div");r.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),r.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),r.appendChild(this._relatedBlock),this._disposables.add(vi(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&i(l)})),this._scrollable=new QB(r,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{r.style.left=`-${a.scrollLeft}px`,r.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){kt(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:s}=e;let r=((t==null?void 0:t.length)||0)+2;s&&(typeof s=="string"?r+=s.length:r+=s.value.length);const a=Ll(i);this._lines=a.length,this._longestLineLength=0;for(const u of a)this._longestLineLength=Math.max(u.length+r,this._longestLineLength);Wn(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const u of a)l=document.createElement("div"),l.innerText=u,u===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||s){const u=document.createElement("span");if(u.classList.add("details"),l.appendChild(u),t){const g=document.createElement("span");g.innerText=t,g.classList.add("source"),u.appendChild(g)}if(s)if(typeof s=="string"){const g=document.createElement("span");g.innerText=`(${s})`,g.classList.add("code"),u.appendChild(g)}else{this._codeLink=J("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=f=>{this._openerService.open(s.target,{allowCommands:!0}),f.preventDefault(),f.stopPropagation()};const g=Y(this._codeLink,J("span"));g.innerText=s.value,u.appendChild(this._codeLink)}}if(Wn(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Bn(n)){const u=this._relatedBlock.appendChild(document.createElement("div"));u.style.paddingTop=`${Math.floor(this._editor.getOption(67)*.66)}px`,this._lines+=1;for(const g of n){const f=document.createElement("div"),p=document.createElement("a");p.classList.add("filename"),p.innerText=`${this._labelService.getUriBasenameLabel(g.resource)}(${g.startLineNumber}, ${g.startColumn}): `,p.title=this._labelService.getUriLabel(g.resource),this._relatedDiagnostics.set(p,g);const _=document.createElement("span");_.innerText=g.message,f.appendChild(p),f.appendChild(_),this._lines+=1,u.appendChild(f)}}const d=this._editor.getOption(50),c=Math.ceil(d.typicalFullwidthCharacterWidth*this._longestLineLength*.75),h=d.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:h})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case gi.Error:t=m("Error","Error");break;case gi.Warning:t=m("Warning","Warning");break;case gi.Info:t=m("Info","Info");break;case gi.Hint:t=m("Hint","Hint");break}let i=m("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let Wm=ET=class extends MS{constructor(e,t,i,n,s,r,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},s),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=r,this._labelService=a,this._callOnDispose=new X,this._onDidSelectRelatedInformation=new O,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=gi.Warning,this._backgroundColor=z.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Jfe);let t=NT,i=Yfe;this._severity===gi.Warning?(t=H1,i=Xfe):this._severity===gi.Info&&(t=TT,i=Qfe);const n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(YV),secondaryHeadingColor:e.getColor(XV)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(e){super._fillHead(e),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(n=>this.editor.focus()));const t=[],i=this._menuService.createMenu(ET.TitleMenu,this._contextKeyService);Qy(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=Y(e,J(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new Zfe(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());const n=D.lift(e),s=this.editor.getPosition(),r=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(r,this.computeRequiredHeight());const a=this.editor.getModel();if(a){const l=i>1?m("problems","{0} of {1} problems",t,i):m("change","{0} of {1} problem",t,i);this.setTitle(Zo(a.uri),l)}this._icon.className=`codicon ${IT.className(gi.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(r,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};Wm.TitleMenu=new k("gotoErrorTitleMenu");Wm=ET=Gfe([Ug(1,nn),Ug(2,Hs),Ug(3,Xo),Ug(4,Ie),Ug(5,Ae),Ug(6,xm)],Wm);const k3=Ev(el,pY),I3=Ev(Xn,kv),E3=Ev(Rs,Iv),NT=N("editorMarkerNavigationError.background",{dark:k3,light:k3,hcDark:at,hcLight:at},m("editorMarkerNavigationError","Editor marker navigation widget error color.")),Yfe=N("editorMarkerNavigationError.headerBackground",{dark:we(NT,.1),light:we(NT,.1),hcDark:null,hcLight:null},m("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),H1=N("editorMarkerNavigationWarning.background",{dark:I3,light:I3,hcDark:at,hcLight:at},m("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),Xfe=N("editorMarkerNavigationWarning.headerBackground",{dark:we(H1,.1),light:we(H1,.1),hcDark:"#0C141F",hcLight:we(H1,.2)},m("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),TT=N("editorMarkerNavigationInfo.background",{dark:E3,light:E3,hcDark:at,hcLight:at},m("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Qfe=N("editorMarkerNavigationInfo.headerBackground",{dark:we(TT,.1),light:we(TT,.1),hcDark:null,hcLight:null},m("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Jfe=N("editorMarkerNavigation.background",{dark:en,light:en,hcDark:en,hcLight:en},m("editorMarkerNavigationBackground","Editor marker navigation widget background."));var eme=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},HC=function(o,e){return function(t,i){e(t,i,o)}},C_;let hh=C_=class{static get(e){return e.getContribution(C_.ID)}constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new X,this._editor=e,this._widgetVisible=hH.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(Wm,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(i=>{var n,s,r;(!(!((n=this._model)===null||n===void 0)&&n.selected)||!D.containsPosition((s=this._model)===null||s===void 0?void 0:s.selected.marker,i.position))&&((r=this._model)===null||r===void 0||r.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const i=this._model.find(this._editor.getModel().uri,this._widget.position);i?this._widget.updateMarker(i.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(i=>{this._editorService.openCodeEditor({resource:i.resource,options:{pinned:!0,revealIfOpened:!0,selection:D.lift(i).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new F(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}async nagivate(e,t){var i,n;if(this._editor.hasModel()){const s=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(s.move(e,this._editor.getModel(),this._editor.getPosition()),!s.selected)return;if(s.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const r=await this._editorService.openCodeEditor({resource:s.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:s.selected.marker}},this._editor);r&&((i=C_.get(r))===null||i===void 0||i.close(),(n=C_.get(r))===null||n===void 0||n.nagivate(e,t))}else this._widget.showAtMarker(s.selected.marker,s.selected.index,s.selected.total)}}};hh.ID="editor.contrib.markerController";hh=C_=eme([HC(1,cH),HC(2,Ae),HC(3,_t),HC(4,Ie)],hh);class FL extends he{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}async run(e,t){var i;t.hasModel()&&((i=hh.get(t))===null||i===void 0||i.nagivate(this._next,this._multiFile))}}class Wc extends FL{constructor(){super(!0,!1,{id:Wc.ID,label:Wc.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:E.focus,primary:578,weight:100},menuOpts:{menuId:Wm.TitleMenu,title:Wc.LABEL,icon:Ii("marker-navigation-next",re.arrowDown,m("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}Wc.ID="editor.action.marker.next";Wc.LABEL=m("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class Au extends FL{constructor(){super(!1,!1,{id:Au.ID,label:Au.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:E.focus,primary:1602,weight:100},menuOpts:{menuId:Wm.TitleMenu,title:Au.LABEL,icon:Ii("marker-navigation-previous",re.arrowUp,m("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}Au.ID="editor.action.marker.prev";Au.LABEL=m("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class tme extends FL{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:m("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:E.focus,primary:66,weight:100},menuOpts:{menuId:k.MenubarGoMenu,title:m({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class ime extends FL{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:m("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:E.focus,primary:1090,weight:100},menuOpts:{menuId:k.MenubarGoMenu,title:m({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}vt(hh.ID,hh,4);Q(Wc);Q(Au);Q(tme);Q(ime);const hH=new de("markersNavigationVisible",!1),nme=un.bindToContribution(hh.get);le(new nme({id:"closeMarkersNavigation",precondition:hH,handler:o=>o.close(),kbOpts:{weight:150,kbExpr:E.focus,primary:9,secondary:[1033]}}));var sme=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rk=function(o,e){return function(t,i){e(t,i,o)}};const rr=J;class ome{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const N3={type:1,filter:{include:Pe.QuickFix},triggerAction:to.QuickFixHover};let MT=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,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(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),r=[];for(const a of t){const l=a.range.startLineNumber===n?a.range.startColumn:1,d=a.range.endLineNumber===n?a.range.endColumn:s,c=this._markerDecorationsService.getMarker(i.uri,a);if(!c)continue;const h=new D(e.range.startLineNumber,l,e.range.startLineNumber,d);r.push(new ome(this,h,c))}return r}renderHoverParts(e,t){if(!t.length)return V.None;const i=new X;t.forEach(s=>e.fragment.appendChild(this.renderMarkerHover(s,i)));const n=t.length===1?t[0]:t.sort((s,r)=>gi.compare(s.marker.severity,r.marker.severity))[0];return this.renderMarkerStatusbar(e,n,i),i}renderMarkerHover(e,t){const i=rr("div.hover-row"),n=Y(i,rr("div.marker.hover-contents")),{source:s,message:r,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(n);const d=Y(n,rr("span"));if(d.style.whiteSpace="pre-wrap",d.innerText=r,s||a)if(a&&typeof a!="string"){const c=rr("span");if(s){const f=Y(c,rr("span"));f.innerText=s}const h=Y(c,rr("a.code-link"));h.setAttribute("href",a.target.toString()),t.add($(h,"click",f=>{this._openerService.open(a.target,{allowCommands:!0}),f.preventDefault(),f.stopPropagation()}));const u=Y(h,rr("span"));u.innerText=a.value;const g=Y(n,c);g.style.opacity="0.6",g.style.paddingLeft="6px"}else{const c=Y(n,rr("span"));c.style.opacity="0.6",c.style.paddingLeft="6px",c.innerText=s&&a?`${s}(${a})`:s||`(${a})`}if(Bn(l))for(const{message:c,resource:h,startLineNumber:u,startColumn:g}of l){const f=Y(n,rr("div"));f.style.marginTop="8px";const p=Y(f,rr("a"));p.innerText=`${Zo(h)}(${u}, ${g}): `,p.style.cursor="pointer",t.add($(p,"click",v=>{v.stopPropagation(),v.preventDefault(),this._openerService&&this._openerService.open(h,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:u,startColumn:g}}}).catch(Ve)}));const _=Y(f,rr("span"));_.innerText=c,this._editor.applyFontInfo(_)}return i}renderMarkerStatusbar(e,t,i){if(t.marker.severity===gi.Error||t.marker.severity===gi.Warning||t.marker.severity===gi.Info){const n=hh.get(this._editor);n&&e.statusBar.addAction({label:m("view problem","View Problem"),commandId:Wc.ID,run:()=>{e.hide(),n.showAtMarker(t.marker),this._editor.focus()}})}if(!this._editor.getOption(91)){const n=e.statusBar.append(rr("div"));this.recentMarkerCodeActionsInfo&&(sS.makeKey(this.recentMarkerCodeActionsInfo.marker)===sS.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=m("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?V.None:Gc(()=>n.textContent=m("checkingForQuickFixes","Checking for quick fixes..."),200,i);n.textContent||(n.textContent=" ");const r=this.getCodeActions(t.marker);i.add(Le(()=>r.cancel())),r.then(a=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),n.textContent=m("noQuickFixes","No quick fixes available");return}n.style.display="none";let l=!1;i.add(Le(()=>{l||a.dispose()})),e.statusBar.addAction({label:m("quick fixes","Quick Fix..."),commandId:EA,run:d=>{l=!0;const c=rh.get(this._editor),h=Mi(d);e.hide(),c==null||c.showCodeActions(N3,a,{x:h.left,y:h.top,width:h.width,height:h.height})}})},Ve)}}getCodeActions(e){return tn(t=>X_(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new D(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),N3,Cd.None,t))}};MT=sme([rk(1,zR),rk(2,Hs),rk(3,fe)],MT);const uH="editor.action.inlineSuggest.commit",gH="editor.action.inlineSuggest.showPrevious",fH="editor.action.inlineSuggest.showNext";var WA=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Yr=function(o,e){return function(t,i){e(t,i,o)}},z1;let RT=class extends V{constructor(e,t,i){super(),this.editor=e,this.model=t,this.instantiationService=i,this.alwaysShowToolbar=Zt(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=Fe(this,n=>{var s,r,a;const l=(s=this.model.read(n))===null||s===void 0?void 0:s.primaryGhostText.read(n);if(!this.alwaysShowToolbar.read(n)||!l||l.parts.length===0)return this.sessionPosition=void 0,null;const d=l.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==l.lineNumber&&(this.sessionPosition=void 0);const c=new F(l.lineNumber,Math.min(d,(a=(r=this.sessionPosition)===null||r===void 0?void 0:r.column)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER));return this.sessionPosition=c,c}),this._register(Sa((n,s)=>{const r=this.model.read(n);if(!r||!this.alwaysShowToolbar.read(n))return;const a=s.add(this.instantiationService.createInstance(uh,this.editor,!0,this.position,r.selectedInlineCompletionIndex,r.inlineCompletionsCount,r.selectedInlineCompletion.map(l=>{var d;return(d=l==null?void 0:l.inlineCompletion.source.inlineCompletions.commands)!==null&&d!==void 0?d:[]})));e.addContentWidget(a),s.add(Le(()=>e.removeContentWidget(a))),s.add(nt(l=>{this.position.read(l)&&r.lastTriggerKind.read(l)!==_d.Explicit&&r.triggerExplicitly()}))}))}};RT=WA([Yr(2,Ie)],RT);const rme=Ii("inline-suggestion-hints-next",re.chevronRight,m("parameterHintsNextIcon","Icon for show next parameter hint.")),ame=Ii("inline-suggestion-hints-previous",re.chevronLeft,m("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let uh=z1=class extends V{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(e,t,i){const n=new Zs(e,t,i,!0,()=>this._commandService.executeCommand(e)),s=this.keybindingService.lookupKeybinding(e,this._contextKeyService);let r=t;return s&&(r=m({key:"content",comment:["A label","A keybinding"]},"{0} ({1})",t,s.getLabel())),n.tooltip=r,n}constructor(e,t,i,n,s,r,a,l,d,c,h){super(),this.editor=e,this.withBorder=t,this._position=i,this._currentSuggestionIdx=n,this._suggestionCount=s,this._extraCommands=r,this._commandService=a,this.keybindingService=d,this._contextKeyService=c,this._menuService=h,this.id=`InlineSuggestionHintsContentWidget${z1.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=Mt("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[Mt("div@toolBar")]),this.previousAction=this.createCommandAction(gH,m("previous","Previous"),Ne.asClassName(ame)),this.availableSuggestionCountAction=new Zs("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(fH,m("next","Next"),Ne.asClassName(rme)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(k.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new Rt(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new Rt(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(l.createInstance(AT,this.nodes.toolBar,k.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:u=>u.startsWith("primary")},actionViewItemProvider:(u,g)=>{if(u instanceof Lo)return l.createInstance(dme,u,void 0);if(u===this.availableSuggestionCountAction){const f=new lme(void 0,u,{label:!0,icon:!1});return f.setClass("availableSuggestionCount"),f}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(u=>{z1._dropDownVisible=u})),this._register(nt(u=>{this._position.read(u),this.editor.layoutContentWidget(this)})),this._register(nt(u=>{const g=this._suggestionCount.read(u),f=this._currentSuggestionIdx.read(u);g!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${f+1}/${g}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),g!==void 0&&g>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register(nt(u=>{const g=this._extraCommands.read(u);if(ri(this.lastCommands,g))return;this.lastCommands=g;const f=g.map(p=>({class:void 0,id:p.id,enabled:!0,tooltip:p.tooltip||"",label:p.title,run:_=>this._commandService.executeCommand(p.id)}));for(const[p,_]of this.inlineCompletionsActionsMenus.getActions())for(const v of _)v instanceof Lo&&f.push(v);f.length>0&&f.unshift(new zi),this.toolBar.setAdditionalSecondaryActions(f)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};uh._dropDownVisible=!1;uh.id=0;uh=z1=WA([Yr(6,ai),Yr(7,Ie),Yr(8,Et),Yr(9,Ae),Yr(10,Xo)],uh);class lme extends Em{constructor(){super(...arguments),this._className=void 0}setClass(e){this._className=e}render(e){super.render(e),this._className&&e.classList.add(this._className)}updateTooltip(){}}let dme=class extends nh{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();if(this.label){const t=Mt("div.keybinding").root;new ap(t,qs,{disableTitle:!0,...n6}).set(e),this.label.textContent=this._action.label,this.label.appendChild(t),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}updateTooltip(){}},AT=class extends ub{constructor(e,t,i,n,s,r,a,l){super(e,{resetMenu:t,...i},n,s,r,a,l),this.menuId=t,this.options2=i,this.menuService=n,this.contextKeyService=s,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var e,t,i,n,s,r,a;const l=[],d=[];Qy(this.menu,(e=this.options2)===null||e===void 0?void 0:e.menuOptions,{primary:l,secondary:d},(i=(t=this.options2)===null||t===void 0?void 0:t.toolbarOptions)===null||i===void 0?void 0:i.primaryGroup,(s=(n=this.options2)===null||n===void 0?void 0:n.toolbarOptions)===null||s===void 0?void 0:s.shouldInlineSubmenu,(a=(r=this.options2)===null||r===void 0?void 0:r.toolbarOptions)===null||a===void 0?void 0:a.useSeparatorsInPrimaryActions),d.push(...this.additionalActions),l.unshift(...this.prependedPrimaryActions),this.setActions(l,d)}setPrependedPrimaryActions(e){ri(this.prependedPrimaryActions,e,(t,i)=>t===i)||(this.prependedPrimaryActions=e,this.updateToolbar())}setAdditionalSecondaryActions(e){ri(this.additionalActions,e,(t,i)=>t===i)||(this.additionalActions=e,this.updateToolbar())}};AT=WA([Yr(3,Xo),Yr(4,Ae),Yr(5,so),Yr(6,Et),Yr(7,Jn)],AT);var cme=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zC=function(o,e){return function(t,i){e(t,i,o)}},PT;const hme=!1;let Bs=PT=class extends V{constructor(e,t,i,n,s){super(),this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=n,this._keybindingService=s,this._listenersStore=new X,this._hoverState={mouseDown:!1,contentHoverFocused:!1,activatedByDecoratorClick:!1},this._reactToEditorMouseMoveRunner=this._register(new Rt(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookListeners(),this._register(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(60)&&(this._unhookListeners(),this._hookListeners())}))}static get(e){return e.getContribution(PT.ID)}_hookListeners(){const e=this._editor.getOption(60);this._hoverSettings={enabled:e.enabled,sticky:e.sticky,hidingDelay:e.delay},e.enabled?(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._hideWidgets()})),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._hideWidgets()}_onEditorMouseDown(e){var t;this._hoverState.mouseDown=!0;const i=e.target;if(i.type===9&&i.detail===Bc.ID){this._hoverState.contentHoverFocused=!0;return}i.type===12&&i.detail===tm.ID||(i.type!==12&&(this._hoverState.contentHoverFocused=!1),!(!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing)&&this._hideWidgets())}_onEditorMouseUp(){this._hoverState.mouseDown=!1}_onEditorMouseLeave(e){var t,i;this._cancelScheduler();const n=e.event.browserEvent.relatedTarget;!((t=this._contentWidget)===null||t===void 0)&&t.widget.isResizing||!((i=this._contentWidget)===null||i===void 0)&&i.containsNode(n)||this._hideWidgets()}_isMouseOverWidget(e){var t,i,n,s,r;const a=e.target,l=this._hoverSettings.sticky;return!!(l&&a.type===9&&a.detail===Bc.ID||l&&(!((t=this._contentWidget)===null||t===void 0)&&t.containsNode((i=e.event.browserEvent.view)===null||i===void 0?void 0:i.document.activeElement))&&!(!((s=(n=e.event.browserEvent.view)===null||n===void 0?void 0:n.getSelection())===null||s===void 0)&&s.isCollapsed)||!l&&a.type===9&&a.detail===Bc.ID&&(!((r=this._contentWidget)===null||r===void 0)&&r.isColorPickerVisible)||l&&a.type===12&&a.detail===tm.ID)}_onEditorMouseMove(e){var t,i,n,s;if(this._mouseMoveEvent=e,!((t=this._contentWidget)===null||t===void 0)&&t.isFocused||!((i=this._contentWidget)===null||i===void 0)&&i.isResizing||this._hoverState.mouseDown&&this._hoverState.contentHoverFocused)return;const r=this._hoverSettings.sticky;if(r&&(!((n=this._contentWidget)===null||n===void 0)&&n.isVisibleFromKeyboard))return;if(this._isMouseOverWidget(e)){this._reactToEditorMouseMoveRunner.cancel();return}const l=this._hoverSettings.hidingDelay;if(!((s=this._contentWidget)===null||s===void 0)&&s.isVisible&&r&&l>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(l);return}this._reactToEditorMouseMove(e)}_reactToEditorMouseMove(e){var t,i,n,s;if(!e)return;const r=e.target,a=(t=r.element)===null||t===void 0?void 0:t.classList.contains("colorpicker-color-decoration"),l=this._editor.getOption(147),d=this._hoverSettings.enabled,c=this._hoverState.activatedByDecoratorClick;if(a&&(l==="click"&&!c||l==="hover"&&!d&&!hme||l==="clickAndHover"&&!d&&!c)||!a&&!d&&!c){this._hideWidgets();return}if(this._getOrCreateContentWidget().showsOrWillShow(e)){(i=this._glyphWidget)===null||i===void 0||i.hide();return}if(r.type===2&&r.position&&r.detail.glyphMarginLane){(n=this._contentWidget)===null||n===void 0||n.hide(),this._getOrCreateGlyphWidget().startShowingAt(r.position.lineNumber,r.detail.glyphMarginLane);return}if(r.type===3&&r.position){(s=this._contentWidget)===null||s===void 0||s.hide(),this._getOrCreateGlyphWidget().startShowingAt(r.position.lineNumber,"lineNo");return}this._hideWidgets()}_onKeyDown(e){var t;if(!this._editor.hasModel())return;const i=this._keybindingService.softDispatch(e,this._editor.getDomNode()),n=i.kind===1||i.kind===2&&i.commandId==="editor.action.showHover"&&((t=this._contentWidget)===null||t===void 0?void 0:t.isVisible);e.keyCode===5||e.keyCode===6||e.keyCode===57||e.keyCode===4||n||this._hideWidgets()}_hideWidgets(){var e,t,i;this._hoverState.mouseDown&&this._hoverState.contentHoverFocused&&(!((e=this._contentWidget)===null||e===void 0)&&e.isColorPickerVisible)||uh.dropDownVisible||(this._hoverState.activatedByDecoratorClick=!1,this._hoverState.contentHoverFocused=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(i=this._contentWidget)===null||i===void 0||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(RS,this._editor)),this._contentWidget}_getOrCreateGlyphWidget(){return this._glyphWidget||(this._glyphWidget=new tm(this._editor,this._languageService,this._openerService)),this._glyphWidget}showContentHover(e,t,i,n,s=!1){this._hoverState.activatedByDecoratorClick=s,this._getOrCreateContentWidget().startShowingAtRange(e,t,i,n)}focus(){var e;(e=this._contentWidget)===null||e===void 0||e.focus()}scrollUp(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollUp()}scrollDown(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollDown()}scrollLeft(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollLeft()}scrollRight(){var e;(e=this._contentWidget)===null||e===void 0||e.scrollRight()}pageUp(){var e;(e=this._contentWidget)===null||e===void 0||e.pageUp()}pageDown(){var e;(e=this._contentWidget)===null||e===void 0||e.pageDown()}goToTop(){var e;(e=this._contentWidget)===null||e===void 0||e.goToTop()}goToBottom(){var e;(e=this._contentWidget)===null||e===void 0||e.goToBottom()}get isColorPickerVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible}get isHoverVisible(){var e;return(e=this._contentWidget)===null||e===void 0?void 0:e.isVisible}dispose(){var e,t;super.dispose(),this._unhookListeners(),this._listenersStore.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};Bs.ID="editor.contrib.hover";Bs=PT=cme([zC(1,Ie),zC(2,Hs),zC(3,Qt),zC(4,Et)],Bs);var Fr;(function(o){o.NoAutoFocus="noAutoFocus",o.FocusIfVisible="focusIfVisible",o.AutoFocusImmediately="autoFocusImmediately"})(Fr||(Fr={}));class ume extends he{constructor(){super({id:"editor.action.showHover",label:m({key:"showOrFocusHover",comment:["Label for action that will trigger the showing/focusing of a hover in the editor.","If the hover is not visible, it will show the hover.","This allows for users to show the hover without using the mouse."]},"Show or Focus Hover"),metadata:{description:"Show or Focus Hover",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:[Fr.NoAutoFocus,Fr.FocusIfVisible,Fr.AutoFocusImmediately],enumDescriptions:[m("showOrFocusHover.focus.noAutoFocus","The hover will not automatically take focus."),m("showOrFocusHover.focus.focusIfVisible","The hover will take focus only if it is already visible."),m("showOrFocusHover.focus.autoFocusImmediately","The hover will automatically take focus when it appears.")],default:Fr.FocusIfVisible}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:E.editorTextFocus,primary:Ui(2089,2087),weight:100}})}run(e,t,i){if(!t.hasModel())return;const n=Bs.get(t);if(!n)return;const s=i==null?void 0:i.focus;let r=Fr.FocusIfVisible;Object.values(Fr).includes(s)?r=s:typeof s=="boolean"&&s&&(r=Fr.AutoFocusImmediately);const a=d=>{const c=t.getPosition(),h=new D(c.lineNumber,c.column,c.lineNumber,c.column);n.showContentHover(h,1,1,d)},l=t.getOption(2)===2;n.isHoverVisible?r!==Fr.NoAutoFocus?n.focus():a(l):a(l||r===Fr.AutoFocusImmediately)}}class gme extends he{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:m({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const i=Bs.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const s=new D(n.lineNumber,n.column,n.lineNumber,n.column),r=sg.get(t);if(!r)return;r.startFindDefinitionFromCursor(n).then(()=>{i.showContentHover(s,1,1,!0)})}}class fme extends he{constructor(){super({id:"editor.action.scrollUpHover",label:m({key:"scrollUpHover",comment:["Action that allows to scroll up in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Up Hover"),alias:"Scroll Up Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:16,weight:100}})}run(e,t){const i=Bs.get(t);i&&i.scrollUp()}}class mme extends he{constructor(){super({id:"editor.action.scrollDownHover",label:m({key:"scrollDownHover",comment:["Action that allows to scroll down in the hover widget with the up arrow when the hover widget is focused."]},"Scroll Down Hover"),alias:"Scroll Down Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:18,weight:100}})}run(e,t){const i=Bs.get(t);i&&i.scrollDown()}}class pme extends he{constructor(){super({id:"editor.action.scrollLeftHover",label:m({key:"scrollLeftHover",comment:["Action that allows to scroll left in the hover widget with the left arrow when the hover widget is focused."]},"Scroll Left Hover"),alias:"Scroll Left Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:15,weight:100}})}run(e,t){const i=Bs.get(t);i&&i.scrollLeft()}}class _me extends he{constructor(){super({id:"editor.action.scrollRightHover",label:m({key:"scrollRightHover",comment:["Action that allows to scroll right in the hover widget with the right arrow when the hover widget is focused."]},"Scroll Right Hover"),alias:"Scroll Right Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:17,weight:100}})}run(e,t){const i=Bs.get(t);i&&i.scrollRight()}}class vme extends he{constructor(){super({id:"editor.action.pageUpHover",label:m({key:"pageUpHover",comment:["Action that allows to page up in the hover widget with the page up command when the hover widget is focused."]},"Page Up Hover"),alias:"Page Up Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:11,secondary:[528],weight:100}})}run(e,t){const i=Bs.get(t);i&&i.pageUp()}}class bme extends he{constructor(){super({id:"editor.action.pageDownHover",label:m({key:"pageDownHover",comment:["Action that allows to page down in the hover widget with the page down command when the hover widget is focused."]},"Page Down Hover"),alias:"Page Down Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:12,secondary:[530],weight:100}})}run(e,t){const i=Bs.get(t);i&&i.pageDown()}}class Cme extends he{constructor(){super({id:"editor.action.goToTopHover",label:m({key:"goToTopHover",comment:["Action that allows to go to the top of the hover widget with the home command when the hover widget is focused."]},"Go To Top Hover"),alias:"Go To Bottom Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(e,t){const i=Bs.get(t);i&&i.goToTop()}}class wme extends he{constructor(){super({id:"editor.action.goToBottomHover",label:m({key:"goToBottomHover",comment:["Action that allows to go to the bottom in the hover widget with the end command when the hover widget is focused."]},"Go To Bottom Hover"),alias:"Go To Bottom Hover",precondition:E.hoverFocused,kbOpts:{kbExpr:E.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(e,t){const i=Bs.get(t);i&&i.goToBottom()}}vt(Bs.ID,Bs,2);Q(ume);Q(gme);Q(fme);Q(mme);Q(pme);Q(_me);Q(vme);Q(bme);Q(Cme);Q(wme);Nh.register(OS);Nh.register(MT);Qo((o,e)=>{const t=o.getColor(HB);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)}; }`))});class OT extends V{constructor(e){super(),this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){const t=this._editor.getOption(147);if(t!=="click"&&t!=="clickAndHover")return;const i=e.target;if(i.type!==6||!i.detail.injectedText||i.detail.injectedText.options.attachedData!==VV||!i.range)return;const n=this._editor.getContribution(Bs.ID);if(n&&!n.isColorPickerVisible){const s=new D(i.range.startLineNumber,i.range.startColumn+1,i.range.endLineNumber,i.range.endColumn+1);n.showContentHover(s,1,0,!1,!0)}}}OT.ID="editor.contrib.colorContribution";vt(OT.ID,OT,2);Nh.register(TS);var mH=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Kr=function(o,e){return function(t,i){e(t,i,o)}},FT,BT;let gh=FT=class extends V{constructor(e,t,i,n,s,r,a){super(),this._editor=e,this._modelService=i,this._keybindingService=n,this._instantiationService=s,this._languageFeatureService=r,this._languageConfigurationService=a,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=E.standaloneColorPickerVisible.bindTo(t),this._standaloneColorPickerFocused=E.standaloneColorPickerFocused.bindTo(t)}showOrFocus(){var e;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(e=this._standaloneColorPickerWidget)===null||e===void 0||e.focus():this._standaloneColorPickerWidget=new BS(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var e;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(e=this._standaloneColorPickerWidget)===null||e===void 0||e.hide(),this._editor.focus()}insertColor(){var e;(e=this._standaloneColorPickerWidget)===null||e===void 0||e.updateEditor(),this.hide()}static get(e){return e.getContribution(FT.ID)}};gh.ID="editor.contrib.standaloneColorPickerController";gh=FT=mH([Kr(1,Ae),Kr(2,si),Kr(3,Et),Kr(4,Ie),Kr(5,fe),Kr(6,Vt)],gh);vt(gh.ID,gh,1);const T3=8,Sme=22;let BS=BT=class extends V{constructor(e,t,i,n,s,r,a,l){var d;super(),this._editor=e,this._standaloneColorPickerVisible=t,this._standaloneColorPickerFocused=i,this._modelService=s,this._keybindingService=r,this._languageFeaturesService=a,this._languageConfigurationService=l,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new O),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=n.createInstance(_b,this._editor),this._position=(d=this._editor._getViewModel())===null||d===void 0?void 0:d.getPrimaryCursorState().modelState.position;const c=this._editor.getSelection(),h=c?{startLineNumber:c.startLineNumber,startColumn:c.startColumn,endLineNumber:c.endLineNumber,endColumn:c.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},u=this._register(la(this._body));this._register(u.onDidBlur(g=>{this.hide()})),this._register(u.onDidFocus(g=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(g=>{var f;const p=(f=g.target.element)===null||f===void 0?void 0:f.classList;p&&p.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(g=>{this._render(g.value,g.foundInEditor)})),this._start(h),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return BT.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const e=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:e?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}async _start(e){const t=await this._computeAsync(e);t&&this._onResult.fire(new yme(t.result,t.foundInEditor))}async _computeAsync(e){if(!this._editor.hasModel())return null;const t={range:e,color:{red:0,green:0,blue:0,alpha:1}},i=await this._standaloneColorPickerParticipant.createColorHover(t,new RA(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return i?{result:i.colorHover,foundInEditor:i.foundInEditor}:null}_render(e,t){const i=document.createDocumentFragment(),n=this._register(new AS(this._keybindingService));let s;const r={fragment:i,statusBar:n,setColorPicker:p=>s=p,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=e,this._register(this._standaloneColorPickerParticipant.renderHoverParts(r,[e])),s===void 0)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(i),s.layout();const a=s.body,l=a.saturationBox.domNode.clientWidth,d=a.domNode.clientWidth-l-Sme-T3,c=s.body.enterButton;c==null||c.onClicked(()=>{this.updateEditor(),this.hide()});const h=s.header,u=h.pickedColorNode;u.style.width=l+T3+"px";const g=h.originalColorNode;g.style.width=d+"px";const f=s.header.closeButton;f==null||f.onClicked(()=>{this.hide()}),t&&(c&&(c.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(e.range)),this._editor.layoutContentWidget(this)}};BS.ID="editor.contrib.standaloneColorPickerWidget";BS=BT=mH([Kr(3,Ie),Kr(4,si),Kr(5,Et),Kr(6,fe),Kr(7,Vt)],BS);class yme{constructor(e,t){this.value=e,this.foundInEditor=t}}class Lme extends va{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{...mt("showOrFocusStandaloneColorPicker","Show or Focus Standalone Color Picker"),mnemonicTitle:m({key:"mishowOrFocusStandaloneColorPicker",comment:["&& denotes a mnemonic"]},"&&Show or Focus Standalone Color Picker")},precondition:void 0,menu:[{id:k.CommandPalette}]})}runEditorCommand(e,t){var i;(i=gh.get(t))===null||i===void 0||i.showOrFocus()}}class Dme extends he{constructor(){super({id:"editor.action.hideColorPicker",label:m({key:"hideColorPicker",comment:["Action that hides the color picker"]},"Hide the Color Picker"),alias:"Hide the Color Picker",precondition:E.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(e,t){var i;(i=gh.get(t))===null||i===void 0||i.hide()}}class xme extends he{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:m({key:"insertColorWithStandaloneColorPicker",comment:["Action that inserts color with standalone color picker"]},"Insert Color with Standalone Color Picker"),alias:"Insert Color with Standalone Color Picker",precondition:E.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(e,t){var i;(i=gh.get(t))===null||i===void 0||i.insertColor()}}Q(Dme);Q(xme);Wt(Lme);class yc{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length,s=e.length;if(i+n>s)return!1;for(let r=0;r<n;r++){const a=e.charCodeAt(i+r),l=t.charCodeAt(r);if(a!==l&&!(a>=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,s,r){const a=e.startLineNumber,l=e.startColumn,d=e.endLineNumber,c=e.endColumn,h=s.getLineContent(a),u=s.getLineContent(d);let g=h.lastIndexOf(t,l-1+t.length),f=u.indexOf(i,c-1-i.length);if(g!==-1&&f!==-1)if(a===d)h.substring(g+t.length,f).indexOf(i)>=0&&(g=-1,f=-1);else{const _=h.substring(g+t.length),v=u.substring(0,f);(_.indexOf(i)>=0||v.indexOf(i)>=0)&&(g=-1,f=-1)}let p;g!==-1&&f!==-1?(n&&g+t.length<h.length&&h.charCodeAt(g+t.length)===32&&(t=t+" "),n&&f>0&&u.charCodeAt(f-1)===32&&(i=" "+i,f-=1),p=yc._createRemoveBlockCommentOperations(new D(a,g+t.length+1,d,f+1),t,i)):(p=yc._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=p.length===1?i:null);for(const _ of p)r.addTrackedEditOperation(_.range,_.text)}static _createRemoveBlockCommentOperations(e,t,i){const n=[];return D.isEmpty(e)?n.push(ti.delete(new D(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(ti.delete(new D(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(ti.delete(new D(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){const s=[];return D.isEmpty(e)?s.push(ti.replace(new D(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(s.push(ti.insert(new F(e.startLineNumber,e.startColumn),t+(n?" ":""))),s.push(ti.insert(new F(e.endLineNumber,e.endColumn),(n?" ":"")+i))),s}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenization.tokenizeIfCheap(i);const s=e.getLanguageIdAtPosition(i,n),r=this.languageConfigurationService.getLanguageConfiguration(s).comments;!r||!r.blockCommentStartToken||!r.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,r.blockCommentStartToken,r.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(i.length===2){const n=i[0],s=i[1];return new _e(n.range.endLineNumber,n.range.endColumn,s.range.startLineNumber,s.range.startColumn)}else{const n=i[0].range,s=this._usedEndToken?-this._usedEndToken.length-1:0;return new _e(n.endLineNumber,n.endColumn+s,n.endLineNumber,n.endColumn+s)}}}class Hl{constructor(e,t,i,n,s,r,a){this.languageConfigurationService=e,this._selection=t,this._tabSize=i,this._type=n,this._insertSpace=s,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=r,this._ignoreFirstLine=a||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenization.tokenizeIfCheap(t);const s=e.getLanguageIdAtPosition(t,1),r=n.getLanguageConfiguration(s).comments,a=r?r.lineCommentToken:null;if(!a)return null;const l=[];for(let d=0,c=i-t+1;d<c;d++)l[d]={ignore:!1,commentStr:a,commentStrOffset:0,commentStrLength:a.length};return l}static _analyzeLines(e,t,i,n,s,r,a,l){let d=!0,c;e===0?c=!0:e===1?c=!1:c=!0;for(let h=0,u=n.length;h<u;h++){const g=n[h],f=s+h;if(f===s&&a){g.ignore=!0;continue}const p=i.getLineContent(f),_=Qn(p);if(_===-1){g.ignore=r,g.commentStrOffset=p.length;continue}if(d=!1,g.ignore=!1,g.commentStrOffset=_,c&&!yc._haystackHasNeedleAtOffset(p,g.commentStr,_)&&(e===0?c=!1:e===1||(g.ignore=!0)),c&&t){const v=_+g.commentStrLength;v<p.length&&p.charCodeAt(v)===32&&(g.commentStrLength+=1)}}if(e===0&&d){c=!1;for(let h=0,u=n.length;h<u;h++)n[h].ignore=!1}return{supported:!0,shouldRemoveComments:c,lines:n}}static _gatherPreflightData(e,t,i,n,s,r,a,l){const d=Hl._gatherPreflightCommentStrings(i,n,s,l);return d===null?{supported:!1}:Hl._analyzeLines(e,t,i,d,n,r,a,l)}_executeLineComments(e,t,i,n){let s;i.shouldRemoveComments?s=Hl._createRemoveLineCommentsOperations(i.lines,n.startLineNumber):(Hl._normalizeInsertionPoint(e,i.lines,n.startLineNumber,this._tabSize),s=this._createAddLineCommentsOperations(i.lines,n.startLineNumber));const r=new F(n.positionLineNumber,n.positionColumn);for(let a=0,l=s.length;a<l;a++)t.addEditOperation(s[a].range,s[a].text),D.isEmpty(s[a].range)&&D.getStartPosition(s[a].range).equals(r)&&e.getLineContent(r.lineNumber).length+1===r.column&&(this._deltaColumn=(s[a].text||"").length);this._selectionId=t.trackSelection(n)}_attemptRemoveBlockComment(e,t,i,n){let s=t.startLineNumber,r=t.endLineNumber;const a=n.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn);let l=e.getLineContent(s).lastIndexOf(i,a-1),d=e.getLineContent(r).indexOf(n,t.endColumn-1-i.length);return l!==-1&&d===-1&&(d=e.getLineContent(s).indexOf(n,l+i.length),r=s),l===-1&&d!==-1&&(l=e.getLineContent(r).lastIndexOf(i,d),s=r),t.isEmpty()&&(l===-1||d===-1)&&(l=e.getLineContent(s).indexOf(i),l!==-1&&(d=e.getLineContent(s).indexOf(n,l+i.length))),l!==-1&&e.getLineContent(s).charCodeAt(l+i.length)===32&&(i+=" "),d!==-1&&e.getLineContent(r).charCodeAt(d-1)===32&&(n=" "+n,d-=1),l!==-1&&d!==-1?yc._createRemoveBlockCommentOperations(new D(s,l+i.length+1,r,d+1),i,n):null}_executeBlockComment(e,t,i){e.tokenization.tokenizeIfCheap(i.startLineNumber);const n=e.getLanguageIdAtPosition(i.startLineNumber,1),s=this.languageConfigurationService.getLanguageConfiguration(n).comments;if(!s||!s.blockCommentStartToken||!s.blockCommentEndToken)return;const r=s.blockCommentStartToken,a=s.blockCommentEndToken;let l=this._attemptRemoveBlockComment(e,i,r,a);if(!l){if(i.isEmpty()){const d=e.getLineContent(i.startLineNumber);let c=Qn(d);c===-1&&(c=d.length),l=yc._createAddBlockCommentOperations(new D(i.startLineNumber,c+1,i.startLineNumber,d.length+1),r,a,this._insertSpace)}else l=yc._createAddBlockCommentOperations(new D(i.startLineNumber,e.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),r,a,this._insertSpace);l.length===1&&(this._deltaColumn=r.length+1)}this._selectionId=t.trackSelection(i);for(const d of l)t.addEditOperation(d.range,d.text)}getEditOperations(e,t){let i=this._selection;if(this._moveEndPositionDown=!1,i.startLineNumber===i.endLineNumber&&this._ignoreFirstLine){t.addEditOperation(new D(i.startLineNumber,e.getLineMaxColumn(i.startLineNumber),i.startLineNumber+1,1),i.startLineNumber===e.getLineCount()?"":`
|
|
675
675
|
`),this._selectionId=t.trackSelection(i);return}i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const n=Hl._gatherPreflightData(this._type,this._insertSpace,e,i.startLineNumber,i.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return n.supported?this._executeLineComments(e,t,n,i):this._executeBlockComment(e,t,i)}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),new _e(i.selectionStartLineNumber,i.selectionStartColumn+this._deltaColumn,i.positionLineNumber,i.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){const i=[];for(let n=0,s=e.length;n<s;n++){const r=e[n];r.ignore||i.push(ti.delete(new D(t+n,r.commentStrOffset+1,t+n,r.commentStrOffset+r.commentStrLength+1)))}return i}_createAddLineCommentsOperations(e,t){const i=[],n=this._insertSpace?" ":"";for(let s=0,r=e.length;s<r;s++){const a=e[s];a.ignore||i.push(ti.insert(new F(t+s,a.commentStrOffset+1),a.commentStr+n))}return i}static nextVisibleColumn(e,t,i,n){return i?e+(t-e%t):e+n}static _normalizeInsertionPoint(e,t,i,n){let s=1073741824,r,a;for(let l=0,d=t.length;l<d;l++){if(t[l].ignore)continue;const c=e.getLineContent(i+l);let h=0;for(let u=0,g=t[l].commentStrOffset;h<s&&u<g;u++)h=Hl.nextVisibleColumn(h,n,c.charCodeAt(u)===9,1);h<s&&(s=h)}s=Math.floor(s/n)*n;for(let l=0,d=t.length;l<d;l++){if(t[l].ignore)continue;const c=e.getLineContent(i+l);let h=0;for(r=0,a=t[l].commentStrOffset;h<s&&r<a;r++)h=Hl.nextVisibleColumn(h,n,c.charCodeAt(r)===9,1);h>s?t[l].commentStrOffset=r-1:t[l].commentStrOffset=r}}}class VA extends he{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(Vt);if(!t.hasModel())return;const n=t.getModel(),s=[],r=n.getOptions(),a=t.getOption(23),l=t.getSelections().map((c,h)=>({selection:c,index:h,ignoreFirstLine:!1}));l.sort((c,h)=>D.compareRangesUsingStarts(c.selection,h.selection));let d=l[0];for(let c=1;c<l.length;c++){const h=l[c];d.selection.endLineNumber===h.selection.startLineNumber&&(d.index<h.index?h.ignoreFirstLine=!0:(d.ignoreFirstLine=!0,d=h))}for(const c of l)s.push(new Hl(i,c.selection,r.tabSize,this._type,a.insertSpace,a.ignoreEmptyLines,c.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class kme extends VA{constructor(){super(0,{id:"editor.action.commentLine",label:m("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:E.writable,kbOpts:{kbExpr:E.editorTextFocus,primary:2138,weight:100},menuOpts:{menuId:k.MenubarEditMenu,group:"5_insert",title:m({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}}class Ime extends VA{constructor(){super(1,{id:"editor.action.addCommentLine",label:m("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:E.writable,kbOpts:{kbExpr:E.editorTextFocus,primary:Ui(2089,2081),weight:100}})}}class Eme extends VA{constructor(){super(2,{id:"editor.action.removeCommentLine",label:m("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:E.writable,kbOpts:{kbExpr:E.editorTextFocus,primary:Ui(2089,2099),weight:100}})}}class Nme extends he{constructor(){super({id:"editor.action.blockComment",label:m("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:E.writable,kbOpts:{kbExpr:E.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:k.MenubarEditMenu,group:"5_insert",title:m({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){const i=e.get(Vt);if(!t.hasModel())return;const n=t.getOption(23),s=[],r=t.getSelections();for(const a of r)s.push(new yc(a,n.insertSpace,i));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}Q(kme);Q(Ime);Q(Eme);Q(Nme);var Tme=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gh=function(o,e){return function(t,i){e(t,i,o)}},WT;let Vm=WT=class{static get(e){return e.getContribution(WT.ID)}constructor(e,t,i,n,s,r,a,l){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=r,this._configurationService=a,this._workspaceContextService=l,this._toDispose=new X,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(d=>this._onContextMenu(d))),this._toDispose.add(this._editor.onMouseWheel(d=>{if(this._contextMenuIsBeingShownCount>0){const c=this._contextViewService.getContextViewElement(),h=d.srcElement;h.shadowRoot&&zu(c)===h.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(d=>{this._editor.getOption(24)&&d.keyCode===58&&(d.preventDefault(),d.stopPropagation(),this.showContextMenu())}))}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(24)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||e.target.type===6&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),e.target.type===11)return this._showScrollbarContextMenu(e.event);if(e.target.type!==6&&e.target.type!==7&&e.target.type!==1)return;if(this._editor.focus(),e.target.position){let i=!1;for(const n of this._editor.getSelections())if(n.containsPosition(e.target.position)){i=!0;break}i||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t=e.event),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(24)||!this._editor.hasModel())return;const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?k.SimpleEditorContext:k.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),s=n.getActions({arg:e.uri});n.dispose();for(const r of s){const[,a]=r;let l=0;for(const d of a)if(d instanceof _v){const c=this._getMenuActions(e,d.item.submenu);c.length>0&&(i.push(new dm(d.id,d.label,c)),l++)}else i.push(d),l++;l&&i.push(new zi)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let n=t;if(!n){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const r=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),a=Mi(this._editor.getDomNode()),l=a.left+r.left,d=a.top+r.top+r.height;n={x:l,y:d}}const s=this._editor.getOption(127)&&!ra;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:s?this._editor.getDomNode():void 0,getAnchor:()=>n,getActions:()=>e,getActionViewItem:r=>{const a=this._keybindingFor(r);if(a)return new Em(r,r,{label:!0,keybinding:a.getLabel(),isMenu:!0});const l=r;return typeof l.getActionViewItem=="function"?l.getActionViewItem():new Em(r,r,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:r=>this._keybindingFor(r),onHide:r=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:i})}})}_showScrollbarContextMenu(e){if(!this._editor.hasModel()||Qse(this._workspaceContextService.getWorkspace()))return;const t=this._editor.getOption(73);let i=0;const n=d=>({id:`menu-action-${++i}`,label:d.label,tooltip:"",class:void 0,enabled:typeof d.enabled>"u"?!0:d.enabled,checked:d.checked,run:d.run}),s=(d,c)=>new dm(`menu-action-${++i}`,d,c,void 0),r=(d,c,h,u,g)=>{if(!c)return n({label:d,enabled:c,run:()=>{}});const f=_=>()=>{this._configurationService.updateValue(h,_)},p=[];for(const _ of g)p.push(n({label:_.label,checked:u===_.value,run:f(_.value)}));return s(d,p)},a=[];a.push(n({label:m("context.minimap.minimap","Minimap"),checked:t.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!t.enabled)}})),a.push(new zi),a.push(n({label:m("context.minimap.renderCharacters","Render Characters"),enabled:t.enabled,checked:t.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!t.renderCharacters)}})),a.push(r(m("context.minimap.size","Vertical size"),t.enabled,"editor.minimap.size",t.size,[{label:m("context.minimap.size.proportional","Proportional"),value:"proportional"},{label:m("context.minimap.size.fill","Fill"),value:"fill"},{label:m("context.minimap.size.fit","Fit"),value:"fit"}])),a.push(r(m("context.minimap.slider","Slider"),t.enabled,"editor.minimap.showSlider",t.showSlider,[{label:m("context.minimap.slider.mouseover","Mouse Over"),value:"mouseover"},{label:m("context.minimap.slider.always","Always"),value:"always"}]));const l=this._editor.getOption(127)&&!ra;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>e,getActions:()=>a,onHide:d=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};Vm.ID="editor.contrib.contextmenu";Vm=WT=Tme([Gh(1,so),Gh(2,kl),Gh(3,Ae),Gh(4,Et),Gh(5,Xo),Gh(6,Qe),Gh(7,qu)],Vm);class Mme extends he{constructor(){super({id:"editor.action.showContextMenu",label:m("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:E.textInputFocus,primary:1092,weight:100}})}run(e,t){var i;(i=Vm.get(t))===null||i===void 0||i.showContextMenu()}}vt(Vm.ID,Vm,2);Q(Mme);class ak{constructor(e){this.selections=e}equals(e){const t=this.selections.length,i=e.selections.length;if(t!==i)return!1;for(let n=0;n<t;n++)if(!this.selections[n].equalsSelection(e.selections[n]))return!1;return!0}}class lk{constructor(e,t,i){this.cursorState=e,this.scrollTop=t,this.scrollLeft=i}}class og extends V{static get(e){return e.getContribution(og.ID)}constructor(e){super(),this._editor=e,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(e.onDidChangeModel(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const i=new ak(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new lk(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new lk(new ak(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new lk(new ak(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}og.ID="editor.contrib.cursorUndoRedoController";class Rme extends he{constructor(){super({id:"cursorUndo",label:m("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:E.textInputFocus,primary:2099,weight:100}})}run(e,t,i){var n;(n=og.get(t))===null||n===void 0||n.cursorUndo()}}class Ame extends he{constructor(){super({id:"cursorRedo",label:m("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){var n;(n=og.get(t))===null||n===void 0||n.cursorRedo()}}vt(og.ID,og,0);Q(Rme);Q(Ame);class Pme{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){const i=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new D(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new _e(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new _e(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new _e(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new _e(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new _e(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(e,t){return this.targetSelection}}function $g(o){return lt?o.altKey:o.ctrlKey}class wd extends V{constructor(e){super(),this._editor=e,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){!this._editor.getOption(35)||this._editor.getOption(22)||($g(e)&&(this._modifierPressed=!0),this._mouseDown&&$g(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(35)||this._editor.getOption(22)||($g(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===wd.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){const t=e.target;if(this._dragSelection===null){const n=(this._editor.getSelections()||[]).filter(s=>t.position&&s.containsPosition(t.position));if(n.length===1)this._dragSelection=n[0];else return}$g(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){const t=new F(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let i=null;if(e.event.shiftKey){const n=this._editor.getSelection();if(n){const{selectionStartLineNumber:s,selectionStartColumn:r}=n;i=[new _e(s,r,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map(n=>n.containsPosition(t)?new _e(t.lineNumber,t.column,t.lineNumber,t.column):n);this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||($g(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(wd.ID,new Pme(this._dragSelection,t,$g(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){this._dndDecorationIds.set([{range:new D(e.lineNumber,e.column,e.lineNumber,e.column),options:wd._DECORATION_OPTIONS}]),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}wd.ID="editor.contrib.dragAndDrop";wd.TRIGGER_KEY_VALUE=lt?6:5;wd._DECORATION_OPTIONS=ze.register({description:"dnd-target",className:"dnd-target"});vt(wd.ID,wd,2);var HA=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wb=function(o,e){return function(t,i){e(t,i,o)}};const BL=m("builtIn","Built-in");class zA{async provideDocumentPasteEdits(e,t,i,n,s){const r=await this.getEdit(i,s);return r?{insertText:r.insertText,label:r.label,detail:r.detail,handledMimeType:r.handledMimeType,yieldTo:r.yieldTo}:void 0}async provideDocumentOnDropEdits(e,t,i,n){const s=await this.getEdit(i,n);return s?{insertText:s.insertText,label:s.label,handledMimeType:s.handledMimeType,yieldTo:s.yieldTo}:void 0}}class pH extends zA{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[pi.text],this.pasteMimeTypes=[pi.text]}async getEdit(e,t){const i=e.get(pi.text);if(!i||e.has(pi.uriList))return;const n=await i.asString();return{handledMimeType:pi.text,label:m("text.label","Insert Plain Text"),detail:BL,insertText:n}}}class _H extends zA{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[pi.uriList],this.pasteMimeTypes=[pi.uriList]}async getEdit(e,t){const i=await vH(e);if(!i.length||t.isCancellationRequested)return;let n=0;const s=i.map(({uri:a,originalText:l})=>a.scheme===Ue.file?a.fsPath:(n++,l)).join(" ");let r;return n>0?r=i.length>1?m("defaultDropProvider.uriList.uris","Insert Uris"):m("defaultDropProvider.uriList.uri","Insert Uri"):r=i.length>1?m("defaultDropProvider.uriList.paths","Insert Paths"):m("defaultDropProvider.uriList.path","Insert Path"),{handledMimeType:pi.uriList,insertText:s,label:r,detail:BL}}}let WS=class extends zA{constructor(e){super(),this._workspaceContextService=e,this.id="relativePath",this.dropMimeTypes=[pi.uriList],this.pasteMimeTypes=[pi.uriList]}async getEdit(e,t){const i=await vH(e);if(!i.length||t.isCancellationRequested)return;const n=oa(i.map(({uri:s})=>{const r=this._workspaceContextService.getWorkspaceFolder(s);return r?Uee(r.uri,s):void 0}));if(n.length)return{handledMimeType:pi.uriList,insertText:n.join(" "),label:i.length>1?m("defaultDropProvider.uriList.relativePaths","Insert Relative Paths"):m("defaultDropProvider.uriList.relativePath","Insert Relative Path"),detail:BL}}};WS=HA([wb(0,qu)],WS);class Ome{constructor(){this.id="html",this.pasteMimeTypes=["text/html"],this._yieldTo=[{mimeType:pi.text}]}async provideDocumentPasteEdits(e,t,i,n,s){if(n.trigger!=="explicit"&&n.only!==this.id)return;const r=i.get("text/html"),a=await(r==null?void 0:r.asString());if(!(!a||s.isCancellationRequested))return{insertText:a,yieldTo:this._yieldTo,label:m("pasteHtmlLabel","Insert HTML"),detail:BL}}}async function vH(o){const e=o.get(pi.uriList);if(!e)return[];const t=await e.asString(),i=[];for(const n of kL.parse(t))try{i.push({uri:xe.parse(n),originalText:n})}catch{}return i}let VT=class extends V{constructor(e,t){super(),this._register(e.documentOnDropEditProvider.register("*",new pH)),this._register(e.documentOnDropEditProvider.register("*",new _H)),this._register(e.documentOnDropEditProvider.register("*",new WS(t)))}};VT=HA([wb(0,fe),wb(1,qu)],VT);let HT=class extends V{constructor(e,t){super(),this._register(e.documentPasteEditProvider.register("*",new pH)),this._register(e.documentPasteEditProvider.register("*",new _H)),this._register(e.documentPasteEditProvider.register("*",new WS(t))),this._register(e.documentPasteEditProvider.register("*",new Ome))}};HT=HA([wb(0,fe),wb(1,qu)],HT);vt(Nd.ID,Nd,0);_0(HT);le(new class extends un{constructor(){super({id:bV,precondition:CV,kbOpts:{weight:100,primary:2137}})}runEditorCommand(o,e,t){var i;return(i=Nd.get(e))===null||i===void 0?void 0:i.changePasteType()}});Q(class extends he{constructor(){super({id:"editor.action.pasteAs",label:m("pasteAs","Paste As..."),alias:"Paste As...",precondition:E.writable,metadata:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:m("pasteAs.id","The id of the paste edit to try applying. If not provided, the editor will show a picker.")}}}}]}})}run(o,e,t){var i;const n=typeof(t==null?void 0:t.id)=="string"?t.id:void 0;return(i=Nd.get(e))===null||i===void 0?void 0:i.pasteAs(n)}});Q(class extends he{constructor(){super({id:"editor.action.pasteAsText",label:m("pasteAsText","Paste as Text"),alias:"Paste as Text",precondition:E.writable})}run(o,e,t){var i;return(i=Nd.get(e))===null||i===void 0?void 0:i.pasteAs("text")}});class Fme{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(e){if(e&&this._dragOperations.has(e)){const t=this._dragOperations.get(e);return this._dragOperations.delete(e),t}}}class M3{constructor(e){this.identifier=e}}const bH=ot("treeViewsDndService");ht(bH,Fme,1);var Bme=function(o,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(o,e,t,i);else for(var a=o.length-1;a>=0;a--)(r=o[a])&&(s=(n<3?r(s):n>3?r(e,t,s):r(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},UC=function(o,e){return function(t,i){e(t,i,o)}},zT;const CH="editor.experimental.dropIntoEditor.defaultProvider",wH="editor.changeDropType",SH=new de("dropWidgetVisible",!1,m("dropWidgetVisible","Whether the drop widget is showing"));let Hm=zT=class extends V{static get(e){return e.getContribution(zT.ID)}constructor(e,t,i,n,s){super(),this._configService=i,this._languageFeaturesService=n,this._treeViewsDragAndDropService=s,this.treeItemsTransfer=fb.getInstance(),this._dropProgressManager=this._register(t.createInstance(kS,"dropIntoEditor",e)),this._postDropWidgetManager=this._register(t.createInstance(ES,"dropIntoEditor",e,SH,{id:wH,label:m("postDropWidgetTitle","Show drop options...")})),this._register(e.onDropIntoEditor(r=>this.onDropIntoEditor(e,r.position,r.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}async onDropIntoEditor(e,t,i){var n;if(!i.dataTransfer||!e.hasModel())return;(n=this._currentOperation)===null||n===void 0||n.cancel(),e.focus(),e.setPosition(t);const s=tn(async r=>{const a=new oh(e,1,void 0,r);try{const l=await this.extractDataTransferData(i);if(l.size===0||a.token.isCancellationRequested)return;const d=e.getModel();if(!d)return;const c=this._languageFeaturesService.documentOnDropEditProvider.ordered(d).filter(u=>u.dropMimeTypes?u.dropMimeTypes.some(g=>l.matches(g)):!0),h=await this.getDropEdits(c,d,t,l,a);if(a.token.isCancellationRequested)return;if(h.length){const u=this.getInitialActiveEditIndex(d,h),g=e.getOption(36).showDropSelector==="afterDrop";await this._postDropWidgetManager.applyEditAndShowIfNeeded([D.fromPositions(t)],{activeEditIndex:u,allEdits:h},g,r)}}finally{a.dispose(),this._currentOperation===s&&(this._currentOperation=void 0)}});this._dropProgressManager.showWhile(t,m("dropIntoEditorProgress","Running drop handlers. Click to cancel"),s),this._currentOperation=s}async getDropEdits(e,t,i,n,s){const r=await qb(Promise.all(e.map(async l=>{try{const d=await l.provideDocumentOnDropEdits(t,i,n,s.token);if(d)return{...d,providerId:l.id}}catch(d){console.error(d)}})),s.token),a=oa(r??[]);return _V(a)}getInitialActiveEditIndex(e,t){const i=this._configService.getValue(CH,{resource:e.uri});for(const[n,s]of Object.entries(i)){const r=t.findIndex(a=>s===a.providerId&&a.handledMimeType&&hV(n,[a.handledMimeType]));if(r>=0)return r}return 0}async extractDataTransferData(e){if(!e.dataTransfer)return new cV;const t=fV(e.dataTransfer);if(this.treeItemsTransfer.hasData(M3.prototype)){const i=this.treeItemsTransfer.getData(M3.prototype);if(Array.isArray(i))for(const n of i){const s=await this._treeViewsDragAndDropService.removeDragOperationTransfer(n.identifier);if(s)for(const[r,a]of s)t.replace(r,a)}}return t}};Hm.ID="editor.contrib.dropIntoEditorController";Hm=zT=Bme([UC(1,Ie),UC(2,Qe),UC(3,fe),UC(4,bH)],Hm);vt(Hm.ID,Hm,2);le(new class extends un{constructor(){super({id:wH,precondition:SH,kbOpts:{weight:100,primary:2137}})}runEditorCommand(o,e,t){var i;(i=Hm.get(e))===null||i===void 0||i.changeDropType()}});_0(VT);li.as(ba.Configuration).registerConfiguration({...Ky,properties:{[CH]:{type:"object",scope:5,description:m("defaultProviderDescription","Configures the default drop provider to use for content of a given mime type."),default:{},additionalProperties:{type:"string"}}}});class Gn{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 n=i.options;if(n===Gn._FIND_MATCH_DECORATION||n===Gn._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(i.id)}return 0}setCurrentFindMatch(e){let t=null,i=0;if(e)for(let n=0,s=this._decorations.length;n<s;n++){const r=this._editor.getModel().getDecorationRange(this._decorations[n]);if(e.equalsRange(r)){t=this._decorations[n],i=n+1;break}}return(this._highlightedDecorationId!==null||t!==null)&&this._editor.changeDecorations(n=>{if(this._highlightedDecorationId!==null&&(n.changeDecorationOptions(this._highlightedDecorationId,Gn._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,n.changeDecorationOptions(this._highlightedDecorationId,Gn._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let s=this._editor.getModel().getDecorationRange(t);if(s.startLineNumber!==s.endLineNumber&&s.endColumn===1){const r=s.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(r);s=new D(s.startLineNumber,s.startColumn,r,a)}this._rangeHighlightDecorationId=n.addDecoration(s,Gn._RANGE_HIGHLIGHT_DECORATION)}}),i}set(e,t){this._editor.changeDecorations(i=>{let n=Gn._FIND_MATCH_DECORATION;const s=[];if(e.length>1e3){n=Gn._FIND_MATCH_NO_OVERVIEW_DECORATION;const a=this._editor.getModel().getLineCount(),d=this._editor.getLayoutInfo().height/a,c=Math.max(2,Math.ceil(3/d));let h=e[0].range.startLineNumber,u=e[0].range.endLineNumber;for(let g=1,f=e.length;g<f;g++){const p=e[g].range;u+c>=p.startLineNumber?p.endLineNumber>u&&(u=p.endLineNumber):(s.push({range:new D(h,1,u,1),options:Gn._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),h=p.startLineNumber,u=p.endLineNumber)}s.push({range:new D(h,1,u,1),options:Gn._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:n};this._decorations=i.deltaDecorations(this._decorations,r),this._overviewRulerApproximateDecorations=i.deltaDecorations(this._overviewRulerApproximateDecorations,s),this._rangeHighlightDecorationId&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(a=>i.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>i.addDecoration(a,Gn._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],n=this._editor.getModel().getDecorationRange(i);if(!(!n||n.endLineNumber>e.lineNumber)){if(n.endLineNumber<e.lineNumber)return n;if(!(n.endColumn>e.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,i=this._decorations.length;t<i;t++){const n=this._decorations[t],s=this._editor.getModel().getDecorationRange(n);if(!(!s||s.startLineNumber<e.lineNumber)){if(s.startLineNumber>e.lineNumber)return s;if(!(s.startColumn<e.column))return s}}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}}Gn._CURRENT_FIND_MATCH_DECORATION=ze.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:hi(qR),position:Do.Center},minimap:{color:hi(vf),position:Ys.Inline}});Gn._FIND_MATCH_DECORATION=ze.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:hi(qR),position:Do.Center},minimap:{color:hi(vf),position:Ys.Inline}});Gn._FIND_MATCH_NO_OVERVIEW_DECORATION=ze.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0});Gn._FIND_MATCH_ONLY_OVERVIEW_DECORATION=ze.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:hi(qR),position:Do.Center}});Gn._RANGE_HIGHLIGHT_DECORATION=ze.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0});Gn._FIND_SCOPE_DECORATION=ze.register({description:"find-scope",className:"findScope",isWholeLine:!0});class Wme{constructor(e,t,i){this._editorSelection=e,this._ranges=t,this._replaceStrings=i,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){const i=[];for(let r=0;r<this._ranges.length;r++)i.push({range:this._ranges[r],text:this._replaceStrings[r]});i.sort((r,a)=>D.compareRangesUsingStarts(r.range,a.range));const n=[];let s=i[0];for(let r=1;r<i.length;r++)s.range.endLineNumber===i[r].range.startLineNumber&&s.range.endColumn===i[r].range.startColumn?(s.range=s.range.plusRange(i[r].range),s.text=s.text+i[r].text):(n.push(s),s=i[r]);n.push(s);for(const r of n)t.addEditOperation(r.range,r.text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)}}function yH(o,e){if(o&&o[0]!==""){const t=R3(o,e,"-"),i=R3(o,e,"_");return t&&!i?A3(o,e,"-"):!t&&i?A3(o,e,"_"):o[0].toUpperCase()===o[0]?e.toUpperCase():o[0].toLowerCase()===o[0]?e.toLowerCase():gj(o[0][0])&&e.length>0?e[0].toUpperCase()+e.substr(1):o[0][0].toUpperCase()!==o[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function R3(o,e,t){return o[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&o[0].split(t).length===e.split(t).length}function A3(o,e,t){const i=e.split(t),n=o[0].split(t);let s="";return i.forEach((r,a)=>{s+=yH([n[a]],r)+t}),s.slice(0,-1)}class P3{constructor(e){this.staticValue=e,this.kind=0}}class Vme{constructor(e){this.pieces=e,this.kind=1}}class zm{static fromStaticValue(e){return new zm([Pu.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(e){!e||e.length===0?this._state=new P3(""):e.length===1&&e[0].staticValue!==null?this._state=new P3(e[0].staticValue):this._state=new Vme(e)}buildReplaceString(e,t){if(this._state.kind===0)return t?yH(e,this._state.staticValue):this._state.staticValue;let i="";for(let n=0,s=this._state.pieces.length;n<s;n++){const r=this._state.pieces[n];if(r.staticValue!==null){i+=r.staticValue;continue}let a=zm._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}}class Pu{static staticValue(e){return new Pu(e,-1,null)}static caseOps(e,t){return new Pu(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)}}class Hme{constructor(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e}emitStatic(e,t){this._emitStatic(e),this._lastCharIndex=t}_emitStatic(e){e.length!==0&&(this._currentStaticPiece+=e)}emitMatchIndex(e,t,i){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=Pu.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=Pu.caseOps(e,i),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=Pu.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new zm(this._result)}}function zme(o){if(!o||o.length===0)return new zm(null);const e=[],t=new Hme(o);for(let i=0,n=o.length;i<n;i++){const s=o.charCodeAt(i);if(s===92){if(i++,i>=n)break;const r=o.charCodeAt(i);switch(r){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic(`
|