function e(e,t,...i){return function(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,i){const n=i[0];return void 0!==t[n]?t[n]:e})),i}(t,i)}var t;const i="en";let n,o,s,r=!1,a=!1,l=!1,c=!1,d=!1,h=!1,u=i;const g="object"==typeof self?self:"object"==typeof global?global:{};let p;void 0!==g.vscode&&void 0!==g.vscode.process?p=g.vscode.process:"undefined"!=typeof process&&(p=process);const m="string"==typeof(null===(t=null==p?void 0:p.versions)||void 0===t?void 0:t.electron)&&"renderer"===(null==p?void 0:p.type);if("object"!=typeof navigator||m)if("object"==typeof p){r="win32"===p.platform,a="darwin"===p.platform,l="linux"===p.platform,l&&p.env.SNAP&&p.env.SNAP_REVISION,n=i,u=i;const e=p.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),s=t.availableLanguages["*"];n=t.locale,u=s||i,o=t._translationsConfigFile}catch(Vr){}c=!0}else console.error("Unable to resolve platform.");else s=navigator.userAgent,r=s.indexOf("Windows")>=0,a=s.indexOf("Macintosh")>=0,h=(s.indexOf("Macintosh")>=0||s.indexOf("iPad")>=0||s.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,l=s.indexOf("Linux")>=0,d=!0,n=navigator.language,u=n;const f=r,_=a,A=l,b=c,w=d,C=h,v=s,y=u,x=(()=>{if("function"==typeof g.postMessage&&!g.importScripts){let e=[];g.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=e.length;i{const n=++t;e.push({id:n,callback:i}),g.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),S=a||h?2:r?1:3;let E=!0,k=!1;function D(){if(!k){k=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);E=513===t[0]}return E}const I=!!(v&&v.indexOf("Chrome")>=0),L=!!(v&&v.indexOf("Firefox")>=0),N=!!(!I&&v&&v.indexOf("Safari")>=0),T=!!(v&&v.indexOf("Edg/")>=0);v&&v.indexOf("Android");const M="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";const R=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of M)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}();function B(e){let t=R;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const O={maxLen:1e3,windowSize:15,timeBudget:150};function F(e,t,i,n,o=O){if(i.length>o.maxLen){let s=e-o.maxLen/2;return s<0?s=0:n+=s,F(e,t,i=i.substring(s,e+o.maxLen/2),n,o)}const s=Date.now(),r=e-1-n;let a=-1,l=null;for(let e=1;!(Date.now()-s>=o.timeBudget);e++){const n=r-o.windowSize*e;t.lastIndex=Math.max(0,n);const s=P(t,i,r,a);if(!s&&l)break;if(l=s,n<=0)break;a=n}if(l){const e={word:l[0],startColumn:n+1+l.index,endColumn:n+1+l.index+l[0].length};return t.lastIndex=0,e}return null}function P(e,t,i,n){let o;for(;o=e.exec(t);){const t=o.index||0;if(t<=i&&e.lastIndex>=i)return o;if(n>0&&t>n)return null}return null}function z(e,t=0){return e[e.length-(1+t)]}function V(e,t,i=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n0))return s;o=s-1}}return-(n+1)}function W(e,t){let i=0,n=e.length;if(0===n)return 0;for(;i=t.length)throw new TypeError("invalid index");let n=t[Math.floor(t.length*Math.random())],o=[],s=[],r=[];for(let e of t){const t=i(e,n);t<0?o.push(e):t>0?s.push(e):r.push(e)}return e!!e))}function K(e){return!Array.isArray(e)||0===e.length}function G(e){return Array.isArray(e)&&e.length>0}function Y(e,t=e=>e){const i=new Set;return e.filter((e=>{const n=t(e);return!i.has(n)&&(i.add(n),!0)}))}function $(e,t){return e.length>0?e[0]:t}function q(e){return[].concat(...e)}function J(e,t){let i="number"==typeof t?e:0;"number"==typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let e=i;et;e--)n.push(e);return n}function X(e,t,i){const n=e.slice(0,t),o=e.slice(t);return n.concat(i,o)}function Z(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function ee(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function te(e){return Array.isArray(e)?e:[e]}function ie(e,t,i,n){const o=ne(e,t),s=e.splice(o,i);return function(e,t,i){const n=ne(e,t),o=e.length,s=i.length;e.length=o+s;for(let t=o-1;t>=n;t--)e[t+s]=e[t];for(let t=0;tt(e(i),e(n))}const se=(e,t)=>e-t;function re(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n0&&(i=o)}return i}class ae{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}takeWhile(e){let t=this.firstIdx;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(){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}}function le(e){return Array.isArray(e)}function ce(e){return"string"==typeof e}function de(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function he(e){return"number"==typeof e&&!isNaN(e)}function ue(e){return!0===e||!1===e}function ge(e){return void 0===e}function pe(e){return!me(e)}function me(e){return ge(e)||null===e}function fe(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function _e(e){if(me(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function Ae(e){return"function"==typeof e}function be(e,t){if(ce(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(Ae(t)){try{if(e instanceof t)return}catch(e){}if(!me(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function we(e){const t=[];for(const i of function(e){let t=[],i=Object.getPrototypeOf(e);for(;Object.prototype!==i;)t=t.concat(Object.getOwnPropertyNames(i)),i=Object.getPrototypeOf(i);return t}(e))"function"==typeof e[i]&&t.push(i);return t}function Ce(e){return null===e?void 0:e}function ve(e,t="Unreachable"){throw new Error(t)}function ye(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((i=>{e[i]&&"object"==typeof e[i]?t[i]=ye(e[i]):t[i]=e[i]})),t}const xe=Object.prototype.hasOwnProperty;function Se(e,t){return Ee(e,t,new Set)}function Ee(e,t,i){if(me(e))return e;const n=t(e);if(void 0!==n)return n;if(le(e)){const n=[];for(const o of e)n.push(Ee(o,t,i));return n}if(de(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(let o in e)xe.call(e,o)&&(n[o]=Ee(e[o],t,i));return i.delete(e),n}return e}function ke(e,t,i=!0){return de(e)?(de(t)&&Object.keys(t).forEach((n=>{n in e?i&&(de(e[n])&&de(t[n])?ke(e[n],t[n],i):e[n]=t[n]):e[n]=t[n]})),e):t}function De(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;ii?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(We.float(e,this.defaultValue))}}class Ue extends Fe{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n=void 0){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return Ue.string(e,this.defaultValue)}}function Qe(e,t,i){return"string"!=typeof e||-1===i.indexOf(e)?t:e}class je extends Fe{constructor(e,t,i,n,o=void 0){void 0!==o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return Qe(e,this.defaultValue,this._allowedValues)}}class Ke extends Me{constructor(e,t,i,n,o,s,r=void 0){void 0!==r&&(r.type="string",r.enum=o,r.default=n),super(e,t,i,r),this._allowedValues=o,this._convert=s}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var Ge;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(Ge||(Ge={}));class Ye extends Me{constructor(){super(45,"fontLigatures",Ye.OFF,{anyOf:[{type:"boolean",description:e(0,"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:e(0,"Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:e(0,"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 void 0===e?this.defaultValue:"string"==typeof e?"false"===e?Ye.OFF:"true"===e?Ye.ON:e:Boolean(e)?Ye.ON:Ye.OFF}}Ye.OFF='"liga" off, "calt" off',Ye.ON='"liga" on, "calt" on';class $e extends Me{constructor(){super(47,"fontWeight",lt.fontWeight,{anyOf:[{type:"number",minimum:$e.MINIMUM_VALUE,maximum:$e.MAXIMUM_VALUE,errorMessage:e(0,'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:$e.SUGGESTION_VALUES}],default:lt.fontWeight,description:e(0,'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(He.clampedInt(e,lt.fontWeight,$e.MINIMUM_VALUE,$e.MAXIMUM_VALUE))}}$e.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],$e.MINIMUM_VALUE=1,$e.MAXIMUM_VALUE=1e3;class qe extends Oe{constructor(){super(131)}compute(e,t,i){return qe.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})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:Math.floor(e.viewLineCount/n)}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,o=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(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const s=t.stableMinimapLayoutInput,r=s&&e.outerHeight===s.outerHeight&&e.lineHeight===s.lineHeight&&e.typicalHalfwidthCharacterWidth===s.typicalHalfwidthCharacterWidth&&e.pixelRatio===s.pixelRatio&&e.scrollBeyondLastLine===s.scrollBeyondLastLine&&e.minimap.enabled===s.minimap.enabled&&e.minimap.side===s.minimap.side&&e.minimap.size===s.minimap.size&&e.minimap.showSlider===s.minimap.showSlider&&e.minimap.renderCharacters===s.minimap.renderCharacters&&e.minimap.maxColumn===s.minimap.maxColumn&&e.minimap.scale===s.minimap.scale&&e.verticalScrollbarWidth===s.verticalScrollbarWidth&&e.isViewportWrapping===s.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,d=e.minimap.renderCharacters;let h=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const u=e.minimap.maxColumn,g=e.minimap.size,p=e.minimap.side,m=e.verticalScrollbarWidth,f=e.viewLineCount,_=e.remainingWidth,A=e.isViewportWrapping,b=d?2:3;let w=Math.floor(o*n);const C=w/o;let v=!1,y=!1,x=b*h,S=h/o,E=1;if("fill"===g||"fit"===g){const{typicalViewportLineCount:i,extraLinesBeyondLastLine:s,desiredRatio:l,minimapLineCount:d}=qe.computeContainedMinimapLineCount({viewLineCount:f,scrollBeyondLastLine:c,height:n,lineHeight:a,pixelRatio:o});if(f/d>1)v=!0,y=!0,h=1,x=1,S=h/o;else{let n=!1,c=h+1;if("fit"===g){const e=Math.ceil((f+s)*x);A&&r&&_<=t.stableFitRemainingWidth?(n=!0,c=t.stableFitMaxMinimapScale):n=e>w}if("fill"===g||n){v=!0;const n=h;x=Math.min(a*o,Math.max(1,Math.floor(1/l))),A&&r&&_<=t.stableFitRemainingWidth&&(c=t.stableFitMaxMinimapScale),h=Math.min(c,Math.max(1,Math.floor(x/b))),h>n&&(E=Math.min(2,h/n)),S=h/o/E,w=Math.ceil(Math.max(i,f+s)*x),A?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=_,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const k=Math.floor(u*S),D=Math.min(k,Math.max(0,Math.floor((_-m-2)*S/(l+S)))+8);let I=Math.floor(o*D);const L=I/o;I=Math.floor(I*E);return{renderMinimap:d?1:2,minimapLeft:"left"===p?0:i-D-m,minimapWidth:D,minimapHeightIsEditorHeight:v,minimapIsSampling:y,minimapScale:h,minimapLineHeight:x,minimapCanvasInnerWidth:I,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:L,minimapCanvasOuterHeight:C}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,o=0|t.lineHeight,s=0|t.lineNumbersDigitCount,r=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,c=t.viewLineCount,d=e.get(123),h="inherit"===d?e.get(122):d,u="inherit"===h?e.get(118):h,g=e.get(121),p=e.get(2),m=t.isDominatedByLongLines,f=e.get(50),_=0!==e.get(60).renderType,A=e.get(61),b=e.get(94),w=e.get(65),C=e.get(92),v=C.verticalScrollbarSize,y=C.verticalHasArrows,x=C.arrowSize,S=C.horizontalScrollbarSize,E=e.get(58),k=e.get(37);let D;if("string"==typeof E&&/^\d+(\.\d+)?ch$/.test(E)){const e=parseFloat(E.substr(0,E.length-2));D=He.clampedInt(e*r,0,0,1e3)}else D=He.clampedInt(E,0,0,1e3);k&&(D+=16);let I=0;if(_){const e=Math.max(s,A);I=Math.round(e*a)}let L=0;f&&(L=o);let N=0,T=N+L,M=T+I,R=M+D;const B=i-L-I-D;let O=!1,F=!1,P=-1;2!==p&&("inherit"===h&&m?(O=!0,F=!0):"on"===u||"bounded"===u?F=!0:"wordWrapColumn"===u&&(P=g));const z=qe._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:r,pixelRatio:l,scrollBeyondLastLine:b,minimap:w,verticalScrollbarWidth:v,viewLineCount:c,remainingWidth:B,isViewportWrapping:F},t.memory||new Te);0!==z.renderMinimap&&0===z.minimapLeft&&(N+=z.minimapWidth,T+=z.minimapWidth,M+=z.minimapWidth,R+=z.minimapWidth);const V=B-z.minimapWidth,H=Math.max(1,Math.floor((V-v-2)/r)),W=y?x:0;return F&&(P=Math.max(1,H),"bounded"===u&&(P=Math.min(P,g))),{width:i,height:n,glyphMarginLeft:N,glyphMarginWidth:L,lineNumbersLeft:T,lineNumbersWidth:I,decorationsLeft:M,decorationsWidth:D,contentLeft:R,contentWidth:V,minimap:z,viewportColumn:H,isWordWrapMinified:O,isViewportWrapping:F,wrappingColumn:P,verticalScrollbarWidth:v,horizontalScrollbarHeight:S,overviewRuler:{top:W,width:v,height:n-2*W,right:0}}}}function Je(e){const t=e.get(87);return"editable"===t?e.get(81):"on"!==t}function Xe(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}const Ze="inUntrustedWorkspace",et="editor.unicodeHighlight.allowedCharacters",tt="editor.unicodeHighlight.invisibleCharacters",it="editor.unicodeHighlight.nonBasicASCII",nt="editor.unicodeHighlight.ambiguousCharacters",ot="editor.unicodeHighlight.includeComments",st="editor.unicodeHighlight.includeStrings",rt="editor.unicodeHighlight.allowedLocales";function at(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}const lt={fontFamily:_?"Menlo, Monaco, 'Courier New', monospace":A?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:_?12:14,lineHeight:0,letterSpacing:0},ct=[];function dt(e){return ct[e.id]=e,e}const ht={acceptSuggestionOnCommitCharacter:dt(new ze(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:e(0,"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:dt(new je(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",e(0,"Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:e(0,"Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:dt(new class extends Me{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[e(0,"The editor will use platform APIs to detect when a Screen Reader is attached."),e(0,"The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),e(0,"The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:e(0,"Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:dt(new He(3,"accessibilityPageSize",10,1,1073741824,{description:e(0,"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.")})),ariaLabel:dt(new Ue(4,"ariaLabel",e(0,"Editor content"))),autoClosingBrackets:dt(new je(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",e(0,"Use language configurations to determine when to autoclose brackets."),e(0,"Autoclose brackets only when the cursor is to the left of whitespace."),""],description:e(0,"Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:dt(new je(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",e(0,"Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:e(0,"Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:dt(new je(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",e(0,"Type over closing quotes or brackets only if they were automatically inserted."),""],description:e(0,"Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:dt(new je(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",e(0,"Use language configurations to determine when to autoclose quotes."),e(0,"Autoclose quotes only when the cursor is to the left of whitespace."),""],description:e(0,"Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:dt(new Ke(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[e(0,"The editor will not insert indentation automatically."),e(0,"The editor will keep the current line's indentation."),e(0,"The editor will keep the current line's indentation and honor language defined brackets."),e(0,"The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),e(0,"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:e(0,"Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:dt(new ze(10,"automaticLayout",!1)),autoSurround:dt(new je(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[e(0,"Use language configurations to determine when to automatically surround selections."),e(0,"Surround with quotes but not brackets."),e(0,"Surround with brackets but not quotes."),""],description:e(0,"Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:dt(new class extends Me{constructor(){const t={enabled:Le.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",t,{"editor.bracketPairColorization.enabled":{type:"boolean",default:t.enabled,description:e(0,"Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;return{enabled:Pe(e.enabled,this.defaultValue.enabled)}}}),bracketPairGuides:dt(new class extends Me{constructor(){const t={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",t,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[e(0,"Enables bracket pair guides."),e(0,"Enables bracket pair guides only for the active bracket pair."),e(0,"Disables bracket pair guides.")],default:t.bracketPairs,description:e(0,"Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[e(0,"Enables horizontal guides as addition to vertical bracket pair guides."),e(0,"Enables horizontal guides only for the active bracket pair."),e(0,"Disables horizontal bracket pair guides.")],default:t.bracketPairsHorizontal,description:e(0,"Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:t.highlightActiveBracketPair,description:e(0,"Controls whether bracket pair guides are enabled or not.")},"editor.guides.indentation":{type:"boolean",default:t.indentation,description:e(0,"Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:"boolean",default:t.highlightActiveIndentation,description:e(0,"Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{bracketPairs:at(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:at(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:Pe(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:Pe(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:Pe(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}),stickyTabStops:dt(new ze(104,"stickyTabStops",!1,{description:e(0,"Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:dt(new ze(14,"codeLens",!0,{description:e(0,"Controls whether the editor shows CodeLens.")})),codeLensFontFamily:dt(new Ue(15,"codeLensFontFamily","",{description:e(0,"Controls the font family for CodeLens.")})),codeLensFontSize:dt(new He(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:e(0,"Controls the font size in pixels for CodeLens. When set to `0`, 90% of `#editor.fontSize#` is used.")})),colorDecorators:dt(new ze(17,"colorDecorators",!0,{description:e(0,"Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:dt(new ze(18,"columnSelection",!1,{description:e(0,"Enable that the selection with the mouse and keys is doing column selection.")})),comments:dt(new class extends Me{constructor(){const t={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",t,{"editor.comments.insertSpace":{type:"boolean",default:t.insertSpace,description:e(0,"Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:t.ignoreEmptyLines,description:e(0,"Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:Pe(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Pe(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:dt(new ze(20,"contextmenu",!0)),copyWithSyntaxHighlighting:dt(new ze(21,"copyWithSyntaxHighlighting",!0,{description:e(0,"Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:dt(new Ke(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:e(0,"Control the cursor animation style.")})),cursorSmoothCaretAnimation:dt(new ze(23,"cursorSmoothCaretAnimation",!1,{description:e(0,"Controls whether the smooth caret animation should be enabled.")})),cursorStyle:dt(new Ke(24,"cursorStyle",Ge.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return Ge.Line;case"block":return Ge.Block;case"underline":return Ge.Underline;case"line-thin":return Ge.LineThin;case"block-outline":return Ge.BlockOutline;case"underline-thin":return Ge.UnderlineThin}}),{description:e(0,"Controls the cursor style.")})),cursorSurroundingLines:dt(new He(25,"cursorSurroundingLines",0,0,1073741824,{description:e(0,"Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:dt(new je(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[e(0,"`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),e(0,"`cursorSurroundingLines` is enforced always.")],description:e(0,"Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:dt(new He(27,"cursorWidth",0,0,1073741824,{markdownDescription:e(0,"Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:dt(new ze(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:dt(new ze(29,"disableMonospaceOptimizations",!1)),domReadOnly:dt(new ze(30,"domReadOnly",!1)),dragAndDrop:dt(new ze(31,"dragAndDrop",!0,{description:e(0,"Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:dt(new class extends ze{constructor(){super(32,"emptySelectionClipboard",!0,{description:e(0,"Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),extraEditorClassName:dt(new Ue(33,"extraEditorClassName","")),fastScrollSensitivity:dt(new We(34,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:e(0,"Scrolling speed multiplier when pressing `Alt`.")})),find:dt(new class extends Me{constructor(){const t={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",t,{"editor.find.cursorMoveOnType":{type:"boolean",default:t.cursorMoveOnType,description:e(0,"Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:t.seedSearchStringFromSelection,enumDescriptions:[e(0,"Never seed search string from the editor selection."),e(0,"Always seed search string from the editor selection, including word at cursor position."),e(0,"Only seed search string from the editor selection.")],description:e(0,"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:t.autoFindInSelection,enumDescriptions:[e(0,"Never turn on Find in Selection automatically (default)."),e(0,"Always turn on Find in Selection automatically."),e(0,"Turn on Find in Selection automatically when multiple lines of content are selected.")],description:e(0,"Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:t.globalFindClipboard,description:e(0,"Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:_},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:t.addExtraSpaceOnTop,description:e(0,"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:t.loop,description:e(0,"Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:Pe(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":Qe(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":Qe(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Pe(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Pe(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Pe(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:dt(new ze(36,"fixedOverflowWidgets",!1)),folding:dt(new ze(37,"folding",!0,{description:e(0,"Controls whether the editor has code folding enabled.")})),foldingStrategy:dt(new je(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[e(0,"Use a language-specific folding strategy if available, else the indentation-based one."),e(0,"Use the indentation-based folding strategy.")],description:e(0,"Controls the strategy for computing folding ranges.")})),foldingHighlight:dt(new ze(39,"foldingHighlight",!0,{description:e(0,"Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:dt(new ze(40,"foldingImportsByDefault",!1,{description:e(0,"Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:dt(new He(41,"foldingMaximumRegions",5e3,10,65e3,{description:e(0,"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:dt(new ze(42,"unfoldOnClickAfterEndOfLine",!1,{description:e(0,"Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:dt(new Ue(43,"fontFamily",lt.fontFamily,{description:e(0,"Controls the font family.")})),fontInfo:dt(new class extends Oe{constructor(){super(44)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:dt(new Ye),fontSize:dt(new class extends Fe{constructor(){super(46,"fontSize",lt.fontSize,{type:"number",minimum:6,maximum:100,default:lt.fontSize,description:e(0,"Controls the font size in pixels.")})}validate(e){const t=We.float(e,this.defaultValue);return 0===t?lt.fontSize:We.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:dt(new $e),formatOnPaste:dt(new ze(48,"formatOnPaste",!1,{description:e(0,"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:dt(new ze(49,"formatOnType",!1,{description:e(0,"Controls whether the editor should automatically format the line after typing.")})),glyphMargin:dt(new ze(50,"glyphMargin",!0,{description:e(0,"Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:dt(new class extends Me{constructor(){const t={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:""},i={type:"string",enum:["peek","gotoAndPeek","goto"],default:t.multiple,enumDescriptions:[e(0,"Show peek view of the results (default)"),e(0,"Go to the primary result and show a peek view"),e(0,"Go to the primary result and enable peek-less navigation to others")]},n=["","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(51,"gotoLocation",t,{"editor.gotoLocation.multiple":{deprecationMessage:e(0,"This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:e(0,"Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},i),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:e(0,"Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},i),"editor.gotoLocation.multipleDeclarations":Object.assign({description:e(0,"Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},i),"editor.gotoLocation.multipleImplementations":Object.assign({description:e(0,"Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},i),"editor.gotoLocation.multipleReferences":Object.assign({description:e(0,"Controls the behavior the 'Go to References'-command when multiple target locations exist.")},i),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:t.alternativeDefinitionCommand,enum:n,description:e(0,"Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:t.alternativeTypeDefinitionCommand,enum:n,description:e(0,"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:t.alternativeDeclarationCommand,enum:n,description:e(0,"Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:t.alternativeImplementationCommand,enum:n,description:e(0,"Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:t.alternativeReferenceCommand,enum:n,description:e(0,"Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,s;if(!e||"object"!=typeof e)return this.defaultValue;const r=e;return{multiple:Qe(r.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=r.multipleDefinitions)&&void 0!==t?t:Qe(r.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=r.multipleTypeDefinitions)&&void 0!==i?i:Qe(r.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=r.multipleDeclarations)&&void 0!==n?n:Qe(r.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=r.multipleImplementations)&&void 0!==o?o:Qe(r.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(s=r.multipleReferences)&&void 0!==s?s:Qe(r.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:Ue.string(r.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:Ue.string(r.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:Ue.string(r.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:Ue.string(r.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:Ue.string(r.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:dt(new ze(52,"hideCursorInOverviewRuler",!1,{description:e(0,"Controls whether the cursor should be hidden in the overview ruler.")})),hover:dt(new class extends Me{constructor(){const t={enabled:!0,delay:300,sticky:!0,above:!0};super(53,"hover",t,{"editor.hover.enabled":{type:"boolean",default:t.enabled,description:e(0,"Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:t.delay,minimum:0,maximum:1e4,description:e(0,"Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:t.sticky,description:e(0,"Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:t.above,description:e(0,"Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:Pe(t.enabled,this.defaultValue.enabled),delay:He.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:Pe(t.sticky,this.defaultValue.sticky),above:Pe(t.above,this.defaultValue.above)}}}),inDiffEditor:dt(new ze(54,"inDiffEditor",!1)),letterSpacing:dt(new We(56,"letterSpacing",lt.letterSpacing,(e=>We.clamp(e,-5,20)),{description:e(0,"Controls the letter spacing in pixels.")})),lightbulb:dt(new class extends Me{constructor(){const t={enabled:!0};super(57,"lightbulb",t,{"editor.lightbulb.enabled":{type:"boolean",default:t.enabled,description:e(0,"Enables the code action lightbulb in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;return{enabled:Pe(e.enabled,this.defaultValue.enabled)}}}),lineDecorationsWidth:dt(new Fe(58,"lineDecorationsWidth",10)),lineHeight:dt(new class extends We{constructor(){super(59,"lineHeight",lt.lineHeight,(e=>We.clamp(e,0,150)),{markdownDescription:e(0,"Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:dt(new class extends Me{constructor(){super(60,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[e(0,"Line numbers are not rendered."),e(0,"Line numbers are rendered as absolute number."),e(0,"Line numbers are rendered as distance in lines to cursor position."),e(0,"Line numbers are rendered every 10 lines.")],default:"on",description:e(0,"Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:dt(new He(61,"lineNumbersMinChars",5,1,300)),linkedEditing:dt(new ze(62,"linkedEditing",!1,{description:e(0,"Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:dt(new ze(63,"links",!0,{description:e(0,"Controls whether the editor should detect links and make them clickable.")})),matchBrackets:dt(new je(64,"matchBrackets","always",["always","near","never"],{description:e(0,"Highlight matching brackets.")})),minimap:dt(new class extends Me{constructor(){const t={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(65,"minimap",t,{"editor.minimap.enabled":{type:"boolean",default:t.enabled,description:e(0,"Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[e(0,"The minimap has the same size as the editor contents (and might scroll)."),e(0,"The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),e(0,"The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:t.size,description:e(0,"Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:t.side,description:e(0,"Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:t.showSlider,description:e(0,"Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:t.scale,minimum:1,maximum:3,enum:[1,2,3],description:e(0,"Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:t.renderCharacters,description:e(0,"Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:t.maxColumn,description:e(0,"Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:Pe(t.enabled,this.defaultValue.enabled),size:Qe(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Qe(t.side,this.defaultValue.side,["right","left"]),showSlider:Qe(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Pe(t.renderCharacters,this.defaultValue.renderCharacters),scale:He.clampedInt(t.scale,1,1,3),maxColumn:He.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:dt(new je(66,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:dt(new We(67,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:e(0,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:dt(new ze(68,"mouseWheelZoom",!1,{markdownDescription:e(0,"Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:dt(new ze(69,"multiCursorMergeOverlapping",!0,{description:e(0,"Merge multiple cursors when they are overlapping.")})),multiCursorModifier:dt(new Ke(70,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?_?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[e(0,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),e(0,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:e(0,"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. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:dt(new je(71,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[e(0,"Each cursor pastes a single line of the text."),e(0,"Each cursor pastes the full text.")],markdownDescription:e(0,"Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:dt(new ze(72,"occurrencesHighlight",!0,{description:e(0,"Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:dt(new ze(73,"overviewRulerBorder",!0,{description:e(0,"Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:dt(new He(74,"overviewRulerLanes",3,0,3)),padding:dt(new class extends Me{constructor(){super(75,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:e(0,"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:e(0,"Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:He.clampedInt(t.top,0,0,1e3),bottom:He.clampedInt(t.bottom,0,0,1e3)}}}),parameterHints:dt(new class extends Me{constructor(){const t={enabled:!0,cycle:!1};super(76,"parameterHints",t,{"editor.parameterHints.enabled":{type:"boolean",default:t.enabled,description:e(0,"Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:t.cycle,description:e(0,"Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:Pe(t.enabled,this.defaultValue.enabled),cycle:Pe(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:dt(new je(77,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[e(0,"Focus the tree when opening peek"),e(0,"Focus the editor when opening peek")],description:e(0,"Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:dt(new ze(78,"definitionLinkOpensInPeek",!1,{description:e(0,"Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:dt(new class extends Me{constructor(){const t={other:!0,comments:!1,strings:!1};super(79,"quickSuggestions",t,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:t.strings,description:e(0,"Enable quick suggestions inside strings.")},comments:{type:"boolean",default:t.comments,description:e(0,"Enable quick suggestions inside comments.")},other:{type:"boolean",default:t.other,description:e(0,"Enable quick suggestions outside of strings and comments.")}}}],default:t,description:e(0,"Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=t}validate(e){if("boolean"==typeof e)return e;if(e&&"object"==typeof e){const t=e,i={other:Pe(t.other,this.defaultValue.other),comments:Pe(t.comments,this.defaultValue.comments),strings:Pe(t.strings,this.defaultValue.strings)};return!!(i.other&&i.comments&&i.strings)||!!(i.other||i.comments||i.strings)&&i}return this.defaultValue}}),quickSuggestionsDelay:dt(new He(80,"quickSuggestionsDelay",10,0,1073741824,{description:e(0,"Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:dt(new ze(81,"readOnly",!1)),renameOnType:dt(new ze(82,"renameOnType",!1,{description:e(0,"Controls whether the editor auto renames on type."),markdownDeprecationMessage:e(0,"Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:dt(new ze(83,"renderControlCharacters",!0,{description:e(0,"Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:dt(new ze(84,"renderFinalNewline",!0,{description:e(0,"Render last line number when the file ends with a newline.")})),renderLineHighlight:dt(new je(85,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",e(0,"Highlights both the gutter and the current line.")],description:e(0,"Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:dt(new ze(86,"renderLineHighlightOnlyWhenFocus",!1,{description:e(0,"Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:dt(new je(87,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:dt(new je(88,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",e(0,"Render whitespace characters except for single spaces between words."),e(0,"Render whitespace characters only on selected text."),e(0,"Render only trailing whitespace characters."),""],description:e(0,"Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:dt(new He(89,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:dt(new ze(90,"roundedSelection",!0,{description:e(0,"Controls whether selections should have rounded corners.")})),rulers:dt(new class extends Me{constructor(){const t=[],i={type:"number",description:e(0,"Number of monospace characters at which this editor ruler will render.")};super(91,"rulers",t,{type:"array",items:{anyOf:[i,{type:["object"],properties:{column:i,color:{type:"string",description:e(0,"Color of this editor ruler."),format:"color-hex"}}}]},default:t,description:e(0,"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(let i of e)if("number"==typeof i)t.push({column:He.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:He.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:dt(new class extends Me{constructor(){const t={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};super(92,"scrollbar",t,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[e(0,"The vertical scrollbar will be visible only when necessary."),e(0,"The vertical scrollbar will always be visible."),e(0,"The vertical scrollbar will always be hidden.")],default:"auto",description:e(0,"Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[e(0,"The horizontal scrollbar will be visible only when necessary."),e(0,"The horizontal scrollbar will always be visible."),e(0,"The horizontal scrollbar will always be hidden.")],default:"auto",description:e(0,"Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:t.verticalScrollbarSize,description:e(0,"The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:t.horizontalScrollbarSize,description:e(0,"The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:t.scrollByPage,description:e(0,"Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=He.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=He.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:He.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Xe(t.vertical,this.defaultValue.vertical),horizontal:Xe(t.horizontal,this.defaultValue.horizontal),useShadows:Pe(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:Pe(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:Pe(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:Pe(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:Pe(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:He.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:He.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:Pe(t.scrollByPage,this.defaultValue.scrollByPage)}}}),scrollBeyondLastColumn:dt(new He(93,"scrollBeyondLastColumn",5,0,1073741824,{description:e(0,"Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:dt(new ze(94,"scrollBeyondLastLine",!0,{description:e(0,"Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:dt(new ze(95,"scrollPredominantAxis",!0,{description:e(0,"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:dt(new ze(96,"selectionClipboard",!0,{description:e(0,"Controls whether the Linux primary clipboard should be supported."),included:A})),selectionHighlight:dt(new ze(97,"selectionHighlight",!0,{description:e(0,"Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:dt(new ze(98,"selectOnLineNumbers",!0)),showFoldingControls:dt(new je(99,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[e(0,"Always show the folding controls."),e(0,"Only show the folding controls when the mouse is over the gutter.")],description:e(0,"Controls when the folding controls on the gutter are shown.")})),showUnused:dt(new ze(100,"showUnused",!0,{description:e(0,"Controls fading out of unused code.")})),showDeprecated:dt(new ze(126,"showDeprecated",!0,{description:e(0,"Controls strikethrough deprecated variables.")})),inlayHints:dt(new class extends Me{constructor(){const t={enabled:!0,fontSize:0,fontFamily:""};super(127,"inlayHints",t,{"editor.inlayHints.enabled":{type:"boolean",default:t.enabled,description:e(0,"Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:t.fontSize,markdownDescription:e(0,"Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.")},"editor.inlayHints.fontFamily":{type:"string",default:t.fontFamily,markdownDescription:e(0,"Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:Pe(t.enabled,this.defaultValue.enabled),fontSize:He.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:Ue.string(t.fontFamily,this.defaultValue.fontFamily)}}}),snippetSuggestions:dt(new je(101,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[e(0,"Show snippet suggestions on top of other suggestions."),e(0,"Show snippet suggestions below other suggestions."),e(0,"Show snippets suggestions with other suggestions."),e(0,"Do not show snippet suggestions.")],description:e(0,"Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:dt(new class extends Me{constructor(){super(102,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:e(0,"Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:Pe(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}:this.defaultValue}}),smoothScrolling:dt(new ze(103,"smoothScrolling",!1,{description:e(0,"Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:dt(new He(105,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:dt(new class extends Me{constructor(){const t={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!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(106,"suggest",t,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[e(0,"Insert suggestion without overwriting text right of the cursor."),e(0,"Insert suggestion and overwrite text right of the cursor.")],default:t.insertMode,description:e(0,"Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:t.filterGraceful,description:e(0,"Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:t.localityBonus,description:e(0,"Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:t.shareSuggestSelections,markdownDescription:e(0,"Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:t.snippetsPreventQuickSuggestions,description:e(0,"Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:t.showIcons,description:e(0,"Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:t.showStatusBar,description:e(0,"Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:t.preview,description:e(0,"Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:t.showInlineDetails,description:e(0,"Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:e(0,"This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:e(0,"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:e(0,"When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:e(0,"When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:Qe(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:Pe(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:Pe(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:Pe(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:Pe(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:Pe(t.showIcons,this.defaultValue.showIcons),showStatusBar:Pe(t.showStatusBar,this.defaultValue.showStatusBar),preview:Pe(t.preview,this.defaultValue.preview),previewMode:Qe(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:Pe(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:Pe(t.showMethods,this.defaultValue.showMethods),showFunctions:Pe(t.showFunctions,this.defaultValue.showFunctions),showConstructors:Pe(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:Pe(t.showDeprecated,this.defaultValue.showDeprecated),showFields:Pe(t.showFields,this.defaultValue.showFields),showVariables:Pe(t.showVariables,this.defaultValue.showVariables),showClasses:Pe(t.showClasses,this.defaultValue.showClasses),showStructs:Pe(t.showStructs,this.defaultValue.showStructs),showInterfaces:Pe(t.showInterfaces,this.defaultValue.showInterfaces),showModules:Pe(t.showModules,this.defaultValue.showModules),showProperties:Pe(t.showProperties,this.defaultValue.showProperties),showEvents:Pe(t.showEvents,this.defaultValue.showEvents),showOperators:Pe(t.showOperators,this.defaultValue.showOperators),showUnits:Pe(t.showUnits,this.defaultValue.showUnits),showValues:Pe(t.showValues,this.defaultValue.showValues),showConstants:Pe(t.showConstants,this.defaultValue.showConstants),showEnums:Pe(t.showEnums,this.defaultValue.showEnums),showEnumMembers:Pe(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:Pe(t.showKeywords,this.defaultValue.showKeywords),showWords:Pe(t.showWords,this.defaultValue.showWords),showColors:Pe(t.showColors,this.defaultValue.showColors),showFiles:Pe(t.showFiles,this.defaultValue.showFiles),showReferences:Pe(t.showReferences,this.defaultValue.showReferences),showFolders:Pe(t.showFolders,this.defaultValue.showFolders),showTypeParameters:Pe(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:Pe(t.showSnippets,this.defaultValue.showSnippets),showUsers:Pe(t.showUsers,this.defaultValue.showUsers),showIssues:Pe(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:dt(new class extends Me{constructor(){const t={enabled:!0,mode:"subwordSmart"};super(55,"inlineSuggest",t,{"editor.inlineSuggest.enabled":{type:"boolean",default:t.enabled,description:e(0,"Controls whether to automatically show inline suggestions in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:Pe(t.enabled,this.defaultValue.enabled),mode:Qe(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}),suggestFontSize:dt(new He(107,"suggestFontSize",0,0,1e3,{markdownDescription:e(0,"Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:dt(new He(108,"suggestLineHeight",0,0,1e3,{markdownDescription:e(0,"Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:dt(new ze(109,"suggestOnTriggerCharacters",!0,{description:e(0,"Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:dt(new je(110,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[e(0,"Always select the first suggestion."),e(0,"Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),e(0,"Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:e(0,"Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:dt(new je(111,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[e(0,"Tab complete will insert the best matching suggestion when pressing tab."),e(0,"Disable tab completions."),e(0,"Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:e(0,"Enables tab completions.")})),tabIndex:dt(new He(112,"tabIndex",0,-1,1073741824)),unicodeHighlight:dt(new class extends Me{constructor(){const t={nonBasicASCII:Ze,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:Ze,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(113,"unicodeHighlight",t,{[it]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Ze],default:t.nonBasicASCII,description:e(0,"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.")},[tt]:{restricted:!0,type:"boolean",default:t.invisibleCharacters,description:e(0,"Controls whether characters that just reserve space or have no width at all are highlighted.")},[nt]:{restricted:!0,type:"boolean",default:t.ambiguousCharacters,description:e(0,"Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[ot]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Ze],default:t.includeComments,description:e(0,"Controls whether characters in comments should also be subject to unicode highlighting.")},[st]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,Ze],default:t.includeStrings,description:e(0,"Controls whether characters in strings should also be subject to unicode highlighting.")},[et]:{restricted:!0,type:"object",default:t.allowedCharacters,description:e(0,"Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[rt]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:t.allowedLocales,description:e(0,"Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&(De(e.allowedCharacters,t.allowedCharacters)||(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),i=!0)),t.allowedLocales&&(De(e.allowedLocales,t.allowedLocales)||(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),i=!0));const n=super.applyUpdate(e,t);return i?new Re(n.newValue,!0):n}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{nonBasicASCII:at(t.nonBasicASCII,Ze,[!0,!1,Ze]),invisibleCharacters:Pe(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:Pe(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:at(t.includeComments,Ze,[!0,!1,Ze]),includeStrings:at(t.includeStrings,Ze,[!0,!1,Ze]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if("object"!=typeof e||!e)return t;const i={};for(const[t,n]of Object.entries(e))!0===n&&(i[t]=!0);return i}}),unusualLineTerminators:dt(new je(114,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[e(0,"Unusual line terminators are automatically removed."),e(0,"Unusual line terminators are ignored."),e(0,"Unusual line terminators prompt to be removed.")],description:e(0,"Remove unusual line terminators that might cause problems.")})),useShadowDOM:dt(new ze(115,"useShadowDOM",!0)),useTabStops:dt(new ze(116,"useTabStops",!0,{description:e(0,"Inserting and deleting whitespace follows tab stops.")})),wordSeparators:dt(new Ue(117,"wordSeparators",M,{description:e(0,"Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:dt(new je(118,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[e(0,"Lines will never wrap."),e(0,"Lines will wrap at the viewport width."),e(0,"Lines will wrap at `#editor.wordWrapColumn#`."),e(0,"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:e(0,"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:dt(new Ue(119,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:dt(new Ue(120,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:dt(new He(121,"wordWrapColumn",80,1,1073741824,{markdownDescription:e(0,"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:dt(new je(122,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:dt(new je(123,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:dt(new Ke(124,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],(function(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}),{enumDescriptions:[e(0,"No indentation. Wrapped lines begin at column 1."),e(0,"Wrapped lines get the same indentation as the parent."),e(0,"Wrapped lines get +1 indentation toward the parent."),e(0,"Wrapped lines get +2 indentation toward the parent.")],description:e(0,"Controls the indentation of wrapped lines.")})),wrappingStrategy:dt(new je(125,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[e(0,"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."),e(0,"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.")],description:e(0,"Controls the algorithm that computes wrapping points.")})),editorClassName:dt(new class extends Oe{constructor(){super(128)}compute(e,t,i){const n=["monaco-editor"];return t.get(33)&&n.push(t.get(33)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(66)?n.push("mouse-default"):"copy"===t.get(66)&&n.push("mouse-copy"),t.get(100)&&n.push("showUnused"),t.get(126)&&n.push("showDeprecated"),n.join(" ")}}),pixelRatio:dt(new class extends Oe{constructor(){super(129)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:dt(new class extends Oe{constructor(){super(130)}compute(e,t,i){return!!t.get(81)||e.tabFocusMode}}),layoutInfo:dt(new qe),wrappingInfo:dt(new class extends Oe{constructor(){super(132)}compute(e,t,i){const n=t.get(131);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}})};const ut=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function gt(e){_t(e)||ut.onUnexpectedError(e)}function pt(e){_t(e)||ut.onUnexpectedExternalError(e)}function mt(e){if(e instanceof Error){let{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack}}return e}const ft="Canceled";function _t(e){return e instanceof At||e instanceof Error&&e.name===ft&&e.message===ft}class At extends Error{constructor(){super(ft),this.name=this.message}}function bt(){const e=new Error(ft);return e.name=e.message,e}function wt(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}class Ct extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}function vt(e){const t=this;let i,n=!1;return function(){return n||(n=!0,i=e.apply(t,arguments)),i}}var yt;!function(e){e.is=function(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]};const t=Object.freeze([]);e.empty=function(){return t},e.single=function*(e){yield e},e.from=function(e){return e||t},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const i of e)if(t(i))return!0;return!1},e.find=function(e,t){for(const i of e)if(t(i))return i},e.filter=function*(e,t){for(const i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(const n of e)yield t(n,i++)},e.concat=function*(...e){for(const t of e)for(const e of t)yield e},e.concatNested=function*(e){for(const t of e)for(const e of t)yield e},e.reduce=function(e,t,i){let n=i;for(const i of e)n=t(n,i);return n},e.slice=function*(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);to}]},e.equals=function(e,t,i=(e,t)=>e===t){const n=e[Symbol.iterator](),o=t[Symbol.iterator]();for(;;){const e=n.next(),t=o.next();if(e.done!==t.done)return!1;if(e.done)return!0;if(!i(e.value,t.value))return!1}}}(yt||(yt={}));class xt extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function St(e){return"function"==typeof e.dispose&&0===e.dispose.length}function Et(e){if(yt.is(e)){let t=[];for(const i of e)if(i)try{i.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new xt(t);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function kt(...e){return Dt((()=>Et(e)))}function Dt(e){return{dispose:vt((()=>{e()}))}}class It{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){try{Et(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?It.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}It.DISABLE_DISPOSED_WARNING=!1;class Lt{constructor(){this._store=new It,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}Lt.None=Object.freeze({dispose(){}});class Nt{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}clearAndLeak(){const e=this._value;return this._value=void 0,e}}class Tt{constructor(e){this.object=e}dispose(){}}class Mt{constructor(e){this.element=e,this.next=Mt.Undefined,this.prev=Mt.Undefined}}Mt.Undefined=new Mt(void 0);class Rt{constructor(){this._first=Mt.Undefined,this._last=Mt.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Mt.Undefined}clear(){let e=this._first;for(;e!==Mt.Undefined;){const t=e.next;e.prev=Mt.Undefined,e.next=Mt.Undefined,e=t}this._first=Mt.Undefined,this._last=Mt.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new Mt(e);if(this._first===Mt.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==Mt.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Mt.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Mt.Undefined&&e.next!==Mt.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Mt.Undefined&&e.next===Mt.Undefined?(this._first=Mt.Undefined,this._last=Mt.Undefined):e.next===Mt.Undefined?(this._last=this._last.prev,this._last.next=Mt.Undefined):e.prev===Mt.Undefined&&(this._first=this._first.next,this._first.prev=Mt.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Mt.Undefined;)yield e.element,e=e.next}}const Bt=g.performance&&"function"==typeof g.performance.now;class Ot{constructor(e){this._highResolution=Bt&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new Ot(e)}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?g.performance.now():Date.now()}}var Ft;!function(e){function t(e){return(t,i=null,n)=>{let o,s=!1;return o=e((e=>{if(!s)return o?o.dispose():s=!0,t.call(i,e)}),null,n),s&&o.dispose(),o}}function i(e,t){return r(((i,n=null,o)=>e((e=>i.call(n,t(e))),null,o)))}function n(e,t){return r(((i,n=null,o)=>e((e=>{t(e),i.call(n,e)}),null,o)))}function o(e,t){return r(((i,n=null,o)=>e((e=>t(e)&&i.call(n,e)),null,o)))}function s(e,t,n){let o=n;return i(e,(e=>(o=t(o,e),o)))}function r(e){let t;const i=new zt({onFirstListenerAdd(){t=e(i.fire,i)},onLastListenerRemove(){t.dispose()}});return i.event}function a(e,t,i=100,n=!1,o){let s,r,a,l=0;const c=new zt({leakWarningThreshold:o,onFirstListenerAdd(){s=e((e=>{l++,r=t(r,e),n&&!a&&(c.fire(r),r=void 0),clearTimeout(a),a=setTimeout((()=>{const e=r;r=void 0,a=void 0,(!n||l>1)&&c.fire(e),l=0}),i)}))},onLastListenerRemove(){s.dispose()}});return c.event}function l(e,t=(e,t)=>e===t){let i,n=!0;return o(e,(e=>{const o=n||!t(e,i);return n=!1,i=e,o}))}e.None=()=>Lt.None,e.once=t,e.map=i,e.forEach=n,e.filter=o,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>kt(...e.map((e=>e((e=>t.call(i,e)),null,n))))},e.reduce=s,e.debouncedListener=function(e,t,i,n=100,o=!1){let s,r,a=0;return e((e=>{a++,s=i(s,e),o&&!r&&(t(s),s=void 0),clearTimeout(r),r=setTimeout((()=>{const e=s;s=void 0,r=void 0,(!o||a>1)&&t(e),a=0}),n)}))},e.debounce=a,e.latch=l,e.split=function(t,i){return[e.filter(t,i),e.filter(t,(e=>!i(e)))]},e.buffer=function(e,t=!1,i=[]){let n=i.slice(),o=e((e=>{n?n.push(e):r.fire(e)}));const s=()=>{n&&n.forEach((e=>r.fire(e))),n=null},r=new zt({onFirstListenerAdd(){o||(o=e((e=>r.fire(e))))},onFirstListenerDidAdd(){n&&(t?setTimeout(s):s())},onLastListenerRemove(){o&&o.dispose(),o=null}});return r.event};class c{constructor(e){this.event=e}map(e){return new c(i(this.event,e))}forEach(e){return new c(n(this.event,e))}filter(e){return new c(o(this.event,e))}reduce(e,t){return new c(s(this.event,e,t))}latch(){return new c(l(this.event))}debounce(e,t=100,i=!1,n){return new c(a(this.event,e,t,i,n))}on(e,t,i){return this.event(e,t,i)}once(e,i,n){return t(this.event)(e,i,n)}}e.chain=function(e){return new c(e)},e.fromNodeEventEmitter=function(e,t,i=e=>e){const n=(...e)=>o.fire(i(...e)),o=new zt({onFirstListenerAdd:()=>e.on(t,n),onLastListenerRemove:()=>e.removeListener(t,n)});return o.event},e.fromDOMEventEmitter=function(e,t,i=e=>e){const n=(...e)=>o.fire(i(...e)),o=new zt({onFirstListenerAdd:()=>e.addEventListener(t,n),onLastListenerRemove:()=>e.removeEventListener(t,n)});return o.event},e.toPromise=function(e){return new Promise((i=>t(e)(i)))},e.runAndSubscribe=function(e,t){return t(void 0),e((e=>t(e)))},e.runAndSubscribeWithStore=function(e,t){let i=null;function n(e){null==i||i.dispose(),i=new It,t(e,i)}n(void 0);const o=e((e=>n(e)));return Dt((()=>{o.dispose(),null==i||i.dispose()}))}}(Ft||(Ft={}));class Pt{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${Pt._idPool++}`}start(e){this._stopWatch=new Ot(!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Pt._idPool=0;class zt{constructor(e){var t;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=(null===(t=this._options)||void 0===t?void 0:t._profName)?new Pt(this._options._profName):void 0}get event(){return this._event||(this._event=(e,t,i)=>{var n;this._listeners||(this._listeners=new Rt);const o=this._listeners.isEmpty();o&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const s=this._listeners.push(t?[e,t]:e);o&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);const r=null===(n=this._leakageMon)||void 0===n?void 0:n.check(this._listeners.size),a=Dt((()=>{if(r&&r(),!this._disposed&&(s(),this._options&&this._options.onLastListenerRemove)){this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)}}));return i instanceof It?i.add(a):Array.isArray(i)&&i.push(a),a}),this._event}fire(e){var t,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Rt);for(let t of this._listeners)this._deliveryQueue.push([t,e]);for(null===(t=this._perfMon)||void 0===t||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[e,t]=this._deliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){gt(e)}}null===(i=this._perfMon)||void 0===i||i.stop()}}dispose(){var e,t,i,n,o;this._disposed||(this._disposed=!0,null===(e=this._listeners)||void 0===e||e.clear(),null===(t=this._deliveryQueue)||void 0===t||t.clear(),null===(n=null===(i=this._options)||void 0===i?void 0:i.onLastListenerRemove)||void 0===n||n.call(i),null===(o=this._leakageMon)||void 0===o||o.dispose())}}class Vt extends zt{constructor(e){super(e),this._isPaused=0,this._eventQueue=new Rt,this._mergeFn=null==e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class Ht extends Vt{constructor(e){var t;super(e),this._delay=null!==(t=e.delay)&&void 0!==t?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout((()=>{this._handle=void 0,this.resume()}),this._delay)),super.fire(e)}}class Wt{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e((e=>{const n=this.buffers[this.buffers.length-1];n?n.push((()=>t.call(i,e))):t.call(i,e)}),void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach((e=>e())),i}}class Ut{constructor(){this.listening=!1,this.inputEvent=Ft.None,this.inputEventListener=Lt.None,this.emitter=new zt({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}const Qt=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var jt;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||(t instanceof Kt||!(!t||"object"!=typeof t)&&("boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested))},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Ft.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Qt})}(jt||(jt={}));class Kt{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Qt:(this._emitter||(this._emitter=new zt),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Gt{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Kt),this._token}cancel(){this._token?this._token instanceof Kt&&this._token.cancel():this._token=jt.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof Kt&&this._token.dispose():this._token=jt.None}}class Yt{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const $t=new Yt,qt=new Yt,Jt=new Yt,Xt=new Array(230),Zt=Object.create(null),ei=Object.create(null),ti=[];for(let e=0;e<=193;e++)ti[e]=-1;var ii;function ni(e,t){return(e|(65535&t)<<16>>>0)>>>0}let oi;if(function(){const e="",t=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[0,1,1,"Hyper",0,e,0,e,e,e],[0,1,2,"Super",0,e,0,e,e,e],[0,1,3,"Fn",0,e,0,e,e,e],[0,1,4,"FnLock",0,e,0,e,e,e],[0,1,5,"Suspend",0,e,0,e,e,e],[0,1,6,"Resume",0,e,0,e,e,e],[0,1,7,"Turbo",0,e,0,e,e,e],[0,1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[0,1,9,"WakeUp",0,e,0,e,e,e],[31,0,10,"KeyA",31,"A",65,"VK_A",e,e],[32,0,11,"KeyB",32,"B",66,"VK_B",e,e],[33,0,12,"KeyC",33,"C",67,"VK_C",e,e],[34,0,13,"KeyD",34,"D",68,"VK_D",e,e],[35,0,14,"KeyE",35,"E",69,"VK_E",e,e],[36,0,15,"KeyF",36,"F",70,"VK_F",e,e],[37,0,16,"KeyG",37,"G",71,"VK_G",e,e],[38,0,17,"KeyH",38,"H",72,"VK_H",e,e],[39,0,18,"KeyI",39,"I",73,"VK_I",e,e],[40,0,19,"KeyJ",40,"J",74,"VK_J",e,e],[41,0,20,"KeyK",41,"K",75,"VK_K",e,e],[42,0,21,"KeyL",42,"L",76,"VK_L",e,e],[43,0,22,"KeyM",43,"M",77,"VK_M",e,e],[44,0,23,"KeyN",44,"N",78,"VK_N",e,e],[45,0,24,"KeyO",45,"O",79,"VK_O",e,e],[46,0,25,"KeyP",46,"P",80,"VK_P",e,e],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[48,0,27,"KeyR",48,"R",82,"VK_R",e,e],[49,0,28,"KeyS",49,"S",83,"VK_S",e,e],[50,0,29,"KeyT",50,"T",84,"VK_T",e,e],[51,0,30,"KeyU",51,"U",85,"VK_U",e,e],[52,0,31,"KeyV",52,"V",86,"VK_V",e,e],[53,0,32,"KeyW",53,"W",87,"VK_W",e,e],[54,0,33,"KeyX",54,"X",88,"VK_X",e,e],[55,0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[56,0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[22,0,36,"Digit1",22,"1",49,"VK_1",e,e],[23,0,37,"Digit2",23,"2",50,"VK_2",e,e],[24,0,38,"Digit3",24,"3",51,"VK_3",e,e],[25,0,39,"Digit4",25,"4",52,"VK_4",e,e],[26,0,40,"Digit5",26,"5",53,"VK_5",e,e],[27,0,41,"Digit6",27,"6",54,"VK_6",e,e],[28,0,42,"Digit7",28,"7",55,"VK_7",e,e],[29,0,43,"Digit8",29,"8",56,"VK_8",e,e],[30,0,44,"Digit9",30,"9",57,"VK_9",e,e],[21,0,45,"Digit0",21,"0",48,"VK_0",e,e],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[2,1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[10,1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[83,0,51,"Minus",83,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[81,0,52,"Equal",81,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[87,0,53,"BracketLeft",87,"[",219,"VK_OEM_4","[","OEM_4"],[89,0,54,"BracketRight",89,"]",221,"VK_OEM_6","]","OEM_6"],[88,0,55,"Backslash",88,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,0,56,"IntlHash",0,e,0,e,e,e],[80,0,57,"Semicolon",80,";",186,"VK_OEM_1",";","OEM_1"],[90,0,58,"Quote",90,"'",222,"VK_OEM_7","'","OEM_7"],[86,0,59,"Backquote",86,"`",192,"VK_OEM_3","`","OEM_3"],[82,0,60,"Comma",82,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[84,0,61,"Period",84,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[85,0,62,"Slash",85,"/",191,"VK_OEM_2","/","OEM_2"],[8,1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[59,1,64,"F1",59,"F1",112,"VK_F1",e,e],[60,1,65,"F2",60,"F2",113,"VK_F2",e,e],[61,1,66,"F3",61,"F3",114,"VK_F3",e,e],[62,1,67,"F4",62,"F4",115,"VK_F4",e,e],[63,1,68,"F5",63,"F5",116,"VK_F5",e,e],[64,1,69,"F6",64,"F6",117,"VK_F6",e,e],[65,1,70,"F7",65,"F7",118,"VK_F7",e,e],[66,1,71,"F8",66,"F8",119,"VK_F8",e,e],[67,1,72,"F9",67,"F9",120,"VK_F9",e,e],[68,1,73,"F10",68,"F10",121,"VK_F10",e,e],[69,1,74,"F11",69,"F11",122,"VK_F11",e,e],[70,1,75,"F12",70,"F12",123,"VK_F12",e,e],[0,1,76,"PrintScreen",0,e,0,e,e,e],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL",e,e],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[14,1,80,"Home",14,"Home",36,"VK_HOME",e,e],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[13,1,83,"End",13,"End",35,"VK_END",e,e],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK",e,e],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE",e,e],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD",e,e],[3,1,94,"NumpadEnter",3,e,0,e,e,e],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1",e,e],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2",e,e],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3",e,e],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4",e,e],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5",e,e],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6",e,e],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7",e,e],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8",e,e],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9",e,e],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0",e,e],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102",e,e],[58,1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[0,1,108,"Power",0,e,0,e,e,e],[0,1,109,"NumpadEqual",0,e,0,e,e,e],[71,1,110,"F13",71,"F13",124,"VK_F13",e,e],[72,1,111,"F14",72,"F14",125,"VK_F14",e,e],[73,1,112,"F15",73,"F15",126,"VK_F15",e,e],[74,1,113,"F16",74,"F16",127,"VK_F16",e,e],[75,1,114,"F17",75,"F17",128,"VK_F17",e,e],[76,1,115,"F18",76,"F18",129,"VK_F18",e,e],[77,1,116,"F19",77,"F19",130,"VK_F19",e,e],[0,1,117,"F20",0,e,0,"VK_F20",e,e],[0,1,118,"F21",0,e,0,"VK_F21",e,e],[0,1,119,"F22",0,e,0,"VK_F22",e,e],[0,1,120,"F23",0,e,0,"VK_F23",e,e],[0,1,121,"F24",0,e,0,"VK_F24",e,e],[0,1,122,"Open",0,e,0,e,e,e],[0,1,123,"Help",0,e,0,e,e,e],[0,1,124,"Select",0,e,0,e,e,e],[0,1,125,"Again",0,e,0,e,e,e],[0,1,126,"Undo",0,e,0,e,e,e],[0,1,127,"Cut",0,e,0,e,e,e],[0,1,128,"Copy",0,e,0,e,e,e],[0,1,129,"Paste",0,e,0,e,e,e],[0,1,130,"Find",0,e,0,e,e,e],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1",e,e],[0,1,136,"KanaMode",0,e,0,e,e,e],[0,0,137,"IntlYen",0,e,0,e,e,e],[0,1,138,"Convert",0,e,0,e,e,e],[0,1,139,"NonConvert",0,e,0,e,e,e],[0,1,140,"Lang1",0,e,0,e,e,e],[0,1,141,"Lang2",0,e,0,e,e,e],[0,1,142,"Lang3",0,e,0,e,e,e],[0,1,143,"Lang4",0,e,0,e,e,e],[0,1,144,"Lang5",0,e,0,e,e,e],[0,1,145,"Abort",0,e,0,e,e,e],[0,1,146,"Props",0,e,0,e,e,e],[0,1,147,"NumpadParenLeft",0,e,0,e,e,e],[0,1,148,"NumpadParenRight",0,e,0,e,e,e],[0,1,149,"NumpadBackspace",0,e,0,e,e,e],[0,1,150,"NumpadMemoryStore",0,e,0,e,e,e],[0,1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[0,1,152,"NumpadMemoryClear",0,e,0,e,e,e],[0,1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[0,1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[0,1,155,"NumpadClear",0,e,0,e,e,e],[0,1,156,"NumpadClearEntry",0,e,0,e,e,e],[5,1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[4,1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[6,1,0,e,6,"Alt",18,"VK_MENU",e,e],[57,1,0,e,57,"Meta",0,"VK_COMMAND",e,e],[5,1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[4,1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[6,1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[57,1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[5,1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[4,1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[6,1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[57,1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[0,1,165,"BrightnessUp",0,e,0,e,e,e],[0,1,166,"BrightnessDown",0,e,0,e,e,e],[0,1,167,"MediaPlay",0,e,0,e,e,e],[0,1,168,"MediaRecord",0,e,0,e,e,e],[0,1,169,"MediaFastForward",0,e,0,e,e,e],[0,1,170,"MediaRewind",0,e,0,e,e,e],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP",e,e],[0,1,174,"Eject",0,e,0,e,e,e],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[0,1,178,"LaunchApp2",125,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[0,1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[0,1,180,"SelectTask",0,e,0,e,e,e],[0,1,181,"LaunchScreenSaver",0,e,0,e,e,e],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[0,1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[0,1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[0,1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[0,1,189,"ZoomToggle",0,e,0,e,e,e],[0,1,190,"MailReply",0,e,0,e,e,e],[0,1,191,"MailForward",0,e,0,e,e,e],[0,1,192,"MailSend",0,e,0,e,e,e],[109,1,0,e,109,"KeyInComposition",229,e,e,e],[111,1,0,e,111,"ABNT_C2",194,"VK_ABNT_C2",e,e],[91,1,0,e,91,"OEM_8",223,"VK_OEM_8",e,e],[0,1,0,e,0,e,0,"VK_CLEAR",e,e],[0,1,0,e,0,e,0,"VK_KANA",e,e],[0,1,0,e,0,e,0,"VK_HANGUL",e,e],[0,1,0,e,0,e,0,"VK_JUNJA",e,e],[0,1,0,e,0,e,0,"VK_FINAL",e,e],[0,1,0,e,0,e,0,"VK_HANJA",e,e],[0,1,0,e,0,e,0,"VK_KANJI",e,e],[0,1,0,e,0,e,0,"VK_CONVERT",e,e],[0,1,0,e,0,e,0,"VK_NONCONVERT",e,e],[0,1,0,e,0,e,0,"VK_ACCEPT",e,e],[0,1,0,e,0,e,0,"VK_MODECHANGE",e,e],[0,1,0,e,0,e,0,"VK_SELECT",e,e],[0,1,0,e,0,e,0,"VK_PRINT",e,e],[0,1,0,e,0,e,0,"VK_EXECUTE",e,e],[0,1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[0,1,0,e,0,e,0,"VK_HELP",e,e],[0,1,0,e,0,e,0,"VK_APPS",e,e],[0,1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[0,1,0,e,0,e,0,"VK_PACKET",e,e],[0,1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[0,1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[0,1,0,e,0,e,0,"VK_ATTN",e,e],[0,1,0,e,0,e,0,"VK_CRSEL",e,e],[0,1,0,e,0,e,0,"VK_EXSEL",e,e],[0,1,0,e,0,e,0,"VK_EREOF",e,e],[0,1,0,e,0,e,0,"VK_PLAY",e,e],[0,1,0,e,0,e,0,"VK_ZOOM",e,e],[0,1,0,e,0,e,0,"VK_NONAME",e,e],[0,1,0,e,0,e,0,"VK_PA1",e,e],[0,1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]];let i=[],n=[];for(const e of t){const[t,o,s,r,a,l,c,d,h,u]=e;if(n[s]||(n[s]=!0,Zt[r]=s,ei[r.toLowerCase()]=s,o&&(ti[s]=a)),!i[a]){if(i[a]=!0,!l)throw new Error(`String representation missing for key code ${a} around scan code ${r}`);$t.define(a,l),qt.define(a,h||l),Jt.define(a,u||h||l)}c&&(Xt[c]=a)}}(),function(e){e.toString=function(e){return $t.keyCodeToStr(e)},e.fromString=function(e){return $t.strToKeyCode(e)},e.toUserSettingsUS=function(e){return qt.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return Jt.keyCodeToStr(e)},e.fromUserSettings=function(e){return qt.strToKeyCode(e)||Jt.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=93&&e<=108)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return $t.keyCodeToStr(e)}}(ii||(ii={})),void 0!==g.vscode&&void 0!==g.vscode.process){const e=g.vscode.process;oi={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd:()=>e.cwd()}}else oi="undefined"!=typeof process?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd:()=>process.env.VSCODE_CWD||process.cwd()}:{get platform(){return f?"win32":_?"darwin":"linux"},get arch(){},get env(){return{}},cwd:()=>"/"};const si=oi.cwd,ri=oi.env,ai=oi.platform,li=46,ci=47,di=92,hi=58;class ui extends Error{constructor(e,t,i){let n;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const o=-1!==e.indexOf(".")?"property":"argument";let s=`The "${e}" ${o} ${n} of type ${t}`;s+=". Received type "+typeof i,super(s),this.code="ERR_INVALID_ARG_TYPE"}}function gi(e,t){if("string"!=typeof e)throw new ui(t,"string",e)}function pi(e){return e===ci||e===di}function mi(e){return e===ci}function fi(e){return e>=65&&e<=90||e>=97&&e<=122}function _i(e,t,i,n){let o="",s=0,r=-1,a=0,l=0;for(let c=0;c<=e.length;++c){if(c2){const e=o.lastIndexOf(i);-1===e?(o="",s=0):(o=o.slice(0,e),s=o.length-1-o.lastIndexOf(i)),r=c,a=0;continue}if(0!==o.length){o="",s=0,r=c,a=0;continue}}t&&(o+=o.length>0?`${i}..`:"..",s=2)}else o.length>0?o+=`${i}${e.slice(r+1,c)}`:o=e.slice(r+1,c),s=c-r-1;r=c,a=0}else l===li&&-1!==a?++a:a=-1}return o}function Ai(e,t){if(null===t||"object"!=typeof t)throw new ui("pathObject","Object",t);const i=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const bi={resolve(...e){let t="",i="",n=!1;for(let o=e.length-1;o>=-1;o--){let s;if(o>=0){if(s=e[o],gi(s,"path"),0===s.length)continue}else 0===t.length?s=si():(s=ri[`=${t}`]||si(),(void 0===s||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===di)&&(s=`${t}\\`));const r=s.length;let a=0,l="",c=!1;const d=s.charCodeAt(0);if(1===r)pi(d)&&(a=1,c=!0);else if(pi(d))if(c=!0,pi(s.charCodeAt(1))){let e=2,t=e;for(;e2&&pi(s.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(t.length>0){if(l.toLowerCase()!==t.toLowerCase())continue}else t=l;if(n){if(t.length>0)break}else if(i=`${s.slice(a)}\\${i}`,n=c,c&&t.length>0)break}return i=_i(i,!n,"\\",pi),n?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){gi(e,"path");const t=e.length;if(0===t)return".";let i,n=0,o=!1;const s=e.charCodeAt(0);if(1===t)return mi(s)?"\\":e;if(pi(s))if(o=!0,pi(e.charCodeAt(1))){let o=2,s=o;for(;o2&&pi(e.charCodeAt(2))&&(o=!0,n=3));let r=n0&&pi(e.charCodeAt(t-1))&&(r+="\\"),void 0===i?o?`\\${r}`:r:o?`${i}\\${r}`:`${i}${r}`},isAbsolute(e){gi(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return pi(i)||t>2&&fi(i)&&e.charCodeAt(1)===hi&&pi(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let n=0;n0&&(void 0===t?t=i=o:t+=`\\${o}`)}if(void 0===t)return".";let n=!0,o=0;if("string"==typeof i&&pi(i.charCodeAt(0))){++o;const e=i.length;e>1&&pi(i.charCodeAt(1))&&(++o,e>2&&(pi(i.charCodeAt(2))?++o:n=!1))}if(n){for(;o=2&&(t=`\\${t.slice(o)}`)}return bi.normalize(t)},relative(e,t){if(gi(e,"from"),gi(t,"to"),e===t)return"";const i=bi.resolve(e),n=bi.resolve(t);if(i===n)return"";if((e=i.toLowerCase())===(t=n.toLowerCase()))return"";let o=0;for(;oo&&e.charCodeAt(s-1)===di;)s--;const r=s-o;let a=0;for(;aa&&t.charCodeAt(l-1)===di;)l--;const c=l-a,d=rd){if(t.charCodeAt(a+u)===di)return n.slice(a+u+1);if(2===u)return n.slice(a+u)}r>d&&(e.charCodeAt(o+u)===di?h=u:2===u&&(h=3)),-1===h&&(h=0)}let g="";for(u=o+h+1;u<=s;++u)u!==s&&e.charCodeAt(u)!==di||(g+=0===g.length?"..":"\\..");return a+=h,g.length>0?`${g}${n.slice(a,l)}`:(n.charCodeAt(a)===di&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e)return e;if(0===e.length)return"";const t=bi.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===di){if(t.charCodeAt(1)===di){const e=t.charCodeAt(2);if(63!==e&&e!==li)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(fi(t.charCodeAt(0))&&t.charCodeAt(1)===hi&&t.charCodeAt(2)===di)return`\\\\?\\${t}`;return e},dirname(e){gi(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const o=e.charCodeAt(0);if(1===t)return pi(o)?e:".";if(pi(o)){if(i=n=1,pi(e.charCodeAt(1))){let o=2,s=o;for(;o2&&pi(e.charCodeAt(2))?3:2,n=i);let s=-1,r=!0;for(let i=t-1;i>=n;--i)if(pi(e.charCodeAt(i))){if(!r){s=i;break}}else r=!1;if(-1===s){if(-1===i)return".";s=i}return e.slice(0,s)},basename(e,t){void 0!==t&&gi(t,"ext"),gi(e,"path");let i,n=0,o=-1,s=!0;if(e.length>=2&&fi(e.charCodeAt(0))&&e.charCodeAt(1)===hi&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(pi(l)){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=n;--i)if(pi(e.charCodeAt(i))){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){gi(e,"path");let t=0,i=-1,n=0,o=-1,s=!0,r=0;e.length>=2&&e.charCodeAt(1)===hi&&fi(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(pi(t)){if(!s){n=a+1;break}}else-1===o&&(s=!1,o=a+1),t===li?-1===i?i=a:1!==r&&(r=1):-1!==i&&(r=-1)}return-1===i||-1===o||0===r||1===r&&i===o-1&&i===n+1?"":e.slice(i,o)},format:Ai.bind(null,"\\"),parse(e){gi(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,o=e.charCodeAt(0);if(1===i)return pi(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(pi(o)){if(n=1,pi(e.charCodeAt(1))){let t=2,o=t;for(;t0&&(t.root=e.slice(0,n));let s=-1,r=n,a=-1,l=!0,c=e.length-1,d=0;for(;c>=n;--c)if(o=e.charCodeAt(c),pi(o)){if(!l){r=c+1;break}}else-1===a&&(l=!1,a=c+1),o===li?-1===s?s=c:1!==d&&(d=1):-1!==s&&(d=-1);return-1!==a&&(-1===s||0===d||1===d&&s===a-1&&s===r+1?t.base=t.name=e.slice(r,a):(t.name=e.slice(r,s),t.base=e.slice(r,a),t.ext=e.slice(s,a))),t.dir=r>0&&r!==n?e.slice(0,r-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},wi={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const o=n>=0?e[n]:si();gi(o,"path"),0!==o.length&&(t=`${o}/${t}`,i=o.charCodeAt(0)===ci)}return t=_i(t,!i,"/",mi),i?`/${t}`:t.length>0?t:"."},normalize(e){if(gi(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===ci,i=e.charCodeAt(e.length-1)===ci;return 0===(e=_i(e,!t,"/",mi)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(gi(e,"path"),e.length>0&&e.charCodeAt(0)===ci),join(...e){if(0===e.length)return".";let t;for(let i=0;i0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":wi.normalize(t)},relative(e,t){if(gi(e,"from"),gi(t,"to"),e===t)return"";if((e=wi.resolve(e))===(t=wi.resolve(t)))return"";const i=e.length,n=i-1,o=t.length-1,s=ns){if(t.charCodeAt(1+a)===ci)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else n>s&&(e.charCodeAt(1+a)===ci?r=a:0===a&&(r=0));let l="";for(a=1+r+1;a<=i;++a)a!==i&&e.charCodeAt(a)!==ci||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+r)}`},toNamespacedPath:e=>e,dirname(e){if(gi(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===ci;let i=-1,n=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===ci){if(!n){i=t;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&gi(t,"ext"),gi(e,"path");let i,n=0,o=-1,s=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===ci){if(!s){n=i+1;break}}else-1===a&&(s=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1==--r&&(o=i):(r=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===ci){if(!s){n=i+1;break}}else-1===o&&(s=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){gi(e,"path");let t=-1,i=0,n=-1,o=!0,s=0;for(let r=e.length-1;r>=0;--r){const a=e.charCodeAt(r);if(a!==ci)-1===n&&(o=!1,n=r+1),a===li?-1===t?t=r:1!==s&&(s=1):-1!==t&&(s=-1);else if(!o){i=r+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===i+1?"":e.slice(t,n)},format:Ai.bind(null,"/"),parse(e){gi(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===ci;let n;i?(t.root="/",n=1):n=0;let o=-1,s=0,r=-1,a=!0,l=e.length-1,c=0;for(;l>=n;--l){const t=e.charCodeAt(l);if(t!==ci)-1===r&&(a=!1,r=l+1),t===li?-1===o?o=l:1!==c&&(c=1):-1!==o&&(c=-1);else if(!a){s=l+1;break}}if(-1!==r){const n=0===s&&i?1:s;-1===o||0===c||1===c&&o===r-1&&o===s+1?t.base=t.name=e.slice(n,r):(t.name=e.slice(n,o),t.base=e.slice(n,r),t.ext=e.slice(o,r))}return s>0?t.dir=e.slice(0,s-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};wi.win32=bi.win32=bi,wi.posix=bi.posix=wi;const Ci="win32"===ai?bi.normalize:wi.normalize,vi="win32"===ai?bi.resolve:wi.resolve,yi="win32"===ai?bi.relative:wi.relative,xi="win32"===ai?bi.dirname:wi.dirname,Si="win32"===ai?bi.basename:wi.basename,Ei="win32"===ai?bi.extname:wi.extname,ki="win32"===ai?bi.sep:wi.sep,Di=/^\w[\w\d+.-]*$/,Ii=/^\//,Li=/^\/\//;function Ni(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!Di.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!Ii.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(Li.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const Ti="",Mi="/",Ri=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class Bi{constructor(e,t,i,n,o,s=!1){"object"==typeof e?(this.scheme=e.scheme||Ti,this.authority=e.authority||Ti,this.path=e.path||Ti,this.query=e.query||Ti,this.fragment=e.fragment||Ti):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||Ti,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Mi&&(t=Mi+t):t=Mi}return t}(this.scheme,i||Ti),this.query=n||Ti,this.fragment=o||Ti,Ni(this,s))}static isUri(e){return e instanceof Bi||!!e&&("string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString)}get fsPath(){return Hi(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:o,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=Ti),void 0===i?i=this.authority:null===i&&(i=Ti),void 0===n?n=this.path:null===n&&(n=Ti),void 0===o?o=this.query:null===o&&(o=Ti),void 0===s?s=this.fragment:null===s&&(s=Ti),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&s===this.fragment?this:new Fi(t,i,n,o,s)}static parse(e,t=!1){const i=Ri.exec(e);return i?new Fi(i[2]||Ti,ji(i[4]||Ti),ji(i[5]||Ti),ji(i[7]||Ti),ji(i[9]||Ti),t):new Fi(Ti,Ti,Ti,Ti,Ti)}static file(e){let t=Ti;if(f&&(e=e.replace(/\\/g,Mi)),e[0]===Mi&&e[1]===Mi){const i=e.indexOf(Mi,2);-1===i?(t=e.substring(2),e=Mi):(t=e.substring(2,i),e=e.substring(i)||Mi)}return new Fi("file",t,e,Ti,Ti)}static from(e){const t=new Fi(e.scheme,e.authority,e.path,e.query,e.fragment);return Ni(t,!0),t}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=f&&"file"===e.scheme?Bi.file(bi.join(Hi(e,!0),...t)).path:wi.join(e.path,...t),e.with({path:i})}toString(e=!1){return Wi(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof Bi)return e;{const t=new Fi(e);return t._formatted=e.external,t._fsPath=e._sep===Oi?e.fsPath:null,t}}return e}}const Oi=f?1:void 0;class Fi extends Bi{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Hi(this,!1)),this._fsPath}toString(e=!1){return e?Wi(this,!0):(this._formatted||(this._formatted=Wi(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=Oi),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const Pi={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function zi(e,t){let i,n=-1;for(let o=0;o=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s)-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),void 0!==i&&(i+=e.charAt(o));else{void 0===i&&(i=e.substr(0,o));const t=Pi[s];void 0!==t?(-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),i+=t):-1===n&&(n=o)}}return-1!==n&&(i+=encodeURIComponent(e.substring(n))),void 0!==i?i:e}function Vi(e){let t;for(let i=0;i1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,f&&(i=i.replace(/\//g,"\\")),i}function Wi(e,t){const i=t?Vi:zi;let n="",{scheme:o,authority:s,path:r,query:a,fragment:l}=e;if(o&&(n+=o,n+=":"),(s||"file"===o)&&(n+=Mi,n+=Mi),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.indexOf(":"),-1===e?n+=i(t,!1):(n+=i(t.substr(0,e),!1),n+=":",n+=i(t.substr(e+1),!1)),n+="@"}s=s.toLowerCase(),e=s.indexOf(":"),-1===e?n+=i(s,!1):(n+=i(s.substr(0,e),!1),n+=s.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){const e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){const e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0)}return a&&(n+="?",n+=i(a,!1)),l&&(n+="#",n+=t?l:zi(l,!1)),n}function Ui(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+Ui(e.substr(3)):e}}const Qi=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ji(e){return e.match(Qi)?e.replace(Qi,(e=>Ui(e))):e}class Ki{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new Ki(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return Ki.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return Ki.isBefore(this,e)}static isBefore(e,t){return e.lineNumberi||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return Gi.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return Gi.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.columne.endColumn))}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<=e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>=e.endColumn))}containsRange(e){return Gi.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)))}strictContainsRange(e){return Gi.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(e){return Gi.plusRange(this,e)}static plusRange(e,t){let i,n,o,s;return t.startLineNumbere.endLineNumber?(o=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(o=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(o=e.endLineNumber,s=e.endColumn),new Gi(i,n,o,s)}intersectRanges(e){return Gi.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn,r=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,c=t.endColumn;return il?(o=l,s=c):o===l&&(s=Math.min(s,c)),i>o||i===o&&n>s?null:new Gi(i,n,o,s)}equalsRange(e){return Gi.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return Gi.getEndPosition(this)}static getEndPosition(e){return new Ki(e.endLineNumber,e.endColumn)}getStartPosition(){return Gi.getStartPosition(this)}static getStartPosition(e){return new Ki(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new Gi(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new Gi(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return Gi.collapseToStart(this)}static collapseToStart(e){return new Gi(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new Gi(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new Gi(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}}class Yi extends Gi{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return Yi.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new Yi(this.startLineNumber,this.startColumn,e,t):new Yi(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new Ki(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new Ki(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new Yi(e,t,this.endLineNumber,this.endColumn):new Yi(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new Yi(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new Yi(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new Yi(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new Yi(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i{const o=t.token.onCancellationRequested((()=>{o.dispose(),t.dispose(),n(new At)}));Promise.resolve(i).then((i=>{o.dispose(),t.dispose(),e(i)}),(e=>{o.dispose(),t.dispose(),n(e)}))}));return new class{cancel(){t.cancel()}then(e,t){return n.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return n.finally(e)}}}function ln(e,t,i){return new Promise(((n,o)=>{const s=t.onCancellationRequested((()=>{s.dispose(),n(i)}));e.then(n,o).finally((()=>s.dispose()))}))}class cn{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{this.queuedPromise=null;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}}const dn=Symbol("MicrotaskDelay");class hn{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})));const i=()=>{var e;this.deferred=null,null===(e=this.doResolve)||void 0===e||e.call(this,null)};return this.deferred=t===dn?(e=>{let t=!0;return queueMicrotask((()=>{t&&(t=!1,e())})),{isTriggered:()=>t,dispose:()=>{t=!1}}})(i):((e,t)=>{let i=!0;const n=setTimeout((()=>{i=!1,t()}),e);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}})(t,i),this.completionPromise}isTriggered(){var e;return!!(null===(e=this.deferred)||void 0===e?void 0:e.isTriggered())}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(new At),this.completionPromise=null)}cancelTimeout(){var e;null===(e=this.deferred)||void 0===e||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class un{constructor(e){this.delayer=new hn(e),this.throttler=new cn}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}dispose(){this.delayer.dispose()}}function gn(e,t){return t?new Promise(((i,n)=>{const o=setTimeout((()=>{s.dispose(),i()}),e),s=t.onCancellationRequested((()=>{clearTimeout(o),s.dispose(),n(new At)}))})):an((t=>gn(e,t)))}function pn(e,t=0){const i=setTimeout(e,t);return Dt((()=>clearTimeout(i)))}function mn(e,t=e=>!!e,i=null){let n=0;const o=e.length,s=()=>{if(n>=o)return Promise.resolve(i);const r=e[n++];return Promise.resolve(r()).then((e=>t(e)?Promise.resolve(e):s()))};return s()}class fn{constructor(e,t){this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class _n{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval((()=>{e()}),t)}}class An{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}let bn;bn="function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback?e=>{x((()=>{if(t)return;const i=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining:()=>Math.max(0,i-Date.now())}))}));let t=!1;return{dispose(){t||(t=!0)}}}:(e,t)=>{const i=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(i))}}};class wn{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=bn((()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class Cn{constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise(((e,t)=>{this.completeCallback=e,this.errorCallback=t}))}get isRejected(){return this.rejected}get isSettled(){return this.rejected||this.resolved}complete(e){return new Promise((t=>{this.completeCallback(e),this.resolved=!0,t()}))}cancel(){new Promise((e=>{this.errorCallback(new At),this.rejected=!0,e()}))}}var vn,yn;!function(e){e.settled=function(e){return sn(this,void 0,void 0,(function*(){let t;const i=yield Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return i}))},e.withAsyncBody=function(e){return new Promise(((t,i)=>sn(this,void 0,void 0,(function*(){try{yield e(t,i)}catch(e){i(e)}}))))}}(vn||(vn={}));class xn{constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new zt,queueMicrotask((()=>sn(this,void 0,void 0,(function*(){const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{yield Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))))}static fromArray(e){return new xn((t=>{t.emitMany(e)}))}static fromPromise(e){return new xn((t=>sn(this,void 0,void 0,(function*(){t.emitMany(yield e)}))))}static fromPromises(e){return new xn((t=>sn(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>sn(this,void 0,void 0,(function*(){return t.emitOne(yield e)})))))}))))}static merge(e){return new xn((t=>sn(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>{var i,n;return sn(this,void 0,void 0,(function*(){var o,s;try{for(i=rn(e);!(n=yield i.next()).done;){const e=n.value;t.emitOne(e)}}catch(e){o={error:e}}finally{try{n&&!n.done&&(s=i.return)&&(yield s.call(i))}finally{if(o)throw o.error}}}))})))}))))}[Symbol.asyncIterator](){let e=0;return{next:()=>sn(this,void 0,void 0,(function*(){for(;;){if(2===this._state)throw this._error;if(esn(this,void 0,void 0,(function*(){var n,o;try{for(var s,r=rn(e);!(s=yield r.next()).done;){const e=s.value;i.emitOne(t(e))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=r.return)&&(yield o.call(r))}finally{if(n)throw n.error}}}))))}map(e){return xn.map(this,e)}static filter(e,t){return new xn((i=>sn(this,void 0,void 0,(function*(){var n,o;try{for(var s,r=rn(e);!(s=yield r.next()).done;){const e=s.value;t(e)&&i.emitOne(e)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=r.return)&&(yield o.call(r))}finally{if(n)throw n.error}}}))))}filter(e){return xn.filter(this,e)}static coalesce(e){return xn.filter(e,(e=>!!e))}coalesce(){return xn.coalesce(this)}static toPromise(e){var t,i,n,o;return sn(this,void 0,void 0,(function*(){const s=[];try{for(t=rn(e);!(i=yield t.next()).done;){const e=i.value;s.push(e)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(o=t.return)&&(yield o.call(t))}finally{if(n)throw n.error}}return s}))}toPromise(){return xn.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}xn.EMPTY=xn.fromArray([]);class Sn extends xn{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}class En{constructor(e){this.executor=e,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function kn(e){return!e||"string"!=typeof e||0===e.trim().length}const Dn=/{(\d+)}/g;function In(e,...t){return 0===t.length?e:e.replace(Dn,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function Ln(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function Nn(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Tn(e,t=" "){return Rn(Mn(e,t),t)}function Mn(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=i;return e.substring(n)}function Rn(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let o=n,s=-1;for(;s=e.lastIndexOf(t,o-1),-1!==s&&s+i===o;){if(0===s)return"";o=s}return e.substring(0,o)}function Bn(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=Nn(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function On(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")}function Fn(e){return e.split(/\r\n|\r|\n/)}function Pn(e){for(let t=0,i=e.length;t=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function Hn(e,t){return et?1:0}function Wn(e,t,i=0,n=e.length,o=0,s=t.length){for(;is)return 1}const r=n-i,a=s-o;return ra?1:0}function Un(e,t){return Qn(e,t,0,e.length,0,t.length)}function Qn(e,t,i=0,n=e.length,o=0,s=t.length){for(;i=128||a>=128)return Wn(e.toLowerCase(),t.toLowerCase(),i,n,o,s);jn(r)&&(r-=32),jn(a)&&(a-=32);const l=r-a;if(0!==l)return l}const r=n-i,a=s-o;return ra?1:0}function jn(e){return e>=97&&e<=122}function Kn(e){return e>=65&&e<=90}function Gn(e,t){return e.length===t.length&&0===Qn(e,t)}function Yn(e,t){const i=t.length;return!(t.length>e.length)&&0===Qn(e,t,0,i)}function $n(e,t){let i,n=Math.min(e.length,t.length);for(i=0;i1){const n=e.charCodeAt(t-2);if(Jn(n))return Zn(n,i)}return i}(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=eo(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class io{constructor(e,t=0){this._iterator=new to(e,t)}get offset(){return this._iterator.offset}nextGraphemeLength(){const e=Ao.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const i=t.offset,o=e.getGraphemeBreakType(t.nextCodePoint());if(_o(n,o)){t.setOffset(i);break}n=o}return t.offset-i}prevGraphemeLength(){const e=Ao.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const i=t.offset,o=e.getGraphemeBreakType(t.prevCodePoint());if(_o(o,n)){t.setOffset(i);break}n=o}return i-t.offset}eol(){return this._iterator.eol()}}function no(e,t){return new io(e,t).nextGraphemeLength()}function oo(e,t){return new io(e,t).prevGraphemeLength()}const so=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function ro(e){return so.test(e)}const ao=/^[\t\n\r\x20-\x7E]*$/;function lo(e){return ao.test(e)}const co=/[\u2028\u2029]/;function ho(e){return co.test(e)}function uo(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function go(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const po=String.fromCharCode(65279);function mo(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function fo(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function _o(e,t){return 0===e?5!==t&&7!==t:(2!==e||3!==t)&&(4===e||2===e||3===e||(4===t||2===t||3===t||(8!==e||8!==t&&9!==t&&11!==t&&12!==t)&&((11!==e&&9!==e||9!==t&&10!==t)&&((12!==e&&10!==e||10!==t)&&(5!==t&&13!==t&&(7!==t&&(1!==e&&((13!==e||14!==t)&&(6!==e||6!==t)))))))))}class Ao{constructor(){this._data=JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}static getInstance(){return Ao._INSTANCE||(Ao._INSTANCE=new Ao),Ao._INSTANCE}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(et[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function bo(e,t){if(0===e)return 0;const i=function(e,t){const i=new to(t,e);let n=i.prevCodePoint();for(;wo(n)||65039===n||8419===n;){if(0===i.offset)return;n=i.prevCodePoint()}if(!go(n))return;let o=i.offset;if(o>0){8205===i.prevCodePoint()&&(o=i.offset)}return o}(e,t);if(void 0!==i)return i;const n=new to(t,e);return n.prevCodePoint(),n.offset}function wo(e){return 127995<=e&&e<=127999}Ao._INSTANCE=null;class Co{constructor(e){this.confusableDictionary=e}static getInstance(e){return Co.cache.get(Array.from(e))}static getLocales(){return Co._locales.getValue()}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}yn=Co,Co.ambiguousCharacterData=new En((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))),Co.cache=new class{constructor(e){this.computeFn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){const t=JSON.stringify(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this.computeFn(e)),this.lastCache}}((e=>{function t(e){const t=new Map;for(let i=0;i!e.startsWith("_")&&e in n));0===s.length&&(s=["_default"]);for(const e of s){o=i(o,t(n[e]))}const r=function(e,t){const i=new Map(e);for(const[e,n]of t)i.set(e,n);return i}(t(n._common),o);return new Co(r)})),Co._locales=new En((()=>Object.keys(Co.ambiguousCharacterData.getValue()).filter((e=>!e.startsWith("_")))));class vo{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(vo.getRawData())),this._data}static isInvisibleCharacter(e){return vo.getData().has(e)}static get codePoints(){return vo.getData()}}function yo(e){return 47===e||92===e}function xo(e){return e.replace(/[\\/]/g,wi.sep)}function So(e,t=wi.sep){if(!e)return"";const i=e.length,n=e.charCodeAt(0);if(yo(n)){if(yo(e.charCodeAt(1))&&!yo(e.charCodeAt(2))){let n=3;const o=n;for(;ne.length)return!1;if(i){if(!Yn(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===n&&i--,e.charAt(i)===n}return t.charAt(t.length-1)!==n&&(t+=n),0===e.indexOf(t)}function ko(e){return e>=65&&e<=90||e>=97&&e<=122}function Do(e,t){return!!(void 0!==t?t:f)&&(ko(e.charCodeAt(0))&&58===e.charCodeAt(1))}var Io,Lo;vo._data=void 0;class No{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){const e=this._value.charCodeAt(t);if(!(47===e||this._splitOnBackslash&&92===e))break}return this.next()}hasNext(){return this._to!1){return new Oo(new Ro(e))}static forStrings(){return new Oo(new No)}static forConfigKeys(){return new Oo(new To)}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new Bo,this._root.segment=i.value());const o=[];for(n=this._root;;){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new Bo,n.left.segment=i.value()),o.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new Bo,n.right.segment=i.value()),o.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new Bo,n.mid.segment=i.value()),o.push([0,n]),n=n.mid}}const s=n.value;n.value=t,n.key=e;for(let e=o.length-1;e>=0;e--){const t=o[e][1];t.updateHeight();const i=t.balanceFactor();if(i<-1||i>1){const i=o[e][0],n=o[e+1][0];if(1===i&&1===n)o[e][1]=t.rotateLeft();else if(-1===i&&-1===n)o[e][1]=t.rotateRight();else if(1===i&&-1===n)t.right=o[e+1][1]=o[e+1][1].rotateRight(),o[e][1]=t.rotateLeft();else{if(-1!==i||1!==n)throw new Error;t.left=o[e+1][1]=o[e+1][1].rotateLeft(),o[e][1]=t.rotateRight()}if(e>0)switch(o[e-1][0]){case-1:o[e-1][1].left=o[e][1];break;case 1:o[e-1][1].right=o[e][1];break;case 0:o[e-1][1].mid=o[e][1]}else this._root=o[0][1]}}return s}get(e){var t;return null===(t=this._getNode(e))||void 0===t?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===(null==t?void 0:t.value)&&void 0===(null==t?void 0:t.mid))}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var i;const n=this._iter.reset(e),o=[];let s=this._root;for(;s;){const e=n.cmp(s.segment);if(e>0)o.push([-1,s]),s=s.left;else if(e<0)o.push([1,s]),s=s.right;else{if(!n.hasNext())break;n.next(),o.push([0,s]),s=s.mid}}if(s){if(t?(s.left=void 0,s.mid=void 0,s.right=void 0,s.height=1):(s.key=void 0,s.value=void 0),!s.mid&&!s.value)if(s.left&&s.right){const e=this._min(s.right),{key:t,value:i,segment:n}=e;this._delete(e.key,!1),s.key=t,s.value=i,s.segment=n}else{const e=null!==(i=s.left)&&void 0!==i?i:s.right;if(o.length>0){const[t,i]=o[o.length-1];switch(t){case-1:i.left=e;break;case 0:i.mid=e;break;case 1:i.right=e}}else this._root=e}for(let e=o.length-1;e>=0;e--){const t=o[e][1];t.updateHeight();const i=t.balanceFactor();if(i>1?(t.right.balanceFactor()>=0||(t.right=t.right.rotateRight()),o[e][1]=t.rotateLeft()):i<-1&&(t.left.balanceFactor()<=0||(t.left=t.left.rotateLeft()),o[e][1]=t.rotateRight()),e>0)switch(o[e-1][0]){case-1:o[e-1][1].left=o[e][1];break;case 1:o[e-1][1].right=o[e][1];break;case 0:o[e-1][1].mid=o[e][1]}else this._root=o[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())return i.mid?this._entries(i.mid):void 0;t.next(),i=i.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(e){e&&(e.left&&(yield*this._entries(e.left)),e.value&&(yield[e.key,e.value]),e.mid&&(yield*this._entries(e.mid)),e.right&&(yield*this._entries(e.right)))}}class Fo{constructor(e,t){this.uri=e,this.value=t}}class Po{constructor(e,t){this[Io]="ResourceMap",e instanceof Po?(this.map=new Map(e.map),this.toKey=null!=t?t:Po.defaultToKey):(this.map=new Map,this.toKey=null!=e?e:Po.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),new Fo(e,t)),this}get(e){var t;return null===(t=this.map.get(this.toKey(e)))||void 0===t?void 0:t.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(let[t,i]of this.map)e(i.value,i.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(Io=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}}Po.defaultToKey=e=>e.toString();class zo{constructor(){this[Lo]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:case 2:default:this.addItemLast(n);break;case 1:this.addItemFirst(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[(Lo=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,i)=>{e.push([i,t])})),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class Vo extends zo{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}const Ho="**",Wo="/",Uo="[/\\\\]",Qo="[^/\\\\]",jo=/\//g;function Ko(e){switch(e){case 0:return"";case 1:return`${Qo}*?`;default:return`(?:${Uo}|${Qo}+${Uo}|${Uo}${Qo}+)*?`}}function Go(e,t){if(!e)return[];const i=[];let n=!1,o=!1,s="";for(const r of e){switch(r){case t:if(!n&&!o){i.push(s),s="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1}s+=r}return s&&i.push(s),i}function Yo(e){if(!e)return"";let t="";const i=Go(e,Wo);if(i.every((e=>e===Ho)))t=".*";else{let e=!1;i.forEach(((n,o)=>{if(n===Ho)return void(e||(t+=Ko(2),e=!0));let s=!1,r="",a=!1,l="";for(const e of n)if("}"!==e&&s)r+=e;else if(!a||"]"===e&&l)switch(e){case"{":s=!0;continue;case"[":a=!0;continue;case"}":{const e=`(?:${Go(r,",").map((e=>Yo(e))).join("|")})`;t+=e,s=!1,r="";break}case"]":t+="["+l+"]",a=!1,l="";break;case"?":t+=Qo;continue;case"*":t+=Ko(1);continue;default:t+=Nn(e)}else{let t;t="-"===e?e:"^"!==e&&"!"!==e||l?e===Wo?"":Nn(e):"^",l+=t}oos(e,t))).filter((e=>e!==ns)),e),n=i.length;if(!n)return ns;if(1===n)return i[0];const o=function(t,n){for(let o=0,s=i.length;o!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);r.length&&(o.allPaths=r);return o}(i,t):(o=Zo.exec(rs(i,t)))?as(o[1].substr(1),i,!0):(o=es.exec(rs(i,t)))?as(o[1],i,!1):function(e){try{const t=new RegExp(`^${Yo(e)}$`);return function(i){return t.lastIndex=0,"string"==typeof i&&t.test(i)?e:null}}catch(e){return ns}}(i);return ts.set(n,s),ss(s,e)}function ss(e,t){return"string"==typeof t?e:function(i,n){return Eo(i,t.base,!A)?e(i.substr(t.base.length+1),n):null}}function rs(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function as(e,t,i){const n=ki===wi.sep,o=n?e:e.replace(jo,ki),s=ki+o,r=wi.sep+e,a=i?function(i,a){return"string"!=typeof i||i!==o&&!i.endsWith(s)&&(n||i!==e&&!i.endsWith(r))?null:t}:function(i,s){return"string"!=typeof i||i!==o&&(n||i!==e)?null:t};return a.allPaths=[(i?"*/":"./")+e],a}function ls(e,t={}){if(!e)return is;if("string"==typeof e||function(e){const t=e;if(!t)return!1;return"string"==typeof t.base&&"string"==typeof t.pattern}(e)){const i=os(e,t);if(i===ns)return is;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return function(e,t){const i=cs(Object.getOwnPropertyNames(e).map((i=>function(e,t,i){if(!1===t)return ns;const n=os(e,i);if(n===ns)return ns;if("boolean"==typeof t)return n;if(t){const i=t.when;if("string"==typeof i){const t=(t,o,s,r)=>{if(!r||!n(t,o))return null;const a=r(i.replace("$(basename)",s));return(l=a)&&"function"==typeof l.then?a.then((t=>t?e:null)):a?e:null;var l};return t.requiresSiblings=!0,t}}return n}(i,e[i],t))).filter((e=>e!==ns))),n=i.length;if(!n)return ns;if(!i.some((e=>!!e.requiresSiblings))){if(1===n)return i[0];const e=function(e,t){for(let n=0,o=i.length;n!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const o=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return o.length&&(e.allPaths=o),e}const o=function(e,t,n){let o;for(let s=0,r=i.length;s!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const r=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);r.length&&(o.allPaths=r);return o}(e,t)}function cs(e,t){const i=e.filter((e=>!!e.basenames));if(i.length<2)return e;const n=i.reduce(((e,t)=>{const i=t.basenames;return i?e.concat(i):e}),[]);let o;if(t){o=[];for(let e=0,i=n.length;e{const i=t.patterns;return i?e.concat(i):e}),[]);const s=function(e,t){if("string"!=typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?o[i]:null};s.basenames=n,s.patterns=o,s.allBasenames=n;const r=e.filter((e=>!e.basenames));return r.push(s),r}function ds(e,t,i,n){if(Array.isArray(e)){let o=0;for(const s of e){const e=ds(s,t,i,n);if(10===e)return e;e>o&&(o=e)}return o}if("string"==typeof e)return n?"*"===e?5:e===i?10:0:0;if(e){const{language:a,pattern:l,scheme:c,hasAccessToAllModels:d}=e;if(!n&&!d)return 0;let h=0;if(c)if(c===t.scheme)h=10;else{if("*"!==c)return 0;h=5}if(a)if(a===i)h=10;else{if("*"!==a)return 0;h=Math.max(h,5)}if(l){let e;if(e="string"==typeof l?l:Object.assign(Object.assign({},l),{base:Ci(l.base)}),e!==t.fsPath&&(o=e,s=t.fsPath,!o||"string"!=typeof s||!ls(o)(s,void 0,r)))return 0;h=10}return h}return 0;var o,s,r}function hs(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(hs):!!e.exclusive)}class us{constructor(){this._clock=0,this._entries=[],this._onDidChange=new zt}get onDidChange(){return this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),Dt((()=>{if(i){const e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(let e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,(e=>t.push(e.provider))),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,(e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))})),t}_orderedForEach(e,t){if(e){this._updateScores(e);for(const e of this._entries)e._score>0&&t(e)}}_updateScores(e){const t={uri:e.uri.toString(),language:e.getLanguageId()};if(!this._lastCandidate||this._lastCandidate.language!==t.language||this._lastCandidate.uri!==t.uri){this._lastCandidate=t;for(let t of this._entries)if(t._score=ds(t.selector,e.uri,e.getLanguageId(),on(e)),hs(t.selector)&&t._score>0){for(let e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(us._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:e._timet._time?-1:0}}var gs,ps,ms,fs,_s,As,bs,ws,Cs=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class vs extends Lt{constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}get isResolved(){return this._isResolved}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return Cs(this,void 0,void 0,(function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}))}_create(){return Cs(this,void 0,void 0,(function*(){const e=yield Promise.resolve(this._factory.createTokenizationSupport());this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}))}}class ys{constructor(e,t,i){this.id=e,this.definition=t,this.description=i,ys._allCodicons.push(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}static getAll(){return ys._allCodicons}}ys._allCodicons=[],ys.add=new ys("add",{fontCharacter:"\\ea60"}),ys.plus=new ys("plus",ys.add.definition),ys.gistNew=new ys("gist-new",ys.add.definition),ys.repoCreate=new ys("repo-create",ys.add.definition),ys.lightbulb=new ys("lightbulb",{fontCharacter:"\\ea61"}),ys.lightBulb=new ys("light-bulb",{fontCharacter:"\\ea61"}),ys.repo=new ys("repo",{fontCharacter:"\\ea62"}),ys.repoDelete=new ys("repo-delete",{fontCharacter:"\\ea62"}),ys.gistFork=new ys("gist-fork",{fontCharacter:"\\ea63"}),ys.repoForked=new ys("repo-forked",{fontCharacter:"\\ea63"}),ys.gitPullRequest=new ys("git-pull-request",{fontCharacter:"\\ea64"}),ys.gitPullRequestAbandoned=new ys("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),ys.recordKeys=new ys("record-keys",{fontCharacter:"\\ea65"}),ys.keyboard=new ys("keyboard",{fontCharacter:"\\ea65"}),ys.tag=new ys("tag",{fontCharacter:"\\ea66"}),ys.tagAdd=new ys("tag-add",{fontCharacter:"\\ea66"}),ys.tagRemove=new ys("tag-remove",{fontCharacter:"\\ea66"}),ys.person=new ys("person",{fontCharacter:"\\ea67"}),ys.personFollow=new ys("person-follow",{fontCharacter:"\\ea67"}),ys.personOutline=new ys("person-outline",{fontCharacter:"\\ea67"}),ys.personFilled=new ys("person-filled",{fontCharacter:"\\ea67"}),ys.gitBranch=new ys("git-branch",{fontCharacter:"\\ea68"}),ys.gitBranchCreate=new ys("git-branch-create",{fontCharacter:"\\ea68"}),ys.gitBranchDelete=new ys("git-branch-delete",{fontCharacter:"\\ea68"}),ys.sourceControl=new ys("source-control",{fontCharacter:"\\ea68"}),ys.mirror=new ys("mirror",{fontCharacter:"\\ea69"}),ys.mirrorPublic=new ys("mirror-public",{fontCharacter:"\\ea69"}),ys.star=new ys("star",{fontCharacter:"\\ea6a"}),ys.starAdd=new ys("star-add",{fontCharacter:"\\ea6a"}),ys.starDelete=new ys("star-delete",{fontCharacter:"\\ea6a"}),ys.starEmpty=new ys("star-empty",{fontCharacter:"\\ea6a"}),ys.comment=new ys("comment",{fontCharacter:"\\ea6b"}),ys.commentAdd=new ys("comment-add",{fontCharacter:"\\ea6b"}),ys.alert=new ys("alert",{fontCharacter:"\\ea6c"}),ys.warning=new ys("warning",{fontCharacter:"\\ea6c"}),ys.search=new ys("search",{fontCharacter:"\\ea6d"}),ys.searchSave=new ys("search-save",{fontCharacter:"\\ea6d"}),ys.logOut=new ys("log-out",{fontCharacter:"\\ea6e"}),ys.signOut=new ys("sign-out",{fontCharacter:"\\ea6e"}),ys.logIn=new ys("log-in",{fontCharacter:"\\ea6f"}),ys.signIn=new ys("sign-in",{fontCharacter:"\\ea6f"}),ys.eye=new ys("eye",{fontCharacter:"\\ea70"}),ys.eyeUnwatch=new ys("eye-unwatch",{fontCharacter:"\\ea70"}),ys.eyeWatch=new ys("eye-watch",{fontCharacter:"\\ea70"}),ys.circleFilled=new ys("circle-filled",{fontCharacter:"\\ea71"}),ys.primitiveDot=new ys("primitive-dot",{fontCharacter:"\\ea71"}),ys.closeDirty=new ys("close-dirty",{fontCharacter:"\\ea71"}),ys.debugBreakpoint=new ys("debug-breakpoint",{fontCharacter:"\\ea71"}),ys.debugBreakpointDisabled=new ys("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),ys.debugHint=new ys("debug-hint",{fontCharacter:"\\ea71"}),ys.primitiveSquare=new ys("primitive-square",{fontCharacter:"\\ea72"}),ys.edit=new ys("edit",{fontCharacter:"\\ea73"}),ys.pencil=new ys("pencil",{fontCharacter:"\\ea73"}),ys.info=new ys("info",{fontCharacter:"\\ea74"}),ys.issueOpened=new ys("issue-opened",{fontCharacter:"\\ea74"}),ys.gistPrivate=new ys("gist-private",{fontCharacter:"\\ea75"}),ys.gitForkPrivate=new ys("git-fork-private",{fontCharacter:"\\ea75"}),ys.lock=new ys("lock",{fontCharacter:"\\ea75"}),ys.mirrorPrivate=new ys("mirror-private",{fontCharacter:"\\ea75"}),ys.close=new ys("close",{fontCharacter:"\\ea76"}),ys.removeClose=new ys("remove-close",{fontCharacter:"\\ea76"}),ys.x=new ys("x",{fontCharacter:"\\ea76"}),ys.repoSync=new ys("repo-sync",{fontCharacter:"\\ea77"}),ys.sync=new ys("sync",{fontCharacter:"\\ea77"}),ys.clone=new ys("clone",{fontCharacter:"\\ea78"}),ys.desktopDownload=new ys("desktop-download",{fontCharacter:"\\ea78"}),ys.beaker=new ys("beaker",{fontCharacter:"\\ea79"}),ys.microscope=new ys("microscope",{fontCharacter:"\\ea79"}),ys.vm=new ys("vm",{fontCharacter:"\\ea7a"}),ys.deviceDesktop=new ys("device-desktop",{fontCharacter:"\\ea7a"}),ys.file=new ys("file",{fontCharacter:"\\ea7b"}),ys.fileText=new ys("file-text",{fontCharacter:"\\ea7b"}),ys.more=new ys("more",{fontCharacter:"\\ea7c"}),ys.ellipsis=new ys("ellipsis",{fontCharacter:"\\ea7c"}),ys.kebabHorizontal=new ys("kebab-horizontal",{fontCharacter:"\\ea7c"}),ys.mailReply=new ys("mail-reply",{fontCharacter:"\\ea7d"}),ys.reply=new ys("reply",{fontCharacter:"\\ea7d"}),ys.organization=new ys("organization",{fontCharacter:"\\ea7e"}),ys.organizationFilled=new ys("organization-filled",{fontCharacter:"\\ea7e"}),ys.organizationOutline=new ys("organization-outline",{fontCharacter:"\\ea7e"}),ys.newFile=new ys("new-file",{fontCharacter:"\\ea7f"}),ys.fileAdd=new ys("file-add",{fontCharacter:"\\ea7f"}),ys.newFolder=new ys("new-folder",{fontCharacter:"\\ea80"}),ys.fileDirectoryCreate=new ys("file-directory-create",{fontCharacter:"\\ea80"}),ys.trash=new ys("trash",{fontCharacter:"\\ea81"}),ys.trashcan=new ys("trashcan",{fontCharacter:"\\ea81"}),ys.history=new ys("history",{fontCharacter:"\\ea82"}),ys.clock=new ys("clock",{fontCharacter:"\\ea82"}),ys.folder=new ys("folder",{fontCharacter:"\\ea83"}),ys.fileDirectory=new ys("file-directory",{fontCharacter:"\\ea83"}),ys.symbolFolder=new ys("symbol-folder",{fontCharacter:"\\ea83"}),ys.logoGithub=new ys("logo-github",{fontCharacter:"\\ea84"}),ys.markGithub=new ys("mark-github",{fontCharacter:"\\ea84"}),ys.github=new ys("github",{fontCharacter:"\\ea84"}),ys.terminal=new ys("terminal",{fontCharacter:"\\ea85"}),ys.console=new ys("console",{fontCharacter:"\\ea85"}),ys.repl=new ys("repl",{fontCharacter:"\\ea85"}),ys.zap=new ys("zap",{fontCharacter:"\\ea86"}),ys.symbolEvent=new ys("symbol-event",{fontCharacter:"\\ea86"}),ys.error=new ys("error",{fontCharacter:"\\ea87"}),ys.stop=new ys("stop",{fontCharacter:"\\ea87"}),ys.variable=new ys("variable",{fontCharacter:"\\ea88"}),ys.symbolVariable=new ys("symbol-variable",{fontCharacter:"\\ea88"}),ys.array=new ys("array",{fontCharacter:"\\ea8a"}),ys.symbolArray=new ys("symbol-array",{fontCharacter:"\\ea8a"}),ys.symbolModule=new ys("symbol-module",{fontCharacter:"\\ea8b"}),ys.symbolPackage=new ys("symbol-package",{fontCharacter:"\\ea8b"}),ys.symbolNamespace=new ys("symbol-namespace",{fontCharacter:"\\ea8b"}),ys.symbolObject=new ys("symbol-object",{fontCharacter:"\\ea8b"}),ys.symbolMethod=new ys("symbol-method",{fontCharacter:"\\ea8c"}),ys.symbolFunction=new ys("symbol-function",{fontCharacter:"\\ea8c"}),ys.symbolConstructor=new ys("symbol-constructor",{fontCharacter:"\\ea8c"}),ys.symbolBoolean=new ys("symbol-boolean",{fontCharacter:"\\ea8f"}),ys.symbolNull=new ys("symbol-null",{fontCharacter:"\\ea8f"}),ys.symbolNumeric=new ys("symbol-numeric",{fontCharacter:"\\ea90"}),ys.symbolNumber=new ys("symbol-number",{fontCharacter:"\\ea90"}),ys.symbolStructure=new ys("symbol-structure",{fontCharacter:"\\ea91"}),ys.symbolStruct=new ys("symbol-struct",{fontCharacter:"\\ea91"}),ys.symbolParameter=new ys("symbol-parameter",{fontCharacter:"\\ea92"}),ys.symbolTypeParameter=new ys("symbol-type-parameter",{fontCharacter:"\\ea92"}),ys.symbolKey=new ys("symbol-key",{fontCharacter:"\\ea93"}),ys.symbolText=new ys("symbol-text",{fontCharacter:"\\ea93"}),ys.symbolReference=new ys("symbol-reference",{fontCharacter:"\\ea94"}),ys.goToFile=new ys("go-to-file",{fontCharacter:"\\ea94"}),ys.symbolEnum=new ys("symbol-enum",{fontCharacter:"\\ea95"}),ys.symbolValue=new ys("symbol-value",{fontCharacter:"\\ea95"}),ys.symbolRuler=new ys("symbol-ruler",{fontCharacter:"\\ea96"}),ys.symbolUnit=new ys("symbol-unit",{fontCharacter:"\\ea96"}),ys.activateBreakpoints=new ys("activate-breakpoints",{fontCharacter:"\\ea97"}),ys.archive=new ys("archive",{fontCharacter:"\\ea98"}),ys.arrowBoth=new ys("arrow-both",{fontCharacter:"\\ea99"}),ys.arrowDown=new ys("arrow-down",{fontCharacter:"\\ea9a"}),ys.arrowLeft=new ys("arrow-left",{fontCharacter:"\\ea9b"}),ys.arrowRight=new ys("arrow-right",{fontCharacter:"\\ea9c"}),ys.arrowSmallDown=new ys("arrow-small-down",{fontCharacter:"\\ea9d"}),ys.arrowSmallLeft=new ys("arrow-small-left",{fontCharacter:"\\ea9e"}),ys.arrowSmallRight=new ys("arrow-small-right",{fontCharacter:"\\ea9f"}),ys.arrowSmallUp=new ys("arrow-small-up",{fontCharacter:"\\eaa0"}),ys.arrowUp=new ys("arrow-up",{fontCharacter:"\\eaa1"}),ys.bell=new ys("bell",{fontCharacter:"\\eaa2"}),ys.bold=new ys("bold",{fontCharacter:"\\eaa3"}),ys.book=new ys("book",{fontCharacter:"\\eaa4"}),ys.bookmark=new ys("bookmark",{fontCharacter:"\\eaa5"}),ys.debugBreakpointConditionalUnverified=new ys("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),ys.debugBreakpointConditional=new ys("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),ys.debugBreakpointConditionalDisabled=new ys("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),ys.debugBreakpointDataUnverified=new ys("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),ys.debugBreakpointData=new ys("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),ys.debugBreakpointDataDisabled=new ys("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),ys.debugBreakpointLogUnverified=new ys("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),ys.debugBreakpointLog=new ys("debug-breakpoint-log",{fontCharacter:"\\eaab"}),ys.debugBreakpointLogDisabled=new ys("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),ys.briefcase=new ys("briefcase",{fontCharacter:"\\eaac"}),ys.broadcast=new ys("broadcast",{fontCharacter:"\\eaad"}),ys.browser=new ys("browser",{fontCharacter:"\\eaae"}),ys.bug=new ys("bug",{fontCharacter:"\\eaaf"}),ys.calendar=new ys("calendar",{fontCharacter:"\\eab0"}),ys.caseSensitive=new ys("case-sensitive",{fontCharacter:"\\eab1"}),ys.check=new ys("check",{fontCharacter:"\\eab2"}),ys.checklist=new ys("checklist",{fontCharacter:"\\eab3"}),ys.chevronDown=new ys("chevron-down",{fontCharacter:"\\eab4"}),ys.dropDownButton=new ys("drop-down-button",ys.chevronDown.definition),ys.chevronLeft=new ys("chevron-left",{fontCharacter:"\\eab5"}),ys.chevronRight=new ys("chevron-right",{fontCharacter:"\\eab6"}),ys.chevronUp=new ys("chevron-up",{fontCharacter:"\\eab7"}),ys.chromeClose=new ys("chrome-close",{fontCharacter:"\\eab8"}),ys.chromeMaximize=new ys("chrome-maximize",{fontCharacter:"\\eab9"}),ys.chromeMinimize=new ys("chrome-minimize",{fontCharacter:"\\eaba"}),ys.chromeRestore=new ys("chrome-restore",{fontCharacter:"\\eabb"}),ys.circleOutline=new ys("circle-outline",{fontCharacter:"\\eabc"}),ys.debugBreakpointUnverified=new ys("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),ys.circleSlash=new ys("circle-slash",{fontCharacter:"\\eabd"}),ys.circuitBoard=new ys("circuit-board",{fontCharacter:"\\eabe"}),ys.clearAll=new ys("clear-all",{fontCharacter:"\\eabf"}),ys.clippy=new ys("clippy",{fontCharacter:"\\eac0"}),ys.closeAll=new ys("close-all",{fontCharacter:"\\eac1"}),ys.cloudDownload=new ys("cloud-download",{fontCharacter:"\\eac2"}),ys.cloudUpload=new ys("cloud-upload",{fontCharacter:"\\eac3"}),ys.code=new ys("code",{fontCharacter:"\\eac4"}),ys.collapseAll=new ys("collapse-all",{fontCharacter:"\\eac5"}),ys.colorMode=new ys("color-mode",{fontCharacter:"\\eac6"}),ys.commentDiscussion=new ys("comment-discussion",{fontCharacter:"\\eac7"}),ys.compareChanges=new ys("compare-changes",{fontCharacter:"\\eafd"}),ys.creditCard=new ys("credit-card",{fontCharacter:"\\eac9"}),ys.dash=new ys("dash",{fontCharacter:"\\eacc"}),ys.dashboard=new ys("dashboard",{fontCharacter:"\\eacd"}),ys.database=new ys("database",{fontCharacter:"\\eace"}),ys.debugContinue=new ys("debug-continue",{fontCharacter:"\\eacf"}),ys.debugDisconnect=new ys("debug-disconnect",{fontCharacter:"\\ead0"}),ys.debugPause=new ys("debug-pause",{fontCharacter:"\\ead1"}),ys.debugRestart=new ys("debug-restart",{fontCharacter:"\\ead2"}),ys.debugStart=new ys("debug-start",{fontCharacter:"\\ead3"}),ys.debugStepInto=new ys("debug-step-into",{fontCharacter:"\\ead4"}),ys.debugStepOut=new ys("debug-step-out",{fontCharacter:"\\ead5"}),ys.debugStepOver=new ys("debug-step-over",{fontCharacter:"\\ead6"}),ys.debugStop=new ys("debug-stop",{fontCharacter:"\\ead7"}),ys.debug=new ys("debug",{fontCharacter:"\\ead8"}),ys.deviceCameraVideo=new ys("device-camera-video",{fontCharacter:"\\ead9"}),ys.deviceCamera=new ys("device-camera",{fontCharacter:"\\eada"}),ys.deviceMobile=new ys("device-mobile",{fontCharacter:"\\eadb"}),ys.diffAdded=new ys("diff-added",{fontCharacter:"\\eadc"}),ys.diffIgnored=new ys("diff-ignored",{fontCharacter:"\\eadd"}),ys.diffModified=new ys("diff-modified",{fontCharacter:"\\eade"}),ys.diffRemoved=new ys("diff-removed",{fontCharacter:"\\eadf"}),ys.diffRenamed=new ys("diff-renamed",{fontCharacter:"\\eae0"}),ys.diff=new ys("diff",{fontCharacter:"\\eae1"}),ys.discard=new ys("discard",{fontCharacter:"\\eae2"}),ys.editorLayout=new ys("editor-layout",{fontCharacter:"\\eae3"}),ys.emptyWindow=new ys("empty-window",{fontCharacter:"\\eae4"}),ys.exclude=new ys("exclude",{fontCharacter:"\\eae5"}),ys.extensions=new ys("extensions",{fontCharacter:"\\eae6"}),ys.eyeClosed=new ys("eye-closed",{fontCharacter:"\\eae7"}),ys.fileBinary=new ys("file-binary",{fontCharacter:"\\eae8"}),ys.fileCode=new ys("file-code",{fontCharacter:"\\eae9"}),ys.fileMedia=new ys("file-media",{fontCharacter:"\\eaea"}),ys.filePdf=new ys("file-pdf",{fontCharacter:"\\eaeb"}),ys.fileSubmodule=new ys("file-submodule",{fontCharacter:"\\eaec"}),ys.fileSymlinkDirectory=new ys("file-symlink-directory",{fontCharacter:"\\eaed"}),ys.fileSymlinkFile=new ys("file-symlink-file",{fontCharacter:"\\eaee"}),ys.fileZip=new ys("file-zip",{fontCharacter:"\\eaef"}),ys.files=new ys("files",{fontCharacter:"\\eaf0"}),ys.filter=new ys("filter",{fontCharacter:"\\eaf1"}),ys.flame=new ys("flame",{fontCharacter:"\\eaf2"}),ys.foldDown=new ys("fold-down",{fontCharacter:"\\eaf3"}),ys.foldUp=new ys("fold-up",{fontCharacter:"\\eaf4"}),ys.fold=new ys("fold",{fontCharacter:"\\eaf5"}),ys.folderActive=new ys("folder-active",{fontCharacter:"\\eaf6"}),ys.folderOpened=new ys("folder-opened",{fontCharacter:"\\eaf7"}),ys.gear=new ys("gear",{fontCharacter:"\\eaf8"}),ys.gift=new ys("gift",{fontCharacter:"\\eaf9"}),ys.gistSecret=new ys("gist-secret",{fontCharacter:"\\eafa"}),ys.gist=new ys("gist",{fontCharacter:"\\eafb"}),ys.gitCommit=new ys("git-commit",{fontCharacter:"\\eafc"}),ys.gitCompare=new ys("git-compare",{fontCharacter:"\\eafd"}),ys.gitMerge=new ys("git-merge",{fontCharacter:"\\eafe"}),ys.githubAction=new ys("github-action",{fontCharacter:"\\eaff"}),ys.githubAlt=new ys("github-alt",{fontCharacter:"\\eb00"}),ys.globe=new ys("globe",{fontCharacter:"\\eb01"}),ys.grabber=new ys("grabber",{fontCharacter:"\\eb02"}),ys.graph=new ys("graph",{fontCharacter:"\\eb03"}),ys.gripper=new ys("gripper",{fontCharacter:"\\eb04"}),ys.heart=new ys("heart",{fontCharacter:"\\eb05"}),ys.home=new ys("home",{fontCharacter:"\\eb06"}),ys.horizontalRule=new ys("horizontal-rule",{fontCharacter:"\\eb07"}),ys.hubot=new ys("hubot",{fontCharacter:"\\eb08"}),ys.inbox=new ys("inbox",{fontCharacter:"\\eb09"}),ys.issueClosed=new ys("issue-closed",{fontCharacter:"\\eba4"}),ys.issueReopened=new ys("issue-reopened",{fontCharacter:"\\eb0b"}),ys.issues=new ys("issues",{fontCharacter:"\\eb0c"}),ys.italic=new ys("italic",{fontCharacter:"\\eb0d"}),ys.jersey=new ys("jersey",{fontCharacter:"\\eb0e"}),ys.json=new ys("json",{fontCharacter:"\\eb0f"}),ys.kebabVertical=new ys("kebab-vertical",{fontCharacter:"\\eb10"}),ys.key=new ys("key",{fontCharacter:"\\eb11"}),ys.law=new ys("law",{fontCharacter:"\\eb12"}),ys.lightbulbAutofix=new ys("lightbulb-autofix",{fontCharacter:"\\eb13"}),ys.linkExternal=new ys("link-external",{fontCharacter:"\\eb14"}),ys.link=new ys("link",{fontCharacter:"\\eb15"}),ys.listOrdered=new ys("list-ordered",{fontCharacter:"\\eb16"}),ys.listUnordered=new ys("list-unordered",{fontCharacter:"\\eb17"}),ys.liveShare=new ys("live-share",{fontCharacter:"\\eb18"}),ys.loading=new ys("loading",{fontCharacter:"\\eb19"}),ys.location=new ys("location",{fontCharacter:"\\eb1a"}),ys.mailRead=new ys("mail-read",{fontCharacter:"\\eb1b"}),ys.mail=new ys("mail",{fontCharacter:"\\eb1c"}),ys.markdown=new ys("markdown",{fontCharacter:"\\eb1d"}),ys.megaphone=new ys("megaphone",{fontCharacter:"\\eb1e"}),ys.mention=new ys("mention",{fontCharacter:"\\eb1f"}),ys.milestone=new ys("milestone",{fontCharacter:"\\eb20"}),ys.mortarBoard=new ys("mortar-board",{fontCharacter:"\\eb21"}),ys.move=new ys("move",{fontCharacter:"\\eb22"}),ys.multipleWindows=new ys("multiple-windows",{fontCharacter:"\\eb23"}),ys.mute=new ys("mute",{fontCharacter:"\\eb24"}),ys.noNewline=new ys("no-newline",{fontCharacter:"\\eb25"}),ys.note=new ys("note",{fontCharacter:"\\eb26"}),ys.octoface=new ys("octoface",{fontCharacter:"\\eb27"}),ys.openPreview=new ys("open-preview",{fontCharacter:"\\eb28"}),ys.package_=new ys("package",{fontCharacter:"\\eb29"}),ys.paintcan=new ys("paintcan",{fontCharacter:"\\eb2a"}),ys.pin=new ys("pin",{fontCharacter:"\\eb2b"}),ys.play=new ys("play",{fontCharacter:"\\eb2c"}),ys.run=new ys("run",{fontCharacter:"\\eb2c"}),ys.plug=new ys("plug",{fontCharacter:"\\eb2d"}),ys.preserveCase=new ys("preserve-case",{fontCharacter:"\\eb2e"}),ys.preview=new ys("preview",{fontCharacter:"\\eb2f"}),ys.project=new ys("project",{fontCharacter:"\\eb30"}),ys.pulse=new ys("pulse",{fontCharacter:"\\eb31"}),ys.question=new ys("question",{fontCharacter:"\\eb32"}),ys.quote=new ys("quote",{fontCharacter:"\\eb33"}),ys.radioTower=new ys("radio-tower",{fontCharacter:"\\eb34"}),ys.reactions=new ys("reactions",{fontCharacter:"\\eb35"}),ys.references=new ys("references",{fontCharacter:"\\eb36"}),ys.refresh=new ys("refresh",{fontCharacter:"\\eb37"}),ys.regex=new ys("regex",{fontCharacter:"\\eb38"}),ys.remoteExplorer=new ys("remote-explorer",{fontCharacter:"\\eb39"}),ys.remote=new ys("remote",{fontCharacter:"\\eb3a"}),ys.remove=new ys("remove",{fontCharacter:"\\eb3b"}),ys.replaceAll=new ys("replace-all",{fontCharacter:"\\eb3c"}),ys.replace=new ys("replace",{fontCharacter:"\\eb3d"}),ys.repoClone=new ys("repo-clone",{fontCharacter:"\\eb3e"}),ys.repoForcePush=new ys("repo-force-push",{fontCharacter:"\\eb3f"}),ys.repoPull=new ys("repo-pull",{fontCharacter:"\\eb40"}),ys.repoPush=new ys("repo-push",{fontCharacter:"\\eb41"}),ys.report=new ys("report",{fontCharacter:"\\eb42"}),ys.requestChanges=new ys("request-changes",{fontCharacter:"\\eb43"}),ys.rocket=new ys("rocket",{fontCharacter:"\\eb44"}),ys.rootFolderOpened=new ys("root-folder-opened",{fontCharacter:"\\eb45"}),ys.rootFolder=new ys("root-folder",{fontCharacter:"\\eb46"}),ys.rss=new ys("rss",{fontCharacter:"\\eb47"}),ys.ruby=new ys("ruby",{fontCharacter:"\\eb48"}),ys.saveAll=new ys("save-all",{fontCharacter:"\\eb49"}),ys.saveAs=new ys("save-as",{fontCharacter:"\\eb4a"}),ys.save=new ys("save",{fontCharacter:"\\eb4b"}),ys.screenFull=new ys("screen-full",{fontCharacter:"\\eb4c"}),ys.screenNormal=new ys("screen-normal",{fontCharacter:"\\eb4d"}),ys.searchStop=new ys("search-stop",{fontCharacter:"\\eb4e"}),ys.server=new ys("server",{fontCharacter:"\\eb50"}),ys.settingsGear=new ys("settings-gear",{fontCharacter:"\\eb51"}),ys.settings=new ys("settings",{fontCharacter:"\\eb52"}),ys.shield=new ys("shield",{fontCharacter:"\\eb53"}),ys.smiley=new ys("smiley",{fontCharacter:"\\eb54"}),ys.sortPrecedence=new ys("sort-precedence",{fontCharacter:"\\eb55"}),ys.splitHorizontal=new ys("split-horizontal",{fontCharacter:"\\eb56"}),ys.splitVertical=new ys("split-vertical",{fontCharacter:"\\eb57"}),ys.squirrel=new ys("squirrel",{fontCharacter:"\\eb58"}),ys.starFull=new ys("star-full",{fontCharacter:"\\eb59"}),ys.starHalf=new ys("star-half",{fontCharacter:"\\eb5a"}),ys.symbolClass=new ys("symbol-class",{fontCharacter:"\\eb5b"}),ys.symbolColor=new ys("symbol-color",{fontCharacter:"\\eb5c"}),ys.symbolCustomColor=new ys("symbol-customcolor",{fontCharacter:"\\eb5c"}),ys.symbolConstant=new ys("symbol-constant",{fontCharacter:"\\eb5d"}),ys.symbolEnumMember=new ys("symbol-enum-member",{fontCharacter:"\\eb5e"}),ys.symbolField=new ys("symbol-field",{fontCharacter:"\\eb5f"}),ys.symbolFile=new ys("symbol-file",{fontCharacter:"\\eb60"}),ys.symbolInterface=new ys("symbol-interface",{fontCharacter:"\\eb61"}),ys.symbolKeyword=new ys("symbol-keyword",{fontCharacter:"\\eb62"}),ys.symbolMisc=new ys("symbol-misc",{fontCharacter:"\\eb63"}),ys.symbolOperator=new ys("symbol-operator",{fontCharacter:"\\eb64"}),ys.symbolProperty=new ys("symbol-property",{fontCharacter:"\\eb65"}),ys.wrench=new ys("wrench",{fontCharacter:"\\eb65"}),ys.wrenchSubaction=new ys("wrench-subaction",{fontCharacter:"\\eb65"}),ys.symbolSnippet=new ys("symbol-snippet",{fontCharacter:"\\eb66"}),ys.tasklist=new ys("tasklist",{fontCharacter:"\\eb67"}),ys.telescope=new ys("telescope",{fontCharacter:"\\eb68"}),ys.textSize=new ys("text-size",{fontCharacter:"\\eb69"}),ys.threeBars=new ys("three-bars",{fontCharacter:"\\eb6a"}),ys.thumbsdown=new ys("thumbsdown",{fontCharacter:"\\eb6b"}),ys.thumbsup=new ys("thumbsup",{fontCharacter:"\\eb6c"}),ys.tools=new ys("tools",{fontCharacter:"\\eb6d"}),ys.triangleDown=new ys("triangle-down",{fontCharacter:"\\eb6e"}),ys.triangleLeft=new ys("triangle-left",{fontCharacter:"\\eb6f"}),ys.triangleRight=new ys("triangle-right",{fontCharacter:"\\eb70"}),ys.triangleUp=new ys("triangle-up",{fontCharacter:"\\eb71"}),ys.twitter=new ys("twitter",{fontCharacter:"\\eb72"}),ys.unfold=new ys("unfold",{fontCharacter:"\\eb73"}),ys.unlock=new ys("unlock",{fontCharacter:"\\eb74"}),ys.unmute=new ys("unmute",{fontCharacter:"\\eb75"}),ys.unverified=new ys("unverified",{fontCharacter:"\\eb76"}),ys.verified=new ys("verified",{fontCharacter:"\\eb77"}),ys.versions=new ys("versions",{fontCharacter:"\\eb78"}),ys.vmActive=new ys("vm-active",{fontCharacter:"\\eb79"}),ys.vmOutline=new ys("vm-outline",{fontCharacter:"\\eb7a"}),ys.vmRunning=new ys("vm-running",{fontCharacter:"\\eb7b"}),ys.watch=new ys("watch",{fontCharacter:"\\eb7c"}),ys.whitespace=new ys("whitespace",{fontCharacter:"\\eb7d"}),ys.wholeWord=new ys("whole-word",{fontCharacter:"\\eb7e"}),ys.window=new ys("window",{fontCharacter:"\\eb7f"}),ys.wordWrap=new ys("word-wrap",{fontCharacter:"\\eb80"}),ys.zoomIn=new ys("zoom-in",{fontCharacter:"\\eb81"}),ys.zoomOut=new ys("zoom-out",{fontCharacter:"\\eb82"}),ys.listFilter=new ys("list-filter",{fontCharacter:"\\eb83"}),ys.listFlat=new ys("list-flat",{fontCharacter:"\\eb84"}),ys.listSelection=new ys("list-selection",{fontCharacter:"\\eb85"}),ys.selection=new ys("selection",{fontCharacter:"\\eb85"}),ys.listTree=new ys("list-tree",{fontCharacter:"\\eb86"}),ys.debugBreakpointFunctionUnverified=new ys("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),ys.debugBreakpointFunction=new ys("debug-breakpoint-function",{fontCharacter:"\\eb88"}),ys.debugBreakpointFunctionDisabled=new ys("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),ys.debugStackframeActive=new ys("debug-stackframe-active",{fontCharacter:"\\eb89"}),ys.debugStackframeDot=new ys("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),ys.debugStackframe=new ys("debug-stackframe",{fontCharacter:"\\eb8b"}),ys.debugStackframeFocused=new ys("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),ys.debugBreakpointUnsupported=new ys("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),ys.symbolString=new ys("symbol-string",{fontCharacter:"\\eb8d"}),ys.debugReverseContinue=new ys("debug-reverse-continue",{fontCharacter:"\\eb8e"}),ys.debugStepBack=new ys("debug-step-back",{fontCharacter:"\\eb8f"}),ys.debugRestartFrame=new ys("debug-restart-frame",{fontCharacter:"\\eb90"}),ys.callIncoming=new ys("call-incoming",{fontCharacter:"\\eb92"}),ys.callOutgoing=new ys("call-outgoing",{fontCharacter:"\\eb93"}),ys.menu=new ys("menu",{fontCharacter:"\\eb94"}),ys.expandAll=new ys("expand-all",{fontCharacter:"\\eb95"}),ys.feedback=new ys("feedback",{fontCharacter:"\\eb96"}),ys.groupByRefType=new ys("group-by-ref-type",{fontCharacter:"\\eb97"}),ys.ungroupByRefType=new ys("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),ys.account=new ys("account",{fontCharacter:"\\eb99"}),ys.bellDot=new ys("bell-dot",{fontCharacter:"\\eb9a"}),ys.debugConsole=new ys("debug-console",{fontCharacter:"\\eb9b"}),ys.library=new ys("library",{fontCharacter:"\\eb9c"}),ys.output=new ys("output",{fontCharacter:"\\eb9d"}),ys.runAll=new ys("run-all",{fontCharacter:"\\eb9e"}),ys.syncIgnored=new ys("sync-ignored",{fontCharacter:"\\eb9f"}),ys.pinned=new ys("pinned",{fontCharacter:"\\eba0"}),ys.githubInverted=new ys("github-inverted",{fontCharacter:"\\eba1"}),ys.debugAlt=new ys("debug-alt",{fontCharacter:"\\eb91"}),ys.serverProcess=new ys("server-process",{fontCharacter:"\\eba2"}),ys.serverEnvironment=new ys("server-environment",{fontCharacter:"\\eba3"}),ys.pass=new ys("pass",{fontCharacter:"\\eba4"}),ys.stopCircle=new ys("stop-circle",{fontCharacter:"\\eba5"}),ys.playCircle=new ys("play-circle",{fontCharacter:"\\eba6"}),ys.record=new ys("record",{fontCharacter:"\\eba7"}),ys.debugAltSmall=new ys("debug-alt-small",{fontCharacter:"\\eba8"}),ys.vmConnect=new ys("vm-connect",{fontCharacter:"\\eba9"}),ys.cloud=new ys("cloud",{fontCharacter:"\\ebaa"}),ys.merge=new ys("merge",{fontCharacter:"\\ebab"}),ys.exportIcon=new ys("export",{fontCharacter:"\\ebac"}),ys.graphLeft=new ys("graph-left",{fontCharacter:"\\ebad"}),ys.magnet=new ys("magnet",{fontCharacter:"\\ebae"}),ys.notebook=new ys("notebook",{fontCharacter:"\\ebaf"}),ys.redo=new ys("redo",{fontCharacter:"\\ebb0"}),ys.checkAll=new ys("check-all",{fontCharacter:"\\ebb1"}),ys.pinnedDirty=new ys("pinned-dirty",{fontCharacter:"\\ebb2"}),ys.passFilled=new ys("pass-filled",{fontCharacter:"\\ebb3"}),ys.circleLargeFilled=new ys("circle-large-filled",{fontCharacter:"\\ebb4"}),ys.circleLargeOutline=new ys("circle-large-outline",{fontCharacter:"\\ebb5"}),ys.combine=new ys("combine",{fontCharacter:"\\ebb6"}),ys.gather=new ys("gather",{fontCharacter:"\\ebb6"}),ys.table=new ys("table",{fontCharacter:"\\ebb7"}),ys.variableGroup=new ys("variable-group",{fontCharacter:"\\ebb8"}),ys.typeHierarchy=new ys("type-hierarchy",{fontCharacter:"\\ebb9"}),ys.typeHierarchySub=new ys("type-hierarchy-sub",{fontCharacter:"\\ebba"}),ys.typeHierarchySuper=new ys("type-hierarchy-super",{fontCharacter:"\\ebbb"}),ys.gitPullRequestCreate=new ys("git-pull-request-create",{fontCharacter:"\\ebbc"}),ys.runAbove=new ys("run-above",{fontCharacter:"\\ebbd"}),ys.runBelow=new ys("run-below",{fontCharacter:"\\ebbe"}),ys.notebookTemplate=new ys("notebook-template",{fontCharacter:"\\ebbf"}),ys.debugRerun=new ys("debug-rerun",{fontCharacter:"\\ebc0"}),ys.workspaceTrusted=new ys("workspace-trusted",{fontCharacter:"\\ebc1"}),ys.workspaceUntrusted=new ys("workspace-untrusted",{fontCharacter:"\\ebc2"}),ys.workspaceUnspecified=new ys("workspace-unspecified",{fontCharacter:"\\ebc3"}),ys.terminalCmd=new ys("terminal-cmd",{fontCharacter:"\\ebc4"}),ys.terminalDebian=new ys("terminal-debian",{fontCharacter:"\\ebc5"}),ys.terminalLinux=new ys("terminal-linux",{fontCharacter:"\\ebc6"}),ys.terminalPowershell=new ys("terminal-powershell",{fontCharacter:"\\ebc7"}),ys.terminalTmux=new ys("terminal-tmux",{fontCharacter:"\\ebc8"}),ys.terminalUbuntu=new ys("terminal-ubuntu",{fontCharacter:"\\ebc9"}),ys.terminalBash=new ys("terminal-bash",{fontCharacter:"\\ebca"}),ys.arrowSwap=new ys("arrow-swap",{fontCharacter:"\\ebcb"}),ys.copy=new ys("copy",{fontCharacter:"\\ebcc"}),ys.personAdd=new ys("person-add",{fontCharacter:"\\ebcd"}),ys.filterFilled=new ys("filter-filled",{fontCharacter:"\\ebce"}),ys.wand=new ys("wand",{fontCharacter:"\\ebcf"}),ys.debugLineByLine=new ys("debug-line-by-line",{fontCharacter:"\\ebd0"}),ys.inspect=new ys("inspect",{fontCharacter:"\\ebd1"}),ys.layers=new ys("layers",{fontCharacter:"\\ebd2"}),ys.layersDot=new ys("layers-dot",{fontCharacter:"\\ebd3"}),ys.layersActive=new ys("layers-active",{fontCharacter:"\\ebd4"}),ys.compass=new ys("compass",{fontCharacter:"\\ebd5"}),ys.compassDot=new ys("compass-dot",{fontCharacter:"\\ebd6"}),ys.compassActive=new ys("compass-active",{fontCharacter:"\\ebd7"}),ys.azure=new ys("azure",{fontCharacter:"\\ebd8"}),ys.issueDraft=new ys("issue-draft",{fontCharacter:"\\ebd9"}),ys.gitPullRequestClosed=new ys("git-pull-request-closed",{fontCharacter:"\\ebda"}),ys.gitPullRequestDraft=new ys("git-pull-request-draft",{fontCharacter:"\\ebdb"}),ys.debugAll=new ys("debug-all",{fontCharacter:"\\ebdc"}),ys.debugCoverage=new ys("debug-coverage",{fontCharacter:"\\ebdd"}),ys.runErrors=new ys("run-errors",{fontCharacter:"\\ebde"}),ys.folderLibrary=new ys("folder-library",{fontCharacter:"\\ebdf"}),ys.debugContinueSmall=new ys("debug-continue-small",{fontCharacter:"\\ebe0"}),ys.beakerStop=new ys("beaker-stop",{fontCharacter:"\\ebe1"}),ys.graphLine=new ys("graph-line",{fontCharacter:"\\ebe2"}),ys.graphScatter=new ys("graph-scatter",{fontCharacter:"\\ebe3"}),ys.pieChart=new ys("pie-chart",{fontCharacter:"\\ebe4"}),ys.bracket=new ys("bracket",ys.json.definition),ys.bracketDot=new ys("bracket-dot",{fontCharacter:"\\ebe5"}),ys.bracketError=new ys("bracket-error",{fontCharacter:"\\ebe6"}),ys.lockSmall=new ys("lock-small",{fontCharacter:"\\ebe7"}),ys.azureDevops=new ys("azure-devops",{fontCharacter:"\\ebe8"}),ys.verifiedFilled=new ys("verified-filled",{fontCharacter:"\\ebe9"}),ys.newLine=new ys("newline",{fontCharacter:"\\ebea"}),ys.layout=new ys("layout",{fontCharacter:"\\ebeb"}),ys.layoutActivitybarLeft=new ys("layout-activitybar-left",{fontCharacter:"\\ebec"}),ys.layoutActivitybarRight=new ys("layout-activitybar-right",{fontCharacter:"\\ebed"}),ys.layoutPanelLeft=new ys("layout-panel-left",{fontCharacter:"\\ebee"}),ys.layoutPanelCenter=new ys("layout-panel-center",{fontCharacter:"\\ebef"}),ys.layoutPanelJustify=new ys("layout-panel-justify",{fontCharacter:"\\ebf0"}),ys.layoutPanelRight=new ys("layout-panel-right",{fontCharacter:"\\ebf1"}),ys.layoutPanel=new ys("layout-panel",{fontCharacter:"\\ebf2"}),ys.layoutSidebarLeft=new ys("layout-sidebar-left",{fontCharacter:"\\ebf3"}),ys.layoutSidebarRight=new ys("layout-sidebar-right",{fontCharacter:"\\ebf4"}),ys.layoutStatusbar=new ys("layout-statusbar",{fontCharacter:"\\ebf5"}),ys.layoutMenubar=new ys("layout-menubar",{fontCharacter:"\\ebf6"}),ys.layoutCentered=new ys("layout-centered",{fontCharacter:"\\ebf7"}),ys.target=new ys("target",{fontCharacter:"\\ebf8"}),ys.dialogError=new ys("dialog-error",ys.error.definition),ys.dialogWarning=new ys("dialog-warning",ys.warning.definition),ys.dialogInfo=new ys("dialog-info",ys.info.definition),ys.dialogClose=new ys("dialog-close",ys.close.definition),ys.treeItemExpanded=new ys("tree-item-expanded",ys.chevronDown.definition),ys.treeFilterOnTypeOn=new ys("tree-filter-on-type-on",ys.listFilter.definition),ys.treeFilterOnTypeOff=new ys("tree-filter-on-type-off",ys.listSelection.definition),ys.treeFilterClear=new ys("tree-filter-clear",ys.close.definition),ys.treeItemLoading=new ys("tree-item-loading",ys.loading.definition),ys.menuSelection=new ys("menu-selection",ys.check.definition),ys.menuSubmenu=new ys("menu-submenu",ys.chevronRight.definition),ys.menuBarMore=new ys("menubar-more",ys.more.definition),ys.scrollbarButtonLeft=new ys("scrollbar-button-left",ys.triangleLeft.definition),ys.scrollbarButtonRight=new ys("scrollbar-button-right",ys.triangleRight.definition),ys.scrollbarButtonUp=new ys("scrollbar-button-up",ys.triangleUp.definition),ys.scrollbarButtonDown=new ys("scrollbar-button-down",ys.triangleDown.definition),ys.toolBarMore=new ys("toolbar-more",ys.more.definition),ys.quickInputBack=new ys("quick-input-back",ys.arrowLeft.definition),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){if(e instanceof ys)return["codicon","codicon-"+e.id];const n=t.exec(e.id);if(!n)return i(ys.error);let[,o,s]=n;const r=["codicon","codicon-"+o];return s&&r.push("codicon-modifier-"+s.substr(1)),r}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")}}(gs||(gs={}));class xs{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static getFontStyle(e){return(15360&e)>>>10}static getForeground(e){return(8372224&e)>>>14}static getBackground(e){return(4286578688&e)>>>23}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e);const i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),8&i&&(t+=" mtks"),t}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let o=`color: ${t[i]};`;1&n&&(o+="font-style: italic;"),2&n&&(o+="font-weight: bold;");let s="";return 4&n&&(s+=" underline"),8&n&&(s+=" line-through"),s&&(o+=`text-decoration:${s};`),o}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&i),bold:Boolean(2&i),underline:Boolean(4&i),strikethrough:Boolean(8&i)}}}class Ss{constructor(e,t,i){this._tokenBrand=void 0,this.offset=e,this.type=t,this.language=i}toString(){return"("+this.offset+", "+this.type+")"}}class Es{constructor(e,t){this._tokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}class ks{constructor(e,t){this._encodedTokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}!function(e){const t=new Map;t.set(0,ys.symbolMethod),t.set(1,ys.symbolFunction),t.set(2,ys.symbolConstructor),t.set(3,ys.symbolField),t.set(4,ys.symbolVariable),t.set(5,ys.symbolClass),t.set(6,ys.symbolStruct),t.set(7,ys.symbolInterface),t.set(8,ys.symbolModule),t.set(9,ys.symbolProperty),t.set(10,ys.symbolEvent),t.set(11,ys.symbolOperator),t.set(12,ys.symbolUnit),t.set(13,ys.symbolValue),t.set(15,ys.symbolEnum),t.set(14,ys.symbolConstant),t.set(15,ys.symbolEnum),t.set(16,ys.symbolEnumMember),t.set(17,ys.symbolKeyword),t.set(27,ys.symbolSnippet),t.set(18,ys.symbolText),t.set(19,ys.symbolColor),t.set(20,ys.symbolFile),t.set(21,ys.symbolReference),t.set(22,ys.symbolCustomColor),t.set(23,ys.symbolFolder),t.set(24,ys.symbolTypeParameter),t.set(25,ys.account),t.set(26,ys.issues),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=ys.symbolProperty),i};const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),e.fromString=function(e,t){let n=i.get(e);return void 0!==n||t||(n=9),n}}(ps||(ps={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(ms||(ms={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(fs||(fs={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(_s||(_s={})),function(e){const t=new Map;t.set(0,ys.symbolFile),t.set(1,ys.symbolModule),t.set(2,ys.symbolNamespace),t.set(3,ys.symbolPackage),t.set(4,ys.symbolClass),t.set(5,ys.symbolMethod),t.set(6,ys.symbolProperty),t.set(7,ys.symbolField),t.set(8,ys.symbolConstructor),t.set(9,ys.symbolEnum),t.set(10,ys.symbolInterface),t.set(11,ys.symbolFunction),t.set(12,ys.symbolVariable),t.set(13,ys.symbolConstant),t.set(14,ys.symbolString),t.set(15,ys.symbolNumber),t.set(16,ys.symbolBoolean),t.set(17,ys.symbolArray),t.set(18,ys.symbolObject),t.set(19,ys.symbolKey),t.set(20,ys.symbolNull),t.set(21,ys.symbolEnumMember),t.set(22,ys.symbolStruct),t.set(23,ys.symbolEvent),t.set(24,ys.symbolOperator),t.set(25,ys.symbolTypeParameter),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=ys.symbolProperty),i}}(As||(As={}));class Ds{constructor(e){this.value=e}}Ds.Comment=new Ds("comment"),Ds.Imports=new Ds("imports"),Ds.Region=new Ds("region"),(bs||(bs={})).is=function(e){return!(!e||"object"!=typeof e)&&"string"==typeof e.id&&"string"==typeof e.title},function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(ws||(ws={}));const Is=new us,Ls=new us,Ns=new us,Ts=new us,Ms=new us,Rs=new us;new us,new us;const Bs=new us,Os=new us,Fs=new us,Ps=new us,zs=new us,Vs=new us,Hs=new us,Ws=new us,Us=new us,Qs=new us,js=new us,Ks=new us,Gs=new us,Ys=new us,$s=new us,qs=new us,Js=new us,Xs=new us,Zs=new us,er=new class{constructor(){this._map=new Map,this._factories=new Map,this._onDidChange=new zt,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),Dt((()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))}))}registerFactory(e,t){var i;null===(i=this._factories.get(e))||void 0===i||i.dispose();const n=new vs(this,e,t);return this._factories.set(e,n),Dt((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}getOrCreate(e){return Cs(this,void 0,void 0,(function*(){const t=this.get(e);if(t)return t;const i=this._factories.get(e);return!i||i.isResolved?null:(yield i.resolve(),this.get(e))}))}get(e){return this._map.get(e)||null}isResolved(e){if(this.get(e))return!0;const t=this._factories.get(e);return!(t&&!t.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}};var tr,ir,nr,or,sr,rr,ar,lr,cr,dr,hr,ur,gr,pr,mr,fr,_r,Ar,br,wr,Cr,vr,yr,xr,Sr,Er,kr,Dr,Ir,Lr,Nr,Tr,Mr,Rr,Br,Or,Fr;!function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(tr||(tr={})),function(e){e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(ir||(ir={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(nr||(nr={})),function(e){e[e.Deprecated=1]="Deprecated"}(or||(or={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(sr||(sr={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(rr||(rr={})),function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(ar||(ar={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(lr||(lr={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(cr||(cr={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(dr||(dr={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.autoClosingBrackets=5]="autoClosingBrackets",e[e.autoClosingDelete=6]="autoClosingDelete",e[e.autoClosingOvertype=7]="autoClosingOvertype",e[e.autoClosingQuotes=8]="autoClosingQuotes",e[e.autoIndent=9]="autoIndent",e[e.automaticLayout=10]="automaticLayout",e[e.autoSurround=11]="autoSurround",e[e.bracketPairColorization=12]="bracketPairColorization",e[e.guides=13]="guides",e[e.codeLens=14]="codeLens",e[e.codeLensFontFamily=15]="codeLensFontFamily",e[e.codeLensFontSize=16]="codeLensFontSize",e[e.colorDecorators=17]="colorDecorators",e[e.columnSelection=18]="columnSelection",e[e.comments=19]="comments",e[e.contextmenu=20]="contextmenu",e[e.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",e[e.cursorBlinking=22]="cursorBlinking",e[e.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",e[e.cursorStyle=24]="cursorStyle",e[e.cursorSurroundingLines=25]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",e[e.cursorWidth=27]="cursorWidth",e[e.disableLayerHinting=28]="disableLayerHinting",e[e.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",e[e.domReadOnly=30]="domReadOnly",e[e.dragAndDrop=31]="dragAndDrop",e[e.emptySelectionClipboard=32]="emptySelectionClipboard",e[e.extraEditorClassName=33]="extraEditorClassName",e[e.fastScrollSensitivity=34]="fastScrollSensitivity",e[e.find=35]="find",e[e.fixedOverflowWidgets=36]="fixedOverflowWidgets",e[e.folding=37]="folding",e[e.foldingStrategy=38]="foldingStrategy",e[e.foldingHighlight=39]="foldingHighlight",e[e.foldingImportsByDefault=40]="foldingImportsByDefault",e[e.foldingMaximumRegions=41]="foldingMaximumRegions",e[e.unfoldOnClickAfterEndOfLine=42]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=43]="fontFamily",e[e.fontInfo=44]="fontInfo",e[e.fontLigatures=45]="fontLigatures",e[e.fontSize=46]="fontSize",e[e.fontWeight=47]="fontWeight",e[e.formatOnPaste=48]="formatOnPaste",e[e.formatOnType=49]="formatOnType",e[e.glyphMargin=50]="glyphMargin",e[e.gotoLocation=51]="gotoLocation",e[e.hideCursorInOverviewRuler=52]="hideCursorInOverviewRuler",e[e.hover=53]="hover",e[e.inDiffEditor=54]="inDiffEditor",e[e.inlineSuggest=55]="inlineSuggest",e[e.letterSpacing=56]="letterSpacing",e[e.lightbulb=57]="lightbulb",e[e.lineDecorationsWidth=58]="lineDecorationsWidth",e[e.lineHeight=59]="lineHeight",e[e.lineNumbers=60]="lineNumbers",e[e.lineNumbersMinChars=61]="lineNumbersMinChars",e[e.linkedEditing=62]="linkedEditing",e[e.links=63]="links",e[e.matchBrackets=64]="matchBrackets",e[e.minimap=65]="minimap",e[e.mouseStyle=66]="mouseStyle",e[e.mouseWheelScrollSensitivity=67]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=68]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=69]="multiCursorMergeOverlapping",e[e.multiCursorModifier=70]="multiCursorModifier",e[e.multiCursorPaste=71]="multiCursorPaste",e[e.occurrencesHighlight=72]="occurrencesHighlight",e[e.overviewRulerBorder=73]="overviewRulerBorder",e[e.overviewRulerLanes=74]="overviewRulerLanes",e[e.padding=75]="padding",e[e.parameterHints=76]="parameterHints",e[e.peekWidgetDefaultFocus=77]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=78]="definitionLinkOpensInPeek",e[e.quickSuggestions=79]="quickSuggestions",e[e.quickSuggestionsDelay=80]="quickSuggestionsDelay",e[e.readOnly=81]="readOnly",e[e.renameOnType=82]="renameOnType",e[e.renderControlCharacters=83]="renderControlCharacters",e[e.renderFinalNewline=84]="renderFinalNewline",e[e.renderLineHighlight=85]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=86]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=87]="renderValidationDecorations",e[e.renderWhitespace=88]="renderWhitespace",e[e.revealHorizontalRightPadding=89]="revealHorizontalRightPadding",e[e.roundedSelection=90]="roundedSelection",e[e.rulers=91]="rulers",e[e.scrollbar=92]="scrollbar",e[e.scrollBeyondLastColumn=93]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=94]="scrollBeyondLastLine",e[e.scrollPredominantAxis=95]="scrollPredominantAxis",e[e.selectionClipboard=96]="selectionClipboard",e[e.selectionHighlight=97]="selectionHighlight",e[e.selectOnLineNumbers=98]="selectOnLineNumbers",e[e.showFoldingControls=99]="showFoldingControls",e[e.showUnused=100]="showUnused",e[e.snippetSuggestions=101]="snippetSuggestions",e[e.smartSelect=102]="smartSelect",e[e.smoothScrolling=103]="smoothScrolling",e[e.stickyTabStops=104]="stickyTabStops",e[e.stopRenderingLineAfter=105]="stopRenderingLineAfter",e[e.suggest=106]="suggest",e[e.suggestFontSize=107]="suggestFontSize",e[e.suggestLineHeight=108]="suggestLineHeight",e[e.suggestOnTriggerCharacters=109]="suggestOnTriggerCharacters",e[e.suggestSelection=110]="suggestSelection",e[e.tabCompletion=111]="tabCompletion",e[e.tabIndex=112]="tabIndex",e[e.unicodeHighlighting=113]="unicodeHighlighting",e[e.unusualLineTerminators=114]="unusualLineTerminators",e[e.useShadowDOM=115]="useShadowDOM",e[e.useTabStops=116]="useTabStops",e[e.wordSeparators=117]="wordSeparators",e[e.wordWrap=118]="wordWrap",e[e.wordWrapBreakAfterCharacters=119]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=120]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=121]="wordWrapColumn",e[e.wordWrapOverride1=122]="wordWrapOverride1",e[e.wordWrapOverride2=123]="wordWrapOverride2",e[e.wrappingIndent=124]="wrappingIndent",e[e.wrappingStrategy=125]="wrappingStrategy",e[e.showDeprecated=126]="showDeprecated",e[e.inlayHints=127]="inlayHints",e[e.editorClassName=128]="editorClassName",e[e.pixelRatio=129]="pixelRatio",e[e.tabFocusMode=130]="tabFocusMode",e[e.layoutInfo=131]="layoutInfo",e[e.wrappingInfo=132]="wrappingInfo"}(hr||(hr={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(ur||(ur={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(gr||(gr={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(pr||(pr={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(mr||(mr={})),function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(fr||(fr={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(_r||(_r={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.Digit0=21]="Digit0",e[e.Digit1=22]="Digit1",e[e.Digit2=23]="Digit2",e[e.Digit3=24]="Digit3",e[e.Digit4=25]="Digit4",e[e.Digit5=26]="Digit5",e[e.Digit6=27]="Digit6",e[e.Digit7=28]="Digit7",e[e.Digit8=29]="Digit8",e[e.Digit9=30]="Digit9",e[e.KeyA=31]="KeyA",e[e.KeyB=32]="KeyB",e[e.KeyC=33]="KeyC",e[e.KeyD=34]="KeyD",e[e.KeyE=35]="KeyE",e[e.KeyF=36]="KeyF",e[e.KeyG=37]="KeyG",e[e.KeyH=38]="KeyH",e[e.KeyI=39]="KeyI",e[e.KeyJ=40]="KeyJ",e[e.KeyK=41]="KeyK",e[e.KeyL=42]="KeyL",e[e.KeyM=43]="KeyM",e[e.KeyN=44]="KeyN",e[e.KeyO=45]="KeyO",e[e.KeyP=46]="KeyP",e[e.KeyQ=47]="KeyQ",e[e.KeyR=48]="KeyR",e[e.KeyS=49]="KeyS",e[e.KeyT=50]="KeyT",e[e.KeyU=51]="KeyU",e[e.KeyV=52]="KeyV",e[e.KeyW=53]="KeyW",e[e.KeyX=54]="KeyX",e[e.KeyY=55]="KeyY",e[e.KeyZ=56]="KeyZ",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.Semicolon=80]="Semicolon",e[e.Equal=81]="Equal",e[e.Comma=82]="Comma",e[e.Minus=83]="Minus",e[e.Period=84]="Period",e[e.Slash=85]="Slash",e[e.Backquote=86]="Backquote",e[e.BracketLeft=87]="BracketLeft",e[e.Backslash=88]="Backslash",e[e.BracketRight=89]="BracketRight",e[e.Quote=90]="Quote",e[e.OEM_8=91]="OEM_8",e[e.IntlBackslash=92]="IntlBackslash",e[e.Numpad0=93]="Numpad0",e[e.Numpad1=94]="Numpad1",e[e.Numpad2=95]="Numpad2",e[e.Numpad3=96]="Numpad3",e[e.Numpad4=97]="Numpad4",e[e.Numpad5=98]="Numpad5",e[e.Numpad6=99]="Numpad6",e[e.Numpad7=100]="Numpad7",e[e.Numpad8=101]="Numpad8",e[e.Numpad9=102]="Numpad9",e[e.NumpadMultiply=103]="NumpadMultiply",e[e.NumpadAdd=104]="NumpadAdd",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NumpadSubtract=106]="NumpadSubtract",e[e.NumpadDecimal=107]="NumpadDecimal",e[e.NumpadDivide=108]="NumpadDivide",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.AudioVolumeMute=112]="AudioVolumeMute",e[e.AudioVolumeUp=113]="AudioVolumeUp",e[e.AudioVolumeDown=114]="AudioVolumeDown",e[e.BrowserSearch=115]="BrowserSearch",e[e.BrowserHome=116]="BrowserHome",e[e.BrowserBack=117]="BrowserBack",e[e.BrowserForward=118]="BrowserForward",e[e.MediaTrackNext=119]="MediaTrackNext",e[e.MediaTrackPrevious=120]="MediaTrackPrevious",e[e.MediaStop=121]="MediaStop",e[e.MediaPlayPause=122]="MediaPlayPause",e[e.LaunchMediaPlayer=123]="LaunchMediaPlayer",e[e.LaunchMail=124]="LaunchMail",e[e.LaunchApp2=125]="LaunchApp2",e[e.MAX_VALUE=126]="MAX_VALUE"}(Ar||(Ar={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(br||(br={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(wr||(wr={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(Cr||(Cr={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(vr||(vr={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(yr||(yr={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(xr||(xr={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.None=2]="None"}(Sr||(Sr={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(Er||(Er={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(kr||(kr={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(Dr||(Dr={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(Ir||(Ir={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(Lr||(Lr={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(Nr||(Nr={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(Tr||(Tr={})),function(e){e[e.Deprecated=1]="Deprecated"}(Mr||(Mr={})),function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(Rr||(Rr={})),function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(Br||(Br={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(Or||(Or={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(Fr||(Fr={}));class Pr{static chord(e,t){return ni(e,t)}}function zr(){return{editor:void 0,languages:void 0,CancellationTokenSource:Gt,Emitter:zt,KeyCode:Ar,KeyMod:Pr,Position:Ki,Range:Gi,Selection:Yi,SelectionDirection:Lr,MarkerSeverity:br,MarkerTag:wr,Uri:Bi,Token:Ss}}Pr.CtrlCmd=2048,Pr.Shift=1024,Pr.Alt=512,Pr.WinCtrl=256;var Vr=[],Hr=[];function Wr(e,t){if(e&&"undefined"!=typeof document){var i,n=!0===t.prepend?"prepend":"append",o=!0===t.singleTag,s="string"==typeof t.container?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(o){var r=Vr.indexOf(s);-1===r&&(r=Vr.push(s)-1,Hr[r]={}),i=Hr[r]&&Hr[r][n]?Hr[r][n]:Hr[r][n]=a()}else i=a();65279===e.charCodeAt(0)&&(e=e.substring(1)),i.styleSheet?i.styleSheet.cssText+=e:i.appendChild(document.createTextNode(e))}function a(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),t.attributes)for(var i=Object.keys(t.attributes),o=0;o .scrollbar,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar {\n\t\t-ms-high-contrast-adjust: none;\n\t\tbackground: background !important;\n\t\tborder: 1px solid windowtext;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider {\n\t\tbackground: windowtext !important;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider:hover,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\tbackground: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-scrollable-element > .scrollbar > .slider.active,\n\t.monaco-editor.vs-dark .monaco-scrollable-element > .scrollbar > .slider.active {\n\t\tbackground: highlight !important;\n\t}\n\n\t/* overview ruler */\n\t.monaco-editor.vs .decorationsOverviewRuler,\n\t.monaco-editor.vs-dark .decorationsOverviewRuler {\n\t\topacity: 0;\n\t}\n\n\t/* minimap */\n\t.monaco-editor.vs .minimap,\n\t.monaco-editor.vs-dark .minimap {\n\t\tdisplay: none;\n\t}\n\n\t/* squiggles */\n\t.monaco-editor.vs .squiggly-d-error,\n\t.monaco-editor.vs-dark .squiggly-d-error {\n\t\tbackground: transparent !important;\n\t\tborder-bottom: 4px double #E47777;\n\t}\n\t.monaco-editor.vs .squiggly-c-warning,\n\t.monaco-editor.vs-dark .squiggly-c-warning {\n\t\tborder-bottom: 4px double #71B771;\n\t}\n\t.monaco-editor.vs .squiggly-b-info,\n\t.monaco-editor.vs-dark .squiggly-b-info {\n\t\tborder-bottom: 4px double #71B771;\n\t}\n\t.monaco-editor.vs .squiggly-a-hint,\n\t.monaco-editor.vs-dark .squiggly-a-hint {\n\t\tborder-bottom: 4px double #6c6c6c;\n\t}\n\n\t/* contextmenu */\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label {\n\t\t-ms-high-contrast-adjust: none;\n\t\tcolor: highlighttext !important;\n\t\tbackground-color: highlight !important;\n\t}\n\t.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,\n\t.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label {\n\t\t-ms-high-contrast-adjust: none;\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight;\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* diff editor */\n\t.monaco-diff-editor.vs .diffOverviewRuler,\n\t.monaco-diff-editor.vs-dark .diffOverviewRuler {\n\t\tdisplay: none;\n\t}\n\t.monaco-editor.vs .line-insert,\n\t.monaco-editor.vs-dark .line-insert,\n\t.monaco-editor.vs .line-delete,\n\t.monaco-editor.vs-dark .line-delete {\n\t\tbackground: transparent !important;\n\t\tborder: 1px solid highlight !important;\n\t\tbox-sizing: border-box;\n\t}\n\t.monaco-editor.vs .char-insert,\n\t.monaco-editor.vs-dark .char-insert,\n\t.monaco-editor.vs .char-delete,\n\t.monaco-editor.vs-dark .char-delete {\n\t\tbackground: transparent !important;\n\t}\n}\n\n/*.monaco-editor.vs [tabindex="0"]:focus {\n\toutline: 1px solid rgba(0, 122, 204, 0.4);\n\toutline-offset: -1px;\n\topacity: 1 !important;\n}\n\n.monaco-editor.vs-dark [tabindex="0"]:focus {\n\toutline: 1px solid rgba(14, 99, 156, 0.6);\n\toutline-offset: -1px;\n\topacity: 1 !important;\n}*/\n',{});class Ur{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}Ur.INSTANCE=new Ur;class Qr extends Lt{constructor(){super(),this._onDidChange=this._register(new zt),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio(),this._removeListener=this._installResolutionListener()}get value(){return this._value}dispose(){this._removeListener(),super.dispose()}_installResolutionListener(){const e=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),t=()=>this._updateValue();return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}}_updateValue(){this._value=this._getPixelRatio(),this._onDidChange.fire(this._value),this._removeListener=this._installResolutionListener()}_getPixelRatio(){const e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}}const jr=new class{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=new Qr),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}};function Kr(){return Ur.INSTANCE.getZoomFactor()}const Gr=navigator.userAgent,Yr=Gr.indexOf("Firefox")>=0,$r=Gr.indexOf("AppleWebKit")>=0,qr=Gr.indexOf("Chrome")>=0,Jr=!qr&&Gr.indexOf("Safari")>=0,Xr=!qr&&!Jr&&$r,Zr=Gr.indexOf("Edge/")>=0&&Gr.indexOf("WebView/")>=0,ea=Gr.indexOf("Electron/")>=0,ta=Gr.indexOf("Android")>=0,ia=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches;var na=Object.freeze({__proto__:null,PixelRatio:jr,getZoomFactor:Kr,isFirefox:Yr,isWebKit:$r,isChrome:qr,isSafari:Jr,isWebkitWebView:Xr,isEdgeLegacyWebView:Zr,isElectron:ea,isAndroid:ta,isStandalone:ia});class oa{constructor(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}setHeight(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}setTop(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}unsetTop(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")}setLeft(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}setBottom(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}setRight(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setLineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function sa(e){return new oa(e)}function ra(e,t){e instanceof oa?(e.setFontFamily(t.getMassagedFontFamily(Jr?lt.fontFamily:null)),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)):(e.style.fontFamily=t.getMassagedFontFamily(Jr?lt.fontFamily:null),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px")}class aa{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class la{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");ra(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");ra(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");ra(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const o=[];for(const e of this._requests){let s;0===e.type&&(s=t),2===e.type&&(s=i),1===e.type&&(s=n),s.appendChild(document.createElement("br"));const r=document.createElement("span");la._render(r,e),s.appendChild(r),o.push(r)}this._container=e,this._testElements=o}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;ethis._values[e]))}}const pa=new class extends Lt{constructor(){super(),this._onDidChange=this._register(new zt),this.onDidChange=this._onDidChange.event,this._cache=new ga,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new ga,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=window.setTimeout((()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()}),5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const i of e)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readFontInfo(e){if(!this._cache.has(e)){let t=this._actualReadFontInfo(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new ua({pixelRatio:jr.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}_createRequest(e,t,i,n){const o=new aa(e,t);return i.push(o),n&&n.push(o),o}_actualReadFontInfo(e){const t=[],i=[],n=this._createRequest("n",0,t,i),o=this._createRequest("m",0,t,null),s=this._createRequest(" ",0,t,i),r=this._createRequest("0",0,t,i),a=this._createRequest("1",0,t,i),l=this._createRequest("2",0,t,i),c=this._createRequest("3",0,t,i),d=this._createRequest("4",0,t,i),h=this._createRequest("5",0,t,i),u=this._createRequest("6",0,t,i),g=this._createRequest("7",0,t,i),p=this._createRequest("8",0,t,i),m=this._createRequest("9",0,t,i),f=this._createRequest("→",0,t,i),_=this._createRequest("→",0,t,null),A=this._createRequest("·",0,t,i),b=this._createRequest(String.fromCharCode(11825),0,t,null),w="|/-_ilm%";for(let e=0,n=8;e.001){v=!1;break}}let x=!0;return v&&_.width!==y&&(x=!1),_.width>f.width&&(x=!1),new ua({pixelRatio:jr.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:v,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:o.width,canUseHalfwidthRightwardsArrow:x,spaceWidth:s.width,middotWidth:A.width,wsmiddotWidth:b.width,maxDigitWidth:C},!0)}};var ma;!function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(ma||(ma={}));const fa=_a("instantiationService");function _a(e){if(ma.serviceIds.has(e))return ma.serviceIds.get(e);const t=function(e,i,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,i,n){t[ma.DI_TARGET]===t?t[ma.DI_DEPENDENCIES].push({id:e,index:i,optional:n}):(t[ma.DI_DEPENDENCIES]=[{id:e,index:i,optional:n}],t[ma.DI_TARGET]=t)}(t,e,n,!1)};return t.toString=()=>e,ma.serviceIds.set(e,t),t}const Aa=_a("codeEditorService");function ba(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}const wa={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class Ca extends Lt{constructor(e,t={}){super(),this._onDidUpdate=this._register(new zt),this._editor=e,this._options=ke(t,wa,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose((()=>this.dispose()))),this._register(this._editor.onDidUpdateDiff((()=>this._onDiffUpdated()))),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition((e=>{this.ignoreSelectionChange||(this.nextIdx=-1)}))),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel((e=>{this.revealFirst=!0}))),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach((e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((e=>{this.ranges.push({rhs:!0,range:new Gi(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):0===e.modifiedEndLineNumber?this.ranges.push({rhs:!0,range:new Gi(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new Gi(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber+1,1)})})),this.ranges.sort(((e,t)=>Gi.compareRangesUsingStarts(e.range,t.range))),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1;const i=this._editor.getPosition();if(i){for(let n=0,o=this.ranges.length;n=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const e=i.range.getStartPosition();this._editor.setPosition(e),this._editor.revealRangeInCenter(i.range,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}const va={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};var ya;!function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(ya||(ya={}));class xa{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t0&&e.getLanguageId(r-1)===o;)r--;return new Da(e,o,r,s+1,e.getStartOffset(r),e.getEndOffset(s))}class Da{constructor(e,t,i,n,o,s){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=s}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function Ia(e){return!!(3&e)}class La{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new xa(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new xa({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.colorizedBracketPairs?this._colorizedBracketPairs=Na(e.colorizedBracketPairs.map((e=>[e[0],e[1]]))):e.brackets?this._colorizedBracketPairs=Na(e.brackets.map((e=>[e[0],e[1]])).filter((e=>!("<"===e[0]&&">"===e[1])))):this._colorizedBracketPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new xa({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"==typeof e.autoCloseBefore?e.autoCloseBefore:La.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}getSurroundingPairs(){return this._surroundingPairs}getColorizedBrackets(){return this._colorizedBracketPairs}}function Na(e){return e.filter((([e,t])=>""!==e&&""!==t))}La.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t";const Ta="undefined"!=typeof Buffer;let Ma,Ra,Ba,Oa;class Fa{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(e){return Ta&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new Fa(e)}toString(){return Ta?this.buffer.toString():(Ma||(Ma=new TextDecoder),Ma.decode(this.buffer))}}function Pa(e,t){return(e[t+0]|0)>>>0|e[t+1]<<8>>>0}function za(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function Va(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function Ha(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function Wa(e,t){return e[t]}function Ua(e,t,i){e[i]=t}function Qa(){return Ra||(Ra=new TextDecoder("UTF-16LE")),Ra}function ja(){return Oa||(Oa=D()?Qa():(Ba||(Ba=new TextDecoder("UTF-16BE")),Ba)),Oa}const Ka="undefined"!=typeof TextDecoder;let Ga,Ya;function $a(e,t,i){const n=[];let o=0;for(let s=0;snew qa(e),Ya=function(e,t,i){const n=new Uint16Array(e.buffer,t,i);if(i>0&&(65279===n[0]||65534===n[0]))return $a(e,t,i);return Qa().decode(n)}):(Ga=e=>new Ja,Ya=$a);class qa{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return ja().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){const t=this._capacity-this._bufferLength;t<=1&&(0===t||Jn(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){const t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let e=0;e{const[i,n]=e,[o,s]=t;return i===o||i===s||n===o||n===s},o=(e,n)=>{const o=Math.min(e,n),s=Math.max(e,n);for(let e=0;e0&&s.push({open:o,close:r})}return s}(t);this.brackets=i.map(((t,n)=>new Xa(e,n,t.open,t.close,function(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let e=0,t=o.length;e=0&&n.push(t);for(const t of s.close)t.indexOf(e)>=0&&n.push(t)}}function tl(e,t){return e.length-t.length}function il(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function nl(e){const t=/^[\w ]+$/.test(e);return e=Nn(e),t?`\\b${e}\\b`:e}function ol(e){return Bn(`(${e.map(nl).join(")|(")})`,!0)}const sl=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){if(Ka){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return ja().decode(t)}{const t=[];let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charAt(n);return t.join("")}}(e)),t}}();class rl{static _findPrevBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const s=i.length-(o.index||0),r=o[0].length,a=n+s;return new Gi(t,a-r+1,t,a+1)}static findPrevBracketInRange(e,t,i,n,o){const s=sl(i).substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,s,n)}static findNextBracketInText(e,t,i,n){const o=i.match(e);if(!o)return null;const s=o.index||0,r=o[0].length;if(0===r)return null;const a=n+s;return new Gi(t,a+1,t,a+1+r)}static findNextBracketInRange(e,t,i,n,o){const s=i.substring(n,o);return this.findNextBracketInText(e,t,s,n)}}class al{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return Y(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if(Ia(t.getStandardTokenType(n)))return null;const o=this._richEditBrackets.reversedRegex,s=t.getLineContent().substring(0,i-1)+e,r=rl.findPrevBracketInRange(o,1,s,0,s.length);if(!r)return null;const a=s.substring(r.startColumn-1,r.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const l=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(l)?{matchOpenBracket:a}:null}}function ll(e){return e.global&&(e.lastIndex=0),!0}class cl{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&ll(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&ll(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&ll(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&ll(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}class dl{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=dl._createOpenBracketRegExp(e[0]),i=dl._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,o=this._regExpRules.length;e!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return o.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e=2&&i.length>0)for(let e=0,t=this._brackets.length;e=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},yl=function(e,t){return function(i,n){t(i,n,e)}};class xl{constructor(e){this.languageId=e}affects(e){return!this.languageId||this.languageId===e}}const Sl=_a("languageConfigurationService");let El=class extends Lt{constructor(e,t){super(),this.configurationService=e,this.languageService=t,this.onDidChangeEmitter=this._register(new zt),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const i=new Set(Object.values(kl));this._register(this.configurationService.onDidChangeConfiguration((e=>{const t=e.change.keys.some((e=>i.has(e))),n=e.change.overrides.filter((([e,t])=>t.some((e=>i.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new xl(void 0));else for(const e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new xl(e)))}))),this._register(Ll.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new xl(e.languageId))})))}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i){let n=Ll.getLanguageConfiguration(e);if(!n){if(!i.isRegisteredLanguageId(e))throw new Error("Unexpected languageId");n=new Rl(e,{})}const o=function(e,t){const i=t.getValue(kl.brackets,{overrideIdentifier:e}),n=t.getValue(kl.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:Dl(i),colorizedBracketPairs:Dl(n)}}(n.languageId,t),s=Tl([n.underlyingConfig,o]);return new Rl(n.languageId,s)}(e,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};El=vl([yl(0,hl),yl(1,_l)],El);const kl={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function Dl(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}class Il{constructor(e){this.languageId=e}}const Ll=new class{constructor(){this._entries=new Map,this._onDidChange=new zt,this.onDidChange=this._onDidChange.event}register(e,t,i=0){let n=this._entries.get(e);n||(n=new Nl(e),this._entries.set(e,n));const o=n.register(t,i);return this._onDidChange.fire(new Il(e)),Dt((()=>{o.dispose(),this._onDidChange.fire(new Il(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return(null==t?void 0:t.getResolvedConfiguration())||null}getComments(e){const t=this.getLanguageConfiguration(e);return t&&t.comments||null}getIndentRulesSupport(e){const t=this.getLanguageConfiguration(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,i){const n=e.getLanguageIdAtPosition(t,0);if(t>1){let o,s=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==n)return s;const t=e.getLineContent(o);if(!i.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return o;s=o}}return-1}getInheritIndentForLine(e,t,i,n=!0){if(e<4)return null;const o=this.getIndentRulesSupport(t.getLanguageId());if(!o)return null;if(i<=1)return{indentation:"",action:null};const s=this.getPrecedingValidLine(t,i,o);if(s<0)return null;if(s<1)return{indentation:"",action:null};const r=t.getLineContent(s);if(o.shouldIncrease(r)||o.shouldIndentNextLine(r))return{indentation:zn(r),action:ya.Indent,line:s};if(o.shouldDecrease(r))return{indentation:zn(r),action:null,line:s};{if(1===s)return{indentation:zn(t.getLineContent(s)),action:null,line:s};const e=s-1,i=o.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:zn(t.getLineContent(i+1)),action:null,line:i+1}}if(n)return{indentation:zn(t.getLineContent(s)),action:null,line:s};for(let e=s;e>0;e--){const i=t.getLineContent(e);if(o.shouldIncrease(i))return{indentation:zn(i),action:ya.Indent,line:e};if(o.shouldIndentNextLine(i)){let i=0;for(let n=e-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(e))){i=n;break}return{indentation:zn(t.getLineContent(i+1)),action:null,line:i+1}}if(o.shouldDecrease(i))return{indentation:zn(i),action:null,line:e}}return{indentation:zn(t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,i,n,o){if(e<4)return null;const s=this.getLanguageConfiguration(i);if(!s)return null;const r=this.getIndentRulesSupport(i);if(!r)return null;const a=this.getInheritIndentForLine(e,t,n),l=t.getLineContent(n);if(a){const i=a.line;if(void 0!==i){const n=s.onEnter(e,"",t.getLineContent(i),"");if(n){let e=zn(t.getLineContent(i));return n.removeText&&(e=e.substring(0,e.length-n.removeText)),n.indentAction===ya.Indent||n.indentAction===ya.IndentOutdent?e=o.shiftIndent(e):n.indentAction===ya.Outdent&&(e=o.unshiftIndent(e)),r.shouldDecrease(l)&&(e=o.unshiftIndent(e)),n.appendText&&(e+=n.appendText),zn(e)}}return r.shouldDecrease(l)?a.action===ya.Indent?a.indentation:o.unshiftIndent(a.indentation):a.action===ya.Indent?o.shiftIndent(a.indentation):a.indentation}return null}getIndentForEnter(e,t,i,n){if(e<4)return null;t.forceTokenization(i.startLineNumber);const o=t.getLineTokens(i.startLineNumber),s=ka(o,i.startColumn-1),r=s.getLineContent();let a,l,c=!1;if(s.firstCharOffset>0&&o.getLanguageId(0)!==s.languageId?(c=!0,a=r.substr(0,i.startColumn-1-s.firstCharOffset)):a=o.getLineContent().substring(0,i.startColumn-1),i.isEmpty())l=r.substr(i.startColumn-1-s.firstCharOffset);else{l=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-s.firstCharOffset)}const d=this.getIndentRulesSupport(s.languageId);if(!d)return null;const h=a,u=zn(a),g={getLineTokens:e=>t.getLineTokens(e),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i),getLineContent:e=>e===i.startLineNumber?h:t.getLineContent(e)},p=zn(o.getLineContent()),m=this.getInheritIndentForLine(e,g,i.startLineNumber+1);if(!m){const e=c?p:u;return{beforeEnter:e,afterEnter:e}}let f=c?p:m.indentation;return m.action===ya.Indent&&(f=n.shiftIndent(f)),d.shouldDecrease(l)&&(f=n.unshiftIndent(f)),{beforeEnter:c?p:u,afterEnter:f}}getIndentActionForType(e,t,i,n,o){if(e<4)return null;const s=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn);if(s.firstCharOffset)return null;const r=this.getIndentRulesSupport(s.languageId);if(!r)return null;const a=s.getLineContent(),l=a.substr(0,i.startColumn-1-s.firstCharOffset);let c;if(i.isEmpty())c=a.substr(i.startColumn-1-s.firstCharOffset);else{c=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-s.firstCharOffset)}if(!r.shouldDecrease(l+c)&&r.shouldDecrease(l+n+c)){const n=this.getInheritIndentForLine(e,t,i.startLineNumber,!1);if(!n)return null;let s=n.indentation;return n.action!==ya.Indent&&(s=o.unshiftIndent(s)),s}return null}getIndentMetadata(e,t){const i=this.getIndentRulesSupport(e.getLanguageId());return i?t<1||t>e.getLineCount()?null:i.getIndentMetadata(e.getLineContent(t)):null}getEnterAction(e,t,i){const n=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn),o=this.getLanguageConfiguration(n.languageId);if(!o)return null;const s=n.getLineContent(),r=s.substr(0,i.startColumn-1-n.firstCharOffset);let a;if(i.isEmpty())a=s.substr(i.startColumn-1-n.firstCharOffset);else{a=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-n.firstCharOffset)}let l="";if(i.startLineNumber>1&&0===n.firstCharOffset){const e=this.getScopedLineTokens(t,i.startLineNumber-1);e.languageId===n.languageId&&(l=e.getLineContent())}const c=o.onEnter(e,l,r,a);if(!c)return null;const d=c.indentAction;let h=c.appendText;const u=c.removeText||0;h?d===ya.Indent&&(h="\t"+h):h=d===ya.Indent||d===ya.IndentOutdent?"\t":"";let g=this.getIndentationAtPosition(t,i.startLineNumber,i.startColumn);return u&&(g=g.substring(0,g.length-u)),{indentAction:d,appendText:h,removeText:u,indentation:g}}getIndentationAtPosition(e,t,i){let n=zn(e.getLineContent(t));return n.length>i-1&&(n=n.substring(0,i-1)),n}getScopedLineTokens(e,t,i){e.forceTokenization(t);return ka(e.getLineTokens(t),void 0===i?e.getLineMaxColumn(t)-1:i-1)}};class Nl{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new Ml(e,t,++this._order);return this._entries.push(i),this._resolved=null,Dt((()=>{for(let e=0;ee.configuration))))}}function Tl(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class Ml{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class Rl{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new dl(this.underlyingConfig):null,this.comments=Rl._handleComments(this.underlyingConfig),this.characterPair=new La(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||R,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new cl(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{}}getWordDefinition(){return B(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new Za(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new al(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new Sa(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(){return this.characterPair.getAutoCloseBeforeSet()}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){const[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}wl(Sl,El);const Bl=new class{clone(){return this}equals(e){return this===e}};function Ol(e,t){return new Es([new Ss(0,"",e)],t)}function Fl(e,t){const i=new Uint32Array(2);return i[0]=0,i[1]=(16384|e|2<<23)>>>0,new ks(i,null===t?Bl:t)}const Pl=_a("modelService");let zl=!1;function Vl(e){w&&(zl||(zl=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class Hl{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.method=i,this.args=n,this.type=0}}class Wl{constructor(e,t,i,n){this.vsWorker=e,this.seq=t,this.res=i,this.err=n,this.type=1}}class Ul{constructor(e,t,i,n){this.vsWorker=e,this.req=t,this.eventName=i,this.arg=n,this.type=2}}class Ql{constructor(e,t,i){this.vsWorker=e,this.req=t,this.event=i,this.type=3}}class jl{constructor(e,t){this.vsWorker=e,this.req=t,this.type=4}}class Kl{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}sendMessage(e,t){const i=String(++this._lastSentReq);return new Promise(((n,o)=>{this._pendingReplies[i]={resolve:n,reject:o},this._send(new Hl(this._workerId,i,e,t))}))}listen(e,t){let i=null;const n=new zt({onFirstListenerAdd:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,n),this._send(new Ul(this._workerId,i,e,t))},onLastListenerRemove:()=>{this._pendingEmitters.delete(i),this._send(new jl(this._workerId,i)),i=null}});return n.event}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq])return void console.warn("Got reply to unknown seq");let t=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let i=e.err;return e.err.$isError&&(i=new Error,i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack),void t.reject(i)}t.resolve(e.res)}_handleRequestMessage(e){let t=e.req;this._handler.handleMessage(e.method,e.args).then((e=>{this._send(new Wl(this._workerId,t,e,void 0))}),(e=>{e.detail instanceof Error&&(e.detail=mt(e.detail)),this._send(new Wl(this._workerId,t,void 0,mt(e)))}))}_handleSubscribeEventMessage(e){const t=e.req,i=this._handler.handleEvent(e.eventName,e.arg)((e=>{this._send(new Ql(this._workerId,t,e))}));this._pendingEvents.set(t,i)}_handleEventMessage(e){this._pendingEmitters.has(e.req)?this._pendingEmitters.get(e.req).fire(e.event):console.warn("Got event for unknown req")}_handleUnsubscribeEventMessage(e){this._pendingEvents.has(e.req)?(this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)):console.warn("Got unsubscribe for unknown req")}_send(e){let t=[];if(0===e.type)for(let i=0;i{this._protocol.handleMessage(e)}),(e=>{n&&n(e)}))),this._protocol=new Kl({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!=typeof i[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(i[e].apply(i,t))}catch(e){return Promise.reject(e)}},handleEvent:(e,t)=>{if($l(e)){const n=i[e].call(i,t);if("function"!=typeof n)throw new Error(`Missing dynamic event ${e} on main thread host.`);return n}if(Yl(e)){const t=i[e];if("function"!=typeof t)throw new Error(`Missing event ${e} on main thread host.`);return t}throw new Error(`Malformed event name ${e}`)}}),this._protocol.setWorkerId(this._worker.getId());let o=null;void 0!==g.require&&"function"==typeof g.require.getConfig?o=g.require.getConfig():void 0!==g.requirejs&&(o=g.requirejs.s.contexts._.config);const s=we(i);this._onModuleLoaded=this._protocol.sendMessage("$initialize",[this._worker.getId(),JSON.parse(JSON.stringify(o)),t,s]);const r=(e,t)=>this._request(e,t),a=(e,t)=>this._protocol.listen(e,t);this._lazyProxy=new Promise(((e,i)=>{n=i,this._onModuleLoaded.then((t=>{e(function(e,t,i){const n=e=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},o=e=>function(t){return i(e,t)};let s={};for(const t of e)$l(t)?s[t]=o(t):Yl(t)?s[t]=i(t,void 0):s[t]=n(t);return s}(t,r,a))}),(e=>{i(e),this._onError("Worker failed to load "+t,e)}))}))}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise(((i,n)=>{this._onModuleLoaded.then((()=>{this._protocol.sendMessage(e,t).then(i,n)}),n)}))}_onError(e,t){console.error(e),console.info(t)}}function Yl(e){return"o"===e[0]&&"n"===e[1]&&Kn(e.charCodeAt(2))}function $l(e){return/^onDynamic/.test(e)&&Kn(e.charCodeAt(9))}var ql;const Jl=null===(ql=window.trustedTypes)||void 0===ql?void 0:ql.createPolicy("defaultWorkerFactory",{createScriptURL:e=>e});class Xl{constructor(e,t,i,n,o){this.id=t;const s=function(e){if(g.MonacoEnvironment){if("function"==typeof g.MonacoEnvironment.getWorker)return g.MonacoEnvironment.getWorker("workerMain.js",e);if("function"==typeof g.MonacoEnvironment.getWorkerUrl){const t=g.MonacoEnvironment.getWorkerUrl("workerMain.js",e);return new Worker(Jl?Jl.createScriptURL(t):t,{name:e})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}(i);"function"==typeof s.then?this.worker=s:this.worker=Promise.resolve(s),this.postMessage(e,[]),this.worker.then((e=>{e.onmessage=function(e){n(e.data)},e.onmessageerror=o,"function"==typeof e.addEventListener&&e.addEventListener("error",o)}))}getId(){return this.id}postMessage(e,t){this.worker&&this.worker.then((i=>i.postMessage(e,t)))}dispose(){this.worker&&this.worker.then((e=>e.terminate())),this.worker=null}}class Zl{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){let n=++Zl.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new Xl(e,n,this._label||"anonymous"+n,t,(e=>{Vl(e),this._webWorkerFailedBeforeError=e,i(e)}))}}Zl.LAST_WORKER_ID=0;class ec{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function tc(e){return ic(e,0)}function ic(e,t){switch(typeof e){case"object":return null===e?nc(349,t):Array.isArray(e)?(i=e,n=nc(104579,n=t),i.reduce(((e,t)=>ic(t,e)),n)):function(e,t){return t=nc(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=oc(i,t),ic(e[i],t))),t)}(e,t);case"string":return oc(e,t);case"boolean":return function(e,t){return nc(e?433:863,t)}(e,t);case"number":return nc(e,t);case"undefined":return nc(937,t);default:return nc(617,t)}var i,n}function nc(e,t){return(t<<5)-t+e|0}function oc(e,t){t=nc(149417,t);for(let i=0,n=e.length;i>>n)>>>0}function rc(e,t=0,i=e.byteLength,n=0){for(let o=0;oe.toString(16).padStart(2,"0"))).join(""):function(e,t,i="0"){for(;e.length>>0).toString(16),t/4)}class lc{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let n,o,s=this._buffLen,r=this._leftoverHighSurrogate;for(0!==r?(n=r,o=-1,r=0):(n=e.charCodeAt(0),o=0);;){let a=n;if(Jn(n)){if(!(o+1>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),ac(this._h0)+ac(this._h1)+ac(this._h2)+ac(this._h3)+ac(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,rc(this._buff,this._buffLen),this._buffLen>56&&(this._step(),rc(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=lc._bigBlock32,t=this._buffDV;for(let i=0;i<64;i+=4)e.setUint32(i,t.getUint32(i,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,sc(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let i,n,o,s=this._h0,r=this._h1,a=this._h2,l=this._h3,c=this._h4;for(let t=0;t<80;t++)t<20?(i=r&a|~r&l,n=1518500249):t<40?(i=r^a^l,n=1859775393):t<60?(i=r&a|r&l|a&l,n=2400959708):(i=r^a^l,n=3395469782),o=sc(s,5)+i+c+n+e.getUint32(4*t,!1)&4294967295,c=l,l=a,a=sc(r,30),r=s,s=o;this._h0=this._h0+s&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+c&4294967295}}lc._bigBlock32=new DataView(new ArrayBuffer(320));class cc{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new ec(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class pc{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,o,s]=pc._getElements(e),[r,a,l]=pc._getElements(t);this._hasStrings=s&&l,this._originalStringElements=n,this._originalElementsOrHash=o,this._modifiedStringElements=r,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(pc._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i=e&&n>=i&&this.ElementsAreEqual(t,n);)t--,n--;if(e>t||i>n){let o;return i<=n?(hc.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o=[new ec(e,0,i,n-i+1)]):e<=t?(hc.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),o=[new ec(e,t-e+1,i,0)]):(hc.Assert(e===t+1,"originalStart should only be one more than originalEnd"),hc.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),o=[]),o}const s=[0],r=[0],a=this.ComputeRecursionPoint(e,t,i,n,s,r,o),l=s[0],c=r[0];if(null!==a)return a;if(!o[0]){const s=this.ComputeDiffRecursive(e,l,i,c,o);let r=[];return r=o[0]?[new ec(l+1,t-(l+1)+1,c+1,n-(c+1)+1)]:this.ComputeDiffRecursive(l+1,t,c+1,n,o),this.ConcatenateChanges(s,r)}return[new ec(e,t-e+1,i,n-i+1)]}WALKTRACE(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,f,_){let A=null,b=null,w=new gc,C=t,v=i,y=u[0]-m[0]-n,x=-1073741824,S=this.m_forwardHistory.length-1;do{const t=y+e;t===C||t=0&&(e=(l=this.m_forwardHistory[S])[0],C=1,v=l.length-1)}while(--S>=-1);if(A=w.getReverseChanges(),_[0]){let e=u[0]+1,t=m[0]+1;if(null!==A&&A.length>0){const i=A[A.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}b=[new ec(e,h-e+1,t,p-t+1)]}else{w=new gc,C=s,v=r,y=u[0]-m[0]-a,x=1073741824,S=f?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=y+o;e===C||e=c[e+1]?(g=(d=c[e+1]-1)-y-a,d>x&&w.MarkNextChange(),x=d+1,w.AddOriginalElement(d+1,g+1),y=e+1-o):(g=(d=c[e-1])-y-a,d>x&&w.MarkNextChange(),x=d,w.AddModifiedElement(d+1,g+1),y=e-1-o),S>=0&&(o=(c=this.m_reverseHistory[S])[0],C=1,v=c.length-1)}while(--S>=-1);b=w.getChanges()}return this.ConcatenateChanges(A,b)}ComputeRecursionPoint(e,t,i,n,o,s,r){let a=0,l=0,c=0,d=0,h=0,u=0;e--,i--,o[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=t-e+(n-i),p=g+1,m=new Int32Array(p),f=new Int32Array(p),_=n-i,A=t-e,b=e-i,w=t-n,C=(A-_)%2==0;m[_]=e,f[A]=t,r[0]=!1;for(let v=1;v<=g/2+1;v++){let g=0,y=0;c=this.ClipDiagonalBound(_-v,v,_,p),d=this.ClipDiagonalBound(_+v,v,_,p);for(let e=c;e<=d;e+=2){a=e===c||eg+y&&(g=a,y=l),!C&&Math.abs(e-A)<=v-1&&a>=f[e])return o[0]=a,s[0]=l,i<=f[e]&&v<=1448?this.WALKTRACE(_,c,d,b,A,h,u,w,m,f,a,t,o,l,n,s,C,r):null}const x=(g-e+(y-i)-v)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(g,x))return r[0]=!0,o[0]=g,s[0]=y,x>0&&v<=1448?this.WALKTRACE(_,c,d,b,A,h,u,w,m,f,a,t,o,l,n,s,C,r):(e++,i++,[new ec(e,t-e+1,i,n-i+1)]);h=this.ClipDiagonalBound(A-v,v,A,p),u=this.ClipDiagonalBound(A+v,v,A,p);for(let g=h;g<=u;g+=2){a=g===h||g=f[g+1]?f[g+1]-1:f[g-1],l=a-(g-A)-w;const p=a;for(;a>e&&l>i&&this.ElementsAreEqual(a,l);)a--,l--;if(f[g]=a,C&&Math.abs(g-_)<=v&&a<=m[g])return o[0]=a,s[0]=l,p>=m[g]&&v<=1448?this.WALKTRACE(_,c,d,b,A,h,u,w,m,f,a,t,o,l,n,s,C,r):null}if(v<=1447){let e=new Int32Array(d-c+2);e[0]=_-c+1,uc.Copy2(m,c,e,1,d-c+1),this.m_forwardHistory.push(e),e=new Int32Array(u-h+2),e[0]=A-h+1,uc.Copy2(f,h,e,1,u-h+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(_,c,d,b,A,h,u,w,m,f,a,t,o,l,n,s,C,r)}PrettifyChanges(e){for(let t=0;t0,r=i.modifiedLength>0;for(;i.originalStart+i.originalLength=0;t--){const i=e[t];let n=0,o=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,o=i.modifiedStart+i.modifiedLength}const s=i.originalLength>0,r=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,c=i.modifiedStart-e;if(tl&&(l=d,a=e)}i.originalStart-=a,i.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t0&&i>a&&(a=i,l=t,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let o=0;o=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(i,n)?1:0)}ConcatenateChanges(e,t){let i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return uc.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],uc.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return uc.Copy(e,0,i,0,e.length),uc.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(hc.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),hc.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const n=e.originalStart;let o=e.originalLength;const s=e.modifiedStart;let r=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(r=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new ec(n,o,s,r),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&o()){const s=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);let l=mc(s,a,o,!0).changes;r&&(l=function(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,o=e.length;n1&&r>1;){if(e.charCodeAt(i-2)!==t.charCodeAt(r-2))break;i--,r--}(i>1||r>1)&&this._pushTrimWhitespaceCharChange(n,o+1,1,i,s+1,1,r)}{let i=vc(e,1),r=vc(t,1);const a=e.length+1,l=t.length+1;for(;i!0;const t=Date.now();return()=>Date.now()-t255?255:0|e}function Sc(e){return e<0?0:e>4294967295?4294967295:0|e}class Ec{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=Sc(e);const i=this.values,n=this.prefixSum,o=t.length;return 0!==o&&(this.values=new Uint32Array(i.length+o),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+o),this.values.set(t,e),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=Sc(e),t=Sc(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;const o=i.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Sc(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,o=0,s=0;for(;t<=i;)if(n=t+(i-t)/2|0,o=this.prefixSum[n],s=o-this.values[n],e=o))break;t=n+1}return new Dc(n,e-s)}}class kc{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),0===e?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new Dc(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=X(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+t;for(let n=0;n=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class Nc{constructor(){this._actual=new Lc(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}}class Tc{constructor(e,t,i){const n=new Uint8Array(e*t);for(let o=0,s=e*t;ot&&(t=s),o>i&&(i=o),r>i&&(i=r)}t++,i++;const n=new Tc(i,t,0);for(let t=0,i=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}let Rc=null;let Bc=null;class Oc{static _createLink(e,t,i,n,o){let s=o-1;do{const i=t.charCodeAt(s);if(2!==e.get(i))break;s--}while(s>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(s);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&s--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:s+2},url:t.substring(n,s+1)}}static computeLinks(e,t=function(){return null===Rc&&(Rc=new Mc([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Rc}()){const i=function(){if(null===Bc){Bc=new Lc(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}Fc.INSTANCE=new Fc;class Pc extends Lc{constructor(e){super(0);for(let t=0,i=e.length;t(t.hasOwnProperty(i)||(t[i]=e(i)),t[i])}((e=>new Pc(e)));class Vc{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=Bn(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new tn(t,this.wordSeparators?zc(this.wordSeparators):null,i?this.searchString:null)}}function Hc(e,t,i){if(!i)return new Zi(e,null);const n=[];for(let e=0,i=t.length;e=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}class Uc{static findMatches(e,t,i,n,o){const s=t.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(e,i,new jc(s.wordSeparators,s.regex),n,o):this._doFindMatchesLineByLine(e,i,s,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,s){let r,a,l=0;if(n?(l=n.findLineFeedCountBeforeOffset(o),r=t+o+l):r=t+o,n){const e=n.findLineFeedCountBeforeOffset(o+s.length)-l;a=r+s.length+e}else a=r+s.length;const c=e.getPositionAt(r),d=e.getPositionAt(a);return new Gi(c.lineNumber,c.column,d.lineNumber,d.column)}static _doFindMatchesMultiline(e,t,i,n,o){const s=e.getOffsetAt(t.getStartPosition()),r=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new Wc(r):null,l=[];let c,d=0;for(i.reset(0);c=i.next(r);)if(l[d++]=Hc(this._getMultilineMatchRange(e,s,r,a,c.index,c[0]),c,n),d>=o)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,o){const s=[];let r=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o),s}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,s,n,o);for(let a=t.startLineNumber+1;a=a))return o;return o}const c=new jc(e.wordSeparators,e.regex);let d;c.reset(0);do{if(d=c.next(t),d&&(s[o++]=Hc(new Gi(i,d.index+1+n,i,d.index+1+d[0].length+n),d,r),o>=a))return o}while(d);return o}static findNextMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new jc(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,s,n):this._doFindNextMatchLineByLine(e,i,s,n)}static _doFindNextMatchMultiline(e,t,i,n){const o=new Ki(t.lineNumber,1),s=e.getOffsetAt(o),r=e.getLineCount(),a=e.getValueInRange(new Gi(o.lineNumber,o.column,r,e.getLineMaxColumn(r)),1),l="\r\n"===e.getEOL()?new Wc(a):null;i.reset(t.column-1);let c=i.next(a);return c?Hc(this._getMultilineMatchRange(e,s,a,l,c.index,c[0]),c,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new Ki(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s),a=this._findFirstMatchInLine(i,r,s,t.column,n);if(a)return a;for(let t=1;t<=o;t++){const r=(s+t-1)%o,a=e.getLineContent(r+1),l=this._findFirstMatchInLine(i,a,r+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);const s=e.next(t);return s?Hc(new Gi(i,s.index+1,i,s.index+1+s[0].length),s,o):null}static findPreviousMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const s=new jc(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,s,n):this._doFindPreviousMatchLineByLine(e,i,s,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const o=this._doFindMatchesMultiline(e,new Gi(1,1,t.lineNumber,t.column),i,n,9990);if(o.length>0)return o[o.length-1];const s=e.getLineCount();return t.lineNumber!==s||t.column!==e.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(e,new Ki(s,e.getLineMaxColumn(s)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const o=e.getLineCount(),s=t.lineNumber,r=e.getLineContent(s).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,s,n);if(a)return a;for(let t=1;t<=o;t++){const r=(o+s-t-1)%o,a=e.getLineContent(r+1),l=this._findLastMatchInLine(i,a,r+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let o,s=null;for(e.reset(0);o=e.next(t);)s=Hc(new Gi(i,o.index+1,i,o.index+1+o[0].length),o,n);return s}}function Qc(e,t,i,n,o){return function(e,t,i,n,o){if(0===n)return!0;const s=t.charCodeAt(n-1);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,o)&&function(e,t,i,n,o){if(n+o===i)return!0;const s=t.charCodeAt(n+o);if(0!==e.get(s))return!0;if(13===s||10===s)return!0;if(o>0){const i=t.charCodeAt(n+o-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,o)}class jc{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const n=i.index,o=i[0].length;if(n===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){eo(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=n,this._prevMatchLength=o,!this._wordSeparators||Qc(this._wordSeparators,e,t,n,o))return i}while(i);return null}}class Kc{static computeUnicodeHighlights(e,t,i){const n=i?i.startLineNumber:1,o=i?i.endLineNumber:e.getLineCount(),s=new Gc(t),r=s.getCandidateCodePoints();let a;a="allNonBasicAscii"===r?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp(""+`[${Nn(Array.from(r).map((e=>String.fromCodePoint(e))).join(""))}]`,"g");const l=new jc(null,a),c=[];let d,h=!1,u=0,g=0,p=0;e:for(let t=n,i=o;t<=i;t++){const i=e.getLineContent(t),n=i.length;l.reset(0);do{if(d=l.next(i),d){let e=d.index,o=d.index+d[0].length;if(e>0){Jn(i.charCodeAt(e-1))&&e--}if(o+1=i){h=!0;break e}c.push(new Gi(t,e+1,t,o+1))}}}while(d)}return{ranges:c,hasMore:h,ambiguousCharacterCount:u,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:p}}static computeUnicodeHighlightReason(e,t){const i=new Gc(t);switch(i.shouldHighlightNonBasicASCII(e)){case 0:return null;case 2:return{kind:1};case 3:{const n=e.codePointAt(0),o=i.ambiguousCharacters.getPrimaryConfusable(n),s=Co.getLocales().filter((e=>!Co.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(n)));return{kind:0,confusableWith:String.fromCodePoint(o),notAmbiguousInLocales:s}}case 1:return{kind:2}}}}class Gc{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=Co.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of vo.codePoints)e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e){const t=e.codePointAt(0);if(this.allowedCodePoints.has(t))return 0;if(this.options.nonBasicASCII)return 1;if(this.options.invisibleCharacters){if(!(" "===e||"\n"===e||"\t"===e)&&vo.isInvisibleCharacter(t))return 2}return this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(t)?3:0}}var Yc=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class $c extends Ic{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){const i=F(e.column,B(t),this._lines[e.lineNumber-1],0);return i?new Gi(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn):null}words(e){const t=this._lines,i=this._wordenize.bind(this);let n=0,o="",s=0,r=[];return{*[Symbol.iterator](){for(;;)if(sthis._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{const e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}class qc{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){const e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}acceptNewModel(e){this._models[e.url]=new $c(Bi.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeUnicodeHighlights(e,t,i){return Yc(this,void 0,void 0,(function*(){const n=this._getModel(e);return n?Kc.computeUnicodeHighlights(n,t,i):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}))}computeDiff(e,t,i,n){return Yc(this,void 0,void 0,(function*(){const o=this._getModel(e),s=this._getModel(t);if(!o||!s)return null;const r=o.getLinesContent(),a=s.getLinesContent(),l=new wc(r,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:i,shouldMakePrettyDiff:!0,maxComputationTime:n}).computeDiff(),c=!(l.changes.length>0)&&this._modelsAreIdentical(o,s);return{quitEarly:l.quitEarly,identical:c,changes:l.changes}}))}_modelsAreIdentical(e,t){const i=e.getLineCount();if(i!==t.getLineCount())return!1;for(let n=1;n<=i;n++){if(e.getLineContent(n)!==t.getLineContent(n))return!1}return!0}computeMoreMinimalEdits(e,t){return Yc(this,void 0,void 0,(function*(){const i=this._getModel(e);if(!i)return t;const n=[];let o;t=t.slice(0).sort(((e,t)=>{if(e.range&&t.range)return Gi.compareRangesUsingStarts(e.range,t.range);return(e.range?0:1)-(t.range?0:1)}));for(let{range:e,text:s,eol:r}of t){if("number"==typeof r&&(o=r),Gi.isEmpty(e)&&!s)continue;const t=i.getValueInRange(e);if(s=s.replace(/\r\n|\n|\r/g,i.eol),t===s)continue;if(Math.max(s.length,t.length)>qc._diffLimit){n.push({range:e,text:s});continue}const a=dc(t,s,!1),l=i.offsetAt(Gi.lift(e).getStartPosition());for(const e of a){const t=i.positionAt(l+e.originalStart),o=i.positionAt(l+e.originalStart+e.originalLength),r={text:s.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:o.lineNumber,endColumn:o.column}};i.getValueInRange(r.range)!==r.text&&n.push(r)}}return"number"==typeof o&&n.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),n}))}computeLinks(e){return Yc(this,void 0,void 0,(function*(){const t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?Oc.computeLinks(e):[]}(t):null}))}textualSuggest(e,t,i,n){return Yc(this,void 0,void 0,(function*(){const o=new Ot(!0),s=new RegExp(i,n),r=new Set;e:for(let i of e){const e=this._getModel(i);if(e)for(let i of e.words(s))if(i!==t&&isNaN(Number(i))&&(r.add(i),r.size>qc._suggestionsLimit))break e}return{words:Array.from(r),duration:o.elapsed()}}))}computeWordRanges(e,t,i,n){return Yc(this,void 0,void 0,(function*(){const o=this._getModel(e);if(!o)return Object.create(null);const s=new RegExp(i,n),r=Object.create(null);for(let e=t.startLineNumber;efunction(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)};let n={};for(const t of e)n[t]=i(t);return n}(i,((e,t)=>this._host.fhr(e,t))),o={host:n,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,t),Promise.resolve(we(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}qc._diffLimit=1e5,qc._suggestionsLimit=1e4,"function"==typeof importScripts&&(g.monaco=zr());const Jc=_a("textResourceConfigurationService"),Xc=_a("textResourcePropertiesService"),Zc=_a("logService");var ed;!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(ed||(ed={}));const td=ed.Info;class id extends Lt{constructor(){super(...arguments),this.level=td,this._onDidChangeLogLevel=this._register(new zt)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class nd extends id{constructor(e=td){super(),this.setLevel(e)}trace(e,...t){this.getLevel()<=ed.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=ed.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=ed.Info&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.getLevel()<=ed.Error&&console.log("%c ERR","color: #f33",e,...t)}dispose(){}}class od extends Lt{constructor(e){super(),this.logger=e,this._register(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}error(e,...t){this.logger.error(e,...t)}}var sd=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},rd=function(e,t){return function(i,n){t(i,n,e)}},ad=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const ld=3e5;function cd(e,t){const i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let dd=class extends Lt{constructor(e,t,i,n){super(),this._modelService=e,this._workerManager=this._register(new ud(this._modelService,n)),this._logService=i,this._register(Ys.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(e,t)=>cd(this._modelService,e.uri)?this._workerManager.withWorker().then((t=>t.computeLinks(e.uri))).then((e=>e&&{links:e})):Promise.resolve({links:[]})})),this._register(Ns.register("*",new hd(this._workerManager,t,this._modelService,n)))}dispose(){super.dispose()}canComputeUnicodeHighlights(e){return cd(this._modelService,e)}computedUnicodeHighlights(e,t,i){return this._workerManager.withWorker().then((n=>n.computedUnicodeHighlights(e,t,i)))}computeDiff(e,t,i,n){return this._workerManager.withWorker().then((o=>o.computeDiff(e,t,i,n)))}computeMoreMinimalEdits(e,t){if(G(t)){if(!cd(this._modelService,e))return Promise.resolve(t);const i=Ot.create(!0),n=this._workerManager.withWorker().then((i=>i.computeMoreMinimalEdits(e,t)));return n.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),i.elapsed()))),Promise.race([n,gn(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return cd(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then((n=>n.navigateValueSet(e,t,i)))}canComputeWordRanges(e){return cd(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then((i=>i.computeWordRanges(e,t)))}};dd=sd([rd(0,Pl),rd(1,Jc),rd(2,Zc),rd(3,Sl)],dd);class hd{constructor(e,t,i,n){this.languageConfigurationService=n,this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}provideCompletionItems(e,t){return ad(this,void 0,void 0,(function*(){const i=this._configurationService.getValue(e.uri,t,"editor");if(!i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestionsMode)cd(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())cd(this._modelService,t.uri)&&(t===e?n.unshift(t.uri):"allDocuments"!==i.wordBasedSuggestionsMode&&t.getLanguageId()!==e.getLanguageId()||n.push(t.uri));if(0===n.length)return;const o=this.languageConfigurationService.getLanguageConfiguration(e.getLanguageId()).getWordDefinition(),s=e.getWordAtPosition(t),r=s?new Gi(t.lineNumber,s.startColumn,t.lineNumber,s.endColumn):Gi.fromPositions(t),a=r.setEndPosition(t.lineNumber,t.column),l=yield this._workerManager.withWorker(),c=yield l.textualSuggest(n,null==s?void 0:s.word,o);return c?{duration:c.duration,suggestions:c.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:r}})))}:void 0}))}}class ud extends Lt{constructor(e,t){super(),this.languageConfigurationService=t,this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime();this._register(new _n).cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(15e4)),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;(new Date).getTime()-this._lastWorkerUsedTime>ld&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new fd(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class gd extends Lt{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){const e=new _n;e.cancelAndSet((()=>this._checkStopModelSync()),Math.round(3e4)),this._register(e)}}dispose(){for(let e in this._syncedModels)Et(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const i of e){const e=i.toString();this._syncedModels[e]||this._beginModelSync(i,t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){const e=(new Date).getTime(),t=[];for(let i in this._syncedModelsLastUsedTime){e-this._syncedModelsLastUsedTime[i]>6e4&&t.push(i)}for(const e of t)this._stopModelSync(e)}_beginModelSync(e,t){const i=this._modelService.getModel(e);if(!i)return;if(!t&&i.isTooLargeForSyncing())return;const n=e.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const o=new It;o.add(i.onDidChangeContent((e=>{this._proxy.acceptModelChanged(n.toString(),e)}))),o.add(i.onWillDispose((()=>{this._stopModelSync(n)}))),o.add(Dt((()=>{this._proxy.acceptRemovedModel(n)}))),this._syncedModels[n]=o}_stopModelSync(e){const t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],Et(t)}}class pd{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class md{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class fd extends Lt{constructor(e,t,i,n){super(),this.languageConfigurationService=n,this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new Zl(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new Gl(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new md(this)))}catch(e){Vl(e),this._worker=new pd(new qc(new md(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,(e=>(Vl(e),this._worker=new pd(new qc(new md(this),null)),this._getOrCreateWorker().getProxyObject())))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new gd(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,t=!1){return ad(this,void 0,void 0,(function*(){return this._disposed?Promise.reject(bt()):this._getProxy().then((i=>(this._getOrCreateModelManager(i).ensureSyncedResources(e,t),i)))}))}computedUnicodeHighlights(e,t,i){return this._withSyncedResources([e]).then((n=>n.computeUnicodeHighlights(e.toString(),t,i)))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t],!0).then((o=>o.computeDiff(e.toString(),t.toString(),i,n)))}computeMoreMinimalEdits(e,t){return this._withSyncedResources([e]).then((i=>i.computeMoreMinimalEdits(e.toString(),t)))}computeLinks(e){return this._withSyncedResources([e]).then((t=>t.computeLinks(e.toString())))}textualSuggest(e,t,i){return ad(this,void 0,void 0,(function*(){const n=yield this._withSyncedResources(e),o=i.source,s=On(i);return n.textualSuggest(e.map((e=>e.toString())),t,o,s)}))}computeWordRanges(e,t){return this._withSyncedResources([e]).then((i=>{const n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);const o=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId()).getWordDefinition(),s=o.source,r=On(o);return i.computeWordRanges(e.toString(),t,s,r)}))}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then((n=>{const o=this._modelService.getModel(e);if(!o)return null;const s=this.languageConfigurationService.getLanguageConfiguration(o.getLanguageId()).getWordDefinition(),r=s.source,a=On(s);return n.navigateValueSet(e.toString(),t,i,r,a)}))}dispose(){super.dispose(),this._disposed=!0}}class _d extends fd{constructor(e,t,i){super(e,i.keepIdleModels||!1,i.label,t),this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!=typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(e){return Promise.reject(e)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?we(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then((t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)},o={};for(const e of t)o[e]=n(e,i);return o}))}))),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then((e=>this.getProxy()))}}class Ad{constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=i}static createEmpty(e,t){const i=Ad.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new Ad(n,e,t)}equals(e){return e instanceof Ad&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,o=n+(i<<1);for(let t=n;t0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)],i=xs.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return xs.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return xs.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return xs.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return xs.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return xs.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return Ad.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new bd(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let t=0;t>>1)-1;for(;it&&(n=o)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="";const o=new Array;let s=0;for(;;){const r=ts){n+=this._text.substring(s,a.offset);const e=this._tokens[1+(t<<1)];o.push(n.length,e),s=a.offset}n+=a.text,o.push(n.length,a.tokenMetadata),i++}}return new Ad(new Uint32Array(o),n,this._languageIdCodec)}}Ad.defaultTokenMetadata=16793600;class bd{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let t=this._firstTokenIndex,n=e.getCount();t=i)break;this._tokensCount++}}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof bd&&(this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount))}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}class wd{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length;if(i!==t.length)return!1;for(let n=0;n=o||(r[a++]=new wd(Math.max(1,t.startColumn-n+1),Math.min(s+1,t.endColumn-n+1),t.className,t.type));return r}static filter(e,t,i,n){if(0===e.length)return[];const o=[];let s=0;for(let r=0,a=e.length;rt)continue;if(l.isEmpty()&&(0===a.type||3===a.type))continue;const c=l.startLineNumber===t?l.startColumn:i,d=l.endLineNumber===t?l.endColumn:n;o[s++]=new wd(c,d,a.inlineClassName,a.type)}return o}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=wd._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class yd{static normalize(e,t){if(0===t.length)return[];const i=[],n=new vd;let o=0;for(let s=0,r=t.length;s1){Jn(e.charCodeAt(a-2))&&a--}if(l>1){Jn(e.charCodeAt(l-2))&&l--}const h=a-1,u=l-2;o=n.consumeLowerThan(h,o,i),0===n.count&&(o=h),n.insert(u,c,d)}return n.consumeLowerThan(1073741824,o,i),i}}class xd{constructor(e,t,i){this._linePartBrand=void 0,this.endIndex=e,this.type=t,this.metadata=i}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class Sd{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class Ed{constructor(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,f,_,A){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=r,this.lineTokens=a,this.lineDecorations=l.sort(wd.compare),this.tabSize=c,this.startVisibleColumn=d,this.spaceWidth=h,this.stopRenderingLineAfter=p,this.renderWhitespace="all"===m?4:"boundary"===m?1:"selection"===m?2:"trailing"===m?3:0,this.renderControlCharacters=f,this.fontLigatures=_,this.selectionsOnLine=A&&A.sort(((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}setColumnInfo(e,t,i,n){const o=(t<<16|i)>>>0;this._data[e-1]=o,this._absoluteOffsets[e-1]=n+i}getAbsoluteOffset(e){return 0===this._absoluteOffsets.length?0:this._absoluteOffsets[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=Dd.getPartIndex(t),n=Dd.getCharIndex(t);return new kd(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;const n=(e<<16|i)>>>0;let o=0,s=this.length-1;for(;o+1>>1,t=this._data[e];if(t===n)return e;t>n?s=e:o=e}if(o===s)return o;const r=this._data[o],a=this._data[s];if(r===n)return o;if(a===n)return s;const l=Dd.getPartIndex(r),c=Dd.getCharIndex(r);let d;d=l!==Dd.getPartIndex(a)?t:Dd.getCharIndex(a);return i-c<=d-i?o:s}}class Id{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function Ld(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendASCIIString("");let i=0,n=0,o=0;for(const s of e.lineDecorations)1!==s.type&&2!==s.type||(t.appendASCIIString(''),1===s.type&&(o|=1,i++),2===s.type&&(o|=2,n++));t.appendASCIIString("");const s=new Dd(1,i+n);return s.setColumnInfo(1,i,0,0),new Id(s,!1,o)}return t.appendASCIIString(""),new Id(new Dd(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,n=e.canUseHalfwidthRightwardsArrow,o=e.containsForeignElements,s=e.lineContent,r=e.len,a=e.isOverflowing,l=e.parts,c=e.fauxIndentLength,d=e.tabSize,h=e.startVisibleColumn,u=e.containsRTL,g=e.spaceWidth,p=e.renderSpaceCharCode,m=e.renderWhitespace,f=e.renderControlCharacters,_=new Dd(r+1,l.length);let A=!1,b=0,w=h,C=0,v=0,y=0,x=0;u?t.appendASCIIString(''):t.appendASCIIString("");for(let e=0,a=l.length;e=c&&(t+=n)}}for(E&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(g*i)),t.appendASCIIString('px"')),t.appendASCII(62);b1?t.write1(8594):t.write1(65515);for(let e=2;e<=i;e++)t.write1(160)}else i=1,t.write1(p);C+=i,b>=c&&(w+=i)}y=i}else{let i=0;for(t.appendASCII(62);b=c&&(w+=r)}y=i}k?v++:v=0,b>=r&&!A&&a.isPseudoAfter()&&(A=!0,_.setColumnInfo(b+1,e,C,x)),t.appendASCIIString("")}A||_.setColumnInfo(r+1,l.length-1,C,x);a&&t.appendASCIIString("");return t.appendASCIIString(""),new Id(_,u,o)}(function(e){const t=e.lineContent;let i,n;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(n[o++]=new xd(t,"",0));for(let s=0,r=e.getCount();s=i){n[o++]=new xd(i,a,0);break}n[o++]=new xd(r,a,0)}return n}(e.lineTokens,e.fauxIndentLength,n);e.renderControlCharacters&&!e.isBasicASCII&&(o=function(e,t){const i=[];let n=new xd(0,"",0),o=0;for(const s of t){const t=s.endIndex;for(;on.endIndex&&(n=new xd(o,s.type,s.metadata),i.push(n)),n=new xd(o+1,"mtkcontrol",s.metadata),i.push(n))}o>n.endIndex&&(n=new xd(t,s.type,s.metadata),i.push(n))}return i}(t,o));(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(o=function(e,t,i,n){const o=e.continuesWithWrappedLine,s=e.fauxIndentLength,r=e.tabSize,a=e.startVisibleColumn,l=e.useMonospaceOptimizations,c=e.selectionsOnLine,d=1===e.renderWhitespace,h=3===e.renderWhitespace,u=e.renderSpaceWidth!==e.spaceWidth,g=[];let p=0,m=0,f=n[m].type,_=n[m].endIndex;const A=n.length;let b,w=!1,C=Pn(t);-1===C?(w=!0,C=i,b=i):b=Vn(t);let v=!1,y=0,x=c&&c[y],S=a%r;for(let e=s;e=x.endOffset&&(y++,x=c&&c[y]),eb)a=!0;else if(9===o)a=!0;else if(32===o)if(d)if(v)a=!0;else{const n=e+1e),a&&h&&(a=w||e>b),v){if(!a||!l&&S>=r){if(u){for(let t=(p>0?g[p-1].endIndex:s)+1;t<=e;t++)g[p++]=new xd(t,"mtkw",1)}else g[p++]=new xd(e,"mtkw",1);S%=r}}else(e===_||a&&e>s)&&(g[p++]=new xd(e,f,0),S%=r);for(9===o?S=r:uo(o)?S+=2:S++,v=a;e===_&&(m++,m0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(E=!0)}else E=!0;if(E)if(u){for(let e=(p>0?g[p-1].endIndex:s)+1;e<=i;e++)g[p++]=new xd(e,"mtkw",1)}else g[p++]=new xd(i,"mtkw",1);else g[p++]=new xd(i,f,0);return g}(e,t,n,o));let s=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;tc&&(c=e.startOffset,a[l++]=new xd(c,d,h)),!(e.endOffset+1<=n)){c=n,a[l++]=new xd(c,d+" "+e.className,h|e.metadata);break}c=e.endOffset+1,a[l++]=new xd(c,d+" "+e.className,h|e.metadata),r++}n>c&&(c=n,a[l++]=new xd(c,d,h))}const d=i[i.length-1].endIndex;if(r=50&&(o[s++]=new xd(l+1,t,i),c=l+1,l=-1);c!==a&&(o[s++]=new xd(a,t,i))}else o[s++]=r;n=a}else for(let e=0,i=t.length;e50){const e=i.type,t=i.metadata,l=Math.ceil(a/50);for(let i=1;i=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e)}function Bd(e){return e.toString(16).toUpperCase().padStart(4,"0")}class Od{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class Fd{constructor(e,t){this.tabSize=e,this.data=t}}class Pd{constructor(e,t,i,n,o,s,r){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=o,this.tokens=s,this.inlineDecorations=r}}class zd{constructor(e,t,i,n,o,s,r,a,l,c){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=zd.isBasicASCII(i,s),this.containsRTL=zd.containsRTL(i,this.isBasicASCII,o),this.tokens=r,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=c}static isBasicASCII(e,t){return!t||lo(e)}static containsRTL(e,t,i){return!(t||!i)&&ro(e)}}class Vd{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class Hd{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new Vd(new Gi(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class Wd{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class Ud{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static cmp(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}}function Qd(e){return!function(e){return Array.isArray(e)}(e)}function jd(e){return"string"==typeof e}function Kd(e){return!jd(e)}function Gd(e){return!e}function Yd(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function $d(e){return e.replace(/[&<>'"_]/g,"-")}function qd(e,t){return new Error(`${e.languageId}: ${t}`)}function Jd(e,t,i,n,o){let s=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,r,a,l,c,d,h,u,g){return Gd(a)?Gd(l)?!Gd(c)&&c0;){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}class Zd{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new eh(e,t);let i=eh.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new eh(e,t),this._entries[i]=n,n)}}Zd._INSTANCE=new Zd(5);class eh{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return eh._equals(this,e)}push(e){return Zd.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Zd.create(this.parent,e)}}class th{constructor(e,t){this.languageId=e,this.state=t}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new th(this.languageId,this.state)}}class ih{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==t)return new nh(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new nh(e,t);const i=eh.getStackElementId(e);let n=this._entries[i];return n||(n=new nh(e,null),this._entries[i]=n,n)}}ih._INSTANCE=new ih(5);class nh{constructor(e,t){this.stack=e,this.embeddedLanguageData=t}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:ih.create(this.stack,this.embeddedLanguageData)}equals(e){return e instanceof nh&&(!!this.stack.equals(e.stack)&&(null===this.embeddedLanguageData&&null===e.embeddedLanguageData||null!==this.embeddedLanguageData&&null!==e.embeddedLanguageData&&this.embeddedLanguageData.equals(e.embeddedLanguageData)))}}class oh{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(e){this._languageId=e}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=t,this._lastTokenLanguage=this._languageId,this._tokens.push(new Ss(e,t,this._languageId)))}nestedLanguageTokenize(e,t,i,n){const o=i.languageId,s=i.state,r=er.get(o);if(!r)return this.enterLanguage(o),this.emit(n,""),s;const a=r.tokenize(e,t,s);if(0!==n)for(const e of a.tokens)this._tokens.push(new Ss(e.offset+n,e.type,e.language));else this._tokens=this._tokens.concat(a.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,a.endState}finalize(e){return new Es(this._tokens,e)}}class sh{constructor(e,t){this._languageService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(e){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(e)}emit(e,t){const i=this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){const n=null!==e?e.length:0,o=t.length,s=null!==i?i.length:0;if(0===n&&0===o&&0===s)return new Uint32Array(0);if(0===n&&0===o)return i;if(0===o&&0===s)return e;const r=new Uint32Array(n+o+s);null!==e&&r.set(e);for(let e=0;e{if(o)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i{}))}}getInitialState(){const e=Zd.create(null,this._lexer.start);return ih.create(e,null)}tokenize(e,t,i){const n=new oh,o=this._tokenize(e,t,i,n);return n.finalize(o)}tokenizeEncoded(e,t,i){const n=new sh(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),o=this._tokenize(e,t,i,n);return n.finalize(o)}_tokenize(e,t,i,n){return i.embeddedLanguageData?this._nestedTokenize(e,t,i,0,n):this._myTokenize(e,t,i,0,n)}_findLeavingNestedLanguageOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=Xd(this._lexer,t.stack.state),!i))throw qd(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,o=!1;for(const t of i){if(!Kd(t.action)||"@pop"!==t.action.nextEmbedded)continue;o=!0;let i=t.regex;const s=t.regex.source;if("^(?:"===s.substr(0,4)&&")"===s.substr(s.length-1,1)){const e=(i.ignoreCase?"i":"")+(i.unicode?"u":"");i=new RegExp(s.substr(4,s.length-5),e)}const r=e.search(i);-1===r||0!==r&&t.matchOnlyAtLineStart||(-1===n||r0&&o.nestedLanguageTokenize(r,!1,i.embeddedLanguageData,n);const a=e.substring(s);return this._myTokenize(a,t,i,n+s,o)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,o){o.enterLanguage(this._languageId);const s=e.length,r=t&&this._lexer.includeLF?e+"\n":e,a=r.length;let l=i.embeddedLanguageData,c=i.stack,d=0,h=null,u=!0;for(;u||d=a)break;u=!1;let e=this._lexer.tokenizer[_];if(!e&&(e=Xd(this._lexer,_),!e))throw qd(this._lexer,"tokenizer state is not defined: "+_);let t=r.substr(d);for(const i of e)if((0===d||!i.matchOnlyAtLineStart)&&(A=t.match(i.regex),A)){b=A[0],w=i.action;break}}if(A||(A=[""],b=""),w||(d=this._lexer.maxStack)throw qd(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(_)}else if("@pop"===w.next){if(c.depth<=1)throw qd(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(C));c=c.pop()}else if("@popall"===w.next)c=c.popall();else{let e=Jd(this._lexer,w.next,b,A,_);if("@"===e[0]&&(e=e.substr(1)),!Xd(this._lexer,e))throw qd(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(C));c=c.push(e)}}w.log&&"string"==typeof w.log&&(g=this._lexer,p=this._lexer.languageId+": "+Jd(this._lexer,w.log,b,A,_),console.log(`${g.languageId}: ${p}`))}if(null===y)throw qd(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(C));const x=i=>{const s=this._languageService.getLanguageIdByLanguageName(i)||this._languageService.getLanguageIdByMimeType(i)||i,r=this._getNestedEmbeddedLanguageData(s);if(d0)throw qd(this._lexer,"groups cannot be nested: "+this._safeRuleName(C));if(A.length!==y.length+1)throw qd(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(C));let e=0;for(let t=1;te});class hh{static colorizeElement(e,t,i,n){const o=(n=n||{}).theme||"vs",s=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!s)return console.error("Mode not detected"),Promise.resolve();const r=t.getLanguageIdByMimeType(s)||s;e.setTheme(o);const a=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+o;return this.colorize(t,a||"",r,n).then((e=>{var t;const n=null!==(t=null==dh?void 0:dh.createHTML(e))&&void 0!==t?t:e;i.innerHTML=n}),(e=>console.error(e)))}static colorize(e,t,i,n){return ch(this,void 0,void 0,(function*(){const o=e.languageIdCodec;let s=4;n&&"number"==typeof n.tabSize&&(s=n.tabSize),mo(t)&&(t=t.substr(1));const r=Fn(t);if(!e.isRegisteredLanguageId(i))return uh(r,s,o);const a=yield er.getOrCreate(i);return a?function(e,t,i,n){return new Promise(((o,s)=>{const r=()=>{const a=function(e,t,i,n){let o=[],s=i.getInitialState();for(let r=0,a=e.length;r"),s=l.endState}return o.join("")}(e,t,i,n);if(i instanceof rh){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,s)}o(a)};r()}))}(r,s,a,o):uh(r,s,o)}))}static colorizeLine(e,t,i,n,o=4){const s=zd.isBasicASCII(e,t),r=zd.containsRTL(e,s,i);return Td(new Ed(!1,!0,e,!1,s,r,0,n,[],o,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){const n=e.getLineContent(t);e.forceTokenization(t);const o=e.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,i)}}function uh(e,t,i){let n=[];const o=new Uint32Array(2);o[0]=0,o[1]=16793600;for(let s=0,r=e.length;s")}return n.join("")}b||document.queryCommandSupported&&document.queryCommandSupported("copy")||navigator&&navigator.clipboard&&navigator.clipboard.writeText,b||navigator&&navigator.clipboard&&navigator.clipboard.readText,b||ia||navigator.keyboard,"ontouchstart"in window||navigator.maxTouchPoints;const gh=window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0);function ph(e,t){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new _h(0!==n?[mh(i,t),mh(n,t)]:[mh(i,t)])}function mh(e,t){const i=!!(2048&e),n=!!(256&e);return new fh(2===t?n:i,!!(1024&e),!!(512&e),2===t?i:n,255&e)}class fh{constructor(e,t,i,n,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=o}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}toChord(){return new _h([this])}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class _h{constructor(e){if(0===e.length)throw wt("parts");this.parts=e}}class Ah{constructor(e,t,i,n,o,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=o,this.keyAriaLabel=s}}class bh{}const wh=_?256:2048,Ch=_?2048:256;class vh{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.keyCode=function(e){if(e.charCode){let t=String.fromCharCode(e.charCode).toUpperCase();return ii.fromString(t)}const t=e.keyCode;if(3===t)return 7;if(Yr){if(59===t)return 80;if(107===t)return 81;if(109===t)return 83;if(_&&224===t)return 57}else if($r){if(91===t)return 57;if(_&&93===t)return 57;if(!_&&92===t)return 57}return Xt[t]||0}(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=wh),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=Ch),t|=e,t}_computeRuntimeKeybinding(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new fh(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}let yh=!1,xh=null;function Sh(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&t.origin!==i.origin)return yh=!0,null}catch(e){return yh=!0,null}return e.parent}class Eh{static getSameOriginWindowChain(){if(!xh){xh=[];let e,t=window;do{e=Sh(t),e?xh.push({window:t,iframeElement:t.frameElement||null}):xh.push({window:t,iframeElement:null}),t=e}while(t)}return xh.slice(0)}static hasDifferentOriginAncestor(){return xh||this.getSameOriginWindowChain(),yh}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,o=this.getSameOriginWindowChain();for(const e of o){if(i+=e.window.scrollY,n+=e.window.scrollX,e.window===t)break;if(!e.iframeElement)break;let o=e.iframeElement.getBoundingClientRect();i+=o.top,n+=o.left}return{top:i,left:n}}}class kh{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=Eh.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class Dh{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){let t=e,i=e;if(void 0!==t.wheelDeltaY)this.deltaY=t.wheelDeltaY/120;else if(void 0!==i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?this.deltaY=Yr&&!_?-e.deltaY/3:-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)this.deltaX=Jr&&f?-t.wheelDeltaX/120:t.wheelDeltaX/120;else if(void 0!==i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?this.deltaX=Yr&&!_?-e.deltaX/3:-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}var Ih;!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.userData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebook="vscode-notebook",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeInteractive="vscode-interactive",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls"}(Ih||(Ih={}));const Lh=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&(i=`[${i}]`);const n=this._ports[t],o=this._connectionTokens[t];let s=`path=${encodeURIComponent(e.path)}`;return"string"==typeof o&&(s+=`&tkn=${encodeURIComponent(o)}`),Bi.from({scheme:w?this._preferredWebSchema:Ih.vscodeRemoteResource,authority:`${i}:${n}`,path:"/vscode-remote-resource",query:s})}};class Nh{asBrowserUri(e,t){const i=this.toUri(e,t);return i.scheme===Ih.vscodeRemote?Lh.rewrite(i):i.scheme===Ih.file&&(b||"function"==typeof g.importScripts&&g.origin===`${Ih.vscodeFileResource}://${Nh.FALLBACK_AUTHORITY}`)?i.with({scheme:Ih.vscodeFileResource,authority:i.authority||Nh.FALLBACK_AUTHORITY,query:null,fragment:null}):i}toUri(e,t){return Bi.isUri(e)?e:Bi.parse(t.toUrl(e))}}Nh.FALLBACK_AUTHORITY="vscode-app";const Th=new Nh;function Mh(e){for(;e.firstChild;)e.firstChild.remove()}function Rh(e){var t;return null!==(t=null==e?void 0:e.isConnected)&&void 0!==t&&t}class Bh{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function Oh(e,t,i,n){return new Bh(e,t,i,n)}function Fh(e){return function(t){return e(new kh(t))}}let Ph=function(e,t,i,n){let o=i;return"click"===t||"mousedown"===t?o=Fh(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=function(e){return function(t){return e(new vh(t))}}(i)),Oh(e,t,o,n)};function zh(e,t,i){return Oh(e,C&&gh?wu.POINTER_DOWN:wu.MOUSE_DOWN,t,i)}function Vh(e,t,i){return Oh(e,C&&gh?wu.POINTER_UP:wu.MOUSE_UP,t,i)}function Hh(e,t){return Oh(e,"mouseout",(i=>{let n=i.relatedTarget;for(;n&&n!==e;)n=n.parentNode;n!==e&&t(i)}))}function Wh(e,t,i){let n=null;const o=e=>s.fire(e),s=new zt({onFirstListenerAdd:()=>{n||(n=new Bh(e,t,o,i))},onLastListenerRemove:()=>{n&&(n.dispose(),n=null)}});return s}let Uh,Qh,jh=null;class Kh{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){gt(e)}}static sort(e,t){return t.priority-e.priority}}!function(){let e=[],t=null,i=!1,n=!1,o=()=>{for(i=!1,t=e,e=[],n=!0;t.length>0;){t.sort(Kh.sort),t.shift().execute()}n=!1};Qh=(t,n=0)=>{let s=new Kh(t,n);return e.push(s),i||(i=!0,function(e){if(!jh){const e=e=>setTimeout((()=>e((new Date).getTime())),0);jh=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}jh.call(self,e)}(o)),s},Uh=(e,i)=>{if(n){let n=new Kh(e,i);return t.push(n),n}return Qh(e,i)}}();const Gh=function(e,t){return t};class Yh extends Lt{constructor(e,t,i,n=Gh,o=8){super();let s=null,r=0,a=this._register(new fn),l=()=>{r=(new Date).getTime(),i(s),s=null};this._register(Oh(e,t,(e=>{s=n(s,e);let t=(new Date).getTime()-r;t>=o?(a.cancel(),l()):a.setIfNotSet(l,o-t)})))}}function $h(e,t,i,n,o){return new Yh(e,t,i,n,o)}function qh(e){return document.defaultView.getComputedStyle(e,null)}function Jh(e){if(e!==document.body)return new Zh(e.clientWidth,e.clientHeight);if(C&&window.visualViewport)return new Zh(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new Zh(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new Zh(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new Zh(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class Xh{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){let n=qh(e),o="0";return n&&(o=n.getPropertyValue?n.getPropertyValue(t):n.getAttribute(i)),Xh.convertToPixels(e,o)}static getBorderLeftWidth(e){return Xh.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return Xh.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return Xh.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return Xh.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return Xh.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return Xh.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return Xh.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return Xh.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return Xh.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return Xh.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return Xh.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return Xh.getDimension(e,"margin-bottom","marginBottom")}}class Zh{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new Zh(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof Zh?e:new Zh(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&(e.width===t.width&&e.height===t.height)}}function eu(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){i-=e.scrollTop;const o=du(e)?null:qh(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=Xh.getBorderLeftWidth(e),i+=Xh.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function tu(e){let t=e.getBoundingClientRect();return{left:t.left+iu.scrollX,top:t.top+iu.scrollY,width:t.width,height:t.height}}Zh.None=new Zh(0,0);const iu=new class{get scrollX(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function nu(e){let t=Xh.getMarginLeft(e)+Xh.getMarginRight(e);return e.offsetWidth+t}function ou(e){let t=Xh.getBorderLeftWidth(e)+Xh.getBorderRightWidth(e),i=Xh.getPaddingLeft(e)+Xh.getPaddingRight(e);return e.offsetWidth-t-i}function su(e){let t=Xh.getBorderTopWidth(e)+Xh.getBorderBottomWidth(e),i=Xh.getPaddingTop(e)+Xh.getPaddingBottom(e);return e.offsetHeight-t-i}function ru(e){let t=Xh.getMarginTop(e)+Xh.getMarginBottom(e);return e.offsetHeight+t}function au(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function lu(e,t,i){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e.classList.contains(t))return e;if(i)if("string"==typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}function cu(e,t,i){return!!lu(e,t,i)}function du(e){return e&&!!e.host&&!!e.mode}function hu(e){return!!uu(e)}function uu(e){for(;e.parentNode;){if(e===document.body)return null;e=e.parentNode}return du(e)?e:null}function gu(){let e=document.activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function pu(e=document.getElementsByTagName("head")[0]){let t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}let mu=null;function fu(){return mu||(mu=pu()),mu}function _u(e,t,i=fu()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)}function Au(e,t=fu()){if(!t)return;let i=function(e){var t,i;return(null===(t=null==e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(i=null==e?void 0:e.sheet)||void 0===i?void 0:i.cssRules)?e.sheet.cssRules:[]}(t),n=[];for(let t=0;t=0;e--)t.sheet.deleteRule(n[e])}function bu(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}const wu={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:$r?"webkitAnimationStart":"animationstart",ANIMATION_END:$r?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:$r?"webkitAnimationIteration":"animationiteration"},Cu=function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)};class vu extends Lt{constructor(e){super(),this._onDidFocus=this._register(new zt),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new zt),this.onDidBlur=this._onDidBlur.event;let t=vu.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(i=!0,window.setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{vu.hasFocusWithin(e)!==t&&(t?o():n())},this._register(Oh(e,wu.FOCUS,n,!0)),this._register(Oh(e,wu.BLUR,o,!0)),this._register(Oh(e,wu.FOCUS_IN,(()=>this._refreshStateHandler()))),this._register(Oh(e,wu.FOCUS_OUT,(()=>this._refreshStateHandler())))}static hasFocusWithin(e){const t=uu(e);return au(t?t.activeElement:document.activeElement,e)}}function yu(e){return new vu(e)}function xu(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function Su(e,...t){e.innerText="",xu(e,...t)}const Eu=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var ku;function Du(e,t,i,...n){let o=Eu.exec(t);if(!o)throw new Error("Bad use of emmet");i=Object.assign({},i||{});let s,r=o[1]||"div";return s=e!==ku.HTML?document.createElementNS(e,r):document.createElement(r),o[3]&&(s.id=o[3]),o[4]&&(s.className=o[4].replace(/\./g," ").trim()),Object.keys(i).forEach((e=>{const t=i[e];void 0!==t&&(/^on\w+$/.test(e)?s[e]=t:"selected"===e?t&&s.setAttribute(e,"true"):s.setAttribute(e,t))})),s.append(...n),s}function Iu(e,t,...i){return Du(ku.HTML,e,t,...i)}function Lu(...e){for(let t of e)t.style.display="",t.removeAttribute("aria-hidden")}function Nu(...e){for(let t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function Tu(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function Mu(e){window.open(e,"_blank","noopener")}function Ru(e){return e?`url('${Th.asBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function Bu(e){return`'${e.replace(/'/g,"%27")}'`}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(ku||(ku={})),Iu.SVG=function(e,t,...i){return Du(ku.SVG,e,t,...i)},Lh.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");class Ou extends zt{constructor(){super(),this._subscriptions=new It,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(Oh(window,"keydown",(e=>{if(e.defaultPrevented)return;const t=new vh(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}),!0)),this._subscriptions.add(Oh(window,"keyup",(e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}),!0)),this._subscriptions.add(Oh(document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(Oh(document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(Oh(document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),this._subscriptions.add(Oh(window,"blur",(()=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Ou.instance||(Ou.instance=new Ou),Ou.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-aria-container {\n\tposition: absolute; /* try to hide from window but not from screen readers */\n\tleft:-999em;\n}",{});const Fu=2e4;let Pu,zu,Vu,Hu,Wu;function Uu(e){Pu&&(zu.textContent!==e?(Mh(Vu),ju(zu,e)):(Mh(zu),ju(Vu,e)))}function Qu(e){Pu&&(_?Uu(e):Hu.textContent!==e?(Mh(Wu),ju(Hu,e)):(Mh(Hu),ju(Wu,e)))}function ju(e,t){Mh(e),t.length>Fu&&(t=t.substr(0,Fu)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}const Ku=_a("markerDecorationsService"),Gu=_a("textModelService");var Yu=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class $u extends Lt{constructor(e,t="",i="",n=!0,o){super(),this._onDidChange=this._register(new zt),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=i,this._enabled=n,this._actionCallback=o}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return Yu(this,void 0,void 0,(function*(){this._actionCallback&&(yield this._actionCallback(e))}))}}class qu extends Lt{constructor(){super(...arguments),this._onBeforeRun=this._register(new zt),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new zt),this.onDidRun=this._onDidRun.event}run(e,t){return Yu(this,void 0,void 0,(function*(){if(!e.enabled)return;let i;this._onBeforeRun.fire({action:e});try{yield this.runAction(e,t)}catch(e){i=e}this._onDidRun.fire({action:e,error:i})}))}runAction(e,t){return Yu(this,void 0,void 0,(function*(){yield e.run(t)}))}}class Ju extends $u{constructor(e){super(Ju.ID,e,e?"separator text":"separator"),this.checked=!1,this.enabled=!1}}Ju.ID="vs.actions.separator";class Xu{constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=n,this._actions=i}get actions(){return this._actions}dispose(){}run(){return Yu(this,void 0,void 0,(function*(){}))}}class Zu extends $u{constructor(){super(Zu.ID,e(0,"(empty)"),void 0,!1)}}Zu.ID="vs.actions.empty";const eg=_a("commandService"),tg=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new zt,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){const t=[];for(let i of e.description.args)t.push(i.constraint);const i=e.handler;e.handler=function(e,...n){return function(e,t){const i=Math.min(e.length,t.length);for(let n=0;n{o();const e=this._commands.get(i);(null==e?void 0:e.isEmpty())&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),s}registerCommandAlias(e,t){return tg.registerCommand(e,((e,...i)=>e.get(eg).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return yt.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}};tg.registerCommand("noop",(()=>{}));const ig=new Map;ig.set("false",!1),ig.set("true",!0),ig.set("isMac",_),ig.set("isLinux",A),ig.set("isWindows",f),ig.set("isWeb",w),ig.set("isMacNative",_&&!w),ig.set("isEdge",T),ig.set("isFirefox",L),ig.set("isChrome",I),ig.set("isSafari",N);const ng=Object.prototype.hasOwnProperty;class og{static has(e){return lg.create(e)}static equals(e,t){return cg.create(e,t)}static regex(e,t){return bg.create(e,t)}static not(e){return gg.create(e)}static and(...e){return vg.create(e,null)}static or(...e){return yg.create(e,null,!0)}static deserialize(e,t=!1){if(e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){let i=e.split("||");return yg.create(i.map((e=>this._deserializeAndExpression(e,t))),null,!0)}static _deserializeAndExpression(e,t){let i=e.split("&&");return vg.create(i.map((e=>this._deserializeOne(e,t))),null)}static _deserializeOne(e,t){if((e=e.trim()).indexOf("!=")>=0){let i=e.split("!=");return ug.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("==")>=0){let i=e.split("==");return cg.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("=~")>=0){let i=e.split("=~");return bg.create(i[0].trim(),this._deserializeRegexValue(i[1],t))}if(e.indexOf(" in ")>=0){let t=e.split(" in ");return dg.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(e)){const t=e.split(">=");return fg.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){const t=e.split(">");return mg.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){const t=e.split("<=");return Ag.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){const t=e.split("<");return _g.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?gg.create(e.substr(1).trim()):lg.create(e)}static _deserializeValue(e,t){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;let i=/^'([^']*)'$/.exec(e);return i?i[1].trim():e}static _deserializeRegexValue(e,t){if(kn(e)){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let i=e.indexOf("/"),n=e.lastIndexOf("/");if(i===n||i<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}let o=e.slice(i+1,n),s="i"===e[n+1]?"i":"";try{return new RegExp(o,s)}catch(i){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${i}`);return console.warn(`bad regexp-value '${e}', parse error: ${i}`),null}}}function sg(e,t){return e.cmp(t)}class rg{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return ag.INSTANCE}}rg.INSTANCE=new rg;class ag{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}substituteConstants(){return this}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return rg.INSTANCE}}ag.INSTANCE=new ag;class lg{constructor(e,t){this.key=e,this.negated=t,this.type=2}static create(e,t=null){const i=ig.get(e);return"boolean"==typeof i?i?ag.INSTANCE:rg.INSTANCE:new lg(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:Eg(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=ig.get(this.key);return"boolean"==typeof e?e?ag.INSTANCE:rg.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=gg.create(this.key,this)),this.negated}}class cg{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}static create(e,t,i=null){if("boolean"==typeof t)return t?lg.create(e,i):gg.create(e,i);const n=ig.get(e);if("boolean"==typeof n){return t===(n?"true":"false")?ag.INSTANCE:rg.INSTANCE}return new cg(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:kg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=ig.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?ag.INSTANCE:rg.INSTANCE}return this}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ug.create(this.key,this.value,this)),this.negated}}class dg{constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}static create(e,t){return new dg(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:kg(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&(this.key===e.key&&this.valueKey===e.valueKey)}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.indexOf(i)>=0:"string"==typeof i&&"object"==typeof t&&null!==t&&ng.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=hg.create(this)),this.negated}}class hg{constructor(e){this._actual=e,this.type=11}static create(e){return new hg(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class ug{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}static create(e,t,i=null){if("boolean"==typeof t)return t?gg.create(e,i):lg.create(e,i);const n=ig.get(e);if("boolean"==typeof n){return t===(n?"true":"false")?rg.INSTANCE:ag.INSTANCE}return new ug(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:kg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){const e=ig.get(this.key);if("boolean"==typeof e){const t=e?"true":"false";return this.value===t?rg.INSTANCE:ag.INSTANCE}return this}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=cg.create(this.key,this.value,this)),this.negated}}class gg{constructor(e,t){this.key=e,this.negated=t,this.type=3}static create(e,t=null){const i=ig.get(e);return"boolean"==typeof i?i?rg.INSTANCE:ag.INSTANCE:new gg(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:Eg(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}substituteConstants(){const e=ig.get(this.key);return"boolean"==typeof e?e?rg.INSTANCE:ag.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=lg.create(this.key,this)),this.negated}}function pg(e,t){if("string"==typeof e){const t=parseFloat(e);isNaN(t)||(e=t)}return"string"==typeof e||"number"==typeof e?t(e):rg.INSTANCE}class mg{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}static create(e,t,i=null){return pg(t,(t=>new mg(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:kg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Ag.create(this.key,this.value,this)),this.negated}}class fg{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}static create(e,t,i=null){return pg(t,(t=>new fg(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:kg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=_g.create(this.key,this.value,this)),this.negated}}class _g{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}static create(e,t,i=null){return pg(t,(t=>new _g(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:kg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))new Ag(e,t,i)))}cmp(e){return e.type!==this.type?this.type-e.type:kg(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}substituteConstants(){return this}evaluate(e){return"string"!=typeof this.value&&parseFloat(e.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=mg.create(this.key,this.value,this)),this.negated}}class bg{constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}static create(e,t){return new bg(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.keye.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}substituteConstants(){return this}evaluate(e){let t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=wg.create(this)),this.negated}}class wg{constructor(e){this._actual=e,this.type=8}static create(e){return new wg(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function Cg(e){let t=null;for(let i=0,n=e.length;ie.expr.length)return 1;for(let t=0,i=this.expr.length;t1;){const e=i[i.length-1];if(9!==e.type)break;i.pop();const t=i.pop(),n=0===i.length,o=yg.create(e.expr.map((e=>vg.create([e,t],null))),null,n);o&&(i.push(o),i.sort(sg))}return 1===i.length?i[0]:new vg(i,t)}}serialize(){return this.expr.map((e=>e.serialize())).join(" && ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(let t of this.expr)e.push(t.negate());this.negated=yg.create(e,this,!0)}return this.negated}}class yg{constructor(e,t){this.expr=e,this.negated=t,this.type=9}static create(e,t,i){return yg._normalizeArr(e,t,i)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const e of Ig(t))for(const t of Ig(i))n.push(vg.create([e,t],null));const o=0===e.length;e.unshift(yg.create(n,null,o))}this.negated=e[0]}return this.negated}}class xg extends lg{constructor(e,t,i){super(e,null),this._defaultValue=t,"object"==typeof i?xg._info.push(Object.assign(Object.assign({},i),{key:e})):!0!==i&&xg._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}static all(){return xg._info.values()}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return cg.create(this.key,e)}}xg._info=[];const Sg=_a("contextKeyService");function Eg(e,t){return et?1:0}function kg(e,t,i,n){return ei?1:tn?1:0}function Dg(e,t){if(6===t.type&&9!==e.type&&6!==e.type)for(const i of t.expr)if(e.equals(i))return!0;const i=Ig(e.negate()).concat(Ig(t));i.sort(sg);for(let e=0;e{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function zg(e){return Pg.onColorThemeChange(e)}Lg.add(Fg,Pg);class Vg extends Lt{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange((e=>this.onThemeChange(e))))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}var Hg=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Wg=function(e,t){return function(i,n){t(i,n,e)}};function Ug(e){return void 0!==e.command}class Qg{constructor(e){this.id=Qg._idPool++,this._debugName=e}}Qg._idPool=0,Qg.CommandPalette=new Qg("CommandPalette"),Qg.DebugBreakpointsContext=new Qg("DebugBreakpointsContext"),Qg.DebugCallStackContext=new Qg("DebugCallStackContext"),Qg.DebugConsoleContext=new Qg("DebugConsoleContext"),Qg.DebugVariablesContext=new Qg("DebugVariablesContext"),Qg.DebugWatchContext=new Qg("DebugWatchContext"),Qg.DebugToolBar=new Qg("DebugToolBar"),Qg.EditorContext=new Qg("EditorContext"),Qg.SimpleEditorContext=new Qg("SimpleEditorContext"),Qg.EditorContextCopy=new Qg("EditorContextCopy"),Qg.EditorContextPeek=new Qg("EditorContextPeek"),Qg.EditorTitle=new Qg("EditorTitle"),Qg.EditorTitleRun=new Qg("EditorTitleRun"),Qg.EditorTitleContext=new Qg("EditorTitleContext"),Qg.EmptyEditorGroup=new Qg("EmptyEditorGroup"),Qg.EmptyEditorGroupContext=new Qg("EmptyEditorGroupContext"),Qg.ExplorerContext=new Qg("ExplorerContext"),Qg.ExtensionContext=new Qg("ExtensionContext"),Qg.GlobalActivity=new Qg("GlobalActivity"),Qg.LayoutControlMenu=new Qg("LayoutControlMenu"),Qg.MenubarMainMenu=new Qg("MenubarMainMenu"),Qg.MenubarAppearanceMenu=new Qg("MenubarAppearanceMenu"),Qg.MenubarDebugMenu=new Qg("MenubarDebugMenu"),Qg.MenubarEditMenu=new Qg("MenubarEditMenu"),Qg.MenubarCopy=new Qg("MenubarCopy"),Qg.MenubarFileMenu=new Qg("MenubarFileMenu"),Qg.MenubarGoMenu=new Qg("MenubarGoMenu"),Qg.MenubarHelpMenu=new Qg("MenubarHelpMenu"),Qg.MenubarLayoutMenu=new Qg("MenubarLayoutMenu"),Qg.MenubarNewBreakpointMenu=new Qg("MenubarNewBreakpointMenu"),Qg.MenubarPanelAlignmentMenu=new Qg("MenubarPanelAlignmentMenu"),Qg.MenubarPreferencesMenu=new Qg("MenubarPreferencesMenu"),Qg.MenubarRecentMenu=new Qg("MenubarRecentMenu"),Qg.MenubarSelectionMenu=new Qg("MenubarSelectionMenu"),Qg.MenubarSwitchEditorMenu=new Qg("MenubarSwitchEditorMenu"),Qg.MenubarSwitchGroupMenu=new Qg("MenubarSwitchGroupMenu"),Qg.MenubarTerminalMenu=new Qg("MenubarTerminalMenu"),Qg.MenubarViewMenu=new Qg("MenubarViewMenu"),Qg.MenubarHomeMenu=new Qg("MenubarHomeMenu"),Qg.OpenEditorsContext=new Qg("OpenEditorsContext"),Qg.ProblemsPanelContext=new Qg("ProblemsPanelContext"),Qg.SCMChangeContext=new Qg("SCMChangeContext"),Qg.SCMResourceContext=new Qg("SCMResourceContext"),Qg.SCMResourceFolderContext=new Qg("SCMResourceFolderContext"),Qg.SCMResourceGroupContext=new Qg("SCMResourceGroupContext"),Qg.SCMSourceControl=new Qg("SCMSourceControl"),Qg.SCMTitle=new Qg("SCMTitle"),Qg.SearchContext=new Qg("SearchContext"),Qg.StatusBarWindowIndicatorMenu=new Qg("StatusBarWindowIndicatorMenu"),Qg.StatusBarRemoteIndicatorMenu=new Qg("StatusBarRemoteIndicatorMenu"),Qg.TestItem=new Qg("TestItem"),Qg.TestItemGutter=new Qg("TestItemGutter"),Qg.TestPeekElement=new Qg("TestPeekElement"),Qg.TestPeekTitle=new Qg("TestPeekTitle"),Qg.TouchBarContext=new Qg("TouchBarContext"),Qg.TitleBarContext=new Qg("TitleBarContext"),Qg.TunnelContext=new Qg("TunnelContext"),Qg.TunnelPrivacy=new Qg("TunnelPrivacy"),Qg.TunnelProtocol=new Qg("TunnelProtocol"),Qg.TunnelPortInline=new Qg("TunnelInline"),Qg.TunnelTitle=new Qg("TunnelTitle"),Qg.TunnelLocalAddressInline=new Qg("TunnelLocalAddressInline"),Qg.TunnelOriginInline=new Qg("TunnelOriginInline"),Qg.ViewItemContext=new Qg("ViewItemContext"),Qg.ViewContainerTitle=new Qg("ViewContainerTitle"),Qg.ViewContainerTitleContext=new Qg("ViewContainerTitleContext"),Qg.ViewTitle=new Qg("ViewTitle"),Qg.ViewTitleContext=new Qg("ViewTitleContext"),Qg.CommentThreadTitle=new Qg("CommentThreadTitle"),Qg.CommentThreadActions=new Qg("CommentThreadActions"),Qg.CommentTitle=new Qg("CommentTitle"),Qg.CommentActions=new Qg("CommentActions"),Qg.InteractiveToolbar=new Qg("InteractiveToolbar"),Qg.InteractiveCellTitle=new Qg("InteractiveCellTitle"),Qg.InteractiveCellExecute=new Qg("InteractiveCellExecute"),Qg.InteractiveInputExecute=new Qg("InteractiveInputExecute"),Qg.NotebookToolbar=new Qg("NotebookToolbar"),Qg.NotebookCellTitle=new Qg("NotebookCellTitle"),Qg.NotebookCellInsert=new Qg("NotebookCellInsert"),Qg.NotebookCellBetween=new Qg("NotebookCellBetween"),Qg.NotebookCellListTop=new Qg("NotebookCellTop"),Qg.NotebookCellExecute=new Qg("NotebookCellExecute"),Qg.NotebookCellExecutePrimary=new Qg("NotebookCellExecutePrimary"),Qg.NotebookDiffCellInputTitle=new Qg("NotebookDiffCellInputTitle"),Qg.NotebookDiffCellMetadataTitle=new Qg("NotebookDiffCellMetadataTitle"),Qg.NotebookDiffCellOutputsTitle=new Qg("NotebookDiffCellOutputsTitle"),Qg.NotebookOutputToolbar=new Qg("NotebookOutputToolbar"),Qg.NotebookEditorLayoutConfigure=new Qg("NotebookEditorLayoutConfigure"),Qg.BulkEditTitle=new Qg("BulkEditTitle"),Qg.BulkEditContext=new Qg("BulkEditContext"),Qg.TimelineItemContext=new Qg("TimelineItemContext"),Qg.TimelineTitle=new Qg("TimelineTitle"),Qg.TimelineTitleContext=new Qg("TimelineTitleContext"),Qg.AccountsContext=new Qg("AccountsContext"),Qg.PanelTitle=new Qg("PanelTitle"),Qg.TerminalInstanceContext=new Qg("TerminalInstanceContext"),Qg.TerminalEditorInstanceContext=new Qg("TerminalEditorInstanceContext"),Qg.TerminalNewDropdownContext=new Qg("TerminalNewDropdownContext"),Qg.TerminalTabContext=new Qg("TerminalTabContext"),Qg.TerminalTabEmptyAreaContext=new Qg("TerminalTabEmptyAreaContext"),Qg.TerminalInlineTabContext=new Qg("TerminalInlineTabContext"),Qg.WebviewContext=new Qg("WebviewContext"),Qg.InlineCompletionsActions=new Qg("InlineCompletionsActions"),Qg.NewFile=new Qg("NewFile");const jg=_a("menuService"),Kg=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new zt,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:e=>e===Qg.CommandPalette}}addCommand(e){return this.addCommands(yt.single(e))}addCommands(e){for(const t of e)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Dt((()=>{let t=!1;for(const i of e)t=this._commands.delete(i.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)}))}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach(((t,i)=>e.set(i,t))),e}appendMenuItem(e,t){return this.appendMenuItems(yt.single({id:e,item:t}))}appendMenuItems(e){const t=new Set,i=new Rt;for(const{id:n,item:o}of e){let e=this._menuItems.get(n);e||(e=new Rt,this._menuItems.set(n,e)),i.push(e.push(o)),t.add(n)}return this._onDidChangeMenu.fire(t),Dt((()=>{if(i.size>0){for(let e of i)e();this._onDidChangeMenu.fire(t),i.clear()}}))}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===Qg.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)Ug(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach(((i,n)=>{t.has(n)||e.push({command:i})}))}};class Gg extends Xu{constructor(e,t,i,n){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,[],"submenu"),this.item=e,this._menuService=t,this._contextKeyService=i,this._options=n}get actions(){const e=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),i=t.getActions(this._options);t.dispose();for(const[,t]of i)t.length>0&&(e.push(...t),e.push(new Ju));return e.length&&e.pop(),e}}let Yg=class e{constructor(t,i,n,o,s){var r,a;if(this._commandService=s,this.id=t.id,this.label=(null==n?void 0:n.renderShortTitle)&&t.shortTitle?"string"==typeof t.shortTitle?t.shortTitle:t.shortTitle.value:"string"==typeof t.title?t.title:t.title.value,this.tooltip=null!==(a="string"==typeof t.tooltip?t.tooltip:null===(r=t.tooltip)||void 0===r?void 0:r.value)&&void 0!==a?a:"",this.enabled=!t.precondition||o.contextMatchesRules(t.precondition),this.checked=void 0,t.toggled){const e=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=o.contextMatchesRules(e.condition),this.checked&&e.tooltip&&(this.tooltip="string"==typeof e.tooltip?e.tooltip:e.tooltip.value),e.title&&(this.label="string"==typeof e.title?e.title:e.title.value)}this.item=t,this.alt=i?new e(i,void 0,n,o,s):void 0,this._options=n,Rg.isThemeIcon(t.icon)&&(this.class=gs.asClassName(t.icon))}dispose(){}run(...e){var t,i;let n=[];return(null===(t=this._options)||void 0===t?void 0:t.arg)&&(n=[...n,this._options.arg]),(null===(i=this._options)||void 0===i?void 0:i.shouldForwardArgs)&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};Yg=Hg([Wg(3,Sg),Wg(4,eg)],Yg);class $g{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===S){if(e&&e.win)return e.win}else if(2===S){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=$g.bindToCurrentPlatform(e);if(t&&t.primary){const i=ph(t.primary,S);i&&this._registerDefaultKeybinding(i,e.id,e.args,e.weight,0,e.when)}if(t&&Array.isArray(t.secondary))for(let i=0,n=t.secondary.length;i=21&&e<=30||(e>=31&&e<=56||(80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e))}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&$g._mightProduceChar(e.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t)}_registerDefaultKeybinding(e,t,i,n,o,s){1===S&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e.parts,command:t,commandArgs:i,when:s,weight1:n,weight2:o,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(Jg)),this._cachedMergedKeybindings.slice(0)}}const qg=new $g;function Jg(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.commandt.command?1:e.weight2-t.weight2}Lg.add("platform.keybindingsRegistry",qg);const Xg=_a("telemetryService");class Zg{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?og.and(e,this.precondition):this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};qg.registerKeybindingRule(i)}}tg.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){Kg.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class ep extends Zg{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i){return this._implementations.push({priority:e,name:t,implementation:i}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e{if(e.get(Sg).contextMatchesRules(Ce(this.precondition)))return this.runEditorCommand(e,n,t)}))}}class np extends ip{constructor(e){super(np.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=Qg.EditorContext),t.title||(t.title=e.label),t.when=og.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(Xg).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class op extends np{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;enew Promise(((n,s)=>{try{n(t(e.object.textEditorModel,Ki.lift(o),i.slice(2)))}catch(e){s(e)}})).finally((()=>{e.dispose()}))))}))}function rp(e){return up.INSTANCE.registerEditorCommand(e),e}function ap(e){const t=new e;return up.INSTANCE.registerEditorAction(t),t}function lp(e){return up.INSTANCE.registerEditorAction(e),e}function cp(e){up.INSTANCE.registerEditorAction(e)}function dp(e,t){up.INSTANCE.registerEditorContribution(e,t)}var hp;!function(e){e.getEditorCommand=function(e){return up.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return up.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return up.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return up.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return up.INSTANCE.getDiffEditorContributions()}}(hp||(hp={}));class up{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function gp(e){return e.register(),e}up.INSTANCE=new up,Lg.add("editor.contributions",up.INSTANCE);const pp=gp(new ep({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:Qg.MenubarEditMenu,group:"1_do",title:e(0,"&&Undo"),order:1},{menuId:Qg.CommandPalette,group:"",title:e(0,"Undo"),order:1}]}));gp(new tp(pp,{id:"default:undo",precondition:void 0}));const mp=gp(new ep({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:Qg.MenubarEditMenu,group:"1_do",title:e(0,"&&Redo"),order:2},{menuId:Qg.CommandPalette,group:"",title:e(0,"Redo"),order:1}]}));gp(new tp(mp,{id:"default:redo",precondition:void 0}));const fp=gp(new ep({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:Qg.MenubarSelectionMenu,group:"1_basic",title:e(0,"&&Select All"),order:1},{menuId:Qg.CommandPalette,group:"",title:e(0,"Select All"),order:1}]}));var _p=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ap=function(e,t){return function(i,n){t(i,n,e)}};let bp=class{constructor(e,t){}dispose(){}};bp.ID="editor.contrib.markerDecorations",bp=_p([Ap(1,Ku)],bp),dp(bp.ID,bp);Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -------------------- IE10 remove auto clear button -------------------- */\n\n::-ms-clear {\n\tdisplay: none;\n}\n\n/* All widgets */\n/* I am not a big fan of this rule */\n.monaco-editor .editor-widget input {\n\tcolor: inherit;\n}\n\n/* -------------------- Editor -------------------- */\n\n.monaco-editor {\n\tposition: relative;\n\toverflow: visible;\n\t-webkit-text-size-adjust: 100%;\n}\n\n/* -------------------- Misc -------------------- */\n\n.monaco-editor .overflow-guard {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.monaco-editor .view-overlays {\n\tposition: absolute;\n\ttop: 0;\n}\n\n/*\n.monaco-editor .auto-closed-character {\n\topacity: 0.3;\n}\n*/\n",{});class wp extends Lt{constructor(e,t){super(),this._onDidChange=this._register(new zt),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){!this._resizeObserver&&this._referenceDomElement&&(this._resizeObserver=new ResizeObserver((e=>{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()})),this._resizeObserver.observe(this._referenceDomElement))}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,n=this._referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this._width===i&&this._height===n||(this._width=i,this._height=n,e&&this._onDidChange.fire())}}const Cp=Object.prototype.hasOwnProperty;class vp{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}}function yp(e){const t=e.wordWrap;!0===t?e.wordWrap="on":!1===t&&(e.wordWrap="off");const i=e.lineNumbers;!0===i?e.lineNumbers="on":!1===i&&(e.lineNumbers="off");!1===e.autoClosingBrackets&&(e.autoClosingBrackets="never",e.autoClosingQuotes="never",e.autoSurround="never");"visible"===e.cursorBlinking&&(e.cursorBlinking="solid");const n=e.renderWhitespace;!0===n?e.renderWhitespace="boundary":!1===n&&(e.renderWhitespace="none");const o=e.renderLineHighlight;!0===o?e.renderLineHighlight="line":!1===o&&(e.renderLineHighlight="none");const s=e.acceptSuggestionOnEnter;!0===s?e.acceptSuggestionOnEnter="on":!1===s&&(e.acceptSuggestionOnEnter="off");const r=e.tabCompletion;!1===r?e.tabCompletion="off":!0===r&&(e.tabCompletion="onlySnippets");const a=e.suggest;if(a&&"object"==typeof a.filteredTypes&&a.filteredTypes){const e={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};(function(e,t){for(let i in e)if(Cp.call(e,i)&&!1===t({key:i,value:e[i]},(function(){delete e[i]})))return})(e,(e=>{const t=a.filteredTypes[e.key];!1===t&&(a[e.value]=t)}))}const l=e.hover;!0===l?e.hover={enabled:!0}:!1===l&&(e.hover={enabled:!1});const c=e.parameterHints;!0===c?e.parameterHints={enabled:!0}:!1===c&&(e.parameterHints={enabled:!1});const d=e.autoIndent;!0===d?e.autoIndent="full":!1===d&&(e.autoIndent="advanced");const h=e.matchBrackets;!0===h?e.matchBrackets="always":!1===h&&(e.matchBrackets="never");const{renderIndentGuides:u,highlightActiveIndentGuide:g}=e;e.guides||(e.guides={}),void 0!==u&&(e.guides.indentation=!!u),void 0!==g&&(e.guides.highlightActiveIndentation=!!g)}const xp=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new zt,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}},Sp=_a("accessibilityService"),Ep=new xg("accessibilityModeEnabled",!1);var kp=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Dp=function(e,t){return function(i,n){t(i,n,e)}};let Ip=class extends Lt{constructor(e,t,i,n){super(),this._accessibilityService=n,this._onDidChange=this._register(new zt),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new zt),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._computeOptionsMemory=new Te,this.isSimpleWidget=e,this._containerObserver=this._register(new wp(i,t.dimension)),this._rawOptions=Rp(t),this._validatedOptions=Mp.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(10)&&this._containerObserver.startObserving(),this._register(ca.onDidChangeZoomLevel((()=>this._recomputeOptions()))),this._register(xp.onDidChangeTabFocus((()=>this._recomputeOptions()))),this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions()))),this._register(pa.onDidChange((()=>this._recomputeOptions()))),this._register(jr.onDidChange((()=>this._recomputeOptions()))),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const e=this._computeOptions(),t=Mp.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=ha.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:xp.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return Mp.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:Lp(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:$r||Yr,pixelRatio:jr.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return pa.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=Rp(e);Mp.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=Mp.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=function(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}};function Lp(){let e="";return Jr||Xr||(e+="no-user-select "),Jr&&(e+="no-minimap-shadow "),_&&(e+="mac "),e}Ip=kp([Dp(3,Sp)],Ip);class Np{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class Tp{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class Mp{static validateOptions(e){const t=new Np;for(const i of ct){const n="_never_"===i.name?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){const i=new Tp;for(const n of ct)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&V(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!Mp._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const o of ct){const s=!Mp._deepEquals(e._read(o.id),t._read(o.id));i[o.id]=s,s&&(n=!0)}return n?new Ne(i):null}static applyUpdate(e,t){let i=!1;for(const n of ct)if(t.hasOwnProperty(n.name)){const o=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=o.newValue,i=i||o.didChange}return i}}function Rp(e){const t=ye(e);return yp(t),t}function Bp(e,t,i){let n=null,o=null;if("function"==typeof i.value?(n="value",o=i.value,0!==o.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof i.get&&(n="get",o=i.get),!o)throw new Error("not supported");const s=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,e)}),this[s]}}var Op,Fp=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(Op||(Op={}));class Pp extends Lt{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(Oh(document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),this._register(Oh(document,"touchend",(e=>this.onTouchEnd(e)))),this._register(Oh(document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}static addTarget(e){return Pp.isTouchDevice()?(Pp.INSTANCE||(Pp.INSTANCE=new Pp),Pp.INSTANCE.targets.push(e),{dispose:()=>{Pp.INSTANCE.targets=Pp.INSTANCE.targets.filter((t=>t!==e))}}):Lt.None}static ignoreTarget(e){return Pp.isTouchDevice()?(Pp.INSTANCE||(Pp.INSTANCE=new Pp),Pp.INSTANCE.ignoreTargets.push(e),{dispose:()=>{Pp.INSTANCE.ignoreTargets=Pp.INSTANCE.ignoreTargets.filter((t=>t!==e))}}):Lt.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,n=e.targetTouches.length;i=Pp.HOLD_DELAY&&Math.abs(s.initialPageX-z(s.rollingPageX))<30&&Math.abs(s.initialPageY-z(s.rollingPageY))<30){let e=this.newGestureEvent(Op.Contextmenu,s.initialTarget);e.pageX=z(s.rollingPageX),e.pageY=z(s.rollingPageY),this.dispatchEvent(e)}else if(1===i){let e=z(s.rollingPageX),i=z(s.rollingPageY),n=z(s.rollingTimestamps)-s.rollingTimestamps[0],o=e-s.rollingPageX[0],r=i-s.rollingPageY[0];const a=this.targets.filter((e=>s.initialTarget instanceof Node&&e.contains(s.initialTarget)));this.inertia(a,t,Math.abs(o)/n,o>0?1:-1,e,Math.abs(r)/n,r>0?1:-1,i)}this.dispatchEvent(this.newGestureEvent(Op.End,s.initialTarget)),delete this.activeTouches[o.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===Op.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>Pp.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==Op.Change&&e.type!==Op.Contextmenu||(this._lastSetTapCountTime=0);for(let t=0;t{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}))}inertia(e,t,i,n,o,s,r,a){this.handle=Qh((()=>{let l=Date.now(),c=l-t,d=0,h=0,u=!0;i+=Pp.SCROLL_FRICTION*c,s+=Pp.SCROLL_FRICTION*c,i>0&&(u=!1,d=n*i*c),s>0&&(u=!1,h=r*s*c);let g=this.newGestureEvent(Op.Change);g.translationX=d,g.translationY=h,e.forEach((e=>e.dispatchEvent(g))),u||this.inertia(e,l,i,n,o+d,s,r,a+h)}))}onTouchMove(e){let t=Date.now();for(let i=0,n=e.changedTouches.length;i3&&(o.rollingPageX.shift(),o.rollingPageY.shift(),o.rollingTimestamps.shift()),o.rollingPageX.push(n.pageX),o.rollingPageY.push(n.pageY),o.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}function zp(e,t){let i=new kh(t);return i.preventDefault(),{leftButton:i.leftButton,buttons:i.buttons,posx:i.posx,posy:i.posy}}Pp.SCROLL_FRICTION=-.005,Pp.HOLD_DELAY=700,Pp.CLEAR_TAP_COUNT_TIME=400,Fp([Bp],Pp,"isTouchDevice",null);class Vp{constructor(){this._hooks=new It,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(e,t,i,n,o){if(this.isMonitoring())return;this._mouseMoveEventMerger=i,this._mouseMoveCallback=n,this._onStopCallback=o;const s=Eh.getSameOriginWindowChain(),r=C?"pointermove":"mousemove",a=s.map((e=>e.window.document)),l=uu(e);l&&a.unshift(l);for(const e of a)this._hooks.add($h(e,r,(e=>{e.buttons===t?this._mouseMoveCallback(e):this.stopMonitoring(!0)}),((e,t)=>this._mouseMoveEventMerger(e,t)))),this._hooks.add(Oh(e,"mouseup",(e=>this.stopMonitoring(!0))));if(Eh.hasDifferentOriginAncestor()){let e=s[s.length-1];this._hooks.add(Oh(e.window.document,"mouseout",(e=>{"html"===new kh(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(Oh(e.window.document,"mouseover",(e=>{"html"===new kh(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(Oh(e.window.document.body,"mouseleave",(e=>{this.stopMonitoring(!0)})))}}}function Hp(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}class Wp{constructor(e,t,i,n=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=Hp(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class Up{constructor(e,t,i,n){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=Hp(Math.max(Math.min(1,t),0),3),this.l=Hp(Math.max(Math.min(1,i),0),3),this.a=Hp(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=e.a,s=Math.max(t,i,n),r=Math.min(t,i,n);let a=0,l=0;const c=(r+s)/2,d=s-r;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),s){case t:a=(i-n)/d+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:o}=e;let s,r,a;if(0===i)s=r=a=n;else{const e=n<.5?n*(1+i):n+i-n*i,o=2*n-e;s=Up._hue2rgb(o,e,t+1/3),r=Up._hue2rgb(o,e,t),a=Up._hue2rgb(o,e,t-1/3)}return new Wp(Math.round(255*s),Math.round(255*r),Math.round(255*a),o)}}class Qp{constructor(e,t,i,n){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=Hp(Math.max(Math.min(1,t),0),3),this.v=Hp(Math.max(Math.min(1,i),0),3),this.a=Hp(Math.max(Math.min(1,n),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=Math.max(t,i,n),s=o-Math.min(t,i,n),r=0===o?0:s/o;let a;return a=0===s?0:o===t?((i-n)/s%6+6)%6:o===i?(n-t)/s+2:(t-i)/s+4,new Qp(Math.round(60*a),r,o,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:o}=e,s=n*i,r=s*(1-Math.abs(t/60%2-1)),a=n-s;let[l,c,d]=[0,0,0];return t<60?(l=s,c=r):t<120?(l=r,c=s):t<180?(c=s,d=r):t<240?(c=r,d=s):t<300?(l=r,d=s):t<=360&&(l=s,d=r),l=Math.round(255*(l+a)),c=Math.round(255*(c+a)),d=Math.round(255*(d+a)),new Wp(l,c,d,o)}}class jp{constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof Wp)this.rgba=e;else if(e instanceof Up)this._hsla=e,this.rgba=Up.toRGBA(e);else{if(!(e instanceof Qp))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=Qp.toRGBA(e)}}static fromHex(e){return jp.Format.CSS.parseHex(e)||jp.red}get hsla(){return this._hsla?this._hsla:Up.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Qp.fromRGBA(this.rgba)}equals(e){return!!e&&Wp.equals(this.rgba,e.rgba)&&Up.equals(this.hsla,e.hsla)&&Qp.equals(this.hsva,e.hsva)}getRelativeLuminance(){return Hp(.2126*jp._relativeLuminanceForComponent(this.rgba.r)+.7152*jp._relativeLuminanceForComponent(this.rgba.g)+.0722*jp._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance()0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};function Yp(e){return`--vscode-${e.replace(".","-")}`}Lg.add(Kp,Gp);const $p="base.contributions.colors";const qp=new class{constructor(){this._onDidChangeSchema=new zt,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,o){let s={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};this.colorsById[e]=s;let r={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(r.deprecationMessage=o),this.colorSchema.properties[e]=r,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}getColors(){return Object.keys(this.colorsById).map((e=>this.colorsById[e]))}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults){return eA(i.defaults[t.type],t)}}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{let i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)})).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}};function Jp(e,t,i,n,o){return qp.registerColor(e,t,i,n,o)}Lg.add($p,qp);const Xp=Jp("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},e(0,"Overall foreground color. This color is only used if not overridden by a component.")),Zp=Jp("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},e(0,"Overall foreground color for error messages. This color is only used if not overridden by a component."));Jp("descriptionForeground",{light:"#717171",dark:J_(Xp,.7),hc:J_(Xp,.7)},e(0,"Foreground color for description text providing additional information, for example for a label."));const em=Jp("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},e(0,"The default color for icons in the workbench.")),tm=Jp("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},e(0,"Overall border color for focused elements. This color is only used if not overridden by a component.")),im=Jp("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},e(0,"An extra border around elements to separate them from others for greater contrast.")),nm=Jp("contrastActiveBorder",{light:null,dark:null,hc:tm},e(0,"An extra border around active elements to separate them from others for greater contrast."));Jp("selection.background",{light:null,dark:null,hc:null},e(0,"The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")),Jp("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hc:jp.black},e(0,"Color for text separators."));const om=Jp("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},e(0,"Foreground color for links in text.")),sm=Jp("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},e(0,"Foreground color for links in text when clicked on and on mouse hover."));Jp("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hc:"#D7BA7D"},e(0,"Foreground color for preformatted text segments.")),Jp("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hc:null},e(0,"Background color for block quotes in text.")),Jp("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hc:jp.white},e(0,"Border color for block quotes in text."));const rm=Jp("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:jp.black},e(0,"Background color for code blocks in text.")),am=Jp("widget.shadow",{dark:J_(jp.black,.36),light:J_(jp.black,.16),hc:null},e(0,"Shadow color of widgets such as find/replace inside the editor.")),lm=Jp("input.background",{dark:"#3C3C3C",light:jp.white,hc:jp.black},e(0,"Input box background.")),cm=Jp("input.foreground",{dark:Xp,light:Xp,hc:Xp},e(0,"Input box foreground.")),dm=Jp("input.border",{dark:null,light:null,hc:im},e(0,"Input box border.")),hm=Jp("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:im},e(0,"Border color of activated options in input fields."));Jp("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hc:null},e(0,"Background color of activated options in input fields."));const um=Jp("inputOption.activeBackground",{dark:J_(tm,.4),light:J_(tm,.2),hc:jp.transparent},e(0,"Background hover color of options in input fields.")),gm=Jp("inputOption.activeForeground",{dark:jp.white,light:jp.black,hc:null},e(0,"Foreground color of activated options in input fields."));Jp("input.placeholderForeground",{light:J_(Xp,.5),dark:J_(Xp,.5),hc:J_(Xp,.7)},e(0,"Input box foreground color for placeholder text."));const pm=Jp("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:jp.black},e(0,"Input validation background color for information severity.")),mm=Jp("inputValidation.infoForeground",{dark:null,light:null,hc:null},e(0,"Input validation foreground color for information severity.")),fm=Jp("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:im},e(0,"Input validation border color for information severity.")),_m=Jp("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:jp.black},e(0,"Input validation background color for warning severity.")),Am=Jp("inputValidation.warningForeground",{dark:null,light:null,hc:null},e(0,"Input validation foreground color for warning severity.")),bm=Jp("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:im},e(0,"Input validation border color for warning severity.")),wm=Jp("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:jp.black},e(0,"Input validation background color for error severity.")),Cm=Jp("inputValidation.errorForeground",{dark:null,light:null,hc:null},e(0,"Input validation foreground color for error severity.")),vm=Jp("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:im},e(0,"Input validation border color for error severity.")),ym=Jp("dropdown.background",{dark:"#3C3C3C",light:jp.white,hc:jp.black},e(0,"Dropdown background."));Jp("dropdown.listBackground",{dark:null,light:null,hc:jp.black},e(0,"Dropdown list background."));const xm=Jp("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:jp.white},e(0,"Dropdown foreground.")),Sm=Jp("dropdown.border",{dark:ym,light:"#CECECE",hc:im},e(0,"Dropdown border."));Jp("checkbox.background",{dark:ym,light:ym,hc:ym},e(0,"Background color of checkbox widget.")),Jp("checkbox.foreground",{dark:xm,light:xm,hc:xm},e(0,"Foreground color of checkbox widget.")),Jp("checkbox.border",{dark:Sm,light:Sm,hc:Sm},e(0,"Border color of checkbox widget."));const Em=Jp("button.foreground",{dark:jp.white,light:jp.white,hc:jp.white},e(0,"Button foreground color.")),km=Jp("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},e(0,"Button background color.")),Dm=Jp("button.hoverBackground",{dark:q_(km,.2),light:$_(km,.2),hc:null},e(0,"Button background color when hovering."));Jp("button.border",{dark:im,light:im,hc:im},e(0,"Button border color.")),Jp("button.secondaryForeground",{dark:jp.white,light:jp.white,hc:jp.white},e(0,"Secondary button foreground color."));const Im=Jp("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hc:null},e(0,"Secondary button background color."));Jp("button.secondaryHoverBackground",{dark:q_(Im,.2),light:$_(Im,.2),hc:null},e(0,"Secondary button background color when hovering."));const Lm=Jp("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:jp.black},e(0,"Badge background color. Badges are small information labels, e.g. for search results count.")),Nm=Jp("badge.foreground",{dark:jp.white,light:"#333",hc:jp.white},e(0,"Badge foreground color. Badges are small information labels, e.g. for search results count.")),Tm=Jp("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},e(0,"Scrollbar shadow to indicate that the view is scrolled.")),Mm=Jp("scrollbarSlider.background",{dark:jp.fromHex("#797979").transparent(.4),light:jp.fromHex("#646464").transparent(.4),hc:J_(im,.6)},e(0,"Scrollbar slider background color.")),Rm=Jp("scrollbarSlider.hoverBackground",{dark:jp.fromHex("#646464").transparent(.7),light:jp.fromHex("#646464").transparent(.7),hc:J_(im,.8)},e(0,"Scrollbar slider background color when hovering.")),Bm=Jp("scrollbarSlider.activeBackground",{dark:jp.fromHex("#BFBFBF").transparent(.4),light:jp.fromHex("#000000").transparent(.6),hc:im},e(0,"Scrollbar slider background color when clicked on.")),Om=Jp("progressBar.background",{dark:jp.fromHex("#0E70C0"),light:jp.fromHex("#0E70C0"),hc:im},e(0,"Background color of the progress bar that can show for long running operations.")),Fm=Jp("editorError.background",{dark:null,light:null,hc:null},e(0,"Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Pm=Jp("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hc:null},e(0,"Foreground color of error squigglies in the editor.")),zm=Jp("editorError.border",{dark:null,light:null,hc:jp.fromHex("#E47777").transparent(.8)},e(0,"Border color of error boxes in the editor.")),Vm=Jp("editorWarning.background",{dark:null,light:null,hc:null},e(0,"Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Hm=Jp("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},e(0,"Foreground color of warning squigglies in the editor.")),Wm=Jp("editorWarning.border",{dark:null,light:null,hc:jp.fromHex("#FFCC00").transparent(.8)},e(0,"Border color of warning boxes in the editor.")),Um=Jp("editorInfo.background",{dark:null,light:null,hc:null},e(0,"Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Qm=Jp("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},e(0,"Foreground color of info squigglies in the editor.")),jm=Jp("editorInfo.border",{dark:null,light:null,hc:jp.fromHex("#3794FF").transparent(.8)},e(0,"Border color of info boxes in the editor.")),Km=Jp("editorHint.foreground",{dark:jp.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},e(0,"Foreground color of hint squigglies in the editor.")),Gm=Jp("editorHint.border",{dark:null,light:null,hc:jp.fromHex("#eeeeee").transparent(.8)},e(0,"Border color of hint boxes in the editor."));Jp("sash.hoverBorder",{dark:tm,light:tm,hc:tm},e(0,"Border color of active sashes."));const Ym=Jp("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:jp.black},e(0,"Editor background color.")),$m=Jp("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:jp.white},e(0,"Editor default foreground color.")),qm=Jp("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},e(0,"Background color of editor widgets, such as find/replace.")),Jm=Jp("editorWidget.foreground",{dark:Xp,light:Xp,hc:Xp},e(0,"Foreground color of editor widgets, such as find/replace.")),Xm=Jp("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:im},e(0,"Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),Zm=Jp("editorWidget.resizeBorder",{light:null,dark:null,hc:null},e(0,"Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),ef=Jp("quickInput.background",{dark:qm,light:qm,hc:qm},e(0,"Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),tf=Jp("quickInput.foreground",{dark:Jm,light:Jm,hc:Jm},e(0,"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),nf=Jp("quickInputTitle.background",{dark:new jp(new Wp(255,255,255,.105)),light:new jp(new Wp(0,0,0,.06)),hc:"#000000"},e(0,"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),of=Jp("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:jp.white},e(0,"Quick picker color for grouping labels.")),sf=Jp("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:jp.white},e(0,"Quick picker color for grouping borders.")),rf=Jp("keybindingLabel.background",{dark:new jp(new Wp(128,128,128,.17)),light:new jp(new Wp(221,221,221,.4)),hc:jp.transparent},e(0,"Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),af=Jp("keybindingLabel.foreground",{dark:jp.fromHex("#CCCCCC"),light:jp.fromHex("#555555"),hc:jp.white},e(0,"Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),lf=Jp("keybindingLabel.border",{dark:new jp(new Wp(51,51,51,.6)),light:new jp(new Wp(204,204,204,.4)),hc:new jp(new Wp(111,195,223))},e(0,"Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),cf=Jp("keybindingLabel.bottomBorder",{dark:new jp(new Wp(68,68,68,.6)),light:new jp(new Wp(187,187,187,.4)),hc:new jp(new Wp(111,195,223))},e(0,"Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),df=Jp("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},e(0,"Color of the editor selection.")),hf=Jp("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},e(0,"Color of the selected text for high contrast.")),uf=Jp("editor.inactiveSelectionBackground",{light:J_(df,.5),dark:J_(df,.5),hc:J_(df,.5)},e(0,"Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),gf=Jp("editor.selectionHighlightBackground",{light:Z_(df,Ym,.3,.6),dark:Z_(df,Ym,.3,.6),hc:null},e(0,"Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),pf=Jp("editor.selectionHighlightBorder",{light:null,dark:null,hc:nm},e(0,"Border color for regions with the same content as the selection.")),mf=Jp("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},e(0,"Color of the current search match.")),ff=Jp("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},e(0,"Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),_f=Jp("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},e(0,"Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Af=Jp("editor.findMatchBorder",{light:null,dark:null,hc:nm},e(0,"Border color of the current search match.")),bf=Jp("editor.findMatchHighlightBorder",{light:null,dark:null,hc:nm},e(0,"Border color of the other search matches.")),wf=Jp("editor.findRangeHighlightBorder",{dark:null,light:null,hc:J_(nm,.4)},e(0,"Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0);Jp("searchEditor.findMatchBackground",{light:J_(ff,.66),dark:J_(ff,.66),hc:ff},e(0,"Color of the Search Editor query matches.")),Jp("searchEditor.findMatchBorder",{light:J_(bf,.66),dark:J_(bf,.66),hc:bf},e(0,"Border color of the Search Editor query matches."));const Cf=Jp("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},e(0,"Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),vf=Jp("editorHoverWidget.background",{light:qm,dark:qm,hc:qm},e(0,"Background color of the editor hover.")),yf=Jp("editorHoverWidget.foreground",{light:Jm,dark:Jm,hc:Jm},e(0,"Foreground color of the editor hover.")),xf=Jp("editorHoverWidget.border",{light:Xm,dark:Xm,hc:Xm},e(0,"Border color of the editor hover.")),Sf=Jp("editorHoverWidget.statusBarBackground",{dark:q_(vf,.2),light:$_(vf,.05),hc:qm},e(0,"Background color of the editor hover status bar.")),Ef=Jp("editorLink.activeForeground",{dark:"#4E94CE",light:jp.blue,hc:jp.cyan},e(0,"Color of active links.")),kf=Jp("editorInlayHint.foreground",{dark:J_(Nm,.8),light:J_(Nm,.8),hc:Nm},e(0,"Foreground color of inline hints")),Df=Jp("editorInlayHint.background",{dark:J_(Lm,.6),light:J_(Lm,.3),hc:Lm},e(0,"Background color of inline hints")),If=Jp("editorInlayHint.typeForeground",{dark:kf,light:kf,hc:kf},e(0,"Foreground color of inline hints for types")),Lf=Jp("editorInlayHint.typeBackground",{dark:Df,light:Df,hc:Df},e(0,"Background color of inline hints for types")),Nf=Jp("editorInlayHint.parameterForeground",{dark:kf,light:kf,hc:kf},e(0,"Foreground color of inline hints for parameters")),Tf=Jp("editorInlayHint.parameterBackground",{dark:Df,light:Df,hc:Df},e(0,"Background color of inline hints for parameters")),Mf=Jp("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},e(0,"The color used for the lightbulb actions icon.")),Rf=Jp("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},e(0,"The color used for the lightbulb auto fix actions icon.")),Bf=new jp(new Wp(155,185,85,.2)),Of=new jp(new Wp(255,0,0,.2)),Ff=Jp("diffEditor.insertedTextBackground",{dark:Bf,light:Bf,hc:null},e(0,"Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Pf=Jp("diffEditor.removedTextBackground",{dark:Of,light:Of,hc:null},e(0,"Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),zf=Jp("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},e(0,"Outline color for the text that got inserted.")),Vf=Jp("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},e(0,"Outline color for text that got removed.")),Hf=Jp("diffEditor.border",{dark:null,light:null,hc:im},e(0,"Border color between the two text editors.")),Wf=Jp("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},e(0,"Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),Uf=Jp("list.focusBackground",{dark:null,light:null,hc:null},e(0,"List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Qf=Jp("list.focusForeground",{dark:null,light:null,hc:null},e(0,"List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),jf=Jp("list.focusOutline",{dark:tm,light:tm,hc:nm},e(0,"List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Kf=Jp("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},e(0,"List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Gf=Jp("list.activeSelectionForeground",{dark:jp.white,light:jp.white,hc:null},e(0,"List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Yf=Jp("list.activeSelectionIconForeground",{dark:null,light:null,hc:null},e(0,"List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),$f=Jp("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},e(0,"List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),qf=Jp("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},e(0,"List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Jf=Jp("list.inactiveSelectionIconForeground",{dark:null,light:null,hc:null},e(0,"List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Xf=Jp("list.inactiveFocusBackground",{dark:null,light:null,hc:null},e(0,"List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Zf=Jp("list.inactiveFocusOutline",{dark:null,light:null,hc:null},e(0,"List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),e_=Jp("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},e(0,"List/Tree background when hovering over items using the mouse.")),t_=Jp("list.hoverForeground",{dark:null,light:null,hc:null},e(0,"List/Tree foreground when hovering over items using the mouse.")),i_=Jp("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},e(0,"List/Tree drag and drop background when moving items around using the mouse.")),n_=Jp("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:tm},e(0,"List/Tree foreground color of the match highlights when searching inside the list/tree.")),o_=Jp("list.focusHighlightForeground",{dark:n_,light:(s_=Kf,r_=n_,a_="#9DDDFF",{op:5,if:s_,then:r_,else:a_}),hc:n_},e(0,"List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));var s_,r_,a_;Jp("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hc:"#B89500"},e(0,"List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),Jp("list.errorForeground",{dark:"#F88070",light:"#B01011",hc:null},e(0,"Foreground color of list items containing errors.")),Jp("list.warningForeground",{dark:"#CCA700",light:"#855F00",hc:null},e(0,"Foreground color of list items containing warnings."));const l_=Jp("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:jp.black},e(0,"Background color of the type filter widget in lists and trees.")),c_=Jp("listFilterWidget.outline",{dark:jp.transparent,light:jp.transparent,hc:"#f38518"},e(0,"Outline color of the type filter widget in lists and trees.")),d_=Jp("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:im},e(0,"Outline color of the type filter widget in lists and trees, when there are no matches."));Jp("list.filterMatchBackground",{dark:ff,light:ff,hc:null},e(0,"Background color of the filtered match.")),Jp("list.filterMatchBorder",{dark:bf,light:bf,hc:im},e(0,"Border color of the filtered match."));const h_=Jp("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},e(0,"Tree stroke color for the indentation guides.")),u_=Jp("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},e(0,"Table border color between columns.")),g_=Jp("tree.tableOddRowsBackground",{dark:J_(Xp,.04),light:J_(Xp,.04),hc:null},e(0,"Background color for odd table rows."));Jp("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hc:"#A7A8A9"},e(0,"List/Tree foreground color for items that are deemphasized. "));const p_=Jp("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,e(0,"Please use quickInputList.focusBackground instead")),m_=Jp("quickInputList.focusForeground",{dark:Gf,light:Gf,hc:Gf},e(0,"Quick picker foreground color for the focused item.")),f_=Jp("quickInputList.focusIconForeground",{dark:Yf,light:Yf,hc:Yf},e(0,"Quick picker icon foreground color for the focused item.")),__=Jp("quickInputList.focusBackground",{dark:X_(p_,Kf),light:X_(p_,Kf),hc:null},e(0,"Quick picker background color for the focused item.")),A_=Jp("menu.border",{dark:null,light:null,hc:im},e(0,"Border color of menus.")),b_=Jp("menu.foreground",{dark:xm,light:Xp,hc:xm},e(0,"Foreground color of menu items.")),w_=Jp("menu.background",{dark:ym,light:ym,hc:ym},e(0,"Background color of menu items.")),C_=Jp("menu.selectionForeground",{dark:Gf,light:Gf,hc:Gf},e(0,"Foreground color of the selected menu item in menus.")),v_=Jp("menu.selectionBackground",{dark:Kf,light:Kf,hc:Kf},e(0,"Background color of the selected menu item in menus.")),y_=Jp("menu.selectionBorder",{dark:null,light:null,hc:nm},e(0,"Border color of the selected menu item in menus.")),x_=Jp("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:im},e(0,"Color of a separator menu item in menus.")),S_=Jp("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hc:null},e(0,"Toolbar background when hovering over actions using the mouse"));Jp("toolbar.hoverOutline",{dark:null,light:null,hc:nm},e(0,"Toolbar outline when hovering over actions using the mouse")),Jp("toolbar.activeBackground",{dark:q_(S_,.1),light:$_(S_,.1),hc:null},e(0,"Toolbar background when holding the mouse over actions")),Jp("editor.snippetTabstopHighlightBackground",{dark:new jp(new Wp(124,124,124,.3)),light:new jp(new Wp(10,50,100,.2)),hc:new jp(new Wp(124,124,124,.3))},e(0,"Highlight background color of a snippet tabstop.")),Jp("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},e(0,"Highlight border color of a snippet tabstop.")),Jp("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},e(0,"Highlight background color of the final tabstop of a snippet.")),Jp("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new jp(new Wp(10,50,100,.5)),hc:"#525252"},e(0,"Highlight border color of the final tabstop of a snippet.")),Jp("breadcrumb.foreground",{light:J_(Xp,.8),dark:J_(Xp,.8),hc:J_(Xp,.8)},e(0,"Color of focused breadcrumb items.")),Jp("breadcrumb.background",{light:Ym,dark:Ym,hc:Ym},e(0,"Background color of breadcrumb items.")),Jp("breadcrumb.focusForeground",{light:$_(Xp,.2),dark:q_(Xp,.1),hc:q_(Xp,.1)},e(0,"Color of focused breadcrumb items.")),Jp("breadcrumb.activeSelectionForeground",{light:$_(Xp,.2),dark:q_(Xp,.1),hc:q_(Xp,.1)},e(0,"Color of selected breadcrumb items.")),Jp("breadcrumbPicker.background",{light:qm,dark:qm,hc:qm},e(0,"Background color of breadcrumb item picker."));const E_=jp.fromHex("#40C8AE").transparent(.5),k_=jp.fromHex("#40A6FF").transparent(.5),D_=jp.fromHex("#606060").transparent(.4),I_=.4,L_=Jp("merge.currentHeaderBackground",{dark:E_,light:E_,hc:null},e(0,"Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);Jp("merge.currentContentBackground",{dark:J_(L_,I_),light:J_(L_,I_),hc:J_(L_,I_)},e(0,"Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const N_=Jp("merge.incomingHeaderBackground",{dark:k_,light:k_,hc:null},e(0,"Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);Jp("merge.incomingContentBackground",{dark:J_(N_,I_),light:J_(N_,I_),hc:J_(N_,I_)},e(0,"Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const T_=Jp("merge.commonHeaderBackground",{dark:D_,light:D_,hc:null},e(0,"Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);Jp("merge.commonContentBackground",{dark:J_(T_,I_),light:J_(T_,I_),hc:J_(T_,I_)},e(0,"Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations."),!0);const M_=Jp("merge.border",{dark:null,light:null,hc:"#C3DF6F"},e(0,"Border color on headers and the splitter in inline merge-conflicts."));Jp("editorOverviewRuler.currentContentForeground",{dark:J_(L_,1),light:J_(L_,1),hc:M_},e(0,"Current overview ruler foreground for inline merge-conflicts.")),Jp("editorOverviewRuler.incomingContentForeground",{dark:J_(N_,1),light:J_(N_,1),hc:M_},e(0,"Incoming overview ruler foreground for inline merge-conflicts.")),Jp("editorOverviewRuler.commonContentForeground",{dark:J_(T_,1),light:J_(T_,1),hc:M_},e(0,"Common ancestor overview ruler foreground for inline merge-conflicts."));const R_=Jp("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},e(0,"Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),B_=Jp("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},e(0,"Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),O_=Jp("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},e(0,"Minimap marker color for find matches."),!0),F_=Jp("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hc:"#ffffff"},e(0,"Minimap marker color for repeating editor selections."),!0),P_=Jp("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},e(0,"Minimap marker color for the editor selection."),!0),z_=Jp("minimap.errorHighlight",{dark:new jp(new Wp(255,18,18,.7)),light:new jp(new Wp(255,18,18,.7)),hc:new jp(new Wp(255,50,50,1))},e(0,"Minimap marker color for errors.")),V_=Jp("minimap.warningHighlight",{dark:Hm,light:Hm,hc:Wm},e(0,"Minimap marker color for warnings.")),H_=Jp("minimap.background",{dark:null,light:null,hc:null},e(0,"Minimap background color.")),W_=Jp("minimap.foregroundOpacity",{dark:jp.fromHex("#000f"),light:jp.fromHex("#000f"),hc:jp.fromHex("#000f")},e(0,'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),U_=Jp("minimapSlider.background",{light:J_(Mm,.5),dark:J_(Mm,.5),hc:J_(Mm,.5)},e(0,"Minimap slider background color.")),Q_=Jp("minimapSlider.hoverBackground",{light:J_(Rm,.5),dark:J_(Rm,.5),hc:J_(Rm,.5)},e(0,"Minimap slider background color when hovering.")),j_=Jp("minimapSlider.activeBackground",{light:J_(Bm,.5),dark:J_(Bm,.5),hc:J_(Bm,.5)},e(0,"Minimap slider background color when clicked on.")),K_=Jp("problemsErrorIcon.foreground",{dark:Pm,light:Pm,hc:Pm},e(0,"The color used for the problems error icon.")),G_=Jp("problemsWarningIcon.foreground",{dark:Hm,light:Hm,hc:Hm},e(0,"The color used for the problems warning icon.")),Y_=Jp("problemsInfoIcon.foreground",{dark:Qm,light:Qm,hc:Qm},e(0,"The color used for the problems info icon."));function $_(e,t){return{op:0,value:e,factor:t}}function q_(e,t){return{op:1,value:e,factor:t}}function J_(e,t){return{op:2,value:e,factor:t}}function X_(...e){return{op:3,values:e}}function Z_(e,t,i,n){return{op:4,value:e,background:t,factor:i,transparency:n}}function eA(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?jp.fromHex(e):t.getColor(e):e instanceof jp?e:"object"==typeof e?function(e,t){var i,n,o;switch(e.op){case 0:return null===(i=eA(e.value,t))||void 0===i?void 0:i.darken(e.factor);case 1:return null===(n=eA(e.value,t))||void 0===n?void 0:n.lighten(e.factor);case 2:return null===(o=eA(e.value,t))||void 0===o?void 0:o.transparent(e.factor);case 3:for(const i of e.values){const e=eA(i,t);if(e)return e}return;case 5:return eA(t.defines(e.if)?e.then:e.else,t);case 4:{const i=eA(e.value,t);if(!i)return;const n=eA(e.background,t);return n?i.isDarkerThan(n)?jp.getLighterColor(i,n,e.factor).transparent(e.transparency):jp.getDarkerColor(i,n,e.factor).transparent(e.transparency):i.transparent(e.factor*e.transparency)}default:throw ve()}}(e,t):void 0}Jp("charts.foreground",{dark:Xp,light:Xp,hc:Xp},e(0,"The foreground color used in charts.")),Jp("charts.lines",{dark:J_(Xp,.5),light:J_(Xp,.5),hc:J_(Xp,.5)},e(0,"The color used for horizontal lines in charts.")),Jp("charts.red",{dark:Pm,light:Pm,hc:Pm},e(0,"The red color used in chart visualizations.")),Jp("charts.blue",{dark:Qm,light:Qm,hc:Qm},e(0,"The blue color used in chart visualizations.")),Jp("charts.yellow",{dark:Hm,light:Hm,hc:Hm},e(0,"The yellow color used in chart visualizations.")),Jp("charts.orange",{dark:O_,light:O_,hc:O_},e(0,"The orange color used in chart visualizations.")),Jp("charts.green",{dark:"#89D185",light:"#388A34",hc:"#89D185"},e(0,"The green color used in chart visualizations.")),Jp("charts.purple",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},e(0,"The purple color used in chart visualizations."));const tA="vscode://schemas/workbench-colors";let iA=Lg.as(Kp);iA.registerSchema(tA,qp.getColorSchema());const nA=new An((()=>iA.notifySchemaChanged(tA)),200);qp.onDidChangeSchema((()=>{nA.isScheduled()||nA.schedule()}));class oA{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new sA(this.x-iu.scrollX,this.y-iu.scrollY)}}class sA{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new oA(this.clientX+iu.scrollX,this.clientY+iu.scrollY)}}class rA{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class aA{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function lA(e){const t=tu(e);return new rA(t.left,t.top,t.width,t.height)}function cA(e,t,i){const n=t.width/e.offsetWidth,o=t.height/e.offsetHeight,s=(i.x-t.x)/n,r=(i.y-t.y)/o;return new aA(s,r)}class dA extends kh{constructor(e,t){super(e),this._editorMouseEventBrand=void 0,this.pos=new oA(this.posx,this.posy),this.editorPos=lA(t),this.relativePos=cA(t,this.editorPos,this.pos)}}class hA{constructor(e){this._editorViewDomNode=e}_create(e){return new dA(e,this._editorViewDomNode)}onContextMenu(e,t){return Oh(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return Oh(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return Oh(e,"mousedown",(e=>{t(this._create(e))}))}onMouseLeave(e,t){return Hh(e,(e=>{t(this._create(e))}))}onMouseMoveThrottled(e,t,i,n){return $h(e,"mousemove",t,((e,t)=>i(e,this._create(t))),n)}}class uA{constructor(e){this._editorViewDomNode=e}_create(e){return new dA(e,this._editorViewDomNode)}onPointerUp(e,t){return Oh(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return Oh(e,"pointerdown",(e=>{t(this._create(e))}))}onPointerLeave(e,t){return n=e=>{t(this._create(e))},Oh(i=e,"pointerout",(e=>{let t=e.relatedTarget;for(;t&&t!==i;)t=t.parentNode;t!==i&&n(e)}));var i,n}onPointerMoveThrottled(e,t,i,n){return $h(e,"pointermove",t,((e,t)=>i(e,this._create(t))),n)}}class gA extends Lt{constructor(e){super(),this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new Vp),this._keydownListener=null}startMonitoring(e,t,i,n,o){this._keydownListener=Ph(document,"keydown",(e=>{e.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0);this._globalMouseMoveMonitor.startMonitoring(e,t,((e,t)=>i(e,new dA(t,this._editorViewDomNode))),n,(e=>{this._keydownListener.dispose(),o(e)}))}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class pA{constructor(e){this._editor=e,this._instanceId=++pA._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new An((()=>this.garbageCollect()),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let i=this._rules.get(t);if(!i){const n=this._counter++;i=new mA(t,`dyn-rule-${this._instanceId}-${n}`,hu(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}pA._idPool=0;class mA{constructor(e,t,i,n){this.key=e,this.className=t,this.properties=n,this._referenceCount=0,this._styleElement=pu(i),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(const e in t){const n=t[e];let o;o="object"==typeof n?`var(${Yp(n.id)})`:n;i+=`\n\t${fA(e)}: ${o};`}return i+="\n}",i}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function fA(e){return e.replace(/(^[A-Z])/,(([e])=>e.toLowerCase())).replace(/([A-Z])/g,(([e])=>`-${e.toLowerCase()}`))}class _A extends Lt{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i=s.left?n.width=Math.max(n.width,s.left+s.width-n.left):(t[i++]=n,n=s)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||0===e.length)return null;const n=[];for(let o=0,s=e.length;ol)return null;if((t=Math.min(l,Math.max(0,t)))===(n=Math.min(l,Math.max(0,n)))&&i===o&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(i,s,r)}t!==n&&n>0&&0===o&&(n--,o=1073741824);let c=e.children[t].firstChild,d=e.children[n].firstChild;if(c&&d||(!c&&0===i&&t>0&&(c=e.children[t-1].firstChild,i=1073741824),!d&&0===o&&n>0&&(d=e.children[n-1].firstChild,o=1073741824)),!c||!d)return null;i=Math.min(c.textContent.length,Math.max(0,i)),o=Math.min(d.textContent.length,Math.max(0,o));const h=this._readClientRects(c,i,d,o,a);return this._createHorizontalRangesFromClientRects(h,s,r)}}const DA=!!b||!(A||Yr||Jr);let IA=!0;class LA{constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1,this.endNode=t}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}}class NA{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(44);this.renderWhitespace=i.get(88),this.renderControlCharacters=i.get(83),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(29),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(59),this.stopRenderingLineAfter=i.get(105),this.fontLigatures=i.get(45)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class TA{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=sa(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return(this._options.themeType===Ng.HIGH_CONTRAST||"selection"===this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,i,n){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const o=i.getViewLineRenderingData(e),s=this._options,r=wd.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let a=null;if(s.themeType===Ng.HIGH_CONTRAST||"selection"===this._options.renderWhitespace){const t=i.selections;for(const i of t){if(i.endLineNumbere)continue;const t=i.startLineNumber===e?i.startColumn:o.minColumn,n=i.endLineNumber===e?i.endColumn:o.maxColumn;t');const c=Ld(l,n);n.appendASCIIString("");let d=null;return IA&&DA&&o.isBasicASCII&&s.useMonospaceOptimizations&&0===c.containsForeignElements&&o.content.length<300&&l.lineTokens.getCount()<100&&(d=new MA(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping)),d||(d=OA(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=d,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof MA}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof MA?this._renderedViewLine.monospaceAssumptionsAreValid():IA}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof MA&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const o=this._renderedViewLine.input.stopRenderingLineAfter;let s=!1;-1!==o&&t>o+1&&i>o+1&&(s=!0),-1!==o&&t>o+1&&(t=o+1),-1!==o&&i>o+1&&(i=o+1);const r=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return r&&r.length>0?new EA(s,r):null}getColumnOfNodeOffset(e,t,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,i):1}}TA.CLASS_NAME="view-line";class MA{constructor(e,t,i){this.domNode=e,this.input=t,this._characterMapping=i,this._charWidth=t.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return IA;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),IA=!1),IA}toSlowRenderedLine(){return OA(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const o=this._getCharPosition(t),s=this._getCharPosition(i);return[new xA(o,s-o)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffset(e);return this._charWidth*t}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.getColumn(new kd(o,i),n)}}class RA{constructor(e,t,i,n,o){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const o=this._readPixelOffset(this.domNode,e,t,n);if(-1===o)return null;const s=this._readPixelOffset(this.domNode,e,i,n);return-1===s?null:[new xA(o,s-o)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,o){if(i===n){const n=this._readPixelOffset(e,t,i,o);return-1===n?null:[new xA(n,0)]}return this._readRawVisibleRangesForRange(e,i,n,o)}_readPixelOffset(e,t,i,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();const t=this._getReadingTarget(e);return t.firstChild?t.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){const o=this._pixelOffsetCache[i];if(-1!==o)return o;const s=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=s,s}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(0===this._characterMapping.length){const t=kA.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n.clientRectDeltaLeft,n.clientRectScale,n.endNode);return t&&0!==t.length?t[0].left:-1}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();const o=this._characterMapping.getDomPosition(i),s=kA.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,o.partIndex,o.charIndex,n.clientRectDeltaLeft,n.clientRectScale,n.endNode);if(!s||0===s.length)return-1;const r=s[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getAbsoluteOffset(i),t=Math.round(this.input.spaceWidth*e);if(Math.abs(t-r)<=1)return t}return r}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new xA(0,this.getWidth())];const o=this._characterMapping.getDomPosition(t),s=this._characterMapping.getDomPosition(i);return kA.readHorizontalRanges(this._getReadingTarget(e),o.partIndex,o.charIndex,s.partIndex,s.charIndex,n.clientRectDeltaLeft,n.clientRectScale,n.endNode)}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.getColumn(new kd(o,i),n)}}class BA extends RA{_readVisibleRangesForRange(e,t,i,n,o){const s=super._readVisibleRangesForRange(e,t,i,n,o);if(!s||0===s.length||i===n||1===i&&n===this._characterMapping.length)return s;if(!this.input.containsRTL){const i=this._readPixelOffset(e,t,n,o);if(-1!==i){const e=s[s.length-1];e.left=t){return l-t=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class GA{constructor(e,t,i){this.model=e.model;const n=e.configuration.options;this.layoutInfo=n.get(131),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(59),this.stickyTabStops=n.get(104),this.typicalHalfwidthCharacterWidth=n.get(44).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return GA.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,o=e.model.getLineCount();let s,r=null,a=null;return i.afterLineNumber!==o&&(a=new Ki(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new Ki(i.afterLineNumber,e.model.getLineMaxColumn(i.afterLineNumber))),s=null===a?r:null===r?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,XA._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class $A extends YA{constructor(e,t,i,n,o){super(e,t,i,n),this._ctx=e,o?(this.target=o,this.targetPath=bA.collect(o,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.columns.contentLeft+s.width)continue;const i=e.getVerticalOffsetForLineNumber(s.position.lineNumber);if(i<=o&&o<=i+s.height)return t.fulfillContentText(s.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfillViewZone(e,i.position,i)}return null}static _hitTestTextArea(e,t){return KA.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let o=Math.abs(t.relativePos.x);const s={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth?t.fulfillMargin(2,n,i.range,s):(o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,s):(o-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,s)))}return null}static _hitTestViewLines(e,t,i){if(!KA.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new Ki(1,1),qA);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.model.getLineCount(),n=e.model.getLineMaxColumn(i);return t.fulfillContentEmpty(new Ki(i,n),qA)}if(i){if(KA.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.model.getLineLength(i)){const n=e.getLineWidth(i),o=JA(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new Ki(i,1),o)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const o=JA(t.mouseContentHorizontalOffset-n),s=new Ki(i,e.model.getLineMaxColumn(i));return t.fulfillContentEmpty(s,o)}}return t.fulfillUnknown()}const n=XA._doHitTest(e,t);return 1===n.type?XA.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(KA.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfillScrollbar(new Ki(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(KA.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfillScrollbar(new Ki(i,n))}}return null}static _hitTestScrollbar(e,t){if(KA.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfillScrollbar(new Ki(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(131),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return XA._getMouseColumn(n,t.get(44).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){if(e<0)return 1;return Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,o){const s=n.lineNumber,r=n.column,a=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>a){const e=JA(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}const l=e.visibleRangeForPosition(s,r);if(!l)return t.fulfillUnknown(n);const c=l.left;if(t.mouseContentHorizontalOffset===c)return t.fulfillContentText(n,null,{mightBeForeignElement:!!o,injectedText:o});const d=[];if(d.push({offset:l.left,column:r}),r>1){const t=e.visibleRangeForPosition(s,r-1);t&&d.push({offset:t.left,column:r-1})}if(re.offset-t.offset));const h=t.pos.toClientCoordinates(),u=i.getBoundingClientRect(),g=u.left<=h.clientX&&h.clientX<=u.right;for(let e=1;e=t.editorPos.y+t.editorPos.height&&(o=t.editorPos.y+t.editorPos.height-1);const s=new oA(t.pos.x,o),r=this._actualDoHitTestWithCaretRangeFromPoint(e,s.toClientCoordinates());return 1===r.type?r:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=uu(e.viewDomNode);let n;if(n=i?void 0===i.caretRangeFromPoint?function(e,t,i){const n=document.createRange();let o=e.elementFromPoint(t,i);if(null!==o){for(;o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE&&o.lastChild&&o.lastChild.firstChild;)o=o.lastChild;const e=o.getBoundingClientRect(),i=window.getComputedStyle(o,null).getPropertyValue("font"),s=o.innerText;let r,a=e.left,l=0;if(t>e.left+e.width)l=s.length;else{const e=ZA.getInstance();for(let n=0;nthis._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(131).height;const n=new hA(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),eb(this.mouseTargetFactory),tb.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e))));this._register(Oh(this.viewHelper.viewDomNode,wu.MOUSE_WHEEL,(e=>{if(this.viewController.emitMouseWheel(e),!this._context.configuration.options.get(68))return;const t=new Dh(e);if(_?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey){const e=ca.getZoomLevel(),i=t.deltaY>0?1:-1;ca.setZoomLevel(e+i),t.preventDefault(),t.stopPropagation()}}),{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(131)){const e=this._context.configuration.options.get(131).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const i=new sA(e,t).toPageCoordinates(),n=lA(this.viewHelper.viewDomNode);if(i.yn.y+n.height||i.xn.x+n.width)return null;const o=cA(this.viewHelper.viewDomNode,n,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,o,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const t=uu(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find((e=>this.viewHelper.viewDomNode.contains(e))))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){if(this._mouseDownOperation.isActive())return;e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(l&&(i||o&&s))c(),this._mouseDownOperation.start(t.type,e);else if(n)e.preventDefault();else if(r){const i=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(i.viewZoneId)&&(c(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else a&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(c(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}tb.MOUSE_MOVE_MINIMUM_TIME=100;class ib extends Lt{constructor(e,t,i,n,o){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._createMouseTarget=n,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new gA(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new fn),this._mouseState=new nb,this._currentSelection=new Yi(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const i=this._findMousePosition(t,!0);if(!i||!i.position)return;this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count;const n=this._context.configuration.options;if(!n.get(81)&&n.get(31)&&!n.get(18)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===i.type&&i.position&&this._currentSelection.containsPosition(i.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,eb(null),(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!0);e&&e instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(i,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,eb(null),(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet((()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1);e&&(this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0))}),10)}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.model,n=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posyt.y+t.height){const t=n.getCurrentScrollTop()+e.relativePos.y,s=GA.getZoneAtCoord(this._context,t);if(s){const e=this._helpPositionJumpOverViewZone(s);if(e)return jA.createOutsideEditor(o,e)}const r=n.getLineNumberAtVerticalOffset(t);return jA.createOutsideEditor(o,new Ki(r,i.getLineMaxColumn(r)))}const s=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);return e.posxt.x+t.width?jA.createOutsideEditor(o,new Ki(s,i.getLineMaxColumn(s))):null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return jA.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new Ki(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})}}class nb{constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>nb.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}var ob,sb;nb.CLEAR_MOUSE_DOWN_COUNT_TIME=400,function(e){e.text="text/plain",e.binary="application/octet-stream",e.unknown="application/unknown",e.markdown="text/markdown",e.latex="text/latex"}(ob||(ob={}));class rb{constructor(e,t,i,n,o){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selectionStartPosition=n,this.selectionEndPosition=o}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e){return new rb(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new rb(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,o=-1;for(;-1!==(o=t.indexOf("\n",o+1));)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const n=Math.min($n(e.value,t.value),e.selectionStart,t.selectionStart),o=Math.min(qn(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd);e.value.substring(n,e.value.length-o);const s=t.value.substring(n,t.value.length-o),r=e.selectionStart-n,a=e.selectionEnd-n;if(t.selectionStart-n===t.selectionEnd-n){return{text:s,replacePrevCharCnt:e.selectionStart-n,replaceNextCharCnt:0,positionDelta:0}}return{text:s,replacePrevCharCnt:a-r,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min($n(e.value,t.value),e.selectionEnd),n=Math.min(qn(e.value,t.value),e.value.length-e.selectionEnd),o=e.value.substring(i,e.value.length-n),s=t.value.substring(i,t.value.length-n);e.selectionStart;const r=e.selectionEnd-i;t.selectionStart;const a=t.selectionEnd-i;return{text:s,replacePrevCharCnt:r,replaceNextCharCnt:o.length-r,positionDelta:a-s.length}}}rb.EMPTY=new rb("",0,0,null,null);class ab{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t;return new Gi(i+1,1,i+t+1,1)}static fromEditorSelection(e,t,i,n,o){const s=ab._getPageOfLine(i.startLineNumber,n),r=ab._getRangeForPage(s,n),a=ab._getPageOfLine(i.endLineNumber,n),l=ab._getRangeForPage(a,n),c=r.intersectRanges(new Gi(1,1,i.startLineNumber,i.startColumn));let d=t.getValueInRange(c,1);const h=t.getLineCount(),u=t.getLineMaxColumn(h),g=l.intersectRanges(new Gi(i.endLineNumber,i.endColumn,h,u));let p,m=t.getValueInRange(g,1);if(s===a||s+1===a)p=t.getValueInRange(i,1);else{const e=r.intersectRanges(i),n=l.intersectRanges(i);p=t.getValueInRange(e,1)+String.fromCharCode(8230)+t.getValueInRange(n,1)}if(o){const e=500;d.length>e&&(d=d.substring(d.length-e,d.length)),m.length>e&&(m=m.substring(0,e)),p.length>2*e&&(p=p.substring(0,e)+String.fromCharCode(8230)+p.substring(p.length-e,p.length))}return new rb(d+p+m,d.length,d.length+p.length,new Ki(i.startLineNumber,i.startColumn),new Ki(i.endLineNumber,i.endColumn))}}!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(sb||(sb={}));const lb={forceCopyWithSyntaxHighlighting:!1};class cb{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}cb.INSTANCE=new cb;class db{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){const t={text:e=e||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}class hb extends Lt{constructor(e,t,i,n){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._onFocus=this._register(new zt),this.onFocus=this._onFocus.event,this._onBlur=this._register(new zt),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new zt),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new zt),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new zt),this.onCut=this._onCut.event,this._onPaste=this._register(new zt),this.onPaste=this._onPaste.event,this._onType=this._register(new zt),this.onType=this._onType.event,this._onCompositionStart=this._register(new zt),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new zt),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new zt),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new zt),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new An((()=>this._onCut.fire()),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new An((()=>this.writeScreenReaderContent("asyncFocusGain")),0)),this._textAreaState=rb.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let o=null;this._register(this._textArea.onKeyDown((e=>{const t=new vh(e);(109===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),o=t,this._onKeyDown.fire(t)}))),this._register(this._textArea.onKeyUp((e=>{const t=new vh(e);this._onKeyUp.fire(t)}))),this._register(this._textArea.onCompositionStart((e=>{const t=new db;if(this._currentComposition)this._currentComposition=t;else{if(this._currentComposition=t,2===this._OS&&o&&o.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===o.code||"ArrowLeft"===o.code))return t.handleCompositionUpdate("x"),void this._onCompositionStart.fire({data:e.data});this._browser.isAndroid,this._onCompositionStart.fire({data:e.data})}}))),this._register(this._textArea.onCompositionUpdate((e=>{const t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){const t=rb.readFromTextArea(this._textArea),i=rb.deduceAndroidCompositionInput(this._textAreaState,t);return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const i=t.handleCompositionUpdate(e.data);this._textAreaState=rb.readFromTextArea(this._textArea),this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(this._textArea.onCompositionEnd((e=>{const t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){const e=rb.readFromTextArea(this._textArea),t=rb.deduceAndroidCompositionInput(this._textAreaState,e);return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const i=t.handleCompositionUpdate(e.data);this._textAreaState=rb.readFromTextArea(this._textArea),this._onType.fire(i),this._onCompositionEnd.fire()}))),this._register(this._textArea.onInput((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const t=rb.readFromTextArea(this._textArea),i=rb.deduceInput(this._textAreaState,t,2===this._OS);0===i.replacePrevCharCnt&&1===i.text.length&&Jn(i.text.charCodeAt(0))||(this._textAreaState=t,""===i.text&&0===i.replacePrevCharCnt&&0===i.replaceNextCharCnt&&0===i.positionDelta||this._onType.fire(i))}))),this._register(this._textArea.onCut((e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(this._textArea.onCopy((e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(this._textArea.onPaste((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),e.preventDefault(),!e.clipboardData)return;let[t,i]=ub.getTextData(e.clipboardData);t&&(i=i||cb.INSTANCE.get(t),this._onPaste.fire({text:t,metadata:i}))}))),this._register(this._textArea.onFocus((()=>{const e=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!e&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()}))),this._register(this._textArea.onBlur((()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(this._textArea.onSyntheticTap((()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return Oh(document,"selectionchange",(t=>{if(!this._hasFocus)return;if(this._currentComposition)return;if(!this._browser.isChrome)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const o=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),o<100)return;if(!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const s=this._textArea.getValue();if(this._textAreaState.value!==s)return;const r=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===r&&this._textAreaState.selectionEnd===a)return;const l=this._textAreaState.deduceEditorPosition(r),c=this._host.deduceModelPosition(l[0],l[1],l[2]),d=this._textAreaState.deduceEditorPosition(a),h=this._host.deduceModelPosition(d[0],d[1],d[2]),u=new Yi(c.lineNumber,c.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(u)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._currentComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};cb.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,i),e.preventDefault(),e.clipboardData&&ub.setTextData(e.clipboardData,t.text,t.html,i)}}class ub{static getTextData(e){const t=e.getData(ob.text);let i=null;const n=e.getData("vscode-editor-data");if("string"==typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(e){}return[t,i]}static setTextData(e,t,i,n){e.setData(ob.text,t),"string"==typeof i&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}}class gb extends Lt{constructor(e){super(),this._actual=e,this.onKeyDown=this._register(Wh(this._actual,"keydown")).event,this.onKeyUp=this._register(Wh(this._actual,"keyup")).event,this.onCompositionStart=this._register(Wh(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(Wh(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(Wh(this._actual,"compositionend")).event,this.onInput=this._register(Wh(this._actual,"input")).event,this.onCut=this._register(Wh(this._actual,"cut")).event,this.onCopy=this._register(Wh(this._actual,"copy")).event,this.onPaste=this._register(Wh(this._actual,"paste")).event,this.onFocus=this._register(Wh(this._actual,"focus")).event,this.onBlur=this._register(Wh(this._actual,"blur")).event,this._onSyntheticTap=this._register(new zt),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(Oh(this._actual,sb.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const e=uu(this._actual);return e?e.activeElement===this._actual:!!Rh(this._actual)&&document.activeElement===this._actual}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let o=null;const s=uu(n);o=s?s.activeElement:document.activeElement;const r=o===n,a=n.selectionStart,l=n.selectionEnd;if(r&&a===t&&l===i)Yr&&window.parent!==window&&n.focus();else{if(r)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(Yr&&window.parent!==window&&n.focus());try{const e=function(e){let t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),function(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}(n,e)}catch(e){}}}}class pb extends tb{constructor(e,t,i){super(e,t,i),this._register(Pp.addTarget(this.viewHelper.linesContentDomNode)),this._register(Oh(this.viewHelper.linesContentDomNode,Op.Tap,(e=>this.onTap(e)))),this._register(Oh(this.viewHelper.linesContentDomNode,Op.Change,(e=>this.onChange(e)))),this._register(Oh(this.viewHelper.linesContentDomNode,Op.Contextmenu,(e=>this._onContextMenu(new dA(e,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(Oh(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new uA(this.viewHelper.viewDomNode);this._register(n.onPointerMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),eb(this.mouseTargetFactory),tb.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e))))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new dA(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(e){"touch"===this._lastPointerType&&this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e)}}class mb extends tb{constructor(e,t,i){super(e,t,i),this._register(Pp.addTarget(this.viewHelper.linesContentDomNode)),this._register(Oh(this.viewHelper.linesContentDomNode,Op.Tap,(e=>this.onTap(e)))),this._register(Oh(this.viewHelper.linesContentDomNode,Op.Change,(e=>this.onChange(e)))),this._register(Oh(this.viewHelper.linesContentDomNode,Op.Contextmenu,(e=>this._onContextMenu(new dA(e,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new dA(e,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(sb.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position)}}onChange(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}}class fb extends Lt{constructor(e,t,i){super(),C&&gh?this.handler=this._register(new pb(e,t,i)):window.TouchEvent?this.handler=this._register(new mb(e,t,i)):this.handler=this._register(new tb(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .inputarea {\n\tmin-width: 0;\n\tmin-height: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tposition: absolute;\n\toutline: none !important;\n\tresize: none;\n\tborder: none;\n\toverflow: hidden;\n\tcolor: transparent;\n\tbackground-color: transparent;\n}\n/*.monaco-editor .inputarea {\n\tposition: fixed !important;\n\twidth: 800px !important;\n\theight: 500px !important;\n\ttop: initial !important;\n\tleft: initial !important;\n\tbottom: 0 !important;\n\tright: 0 !important;\n\tcolor: black !important;\n\tbackground: white !important;\n\tline-height: 15px !important;\n\tfont-size: 14px !important;\n}*/\n.monaco-editor .inputarea.ime-input {\n\tz-index: 10;\n}\n",{});Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .margin-view-overlays .line-numbers {\n\tfont-variant-numeric: tabular-nums;\n\tposition: absolute;\n\ttext-align: right;\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\tbox-sizing: border-box;\n\tcursor: default;\n\theight: 100%;\n}\n\n.monaco-editor .relative-current-line-number {\n\ttext-align: left;\n\tdisplay: inline-block;\n\twidth: 100%;\n}\n\n.monaco-editor .margin-view-overlays .line-numbers.lh-odd {\n\tmargin-top: 1px;\n}\n",{});class _b extends _A{}const Ab=Jp("editor.lineHighlightBackground",{dark:null,light:null,hc:null},e(0,"Background color for the highlight of line at the cursor position.")),bb=Jp("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},e(0,"Background color for the border around the line at the cursor position.")),wb=Jp("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},e(0,"Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),Cb=Jp("editor.rangeHighlightBorder",{dark:null,light:null,hc:nm},e(0,"Background color of the border around highlighted ranges."),!0),vb=Jp("editor.symbolHighlightBackground",{dark:ff,light:ff,hc:null},e(0,"Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),yb=Jp("editor.symbolHighlightBorder",{dark:null,light:null,hc:nm},e(0,"Background color of the border around highlighted symbols."),!0),xb=Jp("editorCursor.foreground",{dark:"#AEAFAD",light:jp.black,hc:jp.white},e(0,"Color of the editor cursor.")),Sb=Jp("editorCursor.background",null,e(0,"The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),Eb=Jp("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},e(0,"Color of whitespace characters in the editor.")),kb=Jp("editorIndentGuide.background",{dark:Eb,light:Eb,hc:Eb},e(0,"Color of the editor indentation guides.")),Db=Jp("editorIndentGuide.activeBackground",{dark:Eb,light:Eb,hc:Eb},e(0,"Color of the active editor indentation guides.")),Ib=Jp("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:jp.white},e(0,"Color of editor line numbers.")),Lb=Jp("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:nm},e(0,"Color of editor active line number"),!1,e(0,"Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),Nb=Jp("editorLineNumber.activeForeground",{dark:Lb,light:Lb,hc:Lb},e(0,"Color of editor active line number")),Tb=Jp("editorRuler.foreground",{dark:"#5A5A5A",light:jp.lightgrey,hc:jp.white},e(0,"Color of the editor rulers."));Jp("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},e(0,"Foreground color of editor CodeLens"));const Mb=Jp("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},e(0,"Background color behind matching brackets")),Rb=Jp("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:im},e(0,"Color for matching brackets boxes")),Bb=Jp("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},e(0,"Color of the overview ruler border.")),Ob=Jp("editorOverviewRuler.background",null,e(0,"Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),Fb=Jp("editorGutter.background",{dark:Ym,light:Ym,hc:Ym},e(0,"Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),Pb=Jp("editorUnnecessaryCode.border",{dark:null,light:null,hc:jp.fromHex("#fff").transparent(.8)},e(0,"Border color of unnecessary (unused) source code in the editor.")),zb=Jp("editorUnnecessaryCode.opacity",{dark:jp.fromHex("#000a"),light:jp.fromHex("#0007"),hc:null},e(0,"Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),Vb=Jp("editorGhostText.border",{dark:null,light:null,hc:jp.fromHex("#fff").transparent(.8)},e(0,"Border color of ghost text in the editor.")),Hb=Jp("editorGhostText.foreground",{dark:jp.fromHex("#ffffff56"),light:jp.fromHex("#0007"),hc:null},e(0,"Foreground color of the ghost text in the editor.")),Wb=Jp("editorGhostText.background",{dark:null,light:null,hc:null},e(0,"Background color of the ghost text in the editor.")),Ub=new jp(new Wp(0,122,204,.6)),Qb=Jp("editorOverviewRuler.rangeHighlightForeground",{dark:Ub,light:Ub,hc:Ub},e(0,"Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),jb=Jp("editorOverviewRuler.errorForeground",{dark:new jp(new Wp(255,18,18,.7)),light:new jp(new Wp(255,18,18,.7)),hc:new jp(new Wp(255,50,50,1))},e(0,"Overview ruler marker color for errors.")),Kb=Jp("editorOverviewRuler.warningForeground",{dark:Hm,light:Hm,hc:Wm},e(0,"Overview ruler marker color for warnings.")),Gb=Jp("editorOverviewRuler.infoForeground",{dark:Qm,light:Qm,hc:jm},e(0,"Overview ruler marker color for infos.")),Yb=Jp("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hc:"#FFD700"},e(0,"Foreground color of brackets (1). Requires enabling bracket pair colorization.")),$b=Jp("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hc:"#DA70D6"},e(0,"Foreground color of brackets (2). Requires enabling bracket pair colorization.")),qb=Jp("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hc:"#87CEFA"},e(0,"Foreground color of brackets (3). Requires enabling bracket pair colorization.")),Jb=Jp("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},e(0,"Foreground color of brackets (4). Requires enabling bracket pair colorization.")),Xb=Jp("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},e(0,"Foreground color of brackets (5). Requires enabling bracket pair colorization.")),Zb=Jp("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},e(0,"Foreground color of brackets (6). Requires enabling bracket pair colorization.")),ew=Jp("editorBracketHighlight.unexpectedBracket.foreground",{dark:new jp(new Wp(255,18,18,.8)),light:new jp(new Wp(255,18,18,.8)),hc:new jp(new Wp(255,50,50,1))},e(0,"Foreground color of unexpected brackets.")),tw=Jp("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},e(0,"Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),iw=Jp("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},e(0,"Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),nw=Jp("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},e(0,"Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),ow=Jp("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},e(0,"Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),sw=Jp("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},e(0,"Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),rw=Jp("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},e(0,"Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),aw=Jp("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},e(0,"Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),lw=Jp("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},e(0,"Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),cw=Jp("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},e(0,"Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),dw=Jp("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},e(0,"Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),hw=Jp("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},e(0,"Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),uw=Jp("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},e(0,"Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));Jp("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hc:"#ff0000"},e(0,"Border color used to highlight unicode characters.")),zg(((e,t)=>{const i=e.getColor(Ym);i&&t.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${i}; }`);const n=e.getColor($m);n&&t.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${n}; }`);const o=e.getColor(Fb);o&&t.addRule(`.monaco-editor .margin { background-color: ${o}; }`);const s=e.getColor(wb);s&&t.addRule(`.monaco-editor .rangeHighlight { background-color: ${s}; }`);const r=e.getColor(Cb);r&&t.addRule(`.monaco-editor .rangeHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${r}; }`);const a=e.getColor(vb);a&&t.addRule(`.monaco-editor .symbolHighlight { background-color: ${a}; }`);const l=e.getColor(yb);l&&t.addRule(`.monaco-editor .symbolHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${l}; }`);const c=e.getColor(Eb);c&&(t.addRule(`.monaco-editor .mtkw { color: ${c} !important; }`),t.addRule(`.monaco-editor .mtkz { color: ${c} !important; }`))}));class gw extends _b{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new Ki(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(59);const t=e.get(60);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(84);const i=e.get(131);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Ki(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?''+i+"":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=A?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o='
',s=this._context.model.getLineCount(),r=[];for(let e=i;e<=n;e++){const n=e-i;if(!this._renderFinalNewline&&e===s&&0===this._context.model.getLineLength(e)){r[n]="";continue}const a=this._getLineRenderLineNumber(e);a?e===this._activeLineNumber?r[n]='
'+a+"
":r[n]=o+a+"
":r[n]=""}this._renderResult=r}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}gw.CLASS_NAME="line-numbers",zg(((e,t)=>{const i=e.getColor(Ib);i&&t.addRule(`.monaco-editor .line-numbers { color: ${i}; }`);const n=e.getColor(Nb);n&&t.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${n}; }`)}));class pw extends AA{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(131);this._canUseLayerHinting=!t.get(28),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=sa(document.createElement("div")),this._domNode.setClassName(pw.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=sa(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(pw.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(131);return this._canUseLayerHinting=!t.get(28),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}pw.CLASS_NAME="glyph-margin",pw.OUTER_CLASS_NAME="margin";Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-mouse-cursor-text {\n\tcursor: text;\n}\n",{});const mw="monaco-mouse-cursor-text";class fw{constructor(e,t,i,n,o){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=o,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null}prepareRender(e){const t=new Ki(this.modelLineNumber,this.distanceToModelLineStart+1),i=new Ki(this.modelLineNumber,this._context.model.getModelLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}}const _w=Yr;class Aw extends AA{constructor(t,i,n){super(t),this._primaryCursorPosition=new Ki(1,1),this._primaryCursorVisibleRange=null,this._viewController=i,this._visibleRangeProvider=n,this._scrollLeft=0,this._scrollTop=0;const o=this._context.configuration.options,s=o.get(131);this._setAccessibilityOptions(o),this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,this._contentHeight=s.height,this._fontInfo=o.get(44),this._lineHeight=o.get(59),this._emptySelectionClipboard=o.get(32),this._copyWithSyntaxHighlighting=o.get(21),this._visibleTextArea=null,this._selections=[new Yi(1,1,1,1)],this._modelSelections=[new Yi(1,1,1,1)],this._lastRenderPosition=null,this.textArea=sa(document.createElement("textarea")),bA.write(this.textArea,6),this.textArea.setClassName(`inputarea ${mw}`),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(o)),this.textArea.setAttribute("tabindex",String(o.get(112))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",e(0,"editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),o.get(30)&&o.get(81)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=sa(document.createElement("div")),this.textAreaCover.setPosition("absolute");const r={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:e=>this._context.model.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.model.getValueInRange(e,t)},a={getDataToCopy:()=>{const e=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,f),t=this._context.model.getEOL(),i=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),n=Array.isArray(e)?e:null,o=Array.isArray(e)?e.join(t):e;let s,r=null;if(lb.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&o.length<65536){const e=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(s=e.html,r=e.mode)}return{isFromEmptySelection:i,multicursorText:n,text:o,html:s,mode:r}},getScreenReaderContent:e=>{if(1===this._accessibilitySupport){if(_){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new rb(i,i.length,i.length,t,t)}}return rb.EMPTY}if(ta){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition(),[i,n]=this._getAndroidWordAtPosition(t);if(i.length>0)return new rb(i,n,n,t,t)}return rb.EMPTY}return ab.fromEditorSelection(e,r,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.model.deduceModelPositionRelativeToViewPosition(e,t,i)},l=this._register(new gb(this.textArea.domNode));this._textAreaInput=this._register(new hb(a,l,S,na)),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta):this._viewController.type(e.text)}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this.textArea.domNode,i=this._modelSelections[0],{distanceToModelLineStart:n,widthOfHiddenTextBefore:o}=(()=>{const e=t.value.substring(0,Math.min(t.selectionStart,t.selectionEnd)),n=e.lastIndexOf("\n"),o=e.substring(n+1),s=o.lastIndexOf("\t"),r=o.length-s-1,a=i.getStartPosition(),l=Math.min(a.column-1,r),c=a.column-1-l,d=function(e,t){if(0===e.length)return 0;const i=document.createElement("div");i.style.position="absolute",i.style.top="-50000px",i.style.width="50000px";const n=document.createElement("span");ra(n,t),n.style.whiteSpace="pre",n.append(e),i.appendChild(n),document.body.appendChild(i);const o=n.offsetWidth;return document.body.removeChild(i),o}(o.substring(0,o.length-l),this._fontInfo);return{distanceToModelLineStart:c,widthOfHiddenTextBefore:d}})(),{distanceToModelLineEnd:s}=(()=>{const e=t.value.substring(Math.max(t.selectionStart,t.selectionEnd)),n=e.indexOf("\n"),o=-1===n?e:e.substring(0,n),s=o.indexOf("\t"),r=-1===s?o.length:o.length-s-1,a=i.getEndPosition(),l=Math.min(this._context.model.getModelLineMaxColumn(a.lineNumber)-a.column,r);return{distanceToModelLineEnd:this._context.model.getModelLineMaxColumn(a.lineNumber)-a.column-l}})();this._context.model.revealRange("keyboard",!0,Gi.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new fw(this._context,i.startLineNumber,n,o,s),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${mw} ime-input`),this._viewController.compositionStart(),this._context.model.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())}))),this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${mw}`),this._viewController.compositionEnd(),this._context.model.onCompositionEnd()}))),this._register(this._textAreaInput.onFocus((()=>{this._context.model.setHasFocus(!0)}))),this._register(this._textAreaInput.onBlur((()=>{this._context.model.setHasFocus(!1)})))}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.model.getLineContent(e.lineNumber),i=zc('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?');let n=!0,o=e.column,s=!0,r=e.column,a=0;for(;a<50&&(n||s);){if(n&&o<=1&&(n=!1),n){const e=t.charCodeAt(o-2);0!==i.get(e)?n=!1:o--}if(s&&r>t.length&&(s=!1),s){const e=t.charCodeAt(r-1);0!==i.get(e)?s=!1:r++}a++}return[t.substring(o-1,r-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.model.getLineContent(e.lineNumber),i=zc(this._context.configuration.options.get(117));let n=e.column,o=0;for(;n>1;){const s=t.charCodeAt(n-2);if(0!==i.get(s)||o>50)return t.substring(n-1,e.column-1);o++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!Jn(t.charCodeAt(0)))return t}return""}_getAriaLabel(t){return 1===t.get(2)?e(0,"The editor is not accessible at this time. Press {0} for options.",A?"Shift+Alt+F1":"Alt+F1"):t.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===ht.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(131);return this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(44),this._lineHeight=t.get(59),this._emptySelectionClipboard=t.get(32),this._copyWithSyntaxHighlighting=t.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(112))),(e.hasChanged(30)||e.hasChanged(81))&&(t.get(30)&&t.get(81)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}prepareRender(e){this._primaryCursorPosition=new Ki(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea&&this._visibleTextArea.prepareRender(e)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){const e=this._visibleTextArea.visibleTextareaStart,t=this._visibleTextArea.visibleTextareaEnd,i=this._visibleTextArea.startPosition,n=this._visibleTextArea.endPosition;if(i&&n&&e&&t&&t.left>=this._scrollLeft&&e.left<=this._scrollLeft+this._contentWidth){const o=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,s=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=s*this._lineHeight;let r=this._visibleTextArea.widthOfHiddenLineTextBefore,a=this._contentLeft+e.left-this._scrollLeft,l=t.left-e.left;if(athis._contentWidth&&(l=this._contentWidth),this.textArea.domNode.scrollLeft=r,this._renderInsideEditor(null,o,a,l,this._lineHeight);const c=this._context.model.getViewLineData(i.lineNumber),d=c.tokens.findTokenIndexAtOffset(i.column-1);let h;h=d===c.tokens.findTokenIndexAtOffset(n.column-1)?c.tokens.getPresentation(d):{foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1};const u=(er.getColorMap()||[])[h.foreground];this.textArea.domNode.style.color=u?jp.Format.CSS.formatHex(u):"inherit",this.textArea.domNode.style.fontStyle=h.italic?"italic":"inherit",h.bold&&(this.textArea.domNode.style.fontWeight="bold"),this.textArea.domNode.style.textDecoration=`${h.underline?" underline":""}${h.strikethrough?" line-through":""}`}return}if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight)this._renderAtTopLeft();else if(_){this._renderInsideEditor(this._primaryCursorPosition,t,e,_w?0:1,this._lineHeight),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const i=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=i*this._lineHeight}else this._renderInsideEditor(this._primaryCursorPosition,t,e,_w?0:1,_w?0:1)}_newlinecount(e){let t=0,i=-1;for(;;){if(i=e.indexOf("\n",i+1),-1===i)break;t++}return t}_renderInsideEditor(e,t,i,n,o){this._lastRenderPosition=e;const s=this.textArea,r=this.textAreaCover;ra(s,this._fontInfo),s.setTop(t),s.setLeft(i),s.setWidth(n),s.setHeight(o),r.setTop(0),r.setLeft(0),r.setWidth(0),r.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const e=this.textArea,t=this.textAreaCover;if(ra(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),_w)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);const i=this._context.configuration.options;i.get(50)?t.setClassName("monaco-editor-background textAreaCover "+pw.OUTER_CLASS_NAME):0!==i.get(60).renderType?t.setClassName("monaco-editor-background textAreaCover "+gw.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")}}class bw{constructor(e,t,i){this.range=e,this.nestingLevel=t,this.isInvalid=i}}class ww{constructor(e,t,i,n){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n}}class Cw extends ww{constructor(e,t,i,n,o){super(e,t,i,n),this.minVisibleColumnIndentation=o}}class vw{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}vw.zero=new vw(0,0);const yw=0;const xw=Math.pow(2,26);function Sw(e,t){return e*xw+t}function Ew(e){const t=e,i=Math.floor(t/xw);return new vw(i,t-i*xw)}function kw(e,t){return t=t}function Nw(e){return Sw(e.lineNumber-1,e.column-1)}function Tw(e,t){const i=e,n=Math.floor(i/xw),o=i-n*xw,s=t,r=Math.floor(s/xw);return new Gi(n+1,o+1,r+1,s-r*xw+1)}class Mw{constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}}class Rw{constructor(e,t){this.documentLength=t,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>Bw.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx];return function(e,t){const i=e,n=t;if(n-i<=0)return yw;const o=Math.floor(i/xw),s=Math.floor(n/xw),r=n-s*xw;if(o===s)return Sw(0,r-(i-o*xw));return Sw(s-o,r)}(e,t?this.translateOldToCur(t.offsetObj):this.documentLength)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?Sw(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):Sw(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=Ew(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?Sw(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):Sw(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx>5;if(0===n){const e=1<e};class zw{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return void 0===t&&(t=this.items.size,this.items.set(e,t)),t}}class Vw{constructor(e){this._length=e}get length(){return this._length}}class Hw extends Vw{constructor(e,t,i,n,o){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=o}static create(e,t,i){let n=e.length;return t&&(n=kw(n,t.length)),i&&(n=kw(n,i.length)),new Hw(n,e,t,i,t?t.missingOpeningBracketIds:Fw.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=new Array;return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new Hw(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation(kw(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class Ww extends Vw{constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}static create23(e,t,i,n=!1){let o=e.length,s=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(o=kw(o,t.length),s=s.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");o=kw(o,i.length),s=s.merge(i.missingOpeningBracketIds)}return n?new Qw(o,e.listHeight+1,e,t,i,s):new Uw(o,e.listHeight+1,e,t,i,s)}static getEmpty(){return new Kw(yw,0,[],Fw.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){this.throwIfImmutable();if(0===this.childrenLength)return;const e=this.getChild(0),t=4===e.kind?e.toMutable():e;return e!==t&&this.setChild(0,t),t}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds))return!1;let t,i=this;for(;4===i.kind&&(t=i.childrenLength)>0;)i=i.getChild(t-1);return i.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;nthis.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const n=this.lineTokens,o=n.getCount();let s=null;if(this.lineTokenOffset1e3)break}if(i>1500)break}const n=(o=e,s=t,r=this.lineIdx,a=this.lineCharOffset,o!==r?Sw(r-o,a):Sw(0,a-s));var o,s,r,a;return new Xw(n,0,-1,Fw.getEmpty(),new $w(n))}}class tC{constructor(e,t){this.text=e,this._offset=yw,this.idx=0;const i=t.getRegExpStr()?new RegExp(t.getRegExpStr()+"|\n","g"):null,n=[];let o,s=0,r=0,a=0,l=0;const c=new Array;for(let e=0;e<60;e++)c.push(new Xw(Sw(0,e),0,-1,Fw.getEmpty(),new $w(Sw(0,e))));const d=new Array;for(let e=0;e<60;e++)d.push(new Xw(Sw(1,e),0,-1,Fw.getEmpty(),new $w(Sw(1,e))));if(i)for(i.lastIndex=0;null!==(o=i.exec(e));){const e=o.index,i=o[0];if("\n"===i)s++,r=e+1;else{if(a!==e){let t;if(l===s){const i=e-a;if(ifunction(e){const t=Nn(e);return/^[\w ]+$/.test(e)?`\\b${t}\\b`:t}(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"g"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e)}findClosingTokenText(e){for(const[t,i]of this.map)if(i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class nC{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){const t=this.languageIdToBracketTokens.get(e);if(!t)return!1;const i=iC.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider).getRegExpStr();return t.getRegExpStr()!==i}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=iC.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function oC(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){const n=i>>1;for(let o=0;o=3?e[2]:null,t)}function sC(e,t){return Math.abs(e.listHeight-t.listHeight)}function rC(e,t){return e.listHeight===t.listHeight?Ww.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i=e=e.toMutable();const n=new Array;let o;for(;;){if(t.listHeight===i.listHeight){o=t;break}if(4!==i.kind)throw new Error("unexpected");n.push(i),i=i.makeLastElementMutable()}for(let e=n.length-1;e>=0;e--){const t=n[e];o?t.childrenLength>=3?o=Ww.create23(t.unappendChild(),o,null,!1):(t.appendChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?Ww.create23(e,o,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable();const n=new Array;for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw new Error("unexpected");n.push(i),i=i.makeFirstElementMutable()}let o=t;for(let e=n.length-1;e>=0;e--){const t=n[e];o?t.childrenLength>=3?o=Ww.create23(o,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?Ww.create23(o,e,null,!1):e}(t,e)}class aC{constructor(e){this.lastOffset=yw,this.nextNodes=[e],this.offsets=[yw],this.idxs=[]}readLongestNodeAt(e,t){if(Dw(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=cC(this.nextNodes);if(!i)return;const n=cC(this.offsets);if(Dw(e,n))return;if(Dw(n,e))if(kw(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=lC(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const e=lC(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){const e=cC(this.offsets),t=cC(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=cC(this.nextNodes),n=lC(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push(kw(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function lC(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function cC(e){return e.length>0?e[e.length-1]:void 0}function dC(e,t,i,n){return new hC(e,t,i,n).parseDocument()}class hC{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new aC(i):void 0,this.positionMapper=new Rw(t,e.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Fw.getEmpty());return e||(e=Ww.getEmpty()),e}parseList(e){const t=new Array;for(;;){const i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;const n=this.parseChild(e);4===n.kind&&0===n.childrenLength||t.push(n)}const i=this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;const i=t,n=e[i].listHeight;for(t++;t=2?oC(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),o=i();if(!o)return n;for(let e=i();e;e=i())sC(n,o)<=sC(o,e)?(n=rC(n,o),o=e):o=rC(o,e);return rC(n,o)}(t):oC(t,this.createImmutableLists);return i}parseChild(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(0!==t){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(i=>{if(!Dw(i.length,t))return!1;return i.canBeReused(e)}));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}this._itemsConstructed++;const t=this.tokenizer.read();switch(t.kind){case 2:return new Jw(t.bracketIds,t.length);case 0:return t.astNode;case 1:{const i=e.merge(t.bracketIds),n=this.parseList(i),o=this.tokenizer.peek();return o&&2===o.kind&&(o.bracketId===t.bracketId||o.bracketIds.intersects(t.bracketIds))?(this.tokenizer.read(),Hw.create(t.astNode,n,o.astNode)):Hw.create(t.astNode,n,null)}default:throw new Error("unexpected")}}}class uC extends Lt{constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new zt,this.denseKeyProvider=new zw,this.brackets=new nC(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this._register(e.onBackgroundTokenizationStateChanged((()=>{if(2===e.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}))),this._register(e.onDidChangeTokens((({ranges:e})=>{const t=e.map((e=>new Mw(Sw(e.fromLineNumber-1,0),Sw(e.toLineNumber,0),Sw(e.toLineNumber-e.fromLineNumber+1,0))));this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}))),0===e.backgroundTokenizationState){const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new tC(this.textModel.getValue(),e);this.initialAstWithoutTokens=dC(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else 2===e.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):1===e.backgroundTokenizationState&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(e){return this.brackets.didLanguageChange(e)}handleContentChanged(e){const t=e.changes.map((e=>{const t=Gi.lift(e.range);return new Mw(Nw(t.getStartPosition()),Nw(t.getEndPosition()),function(e){const t=Fn(e);return Sw(t.length-1,t[t.length-1].length)}(e.text))})).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(t,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(e,t,i){const n=t;return dC(new Zw(this.textModel,this.brackets),e,n,i)}getBracketsInRange(e){const t=Sw(e.startLineNumber-1,e.startColumn-1),i=Sw(e.endLineNumber-1,e.endColumn-1),n=new Array,o=this.initialAstWithoutTokens||this.astWithTokens;return gC(o,yw,o.length,t,i,n),n}getBracketPairsInRange(e,t){const i=new Array,n=Nw(e.getStartPosition()),o=Nw(e.getEndPosition()),s=this.initialAstWithoutTokens||this.astWithTokens,r=new pC(i,t,this.textModel);return mC(s,yw,s.length,n,o,r),i}}function gC(e,t,i,n,o,s,r=0){if(1===e.kind){const e=Tw(t,i);s.push(new bw(e,r-1,!1))}else if(3===e.kind){const e=Tw(t,i);s.push(new bw(e,r-1,!0))}else if(4===e.kind)for(const a of e.children)i=kw(t,a.length),Iw(t,o)&&Lw(i,n)&&gC(a,t,i,n,o,s,r),t=i;else if(2===e.kind){r++;{const a=e.openingBracket;i=kw(t,a.length),Iw(t,o)&&Lw(i,n)&&gC(a,t,i,n,o,s,r),t=i}if(e.child){const a=e.child;i=kw(t,a.length),Iw(t,o)&&Lw(i,n)&&gC(a,t,i,n,o,s,r),t=i}if(e.closingBracket){const a=e.closingBracket;i=kw(t,a.length),Iw(t,o)&&Lw(i,n)&&gC(a,t,i,n,o,s,r),t=i}}}class pC{constructor(e,t,i){this.result=e,this.includeMinIndentation=t,this.textModel=i}}function mC(e,t,i,n,o,s,r=0){var a;if(2===e.kind){const n=kw(t,e.openingBracket.length);let o=-1;s.includeMinIndentation&&(o=e.computeMinIndentation(t,s.textModel)),s.result.push(new Cw(Tw(t,i),Tw(t,n),e.closingBracket?Tw(kw(n,(null===(a=e.child)||void 0===a?void 0:a.length)||yw),i):void 0,r,o)),r++}let l=t;for(const t of e.children){const e=l;l=kw(l,t.length),Iw(e,o)&&Iw(n,l)&&mC(t,e,l,n,o,s,r)}}class fC extends Lt{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new Nt),this.onDidChangeEmitter=new zt,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(e.onDidChangeOptions((e=>{this.bracketPairsTree.clear(),this.updateBracketPairsTree()}))),this._register(e.onDidChangeLanguage((e=>{this.bracketPairsTree.clear(),this.updateBracketPairsTree()}))),this._register(this.languageConfigurationService.onDidChange((e=>{var t;e.languageId&&!(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.didLanguageChange(e.languageId))||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())})))}get isDocumentSupported(){return this.textModel.getValueLength()<=5e6}updateBracketPairsTree(){if(this.bracketsRequested&&this.isDocumentSupported){if(!this.bracketPairsTree.value){const i=new It;this.bracketPairsTree.value=(e=i.add(new uC(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),t=i,{object:e,dispose:()=>null==t?void 0:t.dispose()}),i.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire());var e,t}handleContentChanged(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleContentChanged(e)}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!1))||[]}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!0))||[]}getBracketsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketsInRange(e))||[]}findMatchingBracketUp(e,t){const i=e.toLowerCase(),n=this.textModel.validatePosition(t),o=this.textModel.getLanguageIdAtPosition(n.lineNumber,n.column),s=this.languageConfigurationService.getLanguageConfiguration(o).brackets;if(!s)return null;const r=s.textIsBracket[i];return r?AC(this._findMatchingBracketUp(r,n,null)):null}matchBracket(e){return this._matchBracket(this.textModel.validatePosition(e))}_establishBracketSearchOffsets(e,t,i,n){const o=t.getCount(),s=t.getLanguageId(n);let r=Math.max(0,e.column-1-i.maxBracketLength);for(let e=n-1;e>=0;e--){const i=t.getEndOffset(e);if(i<=r)break;if(Ia(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){r=i;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let e=n+1;e=a)break;if(Ia(t.getStandardTokenType(e))||t.getLanguageId(e)!==s){a=i;break}}return{searchStartOffset:r,searchEndOffset:a}}_matchBracket(e){const t=e.lineNumber,i=this.textModel.getLineTokens(t),n=this.textModel.getLineContent(t),o=i.findTokenIndexAtOffset(e.column-1);if(o<0)return null;const s=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(o)).brackets;if(s&&!Ia(i.getStandardTokenType(o))){let{searchStartOffset:r,searchEndOffset:a}=this._establishBracketSearchOffsets(e,i,s,o),l=null;for(;;){const i=rl.findNextBracketInRange(s.forwardRegex,t,n,r,a);if(!i)break;if(i.startColumn<=e.column&&e.column<=i.endColumn){const e=n.substring(i.startColumn-1,i.endColumn-1).toLowerCase(),t=this._matchFoundBracket(i,s.textIsBracket[e],s.textIsOpenBracket[e],null);if(t){if(t instanceof _C)return null;l=t}}r=i.endColumn-1}if(l)return l}if(o>0&&i.getStartOffset(o)===e.column-1){const s=o-1,r=this.languageConfigurationService.getLanguageConfiguration(i.getLanguageId(s)).brackets;if(r&&!Ia(i.getStandardTokenType(s))){const{searchStartOffset:o,searchEndOffset:a}=this._establishBracketSearchOffsets(e,i,r,s),l=rl.findPrevBracketInRange(r.reversedRegex,t,n,o,a);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn){const e=n.substring(l.startColumn-1,l.endColumn-1).toLowerCase(),t=this._matchFoundBracket(l,r.textIsBracket[e],r.textIsOpenBracket[e],null);if(t)return t instanceof _C?null:t}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const o=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return o?o instanceof _C?o:[e,o]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,o=e.reversedRegex;let s=-1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return _C.INSTANCE;const c=rl.findPrevBracketInRange(o,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?s++:e.isClose(d)&&s--,0===s)return c;l=c.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const i=this.textModel.getLineTokens(e),o=i.getCount(),s=this.textModel.getLineContent(e);let r=o-1,l=s.length,c=s.length;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;r>=0;r--){const t=i.getLanguageId(r)===n&&!Ia(i.getStandardTokenType(r));if(t)d?l=i.getStartOffset(r):(l=i.getStartOffset(r),c=i.getEndOffset(r));else if(d&&l!==c){const t=a(e,s,l,c);if(t)return t}d=t}if(d&&l!==c){const t=a(e,s,l,c);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,o=e.forwardRegex;let s=1,r=0;const a=(t,n,a,l)=>{for(;;){if(i&&++r%100==0&&!i())return _C.INSTANCE;const c=rl.findNextBracketInRange(o,t,n,a,l);if(!c)break;const d=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(d)?s++:e.isClose(d)&&s--,0===s)return c;a=c.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){const i=this.textModel.getLineTokens(e),o=i.getCount(),s=this.textModel.getLineContent(e);let r=0,l=0,c=0;e===t.lineNumber&&(r=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let d=!0;for(;r=1;e--){const o=this.textModel.getLineTokens(e),s=o.getCount(),r=this.textModel.getLineContent(e);let a=s-1,l=r.length,c=r.length;if(e===t.lineNumber){a=o.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=o.getLanguageId(a);i!==e&&(i=e,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets)}let d=!0;for(;a>=0;a--){const t=o.getLanguageId(a);if(i!==t){if(n&&d&&l!==c){const t=rl.findPrevBracketInRange(n.reversedRegex,e,r,l,c);if(t)return this._toFoundBracket(n,t);d=!1}i=t,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets}const s=!!n&&!Ia(o.getStandardTokenType(a));if(s)d?l=o.getStartOffset(a):(l=o.getStartOffset(a),c=o.getEndOffset(a));else if(n&&d&&l!==c){const t=rl.findPrevBracketInRange(n.reversedRegex,e,r,l,c);if(t)return this._toFoundBracket(n,t)}d=s}if(n&&d&&l!==c){const t=rl.findPrevBracketInRange(n.reversedRegex,e,r,l,c);if(t)return this._toFoundBracket(n,t)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e),i=this.textModel.getLineCount();let n=null,o=null;for(let e=t.lineNumber;e<=i;e++){const i=this.textModel.getLineTokens(e),s=i.getCount(),r=this.textModel.getLineContent(e);let a=0,l=0,c=0;if(e===t.lineNumber){a=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=i.getLanguageId(a);n!==e&&(n=e,o=this.languageConfigurationService.getLanguageConfiguration(n).brackets)}let d=!0;for(;aDate.now()-e<=t}const n=this.textModel.validatePosition(e),o=this.textModel.getLineCount(),s=new Map;let r=[];const a=(e,t)=>{if(!s.has(e)){const i=[];for(let e=0,n=t?t.brackets.length:0;e{for(;;){if(i&&++l%100==0&&!i())return _C.INSTANCE;const a=rl.findNextBracketInRange(e.forwardRegex,t,n,o,s);if(!a)break;const c=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),d=e.textIsBracket[c];if(d&&(d.isOpen(c)?r[d.index]++:d.isClose(c)&&r[d.index]--,-1===r[d.index]))return this._matchFoundBracket(a,d,!1,i);o=a.endColumn-1}return null};let d=null,h=null;for(let e=n.lineNumber;e<=o;e++){const t=this.textModel.getLineTokens(e),i=t.getCount(),o=this.textModel.getLineContent(e);let s=0,r=0,l=0;if(e===n.lineNumber){s=t.findTokenIndexAtOffset(n.column-1),r=n.column-1,l=n.column-1;const e=t.getLanguageId(s);d!==e&&(d=e,h=this.languageConfigurationService.getLanguageConfiguration(d).brackets,a(d,h))}let u=!0;for(;s{this.colorizationOptions=e.getOptions().bracketPairColorizationOptions}))),this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}getDecorationsInRange(e,t,i){if(void 0===t)return[];if(!this.colorizationOptions.enabled)return[];const n=new Array,o=this.textModel.bracketPairs.getBracketsInRange(e);for(const e of o)n.push({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e)},ownerId:0,range:e.range});return n}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new Gi(1,1,this.textModel.getLineCount(),1),e,t):[]}}class wC{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}function CC(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}zg(((e,t)=>{const i=[Yb,$b,qb,Jb,Xb,Zb],n=new wC;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(ew)}; }`);const o=i.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let e=0;e<30;e++){const i=o[e%o.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e)} { color: ${i}; }`)}}));class vC{constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${CC(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${CC(this.oldText)}")`:`(replace@${this.oldPosition} "${CC(this.oldText)}" with "${CC(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const n=t.length;Ha(e,n,i),i+=4;for(let o=0;oSo(i).length&&i[i.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=ki){return OC(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=ki){let i=!1;if(e.scheme===Ih.file){const n=xC(e);i=void 0!==n&&n.length===So(n).length&&n[n.length-1]===t}else{t="/";const n=e.path;i=1===n.length&&47===n.charCodeAt(n.length-1)}return i||OC(e,t)?e:e.with({path:e.path+"/"})}}const EC=new SC((()=>!1));new SC((e=>e.scheme!==Ih.file||!A)),new SC((e=>!0));const kC=EC.isEqual.bind(EC);EC.isEqualOrParent.bind(EC),EC.getComparisonKey.bind(EC);const DC=EC.basenameOrAuthority.bind(EC),IC=EC.basename.bind(EC),LC=EC.extname.bind(EC),NC=EC.dirname.bind(EC),TC=EC.joinPath.bind(EC),MC=EC.normalizePath.bind(EC);EC.relativePath.bind(EC);const RC=EC.resolvePath.bind(EC);EC.isAbsolutePath.bind(EC);const BC=EC.isEqualAuthority.bind(EC),OC=EC.hasTrailingPathSeparator.bind(EC);var FC,PC;function zC(e){return e.toString()}EC.removeTrailingPathSeparator.bind(EC),EC.addTrailingPathSeparator.bind(EC),function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(FC||(FC={}));class VC{constructor(e,t,i,n,o,s,r){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=o,this.afterCursorState=s,this.changes=r}static create(e,t){const i=e.getAlternativeVersionId(),n=UC(e);return new VC(i,i,n,n,t,t,[])}append(e,t,i,n,o){var s,r;t.length>0&&(this.changes=(s=this.changes,r=t,null===s||0===s.length?r:new yC(s,r).compress())),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(Ha(e,t?t.length:0,i),i+=4,t)for(const n of t)Ha(e,n.selectionStartLineNumber,i),i+=4,Ha(e,n.selectionStartColumn,i),i+=4,Ha(e,n.positionLineNumber,i),i+=4,Ha(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=Va(e,t);t+=4;for(let o=0;oe.toString())).join(", ")}matchesResource(e){return(Bi.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof VC}append(e,t,i,n,o){this._data instanceof VC&&this._data.append(e,t,i,n,o)}close(){this._data instanceof VC&&(this._data=this._data.serialize())}open(){this._data instanceof VC||(this._data=VC.deserialize(this._data))}undo(){if(Bi.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof VC&&(this._data=this._data.serialize());const e=VC.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(Bi.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof VC&&(this._data=this._data.serialize());const e=VC.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof VC&&(this._data=this._data.serialize()),this._data.byteLength+168}}class WC{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=zC(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}get resources(){return this._editStackElementsArr.map((e=>e.resource))}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=zC(e);return this._editStackElementsMap.has(t)}setModel(e){const t=zC(Bi.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=zC(e.uri);if(this._editStackElementsMap.has(t)){return this._editStackElementsMap.get(t).canAppend(e)}return!1}append(e,t,i,n,o){const s=zC(e.uri);this._editStackElementsMap.get(s).append(e,t,i,n,o)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=zC(e);if(this._editStackElementsMap.has(t)){return this._editStackElementsMap.get(t).heapSize()}return 0}split(){return this._editStackElementsArr}toString(){let e=[];for(const t of this._editStackElementsArr)e.push(`${IC(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function UC(e){return"\n"===e.getEOL()?0:1}function QC(e){return!!e&&(e instanceof HC||e instanceof WC)}class jC{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);QC(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);QC(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(QC(t)&&t.canAppend(this._model))return t;const i=new HC(this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],UC(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),o=this._model.applyEdits(t,!0),s=jC._computeCursorState(i,o),r=o.map(((e,t)=>({index:t,textChange:e.textChange})));return r.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),n.append(this._model,r.map((e=>e.textChange)),UC(this._model),this._model.getAlternativeVersionId(),s),s}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return gt(e),null}}}class KC{constructor(){this._isDisposed=!1}dispose(){this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}function GC(e,t){let i=0,n=0;const o=e.length;for(;nn)throw new Error("Illegal value for lineNumber");const o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide);let r=-2,a=-1,l=-2,c=-1;const d=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,c=-1;for(let t=e;t=0){l=t,c=e;break}}}};let h=-2,u=-1,g=-2,p=-1;const m=e=>{if(-2===h){h=-1,u=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){h=t,u=e;break}}}if(-1!==g&&(-2===g||g=0){g=t,p=e;break}}}};let f=0,_=!0,A=0,b=!0,w=0,C=0;for(let o=0;_||b;o++){const r=e-o,g=e+o;o>1&&(r<1||r1&&(g>n||g>i)&&(b=!1),o>5e4&&(_=!1,b=!1);let v=-1;if(_&&r>=1){const e=this._computeIndentLevel(r-1);e>=0?(l=r-1,c=e,v=Math.ceil(e/this.textModel.getOptions().indentSize)):(d(r),v=this._getIndentLevelForWhitespaceLine(s,a,c))}let y=-1;if(b&&g<=n){const e=this._computeIndentLevel(g-1);e>=0?(h=g-1,u=e,y=Math.ceil(e/this.textModel.getOptions().indentSize)):(m(g),y=this._getIndentLevelForWhitespaceLine(s,u,p))}if(0!==o){if(1===o){if(g<=n&&y>=0&&C+1===y){_=!1,f=g,A=g,w=y;continue}if(r>=1&&v>=0&&v-1===C){b=!1,f=r,A=r,w=v;continue}if(f=e,A=e,w=C,0===w)return{startLineNumber:f,endLineNumber:A,indent:w}}_&&(v>=w?f=r:_=!1),b&&(y>=w?A=g:b=!1)}else C=v}return{startLineNumber:f,endLineNumber:A,indent:w}}getLinesBracketGuides(e,t,i,n){var o,s,r,a,l;const c=[],d=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new Gi(e,1,t,this.textModel.getLineMaxColumn(t)));let h;if(i&&d.length>0){h=null===(o=function(e,t){const i=function(e,t){for(let i=e.length-1;i>=0;i--)if(t(e[i]))return i;return-1}(e,t);if(-1!==i)return e[i]}(e<=i.lineNumber&&i.lineNumber<=t?d.filter((e=>Gi.strictContainsPosition(e.range,i))):this.textModel.bracketPairs.getBracketPairsInRange(Gi.fromPositions(i)),(e=>e.range.startLineNumber!==e.range.endLineNumber)))||void 0===o?void 0:o.range}const u=new ae(d),g=new Array,p=new Array,m=new JC;for(let i=e;i<=t;i++){let e=new Array;p.length>0&&(e=e.concat(p),p.length=0),c.push(e);for(const e of u.takeWhile((e=>e.openingBracketRange.startLineNumber<=i))||[]){if(e.range.startLineNumber===e.range.endLineNumber)continue;const t=Math.min(this.getVisibleColumnFromPosition(e.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition(null!==(r=null===(s=e.closingBracketRange)||void 0===s?void 0:s.getStartPosition())&&void 0!==r?r:e.range.getEndPosition()),e.minVisibleColumnIndentation+1);let i=!1;if(e.closingBracketRange){Pn(this.textModel.getLineContent(e.closingBracketRange.startLineNumber))=0;o--){const s=g[o];if(!s)continue;const r=n.highlightActive&&h&&s.bracketPair.range.equalsRange(h),a=m.getInlineClassNameOfLevel(s.nestingLevel)+(r?" "+m.activeClassName:"");(r||n.includeInactive)&&s.renderHorizontalEndLineAtTheBottom&&s.end.lineNumber===i+1&&p.push(new YC(s.guideVisibleColumn,a,null)),s.end.lineNumber<=i||s.start.lineNumber>=i||(s.guideVisibleColumn>=t&&!r||(t=s.guideVisibleColumn,(r||n.includeInactive)&&e.push(new YC(s.guideVisibleColumn,a,null))))}e.sort(((e,t)=>e.visibleColumn-t.visibleColumn))}return c}getVisibleColumnFromPosition(e){return zA.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),o=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,s=Boolean(o&&o.offSide),r=new Array(t-e+1);let a=-2,l=-1,c=-2,d=-1;for(let o=e;o<=t;o++){const t=o-e,h=this._computeIndentLevel(o-1);if(h>=0)a=o-1,l=h,r[t]=Math.ceil(h/n.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=o-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==c&&(-2===c||c=0){c=e,d=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(s,l,d)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return-1===t||-1===i?0:t0&&a>0)return;if(l>0&&c>0)return;const d=Math.abs(a-c),h=Math.abs(r-l);if(0===d)return o.spacesDiff=h,void(h>0&&0<=l-1&&l-10?o++:m>1&&s++,ZC(r,a,h,p,d),d.looksLikeAlignment&&(!i||t!==d.spacesDiff))continue;const _=d.spacesDiff;_<=8&&c[_]++,r=h,a=p}let h=i;o!==s&&(h=o{const i=c[t];i>e&&(e=i,u=t)})),4===u&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(u=2)}return{insertSpaces:h,tabSize:u}}function tv(e){return(1&e.metadata)>>>0}function iv(e,t){e.metadata=254&e.metadata|t}function nv(e){return(2&e.metadata)>>>1==1}function ov(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function sv(e){return(4&e.metadata)>>>2==1}function rv(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function av(e,t){e.metadata=231&e.metadata|t<<3}function lv(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class cv{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,iv(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,rv(this,!1),av(this,1),lv(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,ov(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;rv(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),av(this,this.options.stickiness),lv(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const dv=new cv(null,0,0);dv.parent=dv,dv.left=dv,dv.right=dv,iv(dv,0);class hv{constructor(){this.root=dv,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o){return this.root===dv?[]:function(e,t,i,n,o,s){let r=e.root,a=0,l=0,c=0,d=0;const h=[];let u=0;for(;r!==dv;)if(nv(r))ov(r.left,!1),ov(r.right,!1),r===r.parent.right&&(a-=r.parent.delta),r=r.parent;else{if(!nv(r.left)){if(l=a+r.maxEnd,li)ov(r,!0);else{if(d=a+r.end,d>=t){r.setCachedOffsets(c,d,s);let e=!0;n&&r.ownerId&&r.ownerId!==n&&(e=!1),o&&sv(r)&&(e=!1),e&&(h[u++]=r)}ov(r,!0),r.right===dv||nv(r.right)||(a+=r.delta,r=r.right)}}return ov(e.root,!1),h}(this,e,t,i,n,o)}search(e,t,i){return this.root===dv?[]:function(e,t,i,n){let o=e.root,s=0,r=0,a=0;const l=[];let c=0;for(;o!==dv;){if(nv(o)){ov(o.left,!1),ov(o.right,!1),o===o.parent.right&&(s-=o.parent.delta),o=o.parent;continue}if(o.left!==dv&&!nv(o.left)){o=o.left;continue}r=s+o.start,a=s+o.end,o.setCachedOffsets(r,a,n);let e=!0;t&&o.ownerId&&o.ownerId!==t&&(e=!1),i&&sv(o)&&(e=!1),e&&(l[c++]=o),ov(o,!0),o.right===dv||nv(o.right)||(s+=o.delta,o=o.right)}return ov(e.root,!1),l}(this,e,t,i)}collectNodesFromOwner(e){return function(e,t){let i=e.root;const n=[];let o=0;for(;i!==dv;)nv(i)?(ov(i.left,!1),ov(i.right,!1),i=i.parent):i.left===dv||nv(i.left)?(i.ownerId===t&&(n[o++]=i),ov(i,!0),i.right===dv||nv(i.right)||(i=i.right)):i=i.left;return ov(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root;const i=[];let n=0;for(;t!==dv;)nv(t)?(ov(t.left,!1),ov(t.right,!1),t=t.parent):t.left===dv||nv(t.left)?t.right===dv||nv(t.right)?(i[n++]=t,ov(t,!0)):t=t.right:t=t.left;return ov(e.root,!1),i}(this)}insert(e){pv(this,e),this._normalizeDeltaIfNecessary()}delete(e){mv(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const o=i.start+n,s=i.end+n;i.setCachedOffsets(o,s,t)}acceptReplace(e,t,i,n){const o=function(e,t,i){let n=e.root,o=0,s=0,r=0,a=0;const l=[];let c=0;for(;n!==dv;)if(nv(n))ov(n.left,!1),ov(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;else{if(!nv(n.left)){if(s=o+n.maxEnd,si?ov(n,!0):(a=o+n.end,a>=t&&(n.setCachedOffsets(r,a,0),l[c++]=n),ov(n,!0),n.right===dv||nv(n.right)||(o+=n.delta,n=n.right))}return ov(e.root,!1),l}(this,e,e+t);for(let e=0,t=o.length;ei?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),ov(o,!0)):(ov(o,!0),o.right===dv||nv(o.right)||(s+=o.delta,o=o.right))}ov(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let s=0,r=o.length;si)&&(1!==n&&(2===n||t))}function gv(e,t,i,n,o){const s=function(e){return(24&e.metadata)>>>3}(e),r=0===s||2===s,a=1===s||2===s,l=i-t,c=n,d=Math.min(l,c),h=e.start;let u=!1;const g=e.end;let p=!1;t<=h&&g<=i&&function(e){return(32&e.metadata)>>>5==1}(e)&&(e.start=t,u=!0,e.end=t,p=!0);{const e=o?1:l>0?2:0;!u&&uv(h,r,t,e)&&(u=!0),!p&&uv(g,a,t,e)&&(p=!0)}if(d>0&&!o){const e=l>c?2:0;!u&&uv(h,r,t+d,e)&&(u=!0),!p&&uv(g,a,t+d,e)&&(p=!0)}{const n=o?1:0;!u&&uv(h,r,i,n)&&(e.start=t+c,u=!0),!p&&uv(g,a,i,n)&&(e.end=t+c,p=!0)}const m=c-l;u||(e.start=Math.max(0,h+m)),p||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function pv(e,t){if(e.root===dv)return t.parent=dv,t.left=dv,t.right=dv,iv(t,0),e.root=t,e.root;!function(e,t){let i=0,n=e.root;const o=t.start,s=t.end;for(;;){if(vv(o,s,n.start+i,n.end+i)<0){if(n.left===dv){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===dv){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}}t.parent=n,t.left=dv,t.right=dv,iv(t,1)}(e,t),Cv(t.parent);let i=t;for(;i!==e.root&&1===tv(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===tv(t)?(iv(i.parent,0),iv(t,0),iv(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,_v(e,i)),iv(i.parent,0),iv(i.parent.parent,1),Av(e,i.parent.parent))}else{const t=i.parent.parent.left;1===tv(t)?(iv(i.parent,0),iv(t,0),iv(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,Av(e,i)),iv(i.parent,0),iv(i.parent.parent,1),_v(e,i.parent.parent))}return iv(e.root,0),t}function mv(e,t){let i,n;if(t.left===dv?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===dv?(i=t.left,n=t):(n=function(e){for(;e.left!==dv;)e=e.left;return e}(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,iv(i,0),t.detach(),fv(),wv(i),void(e.root.parent=dv);const o=1===tv(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,iv(n,tv(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==dv&&(n.left.parent=n),n.right!==dv&&(n.right.parent=n)),t.detach(),o)return Cv(i.parent),n!==t&&(Cv(n),Cv(n.parent)),void fv();let s;for(Cv(i),Cv(i.parent),n!==t&&(Cv(n),Cv(n.parent));i!==e.root&&0===tv(i);)i===i.parent.left?(s=i.parent.right,1===tv(s)&&(iv(s,0),iv(i.parent,1),_v(e,i.parent),s=i.parent.right),0===tv(s.left)&&0===tv(s.right)?(iv(s,1),i=i.parent):(0===tv(s.right)&&(iv(s.left,0),iv(s,1),Av(e,s),s=i.parent.right),iv(s,tv(i.parent)),iv(i.parent,0),iv(s.right,0),_v(e,i.parent),i=e.root)):(s=i.parent.left,1===tv(s)&&(iv(s,0),iv(i.parent,1),Av(e,i.parent),s=i.parent.left),0===tv(s.left)&&0===tv(s.right)?(iv(s,1),i=i.parent):(0===tv(s.left)&&(iv(s.right,0),iv(s,1),_v(e,s),s=i.parent.left),iv(s,tv(i.parent)),iv(i.parent,0),iv(s.left,0),Av(e,i.parent),i=e.root));iv(i,0),fv()}function fv(){dv.parent=dv,dv.delta=0,dv.start=0,dv.end=0}function _v(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==dv&&(i.left.parent=t),i.parent=t.parent,t.parent===dv?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,wv(t),wv(i)}function Av(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==dv&&(i.right.parent=t),i.parent=t.parent,t.parent===dv?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,wv(t),wv(i)}function bv(e){let t=e.end;if(e.left!==dv){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==dv){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function wv(e){e.maxEnd=bv(e)}function Cv(e){for(;e!==dv;){const t=bv(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function vv(e,t,i,n){return e===i?t-n:e-i}class yv{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==xv)return Sv(this.right);let e=this;for(;e.parent!==xv&&e.parent.left!==e;)e=e.parent;return e.parent===xv?xv:e.parent}prev(){if(this.left!==xv)return Ev(this.left);let e=this;for(;e.parent!==xv&&e.parent.right!==e;)e=e.parent;return e.parent===xv?xv:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const xv=new yv(null,0);function Sv(e){for(;e.left!==xv;)e=e.left;return e}function Ev(e){for(;e.right!==xv;)e=e.right;return e}function kv(e){return e===xv?0:e.size_left+e.piece.length+kv(e.right)}function Dv(e){return e===xv?0:e.lf_left+e.piece.lineFeedCnt+Dv(e.right)}function Iv(){xv.parent=xv}function Lv(e,t){const i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==xv&&(i.left.parent=t),i.parent=t.parent,t.parent===xv?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function Nv(e,t){const i=t.left;t.left=i.right,i.right!==xv&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===xv?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function Tv(e,t){let i,n;if(t.left===xv?(n=t,i=n.right):t.right===xv?(n=t,i=n.left):(n=Sv(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),Iv(),void(e.root.parent=xv);const o=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,Bv(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,Bv(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==xv&&(n.left.parent=n),n.right!==xv&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,Bv(e,n)),t.detach(),i.parent.left===i){const t=kv(i),n=Dv(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){const o=t-i.parent.size_left,s=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,Rv(e,i.parent,o,s)}}if(Bv(e,i.parent),o)return void Iv();let s;for(;i!==e.root&&0===i.color;)i===i.parent.left?(s=i.parent.right,1===s.color&&(s.color=0,i.parent.color=1,Lv(e,i.parent),s=i.parent.right),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.right.color&&(s.left.color=0,s.color=1,Nv(e,s),s=i.parent.right),s.color=i.parent.color,i.parent.color=0,s.right.color=0,Lv(e,i.parent),i=e.root)):(s=i.parent.left,1===s.color&&(s.color=0,i.parent.color=1,Nv(e,i.parent),s=i.parent.left),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.left.color&&(s.right.color=0,s.color=1,Lv(e,s),s=i.parent.left),s.color=i.parent.color,i.parent.color=0,s.left.color=0,Nv(e,i.parent),i=e.root));i.color=0,Iv()}function Mv(e,t){for(Bv(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&Lv(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Nv(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&Nv(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,Lv(e,t.parent.parent))}e.root.color=0}function Rv(e,t,i,n){for(;t!==e.root&&t!==xv;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function Bv(e,t){let i=0,n=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(i=kv((t=t.parent).left)-t.size_left,n=Dv(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}xv.parent=xv,xv.left=xv,xv.right=xv,xv.color=0;const Ov=65535;function Fv(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class Pv{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function zv(e,t=!0){const i=[0];let n=1;for(let t=0,o=e.length;t(e!==xv&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class Uv{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n=e)&&(i[n]=null,t=!0)}if(t){const e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class Qv{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new Hv("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=xv,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t0){e[t].lineStarts||(e[t].lineStarts=zv(e[t].buffer));const i=new Vv(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new Uv(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=Ov,i=t-Math.floor(21845),n=2*i;let o="",s=0;const r=[];if(this.iterate(this.root,(t=>{const a=this.getNodeContent(t),l=a.length;if(s<=i||s+l0){const t=o.replace(/\r\n|\r|\n/g,e);r.push(new Hv(t,zv(t)))}this.create(r,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Wv(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==xv;)if(n.left!==xv&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;return i+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1)}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const n=e;for(;t!==xv;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const o=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+o.index,0===o.index){const e=this.getOffsetAt(i+1,1);return new Ki(i+1,n-e+1)}return new Ki(i+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===xv){const t=this.getOffsetAt(i+1,1);return new Ki(i+1,n-e-t+1)}t=t.right}return new Ki(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){const i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(o+e.remainder,o+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let s=n.substring(o+e.remainder,o+i.piece.length);for(i=i.next();i!==xv;){const e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){s+=e.substring(n,n+t.remainder);break}s+=e.substr(n,i.piece.length),i=i.next()}return s}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,(o=>{if(o===xv)return!0;const s=o.piece;let r=s.length;if(0===r)return!0;const a=this._buffers[s.bufferIndex].buffer,l=this._buffers[s.bufferIndex].lineStarts,c=s.start.line,d=s.end.line;let h=l[c]+s.start.column;if(n&&(10===a.charCodeAt(h)&&(h++,r--),e[t++]=i,i="",n=!1,0===r))return!0;if(c===d)return this._EOLNormalized||13!==a.charCodeAt(h+r-1)?i+=a.substr(h,r):(n=!0,i+=a.substr(h,r-1)),!0;i+=this._EOLNormalized?a.substring(h,Math.max(h,l[c+1]-this._EOLLength)):a.substring(h,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=c+1;ne+g,t.reset(0)):(_=h.buffer,A=e=>e,t.reset(g));do{if(m=t.next(_),m){if(A(m.index)>=p)return c;this.positionInBuffer(e,A(m.index)-u,f);const t=this.getLineFeedCnt(e.piece.bufferIndex,o,f),s=f.line===o.line?f.column-o.column+n:f.column+1,r=s+m[0].length;if(d[c++]=Hc(new Gi(i+t,s,i+t,r),m,a),A(m.index)+m[0].length>=p)return c;if(c>=l)return c}}while(m);return c}findMatchesLineByLine(e,t,i,n){const o=[];let s=0;const r=new jc(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder);const d=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,r,e.startLineNumber,e.startColumn,c,d,t,i,n,s,o),o;let h=e.startLineNumber,u=a.node;for(;u!==l.node;){const l=this.getLineFeedCnt(u.piece.bufferIndex,c,u.piece.end);if(l>=1){const a=this._buffers[u.piece.bufferIndex].lineStarts,d=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[c.line+l],p=h===e.startLineNumber?e.startColumn:1;if(s=this.findMatchesInNode(u,r,h,p,c,this.positionInBuffer(u,g-d),t,i,n,s,o),s>=n)return o;h+=l}const d=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const a=this.getLineContent(h).substring(d,e.endColumn-1);return s=this._findMatchesInLine(t,r,a,e.endLineNumber,d,s,o,i,n),o}if(s=this._findMatchesInLine(t,r,this.getLineContent(h).substr(d),h,d,s,o,i,n),s>=n)return o;h++,a=this.nodeAt2(h,1),u=a.node,c=this.positionInBuffer(a.node,a.remainder)}if(h===e.endLineNumber){const a=h===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(h).substring(a,e.endColumn-1);return s=this._findMatchesInLine(t,r,l,e.endLineNumber,a,s,o,i,n),o}const g=h===e.startLineNumber?e.startColumn:1;return s=this.findMatchesInNode(l.node,r,h,g,c,d,t,i,n,s,o),o}_findMatchesInLine(e,t,i,n,o,s,r,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,d=i.length;let h=-a;for(;-1!==(h=i.indexOf(t,h+a));)if((!c||Qc(c,i,d,h,a))&&(r[s++]=new Zi(new Gi(n,h+1+o,n,h+1+a+o),null),s>=l))return s;return s}let d;t.reset(0);do{if(d=t.next(i),d&&(r[s++]=Hc(new Gi(n,d.index+1+o,n,d.index+1+d[0].length+o),d,a),s>=l))return s}while(d);return s}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==xv){const{node:i,remainder:n,nodeStartOffset:o}=this.nodeAt(e),s=i.piece,r=s.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&s.end.line===this._lastChangeBufferPos.line&&s.end.column===this._lastChangeBufferPos.column&&o+s.length===e&&t.lengthe){const e=[];let o=new Vv(s.bufferIndex,a,s.end,this.getLineFeedCnt(s.bufferIndex,a,s.end),this.offsetInBuffer(r,s.end)-this.offsetInBuffer(r,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)){if(10===this.nodeCharCodeAt(i,n)){const e={line:o.start.line+1,column:0};o=new Vv(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){if(13===this.nodeCharCodeAt(i,n-1)){const o=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,o),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a)}else this.deleteNodeTail(i,a);const l=this.createNewPieces(t);o.length>0&&this.rbInsertRight(i,o);let c=i;for(let e=0;e=0;e--)o=this.rbInsertLeft(o,n[e]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let o=n;for(let e=1;e=d))break;a=c+1}return i?(i.line=c,i.column=r-h,null):{line:c,column:r-h}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const o=n[i.line+1],s=n[i.line]+i.column;if(o>s+1)return i.line-t.line;const r=s-1;return 13===this._buffers[e].buffer.charCodeAt(r)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tOv){const t=[];for(;e.length>Ov;){const i=e.charCodeAt(65534);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,Ov),e=e.substring(Ov));const o=zv(n);t.push(new Vv(this._buffers.length,{line:0,column:0},{line:o.length-1,column:n.length-o[o.length-1]},o.length-1,n.length)),this._buffers.push(new Hv(n,o))}const i=zv(e);return t.push(new Vv(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new Hv(e,i)),t}let t=this._buffers[0].buffer.length;const i=zv(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const n=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:s-(e-1-i.lf_left)}),a.substring(l+n,l+r-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(i,e-i.lf_left-2),o=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=o.substring(s+t,s+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}}for(i=i.next();i!==xv;){const e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const o=this.getAccumulatedValue(i,0),s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(s,s+o-t),n}{const t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==xv;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),s=t,r=this.offsetInBuffer(i.bufferIndex,s),a=this.getLineFeedCnt(i.bufferIndex,i.start,s),l=a-n,c=r-o,d=i.length+c;e.piece=new Vv(i.bufferIndex,i.start,s,a,d),Rv(this,e,c,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),s=t,r=this.getLineFeedCnt(i.bufferIndex,s,i.end),a=r-n,l=o-this.offsetInBuffer(i.bufferIndex,s),c=i.length+l;e.piece=new Vv(i.bufferIndex,s,i.end,r,c),Rv(this,e,l,a)}shrinkNode(e,t,i){const n=e.piece,o=n.start,s=n.end,r=n.length,a=n.lineFeedCnt,l=t,c=this.getLineFeedCnt(n.bufferIndex,n.start,l),d=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new Vv(n.bufferIndex,n.start,l,c,d),Rv(this,e,d-r,c-a);const h=new Vv(n.bufferIndex,i,s,this.getLineFeedCnt(n.bufferIndex,i,s),this.offsetInBuffer(n.bufferIndex,s)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const o=zv(t,!1);for(let e=0;ee)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;const i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==xv;)if(i.left!==xv&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,s),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){const o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n};t-=i.piece.length-o;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==xv;){if(i.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1){return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)}}t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===xv||0===e.piece.lineFeedCnt)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;if(n===i.length-1)return!1;return!(i[n+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==xv&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let o;o=0===e.piece.end.column?{line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const s=e.piece.length-1,r=e.piece.lineFeedCnt-1;e.piece=new Vv(e.piece.bufferIndex,e.piece.start,o,r,s),Rv(this,e,-1,-1),0===e.piece.length&&i.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Vv(t.piece.bufferIndex,a,t.piece.end,c,l),Rv(this,t,-1,-1),0===t.piece.length&&i.push(t);const d=this.createNewPieces("\r\n");this.rbInsertRight(e,d[0]);for(let e=0;ee.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=s;const u=this._doApplyEdits(a);let g=null;if(t&&d.length>0){d.sort(((e,t)=>t.lineNumber-e.lineNumber)),g=[];for(let e=0,t=d.length;e0&&d[e-1].lineNumber===t)continue;const i=d[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===Pn(n)&&g.push(t)}}return this._onDidChangeContent.fire(),new nn(h,u,g)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,o=new Gi(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let s=i.startLineNumber,r=i.startColumn;const a=[];for(let i=0,n=e.length;i0&&a.push(n.text),s=o.endLineNumber,r=o.endColumn}const l=a.join(""),[c,d,h]=jv(l);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:l,eolCount:c,firstLineLength:d,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(Kv._sortOpsDescending);const t=[];for(let i=0;i0){const e=r.eolCount+1;c=1===e?new Gi(a,l,a,l+r.firstLineLength):new Gi(a,l,a+e-1,r.lastLineLength+1)}else c=new Gi(a,l,a,l);i=c.endLineNumber,n=c.endColumn,t.push(c),o=r}return t}static _sortOpsAscending(e,t){const i=Gi.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=Gi.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class Gv{constructor(e,t,i,n,o,s,r,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=s,this._containsUnusualLineTerminators=r,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,n=i.length;e=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let i=1,n=0,o=0,s=0,r=!0;for(let a=0,l=t.length;a126)&&(r=!1)}const a=new Pv(Fv(e),n,o,s,r);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new Hv(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=ro(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=ho(e))}finish(e=!0){return this._finish(),new Gv(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=zv(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}class $v{constructor(){this.changeType=1}}class qv{constructor(e,t,i,n,o){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=o}static applyInjectedText(e,t){if(!t||0===t.length)return e;let i="",n=0;for(const o of t)i+=e.substring(n,o.column-1),n=o.column-1,i+=o.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new qv(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new qv(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}}class Jv{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class Xv{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class Zv{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class ey{constructor(){this.changeType=5}}class ty{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e)return void i.appendLineTokens(t)}this._tokens.push(new oy(e,[t]))}finalize(){return this._tokens}}class ry{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}delete(e,t){0===t||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const i=[];for(let e=0;e{const t=this._textModel.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&(this._resetTokenizationState(),this._textModel.clearTokens())}))),this._register(this._textModel.onDidChangeContentFast((e=>{if(e.isFlush)this._resetTokenizationState();else{if(this._tokenizationStateStore)for(let t=0,i=e.changes.length;t{this._beginBackgroundTokenization()}))),this._register(this._textModel.onDidChangeLanguage((()=>{this._resetTokenizationState(),this._textModel.clearTokens()}))),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[e,t]=function(e){if(e.isTooLargeForTokenization())return[null,null];const t=er.get(e.getLanguageId());if(!t)return[null,null];let i;try{i=t.getInitialState()}catch(e){return gt(e),[null,null]}return[t,i]}(this._textModel);this._tokenizationStateStore=e&&t?new ay(e,t):null,this._beginBackgroundTokenization()}_beginBackgroundTokenization(){!this._isScheduled&&this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._isScheduled=!0,bn((e=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{!this._isDisposed&&this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;if(this._tokenizeOneInvalidLine(t)>=e)break}while(this._hasLinesToTokenize());this._textModel.setTokens(t.finalize(),!this._hasLinesToTokenize())}tokenizeViewport(e,t){const i=new sy;this._tokenizeViewport(i,e,t),this._textModel.setTokens(i.finalize(),!this._hasLinesToTokenize())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new sy;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.finalize(),!this._hasLinesToTokenize())}getTokenTypeIfInsertingCharacter(e,t){if(!this._tokenizationStateStore)return 0;this.forceTokenization(e.lineNumber);const i=this._tokenizationStateStore.getBeginState(e.lineNumber-1);if(!i)return 0;const n=this._textModel.getLanguageId(),o=this._textModel.getLineContent(e.lineNumber),s=o.substring(0,e.column-1)+t+o.substring(e.column-1),r=cy(this._languageIdCodec,n,this._tokenizationStateStore.tokenizationSupport,s,!0,i),a=new Ad(r.tokens,s,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,o=e.column;if(!this._tokenizationStateStore)return null;this.forceTokenization(n);const s=this._tokenizationStateStore.getBeginState(n-1);if(!s)return null;const r=this._textModel.getLineContent(n),a=r.substring(0,o-1)+i+r.substring(o-1+t),l=this._textModel.getLanguageIdAtPosition(n,0),c=cy(this._languageIdCodec,l,this._tokenizationStateStore.tokenizationSupport,a,!0,s);return new Ad(c.tokens,a,this._languageIdCodec)}isCheapToTokenize(e){if(!this._tokenizationStateStore)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e1&&e>=1;e--){const t=this._textModel.getLineFirstNonWhitespaceColumn(e);if(0!==t&&t=0;e--){a=cy(this._languageIdCodec,r,this._tokenizationStateStore.tokenizationSupport,o[e],!1,a).endState}for(let n=t;n<=i;n++){const t=this._textModel.getLineContent(n),i=cy(this._languageIdCodec,r,this._tokenizationStateStore.tokenizationSupport,t,!0,a);e.add(n,i.tokens),this._tokenizationStateStore.markMustBeTokenized(n-1),a=i.endState}}}function cy(e,t,i,n,o,s){let r=null;if(i)try{r=i.tokenizeEncoded(n,o,s.clone())}catch(e){gt(e)}return r||(r=Fl(e.encodeLanguageId(t),s)),Ad.convertToEndOffset(r.tokens,n.length),r}const dy=new Uint32Array(0).buffer;class hy{static deleteBeginning(e,t){return null===e||e===dy?e:hy.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===dy)return e;const i=uy(e),n=i[i.length-2];return hy.delete(e,t,n)}static delete(e,t,i){if(null===e||e===dy||t===i)return e;const n=uy(e),o=n.length>>>1;if(0===t&&n[n.length-2]===i)return dy;const s=Ad.findIndexInTokensArray(n,t),r=s>0?n[s-1<<1]:0;if(il&&(n[a++]=t,n[a++]=n[1+(e<<1)],l=t)}if(a===n.length)return e;const d=new Uint32Array(a);return d.set(n.subarray(0,a),0),d.buffer}static append(e,t){if(t===dy)return e;if(e===dy)return t;if(null===e)return e;if(null===t)return null;const i=uy(e),n=uy(t),o=n.length>>>1,s=new Uint32Array(i.length+n.length);s.set(i,0);let r=i.length;const a=i[i.length-2];for(let e=0;e>>1;let s=Ad.findIndexInTokensArray(n,t);if(s>0){n[s-1<<1]===t&&s--}for(let e=s;e1&&(t=xs.getLanguageId(n[1])!==e),!t)return dy}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=py(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const i=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=hy.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=hy.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len||(0!==t?(this._lineTokens[n]=hy.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=hy.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=hy.insert(this._lineTokens[n],e.column-1,i))}}function py(e){return(16384|e|2<<23)>>>0}class my{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),o=t[t.length-1].getRange();if(!n||!o)return e;i=e.plusRange(n).plusRange(o)}let n=null;for(let e=0,t=this._pieces.length;ei.endLineNumber){n=n||{index:e};break}if(o.removeTokens(i),o.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(o.endLineNumberi.endLineNumber){n=n||{index:e};continue}const[s,r]=o.split(i);s.isEmpty()?n=n||{index:e}:r.isEmpty()||(this._pieces.splice(e,1,s,r),e++,t++,n=n||{index:e})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=X(this._pieces,n.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){const i=this._pieces;if(0===i.length)return t;const n=i[my._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const o=t.getCount(),s=n.getCount();let r=0;const a=[];let l=0,c=0;const d=(e,t)=>{e!==c&&(c=e,a[l++]=e,a[l++]=t)};for(let e=0;e>>0,c=~l>>>0;for(;rt)){for(;o>i&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber;)o--;return o}n=o-1}}return i}acceptEdit(e,t,i,n,o){for(const s of this._pieces)s.acceptEdit(e,t,i,n,o)}}const fy=_a("undoRedoService");class _y{constructor(e,t){this.resource=e,this.elements=t}}class Ay{constructor(){this.id=Ay._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}Ay._ID=0,Ay.None=new Ay;class by{constructor(){this.id=by._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}by._ID=0,by.None=new by;var wy=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Cy=function(e,t){return function(i,n){t(i,n,e)}};function vy(e){const t=new Yv;return t.acceptChunk(e),t.finish()}function yy(e,t){return("string"==typeof e?vy(e):e).create(t)}let xy=0;class Sy{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;for(;;){const n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}const Ey=()=>{throw new Error("Invalid change accessor")};let ky=class e extends Lt{constructor(t,i,n,o=null,s,r,a){super(),this._undoRedoService=s,this._languageService=r,this._languageConfigurationService=a,this._onWillDispose=this._register(new zt),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new zy((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new zt),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new zt),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new zt),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new zt),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new zt),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeContentOrInjectedText=this._register(new zt),this.onDidChangeContentOrInjectedText=this._onDidChangeContentOrInjectedText.event,this._eventEmitter=this._register(new Vy),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new zt),this.onBackgroundTokenizationStateChanged=this._onBackgroundTokenizationStateChanged.event,this._register(this._eventEmitter.fastEvent((e=>{this._onDidChangeContentOrInjectedText.fire(e.rawContentChangedEvent)}))),xy++,this.id="$model"+xy,this.isForSimpleWidget=n.isForSimpleWidget,this._associatedResource=null==o?Bi.parse("inmemory://model/"+xy):o,this._attachedEditorCount=0;const{textBuffer:l,disposable:c}=yy(t,n.defaultEOL);this._buffer=l,this._bufferDisposable=c,this._options=e.resolveOptions(this._buffer,n);const d=this._buffer.getLineCount(),h=this._buffer.getValueLengthInRange(new Gi(1,1,d,this._buffer.getLineLength(d)+1),0);n.largeFileOptimizations?this._isTooLargeForTokenization=h>e.LARGE_FILE_SIZE_THRESHOLD||d>e.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=h>e.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageId=i,this._languageRegistryListener=this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._instanceId=fo(xy),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Ly,this._commandManager=new jC(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new gy(this._languageService.languageIdCodec),this._semanticTokens=new my(this._languageService.languageIdCodec),this._tokenization=new ly(this,this._languageService.languageIdCodec),this._bracketPairColorizer=this._register(new fC(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new qC(this,this._languageConfigurationService)),this._decorationProvider=this._register(new bC(this)),this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})))}static resolveOptions(e,t){if(t.detectIndentation){const i=ev(e,t.tabSize,t.insertSpaces);return new Xi({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new Xi({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}onDidChangeContentFast(e){return this._eventEmitter.fastEvent((t=>e(t.contentChangedEvent)))}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}get bracketPairs(){return this._bracketPairColorizer}get guides(){return this._guidesTextModelPart}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(e){if(2===this._backgroundTokenizationState)return;const t=e?2:1;this._backgroundTokenizationState!==t&&(this._backgroundTokenizationState=t,this._onBackgroundTokenizationStateChanged.fire())}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const e=new Kv([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this._bracketPairColorizer.handleContentChanged(t),this._isDisposing||this._eventEmitter.fire(new ny(e,t))}setValue(e){if(this._assertNotDisposed(),null===e)return;const{textBuffer:t,disposable:i}=yy(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,s,r){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:s,isFlush:r}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokens.flush(),this._semanticTokens.flush(),this._decorations=Object.create(null),this._decorationsTree=new Ly,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new ty([new $v],this._versionId,!1,!1),this._createContentChanged2(new Gi(1,1,o,s),0,n,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),s=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new ty([new ey],this._versionId,!1,!1),this._createContentChanged2(new Gi(1,1,o,s),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.indentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,s=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,r=new Xi({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o,bracketPairColorizationOptions:s});if(this._options.equals(r))return;const a=this._options.createChangeEvent(r);this._options=r,this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const i=ev(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}static _normalizeIndentationFromWhitespace(e,t,i){let n=0;for(let i=0;i({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new Sy(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let o=Math.floor("number"!=typeof i||isNaN(i)?1:i),s=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(o<1)o=1,s=1;else if(o>t)o=t,s=this.getLineMaxColumn(o);else if(s<=1)s=1;else{const e=this.getLineMaxColumn(o);s>=e&&(s=e)}const r=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof r||isNaN(r)?1:r),c=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const e=this.getLineMaxColumn(l);c>=e&&(c=e)}return i===o&&n===s&&r===l&&a===c&&e instanceof Gi&&!(e instanceof Yi)?e:new Gi(o,s,l,c)}_isValidPosition(e,t,i){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===i){if(Jn(this._buffer.getLineCharCode(e,t-2)))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),s=this._buffer.getLineCount();if(n<1)return new Ki(1,1);if(n>s)return new Ki(s,this.getLineMaxColumn(s));if(o<=1)return new Ki(n,1);const r=this.getLineMaxColumn(n);if(o>=r)return new Ki(n,r);if(1===i){if(Jn(this._buffer.getLineCharCode(n,o-2)))return new Ki(n,o-1)}return new Ki(n,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof Ki&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(o,s,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=s>1&&s<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,s-2):0,r=Jn(e),a=Jn(t);return!r&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof Gi&&!(e instanceof Yi)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,o=t.column,s=i.lineNumber,r=i.column;{const e=o>1?this._buffer.getLineCharCode(n,o-2):0,t=r>1&&r<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,r-2):0,i=Jn(e),a=Jn(t);return i||a?n===s&&o===r?new Gi(n,o-1,s,r-1):i&&a?new Gi(n,o-1,s,r+1):i?new Gi(n,o-1,s,r):new Gi(n,o,s,r+1):new Gi(n,o,s,r)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new Gi(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,o,s,r=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>Gi.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let c;if(l.push(a.reduce(((e,t)=>Gi.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new Vc(e,i,n,o).parseSearchRequest();if(!t)return[];c=e=>this.findMatchesLineByLine(e,t,s,r)}else c=t=>Uc.findMatches(this,new Vc(e,i,n,o),t,s,r);return l.map(c).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new Vc(e,i,n,o).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new Gi(r.lineNumber,r.column,a,this.getLineMaxColumn(a)),c=this.findMatchesLineByLine(l,t,s,1);return Uc.findNextMatch(this,new Vc(e,i,n,o),r,s),c.length>0?c[0]:(l=new Gi(1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),c=this.findMatchesLineByLine(l,t,s,1),c.length>0?c[0]:null)}return Uc.findNextMatch(this,new Vc(e,i,n,o),r,s)}findPreviousMatch(e,t,i,n,o,s){this._assertNotDisposed();const r=this.validatePosition(t);return Uc.findPreviousMatch(this,new Vc(e,i,n,o),r,s)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof en?e:new en(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:this.validateRange(e.range),text:e.text})));let n=!0;if(e)for(let t=0,o=e.length;to.endLineNumber,r=o.startLineNumber>t.endLineNumber;if(!n&&!r){s=!0;break}}if(!s){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;et.endLineNumber)&&!(n===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(r.length-1))){s=!1;break}}if(s){const e=new Gi(n,1,n,o);t.push(new en(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i)}_applyUndo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new Gi(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}}));this._applyUndoRedoEdits(o,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new Gi(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}}));this._applyUndoRedoEdits(o,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,o,s){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(s),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),s=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,0!==s.length){for(let e=0,t=s.length;e0?t.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(t.rangeOffset,t.rangeLength,t.text.length,t.forceMoveMarkers)}const e=[];this._increaseVersionId();let t=i;for(let i=0,n=s.length;i=0;t--){const i=a+t,n=g+t;A.takeFromEndWhile((e=>e.lineNumber>n));const o=A.takeFromEndWhile((e=>e.lineNumber===n));e.push(new Jv(i,this.getLineContent(n),o))}if(he.lineNumbere.lineNumber===t))}e.push(new Zv(n+1,a+d,c,l))}t+=u}this._emitContentChangedEvent(new ty(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===n.reverseEdits?void 0:n.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=[...e].map((e=>new Jv(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeContentOrInjectedText.fire(new iy(t))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,Py(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)};let n=null;try{n=t(i)}catch(e){gt(e)}return i.addDecoration=Ey,i.changeDecoration=Ey,i.changeDecorationOptions=Ey,i.removeDecoration=Ey,i.deltaDecorations=Ey,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Fy[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const o=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),r=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),s,r,o),n.setOptions(Fy[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1){const o=this.getLineCount(),s=Math.min(o,Math.max(1,e)),r=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(r),l=new Gi(s,1,r,a),c=this._getDecorationsInRange(l,i,n);return c.push(...this._decorationProvider.getDecorationsInRange(l,i,n)),c}getDecorationsInRange(e,t=0,i=!1){const n=this.validateRange(e),o=this._getDecorationsInRange(n,t,i);return o.push(...this._decorationProvider.getDecorationsInRange(n,t,i)),o}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return qv.fromDecorations(n).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}_getDecorationsInRange(e,t,i){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,n,o,t,i)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(i.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),s=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),o,s,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!(!i.options.overviewRuler||!i.options.overviewRuler.color),o=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(i.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}n!==o?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i){const n=this.getVersionId(),o=t.length;let s=0;const r=i.length;let a=0;const l=new Array(r);for(;s0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}this.handleTokenizationProgress(t)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||this._onDidChangeTokens.fire(e)}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),i=this._tokens.getTokens(this._languageId,e-1,t);return this._semanticTokens.addSparseTokens(e,i)}getLanguageId(){return this._languageId}setMode(e){if(this._languageId===e)return;const t={oldLanguage:this._languageId,newLanguage:e};this._languageId=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const i=this.validatePosition(new Ki(e,t)),n=this.getLineTokens(i.lineNumber);return n.getLanguageId(n.findTokenIndexAtOffset(i.column-1))}getTokenTypeIfInsertingCharacter(e,t,i){const n=this.validatePosition(new Ki(e,t));return this._tokenization.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){const n=this.validatePosition(e);return this._tokenization.tokenizeLineWithEdit(n,t,i)}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}getWordAtPosition(t){this._assertNotDisposed();const i=this.validatePosition(t),n=this.getLineContent(i.lineNumber),o=this._getLineTokens(i.lineNumber),s=o.findTokenIndexAtOffset(i.column-1),[r,a]=e._findLanguageBoundaries(o,s),l=F(i.column,this.getLanguageConfiguration(o.getLanguageId(s)).getWordDefinition(),n.substring(r,a),r);if(l&&l.startColumn<=t.column&&t.column<=l.endColumn)return l;if(s>0&&r===i.column-1){const[r,a]=e._findLanguageBoundaries(o,s-1),l=F(i.column,this.getLanguageConfiguration(o.getLanguageId(s-1)).getWordDefinition(),n.substring(r,a),r);if(l&&l.startColumn<=t.column&&t.column<=l.endColumn)return l}return null}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let o=e.getLineContent().length;for(let n=t,s=e.getCount();ne.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i);return this._ensureNodesHaveRanges(e,n).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,i,n){const o=e.getVersionId(),s=this._search(t,i,n,o);return this._ensureNodesHaveRanges(e,s)}_search(e,t,i,n){if(i)return this._decorationsTree1.search(e,t,n);{const i=this._decorationsTree0.search(e,t,n),o=this._decorationsTree1.search(e,t,n),s=this._injectedTextDecorationsTree.search(e,t,n);return i.concat(o).concat(s)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){Iy(e)?this._injectedTextDecorationsTree.insert(e):Dy(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){Iy(e)?this._injectedTextDecorationsTree.delete(e):Dy(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){Iy(e)?this._injectedTextDecorationsTree.resolveNode(e,t):Dy(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function Ny(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class Ty{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class My extends Ty{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:$i.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"==typeof e)return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class Ry extends Ty{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"==typeof e?jp.fromHex(e):t.getColor(e.id)}}class By{constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}static from(e){return e instanceof By?e:new By(e)}}class Oy{constructor(e){var t,i;this.description=e.description,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?Ny(e.className):null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new My(e.overviewRuler):null,this.minimap=e.minimap?new Ry(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?Ny(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?Ny(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?Ny(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?Ny(e.marginClassName):null,this.inlineClassName=e.inlineClassName?Ny(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?Ny(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?Ny(e.afterContentClassName):null,this.after=e.after?By.from(e.after):null,this.before=e.before?By.from(e.before):null,this.hideInCommentTokens=null!==(t=e.hideInCommentTokens)&&void 0!==t&&t,this.hideInStringTokens=null!==(i=e.hideInStringTokens)&&void 0!==i&&i}static register(e){return new Oy(e)}static createDynamic(e){return new Oy(e)}}Oy.EMPTY=Oy.register({description:"empty"});const Fy=[Oy.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Oy.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Oy.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Oy.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function Py(e){return e instanceof Oy?e:Oy.createDynamic(e)}class zy extends Lt{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new zt),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;if(this._deferredCnt--,0===this._deferredCnt){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(e)}null===(e=this._affectedInjectedTextLines)||void 0===e||e.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!(!e.minimap||!e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!(!e.overviewRuler||!e.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class Vy extends Lt{constructor(){super(),this._fastEmitter=this._register(new zt),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new zt),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}const Hy=()=>!0,Wy=()=>!1,Uy=e=>" "===e||"\t"===e;class Qy{constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const o=i.options,s=o.get(131);this.readOnly=o.get(81),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=o.get(104),this.lineHeight=o.get(59),this.pageSize=Math.max(1,Math.floor(s.height/this.lineHeight)-2),this.useTabStops=o.get(116),this.wordSeparators=o.get(117),this.emptySelectionClipboard=o.get(32),this.copyWithSyntaxHighlighting=o.get(21),this.multiCursorMergeOverlapping=o.get(69),this.multiCursorPaste=o.get(71),this.autoClosingBrackets=o.get(5),this.autoClosingQuotes=o.get(8),this.autoClosingDelete=o.get(6),this.autoClosingOvertype=o.get(7),this.autoSurround=o.get(11),this.autoIndent=o.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const r=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(r)for(const e of r)this.surroundingPairs[e.open]=e.close}static shouldRecreate(e){return e.hasChanged(131)||e.hasChanged(117)||e.hasChanged(32)||e.hasChanged(69)||e.hasChanged(71)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(116)||e.hasChanged(59)||e.hasChanged(81)}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const t=null===(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)||void 0===e?void 0:e.getElectricCharacters();if(t)for(const e of t)this._electricChars[e]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=ka(t,i-1),o=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return ky.normalizeIndentation(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return Uy;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e);case"always":return Hy;case"never":return Wy}}_getLanguageDefinedShouldAutoClose(e){const t=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet();return e=>-1!==t.indexOf(e)}visibleColumnFromColumn(e,t){return zA.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=zA.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),o=e.getLineMinColumn(t);if(ns?s:n}}class jy{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}class Ky{constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}static fromModelState(e){return new Gy(e)}static fromViewState(e){return new Yy(e)}static fromModelSelection(e){const t=Yi.liftSelection(e),i=new $y(Gi.fromPositions(t.getSelectionStart()),0,t.getPosition(),0);return Ky.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;io,l=n>s,c=ns)continue;if(pn)continue;if(g0&&n--,Xy.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const o=Math.min(i.fromViewLineNumber,i.toViewLineNumber),s=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=o;i<=s;i++){const o=t.getLineMaxColumn(i),s=e.visibleColumnFromColumn(t,new Ki(i,o));n=Math.max(n,s)}let r=i.toViewVisualColumn;return re.getLineMinColumn(t.lineNumber))return t.delta(void 0,-oo(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new Ki(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),o=e.getLineContent(t.lineNumber),s=VA.atomicPosition(o,t.column-1,i,0);if(-1!==s&&s+1>=n)return new Ki(t.lineNumber,s+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?sx.leftPositionAtomicSoftTabs(t,i,e.tabSize):sx.leftPosition(t,i);return new ox(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,o){let s,r;if(i.hasSelection()&&!n)s=i.selection.startLineNumber,r=i.selection.startColumn;else{const n=i.position.delta(void 0,-(o-1)),a=t.normalizePosition(sx.clipPositionColumn(n,t),0),l=sx.left(e,t,a);s=l.lineNumber,r=l.column}return i.move(n,s,r,0)}static clipPositionColumn(e,t){return new Ki(e.lineNumber,sx.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return ic?(i=c,n=r?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,l),o=u?0:l-zA.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==a){const e=new Ki(i,n),s=t.normalizePosition(e,a);o+=n-s.column,i=s.lineNumber,n=s.column}return new ox(i,n,o)}static down(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i+s,r,1)}static moveDown(e,t,i,n,o){let s,r;i.hasSelection()&&!n?(s=i.selection.endLineNumber,r=i.selection.endColumn):(s=i.position.lineNumber,r=i.position.column);const a=sx.down(e,t,s,r,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,i){const n=i.selection,o=sx.down(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),s=sx.down(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new $y(new Gi(o.lineNumber,o.column,o.lineNumber,o.column),o.leftoverVisibleColumns,new Ki(s.lineNumber,s.column),s.leftoverVisibleColumns)}static up(e,t,i,n,o,s,r){return this.vertical(e,t,i,n,o,i-s,r,0)}static moveUp(e,t,i,n,o){let s,r;i.hasSelection()&&!n?(s=i.selection.startLineNumber,r=i.selection.startColumn):(s=i.position.lineNumber,r=i.position.column);const a=sx.up(e,t,s,r,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,i){const n=i.selection,o=sx.up(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),s=sx.up(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new $y(new Gi(o.lineNumber,o.column,o.lineNumber,o.column),o.leftoverVisibleColumns,new Ki(s.lineNumber,s.column),s.leftoverVisibleColumns)}static _isBlankLine(e,t){return 0===e.getLineFirstNonWhitespaceColumn(t)}static moveToPrevBlankLine(e,t,i,n){let o=i.position.lineNumber;for(;o>1&&this._isBlankLine(t,o);)o--;for(;o>1&&!this._isBlankLine(t,o);)o--;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToNextBlankLine(e,t,i,n){const o=t.getLineCount();let s=i.position.lineNumber;for(;s=d.length+1)return!1;const h=d.charAt(c.column-2),u=n.get(h);if(!u)return!1;if(Jy(h)){if("never"===i)return!1}else if("never"===t)return!1;const g=d.charAt(c.column-1);let p=!1;for(const e of u)e.open===h&&e.close===g&&(p=!0);if(!p)return!1;if("auto"===e){let e=!1;for(let t=0,i=r.length;t1){const e=t.getLineContent(n.lineNumber),o=Pn(e),s=-1===o?e.length+1:o+1;if(n.column<=s){const e=i.visibleColumnFromColumn(t,n),o=zA.prevIndentTabStop(e,i.indentSize),s=i.columnFromVisibleColumn(t,n.lineNumber,o);return new Gi(n.lineNumber,s,n.lineNumber,n.column)}}return Gi.fromPositions(rx.getPositionAfterDeleteLeft(n,t),n)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=bo(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(e.lineNumber>1){const i=e.lineNumber-1;return new Ki(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){const n=[];let o=null;i.sort(((e,t)=>Ki.compare(e.getStartPosition(),t.getEndPosition())));for(let s=0,r=i.length;s1&&(null==o?void 0:o.endLineNumber)!==e.lineNumber?(i=e.lineNumber-1,a=t.getLineMaxColumn(e.lineNumber-1),l=e.lineNumber,c=t.getLineMaxColumn(e.lineNumber)):(i=e.lineNumber,a=1,l=e.lineNumber,c=t.getLineMaxColumn(e.lineNumber));const d=new Gi(i,a,l,c);o=d,d.isEmpty()?n[s]=null:n[s]=new Zy(d,"")}else n[s]=null;else n[s]=new Zy(r,"")}return new qy(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class ax{static _createWord(e,t,i,n,o){return{start:n,end:o,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){const n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;for(let o=i.column-2;o>=0;o--){const i=e.charCodeAt(o),s=t.get(i);if(0===s){if(2===n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1));n=1}else if(2===s){if(1===n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1));n=2}else if(1===s&&0!==n)return this._createWord(e,n,s,o+1,this._findEndOfWord(e,t,n,o+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){const o=e.length;for(let s=n;s=0;o--){const n=e.charCodeAt(o),s=t.get(n);if(1===s)return o+1;if(1===i&&2===s)return o+1;if(2===i&&0===s)return o+1}return 0}static moveWordLeft(e,t,i,n){let o=i.lineNumber,s=i.column;1===s&&o>1&&(o-=1,s=t.getLineMaxColumn(o));let r=ax._findPreviousWordOnLine(e,t,new Ki(o,s));if(0===n)return new Ki(o,r?r.start+1:1);if(1===n)return r&&2===r.wordType&&r.end-r.start==1&&0===r.nextCharClass&&(r=ax._findPreviousWordOnLine(e,t,new Ki(o,r.start+1))),new Ki(o,r?r.start+1:1);if(3===n){for(;r&&2===r.wordType;)r=ax._findPreviousWordOnLine(e,t,new Ki(o,r.start+1));return new Ki(o,r?r.start+1:1)}return r&&s<=r.end+1&&(r=ax._findPreviousWordOnLine(e,t,new Ki(o,r.start+1))),new Ki(o,r?r.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(1===t.column)return i>1?new Ki(i-1,e.getLineMaxColumn(i-1)):t;const o=e.getLineContent(i);for(let e=t.column-1;e>1;e--){const t=o.charCodeAt(e-2),s=o.charCodeAt(e-1);if(95===t&&95!==s)return new Ki(i,e);if(jn(t)&&Kn(s))return new Ki(i,e);if(Kn(t)&&Kn(s)&&e+1=a.start+1&&(a=ax._findNextWordOnLine(e,t,new Ki(o,a.end+1))),s=a?a.start+1:t.getLineMaxColumn(o);return new Ki(o,s)}static _moveWordPartRight(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===n)return i1?l=1:(a--,l=n.getLineMaxColumn(a)):(c&&l<=c.end+1&&(c=ax._findPreviousWordOnLine(i,n,new Ki(a,c.start+1))),c?l=c.end+1:l>1?l=1:(a--,l=n.getLineMaxColumn(a))),new Gi(a,l,r.lineNumber,r.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new Ki(i.positionLineNumber,i.positionColumn),o=this._deleteInsideWordWhitespace(t,n);return o||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let o=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,o))return null;let s=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,s))return null;for(;o>0&&this._charAtIsWhitespace(i,o-1);)o--;for(;s+11?new Gi(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumbere.start+1<=i.column&&i.column<=e.end+1,r=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new Gi(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,s=!1;for(;i-11&&this._charAtIsWhitespace(n,t-2);)t--;return r(t,i)},l=ax._findPreviousWordOnLine(e,t,i);if(l&&s(l))return a(l);const c=ax._findNextWordOnLine(e,t,i);return c&&s(c)?a(c):l&&c?r(l.end+1,c.start+1):l?r(l.start+1,l.end+1):c?r(c.start+1,c.end+1):r(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=ax._moveWordPartLeft(e,i);return new Gi(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n=h.start+1&&(h=ax._findNextWordOnLine(i,n,new Ki(a,h.end+1))),h?l=h.start+1:lBoolean(e)))}class dx{static addCursorDown(e,t,i){const n=[];let o=0;for(let s=0,r=t.length;st&&(i=t,n=e.model.getLineMaxColumn(i)),Ky.fromModelState(new $y(new Gi(s.lineNumber,1,i,n),0,new Ki(i,n),0))}const a=t.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumbera){const i=e.getLineCount();let n=r.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),Ky.fromViewState(t.viewState.move(t.modelState.hasSelection(),n,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return Ky.fromModelState(t.modelState.move(t.modelState.hasSelection(),e.lineNumber,e.column,0))}}static word(e,t,i,n){const o=e.model.validatePosition(n);return Ky.fromModelState(ax.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new Ky(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return Ky.fromViewState(new $y(new Gi(i,n,i,n),0,new Ki(i,n),0))}static moveTo(e,t,i,n,o){const s=e.model.validatePosition(n),r=o?e.coordinatesConverter.validateViewPosition(new Ki(o.lineNumber,o.column),s):e.coordinatesConverter.convertModelPositionToViewPosition(s);return Ky.fromViewState(t.viewState.move(i,r.lineNumber,r.column,0))}static simpleMove(e,t,i,n,o,s){switch(i){case 0:return 4===s?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,o);case 1:return 4===s?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,o);case 2:return 2===s?this._moveUpByViewLines(e,t,n,o):this._moveUpByModelLines(e,t,n,o);case 3:return 2===s?this._moveDownByViewLines(e,t,n,o):this._moveDownByModelLines(e,t,n,o);case 4:return 2===s?t.map((t=>Ky.fromViewState(sx.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>Ky.fromModelState(sx.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===s?t.map((t=>Ky.fromViewState(sx.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>Ky.fromModelState(sx.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,o){const s=e.getCompletelyVisibleViewRange(),r=e.coordinatesConverter.convertViewRangeToModelRange(s);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 13:{const i=this._lastLineNumberInRange(e.model,r,o),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 12:{const i=Math.round((r.startLineNumber+r.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 14:{const i=[];for(let o=0,r=t.length;oi.endLineNumber-1?i.endLineNumber-1:oKy.fromViewState(sx.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){const n=[];for(let o=0,s=t.length;oKy.fromViewState(sx.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){const n=[];for(let o=0,s=t.length;o1){if(zA.visibleColumnFromColumn(n,u+1,o)%s!=0&&e.isCheapToTokenize(d-1)){const t=Ll.getEnterAction(this._opts.autoIndent,e,new Gi(d-1,e.getLineMaxColumn(d-1),d-1,e.getLineMaxColumn(d-1)));if(t){if(c=l,t.appendText)for(let e=0,i=t.appendText.length;e1){let n;for(n=i-1;n>=1;n--){if(Vn(t.getLineContent(n))>=0)break}if(n<1)return null;const s=t.getLineMaxColumn(n),r=Ll.getEnterAction(e.autoIndent,t,new Gi(n,s,n,s));r&&(o=r.indentation+r.appendText)}return n&&(n===ya.Indent&&(o=fx.shiftIndent(e,o)),n===ya.Outdent&&(o=fx.unshiftIndent(e,o)),o=e.normalizeIndentation(o)),o||null}static _replaceJumpToNextIndent(e,t,i,n){let o="";const s=i.getStartPosition();if(e.insertSpaces){const i=e.visibleColumnFromColumn(t,s),n=e.indentSize,r=n-i%n;for(let e=0;ethis._compositionType(i,e,o,s,r,a)));return new qy(4,l,{shouldPushStackElementBefore:bx(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,s){if(!t.isEmpty())return null;const r=t.getPosition(),a=Math.max(1,r.column-n),l=Math.min(e.getLineMaxColumn(r.lineNumber),r.column+o),c=new Gi(r.lineNumber,a,r.lineNumber,l);return e.getValueInRange(c)===i&&0===s?null:new ix(c,i,0,s)}static _typeCommand(e,t,i){return i?new tx(e,t,!0):new Zy(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return fx._typeCommand(n,"\n",i);if(!t.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){const o=zn(t.getLineContent(n.startLineNumber)).substring(0,n.startColumn-1);return fx._typeCommand(n,"\n"+e.normalizeIndentation(o),i)}const o=Ll.getEnterAction(e.autoIndent,t,n);if(o){if(o.indentAction===ya.None)return fx._typeCommand(n,"\n"+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===ya.Indent)return fx._typeCommand(n,"\n"+e.normalizeIndentation(o.indentation+o.appendText),i);if(o.indentAction===ya.IndentOutdent){const t=e.normalizeIndentation(o.indentation),s=e.normalizeIndentation(o.indentation+o.appendText),r="\n"+s+"\n"+t;return i?new tx(n,r,!0):new ix(n,r,-1,s.length-t.length,!0)}if(o.indentAction===ya.Outdent){const t=fx.unshiftIndent(e,o.indentation);return fx._typeCommand(n,"\n"+e.normalizeIndentation(t+o.appendText),i)}}const s=zn(t.getLineContent(n.startLineNumber)).substring(0,n.startColumn-1);if(e.autoIndent>=4){const o=Ll.getIndentForEnter(e.autoIndent,t,n,{unshiftIndent:t=>fx.unshiftIndent(e,t),shiftIndent:t=>fx.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)});if(o){let s=e.visibleColumnFromColumn(t,n.getEndPosition());const r=n.endColumn,a=Pn(t.getLineContent(n.endLineNumber));if(n=a>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,a+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new tx(n,"\n"+e.normalizeIndentation(o.afterEnter),!0);{let t=0;return r<=a+1&&(e.insertSpaces||(s=Math.ceil(s/e.indentSize)),t=Math.min(s+1-e.normalizeIndentation(o.afterEnter).length-1,0)),new ix(n,"\n"+e.normalizeIndentation(o.afterEnter),0,t,!0)}}}return fx._typeCommand(n,"\n"+e.normalizeIndentation(s),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;efx.shiftIndent(e,t),unshiftIndent:t=>fx.unshiftIndent(e,t)});if(null===s)return null;if(s!==e.normalizeIndentation(o)){const o=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===o?fx._typeCommand(new Gi(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+n,!1):fx._typeCommand(new Gi(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(s)+t.getLineContent(i.startLineNumber).substring(o-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,o){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o))return!1;for(let s=0,r=i.length;s2?l.charCodeAt(a.column-2):0)&&c)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;tt.startsWith(e.open))),r=o.some((e=>t.startsWith(e.close)));return!s&&r}static _findAutoClosingPairOpen(e,t,i,n){const o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!o)return null;let s=null;for(const e of o)if(null===s||e.open.length>s.open.length){let o=!0;for(const s of i){if(t.getValueInRange(new Gi(s.lineNumber,s.column-e.open.length+1,s.lineNumber,s.column))+n!==e.open){o=!1;break}}o&&(s=e)}return s}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let o=null;for(const e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!o||e.open.length>o.open.length)&&(o=e);return o}static _getAutoClosingPairClose(e,t,i,n,o){const s=Jy(n),r=s?e.autoClosingQuotes:e.autoClosingBrackets,a=s?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;if("never"===r)return null;for(const e of i)if(!e.isEmpty())return null;const l=i.map((e=>{const t=e.getPosition();return o?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}})),c=this._findAutoClosingPairOpen(e,t,l.map((e=>new Ki(e.lineNumber,e.beforeColumn))),n);if(!c)return null;const d=this._findContainedAutoClosingPair(e,c),h=d?d.close:"";let u=!0;for(const i of l){const{lineNumber:o,beforeColumn:s,afterColumn:l}=i,d=t.getLineContent(o),g=d.substring(0,s-1),p=d.substring(l-1);if(p.startsWith(h)||(u=!1),p.length>0){const t=p.charAt(0);if(!fx._isBeforeClosingBrace(e,p)&&!a(t))return null}if(1===c.open.length&&("'"===n||'"'===n)&&"always"!==r){const t=zc(e.wordSeparators);if(g.length>0){const e=g.charCodeAt(g.length-1);if(0===t.get(e))return null}}if(!t.isCheapToTokenize(o))return null;t.forceTokenization(o);const m=ka(t.getLineTokens(o),s-1);if(!c.shouldAutoClose(m,s-m.firstCharOffset))return null;const f=c.findNeutralCharacter();if(f){const e=t.getTokenTypeIfInsertingCharacter(o,s,f);if(!c.isOK(e))return null}}return u?c.close.substring(0,c.close.length-h.length):c.close}static _runAutoClosingOpenCharType(e,t,i,n,o,s,r){const a=[];for(let e=0,t=n.length;enew Zy(new Gi(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new qy(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const a=this._getAutoClosingPairClose(t,i,o,r,!0);return null!==a?this._runAutoClosingOpenCharType(e,t,i,o,r,!0,a):null}static typeWithInterceptors(e,t,i,n,o,s,r){if(!e&&"\n"===r){const e=[];for(let t=0,s=o.length;t{const i=e.get(Aa).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=document.activeElement;return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(Aa).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){const n=this.runEditorCommand(e,t,i);return n||!0}}!function(t){class i extends yx{constructor(e){super(e),this._minimalReveal=e.minimalReveal,this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement();e.setCursorStates(t.source,3,[dx.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)])&&e.revealPrimaryCursor(t.source,!0,this._minimalReveal)}}t.MoveTo=rp(new i({id:"_moveTo",minimalReveal:!0,inSelectionMode:!1,precondition:void 0})),t.MoveToSelect=rp(new i({id:"_moveToSelect",minimalReveal:!1,inSelectionMode:!0,precondition:void 0}));class n extends yx{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);e.setCursorStates(t.source,3,i.viewStates.map((e=>Ky.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source)}}t.ColumnSelect=rp(new class extends n{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){const o=e.model.validatePosition(n.position),s=e.coordinatesConverter.validateViewPosition(new Ki(n.viewPosition.lineNumber,n.viewPosition.column),o),r=n.doColumnSelect?i.fromViewLineNumber:s.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return Xy.columnSelect(e.cursorConfig,e,r,a,s.lineNumber,n.mouseColumn-1)}}),t.CursorColumnSelectLeft=rp(new class extends n{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return Xy.columnSelectLeft(e.cursorConfig,e,i)}}),t.CursorColumnSelectRight=rp(new class extends n{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return Xy.columnSelectRight(e.cursorConfig,e,i)}});class o extends n{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return Xy.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}t.CursorColumnSelectUp=rp(new o({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:3600,linux:{primary:0}}})),t.CursorColumnSelectPageUp=rp(new o({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:3595,linux:{primary:0}}}));class s extends n{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return Xy.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}t.CursorColumnSelectDown=rp(new s({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:3602,linux:{primary:0}}})),t.CursorColumnSelectPageDown=rp(new s({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:3596,linux:{primary:0}}}));class r extends yx{constructor(){super({id:"cursorMove",precondition:void 0,description:hx.description})}runCoreEditorCommand(e,t){const i=hx.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,r._move(e,e.getCursorStates(),i)),e.revealPrimaryCursor(t,!0)}static _move(e,t,i){const n=i.select,o=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return dx.simpleMove(e,t,i.direction,n,o,i.unit);case 11:case 13:case 12:case 14:return dx.viewportMove(e,t,i.direction,n,o);default:return null}}}t.CursorMoveImpl=r,t.CursorMove=rp(new r);class a extends yx{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.pageSize||e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,dx.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}t.CursorLeft=rp(new a({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),t.CursorLeftSelect=rp(new a({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:1039}})),t.CursorRight=rp(new a({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),t.CursorRightSelect=rp(new a({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:1041}})),t.CursorUp=rp(new a({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),t.CursorUpSelect=rp(new a({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),t.CursorPageUp=rp(new a({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:11}})),t.CursorPageUpSelect=rp(new a({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:1035}})),t.CursorDown=rp(new a({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),t.CursorDownSelect=rp(new a({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),t.CursorPageDown=rp(new a({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:12}})),t.CursorPageDownSelect=rp(new a({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:1036}})),t.CreateCursor=rp(new class extends yx{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){let i;i=t.wholeLine?dx.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):dx.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const o=i.modelState?i.modelState.position:null,s=i.viewState?i.viewState.position:null;for(let i=0,r=n.length;is&&(o=s);const r=new Gi(o,1,o,e.model.getLineMaxColumn(o));let a=0;if(i.at)switch(i.at){case Sx.RawAtArgument.Top:a=3;break;case Sx.RawAtArgument.Center:a=1;break;case Sx.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,l,a,0)}}),t.SelectAll=new class extends kx{constructor(){super(fp)}runDOMCommand(){Yr&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[dx.selectAll(e,e.getPrimaryCursorState())])}},t.SetSelection=rp(new class extends yx{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[Ky.fromModelSelection(t.selection)])}})}(Ex||(Ex={}));const Dx=og.and(vx.textInputFocus,vx.columnSelection);function Ix(e,t){qg.registerKeybindingRule({id:e,primary:t,when:Dx,weight:1})}function Lx(e){return e.register(),e}var Nx,Tx;Ix(Ex.CursorColumnSelectLeft.id,1039),Ix(Ex.CursorColumnSelectRight.id,1041),Ix(Ex.CursorColumnSelectUp.id,1040),Ix(Ex.CursorColumnSelectPageUp.id,1035),Ix(Ex.CursorColumnSelectDown.id,1042),Ix(Ex.CursorColumnSelectPageDown.id,1036),function(e){class t extends ip{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=rp(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:vx.writable,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,fx.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=rp(new class extends t{constructor(){super({id:"outdent",precondition:vx.writable,kbOpts:{weight:0,kbExpr:og.and(vx.editorTextFocus,vx.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,fx.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=rp(new class extends t{constructor(){super({id:"tab",precondition:vx.writable,kbOpts:{weight:0,kbExpr:og.and(vx.editorTextFocus,vx.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,fx.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=rp(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,o]=rx.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(2)}}),e.DeleteRight=rp(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:vx.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,o]=rx.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(3)}}),e.Undo=new class extends kx{constructor(){super(pp)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(81))return t.getModel().undo()}},e.Redo=new class extends kx{constructor(){super(mp)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(81))return t.getModel().redo()}}}(Nx||(Nx={}));class Mx extends Zg{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(Aa).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function Rx(e,t){Lx(new Mx("default:"+e,e)),Lx(new Mx(e,e,t))}Rx("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),Rx("replacePreviousChar"),Rx("compositionType"),Rx("compositionStart"),Rx("compositionEnd"),Rx("paste"),Rx("cut");class Bx{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Ex.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){Ex.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){Ex.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Ex.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Ex.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){Ex.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){Ex.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){Ex.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){Ex.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){Ex.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){Ex.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){Ex.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){Ex.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){Ex.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class Ox{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return Ox.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i=Object.assign({},e);return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),i}}class Fx{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let o=0,s=0;for(let r=i;r<=n;r++){const i=r-this._rendLineNumberStart;e<=r&&r<=t&&(0===s?(o=i,s=1):s++)}if(e=i&&s<=n&&(this._lines[s-this._rendLineNumberStart].onContentChanged(),o=!0);return o}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>o)return null;if(i+e>o){return this._lines.splice(e-this._rendLineNumberStart,o-e+1)}const s=[];for(let e=0;ei)continue;const r=Math.max(t,s.fromLineNumber),a=Math.min(i,s.toLineNumber);for(let e=r;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class Px{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new Fx((()=>this._host.createVisibleLine()))}_createDomNode(){const e=sa(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(131)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;et){const e=t,s=Math.min(i,o.rendLineNumberStart-1);e<=s&&(this._insertLinesBefore(o,e,s,n,t),o.linesLength+=s-e+1)}else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,e),o.linesLength-=e)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1i){const e=Math.max(0,i-o.rendLineNumberStart+1),t=o.linesLength-1-e+1;t>0&&(this._removeLinesAfter(o,t),o.linesLength-=t)}return this._finishRendering(o,!1,n),o}_renderUntouchedLines(e,t,i,n,o){const s=e.rendLineNumberStart,r=e.lines;for(let e=t;e<=i;e++){const t=s+e;r[e].layoutLine(t,n[t-o])}}_insertLinesBefore(e,t,i,n,o){const s=[];let r=0;for(let e=t;e<=i;e++)s[r++]=this.host.createVisibleLine();e.lines=s.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;t--){const i=e.lines[t];n[t]&&(i.setDomNode(s),s=s.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");zx._ttPolicy&&(t=zx._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;te}),zx._sb=Ga(1e5);class Vx extends AA{constructor(e){super(e),this._visibleLines=new Px(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ee.shouldRender()));for(let i=0,n=t.length;i'),n.appendASCIIString(o),n.appendASCIIString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class Wx extends Vx{constructor(e){super(e);const t=this._context.configuration.options.get(131);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(131);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class Ux extends Vx{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(131);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),ra(this.domNode,t.get(44))}onConfigurationChanged(e){const t=this._context.configuration.options;ra(this.domNode,t.get(44));const i=t.get(131);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class Qx{constructor(e,t){this._coordinateBrand=void 0,this.top=e,this.left=t}}class jx extends AA{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=sa(document.createElement("div")),bA.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=sa(document.createElement("div")),bA.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new Kx(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i){this._widgets[e.getId()].setPosition(t,i),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const i=e.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class Kx{constructor(e,t,i){this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=sa(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,o=n.get(131);this._fixedOverflowWidgets=n.get(36),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this._lineHeight=n.get(59),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(59),e.hasChanged(131)){const e=t.get(131);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range)}_setPosition(e){if(this._range=e,this._viewRange=null,this._range){const e=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(e.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(e.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(e))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(e,t){this._setPosition(e),this._preference=t,this._viewRange&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n,o){const s=e.top,r=s,a=t.top+this._lineHeight,l=s-n,c=r>=n,d=a,h=o.viewportHeight-a>=n;let u=e.left,g=t.left;return u+i>o.scrollLeft+o.viewportWidth&&(u=o.scrollLeft+o.viewportWidth-i),g+i>o.scrollLeft+o.viewportWidth&&(g=o.scrollLeft+o.viewportWidth-i),us){const e=r-(s-n);r-=e,i-=e}if(r=22,f=c+n<=d.height-22;return this._fixedOverflowWidgets?{fitsAbove:m,aboveTop:Math.max(l,22),aboveLeft:u,fitsBelow:f,belowTop:c,belowLeft:p}:{fitsAbove:m,aboveTop:s,aboveLeft:h,fitsBelow:f,belowTop:r,belowLeft:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new Qx(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];let i=t[0],n=t[0];for(const e of t)e.lineNumbern.lineNumber&&(n=e);let o=1073741824;for(const e of i.ranges)e.lefte.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),void("function"==typeof this._actual.afterRender&&Gx(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&Gx(this._actual.afterRender,this._actual,this._renderData.position)}}function Gx(e,t,...i){try{return e.call(t,...i)}catch(e){return null}}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .margin-view-overlays .current-line {\n\tdisplay: block;\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both {\n\tborder-right: 0;\n}\n",{});class Yx extends _b{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(131);this._lineHeight=t.get(59),this._renderLineHighlight=t.get(85),this._renderLineHighlightOnlyWhenFocus=t.get(86),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new Yi(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=this._selections.map((e=>e.positionLineNumber));t.sort(((e,t)=>e-t)),V(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const i=this._selections.every((e=>e.isEmpty()));return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(131);return this._lineHeight=t.get(59),this._renderLineHighlight=t.get(85),this._renderLineHighlightOnlyWhenFocus=t.get(86),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length;let s=0;const r=[];for(let e=i;e<=n;e++){const n=e-i;for(;s=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class $x extends Yx{_renderOne(e){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class qx extends Yx{_renderOne(e){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}zg(((e,t)=>{const i=e.getColor(Ab);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(bb)){const i=e.getColor(bb);i&&(t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),"hc"===e.type&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}}));Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcdr = core decorations rendering (div)\n*/\n.monaco-editor .lines-content .cdr {\n\tposition: absolute;\n}",{});class Jx extends _b{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=t.get(44).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=t.get(44).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,o=t.length;e{if(e.options.zIndext.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return in?1:Gi.compareRangesUsingStarts(e.range,t.range)}));const o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,r=[];for(let e=o;e<=s;e++){r[e-o]=""}this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber;for(let e=0,r=t.length;e',l=Math.max(r.range.startLineNumber,o),c=Math.min(r.range.endLineNumber,s);for(let e=l;e<=c;e++){i[e-o]+=a}}}_renderNormalDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber;let s=null,r=!1,a=null;for(let l=0,c=t.length;l';r[l]+=s}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class Xx extends Lt{onclick(e,t){this._register(Oh(e,wu.CLICK,(e=>t(new kh(e)))))}onmousedown(e,t){this._register(Oh(e,wu.MOUSE_DOWN,(e=>t(new kh(e)))))}onmouseover(e,t){this._register(Oh(e,wu.MOUSE_OVER,(e=>t(new kh(e)))))}onnonbubblingmouseout(e,t){this._register(Hh(e,(e=>t(new kh(e)))))}onkeydown(e,t){this._register(Oh(e,wu.KEY_DOWN,(e=>t(new vh(e)))))}onkeyup(e,t){this._register(Oh(e,wu.KEY_UP,(e=>t(new vh(e)))))}oninput(e,t){this._register(Oh(e,wu.INPUT,t))}onblur(e,t){this._register(Oh(e,wu.BLUR,t))}onfocus(e,t){this._register(Oh(e,wu.FOCUS,t))}ignoreGesture(e){Pp.ignoreTarget(e)}}const Zx=11;class eS extends Xx{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...e.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._mouseMoveMonitor=this._register(new Vp),this.onmousedown(this.bgDomNode,(e=>this._arrowMouseDown(e))),this.onmousedown(this.domNode,(e=>this._arrowMouseDown(e))),this._mousedownRepeatTimer=this._register(new _n),this._mousedownScheduleRepeatTimer=this._register(new fn)}_arrowMouseDown(e){this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet((()=>{this._mousedownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24)}),200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,zp,(e=>{}),(()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()})),e.preventDefault()}}class tS extends Lt{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new fn)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)}),0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}class iS extends Xx{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new tS(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new Vp),this._shouldRender=!0,this.domNode=sa(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,(e=>this._domNodeMouseDown(e)))}_createArrow(e){const t=this._register(new eS(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=sa(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,(e=>{e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{})))})),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderMousePosition(e);i<=o&&o<=n?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{}))):this._onMouseDown(e)}_onMouseDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,i=e.browserEvent.offsetY;else{const n=tu(this.domNode.domNode);t=e.posx-n.left,i=e.posy-n.top}const n=this._mouseDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{})))}_sliderMouseDown(e,t){const i=this._sliderMousePosition(e),n=this._sliderOrthogonalMousePosition(e),o=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,zp,(e=>{const t=this._sliderOrthogonalMousePosition(e),s=Math.abs(t-n);if(f&&s>140)return void this._setDesiredScrollPositionNow(o.getScrollPosition());const r=this._sliderMousePosition(e)-i;this._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta(r))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}class nS{constructor(e,t,i,n,o,s){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=o,this._scrollPosition=s,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new nS(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,o){const s=Math.max(0,i-e),r=Math.max(0,s-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(s),computedIsNeeded:a,computedSliderSize:Math.round(r),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(i*r/n))),c=(r-l)/(n-i),d=o*c;return{computedAvailableSize:Math.round(s),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:c,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){const e=nS._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return tthis._host.onMouseWheel(new Dh(null,1,0))}),this._createArrow({className:"scra",icon:ys.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new Dh(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class sS extends iS{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new nS(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-Zx)/2,i=(t.verticalScrollbarSize-Zx)/2;this._createArrow({className:"scra",icon:ys.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Dh(null,0,1))}),this._createArrow({className:"scra",icon:ys.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Dh(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class rS{constructor(e,t,i,n,o,s,r){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,i|=0,n|=0,o|=0,s|=0,r|=0),this.rawScrollLeft=n,this.rawScrollTop=r,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),o<0&&(o=0),r+o>s&&(r=s-o),r<0&&(r=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=o,this.scrollHeight=s,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new rS(this._forceIntegerValues,void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new rS(this._forceIntegerValues,this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,o=this.scrollLeft!==e.scrollLeft,s=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:o,heightChanged:s,scrollHeightChanged:r,scrollTopChanged:a}}}class aS extends Lt{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new zt),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new rS(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){const i=this._state.withScrollDimensions(e,t);this._setState(i,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new dS(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=dS.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class lS{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function cS(e,t){const i=t-e;return function(t){return e+i*function(e){return 1-function(e){return Math.pow(e,3)}(1-e)}(t)}}class dS{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){let r,a;return e .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n",{});class hS{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class uS{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;for(;;){const o=n===this._front?e:Math.pow(2,-i);if(e-=o,t+=this._memory[n].score*o,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}return t<=.5}accept(e,t,i){const n=new hS(e,t,i);n.score=this._computeScore(n),-1===this._front&&-1===this._rear?(this._memory[0]=n,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return(-1!==this._front||-1!==this._rear)&&this._memory[this._rear],this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}uS.INSTANCE=new uS;class gS extends Xx{constructor(e,t,i){super(),this._onScroll=this._register(new zt),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new zt),e.style.overflow="hidden",this._options=function(e){const t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,_&&(t.className+=" mac");return t}(t),this._scrollable=i,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new sS(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new oS(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=sa(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=sa(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=sa(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e))),this.onnonbubblingmouseout(this._listenOnDomNode,(e=>this._onMouseOut(e))),this._hideTimeout=this._register(new fn),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=Et(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,_&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontal&&(this._options.horizontal=e.horizontal),void 0!==e.vertical&&(this._options.vertical=e.vertical),void 0!==e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),void 0!==e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),void 0!==e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Et(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new Dh(e))};this._mouseWheelToDispose.push(Oh(this._listenOnDomNode,wu.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){const t=uS.INSTANCE;{const i=window.devicePixelRatio/Kr();f||A?t.accept(Date.now(),e.deltaX/i,e.deltaY/i):t.accept(Date.now(),e.deltaX,e.deltaY)}let i=!1;if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(n)>=Math.abs(o)?o=0:n=0),this._options.flipAxes&&([n,o]=[o,n]);const s=!_&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!s||o||(o=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);const r=this._scrollable.getFutureScrollPosition();let a={};if(n){const e=50*n,t=r.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,t)}if(o){const e=50*o,t=r.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}if(a=this._scrollable.validateScrollPosition(a),r.scrollLeft!==a.scrollLeft||r.scrollTop!==a.scrollTop){this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),i=!0}}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",o=t?" top":"",s=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${s}${o}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),500)}}class pS extends gS{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new aS({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>Qh(e)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class mS extends gS{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class fS extends gS{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new aS({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>Qh(e)});super(e,t,i),this._register(i),this._element=e,this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}class _S extends AA{constructor(e,t,i,n){super(e);const o=this._context.configuration.options,s=o.get(92),r=o.get(67),a=o.get(34),l=o.get(95),c={listenOnDomNode:i.domNode,className:"editor-scrollable "+Og(e.theme.type),useShadows:!1,lazyRender:!0,vertical:s.vertical,horizontal:s.horizontal,verticalHasArrows:s.verticalHasArrows,horizontalHasArrows:s.horizontalHasArrows,verticalScrollbarSize:s.verticalScrollbarSize,verticalSliderSize:s.verticalSliderSize,horizontalScrollbarSize:s.horizontalScrollbarSize,horizontalSliderSize:s.horizontalSliderSize,handleMouseWheel:s.handleMouseWheel,alwaysConsumeMouseWheel:s.alwaysConsumeMouseWheel,arrowSize:s.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:s.scrollByPage};this.scrollbar=this._register(new mS(t.domNode,c,this._context.viewLayout.getScrollable())),bA.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=sa(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const d=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.model.setScrollPosition(n,1)};this._register(Oh(i.domNode,"scroll",(e=>d(i.domNode,!0,!0)))),this._register(Oh(t.domNode,"scroll",(e=>d(t.domNode,!0,!1)))),this._register(Oh(n.domNode,"scroll",(e=>d(n.domNode,!0,!1)))),this._register(Oh(this.scrollbarDomNode.domNode,"scroll",(e=>d(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(131);this.scrollbarDomNode.setLeft(t.contentLeft);"right"===e.get(65).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){if(e.hasChanged(92)||e.hasChanged(67)||e.hasChanged(34)){const e=this._context.configuration.options,t=e.get(92),i=e.get(67),n=e.get(34),o=e.get(95),s={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:o};this.scrollbar.updateOptions(s)}return e.hasChanged(131)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+Og(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}zg(((e,t)=>{const i=e.getColor(Tm);i&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tbox-shadow: ${i} 0 6px 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tbox-shadow: ${i} 6px 0 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\tbox-shadow: ${i} 6px 6px 6px -6px inset;\n\t\t\t}\n\t\t`);const n=e.getColor(Mm);n&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\tbackground: ${n};\n\t\t\t}\n\t\t`);const o=e.getColor(Rm);o&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\tbackground: ${o};\n\t\t\t}\n\t\t`);const s=e.getColor(Bm);s&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\tbackground: ${s};\n\t\t\t}\n\t\t`)}));Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .glyph-margin {\n\tposition: absolute;\n\ttop: 0;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcgmr = core glyph margin rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cgmr {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n",{});class AS{constructor(e,t,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class bS extends _b{_render(e,t,i){const n=[];for(let i=e;i<=t;i++){n[i-e]=[]}if(0===i.length)return n;i.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',r=[];for(let e=t;e<=i;e++){const i=e-t,o=n[i];0===o.length?r[i]="":r[i]='
=this._renderResult.length?"":this._renderResult[i]}}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .lines-content .core-guide {\n\tposition: absolute;\n\tbox-sizing: border-box;\n}\n",{});class CS extends _b{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(132),n=t.get(44);this._lineHeight=t.get(59),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(132),n=t.get(44);return this._lineHeight=t.get(59),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),!0}onCursorStateChanged(e){var t;const i=e.selections[0].getPosition();return!(null===(t=this._primaryPosition)||void 0===t?void 0:t.equals(i))&&(this._primaryPosition=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var t,i,n,o;if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const s=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,a=e.scrollWidth,l=this._lineHeight,c=this._primaryPosition,d=this.getGuidesByLine(s,r,c),h=[];for(let c=s;c<=r;c++){const r=c-s,u=d[r];let g="";const p=null!==(i=null===(t=e.visibleRangeForPosition(new Ki(c,1)))||void 0===t?void 0:t.left)&&void 0!==i?i:0;for(const t of u){const i=p+(t.visibleColumn-1)*this._spaceWidth;if(i>a||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;const s=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",r=t.horizontalLine?(null!==(o=null===(n=e.visibleRangeForPosition(new Ki(c,t.horizontalLine.endColumn)))||void 0===n?void 0:n.left)&&void 0!==o?o:i+this._spaceWidth)-i:this._spaceWidth;g+=`
`}h[r]=g}this._renderResult=h}getGuidesByLine(e,t,i){const n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.model.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?PC.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?PC.EnabledForActive:PC.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,o=this._bracketPairGuideOptions.indentation?this._context.model.getLinesIndentGuides(e,t):null;let s=0,r=0,a=0;if(this._bracketPairGuideOptions.highlightActiveIndentation&&i){const n=this._context.model.getActiveIndentGuide(i.lineNumber,e,t);s=n.startLineNumber,r=n.endLineNumber,a=n.indent}const{indentSize:l}=this._context.model.getTextModelOptions(),c=[];for(let i=e;i<=t;i++){const t=new Array;c.push(t);const d=n?n[i-e]:[],h=new ae(d),u=o?o[i-e]:[];for(let e=1;e<=u;e++){const n=(e-1)*l+1,o=0===d.length&&s<=i&&i<=r&&e===a;t.push(...h.takeWhile((e=>e.visibleColumn!0))||[])}return c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function vS(e){if(!e||!e.isTransparent())return e}zg(((e,t)=>{const i=e.getColor(kb);i&&t.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=e.getColor(Db)||i;n&&t.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${n} inset; }`);const o=[{bracketColor:Yb,guideColor:tw,guideColorActive:aw},{bracketColor:$b,guideColor:iw,guideColorActive:lw},{bracketColor:qb,guideColor:nw,guideColorActive:cw},{bracketColor:Jb,guideColor:ow,guideColorActive:dw},{bracketColor:Xb,guideColor:sw,guideColorActive:hw},{bracketColor:Zb,guideColor:rw,guideColorActive:uw}],s=new JC,r=o.map((t=>{var i,n;const o=e.getColor(t.bracketColor),s=e.getColor(t.guideColor),r=e.getColor(t.guideColorActive),a=vS(null!==(i=vS(s))&&void 0!==i?i:null==o?void 0:o.transparent(.3)),l=vS(null!==(n=vS(r))&&void 0!==n?n:o);if(a&&l)return{guideColor:a,guideColorActive:l}})).filter(pe);if(r.length>0){for(let e=0;e<30;e++){const i=r[e%r.length];t.addRule(`.monaco-editor .${s.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${s.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${s.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${s.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}}));Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* Uncomment to see lines flashing when they're painted */\n/*.monaco-editor .view-lines > .view-line {\n\tbackground-color: none;\n\tanimation-name: flash-background;\n\tanimation-duration: 800ms;\n}\n@keyframes flash-background {\n\t0% { background-color: lightgreen; }\n\t100% { background-color: none }\n}*/\n\n.mtkcontrol {\n\tcolor: rgb(255, 255, 255) !important;\n\tbackground: rgb(150, 0, 0) !important;\n}\n\n.monaco-editor.no-user-select .lines-content,\n.monaco-editor.no-user-select .view-line,\n.monaco-editor.no-user-select .view-lines {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n.monaco-editor .view-lines {\n\twhite-space: nowrap;\n}\n\n.monaco-editor .view-line {\n\tposition: absolute;\n\twidth: 100%;\n}\n\n.monaco-editor .mtkz {\n\tdisplay: inline-block;\n}\n\n/* TODO@tokenization bootstrap fix */\n/*.monaco-editor .view-line > span > span {\n\tfloat: none;\n\tmin-height: inherit;\n\tmargin-left: inherit;\n}*/\n",{});class yS{constructor(){this._currentVisibleRange=new Gi(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class xS{constructor(e,t,i,n,o,s,r){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=o,this.stopScrollTop=s,this.scrollType=r,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class SS{constructor(e,t,i,n,o){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=o,this.type="selections";let s=t[0].startLineNumber,r=t[0].endLineNumber;for(let e=1,i=t.length;e{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new An((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new yS,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new TA(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(132)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(44),n=t.get(132),o=t.get(131);return this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(89),this._horizontalScrollbarHeight=o.horizontalScrollbarHeight,this._cursorSurroundingLines=t.get(25),this._cursorSurroundingLinesStyle=t.get(26),this._canUseLayerHinting=!t.get(28),ra(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(131)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new NA(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++){this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions)}return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new xS(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new SS(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.model.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(n))return new Ki(n,1);const o=this._visibleLines.getStartLineNumber(),s=this._visibleLines.getEndLineNumber();if(ns)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const a=this._context.model.getLineMinColumn(n);return ri?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=Gi.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let o=[],s=0;const r=new LA(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Ki(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(ec)continue;const d=e===n.startLineNumber?n.startColumn:1,h=e===n.endLineNumber?n.endColumn:this._context.model.getLineMaxColumn(e),u=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,d,h,r);if(u){if(t&&ethis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,new LA(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new SA(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,o=!0;for(let s=t;s<=i;s++){const t=this._visibleLines.getVisibleLine(s);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth()):o=!1}return o&&1===t&&i===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let o=i;o<=n;o++){const i=this._visibleLines.getVisibleLine(o);if(i.needsMonospaceFontCheck()){const n=i.getWidth();n>t&&(t=n,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++){this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),A&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++){if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let e=o[0].startLineNumber,t=o[0].endLineNumber;for(let i=1,n=o.length;ia){if(!c)return-1;u=d}else if(5===s||6===s)if(6===s&&r<=d&&h<=l)u=r;else{const e=d-Math.max(5*this._lineHeight,.2*a),t=h-a;u=Math.max(t,e)}else if(1===s||2===s)if(2===s&&r<=d&&h<=l)u=r;else{const e=(d+h)/2;u=Math.max(0,e-a/2)}else u=this._computeMinimumScrolling(r,l,d,h,3===s,4===s);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=t.left,n=i+t.width;let o=1073741824,s=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)o=Math.min(o,Math.round(e.left)),s=Math.max(s,Math.round(e.left+e.width))}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)o=Math.min(o,Math.round(t.left)),s=Math.max(s,Math.round(t.left+t.width))}if(e.minimalReveal||(o=Math.max(0,o-ES.HORIZONTAL_EXTRA_PX),s+=this._revealHorizontalRightPadding),"selections"===e.type&&s-o>t.width)return null;return{scrollLeft:this._computeMinimumScrolling(i,n,o,s),maxHorizontalOffset:s}}_computeMinimumScrolling(e,t,i,n,o,s){o=!!o,s=!!s;const r=(t|=0)-(e|=0);return(n|=0)-(i|=0)t?Math.max(0,n-r):e:i}}ES.HORIZONTAL_EXTRA_PX=30;Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .lines-decorations {\n\tposition: absolute;\n\ttop: 0;\n\tbackground: white;\n}\n\n/*\n\tKeeping name short for faster parsing.\n\tcldr = core lines decorations rendering (div)\n*/\n.monaco-editor .margin-view-overlays .cldr {\n\tposition: absolute;\n\theight: 100%;\n}",{});class kS extends bS{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(131);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(131);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let e=0,o=t.length;e
',s=[];for(let e=t;e<=i;e++){const i=e-t,r=n[i];let a="";for(let e=0,t=r.length;e';o[i]=r}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* START cover the case that slider is visible on mouseover */\n.monaco-editor .minimap.slider-mouseover .minimap-slider {\n\topacity: 0;\n\ttransition: opacity 100ms linear;\n}\n.monaco-editor .minimap.slider-mouseover:hover .minimap-slider {\n\topacity: 1;\n}\n.monaco-editor .minimap.slider-mouseover .minimap-slider.active {\n\topacity: 1;\n}\n/* END cover the case that slider is visible on mouseover */\n\n.monaco-editor .minimap-shadow-hidden {\n\tposition: absolute;\n\twidth: 0;\n}\n.monaco-editor .minimap-shadow-visible {\n\tposition: absolute;\n\tleft: -6px;\n\twidth: 6px;\n}\n.monaco-editor.no-minimap-shadow .minimap-shadow-visible {\n\tposition: absolute;\n\tleft: -1px;\n\twidth: 1px;\n}\n",{});class IS{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=IS._clamp(e),this.g=IS._clamp(t),this.b=IS._clamp(i),this.a=IS._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}IS.Empty=new IS(0,0,0,0);class LS extends Lt{constructor(){super(),this._onDidChange=new zt,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(er.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}static getInstance(){return this._INSTANCE||(this._INSTANCE=new LS),this._INSTANCE}_updateColorMap(){const e=er.getColorMap();if(!e)return this._colors=[IS.Empty],void(this._backgroundIsLight=!0);this._colors=[IS.Empty];for(let t=1;t=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}LS._INSTANCE=null;const NS=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();class TS{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=TS.soften(e,.8),this.charDataLight=TS.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,o=e.length;ne.width||i+g>e.height)return void console.warn("bad render request outside image data");const p=c?this.charDataLight:this.charDataNormal,m=((e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e)(n,l),f=4*e.width,_=r.r,A=r.g,b=r.b,w=o.r-_,C=o.g-A,v=o.b-b,y=Math.max(s,a),x=e.data;let S=m*h*u,E=i*f+4*t;for(let e=0;ee.width||i+d>e.height)return void console.warn("bad render request outside image data");const h=4*e.width,u=o/255*.5,g=s.r,p=s.g,m=s.b,f=g+(n.r-g)*u,_=p+(n.g-p)*u,A=m+(n.b-m)*u,b=Math.max(o,r),w=e.data;let C=i*h+4*t;for(let e=0;e{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i>1]=MS[e[i]]<<4|15&MS[e[i+1]];return t},BS={1:vt((()=>RS("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:vt((()=>RS("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class OS{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=BS[e]?new TS(BS[e](),e):OS.createFromSampleData(OS.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const e of NS)i.fillText(String.fromCharCode(e),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");const i=OS._downsample(e,t);return new TS(i,t)}static _downsampleChar(e,t,i,n,o){const s=1*o,r=2*o;let a=n,l=0;for(let n=0;n0){const e=255/a;for(let t=0;tOS.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=FS._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=FS._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(H_);return i?new IS(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(W_);return t?IS._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class PS{constructor(e,t,i,n,o,s,r,a){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=o,this.sliderHeight=s,this.startLineNumber=r,this.endLineNumber=a}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,i,n,o,s,r,a,l,c,d){const h=e.pixelRatio,u=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/u),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){const t=a*e.lineHeight+(e.scrollBeyondLastLine?o-e.lineHeight:0),i=Math.max(1,Math.floor(o*o/t)),n=Math.max(0,e.minimapHeight-i),s=n/(c-o),d=l*s,h=n>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new PS(l,c,h,s,d,i,1,Math.min(r,u))}let m,f;if(s&&i!==r){const e=i-t+1;m=Math.floor(e*u/h)}else{const e=o/p;m=Math.floor(e*u/h)}f=e.scrollBeyondLastLine?(r-1)*u/h:Math.max(0,r*u/h-m),f=Math.min(e.minimapHeight-m,f);const _=f/(c-o),A=l*_;let b=0;if(e.scrollBeyondLastLine){b=o/p-1}if(g>=r+b){return new PS(l,c,f>0,_,A,m,1,r)}{let e=Math.max(1,Math.floor(t-A*h/u));d&&d.scrollHeight===c&&(d.scrollTop>l&&(e=Math.min(e,d.startLineNumber)),d.scrollTopzS.INVALID)),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let e=0,i=t.length;e1){for(let t=0,i=r-1;t0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let o=this.minimapLines.length-1;o>=0&&!(this.minimapLines[o]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=WS.compute(this.options,this._context.model.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(e){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[e-1]):this._context.model.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.model.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.model.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let o=0,s=t-e+1;o{e.preventDefault();if(0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(e.leftButton&&this._lastRenderData){const t=tu(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e.buttons,e.posx,i,e.posy,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.browserEvent.offsetY;let n=Math.floor(i/t)+this._lastRenderData.renderedLayout.startLineNumber;n=Math.min(n,this._model.getLineCount()),this._model.revealLineNumber(n)})),this._sliderMouseMoveMonitor=new Vp,this._sliderMouseDownListener=Ph(this._slider.domNode,"mousedown",(e=>{e.preventDefault(),e.stopPropagation(),e.leftButton&&this._lastRenderData&&this._startSliderDragging(e.buttons,e.posx,e.posy,e.posy,this._lastRenderData.renderedLayout)})),this._gestureDisposable=Pp.addTarget(this._domNode.domNode),this._sliderTouchStartListener=Oh(this._domNode.domNode,Op.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=Oh(this._domNode.domNode,Op.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=Ph(this._domNode.domNode,Op.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i,n,o){this._slider.toggleClassName("active",!0);const s=(e,n)=>{const s=Math.abs(n-t);if(f&&s>140)return void this._model.setScrollTop(o.scrollTop);const r=e-i;this._model.setScrollTop(o.getDesiredScrollTopFromDelta(r))};n!==i&&s(n,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,zp,(e=>s(e.posy,e.posx)),(()=>{this._slider.toggleClassName("active",!1)}))}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return"always"===this._model.options.showSlider?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new HS(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(P_),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=PS.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(Gi.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort(((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0)));const{canvasInnerWidth:n,canvasInnerHeight:o}=this._model.options,s=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,o);const c=new jS(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,c,e,s),this._renderDecorationsLineHighlights(l,i,c,e,s);const d=new jS(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,d,e,s,a,r,n),this._renderDecorationsHighlights(l,i,d,e,s,a,r,n)}}_renderSelectionLineHighlights(e,t,i,n,o){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let s=0,r=0;for(const a of t){const t=Math.max(n.startLineNumber,a.startLineNumber),l=Math.min(n.endLineNumber,a.endLineNumber);if(t>l)continue;for(let e=t;e<=l;e++)i.set(e,!0);const c=(t-n.startLineNumber)*o,d=(l-n.startLineNumber)*o+o;r>=c||(r>s&&e.fillRect(8,s,e.canvas.width,r-s),s=c),r=d}r>s&&e.fillRect(8,s,e.canvas.width,r-s)}_renderDecorationsLineHighlights(e,t,i,n,o){const s=new Map;for(let r=t.length-1;r>=0;r--){const a=t[r],l=a.options.minimap;if(!l||l.position!==qi.Inline)continue;const c=Math.max(n.startLineNumber,a.range.startLineNumber),d=Math.min(n.endLineNumber,a.range.endLineNumber);if(c>d)continue;const h=l.getColor(this._theme.value);if(!h||h.isTransparent())continue;let u=s.get(h.toString());u||(u=h.transparent(.5).toString(),s.set(h.toString(),u)),e.fillStyle=u;for(let t=c;t<=d;t++){if(i.has(t))continue;i.set(t,!0);const s=(c-n.startLineNumber)*o;e.fillRect(8,s,e.canvas.width,o)}}}_renderSelectionsHighlights(e,t,i,n,o,s,r,a){if(this._selectionColor&&!this._selectionColor.isTransparent())for(const l of t){const t=Math.max(n.startLineNumber,l.startLineNumber),c=Math.min(n.endLineNumber,l.endLineNumber);if(!(t>c))for(let d=t;d<=c;d++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,d,o,o,s,r,a)}}_renderDecorationsHighlights(e,t,i,n,o,s,r,a){for(const l of t){const t=l.options.minimap;if(!t)continue;const c=Math.max(n.startLineNumber,l.range.startLineNumber),d=Math.min(n.endLineNumber,l.range.endLineNumber);if(c>d)continue;const h=t.getColor(this._theme.value);if(h&&!h.isTransparent())for(let u=c;u<=d;u++)switch(t.position){case qi.Inline:this.renderDecorationOnLine(e,i,l.range,h,n,u,o,o,s,r,a);continue;case qi.Gutter:{const t=(u-n.startLineNumber)*o,i=2;this.renderDecoration(e,h,i,t,2,o);continue}}}}renderDecorationOnLine(e,t,i,n,o,s,r,a,l,c,d){const h=(s-o.startLineNumber)*a;if(h+r<0||h>this._model.options.canvasInnerHeight)return;const{startLineNumber:u,endLineNumber:g}=i,p=u===s?i.startColumn:1,m=g===s?i.endColumn:this._model.getLineMaxColumn(s),f=this.getXOffsetForPosition(t,s,p,l,c,d),_=this.getXOffsetForPosition(t,s,m,l,c,d);this.renderDecoration(e,n,f,h,_-f,r)}getXOffsetForPosition(e,t,i,n,o,s){if(1===i)return 8;if((i-1)*o>=s)return s;let r=e.get(t);if(!r){const i=this._model.getLineContent(t);r=[8];let a=8;for(let e=1;e=s){r[e]=s;break}r[e]=l,a=l}e.set(t,r)}return i-1b?Math.floor((n-b)/2):0,C=h.a/255,v=new IS(Math.round((h.r-d.r)*C+d.r),Math.round((h.g-d.g)*C+d.g),Math.round((h.b-d.b)*C+d.b),255);let y=0;const x=[];for(let e=0,s=i-t+1;e=0&&o_)return;const r=m.charCodeAt(w);if(9===r){const e=h-(w+C)%h;C+=e-1,b+=e*s}else if(32===r)b+=s;else{const h=uo(r)?2:1;for(let u=0;u_)return}}}}}class jS{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let e=0,t=this._endLineNumber-this._startLineNumber+1;ethis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}zg(((e,t)=>{const i=e.getColor(U_);i&&t.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${i}; }`);const n=e.getColor(Q_);n&&t.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${n}; }`);const o=e.getColor(j_);o&&t.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${o}; }`);const s=e.getColor(Tm);s&&t.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${s} -6px 0 6px -6px inset; }`)}));Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .overlayWidgets {\n\tposition: absolute;\n\ttop: 0;\n\tleft:0;\n}",{});class KS extends AA{constructor(e){super(e);const t=this._context.configuration.options.get(131);this._widgets={},this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,this._domNode=sa(document.createElement("div")),bA.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(131);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=sa(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference!==t&&(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.parentNode.removeChild(e),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){const e=t.domNode.clientHeight;t.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let e=0,i=t.length;e=3){const t=Math.floor(n/3),i=Math.floor(n/3),o=n-t-i,s=e+t;return[[0,e,s,e,e+t+o,e,s,e],[0,t,o,t+o,i,t+o+i,o+i,t+o+i]]}if(2===i){const t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class YS extends AA{constructor(e){super(e),this._domNode=sa(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=er.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new GS(this._context.configuration,this._context.theme);return(!this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;tt&&(e=t-a),_=e-a,A=e+a}_>p+1||s!==u?(0!==e&&l.fillRect(c[u],g,d[u],p-g),u=s,g=_,p=A):A>p&&(p=A)}l.fillRect(c[u],g,d[u],p-g)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,i=e/2|0,s=this._settings.x[7],r=this._settings.w[7];l.fillStyle=this._settings.cursorColor;let a=-100,c=-100;for(let d=0,h=this._cursorPositions.length;dt&&(u=t-i);const g=u-i,p=g+e;g>c+1?(0!==d&&l.fillRect(s,a,r,c-a),a=g,c=p):p>c&&(c=p)}l.fillRect(s,a,r,c-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())}}class $S{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class qS{constructor(e,t,i){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.color=i,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.colori&&(d=i-h);const u=a.color;let g=this._color2Id[u];g||(g=++this._lastAssignedId,this._color2Id[u]=g,this._id2Color[g]=u);const p=new $S(d-h,d+h,g);a.setColorZone(p),s.push(p)}return this._colorZonesInvalid=!1,s.sort($S.compare),s}}class XS extends _A{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=sa(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new JS((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(59)),this._zoneManager.setPixelRatio(i.get(129)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(59)&&(this._zoneManager.setLineHeight(t.get(59)),this._render()),e.hasChanged(129)&&(this._zoneManager.setPixelRatio(t.get(129)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(o,i,n,e),!0}_renderOneLane(e,t,i,n){let o=0,s=0,r=0;for(const a of t){const t=a.colorId,l=a.from,c=a.to;t!==o?(e.fillRect(0,s,n,r-s),o=t,e.fillStyle=i[o],s=l,r=c):r>=l?r=Math.max(r,c):(e.fillRect(0,s,n,r-s),s=l,r=c)}e.fillRect(0,s,n,r-s)}}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .view-ruler {\n\tposition: absolute;\n\ttop: 0;\n}",{});class ZS extends AA{constructor(e){super(e),this.domNode=sa(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(91),this._typicalHalfwidthCharacterWidth=t.get(44).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(91),this._typicalHalfwidthCharacterWidth=t.get(44).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const e=sa(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),o--}return}let i=e-t;for(;i>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t{const i=e.getColor(Tb);i&&t.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${i} inset; }`)}));Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .scroll-decoration {\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\theight: 6px;\n}",{});class eE extends AA{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options.get(92);this._useShadows=t.useShadows,this._domNode=sa(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(131);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(92);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}zg(((e,t)=>{const i=e.getColor(Tm);i&&t.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${i} 0 6px 6px -6px inset; }`)}));Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/*\n\tKeeping name short for faster parsing.\n\tcslr = core selections layer rendering (div)\n*/\n.monaco-editor .lines-content .cslr {\n\tposition: absolute;\n}\n\n.monaco-editor\t\t\t.top-left-radius\t\t{ border-top-left-radius: 3px; }\n.monaco-editor\t\t\t.bottom-left-radius\t\t{ border-bottom-left-radius: 3px; }\n.monaco-editor\t\t\t.top-right-radius\t\t{ border-top-right-radius: 3px; }\n.monaco-editor\t\t\t.bottom-right-radius\t{ border-bottom-right-radius: 3px; }\n\n.monaco-editor.hc-black .top-left-radius\t\t{ border-top-left-radius: 0; }\n.monaco-editor.hc-black .bottom-left-radius\t\t{ border-bottom-left-radius: 0; }\n.monaco-editor.hc-black .top-right-radius\t\t{ border-top-right-radius: 0; }\n.monaco-editor.hc-black .bottom-right-radius\t{ border-bottom-right-radius: 0; }\n",{});class tE{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class iE{constructor(e,t){this.lineNumber=e,this.ranges=t}}function nE(e){return new tE(e)}function oE(e){return new iE(e.lineNumber,e.ranges.map(nE))}class sE extends _b{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(59),this._roundedSelection=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(44).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(59),this._roundedSelection=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(44).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0}return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let o=null,s=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!o&&e=0;e--)i[e].lineNumber===r&&(s=i[e].ranges[0]);o&&!o.startStyle&&(o=null),s&&!s.startStyle&&(s=null)}for(let e=0,i=t.length;e0){const i=t[e-1].ranges[0].left,o=t[e-1].ranges[0].left+t[e-1].ranges[0].width;rE(a-i)i&&(c.top=1),rE(l-o)'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const o=!!n[0].ranges[0].startStyle,s=this._lineHeight.toString(),r=(this._lineHeight-1).toString(),a=n[0].lineNumber,l=n[n.length-1].lineNumber;for(let c=0,d=n.length;c1,r)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function rE(e){return e<0?-e:e}sE.SELECTION_CLASS_NAME="selected-text",sE.SELECTION_TOP_LEFT="top-left-radius",sE.SELECTION_BOTTOM_LEFT="bottom-left-radius",sE.SELECTION_TOP_RIGHT="top-right-radius",sE.SELECTION_BOTTOM_RIGHT="bottom-right-radius",sE.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",sE.ROUNDED_PIECE_WIDTH=10,zg(((e,t)=>{const i=e.getColor(df);i&&t.addRule(`.monaco-editor .focused .selected-text { background-color: ${i}; }`);const n=e.getColor(uf);n&&t.addRule(`.monaco-editor .selected-text { background-color: ${n}; }`);const o=e.getColor(hf);o&&!o.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${o}; }`)}));Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .cursors-layer {\n\tposition: absolute;\n\ttop: 0;\n}\n\n.monaco-editor .cursors-layer > .cursor {\n\tposition: absolute;\n\toverflow: hidden;\n}\n\n/* -- smooth-caret-animation -- */\n.monaco-editor .cursors-layer.cursor-smooth-caret-animation > .cursor {\n\ttransition: all 80ms;\n}\n\n/* -- block-outline-style -- */\n.monaco-editor .cursors-layer.cursor-block-outline-style > .cursor {\n\tbox-sizing: border-box;\n\tbackground: transparent !important;\n\tborder-style: solid;\n\tborder-width: 1px;\n}\n\n/* -- underline-style -- */\n.monaco-editor .cursors-layer.cursor-underline-style > .cursor {\n\tborder-bottom-width: 2px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n\tbox-sizing: border-box;\n}\n\n/* -- underline-thin-style -- */\n.monaco-editor .cursors-layer.cursor-underline-thin-style > .cursor {\n\tborder-bottom-width: 1px;\n\tborder-bottom-style: solid;\n\tbackground: transparent !important;\n\tbox-sizing: border-box;\n}\n\n@keyframes monaco-cursor-smooth {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t60%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-phase {\n\t0%,\n\t20% {\n\t\topacity: 1;\n\t}\n\t90%,\n\t100% {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes monaco-cursor-expand {\n\t0%,\n\t20% {\n\t\ttransform: scaleY(1);\n\t}\n\t80%,\n\t100% {\n\t\ttransform: scaleY(0);\n\t}\n}\n\n.cursor-smooth {\n\tanimation: monaco-cursor-smooth 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-phase {\n\tanimation: monaco-cursor-phase 0.5s ease-in-out 0s 20 alternate;\n}\n\n.cursor-expand > .cursor {\n\tanimation: monaco-cursor-expand 0.5s ease-in-out 0s 20 alternate;\n}\n",{});class aE{constructor(e,t,i,n,o,s){this.top=e,this.left=t,this.width=i,this.height=n,this.textContent=o,this.textContentClassName=s}}class lE{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(44);this._cursorStyle=t.get(24),this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=sa(document.createElement("div")),this._domNode.setClassName(`cursor ${mw}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),ra(this._domNode,i),this._domNode.setDisplay("none"),this._position=new Ki(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(44);return this._cursorStyle=t.get(24),this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),ra(this._domNode,i),!0}onCursorPositionChanged(e){return this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.model.getLineContent(e),[n,o]=function(e,t){t>0&&Xn(e.charCodeAt(t))&&t--;const i=t+no(e,t);return[i-oo(e,i),i]}(i,t-1);return[new Ki(e,n+1),i.substring(n,o)]}_prepareRender(e){let t="";const[i,n]=this._getGraphemeAwarePosition();if(this._cursorStyle===Ge.Line||this._cursorStyle===Ge.LineThin){const o=e.visibleRangeForPosition(i);if(!o||o.outsideRenderedLine)return null;let s;this._cursorStyle===Ge.Line?(s=Tu(this._lineCursorWidth>0?this._lineCursorWidth:2),s>2&&(t=n)):s=Tu(1);let r=o.left;s>=2&&r>=1&&(r-=1);const a=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta;return new aE(a,r,s,this._lineHeight,t,"")}const o=e.linesVisibleRangesForRange(new Gi(i.lineNumber,i.column,i.lineNumber,i.column+n.length),!1);if(!o||0===o.length)return null;const s=o[0];if(s.outsideRenderedLine||0===s.ranges.length)return null;const r=s.ranges[0],a=r.width<1?this._typicalHalfwidthCharacterWidth:r.width;let l="";if(this._cursorStyle===Ge.Block){const e=this._context.model.getViewLineData(i.lineNumber);t=n;const o=e.tokens.findTokenIndexAtOffset(i.column-1);l=e.tokens.getClassName(o)}let c=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta,d=this._lineHeight;return this._cursorStyle!==Ge.Underline&&this._cursorStyle!==Ge.UnderlineThin||(c+=this._lineHeight-2,d=2),new aE(c,r.left,a,d,t,l)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${mw} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class cE extends AA{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(81),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new lE(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=sa(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new fn,this._cursorFlatBlinkInterval=new _n,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(81),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;tt.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t{for(let i=0,n=e.ranges.length;i{this._isVisible?this._hide():this._show()}),cE.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),cE.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case Ge.Line:e+=" cursor-line-style";break;case Ge.Block:e+=" cursor-block-style";break;case Ge.Underline:e+=" cursor-underline-style";break;case Ge.LineThin:e+=" cursor-line-thin-style";break;case Ge.BlockOutline:e+=" cursor-block-outline-style";break;case Ge.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const i=e.getColor(xb);if(i){let n=e.getColor(Sb);n||(n=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),"hc"===e.type&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}}));const dE=()=>{throw new Error("Invalid change accessor")};class hE extends AA{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(131);this._lineHeight=t.get(59),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=sa(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=sa(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let i=!1;return this._context.model.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let o=0,s=n.length;o{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};!function(e,t){try{return e(t)}catch(e){gt(e)}}(e,n),n.addZone=dE,n.removeZone=dE,n.layoutZone=dE})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:sa(t.domNode),marginDomNode:t.marginDomNode?sa(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){gt(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){gt(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const e of t)this._zones[e.id].isInHiddenArea||(i[e.id]=e,n=!0);const o=Object.keys(this._zones);for(let t=0,n=o.length;t{this._context.theme.update(e),this._context.model.onDidColorThemeChange(),this.render(!0,!1)}))),this._viewParts=[],this._textAreaHandler=new Aw(this._context,r,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=sa(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=sa(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=sa(document.createElement("div")),bA.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new _S(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new ES(this._context,this._linesContent),this._viewZones=new hE(this._context),this._viewParts.push(this._viewZones);const a=new YS(this._context);this._viewParts.push(a);const l=new eE(this._context);this._viewParts.push(l);const c=new Wx(this._context);this._viewParts.push(c),c.addDynamicOverlay(new $x(this._context)),c.addDynamicOverlay(new sE(this._context)),c.addDynamicOverlay(new CS(this._context)),c.addDynamicOverlay(new Jx(this._context));const d=new Ux(this._context);this._viewParts.push(d),d.addDynamicOverlay(new qx(this._context)),d.addDynamicOverlay(new wS(this._context)),d.addDynamicOverlay(new DS(this._context)),d.addDynamicOverlay(new kS(this._context)),d.addDynamicOverlay(new gw(this._context));const h=new pw(this._context);h.getDomNode().appendChild(this._viewZones.marginDomNode),h.getDomNode().appendChild(d.getDomNode()),this._viewParts.push(h),this._contentWidgets=new jx(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new cE(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new KS(this._context),this._viewParts.push(this._overlayWidgets);const u=new ZS(this._context);this._viewParts.push(u);const g=new US(this._context);if(this._viewParts.push(g),a){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(a.getDomNode(),e.insertBefore)}this._linesContent.appendChild(c.getDomNode()),this._linesContent.appendChild(u.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(h.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(l.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(g.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),s?s.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new fb(this._context,r,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new QA(e,t)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new Ki(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const e=this._context.configuration.options.get(131);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(128)+" "+Og(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=Uh(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){!function(e){try{return e()}catch(e){gt(e)}}((()=>this._actualRender()))}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!Rh(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return;const t=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new pE(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new CA(this._context.viewLayout,i,this._viewLines);for(const t of e)t.prepareRender(n);for(const t of e)t.render(n),t.onDidRender()}delegateVerticalScrollbarMouseDown(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)}restoreState(e){this._context.model.setScrollPosition({scrollTop:e.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},1)}getOffsetForColumn(e,t){const i=this._context.model.validateModelPosition({lineNumber:e,column:t}),n=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const o=this._viewLines.visibleRangeForPosition(new Ki(n.lineNumber,n.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?Ox.convertViewToModelMouseTarget(i,this._context.model.coordinatesConverter):null}createOverviewRuler(e){return new XS(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){let t=e.position&&e.position.range||null;if(null===t){const i=e.position?e.position.position:null;null!==i&&(t=new Gi(i.lineNumber,i.column,i.lineNumber,i.column))}const i=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,t,i),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}}class fE{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new $y(new Gi(1,1,1,1),0,new Ki(1,1),0),new $y(new Gi(1,1,1,1),0,new Ki(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new Ky(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return Yi.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),o=t.selectionStart.getEndPosition(),s=e.normalizePosition(i,2),r=this._validatePositionWithCache(e,n,i,s),a=this._validatePositionWithCache(e,o,n,r);return i.equals(s)&&n.equals(r)&&o.equals(a)?t:new $y(Gi.fromPositions(r,a),t.selectionStartLeftoverVisibleColumns+n.column-r.column,s,t.leftoverVisibleColumns+i.column-s.column)}_setState(e,t,i){if(i&&(i=fE._validateViewState(e.viewModel,i)),t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),s=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new $y(i,n,o,s)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),o=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new $y(n,i.selectionStartLeftoverVisibleColumns,o,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),o=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new $y(n,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new Ki(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new Ki(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),s=new Gi(n.lineNumber,n.column,o.lineNumber,o.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new $y(s,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class _E{constructor(e){this.context=e,this.cursors=[new fE(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map((e=>e.readSelectionFromMarkers(this.context)))}getAll(){return this.cursors.map((e=>e.asCursorState()))}getViewPositions(){return this.cursors.map((e=>e.viewState.position))}getTopMostViewPosition(){return(e=this.cursors,t=oe((e=>e.viewState.position),Ki.compare),re(e,((e,i)=>-t(e,i)))).viewState.position;var e,t}getBottomMostViewPosition(){return function(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n=0&&(i=o)}return i}(this.cursors,oe((e=>e.viewState.position),Ki.compare)).viewState.position}getSelections(){return this.cursors.map((e=>e.modelState.selection))}getViewSelections(){return this.cursors.map((e=>e.viewState.selection))}setSelections(e){this.setStates(Ky.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){null!==e&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(ti){const e=t-i;for(let t=0;t=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(1===this.cursors.length)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ie.selection),Gi.compareRangesUsingStarts));for(let i=0;ia&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}class AE{constructor(){this.type=0}}class bE{constructor(){this.type=1}}class wE{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class CE{constructor(e,t){this.type=3,this.selections=e,this.modelSelections=t}}class vE{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class yE{constructor(){this.type=5}}class xE{constructor(e){this.type=6,this.isFocused=e}}class SE{constructor(){this.type=7}}class EE{constructor(){this.type=8}}class kE{constructor(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}}class DE{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class IE{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class LE{constructor(e,t,i,n,o,s,r){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=o,this.revealHorizontal=s,this.scrollType=r,this.type=12}}class NE{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class TE{constructor(){this.type=14}}class ME{constructor(e){this.type=15,this.ranges=e}}class RE{constructor(){this.type=16}}class BE{constructor(){this.type=17}}class OE extends Lt{constructor(){super(),this._onEvent=this._register(new zt),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class FE{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class PE{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(e){return 0!==e.kind?this:new PE(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class zE{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return 1!==e.kind?this:new zE(this.oldHasFocus,e.hasFocus)}}class VE{constructor(e,t,i,n,o,s,r,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=o,this.scrollLeft=s,this.scrollHeight=r,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!(this.scrollWidthChanged||this.scrollLeftChanged||this.scrollHeightChanged||this.scrollTopChanged)}merge(e){return 2!==e.kind?this:new VE(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class HE{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class WE{constructor(e,t,i,n,o,s,r){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=o,this.reason=s,this.reachedMaxCursorCount=r}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n0){const e=this._cursors.getSelections();for(let t=0;tQE.MAX_CURSOR_COUNT&&(n=n.slice(0,QE.MAX_CURSOR_COUNT),o=!0);const s=jE.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,s,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n,o,s){const r=this._cursors.getViewPositions();let a=null,l=null;r.length>1?l=this._cursors.getViewSelections():a=Gi.fromPositions(r[0],r[0]),e.emitViewEvent(new LE(t,i,a,l,n,o,s))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const i=Ky.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,i)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Ky.fromModelSelections(t))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,Ky.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let o=0,s=e.length;o0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,o){const s=jE.from(this._model,this);if(s.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new CE(a,r)),!n||n.cursorState.length!==s.cursorState.length||s.cursorState.some(((e,t)=>!e.modelState.equals(n.cursorState[t].modelState)))){const a=n?n.cursorState.map((e=>e.modelState.selection)):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new WE(a,r,l,s.modelVersionId,t||"keyboard",i,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i=0)return null;const o=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const s=o[1],r=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(s);if(!r||1!==r.length)return null;const a=r[0].open,l=n.text.length-o[2].length-1,c=n.text.lastIndexOf(a,l-1);if(-1===c)return null;t.push([c,l])}return t}executeEdits(e,t,i,n){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);const s=[],r=[],a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(o)for(let t=0,i=o.length;t0&&this._pushAutoClosedAction(s,r)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const o=jE.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){gt(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,o,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}getAutoClosedCharacters(){return KE.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit((()=>{"keyboard"===t&&(this._executeEditOperation(fx.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i{this._executeEditOperation(fx.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,o))}),e,s);else if(0!==o){const t=this.getSelections().map((e=>{const t=e.getPosition();return new Yi(t.lineNumber,t.column+o,t.lineNumber,t.column+o)}));this.setSelections(e,s,t,0)}}paste(e,t,i,n,o){this._executeEdit((()=>{this._executeEditOperation(fx.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,o,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(rx.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new qy(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new qy(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}QE.MAX_CURSOR_COUNT=1e4;class jE{constructor(e,t){this.modelVersionId=e,this.cursorState=t}static from(e,t){return new jE(e.getVersionId(),t.getCursorStates())}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class GE{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},o=this._innerExecuteCommands(n,i);for(let e=0,t=n.trackedRanges.length;e0&&(s[0]._isTracked=!0);let r=e.model.pushEditOperations(e.selectionsBefore,s,(i=>{const n=[];for(let t=0;te.identifier.minor-t.identifier.minor,s=[];for(let i=0;i0?(n[i].sort(o),s[i]=t[i].computeCursorState(e.model,{getInverseEditOperations:()=>n[i],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new Yi(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new Yi(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):s[i]=e.selectionsBefore[i];return s}));r||(r=e.selectionsBefore);const a=[];for(let e in o)o.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort(((e,t)=>t-e));for(const e of a)r.splice(e,1);return r}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{Gi.isEmpty(e)&&""===s||n.push({identifier:{major:t,minor:o++},range:e,text:s,forceMoveMarkers:r,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let r=!1;const a={addEditOperation:s,addTrackedEditOperation:(e,t,i)=>{r=!0,s(e,t,i)},trackSelection:(t,i)=>{const n=Yi.liftSelection(t);let o;if(n.isEmpty())if("boolean"==typeof i)o=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);o=n.startColumn===t?2:3}else o=1;const s=e.trackedRanges.length,r=e.model._setTrackedRange(null,n,o);return e.trackedRanges[s]=r,e.trackedRangesDirection[s]=n.getDirection(),s.toString()}};try{i.getEditOperations(e.model,a)}catch(e){return gt(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:r}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-Gi.compareRangesUsingEnds(e.range,t.range)));const t={};for(let i=1;io.identifier.major?n.identifier.major:o.identifier.major,t[s.toString()]=!0;for(let t=0;t0&&i--}}return t}}class YE{constructor(e,t,i,n,o,s){this.id=e,this.label=t,this.alias=i,this._precondition=n,this._run=o,this._contextKeyService=s}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}const $E="base.contributions.configuration",qE="vscode://schemas/settings/resourceLanguage",JE=Lg.as(Kp);const XE="\\[([^\\]]+)\\]",ZE=new RegExp(XE,"g"),ek=new RegExp(`^(${XE})+$`);function tk(e){const t=[];if(ek.test(e)){let i=ZE.exec(e);for(;null==i?void 0:i.length;){const n=i[1].trim();n&&t.push(n),i=ZE.exec(e)}}return Y(t)}const ik=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new zt,this._onDidUpdateConfiguration=new zt,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:e(0,"Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},JE.registerSchema(qE,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=this.doRegisterConfigurations(e,t);JE.registerSchema(qE,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:i})}registerDefaultConfigurations(t){var i;const n=[],o=[];for(const{overrides:s,source:r}of t)for(const t in s)if(n.push(t),ek.test(t)){const n=Object.assign(Object.assign({},(null===(i=this.configurationDefaultsOverrides.get(t))||void 0===i?void 0:i.value)||{}),s[t]);this.configurationDefaultsOverrides.set(t,{source:r,value:n});const a={type:"object",default:n,description:e(0,"Configure settings to be overridden for {0} language.",t),$ref:qE,defaultDefaultValue:n,source:ce(r)?void 0:r};o.push(...tk(t)),this.configurationProperties[t]=a,this.defaultLanguageConfigurationOverridesNode.properties[t]=a}else{this.configurationDefaultsOverrides.set(t,{value:s[t],source:r});const e=this.configurationProperties[t];e&&(this.updatePropertyDefaultValue(t,e),this.updateSchema(t,e))}this.registerOverrideIdentifiers(o),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:n,defaultsOverrides:!0})}registerOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t){const i=[];return e.forEach((e=>{i.push(...this.validateAndRegisterProperties(e,t,e.extensionInfo,e.restrictedProperties)),this.configurationContributors.push(e),this.registerJSONConfiguration(e)})),i}validateAndRegisterProperties(e,t=!0,i,n,o=3){o=me(e.scope)?o:e.scope;let s=[],r=e.properties;if(r)for(let e in r){if(t&&nk(e)){delete r[e];continue}const a=r[e];a.source=i,a.defaultDefaultValue=r[e].default,this.updatePropertyDefaultValue(e,a),ek.test(e)?a.scope=void 0:(a.scope=me(a.scope)?o:a.scope,a.restricted=me(a.restricted)?!!(null==n?void 0:n.includes(e)):a.restricted),!r[e].hasOwnProperty("included")||r[e].included?(this.configurationProperties[e]=r[e],!r[e].deprecationMessage&&r[e].markdownDeprecationMessage&&(r[e].deprecationMessage=r[e].markdownDeprecationMessage),s.push(e)):(this.excludedConfigurationProperties[e]=r[e],delete r[e])}let a=e.allOf;if(a)for(let e of a)s.push(...this.validateAndRegisterProperties(e,t,i,n,o));return s}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(e){const t=e=>{let i=e.properties;if(i)for(const e in i)this.updateSchema(e,i[e]);let n=e.allOf;n&&n.forEach(t)};t(e)}updateSchema(e,t){switch(t.scope){case 1:case 2:case 6:case 3:case 4:break;case 5:this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const t of this.overrideIdentifiers.values()){const i=`[${t}]`,n={type:"object",description:e(0,"Configure editor settings to be overridden for a language."),errorMessage:e(0,"This setting does not support per-language configuration."),$ref:qE};this.updatePropertyDefaultValue(i,n)}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){e(0,"Configure editor settings to be overridden for a language."),e(0,"This setting does not support per-language configuration."),this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){const i=this.configurationDefaultsOverrides.get(e);let n=null==i?void 0:i.value,o=null==i?void 0:i.source;ge(n)&&(n=t.defaultDefaultValue,o=void 0),ge(n)&&(n=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=n,t.defaultValueSource=o}};function nk(t){return t.trim()?ek.test(t)?e(0,"Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",t):void 0!==ik.getConfigurationProperties()[t]?e(0,"Cannot register '{0}'. This property is already registered.",t):null:e(0,"Cannot register an empty property")}Lg.add($E,ik);const ok=new class{constructor(){this._onDidChangeLanguages=new zt,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0),Lg.as($E).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}]);var rk=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const ak={getInitialState:()=>Bl,tokenizeEncoded:(e,t,i)=>Fl(0,i)};function lk(e,t,i,n,o,s,r){let a="
",l=n,c=0,d=!0;for(let h=0,u=t.getCount();h0;)r&&d?(g+=" ",d=!1):(g+=" ",d=!0),e--;break}case 60:g+="<",d=!1;break;case 62:g+=">",d=!1;break;case 38:g+="&",d=!1;break;case 0:g+="�",d=!1;break;case 65279:case 8232:case 8233:case 133:g+="�",d=!1;break;case 13:g+="​",d=!1;break;case 32:r&&d?(g+=" ",d=!1):(g+=" ",d=!0);break;default:g+=String.fromCharCode(t),d=!1}}if(a+=`${g}`,u>o||l>=o)break}return a+="
",a}function ck(e,t,i){let n='
';const o=Fn(e);let s=i.getInitialState();for(let e=0,r=o.length;e0&&(n+="
");const a=i.tokenizeEncoded(r,!0,s);Ad.convertToEndOffset(a.tokens,r.length);const l=new Ad(a.tokens,r,t).inflate();let c=0;for(let e=0,t=l.getCount();e${Ln(r.substring(c,i))}`,c=i}s=a.endState}return n+="
",n}class dk{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class hk{constructor(e,t,i,n,o){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=o,this.prefixSum=0}}class uk{constructor(e,t,i,n){this._instanceId=fo(++uk.INSTANCE_COUNT),this._pendingChanges=new dk,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,o=e.length;for(;n>>1;t===e[s].afterLineNumber?i{t=!0,e|=0,i|=0,n|=0,o|=0;const s=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new hk(s,e,i,n,o)),s},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const e of i)n.add(e.id);const o=new Map;for(const e of t)o.set(e.id,e);const s=e=>{const t=[];for(const i of e)if(!n.has(i.id)){if(o.has(i.id)){const e=o.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},r=s(this._arr).concat(s(e));r.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=r,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=uk.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[o+1].afterLineNumber>=e)return o;i=o+1|0}else n=o-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0;return t+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;tthis.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e=this.getLinesTotalHeight()-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,o=t;for(;n=s+i)n=t+1;else{if(e>=s)return t;o=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(n);let s=0|this._lineCount,r=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,c;-1===r?(r=a,c=s+1,l=0):(c=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));let d=o,h=d;const u=5e5;let g=0;o>=u&&(g=Math.floor(o/u)*u,g=Math.floor(g/i)*i,h-=g);const p=[],m=e+(t-e)/2;let f=-1;for(let e=n;e<=s;e++){if(-1===f){(d<=m&&mm)&&(f=e)}for(d+=i,p[e-n]=h,h+=i;c===e;)h+=l,d+=l,r++,r>=a?c=s+1:(c=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(d>=t){s=e;break}}-1===f&&(f=s);const _=0|this.getVerticalOffsetForLineNumber(s);let A=n,b=s;return At&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:s,relativeVerticalOffset:p,centeredLineNumber:f,completelyVisibleStartLineNumber:A,completelyVisibleEndLineNumber:b}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this.getHeightForWhitespaceIndex(i))return-1;for(;t=o+this.getHeightForWhitespaceIndex(n))t=n+1;else{if(e>=o)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const o=[];for(let e=i;e<=n;e++){const i=this.getVerticalOffsetForWhitespaceIndex(e),n=this.getHeightForWhitespaceIndex(e);if(i>=t)break;o.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:i,height:n})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}uk.INSTANCE_COUNT=0;class gk{constructor(e,t,i,n){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(i|=0)<0&&(i=0),(n|=0)<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class pk extends Lt{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new zt),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new gk(0,0,0,0),this._scrollable=this._register(new aS({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new PE(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}}class mk extends Lt{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,o=n.get(131),s=n.get(75);this._linesLayout=new uk(t,n.get(59),s.top,s.bottom),this._scrollable=this._register(new pk(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new gk(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(103)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(59)&&this._linesLayout.setLineHeight(t.get(59)),e.hasChanged(75)){const e=t.get(75);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(131)){const e=t.get(131),i=e.contentWidth,n=e.height,o=this._scrollable.getScrollDimensions(),s=o.contentWidth;this._scrollable.setScrollDimensions(new gk(i,o.contentWidth,n,this._getContentHeight(i,n,s)))}else this._updateHeight();e.hasChanged(103)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options.get(92);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return n.get(94)?o+=Math.max(0,t-n.get(59)-n.get(75).bottom):o+=this._getHorizontalScrollbarHeight(e,i),o}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new gk(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new Od(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new Od(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,i=t.get(132),n=t.get(44);if(i.isViewportWrapping){const i=t.get(131),o=t.get(65);return e>i.contentWidth+n.typicalHalfwidthCharacterWidth&&o.enabled&&"right"===o.side?e+i.verticalScrollbarWidth:e}{const i=t.get(93)*n.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+i,o)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new gk(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}class fk{constructor(e,t,i,n,o){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const n=e.range,o=e.options;let s;if(o.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new Ki(n.startLineNumber,1),0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new Ki(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)),1);s=new Gi(e.lineNumber,e.column,t.lineNumber,t.column)}else s=this._coordinatesConverter.convertModelRangeToViewRange(n,1);i=new Wd(s,o),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}_getDecorationsViewportData(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,Je(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber,o=[];let s=0;const r=[];for(let e=i;e<=n;e++)r[e-i]=[];for(let e=0,a=t.length;e1===e))}function bk(e,t){return wk(e,t.range,(e=>2===e))}function wk(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const o=e.getLineTokens(n),s=n===t.startLineNumber,r=n===t.endLineNumber;let a=s?o.findTokenIndexAtOffset(t.startColumn-1):0;for(;at.endColumn-1)break}if(!i(o.getStandardTokenType(a)))return!1;a++}}return!0}function Ck(e,t){return null===e?t?yk.INSTANCE:xk.INSTANCE:new vk(e,t)}class vk{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,o=this._projectionData.breakOffsets[i];let s;if(null!==this._projectionData.injectionOffsets){const i=this._projectionData.injectionOffsets.map(((e,t)=>new qv(0,0,e+1,this._projectionData.injectionOptions[t],0)));s=qv.applyInjectedText(e.getLineContent(t),i).substring(n,o)}else s=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});return i>0&&(s=Ek(this._projectionData.wrappedTextIndentLength)+s),s}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,o,s,r){this._assertVisible();const a=this._projectionData,l=a.injectionOffsets,c=a.injectionOptions;let d,h=null;if(l){h=[];let e=0,t=0;for(let i=0;i0?a.breakOffsets[i-1]:0,s=a.breakOffsets[i];for(;ts)break;if(o0?a.wrappedTextIndentLength:0,r=t+Math.max(d-o,0),l=t+Math.min(h-o,s);r!==l&&n.push(new Hd(r,l,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(!(h<=s))break;e+=r,t++}}}d=l?e.getLineTokens(t).withInserted(l.map(((e,t)=>({offset:e,text:c[t].content,tokenMetadata:Ad.defaultTokenMetadata})))):e.getLineTokens(t);for(let e=i;e0?n.wrappedTextIndentLength:0,s=i>0?n.breakOffsets[i-1]:0,r=n.breakOffsets[i],a=e.sliceAndInflate(s,r,o);let l=a.getLineContent();i>0&&(l=Ek(n.wrappedTextIndentLength)+l);const c=this._projectionData.getMinOutputOffset(i)+1,d=l.length+1,h=i+1=Sk.length)for(let t=1;t<=e;t++)Sk[t]=kk(t);return Sk[e]}function kk(e){return new Array(e+1).join(" ")}class Dk{constructor(e,t,i,n,o,s,r,a,l){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=o,this.tabSize=s,this.wrappingStrategy=r,this.wrappingColumn=a,this.wrappingIndent=l,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new Nk(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),o=i.length,s=this.createLineBreaksComputer(),r=new ae(qv.fromDecorations(n));for(let e=0;et.lineNumber===e+1));s.addRequest(i[e],n,t?t[e]:null)}const a=s.finalize(),l=[],c=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(Gi.compareRangesUsingStarts);let d=1,h=0,u=-1,g=u+1=d&&t<=h,n=Ck(a[e],!i);l[e]=n.getViewLineCount(),this.modelLineProjections[e]=n}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new kc(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e)))}setHiddenAreas(e){const t=e.map((e=>this.model.validateRange(e))),i=function(e){if(0===e.length)return[];const t=e.slice();t.sort(Gi.compareRangesUsingStarts);const i=[];let n=t[0].startLineNumber,o=t[0].endLineNumber;for(let e=1,s=t.length;eo+1?(i.push(new Gi(n,1,o,1)),n=s.startLineNumber,o=s.endLineNumber):s.endLineNumber>o&&(o=s.endLineNumber)}return i.push(new Gi(n,1,o,1)),i}(t),n=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(Gi.compareRangesUsingStarts);if(i.length===n.length){let e=!1;for(let t=0;t({range:e,options:Oy.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,o);const s=i;let r=1,a=0,l=-1,c=l+1=r&&t<=a?this.modelLineProjections[e].isVisible()&&(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!1),i=!0):(d=!0,this.modelLineProjections[e].isVisible()||(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!0),i=!0)),i){const t=this.modelLineProjections[e].getViewLineCount();this.projectedModelLineLineCounts.setValue(e,t)}}return d||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.modelLineProjections.length)&&this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n){const o=this.fontInfo.equals(e),s=this.wrappingStrategy===t,r=this.wrappingColumn===i,a=this.wrappingIndent===n;if(o&&s&&r&&a)return!1;const l=o&&s&&!r&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n;let c=null;if(l){c=[];for(let e=0,t=this.modelLineProjections.length;e2&&!this.modelLineProjections[t-2].isVisible(),s=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let r=0;const a=[],l=[];for(let e=0,t=n.length;er?(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,c=l+r-1,u=c+1,g=u+(o-r)-1,a=!0):ot?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),s=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),r=this.model.guides.getActiveIndentGuide(n.lineNumber,o.lineNumber,s.lineNumber),a=this.convertModelPositionToViewPosition(r.startLineNumber,1),l=this.convertModelPositionToViewPosition(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:r.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new Ik(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new Ki(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new Ki(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),o=new Array;let s=this.getModelStartPositionOfViewLine(i),r=new Array;for(let e=i.modelLineNumber;e<=n.modelLineNumber;e++){const t=this.modelLineProjections[e-1];if(t.isVisible()){const o=e===i.modelLineNumber?i.modelLineWrappedLineIdx:0,s=e===n.modelLineNumber?n.modelLineWrappedLineIdx+1:t.getViewLineCount();for(let t=o;te.horizontalLine?new YC(e.visibleColumn,e.className,new $C(e.horizontalLine.top,this.convertModelPositionToViewPosition(n.modelLineNumber,e.horizontalLine.endColumn).column)):e)),s.push(i)}}return s}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let o=[];const s=[],r=[],a=i.lineNumber-1,l=n.lineNumber-1;let c=null;for(let e=a;e<=l;e++){const t=this.modelLineProjections[e];if(t.isVisible()){const n=t.getViewLineNumberOfModelPosition(0,e===a?i.column:1),o=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=o-n+1;let d=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,o)&&(d=0===n?1:2),s.push(l),r.push(d),null===c&&(c=new Ki(e+1,0))}else null!==c&&(o=o.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,e)),c=null)}null!==c&&(o=o.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,n.lineNumber)),c=null);const d=t-e+1,h=new Array(d);let u=0;for(let e=0,t=o.length;et&&(h=!0,d=t-o+1),l.getViewLinesData(this.model,n+1,c,d,o-e,i,a),o+=d,h)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),o=n.index,s=n.remainder,r=this.modelLineProjections[o],a=r.getViewLineMinColumn(this.model,o+1,s),l=r.getViewLineMaxColumn(this.model,o+1,s);tl&&(t=l);const c=r.getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new Ki(o+1,c)).equals(i)?new Ki(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new Gi(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new Ki(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new Gi(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2){const n=this.model.validatePosition(new Ki(e,t)),o=n.lineNumber,s=n.column;let r=o-1,a=!1;for(;r>0&&!this.modelLineProjections[r].isVisible();)r--,a=!0;if(0===r&&!this.modelLineProjections[r].isVisible())return new Ki(1,1);const l=1+this.projectedModelLineLineCounts.getPrefixSum(r);let c;return c=a?this.modelLineProjections[r].getViewPositionOfModelPosition(l,this.model.getLineMaxColumn(r+1),i):this.modelLineProjections[o-1].getViewPositionOfModelPosition(l,s,i),c}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return Gi.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new Gi(t.lineNumber,t.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const e=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(e,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(0===i&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i){const n=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),o=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(o.lineNumber-n.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new Gi(n.lineNumber,1,o.lineNumber,o.column),t,i);let s=[];const r=n.lineNumber-1,a=o.lineNumber-1;let l=null;for(let e=r;e<=a;e++){if(this.modelLineProjections[e].isVisible())null===l&&(l=new Ki(e+1,e===r?n.column:1));else if(null!==l){const n=this.model.getLineMaxColumn(e);s=s.concat(this.model.getDecorationsInRange(new Gi(l.lineNumber,l.column,e,n),t,i)),l=null}}null!==l&&(s=s.concat(this.model.getDecorationsInRange(new Gi(l.lineNumber,l.column,o.lineNumber,o.column),t,i)),l=null),s.sort(((e,t)=>{const i=Gi.compareRangesUsingStarts(e.range,t.range);return 0===i?e.idt.id?1:0:i}));let c=[],d=0,h=null;for(const e of s){const t=e.id;h!==t&&(h=t,c[d++]=e)}return c}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return 0===t.modelLineWrappedLineIdx?this.model.getLineIndentColumn(t.modelLineNumber):0}}class Ik{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}}class Lk{constructor(e,t){this.modelRange=e,this.viewLines=t}}class Nk{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class Tk{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new Mk(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new DE(t,i)}onModelLinesInserted(e,t,i,n){return new IE(t,i)}onModelLineChanged(e,t,i){return[!1,new kE(t,t),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let e=0;et)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}class Rk extends Lt{constructor(e,t,i,n,o,s,r){if(super(),this.languageConfigurationService=r,this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new OE,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new Qy(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._tokenizeViewportSoon=this._register(new An((()=>this.tokenizeViewport()),50)),this._updateConfigurationViewLineCount=this._register(new An((()=>this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,this.model.isTooLargeForTokenization())this._lines=new Tk(this.model);else{const e=this._configuration.options,t=e.get(44),i=e.get(125),s=e.get(132),r=e.get(124);this._lines=new Dk(this._editorId,this.model,n,o,t,this.model.getOptions().tabSize,i,s.wrappingColumn,r)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new QE(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new mk(this._configuration,this.getLineCount(),s)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new NE(e)),this._eventDispatcher.emitOutgoingEvent(new VE(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new fk(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(LS.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new RE)}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=new Gi(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber)),i=this._toModelVisibleRanges(t);for(const e of i)this.model.tokenizeViewport(e.startLineNumber,e.endLineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new xE(e)),this._eventDispatcher.emitOutgoingEvent(new zE(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new AE)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new bE)}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new TE)}_onConfigurationChanged(e,t){let i=null;if(-1!==this._viewportStartLine){const e=new Ki(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));i=this.coordinatesConverter.convertViewPositionToModelPosition(e)}let n=!1;const o=this._configuration.options,s=o.get(44),r=o.get(125),a=o.get(132),l=o.get(124);if(this._lines.setWrappingSettings(s,r,a.wrappingColumn,l)&&(e.emitViewEvent(new yE),e.emitViewEvent(new EE),e.emitViewEvent(new vE(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(n=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(81)&&(this._decorations.reset(),e.emitViewEvent(new vE(null))),e.emitViewEvent(new wE(t)),this.viewLayout.onConfigurationChanged(t),n&&i){const e=this.coordinatesConverter.convertModelPositionToViewPosition(i),t=this.viewLayout.getVerticalOffsetForLineNumber(e.lineNumber);this.viewLayout.setScrollPosition({scrollTop:t+this._viewportStartLineDelta},1)}Qy.shouldRecreate(t)&&(this.cursorConfig=new Qy(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const o=e.changes,s=e instanceof ty?e.versionId:null,r=this._lines.createLineBreaksComputer();for(const e of o)switch(e.changeType){case 4:for(let t=0;t!e.ownerId||e.ownerId===this._editorId))),r.addRequest(i,n,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter((e=>!e.ownerId||e.ownerId===this._editorId))),r.addRequest(e.detail,t,null);break}}const a=r.finalize(),l=new ae(a);for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new yE),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(s,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=l.takeCount(e.detail.length),o=this._lines.onModelLinesInserted(s,e.fromLineNumber,e.toLineNumber,n);null!==o&&(t.emitViewEvent(o),this.viewLayout.onLinesInserted(o.fromLineNumber,o.toLineNumber)),i=!0;break}case 2:{const i=l.dequeue(),[o,r,a,c]=this._lines.onModelLineChanged(s,e.lineNumber,i);n=o,r&&t.emitViewEvent(r),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),c&&(t.emitViewEvent(c),this.viewLayout.onLinesDeleted(c.fromLineNumber,c.toLineNumber));break}}null!==s&&this._lines.acceptVersionId(s),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new EE),t.emitViewEvent(new vE(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const e=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._tokenizeViewportSoon.schedule()}))),this._register(this.model.onDidChangeTokens((e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new SE),this.cursorConfig=new Qy(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new Qy(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new yE),e.emitViewEvent(new EE),e.emitViewEvent(new vE(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new Qy(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new vE(e))})))}setHiddenAreas(e){let t=!1;try{const i=this._eventDispatcher.beginEmitViewEvents();t=this._lines.setHiddenAreas(e),t&&(i.emitViewEvent(new yE),i.emitViewEvent(new EE),i.emitViewEvent(new vE(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),t&&this._eventDispatcher.emitOutgoingEvent(new HE)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(131),t=this._configuration.options.get(59),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),o=Math.max(1,n.completelyVisibleStartLineNumber-i),s=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new Gi(o,this.getLineMinColumn(o),s,this.getLineMaxColumn(s)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];const n=[];let o=0,s=t.startLineNumber,r=t.startColumn;const a=t.endLineNumber,l=t.endColumn;for(let e=0,t=i.length;ea||(se.toInlineDecoration(t)))]),new zd(s.minColumn,s.maxColumn,s.content,s.continuesWithWrappedLine,i,n,s.tokens,r,o,s.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new Fd(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,Je(this._configuration.options)),i=new Bk;for(const n of t){const t=n.options,o=t.overviewRuler;if(!o)continue;const s=o.position;if(0===s)continue;const r=o.getColor(e.value),a=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(r,t.zIndex,a,l,s)}return i.asArray}invalidateOverviewRulerColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;e&&e.invalidateCachedColor()}}invalidateMinimapColorCache(){const e=this.model.getAllDecorations();for(const t of e){const e=t.options.minimap;e&&e.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getModelLineMaxColumn(e){return this.model.getLineMaxColumn(e)}validateModelPosition(e){return this.model.validatePosition(e)}validateModelRange(e){return this.model.validateRange(e)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);const o=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(o)}getEOL(){return this.model.getEOL()}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();(e=e.slice(0)).sort(Gi.compareRangesUsingStarts);let o=!1,s=!1;for(const t of e)t.isEmpty()?o=!0:s=!0;if(!s){if(!t)return"";const i=e.map((e=>e.startLineNumber));let o="";for(let e=0;e0&&i[e-1]===i[e]||(o+=this.model.getLineContent(i[e])+n);return o}if(o&&t){const t=[];let n=0;for(const o of e){const e=o.startLineNumber;o.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(o,i?2:0)),n=e}return 1===t.length?t[0]:t}const r=[];for(const t of e)t.isEmpty()||r.push(this.model.getValueInRange(t,i?2:0));return 1===r.length?r[0]:r}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===sk)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new Gi(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(44),s=this._getColorMap();let r;if(/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===lt.fontFamily)r=lt.fontFamily;else{r=o.fontFamily,r=r.replace(/"/g,"'");if(!/[,']/.test(r)){/[+ ]/.test(r)&&(r=`'${r}'`)}r=`${r}, ${lt.fontFamily}`}return{mode:i,html:`
`+this._getHTMLToCopy(n,s)+"
"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn,r=this.getTabSize();let a="";for(let e=i;e<=o;e++){const l=this.model.getLineTokens(e),c=l.getLineContent(),d=e===i?n-1:0,h=e===o?s-1:c.length;a+=""===c?"
":lk(c,l.inflate(),t,d,h,r,f)}return a}_getColorMap(){const e=er.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector((n=>this._cursor.setSelections(n,e,t,i)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector((t=>this._cursor.restoreState(t,e)))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new UE):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit((t=>this._cursor.endComposition(t,e)))}type(e,t){this._executeCursorEdit((i=>this._cursor.type(i,e,t)))}compositionType(e,t,i,n,o){this._executeCursorEdit((s=>this._cursor.compositionType(s,e,t,i,n,o)))}paste(e,t,i,n){this._executeCursorEdit((o=>this._cursor.paste(o,e,t,i,n)))}cut(e){this._executeCursorEdit((t=>this._cursor.cut(t,e)))}executeCommand(e,t){this._executeCursorEdit((i=>this._cursor.executeCommand(i,e,t)))}executeCommands(e,t){this._executeCursorEdit((i=>this._cursor.executeCommands(i,e,t)))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealPrimary(n,e,i,0,t,0)))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new Gi(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new LE(e,!1,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new Gi(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new LE(e,!1,i,null,0,!0,0))))}revealRange(e,t,i,n,o){this._withViewEventsCollector((s=>s.emitViewEvent(new LE(e,!1,i,null,n,t,o))))}getVerticalOffsetForLineNumber(e){return this.viewLayout.getVerticalOffsetForLineNumber(e)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(e,t){this.viewLayout.setScrollPosition({scrollTop:e},t)}setScrollPosition(e,t){this.viewLayout.setScrollPosition(e,t)}deltaScrollNow(e,t){this.viewLayout.deltaScrollNow(e,t)}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new BE),this._eventDispatcher.emitOutgoingEvent(new HE))}setMaxLineWidth(e){this.viewLayout.setMaxLineWidth(e)}_withViewEventsCollector(e){try{return e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class Bk{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,o){const s=this._asMap[e];if(s){const e=s.data,t=e[e.length-3],r=e[e.length-1];if(t===o&&r+1>=i)return void(n>r&&(e[e.length-1]=n));e.push(o,i,n)}else{const s=new Ud(e,t,[o,i,n]);this._asMap[e]=s,this.asArray.push(s)}}}class Ok{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}get(e){return this._entries.get(e)}}var Fk;!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(Fk||(Fk={})),function(e){const t="error",i="warning",n="info";e.fromValue=function(o){return o?Gn(t,o)?e.Error:Gn(i,o)||Gn("warn",o)?e.Warning:Gn(n,o)?e.Info:e.Ignore:e.Ignore},e.toString=function(o){switch(o){case e.Error:return t;case e.Warning:return i;case e.Info:return n;default:return"ignore"}}}(Fk||(Fk={}));var Pk=Fk,zk=Pk;const Vk=_a("notificationService");class Hk{constructor(e,t,i,n,o){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=o}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let i=this.breakOffsets[e]-t;return e>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let i=0===e?t:this.breakOffsets[e-1]+t;if(null!==this.injectionOffsets)for(let e=0;ethis.injectionOffsets[e];e++)i0?this.breakOffsets[o-1]:0,0===t)if(e<=s)n=o-1;else{if(!(e>r))break;i=o+1}else if(e=r))break;i=o+1}}let r=e-s;return o>0&&(r+=this.wrappedTextIndentLength),new Qk(o,r)}normalizeOutputPosition(e,t,i){if(null!==this.injectionOffsets){const n=this.outputPositionToOffsetInInputWithInjections(e,t),o=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(o!==n)return this.offsetInInputWithInjectionsToOutputPosition(o,i)}if(0===i){if(e>0&&t===this.getMinOutputOffset(e))return new Qk(e-1,this.getMaxOutputOffset(e-1))}else if(1===i){if(e0&&(t=Math.max(0,t-this.wrappedTextIndentLength));return(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(2===t){if(e===i.offsetInInputWithInjections+i.length&&Wk(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let e=i.offsetInInputWithInjections;if(Uk(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;for(;t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]&&!Wk(this.injectionOptions[t].cursorStops)&&(e-=this.injectionOptions[t].content.length,!Uk(this.injectionOptions[t].cursorStops));)t--;return e}}if(1===t){let e=i.offsetInInputWithInjections+i.length,t=i.injectedTextIndex;for(;t+1=0&&this.injectionOffsets[t-1]===this.injectionOffsets[t];)e-=this.injectionOptions[t-1].content.length,t--;return e}ve()}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(null!==t){let n=0;for(let o=0;oe)break;if(e<=a)return{injectedTextIndex:o,offsetInInputWithInjections:r,length:s};n+=s}}}}function Wk(e){return null==e||(e===Ji.Right||e===Ji.Both)}function Uk(e){return null==e||(e===Ji.Left||e===Ji.Both)}class Qk{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new Ki(e+this.outputLineIndex,this.outputOffset+1)}}class jk{constructor(e,t){this.classifier=new Kk(e,t)}static create(e){return new jk(e.get(120),e.get(119))}createLineBreaksComputer(e,t,i,n){const o=[],s=[],r=[];return{addRequest:(e,t,i)=>{o.push(e),s.push(t),r.push(i)},finalize:()=>{const a=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,l=[];for(let e=0,c=o.length;e=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let Gk=[],Yk=[];function $k(e,t,i,n,o,s,r){if(-1===o)return null;const a=i.length;if(a<=1)return null;const l=t.breakOffsets,c=t.breakOffsetsVisibleColumn,d=eD(i,n,o,s,r),h=o-d,u=Gk,g=Yk;let p=0,m=0,f=0,_=o;const A=l.length;let b=0;if(b>=0){let e=Math.abs(c[b]-_);for(;b+1=e)break;e=t,b++}}for(;bt&&(t=m,o=f);let r=0,d=0,w=0,C=0;if(o<=_){let f=o,A=0===t?0:i.charCodeAt(t-1),b=0===t?0:e.get(A),v=!0;for(let o=t;om&&Zk(A,b,a,l)&&(r=t,d=f),f+=c,f>_){t>m?(w=t,C=f-c):(w=o+1,C=f),f-d>h&&(r=0),v=!1;break}A=a,b=l}if(v){p>0&&(u[p]=l[l.length-1],g[p]=c[l.length-1],p++);break}}if(0===r){let a=o,l=i.charCodeAt(t),c=e.get(l),u=!1;for(let n=t-1;n>=m;n--){const t=n+1,o=i.charCodeAt(n);if(9===o){u=!0;break}let g,p;if(Xn(o)?(n--,g=0,p=2):(g=e.get(o),p=uo(o)?s:1),a<=_){if(0===w&&(w=t,C=a),a<=_-h)break;if(Zk(o,g,l,c)){r=t,d=a;break}}a-=p,l=o,c=g}if(0!==r){const e=h-(C-d);if(e<=n){const t=i.charCodeAt(w);let o;o=Jn(t)?2:Jk(t,C,n,s),e-o<0&&(r=0)}}if(u){b--;continue}}if(0===r&&(r=w,d=C),r<=m){const e=i.charCodeAt(m);Jn(e)?(r=m+2,d=f+2):(r=m+1,d=f+Jk(e,f,n,s))}for(m=r,u[p]=r,f=d,g[p]=d,p++,_=d+h;b<0||b=v)break;v=e,b++}}return 0===p?null:(u.length=p,g.length=p,Gk=t.breakOffsets,Yk=t.breakOffsetsVisibleColumn,t.breakOffsets=u,t.breakOffsetsVisibleColumn=g,t.wrappedTextIndentLength=d,t)}function qk(e,t,i,n,o,s,r){const a=qv.applyInjectedText(t,i);let l,c;if(i&&i.length>0?(l=i.map((e=>e.options)),c=i.map((e=>e.column-1))):(l=null,c=null),-1===o)return l?new Hk(c,l,[a.length],[],0):null;const d=a.length;if(d<=1)return l?new Hk(c,l,[a.length],[],0):null;const h=eD(a,n,o,s,r),u=o-h,g=[],p=[];let m=0,f=0,_=0,A=o,b=a.charCodeAt(0),w=e.get(b),C=Jk(b,0,n,s),v=1;Jn(b)&&(C+=1,b=a.charCodeAt(1),w=e.get(b),v++);for(let t=v;tA&&((0===f||C-_>u)&&(f=i,_=C-l),g[m]=f,p[m]=_,m++,A=_+u,f=0),b=o,w=r}return 0!==m||i&&0!==i.length?(g[m]=d,p[m]=C,new Hk(c,l,g,p,h)):null}function Jk(e,t,i,n){return 9===e?i-t%i:uo(e)||e<32?n:1}function Xk(e,t){return t-e%t}function Zk(e,t,i,n){return 32!==i&&(2===t||3===t&&2!==n||1===n||3===n&&1!==t)}function eD(e,t,i,n,o){let s=0;if(0!==o){const r=Pn(e);if(-1!==r){for(let i=0;ii&&(s=0)}}return s}var tD;const iD=null===(tD=window.trustedTypes)||void 0===tD?void 0:tD.createPolicy("domLineBreaksComputer",{createHTML:e=>e});class nD{static create(){return new nD}constructor(){}createLineBreaksComputer(e,t,i,n){const o=[],s=[];return{addRequest:(e,t,i)=>{o.push(e),s.push(t)},finalize:()=>function(e,t,i,n,o,s){var r;function a(t){const i=s[t];if(i){const n=qv.applyInjectedText(e[t],i),o=i.map((e=>e.options)),s=i.map((e=>e.column-1));return new Hk(s,o,[n.length],[],0)}return null}if(-1===n){const t=[];for(let i=0,n=e.length;il?(a=0,c=0):d=l-e}const u=r.substr(a),b=oD(u,c,i,d,g,h);p[n]=a,m[n]=c,f[n]=u,_[n]=b[0],A[n]=b[1]}const b=g.build(),w=null!==(r=null==iD?void 0:iD.createHTML(b))&&void 0!==r?r:b;u.innerHTML=w,u.style.position="absolute",u.style.top="10000",u.style.wordWrap="break-word",document.body.appendChild(u);const C=document.createRange(),v=Array.prototype.slice.call(u.children,0),y=[];for(let t=0;te.options)),c=h.map((e=>e.column-1))):(l=null,c=null),y[t]=new Hk(c,l,e,r,n)}return document.body.removeChild(u),y}(o,e,t,i,n,s)}}}function oD(e,t,i,n,o,s){if(0!==s){const e=String(s);o.appendASCIIString('
');const r=e.length;let a=t,l=0;const c=[],d=[];let h=0");for(let t=0;t"),c[t]=l,d[t]=a;const n=h;h=t+1"),c[e.length]=l,d[e.length]=a,o.appendASCIIString("
"),[c,d]}function sD(e,t,i,n){if(i.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),s=[];try{rD(e,o,n,0,null,i.length-1,null,s)}catch(e){return console.log(e),null}return 0===s.length?null:(s.push(i.length),s)}function rD(e,t,i,n,o,s,r,a){if(n===s)return;if(o=o||aD(e,t,i[n],i[n+1]),r=r||aD(e,t,i[s],i[s+1]),Math.abs(o[0].top-r[0].top)<=.1)return;if(n+1===s)return void a.push(s);const l=n+(s-n)/2|0,c=aD(e,t,i[l],i[l+1]);rD(e,t,i,n,o,l,c,a),rD(e,t,i,l,c,s,r,a)}function aD(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}var lD=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},cD=function(e,t){return function(i,n){t(i,n,e)}};let dD=0;class hD{constructor(e,t,i,n,o){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=o}dispose(){Et(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let uD=class t extends Lt{constructor(e,t,i,n,o,s,r,a,l,c,d){super(),this.languageConfigurationService=d,this._onDidDispose=this._register(new zt),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new zt),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new zt),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new zt),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new zt),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new zt),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new zt),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new zt),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new zt),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new zt),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new zt),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new zt),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new gD),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new gD),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new zt),this.onWillType=this._onWillType.event,this._onDidType=this._register(new zt),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new zt),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new zt),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new zt),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new zt),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new zt),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new zt),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new zt),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new zt),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new zt),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new zt),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new zt),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new zt),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new zt),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new zt),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new zt),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new zt),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new zt),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new zt),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._bannerDomNode=null;const h=Object.assign({},t);let u;this._domElement=e,this._overflowWidgetsDomNode=h.overflowWidgetsDomNode,delete h.overflowWidgetsDomNode,this._id=++dD,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,h,c)),this._register(this._configuration.onDidChange((e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(131)){const e=t.get(131);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(r.createScoped(this._domElement)),this._notificationService=l,this._codeEditorService=o,this._commandService=s,this._themeService=a,this._register(new pD(this,this._contextKeyService)),this._register(new mD(this,this._contextKeyService)),this._instantiationService=n.createChild(new Ok([Sg,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new fD(e),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},u=Array.isArray(i.contributions)?i.contributions:hp.getEditorContributions();for(const e of u)if(this._contributions[e.id])gt(new Error(`Cannot have two contributions with the same id ${e.id}`));else try{const t=this._instantiationService.createInstance(e.ctor,this);this._contributions[e.id]=t}catch(e){gt(e)}hp.getEditorActions().forEach((e=>{if(this._actions[e.id])return void gt(new Error(`Cannot have two actions with the same id ${e.id}`));const t=new YE(e.id,e.label,e.alias,Ce(e.precondition),(()=>this._instantiationService.invokeFunction((t=>Promise.resolve(e.runEditorCommand(t,this,null))))),this._contextKeyService);this._actions[t.id]=t})),this._codeEditorService.addCodeEditor(this)}get isSimpleWidget(){return this._configuration.isSimpleWidget}_createConfiguration(e,t,i){return new Ip(e,t,this._domElement,i)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return va.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,i=e.length;tGi.lift(e))))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return zA.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e){if(this._modelData){if(!Ki.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!Gi.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),s=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",i,s,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new Gi(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!Ki.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new Gi(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e){const t=Yi.isISelection(e),i=Gi.isIRange(e);if(!t&&!i)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(i){const t={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(t)}}_setSelectionImpl(e){if(!this._modelData)return;const t=new Yi(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections("api",[t])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new Gi(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!Gi.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(Gi.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;te.isSupported())),e}getAction(e){return this._actions[e]||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut":return void this._cut(e)}const n=this.getAction(t);n?Promise.resolve(n.run()).then(void 0,gt):this._modelData&&(this._triggerEditorCommand(e,t,i)||this._triggerCommand(t,i))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,o){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,o,e)}_paste(e,t,i,n,o){if(!this._modelData||0===t.length)return;const s=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,i,n,e);const r=this._modelData.viewModel.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new Gi(s.lineNumber,s.column,r.lineNumber,r.column),languageId:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=hp.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,gt)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&(!this._configuration.options.get(81)&&(this._modelData.model.pushStackElement(),!0))}popUndoStop(){return!!this._modelData&&(!this._configuration.options.get(81)&&(this._modelData.model.popStackElement(),!0))}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(81))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,Je(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,Je(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(131)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarMouseDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarMouseDown(e)}layout(e){this._configuration.observeContainer(e),this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const i=this._modelData.model.validatePosition(e),n=this._configuration.options,o=n.get(131);return{top:t._getVerticalOffsetForPosition(this._modelData,i.lineNumber,i.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(i.lineNumber,i.column)+o.glyphMarginWidth+o.lineNumbersWidth+o.decorationsWidth-this.getScrollLeft(),height:n.get(59)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){ra(e,this._configuration.options.get(44))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(t){if(!t)return void(this._modelData=null);const i=[];this._domElement.setAttribute("data-mode-id",t.getLanguageId()),this._configuration.setIsDominatedByLongLines(t.isDominatedByLongLines()),this._configuration.setModelLineCount(t.getLineCount()),t.onBeforeAttached();const n=new Rk(this._id,this._configuration,t,nD.create(),jk.create(this._configuration.options),(e=>Qh(e)),this.languageConfigurationService);i.push(t.onDidChangeDecorations((e=>this._onDidChangeModelDecorations.fire(e)))),i.push(t.onDidChangeLanguage((e=>{this._domElement.setAttribute("data-mode-id",t.getLanguageId()),this._onDidChangeModelLanguage.fire(e)}))),i.push(t.onDidChangeLanguageConfiguration((e=>this._onDidChangeModelLanguageConfiguration.fire(e)))),i.push(t.onDidChangeContent((e=>this._onDidChangeModelContent.fire(e)))),i.push(t.onDidChangeOptions((e=>this._onDidChangeModelOptions.fire(e)))),i.push(t.onWillDispose((()=>this.setModel(null)))),i.push(n.onEvent((t=>{switch(t.kind){case 0:this._onDidContentSizeChange.fire(t);break;case 1:this._editorTextFocus.setValue(t.hasFocus);break;case 2:this._onDidScrollChange.fire(t);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{t.reachedMaxCursorCount&&this._notificationService.warn(e(0,"The number of cursors has been limited to {0}.",QE.MAX_CURSOR_COUNT));const i=[];for(let e=0,n=t.selections.length;e{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const o={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",o)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const o={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",o)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new Ox(e.coordinatesConverter);i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e);return[new mE(t,this._configuration,this._themeService,e,i,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){e&&e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}};uD=lD([cD(3,fa),cD(4,Aa),cD(5,eg),cD(6,Sg),cD(7,Tg),cD(8,Vk),cD(9,Sp),cD(10,Sl)],uD);class gD extends Lt{constructor(){super(),this._onDidChangeToTrue=this._register(new zt),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new zt),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class pD extends Lt{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=vx.editorSimpleInput.bindTo(t),this._editorFocus=vx.focus.bindTo(t),this._textInputFocus=vx.textInputFocus.bindTo(t),this._editorTextFocus=vx.editorTextFocus.bindTo(t),this._editorTabMovesFocus=vx.tabMovesFocus.bindTo(t),this._editorReadonly=vx.readOnly.bindTo(t),this._inDiffEditor=vx.inDiffEditor.bindTo(t),this._editorColumnSelection=vx.columnSelection.bindTo(t),this._hasMultipleSelections=vx.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=vx.hasNonEmptySelection.bindTo(t),this._canUndo=vx.canUndo.bindTo(t),this._canRedo=vx.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig()))),this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection()))),this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidChangeModel((()=>this._updateFromModel()))),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel()))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(130)),this._editorReadonly.set(e.get(81)),this._inDiffEditor.set(e.get(54)),this._editorColumnSelection.set(e.get(18))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.isEmpty())))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class mD extends Lt{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this._langId=vx.languageId.bindTo(t),this._hasCompletionItemProvider=vx.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=vx.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=vx.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=vx.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=vx.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=vx.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=vx.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=vx.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=vx.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=vx.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=vx.hasReferenceProvider.bindTo(t),this._hasRenameProvider=vx.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=vx.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=vx.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=vx.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=vx.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=vx.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=vx.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=vx.isInWalkThroughSnippet.bindTo(t);const i=()=>this._update();this._register(e.onDidChangeModel(i)),this._register(e.onDidChangeModelLanguage(i)),this._register(Ns.onDidChange(i)),this._register(Qs.onDidChange(i)),this._register(Ws.onDidChange(i)),this._register(Ps.onDidChange(i)),this._register(zs.onDidChange(i)),this._register(Vs.onDidChange(i)),this._register(Hs.onDidChange(i)),this._register(Rs.onDidChange(i)),this._register(Os.onDidChange(i)),this._register(Bs.onDidChange(i)),this._register(Is.onDidChange(i)),this._register(Ls.onDidChange(i)),this._register(js.onDidChange(i)),this._register(Ks.onDidChange(i)),this._register(Ms.onDidChange(i)),this._register(Us.onDidChange(i)),i()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()}))}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(Ns.has(e)),this._hasCodeActionsProvider.set(Qs.has(e)),this._hasCodeLensProvider.set(Ws.has(e)),this._hasDefinitionProvider.set(Ps.has(e)),this._hasDeclarationProvider.set(zs.has(e)),this._hasImplementationProvider.set(Vs.has(e)),this._hasTypeDefinitionProvider.set(Hs.has(e)),this._hasHoverProvider.set(Rs.has(e)),this._hasDocumentHighlightProvider.set(Os.has(e)),this._hasDocumentSymbolProvider.set(Bs.has(e)),this._hasReferenceProvider.set(Is.has(e)),this._hasRenameProvider.set(Ls.has(e)),this._hasSignatureHelpProvider.set(Ms.has(e)),this._hasInlayHintsProvider.set(Us.has(e)),this._hasDocumentFormattingProvider.set(js.has(e)||Ks.has(e)),this._hasDocumentSelectionFormattingProvider.set(Ks.has(e)),this._hasMultipleDocumentFormattingProvider.set(js.all(e).length+Ks.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(Ks.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===Ih.walkThroughSnippet)})):this.reset()}}class fD extends Lt{constructor(e){super(),this._onChange=this._register(new zt),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(yu(e)),this._register(this._domFocusTracker.onDidFocus((()=>{this._hasFocus=!0,this._onChange.fire(void 0)}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasFocus=!1,this._onChange.fire(void 0)})))}hasFocus(){return this._hasFocus}}const _D=encodeURIComponent("");function bD(e){return _D+encodeURIComponent(e.toString())+AD}const wD=encodeURIComponent('');zg(((e,t)=>{const i=e.getColor(zm);i&&t.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${i}; }`);const n=e.getColor(Pm);n&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${bD(n)}") repeat-x bottom left; }`);const o=e.getColor(Fm);o&&t.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${o}; }`);const s=e.getColor(Wm);s&&t.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${s}; }`);const r=e.getColor(Hm);r&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${bD(r)}") repeat-x bottom left; }`);const a=e.getColor(Vm);a&&t.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=e.getColor(jm);l&&t.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const c=e.getColor(Qm);c&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${bD(c)}") repeat-x bottom left; }`);const d=e.getColor(Um);d&&t.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${d}; }`);const h=e.getColor(Gm);h&&t.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${h}; }`);const u=e.getColor(Km);var g;u&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${g=u,wD+encodeURIComponent(g.toString())+CD}") no-repeat bottom left; }`);const p=e.getColor(zb);p&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${p.rgba.a}; }`);const m=e.getColor(Pb);m&&t.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${m}; }`);const f=e.getColor($m)||"inherit";t.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${f}}`)}));Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n/* ---------- DiffEditor ---------- */\n\n.monaco-diff-editor .diffOverview {\n\tz-index: 9;\n}\n\n.monaco-diff-editor .diffOverview .diffViewport {\n\tz-index: 10;\n}\n\n/* colors not externalized: using transparancy on background */\n.monaco-diff-editor.vs\t\t\t.diffOverview { background: rgba(0, 0, 0, 0.03); }\n.monaco-diff-editor.vs-dark\t\t.diffOverview { background: rgba(255, 255, 255, 0.01); }\n\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar { background: rgba(0,0,0,0); }\n.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar { background: none; }\n\n.monaco-scrollable-element.modified-in-monaco-diff-editor .slider {\n\tz-index: 10;\n}\n.modified-in-monaco-diff-editor\t\t\t\t.slider.active { background: rgba(171, 171, 171, .4); }\n.modified-in-monaco-diff-editor.hc-black\t.slider.active { background: none; }\n\n/* ---------- Diff ---------- */\n\n.monaco-editor .insert-sign,\n.monaco-diff-editor .insert-sign,\n.monaco-editor .delete-sign,\n.monaco-diff-editor .delete-sign {\n\tfont-size: 11px !important;\n\topacity: 0.7 !important;\n\tdisplay: flex !important;\n\talign-items: center;\n}\n.monaco-editor.hc-black .insert-sign,\n.monaco-diff-editor.hc-black .insert-sign,\n.monaco-editor.hc-black .delete-sign,\n.monaco-diff-editor.hc-black .delete-sign {\n\topacity: 1;\n}\n\n.monaco-editor .inline-deleted-margin-view-zone {\n\ttext-align: right;\n}\n.monaco-editor .inline-added-margin-view-zone {\n\ttext-align: right;\n}\n\n/* ---------- Inline Diff ---------- */\n\n.monaco-editor .view-zones .view-lines .view-line span {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .margin-view-zones .lightbulb-glyph:hover {\n\tcursor: pointer;\n}\n",{});class vD{constructor(e,t,i){const n=e=>this.emitter.fire(e);this.emitter=new zt({onFirstListenerAdd:()=>e.addEventListener(t,n,i),onLastListenerRemove:()=>e.removeEventListener(t,n,i)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function yD(e){return e.preventDefault(),e.stopPropagation(),e}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n:root {\n\t--sash-size: 4px;\n}\n\n.monaco-sash {\n\tposition: absolute;\n\tz-index: 35;\n\ttouch-action: none;\n}\n\n.monaco-sash.disabled {\n\tpointer-events: none;\n}\n\n.monaco-sash.mac.vertical {\n\tcursor: col-resize;\n}\n\n.monaco-sash.vertical.minimum {\n\tcursor: e-resize;\n}\n\n.monaco-sash.vertical.maximum {\n\tcursor: w-resize;\n}\n\n.monaco-sash.mac.horizontal {\n\tcursor: row-resize;\n}\n\n.monaco-sash.horizontal.minimum {\n\tcursor: s-resize;\n}\n\n.monaco-sash.horizontal.maximum {\n\tcursor: n-resize;\n}\n\n.monaco-sash.disabled {\n\tcursor: default !important;\n\tpointer-events: none !important;\n}\n\n.monaco-sash.vertical {\n\tcursor: ew-resize;\n\ttop: 0;\n\twidth: var(--sash-size);\n\theight: 100%;\n}\n\n.monaco-sash.horizontal {\n\tcursor: ns-resize;\n\tleft: 0;\n\twidth: 100%;\n\theight: var(--sash-size);\n}\n\n.monaco-sash:not(.disabled) > .orthogonal-drag-handle {\n\tcontent: \" \";\n\theight: calc(var(--sash-size) * 2);\n\twidth: calc(var(--sash-size) * 2);\n\tz-index: 100;\n\tdisplay: block;\n\tcursor: all-scroll;\n\tposition: absolute;\n}\n\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\n\t> .orthogonal-drag-handle.start,\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\n\t> .orthogonal-drag-handle.end {\n\tcursor: nwse-resize;\n}\n\n.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)\n\t> .orthogonal-drag-handle.end,\n.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)\n\t> .orthogonal-drag-handle.start {\n\tcursor: nesw-resize;\n}\n\n.monaco-sash.vertical > .orthogonal-drag-handle.start {\n\tleft: calc(var(--sash-size) * -0.5);\n\ttop: calc(var(--sash-size) * -1);\n}\n.monaco-sash.vertical > .orthogonal-drag-handle.end {\n\tleft: calc(var(--sash-size) * -0.5);\n\tbottom: calc(var(--sash-size) * -1);\n}\n.monaco-sash.horizontal > .orthogonal-drag-handle.start {\n\ttop: calc(var(--sash-size) * -0.5);\n\tleft: calc(var(--sash-size) * -1);\n}\n.monaco-sash.horizontal > .orthogonal-drag-handle.end {\n\ttop: calc(var(--sash-size) * -0.5);\n\tright: calc(var(--sash-size) * -1);\n}\n\n.monaco-sash:before {\n\tcontent: '';\n\tpointer-events: none;\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\ttransition: background-color 0.1s ease-out;\n\tbackground: transparent;\n}\n\n.monaco-sash.vertical:before {\n\twidth: var(--sash-hover-size);\n\tleft: calc(50% - (var(--sash-hover-size) / 2));\n}\n\n.monaco-sash.horizontal:before {\n\theight: var(--sash-hover-size);\n\ttop: calc(50% - (var(--sash-hover-size) / 2));\n}\n\n.pointer-events-disabled {\n\tpointer-events: none !important;\n}\n\n/** Debug **/\n\n.monaco-sash.debug {\n\tbackground: cyan;\n}\n\n.monaco-sash.debug.disabled {\n\tbackground: rgba(0, 255, 255, 0.2);\n}\n\n.monaco-sash.debug:not(.disabled) > .orthogonal-drag-handle {\n\tbackground: red;\n}\n",{});var xD=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};var SD;!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(SD||(SD={}));const ED=new zt;const kD=new zt;class DD{constructor(){this.disposables=new It}get onPointerMove(){return this.disposables.add(new vD(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new vD(window,"mouseup")).event}dispose(){this.disposables.dispose()}}xD([Bp],DD.prototype,"onPointerMove",null),xD([Bp],DD.prototype,"onPointerUp",null);class ID{constructor(e){this.el=e,this.disposables=new It}get onPointerMove(){return this.disposables.add(new vD(this.el,Op.Change)).event}get onPointerUp(){return this.disposables.add(new vD(this.el,Op.End)).event}dispose(){this.disposables.dispose()}}xD([Bp],ID.prototype,"onPointerMove",null),xD([Bp],ID.prototype,"onPointerUp",null);class LD{constructor(e){this.factory=e}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}xD([Bp],LD.prototype,"onPointerMove",null),xD([Bp],LD.prototype,"onPointerUp",null);const ND="pointer-events-disabled";class TD extends Lt{constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new hn(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new zt),this._onDidStart=this._register(new zt),this._onDidChange=this._register(new zt),this._onDidReset=this._register(new zt),this._onDidEnd=this._register(new zt),this.orthogonalStartSashDisposables=this._register(new It),this.orthogonalStartDragHandleDisposables=this._register(new It),this.orthogonalEndSashDisposables=this._register(new It),this.orthogonalEndDragHandleDisposables=this._register(new It),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=xu(e,Iu(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),_&&this.el.classList.add("mac");const n=this._register(new vD(this.el,"mousedown")).event;this._register(n((e=>this.onPointerStart(e,new DD)),this));const o=this._register(new vD(this.el,"dblclick")).event;this._register(o(this.onPointerDoublePress,this));const s=this._register(new vD(this.el,"mouseenter")).event;this._register(s((()=>TD.onMouseEnter(this))));const r=this._register(new vD(this.el,"mouseleave")).event;this._register(r((()=>TD.onMouseLeave(this)))),this._register(Pp.addTarget(this.el));const a=Ft.map(this._register(new vD(this.el,Op.Start)).event,(e=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(a((e=>this.onPointerStart(e,new ID(this.el))),this));const l=this._register(new vD(this.el,Op.Tap)).event,c=Ft.map(Ft.filter(Ft.debounce(l,((e,t)=>{var i;return{event:t,count:(null!==(i=null==e?void 0:e.count)&&void 0!==i?i:0)+1}}),250),(({count:e})=>2===e)),(({event:e})=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(c(this.onPointerDoublePress,this)),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(ED.event((e=>{this.size=e,this.layout()})))),this._register(kD.event((e=>this.hoverDelay=e))),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",false),this.layout()}get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=xu(this.el,Iu(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(Dt((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new vD(this._orthogonalStartDragHandle,"mouseenter")).event((()=>TD.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new vD(this._orthogonalStartDragHandle,"mouseleave")).event((()=>TD.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}set orthogonalEndSash(e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=xu(this.el,Iu(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(Dt((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new vD(this._orthogonalEndDragHandle,"mouseenter")).event((()=>TD.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new vD(this._orthogonalEndDragHandle,"mouseleave")).event((()=>TD.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}onPointerStart(e,t){Cu(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new LD(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new LD(t))),!this.state)return;const n=(o="iframe",Array.prototype.slice.call(document.getElementsByTagName(o),0));var o;for(const e of n)e.classList.add(ND);const s=e.pageX,r=e.pageY,a=e.altKey,l={startX:s,currentX:s,startY:r,currentY:r,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const c=pu(this.el),d=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":_?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":_?"col-resize":"ew-resize",c.textContent=`* { cursor: ${e} !important; }`},h=new It;d(),i||this.onDidEnablementChange.event(d,null,h);t.onPointerMove((e=>{Cu(e,!1);const t={startX:s,currentX:e.pageX,startY:r,currentY:e.pageY,altKey:a};this._onDidChange.fire(t)}),null,h),t.onPointerUp((e=>{Cu(e,!1),this.el.removeChild(c),this.el.classList.remove("active"),this._onDidEnd.fire(),h.dispose();for(const e of n)e.classList.remove(ND)}),null,h),h.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger((()=>e.el.classList.add("hover")),e.hoverDelay).then(void 0,(()=>{})),!t&&e.linkedSash&&TD.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&TD.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){TD.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){if(e.target&&e.target instanceof HTMLElement)return e.target.classList.contains("orthogonal-drag-handle")?e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}class MD{constructor(e,t,i){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=i}static capture(e){let t=null,i=0;if(0!==e.getScrollTop()){const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const o=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-o}}return new MD(t,i,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-diff-editor .diff-review-line-number {\n\ttext-align: right;\n\tdisplay: inline-block;\n}\n\n.monaco-diff-editor .diff-review {\n\tposition: absolute;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n.monaco-diff-editor .diff-review-summary {\n\tpadding-left: 10px;\n}\n\n.monaco-diff-editor .diff-review-shadow {\n\tposition: absolute;\n}\n\n.monaco-diff-editor .diff-review-row {\n\twhite-space: pre;\n}\n\n.monaco-diff-editor .diff-review-table {\n\tdisplay: table;\n\tmin-width: 100%;\n}\n\n.monaco-diff-editor .diff-review-row {\n\tdisplay: table-row;\n\twidth: 100%;\n}\n\n.monaco-diff-editor .diff-review-spacer {\n\tdisplay: inline-block;\n\twidth: 10px;\n\tvertical-align: middle;\n}\n\n.monaco-diff-editor .diff-review-spacer > .codicon {\n\tfont-size: 9px !important;\n}\n\n.monaco-diff-editor .diff-review-actions {\n\tdisplay: inline-block;\n\tposition: absolute;\n\tright: 10px;\n\ttop: 2px;\n}\n\n.monaco-diff-editor .diff-review-actions .action-label {\n\twidth: 16px;\n\theight: 16px;\n\tmargin: 2px 0;\n}\n",{});const RD={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:ob.text,TERMINALS:"Terminals"};class BD{constructor(e){this.data=e}update(){}getData(){return this.data}}const OD={CurrentDragAndDropData:void 0};Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-action-bar {\n\twhite-space: nowrap;\n\theight: 100%;\n}\n\n.monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\theight: 100%;\n\twidth: 100%;\n\talign-items: center;\n}\n\n.monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-action-bar .action-item {\n\tdisplay: block;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: pointer;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-action-bar .action-item .icon,\n.monaco-action-bar .action-item .codicon {\n\tdisplay: block;\n}\n\n.monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 16px;\n\theight: 16px;\n}\n\n.monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tpadding: 3px;\n\tborder-radius: 5px;\n}\n\n.monaco-action-bar .action-item.disabled .action-label,\n.monaco-action-bar .action-item.disabled .action-label::before,\n.monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-action-bar .action-item .action-label.separator {\n\twidth: 1px;\n\theight: 16px;\n\tmargin: 5px 4px !important;\n\tcursor: default;\n\tmin-width: 1px;\n\tpadding: 0;\n\tbackground-color: #bbb;\n}\n\n.secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-action-bar .action-item.action-dropdown-item {\n\tdisplay: flex;\n}\n\n.monaco-action-bar .action-item.action-dropdown-item > .action-label {\n\tmargin-right: 1px;\n}\n",{});class FD extends Lt{constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof $u&&this._register(t.onDidChange((e=>{this.element&&this.handleActionChangeEvent(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new qu)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(Pp.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,Yr&&this._register(Oh(e,wu.DRAG_START,(e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(RD.TEXT,this._action.label)})))),this._register(Oh(t,Op.Tap,(e=>this.onClick(e,!0)))),this._register(Oh(t,wu.MOUSE_DOWN,(e=>{i||Cu(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),_&&this._register(Oh(t,wu.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register(Oh(t,wu.CLICK,(e=>{Cu(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register(Oh(t,wu.DBLCLICK,(e=>{Cu(e,!0)}))),[wu.MOUSE_UP,wu.MOUSE_OUT].forEach((e=>{this._register(Oh(t,e,(e=>{Cu(e),t.classList.remove("active")})))}))}onClick(e,t=!1){var i;Cu(e,!0);const n=me(this._context)?(null===(i=this.options)||void 0===i?void 0:i.useEventAsContext)?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class PD extends FD{constructor(e,t,i={}){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=xu(this.element,Iu("a.action-label"))),this.label&&(this._action.id===Ju.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&(xu(this.element,Iu("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let t=null;this.getAction().tooltip?t=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(t=this.getAction().label,this.options.keybinding&&(t=e(0,"{0} ({1})",t,this.options.keybinding))),t&&this.label&&(this.label.title=t)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}var zD=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class VD extends Lt{constructor(e,t={}){var i,n,o,s,r,a;let l,c;switch(super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new zt),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new zt({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new zt),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new zt),this.onBeforeRun=this._onBeforeRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(n=this.options.orientation)&&void 0!==n?n:0,this._triggerKeys={keyDown:null!==(s=null===(o=this.options.triggerKeys)||void 0===o?void 0:o.keyDown)&&void 0!==s&&s,keys:null!==(a=null===(r=this.options.triggerKeys)||void 0===r?void 0:r.keys)&&void 0!==a?a:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new qu,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._register(this._actionRunner.onBeforeRun((e=>this._onBeforeRun.fire(e)))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&this.domNode.classList.add("animated"),this._orientation){case 0:l=[15],c=[17];break;case 1:l=[16],c=[18],this.domNode.className+=" vertical"}this._register(Oh(this.domNode,wu.KEY_DOWN,(e=>{const t=new vh(e);let i=!0;const n="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;l&&(t.equals(l[0])||t.equals(l[1]))?i=this.focusPrevious():c&&(t.equals(c[0])||t.equals(c[1]))?i=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?i=this.focusFirst():t.equals(13)?i=this.focusLast():t.equals(2)&&n instanceof FD&&n.trapsArrowNavigation?i=this.focusNext():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:i=!1,i&&(t.preventDefault(),t.stopPropagation())}))),this._register(Oh(this.domNode,wu.KEY_UP,(e=>{const t=new vh(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()}))),this.focusTracker=this._register(yu(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{gu()!==this.domNode&&au(gu(),this.domNode)||(this._onDidBlur.fire(),this.focusedItem=void 0,this.previouslyFocusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}setFocusable(e){if(this.focusable=e,this.focusable){const e=this.viewItems.find((e=>e instanceof FD&&e.isEnabled()));e instanceof FD&&e.setFocusable(!0)}else this.viewItems.forEach((e=>{e instanceof FD&&e.setFocusable(!1)}))}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){for(let e=0;et.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach((t=>t.actionRunner=e)))}getContainer(){return this.domNode}push(e,t={}){const i=Array.isArray(e)?e:[e];let n=he(t.index)?t.index:null;i.forEach((e=>{const i=document.createElement("li");let o;i.className="action-item",i.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(Oh(i,wu.CONTEXT_MENU,(e=>{Cu(e,!0)}))),this.options.actionViewItemProvider&&(o=this.options.actionViewItemProvider(e)),o||(o=new PD(this.context,e,t)),o.actionRunner=this._actionRunner,o.setActionContext(this.context),o.render(i),this.focusable&&o instanceof FD&&0===this.viewItems.length&&o.setFocusable(!0),null===n||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(o),this._actionIds.push(e.id)):(this.actionsList.insertBefore(i,this.actionsList.children[n]),this.viewItems.splice(n,0,o),this._actionIds.splice(n,0,e.id),n++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem)}clear(){Et(this.viewItems),this.viewItems=[],this._actionIds=[],Mh(this.actionsList)}length(){return this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus(void 0,void 0,!0)}else void 0!==t&&(this.focusedItem=t),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&this.options.focusOnlyEnabledItems&&!i.isEnabled());return this.updateFocus(),!0}focusPrevious(e){if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&this.options.focusOnlyEnabledItems&&!i.isEnabled());return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){var n;void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&(null===(n=this.viewItems[this.previouslyFocusedItem])||void 0===n||n.blur());const o=void 0!==this.focusedItem&&this.viewItems[this.focusedItem];if(o){let n=!0;Ae(o.focus)||(n=!1),this.options.focusOnlyEnabledItems&&Ae(o.isEnabled)&&!o.isEnabled()&&(n=!1),n?(i||this.previouslyFocusedItem!==this.focusedItem)&&(o.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(e){if(void 0===this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof FD){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}run(e,t){return zD(this,void 0,void 0,(function*(){yield this._actionRunner.run(e,t)}))}dispose(){Et(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}var HD;!function(e){e.getDefinition=function(e,t){let i=e.defaults;for(;Rg.isThemeIcon(i);){const e=WD.getIcon(i.id);if(!e)return;i=e.defaults}return i}}(HD||(HD={}));const WD=new class{constructor(){this._onDidChange=new zt,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:e(0,"The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:e(0,"The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${gs.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const o=this.iconsById[e];if(o){if(i&&!o.description){o.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return o}let s={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=s;let r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),i&&(r.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=r,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map((e=>this.iconsById[e]))}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{for(;Rg.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`};let i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map((e=>this.iconsById[e]));for(const o of n.filter((e=>!!e.description)).sort(e))i.push(`||${o.id}|${Rg.isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const o of n.filter((e=>!Rg.isThemeIcon(e.defaults))).sort(e))i.push(`||${o.id}|`);return i.join("\n")}};function UD(e,t,i,n){return WD.registerIcon(e,t,i,n)}function QD(){return WD}Lg.add("base.contributions.icons",WD),function(){for(const e of ys.getAll())WD.registerIcon(e.id,e.definition,e.description)}();const jD="vscode://schemas/icons";let KD=Lg.as(Kp);KD.registerSchema(jD,WD.getIconSchema());const GD=new An((()=>KD.notifySchemaChanged(jD)),200);WD.onDidChange((()=>{GD.isScheduled()||GD.schedule()}));const YD=UD("widget-close",ys.close,e(0,"Icon for the close action in widgets."));UD("goto-previous-location",ys.arrowUp,e(0,"Icon for goto previous editor location.")),UD("goto-next-location",ys.arrowDown,e(0,"Icon for goto next editor location.")),Rg.modify(ys.sync,"spin"),Rg.modify(ys.loading,"spin");var $D,qD=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},JD=function(e,t){return function(i,n){t(i,n,e)}},XD=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class ZD{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0}}class eI{constructor(e){this.entries=e}}const tI=UD("diff-review-insert",ys.add,e(0,"Icon for 'Insert' in diff review.")),iI=UD("diff-review-remove",ys.remove,e(0,"Icon for 'Remove' in diff review.")),nI=UD("diff-review-close",ys.close,e(0,"Icon for 'Close' in diff review."));let oI=class t extends Lt{constructor(t,i){super(),this._languageService=i,this._width=0,this._diffEditor=t,this._isVisible=!1,this.shadow=sa(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=sa(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new VD(this.actionBarContainer.domNode)),this._actionBar.push(new $u("diffreview.close",e(0,"Close"),"close-diff-review "+Rg.asClassName(nI),!0,(()=>XD(this,void 0,void 0,(function*(){return this.hide()})))),{label:!1,icon:!0}),this.domNode=sa(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=sa(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new fS(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(t.onDidUpdateDiff((()=>{this._isVisible&&(this._diffs=this._compute(),this._render())}))),this._register(t.getModifiedEditor().onDidChangeCursorPosition((()=>{this._isVisible&&this._render()}))),this._register(Ph(this.domNode.domNode,"click",(e=>{e.preventDefault();const t=lu(e.target,"diff-review-row");t&&this._goToRow(t)}))),this._register(Ph(this.domNode.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._goToRow(this._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._goToRow(this._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this.accept())}))),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e0){const t=e[s-1];n=0===t.originalEndLineNumber?t.originalStartLineNumber+1:t.originalEndLineNumber+1,o=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber+1:t.modifiedEndLineNumber+1}let r=t-3+1,a=i-3+1;if(ra){const e=a-m;m+=e,f+=e}if(f>p){const e=p-f;m+=e,f+=e}u[g++]=new ZD(n,m,o,f)}n[o++]=new eI(u)}let s=n[0].entries;const r=[];let a=0;for(let e=1,t=n.length;eu)&&(u=n),0!==o&&(0===g||op)&&(p=s)}const m=document.createElement("div");m.className="diff-review-row";const f=document.createElement("div");f.className="diff-review-cell diff-review-summary";const _=u-h+1,A=p-g+1;f.appendChild(document.createTextNode(`${l+1}/${this._diffs.length}: @@ -${h},${_} +${g},${A} @@`)),m.setAttribute("data-line",String(g));const b=t=>0===t?e(0,"no lines changed"):1===t?e(0,"1 line changed"):e(0,"{0} lines changed",t),w=b(_),C=b(A);m.setAttribute("aria-label",e(0,"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",l+1,this._diffs.length,h,w,g,C)),m.appendChild(f),m.setAttribute("role","listitem"),d.appendChild(m);const v=n.get(59);let y=g;for(let e=0,l=c.length;ee}),oI=qD([JD(1,_l)],oI),zg(((e,t)=>{const i=e.getColor(Ib);i&&t.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${i}; }`);const n=e.getColor(Tm);n&&t.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${n} 0 -6px 6px -6px inset; }`)}));function sI(e){const t=e.get(Aa),i=t.listDiffEditors(),n=t.getActiveCodeEditor();if(!n)return null;for(let e=0,t=i.length;eo.modifiedStartLineNumber?e(0,"Copy deleted lines"):e(0,"Copy deleted line"):o.originalEndLineNumber>o.modifiedStartLineNumber?e(0,"Copy changed lines"):e(0,"Copy changed line"),void 0,!0,(()=>cI(this,void 0,void 0,(function*(){const e=new Gi(o.originalStartLineNumber,1,o.originalEndLineNumber+1,1),t=o.originalModel.getValueInRange(e);yield this._clipboardService.writeText(t)})))));let h,u=0;o.originalEndLineNumber>o.modifiedStartLineNumber&&(h=new $u("diff.clipboard.copyDeletedLineContent",e(0,d?"Copy deleted line ({0})":"Copy changed line ({0})",o.originalStartLineNumber),void 0,!0,(()=>cI(this,void 0,void 0,(function*(){const e=o.originalModel.getLineContent(o.originalStartLineNumber+u);if(""===e){const e=o.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(0===e?"\n":"\r\n")}else yield this._clipboardService.writeText(e)})))),c.push(h));n.getOption(81)||c.push(new $u("diff.inline.revertChange",e(0,"Revert this change"),void 0,!0,(()=>cI(this,void 0,void 0,(function*(){const e=new Gi(o.originalStartLineNumber,1,o.originalEndLineNumber,o.originalModel.getLineMaxColumn(o.originalEndLineNumber)),t=o.originalModel.getValueInRange(e);if(0===o.modifiedEndLineNumber){const e=n.getModel().getLineMaxColumn(o.modifiedStartLineNumber);n.executeEdits("diffEditor",[{range:new Gi(o.modifiedStartLineNumber,e,o.modifiedStartLineNumber,e),text:l+t}])}else{const e=n.getModel().getLineMaxColumn(o.modifiedEndLineNumber);n.executeEdits("diffEditor",[{range:new Gi(o.modifiedStartLineNumber,1,o.modifiedEndLineNumber,e),text:t}])}})))));const g=(t,i)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:t,y:i}),getActions:()=>(h&&(h.label=e(0,d?"Copy deleted line ({0})":"Copy changed line ({0})",o.originalStartLineNumber+u)),c),autoSelectFirstItem:!0})};this._register(Ph(this._diffActions,"mousedown",(e=>{const{top:t,height:i}=tu(this._diffActions),n=Math.floor(a/3);e.preventDefault(),g(e.posx,t+i+n)}))),this._register(n.onMouseMove((e=>{if(8===e.target.type||5===e.target.type){e.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,u=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,a)):this.visibility=!1}else this.visibility=!1}))),this._register(n.onMouseDown((e=>{if(e.event.rightButton&&(8===e.target.type||5===e.target.type)){e.target.detail.viewZoneId===this._viewZoneId&&(e.event.preventDefault(),u=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,a),g(e.event.posx,e.event.posy+a))}})))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}_updateLightBulbPosition(e,t,i){const{top:n}=tu(e),o=t-n,s=Math.floor(o/i),r=s*i;if(this._diffActions.style.top=`${r}px`,this.diff.viewLineCounts){let e=0;for(let t=0;t=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},fI=function(e,t){return function(i,n){t(i,n,e)}};class _I{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter((e=>!this._zonesMap[String(e.id)]))}clean(e){this._zones.length>0&&e.changeViewZones((e=>{for(const t of this._zones)e.removeZone(t)})),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,t,i,n){const o=n?MD.capture(e):null;e.changeViewZones((t=>{var n;for(const e of this._zones)t.removeZone(e);for(const e of this._inlineDiffMargins)e.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let o=0,s=i.zones.length;oe});let vI=class t extends Lt{constructor(e,i,n,o,s,r,a,l,c,d,h,u){super(),this._editorProgressService=u,this._onDidDispose=this._register(new zt),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new zt),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new zt),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=s,this._codeEditorService=l,this._contextKeyService=this._register(r.createScoped(e)),this._instantiationService=a.createChild(new Ok([Sg,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=c,this._notificationService=d,this._id=++AI,this._state=0,this._updatingDiffProgress=null,this._domElement=e,i=i||{},this._options=OI(i,{enableSplitViewResizing:!0,renderSideBySide:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),void 0!==i.isInEmbeddedEditor?this._contextKeyService.createKey("isInEmbeddedDiffEditor",i.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new An((()=>this._updateDecorations()),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=t._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=sa(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(Ph(this._overviewDomElement,"mousedown",(e=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(e)}))),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new _I(h,o),this._modifiedEditorState=new _I(h,o),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new wp(this._containerDomElement,i.dimension)),this._register(this._elementSizeObserver.onDidChange((()=>this._onDidContainerSizeChanged()))),i.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(i,n.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(i,n.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=a.createInstance(oI,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new DI(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new LI(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(c.onDidColorThemeChange((e=>{this._strategy&&this._strategy.applyColors(e)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=t._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)})));const g=hp.getDiffEditorContributions();for(const e of g)try{this._register(a.createInstance(e.ctor,this))}catch(e){gt(e)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),1===this._state&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=Og(e.type),i}_recreateOverviewRulers(){this._options.renderOverviewRuler&&(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(e,i){const n=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(e),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(44)&&this._updateDecorationsRunner.schedule(),e.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})));const o=this._contextKeyService.createKey("isInDiffLeftEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(n.onDidContentSizeChange((e=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+t.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})}))),n}_createRightHandSideEditor(e,i){const n=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(e),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(44)&&this._updateDecorationsRunner.schedule(),e.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}))),this._register(n.onDidChangeModelOptions((e=>{e.tabSize&&this._updateDecorationsRunner.schedule()})));const o=this._contextKeyService.createKey("isInDiffRightEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(n.onDidContentSizeChange((e=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+t.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:e.contentHeightChanged,contentWidthChanged:e.contentWidthChanged})}))),n}_createInnerEditor(e,t,i,n){return e.createInstance(uD,t,i,n)}dispose(){this._codeEditorService.removeDiffEditor(this),-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return va.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(e){const i=OI(e,this._options),n=(o=this._options,s=i,{enableSplitViewResizing:o.enableSplitViewResizing!==s.enableSplitViewResizing,renderSideBySide:o.renderSideBySide!==s.renderSideBySide,maxComputationTime:o.maxComputationTime!==s.maxComputationTime,maxFileSize:o.maxFileSize!==s.maxFileSize,ignoreTrimWhitespace:o.ignoreTrimWhitespace!==s.ignoreTrimWhitespace,renderIndicators:o.renderIndicators!==s.renderIndicators,originalEditable:o.originalEditable!==s.originalEditable,diffCodeLens:o.diffCodeLens!==s.diffCodeLens,renderOverviewRuler:o.renderOverviewRuler!==s.renderOverviewRuler,diffWordWrap:o.diffWordWrap!==s.diffWordWrap});var o,s;this._options=i;const r=n.ignoreTrimWhitespace||n.renderIndicators,a=this._isVisible&&(n.maxComputationTime||n.maxFileSize);r?this._beginUpdateDecorations():a&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(e)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(e)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),n.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new DI(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new LI(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=t._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),n.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e){this._modifiedEditor.setPosition(e)}revealLine(e,t=0){this._modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e){this._modifiedEditor.setSelection(e)}setSelections(e){this._modifiedEditor.setSelections(e)}revealLines(e,t,i=0){this._modifiedEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._modifiedEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._modifiedEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._modifiedEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){return{original:this._originalEditor.saveViewState(),modified:this._modifiedEditor.saveViewState()}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(e,t,i){this._modifiedEditor.trigger(e,t,i)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler)return;if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const e=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),n=t.ENTIRE_DIFF_OVERVIEW_WIDTH-2*t.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:t.ONE_OVERVIEW_WIDTH,right:n+t.ONE_OVERVIEW_WIDTH,height:e-i}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:t.ONE_OVERVIEW_WIDTH,height:e-i}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout((()=>this._beginUpdateDecorations()),t.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const i=this._originalEditor.getModel(),n=this._modifiedEditor.getModel();if(!i||!n)return;this._diffComputationToken++;const o=this._diffComputationToken,s=1024*this._options.maxFileSize*1024,r=e=>{const t=e.getValueLength();return 0===s||t<=s};r(i)&&r(n)?(this._setState(1),this._editorWorkerService.computeDiff(i.uri,n.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then((e=>{o===this._diffComputationToken&&i===this._originalEditor.getModel()&&n===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=e,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())}),(e=>{o===this._diffComputationToken&&i===this._originalEditor.getModel()&&n===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())}))):t._equals(i.uri,this._lastOriginalWarning)&&t._equals(n.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=i.uri,this._lastModifiedWarning=n.uri,this._notificationService.warn(e(0,"Cannot compare files because one file is too large.")))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),n=this._strategy.getEditorsDiffDecorations(e,this._options.ignoreTrimWhitespace,this._options.renderIndicators,t,i);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,n.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,n.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._options.diffCodeLens,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._options.renderSideBySide?t.wordWrapOverride1=this._options.diffWordWrap:t.wordWrapOverride1="off",e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.readOnly=!this._options.originalEditable,t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(e){const i=this._adjustOptionsForSubEditor(e);return e.modifiedAriaLabel&&(i.ariaLabel=e.modifiedAriaLabel),i.wordWrapOverride1=this._options.diffWordWrap,i.revealHorizontalRightPadding=ht.revealHorizontalRightPadding.defaultValue+t.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},i),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const e=this._elementSizeObserver.getWidth(),i=this._elementSizeObserver.getHeight(),n=this._getReviewHeight(),o=this._strategy.layout();this._originalDomNode.style.width=o+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=e-o+"px",this._modifiedDomNode.style.left=o+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=i-n+"px",this._overviewDomElement.style.width=t.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=e-t.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(t.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:o,height:i-n}),this._modifiedEditor.layout({width:e-o-(this._options.renderOverviewRuler?t.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:i-n}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(i-n,e,n),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),i=this._modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),o=Math.max(0,n-0),s=i>0?o/i:0;return{height:Math.max(0,Math.floor(e.height*s)),top:Math.floor(t*s)}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const i=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===i.length||e=a?n=s+1:(n=s,o=s)}return i[n]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.originalStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,s=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,r=e-i;return r<=o?n+Math.min(r,s):n+s-o+r}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.modifiedStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,s=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,r=e-n;return r<=s?i+Math.min(r,o):i+o-s+r}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};vI.ONE_OVERVIEW_WIDTH=15,vI.ENTIRE_DIFF_OVERVIEW_WIDTH=30,vI.UPDATE_DIFF_DECORATIONS_DELAY=200,vI=mI([fI(3,hI),fI(4,rI),fI(5,Sg),fI(6,fa),fI(7,Aa),fI(8,Tg),fI(9,Vk),fI(10,lI),fI(11,gI)],vI);class yI extends Lt{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=(e.getColor(Ff)||Bf).transparent(2),i=(e.getColor(Pf)||Of).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,o){o=o.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber)),n=n.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber));const s=this._getViewZones(e,n,o,i),r=this._getOriginalEditorDecorations(e,t,i),a=this._getModifiedEditorDecorations(e,t,i);return{original:{decorations:r.decorations,overviewZones:r.overviewZones,zones:s.original},modified:{decorations:a.decorations,overviewZones:a.overviewZones,zones:s.modified}}}}class xI{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._indexe.afterLineNumber-t.afterLineNumber,_=(e,t)=>{if(null===t.domNode&&e.length>0){const i=e[e.length-1];if(i.afterLineNumber===t.afterLineNumber&&null===i.domNode)return void(i.heightInLines+=t.heightInLines)}e.push(t)},A=new xI(this._modifiedForeignVZ),b=new xI(this._originalForeignVZ);let w=1,C=1;for(let i=0,n=this._lineChanges.length;i<=n;i++){const v=i0?-1:0),g=v.modifiedStartLineNumber+(v.modifiedEndLineNumber>0?-1:0),h=v.originalEndLineNumber>0?SI._getViewLineCount(this._originalEditor,v.originalStartLineNumber,v.originalEndLineNumber):0,d=v.modifiedEndLineNumber>0?SI._getViewLineCount(this._modifiedEditor,v.modifiedStartLineNumber,v.modifiedEndLineNumber):0,p=Math.max(v.originalStartLineNumber,v.originalEndLineNumber),m=Math.max(v.modifiedStartLineNumber,v.modifiedEndLineNumber)):(u+=1e7+h,g+=1e7+d,p=u,m=g);let y=[],x=[];if(o){let e;e=v?v.originalEndLineNumber>0?v.originalStartLineNumber-w:v.modifiedStartLineNumber-C:s.getLineCount()-w;for(let t=0;to&&x.push({afterLineNumber:i,heightInLines:n-o,domNode:null,marginDomNode:null})}v&&(w=(v.originalEndLineNumber>0?v.originalEndLineNumber:v.originalStartLineNumber)+1,C=(v.modifiedEndLineNumber>0?v.modifiedEndLineNumber:v.modifiedStartLineNumber)+1)}for(;A.current&&A.current.afterLineNumber<=m;){let e;e=A.current.afterLineNumber<=g?u-g+A.current.afterLineNumber:p;let i=null;v&&v.modifiedStartLineNumber<=A.current.afterLineNumber&&A.current.afterLineNumber<=v.modifiedEndLineNumber&&(i=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),y.push({afterLineNumber:e,heightInLines:A.current.height/t,domNode:null,marginDomNode:i}),A.advance()}for(;b.current&&b.current.afterLineNumber<=p;){let t;t=b.current.afterLineNumber<=u?g-u+b.current.afterLineNumber:m,x.push({afterLineNumber:t,heightInLines:b.current.height/e,domNode:null}),b.advance()}if(null!==v&&TI(v)){const e=this._produceOriginalFromDiff(v,h,d);e&&y.push(e)}if(null!==v&&MI(v)){const e=this._produceModifiedFromDiff(v,h,d);e&&x.push(e)}let S=0,E=0;for(y=y.sort(f),x=x.sort(f);S=t.heightInLines?(e.heightInLines-=t.heightInLines,E++):(t.heightInLines-=e.heightInLines,S++)}for(;S(e.domNode||(e.domNode=RI()),e)))}}function EI(e,t,i,n,o){return{range:new Gi(e,t,i,n),options:o}}const kI={charDelete:Oy.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:Oy.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:Oy.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:Oy.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:Oy.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:Oy.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+Rg.asClassName(bI),marginClassName:"line-insert",isWholeLine:!0}),lineDelete:Oy.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:Oy.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+Rg.asClassName(wI),marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:Oy.register({description:"diff-editor-line-delete-margin",marginClassName:"line-delete"})};class DI extends yI{constructor(e,t){super(e),this._disableSash=!1===t,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new TD(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart((()=>this._onSashDragStart())),this._sash.onDidChange((e=>this._onSashDrag(e))),this._sash.onDidEnd((()=>this._onSashDragEnd())),this._sash.onDidReset((()=>this._onSashReset()))}setEnableSplitViewResizing(e){const t=!1===e;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?vI.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let i=Math.floor((e||.5)*t);const n=Math.floor(.5*t);return i=this._disableSash?n:i||n,t>2*DI.MINIMUM_EDITOR_WIDTH?(it-DI.MINIMUM_EDITOR_WIDTH&&(i=t-DI.MINIMUM_EDITOR_WIDTH)):i=n,this._sashPosition!==i&&(this._sashPosition=i,this._sash.layout()),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?vI.ENTIRE_DIFF_OVERVIEW_WIDTH:0),i=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=i/t,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,i){const n=this._dataSource.getOriginalEditor(),o=this._dataSource.getModifiedEditor();return new II(e,t,i,n,o).getViewZones()}_getOriginalEditorDecorations(e,t,i){const n=this._dataSource.getOriginalEditor(),o=String(this._removeColor),s={decorations:[],overviewZones:[]},r=n.getModel(),a=n._getViewModel();for(const n of e)if(MI(n)){s.decorations.push({range:new Gi(n.originalStartLineNumber,1,n.originalEndLineNumber,1073741824),options:i?kI.lineDeleteWithSign:kI.lineDelete}),TI(n)&&n.charChanges||s.decorations.push(EI(n.originalStartLineNumber,1,n.originalEndLineNumber,1073741824,kI.charDeleteWholeLine));const e=BI(r,a,n.originalStartLineNumber,n.originalEndLineNumber);if(s.overviewZones.push(new qS(e.startLineNumber,e.endLineNumber,o)),n.charChanges)for(const e of n.charChanges)if(MI(e))if(t)for(let t=e.originalStartLineNumber;t<=e.originalEndLineNumber;t++){let i,n;i=t===e.originalStartLineNumber?e.originalStartColumn:r.getLineFirstNonWhitespaceColumn(t),n=t===e.originalEndLineNumber?e.originalEndColumn:r.getLineLastNonWhitespaceColumn(t),s.decorations.push(EI(t,i,t,n,kI.charDelete))}else s.decorations.push(EI(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn,kI.charDelete))}return s}_getModifiedEditorDecorations(e,t,i){const n=this._dataSource.getModifiedEditor(),o=String(this._insertColor),s={decorations:[],overviewZones:[]},r=n.getModel(),a=n._getViewModel();for(const n of e)if(TI(n)){s.decorations.push({range:new Gi(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824),options:i?kI.lineInsertWithSign:kI.lineInsert}),MI(n)&&n.charChanges||s.decorations.push(EI(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824,kI.charInsertWholeLine));const e=BI(r,a,n.modifiedStartLineNumber,n.modifiedEndLineNumber);if(s.overviewZones.push(new qS(e.startLineNumber,e.endLineNumber,o)),n.charChanges)for(const e of n.charChanges)if(TI(e))if(t)for(let t=e.modifiedStartLineNumber;t<=e.modifiedEndLineNumber;t++){let i,n;i=t===e.modifiedStartLineNumber?e.modifiedStartColumn:r.getLineFirstNonWhitespaceColumn(t),n=t===e.modifiedEndLineNumber?e.modifiedEndColumn:r.getLineLastNonWhitespaceColumn(t),s.decorations.push(EI(t,i,t,n,kI.charInsert))}else s.decorations.push(EI(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn,kI.charInsert))}return s}}DI.MINIMUM_EDITOR_WIDTH=100;class II extends SI{constructor(e,t,i,n,o){super(e,t,i,n,o)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,i){return i>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class LI extends yI{constructor(e,t){super(e),this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange((t=>{this._decorationsLeft!==t.decorationsLeft&&(this._decorationsLeft=t.decorationsLeft,e.relayoutEditors())})))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n){const o=this._dataSource.getOriginalEditor(),s=this._dataSource.getModifiedEditor();return new NI(e,t,i,o,s,n).getViewZones()}_getOriginalEditorDecorations(e,t,i){const n=String(this._removeColor),o={decorations:[],overviewZones:[]},s=this._dataSource.getOriginalEditor(),r=s.getModel(),a=s._getViewModel();for(const t of e)if(MI(t)){o.decorations.push({range:new Gi(t.originalStartLineNumber,1,t.originalEndLineNumber,1073741824),options:kI.lineDeleteMargin});const e=BI(r,a,t.originalStartLineNumber,t.originalEndLineNumber);o.overviewZones.push(new qS(e.startLineNumber,e.endLineNumber,n))}return o}_getModifiedEditorDecorations(e,t,i){const n=this._dataSource.getModifiedEditor(),o=String(this._insertColor),s={decorations:[],overviewZones:[]},r=n.getModel(),a=n._getViewModel();for(const n of e)if(TI(n)){s.decorations.push({range:new Gi(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824),options:i?kI.lineInsertWithSign:kI.lineInsert});const e=BI(r,a,n.modifiedStartLineNumber,n.modifiedEndLineNumber);if(s.overviewZones.push(new qS(e.startLineNumber,e.endLineNumber,o)),n.charChanges){for(const e of n.charChanges)if(TI(e))if(t)for(let t=e.modifiedStartLineNumber;t<=e.modifiedEndLineNumber;t++){let i,n;i=t===e.modifiedStartLineNumber?e.modifiedStartColumn:r.getLineFirstNonWhitespaceColumn(t),n=t===e.modifiedEndLineNumber?e.modifiedEndColumn:r.getLineLastNonWhitespaceColumn(t),s.decorations.push(EI(t,i,t,n,kI.charInsert))}else s.decorations.push(EI(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn,kI.charInsert))}else s.decorations.push(EI(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824,kI.charInsertWholeLine))}return s}layout(){return Math.max(5,this._decorationsLeft)}}class NI extends SI{constructor(e,t,i,n,o,s){super(e,t,i,n,o),this._originalModel=n.getModel(),this._renderIndicators=s,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const e=super.getViewZones();return this._finalize(e),e}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const e=document.createElement("div");return e.className="inline-added-margin-view-zone",e}_produceOriginalFromDiff(e,t,i){const n=document.createElement("div");return n.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i,domNode:document.createElement("div"),marginDomNode:n}}_produceModifiedFromDiff(e,t,i){const n=document.createElement("div");n.className=`view-lines line-delete ${mw}`;const o=document.createElement("div");o.className="inline-deleted-margin-view-zone";const s={shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:0,domNode:n,marginDomNode:o,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let t=e.originalStartLineNumber;t<=e.originalEndLineNumber;t++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(t),null,null);return this._pendingLineChange.push(e),this._pendingViewZones.push(s),s}_finalize(e){const t=this._modifiedEditor.getOptions(),i=this._modifiedEditor.getModel().getOptions().tabSize,n=t.get(44),o=t.get(29),s=n.typicalHalfwidthCharacterWidth,r=t.get(93),a=this._originalModel.mightContainNonBasicASCII(),l=this._originalModel.mightContainRTL(),c=t.get(59),d=t.get(131).decorationsWidth,h=t.get(105),u=t.get(88),g=t.get(83),p=t.get(45),m=this._lineBreaksComputer.finalize();let f=0;for(let t=0;t0,y=Ga(1e4);let x=0,S=0,E=null;for(let t=_.originalStartLineNumber;t<=_.originalEndLineNumber;t++){const s=t-_.originalStartLineNumber,r=this._originalModel.getLineTokens(t),b=r.getLineContent(),k=m[f++],D=wd.filter(C,t,1,b.length+1);if(k){let m=0;for(const e of k.breakOffsets){const t=r.sliceAndInflate(m,e,0),s=b.substring(m,e);x=Math.max(x,this._renderOriginalLine(S++,s,t,wd.extractWrapped(D,m,e),v,a,l,n,o,c,d,h,u,g,p,i,y,w)),m=e}for(E||(E=[]);E.lengthe.afterLineNumber-t.afterLineNumber))}_renderOriginalLine(e,t,i,n,o,s,r,a,l,c,d,h,u,g,p,m,f,_){f.appendASCIIString('
');const A=zd.isBasicASCII(t,s),b=zd.containsRTL(t,A,r),w=Ld(new Ed(a.isMonospace&&!l,a.canUseHalfwidthRightwardsArrow,t,!1,A,b,0,i,n,m,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,h,u,g,p!==Ye.OFF,null),f);if(f.appendASCIIString("
"),this._renderIndicators){const t=document.createElement("div");t.className=`delete-sign ${Rg.asClassName(wI)}`,t.setAttribute("style",`position:absolute;top:${e*c}px;width:${d}px;height:${c}px;right:0;`),_.appendChild(t)}return w.characterMapping.getAbsoluteOffset(w.characterMapping.length)}}function TI(e){return e.modifiedEndLineNumber>0}function MI(e){return e.originalEndLineNumber>0}function RI(){const e=document.createElement("div");return e.className="diagonal-fill",e}function BI(e,t,i,n){const o=e.getLineCount();return i=Math.min(o,Math.max(1,i)),n=Math.min(o,Math.max(1,n)),t.coordinatesConverter.convertModelRangeToViewRange(new Gi(i,e.getLineMinColumn(i),n,e.getLineMaxColumn(n)))}function OI(e,t){return{enableSplitViewResizing:Pe(e.enableSplitViewResizing,t.enableSplitViewResizing),renderSideBySide:Pe(e.renderSideBySide,t.renderSideBySide),maxComputationTime:Ve(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:Ve(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:Pe(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:Pe(e.renderIndicators,t.renderIndicators),originalEditable:Pe(e.originalEditable,t.originalEditable),diffCodeLens:Pe(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:Pe(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:(i=e.diffWordWrap,n=t.diffWordWrap,Qe(i,n,["off","on","inherit"]))};var i,n}zg(((e,t)=>{const i=e.getColor(Ff);i&&(t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${i}; }`),t.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${i}; }`),t.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${i}; }`));const n=e.getColor(Pf);n&&(t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${n}; }`),t.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${n}; }`),t.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${n}; }`));const o=e.getColor(zf);o&&t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${"hc"===e.type?"dashed":"solid"} ${o}; }`);const s=e.getColor(Vf);s&&t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${"hc"===e.type?"dashed":"solid"} ${s}; }`);const r=e.getColor(Tm);r&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${r}; }`);const a=e.getColor(Hf);a&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${a}; }`);const l=e.getColor(Mm);l&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${l};\n\t\t\t}\n\t\t`);const c=e.getColor(Rm);c&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${c};\n\t\t\t}\n\t\t`);const d=e.getColor(Bm);d&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${d};\n\t\t\t}\n\t\t`);const h=e.getColor(Wf);t.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${h} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${h} 50%, ${h} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)}));var FI=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},PI=function(e,t){return function(i,n){t(i,n,e)}};let zI=class extends Lt{constructor(e){super(),this._themeService=e,this._onCodeEditorAdd=this._register(new zt),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new zt),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new zt),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new zt),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map((e=>this._codeEditors[e]))}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map((e=>this._diffEditors[e]))}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((t=>t.removeDecorations(e)))))}setModelProperty(e,t,i){const n=e.toString();let o;this._modelProperties.has(n)?o=this._modelProperties.get(n):(o=new Map,this._modelProperties.set(n,o)),o.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i)){return this._modelProperties.get(i).get(t)}}};zI=FI([PI(0,Tg)],zI);var VI=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},HI=function(e,t){return function(i,n){t(i,n,e)}};let WI=class extends zI{constructor(e,t){super(t),this.onCodeEditorAdd((()=>this._checkContextKey())),this.onCodeEditorRemove((()=>this._checkContextKey())),this._editorIsOpen=e.createKey("editorIsOpen",!1),this._activeCodeEditor=null}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}openCodeEditor(e,t,i){return t?Promise.resolve(this.doOpenEditor(t,e)):Promise.resolve(null)}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const i=t.resource.scheme;if(i===Ih.http||i===Ih.https)return Mu(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if("number"==typeof i.endLineNumber&&"number"==typeof i.endColumn)e.setSelection(i),e.revealRangeInCenter(i,1);else{const t={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};WI=VI([HI(0,Sg),HI(1,Tg)],WI),wl(Aa,WI);const UI=_a("layoutService");var QI=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},jI=function(e,t){return function(i,n){t(i,n,e)}};let KI=class{constructor(e){this._codeEditorService=e,this.onDidLayout=Ft.None}get dimension(){return this._dimension||(this._dimension=Jh(window.document.body)),this._dimension}get hasContainer(){return!1}get container(){throw new Error("ILayoutService.container is not available in the standalone editor!")}focus(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}};KI=QI([jI(0,Aa)],KI);let GI=class extends KI{constructor(e,t){super(t),this._container=e}get hasContainer(){return!1}get container(){return this._container}};GI=QI([jI(1,Aa)],GI),wl(UI,KI);const YI=_a("dialogService");var $I=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},qI=function(e,t){return function(i,n){t(i,n,e)}},JI=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function XI(e){return e.scheme===Ih.file?e.fsPath:e.path}let ZI=0;class eL{constructor(e,t,i,n,o,s,r){this.id=++ZI,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=o,this.sourceId=s,this.sourceOrder=r,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class tL{constructor(e,t){this.resourceLabel=e,this.reason=t}}class iL{constructor(){this.elements=new Map}createMessage(){const t=[],i=[];for(const[,e]of this.elements){(0===e.reason?t:i).push(e.resourceLabel)}let n=[];return t.length>0&&n.push(e(0,"The following files have been closed and modified on disk: {0}.",t.join(", "))),i.length>0&&n.push(e(0,"The following files have been modified in an incompatible way: {0}.",i.join(", "))),n.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class nL{constructor(e,t,i,n,o,s,r){this.id=++ZI,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=o,this.sourceId=s,this.sourceOrder=r,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new iL),this.removedResources.has(t)||this.removedResources.set(t,new tL(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new iL),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new tL(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class oL{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let e=0,i=this._past.length;e=0;e--)t.push(this._future[e].id);return new _y(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,o=-1;for(let s=0,r=this._past.length;s=t||r.id!==e.elements[n])&&(i=!1,o=0),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}let s=-1;for(let o=this._future.length-1;o>=0;o--,n++){const r=this._future[o];i&&(n>=t||r.id!==e.elements[n])&&(i=!1,s=o),i||1!==r.type||r.removeResource(this.resourceLabel,this.strResource,0)}-1!==o&&(this._past=this._past.slice(0,o)),-1!==s&&(this._future=this._future.slice(s+1)),this.versionId++}getElements(){const e=[],t=[];for(const t of this._past)e.push(t.actual);for(const e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class sL{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;et.sourceOrder)&&(t=s,i=n))}return[t,i]}canUndo(e){if(e instanceof by){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){return this._editStacks.get(t).hasPastElements()}return!1}_onError(e,t){gt(e);for(const e of t.strResources)this.removeElements(e);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,o){const s=this._acquireLocks(i);let r;try{r=t()}catch(t){return s(),n.dispose(),this._onError(t,e)}return r?r.then((()=>(s(),n.dispose(),o())),(t=>(s(),n.dispose(),this._onError(t,e)))):(s(),n.dispose(),o())}_invokeWorkspacePrepare(e){return JI(this,void 0,void 0,(function*(){if(void 0===e.actual.prepareUndoRedo)return Lt.None;const t=e.actual.prepareUndoRedo();return void 0===t?Lt.None:t}))}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return t(Lt.None);const i=e.actual.prepareUndoRedo();return i?St(i)?t(i):i.then((e=>t(e))):t(Lt.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||rL);return new sL(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new lL(this._undo(e,0,!0));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new lL}_checkWorkspaceUndo(t,i,n,o){if(i.removedResources)return this._tryToSplitAndUndo(t,i,i.removedResources,e(0,"Could not undo '{0}' across all files. {1}",i.label,i.removedResources.createMessage()));if(o&&i.invalidatedResources)return this._tryToSplitAndUndo(t,i,i.invalidatedResources,e(0,"Could not undo '{0}' across all files. {1}",i.label,i.invalidatedResources.createMessage()));const s=[];for(const e of n.editStacks)e.getClosestPastElement()!==i&&s.push(e.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(t,i,null,e(0,"Could not undo '{0}' across all files because changes were made to {1}",i.label,s.join(", ")));const r=[];for(const e of n.editStacks)e.locked&&r.push(e.resourceLabel);return r.length>0?this._tryToSplitAndUndo(t,i,null,e(0,"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",i.label,r.join(", "))):n.isValid()?null:this._tryToSplitAndUndo(t,i,null,e(0,"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",i.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),o=this._checkWorkspaceUndo(e,t,n,!1);return o?o.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(t,i,n,o){return JI(this,void 0,void 0,(function*(){if(i.canSplit()&&!this._isPartOfUndoGroup(i)){const s=yield this._dialogService.show(Pk.Info,e(0,"Would you like to undo '{0}' across all files?",i.label),[e(0,"Undo in {0} Files",n.editStacks.length),e(0,"Undo this File"),e(0,"Cancel")],{cancelId:2});if(2===s.choice)return;if(1===s.choice)return this._splitPastWorkspaceElement(i,null),this._undo(t,0,!0);const r=this._checkWorkspaceUndo(t,i,n,!1);if(r)return r.returnValue;o=!0}let s;try{s=yield this._invokeWorkspacePrepare(i)}catch(e){return this._onError(e,i)}const r=this._checkWorkspaceUndo(t,i,n,!0);if(r)return s.dispose(),r.returnValue;for(const e of n.editStacks)e.moveBackward(i);return this._safeInvokeWithLocks(i,(()=>i.actual.undo()),n,s,(()=>this._continueUndoInGroup(i.groupId,o)))}))}_resourceUndo(t,i,n){if(i.isValid){if(!t.locked)return this._invokeResourcePrepare(i,(e=>(t.moveBackward(i),this._safeInvokeWithLocks(i,(()=>i.actual.undo()),new sL([t]),e,(()=>this._continueUndoInGroup(i.groupId,n))))));{const t=e(0,"Could not undo '{0}' because there is already an undo or redo operation running.",i.label);this._notificationService.warn(t)}}else t.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestPastElement();s&&(s.groupId===e&&(!t||s.groupOrder>t.groupOrder)&&(t=s,i=n))}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);return i?this._undo(i,0,t):void 0}undo(e){if(e instanceof by){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"==typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),o=n.getClosestPastElement();if(!o)return;if(o.groupId){const[e,n]=this._findClosestUndoElementInGroup(o.groupId);if(o!==e&&n)return this._undo(n,t,i)}if((o.sourceId!==t||o.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,o);try{return 1===o.type?this._workspaceUndo(e,o,i):this._resourceUndo(n,o,i)}finally{}}_confirmAndContinueUndo(t,i,n){return JI(this,void 0,void 0,(function*(){if(1!==(yield this._dialogService.show(Pk.Info,e(0,"Would you like to undo '{0}'?",n.label),[e(0,"Yes"),e(0,"No")],{cancelId:1})).choice)return this._undo(t,i,!0)}))}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&(s.sourceId===e&&(!t||s.sourceOrder0)return this._tryToSplitAndRedo(t,i,null,e(0,"Could not redo '{0}' across all files because changes were made to {1}",i.label,s.join(", ")));const r=[];for(const e of n.editStacks)e.locked&&r.push(e.resourceLabel);return r.length>0?this._tryToSplitAndRedo(t,i,null,e(0,"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",i.label,r.join(", "))):n.isValid()?null:this._tryToSplitAndRedo(t,i,null,e(0,"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",i.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}_executeWorkspaceRedo(e,t,i){return JI(this,void 0,void 0,(function*(){let n;try{n=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const o=this._checkWorkspaceRedo(e,t,i,!0);if(o)return n.dispose(),o.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),i,n,(()=>this._continueRedoInGroup(t.groupId)))}))}_resourceRedo(t,i){if(i.isValid){if(!t.locked)return this._invokeResourcePrepare(i,(e=>(t.moveForward(i),this._safeInvokeWithLocks(i,(()=>i.actual.redo()),new sL([t]),e,(()=>this._continueRedoInGroup(i.groupId))))));{const t=e(0,"Could not redo '{0}' because there is already an undo or redo operation running.",i.label);this._notificationService.warn(t)}}else t.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const s=o.getClosestFutureElement();s&&(s.groupId===e&&(!t||s.groupOrder=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},gL=function(e,t){return function(i,n){t(i,n,e)}};const pL=_a("ILanguageFeatureDebounceService");var mL;!function(e){const t=new WeakMap;let i=0;e.of=function(e){let n=t.get(e);return void 0===n&&(n=++i,t.set(e,n)),n}}(mL||(mL={}));class fL{constructor(e,t,i,n,o,s){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=o,this._max=s,this._cache=new Vo(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>ic(mL.of(t),e)),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?cL(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new hL(6),this._cache.set(i,n));const o=cL(n.update(t),this._min,this._max);return this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${o}ms`),o}_overall(){const e=new dL;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){return cL(0|this._overall()||this._default,this._min,this._max)}}let _L=class{constructor(e){this._logService=e,this._data=new Map}for(e,t,i){var n,o,s;const r=null!==(n=null==i?void 0:i.min)&&void 0!==n?n:50,a=null!==(o=null==i?void 0:i.max)&&void 0!==o?o:Math.pow(r,2),l=null!==(s=null==i?void 0:i.key)&&void 0!==s?s:void 0,c=`${mL.of(e)},${r}${l?","+l:""}`;let d=this._data.get(c);return d||(d=new fL(this._logService,t,e,0|this._overallAverage()||1.5*r,r,a),this._data.set(c,d)),d}_overallAverage(){let e=new dL;for(let t of this._data.values())e.update(t.default());return e.value}};_L=uL([gL(0,Zc)],_L),wl(pL,_L,!0);const AL=_a("IWorkspaceEditService");class bL{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(de(t=e)&&Bi.isUri(t.resource)&&de(t.edit))return new wL(e.resource,e.edit,e.modelVersionId,e.metadata);var t;if(function(e){return de(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}(e))return new CL(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")}))}}class wL extends bL{constructor(e,t,i,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class CL extends bL{constructor(e,t,i,n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}const vL=Object.freeze({id:"editor",order:5,type:"object",title:e(0,"Editor"),scope:5}),yL=Object.assign(Object.assign({},vL),{properties:{"editor.tabSize":{type:"number",default:Le.tabSize,minimum:1,markdownDescription:e(0,"The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:Le.insertSpaces,markdownDescription:e(0,"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:Le.detectIndentation,markdownDescription:e(0,"Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:Le.trimAutoWhitespace,description:e(0,"Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:Le.largeFileOptimizations,description:e(0,"Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:e(0,"Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[e(0,"Only suggest words from the active document."),e(0,"Suggest words from all open documents of the same language."),e(0,"Suggest words from all open documents.")],description:e(0,"Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[e(0,"Semantic highlighting enabled for all color themes."),e(0,"Semantic highlighting disabled for all color themes."),e(0,"Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:e(0,"Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:e(0,"Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:e(0,"Lines above this length will not be tokenized for performance reasons")},"editor.language.brackets":{type:"array",default:!1,description:e(0,"Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:e(0,"The opening bracket character or string sequence.")},{type:"string",description:e(0,"The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:"array",default:!1,description:e(0,"Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:e(0,"The opening bracket character or string sequence.")},{type:"string",description:e(0,"The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:e(0,"Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:e(0,"Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:e(0,"Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:e(0,"When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:e(0,"Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:e(0,"Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[e(0,"Lines will never wrap."),e(0,"Lines will wrap at the viewport width."),e(0,"Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});for(const e of ct){const t=e.schema;if(void 0!==t)if(void 0!==(xL=t).type||void 0!==xL.anyOf)yL.properties[`editor.${e.name}`]=t;else for(const e in t)Object.hasOwnProperty.call(t,e)&&(yL.properties[e]=t[e])}var xL;let SL=null;function EL(){return null===SL&&(SL=Object.create(null),Object.keys(yL.properties).forEach((e=>{SL[e]=!0}))),SL}Lg.as($E).registerConfiguration(yL);class kL{static insert(e,t){return{range:new Gi(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}class DL{constructor(e={},t=[],i=[]){this._contents=e,this._keys=t,this._overrides=i,this.isFrozen=!1,this.overrideConfigurations=new Map}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?fl(this.contents,e):this.contents}getOverrideValue(e,t){const i=this.getContentsForOverrideIdentifer(t);return i?e?fl(i,e):i:void 0}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){const t=ye(this.contents),i=ye(this.overrides),n=[...this.keys];for(const o of e){this.mergeContents(t,o.contents);for(const e of o.overrides){const[t]=i.filter((t=>V(t.identifiers,e.identifiers)));t?(this.mergeContents(t.contents,e.contents),t.keys.push(...e.keys),t.keys=Y(t.keys)):i.push(ye(e))}for(const e of o.keys)-1===n.indexOf(e)&&n.push(e)}return new DL(t,n,i)}freeze(){return this.isFrozen=!0,this}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;let i={};for(const e of Y([...Object.keys(this.contents),...Object.keys(t)])){let n=this.contents[e],o=t[e];o&&("object"==typeof n&&"object"==typeof o?(n=ye(n),this.mergeContents(n,o)):n=o),i[e]=n}return new DL(i,this.keys,this.overrides)}mergeContents(e,t){for(const i of Object.keys(t))i in e&&de(e[i])&&de(t[i])?this.mergeContents(e[i],t[i]):e[i]=ye(t[i])}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?function(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const i in e)if(xe.call(e,i)){const n=e[i];"object"!=typeof n||Object.isFrozen(n)||t.push(n)}}return e}(e):e}getContentsForOverrideIdentifer(e){let t=null,i=null;const n=e=>{e&&(i?this.mergeContents(i,e):i=ye(e))};for(const i of this.overrides)V(i.identifiers,[e])?t=i.contents:i.identifiers.includes(e)&&n(i.contents);return n(t),i}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),gl(this.contents,e,t,(e=>{throw new Error(e)}))}removeValue(e){this.removeKey(e)&&pl(this.contents,e)}addKey(e){let t=this.keys.length;for(let i=0;iconsole.error(`Conflict in default settings: ${e}`)))}for(const e of Object.keys(n))ek.test(e)&&o.push({identifiers:tk(e),keys:Object.keys(n[e]),contents:ul(n[e],(e=>console.error(`Conflict in default settings file: ${e}`)))});super(n,i,o)}}class LL{constructor(e,t,i=new DL,n=new DL,o=new Po,s=new DL,r=new Po,a=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=i,this._workspaceConfiguration=n,this._folderConfigurations=o,this._memoryConfiguration=s,this._memoryConfigurationByResource=r,this._freeze=a,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new Po,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidateConfigurationModel(t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=new DL,this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(e,t,i){const n=this.getConsolidateConfigurationModel(t,i),o=this.getFolderConfigurationModelForResource(t.resource,i),s=t.resource&&this._memoryConfigurationByResource.get(t.resource)||this._memoryConfiguration,r=t.overrideIdentifier?this._defaultConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._defaultConfiguration.freeze().getValue(e),a=t.overrideIdentifier?this.userConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.userConfiguration.freeze().getValue(e),l=t.overrideIdentifier?this.localUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.localUserConfiguration.freeze().getValue(e),c=t.overrideIdentifier?this.remoteUserConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this.remoteUserConfiguration.freeze().getValue(e),d=i?t.overrideIdentifier?this._workspaceConfiguration.freeze().override(t.overrideIdentifier).getValue(e):this._workspaceConfiguration.freeze().getValue(e):void 0,h=o?t.overrideIdentifier?o.freeze().override(t.overrideIdentifier).getValue(e):o.freeze().getValue(e):void 0,u=t.overrideIdentifier?s.override(t.overrideIdentifier).getValue(e):s.getValue(e),g=n.getValue(e),p=Y(q(n.overrides.map((e=>e.identifiers)))).filter((t=>void 0!==n.getOverrideValue(e,t)));return{defaultValue:r,userValue:a,userLocalValue:l,userRemoteValue:c,workspaceValue:d,workspaceFolderValue:h,memoryValue:u,value:g,default:void 0!==r?{value:this._defaultConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this._defaultConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,user:void 0!==a?{value:this.userConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.userConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,userLocal:void 0!==l?{value:this.localUserConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.localUserConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,userRemote:void 0!==c?{value:this.remoteUserConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this.remoteUserConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,workspace:void 0!==d?{value:this._workspaceConfiguration.freeze().getValue(e),override:t.overrideIdentifier?this._workspaceConfiguration.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,workspaceFolder:void 0!==h?{value:null==o?void 0:o.freeze().getValue(e),override:t.overrideIdentifier?null==o?void 0:o.freeze().getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,memory:void 0!==u?{value:s.getValue(e),override:t.overrideIdentifier?s.getOverrideValue(e,t.overrideIdentifier):void 0}:void 0,overrideIdentifiers:p.length?p:void 0}}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidateConfigurationModel(e,t){let i=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?i.override(e.overrideIdentifier):i}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const o=this._memoryConfigurationByResource.get(e);o&&(i=i.merge(o))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}getFolderConfigurationModelForResource(e,t){if(t&&e){const i=t.getFolder(e);if(i)return this._folderConfigurations.get(i.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce(((e,t)=>{const{contents:i,overrides:n,keys:o}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:o}]),e}),[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.user),n=this.parseConfigurationModel(e.workspace),o=e.folders.reduce(((e,t)=>(e.set(Bi.revive(t[0]),this.parseConfigurationModel(t[1])),e)),new Po);return new LL(t,i,new DL,n,o,new DL,new Po,!1)}static parseConfigurationModel(e){return new DL(e.contents,e.keys,e.overrides).freeze()}}class NL{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._previousConfiguration=void 0;const o=new Set;e.keys.forEach((e=>o.add(e))),e.overrides.forEach((([,e])=>e.forEach((e=>o.add(e))))),this.affectedKeys=[...o.values()];const s=new DL;this.affectedKeys.forEach((e=>s.setValue(e,{}))),this.affectedKeysTree=s.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=LL.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){return!De(this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(i=this.previous)||void 0===i?void 0:i.workspace):void 0,this.currentConfiguraiton.getValue(e,t,this.currentWorkspace))}return!0}return!1}doesAffectedKeysTreeContains(e,t){let i,n=ul({[t]:!0},(()=>{}));for(;"object"==typeof n&&(i=Object.keys(n)[0]);){if(!(e=e[i]))return!1;n=n[i]}return!0}}const TL=/^(cursor|delete)/;class ML extends Lt{constructor(e,t,i,n,o){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=o,this._onDidUpdateKeybindings=this._register(new zt),this._currentChord=null,this._currentChordChecker=new _n,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=RL.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new fn,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:Ft.None}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t||this._contextKeyService);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){const i=this.resolveKeyboardEvent(e);if(i.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[n]=i.getDispatchParts();if(null===n)return null;const o=this._contextKeyService.getContext(t),s=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(o,s,n)}_enterChordMode(t,i){this._currentChord={keypress:t,label:i},this._currentChordStatusMessage=this._notificationService.status(e(0,"({0}) was pressed. Waiting for second key of chord...",i));const n=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-n>5e3&&this._leaveChordMode():this._leaveChordMode()}),500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchParts();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=RL.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=RL.EMPTY,null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet((()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null}),300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[o]=i.getParts();return this._ignoreSingleModifiers=new RL(o),null!==this._currentSingleModifier&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(t,i,n=!1){let o=!1;if(t.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let s=null,r=null;if(n){const[e]=t.getSingleModifierDispatchParts();s=e,r=e}else[s]=t.getDispatchParts(),r=this._currentChord?this._currentChord.keypress:null;if(null===s)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),o;const a=this._contextKeyService.getContext(i),l=t.getLabel(),c=this._getResolver().resolve(a,r,s);return this._logService.trace("KeybindingService#dispatch",l,null==c?void 0:c.commandId),c&&c.enterChord?(o=!0,this._enterChordMode(s,l),o):(this._currentChord&&(c&&c.commandId||(this._notificationService.status(e(0,"The key combination ({0}, {1}) is not a command.",this._currentChord.label,l),{hideAfter:1e4}),o=!0)),this._leaveChordMode(),c&&c.commandId&&(c.bubble||(o=!0),void 0===c.commandArgs?this._commandService.executeCommand(c.commandId).then(void 0,(e=>this._notificationService.warn(e))):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,(e=>this._notificationService.warn(e))),TL.test(c.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding"})),o)}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class RL{constructor(e){this._ctrlKey=!!e&&e.ctrlKey,this._shiftKey=!!e&&e.shiftKey,this._altKey=!!e&&e.altKey,this._metaKey=!!e&&e.metaKey}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}RL.EMPTY=new RL(null);const BL=_a("keybindingService");class OL{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(const t of e){const e=t.command;e&&"-"!==e.charAt(0)&&this._defaultBoundCommands.set(e,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=OL.handleRemovals([].concat(e).concat(t));for(let e=0,t=this._keybindings.length;e=0;e--){let n=i[e];if(n.command===t.command)continue;const o=n.keypressParts.length>1,s=t.keypressParts.length>1;o&&s&&n.keypressParts[1]!==t.keypressParts[1]||OL.whenIsEntirelyIncluded(n.when,t.when)&&this._removeFromLookupMap(n)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if(void 0!==t)for(let i=0,n=t.length;i=0;e--){const n=i[e];if(t.contextMatchesRules(n.when))return n}return i[i.length-1]}resolve(e,t,i){this._log(`| Resolving ${i}${t?` chorded from ${t}`:""}`);let n=null;if(null!==t){const e=this._map.get(t);if(void 0===e)return this._log("\\ No keybinding entries."),null;n=[];for(let t=0,o=e.length;t1&&null!==o.keypressParts[1]?(this._log(`\\ From ${n.length} keybinding entries, matched chord, when: ${FL(o.when)}, source: ${PL(o)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${n.length} keybinding entries, matched ${o.command}, when: ${FL(o.when)}, source: ${PL(o)}.`),{enterChord:!1,leaveChord:o.keypressParts.length>1,commandId:o.command,commandArgs:o.commandArgs,bubble:o.bubble}):(this._log(`\\ From ${n.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){let n=t[i];if(OL._contextMatchesRules(e,n.when))return n}return null}static _contextMatchesRules(e,t){return!t||t.evaluate(e)}}function FL(e){return e?`${e.serialize()}`:"no when condition"}function PL(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}class zL{constructor(e,t,i,n,o,s,r){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.keypressParts=e?VL(e.getDispatchParts()):[],e&&0===this.keypressParts.length&&(this.keypressParts=VL(e.getSingleModifierDispatchParts())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=o,this.extensionId=s,this.isBuiltinExtension=r}}function VL(e){let t=[];for(let i=0,n=e.length;ithis._getLabel(e)))}getAriaLabel(){return UL.toLabel(this._os,this._parts,(e=>this._getAriaLabel(e)))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:QL.toLabel(this._os,this._parts,(e=>this._getElectronAccelerator(e)))}isChord(){return this._parts.length>1}getParts(){return this._parts.map((e=>this._getPart(e)))}_getPart(e){return new Ah(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map((e=>this._getDispatchPart(e)))}getSingleModifierDispatchParts(){return this._parts.map((e=>this._getSingleModifierDispatchPart(e)))}}class GL extends KL{constructor(e,t){super(t,e.parts)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return ii.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":ii.toString(e.keyCode)}_getElectronAccelerator(e){return ii.toElectronAccelerator(e.keyCode)}_getDispatchPart(e){return GL.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=ii.toString(e.keyCode),t}_getSingleModifierDispatchPart(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}static _scanCodeToKeyCode(e){const t=ti[e];if(-1!==t)return t;switch(e){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 83;case 52:return 81;case 53:return 87;case 54:return 89;case 55:return 88;case 56:return 0;case 57:return 80;case 58:return 90;case 59:return 86;case 60:return 82;case 61:return 84;case 62:return 85;case 106:return 92}return 0}static _resolveSimpleUserBinding(e){if(!e)return null;if(e instanceof fh)return e;const t=this._scanCodeToKeyCode(e.scanCode);return 0===t?null:new fh(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,t)}static resolveUserBinding(e,t){const i=VL(e.map((e=>this._resolveSimpleUserBinding(e))));return i.length>0?[new GL(new _h(i),t)]:[]}}const YL=_a("labelService"),$L=_a("contextService");class qL{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}var JL,XL,ZL,eN,tN,iN,nN,oN,sN;!function(t){t.noSelection=e(0,"No selection"),t.singleSelectionRange=e(0,"Line {0}, Column {1} ({2} selected)"),t.singleSelection=e(0,"Line {0}, Column {1}"),t.multiSelectionRange=e(0,"{0} selections ({1} characters selected)"),t.multiSelection=e(0,"{0} selections"),t.emergencyConfOn=e(0,"Now changing the setting `accessibilitySupport` to 'on'."),t.openingDocs=e(0,"Now opening the Editor Accessibility documentation page."),t.readonlyDiffEditor=e(0," in a read-only pane of a diff editor."),t.editableDiffEditor=e(0," in a pane of a diff editor."),t.readonlyEditor=e(0," in a read-only code editor"),t.editableEditor=e(0," in a code editor"),t.changeConfigToOnMac=e(0,"To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),t.changeConfigToOnWinLinux=e(0,"To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),t.auto_on=e(0,"The editor is configured to be optimized for usage with a Screen Reader."),t.auto_off=e(0,"The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),t.tabFocusModeOnMsg=e(0,"Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),t.tabFocusModeOnMsgNoKb=e(0,"Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),t.tabFocusModeOffMsg=e(0,"Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),t.tabFocusModeOffMsgNoKb=e(0,"Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),t.openDocMac=e(0,"Press Command+H now to open a browser window with more information related to editor accessibility."),t.openDocWinLinux=e(0,"Press Control+H now to open a browser window with more information related to editor accessibility."),t.outroMsg=e(0,"You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),t.showAccessibilityHelpAction=e(0,"Show Accessibility Help")}(JL||(JL={})),function(t){t.inspectTokensAction=e(0,"Developer: Inspect Tokens")}(XL||(XL={})),function(t){t.gotoLineActionLabel=e(0,"Go to Line/Column...")}(ZL||(ZL={})),function(t){t.helpQuickAccessActionLabel=e(0,"Show all Quick Access Providers")}(eN||(eN={})),function(t){t.quickCommandActionLabel=e(0,"Command Palette"),t.quickCommandHelp=e(0,"Show And Run Commands")}(tN||(tN={})),function(t){t.quickOutlineActionLabel=e(0,"Go to Symbol..."),t.quickOutlineByCategoryActionLabel=e(0,"Go to Symbol by Category...")}(iN||(iN={})),function(t){t.editorViewAccessibleLabel=e(0,"Editor content"),t.accessibilityHelpMessage=e(0,"Press Alt+F1 for Accessibility Options.")}(nN||(nN={})),function(t){t.toggleHighContrast=e(0,"Toggle High Contrast Theme")}(oN||(oN={})),function(t){t.bulkEditServiceSummary=e(0,"Made {0} edits in {1} files")}(sN||(sN={}));const rN=_a("workspaceTrustManagementService");var aN;!function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(e,t){const n=[],o={start:e.start,end:Math.min(t.start,e.end)},s={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(s)||n.push(s),n}}(aN||(aN={}));var lN;function cN(e,t,i){const n=i.mode===lN.ALIGN?i.offset:i.offset+i.size,o=i.mode===lN.ALIGN?i.offset+i.size:i.offset;return 0===i.position?t<=e-n?n:t<=o?o-t:Math.max(e-t,0):t<=o?o-t:t<=e-n?n:0}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.context-view {\n\tposition: absolute;\n\tz-index: 2500;\n}\n\n.context-view.fixed {\n\tall: initial;\n\tfont-family: inherit;\n\tfont-size: 13px;\n\tposition: fixed;\n\tz-index: 2500;\n\tcolor: inherit;\n}\n",{}),function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"}(lN||(lN={}));class dN extends Lt{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=Lt.None,this.toDisposeOnSetContainer=Lt.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=Iu(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,Nu(this.view),this.setContainer(e,t),this._register(Dt((()=>this.setContainer(null,1))))}setContainer(e,t){var i;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,null===(i=this.shadowRootHostElement)||void 0===i||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=1!==t,this.useShadowDOM=3===t,this.useShadowDOM){this.shadowRootHostElement=Iu(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=hN,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(Iu("slot"))}else this.container.appendChild(this.view);const i=new It;dN.BUBBLE_UP_EVENTS.forEach((e=>{i.add(Ph(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),dN.BUBBLE_DOWN_EVENTS.forEach((e=>{i.add(Ph(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=i}}show(e){this.isVisible()&&this.hide(),Mh(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",Lu(this.view),this.toDisposeOnClean=e.render(this.view)||Lt.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||C&&gh?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;let e,t=this.delegate.getAnchor();if(bu(t)){let i=tu(t);e={top:i.top,left:i.left,width:i.width,height:i.height}}else e={top:t.y,left:t.x,width:t.width||1,height:t.height||2};const i=nu(this.view),n=ru(this.view),o=this.delegate.anchorPosition||0,s=this.delegate.anchorAlignment||0;let r,a;if(0===(this.delegate.anchorAxisAlignment||0)){const t={offset:e.top-window.pageYOffset,size:e.height,position:0===o?0:1},l={offset:e.left,size:e.width,position:0===s?0:1,mode:lN.ALIGN};r=cN(window.innerHeight,n,t)+window.pageYOffset,aN.intersects({start:r,end:r+n},{start:t.offset,end:t.offset+t.size})&&(l.mode=lN.AVOID),a=cN(window.innerWidth,i,l)}else{const t={offset:e.left,size:e.width,position:0===s?0:1},l={offset:e.top,size:e.height,position:0===o?0:1,mode:lN.ALIGN};a=cN(window.innerWidth,i,t),aN.intersects({start:a,end:a+i},{start:t.offset,end:t.offset+t.size})&&(l.mode=lN.AVOID),r=cN(window.innerHeight,n,l)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===o?"bottom":"top"),this.view.classList.add(0===s?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const l=tu(this.container);this.view.style.top=r-(this.useFixedPosition?tu(this.view).top:l.top)+"px",this.view.style.left=a-(this.useFixedPosition?tu(this.view).left:l.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null==t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),Nu(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!au(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}dN.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],dN.BUBBLE_DOWN_EVENTS=["click"];let hN='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t@font-face {\n\t\tfont-family: "codicon";\n\t\tfont-display: block;\n\t\tsrc: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';var uN=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},gN=function(e,t){return function(i,n){t(i,n,e)}};let pN=class extends Lt{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=Lt.None,this.container=e.hasContainer?e.container:null,this.contextView=this._register(new dN(this.container,1)),this.layout(),this._register(e.onDidLayout((()=>this.layout())))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?t!==this.container&&(this.container=t,this.setContainer(t,i?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(e);const n=Dt((()=>{this.currentViewDisposable===n&&this.hideContextView()}));return this.currentViewDisposable=n,n}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};pN=uN([gN(0,UI)],pN);let mN=[],fN=[],_N=[];function AN(e,t=!1){const i=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?ls(e.filepattern.toLowerCase()):void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(wi.sep)>=0}}(e);mN.push(i),i.userConfigured?_N.push(i):fN.push(i),t&&!i.userConfigured&&mN.forEach((e=>{e.mime===i.mime||e.userConfigured||(i.extension&&e.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&e.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&e.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&e.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))}))}function bN(e,t){let i;if(e)switch(e.scheme){case Ih.file:i=e.fsPath;break;case Ih.data:i=FC.parseMetaData(e).get(FC.META_DATA_LABEL);break;default:i=e.path}if(!i)return[ob.unknown];i=i.toLowerCase();const n=Si(i),o=wN(i,n,_N);if(o)return[o,ob.text];const s=wN(i,n,fN);if(s)return[s,ob.text];if(t){const e=function(e){mo(e)&&(e=e.substr(1));if(e.length>0)for(let t=mN.length-1;t>=0;t--){const i=mN[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i.mime}return}(t);if(e)return[e,ob.text]}return[ob.unknown]}function wN(e,t,i){var n;let o,s,r;for(let a=i.length-1;a>=0;a--){const l=i[a];if(t===l.filenameLowercase){o=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const i=l.filepatternOnPath?e:t;(null===(n=l.filepatternLowercase)||void 0===n?void 0:n.call(l,i))&&(s=l)}l.extension&&(!r||l.extension.length>r.extension.length)&&t.endsWith(l.extensionLowercase)&&(r=l)}return o?o.mime:s?s.mime:r?r.mime:void 0}const CN=Object.prototype.hasOwnProperty,vN="vs.editor.nullLanguage";class yN{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(vN,0),this._register(sk,1),this._nextLanguageId=2}_register(e,t){this._languageIdToLanguage[t]=e,this._languageToLanguageId.set(e,t)}register(e){if(this._languageToLanguageId.has(e))return;const t=this._nextLanguageId++;this._register(e,t)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||vN}}class xN extends Lt{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new zt),this.onDidChange=this._onDidChange.event,xN.instanceCount++,this._warnOnOverwrite=t,this.languageIdCodec=new yN,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(ok.onDidChangeLanguages((e=>{this._initializeFromRegistry()}))))}dispose(){xN.instanceCount--,super.dispose()}_initializeFromRegistry(){var e;this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e?(mN=mN.filter((e=>!e.userConfigured)),_N=[]):(mN=[],fN=[],_N=[]);const t=[].concat(ok.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(t)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{const t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),Lg.as($E).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(e){const t=e.id;let i;CN.call(this._languages,t)?i=this._languages[t]:(this.languageIdCodec.register(t),i={identifier:t,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[t]=i),this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(let e of t.extensions)AN({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let o of t.filenames)AN({id:i,mime:n,filename:o},this._warnOnOverwrite),e.filenames.push(o);if(Array.isArray(t.filenamePatterns))for(let e of t.filenamePatterns)AN({id:i,mime:n,filepattern:e},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{const t=new RegExp(e);"^"!==(o=t).source&&"^$"!==o.source&&"$"!==o.source&&"^\\s*$"!==o.source&&o.exec("")&&0===o.lastIndex||AN({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(e){gt(e)}}var o;e.aliases.push(i);let s=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(s=0===t.aliases.length?[null]:t.aliases),null!==s)for(const t of s)t&&0!==t.length&&e.aliases.push(t);const r=null!==s&&s.length>0;if(r&&null===s[0]);else{const t=(r?s[0]:null)||i;!r&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration),t.icon&&e.icons.push(t.icon)}isRegisteredLanguageId(e){return!!e&&CN.call(this._languages,e)}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(e){const t=e.toLowerCase();return CN.call(this._lowercaseNameMap,t)?this._lowercaseNameMap[t]:null}getLanguageIdByMimeType(e){return e&&CN.call(this._mimeTypesMap,e)?this._mimeTypesMap[e]:null}guessLanguageIdByFilepathOrFirstLine(e,t){if(!e&&!t)return[];return j(bN(e,t).map((e=>this.getLanguageIdByMimeType(e))))}}xN.instanceCount=0;class SN extends Lt{constructor(e=!1){super(),this._onDidEncounterLanguage=this._register(new zt),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onDidChange=this._register(new zt({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,SN.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new xN(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange((()=>this._onDidChange.fire())))}dispose(){SN.instanceCount--,super.dispose()}isRegisteredLanguageId(e){return this._registry.isRegisteredLanguageId(e)}getLanguageIdByLanguageName(e){return this._registry.getLanguageIdByLanguageName(e)}getLanguageIdByMimeType(e){return this._registry.getLanguageIdByMimeType(e)}guessLanguageIdByFilepathOrFirstLine(e,t){return $(this._registry.guessLanguageIdByFilepathOrFirstLine(e,t),null)}createById(e){return new EN(this.onDidChange,(()=>this._createAndGetLanguageIdentifier(e)))}createByFilepathOrFirstLine(e,t){return new EN(this.onDidChange,(()=>{const i=this.guessLanguageIdByFilepathOrFirstLine(e,t);return this._createAndGetLanguageIdentifier(i)}))}_createAndGetLanguageIdentifier(e){return e&&this.isRegisteredLanguageId(e)||(e=sk),this._encounteredLanguages.has(e)||(this._encounteredLanguages.add(e),er.getOrCreate(e),this._onDidEncounterLanguage.fire(e)),e}}SN.instanceCount=0;class EN{constructor(e,t){this._onDidChangeLanguages=e,this._selector=t,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages((()=>this._evaluate()))),this._emitter||(this._emitter=new zt({onLastListenerRemove:()=>{this._dispose()}})),this._emitter.event}_evaluate(){const e=this._selector();e!==this.languageId&&(this.languageId=e,this._emitter&&this._emitter.fire(this.languageId))}}Wr('/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n@font-face {\n\tfont-family: "codicon";\n\tfont-display: block;\n\tsrc: url(data:font/ttf;base64,AAEAAAALAIAAAwAwR1NVQiCLJXoAAAE4AAAAVE9TLzI3T0YkAAABjAAAAGBjbWFwDvMx2gAACDAAABeAZ2x5Zrw/FBUAACLUAADWAGhlYWRYl6BTAAAA4AAAADZoaGVhAlsCvAAAALwAAAAkaG10eNTB//4AAAHsAAAGRGxvY2G9iPF6AAAfsAAAAyRtYXhwArIBgQAAARgAAAAgbmFtZcta5AQAAPjUAAAB9XBvc3T8tLS9AAD6zAAAFcQAAQAAASwAAAAAASz////+AS4AAQAAAAAAAAAAAAAAAAAAAZEAAQAAAAEAAKgpQaZfDzz1AAsBLAAAAAB8JbCAAAAAAHwlsID////9AS4BLQAAAAgAAgAAAAAAAAABAAABkQF1ABcAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKADAAPgACREZMVAAObGF0bgAaAAQAAAAAAAAAAQAAAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAQBKwGQAAUAAAC+ANIAAAAqAL4A0gAAAJAADgBNAAACAAUDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFBmRWQAwOpg6/gBLAAAABsBRwADAAAAAQAAAAAAAAAAAAAAAAACAAAAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEs//8BLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAAASwAAAEsAAABLAAA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AADqeQAA6nkAAAASAADqegAA6noAAAGEAADqewAA6nsAAACIAADqfAAA6nwAAAB2AADqfQAA6n0AAAEWAADqfgAA6n4AAADzAADqfwAA6n8AAADqAADqgAAA6oAAAADrAADqgQAA6oEAAAFuAADqggAA6oIAAACsAADqgwAA6oMAAACTAADqhAAA6oQAAAChAADqhQAA6oUAAAFoAADqhgAA6oYAAAFIAADqhwAA6ocAAAB4AADqiAAA6ogAAAFZAADqigAA6ooAAAFBAADqiwAA6osAAAFQAADqjAAA6owAAAFOAADqjwAA6o8AAAFCAADqkAAA6pAAAAFRAADqkQAA6pEAAAFYAADqkgAA6pIAAAFTAADqkwAA6pMAAAFMAADqlAAA6pQAAACjAADqlQAA6pUAAAFHAADqlgAA6pYAAAFVAADqlwAA6pcAAAACAADqmAAA6pgAAAAEAADqmQAA6pkAAAAFAADqmgAA6poAAAAGAADqmwAA6psAAAAHAADqnAAA6pwAAAAIAADqnQAA6p0AAAAJAADqngAA6p4AAAAKAADqnwAA6p8AAAALAADqoAAA6qAAAAAMAADqoQAA6qEAAAAOAADqogAA6qIAAAAUAADqowAA6qMAAAAVAADqpAAA6qQAAAAWAADqpQAA6qUAAAAXAADqpgAA6qYAAABLAADqpwAA6qcAAABMAADqqAAA6qgAAABNAADqqQAA6qkAAABOAADqqgAA6qoAAABRAADqqwAA6qsAAABSAADqrAAA6qwAAAAaAADqrQAA6q0AAAAbAADqrgAA6q4AAAAcAADqrwAA6q8AAAAdAADqsAAA6rAAAAAeAADqsQAA6rEAAAAhAADqsgAA6rIAAAAjAADqswAA6rMAAAAkAADqtAAA6rQAAAAlAADqtQAA6rUAAAAmAADqtgAA6rYAAAAnAADqtwAA6rcAAAAoAADquAAA6rgAAAApAADquQAA6rkAAAAqAADqugAA6roAAAArAADquwAA6rsAAAAsAADqvAAA6rwAAAAwAADqvQAA6r0AAAAxAADqvgAA6r4AAAAyAADqvwAA6r8AAAAzAADqwAAA6sAAAAA0AADqwQAA6sEAAAA1AADqwgAA6sIAAAA3AADqwwAA6sMAAAA4AADqxAAA6sQAAAA6AADqxQAA6sUAAAA7AADqxgAA6sYAAAA8AADqxwAA6scAAAA+AADqyQAA6skAAABEAADqzAAA6swAAABFAADqzQAA6s0AAABGAADqzgAA6s4AAABHAADqzwAA6s8AAABWAADq0AAA6tAAAABYAADq0QAA6tEAAABaAADq0gAA6tIAAABdAADq0wAA6tMAAABiAADq1AAA6tQAAABkAADq1QAA6tUAAABlAADq1gAA6tYAAABmAADq1wAA6tcAAABnAADq2AAA6tgAAABoAADq2QAA6tkAAABqAADq2gAA6toAAABrAADq2wAA6tsAAABsAADq3AAA6twAAABtAADq3QAA6t0AAABuAADq3gAA6t4AAABvAADq3wAA6t8AAABwAADq4AAA6uAAAABxAADq4QAA6uEAAAByAADq4gAA6uIAAABzAADq4wAA6uMAAAB1AADq5AAA6uQAAAB3AADq5QAA6uUAAAB5AADq5gAA6uYAAAB8AADq5wAA6ucAAAB9AADq6AAA6ugAAACAAADq6QAA6ukAAACBAADq6gAA6uoAAACCAADq6wAA6usAAACDAADq7AAA6uwAAACEAADq7QAA6u0AAACFAADq7gAA6u4AAACGAADq7wAA6u8AAACHAADq8AAA6vAAAACJAADq8QAA6vEAAACLAADq8gAA6vIAAACMAADq8wAA6vMAAACNAADq9AAA6vQAAACOAADq9QAA6vUAAACPAADq9gAA6vYAAACQAADq9wAA6vcAAACSAADq+AAA6vgAAACUAADq+QAA6vkAAACVAADq+gAA6voAAACWAADq+wAA6vsAAACBAADq/AAA6vwAAACXAADq/QAA6v0AAACYAADq/gAA6v4AAACZAADq/wAA6v8AAACeAADrAAAA6wAAAACfAADrAQAA6wEAAACiAADrAgAA6wIAAACkAADrAwAA6wMAAACoAADrBAAA6wQAAACpAADrBQAA6wUAAACrAADrBgAA6wYAAACtAADrBwAA6wcAAACuAADrCAAA6wgAAACvAADrCQAA6wkAAACwAADrCwAA6wsAAAC0AADrDAAA6wwAAAC1AADrDQAA6w0AAAC2AADrDgAA6w4AAAC3AADrDwAA6w8AAAC4AADrEAAA6xAAAAC5AADrEQAA6xEAAAC6AADrEgAA6xIAAAC7AADrEwAA6xMAAADNAADrFAAA6xQAAADPAADrFQAA6xUAAADQAADrFgAA6xYAAADTAADrFwAA6xcAAADWAADrGAAA6xgAAADXAADrGQAA6xkAAADYAADrGgAA6xoAAADZAADrGwAA6xsAAADdAADrHAAA6xwAAADeAADrHQAA6x0AAADfAADrHgAA6x4AAADgAADrHwAA6x8AAADhAADrIAAA6yAAAADkAADrIQAA6yEAAADmAADrIgAA6yIAAADnAADrIwAA6yMAAADoAADrJAAA6yQAAADpAADrJQAA6yUAAADtAADrJgAA6yYAAADuAADrJwAA6ycAAADxAADrKAAA6ygAAADyAADrKQAA6ykAAAD1AADrKgAA6yoAAAD2AADrKwAA6ysAAAD8AADrLAAA6ywAAAEAAADrLQAA6y0AAAEBAADrLgAA6y4AAAECAADrLwAA6y8AAAEDAADrMAAA6zAAAAEFAADrMQAA6zEAAAEGAADrMgAA6zIAAAEHAADrMwAA6zMAAAEIAADrNAAA6zQAAAEJAADrNQAA6zUAAAEKAADrNgAA6zYAAAEOAADrNwAA6zcAAAEPAADrOAAA6zgAAAEQAADrOQAA6zkAAAERAADrOgAA6zoAAAESAADrOwAA6zsAAAETAADrPAAA6zwAAAEUAADrPQAA6z0AAAEVAADrPgAA6z4AAAEXAADrPwAA6z8AAAEYAADrQAAA60AAAAEaAADrQQAA60EAAAEbAADrQgAA60IAAAEdAADrQwAA60MAAAEeAADrRAAA60QAAAEfAADrRQAA60UAAAEgAADrRgAA60YAAAEhAADrRwAA60cAAAEiAADrSAAA60gAAAEjAADrSQAA60kAAAEoAADrSgAA60oAAAEpAADrSwAA60sAAAEqAADrTAAA60wAAAErAADrTQAA600AAAEsAADrTgAA604AAAEtAADrUAAA61AAAAExAADrUQAA61EAAAEyAADrUgAA61IAAAEzAADrUwAA61MAAAE0AADrVAAA61QAAAE3AADrVQAA61UAAAE4AADrVgAA61YAAAE6AADrVwAA61cAAAE7AADrWAAA61gAAAE8AADrWQAA61kAAAE+AADrWgAA61oAAAE/AADrWwAA61sAAAFDAADrXAAA61wAAAFEAADrXQAA610AAAFFAADrXgAA614AAAFGAADrXwAA618AAAFJAADrYAAA62AAAAFKAADrYQAA62EAAAFLAADrYgAA62IAAAFNAADrYwAA62MAAAFPAADrZAAA62QAAAFSAADrZQAA62UAAAFUAADrZgAA62YAAAFWAADrZwAA62cAAAFfAADraAAA62gAAAFgAADraQAA62kAAAFpAADragAA62oAAAFqAADrawAA62sAAAFrAADrbAAA62wAAAFsAADrbQAA620AAAFtAADrbgAA624AAAFvAADrbwAA628AAAFwAADrcAAA63AAAAFxAADrcQAA63EAAAFyAADrcgAA63IAAAFzAADrcwAA63MAAAF3AADrdAAA63QAAAF5AADrdQAA63UAAAF6AADrdgAA63YAAAF7AADrdwAA63cAAAF+AADreAAA63gAAAF/AADreQAA63kAAAGAAADregAA63oAAAGCAADrewAA63sAAAGDAADrfAAA63wAAAGHAADrfQAA630AAAGIAADrfgAA634AAAGJAADrfwAA638AAAGKAADrgAAA64AAAAGLAADrgQAA64EAAAGPAADrggAA64IAAAGQAADrgwAA64MAAADRAADrhAAA64QAAADSAADrhQAA64UAAADUAADrhgAA64YAAADVAADrhwAA64cAAABPAADriAAA64gAAABQAADriQAA64kAAABfAADrigAA64oAAABgAADriwAA64sAAABhAADrjAAA64wAAABTAADrjQAA640AAAFXAADrjgAA644AAABeAADrjwAA648AAABjAADrkAAA65AAAABcAADrkQAA65EAAABKAADrkgAA65IAAAAfAADrkwAA65MAAAAgAADrlAAA65QAAADiAADrlQAA65UAAAB6AADrlgAA65YAAAB/AADrlwAA65cAAACqAADrmAAA65gAAAF4AADrmQAA65kAAAABAADrmgAA65oAAAATAADrmwAA65sAAABUAADrnAAA65wAAADMAADrnQAA650AAAD0AADrngAA654AAAElAADrnwAA658AAAFaAADroAAA66AAAAD+AADroQAA66EAAACgAADrogAA66IAAAEwAADrowAA66MAAAEvAADrpAAA66QAAAD4AADrpQAA66UAAAFAAADrpgAA66YAAAD/AADrpwAA66cAAAEMAADrqAAA66gAAABJAADrqQAA66kAAAGBAADrqgAA66oAAAA5AADrqwAA66sAAADjAADrrAAA66wAAAB7AADrrQAA660AAAClAADrrgAA664AAADcAADrrwAA668AAADwAADrsAAA67AAAAENAADrsQAA67EAAAAiAADrsgAA67IAAAD9AADrswAA67MAAAD3AADrtAAA67QAAAAuAADrtQAA67UAAAAvAADrtgAA67YAAAA9AADrtwAA67cAAAFcAADruAAA67gAAAF8AADruQAA67kAAAF2AADrugAA67oAAAF0AADruwAA67sAAAF1AADrvAAA67wAAACbAADrvQAA670AAAEkAADrvgAA674AAAEmAADrvwAA678AAADvAADrwAAA68AAAABbAADrwQAA68EAAAGMAADrwgAA68IAAAGOAADrwwAA68MAAAGNAADrxAAA68QAAAFiAADrxQAA68UAAAFjAADrxgAA68YAAAFkAADrxwAA68cAAAFlAADryAAA68gAAAFmAADryQAA68kAAAFnAADrygAA68oAAAFhAADrywAA68sAAAANAADrzAAA68wAAABDAADrzQAA680AAAD5AADrzgAA684AAACKAADrzwAA688AAAGFAADr0AAA69AAAABZAADr0QAA69EAAACyAADr0gAA69IAAAC+AADr0wAA69MAAAC9AADr1AAA69QAAAC8AADr1QAA69UAAABCAADr1gAA69YAAABBAADr1wAA69cAAABAAADr2AAA69gAAAAQAADr2QAA69kAAACzAADr2gAA69oAAACaAADr2wAA69sAAACcAADr3AAA69wAAABIAADr3QAA690AAABXAADr3gAA694AAAEnAADr3wAA698AAACRAADr4AAA6+AAAABVAADr4QAA6+EAAAARAADr4gAA6+IAAACmAADr4wAA6+MAAACnAADr5AAA6+QAAAD7AADr5QAA6+UAAAAYAADr5gAA6+YAAAAZAADr5wAA6+cAAADaAADr6AAA6+gAAAAPAADr6QAA6+kAAAF9AADr6gAA6+oAAADsAADr6wAA6+sAAADLAADr7AAA6+wAAAC/AADr7QAA6+0AAADAAADr7gAA6+4AAADFAADr7wAA6+8AAADDAADr8AAA6/AAAADEAADr8QAA6/EAAADGAADr8gAA6/IAAADHAADr8wAA6/MAAADIAADr9AAA6/QAAADJAADr9QAA6/UAAADKAADr9gAA6/YAAADCAADr9wAA6/cAAADB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ZGljb25SZWd1bGFyY29kaWNvbmNvZGljb25WZXJzaW9uIDEuNWNvZGljb25UaGUgaWNvbiBmb250IGZvciBWaXN1YWwgU3R1ZGlvIENvZGVodHRwOi8vZm9udGVsbG8uY29tAGMAbwBkAGkAYwBvAG4AUgBlAGcAdQBsAGEAcgBjAG8AZABpAGMAbwBuAGMAbwBkAGkAYwBvAG4AVgBlAHIAcwBpAG8AbgAgADEALgA1AGMAbwBkAGkAYwBvAG4AVABoAGUAIABpAGMAbwBuACAAZgBvAG4AdAAgAGYAbwByACAAVgBpAHMAdQBhAGwAIABTAHQAdQBkAGkAbwAgAEMAbwBkAGUAaAB0AHQAcAA6AC8ALwBmAG8AbgB0AGUAbABsAG8ALgBjAG8AbQAAAAACAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZEBAgEDAQQBBQEGAQcBCAEJAQoBCwEMAQ0BDgEPARABEQESARMBFAEVARYBFwEYARkBGgEbARwBHQEeAR8BIAEhASIBIwEkASUBJgEnASgBKQEqASsBLAEtAS4BLwEwATEBMgEzATQBNQE2ATcBOAE5AToBOwE8AT0BPgE/AUABQQFCAUMBRAFFAUYBRwFIAUkBSgFLAUwBTQFOAU8BUAFRAVIBUwFUAVUBVgFXAVgBWQFaAVsBXAFdAV4BXwFgAWEBYgFjAWQBZQFmAWcBaAFpAWoBawFsAW0BbgFvAXABcQFyAXMBdAF1AXYBdwF4AXkBegF7AXwBfQF+AX8BgAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcoBywHMAc0BzgHPAdAB0QHSAdMB1AHVAdYB1wHYAdkB2gHbAdwB3QHeAd8B4AHhAeIB4wHkAeUB5gHnAegB6QHqAesB7AHtAe4B7wHwAfEB8gHzAfQB9QH2AfcB+AH5AfoB+wH8Af0B/gH/AgACAQICAgMCBAIFAgYCBwIIAgkCCgILAgwCDQIOAg8CEAIRAhICEwIUAhUCFgIXAhgCGQIaAhsCHAIdAh4CHwIgAiECIgIjAiQCJQImAicCKAIpAioCKwIsAi0CLgIvAjACMQIyAjMCNAI1AjYCNwI4AjkCOgI7AjwCPQI+Aj8CQAJBAkICQwJEAkUCRgJHAkgCSQJKAksCTAJNAk4CTwJQAlECUgJTAlQCVQJWAlcCWAJZAloCWwJcAl0CXgJfAmACYQJiAmMCZAJlAmYCZwJoAmkCagJrAmwCbQJuAm8CcAJxAnICcwJ0AnUCdgJ3AngCeQJ6AnsCfAJ9An4CfwKAAoECggKDAoQChQKGAocCiAKJAooCiwKMAo0CjgKPApACkQKSAAdhY2NvdW50FGFjdGl2YXRlLWJyZWFrcG9pbnRzA2FkZAdhcmNoaXZlCmFycm93LWJvdGgKYXJyb3ctZG93bgphcnJvdy1sZWZ0C2Fycm93LXJpZ2h0EGFycm93LXNtYWxsLWRvd24QYXJyb3ctc21hbGwtbGVmdBFhcnJvdy1zbWFsbC1yaWdodA5hcnJvdy1zbWFsbC11cAphcnJvdy1zd2FwCGFycm93LXVwDGF6dXJlLWRldm9wcwVhenVyZQtiZWFrZXItc3RvcAZiZWFrZXIIYmVsbC1kb3QEYmVsbARib2xkBGJvb2sIYm9va21hcmsLYnJhY2tldC1kb3QNYnJhY2tldC1lcnJvcglicmllZmNhc2UJYnJvYWRjYXN0B2Jyb3dzZXIDYnVnCGNhbGVuZGFyDWNhbGwtaW5jb21pbmcNY2FsbC1vdXRnb2luZw5jYXNlLXNlbnNpdGl2ZQljaGVjay1hbGwFY2hlY2sJY2hlY2tsaXN0DGNoZXZyb24tZG93bgxjaGV2cm9uLWxlZnQNY2hldnJvbi1yaWdodApjaGV2cm9uLXVwDGNocm9tZS1jbG9zZQ9jaHJvbWUtbWF4aW1pemUPY2hyb21lLW1pbmltaXplDmNocm9tZS1yZXN0b3JlDWNpcmNsZS1maWxsZWQTY2lyY2xlLWxhcmdlLWZpbGxlZBRjaXJjbGUtbGFyZ2Utb3V0bGluZQ5jaXJjbGUtb3V0bGluZQxjaXJjbGUtc2xhc2gNY2lyY3VpdC1ib2FyZAljbGVhci1hbGwGY2xpcHB5CWNsb3NlLWFsbAVjbG9zZQ5jbG91ZC1kb3dubG9hZAxjbG91ZC11cGxvYWQFY2xvdWQEY29kZQxjb2xsYXBzZS1hbGwKY29sb3ItbW9kZQdjb21iaW5lEmNvbW1lbnQtZGlzY3Vzc2lvbgdjb21tZW50DmNvbXBhc3MtYWN0aXZlC2NvbXBhc3MtZG90B2NvbXBhc3MEY29weQtjcmVkaXQtY2FyZARkYXNoCWRhc2hib2FyZAhkYXRhYmFzZQlkZWJ1Zy1hbGwPZGVidWctYWx0LXNtYWxsCWRlYnVnLWFsdCdkZWJ1Zy1icmVha3BvaW50LWNvbmRpdGlvbmFsLXVudmVyaWZpZWQcZGVidWctYnJlYWtwb2ludC1jb25kaXRpb25hbCBkZWJ1Zy1icmVha3BvaW50LWRhdGEtdW52ZXJpZmllZBVkZWJ1Zy1icmVha3BvaW50LWRhdGEkZGVidWctYnJlYWtwb2ludC1mdW5jdGlvbi11bnZlcmlmaWVkGWRlYnVnLWJyZWFrcG9pbnQtZnVuY3Rpb24fZGVidWctYnJlYWtwb2ludC1sb2ctdW52ZXJpZmllZBRkZWJ1Zy1icmVha3BvaW50LWxvZxxkZWJ1Zy1icmVha3BvaW50LXVuc3VwcG9ydGVkDWRlYnVnLWNvbnNvbGUUZGVidWctY29udGludWUtc21hbGwOZGVidWctY29udGludWUOZGVidWctY292ZXJhZ2UQZGVidWctZGlzY29ubmVjdBJkZWJ1Zy1saW5lLWJ5LWxpbmULZGVidWctcGF1c2ULZGVidWctcmVydW4TZGVidWctcmVzdGFydC1mcmFtZQ1kZWJ1Zy1yZXN0YXJ0FmRlYnVnLXJldmVyc2UtY29udGludWUXZGVidWctc3RhY2tmcmFtZS1hY3RpdmUUZGVidWctc3RhY2tmcmFtZS1kb3QQZGVidWctc3RhY2tmcmFtZQtkZWJ1Zy1zdGFydA9kZWJ1Zy1zdGVwLWJhY2sPZGVidWctc3RlcC1pbnRvDmRlYnVnLXN0ZXAtb3V0D2RlYnVnLXN0ZXAtb3ZlcgpkZWJ1Zy1zdG9wBWRlYnVnEGRlc2t0b3AtZG93bmxvYWQTZGV2aWNlLWNhbWVyYS12aWRlbw1kZXZpY2UtY2FtZXJhDWRldmljZS1tb2JpbGUKZGlmZi1hZGRlZAxkaWZmLWlnbm9yZWQNZGlmZi1tb2RpZmllZAxkaWZmLXJlbW92ZWQMZGlmZi1yZW5hbWVkBGRpZmYHZGlzY2FyZARlZGl0DWVkaXRvci1sYXlvdXQIZWxsaXBzaXMMZW1wdHktd2luZG93BWVycm9yB2V4Y2x1ZGUKZXhwYW5kLWFsbAZleHBvcnQKZXh0ZW5zaW9ucwpleWUtY2xvc2VkA2V5ZQhmZWVkYmFjawtmaWxlLWJpbmFyeQlmaWxlLWNvZGUKZmlsZS1tZWRpYQhmaWxlLXBkZg5maWxlLXN1Ym1vZHVsZRZmaWxlLXN5bWxpbmstZGlyZWN0b3J5EWZpbGUtc3ltbGluay1maWxlCGZpbGUtemlwBGZpbGUFZmlsZXMNZmlsdGVyLWZpbGxlZAZmaWx0ZXIFZmxhbWUJZm9sZC1kb3duB2ZvbGQtdXAEZm9sZA1mb2xkZXItYWN0aXZlDmZvbGRlci1saWJyYXJ5DWZvbGRlci1vcGVuZWQGZm9sZGVyBGdlYXIEZ2lmdAtnaXN0LXNlY3JldApnaXQtY29tbWl0C2dpdC1jb21wYXJlCWdpdC1tZXJnZRdnaXQtcHVsbC1yZXF1ZXN0LWNsb3NlZBdnaXQtcHVsbC1yZXF1ZXN0LWNyZWF0ZRZnaXQtcHVsbC1yZXF1ZXN0LWRyYWZ0EGdpdC1wdWxsLXJlcXVlc3QNZ2l0aHViLWFjdGlvbgpnaXRodWItYWx0D2dpdGh1Yi1pbnZlcnRlZAZnaXRodWIFZ2xvYmUKZ28tdG8tZmlsZQdncmFiYmVyCmdyYXBoLWxlZnQKZ3JhcGgtbGluZQ1ncmFwaC1zY2F0dGVyBWdyYXBoB2dyaXBwZXIRZ3JvdXAtYnktcmVmLXR5cGUFaGVhcnQHaGlzdG9yeQRob21lD2hvcml6b250YWwtcnVsZQVodWJvdAVpbmJveARpbmZvB2luc3BlY3QLaXNzdWUtZHJhZnQOaXNzdWUtcmVvcGVuZWQGaXNzdWVzBml0YWxpYwZqZXJzZXkEanNvbg5rZWJhYi12ZXJ0aWNhbANrZXkDbGF3DWxheWVycy1hY3RpdmUKbGF5ZXJzLWRvdAZsYXllcnMXbGF5b3V0LWFjdGl2aXR5YmFyLWxlZnQYbGF5b3V0LWFjdGl2aXR5YmFyLXJpZ2h0D2xheW91dC1jZW50ZXJlZA5sYXlvdXQtbWVudWJhchNsYXlvdXQtcGFuZWwtY2VudGVyFGxheW91dC1wYW5lbC1qdXN0aWZ5EWxheW91dC1wYW5lbC1sZWZ0EmxheW91dC1wYW5lbC1yaWdodAxsYXlvdXQtcGFuZWwTbGF5b3V0LXNpZGViYXItbGVmdBRsYXlvdXQtc2lkZWJhci1yaWdodBBsYXlvdXQtc3RhdHVzYmFyBmxheW91dAdsaWJyYXJ5EWxpZ2h0YnVsYi1hdXRvZml4CWxpZ2h0YnVsYg1saW5rLWV4dGVybmFsBGxpbmsLbGlzdC1maWx0ZXIJbGlzdC1mbGF0DGxpc3Qtb3JkZXJlZA5saXN0LXNlbGVjdGlvbglsaXN0LXRyZWUObGlzdC11bm9yZGVyZWQKbGl2ZS1zaGFyZQdsb2FkaW5nCGxvY2F0aW9uCmxvY2stc21hbGwEbG9jawZtYWduZXQJbWFpbC1yZWFkBG1haWwIbWFya2Rvd24JbWVnYXBob25lB21lbnRpb24EbWVudQVtZXJnZQltaWxlc3RvbmUGbWlycm9yDG1vcnRhci1ib2FyZARtb3ZlEG11bHRpcGxlLXdpbmRvd3MEbXV0ZQhuZXctZmlsZQpuZXctZm9sZGVyB25ld2xpbmUKbm8tbmV3bGluZQRub3RlEW5vdGVib29rLXRlbXBsYXRlCG5vdGVib29rCG9jdG9mYWNlDG9wZW4tcHJldmlldwxvcmdhbml6YXRpb24Gb3V0cHV0B3BhY2thZ2UIcGFpbnRjYW4LcGFzcy1maWxsZWQEcGFzcwpwZXJzb24tYWRkBnBlcnNvbglwaWUtY2hhcnQDcGluDHBpbm5lZC1kaXJ0eQZwaW5uZWQLcGxheS1jaXJjbGUEcGxheQRwbHVnDXByZXNlcnZlLWNhc2UHcHJldmlldxBwcmltaXRpdmUtc3F1YXJlB3Byb2plY3QFcHVsc2UIcXVlc3Rpb24FcXVvdGULcmFkaW8tdG93ZXIJcmVhY3Rpb25zC3JlY29yZC1rZXlzBnJlY29yZARyZWRvCnJlZmVyZW5jZXMHcmVmcmVzaAVyZWdleA9yZW1vdGUtZXhwbG9yZXIGcmVtb3RlBnJlbW92ZQtyZXBsYWNlLWFsbAdyZXBsYWNlBXJlcGx5CnJlcG8tY2xvbmUPcmVwby1mb3JjZS1wdXNoC3JlcG8tZm9ya2VkCXJlcG8tcHVsbAlyZXBvLXB1c2gEcmVwbwZyZXBvcnQPcmVxdWVzdC1jaGFuZ2VzBnJvY2tldBJyb290LWZvbGRlci1vcGVuZWQLcm9vdC1mb2xkZXIDcnNzBHJ1YnkJcnVuLWFib3ZlB3J1bi1hbGwJcnVuLWJlbG93CnJ1bi1lcnJvcnMIc2F2ZS1hbGwHc2F2ZS1hcwRzYXZlC3NjcmVlbi1mdWxsDXNjcmVlbi1ub3JtYWwLc2VhcmNoLXN0b3AGc2VhcmNoEnNlcnZlci1lbnZpcm9ubWVudA5zZXJ2ZXItcHJvY2VzcwZzZXJ2ZXINc2V0dGluZ3MtZ2VhcghzZXR0aW5ncwZzaGllbGQHc2lnbi1pbghzaWduLW91dAZzbWlsZXkPc29ydC1wcmVjZWRlbmNlDnNvdXJjZS1jb250cm9sEHNwbGl0LWhvcml6b250YWwOc3BsaXQtdmVydGljYWwIc3F1aXJyZWwKc3Rhci1lbXB0eQlzdGFyLWZ1bGwJc3Rhci1oYWxmC3N0b3AtY2lyY2xlDHN5bWJvbC1hcnJheQ5zeW1ib2wtYm9vbGVhbgxzeW1ib2wtY2xhc3MMc3ltYm9sLWNvbG9yD3N5bWJvbC1jb25zdGFudBJzeW1ib2wtZW51bS1tZW1iZXILc3ltYm9sLWVudW0Mc3ltYm9sLWV2ZW50DHN5bWJvbC1maWVsZAtzeW1ib2wtZmlsZRBzeW1ib2wtaW50ZXJmYWNlCnN5bWJvbC1rZXkOc3ltYm9sLWtleXdvcmQNc3ltYm9sLW1ldGhvZAtzeW1ib2wtbWlzYxBzeW1ib2wtbmFtZXNwYWNlDnN5bWJvbC1udW1lcmljD3N5bWJvbC1vcGVyYXRvchBzeW1ib2wtcGFyYW1ldGVyD3N5bWJvbC1wcm9wZXJ0eQxzeW1ib2wtcnVsZXIOc3ltYm9sLXNuaXBwZXQNc3ltYm9sLXN0cmluZxBzeW1ib2wtc3RydWN0dXJlD3N5bWJvbC12YXJpYWJsZQxzeW5jLWlnbm9yZWQEc3luYwV0YWJsZQN0YWcGdGFyZ2V0CHRhc2tsaXN0CXRlbGVzY29wZQ10ZXJtaW5hbC1iYXNoDHRlcm1pbmFsLWNtZA90ZXJtaW5hbC1kZWJpYW4OdGVybWluYWwtbGludXgTdGVybWluYWwtcG93ZXJzaGVsbA10ZXJtaW5hbC10bXV4D3Rlcm1pbmFsLXVidW50dQh0ZXJtaW5hbAl0ZXh0LXNpemUKdGhyZWUtYmFycwp0aHVtYnNkb3duCHRodW1ic3VwBXRvb2xzBXRyYXNoDXRyaWFuZ2xlLWRvd24NdHJpYW5nbGUtbGVmdA50cmlhbmdsZS1yaWdodAt0cmlhbmdsZS11cAd0d2l0dGVyEnR5cGUtaGllcmFyY2h5LXN1YhR0eXBlLWhpZXJhcmNoeS1zdXBlcg50eXBlLWhpZXJhcmNoeQZ1bmZvbGQTdW5ncm91cC1ieS1yZWYtdHlwZQZ1bmxvY2sGdW5tdXRlCnVudmVyaWZpZWQOdmFyaWFibGUtZ3JvdXAPdmVyaWZpZWQtZmlsbGVkCHZlcmlmaWVkCHZlcnNpb25zCXZtLWFjdGl2ZQp2bS1jb25uZWN0CnZtLW91dGxpbmUKdm0tcnVubmluZwJ2bQR3YW5kB3dhcm5pbmcFd2F0Y2gKd2hpdGVzcGFjZQp3aG9sZS13b3JkBndpbmRvdwl3b3JkLXdyYXARd29ya3NwYWNlLXRydXN0ZWQRd29ya3NwYWNlLXVua25vd24Td29ya3NwYWNlLXVudHJ1c3RlZAd6b29tLWluCHpvb20tb3V0AAA=) format("truetype");\n}\n\n.codicon[class*=\'codicon-\'] {\n\tfont: normal normal normal 16px/1 codicon;\n\tdisplay: inline-block;\n\ttext-decoration: none;\n\ttext-rendering: auto;\n\ttext-align: center;\n\ttext-transform: none;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n/* icon rules are dynamically created by the platform theme service (see iconsStyleSheet.ts) */\n',{});function kN(e){let t=e.definition;for(;t instanceof ys;)t=t.definition;return`.codicon-${e.id}:before { content: '${t.fontCharacter}'; }`}function DN(...e){return function(t,i){for(let n=0,o=e.length;n0?[{start:0,end:t.length}]:[]:null}function NN(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function TN(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let o=null;return(o=TN(e,t,i+1,n+1))?VN({start:n,end:n+1},o):null}return TN(e,t,i,n+1)}function MN(e){return 97<=e&&e<=122}function RN(e){return 65<=e&&e<=90}function BN(e){return 48<=e&&e<=57}function ON(e){return 32===e||9===e||10===e||13===e}const FN=new Set;function PN(e){return ON(e)||FN.has(e)}function zN(e){return MN(e)||RN(e)||BN(e)}function VN(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function HN(e,t){for(let i=t;i0&&!zN(e.charCodeAt(i-1)))return i}return e.length}function WN(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let o=null,s=n+1;for(o=WN(e,t,i+1,n+1);!o&&(s=HN(t,s))60)return null;const i=function(e){let t=0,i=0,n=0,o=0,s=0;for(let r=0;r.2&&t<.8&&n>.6&&o<.2}(i)){if(!function(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,o=0;for(e=e.toLowerCase();o0&&PN(e.charCodeAt(i-1)))return i;return e.length}"()[]{}<>`'\"-/;:,.?!".split("").forEach((e=>FN.add(e.charCodeAt(0))));const KN=DN(IN,UN,NN),GN=DN(IN,UN,(function(e,t){return TN(e.toLowerCase(),t.toLowerCase(),0,0)})),YN=new Vo(1e4);function $N(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=YN.get(e);n||(n=new RegExp(e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*"),"i"),YN.set(e,n));const o=n.exec(t);return o?[{start:o.index,end:o.index+o[0].length}]:i?GN(e,t):KN(e,t)}function qN(e,t,i,n,o,s){const r=Math.min(13,e.length);for(;i1;n--){const o=e[n]+i,s=t[t.length-1];s&&s.end===o?s.end=o+1:t.push({start:o,end:o+1})}return t}const XN=128;function ZN(){const e=[],t=[];for(let e=0;e<=XN;e++)t[e]=0;for(let i=0;i<=XN;i++)e.push(t.slice(0));return e}function eT(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const tT=eT(2*XN),iT=eT(2*XN),nT=ZN(),oT=ZN(),sT=ZN();function rT(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!go(i)}}function aT(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function lT(e,t,i){return t[e]!==i[e]}var cT;function dT(e,t,i,n,o,s,r){const a=e.length>XN?XN:e.length,l=n.length>XN?XN:n.length;if(i>=a||s>=l||a-i>l-s)return;if(!function(e,t,i,n,o,s,r=!1){for(;t=i&&a>=n;)o[r]===s[a]&&(iT[r]=a,r--),a--}(a,l,i,s,t,o);let c=1,d=1,h=i,u=s;const g=[!1];for(c=1,h=i;hr,A=_?oT[c][d-1]+(nT[c][d-1]>0?-5:0):0,b=u>r+1&&nT[c][d-1]>0,w=b?oT[c][d-2]+(nT[c][d-2]>0?-5:0):0;if(b&&(!_||w>=A)&&(!m||w>=f))oT[c][d]=w,sT[c][d]=3,nT[c][d]=0;else if(_&&(!m||A>=f))oT[c][d]=A,sT[c][d]=2,nT[c][d]=0;else{if(!m)throw new Error("not possible");oT[c][d]=f,sT[c][d]=1,nT[c][d]=nT[c-1][d-1]+1}}}if(!g[0]&&!r)return;c--,d--;const p=[oT[c][d],s];let m=0,f=0;for(;c>=1;){let e=d;do{const t=sT[c][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);m>1&&t[i+c-1]===o[s+d-1]&&!lT(e+s-1,n,o)&&m+1>nT[c][e]&&(e=d),e===d?m++:m=1,f||(f=e),c--,d=e-1,p.push(d)}l===a&&(p[0]+=2);const _=f-a;return p[0]-=_,p}function hT(e,t,i,n,o,s,r,a,l,c,d){if(t[i]!==s[r])return Number.MIN_SAFE_INTEGER;let h=1,u=!1;return r===i-n?h=e[i]===o[r]?7:5:!lT(r,o,s)||0!==r&&lT(r-1,o,s)?!rT(s,r)||0!==r&&rT(s,r-1)?(rT(s,r-1)||aT(s,r-1))&&(h=5,u=!0):h=5:(h=e[i]===o[r]?7:5,u=!0),h>1&&i===n&&(d[0]=!0),u||(u=lT(r,o,s)||rT(s,r-1)||aT(s,r-1)),i===n?r>l&&(h-=u?3:5):h+=c?u?2:0:u?0:1,r+1===a&&(h-=u?3:5),h}function uT(e,t,i,n,o,s,r){return function(e,t,i,n,o,s,r,a){let l=dT(e,t,i,n,o,s,a);if(l&&!r)return l;if(e.length>=3){const t=Math.min(7,e.length-1);for(let r=i+1;rl[0])&&(l=e))}}}return l}(e,t,i,n,o,s,!0,r)}function gT(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(cT||(cT={}));const pT="$(",mT=new RegExp(`\\$\\(${gs.iconNameExpression}(?:${gs.iconModifierExpression})?\\)`,"g"),fT=new RegExp(gs.iconNameCharacter),_T=new RegExp(`(\\\\)?${mT.source}`,"g");const AT=new RegExp(`\\\\${mT.source}`,"g");const bT=new RegExp(`(\\s)?(\\\\)?${mT.source}(\\s)?`,"g");function wT(e){return-1===e.indexOf(pT)?e:e.replace(bT,((e,t,i,n)=>i?e:t||n||""))}function CT(e){const t=e.indexOf(pT);return-1===t?{text:e}:function(e,t){const i=[];let n="";function o(e){if(e){n+=e;for(const t of e)i.push(c)}}let s,r,a=-1,l="",c=0,d=t;const h=e.length;o(e.substr(0,t));for(;dthis.doGetActionViewItem(e,i,o),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,..._||A?[10]:[]],keyDown:!0}}),this.menuElement=n,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new It),this.initializeOrUpdateStyleSheet(e,{}),this._register(Pp.addTarget(n)),Oh(n,wu.KEY_DOWN,(e=>{new vh(e).equals(2)&&e.preventDefault()})),i.enableMnemonics&&this.menuDisposables.add(Oh(n,wu.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){Cu(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof DT&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}}))),A&&this._register(Oh(n,wu.KEY_DOWN,(e=>{const t=new vh(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),Cu(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),Cu(e,!0))}))),this._register(Oh(this.domNode,wu.MOUSE_OUT,(e=>{au(e.relatedTarget,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register(Oh(this.actionsList,wu.MOUSE_OVER,(e=>{let t=e.target;if(t&&au(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}))),this._register(Pp.addTarget(this.actionsList)),this._register(Oh(this.actionsList,Op.Tap,(e=>{let t=e.initialTarget;if(t&&au(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})));let o={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new fS(n,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const s=this.scrollableElement.getDomNode();s.style.position="",this._register(Oh(n,Op.Change,(e=>{Cu(e,!0);const t=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:t-e.translationY})}))),this._register(Oh(s,wu.MOUSE_UP,(e=>{e.preventDefault()}))),n.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((e=>{var t;return!(null===(t=i.submenuIds)||void 0===t?void 0:t.has(e.id))||(console.warn(`Found submenu cycle: ${e.id}`),!1)})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof IT))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeOrUpdateStyleSheet(e,t){this.styleSheet||(hu(e)?this.styleSheet=pu(e):(ET.globalStyleSheet||(ET.globalStyleSheet=pu()),this.styleSheet=ET.globalStyleSheet)),this.styleSheet.textContent=function(e){let t=`\n.monaco-menu {\n\tfont-size: 13px;\n\n}\n\n${kN(ys.menuSelection)}\n${kN(ys.menuSubmenu)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tpadding: 0.5em 0 0 0;\n\tmargin-bottom: 0.5em;\n\twidth: 100%;\n\theight: 0px !important;\n\tmargin-left: .8em !important;\n\tmargin-right: .8em !important;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tborder: thin solid transparent; /* prevents jumping behaviour on hover or focus */\n}\n\n\n/* High Contrast Theming */\n:host-context(.hc-black) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: .5em 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 1.8em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tpadding: 0.2em 0 0 0;\n\tmargin-bottom: 0.2em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n`;const i=e.scrollbarShadow;i&&(t+=`\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tbox-shadow: ${i} 0 6px 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tbox-shadow: ${i} 6px 0 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\tbox-shadow: ${i} 6px 6px 6px -6px inset;\n\t\t\t}\n\t\t`);const n=e.scrollbarSliderBackground;n&&(t+=`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\tbackground: ${n};\n\t\t\t}\n\t\t`);const o=e.scrollbarSliderHoverBackground;o&&(t+=`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\tbackground: ${o};\n\t\t\t}\n\t\t`);const s=e.scrollbarSliderActiveBackground;s&&(t+=`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\tbackground: ${s};\n\t\t\t}\n\t\t`);return t}(t)}style(e){const t=this.getContainer();this.initializeOrUpdateStyleSheet(t,e);const i=e.foregroundColor?`${e.foregroundColor}`:"",n=e.backgroundColor?`${e.backgroundColor}`:"",o=e.borderColor?`1px solid ${e.borderColor}`:"",s=e.shadowColor?`0 2px 4px ${e.shadowColor}`:"";t.style.border=o,this.domNode.style.color=i,this.domNode.style.backgroundColor=n,t.style.boxShadow=s,this.viewItems&&this.viewItems.forEach((t=>{(t instanceof kT||t instanceof IT)&&t.style(e)}))}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register(Oh(this.element,wu.MOUSE_UP,(e=>{if(Cu(e,!0),Yr){if(new kh(e).rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register(Oh(this.element,wu.CONTEXT_MENU,(e=>{Cu(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=xu(this.element,Iu("a.action-menu-item")),this._action.id===Ju.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=xu(this.item,Iu("span.menu-item-check"+ys.menuSelection.cssSelector)),this.check.setAttribute("role","none"),this.label=xu(this.item,Iu("span.action-label")),this.options.label&&this.options.keybinding&&(xu(this.item,Iu("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){Mh(this.label);let e=wT(this.getAction().label);if(e){const t=function(e){const t=yT,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const i=yT.exec(e);if(i){e=Ln(e),xT.lastIndex=0;let t=xT.exec(e);for(;t&&t[1];)t=xT.exec(e);const n=e=>e.replace(/&&/g,"&");t?this.label.append(Mn(n(e.substr(0,t.index))," "),Iu("u",{"aria-hidden":"true"},t[3]),Rn(n(e.substr(t.index+t[0].length))," ")):this.label.innerText=n(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.getAction().enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const e=this.getAction().checked;this.item.classList.toggle("checked",!!e),void 0!==e?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",e?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=i?i.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=n)}style(e){this.menuStyle=e,this.applyStyle()}}class DT extends kT{constructor(e,t,i,n){super(e,e,n),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new It),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:ST.Right,this.showScheduler=new An((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new An((()=>{this.element&&!au(gu(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}),750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=xu(this.item,Iu("span.submenu-indicator"+ys.menuSubmenu.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(Oh(this.element,wu.KEY_UP,(e=>{let t=new vh(e);(t.equals(17)||t.equals(3))&&(Cu(e,!0),this.createSubmenu(!0))}))),this._register(Oh(this.element,wu.KEY_DOWN,(e=>{let t=new vh(e);gu()===this.item&&(t.equals(17)||t.equals(3))&&Cu(e,!0)}))),this._register(Oh(this.element,wu.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register(Oh(this.element,wu.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register(Oh(this.element,wu.FOCUS_OUT,(e=>{this.element&&!au(gu(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)}))))}updateEnabled(){}onClick(e){Cu(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(e){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const o={top:0,left:0};return o.left=cN(e.width,t.width,{position:n===ST.Right?0:1,offset:i.left,size:i.width}),o.left>=i.left&&o.left{new vh(e).equals(15)&&(Cu(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add(Oh(this.submenuContainer,wu.KEY_DOWN,(e=>{new vh(e).equals(15)&&Cu(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=e?`${e}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class IT extends PD{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}function LT(e,t){const i=Object.create(null);for(let n in t){const o=t[n];o&&(i[n]=eA(o,e))}return i}function NT(e,t,i){function n(){const n=LT(e.getColorTheme(),t);"function"==typeof i?i(n):i.style(n)}return n(),e.onDidColorThemeChange(n)}function TT(e,t,i){return NT(t,Object.assign(Object.assign({},MT),i||{}),e)}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.context-view .monaco-menu {\n\tmin-width: 130px;\n}\n\n",{});const MT={listFocusBackground:Uf,listFocusForeground:Qf,listFocusOutline:jf,listActiveSelectionBackground:Kf,listActiveSelectionForeground:Gf,listActiveSelectionIconForeground:Yf,listFocusAndSelectionBackground:Kf,listFocusAndSelectionForeground:Gf,listInactiveSelectionBackground:$f,listInactiveSelectionIconForeground:Jf,listInactiveSelectionForeground:qf,listInactiveFocusBackground:Xf,listInactiveFocusOutline:Zf,listHoverBackground:e_,listHoverForeground:t_,listDropBackground:i_,listSelectionOutline:nm,listHoverOutline:nm,listFilterWidgetBackground:l_,listFilterWidgetOutline:c_,listFilterWidgetNoMatchesOutline:d_,listMatchesShadow:am,treeIndentGuidesStroke:h_,tableColumnsBorder:u_,tableOddRowsBackgroundColor:g_},RT={shadowColor:am,borderColor:A_,foregroundColor:b_,backgroundColor:w_,selectionForegroundColor:C_,selectionBackgroundColor:v_,selectionBorderColor:y_,separatorColor:x_,scrollbarShadow:Tm,scrollbarSliderBackground:Mm,scrollbarSliderHoverBackground:Rm,scrollbarSliderActiveBackground:Bm};class BT{constructor(e,t,i,n,o){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.themeService=o,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=document.activeElement;let n=bu(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{let o=e.getMenuClassName?e.getMenuClassName():"";o&&(n.className+=" "+o),this.options.blockMouse&&(this.block=n.appendChild(Iu(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",Oh(this.block,wu.MOUSE_DOWN,(e=>e.stopPropagation())));const s=new It,r=e.actionRunner||new qu;var a,l;return r.onBeforeRun(this.onActionRun,this,s),r.onDidRun(this.onDidActionRun,this,s),i=new ET(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:r,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)}),s.add((a=i,NT(this.themeService,Object.assign(Object.assign({},RT),l),a))),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,s),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,s),s.add(Oh(window,wu.BLUR,(()=>this.contextViewService.hideContextView(!0)))),s.add(Oh(window,wu.MOUSE_DOWN,(e=>{if(e.defaultPrevented)return;let t=new kh(e),i=t.target;if(!t.rightButton){for(;i;){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}))),kt(s,i)},focus:()=>{i&&i.focus(!!e.autoSelectFirstItem)},onHide:t=>{e.onHide&&e.onHide(!!t),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},n,!!n)}onActionRun(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&!_t(e.error)&&this.notificationService.error(e.error)}}var OT=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},FT=function(e,t){return function(i,n){t(i,n,e)}};let PT=class extends Lt{constructor(e,t,i,n,o){super(),this._onDidShowContextMenu=new zt,this._onDidHideContextMenu=new zt,this.contextMenuHandler=new BT(i,e,t,n,o)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},e),{onHide:t=>{e.onHide&&e.onHide(t),this._onDidHideContextMenu.fire()}})),Ou.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};function zT(e){let t=JSON.parse(e);return t=VT(t),t}function VT(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return Bi.revive(e);case 2:return new RegExp(e.source,e.flags);case 14:return new Date(e.source)}if(e instanceof Fa||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;iLt.None,registerValidator:()=>Lt.None,registerExternalUriResolver:()=>Lt.None,setDefaultExternalOpener(){},registerExternalOpener:()=>Lt.None,open(){return WT(this,void 0,void 0,(function*(){return!1}))},resolveExternalUri(e){return WT(this,void 0,void 0,(function*(){return{resolved:e,dispose(){}}}))}});function jT(e,t){return Bi.isUri(e)?Gn(e.scheme,t):Yn(e,t+":")}function KT(e,...t){return t.some((t=>jT(e,t)))}var GT=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},YT=function(e,t){return function(i,n){t(i,n,e)}},$T=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let qT=class{constructor(e){this._commandService=e}open(e,t){return $T(this,void 0,void 0,(function*(){if(!jT(e,Ih.command))return!1;if(!(null==t?void 0:t.allowCommands))return!0;"string"==typeof e&&(e=Bi.parse(e));let i=[];try{i=zT(decodeURIComponent(e.query))}catch(t){try{i=zT(e.query)}catch(e){}}return Array.isArray(i)||(i=[i]),yield this._commandService.executeCommand(e.path,...i),!0}))}};qT=GT([YT(0,eg)],qT);let JT=class{constructor(e){this._editorService=e}open(e,t){return $T(this,void 0,void 0,(function*(){"string"==typeof e&&(e=Bi.parse(e));const i=function(e){let t;const i=/^L?(\d+)(?:,(\d+))?/.exec(e.fragment);return i&&(t={startLineNumber:parseInt(i[1]),startColumn:i[2]?parseInt(i[2]):1}),t}(e);return i&&(e=e.with({fragment:""})),e.scheme===Ih.file&&(e=MC(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,context:(null==t?void 0:t.fromUserGesture)?HT.USER:HT.API},null==t?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),null==t?void 0:t.openToSide),!0}))}};JT=GT([YT(0,Aa)],JT);let XT=class{constructor(e,t){this._openers=new Rt,this._validators=new Rt,this._resolvers=new Rt,this._resolvedUriTargets=new Po((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new Rt,this._defaultExternalOpener={openExternal:e=>$T(this,void 0,void 0,(function*(){return KT(e,Ih.http,Ih.https)?Mu(e):window.location.href=e,!0}))},this._openers.push({open:(e,t)=>$T(this,void 0,void 0,(function*(){return!(!(null==t?void 0:t.openExternal)&&!KT(e,Ih.mailto,Ih.http,Ih.https,Ih.vsls))&&(yield this._doOpenExternal(e,t),!0)}))}),this._openers.push(new qT(t)),this._openers.push(new JT(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}registerValidator(e){return{dispose:this._validators.push(e)}}registerExternalUriResolver(e){return{dispose:this._resolvers.push(e)}}setDefaultExternalOpener(e){this._defaultExternalOpener=e}registerExternalOpener(e){return{dispose:this._externalOpeners.push(e)}}open(e,t){var i;return $T(this,void 0,void 0,(function*(){const n="string"==typeof e?Bi.parse(e):e,o=null!==(i=this._resolvedUriTargets.get(n))&&void 0!==i?i:e;for(const e of this._validators)if(!(yield e.shouldOpen(o)))return!1;for(const i of this._openers){if(yield i.open(e,t))return!0}return!1}))}resolveExternalUri(e,t){return $T(this,void 0,void 0,(function*(){for(const i of this._resolvers)try{const n=yield i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch(e){}throw new Error("Could not resolve external URI: "+e.toString())}))}_doOpenExternal(e,t){return $T(this,void 0,void 0,(function*(){const i="string"==typeof e?Bi.parse(e):e;let n,o;try{n=(yield this.resolveExternalUri(i,t)).resolved}catch(e){n=i}if(o="string"==typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),null==t?void 0:t.allowContributedOpeners){const e="string"==typeof(null==t?void 0:t.allowContributedOpeners)?null==t?void 0:t.allowContributedOpeners:void 0;for(const t of this._externalOpeners){if(yield t.openExternal(o,{sourceUri:i,preferredOpenerId:e},jt.None))return!0}}return this._defaultExternalOpener.openExternal(o,{sourceUri:i},jt.None)}))}dispose(){this._validators.clear()}};var ZT,eM;XT=GT([YT(0,Aa),YT(1,eg)],XT),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(ZT||(ZT={})),function(t){t.compare=function(e,t){return t-e};const i=Object.create(null);i[t.Error]=e(0,"Error"),i[t.Warning]=e(0,"Warning"),i[t.Info]=e(0,"Info"),t.toString=function(e){return i[e]||""},t.fromSeverity=function(e){switch(e){case Pk.Error:return t.Error;case Pk.Warning:return t.Warning;case Pk.Info:return t.Info;case Pk.Ignore:return t.Hint}},t.toSeverity=function(e){switch(e){case t.Error:return Pk.Error;case t.Warning:return Pk.Warning;case t.Info:return Pk.Info;case t.Hint:return Pk.Ignore}}}(ZT||(ZT={})),function(e){const t="";function i(e,i){let n=[t];return e.source?n.push(e.source.replace("¦","\\¦")):n.push(t),e.code?"string"==typeof e.code?n.push(e.code.replace("¦","\\¦")):n.push(e.code.value.replace("¦","\\¦")):n.push(t),void 0!==e.severity&&null!==e.severity?n.push(ZT.toString(e.severity)):n.push(t),e.message&&i?n.push(e.message.replace("¦","\\¦")):n.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?n.push(e.startLineNumber.toString()):n.push(t),void 0!==e.startColumn&&null!==e.startColumn?n.push(e.startColumn.toString()):n.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?n.push(e.endLineNumber.toString()):n.push(t),void 0!==e.endColumn&&null!==e.endColumn?n.push(e.endColumn.toString()):n.push(t),n.push(t),n.join("¦")}e.makeKey=function(e){return i(e,!0)},e.makeKeyOptionalMessage=i}(eM||(eM={}));const tM=_a("markerService");var iM=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},nM=function(e,t){return function(i,n){t(i,n,e)}};class oM extends Lt{constructor(e){super(),this.model=e,this._markersData=new Map,this._register(Dt((()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()})))}update(e,t){const i=[...this._markersData.keys()];this._markersData.clear();const n=this.model.deltaDecorations(i,t);for(let t=0;tthis._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(e);return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(e);t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new oM(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),e.uri.scheme!==Ih.inMemory&&e.uri.scheme!==Ih.internal&&e.uri.scheme!==Ih.vscode||this._markerService&&this._markerService.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500}),i=t.map((t=>({range:this._createDecorationRange(e.model,t),options:this._createDecorationOption(t)})));e.update(t,i)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let i=Gi.lift(t);return t.severity!==ZT.Hint||this._hasMarkerTag(t,1)||this._hasMarkerTag(t,2)||(i=i.setEndPosition(i.startLineNumber,i.startColumn+2)),e.validateRange(i)}_createDecorationOption(e){let t,i,n,o,s;switch(e.severity){case ZT.Hint:t=this._hasMarkerTag(e,2)?void 0:this._hasMarkerTag(e,1)?"squiggly-unnecessary":"squiggly-hint",n=0;break;case ZT.Warning:t="squiggly-warning",i=Bg(Kb),n=20,s={color:Bg(V_),position:qi.Inline};break;case ZT.Info:t="squiggly-info",i=Bg(Gb),n=10;break;case ZT.Error:default:t="squiggly-error",i=Bg(jb),n=30,s={color:Bg(z_),position:qi.Inline}}return e.tags&&(-1!==e.tags.indexOf(1)&&(o="squiggly-inline-unnecessary"),-1!==e.tags.indexOf(2)&&(o="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:t,showIfCollapsed:!0,overviewRuler:{color:i,position:$i.Right},minimap:s,zIndex:n,inlineClassName:o}}_hasMarkerTag(e,t){return!!e.tags&&e.tags.indexOf(t)>=0}};sM=iM([nM(0,Pl),nM(1,tM)],sM);class rM{constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}static create(e,t){return new rM(e,new aM(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e?new Gi(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,o,s]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new rM(this._startLineNumber,n),new rM(this._startLineNumber+s,o)]}applyEdit(e,t){const[i,n,o]=jv(t);this.acceptEdit(e,i,n,o,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,o){this._acceptDeleteRange(e),this._acceptInsertText(new Ki(e.startLineNumber,e.startColumn),t,i,n,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const e=i-t;return void(this._startLineNumber-=e)}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const n=-t;this._startLineNumber-=n,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,o){if(0===t&&0===i)return;const s=e.lineNumber-this._startLineNumber;if(s<0)return void(this._startLineNumber+=t);s>=this._tokens.getMaxDeltaLine()+1||this._tokens.acceptInsertText(s,e.column-1,t,i,n,o)}}class aM{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)){let o=n;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let s=n;for(;se||d===e&&u>=t)&&(de||h===e&&g>=t){if(ho?p-=o-i:p=i;else if(u===t&&g===i){if(!(u===n&&p>o)){c=!0;continue}p-=o-i}else if(uo)){c=!0;continue}u===t?(g=i,p=g+(p-o)):(g=0,p=g+(p-o))}else if(u>n){if(0===a&&!c){l=r;break}u-=a}else{if(!(u===n&&g>=o))throw new Error("Not possible!");e&&0===u&&(g+=e,p+=e),u-=a,g-=o-i,p-=o-i}const f=4*l;s[f]=u,s[f+1]=g,s[f+2]=p,s[f+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,o,s){const r=0===i&&1===n&&(s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122),a=this._tokens,l=this._tokenCount;for(let s=0;s=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},dM=function(e,t){return function(i,n){t(i,n,e)}};let hM=class{constructor(e,t,i,n){this._legend=e,this._themeService=t,this._languageService=i,this._logService=n,this._hashTable=new pM,this._hasWarnedOverlappingTokens=!1}getMetadata(e,t,i){const n=this._languageService.languageIdCodec.encodeLanguageId(i),o=this._hashTable.get(e,t,n);let s;if(o)s=o.metadata,this._logService.getLevel()===ed.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${xs.getForeground(s)}, fontStyle ${xs.getFontStyle(s).toString(2)}`);else{let o=this._legend.tokenTypes[e];const r=[];if(o){let e=t;for(let t=0;e>0&&t>=1;e>0&&this._logService.getLevel()===ed.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),r.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(o,r,i);if(void 0===n)s=2147483647;else{if(s=0,void 0!==n.italic){s|=1|(n.italic?1:0)<<10}if(void 0!==n.bold){s|=2|(n.bold?2:0)<<10}if(void 0!==n.underline){s|=4|(n.underline?4:0)<<10}if(void 0!==n.strikethrough){s|=8|(n.strikethrough?8:0)<<10}if(n.foreground){s|=16|n.foreground<<14}0===s&&(s=2147483647)}}else this._logService.getLevel()===ed.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),s=2147483647,o="not-in-legend";this._hashTable.add(e,t,n,s),this._logService.getLevel()===ed.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${o}) / ${t} (${r.join(" ")}): foreground ${xs.getForeground(s)}, fontStyle ${xs.getFontStyle(s).toString(2)}`)}return s}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}};function uM(e,t,i){const n=e.data,o=e.data.length/5|0,s=Math.max(Math.ceil(o/1024),400),r=[];let a=0,l=1,c=0;for(;ae&&0===n[5*t];)t--;if(t-1===e){let e=d;for(;e+1d&&(t.warnOverlappingSemanticTokens(r,d+1),m=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=pM._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+10?t[0]:[]}(e),s=yield Promise.all(o.map((o=>fM(this,void 0,void 0,(function*(){let s,r=null;try{s=yield o.provideDocumentSemanticTokens(e,o===t?i:null,n)}catch(e){r=e,s=null}return s&&(_M(s)||AM(s))||(s=null),new bM(o,s,r)})))));for(const e of s){if(e.error)throw e.error;if(e.tokens)return e}return s.length>0?s[0]:null}))}class vM{constructor(e,t){this.provider=e,this.tokens=t}}function yM(e){const t=Zs.orderedGroups(e);return t.length>0?t[0]:[]}function xM(e,t,i){return fM(this,void 0,void 0,(function*(){const n=yM(e),o=yield Promise.all(n.map((n=>fM(this,void 0,void 0,(function*(){let o;try{o=yield n.provideDocumentRangeSemanticTokens(e,t,i)}catch(e){pt(e),o=null}return o&&_M(o)||(o=null),new vM(n,o)})))));for(const e of o)if(e.tokens)return e;return o.length>0?o[0]:null}))}tg.registerCommand("_provideDocumentSemanticTokensLegend",((e,...t)=>fM(void 0,void 0,void 0,(function*(){const[i]=t;fe(i instanceof Bi);const n=e.get(Pl).getModel(i);if(!n)return;const o=function(e){const t=Xs.orderedGroups(e);return t.length>0?t[0]:null}(n);return o?o[0].getLegend():e.get(eg).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})))),tg.registerCommand("_provideDocumentSemanticTokens",((e,...t)=>fM(void 0,void 0,void 0,(function*(){const[i]=t;fe(i instanceof Bi);const n=e.get(Pl).getModel(i);if(!n)return;if(!wM(n))return e.get(eg).executeCommand("_provideDocumentRangeSemanticTokens",i,n.getFullModelRange());const o=yield CM(n,null,null,jt.None);if(!o)return;const{provider:s,tokens:r}=o;if(!r||!_M(r))return;const a=mM({id:0,type:"full",data:r.data});return r.resultId&&s.releaseDocumentSemanticTokens(r.resultId),a})))),tg.registerCommand("_provideDocumentRangeSemanticTokensLegend",((e,...t)=>fM(void 0,void 0,void 0,(function*(){const[i,n]=t;fe(i instanceof Bi);const o=e.get(Pl).getModel(i);if(!o)return;const s=yM(o);if(0===s.length)return;if(1===s.length)return s[0].getLegend();if(!n||!Gi.isIRange(n))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),s[0].getLegend();const r=yield xM(o,Gi.lift(n),jt.None);return r?r.provider.getLegend():void 0})))),tg.registerCommand("_provideDocumentRangeSemanticTokens",((e,...t)=>fM(void 0,void 0,void 0,(function*(){const[i,n]=t;fe(i instanceof Bi),fe(Gi.isIRange(n));const o=e.get(Pl).getModel(i);if(!o)return;const s=yield xM(o,Gi.lift(n),jt.None);return s&&s.tokens?mM({id:0,type:"full",data:s.tokens.data}):void 0}))));var SM=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},EM=function(e,t){return function(i,n){t(i,n,e)}};function kM(e){return e.toString()}function DM(e){const t=new lc,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}class IM{constructor(e,t,i){this._modelEventListeners=new It,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange((()=>this.model.setMode(e.languageId))),this.model.setMode(e.languageId)}}const LM=A||_?1:2;class NM{constructor(e,t,i,n,o,s,r,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=o,this.sha1=s,this.versionId=r,this.alternativeVersionId=a}}let TM=class e extends Lt{constructor(e,t,i,n,o,s,r,a){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=n,this._undoRedoService=o,this._languageService=s,this._languageConfigurationService=r,this._languageFeatureDebounceService=a,this._onModelAdded=this._register(new zt),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new zt),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new zt),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new OM(this._themeService,this._languageService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration((()=>this._updateModelOptions()))),this._updateModelOptions(),this._register(new BM(this._semanticStyling,this,this._themeService,this._configurationService,this._languageFeatureDebounceService))}static _readModelOptions(e,t){var i;let n=Le.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let o=n;if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(o=t),o<1&&(o=1)}let s=Le.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(s="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let r=LM;const a=e.eol;"\r\n"===a?r=2:"\n"===a&&(r=1);let l=Le.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(l="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let c=Le.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(c="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let d=Le.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(d="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let h=Le.bracketPairColorizationOptions;return(null===(i=e.editor)||void 0===i?void 0:i.bracketPairColorization)&&"object"==typeof e.editor.bracketPairColorization&&(h={enabled:!!e.editor.bracketPairColorization.enabled}),{isForSimpleWidget:t,tabSize:n,indentSize:o,insertSpaces:s,detectIndentation:c,defaultEOL:r,trimAutoWhitespace:l,largeFileOptimizations:d,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"string"==typeof i&&"auto"!==i?i:3===S||2===S?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(t,i,n){let o=this._modelCreationOptionsByLanguageAndResource[t+i];if(!o){const s=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:i}),r=this._getEOL(i,t);o=e._readModelOptions({editor:s,eol:r},n),this._modelCreationOptionsByLanguageAndResource[t+i]=o}return o}_updateModelOptions(){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,o=i.length;ne){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const o=this.getCreationOptions(t,i,n),s=new ky(e,t,o,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(kM(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=DM(s)===e.sha1;if(n||e.sharesUndoRedoStack){for(const e of t.past)QC(e)&&e.matchesResource(i)&&e.setModel(s);for(const e of t.future)QC(e)&&e.matchesResource(i)&&e.setModel(s);this._undoRedoService.setElementsValidFlag(i,!0,(e=>QC(e)&&e.matchesResource(i))),n&&(s._overwriteVersionId(e.versionId),s._overwriteAlternativeVersionId(e.alternativeVersionId),s._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const r=kM(s.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");const a=new IM(s,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[r]=a,a}createModel(e,t,i,n=!1){let o;return t?(o=this._createModelData(e,t.languageId,i,n),this.setMode(o.model,t)):o=this._createModelData(e,sk,i,n),this._onModelAdded.fire(o.model),o.model}setMode(e,t){if(!t)return;const i=this._models[kM(e.uri)];i&&i.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||e.future.length>0){for(const i of e.past)QC(i)&&i.matchesResource(t.uri)&&(s=!0,r+=i.heapSize(t.uri),i.setModel(t.uri));for(const i of e.future)QC(i)&&i.matchesResource(t.uri)&&(s=!0,r+=i.heapSize(t.uri),i.setModel(t.uri))}}const a=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(s)if(!o&&r>a){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(t.uri,!1,(e=>QC(e)&&e.matchesResource(t.uri))),this._insertDisposedModel(new NM(t.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),o,r,DM(t),t.getVersionId(),t.getAlternativeVersionId()));else if(!o){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[i],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[t.getLanguageId()+t.uri],this._onModelRemoved.fire(t)}_onDidChangeLanguage(t,i){const n=i.oldLanguage,o=t.getLanguageId(),s=this.getCreationOptions(n,t.uri,t.isForSimpleWidget),r=this.getCreationOptions(o,t.uri,t.isForSimpleWidget);e._setModelOptionsForModel(t,r,s),this._onModelModeChanged.fire({model:t,oldLanguageId:n})}};TM.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,TM=SM([EM(0,hl),EM(1,Xc),EM(2,Tg),EM(3,Zc),EM(4,fy),EM(5,_l),EM(6,Sl),EM(7,pL)],TM);const MM="editor.semanticHighlighting";function RM(e,t,i){var n;const o=null===(n=i.getValue(MM,{overrideIdentifier:e.getLanguageId(),resource:e.uri}))||void 0===n?void 0:n.enabled;return"boolean"==typeof o?o:t.getColorTheme().semanticHighlighting}let BM=class extends Lt{constructor(e,t,i,n,o){super(),this._watchers=Object.create(null),this._semanticStyling=e;const s=e=>{this._watchers[e.uri.toString()]=new PM(e,this._semanticStyling,i,o)},r=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},a=()=>{for(let e of t.getModels()){const t=this._watchers[e.uri.toString()];RM(e,i,n)?t||s(e):t&&r(e,t)}};this._register(t.onModelAdded((e=>{RM(e,i,n)&&s(e)}))),this._register(t.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&r(e,t)}))),this._register(n.onDidChangeConfiguration((e=>{e.affectsConfiguration(MM)&&a()}))),this._register(i.onDidColorThemeChange(a))}};BM=SM([EM(1,Pl),EM(2,Tg),EM(3,hl),EM(4,pL)],BM);class OM extends Lt{constructor(e,t,i){super(),this._themeService=e,this._languageService=t,this._logService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}get(e){return this._caches.has(e)||this._caches.set(e,new hM(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}}class FM{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}let PM=class e extends Lt{constructor(t,i,n,o){super(),this._isDisposed=!1,this._model=t,this._semanticStyling=i,this._debounceInformation=o.for(Xs,"DocumentSemanticTokens",{min:e.REQUEST_MIN_DELAY,max:e.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new An((()=>this._fetchDocumentSemanticTokensNow()),e.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeLanguage((()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)})));const s=()=>{Et(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const e of Xs.all(t))"function"==typeof e.onDidChange&&this._documentProvidersChangeListeners.push(e.onDidChange((()=>this._fetchDocumentSemanticTokens.schedule(0))))};s(),this._register(Xs.onDidChange((()=>{s(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(n.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!wM(this._model))return void(this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1));const e=new Gt,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=CM(this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e;const o=[],s=this._model.onDidChangeContent((e=>{o.push(e)})),r=new Ot(!1);n.then((e=>{if(this._debounceInformation.update(this._model,r.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),e){const{provider:t,tokens:i}=e,n=this._semanticStyling.get(t);this._setDocumentSemanticTokens(t,i||null,n,o)}else this._setDocumentSemanticTokens(null,null,null,o)}),(e=>{e&&(_t(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||gt(e),this._currentDocumentRequestCancellationTokenSource=null,s.dispose(),o.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))}))}static _copy(e,t,i,n,o){for(let s=0;s{o.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)t&&i&&t.releaseDocumentSemanticTokens(i.resultId);else if(t&&n){if(!i)return this._model.setSemanticTokens(null,!0),void r();if(AM(i)){if(!s)return void this._model.setSemanticTokens(null,!0);if(0===i.edits.length)i={resultId:i.resultId,data:s.data};else{let t=0;for(const e of i.edits)t+=(e.data?e.data.length:0)-e.deleteCount;const n=s.data,o=new Uint32Array(n.length+t);let r=n.length,a=o.length;for(let t=i.edits.length-1;t>=0;t--){const s=i.edits[t],l=r-(s.start+s.deleteCount);l>0&&(e._copy(n,r-l,o,a-l,l),a-=l),s.data&&(e._copy(s.data,0,o,a-s.data.length,s.data.length),a-=s.data.length),r=s.start}r>0&&e._copy(n,0,o,0,r),i={resultId:i.resultId,data:o}}}if(_M(i)){this._currentDocumentResponse=new FM(t,i.resultId,i.data);const e=uM(i,n,this._model.getLanguageId());if(o.length>0)for(const t of o)for(const i of e)for(const e of t.changes)i.applyEdit(e.range,e.text);this._model.setSemanticTokens(e,!0)}else this._model.setSemanticTokens(null,!0);r()}else this._model.setSemanticTokens(null,!1)}};PM.REQUEST_MIN_DELAY=300,PM.REQUEST_MAX_DELAY=2e3,PM=SM([EM(2,Tg),EM(3,pL)],PM);Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.quick-input-widget {\n\tfont-size: 13px;\n}\n\n.quick-input-widget .monaco-highlighted-label .highlight,\n.quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #0066BF;\n}\n\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight,\n.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight {\n\tcolor: #9DDDFF;\n}\n\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,\n.vs-dark .quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #0097fb;\n}\n\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight,\n.hc-black .quick-input-widget .monaco-highlighted-label .highlight {\n\tcolor: #F38518;\n}\n\n.monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: rgba(221, 221, 221, 0.4);\n\tborder: solid 1px rgba(204, 204, 204, 0.4);\n\tborder-bottom-color: rgba(187, 187, 187, 0.4);\n\tbox-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4);\n\tcolor: #555;\n}\n\n.hc-black .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: transparent;\n\tborder: solid 1px rgb(111, 195, 223);\n\tbox-shadow: none;\n\tcolor: #fff;\n}\n\n.vs-dark .monaco-keybinding > .monaco-keybinding-key {\n\tbackground-color: rgba(128, 128, 128, 0.17);\n\tborder: solid 1px rgba(51, 51, 51, 0.6);\n\tborder-bottom-color: rgba(68, 68, 68, 0.6);\n\tbox-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6);\n\tcolor: #ccc;\n}\n",{});const zM=new RegExp(`(\\\\)?\\$\\((${gs.iconNameExpression}(?:${gs.iconModifierExpression})?)\\)`,"g");function VM(e){const t=new Array;let i,n=0,o=0;for(;null!==(i=zM.exec(e));){o=i.index||0,t.push(e.substring(n,o)),n=(i.index||0)+i[0].length;const[,s,r]=i;t.push(s?`$(${r})`:HM({id:r}))}return n .codicon {\n\tmargin: 0 0.2em;\n\tcolor: inherit !important;\n}\n\n.monaco-button-dropdown {\n\tdisplay: flex;\n\tcursor: pointer;\n}\n\n.monaco-button-dropdown > .monaco-dropdown-button {\n\tmargin-left: 1px;\n}\n\n.monaco-description-button {\n\tflex-direction: column;\n}\n\n.monaco-description-button .monaco-button-label {\n\tfont-weight: 500;\n}\n\n.monaco-description-button .monaco-button-description {\n\tfont-style: italic;\n}\n\n.monaco-description-button .monaco-button-label,\n.monaco-description-button .monaco-button-description\n{\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n}\n\n.monaco-description-button .monaco-button-label > .codicon,\n.monaco-description-button .monaco-button-description > .codicon\n{\n\tmargin: 0 0.2em;\n\tcolor: inherit !important;\n}\n",{});const WM={buttonBackground:jp.fromHex("#0E639C"),buttonHoverBackground:jp.fromHex("#006BB3"),buttonForeground:jp.white};class UM extends Lt{constructor(e,t){super(),this._onDidClick=this._register(new zt),this.options=t||Object.create(null),ke(this.options,WM,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),e.appendChild(this._element),this._register(Pp.addTarget(this._element)),[wu.CLICK,Op.Tap].forEach((e=>{this._register(Oh(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):Cu(e)})))})),this._register(Oh(this._element,wu.KEY_DOWN,(e=>{const t=new vh(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._element.blur(),i=!0),i&&Cu(t,!0)}))),this._register(Oh(this._element,wu.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.setHoverBackground()}))),this._register(Oh(this._element,wu.MOUSE_OUT,(e=>{this.applyStyles()}))),this.focusTracker=this._register(yu(this._element)),this._register(this.focusTracker.onDidFocus((()=>this.setHoverBackground()))),this._register(this.focusTracker.onDidBlur((()=>this.applyStyles()))),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;e=this.options.secondary?this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const i=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=i?"1px":"",this._element.style.borderStyle=i?"solid":"",this._element.style.borderColor=i}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?Su(this._element,...VM(e)):this._element.textContent=e,"string"==typeof this.options.title?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-count-badge {\n\tpadding: 3px 6px;\n\tborder-radius: 11px;\n\tfont-size: 11px;\n\tmin-width: 18px;\n\tmin-height: 18px;\n\tline-height: 11px;\n\tfont-weight: normal;\n\ttext-align: center;\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n}\n\n.monaco-count-badge.long {\n\tpadding: 2px 3px;\n\tborder-radius: 2px;\n\tmin-height: auto;\n\tline-height: normal;\n}\n",{});const QM={badgeBackground:jp.fromHex("#4D4D4D"),badgeForeground:jp.fromHex("#FFFFFF")};class jM{constructor(e,t){this.count=0,this.options=t||Object.create(null),ke(this.options,QM,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=xu(e,Iu(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=In(this.countFormat,this.count),this.element.title=In(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-progress-container {\n\twidth: 100%;\n\theight: 5px;\n\toverflow: hidden; /* keep progress bit in bounds */\n}\n\n.monaco-progress-container .progress-bit {\n\twidth: 2%;\n\theight: 5px;\n\tposition: absolute;\n\tleft: 0;\n\tdisplay: none;\n}\n\n.monaco-progress-container.active .progress-bit {\n\tdisplay: inherit;\n}\n\n.monaco-progress-container.discrete .progress-bit {\n\tleft: 0;\n\ttransition: width 100ms linear;\n}\n\n.monaco-progress-container.discrete.done .progress-bit {\n\twidth: 100%;\n}\n\n.monaco-progress-container.infinite .progress-bit {\n\tanimation-name: progress;\n\tanimation-duration: 4s;\n\tanimation-iteration-count: infinite;\n\ttransform: translate3d(0px, 0px, 0px);\n\tanimation-timing-function: linear;\n}\n\n.monaco-progress-container.infinite.infinite-long-running .progress-bit {\n\t/*\n\t The more smooth `linear` timing function can cause\n\t higher GPU consumption as indicated in\n\t https://github.com/microsoft/vscode/issues/97900 &\n\t https://github.com/microsoft/vscode/issues/138396\n\t*/\n\tanimation-timing-function: steps(100);\n}\n\n/**\n * The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of\n * that container. Since translateX is relative to the progress bit size, we have to multiple it with\n * its relative size to the parent container:\n * parent width: 5000%\n * bit width: 100%\n * translateX should be as follow:\n * 50%: 5000% * 50% - 50% (set to center) = 2450%\n * 100%: 5000% * 100% - 100% (do not overflow) = 4900%\n */\n@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4900%) scaleX(1) } }\n",{});const KM="done",GM="active",YM="infinite",$M="infinite-long-running",qM="discrete",JM={progressBarBackground:jp.fromHex("#0E70C0")};class XM extends Lt{constructor(e,t){super(),this.options=t||Object.create(null),ke(this.options,JM,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this.showDelayedScheduler=this._register(new An((()=>Lu(this.element)),0)),this.longRunningScheduler=this._register(new An((()=>this.infiniteLongRunning()),XM.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(e)}create(e){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(GM,YM,$M,qM),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(KM),this.element.classList.contains(YM)?(this.bit.style.opacity="0",e?setTimeout((()=>this.off()),200):this.off()):(this.bit.style.width="inherit",e?setTimeout((()=>this.off()),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(qM,KM,$M),this.element.classList.add(GM,YM),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add($M)}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}XM.LONG_RUNNING_INFINITE_THRESHOLD=1e4;class ZM{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const eR=new ZM("id#");Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.quick-input-widget {\n\tposition: absolute;\n\twidth: 600px;\n\tz-index: 2000;\n\tpadding: 0 1px 1px 1px;\n\tleft: 50%;\n\tmargin-left: -300px;\n}\n\n.quick-input-titlebar {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.quick-input-left-action-bar {\n\tdisplay: flex;\n\tmargin-left: 4px;\n\tflex: 1;\n}\n\n.quick-input-title {\n\tpadding: 3px 0px;\n\ttext-align: center;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.quick-input-right-action-bar {\n\tdisplay: flex;\n\tmargin-right: 4px;\n\tflex: 1;\n}\n\n.quick-input-right-action-bar > .actions-container {\n\tjustify-content: flex-end;\n}\n\n.quick-input-titlebar .monaco-action-bar .action-label.codicon {\n\tbackground-position: center;\n\tbackground-repeat: no-repeat;\n\tpadding: 2px;\n}\n\n.quick-input-description {\n\tmargin: 6px;\n}\n\n.quick-input-header .quick-input-description {\n\tmargin: 4px 2px;\n}\n\n.quick-input-header {\n\tdisplay: flex;\n\tpadding: 6px 6px 0px 6px;\n\tmargin-bottom: -2px;\n}\n\n.quick-input-widget.hidden-input .quick-input-header {\n\t/* reduce margins and paddings when input box hidden */\n\tpadding: 0;\n\tmargin-bottom: 0;\n}\n\n.quick-input-and-message {\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex-grow: 1;\n\tmin-width: 0;\n\tposition: relative;\n}\n\n.quick-input-check-all {\n\talign-self: center;\n\tmargin: 0;\n}\n\n.quick-input-filter {\n\tflex-grow: 1;\n\tdisplay: flex;\n\tposition: relative;\n}\n\n.quick-input-box {\n\tflex-grow: 1;\n}\n\n.quick-input-widget.show-checkboxes .quick-input-box,\n.quick-input-widget.show-checkboxes .quick-input-message {\n\tmargin-left: 5px;\n}\n\n.quick-input-visible-count {\n\tposition: absolute;\n\tleft: -10000px;\n}\n\n.quick-input-count {\n\talign-self: center;\n\tposition: absolute;\n\tright: 4px;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.quick-input-count .monaco-count-badge {\n\tvertical-align: middle;\n\tpadding: 2px 4px;\n\tborder-radius: 2px;\n\tmin-height: auto;\n\tline-height: normal;\n}\n\n.quick-input-action {\n\tmargin-left: 6px;\n}\n\n.quick-input-action .monaco-text-button {\n\tfont-size: 11px;\n\tpadding: 0 6px;\n\tdisplay: flex;\n\theight: 27.5px;\n\talign-items: center;\n}\n\n.quick-input-message {\n\tmargin-top: -1px;\n\tpadding: 5px;\n\toverflow-wrap: break-word;\n}\n\n.quick-input-message > .codicon {\n\tmargin: 0 0.2em;\n\tvertical-align: text-bottom;\n}\n\n.quick-input-progress.monaco-progress-container {\n\tposition: relative;\n}\n\n.quick-input-progress.monaco-progress-container,\n.quick-input-progress.monaco-progress-container .progress-bit {\n\theight: 2px;\n}\n\n.quick-input-list {\n\tline-height: 22px;\n\tmargin-top: 6px;\n}\n\n.quick-input-widget.hidden-input .quick-input-list {\n\tmargin-top: 0; /* reduce margins when input box hidden */\n}\n\n.quick-input-list .monaco-list {\n\toverflow: hidden;\n\tmax-height: calc(20 * 22px);\n}\n\n.quick-input-list .quick-input-list-entry {\n\tbox-sizing: border-box;\n\toverflow: hidden;\n\tdisplay: flex;\n\theight: 100%;\n\tpadding: 0 6px;\n}\n\n.quick-input-list .quick-input-list-entry.quick-input-list-separator-border {\n\tborder-top-width: 1px;\n\tborder-top-style: solid;\n}\n\n.quick-input-list .monaco-list-row[data-index=\"0\"] .quick-input-list-entry.quick-input-list-separator-border {\n\tborder-top-style: none;\n}\n\n.quick-input-list .quick-input-list-label {\n\toverflow: hidden;\n\tdisplay: flex;\n\theight: 100%;\n\tflex: 1;\n}\n\n.quick-input-list .quick-input-list-checkbox {\n\talign-self: center;\n\tmargin: 0;\n}\n\n.quick-input-list .quick-input-list-rows {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 100%;\n\tflex: 1;\n\tmargin-left: 5px;\n}\n\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows {\n\tmargin-left: 10px;\n}\n\n.quick-input-widget .quick-input-list .quick-input-list-checkbox {\n\tdisplay: none;\n}\n.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox {\n\tdisplay: inline;\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label,\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .monaco-icon-label .monaco-icon-label-container > .monaco-icon-name-container {\n\tflex: 1; /* make sure the icon label grows within the row */\n}\n\n.quick-input-list .quick-input-list-rows > .quick-input-list-row .codicon[class*='codicon-'] {\n\tvertical-align: text-bottom;\n}\n\n.quick-input-list .quick-input-list-rows .monaco-highlighted-label span {\n\topacity: 1;\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding {\n\tmargin-right: 8px; /* separate from the separator label or scrollbar if any */\n}\n\n.quick-input-list .quick-input-list-label-meta {\n\topacity: 0.7;\n\tline-height: normal;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.quick-input-list .monaco-highlighted-label .highlight {\n\tfont-weight: bold;\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-separator {\n\tmargin-right: 8px; /* separate from keybindings or actions */\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tdisplay: flex;\n\tflex: 0;\n\toverflow: visible;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar .action-label {\n\t/*\n\t * By default, actions in the quick input action bar are hidden\n\t * until hovered over them or selected.\n\t */\n\tdisplay: none;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon {\n\tmargin-right: 4px;\n\tpadding: 0px 2px 2px 2px;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tmargin-top: 1px;\n}\n\n.quick-input-list .quick-input-list-entry-action-bar {\n\tmargin-right: 4px; /* separate from scrollbar */\n}\n\n.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,\n.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label {\n\tdisplay: flex;\n}\n\n/* focused items in quick pick */\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,\n.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator {\n\tcolor: inherit\n}\n.quick-input-list .monaco-list-row.focused .monaco-keybinding-key {\n\tbackground: none;\n}\n",{});const tR={},iR=new ZM("quick-input-button-icon-");function nR(e){if(!e)return;let t;const i=e.dark.toString();return tR[i]?t=tR[i]:(t=iR.nextId(),_u(`.${t}`,`background-image: ${Ru(e.light||e.dark)}`),_u(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${Ru(e.dark)}`),tR[i]=t),t}const oR={ctrlCmd:!1,alt:!1};var sR,rR;function aR(e,t={}){const i=lR(t);return dR(i,function(e,t){const i={type:1,children:[]};let n=0,o=i;const s=[],r=new cR(e);for(;!r.eos();){let e=r.next();const i="\\"===e&&0!==uR(r.peek(),t);if(i&&(e=r.next()),!i&&hR(e,t)&&e===r.peek()){r.advance(),2===o.type&&(o=s.pop());const i=uR(e,t);if(o.type===i||5===o.type&&6===i)o=s.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),o.children.push(e),s.push(o),o=e}}else if("\n"===e)2===o.type&&(o=s.pop()),o.children.push({type:8});else if(2!==o.type){const t={type:2,content:e};o.children.push(t),s.push(o),o=t}else o.content+=e}2===o.type&&(o=s.pop());return i}(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function lR(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}!function(e){e[e.Blur=1]="Blur",e[e.Gesture=2]="Gesture",e[e.Other=3]="Other"}(sR||(sR={})),function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(rR||(rR={}));class cR{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function dR(e,t,i,n){let o;if(2===t.type)o=document.createTextNode(t.content||"");else if(3===t.type)o=document.createElement("b");else if(4===t.type)o=document.createElement("i");else if(7===t.type&&n)o=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");i.disposables.add(Ph(e,"click",(e=>{i.callback(String(t.index),e)}))),o=e}else 8===t.type?o=document.createElement("br"):1===t.type&&(o=e);o&&e!==o&&e.appendChild(o),o&&Array.isArray(t.children)&&t.children.forEach((e=>{dR(o,e,i,n)}))}function hR(e,t){return 0!==uR(e,t)}function uR(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}class gR{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class pR{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new gR(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-inputbox {\n\tposition: relative;\n\tdisplay: block;\n\tpadding: 0;\n\tbox-sizing:\tborder-box;\n\n\t/* Customizable */\n\tfont-size: inherit;\n}\n\n.monaco-inputbox.idle {\n\tborder: 1px solid transparent;\n}\n\n.monaco-inputbox > .ibwrapper > .input,\n.monaco-inputbox > .ibwrapper > .mirror {\n\n\t/* Customizable */\n\tpadding: 4px;\n}\n\n.monaco-inputbox > .ibwrapper {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-inputbox > .ibwrapper > .input {\n\tdisplay: inline-block;\n\tbox-sizing:\tborder-box;\n\twidth: 100%;\n\theight: 100%;\n\tline-height: inherit;\n\tborder: none;\n\tfont-family: inherit;\n\tfont-size: inherit;\n\tresize: none;\n\tcolor: inherit;\n}\n\n.monaco-inputbox > .ibwrapper > input {\n\ttext-overflow: ellipsis;\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input {\n\tdisplay: block;\n\t-ms-overflow-style: none; /* IE 10+: hide scrollbars */\n\tscrollbar-width: none; /* Firefox: hide scrollbars */\n\toutline: none;\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input::-webkit-scrollbar {\n\tdisplay: none; /* Chrome + Safari: hide scrollbar */\n}\n\n.monaco-inputbox > .ibwrapper > textarea.input.empty {\n\twhite-space: nowrap;\n}\n\n.monaco-inputbox > .ibwrapper > .mirror {\n\tposition: absolute;\n\tdisplay: inline-block;\n\twidth: 100%;\n\ttop: 0;\n\tleft: 0;\n\tbox-sizing: border-box;\n\twhite-space: pre-wrap;\n\tvisibility: hidden;\n\tword-wrap: break-word;\n}\n\n/* Context view */\n\n.monaco-inputbox-container {\n\ttext-align: right;\n}\n\n.monaco-inputbox-container .monaco-inputbox-message {\n\tdisplay: inline-block;\n\toverflow: hidden;\n\ttext-align: left;\n\twidth: 100%;\n\tbox-sizing:\tborder-box;\n\tpadding: 0.4em;\n\tfont-size: 12px;\n\tline-height: 17px;\n\tmargin-top: -1px;\n\tword-wrap: break-word;\n}\n\n/* Action bar support */\n.monaco-inputbox .monaco-action-bar {\n\tposition: absolute;\n\tright: 2px;\n\ttop: 4px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item {\n\tmargin-left: 2px;\n}\n\n.monaco-inputbox .monaco-action-bar .action-item .codicon {\n\tbackground-repeat: no-repeat;\n\twidth: 16px;\n\theight: 16px;\n}\n",{});const mR=Iu,fR={inputBackground:jp.fromHex("#3C3C3C"),inputForeground:jp.fromHex("#CCCCCC"),inputValidationInfoBorder:jp.fromHex("#55AAFF"),inputValidationInfoBackground:jp.fromHex("#063B49"),inputValidationWarningBorder:jp.fromHex("#B89500"),inputValidationWarningBackground:jp.fromHex("#352A05"),inputValidationErrorBorder:jp.fromHex("#BE1100"),inputValidationErrorBackground:jp.fromHex("#5A1D1D")};class _R extends Xx{constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new zt),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new zt),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),ke(this.options,fR,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=null!==(n=this.options.tooltip)&&void 0!==n?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=xu(e,mR(".monaco-inputbox.idle"));let o=this.options.flexibleHeight?"textarea":"input",s=xu(this.element,mR(".ibwrapper"));if(this.input=xu(s,mR(o+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus"))),this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus"))),this.options.flexibleHeight){this.maxHeight="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=xu(s,mR("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new pS(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),xu(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new vD(document,"selectionchange")),i=Ft.filter(t.event,(()=>{const e=document.getSelection();return(null==e?void 0:e.anchorNode)===s}));this._register(i(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,(()=>this.onValueChange())),this.onblur(this.input,(()=>this.onBlur())),this.onfocus(this.input,(()=>this.onFocus())),this.ignoreGesture(this.input),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new VD(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:ru(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return nu(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;if(this.mirror){t=(parseFloat(this.mirror.style.paddingLeft||"")||0)+(parseFloat(this.mirror.style.paddingRight||"")||0)}this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=i.border?`1px solid ${i.border}`:"",(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),null==e?void 0:e.type}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let t,i,n=()=>t.style.width=nu(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:e=>{if(!this.message)return null;t=xu(e,mR(".monaco-inputbox-container")),n();const i={inline:!0,className:"monaco-inputbox-message"},o=this.message.formatContent?aR(this.message.content,i):function(e,t={}){const i=lR(t);return i.textContent=e,i}(this.message.content,i);o.classList.add(this.classForType(this.message.type));const s=this.stylesForType(this.message.type);return o.style.backgroundColor=s.background?s.background.toString():"",o.style.color=s.foreground?s.foreground.toString():"",o.style.border=s.border?`1px solid ${s.border}`:"",xu(t,o),null},onHide:()=>{this.state="closed"},layout:n}),i=3===this.message.type?e(0,"Error: {0}",this.message.content):2===this.message.type?e(0,"Warning: {0}",this.message.content):e(0,"Info: {0}",this.message.content),Uu(i),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";(e+t).replace(/\u000c/g,"")?this.mirror.textContent=e+t:this.mirror.innerText=" ",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=ru(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,o=t.value;null!==i&&null!==n&&(this.value=o.substr(0,i)+e+o.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class AR extends _R{constructor(t,i,n){const o=e(0,"for history"),s=` or ⇅ ${o}`,r=` (⇅ ${o})`;super(t,i,n),this.history=new pR(n.history,100);const a=()=>{if(n.showHistoryHint&&n.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(r)&&this.history.getHistory().length){const e=this.placeholder.endsWith(")")?s:r,t=this.placeholder+e;n.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=t:this.setPlaceHolder(t)}};this.observer=new MutationObserver(((e,t)=>{e.forEach((e=>{e.target.textContent||a()}))})),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,(()=>a())),this.onblur(this.input,(()=>{const e=e=>{if(this.placeholder.endsWith(e)){const t=this.placeholder.slice(0,this.placeholder.length-e.length);return n.showPlaceholderOnFocus?this.placeholder=t:this.setPlaceHolder(t),!0}return!1};e(r)||e(s)}))}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,Qu(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,Qu(this.value))}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}const bR=Iu;class wR extends Lt{constructor(e){super(),this.parent=e,this.onKeyDown=e=>Oh(this.inputBox.inputElement,wu.KEY_DOWN,(t=>{e(new vh(t))})),this.onMouseDown=e=>Oh(this.inputBox.inputElement,wu.MOUSE_DOWN,(t=>{e(new kh(t))})),this.onDidChange=e=>this.inputBox.onDidChange(e),this.container=xu(this.parent,bR(".quick-input-box")),this.inputBox=this._register(new _R(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return"password"===this.inputBox.inputElement.type}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===Pk.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===Pk.Info?1:e===Pk.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===Pk.Info?1:e===Pk.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}class CR{constructor(e,t){var i;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=null!==(i=null==t?void 0:t.supportIcons)&&void 0!==i&&i,this.domNode=xu(e,Iu("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=CR.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&De(this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n="\r\n"===e?-1:0,o+=i;for(const e of t)e.end<=o||(e.start>=o&&(e.start+=n),e.end>=o&&(e.end+=n));return i+=n,"⏎"}))}}class vR{constructor(e="",t=!1){var i,n,o;if(this.value=e,"string"!=typeof this.value)throw wt("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=null!==(i=t.isTrusted)&&void 0!==i?i:void 0,this.supportThemeIcons=null!==(n=t.supportThemeIcons)&&void 0!==n&&n,this.supportHtml=null!==(o=t.supportHtml)&&void 0!==o&&o)}appendText(e,t=0){return this.value+=function(e){return e.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}(this.supportThemeIcons?function(e){return e.replace(_T,((e,t)=>t?e:`\\${e}`))}(e):e).replace(/([ \t]+)/g,((e,t)=>" ".repeat(t.length))).replace(/\>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this}}function yR(e){return xR(e)?!e.value:!Array.isArray(e)||e.every(yR)}function xR(e){return e instanceof vR||!(!e||"object"!=typeof e)&&!("string"!=typeof e.value||"boolean"!=typeof e.isTrusted&&void 0!==e.isTrusted||"boolean"!=typeof e.supportThemeIcons&&void 0!==e.supportThemeIcons)}function SR(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}var ER=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class kR{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(t,i){var n;return ER(this,void 0,void 0,(function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let o;if(void 0===t||ce(t)||t instanceof HTMLElement)o=t;else if(Ae(t.markdown)){this._hoverWidget||this.show(e(0,"Loading..."),i),this._cancellationTokenSource=new Gt;const n=this._cancellationTokenSource.token;if(o=yield t.markdown(n),this.isDisposed||n.isCancellationRequested)return}else o=null!==(n=t.markdown)&&void 0!==n?n:t.markdownNotSupportedFallback;this.show(o,i)}))}show(e,t){const i=this._hoverWidget;if(this.hasContent(e)){const n={content:e,target:this.target,showPointer:"element"===this.hoverDelegate.placement,hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!i};this._hoverWidget=this.hoverDelegate.showHover(n,t)}null==i||i.dispose()}hasContent(e){return!!e&&(!xR(e)||!!e.value)}get isDisposed(){var e;return null===(e=this._hoverWidget)||void 0===e?void 0:e.isDisposed}dispose(){var e,t;null===(e=this._hoverWidget)||void 0===e||e.dispose(),null===(t=this._cancellationTokenSource)||void 0===t||t.dispose(!0),this._cancellationTokenSource=void 0}}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* ---------- Icon label ---------- */\n\n.monaco-icon-label {\n\tdisplay: flex; /* required for icons support :before rule */\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-icon-label::before {\n\n\t/* svg icons rendered as background image */\n\tbackground-size: 16px;\n\tbackground-position: left center;\n\tbackground-repeat: no-repeat;\n\tpadding-right: 6px;\n\twidth: 16px;\n\theight: 22px;\n\tline-height: inherit !important;\n\tdisplay: inline-block;\n\n\t/* fonts icons */\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tvertical-align: top;\n\n\tflex-shrink: 0; /* fix for https://github.com/microsoft/vscode/issues/13787 */\n}\n\n.monaco-icon-label > .monaco-icon-label-container {\n\tmin-width: 0;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tflex: 1;\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name {\n\tcolor: inherit;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name > .label-separator {\n\tmargin: 0 2px;\n\topacity: 0.5;\n}\n\n.monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\topacity: .7;\n\tmargin-left: 0.5em;\n\tfont-size: 0.9em;\n\twhite-space: pre; /* enable to show labels that include multiple whitespaces */\n}\n\n.monaco-icon-label.nowrap > .monaco-icon-label-container > .monaco-icon-description-container > .label-description{\n\twhite-space: nowrap\n}\n\n.vs .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\topacity: .95;\n}\n\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\n.monaco-icon-label.italic > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\tfont-style: italic;\n}\n\n.monaco-icon-label.deprecated {\n\ttext-decoration: line-through;\n\topacity: 0.66;\n}\n\n/* make sure apply italic font style to decorations as well */\n.monaco-icon-label.italic::after {\n\tfont-style: italic;\n}\n\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-name-container > .label-name,\n.monaco-icon-label.strikethrough > .monaco-icon-label-container > .monaco-icon-description-container > .label-description {\n\ttext-decoration: line-through;\n}\n\n.monaco-icon-label::after {\n\topacity: 0.75;\n\tfont-size: 90%;\n\tfont-weight: 600;\n\tmargin: auto 16px 0 5px; /* https://github.com/microsoft/vscode/issues/113223 */\n\ttext-align: center;\n}\n\n/* make sure selection color wins when a label is being selected */\n.monaco-list:focus .selected .monaco-icon-label, /* list */\n.monaco-list:focus .selected .monaco-icon-label::after\n{\n\tcolor: inherit !important;\n}\n\n.monaco-list-row.focused.selected .label-description,\n.monaco-list-row.selected .label-description {\n\topacity: .8;\n}\n",{});class DR{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class IR extends Lt{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new DR(xu(e,Iu(".monaco-icon-label")))),this.labelContainer=xu(this.domNode.element,Iu(".monaco-icon-label-container"));const i=xu(this.labelContainer,Iu("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new DR(xu(this.labelContainer,Iu("span.monaco-icon-description-container")))),(null==t?void 0:t.supportHighlights)||(null==t?void 0:t.supportIcons)?this.nameNode=new NR(i,!!t.supportIcons):this.nameNode=new LR(i),(null==t?void 0:t.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new CR(xu(this.descriptionContainer.element,Iu("span.label-description")),{supportIcons:!!t.supportIcons}):this.descriptionNodeFactory=()=>this._register(new DR(xu(this.descriptionContainer.element,Iu("span.label-description")))),this.hoverDelegate=null==t?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover((null==i?void 0:i.descriptionTitle)?this.labelContainer:this.element,null==i?void 0:i.title),this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof CR?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,null==i?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(null==i?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate){const i=function(e,t,i){let n,o;const s=(t,i)=>{var s;t&&(null==o||o.dispose(),o=void 0),i&&(null==n||n.dispose(),n=void 0),null===(s=e.onDidHideHover)||void 0===s||s.call(e)},r=(n,s,r)=>new fn((()=>ER(this,void 0,void 0,(function*(){o&&!o.isDisposed||(o=new kR(e,r||t,n>0),yield o.update(i,s))}))),n),a=Oh(t,wu.MOUSE_OVER,(()=>{if(n)return;const i=new It;i.add(Oh(t,wu.MOUSE_LEAVE,(e=>s(!1,e.fromElement===t)),!0)),i.add(Oh(t,wu.MOUSE_DOWN,(()=>s(!0,!0)),!0));const o={targetElements:[t],dispose:()=>{}};if(void 0===e.placement||"mouse"===e.placement){const e=e=>o.x=e.x+10;i.add(Oh(t,wu.MOUSE_MOVE,e,!0))}i.add(r(e.delay,!1,o)),n=i}),!0);return{show:e=>{s(!1,!0),r(0,e)},hide:()=>{s(!0,!0)},update:e=>ER(this,void 0,void 0,(function*(){i=e,yield null==o?void 0:o.update(i)})),dispose:()=>{a.dispose(),s(!0,!0)}}}(this.hoverDelegate,e,t);i&&this.customHovers.set(e,i)}else!function(e,t){ce(t)?e.title=wT(t):(null==t?void 0:t.markdownNotSupportedFallback)?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}(e,t);else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class LR{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!De(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=xu(this.container,Iu("a.label-name",{id:null==t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const o={start:n,end:n+e.length},s=i.map((e=>aN.intersect(o,e))).filter((e=>!aN.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=o.end+t.length,s}))}(e,i,null==t?void 0:t.matches);for(let o=0;o .monaco-keybinding-key {\n\tdisplay: inline-block;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-radius: 3px;\n\tvertical-align: middle;\n\tfont-size: 11px;\n\tpadding: 3px 5px;\n\tmargin: 0 2px;\n}\n\n.monaco-keybinding > .monaco-keybinding-key:first-child {\n\tmargin-left: 0;\n}\n\n.monaco-keybinding > .monaco-keybinding-key:last-child {\n\tmargin-right: 0;\n}\n\n.monaco-keybinding > .monaco-keybinding-key-separator {\n\tdisplay: inline-block;\n}\n\n.monaco-keybinding > .monaco-keybinding-key-chord-separator {\n\twidth: 6px;\n}\n",{});const TR=Iu;class MR{constructor(e,t,i){this.os=t,this.keyElements=new Set,this.options=i||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow,this.domNode=xu(e,TR(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&MR.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){let[e,t]=this.keybinding.getParts();e&&this.renderPart(this.domNode,e,this.matches?this.matches.firstPart:null),t&&(xu(this.domNode,TR("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,t,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){Mh(this.domNode),this.keyElements.clear()}renderPart(e,t,i){const n=WL.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,Boolean(null==i?void 0:i.ctrlKey),n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,Boolean(null==i?void 0:i.shiftKey),n.separator),t.altKey&&this.renderKey(e,n.altKey,Boolean(null==i?void 0:i.altKey),n.separator),t.metaKey&&this.renderKey(e,n.metaKey,Boolean(null==i?void 0:i.metaKey),n.separator);const o=t.keyLabel;o&&this.renderKey(e,o,Boolean(null==i?void 0:i.keyCode),"")}renderKey(e,t,i,n){xu(e,this.createKeyElement(t,i?".highlight":"")),n&&xu(e,TR("span.monaco-keybinding-key-separator",void 0,n))}renderUnbound(t){xu(t,this.createKeyElement(e(0,"Unbound")))}createKeyElement(e,t=""){const i=TR("span.monaco-keybinding-key"+t,void 0,e);return this.keyElements.add(i),i}style(e){this.labelBackground=e.keybindingLabelBackground,this.labelForeground=e.keybindingLabelForeground,this.labelBorder=e.keybindingLabelBorder,this.labelBottomBorder=e.keybindingLabelBottomBorder,this.labelShadow=e.keybindingLabelShadow,this.applyStyles()}applyStyles(){var e;if(this.element){for(const t of this.keyElements)this.labelBackground&&(t.style.backgroundColor=null===(e=this.labelBackground)||void 0===e?void 0:e.toString()),this.labelBorder&&(t.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(t.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(t.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(e,t){return e===t||!e&&!t||!!e&&!!t&&De(e.firstPart,t.firstPart)&&De(e.chordPart,t.chordPart)}}const RR=new wn((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));function BR(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),s=function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),s=n.startsWith(i),r=o.startsWith(i);if(s!==r)return s?-1:1;if(s&&r){if(n.lengtho.length)return 1}return 0}(e,t,i);if(s)return s;const r=n.endsWith(i);if(r!==o.endsWith(i))return r?-1:1;const a=function(e,t){const i=e||"",n=t||"",o=RR.value.collator.compare(i,n);return RR.value.collatorIsNumeric&&0===o&&i!==n?i({collator:new Intl.Collator(void 0,{numeric:!0})}))),new wn((()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})})));var OR=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},FR=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const PR=Iu;class zR{constructor(e){this.hidden=!1,this._onChecked=new zt,this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class VR{get templateId(){return VR.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=xu(e,PR(".quick-input-list-entry"));const i=xu(t.entry,PR("label.quick-input-list-label"));t.toDisposeTemplate.push(Ph(i,wu.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=xu(i,PR("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(Ph(t.checkbox,wu.CHANGE,(e=>{t.element.checked=t.checkbox.checked})));const n=xu(i,PR(".quick-input-list-rows")),o=xu(n,PR(".quick-input-list-row")),s=xu(n,PR(".quick-input-list-row"));t.label=new IR(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const r=xu(o,PR(".quick-input-list-entry-keybinding"));t.keybinding=new MR(r,S);const a=xu(s,PR(".quick-input-list-label-meta"));return t.detail=new IR(a,{supportHighlights:!0,supportIcons:!0}),t.separator=xu(t.entry,PR(".quick-input-list-separator")),t.actionBar=new VD(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){i.toDisposeElement=Et(i.toDisposeElement),i.element=e,i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked((e=>i.checkbox.checked=e)));const{labelHighlights:n,descriptionHighlights:o,detailHighlights:s}=e,r=Object.create(null);r.matches=n||[],r.descriptionTitle=e.saneDescription,r.descriptionMatches=o||[],r.extraClasses=e.item.iconClasses,r.italic=e.item.italic,r.strikethrough=e.item.strikethrough,i.label.setLabel(e.saneLabel,e.saneDescription,r),i.keybinding.set(e.item.keybinding),e.saneDetail&&i.detail.setLabel(e.saneDetail,void 0,{matches:s,title:e.saneDetail}),e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),i.actionBar.clear();const a=e.item.buttons;a&&a.length?(i.actionBar.push(a.map(((t,i)=>{let n=t.iconClass||(t.iconPath?nR(t.iconPath):void 0);t.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible");const o=new $u(`id-${i}`,"",n,!0,(()=>FR(this,void 0,void 0,(function*(){e.fireButtonTriggered({button:t,item:e.item})}))));return o.tooltip=t.tooltip||"",o})),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=Et(i.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=Et(e.toDisposeElement),e.toDisposeTemplate=Et(e.toDisposeTemplate)}}VR.ID="listelement";class HR{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return VR.ID}}var WR;!function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage"}(WR||(WR={}));class UR{constructor(e,t,i){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new zt,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new zt,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new zt,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new zt,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new zt,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new zt,this.onKeyDown=this._onKeyDown.event,this._onLeave=new zt,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=xu(this.parent,PR(".quick-input-list"));const n=new HR,o=new QR;this.list=i.createList("QuickInput",this.container,n,[new VR],{identityProvider:{getId:e=>e.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:o}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown((e=>{const t=new vh(e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(_?e.metaKey:e.ctrlKey)&&this.list.setFocus(J(this.list.length));break;case 16:{const e=this.list.getFocus();1===e.length&&0===e[0]&&this._onLeave.fire();break}case 18:{const e=this.list.getFocus();1===e.length&&e[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(t)}))),this.disposables.push(this.list.onMouseDown((e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()}))),this.disposables.push(Oh(this.container,wu.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()}))),this.disposables.push(this.list.onMouseMiddleClick((e=>{this._onLeave.fire()}))),this.disposables.push(this.list.onContextMenu((e=>{"number"==typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))}))),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return Ft.map(this.list.onDidChangeFocus,(e=>e.elements.map((e=>e.item))))}get onDidChangeSelection(){return Ft.map(this.list.onDidChangeSelection,(e=>({items:e.elements.map((e=>e.item)),event:e.browserEvent})))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{t.hidden||(t.checked=e)}))}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=Et(this.elementDisposables);const t=e=>this.fireButtonTriggered(e);this.inputElements=e,this.elements=e.reduce(((i,n,o)=>{var s,r,a;if("separator"!==n.type){const l=o&&e[o-1],c=n.label&&n.label.replace(/\r?\n/g," "),d=n.meta&&n.meta.replace(/\r?\n/g," "),h=n.description&&n.description.replace(/\r?\n/g," "),u=n.detail&&n.detail.replace(/\r?\n/g," "),g=n.ariaLabel||[c,h,u].map((e=>function(e){return e?e.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():""}(e))).filter((e=>!!e)).join(", ");i.push(new zR({index:o,item:n,saneLabel:c,saneMeta:d,saneAriaLabel:g,saneDescription:h,saneDetail:u,labelHighlights:null===(s=n.highlights)||void 0===s?void 0:s.label,descriptionHighlights:null===(r=n.highlights)||void 0===r?void 0:r.description,detailHighlights:null===(a=n.highlights)||void 0===a?void 0:a.detail,checked:!1,separator:l&&"separator"===l.type?l:void 0,fireButtonTriggered:t}))}return i}),[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map((e=>e.onChecked((()=>this.fireCheckedEvents()))))),this.elementsToIndexes=this.elements.reduce(((e,t,i)=>(e.set(t.item,i),e)),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map((e=>e.item))}setFocusedElements(e){if(this.list.setFocus(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e)))),e.length>0){const e=this.list.getFocus()[0];"number"==typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e))))}getCheckedElements(){return this.elements.filter((e=>e.checked)).map((e=>e.item))}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===WR.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=WR.First),e===WR.Previous&&0===this.list.getFocus()[0]&&(e=WR.Last),e===WR.Second&&this.list.length<2&&(e=WR.First),e){case WR.First:this.list.focusFirst();break;case WR.Second:this.list.focusNth(1);break;case WR.Last:this.list.focusLast();break;case WR.Next:this.list.focusNext();break;case WR.Previous:this.list.focusPrevious();break;case WR.NextPage:this.list.focusNextPage();break;case WR.PreviousPage:this.list.focusPreviousPage()}const t=this.list.getFocus()[0];"number"==typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${44*Math.floor(e/44)}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if((e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let t;this.elements.forEach((i=>{const n=this.matchOnLabel?Ce(vT(e,CT(i.saneLabel))):void 0,o=this.matchOnDescription?Ce(vT(e,CT(i.saneDescription||""))):void 0,s=this.matchOnDetail?Ce(vT(e,CT(i.saneDetail||""))):void 0,r=this.matchOnMeta?Ce(vT(e,CT(i.saneMeta||""))):void 0;if(n||o||s||r?(i.labelHighlights=n,i.descriptionHighlights=o,i.detailHighlights=s,i.hidden=!1):(i.labelHighlights=void 0,i.descriptionHighlights=void 0,i.detailHighlights=void 0,i.hidden=!i.item.alwaysShow),i.separator=void 0,!this.sortByLabel){const e=i.index&&this.inputElements[i.index-1];t=e&&"separator"===e.type?e:t,t&&!i.hidden&&(i.separator=t,t=void 0)}}))}else this.elements.forEach((e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this.inputElements[e.index-1];e.separator=t&&"separator"===t.type?t:void 0}));const t=this.elements.filter((e=>!e.hidden));if(this.sortByLabel&&e){const i=e.toLowerCase();t.sort(((e,t)=>function(e,t,i){const n=e.labelHighlights||[],o=t.labelHighlights||[];if(n.length&&!o.length)return-1;if(!n.length&&o.length)return 1;if(0===n.length&&0===o.length)return 0;return BR(e.saneLabel,t.saneLabel,i)}(e,t,i)))}return this.elementsToIndexes=t.reduce(((e,t,i)=>(e.set(t.item,i),e)),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=Et(this.elementDisposables),this.disposables=Et(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}OR([Bp],UR.prototype,"onDidChangeFocus",null),OR([Bp],UR.prototype,"onDidChangeSelection",null);class QR{getWidgetAriaLabel(){return e(0,"Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}var jR=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const KR=Iu,GR={iconClass:ys.quickInputBack.classNames,tooltip:e(0,"Back"),handle:-1};class YR extends Lt{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=YR.noPromptMessage,this._severity=Pk.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new zt),this.onDidHideEmitter=this._register(new zt),this.onDisposeEmitter=this._register(new zt),this.visibleDisposables=this._register(new It),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!C;this._ignoreFocusOut=e&&!C,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton((e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)}))),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=sR.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:e||" "===this.ui.title.innerHTML||(this.ui.title.innerText=" ");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new fn,this.busyDelay.setIfNotSet((()=>{this.visible&&this.ui.progressBar.infinite()}),800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter((e=>e===GR));this.ui.leftActionBar.push(e.map(((e,t)=>{const i=new $u(`id-${t}`,"",e.iconClass||nR(e.iconPath),!0,(()=>jR(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter((e=>e!==GR));this.ui.rightActionBar.push(t.map(((e,t)=>{const i=new $u(`id-${t}`,"",e.iconClass||nR(e.iconPath),!0,(()=>jR(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,Su(this.ui.message,...VM(i))),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?e(0,"{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==Pk.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}YR.noPromptMessage=e(0,"Press 'Enter' to confirm your input or 'Escape' to cancel");class $R extends YR{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new zt),this.onWillAcceptEmitter=this._register(new zt),this.onDidAcceptEmitter=this._register(new zt),this.onDidCustomEmitter=this._register(new zt),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?rR.NONE:rR.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new zt),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new zt),this.onDidTriggerItemButtonEmitter=this._register(new zt),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this.doSetValue(e)}doSetValue(e,t){if(this._value!==e){if(this._value=e,t||this.update(),this.visible){this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst()}this.onDidChangeValueEmitter.fire(this._value)}}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(e){this.ui.list.scrollTop=e}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(e){this._keepScrollPosition=e}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?oR:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(WR.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{this.doSetValue(e,!0)}))),this.visibleDisposables.add(this.ui.inputBox.onMouseDown((e=>{this.autoFocusOnList||this.ui.list.clearFocus()}))),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown((e=>{switch(e.keyCode){case 18:this.ui.list.focus(WR.Next),this.canSelectMany&&this.ui.list.domFocus(),Cu(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(WR.Previous):this.ui.list.focus(WR.Last),this.canSelectMany&&this.ui.list.domFocus(),Cu(e,!0);break;case 12:this.ui.list.focus(WR.NextPage),this.canSelectMany&&this.ui.list.domFocus(),Cu(e,!0);break;case 11:this.ui.list.focus(WR.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),Cu(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(WR.First),Cu(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(WR.Last),Cu(e,!0))}}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)}))),this.visibleDisposables.add(this.ui.onDidCustom((()=>{this.onDidCustomEmitter.fire()}))),this.visibleDisposables.add(this.ui.list.onDidChangeFocus((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&V(e,this._activeItems,((e,t)=>e===t))||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&V(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&V(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))}))),this.visibleDisposables.add(this.ui.list.onButtonTriggered((e=>this.onDidTriggerItemButtonEmitter.fire(e)))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return Oh(this.ui.container,wu.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new vh(e),i=t.keyCode;this._quickNavigate.keybindings.some((e=>{const[n,o]=e.getParts();return!o&&(n.shiftKey&&4===i?!(t.ctrlKey||t.altKey||t.metaKey):!(!n.altKey||6!==i)||(!(!n.ctrlKey||5!==i)||!(!n.metaKey||57!==i)))}))&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)}))}update(){if(!this.visible)return;const e=this.keepScrollPosition?this.scrollTop:0,t=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",t&&!this.description);const i={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!t,progressBar:!t,visibleCount:!0,count:this.canSelectMany,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");const n=this.ariaLabel||this.placeholder||$R.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==n&&(this.ui.inputBox.ariaLabel=n),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case rR.NONE:this._itemActivation=rR.FIRST;break;case rR.SECOND:this.ui.list.focus(WR.Second),this._itemActivation=rR.FIRST;break;case rR.LAST:this.ui.list.focus(WR.Last),this._itemActivation=rR.FIRST;break;default:this.trySelectFirst()}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(WR.First)),this.keepScrollPosition&&(this.scrollTop=e)}}$R.DEFAULT_ARIA_LABEL=e(0,"Type to narrow down results.");class qR extends Lt{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new zt),this.onDidCustomEmitter=this._register(new zt),this.onDidTriggerButtonEmitter=this._register(new zt),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new zt),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new zt),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};this._register(Oh(window,wu.KEY_DOWN,e,!0)),this._register(Oh(window,wu.KEY_UP,e,!0)),this._register(Oh(window,wu.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const t=xu(this.parentElement,KR(".quick-input-widget.show-file-icons"));t.tabIndex=-1,t.style.display="none";const i=pu(t),n=xu(t,KR(".quick-input-titlebar")),o=this._register(new VD(n));o.domNode.classList.add("quick-input-left-action-bar");const s=xu(n,KR(".quick-input-title")),r=this._register(new VD(n));r.domNode.classList.add("quick-input-right-action-bar");const a=xu(t,KR(".quick-input-description")),l=xu(t,KR(".quick-input-header")),c=xu(l,KR("input.quick-input-check-all"));c.type="checkbox",this._register(Ph(c,wu.CHANGE,(e=>{const t=c.checked;y.setAllVisibleChecked(t)}))),this._register(Oh(c,wu.CLICK,(e=>{(e.x||e.y)&&g.setFocus()})));const d=xu(l,KR(".quick-input-description")),h=xu(l,KR(".quick-input-and-message")),u=xu(h,KR(".quick-input-filter")),g=this._register(new wR(u));g.setAttribute("aria-describedby",`${this.idPrefix}message`);const p=xu(u,KR(".quick-input-visible-count"));p.setAttribute("aria-live","polite"),p.setAttribute("aria-atomic","true");const m=new jM(p,{countFormat:e(0,"{0} Results")}),f=xu(u,KR(".quick-input-count"));f.setAttribute("aria-live","polite");const _=new jM(f,{countFormat:e(0,"{0} Selected")}),A=xu(l,KR(".quick-input-action")),b=new UM(A);b.label=e(0,"OK"),this._register(b.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const w=xu(l,KR(".quick-input-action")),C=new UM(w);C.label=e(0,"Custom"),this._register(C.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const v=xu(h,KR(`#${this.idPrefix}message.quick-input-message`)),y=this._register(new UR(t,this.idPrefix+"list",this.options));this._register(y.onChangedAllVisibleChecked((e=>{c.checked=e}))),this._register(y.onChangedVisibleCount((e=>{m.setCount(e)}))),this._register(y.onChangedCheckedCount((e=>{_.setCount(e)}))),this._register(y.onLeave((()=>{setTimeout((()=>{g.setFocus(),this.controller instanceof $R&&this.controller.canSelectMany&&y.clearFocus()}),0)}))),this._register(y.onDidChangeFocus((()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")})));const x=new XM(t);x.getContainer().classList.add("quick-input-progress");const S=yu(t);return this._register(S),this._register(Oh(t,wu.FOCUS,(e=>{this.previousFocusElement=e.relatedTarget instanceof HTMLElement?e.relatedTarget:void 0}),!0)),this._register(S.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(sR.Blur),this.previousFocusElement=void 0}))),this._register(Oh(t,wu.FOCUS,(e=>{g.setFocus()}))),this._register(Oh(t,wu.KEY_DOWN,(e=>{const i=new vh(e);switch(i.keyCode){case 3:Cu(e,!0),this.onDidAcceptEmitter.fire();break;case 9:Cu(e,!0),this.hide(sR.Gesture);break;case 2:if(!i.altKey&&!i.ctrlKey&&!i.metaKey){const n=[".action-label.codicon"];t.classList.contains("show-checkboxes")?n.push("input"):n.push("input[type=text]"),this.getUI().list.isDisplayed()&&n.push(".monaco-list");const o=t.querySelectorAll(n.join(", "));i.shiftKey&&i.target===o[0]?(Cu(e,!0),o[o.length-1].focus()):i.shiftKey||i.target!==o[o.length-1]||(Cu(e,!0),o[0].focus())}}}))),this.ui={container:t,styleSheet:i,leftActionBar:o,titleBar:n,title:s,description1:a,description2:d,rightActionBar:r,checkAll:c,filterContainer:u,inputBox:g,visibleCountContainer:p,visibleCount:m,countContainer:f,count:_,okContainer:A,ok:b,message:v,customButtonContainer:w,customButton:C,list:y,progressBar:x,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setComboboxAccessibility:e=>this.setComboboxAccessibility(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e)},this.updateStyles(),this.ui}pick(e,t={},i=jt.None){return new Promise(((n,o)=>{let s=e=>{s=n,t.onKeyMods&&t.onKeyMods(r.keyMods),n(e)};if(i.isCancellationRequested)return void s(void 0);const r=this.createQuickPick();let a;const l=[r,r.onDidAccept((()=>{if(r.canSelectMany)s(r.selectedItems.slice()),r.hide();else{const e=r.activeItems[0];e&&(s(e),r.hide())}})),r.onDidChangeActive((e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)})),r.onDidChangeSelection((e=>{if(!r.canSelectMany){const t=e[0];t&&(s(t),r.hide())}})),r.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:()=>{const t=r.items.indexOf(e.item);if(-1!==t){const e=r.items.slice(),i=e.splice(t,1),n=r.activeItems.filter((e=>e!==i[0])),o=r.keepScrollPosition;r.keepScrollPosition=!0,r.items=e,n&&(r.activeItems=n),r.keepScrollPosition=o}}})))),r.onDidChangeValue((e=>{!a||e||1===r.activeItems.length&&r.activeItems[0]===a||(r.activeItems=[a])})),i.onCancellationRequested((()=>{r.hide()})),r.onDidHide((()=>{Et(l),s(void 0)}))];r.title=t.title,r.canSelectMany=!!t.canPickMany,r.placeholder=t.placeHolder,r.ignoreFocusOut=!!t.ignoreFocusLost,r.matchOnDescription=!!t.matchOnDescription,r.matchOnDetail=!!t.matchOnDetail,r.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,r.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,r.quickNavigate=t.quickNavigate,r.contextKey=t.contextKey,r.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{a=t,r.busy=!1,r.items=e,r.canSelectMany&&(r.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),a&&(r.activeItems=[a])})),r.show(),Promise.resolve(e).then(void 0,(e=>{o(e),r.hide()}))}))}createQuickPick(){const e=this.getUI();return new $R(e)}show(t){const i=this.getUI();this.onShowEmitter.fire();const n=this.controller;this.controller=t,n&&n.didHide(),this.setEnabled(!0),i.leftActionBar.clear(),i.title.textContent="",i.description1.textContent="",i.description2.textContent="",i.rightActionBar.clear(),i.checkAll.checked=!1,i.inputBox.placeholder="",i.inputBox.password=!1,i.inputBox.showDecoration(Pk.Ignore),i.visibleCount.setCount(0),i.count.setCount(0),Su(i.message),i.progressBar.stop(),i.list.setElements([]),i.list.matchOnDescription=!1,i.list.matchOnDetail=!1,i.list.matchOnLabel=!0,i.list.sortByLabel=!0,i.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),i.inputBox.ariaLabel="";const o=this.options.backKeybindingLabel();GR.tooltip=o?e(0,"Back ({0})",o):e(0,"Back"),i.container.style.display="",this.updateLayout(),i.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t;const i=this.controller;if(i){const n=!(null===(t=this.ui)||void 0===t?void 0:t.container.contains(document.activeElement));if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!n){let e=this.previousFocusElement;for(;e&&!e.offsetParent;)e=Ce(e.parentElement);(null==e?void 0:e.offsetParent)?(e.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}i.didHide(e)}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,qR.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,contrastBorder:n,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=i?i.toString():"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const s=[];this.styles.list.pickerGroupBorder&&s.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&s.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(s.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&s.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&s.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&s.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&s.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&s.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),s.push("}"));const r=s.join("\n");r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}}qR.MAX_WIDTH=600;Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-list {\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n}\n\n.monaco-list.mouse-support {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n}\n\n.monaco-list > .monaco-scrollable-element {\n\theight: 100%;\n}\n\n.monaco-list-rows {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-list.horizontal-scrolling .monaco-list-rows {\n\twidth: auto;\n\tmin-width: 100%;\n}\n\n.monaco-list-row {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\toverflow: hidden;\n\twidth: 100%;\n}\n\n.monaco-list.mouse-support .monaco-list-row {\n\tcursor: pointer;\n\ttouch-action: none;\n}\n\n/* for OS X ballistic scrolling */\n.monaco-list-row.scrolling {\n\tdisplay: none !important;\n}\n\n/* Focus */\n.monaco-list.element-focused,\n.monaco-list.selection-single,\n.monaco-list.selection-multiple {\n\toutline: 0 !important;\n}\n\n/* Dnd */\n.monaco-drag-image {\n\tdisplay: inline-block;\n\tpadding: 1px 7px;\n\tborder-radius: 10px;\n\tfont-size: 12px;\n\tposition: absolute;\n\tz-index: 1000;\n}\n\n/* Type filter */\n\n.monaco-list-type-filter {\n\tdisplay: flex;\n\talign-items: center;\n\tposition: absolute;\n\tborder-radius: 2px;\n\tpadding: 0px 3px;\n\tmax-width: calc(100% - 10px);\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\ttext-align: right;\n\tbox-sizing: border-box;\n\tcursor: all-scroll;\n\tfont-size: 13px;\n\tline-height: 18px;\n\theight: 20px;\n\tz-index: 1;\n\ttop: 4px;\n}\n\n.monaco-list-type-filter.dragging {\n\ttransition: top 0.2s, left 0.2s;\n}\n\n.monaco-list-type-filter.ne {\n\tright: 4px;\n}\n\n.monaco-list-type-filter.nw {\n\tleft: 4px;\n}\n\n.monaco-list-type-filter > .controls {\n\tdisplay: flex;\n\talign-items: center;\n\tbox-sizing: border-box;\n\ttransition: width 0.2s;\n\twidth: 0;\n}\n\n.monaco-list-type-filter.dragging > .controls,\n.monaco-list-type-filter:hover > .controls {\n\twidth: 36px;\n}\n\n.monaco-list-type-filter > .controls > * {\n\tborder: none;\n\tbox-sizing: border-box;\n\t-webkit-appearance: none;\n\t-moz-appearance: none;\n\tbackground: none;\n\twidth: 16px;\n\theight: 16px;\n\tflex-shrink: 0;\n\tmargin: 0;\n\tpadding: 0;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tcursor: pointer;\n}\n\n.monaco-list-type-filter > .controls > .filter {\n\tmargin-left: 4px;\n}\n\n.monaco-list-type-filter-message {\n\tposition: absolute;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\theight: 100%;\n\ttop: 0;\n\tleft: 0;\n\tpadding: 40px 1em 1em 1em;\n\ttext-align: center;\n\twhite-space: normal;\n\topacity: 0.7;\n\tpointer-events: none;\n}\n\n.monaco-list-type-filter-message:empty {\n\tdisplay: none;\n}\n\n/* Electron */\n\n.monaco-list-type-filter {\n\tcursor: grab;\n}\n\n.monaco-list-type-filter.dragging {\n\tcursor: grabbing;\n}\n",{});class JR{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}class XR extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function ZR(e,t){const i=[];for(let n of t){if(e.start>=n.range.end)continue;if(e.end({range:eB(e.range,n),size:e.size}))),r=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=function(...e){return function(e){const t=[];let i=null;for(let n of e){const e=n.range.start,o=n.range.end,s=n.size;i&&s===i.size?i.range.end=o:(i={range:{start:e,end:o},size:s},t.push(i))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(o,r,s),this._size=this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.range.start)),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;let t=0,i=0;for(let n of this.groups){const o=n.range.end-n.range.start,s=i+o*n.size;if(e{for(const i of e){this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}})),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var nB=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};const oB={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class sB{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class rB{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class aB{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;ti,(null==e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null==e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null==e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class cB{constructor(e,t,i,n=oB){if(this.virtualDelegate=t,this.domId="list_id_"+ ++cB.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new hn(50),this.splicing=!1,this.dragOverAnimationStopDisposable=Lt.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=Lt.None,this.onDragLeaveTimeout=Lt.None,this.disposables=new It,this._onDidChangeContentHeight=new zt,this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new tB;for(const e of i)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new iB(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!=typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=Ie(n,(e=>e.horizontalScrolling),oB.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=void 0===n.additionalScrollHeight?0:n.additionalScrollHeight,this.accessibilityProvider=new lB(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows";Ie(n,(e=>e.transformOptimization),oB.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(Pp.addTarget(this.rowsContainer)),this.scrollable=new aS({forceIntegerValues:!0,smoothScrollDuration:Ie(n,(e=>e.smoothScrolling),!1)?125:0,scheduleAtNextAnimationFrame:e=>Qh(e)}),this.scrollableElement=this.disposables.add(new mS(this.rowsContainer,{alwaysConsumeMouseWheel:Ie(n,(e=>e.alwaysConsumeMouseWheel),oB.alwaysConsumeMouseWheel),horizontal:1,vertical:Ie(n,(e=>e.verticalScrollMode),oB.verticalScrollMode),useShadows:Ie(n,(e=>e.useShadows),oB.useShadows),mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(Oh(this.rowsContainer,Op.Change,(e=>this.onTouchChange(e)))),this.disposables.add(Oh(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add(Oh(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add(Oh(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add(Oh(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add(Oh(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=Ie(n,(e=>e.setRowLineHeight),oB.setRowLineHeight),this.setRowHeight=Ie(n,(e=>e.setRowHeight),oB.setRowHeight),this.supportDynamicHeights=Ie(n,(e=>e.supportDynamicHeights),oB.supportDynamicHeights),this.dnd=Ie(n,(e=>e.dnd),oB.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:ou(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(e){void 0!==e.additionalScrollHeight&&(this.additionalScrollHeight=e.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.mouseWheelScrollSensitivity&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),void 0!==e.fastScrollSensitivity&&this.scrollableElement.updateOptions({fastScrollSensitivity:e.fastScrollSensitivity})}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o={start:e,end:e+t},s=aN.intersect(n,o),r=new Map;for(let e=s.end-1;e>=s.start;e--){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.row){let i=r.get(t.templateId);i||(i=[],r.set(t.templateId,i));const n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),i.push(t.row)}t.row=null}const a={start:e+t,end:this.items.length},l=aN.intersect(a,n),c=aN.relativeComplement(a,n),d=i.map((e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:Lt.None})));let h;0===e&&t>=this.items.length?(this.rangeMap=new tB,this.rangeMap.splice(0,0,d),h=this.items,this.items=d):(this.rangeMap.splice(e,t,d),h=this.items.splice(e,t,...d));const u=i.length-t,g=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),p=eB(l,u),m=aN.intersect(g,p);for(let e=m.start;eeB(e,u))),A=[{start:e,end:e+i.length},..._].map((e=>aN.intersect(g,e))),b=this.getNextToLastElement(A);for(const e of A)for(let t=e.start;te.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=Qh((()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10})}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let i={height:"number"==typeof e?e:su(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:ou(this.domNode)})}render(e,t,i,n,o,s=!1){const r=this.getRenderRange(t,i),a=aN.relativeComplement(r,e),l=aN.relativeComplement(e,r),c=this.getNextToLastElement(a);if(s){const t=aN.intersect(e,r);for(let e=t.start;ethis.onDragStart(n.element,a,e)))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=Yr?"-moz-fit-content":"fit-content",e.width=ou(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2==0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return Ft.map(this.disposables.add(new vD(this.domNode,"click")).event,(e=>this.toMouseEvent(e)))}get onMouseDblClick(){return Ft.map(this.disposables.add(new vD(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)))}get onMouseMiddleClick(){return Ft.filter(Ft.map(this.disposables.add(new vD(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e))),(e=>1===e.browserEvent.button))}get onMouseDown(){return Ft.map(this.disposables.add(new vD(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)))}get onContextMenu(){return Ft.any(Ft.map(this.disposables.add(new vD(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e))),Ft.map(this.disposables.add(new vD(this.domNode,Op.Contextmenu)).event,(e=>this.toGestureEvent(e))))}get onTouchStart(){return Ft.map(this.disposables.add(new vD(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)))}get onTap(){return Ft.map(this.disposables.add(new vD(this.rowsContainer,Op.Tap)).event,(e=>this.toGestureEvent(e)))}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;const n=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(RD.TEXT,t),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(n,i)),void 0===e&&(e=String(n.length));const t=Iu(".monaco-drag-image");t.textContent=e,document.body.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>document.body.removeChild(t)),0)}this.currentDragData=new sB(n),OD.CurrentDragAndDropData=new rB(n),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),OD.CurrentDragAndDropData&&"vscode-ui"===OD.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(OD.CurrentDragAndDropData)this.currentDragData=OD.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new aB}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"==typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let i;if(e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof t&&0===t.effect?"copy":"move",i="boolean"!=typeof t&&t.feedback?t.feedback:void 0===e.index?[-1]:[e.index],i=Y(i).filter((e=>e>=-1&&ee-t)),i=-1===i[0]?[-1]:i,n=this.currentDragFeedback,o=i,Array.isArray(n)&&Array.isArray(o)?V(n,o):n===o)return!0;var n,o;if(this.currentDragFeedback=i,this.currentDragFeedbackDisposable.dispose(),-1===i[0])this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=Dt((()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")}));else{for(const e of i){const t=this.items[e];t.dropTarget=!0,t.row&&t.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=Dt((()=>{for(const e of i){const t=this.items[e];t.dropTarget=!1,t.row&&t.row.domNode.classList.remove("drop-target")}}))}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=pn((()=>this.clearDragOverFeedback()),100),this.currentDragData&&(null===(i=(t=this.dnd).onDragLeave)||void 0===i||i.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,OD.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,OD.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=Lt.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=eu(this.domNode).top;this.dragOverAnimationDisposable=function(e){const t=()=>{e(),i=Qh(t)};let i=Qh(t);return Dt((()=>i.dispose()))}(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=pn((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i);){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let o,s;e===this.elementTop(n.start)?(o=n.start,s=0):n.end-n.start>1&&(o=n.start+1,s=this.elementTop(o)-e);let r=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},uB=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class gB{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.trait}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex((e=>e.templateData===i));if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const o of this.renderedElements)o.index=e+t&&n.push({index:o.index+i-t,templateData:o.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class pB{constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new zt,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new gB(this)}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const o=i.length-t,s=e+t,r=[...this.sortedIndexes.filter((t=>tt?i+e:-1)).filter((e=>-1!==e)),...this.sortedIndexes.filter((e=>e>=s)).map((e=>e+o))],a=this.length+o;if(this.sortedIndexes.length>0&&0===r.length&&a>0){const t=null!==(n=this.sortedIndexes.find((t=>t>=e)))&&void 0!==n?n:a-1;r.push(Math.min(t,a-1))}this.renderer.splice(e,t,i.length),this._set(r,r),this.length=a}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(NB),t)}_set(e,t,i){const n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const s=LB(o,e);return this.renderer.renderIndexes(s),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return H(this.sortedIndexes,e,NB)>=0}dispose(){Et(this._onChange)}}hB([Bp],pB.prototype,"renderer",null);class mB extends pB{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class fB{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,i.map((()=>!1)));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString())),o=i.map((e=>n.indexOf(this.identityProvider.getId(e).toString())>-1));this.trait.splice(e,t,o)}}function _B(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function AB(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&(!!e.parentElement&&AB(e.parentElement))}class bB{constructor(e,t,i){this.list=e,this.view=t,this.disposables=new It,this.multipleSelectionDisposables=new It,this.onKeyDown.filter((e=>3===e.keyCode)).on(this.onEnter,this,this.disposables),this.onKeyDown.filter((e=>16===e.keyCode)).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter((e=>18===e.keyCode)).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter((e=>11===e.keyCode)).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter((e=>12===e.keyCode)).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter((e=>9===e.keyCode)).on(this.onEscape,this,this.disposables),!1!==i.multipleSelectionSupport&&this.onKeyDown.filter((e=>(_?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return Ft.chain(this.disposables.add(new vD(this.view.domNode,"keydown")).event).filter((e=>!_B(e.target))).map((e=>new vh(e)))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionDisposables.clear(),e.multipleSelectionSupport&&this.onKeyDown.filter((e=>(_?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(J(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}hB([Bp],bB.prototype,"onKeyDown",null),function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(dB||(dB={}));const wB=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=93&&e.keyCode<=102||e.keyCode>=80&&e.keyCode<=90)}};class CB{constructor(e,t,i,n){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.delegate=n,this.enabled=!1,this.state=dB.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new It,this.disposables=new It,this.updateOptions(e.options)}updateOptions(e){void 0===e.enableKeyboardNavigation||!!e.enableKeyboardNavigation?this.enable():this.disable(),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const e=Ft.chain(this.enabledDisposables.add(new vD(this.view.domNode,"keydown")).event).filter((e=>!_B(e.target))).filter((()=>this.automaticKeyboardNavigation||this.triggered)).map((e=>new vh(e))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>e.preventDefault())).map((e=>e.browserEvent.key)).event,t=Ft.debounce(e,(()=>null),800),i=Ft.reduce(Ft.any(e,t),((e,t)=>null===t?null:(e||"")+t));i(this.onInput,this,this.enabledDisposables),t(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));i&&Uu(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=dB.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===dB.Idle?1:0;this.state=dB.Typing;for(let t=0;t!_B(e.target))).map((e=>new vh(e)));i.filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!(n&&n instanceof HTMLElement&&-1!==n.tabIndex))return;const o=window.getComputedStyle(n);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function yB(e){return _?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function xB(e){return e.browserEvent.shiftKey}const SB={isSelectionSingleChangeEvent:yB,isSelectionRangeChangeEvent:xB};class EB{constructor(e){this.list=e,this.disposables=new It,this._onPointer=new zt,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||SB),this.mouseSupport=void 0===e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(Pp.addTarget(e.getHTMLElement()))),Ft.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||SB))}isSelectionSingleChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionRangeChangeEvent(e)}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){AB(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(AB(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(_B(e.browserEvent.target)||AB(e.browserEvent.target))return;const t=e.index;return void 0===t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionRangeChangeEvent(e)||this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),(i=e.browserEvent)instanceof MouseEvent&&2===i.button||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e));var i}onDoubleClick(e){if(_B(e.browserEvent.target)||AB(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(void 0===i){const e=this.list.getFocus()[0];i=null!=e?e:t,this.list.setAnchor(i)}const n=J(Math.min(i,t),Math.max(i,t)+1),o=this.list.getSelection(),s=function(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let o=i-1;for(;o>=0&&e[o]===t-(i-o);)n.push(e[o--]);n.reverse(),o=i;for(;o=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){n++,o++;continue}e[n]e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class kB{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&(e.listBackground.isOpaque()?i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):_||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t\t.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&i.push(`\n\t\t\t\t.monaco-list${t}.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.listFilterWidgetBackground&&i.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&i.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&i.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&i.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`),e.tableColumnsBorder&&i.push(`\n\t\t\t\t.monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t}`),e.tableOddRowsBackgroundColor&&i.push(`\n\t\t\t\t.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {\n\t\t\t\t\tbackground-color: ${e.tableOddRowsBackgroundColor};\n\t\t\t\t}\n\t\t\t`),this.styleElement.textContent=i.join("\n")}}const DB={listFocusBackground:jp.fromHex("#7FB0D0"),listActiveSelectionBackground:jp.fromHex("#0E639C"),listActiveSelectionForeground:jp.fromHex("#FFFFFF"),listActiveSelectionIconForeground:jp.fromHex("#FFFFFF"),listFocusAndSelectionBackground:jp.fromHex("#094771"),listFocusAndSelectionForeground:jp.fromHex("#FFFFFF"),listInactiveSelectionBackground:jp.fromHex("#3F3F46"),listInactiveSelectionIconForeground:jp.fromHex("#FFFFFF"),listHoverBackground:jp.fromHex("#2A2D2E"),listDropBackground:jp.fromHex("#383B3D"),treeIndentGuidesStroke:jp.fromHex("#a9a9a9"),tableColumnsBorder:jp.fromHex("#cccccc").transparent(.2),tableOddRowsBackgroundColor:jp.fromHex("#cccccc").transparent(.04)},IB={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}}};function LB(e,t){const i=[];let n=0,o=0;for(;n=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){i.push(e[n]),n++,o++;continue}e[n]e-t;class TB{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map((t=>t.renderTemplate(e)))}renderElement(e,t,i,n){let o=0;for(const s of this.renderers)s.renderElement(e,t,i[o++],n)}disposeElement(e,t,i,n){let o=0;for(const s of this.renderers)s.disposeElement&&s.disposeElement(e,t,i[o],n),o+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class MB{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof o?i.setAttribute("aria-level",`${o}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class RB{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var o,s;null===(s=(o=this.dnd).onDragLeave)||void 0===s||s.call(o,e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class BB{constructor(e,t,i,n,o=IB){var s;this.user=e,this._options=o,this.focus=new pB("focused"),this.anchor=new pB("anchor"),this.eventBufferer=new Wt,this._ariaLabel="",this.disposables=new It,this._onDidDispose=new zt,this.onDidDispose=this._onDidDispose.event;const r=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(s=this._options.accessibilityProvider)||void 0===s?void 0:s.getWidgetRole():"list";this.selection=new mB("listbox"!==r),ke(o,DB,!1);const a=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(a.push(new MB(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map((e=>new TB(e.templateId,[...a,e])));const l=Object.assign(Object.assign({},o),{dnd:o.dnd&&new RB(this,o.dnd)});if(this.view=new cB(t,i,n,l),this.view.domNode.setAttribute("role",r),o.styleController)this.styleController=o.styleController(this.view.domId);else{const e=pu(this.view.domNode);this.styleController=new kB(e,this.view.domId)}if(this.spliceable=new JR([new fB(this.focus,this.view,o.identityProvider),new fB(this.selection,this.view,o.identityProvider),new fB(this.anchor,this.view,o.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new vB(this,this.view)),("boolean"!=typeof o.keyboardSupport||o.keyboardSupport)&&(this.keyboardController=new bB(this,this.view,o),this.disposables.add(this.keyboardController)),o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||wB;this.typeLabelController=new CB(this,this.view,o.keyboardNavigationLabelProvider,e),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(o),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return Ft.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)))}get onDidChangeSelection(){return Ft.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)))}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=Ft.chain(this.disposables.add(new vD(this.view.domNode,"keydown")).event).map((e=>new vh(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map(yD).filter((()=>!1)).event,i=Ft.chain(this.disposables.add(new vD(this.view.domNode,"keyup")).event).forEach((()=>e=!1)).map((e=>new vh(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map(yD).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0;return{index:i,element:void 0!==i?this.view.element(i):void 0,anchor:void 0!==i?this.view.domElement(i):this.view.domNode,browserEvent:e}})).event,n=Ft.chain(this.view.onContextMenu).filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:{x:i.pageX+1,y:i.pageY},browserEvent:i}))).event;return Ft.any(t,i,n)}get onKeyDown(){return this.disposables.add(new vD(this.view.domNode,"keydown")).event}get onDidFocus(){return Ft.signal(this.disposables.add(new vD(this.view.domNode,"focus",!0)).event)}createMouseController(e){return new EB(this)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),null===(t=this.keyboardController)||void 0===t||t.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new XR(this.user,`Invalid start index: ${e}`);if(t<0)throw new XR(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||this.eventBufferer.bufferEvents((()=>this.spliceable.splice(e,t,i)))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const t of e)if(t<0||t>=this.length)throw new XR(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if(void 0!==e){if(e<0||e>=this.length)throw new XR(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return $(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(const t of e)if(t<0||t>=this.length)throw new XR(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findNextIndex(o.length>0?o[0]+e:0,t,n);s>-1&&this.setFocus([s],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),s=this.findPreviousIndex(o.length>0?o[0]-e:0,t,n);s>-1&&this.setFocus([s],i)}focusNextPage(e,t){return uB(this,void 0,void 0,(function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.view.element(i),o=this.getFocusedElements()[0];if(o!==n){const n=this.findPreviousIndex(i,!1,t);n>-1&&o!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const n=this.view.getScrollTop();this.view.setScrollTop(n+this.view.renderHeight-this.view.elementHeight(i)),this.view.getScrollTop()!==n&&(this.setFocus([]),yield gn(0),yield this.focusNextPage(e,t))}}))}focusPreviousPage(e,t){return uB(this,void 0,void 0,(function*(){let i;const n=this.view.getScrollTop();i=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);const o=this.view.element(i),s=this.getFocusedElements()[0];if(s!==o){const n=this.findNextIndex(i,!1,t);n>-1&&s!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const i=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==i&&(this.setFocus([]),yield gn(0),yield this.focusPreviousPage(e,t))}}))}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e)))}reveal(e,t){if(e<0||e>=this.length)throw new XR(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),o=this.view.elementHeight(e);if(he(t)){const e=o-this.view.renderHeight;this.view.setScrollTop(e*cL(t,0,1)+n)}else{const e=n+o,t=i+this.view.renderHeight;n=t||(n=t&&o>=this.view.renderHeight?this.view.setScrollTop(n):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new XR(this.user,`Invalid index ${e}`);const t=this.view.getScrollTop(),i=this.view.elementTop(e),n=this.view.elementHeight(e);if(it+this.view.renderHeight)return null;const o=n-this.view.renderHeight;return Math.abs((t-i)/o)}getHTMLElement(){return this.view.domNode}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}hB([Bp],BB.prototype,"onDidChangeFocus",null),hB([Bp],BB.prototype,"onDidChangeSelection",null),hB([Bp],BB.prototype,"onContextMenu",null),hB([Bp],BB.prototype,"onKeyDown",null),hB([Bp],BB.prototype,"onDidFocus",null);class OB{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:Lt.None}}renderElement(e,t,i,n){if(i.disposable&&i.disposable.dispose(),!i.data)return;const o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,i.data,n);const s=new Gt,r=o.resolve(e,s.token);i.disposable={dispose:()=>s.cancel()},this.renderer.renderPlaceholder(e,i.data),r.then((t=>this.renderer.renderElement(t,e,i.data,n)))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class FB{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}class PB{constructor(e,t,i,n,o={}){const s=()=>this.model,r=n.map((e=>new OB(e,s)));this.list=new BB(e,t,i,r,function(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new FB(e,t.accessibilityProvider)})}(s,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return Ft.map(this.list.onMouseDblClick,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onPointer(){return Ft.map(this.list.onPointer,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onDidChangeSelection(){return Ft.map(this.list.onDidChangeSelection,(({elements:e,indexes:t,browserEvent:i})=>({elements:e.map((e=>this._model.get(e))),indexes:t,browserEvent:i})))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,J(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map((e=>this.model.get(e)))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-split-view2 {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-split-view2 > .sash-container {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tpointer-events: none;\n}\n\n.monaco-split-view2 > .sash-container > .monaco-sash {\n\tpointer-events: initial;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element {\n\twidth: 100%;\n\theight: 100%;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container {\n\twidth: 100%;\n\theight: 100%;\n\twhite-space: nowrap;\n\tposition: relative;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\twhite-space: initial;\n\tposition: absolute;\n}\n\n.monaco-split-view2 > .monaco-scrollable-element > .split-view-container > .split-view-view:not(.visible) {\n\tdisplay: none;\n}\n\n.monaco-split-view2.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\twidth: 100%;\n}\n\n.monaco-split-view2.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view {\n\theight: 100%;\n}\n\n.monaco-split-view2.separator-border > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\tcontent: ' ';\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\tz-index: 5;\n\tpointer-events: none;\n\tbackground-color: var(--separator-border);\n}\n\n.monaco-split-view2.separator-border.horizontal > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\theight: 100%;\n\twidth: 1px;\n}\n\n.monaco-split-view2.separator-border.vertical > .monaco-scrollable-element > .split-view-container > .split-view-view:not(:first-child)::before {\n\theight: 1px;\n\twidth: 100%;\n}\n",{});const zB={separatorBorder:jp.transparent};class VB{constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,"number"==typeof i?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){e!==this.visible&&(e?(this.size=cL(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"==typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e),this.view.setVisible&&this.view.setVisible(e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class HB extends VB{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class WB extends VB{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var UB,QB;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(UB||(UB={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(QB||(QB={}));class jB extends Lt{constructor(e,t={}){var i,n,o,s,r;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=UB.Idle,this._onDidSashChange=this._register(new zt),this._onDidSashReset=this._register(new zt),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=null!==(i=t.orientation)&&void 0!==i?i:0,this.inverseAltBehavior=null!==(n=t.inverseAltBehavior)&&void 0!==n&&n,this.proportionalLayout=null===(o=t.proportionalLayout)||void 0===o||o,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=xu(this.el,Iu(".sash-container")),this.viewContainer=Iu(".split-view-container"),this.scrollable=new aS({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:Qh}),this.scrollableElement=this._register(new mS(this.viewContainer,{vertical:0===this.orientation?null!==(s=t.scrollbarVisibility)&&void 0!==s?s:1:2,horizontal:1===this.orientation?null!==(r=t.scrollbarVisibility)&&void 0!==r?r:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{this.viewContainer.scrollTop=e.scrollTop,this.viewContainer.scrollLeft=e.scrollLeft}))),xu(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||zB),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=ge(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)})),this.contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions)for(let t=0;t1===this.viewItems[e].priority)),o=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map((e=>e.size/this.contentSize)))}onSashStart({sash:e,start:t,alt:i}){for(const e of this.viewItems)e.enabled=!1;const n=this.sashItems.findIndex((t=>t.sash===e)),o=kt(Oh(document.body,"keydown",(e=>s(this.sashDragState.current,e.altKey))),Oh(document.body,"keyup",(()=>s(this.sashDragState.current,!1)))),s=(e,t)=>{const i=this.viewItems.map((e=>e.size));let s,r,a=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t){if(n===this.sashItems.length-1){const e=this.viewItems[n];a=(e.minimumSize-e.size)/2,l=(e.maximumSize-e.size)/2}else{const e=this.viewItems[n+1];a=(e.size-e.maximumSize)/2,l=(e.size-e.minimumSize)/2}}if(!t){const e=J(n,-1),t=J(n+1,this.viewItems.length),o=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),a=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),l=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),c=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),d=Math.max(o,c),h=Math.min(l,a),u=this.findFirstSnapIndex(e),g=this.findFirstSnapIndex(t);if("number"==typeof u){const e=this.viewItems[u],t=Math.floor(e.viewMinimumSize/2);s={index:u,limitDelta:e.visible?d-t:d+t,size:e.size}}if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);r={index:g,limitDelta:e.visible?h+t:h-t,size:e.size}}}this.sashDragState={start:e,current:e,index:n,sizes:i,minDelta:a,maxDelta:l,alt:t,snapBefore:s,snapAfter:r,disposable:o}};s(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:o,minDelta:s,maxDelta:r,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const c=e-i,d=this.resize(t,c,n,void 0,void 0,s,r,a,l);if(o){const e=t===this.sashItems.length-1,i=this.viewItems.map((e=>e.size)),n=e?t:t+1,o=this.viewItems[n],s=o.size-o.maximumSize,r=o.size-o.minimumSize,a=e?t-1:t+1;this.resize(a,-d,i,void 0,void 0,s,r)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t=cL(t="number"==typeof t?t:e.size,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(this.state!==UB.Idle)throw new Error("Cant modify splitview");if(this.state=UB.Busy,e<0||e>=this.viewItems.length)return;const i=J(this.viewItems.length).filter((t=>t!==e)),n=[...i.filter((e=>1===this.viewItems[e].priority)),e],o=i.filter((e=>2===this.viewItems[e].priority)),s=this.viewItems[e];t=cL(t=Math.round(t),s.minimumSize,Math.min(s.maximumSize,this.size)),s.size=t,this.relayout(n,o),this.state=UB.Idle}distributeViewSizes(){const e=[];let t=0;for(const i of this.viewItems)i.maximumSize-i.minimumSize>0&&(e.push(i),t+=i.size);const i=Math.floor(t/e.length);for(const t of e)t.size=cL(i,t.minimumSize,t.maximumSize);const n=J(this.viewItems.length),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));this.relayout(o,s)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,n){if(this.state!==UB.Idle)throw new Error("Cant modify splitview");this.state=UB.Busy;const o=Iu(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(o):this.viewContainer.insertBefore(o,this.viewContainer.children.item(i));const s=e.onDidChange((e=>this.onViewChange(l,e))),r=kt(s,Dt((()=>this.viewContainer.removeChild(o))));let a;a="number"==typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;const l=0===this.orientation?new HB(o,e,a,r):new WB(o,e,a,r);if(this.viewItems.splice(i,0,l),this.viewItems.length>1){let e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const t=0===this.orientation?new TD(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:1})):new TD(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:0})),n=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),o=Ft.map(t.onDidStart,n)(this.onSashStart,this),s=Ft.map(t.onDidChange,n)(this.onSashChange,this),r=Ft.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),a=r(this.onSashEnd,this),l=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=J(e,-1),n=J(e+1,this.viewItems.length),o=this.findFirstSnapIndex(i),s=this.findFirstSnapIndex(n);("number"!=typeof o||this.viewItems[o].visible)&&("number"!=typeof s||this.viewItems[s].visible)&&this._onDidSashReset.fire(e)})),c=kt(o,s,a,l,t),d={sash:t,disposable:c};this.sashItems.splice(i-1,0,d)}let c;o.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(c=[t.index]),n||this.relayout([i],c),this.state=UB.Idle,n||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}relayout(e,t){const i=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map((e=>e.size)),n,o,s=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,a,l){if(e<0||e>=this.viewItems.length)return 0;const c=J(e,-1),d=J(e+1,this.viewItems.length);if(o)for(const e of o)Z(c,e),Z(d,e);if(n)for(const e of n)ee(c,e),ee(d,e);const h=c.map((e=>this.viewItems[e])),u=c.map((e=>i[e])),g=d.map((e=>this.viewItems[e])),p=d.map((e=>i[e])),m=c.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),f=c.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),_=0===d.length?Number.POSITIVE_INFINITY:d.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),A=0===d.length?Number.NEGATIVE_INFINITY:d.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),b=Math.max(m,A,s),w=Math.min(_,f,r);let C=!1;if(a){const e=this.viewItems[a.index],i=t>=a.limitDelta;C=i!==e.visible,e.setVisible(i,a.size)}if(!C&&l){const e=this.viewItems[l.index],i=te+t.size),0);let i=this.size-t;const n=J(this.viewItems.length-1,-1),o=n.filter((e=>1===this.viewItems[e].priority)),s=n.filter((e=>2===this.viewItems[e].priority));for(const e of s)Z(n,e);for(const e of o)ee(n,e);"number"==typeof e&&ee(n,e);for(let e=0;0!==i&&ee+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const i=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),n=[...this.viewItems].reverse();e=!1;const o=n.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const s=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let r=0;for(let e=0;e0||this.startSnappingEnabled)?n.state=1:d&&t[e]&&(r0)return;if(!e.visible&&e.snap)return t}}dispose(){super.dispose(),this.viewItems.forEach((e=>e.dispose())),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[]}}var KB;Wr('/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-table {\n\tdisplay: flex;\n\tflex-direction: column;\n\tposition: relative;\n\theight: 100%;\n\twidth: 100%;\n\twhite-space: nowrap;\n}\n\n.monaco-table > .monaco-split-view2 {\n\tborder-bottom: 1px solid transparent;\n}\n\n.monaco-table > .monaco-list {\n\tflex: 1;\n}\n\n.monaco-table-tr {\n\tdisplay: flex;\n\theight: 100%;\n}\n\n.monaco-table-th {\n\twidth: 100%;\n\theight: 100%;\n\tfont-weight: bold;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-table-th,\n.monaco-table-td {\n\tbox-sizing: border-box;\n\tflex-shrink: 0;\n\toverflow: hidden;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\tcontent: "";\n\tposition: absolute;\n\tleft: calc(var(--sash-size) / 2);\n\twidth: 0;\n\tborder-left: 1px solid transparent;\n}\n\n.monaco-table > .monaco-split-view2,\n.monaco-table > .monaco-split-view2 .monaco-sash.vertical::before {\n\ttransition: border-color 0.2s ease-out;\n}\n/*\n.monaco-table:hover > .monaco-split-view2,\n.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\tborder-color: rgba(204, 204, 204, 0.2);\n} */\n',{});class GB{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=GB.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const t of e){const e=n.get(t.templateId);if(!e)throw new Error(`Table cell renderer for template id ${t.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=xu(e,Iu(".monaco-table-tr")),i=[],n=[];for(let e=0;enew YB(e,t))),a={size:r.reduce(((e,t)=>e+t.column.weight),0),views:r.map((e=>({size:e.column.weight,view:e})))};this.splitview=this.disposables.add(new jB(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:a})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const l=new GB(n,o,(e=>this.splitview.getViewSize(e)));var c;this.list=this.disposables.add(new BB(e,this.domNode,(c=i,{getHeight:e=>c.getHeight(e),getTemplateId:()=>GB.TemplateId}),[l],s)),Ft.any(...r.map((e=>e.onDidLayout)))((([e,t])=>l.layoutColumn(e,t)),null,this.disposables),this.splitview.onDidSashReset((e=>{const t=n.reduce(((e,t)=>e+t.weight),0),i=n[e].weight/t*this.cachedWidth;this.splitview.resizeView(e,i)}),null,this.disposables),this.styleElement=pu(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}$B.InstanceCount=0,function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element"}(KB||(KB={}));class qB extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class JB{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}function XB(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function ZB(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function eO(e){return"boolean"==typeof e.collapsible}class tO{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new Wt,this._onDidChangeCollapseState=new zt,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new zt,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new zt,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new hn(dn),this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=void 0!==n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=yt.empty(),n={}){if(0===e.length)throw new qB(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,o,s){var r;void 0===n&&(n=yt.empty()),void 0===s&&(s=null!==(r=o.diffDepth)&&void 0!==r?r:0);const{parentNode:a}=this.getParentNodeWithListIndex(t);if(!a.lastDiffIds)return this.spliceSimple(t,i,n,o);const l=[...n],c=t[t.length-1],d=new pc({getElements:()=>a.lastDiffIds},{getElements:()=>[...a.children.slice(0,c),...l,...a.children.slice(c+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(d.quitEarly)return a.lastDiffIds=void 0,this.spliceSimple(t,i,l,o);const h=t.slice(0,-1),u=(t,i,n)=>{if(s>0)for(let r=0;rt.originalStart-e.originalStart)))u(g,p,g-(e.originalStart+e.originalLength)),g=e.originalStart,p=e.modifiedStart-c,this.spliceSimple([...h,g],e.originalLength,yt.slice(l,p,p+e.modifiedLength),o);u(g,p,g)}spliceSimple(e,t,i=yt.empty(),{onDidCreateNode:n,onDidDeleteNode:o,diffIdentityProvider:s}){const{parentNode:r,listIndex:a,revealed:l,visible:c}=this.getParentNodeWithListIndex(e),d=[],h=yt.map(i,(e=>this.createTreeNode(e,r,r.visible?1:0,l,d,n))),u=e[e.length-1],g=r.children.length>0;let p=0;for(let e=u;e>=0&&es.getId(e.element).toString()))):r.lastDiffIds=r.children.map((e=>s.getId(e.element).toString())):r.lastDiffIds=void 0;let b=0;for(const e of A)e.visible&&b++;if(0!==b)for(let e=u+m.length;ee+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(r,_-e),this.list.splice(a,e,d)}if(A.length>0&&o){const e=t=>{o(t),t.children.forEach(e)};A.forEach(e)}const w=r.children.length>0;g!==w&&this.setCollapsible(e.slice(0,-1),w),this._onDidSplice.fire({insertedNodes:m,deletedNodes:A});let C=r;for(;C;){if(2===C.visibility){this.refilterDelayer.trigger((()=>this.refilter()));break}C=C.parent}}rerender(e){if(0===e.length)throw new qB(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);void 0===t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,n)))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);void 0===t&&(t=!n.collapsed);const o={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,o)))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e),s=this._setListNodeCollapseState(i,n,o,t);if(i!==this.root&&this.autoExpandSingleChildren&&s&&!eO(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e-1){n=-1;break}n=e}}n>-1&&this._setCollapseState([...e,n],t)}return s}_setListNodeCollapseState(e,t,i,n){const o=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!o)return o;const s=e.renderNodeCount,r=this.updateNodeAfterCollapseChange(e),a=s-(-1===t?0:1);return this.list.splice(t+1,a,r.slice(1)),o}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(eO(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!eO(t)&&t.recursive)for(const i of e.children)n=this._setNodeCollapseState(i,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents((()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})}))}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t),this.refilterDelayer.cancel()}createTreeNode(e,t,i,n,o,s){const r={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(r,i);r.visibility=a,n&&o.push(r);const l=e.children||yt.empty(),c=n&&0!==a&&!r.collapsed,d=yt.map(l,(e=>this.createTreeNode(e,r,a,c,o,s)));let h=0,u=1;for(const e of d)r.children.push(e),u+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=h++);return r.collapsible=r.collapsible||r.children.length>0,r.visibleChildrenCount=h,r.visible=2===a?h>0:1===a,r.visible?r.collapsed||(r.renderNodeCount=u):(r.renderNodeCount=0,n&&o.pop()),s&&s(r),r}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let o;if(e!==this.root){if(o=this._filterNode(e,t),0===o)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const s=i.length;e.renderNodeCount=e===this.root?0:1;let r=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(const s of e.children)r=this._updateNodeAfterFilterChange(s,o,i,n&&!e.collapsed)||r,s.visible&&(s.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?r:1===o,e.visibility=o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-s):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof i?(e.filterData=void 0,i?1:0):XB(i)?(e.filterData=i.data,ZB(i.visibility)):(e.filterData=void 0,ZB(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new qB(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:o}=this.getParentNodeWithListIndex(e),s=e[e.length-1];if(s<0||s>t.children.length)throw new qB(this.user,"Invalid tree location");const r=t.children[s];return{node:r,listIndex:i,revealed:n,visible:o&&r.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,o=!0){const[s,...r]=e;if(s<0||s>t.children.length)throw new qB(this.user,"Invalid tree location");for(let e=0;e .indent-guide {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\theight: 100%;\n\tborder-left: 1px solid transparent;\n}\n\n.monaco-tl-indent > .indent-guide {\n\ttransition: border-color 0.1s linear;\n}\n\n.monaco-tl-twistie,\n.monaco-tl-contents {\n\theight: 100%;\n}\n\n.monaco-tl-twistie {\n\tfont-size: 10px;\n\ttext-align: right;\n\tpadding-right: 6px;\n\tflex-shrink: 0;\n\twidth: 16px;\n\tdisplay: flex !important;\n\talign-items: center;\n\tjustify-content: center;\n\ttransform: translateX(3px);\n}\n\n.monaco-tl-contents {\n\tflex: 1;\n\toverflow: hidden;\n}\n\n.monaco-tl-twistie::before {\n\tborder-radius: 20px;\n}\n\n.monaco-tl-twistie.collapsed::before {\n\ttransform: rotate(-90deg);\n}\n\n.monaco-tl-twistie.codicon-tree-item-loading::before {\n\t/* Use steps to throttle FPS to reduce CPU usage */\n\tanimation: codicon-spin 1.25s steps(30) infinite;\n}\n",{});class nO extends sB{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function oO(e){return e instanceof sB?new nO(e):e}class sO{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=Lt.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(oO(e),t)}onDragOver(e,t,i,n,o=!0){const s=this.dnd.onDragOver(oO(e),t&&t.element,i,n),r=this.autoExpandNode!==t;if(r&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return s;if(r&&"boolean"!=typeof s&&s.autoExpand&&(this.autoExpandDisposable=pn((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500)),"boolean"==typeof s||!s.accept||void 0===s.bubble||s.feedback){if(!o){return{accept:"boolean"==typeof s?s:s.accept,effect:"boolean"==typeof s?void 0:s.effect,feedback:[i]}}return s}if(1===s.bubble){const i=this.modelProvider(),o=i.getNodeLocation(t),s=i.getParentNodeLocation(o),r=i.getNode(s),a=s&&i.getListIndex(s);return this.onDragOver(e,r,a,n,!1)}const a=this.modelProvider(),l=a.getNodeLocation(t),c=a.getListIndex(l),d=a.getListRenderCount(l);return Object.assign(Object.assign({},s),{feedback:J(c,c+d)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(oO(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}class rO{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)}}!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(iO||(iO={}));class aO{constructor(e,t=[]){this._elements=t,this.onDidChange=Ft.forEach(e,(e=>this._elements=e))}get elements(){return this._elements}}class lO{constructor(e,t,i,n,o={}){this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=lO.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new vp,this.activeIndentNodes=new Set,this.indentGuidesDisposable=Lt.None,this.disposables=new It,this.templateId=e.templateId,this.updateOptions(o),Ft.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent&&(this.indent=cL(e.indent,0,40)),void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==iO.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const e=new It;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=xu(e,Iu(".monaco-tl-row")),i=xu(t,Iu(".monaco-tl-indent")),n=xu(t,Iu(".monaco-tl-twistie")),o=xu(t,Iu(".monaco-tl-contents")),s=this.renderer.renderTemplate(o);return{container:e,indent:i,twistie:n,indentGuidesDisposable:Lt.None,templateData:s}}renderElement(e,t,i,n){"number"==typeof n&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e));const o=lO.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=`${o}px`,i.indent.style.width=o+this.indent-16+"px",this.renderTwistie(e,i),"number"==typeof n&&this.renderIndentGuides(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.templateData,n),"number"==typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...ys.treeItemExpanded.classNamesArray);let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...ys.treeItemExpanded.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if(Mh(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new It,n=this.modelProvider();let o=e;for(;;){const e=n.getNodeLocation(o),s=n.getParentNodeLocation(e);if(!s)break;const r=n.getNode(s),a=Iu(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(r)&&a.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(a):t.indent.insertBefore(a,t.indent.firstElementChild),this.renderedIndentGuides.add(r,a),i.add(Dt((()=>this.renderedIndentGuides.delete(r,a)))),o=r}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach((e=>{const n=i.getNodeLocation(e);try{const o=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(i.getNode(o))}catch(e){}})),this.activeIndentNodes.forEach((e=>{t.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.remove("active")))})),t.forEach((e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.add("active")))})),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Et(this.disposables)}}lO.DefaultIndent=8;class cO{constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new It,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}filter(e,t){if(this._filter){const i=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return i;let n;if(n="boolean"==typeof i?i?1:0:XB(i)?ZB(i.visibility):i,0===n)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:cT.Default,visibility:!0};const i=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),n=Array.isArray(i)?i:[i];for(const e of n){const t=e&&e.toString();if(void 0===t)return{data:cT.Default,visibility:!0};const i=dT(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,!0);if(i)return this._matchCount++,1===n.length?{data:i,visibility:!0}:{data:{label:t,score:i},visibility:!0}}return this.tree.options.filterOnType?2:{data:cT.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){Et(this.disposables)}}class dO{constructor(t,i,n,o,s){this.tree=t,this.view=n,this.filter=o,this.keyboardNavigationDelegate=s,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new zt,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new zt,this.enabledDisposables=new It,this.disposables=new It,this.domNode=Iu(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,this.disposables.add(Oh(this.domNode,"dragstart",(()=>this.onDragStart()))),this.messageDomNode=xu(n.getHTMLElement(),Iu(".monaco-list-type-filter-message")),this.labelDomNode=xu(this.domNode,Iu("span.label"));const r=xu(this.domNode,Iu(".controls"));this._filterOnType=!!t.options.filterOnType,this.filterOnTypeDomNode=xu(r,Iu("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add(Oh(this.filterOnTypeDomNode,"input",(()=>this.onDidChangeFilterOnType()))),this.clearDomNode=xu(r,Iu("button.clear"+ys.treeFilterClear.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=e(0,"Clear"),this.keyboardNavigationEventFilter=t.options.keyboardNavigationEventFilter,i.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(t.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(e){e.simpleKeyboardNavigation?this.disable():this.enable(),void 0!==e.filterOnType&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const e=this.enabledDisposables.add(new vD(this.view.getHTMLElement(),"keydown")),t=Ft.chain(e.event).filter((e=>!_B(e.target)||e.target===this.filterOnTypeDomNode)).filter((e=>"Dead"!==e.key&&!/^Media/.test(e.key))).map((e=>new vh(e))).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter((()=>this.automaticKeyboardNavigation||this.triggered)).filter((e=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(e)&&!(18===e.keyCode||16===e.keyCode||15===e.keyCode||17===e.keyCode)||(this.pattern.length>0||this.triggered)&&(9===e.keyCode||1===e.keyCode)&&!e.altKey&&!e.ctrlKey&&!e.metaKey||1===e.keyCode&&(_?e.altKey&&!e.metaKey:e.ctrlKey)&&!e.shiftKey)).forEach((e=>{e.stopPropagation(),e.preventDefault()})).event,i=this.enabledDisposables.add(new vD(this.clearDomNode,"click"));Ft.chain(Ft.any(t,i.event)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(e){"string"==typeof e?this.onInput(e):e instanceof MouseEvent||9===e.keyCode||1===e.keyCode&&(_?e.altKey:e.ctrlKey)?this.onInput(""):1===e.keyCode?this.onInput(0===this.pattern.length?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+e.browserEvent.key)}onInput(e){const t=this.view.getHTMLElement();e&&!this.domNode.parentElement?t.append(this.domNode):!e&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=e,this._onDidChangePattern.fire(e),this.filter.pattern=e,this.tree.refilter(),e&&this.tree.focusNext(0,!0,void 0,(e=>!cT.isDefault(e.filterData)));const i=this.tree.getFocus();if(i.length>0){const e=i[0];null===this.tree.getRelativeTop(e)&&this.tree.reveal(e,.5)}this.render(),e||(this.triggered=!1)}onDragStart(){const e=this.view.getHTMLElement(),{left:t}=tu(e),i=e.clientWidth,n=i/2,o=this.domNode.clientWidth,s=new It;let r=this.positionClassName;const a=()=>{switch(r){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=i-o-6+"px"}},l=()=>{this.positionClassName=r,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",Et(s)};a(),this.domNode.classList.remove(r),this.domNode.classList.add("dragging"),s.add(Dt((()=>this.domNode.classList.remove("dragging")))),s.add(Oh(document,"dragover",(e=>(e=>{e.preventDefault();const i=e.clientX-t;e.dataTransfer&&(e.dataTransfer.dropEffect="none"),r=il()))),OD.CurrentDragAndDropData=new BD("vscode-ui"),s.add(Dt((()=>OD.CurrentDragAndDropData=void 0)))}onDidSpliceModel(){this._enabled&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...ys.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.classList.add(...ys.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.title=e(0,"Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(...ys.treeFilterOnTypeOn.classNamesArray),this.filterOnTypeDomNode.classList.add(...ys.treeFilterOnTypeOff.classNamesArray),this.filterOnTypeDomNode.title=e(0,"Enable Filter on Type"))}render(){const t=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&this.tree.options.filterOnType&&t?(this.messageDomNode.textContent=e(0,"No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",t),this.domNode.title=e(0,"Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"…"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(e){return!(this.enabled&&this.pattern&&!this.filterOnType)||(this.filter.totalCount>0&&this.filter.matchCount<=1||!cT.isDefault(e.filterData))}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),Et(this.disposables)}}function hO(e){let t=KB.Unknown;return cu(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=KB.Twistie:cu(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(t=KB.Element),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function uO(e,t){t(e),e.children.forEach((e=>uO(e,t)))}class gO{constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new zt,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){!(null==t?void 0:t.__forceEvent)&&V(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map((e=>e.element))),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach((e=>uO(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>uO(e,n)));const o=new Map,s=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>uO(e,s)));const r=[];for(const e of this.nodes){const t=this.identityProvider.getId(e.element).toString();if(i.has(t)){const e=o.get(t);e&&r.push(e)}else r.push(e)}if(this.nodes.length>0&&0===r.length){const e=this.getFirstViewElementWithTrait();e&&r.push(e)}this._set(r,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class pO extends EB{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(_B(e.browserEvent.target)||AB(e.browserEvent.target))return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let o=!1;if(o="function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick,o&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible){const i=this.tree.model,s=i.getNodeLocation(t),r=e.browserEvent.altKey;if(this.tree.setFocus([s]),i.setCollapsed(s,void 0,r),o&&n)return}super.onViewPointer(e)}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&super.onDoubleClick(e)}}class mO extends BB{constructor(e,t,i,n,o,s,r,a){super(e,t,i,n,a),this.focusTrait=o,this.selectionTrait=s,this.anchorTrait=r}createMouseController(e){return new pO(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],o=[];let s;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&o.push(e+i),this.anchorTrait.has(t)&&(s=e+i)})),n.length>0&&super.setFocus(Y([...super.getFocus(),...n])),o.length>0&&super.setSelection(Y([...super.getSelection(),...o])),"number"==typeof s&&super.setAnchor(s)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map((e=>this.element(e))),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map((e=>this.element(e))),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class fO{constructor(e,t,i,n,o={}){this._user=e,this._options=o,this.eventBufferer=new Wt,this.disposables=new It,this._onWillRefilter=new zt,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new zt;const s=new rO(i),r=new Ut,a=new Ut,l=new aO(a.event);this.renderers=n.map((e=>new lO(e,(()=>this.model),r.event,l,o)));for(let e of this.renderers)this.disposables.add(e);let c;var d,h;o.keyboardNavigationLabelProvider&&(c=new cO(this,o.keyboardNavigationLabelProvider,o.filter),o=Object.assign(Object.assign({},o),{filter:c}),this.disposables.add(c)),this.focus=new gO((()=>this.view.getFocusedElements()[0]),o.identityProvider),this.selection=new gO((()=>this.view.getSelectedElements()[0]),o.identityProvider),this.anchor=new gO((()=>this.view.getAnchorElement()),o.identityProvider),this.view=new mO(e,t,s,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},(d=()=>this.model,(h=o)&&Object.assign(Object.assign({},h),{identityProvider:h.identityProvider&&{getId:e=>h.identityProvider.getId(e.element)},dnd:h.dnd&&new sO(d,h.dnd),multipleSelectionController:h.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>h.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>h.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:h.accessibilityProvider&&Object.assign(Object.assign({},h.accessibilityProvider),{getSetSize(e){const t=d(),i=t.getNodeLocation(e),n=t.getParentNodeLocation(i);return t.getNode(n).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:h.accessibilityProvider&&h.accessibilityProvider.isChecked?e=>h.accessibilityProvider.isChecked(e.element):void 0,getRole:h.accessibilityProvider&&h.accessibilityProvider.getRole?e=>h.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>h.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>h.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:h.accessibilityProvider&&h.accessibilityProvider.getWidgetRole?()=>h.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:h.accessibilityProvider&&h.accessibilityProvider.getAriaLevel?e=>h.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:h.accessibilityProvider.getActiveDescendantId&&(e=>h.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:h.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},h.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>h.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}),enableKeyboardNavigation:h.simpleKeyboardNavigation}))),{tree:this})),this.model=this.createModel(e,this.view,o),r.input=this.model.onDidChangeCollapseState;const u=Ft.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}));if(u((()=>null),null,this.disposables),a.input=Ft.chain(Ft.any(u,this.focus.onDidChange,this.selection.onDidChange)).debounce((()=>null),0).map((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);return[...e.values()]})).event,!1!==o.keyboardSupport){const e=Ft.chain(this.view.onKeyDown).filter((e=>!_B(e.target))).map((e=>new vh(e)));e.filter((e=>15===e.keyCode)).on(this.onLeftArrow,this,this.disposables),e.filter((e=>17===e.keyCode)).on(this.onRightArrow,this,this.disposables),e.filter((e=>10===e.keyCode)).on(this.onSpace,this,this.disposables)}if(o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||wB;this.typeFilterController=new dO(this,this.model,this.view,c,e),this.focusNavigationFilter=e=>this.typeFilterController.shouldAllowFocus(e),this.disposables.add(this.typeFilterController)}this.styleElement=pu(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===iO.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return Ft.map(this.view.onMouseDblClick,hO)}get onPointer(){return Ft.map(this.view.onPointer,hO)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return Ft.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(Object.assign(Object.assign({},this._options),{enableKeyboardNavigation:this._options.simpleKeyboardNavigation})),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===iO.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){this.view.layout(e,t)}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}getParentElement(e){const t=this.model.getParentNodeLocation(e);return this.model.getNode(t).element}getFirstElementChild(e){return this.model.getFirstElementChild(e)}getNode(e){return this.model.getNode(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map((e=>this.model.getNode(e)));this.selection.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map((e=>this.model.getNode(e)));this.focus.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setFocus(n,t,!0)}focusNext(e=1,t=!1,i,n=this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);-1!==i&&this.view.reveal(i,t)}getRelativeTop(e){const t=this.model.getListIndex(e);return-1===t?null:this.view.getRelativeTop(t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some((e=>e.visible)))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,o)}dispose(){Et(this.disposables),this.view.dispose()}}class _O{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new tO(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare:(e,t)=>i.sorter.compare(e.element,t.element)}),this.identityProvider=i.identityProvider}setChildren(e,t=yt.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=yt.empty(),i){const n=new Set,o=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{var t;if(null===e.element)return;const s=e;if(n.add(s.element),this.nodes.set(s.element,s),this.identityProvider){const e=this.identityProvider.getId(s.element).toString();o.add(e),this.nodesByIdentity.set(e,s)}null===(t=i.onDidCreateNode)||void 0===t||t.call(i,s)},onDidDeleteNode:e=>{var t;if(null===e.element)return;const s=e;if(n.has(s.element)||this.nodes.delete(s.element),this.identityProvider){const e=this.identityProvider.getId(s.element).toString();o.has(e)||this.nodesByIdentity.delete(e)}null===(t=i.onDidDeleteNode)||void 0===t||t.call(i,s)}}))}preserveCollapseState(e=yt.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),yt.map(e,(e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});const i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible,n=void 0!==e.collapsed?e.collapsed:t.collapsed;return Object.assign(Object.assign({},e),{collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)})}))}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}getFirstElementChild(e=null){const t=this.getElementLocation(e);return this.model.getFirstElementChild(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new qB(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new qB(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new qB(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new qB(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function AO(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:yt.map(yt.from(e.children),AO),collapsible:e.collapsible,collapsed:e.collapsed}}function bO(e){const t=[e.element],i=e.incompressible||!1;let n,o;for(;[o,n]=yt.consume(yt.from(e.children),2),1===o.length&&!o[0].incompressible;)e=o[0],t.push(e.element);return{element:{elements:t,incompressible:i},children:yt.map(yt.concat(o,n),bO),collapsible:e.collapsible,collapsed:e.collapsed}}function wO(e,t=0){let i;return i=twO(e,0))),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function CO(e){return wO(e,0)}function vO(e,t,i){return e.element===t?Object.assign(Object.assign({},e),{children:i}):Object.assign(Object.assign({},e),{children:yt.map(yt.from(e.children),(e=>vO(e,t,i)))})}class yO{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new _O(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=yt.empty(),i){const n=i.diffIdentityProvider&&(o=i.diffIdentityProvider,{getId:e=>e.elements.map((e=>o.getId(e).toString())).join("\0")});var o;if(null===e){const e=yt.map(t,this.enabled?bO:AO);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const s=this.nodes.get(e);if(!s)throw new Error("Unknown compressed tree node");const r=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),c=vO(CO(r),e,t),d=(this.enabled?bO:AO)(c),h=l.children.map((e=>e===r?d:e));this._setChildren(l.element,h,{diffIdentityProvider:n,diffDepth:r.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,i=yt.map(t,CO),n=yt.map(i,e?bO:AO);this._setChildren(null,n,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set;this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)}}))}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}getFirstElementChild(e){const t=this.getCompressedNode(e);return this.model.getFirstElementChild(t)}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new qB(this.user,`Tree element not found: ${e}`);return t}}const xO=e=>e[e.length-1];class SO{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new SO(this.unwrapper,e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class EO{constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||xO;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new JB((e=>new SO(n,e))),this.model=new yO(e,function(e,t){return{splice(i,n,o){t.splice(i,n,o.map((t=>e.map(t))))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}(this.nodeMapper,t),function(e,t){return Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:i=>t.identityProvider.getId(e(i))},sorter:t.sorter&&{compare:(e,i)=>t.sorter.compare(e.elements[0],i.elements[0])},filter:t.filter&&{filter:(i,n)=>t.filter.filter(e(i),n)}})}(n,i))}get onDidSplice(){return Ft.map(this.model.onDidSplice,(({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map((e=>this.nodeMapper.map(e))),deletedNodes:t.map((e=>this.nodeMapper.map(e)))})))}get onDidChangeCollapseState(){return Ft.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return Ft.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}setChildren(e,t=yt.empty(),i={}){this.model.setChildren(e,t,i)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}getFirstElementChild(e){const t=this.model.getFirstElementChild(e);return null==t?t:this.elementMapper(t.elements)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var kO=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r};class DO extends fO{constructor(e,t,i,n,o={}){super(e,t,i,n,o),this.user=e}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=yt.empty(),i){this.model.setChildren(e,t,i)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new _O(e,t,i)}}class IO{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){const o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===o.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,i.data,n))}disposeElement(e,t,i,n){i.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}kO([Bp],IO.prototype,"compressedTreeNodeProvider",null);class LO extends DO{constructor(e,t,i,n,o={}){const s=()=>this,r=n.map((e=>new IO(s,e)));super(e,t,i,r,function(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=e().getCompressedTreeNode(i)}catch(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return 1===n.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}(s,o))}setChildren(e,t=yt.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new EO(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var NO=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function TO(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function MO(e,t){return!!t.parent&&(t.parent===e||MO(e,t.parent))}class RO{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new RO(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class BO{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...ys.treeItemLoading.classNamesArray),!0):(t.classList.remove(...ys.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function OO(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function FO(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class PO extends sB{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function zO(e){return e instanceof sB?new PO(e):e}class VO{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(zO(e),t)}onDragOver(e,t,i,n,o=!0){return this.dnd.onDragOver(zO(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(zO(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function HO(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new VO(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element})),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel:t=>e.accessibilityProvider.getAriaLabel(t.element),getWidgetAriaLabel:()=>e.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter:(t,i)=>e.filter.filter(t.element,i)},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}),sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),additionalScrollHeight:e.additionalScrollHeight})}function WO(e,t){t(e),e.children.forEach((e=>WO(e,t)))}class UO{constructor(e,t,i,n,o,s={}){this.user=e,this.dataSource=o,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new zt,this._onDidChangeNodeSlowState=new zt,this.nodeMapper=new JB((e=>new RO(e))),this.disposables=new It,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=void 0!==s.autoExpandSingleChildren&&s.autoExpandSingleChildren,this.sorter=s.sorter,this.collapseByDefault=s.collapseByDefault,this.tree=this.createTree(e,t,i,n,s),this.root=TO({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return Ft.map(this.tree.onDidChangeFocus,OO)}get onDidChangeSelection(){return Ft.map(this.tree.onDidChangeSelection,OO)}get onMouseDblClick(){return Ft.map(this.tree.onMouseDblClick,FO)}get onPointer(){return Ft.map(this.tree.onPointer,FO)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,i,n,o){const s=new rO(i),r=n.map((e=>new BO(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=HO(o)||{};return new DO(e,t,s,r,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return NO(this,void 0,void 0,(function*(){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}))}_updateChildren(e=this.root.element,t=!0,i=!1,n,o){return NO(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new qB(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield Ft.toPromise(this._onDidRender.event));const s=this.getDataNode(e);if(yield this.refreshAndRenderNode(s,t,n,o),i)try{this.tree.rerender(s)}catch(e){}}))}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}getNode(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getNode(t===this.root?null:t);return this.nodeMapper.map(i)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return NO(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new qB(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield Ft.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(yield this.root.refreshPromise,yield Ft.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(yield this.root.refreshPromise,yield Ft.toPromise(this._onDidRender.event)),n}))}setSelection(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map((e=>e.element))}setFocus(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map((e=>e.element))}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getParentElement(e){const t=this.tree.getParentElement(this.getDataNode(e));return t&&t.element}getFirstElementChild(e=this.root.element){const t=this.getDataNode(e),i=this.tree.getFirstElementChild(t===this.root?null:t);return i&&i.element}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new qB(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return NO(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)}))}refreshNode(e,t,i){return NO(this,void 0,void 0,(function*(){let n;return this.subTreeRefreshPromises.forEach(((o,s)=>{!n&&function(e,t){return e===t||MO(e,t)||MO(t,e)}(s,e)&&(n=o.then((()=>this.refreshNode(e,t,i))))})),n||this.doRefreshSubTree(e,t,i)}))}doRefreshSubTree(e,t,i){return NO(this,void 0,void 0,(function*(){let n;e.refreshPromise=new Promise((e=>n=e)),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}));try{const n=yield this.doRefreshNode(e,t,i);e.stale=!1,yield vn.settled(n.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}))}doRefreshNode(e,t,i){return NO(this,void 0,void 0,(function*(){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=gn(800);t.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=this.doGetChildren(e).finally((()=>t.cancel()))}else n=Promise.resolve(yt.empty());try{const o=yield n;return this.setChildren(e,o,t,i)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),_t(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}))}doGetChildren(e){let t=this.refreshPromises.get(e);return t||(t=an((()=>NO(this,void 0,void 0,(function*(){const t=yield this.dataSource.getChildren(e.element);return this.processChildren(t)})))),this.refreshPromises.set(e,t),t.finally((()=>{this.refreshPromises.delete(e)})))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(gt))}setChildren(e,t,i,n){const o=[...t];if(0===e.children.length&&0===o.length)return[];const s=new Map,r=new Map;for(const t of e.children)if(s.set(t.element,t),this.identityProvider){const e=this.tree.isCollapsed(t);r.set(t.id,{node:t,collapsed:e})}const a=[],l=o.map((t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=TO({element:t,parent:e,hasChildren:o});return o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(i.collapsedByDefault=!1,a.push(i)),i}const l=this.identityProvider.getId(t).toString(),c=r.get(l);if(c){const e=c.node;return s.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?c.collapsed?(e.children.forEach((e=>WO(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const d=TO({element:t,parent:e,id:l,hasChildren:o});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(d),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(d),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(d):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(d.collapsedByDefault=!1,a.push(d)),d}));for(const e of s.values())WO(e,(e=>this.nodes.delete(e.element)));for(const e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),o=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId:e=>i.diffIdentityProvider.getId(e.element)}});this.tree.setChildren(e===this.root?null:e,n,o),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return i=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?yt.map(e.children,(e=>this.asTreeElement(e,t))):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose()}}class QO{constructor(e){this.node=e}get element(){return{elements:this.node.element.elements.map((e=>e.element)),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map((e=>new QO(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class jO{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...ys.treeItemLoading.classNamesArray),!0):(t.classList.remove(...ys.treeItemLoading.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=Et(this.disposables)}}class KO extends UO{constructor(e,t,i,n,o,s,r={}){super(e,t,i,o,s,r),this.compressionDelegate=n,this.compressibleNodeMapper=new JB((e=>new QO(e))),this.filter=r.filter}createTree(e,t,i,n,o){const s=new rO(i),r=n.map((e=>new jO(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&HO(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))})})}(o)||{};return new LO(e,t,s,r,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=e=>this.identityProvider.getId(e).toString(),n=e=>{const t=new Set;for(const n of e){const e=this.tree.getCompressedTreeNode(n===this.root?null:n);if(e.element)for(const n of e.element.elements)t.add(i(n.element))}return t},o=n(this.tree.getSelection()),s=n(this.tree.getFocus());super.render(e,t);const r=this.getSelection();let a=!1;const l=this.getFocus();let c=!1;const d=e=>{const t=e.element;if(t)for(let e=0;e{const t=this.filter.filter(e,1),i="boolean"==typeof(n=t)?n?1:0:XB(n)?ZB(n.visibility):ZB(n);var n;if(2===i)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===i}))),super.processChildren(e)}}class GO extends fO{constructor(e,t,i,n,o,s={}){super(e,t,i,n,s),this.user=e,this.dataSource=o,this.identityProvider=s.identityProvider}createModel(e,t,i){return new _O(e,t,i)}}new xg("isMac",_,e(0,"Whether the operating system is macOS")),new xg("isLinux",A,e(0,"Whether the operating system is Linux"));const YO=new xg("isWindows",f,e(0,"Whether the operating system is Windows"));new xg("isWeb",w,e(0,"Whether the platform is a web browser")),new xg("isMacNative",_&&!w,e(0,"Whether the operating system is macOS on a non-browser platform")),new xg("isIOS",C,e(0,"Whether the operating system is IOS")),new xg("isDevelopment",!1,!0);const $O="inputFocus";new xg($O,!1,e(0,"Whether keyboard focus is inside an input box"));var qO=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},JO=function(e,t){return function(i,n){t(i,n,e)}};const XO=_a("listService");let ZO=class{constructor(e){this._themeService=e,this.disposables=new It,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}setLastFocusedList(e){var t,i;e!==this._lastFocusedWidget&&(null===(t=this._lastFocusedWidget)||void 0===t||t.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=e,null===(i=this._lastFocusedWidget)||void 0===i||i.getHTMLElement().classList.add("last-focused"))}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const e=new kB(pu(),"");this.disposables.add(TT(e,this._themeService))}if(this.lists.some((t=>t.widget===e)))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),e.getHTMLElement()===document.activeElement&&this.setLastFocusedList(e),kt(e.onDidFocus((()=>this.setLastFocusedList(e))),Dt((()=>this.lists.splice(this.lists.indexOf(i),1))),e.onDidDispose((()=>{this.lists=this.lists.filter((e=>e!==i)),this._lastFocusedWidget===e&&this.setLastFocusedList(void 0)})))}dispose(){this.disposables.dispose()}};ZO=qO([JO(0,Tg)],ZO);const eF=new xg("listFocus",!0),tF=new xg("listSupportsMultiselect",!0),iF=og.and(eF,og.not($O)),nF=new xg("listHasSelectionOrFocus",!1),oF=new xg("listDoubleSelection",!1),sF=new xg("listMultiSelection",!1),rF=new xg("listSelectionNavigation",!1),aF=new xg("treeElementCanCollapse",!1),lF=new xg("treeElementHasParent",!1),cF=new xg("treeElementCanExpand",!1),dF=new xg("treeElementHasChild",!1),hF="listAutomaticKeyboardNavigation";function uF(e,t){const i=e.createScoped(t.getHTMLElement());return eF.bindTo(i),i}const gF="workbench.list.multiSelectModifier",pF="workbench.list.openMode",mF="workbench.list.horizontalScrolling",fF="workbench.list.keyboardNavigation",_F="workbench.list.automaticKeyboardNavigation",AF="workbench.tree.indent",bF="workbench.tree.renderIndentGuides",wF="workbench.list.smoothScrolling",CF="workbench.list.mouseWheelScrollSensitivity",vF="workbench.list.fastScrollSensitivity",yF="workbench.tree.expandMode";function xF(e){return"alt"===e.getValue(gF)}class SF extends Lt{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=xF(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(gF)&&(this.useAltAsMultipleSelectionModifier=xF(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:yB(e)}isSelectionRangeChangeEvent(e){return xB(e)}}function EF(e,t,i){var n;const o=new It,s=Object.assign(Object.assign({},e),{keyboardNavigationDelegate:{mightProducePrintableCharacter:e=>i.mightProducePrintableCharacter(e)},smoothScrolling:Boolean(t.getValue(wF)),mouseWheelScrollSensitivity:t.getValue(CF),fastScrollSensitivity:t.getValue(vF),multipleSelectionController:null!==(n=e.multipleSelectionController)&&void 0!==n?n:o.add(new SF(t))});return[s,o]}let kF=class extends BB{constructor(e,t,i,n,o,s,r,a,l,c){const d=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(mF)),[h,u]=EF(o,l,c);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},LT(a.getColorTheme(),MT)),h),{horizontalScrolling:d})),this.disposables.add(u),this.contextKeyService=uF(s,this),this.themeService=a,this.listSupportsMultiSelect=tF.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);rF.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=nF.bindTo(this.contextKeyService),this.listDoubleSelection=oF.bindTo(this.contextKeyService),this.listMultiSelection=sF.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=xF(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(gF)&&(this._useAltAsMultipleSelectionModifier=xF(l));let t={};if(e.affectsConfiguration(mF)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(mF));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(wF)){const e=Boolean(l.getValue(wF));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(CF)){const e=l.getValue(CF);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(vF)){const e=l.getValue(vF);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new NF(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=TT(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),super.dispose()}};kF=qO([JO(5,Sg),JO(6,XO),JO(7,Tg),JO(8,hl),JO(9,BL)],kF);let DF=class extends PB{constructor(e,t,i,n,o,s,r,a,l,c){const d=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(mF)),[h,u]=EF(o,l,c);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},LT(a.getColorTheme(),MT)),h),{horizontalScrolling:d})),this.disposables=new It,this.disposables.add(u),this.contextKeyService=uF(s,this),this.themeService=a,this.horizontalScrolling=o.horizontalScrolling,this.listSupportsMultiSelect=tF.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==o.multipleSelectionSupport);rF.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this._useAltAsMultipleSelectionModifier=xF(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),o.overrideStyles&&this.disposables.add(TT(this,a,o.overrideStyles)),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(gF)&&(this._useAltAsMultipleSelectionModifier=xF(l));let t={};if(e.affectsConfiguration(mF)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(mF));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(wF)){const e=Boolean(l.getValue(wF));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(CF)){const e=l.getValue(CF);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(vF)){const e=l.getValue(vF);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new NF(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=TT(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};DF=qO([JO(5,Sg),JO(6,XO),JO(7,Tg),JO(8,hl),JO(9,BL)],DF);let IF=class extends $B{constructor(e,t,i,n,o,s,r,a,l,c,d){const h=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(c.getValue(mF)),[u,g]=EF(s,c,d);super(e,t,i,n,o,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},LT(l.getColorTheme(),MT)),u),{horizontalScrolling:h})),this.disposables.add(g),this.contextKeyService=uF(r,this),this.themeService=l,this.listSupportsMultiSelect=tF.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==s.multipleSelectionSupport);rF.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=nF.bindTo(this.contextKeyService),this.listDoubleSelection=oF.bindTo(this.contextKeyService),this.listMultiSelection=sF.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=xF(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(c.onDidChangeConfiguration((e=>{e.affectsConfiguration(gF)&&(this._useAltAsMultipleSelectionModifier=xF(c));let t={};if(e.affectsConfiguration(mF)&&void 0===this.horizontalScrolling){const e=Boolean(c.getValue(mF));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(wF)){const e=Boolean(c.getValue(wF));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}if(e.affectsConfiguration(CF)){const e=c.getValue(CF);t=Object.assign(Object.assign({},t),{mouseWheelScrollSensitivity:e})}if(e.affectsConfiguration(vF)){const e=c.getValue(vF);t=Object.assign(Object.assign({},t),{fastScrollSensitivity:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new TF(this,Object.assign({configurationService:c},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=TT(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};IF=qO([JO(6,Sg),JO(7,XO),JO(8,Tg),JO(9,hl),JO(10,BL)],IF);class LF extends Lt{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new zt),this.onDidOpen=this._onDidOpen.event,this._register(Ft.filter(this.widget.onDidChangeSelection,(e=>e.browserEvent instanceof KeyboardEvent))((e=>this.onSelectionFromKeyboard(e)))),this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent)))),this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent)))),"boolean"!=typeof(null==t?void 0:t.openOnSingleClick)&&(null==t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(pF)),this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration((()=>{this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(pF))})))):this.openOnSingleClick=null===(i=null==t?void 0:t.openOnSingleClick)||void 0===i||i}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,i="boolean"!=typeof t.preserveFocus||t.preserveFocus,n="boolean"==typeof t.pinned?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;if(2===t.detail)return;const i=1===t.button,n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,i,n,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,n,t)}_open(e,t,i,n,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:o})}}class NF extends LF{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class TF extends LF{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class MF extends LF{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function RF(e,t){let i=!1;return n=>{if(n.toKeybinding().isModifierKey())return!1;if(i)return i=!1,!1;const o=t.softDispatch(n,e);return o&&o.enterChord?(i=!0,!1):(i=!1,!0)}}let BF=class extends DO{constructor(e,t,i,n,o,s,r,a,l,c,d){const{options:h,getAutomaticKeyboardNavigation:u,disposable:g}=VF(t,o,s,l,c,d);super(e,t,i,n,h),this.disposables.add(g),this.internals=new HF(this,o,u,o.overrideStyles,s,r,a,l,d),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};BF=qO([JO(5,Sg),JO(6,XO),JO(7,Tg),JO(8,hl),JO(9,BL),JO(10,Sp)],BF);let OF=class extends LO{constructor(e,t,i,n,o,s,r,a,l,c,d){const{options:h,getAutomaticKeyboardNavigation:u,disposable:g}=VF(t,o,s,l,c,d);super(e,t,i,n,h),this.disposables.add(g),this.internals=new HF(this,o,u,o.overrideStyles,s,r,a,l,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};OF=qO([JO(5,Sg),JO(6,XO),JO(7,Tg),JO(8,hl),JO(9,BL),JO(10,Sp)],OF);let FF=class extends GO{constructor(e,t,i,n,o,s,r,a,l,c,d,h){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=VF(t,s,r,c,d,h);super(e,t,i,n,o,u),this.disposables.add(p),this.internals=new HF(this,s,g,s.overrideStyles,r,a,l,c,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};FF=qO([JO(6,Sg),JO(7,XO),JO(8,Tg),JO(9,hl),JO(10,BL),JO(11,Sp)],FF);let PF=class extends UO{constructor(e,t,i,n,o,s,r,a,l,c,d,h){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=VF(t,s,r,c,d,h);super(e,t,i,n,o,u),this.disposables.add(p),this.internals=new HF(this,s,g,s.overrideStyles,r,a,l,c,h),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};PF=qO([JO(6,Sg),JO(7,XO),JO(8,Tg),JO(9,hl),JO(10,BL),JO(11,Sp)],PF);let zF=class extends KO{constructor(e,t,i,n,o,s,r,a,l,c,d,h,u){const{options:g,getAutomaticKeyboardNavigation:p,disposable:m}=VF(t,r,a,d,h,u);super(e,t,i,n,o,s,g),this.disposables.add(m),this.internals=new HF(this,r,p,r.overrideStyles,a,l,c,d,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};function VF(e,t,i,n,o,s){var r;const a=()=>{let e=Boolean(i.getContextKeyValue(hF));return e&&(e=Boolean(n.getValue(_F))),e},l=s.isScreenReaderOptimized(),c=t.simpleKeyboardNavigation||l?"simple":n.getValue(fF),d=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(n.getValue(mF)),[h,u]=EF(t,n,o),g=t.additionalScrollHeight;return{getAutomaticKeyboardNavigation:a,disposable:u,options:Object.assign(Object.assign({keyboardSupport:!1},h),{indent:"number"==typeof n.getValue(AF)?n.getValue(AF):void 0,renderIndentGuides:n.getValue(bF),smoothScrolling:Boolean(n.getValue(wF)),automaticKeyboardNavigation:a(),simpleKeyboardNavigation:"simple"===c,filterOnType:"filter"===c,horizontalScrolling:d,keyboardNavigationEventFilter:RF(e,o),additionalScrollHeight:g,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(r=t.expandOnlyOnTwistieClick)&&void 0!==r?r:"doubleClick"===n.getValue(yF)})}}zF=qO([JO(7,Sg),JO(8,XO),JO(9,Tg),JO(10,hl),JO(11,BL),JO(12,Sp)],zF);let HF=class{constructor(e,t,i,n,o,s,r,a,l){this.tree=e,this.themeService=r,this.disposables=[],this.contextKeyService=uF(o,e),this.listSupportsMultiSelect=tF.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(!1!==t.multipleSelectionSupport);rF.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.hasSelectionOrFocus=nF.bindTo(this.contextKeyService),this.hasDoubleSelection=oF.bindTo(this.contextKeyService),this.hasMultiSelection=sF.bindTo(this.contextKeyService),this.treeElementCanCollapse=aF.bindTo(this.contextKeyService),this.treeElementHasParent=lF.bindTo(this.contextKeyService),this.treeElementCanExpand=cF.bindTo(this.contextKeyService),this.treeElementHasChild=dF.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=xF(a);const c=new Set;c.add(hF);const d=()=>{const t=l.isScreenReaderOptimized()?"simple":a.getValue(fF);e.updateOptions({simpleKeyboardNavigation:"simple"===t,filterOnType:"filter"===t})};this.updateStyleOverrides(n);const h=()=>{const t=e.getFocus()[0];if(!t)return;const i=e.getNode(t);this.treeElementCanCollapse.set(i.collapsible&&!i.collapsed),this.treeElementHasParent.set(!!e.getParentElement(t)),this.treeElementCanExpand.set(i.collapsible&&i.collapsed),this.treeElementHasChild.set(!!e.getFirstElementChild(t))};this.disposables.push(this.contextKeyService,s.register(e),e.onDidChangeSelection((()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)}))})),e.onDidChangeFocus((()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0),h()})),e.onDidChangeCollapseState(h),e.onDidChangeModel(h),a.onDidChangeConfiguration((n=>{let o={};if(n.affectsConfiguration(gF)&&(this._useAltAsMultipleSelectionModifier=xF(a)),n.affectsConfiguration(AF)){const e=a.getValue(AF);o=Object.assign(Object.assign({},o),{indent:e})}if(n.affectsConfiguration(bF)){const e=a.getValue(bF);o=Object.assign(Object.assign({},o),{renderIndentGuides:e})}if(n.affectsConfiguration(wF)){const e=Boolean(a.getValue(wF));o=Object.assign(Object.assign({},o),{smoothScrolling:e})}if(n.affectsConfiguration(fF)&&d(),n.affectsConfiguration(_F)&&(o=Object.assign(Object.assign({},o),{automaticKeyboardNavigation:i()})),n.affectsConfiguration(mF)&&void 0===t.horizontalScrolling){const e=Boolean(a.getValue(mF));o=Object.assign(Object.assign({},o),{horizontalScrolling:e})}if(n.affectsConfiguration(yF)&&void 0===t.expandOnlyOnTwistieClick&&(o=Object.assign(Object.assign({},o),{expandOnlyOnTwistieClick:"doubleClick"===a.getValue(yF)})),n.affectsConfiguration(CF)){const e=a.getValue(CF);o=Object.assign(Object.assign({},o),{mouseWheelScrollSensitivity:e})}if(n.affectsConfiguration(vF)){const e=a.getValue(vF);o=Object.assign(Object.assign({},o),{fastScrollSensitivity:e})}Object.keys(o).length>0&&e.updateOptions(o)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(c)&&e.updateOptions({automaticKeyboardNavigation:i()})})),l.onDidChangeScreenReaderOptimized((()=>d()))),this.navigator=new MF(e,Object.assign({configurationService:a},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(e){void 0!==e.multipleSelectionSupport&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){Et(this.styler),this.styler=e?TT(this.tree,this.themeService,e):Lt.None}dispose(){this.disposables=Et(this.disposables),Et(this.styler),this.styler=void 0}};HF=qO([JO(4,Sg),JO(5,XO),JO(6,Tg),JO(7,hl),JO(8,Sp)],HF);var WF;Lg.as($E).registerConfiguration({id:"workbench",order:7,title:e(0,"Workbench"),type:"object",properties:{[gF]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[e(0,"Maps to `Control` on Windows and Linux and to `Command` on macOS."),e(0,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:e(0,"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[pF]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:e(0,"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[mF]:{type:"boolean",default:!1,description:e(0,"Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[AF]:{type:"number",default:8,minimum:4,maximum:40,description:e(0,"Controls tree indentation in pixels.")},[bF]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:e(0,"Controls whether the tree should render indent guides.")},[wF]:{type:"boolean",default:!1,description:e(0,"Controls whether lists and trees have smooth scrolling.")},[CF]:{type:"number",default:1,description:e(0,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[vF]:{type:"number",default:5,description:e(0,"Scrolling speed multiplier when pressing `Alt`.")},[fF]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[e(0,"Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),e(0,"Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),e(0,"Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:e(0,"Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[_F]:{type:"boolean",default:!0,markdownDescription:e(0,"Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")},[yF]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:e(0,"Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")}}}),function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(WF||(WF={}));const UF="workbench.contributions.quickaccess";Lg.add(UF,new class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort(((e,t)=>t.prefix.length-e.prefix.length)),Dt((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return j([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find((t=>e.startsWith(t.prefix)))||void 0||this.defaultProvider}});const QF=_a("quickInputService");var jF=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},KF=function(e,t){return function(i,n){t(i,n,e)}};let GF=class extends Lt{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Lg.as(UF),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[o,s]=this.getOrInstantiateProvider(e),r=this.visibleQuickAccess,a=null==r?void 0:r.descriptor;if(r&&s&&a===s)return e===s.prefix||(null==i?void 0:i.preserveValue)||(r.picker.value=e),void this.adjustValueSelection(r.picker,s,i);if(s&&!(null==i?void 0:i.preserveValue)){let t;if(r&&a&&a!==s){const e=r.value.substr(a.prefix.length);e&&(t=`${s.prefix}${e}`)}if(!t){const e=null==o?void 0:o.defaultFilterValue;e===WF.LAST?t=this.lastAcceptedPickerValues.get(s):"string"==typeof e&&(t=`${s.prefix}${e}`)}"string"==typeof t&&(e=t)}const l=new It,c=l.add(this.quickInputService.createQuickPick());let d;c.value=e,this.adjustValueSelection(c,s,i),c.placeholder=null==s?void 0:s.placeholder,c.quickNavigate=null==i?void 0:i.quickNavigateConfiguration,c.hideInput=!!c.quickNavigate&&!r,("number"==typeof(null==i?void 0:i.itemActivation)||(null==i?void 0:i.quickNavigateConfiguration))&&(c.itemActivation=null!==(n=null==i?void 0:i.itemActivation)&&void 0!==n?n:rR.SECOND),c.contextKey=null==s?void 0:s.contextKey,c.filterValue=e=>e.substring(s?s.prefix.length:0),(null==s?void 0:s.placeholder)&&(c.ariaLabel=null==s?void 0:s.placeholder),t&&(d=new Cn,l.add(vt(c.onWillAccept)((e=>{e.veto(),c.hide()})))),l.add(this.registerPickerListeners(c,o,s,e));const h=l.add(new Gt);return o&&l.add(o.provide(c,h.token)),vt(c.onDidHide)((()=>{0===c.selectedItems.length&&h.cancel(),l.dispose(),null==d||d.complete(c.selectedItems.slice(0))})),c.show(),t?null==d?void 0:d.p:void 0}adjustValueSelection(e,t,i){var n;let o;o=(null==i?void 0:i.preserveValue)?[e.value.length,e.value.length]:[null!==(n=null==t?void 0:t.prefix.length)&&void 0!==n?n:0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,i,n){const o=new It,s=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return o.add(Dt((()=>{s===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),o.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e);i!==t?this.show(e,{preserveValue:!0}):s.value=e}))),i&&o.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(i,e.value)}))),o}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};GF=jF([KF(0,QF),KF(1,fa)],GF);var YF=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},$F=function(e,t){return function(i,n){t(i,n,e)}};let qF=class extends Vg{constructor(e,t,i,n,o){super(i),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=o,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(GF))),this._quickAccess}createController(e=this.layoutService,t){var i,n;const o={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),returnFocus:()=>e.focus(),createList:(e,t,i,n,o)=>this.instantiationService.createInstance(kF,e,t,i,n,o),styles:this.computeStyles()},s=this._register(new qR(Object.assign(Object.assign({},o),t)));return s.layout(e.dimension,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0),this._register(e.onDidLayout((t=>{var i,n;return s.layout(t,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0)}))),this._register(s.onShow((()=>this.resetContextKeys()))),this._register(s.onHide((()=>this.resetContextKeys()))),s}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new xg(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t={},i=jt.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},LT(this.theme,{quickInputBackground:ef,quickInputForeground:tf,quickInputTitleBackground:nf,contrastBorder:im,widgetShadow:am})),inputBox:LT(this.theme,{inputForeground:cm,inputBackground:lm,inputBorder:dm,inputValidationInfoBackground:pm,inputValidationInfoForeground:mm,inputValidationInfoBorder:fm,inputValidationWarningBackground:_m,inputValidationWarningForeground:Am,inputValidationWarningBorder:bm,inputValidationErrorBackground:wm,inputValidationErrorForeground:Cm,inputValidationErrorBorder:vm}),countBadge:LT(this.theme,{badgeBackground:Lm,badgeForeground:Nm,badgeBorder:im}),button:LT(this.theme,{buttonForeground:Em,buttonBackground:km,buttonHoverBackground:Dm,buttonBorder:im}),progressBar:LT(this.theme,{progressBarBackground:Om}),keybindingLabel:LT(this.theme,{keybindingLabelBackground:rf,keybindingLabelForeground:af,keybindingLabelBorder:lf,keybindingLabelBottomBorder:cf,keybindingLabelShadow:am}),list:LT(this.theme,{listBackground:ef,listInactiveFocusForeground:m_,listInactiveSelectionIconForeground:f_,listInactiveFocusBackground:__,listFocusOutline:nm,listInactiveFocusOutline:nm,pickerGroupBorder:sf,pickerGroupForeground:of})}}};qF=YF([$F(0,fa),$F(1,Sg),$F(2,Tg),$F(3,Sp),$F(4,UI)],qF);var JF=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},XF=function(e,t){return function(i,n){t(i,n,e)}};let ZF=class extends qF{constructor(e,t,i,n,o,s){super(t,i,n,o,new GI(e.getContainerDomNode(),s)),this.host=void 0;const r=tP.get(e);if(r){const t=r.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return t.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}else this.host=void 0}createController(){return super.createController(this.host)}};ZF=JF([XF(1,fa),XF(2,Sg),XF(3,Tg),XF(4,Sp),XF(5,Aa)],ZF);let eP=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(ZF,e);this.mapEditorToService.set(e,t),vt(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},i=jt.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}};eP=JF([XF(0,fa),XF(1,Aa)],eP);class tP{constructor(e){this.editor=e,this.widget=new iP(this.editor)}static get(e){return e.getContribution(tP.ID)}dispose(){this.widget.dispose()}}tP.ID="editor.controller.quickInput";class iP{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return iP.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}iP.ID="editor.contrib.quickInputWidget",dp(tP.ID,tP);class nP{constructor(e,t,i,n,o){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=o}}const oP=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class sP{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(oP);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=jp.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class rP{constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];const t=[];let i=0;for(let n=0,o=e.length;n{const i=function(e,t){return et?1:0}(e.token,t.token);return 0!==i?i:e.index-t.index}));let i=0,n="000000",o="ffffff";for(;e.length>=1&&""===e[0].token;){const t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(o=t.background)}const s=new sP;for(let e of t)s.getId(e);const r=s.getId(n),a=s.getId(o),l=new lP(i,r,a),c=new cP(l);for(let t=0,i=e.length;t>>0,this._cache.set(t,i)}return(i|e)>>>0}}const aP=/\b(comment|string|regex|regexp)\b/;class lP{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<10|this._foreground<<14|this._background<<23)>>>0}clone(){return new lP(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<10|this._foreground<<14|this._background<<23)>>>0}}class cP{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;const t=e.indexOf(".");let i,n;-1===t?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));const o=this._children.get(i);return void 0!==o?o.match(n):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);const o=e.indexOf(".");let s,r;-1===o?(s=e,r=""):(s=e.substring(0,o),r=e.substring(o+1));let a=this._children.get(s);void 0===a&&(a=new cP(this._mainRule.clone()),this._children.set(s,a)),a.insert(r,t,i,n)}}const dP={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Ym]:"#FFFFFE",[$m]:"#000000",[uf]:"#E5EBF1",[kb]:"#D3D3D3",[Db]:"#939393",[gf]:"#ADD6FF4D"}},hP={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Ym]:"#1E1E1E",[$m]:"#D4D4D4",[uf]:"#3A3D41",[kb]:"#404040",[Db]:"#707070",[gf]:"#ADD6FF26"}},uP={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Ym]:"#000000",[$m]:"#FFFFFF",[kb]:"#FFFFFF",[Db]:"#FFFFFF"}};class gP{getIcon(e){const t=QD();let i=e.defaults;for(;Rg.isThemeIcon(i);){const e=t.getIcon(i.id);if(!e)return;i=e.defaults}return i}}const pP="vs",mP="vs-dark",fP="hc-black",_P=Lg.as($p),AP=Lg.as(Fg);class bP{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;const i=t.base;e.length>0?(wP(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(let t in this.themeData.colors)e.set(t,jp.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){const t=CP(this.themeData.base);for(let i in t.colors)e.has(i)||e.set(i,jp.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);return i||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=_P.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case pP:return Ng.LIGHT;case fP:return Ng.HIGH_CONTRAST;default:return Ng.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){const i=CP(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}const i=this.themeData.colors["editor.foreground"],n=this.themeData.colors["editor.background"];if(i||n){const t={token:""};i&&(t.foreground=i),n&&(t.background=n),e.push(t)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=rP.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=xs.getForeground(n),s=xs.getFontStyle(n);return{foreground:o,italic:Boolean(1&s),bold:Boolean(2&s),underline:Boolean(4&s),strikethrough:Boolean(8&s)}}}function wP(e){return e===pP||e===mP||e===fP}function CP(e){switch(e){case pP:return dP;case mP:return hP;case fP:return uP}}function vP(e){const t=CP(e);return new bP(e,t)}const yP=_a("themeService");var xP=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},SP=function(e,t){return function(i,n){t(i,n,e)}};let EP=class extends Lt{constructor(e,t){super(),this._contextKeyService=e,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new zt,this._accessibilityModeEnabledContext=Ep.bindTo(this._contextKeyService);const i=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(i(),this._onDidChangeScreenReaderOptimized.fire())}))),i(),this.onDidChangeScreenReaderOptimized((()=>i()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}getAccessibilitySupport(){return this._accessibilitySupport}};EP=xP([SP(0,Sg),SP(1,hl)],EP);var kP=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},DP=function(e,t){return function(i,n){t(i,n,e)}};let IP=class{constructor(e){this._commandService=e}createMenu(e,t,i){return new LP(e,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},i),this._commandService,t,this)}};IP=kP([DP(0,eg)],IP);let LP=class e{constructor(e,t,i,n,o){this._id=e,this._options=t,this._commandService=i,this._contextKeyService=n,this._menuService=o,this._disposables=new It,this._menuGroups=[],this._contextKeys=new Set,this._build();const s=new An((()=>{this._build(),this._onDidChange.fire(this)}),t.eventDebounceDelay);this._disposables.add(s),this._disposables.add(Kg.onDidChangeMenu((t=>{t.has(e)&&s.schedule()})));const r=this._disposables.add(new It);this._onDidChange=new zt({onFirstListenerAdd:()=>{const e=new An((()=>this._onDidChange.fire(this)),t.eventDebounceDelay);r.add(e),r.add(n.onDidChangeContext((t=>{t.affectsSome(this._contextKeys)&&e.schedule()})))},onLastListenerRemove:r.clear.bind(r)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const t=Kg.getMenuItems(this._id);let i;t.sort(e._compareMenuItems);for(const e of t){const t=e.group||"";i&&i[0]===t||(i=[t,[]],this._menuGroups.push(i)),i[1].push(e),this._collectContextKeys(e)}}_collectContextKeys(t){if(e._fillInKbExprKeys(t.when,this._contextKeys),Ug(t)){if(t.command.precondition&&e._fillInKbExprKeys(t.command.precondition,this._contextKeys),t.command.toggled){const i=t.command.toggled.condition||t.command.toggled;e._fillInKbExprKeys(i,this._contextKeys)}}else this._options.emitEventsForSubmenuChanges&&Kg.getMenuItems(t.submenu).forEach(this._collectContextKeys,this)}getActions(e){const t=[];for(let i of this._menuGroups){const[n,o]=i,s=[];for(const t of o)if(this._contextKeyService.contextMatchesRules(t.when)){const i=Ug(t)?new Yg(t.command,t.alt,e,this._contextKeyService,this._commandService):new Gg(t,this._menuService,this._contextKeyService,e);s.push(i)}s.length>0&&t.push([n,s])}return t}static _fillInKbExprKeys(e,t){if(e)for(let i of e.keys())t.add(i)}static _compareMenuItems(t,i){let n=t.group,o=i.group;if(n!==o){if(!n)return 1;if(!o)return-1;if("navigation"===n)return-1;if("navigation"===o)return 1;let e=n.localeCompare(o);if(0!==e)return e}let s=t.order||0,r=i.order||0;return sr?1:e._compareTitles(Ug(t)?t.command.title:t.title,Ug(i)?i.command.title:i.title)}static _compareTitles(e,t){const i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};LP=kP([DP(2,eg),DP(3,Sg),DP(4,jg)],LP);var NP=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},TP=function(e,t){return function(i,n){t(i,n,e)}},MP=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let RP=class extends Lt{constructor(e,t){super(),this.layoutService=e,this.logService=t,this.mapTextToType=new Map,this.findText="",(Jr||Xr)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const e=()=>{const e=new Cn;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=e,navigator.clipboard.write([new ClipboardItem({"text/plain":e.p})]).catch((t=>MP(this,void 0,void 0,(function*(){t instanceof Error&&"NotAllowedError"===t.name&&e.isRejected||this.logService.error(t)}))))};this.layoutService.hasContainer&&(this._register(Oh(this.layoutService.container,"click",e)),this._register(Oh(this.layoutService.container,"keydown",e)))}writeText(e,t){return MP(this,void 0,void 0,(function*(){if(t)return void this.mapTextToType.set(t,e);if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(e);try{return yield navigator.clipboard.writeText(e)}catch(e){console.error(e)}const i=document.activeElement,n=document.body.appendChild(Iu("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),document.execCommand("copy"),i instanceof HTMLElement&&i.focus(),document.body.removeChild(n)}))}readText(e){return MP(this,void 0,void 0,(function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(e){return console.error(e),""}}))}readFindText(){return MP(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(e){return MP(this,void 0,void 0,(function*(){this.findText=e}))}};RP=NP([TP(0,UI),TP(1,Zc)],RP);var BP=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},OP=function(e,t){return function(i,n){t(i,n,e)}};const FP="data-keybinding-context";class PP{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t}}class zP extends PP{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}zP.INSTANCE=new zP;class VP extends PP{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=Oo.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(6===e.source){const e=Array.from(yt.map(this._values,(([e])=>e)));this._values.clear(),i.fire(new UP(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...yt.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new UP(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(VP._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(VP._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:n=Array.isArray(i)?JSON.stringify(i):i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}VP._keyPrefix="config.";class HP{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class WP{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class UP{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}}class QP{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}}class jP{constructor(e){this._onDidChangeContext=new Vt({merge:e=>new QP(e)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new HP(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new GP(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return!e||e.evaluate(t)}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new WP(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new WP(e))}getContext(e){return this._isDisposed?zP.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(FP)){const t=e.getAttribute(FP);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}}let KP=class extends jP{constructor(e){super(0),this._contexts=new Map,this._toDispose=new It,this._lastContextId=0;const t=new VP(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?zP.INSTANCE:this._contexts.get(e)||zP.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new PP(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};KP=BP([OP(0,hl)],KP);class GP extends jP{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=new Nt,this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(FP)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(FP,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(FP),this._isDisposed=!0)}getContextValuesContainer(e){return this._isDisposed?zP.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}tg.registerCommand("setContext",(function(e,t,i){e.get(Sg).createKey(String(t),i)})),tg.registerCommand({id:"getContextKeyInfo",handler:()=>[...xg.all()].sort(((e,t)=>e.key.localeCompare(t.key))),description:{description:e(0,"A command that returns information about context keys"),args:[]}}),tg.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(let i of xg.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));class YP{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class $P{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(this._hashFn(t),n),n.incoming.set(this._hashFn(e),i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(let e of this._nodes.values())e.outgoing.delete(t),e.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new YP(e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){let e=[];for(let[t,i]of this._nodes)e.push(`${t}, (incoming)[${[...i.incoming.keys()].join(", ")}], (outgoing)[${[...i.outgoing.keys()].join(",")}]`);return e.join("\n")}findCycleSlow(){for(let[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(let[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const e=this._findCycle(n,t);if(e)return e;t.delete(i)}}}class qP extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=null!==(t=e.findCycleSlow())&&void 0!==t?t:`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class JP{constructor(e=new Ok,t=!1,i){this._activeInstantiations=new Set,this._services=e,this._strict=t,this._parent=i,this._services.set(fa,this)}createChild(e){return new JP(e,this._strict,this)}invokeFunction(e,...t){let i=XP.traceInvocation(e),n=!1;try{return e({get:e=>{if(n)throw(t="service accessor is only valid during the invocation of its target method")?new Error(`Illegal state: ${t}`):new Error("Illegal state");var t;const o=this._getOrCreateServiceInstance(e,i);if(!o)throw new Error(`[invokeFunction] unknown service '${e}'`);return o}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof Al?(i=XP.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=XP.traceCreation(e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){let n=ma.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),o=[];for(const t of n){let n=this._getOrCreateServiceInstance(t.id,i);if(!n&&this._strict&&!t.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`);o.push(n)}let s=n.length>0?n[0].index:t.length;if(t.length!==s){console.warn(`[createInstance] First service dependency of ${e.name} at position ${s+1} conflicts with ${t.length} static arguments`);let i=s-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,s)}return new e(...[...t,...o])}_setServiceInstance(e,t){if(this._services.get(e)instanceof Al)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let i=this._getServiceInstanceOrDescriptor(e);return i instanceof Al?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){const n=new $P((e=>e.id.toString()));let o=0;const s=[{id:e,desc:t,_trace:i}];for(;s.length;){const t=s.pop();if(n.lookupOrInsertNode(t),o++>1e3)throw new qP(n);for(let i of ma.getServiceDependencies(t.desc.ctor)){let o=this._getServiceInstanceOrDescriptor(i.id);if(o||i.optional||console.warn(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`),o instanceof Al){const e={id:i.id,desc:o,_trace:t._trace.branch(i.id,!0)};n.insertEdge(t,e),s.push(e)}}}for(;;){const e=n.roots();if(0===e.length){if(!n.isEmpty())throw new qP(n);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof Al){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e)}n.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,o){if(this._services.get(e)instanceof Al)return this._createServiceInstance(t,i,n,o);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,o);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t=[],i,n){if(i){const i=new wn((()=>this._createInstance(e,t,n)));return new Proxy(Object.create(null),{get(e,t){if(t in e)return e[t];let n=i.value,o=n[t];return"function"!=typeof o||(o=o.bind(n),e[t]=o),o},set:(e,t,n)=>(i.value[t]=n,!0)})}return this._createInstance(e,t,n)}}class XP{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return XP._None}static traceCreation(e){return XP._None}branch(e,t){let i=new XP(2,e.toString());return this._dep.push([e,t,i]),i}stop(){let e=Date.now()-this._start;XP._totals+=e;let t=!1;let i=[`${0===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(i,n){let o=[],s=new Array(i+1).join("\t");for(const[r,a,l]of n._dep)if(a&&l){t=!0,o.push(`${s}CREATES -> ${r}`);let n=e(i+1,l);n&&o.push(n)}else o.push(`${s}uses -> ${r}`);return o.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${XP._totals.toFixed(2)}ms)`];(e>2||t)&&console.log(i.join("\n"))}}XP._None=new class extends XP{constructor(){super(-1,null)}stop(){}branch(){return this}},XP._totals=0;class ZP{constructor(){this._byResource=new Po,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let o=this._byOwner.get(t);o||(o=new Po,this._byOwner.set(t,o)),o.set(e,i)}get(e,t){let i=this._byResource.get(e);return null==i?void 0:i.get(t)}delete(e,t){let i=!1,n=!1,o=this._byResource.get(e);o&&(i=o.delete(t));let s=this._byOwner.get(t);if(s&&(n=s.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,o;return"string"==typeof e?null!==(i=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==i?i:yt.empty():Bi.isUri(e)?null!==(o=null===(n=this._byResource.get(e))||void 0===n?void 0:n.values())&&void 0!==o?o:yt.empty():yt.map(yt.concat(...this._byOwner.values()),(e=>e[1]))}}class ez{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Po,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===Ih.inMemory||e.scheme===Ih.walkThrough||e.scheme===Ih.walkThroughSnippet)return t;for(const{severity:i}of this._service.read({resource:e}))i===ZT.Error?t.errors+=1:i===ZT.Warning?t.warnings+=1:i===ZT.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class tz{constructor(){this._onMarkerChanged=new Ht({delay:0,merge:tz._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new ZP,this._stats=new ez(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if(K(i)){this._data.delete(t,e)&&this._onMarkerChanged.fire([t])}else{const n=[];for(const o of i){const i=tz._toMarker(e,t,o);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,relatedInformation:h,tags:u}=i;if(s)return a=a>0?a:1,l=l>0?l:1,c=c>=a?c:a,d=d>0?d:l,{resource:t,owner:e,code:n,severity:o,message:s,source:r,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:d,relatedInformation:h,tags:u}}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:o}=e;if((!o||o<0)&&(o=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if(tz._accept(i,n)){const e=t.push(i);if(o>0&&e===o)break}return t}return[]}if(t||i){const e=this._data.values(null!=i?i:t),s=[];for(const t of e)for(const e of t)if(tz._accept(e,n)){const t=s.push(e);if(o>0&&t===o)return s}return s}{const e=[];for(let t of this._data.values())for(let i of t)if(tz._accept(i,n)){const t=e.push(i);if(o>0&&t===o)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _merge(e){const t=new Po;for(let i of e)for(let e of i)t.set(e,!0);return Array.from(t.keys())}}var iz,nz=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(iz||(iz={}));class oz extends Lt{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new zt),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=iz.None,this.cache=new Map,this.flushDelayer=new un(oz.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){var t,i;null===(t=e.changed)||void 0===t||t.forEach(((e,t)=>this.accept(t,e))),null===(i=e.deleted)||void 0===i||i.forEach((e=>this.accept(e,void 0)))}accept(e,t){if(this.state===iz.Closed)return;let i=!1;if(me(t))i=this.cache.delete(e);else{this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0)}i&&this._onDidChangeStorage.fire(e)}get(e,t){const i=this.cache.get(e);return me(i)?t:i}getBoolean(e,t){const i=this.get(e);return me(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return me(i)?t:parseInt(i,10)}set(e,t){return nz(this,void 0,void 0,(function*(){if(this.state===iz.Closed)return;if(me(t))return this.delete(e);const i=String(t);return this.cache.get(e)!==i?(this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()):void 0}))}delete(e){return nz(this,void 0,void 0,(function*(){if(this.state===iz.Closed)return;return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.doFlush()):void 0}))}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return nz(this,void 0,void 0,(function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally((()=>{var e;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()}))}))}doFlush(e){return nz(this,void 0,void 0,(function*(){return this.flushDelayer.trigger((()=>this.flushPending()),e)}))}dispose(){this.flushDelayer.dispose(),super.dispose()}}oz.DEFAULT_FLUSH_DELAY=100;class sz{constructor(){this.onDidChangeItemsExternal=Ft.None,this.items=new Map}updateItems(e){return nz(this,void 0,void 0,(function*(){e.insert&&e.insert.forEach(((e,t)=>this.items.set(t,e))),e.delete&&e.delete.forEach((e=>this.items.delete(e)))}))}}const rz="__$__targetStorageMarker",az=_a("storageService");var lz;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(lz||(lz={}));class cz extends Lt{constructor(e={flushInterval:cz.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new Vt),this._onDidChangeTarget=this._register(new Vt),this._onWillSaveState=this._register(new zt),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(e,t){t===rz?(0===e?this._globalKeyTargets=void 0:1===e&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:e})):this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}get(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getNumber(e,i)}store(e,t,i,n){me(t)?this.remove(e,i):this.withPausedEmitters((()=>{var o;this.updateKeyTarget(e,i,n),null===(o=this.getStorage(i))||void 0===o||o.set(e,t)}))}remove(e,t){this.withPausedEmitters((()=>{var i;this.updateKeyTarget(e,t,void 0),null===(i=this.getStorage(t))||void 0===i||i.delete(e)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i){var n,o;const s=this.getKeyTargets(t);"number"==typeof i?s[e]!==i&&(s[e]=i,null===(n=this.getStorage(t))||void 0===n||n.set(rz,JSON.stringify(s))):"number"==typeof s[e]&&(delete s[e],null===(o=this.getStorage(t))||void 0===o||o.set(rz,JSON.stringify(s)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(e){return 0===e?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(e){const t=this.get(rz,e);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}}cz.DEFAULT_FLUSH_INTERVAL=6e4;var dz=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},hz=function(e,t){return function(i,n){t(i,n,e)}},uz=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class gz{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new zt}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let pz=class{constructor(e){this.modelService=e}createModelReference(e){const t=this.modelService.getModel(e);return t?Promise.resolve(new Tt(new gz(t))):Promise.reject(new Error("Model not found"))}};pz=dz([hz(0,Pl)],pz);class mz{show(){return mz.NULL_PROGRESS_RUNNER}showWhile(e,t){return uz(this,void 0,void 0,(function*(){yield e}))}}mz.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class fz{info(e){return this.notify({severity:Pk.Info,message:e})}warn(e){return this.notify({severity:Pk.Warning,message:e})}error(e){return this.notify({severity:Pk.Error,message:e})}notify(e){switch(e.severity){case Pk.Error:console.error(e.message);break;case Pk.Warning:console.warn(e.message);break;default:console.log(e.message)}return fz.NO_OP}status(e,t){return Lt.None}}fz.NO_OP=new class{};let _z=class{constructor(e){this._onWillExecuteCommand=new zt,this._onDidExecuteCommand=new zt,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=tg.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(e){return Promise.reject(e)}}};_z=dz([hz(0,fa)],_z);let Az=class extends ML{constructor(e,t,i,n,o,s){super(e,t,i,n,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const r=e=>{const t=new It;t.add(Oh(e,wu.KEY_DOWN,(e=>{const t=new vh(e);this._dispatch(t,t.target)&&(t.preventDefault(),t.stopPropagation())}))),t.add(Oh(e,wu.KEY_UP,(e=>{const t=new vh(e);this._singleModifierDispatch(t,t.target)&&t.preventDefault()}))),this._domNodeListeners.push(new bz(e,t))},a=e=>{for(let t=0;t{e.getOption(54)||r(e.getContainerDomNode())};this._register(s.onCodeEditorAdd(l)),this._register(s.onCodeEditorRemove((e=>{e.getOption(54)||a(e.getContainerDomNode())}))),s.listCodeEditors().forEach(l);const c=e=>{r(e.getContainerDomNode())};this._register(s.onDiffEditorAdd(c)),this._register(s.onDiffEditorRemove((e=>{a(e.getContainerDomNode())}))),s.listDiffEditors().forEach(c)}addDynamicKeybinding(e,t,i,n){const o=ph(t,S),s=new It;return o&&(this._dynamicKeybindings.push({keybinding:o.parts,command:e,when:n,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),s.add(Dt((()=>{for(let t=0;tthis._log(e)))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){const i=[];let n=0;for(const o of e){const e=o.when||void 0,s=o.keybinding;if(s){const r=GL.resolveUserBinding(s,S);for(const s of r)i[n++]=new zL(s,o.command,o.commandArgs,e,t,null,!1)}else i[n++]=new zL(void 0,o.command,o.commandArgs,e,t,null,!1)}return i}resolveKeyboardEvent(e){const t=new fh(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new GL(t,S)}};Az=dz([hz(0,Sg),hz(1,eg),hz(2,Xg),hz(3,Vk),hz(4,Zc),hz(5,Aa)],Az);class bz extends Lt{constructor(e,t){super(),this.domNode=e,this._register(t)}}function wz(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof Bi)}class Cz{constructor(){this._onDidChangeConfiguration=new zt,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new LL(new IL,new DL)}getValue(e,t){const i="string"==typeof e?e:void 0,n=wz(e)?e:wz(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()},i=[];for(const t of e){const[e,n]=t;this.getValue(e)!==n&&(this._configuration.updateValue(e,n),i.push(e))}if(i.length>0){const e=new NL({keys:i,overrides:[]},t,this._configuration);e.source=7,e.sourceConfig=null,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}updateValue(e,t,i,n){return this.updateValues([[e,t]])}inspect(e,t={}){return this._configuration.inspect(e,t,void 0)}}let vz=class{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new zt,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=(Ki.isIPosition(t)?t:null)?"string"==typeof i?i:void 0:"string"==typeof t?t:void 0;return void 0===n?this.configurationService.getValue():this.configurationService.getValue(n)}};vz=dz([hz(0,hl)],vz);let yz=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"string"==typeof i&&"auto"!==i?i:A||_?"\n":"\r\n"}};yz=dz([hz(0,hl)],yz);class xz{constructor(){const e=Bi.from({scheme:xz.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new qL({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}}function Sz(e,t,i){if(!t)return;if(!(e instanceof Cz))return;const n=[];Object.keys(t).forEach((e=>{(function(e){return EL()[`editor.${e}`]||!1})(e)&&n.push([`editor.${e}`,t[e]]),i&&function(e){return EL()[`diffEditor.${e}`]||!1}(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}xz.SCHEME="inmemory";let Ez=class{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return uz(this,void 0,void 0,(function*(){const t=new Map;for(let i of e){if(!(i instanceof wL))throw new Error("bad edit - only text edits are supported");const e=this._modelService.getModel(i.resource);if(!e)throw new Error("bad edit - model not found");if("number"==typeof i.versionId&&e.getVersionId()!==i.versionId)throw new Error("bad state - model changed in the meantime");let n=t.get(e);n||(n=[],t.set(e,n)),n.push(kL.replaceMove(Gi.lift(i.textEdit.range),i.textEdit.text))}let i=0,n=0;for(const[e,o]of t)e.pushStackElement(),e.pushEditOperations([],o,(()=>[])),e.pushStackElement(),n+=1,i+=o.length;return{ariaSummary:In(sN.bulkEditServiceSummary,i,n)}}))}};Ez=dz([hz(0,Pl)],Ez);let kz=class extends pN{constructor(e,t){super(e),this._codeEditorService=t}showContextView(e,t,i){if(!t){const e=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();e&&(t=e.getContainerDomNode())}return super.showContextView(e,t,i)}};kz=dz([hz(0,UI),hz(1,Aa)],kz);let Dz=class extends PT{constructor(e,t,i,n,o){super(e,t,i,n,o),this.configure({blockMouse:!1})}};var Iz;Dz=dz([hz(0,Xg),hz(1,Vk),hz(2,aI),hz(3,BL),hz(4,Tg)],Dz),wl(hl,Cz),wl(Jc,vz),wl(Xc,yz),wl($L,xz),wl(YL,class{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}}),wl(Xg,class{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}),wl(YI,class{confirm(e){return this.doConfirm(e).then((e=>({confirmed:e,checkboxChecked:!1})))}doConfirm(e){let t=e.message;return e.detail&&(t=t+"\n\n"+e.detail),Promise.resolve(window.confirm(t))}show(e,t,i,n){return Promise.resolve({choice:0})}}),wl(Vk,fz),wl(tM,tz),wl(_l,class extends SN{constructor(){super()}}),wl(yP,class extends Lt{constructor(){super(),this._onColorThemeChange=this._register(new zt),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new zt),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new gP,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(pP,vP(pP)),this._knownThemes.set(mP,vP(mP)),this._knownThemes.set(fP,vP(fP));const e=function(e){const t=new zt,i=QD();return i.onDidChange((()=>t.fire())),null==e||e.onDidProductIconThemeChange((()=>t.fire())),{onDidChange:t.event,getCSS(){const t=e?e.getProductIconTheme():new gP,n={},o=e=>{const i=t.getIcon(e);if(!i)return;const o=i.font;return o?(n[o.id]=o.getDefinition(),`.codicon-${e.id}:before { content: '${i.fontCharacter}'; font-family: ${Bu(o.id)}; }`):`.codicon-${e.id}:before { content: '${i.fontCharacter}'; }`},s=[];for(let e of i.getIcons()){const t=o(e);t&&s.push(t)}for(let e in n){const t=n[e];if(t){const i=t.weight?`font-weight: ${t.weight};`:"",n=t.style?`font-style: ${t.style};`:"",o=t.src.map((e=>`${Ru(e.location)} format('${e.format}')`)).join(", ");s.push(`@font-face { src: ${o}; font-family: ${Bu(e)};${i}${n} font-display: block; }`)}}return s.join("\n")}}}(this);var t,i;this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(pP),e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),t="(forced-colors: active)",i=()=>{this._updateActualTheme()},window.matchMedia(t).addEventListener("change",i)}registerEditorContainer(e){return hu(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=pu(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),Lt.None}_registerShadowDomContainer(e){const t=pu(e);return t.className="monaco-colors",t.textContent=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let e=0;e{t.base===e&&t.notifyBaseUpdated()})),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(pP),this._desiredTheme=t,this._updateActualTheme()}_updateActualTheme(){const e=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(fP):this._desiredTheme;this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._updateActualTheme()}_updateThemeOrColorMap(){const e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};AP.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=[];for(const e of _P.getColors()){const t=this._theme.getColor(e.id,!0);t&&n.push(`${Yp(e.id)}: ${t.toString()};`)}i.addRule(`.monaco-editor { ${n.join("\n")} }`);const o=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(function(e){const t=[];for(let i=1,n=e.length;ie.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}),wl(Zc,class extends od{constructor(){super(new nd)}}),wl(Pl,TM),wl(Ku,sM),wl(Sg,KP),wl(gI,mz),wl(az,class extends cz{constructor(){super(),this.globalStorage=this._register(new oz(new sz)),this.workspaceStorage=this._register(new oz(new sz)),this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e)))),this._register(this.globalStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e))))}getStorage(e){return 0===e?this.globalStorage:this.workspaceStorage}}),wl(rI,dd),wl(AL,Ez),wl(rN,class{constructor(){this._neverEmitter=new zt,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}),wl(Gu,pz),wl(Sp,EP),wl(XO,ZO),wl(eg,_z),wl(BL,Az),wl(QF,eP),wl(aI,kz),wl(UT,XT),wl(hI,RP),wl(lI,Dz),wl(jg,IP),function(e){const t=new Ok;for(const[e,i]of Cl())t.set(e,i);const i=new JP(t,!0);t.set(fa,i),e.get=function(e){const n=t.get(e);if(!n)throw new Error("Missing service "+e);return n instanceof Al?i.invokeFunction((t=>t.get(e))):n};let n=!1;e.initialize=function(e){if(n)return i;n=!0;for(const[e,i]of Cl())t.get(e)||t.set(e,i);for(const i in e)if(e.hasOwnProperty(i)){const n=_a(i);t.get(n)instanceof Al&&t.set(n,e[i])}return i}}(Iz||(Iz={}));var Lz=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Nz=function(e,t){return function(i,n){t(i,n,e)}};let Tz=0,Mz=!1;function Rz(e){if(!e){if(Mz)return;Mz=!0}!function(e){Pu=document.createElement("div"),Pu.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),Pu.appendChild(e),e};zu=t(),Vu=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("role","complementary"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),Pu.appendChild(e),e};Hu=i(),Wu=i(),e.appendChild(Pu)}(e||document.body)}let Bz=class extends uD{constructor(e,t,i,n,o,s,r,a,l,c,d){const h=Object.assign({},t);h.ariaLabel=h.ariaLabel||nN.editorViewAccessibleLabel,h.ariaLabel=h.ariaLabel+";"+nN.accessibilityHelpMessage,super(e,h,{},i,n,o,s,a,l,c,d),this._standaloneKeybindingService=r instanceof Az?r:null,Rz(h.ariaContainerElement)}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const n="DYNAMIC_"+ ++Tz,o=og.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,o),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),Lt.None;const t=e.id,i=e.label,n=og.and(og.equals("editorId",this.getId()),og.deserialize(e.precondition)),o=e.keybindings,s=og.and(n,og.deserialize(e.keybindingContext)),r=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,l=(t,...i)=>Promise.resolve(e.run(this,...i)),c=new It,d=this.getId()+":"+t;if(c.add(tg.registerCommand(d,l)),r){const e={command:{id:d,title:i},when:n,group:r,order:a};c.add(Kg.appendMenuItem(Qg.EditorContext,e))}if(Array.isArray(o))for(const e of o)c.add(this._standaloneKeybindingService.addDynamicKeybinding(d,e,l,s));const h=new YE(d,i,i,n,l,this._contextKeyService);return this._actions[t]=h,c.add(Dt((()=>{delete this._actions[t]}))),c}_triggerCommand(e,t){if(this._codeEditorService instanceof WI)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};Bz=Lz([Nz(2,fa),Nz(3,Aa),Nz(4,eg),Nz(5,Sg),Nz(6,BL),Nz(7,Tg),Nz(8,Vk),Nz(9,Sp),Nz(10,Sl)],Bz);let Oz=class extends Bz{constructor(e,t,i,n,o,s,r,a,l,c,d,h,u,g){const p=Object.assign({},t);Sz(c,p,!1);const m=a.registerEditorContainer(e);"string"==typeof p.theme&&a.setTheme(p.theme),void 0!==p.autoDetectHighContrast&&a.setAutoDetectHighContrast(Boolean(p.autoDetectHighContrast));const f=p.model;let _;if(delete p.model,super(e,p,i,n,o,s,r,a,l,d,g),this._configurationService=c,this._standaloneThemeService=a,this._register(m),void 0===f){const e=u.getLanguageIdByMimeType(p.language)||p.language||sk;_=Pz(h,u,p.value||"",e,void 0),this._ownsModel=!0}else _=f,this._ownsModel=!1;if(this._attachModel(_),_){const e={oldModelUrl:null,newModelUrl:_.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){Sz(this._configurationService,e,!1),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};Oz=Lz([Nz(2,fa),Nz(3,Aa),Nz(4,eg),Nz(5,Sg),Nz(6,BL),Nz(7,yP),Nz(8,Vk),Nz(9,hl),Nz(10,Sp),Nz(11,Pl),Nz(12,_l),Nz(13,Sl)],Oz);let Fz=class extends vI{constructor(e,t,i,n,o,s,r,a,l,c,d,h){const u=Object.assign({},t);Sz(l,u,!0);const g=r.registerEditorContainer(e);"string"==typeof u.theme&&r.setTheme(u.theme),void 0!==u.autoDetectHighContrast&&r.setAutoDetectHighContrast(Boolean(u.autoDetectHighContrast)),super(e,u,{},h,o,n,i,s,r,a,c,d),this._configurationService=l,this._standaloneThemeService=r,this._register(g)}dispose(){super.dispose()}updateOptions(e){Sz(this._configurationService,e,!0),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(Bz,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function Pz(e,t,i,n,o){if(i=i||"",!n){const n=i.indexOf("\n");let s=i;return-1!==n&&(s=i.substring(0,n)),zz(e,i,t.createByFilepathOrFirstLine(o||null,s),o)}return zz(e,i,t.createById(n),o)}function zz(e,t,i,n){return e.createModel(t,i,n)}function Vz(e,t,i){return Iz.initialize(i||{}).createInstance(Oz,e,t)}function Hz(e){return Iz.get(Aa).onCodeEditorAdd((t=>{e(t)}))}function Wz(e,t,i){return Iz.initialize(i||{}).createInstance(Fz,e,t)}function Uz(e,t){return new Ca(e,t)}function Qz(e,t,i){const n=Iz.get(_l),o=n.getLanguageIdByMimeType(t)||t;return Pz(Iz.get(Pl),n,e,o,i)}function jz(e,t){const i=Iz.get(_l);Iz.get(Pl).setMode(e,i.createById(t))}function Kz(e,t,i){if(e){Iz.get(tM).changeOne(t,e.uri,i)}}function Gz(e){return Iz.get(tM).read(e)}function Yz(e){return Iz.get(tM).onMarkerChanged(e)}function $z(e){return Iz.get(Pl).getModel(e)}function qz(){return Iz.get(Pl).getModels()}function Jz(e){return Iz.get(Pl).onModelAdded(e)}function Xz(e){return Iz.get(Pl).onModelRemoved(e)}function Zz(e){return Iz.get(Pl).onModelLanguageChanged((t=>{e({model:t.model,oldLanguage:t.oldLanguageId})}))}function eV(e){return function(e,t,i){return new _d(e,t,i)}(Iz.get(Pl),Iz.get(Sl),e)}function tV(e,t){const i=Iz.get(_l),n=Iz.get(yP);return n.registerEditorContainer(e),hh.colorizeElement(n,i,e,t)}function iV(e,t,i){const n=Iz.get(_l);return Iz.get(yP).registerEditorContainer(document.body),hh.colorize(n,e,t,i)}function nV(e,t,i=4){return Iz.get(yP).registerEditorContainer(document.body),hh.colorizeModelLine(e,t,i)}function oV(e,t){er.getOrCreate(t);const i=function(e){const t=er.get(e);return t||{getInitialState:()=>Bl,tokenize:(t,i,n)=>Ol(e,n)}}(t),n=Fn(e),o=[];let s=i.getInitialState();for(let e=0,t=n.length;e=100){n-=100;const e=i.split(".");if(e.unshift(i),n=0&&(n.tokenSubst=!0),"string"==typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw qd(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!=typeof i.next)throw qd(e,"the next state must be a string value in rule: "+t);{let o=i.next;if(!/^(@pop|@push|@popall)$/.test(o)&&("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&!function(e,t){let i=t;for(;i&&i.length>0;){if(e.stateNames[i])return!0;const t=i.lastIndexOf(".");i=t<0?null:i.substr(0,t)}return!1}(e,Jd(e,o,"",[],""))))throw qd(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=o}}return"number"==typeof i.goBack&&(n.goBack=i.goBack),"string"==typeof i.switchTo&&(n.switchTo=i.switchTo),"string"==typeof i.log&&(n.log=i.log),"string"==typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){const n=[];for(let o=0,s=i.length;o0&&"^"===i[0],this.name=this.name+": "+i,this.regex=uV(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=pV(e,this.name,t)}}function fV(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");const i={};i.languageId=e,i.includeLF=cV(t.includeLF,!1),i.noThrow=!1,i.maxStack=100,i.start="string"==typeof t.start?t.start:null,i.ignoreCase=cV(t.ignoreCase,!1),i.unicode=cV(t.unicode,!1),i.tokenPostfix=dV(t.tokenPostfix,"."+i.languageId),i.defaultToken=dV(t.defaultToken,"source"),i.usesEmbedded=!1;const n=t;function o(e,s,r){for(const a of r){let r=a.include;if(r){if("string"!=typeof r)throw qd(i,"an 'include' attribute must be a string at: "+e);if("@"===r[0]&&(r=r.substr(1)),!t.tokenizer[r])throw qd(i,"include target '"+r+"' is not defined at: "+e);o(e+"."+r,s,t.tokenizer[r])}else{const t=new mV(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"==typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!=typeof a[1])throw qd(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw qd(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"==typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=cV(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}s.push(t)}}}if(n.languageId=e,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw qd(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(let e in t.tokenizer)if(t.tokenizer.hasOwnProperty(e)){i.start||(i.start=e);const n=t.tokenizer[e];i.tokenizer[e]=new Array,o("tokenizer."+e,i.tokenizer[e],n)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw qd(i,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const s=[];for(let e of t.brackets){let t=e;if(t&&Array.isArray(t)&&3===t.length&&(t={token:t[2],open:t[0],close:t[1]}),t.open===t.close)throw qd(i,"open and close brackets in a 'brackets' attribute must be different: "+t.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof t.open||"string"!=typeof t.token||"string"!=typeof t.close)throw qd(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");s.push({token:t.token+i.tokenPostfix,open:Yd(i,t.open),close:Yd(i,t.close)})}return i.brackets=s,i.noThrow=!0,i}var _V=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function AV(e){ok.registerLanguage(e)}function bV(){let e=[];return e=e.concat(ok.getLanguages()),e}function wV(e){return Iz.get(_l).languageIdCodec.encodeLanguageId(e)}function CV(e,t){const i=Iz.get(_l).onDidEncounterLanguage((n=>{n===e&&(i.dispose(),t())}));return i}function vV(e,t){if(!Iz.get(_l).isRegisteredLanguageId(e))throw new Error(`Cannot set configuration for unknown language ${e}`);return Ll.register(e,t,100)}class yV{constructor(e,t){this._languageId=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i){if("function"==typeof this._actual.tokenize)return xV.adaptTokenize(this._languageId,this._actual,e,i);throw new Error("Not supported!")}tokenizeEncoded(e,t,i){const n=this._actual.tokenizeEncoded(e,i);return new ks(n.tokens,n.endState)}}class xV{constructor(e,t,i,n){this._languageId=e,this._actual=t,this._languageService=i,this._standaloneThemeService=n}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t){const i=[];let n=0;for(let o=0,s=e.length;o0&&o[s-1]===l)continue;let c=a.startIndex;0===e?c=0:c_V(this,void 0,void 0,(function*(){const i=yield Promise.resolve(t.create());return i?"function"==typeof i.getInitialState?kV(e,i):new rh(Iz.get(_l),Iz.get(yP),e,fV(e,i)):null}))};return er.registerFactory(e,i)}function IV(e,t){if(!Iz.get(_l).isRegisteredLanguageId(e))throw new Error(`Cannot set tokens provider for unknown language ${e}`);return SV(t)?DV(e,{create:()=>t}):er.register(e,kV(e,t))}function LV(e,t){return SV(t)?DV(e,{create:()=>t}):er.register(e,(t=>new rh(Iz.get(_l),Iz.get(yP),e,fV(e,t)))(t))}function NV(e,t){return Is.register(e,t)}function TV(e,t){return Ls.register(e,t)}function MV(e,t){return Ms.register(e,t)}function RV(e,t){return Rs.register(e,{provideHover:(e,i,n)=>{const o=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n)).then((e=>{if(e)return!e.range&&o&&(e.range=new Gi(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),e.range||(e.range=new Gi(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})}function BV(e,t){return Bs.register(e,t)}function OV(e,t){return Os.register(e,t)}function FV(e,t){return Fs.register(e,t)}function PV(e,t){return Ps.register(e,t)}function zV(e,t){return Vs.register(e,t)}function VV(e,t){return Hs.register(e,t)}function HV(e,t){return Ws.register(e,t)}function WV(e,t,i){return Qs.register(e,{providedCodeActionKinds:null==i?void 0:i.providedCodeActionKinds,provideCodeActions:(e,i,n,o)=>{const s=Iz.get(tM).read({resource:e.uri}).filter((e=>Gi.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:s,only:n.only},o)},resolveCodeAction:t.resolveCodeAction})}function UV(e,t){return js.register(e,t)}function QV(e,t){return Ks.register(e,t)}function jV(e,t){return Gs.register(e,t)}function KV(e,t){return Ys.register(e,t)}function GV(e,t){return Ns.register(e,t)}function YV(e,t){return $s.register(e,t)}function $V(e,t){return Js.register(e,t)}function qV(e,t){return zs.register(e,t)}function JV(e,t){return qs.register(e,t)}function XV(e,t){return Xs.register(e,t)}function ZV(e,t){return Zs.register(e,t)}function eH(e,t){return Ts.register(e,t)}function tH(e,t){return Us.register(e,t)}const iH=_a("IEditorCancelService"),nH=new xg("cancellableOperation",!1,e(0,"Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));wl(iH,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:nH.bindTo(e.get(Sg)),tokens:new Rt}))),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},!0);class oH extends Gt{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(iH).add(e,this)))}dispose(){this._unregister(),super.dispose()}}rp(new class extends ip{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:nH})}runEditorCommand(e,t){e.get(iH).cancel(t)}});class sH{constructor(e,t){if(this.flags=t,1&this.flags){const t=e.getModel();this.modelVersionId=t?In("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;4&this.flags?this.position=e.getPosition():this.position=null,2&this.flags?this.selection=e.getSelection():this.selection=null,8&this.flags?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof sH))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&(this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&(!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))))}validate(e){return this._equals(new sH(e,this.flags))}}class rH extends oH{constructor(e,t,i,n){super(e,n),this._listener=new It,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&Gi.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&Gi.containsRange(i,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class aH extends Gt{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}function lH(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===va.ICodeEditor}function cH(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===va.IDiffEditor}function dH(e){return lH(e)?e:cH(e)?e.getModifiedEditor():null}class hH{static _handleEolEdits(e,t){let i,n=[];for(let e of t)"number"==typeof e.eol&&(i=e.eol),e.range&&"string"==typeof e.text&&n.push(e);return"number"==typeof i&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const n=hH._handleEolEdits(e,t);1===n.length&&hH._isFullModelReplaceEdit(e,n[0])?e.executeEdits("formatEditsCommand",n.map((e=>kL.replace(Gi.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",n.map((e=>kL.replaceMove(Gi.lift(e.range),e.text)))),i&&e.pushUndoStop()}}class uH{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}var gH,pH=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function mH(t){if(!(t=t.filter((e=>e.range))).length)return;let{range:i}=t[0];for(let e=1;ee.provideDocumentRangeFormattingEdits(t,t.getFullModelRange(),i,n)})}return t}class _H{static setFormatterSelector(e){return{dispose:_H._selectors.unshift(e)}}static select(e,t,i){return pH(this,void 0,void 0,(function*(){if(0===e.length)return;const n=yt.first(_H._selectors);return n?yield n(e,t,i):void 0}))}}function AH(e,t,i,n,o,s){return pH(this,void 0,void 0,(function*(){const r=e.get(fa),a=lH(t)?t.getModel():t,l=Ks.ordered(a),c=yield _H.select(l,a,n);c&&(o.report(c),yield r.invokeFunction(bH,c,t,i,s))}))}function bH(e,t,i,n,o){return pH(this,void 0,void 0,(function*(){const s=e.get(rI);let r,a;lH(i)?(r=i.getModel(),a=new rH(i,5,void 0,o)):(r=i,a=new aH(i,o));let l=[],c=0;for(let e of te(n).sort(Gi.compareRangesUsingStarts))c>0&&Gi.areIntersectingOrTouching(l[c-1],e)?l[c-1]=Gi.fromPositions(l[c-1].getStartPosition(),e.getEndPosition()):c=l.push(e);const d=e=>pH(this,void 0,void 0,(function*(){return(yield t.provideDocumentRangeFormattingEdits(r,e,r.getFormattingOptions(),a.token))||[]})),h=(e,t)=>{if(!e.length||!t.length)return!1;const i=e.reduce(((e,t)=>Gi.plusRange(e,t.range)),e[0].range);if(!t.some((e=>Gi.intersectRanges(i,e.range))))return!1;for(let i of e)for(let e of t)if(Gi.intersectRanges(i.range,e.range))return!0;return!1},u=[],g=[];try{for(let e of l){if(a.token.isCancellationRequested)return!0;g.push(yield d(e))}for(let e=0;e({text:e.text,range:Gi.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(Gi.areIntersectingOrTouching(i,t))return[new Yi(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function wH(e,t,i,n,o){return pH(this,void 0,void 0,(function*(){const s=e.get(fa),r=lH(t)?t.getModel():t,a=fH(r),l=yield _H.select(a,r,i);l&&(n.report(l),yield s.invokeFunction(CH,l,t,i,o))}))}function CH(e,t,i,n,o){return pH(this,void 0,void 0,(function*(){const s=e.get(rI);let r,a,l;lH(i)?(r=i.getModel(),a=new rH(i,5,void 0,o)):(r=i,a=new aH(i,o));try{const e=yield t.provideDocumentFormattingEdits(r,r.getFormattingOptions(),a.token);if(l=yield s.computeMoreMinimalEdits(r.uri,e),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||0===l.length)return!1;if(lH(i))hH.execute(i,l,2!==n),2!==n&&(mH(l),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1));else{const[{range:e}]=l,t=new Yi(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);r.pushEditOperations([t],l.map((e=>({text:e.text,range:Gi.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(Gi.areIntersectingOrTouching(i,t))return[new Yi(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function vH(e,t,i,n,o,s){const r=Gs.ordered(t);return 0===r.length||r[0].autoFormatTriggerCharacters.indexOf(n)<0?Promise.resolve(void 0):Promise.resolve(r[0].provideOnTypeFormattingEdits(t,i,n,o,s)).catch(pt).then((i=>e.computeMoreMinimalEdits(t.uri,i)))}_H._selectors=new Rt,tg.registerCommand("_executeFormatRangeProvider",(function(e,...t){return pH(this,void 0,void 0,(function*(){const[i,n,o]=t;fe(Bi.isUri(i)),fe(Gi.isIRange(n));const s=e.get(Gu),r=e.get(rI),a=yield s.createModelReference(i);try{return function(e,t,i,n,o){return pH(this,void 0,void 0,(function*(){const s=Ks.ordered(t);for(const r of s){let s=yield Promise.resolve(r.provideDocumentRangeFormattingEdits(t,i,n,o)).catch(pt);if(G(s))return yield e.computeMoreMinimalEdits(t.uri,s)}}))}(r,a.object.textEditorModel,Gi.lift(n),o,jt.None)}finally{a.dispose()}}))})),tg.registerCommand("_executeFormatDocumentProvider",(function(e,...t){return pH(this,void 0,void 0,(function*(){const[i,n]=t;fe(Bi.isUri(i));const o=e.get(Gu),s=e.get(rI),r=yield o.createModelReference(i);try{return function(e,t,i,n){return pH(this,void 0,void 0,(function*(){const o=fH(t);for(const s of o){let o=yield Promise.resolve(s.provideDocumentFormattingEdits(t,i,n)).catch(pt);if(G(o))return yield e.computeMoreMinimalEdits(t.uri,o)}}))}(s,r.object.textEditorModel,n,jt.None)}finally{r.dispose()}}))})),tg.registerCommand("_executeFormatOnTypeProvider",(function(e,...t){return pH(this,void 0,void 0,(function*(){const[i,n,o,s]=t;fe(Bi.isUri(i)),fe(Ki.isIPosition(n)),fe("string"==typeof o);const r=e.get(Gu),a=e.get(rI),l=yield r.createModelReference(i);try{return vH(a,l.object.textEditorModel,Ki.lift(n),o,s,jt.None)}finally{l.dispose()}}))})),ht.wrappingIndent.defaultValue=0,ht.glyphMargin.defaultValue=!1,ht.autoIndent.defaultValue=3,ht.overviewRulerLanes.defaultValue=2,_H.setFormatterSelector(((e,t,i)=>Promise.resolve(e[0])));const yH=zr();yH.editor={create:Vz,onDidCreateEditor:Hz,createDiffEditor:Wz,createDiffNavigator:Uz,createModel:Qz,setModelLanguage:jz,setModelMarkers:Kz,getModelMarkers:Gz,onDidChangeMarkers:Yz,getModels:qz,getModel:$z,onDidCreateModel:Jz,onWillDisposeModel:Xz,onDidChangeModelLanguage:Zz,createWebWorker:eV,colorizeElement:tV,colorize:iV,colorizeModelLine:nV,tokenize:oV,defineTheme:sV,setTheme:rV,remeasureFonts:aV,registerCommand:lV,AccessibilitySupport:tr,ContentWidgetPositionPreference:rr,CursorChangeReason:ar,DefaultEndOfLine:lr,EditorAutoIndentStrategy:dr,EditorOption:hr,EndOfLinePreference:ur,EndOfLineSequence:gr,MinimapPosition:Cr,MouseTargetType:vr,OverlayWidgetPositionPreference:yr,OverviewRulerLane:xr,RenderLineNumbersType:Er,RenderMinimap:kr,ScrollbarVisibility:Ir,ScrollType:Dr,TextEditorCursorBlinkingStyle:Rr,TextEditorCursorStyle:Br,TrackedRangeStickiness:Or,WrappingIndent:Fr,InjectedTextCursorStops:mr,PositionAffinity:Sr,ConfigurationChangedEvent:Ne,BareFontInfo:ha,FontInfo:ua,TextModelResolvedOptions:Xi,FindMatch:Zi,ApplyUpdateResult:Re,EditorType:va,EditorOptions:ht},yH.languages={register:AV,getLanguages:bV,onLanguage:CV,getEncodedLanguageId:wV,setLanguageConfiguration:vV,setColorMap:EV,registerTokensProviderFactory:DV,setTokensProvider:IV,setMonarchTokensProvider:LV,registerReferenceProvider:NV,registerRenameProvider:TV,registerCompletionItemProvider:GV,registerSignatureHelpProvider:MV,registerHoverProvider:RV,registerDocumentSymbolProvider:BV,registerDocumentHighlightProvider:OV,registerLinkedEditingRangeProvider:FV,registerDefinitionProvider:PV,registerImplementationProvider:zV,registerTypeDefinitionProvider:VV,registerCodeLensProvider:HV,registerCodeActionProvider:WV,registerDocumentFormattingEditProvider:UV,registerDocumentRangeFormattingEditProvider:QV,registerOnTypeFormattingEditProvider:jV,registerLinkProvider:KV,registerColorProvider:YV,registerFoldingRangeProvider:$V,registerDeclarationProvider:qV,registerSelectionRangeProvider:JV,registerDocumentSemanticTokensProvider:XV,registerDocumentRangeSemanticTokensProvider:ZV,registerInlineCompletionsProvider:eH,registerInlayHintsProvider:tH,DocumentHighlightKind:cr,CompletionItemKind:nr,CompletionItemTag:or,CompletionItemInsertTextRule:ir,SymbolKind:Tr,SymbolTag:Mr,IndentAction:pr,CompletionTriggerKind:sr,SignatureHelpTriggerKind:Nr,InlayHintKind:fr,InlineCompletionTriggerKind:_r,FoldingRangeKind:Ds};const xH=yH.CancellationTokenSource,SH=yH.Emitter,EH=yH.KeyCode,kH=yH.KeyMod,DH=yH.Position,IH=yH.Range,LH=yH.Selection,NH=yH.SelectionDirection,TH=yH.MarkerSeverity,MH=yH.MarkerTag,RH=yH.Uri,BH=yH.Token,OH=yH.editor,FH=yH.languages;((null===(gH=g.MonacoEnvironment)||void 0===gH?void 0:gH.globalAPI)||"function"==typeof define&&define.amd)&&(self.monaco=yH),void 0!==self.require&&"function"==typeof self.require.config&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});var PH=Object.freeze({__proto__:null,CancellationTokenSource:xH,Emitter:SH,KeyCode:EH,KeyMod:kH,Position:DH,Range:IH,Selection:LH,SelectionDirection:NH,MarkerSeverity:TH,MarkerTag:MH,Uri:RH,Token:BH,editor:OH,languages:FH}),zH=Object.defineProperty,VH=Object.getOwnPropertyDescriptor,HH=Object.getOwnPropertyNames,WH=Object.prototype.hasOwnProperty,UH={}; /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of HH(t))WH.call(e,o)||!i&&"default"===o||zH(e,o,{get:()=>t[o],enumerable:!(n=VH(t,o))||n.enumerable})})(UH,PH);var QH={},jH={},KH=class{static getOrCreate(e){return jH[e]||(jH[e]=new KH(e)),jH[e]}_languageId;_loadingTriggered;_lazyLoadPromise;_lazyLoadPromiseResolve;_lazyLoadPromiseReject;constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t}))}load(){return this._loadingTriggered||(this._loadingTriggered=!0,QH[this._languageId].loader().then((e=>this._lazyLoadPromiseResolve(e)),(e=>this._lazyLoadPromiseReject(e)))),this._lazyLoadPromise}};function GH(e){const t=e.id;QH[t]=e,UH.languages.register(e);const i=KH.getOrCreate(t);UH.languages.registerTokensProviderFactory(t,{create:async()=>(await i.load()).language}),UH.languages.onLanguage(t,(async()=>{const e=await i.load();UH.languages.setLanguageConfiguration(t,e.conf)}))} /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/GH({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>Promise.resolve().then((function(){return o8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>Promise.resolve().then((function(){return l8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>Promise.resolve().then((function(){return c8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>Promise.resolve().then((function(){return h8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>Promise.resolve().then((function(){return m8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>Promise.resolve().then((function(){return f8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>Promise.resolve().then((function(){return _8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>Promise.resolve().then((function(){return b8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>Promise.resolve().then((function(){return C8}))}),GH({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>Promise.resolve().then((function(){return C8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>Promise.resolve().then((function(){return y8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>Promise.resolve().then((function(){return x8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>Promise.resolve().then((function(){return E8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>Promise.resolve().then((function(){return k8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>Promise.resolve().then((function(){return D8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>Promise.resolve().then((function(){return L8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>Promise.resolve().then((function(){return N8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>Promise.resolve().then((function(){return T8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>Promise.resolve().then((function(){return R8}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>Promise.resolve().then((function(){return n6})).then((e=>e.TagAutoInterpolationDollar))}),GH({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>Promise.resolve().then((function(){return n6})).then((e=>e.TagAngleInterpolationDollar))}),GH({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>Promise.resolve().then((function(){return n6})).then((e=>e.TagBracketInterpolationDollar))}),GH({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>Promise.resolve().then((function(){return n6})).then((e=>e.TagAngleInterpolationBracket))}),GH({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>Promise.resolve().then((function(){return n6})).then((e=>e.TagBracketInterpolationBracket))}),GH({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>Promise.resolve().then((function(){return n6})).then((e=>e.TagAutoInterpolationDollar))}),GH({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>Promise.resolve().then((function(){return n6})).then((e=>e.TagAutoInterpolationBracket))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>Promise.resolve().then((function(){return o6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>Promise.resolve().then((function(){return s6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>Promise.resolve().then((function(){return g6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>Promise.resolve().then((function(){return p6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({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:()=>Promise.resolve().then((function(){return v6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>Promise.resolve().then((function(){return y6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>Promise.resolve().then((function(){return S6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>Promise.resolve().then((function(){return O6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>Promise.resolve().then((function(){return F6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>Promise.resolve().then((function(){return z6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>Promise.resolve().then((function(){return H6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>Promise.resolve().then((function(){return U6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>Promise.resolve().then((function(){return Q6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>Promise.resolve().then((function(){return X6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>Promise.resolve().then((function(){return Z6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>Promise.resolve().then((function(){return t9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>Promise.resolve().then((function(){return n9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>Promise.resolve().then((function(){return o9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>Promise.resolve().then((function(){return s9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>Promise.resolve().then((function(){return r9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>Promise.resolve().then((function(){return l9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>Promise.resolve().then((function(){return c9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:()=>Promise.resolve().then((function(){return d9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>Promise.resolve().then((function(){return h9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>Promise.resolve().then((function(){return g9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"pla",extensions:[".pla"],loader:()=>Promise.resolve().then((function(){return p9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>Promise.resolve().then((function(){return m9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>Promise.resolve().then((function(){return f9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>Promise.resolve().then((function(){return A9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>Promise.resolve().then((function(){return C9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>Promise.resolve().then((function(){return v9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>Promise.resolve().then((function(){return I9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>Promise.resolve().then((function(){return L9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>Promise.resolve().then((function(){return N9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>Promise.resolve().then((function(){return z9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>Promise.resolve().then((function(){return V9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>Promise.resolve().then((function(){return H9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>Promise.resolve().then((function(){return U9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>Promise.resolve().then((function(){return j9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>Promise.resolve().then((function(){return G9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>Promise.resolve().then((function(){return Y9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({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:()=>Promise.resolve().then((function(){return q9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>Promise.resolve().then((function(){return J9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>Promise.resolve().then((function(){return Z9}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>Promise.resolve().then((function(){return e7}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>Promise.resolve().then((function(){return t7}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>Promise.resolve().then((function(){return i7}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>Promise.resolve().then((function(){return n7}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>Promise.resolve().then((function(){return o7}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:()=>Promise.resolve().then((function(){return r7}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>Promise.resolve().then((function(){return a7}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>Promise.resolve().then((function(){return c7}))}),GH({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>Promise.resolve().then((function(){return c7}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>Promise.resolve().then((function(){return d7}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>Promise.resolve().then((function(){return h7}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>Promise.resolve().then((function(){return M6}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>Promise.resolve().then((function(){return g7}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\Promise.resolve().then((function(){return w7}))}), /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ GH({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>Promise.resolve().then((function(){return C7}))}); /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ var YH=Object.defineProperty,$H=Object.getOwnPropertyDescriptor,qH=Object.getOwnPropertyNames,JH=Object.prototype.hasOwnProperty,XH={};((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of qH(t))JH.call(e,o)||!i&&"default"===o||YH(e,o,{get:()=>t[o],enumerable:!(n=$H(t,o))||n.enumerable})})(XH,PH);var ZH=class{_onDidChange=new XH.Emitter;_options;_modeConfiguration;_languageId;constructor(e,t,i){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)}},eW={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}},tW={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},iW=new ZH("css",eW,tW),nW=new ZH("scss",eW,tW),oW=new ZH("less",eW,tW);function sW(){return Promise.resolve().then((function(){return Jte}))}XH.languages.css={cssDefaults:iW,lessDefaults:oW,scssDefaults:nW},XH.languages.onLanguage("less",(()=>{sW().then((e=>e.setupMode(oW)))})),XH.languages.onLanguage("scss",(()=>{sW().then((e=>e.setupMode(nW)))})),XH.languages.onLanguage("css",(()=>{sW().then((e=>e.setupMode(iW)))})); /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ var rW=Object.defineProperty,aW=Object.getOwnPropertyDescriptor,lW=Object.getOwnPropertyNames,cW=Object.prototype.hasOwnProperty,dW={};((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of lW(t))cW.call(e,o)||!i&&"default"===o||rW(e,o,{get:()=>t[o],enumerable:!(n=aW(t,o))||n.enumerable})})(dW,PH);var hW=class{_onDidChange=new dW.Emitter;_options;_modeConfiguration;_languageId;constructor(e,t,i){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)}},uW={format:{tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},suggest:{},data:{useDefaultDataProvider:!0}};function gW(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===pW,documentFormattingEdits:e===pW,documentRangeFormattingEdits:e===pW}}var pW="html",mW="handlebars",fW="razor",_W=yW(pW,uW,gW(pW)),AW=_W.defaults,bW=yW(mW,uW,gW(mW)),wW=bW.defaults,CW=yW(fW,uW,gW(fW)),vW=CW.defaults;function yW(e,t=uW,i=gW(e)){const n=new hW(e,t,i);let o;const s=dW.languages.onLanguage(e,(async()=>{o=(await Promise.resolve().then((function(){return One}))).setupMode(n)}));return{defaults:n,dispose(){s.dispose(),o?.dispose(),o=void 0}}} /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/dW.languages.html={htmlDefaults:AW,razorDefaults:vW,handlebarDefaults:wW,htmlLanguageService:_W,handlebarLanguageService:bW,razorLanguageService:CW,registerHTMLLanguageService:yW};var xW=Object.defineProperty,SW=Object.getOwnPropertyDescriptor,EW=Object.getOwnPropertyNames,kW=Object.prototype.hasOwnProperty,DW={};((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of EW(t))kW.call(e,o)||!i&&"default"===o||xW(e,o,{get:()=>t[o],enumerable:!(n=SW(t,o))||n.enumerable})})(DW,PH);var IW=new class{_onDidChange=new DW.Emitter;_diagnosticsOptions;_modeConfiguration;_languageId;constructor(e,t,i){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)}}("json",{validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},{documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0});DW.languages.json={jsonDefaults:IW},DW.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),DW.languages.onLanguage("json",(()=>{Promise.resolve().then((function(){return Vse})).then((e=>e.setupMode(IW)))})); /*!----------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0) * Released under the MIT license * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt *-----------------------------------------------------------------------------*/ var LW=Object.defineProperty,NW=Object.getOwnPropertyDescriptor,TW=Object.getOwnPropertyNames,MW=Object.prototype.hasOwnProperty,RW={};((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of TW(t))MW.call(e,o)||!i&&"default"===o||LW(e,o,{get:()=>t[o],enumerable:!(n=NW(t,o))||n.enumerable})})(RW,PH);var BW=(e=>(e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=99]="ESNext",e))(BW||{}),OW=(e=>(e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative",e[e.ReactJSX=4]="ReactJSX",e[e.ReactJSXDev=5]="ReactJSXDev",e))(OW||{}),FW=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(FW||{}),PW=(e=>(e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(PW||{}),zW=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e))(zW||{}),VW=class{_onDidChange=new RW.Emitter;_onDidExtraLibsChange=new RW.Emitter;_extraLibs;_removedExtraLibs;_eagerModelSync;_compilerOptions;_diagnosticsOptions;_workerOptions;_onDidExtraLibsChangeTimeout;_inlayHintsOptions;constructor(e,t,i,n){this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(i=void 0===t?`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let n=1;return this._removedExtraLibs[i]&&(n=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(n=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:n},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let e=this._extraLibs[i];e&&e.version===n&&(delete this._extraLibs[i],this._removedExtraLibs[i]=n,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(const e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(const t of e){const e=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=t.content;let n=1;this._removedExtraLibs[e]&&(n=this._removedExtraLibs[e]+1),this._extraLibs[e]={content:i,version:n}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){-1===this._onDidExtraLibsChangeTimeout&&(this._onDidExtraLibsChangeTimeout=window.setTimeout((()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)}),0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}},HW=new VW({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{}),WW=new VW({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{});function UW(){return Promise.resolve().then((function(){return bre}))}RW.languages.typescript={ModuleKind:BW,JsxEmit:OW,NewLineKind:FW,ScriptTarget:PW,ModuleResolutionKind:zW,typescriptVersion:"4.5.5",typescriptDefaults:HW,javascriptDefaults:WW,getTypeScriptWorker:()=>UW().then((e=>e.getTypeScriptWorker())),getJavaScriptWorker:()=>UW().then((e=>e.getJavaScriptWorker()))},RW.languages.onLanguage("typescript",(()=>UW().then((e=>e.setupTypeScript(HW))))),RW.languages.onLanguage("javascript",(()=>UW().then((e=>e.setupJavaScript(WW)))));Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .selection-anchor {\n\tbackground-color: #007ACC;\n\twidth: 2px !important;\n}\n",{});var QW=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},jW=function(e,t){return function(i,n){t(i,n,e)}},KW=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const GW=new xg("selectionAnchorSet",!1);let YW=class t{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=GW.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}static get(e){return e.getContribution(t.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const t=this.editor.getPosition(),i=this.decorationId?[this.decorationId]:[],n=this.editor.deltaDecorations(i,[{range:Yi.fromPositions(t,t),options:{description:"selection-anchor",stickiness:1,hoverMessage:(new vR).appendText(e(0,"Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=n[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),Uu(e(0,"Anchor set at {0}:{1}",t.lineNumber,t.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(Yi.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};YW.ID="editor.contrib.selectionAnchorController",YW=QW([jW(1,Sg)],YW);dp(YW.ID,YW),ap(class extends np{constructor(){super({id:"editor.action.setSelectionAnchor",label:e(0,"Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:vx.editorTextFocus,primary:ni(2089,2080),weight:100}})}run(e,t){var i;return KW(this,void 0,void 0,(function*(){null===(i=YW.get(t))||void 0===i||i.setSelectionAnchor()}))}}),ap(class extends np{constructor(){super({id:"editor.action.goToSelectionAnchor",label:e(0,"Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:GW})}run(e,t){var i;return KW(this,void 0,void 0,(function*(){null===(i=YW.get(t))||void 0===i||i.goToSelectionAnchor()}))}}),ap(class extends np{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:e(0,"Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:GW,kbOpts:{kbExpr:vx.editorTextFocus,primary:ni(2089,2089),weight:100}})}run(e,t){var i;return KW(this,void 0,void 0,(function*(){null===(i=YW.get(t))||void 0===i||i.selectFromAnchorToCursor()}))}}),ap(class extends np{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:e(0,"Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:GW,kbOpts:{kbExpr:vx.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return KW(this,void 0,void 0,(function*(){null===(i=YW.get(t))||void 0===i||i.cancelSelectionAnchor()}))}});Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .bracket-match {\n\tbox-sizing: border-box;\n}\n",{});const $W=Jp("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},e(0,"Overview ruler marker color for matching brackets."));class qW{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class JW extends Lt{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new An((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(64),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(64)&&(this._matchBrackets=this._editor.getOption(64),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))),this._register(e.onDidBlurEditorWidget((()=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidFocusEditorWidget((()=>{this._updateBracketsSoon.schedule()})))}static get(e){return e.getContribution(JW.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map((t=>{const i=t.getStartPosition(),n=e.bracketPairs.matchBracket(i);let o=null;if(n)n[0].containsPosition(i)?o=n[1].getStartPosition():n[1].containsPosition(i)&&(o=n[0].getStartPosition());else{const t=e.bracketPairs.findEnclosingBrackets(i);if(t)o=t[0].getStartPosition();else{const t=e.bracketPairs.findNextBracket(i);t&&t.range&&(o=t.range.getStartPosition())}}return o?new Yi(o.lineNumber,o.column,o.lineNumber,o.column):new Yi(i.lineNumber,i.column,i.lineNumber,i.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 o=n.getStartPosition();let s=t.bracketPairs.matchBracket(o);if(!s&&(s=t.bracketPairs.findEnclosingBrackets(o),!s)){const e=t.bracketPairs.findNextBracket(o);e&&e.range&&(s=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let r=null,a=null;if(s){s.sort(Gi.compareRangesUsingStarts);const[t,i]=s;if(r=e?t.getStartPosition():t.getEndPosition(),a=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(o)){const e=r;r=a,a=e}}r&&a&&i.push(new Yi(r.lineNumber,r.column,a.lineNumber,a.column))})),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();let e=[],t=0;for(const i of this._lastBracketsData){let n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations=this._editor.deltaDecorations(this._decorations,e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);let o=[],s=0;for(let t=0,i=e.length;t1&&o.sort(Ki.compare);let r=[],a=0,l=0,c=n.length;for(let e=0,i=o.length;e{const i=e.getColor(Mb);i&&t.addRule(`.monaco-editor .bracket-match { background-color: ${i}; }`);const n=e.getColor(Rb);n&&t.addRule(`.monaco-editor .bracket-match { border: 1px solid ${n}; }`)})),Kg.appendMenuItem(Qg.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:e(0,"Go to &&Bracket")},order:2});class XW{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,o=this._selection.endColumn;if((!this._isMovingLeft||1!==n)&&(this._isMovingLeft||o!==e.getLineMaxColumn(i)))if(this._isMovingLeft){const s=new Gi(i,n-1,i,n),r=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new Gi(i,o,i,o),r)}else{const s=new Gi(i,o,i,o+1),r=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new Gi(i,n,i,n),r)}}computeCursorState(e,t){return this._isMovingLeft?new Yi(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new Yi(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class ZW extends np{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const e of n)i.push(new XW(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}ap(class extends ZW{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:e(0,"Move Selected Text Left"),alias:"Move Selected Text Left",precondition:vx.writable})}}),ap(class extends ZW{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:e(0,"Move Selected Text Right"),alias:"Move Selected Text Right",precondition:vx.writable})}});ap(class extends np{constructor(){super({id:"editor.action.transposeLetters",label:e(0,"Transpose Letters"),alias:"Transpose Letters",precondition:vx.writable,kbOpts:{kbExpr:vx.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],o=t.getSelections();for(let e of o){if(!e.isEmpty())continue;let t=e.startLineNumber,o=e.startColumn,s=i.getLineMaxColumn(t);if(1===t&&(1===o||2===o&&2===s))continue;let r=o===s?e.getPosition():sx.rightPosition(i,e.getPosition().lineNumber,e.getPosition().column),a=sx.leftPosition(i,r),l=sx.leftPosition(i,a),c=i.getValueInRange(Gi.fromPositions(l,a)),d=i.getValueInRange(Gi.fromPositions(a,r)),h=Gi.fromPositions(l,r);n.push(new Zy(h,d+c))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}});var eU=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const tU="9_cutcopypaste",iU=b||document.queryCommandSupported("cut"),nU=b||document.queryCommandSupported("copy"),oU=void 0!==navigator.clipboard&&!Yr||document.queryCommandSupported("paste");function sU(e){return e.register(),e}const rU=iU?sU(new ep({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:b?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:Qg.MenubarEditMenu,group:"2_ccp",title:e(0,"Cu&&t"),order:1},{menuId:Qg.EditorContext,group:tU,title:e(0,"Cut"),when:vx.writable,order:1},{menuId:Qg.CommandPalette,group:"",title:e(0,"Cut"),order:1},{menuId:Qg.SimpleEditorContext,group:tU,title:e(0,"Cut"),when:vx.writable,order:1}]})):void 0,aU=nU?sU(new ep({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:b?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:Qg.MenubarEditMenu,group:"2_ccp",title:e(0,"&&Copy"),order:2},{menuId:Qg.EditorContext,group:tU,title:e(0,"Copy"),order:2},{menuId:Qg.CommandPalette,group:"",title:e(0,"Copy"),order:1},{menuId:Qg.SimpleEditorContext,group:tU,title:e(0,"Copy"),order:2}]})):void 0;Kg.appendMenuItem(Qg.MenubarEditMenu,{submenu:Qg.MenubarCopy,title:{value:e(0,"Copy As"),original:"Copy As"},group:"2_ccp",order:3}),Kg.appendMenuItem(Qg.EditorContext,{submenu:Qg.EditorContextCopy,title:{value:e(0,"Copy As"),original:"Copy As"},group:tU,order:3});const lU=oU?sU(new ep({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:b?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:Qg.MenubarEditMenu,group:"2_ccp",title:e(0,"&&Paste"),order:4},{menuId:Qg.EditorContext,group:tU,title:e(0,"Paste"),when:vx.writable,order:4},{menuId:Qg.CommandPalette,group:"",title:e(0,"Paste"),order:1},{menuId:Qg.SimpleEditorContext,group:tU,title:e(0,"Paste"),when:vx.writable,order:4}]})):void 0;class cU extends np{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:e(0,"Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:vx.textInputFocus,primary:0,weight:100}})}run(e,t){if(!t.hasModel())return;!t.getOption(32)&&t.getSelection().isEmpty()||(lb.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),lb.forceCopyWithSyntaxHighlighting=!1)}}function dU(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(Aa).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(32),i=n.getSelection();return i&&i.isEmpty()&&!e||document.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>(document.execCommand(t),!0))))}dU(rU,"cut"),dU(aU,"copy"),lU&&(lU.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(Aa),n=e.get(hI),o=i.getFocusedCodeEditor();if(o&&o.hasTextFocus()){return!(!document.execCommand("paste")&&w)||eU(void 0,void 0,void 0,(function*(){const e=yield n.readText();if(""!==e){const t=cb.INSTANCE.get(e);let i=!1,n=null,s=null;t&&(i=o.getOption(32)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,s=t.mode),o.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:s})}}))}return!1})),lU.addImplementation(0,"generic-dom",((e,t)=>(document.execCommand("paste"),!0)))),nU&&ap(cU);class hU{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+hU.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new hU(this.value+hU.sep+e)}}function uU(e,t,i){return!!t.contains(e)&&(!i||!t.contains(i))}hU.sep=".",hU.None=new hU("@@none@@"),hU.Empty=new hU(""),hU.QuickFix=new hU("quickfix"),hU.Refactor=new hU("refactor"),hU.Source=new hU("source"),hU.SourceOrganizeImports=hU.Source.append("organizeImports"),hU.SourceFixAll=hU.Source.append("fixAll");class gU{constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}static fromUser(e,t){return e&&"object"==typeof e?new gU(gU.getKindFromUser(e,t.kind),gU.getApplyFromUser(e,t.apply),gU.getPreferredUser(e)):new gU(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new hU(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}}var pU=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const mU="editor.action.codeAction",fU="editor.action.refactor",_U="editor.action.sourceAction",AU="editor.action.organizeImports",bU="editor.action.fixAll";class wU{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return pU(this,void 0,void 0,(function*(){if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=yield this.provider.resolveCodeAction(this.action,e)}catch(e){pt(e)}t&&(this.action.edit=t.edit)}return this}))}}class CU extends Lt{constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(CU.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:G(e.diagnostics)?G(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:G(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&hU.QuickFix.contains(new hU(e.kind))&&!!e.isPreferred))}}const vU={actions:[],documentation:void 0};function yU(e,t,i,n,o){var s;const r=i.filter||{},a={only:null===(s=r.include)||void 0===s?void 0:s.value,trigger:i.type},l=new aH(e,o),c=function(e,t){return Qs.all(e).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>function(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((i=>uU(t,i,e.include)))||!e.includeSourceActions&&hU.Source.contains(t))}(t,new hU(e))))))}(e,r),d=new It,h=c.map((i=>pU(this,void 0,void 0,(function*(){try{n.report(i);const o=yield i.provideCodeActions(e,t,a,l.token);if(o&&d.add(o),l.token.isCancellationRequested)return vU;const s=((null==o?void 0:o.actions)||[]).filter((e=>e&&function(e,t){const i=t.kind?new hU(t.kind):void 0;return!(!(!e.include||i&&e.include.contains(i))||e.excludes&&i&&e.excludes.some((t=>uU(i,t,e.include)))||!e.includeSourceActions&&i&&hU.Source.contains(i)||e.onlyIncludePreferredActions&&!t.isPreferred)}(r,e))),c=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new hU(e.kind),command:e.command})));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(const e of t)if(e.kind)for(const t of n)if(t.kind.contains(new hU(e.kind)))return t.command;return}(i,s,r.include);return{actions:s.map((e=>new wU(e,i))),documentation:c}}catch(e){if(_t(e))throw e;return pt(e),vU}})))),u=Qs.onDidChange((()=>{V(Qs.all(e),c)||l.cancel()}));return Promise.all(h).then((e=>{const t=q(e.map((e=>e.actions))),i=j(e.map((e=>e.documentation)));return new CU(t,i,d)})).finally((()=>{u.dispose(),l.dispose()}))}tg.registerCommand("_executeCodeActionProvider",(function(e,t,i,n,o){return pU(this,void 0,void 0,(function*(){if(!(t instanceof Bi))throw wt();const s=e.get(Pl).getModel(t);if(!s)throw wt();const r=Yi.isISelection(i)?Yi.liftSelection(i):Gi.isIRange(i)?s.validateRange(i):void 0;if(!r)throw wt();const a="string"==typeof n?new hU(n):void 0,l=yield yU(s,r,{type:1,filter:{includeSourceActions:!0,include:a}},uI.None,jt.None),c=[],d=Math.min(l.validActions.length,"number"==typeof o?o:0);for(let e=0;ee.action))}finally{setTimeout((()=>l.dispose()),100)}}))}));Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .monaco-editor-overlaymessage {\n\tpadding-bottom: 8px;\n\tz-index: 10000;\n}\n\n.monaco-editor .monaco-editor-overlaymessage.below {\n\tpadding-bottom: 0;\n\tpadding-top: 8px;\n\tz-index: 10000;\n}\n\n@keyframes fadeIn {\n\tfrom { opacity: 0; }\n\tto { opacity: 1; }\n}\n.monaco-editor .monaco-editor-overlaymessage.fadeIn {\n\tanimation: fadeIn 150ms ease-out;\n}\n\n@keyframes fadeOut {\n\tfrom { opacity: 1; }\n\tto { opacity: 0; }\n}\n.monaco-editor .monaco-editor-overlaymessage.fadeOut {\n\tanimation: fadeOut 100ms ease-out;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .message {\n\tpadding: 1px 4px;\n\tcolor: var(--vscode-inputValidation-infoForeground);\n\tbackground-color: var(--vscode-inputValidation-infoBackground);\n\tborder: 1px solid var(--vscode-inputValidation-infoBorder);\n}\n\n.monaco-editor.hc-black .monaco-editor-overlaymessage .message {\n\tborder-width: 2px;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .anchor {\n\twidth: 0 !important;\n\theight: 0 !important;\n\tborder-color: transparent;\n\tborder-style: solid;\n\tz-index: 1000;\n\tborder-width: 8px;\n\tposition: absolute;\n}\n\n.monaco-editor .monaco-editor-overlaymessage .anchor.top {\n\tborder-bottom-color: var(--vscode-inputValidation-infoBorder);\n}\n\n.monaco-editor .monaco-editor-overlaymessage .anchor.below {\n\tborder-top-color: var(--vscode-inputValidation-infoBorder);\n}\n\n.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.below {\n\tdisplay: none;\n}\n\n.monaco-editor .monaco-editor-overlaymessage.below .anchor.top {\n\tdisplay: inherit;\n\ttop: -8px;\n}\n",{});var xU=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},SU=function(e,t){return function(i,n){t(i,n,e)}};let EU=class t{constructor(e,i){this._messageWidget=new Nt,this._messageListeners=new It,this._editor=e,this._visible=t.MESSAGE_VISIBLE.bindTo(i),this._editorListener=this._editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit()))}static get(e){return e.getContribution(t.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;Uu(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new kU(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeCursorPosition((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidDispose((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeModel((()=>this.closeMessage()))),this._messageListeners.add(new fn((()=>this.closeMessage()),3e3)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new Gi(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(kU.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(e(0,"Cannot edit in read-only editor"),this._editor.getPosition())}};EU.ID="editor.contrib.messageController",EU.MESSAGE_VISIBLE=new xg("messageVisible",!1,e(0,"Whether the editor is currently showing an inline message")),EU=xU([SU(1,Sg)],EU);rp(new(ip.bindToContribution(EU.get))({id:"leaveEditorMessage",precondition:EU.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class kU{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-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const s=document.createElement("div");s.classList.add("message"),s.textContent=n,this._domNode.appendChild(s);const r=document.createElement("div");r.classList.add("anchor","below"),this._domNode.appendChild(r),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(e){let t;const i=()=>{e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",i)};return t=setTimeout(i,110),e.getDomNode().addEventListener("animationend",i),e.getDomNode().classList.add("fadeOut"),{dispose:i}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(e){this._domNode.classList.toggle("below",2===e)}}dp(EU.ID,EU);var DU=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},IU=function(e,t){return function(i,n){t(i,n,e)}},LU=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class NU extends $u{constructor(e,t){super(e.command?e.command.id:e.title,e.title.replace(/\r\n|\r|\n/g," "),void 0,!e.disabled,t),this.action=e}}let TU=class extends Lt{constructor(e,t,i,n){super(),this._editor=e,this._delegate=t,this._contextMenuService=i,this._visible=!1,this._showingActions=this._register(new Nt),this._keybindingResolver=new MU({getKeybindings:()=>n.getKeybindings()})}get isVisible(){return this._visible}show(e,t,i,n){return LU(this,void 0,void 0,(function*(){const o=n.includeDisabledActions?t.allActions:t.validActions;if(!o.length)return void(this._visible=!1);if(!this._editor.getDomNode())throw this._visible=!1,bt();this._visible=!0,this._showingActions.value=t;const s=this.getMenuActions(e,o,t.documentation),r=Ki.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},a=this._keybindingResolver.getResolver(),l=this._editor.getOption(115);this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>r,getActions:()=>s,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:e=>e instanceof NU?a(e.action):void 0})}))}getMenuActions(e,t,i){var n,o;const s=e=>new NU(e.action,(()=>this._delegate.onSelectCodeAction(e))),r=t.map(s),a=[...i],l=this._editor.getModel();if(l&&r.length)for(const i of Qs.all(l))i._getAdditionalMenuItems&&a.push(...i._getAdditionalMenuItems({trigger:e.type,only:null===(o=null===(n=e.filter)||void 0===n?void 0:n.include)||void 0===o?void 0:o.value},t.map((e=>e.action))));return a.length&&r.push(new Ju,...a.map((e=>s(new wU({title:e.title,command:e},void 0))))),r}_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=tu(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}};TU=DU([IU(2,lI),IU(3,BL)],TU);class MU{constructor(e){this._keybindingProvider=e}getResolver(){const e=new En((()=>this._keybindingProvider.getKeybindings().filter((e=>MU.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===AU?t={kind:hU.SourceOrganizeImports.value}:e.command===bU&&(t={kind:hU.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},gU.fromUser(t,{kind:hU.None,apply:"never"}))}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.getValue());return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new hU(e.kind);return t.filter((e=>e.kind.contains(i))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}}MU.codeActionCommands=[fU,mU,_U,AU,bU];Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .contentWidgets .codicon-light-bulb,\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.monaco-editor .contentWidgets .codicon-light-bulb:hover,\n.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover {\n\tcursor: pointer;\n}\n",{});var RU,BU=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},OU=function(e,t){return function(i,n){t(i,n,e)}};!function(e){e.Hidden={type:0};e.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}}(RU||(RU={}));let FU=class t extends Lt{constructor(e,t,i,n){var o,s,r;super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=n,this._onClick=this._register(new zt),this.onClick=this._onClick.event,this._state=RU.Hidden,this._domNode=document.createElement("div"),this._domNode.className=ys.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()}))),Pp.ignoreTarget(this._domNode),this._register((o=this._domNode,s=e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=tu(this._domNode),n=this._editor.getOption(59);let o=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{if(1&~e.buttons)return;this.hide();const t=new Vp;t.startMonitoring(e.target,e.buttons,zp,(()=>{}),(()=>{t.dispose()}))}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(57)&&!this._editor.getOption(57).enabled&&this.hide()}))),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(e,i,n){if(e.validActions.length<=0)return this.hide();const o=this._editor.getOptions();if(!o.get(57).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:r,column:a}=s.validatePosition(n),l=s.getOptions().tabSize,c=o.get(44),d=GC(s.getLineContent(r),l),h=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let u=r;if(!(c.spaceWidth*d>22))if(r>1&&!h(r-1))u-=1;else if(h(r+1)){if(a*c.spaceWidth<22)return this.hide()}else u+=1;this.state=new RU.Showing(e,i,n,{position:{lineNumber:u,column:1},preference:t._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=RU.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(1===this.state.type&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...ys.lightBulb.classNamesArray),this._domNode.classList.add(...ys.lightbulbAutofix.classNamesArray);const t=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(t)return void(this.title=e(0,"Show Code Actions. Preferred Quick Fix Available ({0})",t.getLabel()))}this._domNode.classList.remove(...ys.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...ys.lightBulb.classNamesArray);const t=this._keybindingService.lookupKeybinding(this._quickFixActionId);this.title=t?e(0,"Show Code Actions ({0})",t.getLabel()):e(0,"Show Code Actions")}set title(e){this._domNode.title=e}};FU._posPref=[0],FU=BU([OU(3,BL)],FU),zg(((e,t)=>{var i;const n=null===(i=e.getColor(Ym))||void 0===i?void 0:i.transparent(.7),o=e.getColor(Mf);o&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${ys.lightBulb.cssSelector} {\n\t\t\tcolor: ${o};\n\t\t\tbackground-color: ${n};\n\t\t}`);const s=e.getColor(Rf);s&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${ys.lightbulbAutofix.cssSelector} {\n\t\t\tcolor: ${s};\n\t\t\tbackground-color: ${n};\n\t\t}`)}));var PU,zU=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},VU=function(e,t){return function(i,n){t(i,n,e)}},HU=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},WU=function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,i):o?o.value=i:t.set(e,i),i},UU=function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)};let QU=class extends Lt{constructor(e,t,i,n,o){super(),this._editor=e,this.delegate=n,this._activeCodeActions=this._register(new Nt),PU.set(this,!1),this._codeActionWidget=new En((()=>this._register(o.createInstance(TU,this._editor,{onSelectCodeAction:e=>HU(this,void 0,void 0,(function*(){this.delegate.applyCodeAction(e,!0)}))})))),this._lightBulbWidget=new En((()=>{const e=this._register(o.createInstance(FU,this._editor,t,i));return this._register(e.onClick((e=>this.showCodeActionList(e.trigger,e.actions,e,{includeDisabledActions:!1})))),e}))}dispose(){WU(this,PU,!0,"f"),super.dispose()}update(e){var t,i,n,o,s;return HU(this,void 0,void 0,(function*(){if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let r;try{r=yield e.actions}catch(e){return void gt(e)}if(!UU(this,PU,"f"))if(this._lightBulbWidget.getValue().update(r,e.trigger,e.position),1===e.trigger.type){if(null===(i=e.trigger.filter)||void 0===i?void 0:i.include){const t=this.tryGetValidActionToApply(e.trigger,r);if(t){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(t,!1)}finally{r.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,r);if(t&&t.action.disabled)return null===(n=EU.get(this._editor))||void 0===n||n.showMessage(t.action.disabled,e.trigger.context.position),void r.dispose()}}const t=!!(null===(o=e.trigger.filter)||void 0===o?void 0:o.include);if(e.trigger.context&&(!r.allActions.length||!t&&!r.validActions.length))return null===(s=EU.get(this._editor))||void 0===s||s.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=r,void r.dispose();this._activeCodeActions.value=r,this._codeActionWidget.getValue().show(e.trigger,r,e.position,{includeDisabledActions:t})}else this._codeActionWidget.getValue().isVisible?r.dispose():this._activeCodeActions.value=r}))}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}showCodeActionList(e,t,i,n){return HU(this,void 0,void 0,(function*(){this._codeActionWidget.getValue().show(e,t,i,n)}))}};PU=new WeakMap,QU=zU([VU(4,fa)],QU);var jU,KU=function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)},GU=function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,i):o?o.value=i:t.set(e,i),i};const YU=new xg("supportedCodeAction","");class $U extends Lt{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new fn),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._onCursorChange())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>kC(e,t.uri)))&&this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_getRangeOfMarker(e){const t=this._editor.getModel();if(t)for(const i of this._markerService.read({resource:t.uri})){const n=t.validateRange(i);if(Gi.intersectRanges(n,e))return Gi.lift(n)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&2===e.type){const{lineNumber:e,column:n}=i.getPosition(),o=t.getLineContent(e);if(0===o.length)return;if(1===n){if(/\s/.test(o[0]))return}else if(n===t.getLineMaxColumn(e)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[n-2])&&/\s/.test(o[n-1]))return}return i}_createEventAndSignalChange(e,t){const i=this._editor.getModel();if(!t||!i)return void this._signalChange(void 0);const n=this._getRangeOfMarker(t),o=n?n.getStartPosition():t.getStartPosition(),s={trigger:e,selection:t,position:o};return this._signalChange(s),s}}var qU;!function(e){e.Empty={type:0};e.Triggered=class{constructor(e,t,i,n){this.trigger=e,this.rangeOrSelection=t,this.position=i,this._cancellablePromise=n,this.type=1,this.actions=n.catch((e=>{if(_t(e))return JU;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(qU||(qU={}));const JU={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class XU extends Lt{constructor(e,t,i,n){super(),this._editor=e,this._markerService=t,this._progressService=n,this._codeActionOracle=this._register(new Nt),this._state=qU.Empty,this._onDidChangeState=this._register(new zt),this.onDidChangeState=this._onDidChangeState.event,jU.set(this,!1),this._supportedCodeActions=YU.bindTo(i),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(Qs.onDidChange((()=>this._update()))),this._update()}dispose(){KU(this,jU,"f")||(GU(this,jU,!0,"f"),super.dispose(),this.setState(qU.Empty,!0))}_update(){if(KU(this,jU,"f"))return;this._codeActionOracle.value=void 0,this.setState(qU.Empty);const e=this._editor.getModel();if(e&&Qs.has(e)&&!this._editor.getOption(81)){const t=[];for(const i of Qs.all(e))Array.isArray(i.providedCodeActionKinds)&&t.push(...i.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new $U(this._editor,this._markerService,(t=>{var i;if(!t)return void this.setState(qU.Empty);const n=an((i=>yU(e,t.selection,t.trigger,uI.None,i)));1===t.trigger.type&&(null===(i=this._progressService)||void 0===i||i.showWhile(n,250)),this.setState(new qU.Triggered(t.trigger,t.selection,t.position,n))}),void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||KU(this,jU,"f")||this._onDidChangeState.fire(e))}}jU=new WeakMap;var ZU=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},eQ=function(e,t){return function(i,n){t(i,n,e)}},tQ=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function iQ(e){return og.regex(YU.keys()[0],new RegExp("(\\s|^)"+Nn(e.value)+"\\b"))}const nQ={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:e(0,"Kind of the code action to run.")},apply:{type:"string",description:e(0,"Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[e(0,"Always apply the first returned code action."),e(0,"Apply the first returned code action if it is the only one."),e(0,"Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:e(0,"Controls if only preferred code actions should be returned.")}}};let oQ=class e extends Lt{constructor(e,t,i,n,o){super(),this._instantiationService=o,this._editor=e,this._model=this._register(new XU(this._editor,t,i,n)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._ui=new En((()=>this._register(new QU(e,aQ.Id,lQ.Id,{applyCodeAction:(e,t)=>tQ(this,void 0,void 0,(function*(){try{yield this._applyCodeAction(e)}finally{t&&this._trigger({type:2,filter:{}})}}))},this._instantiationService))))}static get(t){return t.getContribution(e.ID)}update(e){this._ui.getValue().update(e)}showCodeActions(e,t,i){return this._ui.getValue().showCodeActionList(e,t,i,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(e,t,i){var n;if(!this._editor.hasModel())return;null===(n=EU.get(this._editor))||void 0===n||n.closeMessage();const o=this._editor.getPosition();this._trigger({type:1,filter:t,autoApply:i,context:{notAvailableMessage:e,position:o}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e){return this._instantiationService.invokeFunction(sQ,e,this._editor)}};function sQ(t,i,n){return tQ(this,void 0,void 0,(function*(){const o=t.get(AL),s=t.get(eg),r=t.get(Xg),a=t.get(Vk);if(r.publicLog2("codeAction.applyCodeAction",{codeActionTitle:i.action.title,codeActionKind:i.action.kind,codeActionIsPreferred:!!i.action.isPreferred}),yield i.resolve(jt.None),i.action.edit&&(yield o.apply(bL.convert(i.action.edit),{editor:n,label:i.action.title})),i.action.command)try{yield s.executeCommand(i.action.command.id,...i.action.command.arguments||[])}catch(t){const i=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(t);a.error("string"==typeof i?i:e(0,"An unknown error occurred while applying the code action"))}}))}function rQ(e,t,i,n){if(e.hasModel()){const o=oQ.get(e);o&&o.manualTriggerAtCurrentPosition(t,i,n)}}oQ.ID="editor.contrib.quickFixController",oQ=ZU([eQ(1,tM),eQ(2,Sg),eQ(3,gI),eQ(4,fa)],oQ);class aQ extends np{constructor(){super({id:aQ.Id,label:e(0,"Quick Fix..."),alias:"Quick Fix...",precondition:og.and(vx.writable,vx.hasCodeActionsProvider),kbOpts:{kbExpr:vx.editorTextFocus,primary:2132,weight:100}})}run(t,i){return rQ(i,e(0,"No code actions available"),void 0,void 0)}}aQ.Id="editor.action.quickFix";class lQ extends np{constructor(){super({id:lQ.Id,label:e(0,"Auto Fix..."),alias:"Auto Fix...",precondition:og.and(vx.writable,iQ(hU.QuickFix)),kbOpts:{kbExpr:vx.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(t,i){return rQ(i,e(0,"No auto fixes available"),{include:hU.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}lQ.Id="editor.action.autoFix",dp(oQ.ID,oQ),ap(aQ),ap(class extends np{constructor(){super({id:fU,label:e(0,"Refactor..."),alias:"Refactor...",precondition:og.and(vx.writable,vx.hasCodeActionsProvider),kbOpts:{kbExpr:vx.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:og.and(vx.writable,iQ(hU.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:nQ}]}})}run(t,i,n){const o=gU.fromUser(n,{kind:hU.Refactor,apply:"never"});return rQ(i,"string"==typeof(null==n?void 0:n.kind)?o.preferred?e(0,"No preferred refactorings for '{0}' available",n.kind):e(0,"No refactorings for '{0}' available",n.kind):o.preferred?e(0,"No preferred refactorings available"):e(0,"No refactorings available"),{include:hU.Refactor.contains(o.kind)?o.kind:hU.None,onlyIncludePreferredActions:o.preferred},o.apply)}}),ap(class extends np{constructor(){super({id:_U,label:e(0,"Source Action..."),alias:"Source Action...",precondition:og.and(vx.writable,vx.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:og.and(vx.writable,iQ(hU.Source))},description:{description:"Source Action...",args:[{name:"args",schema:nQ}]}})}run(t,i,n){const o=gU.fromUser(n,{kind:hU.Source,apply:"never"});return rQ(i,"string"==typeof(null==n?void 0:n.kind)?o.preferred?e(0,"No preferred source actions for '{0}' available",n.kind):e(0,"No source actions for '{0}' available",n.kind):o.preferred?e(0,"No preferred source actions available"):e(0,"No source actions available"),{include:hU.Source.contains(o.kind)?o.kind:hU.None,includeSourceActions:!0,onlyIncludePreferredActions:o.preferred},o.apply)}}),ap(class extends np{constructor(){super({id:AU,label:e(0,"Organize Imports"),alias:"Organize Imports",precondition:og.and(vx.writable,iQ(hU.SourceOrganizeImports)),kbOpts:{kbExpr:vx.editorTextFocus,primary:1581,weight:100}})}run(t,i){return rQ(i,e(0,"No organize imports action available"),{include:hU.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}),ap(lQ),ap(class extends np{constructor(){super({id:bU,label:e(0,"Fix All"),alias:"Fix All",precondition:og.and(vx.writable,iQ(hU.SourceFixAll))})}run(t,i){return rQ(i,e(0,"No fix all action available"),{include:hU.SourceFixAll,includeSourceActions:!0},"ifSingle")}}),rp(new class extends ip{constructor(){super({id:mU,precondition:og.and(vx.writable,vx.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:nQ}]}})}runEditorCommand(t,i,n){const o=gU.fromUser(n,{kind:hU.Empty,apply:"ifSingle"});return rQ(i,"string"==typeof(null==n?void 0:n.kind)?o.preferred?e(0,"No preferred code actions for '{0}' available",n.kind):e(0,"No code actions for '{0}' available",n.kind):o.preferred?e(0,"No preferred code actions available"):e(0,"No code actions available"),{include:o.kind,includeSourceActions:!0,onlyIncludePreferredActions:o.preferred},o.apply)}});var cQ=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class dQ{constructor(){this.lenses=[],this._disposables=new It}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})}}function hQ(e,t){return cQ(this,void 0,void 0,(function*(){const i=Ws.ordered(e),n=new Map,o=new dQ,s=i.map(((i,s)=>cQ(this,void 0,void 0,(function*(){n.set(i,s);try{const n=yield Promise.resolve(i.provideCodeLenses(e,t));n&&o.add(n,i)}catch(e){pt(e)}}))));return yield Promise.all(s),o.lenses=o.lenses.sort(((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:n.get(e.provider)n.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0)),o}))}tg.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;fe(Bi.isUri(i)),fe("number"==typeof n||!n);const o=e.get(Pl).getModel(i);if(!o)throw wt();const s=[],r=new It;return hQ(o,jt.None).then((e=>{r.add(e);let t=[];for(const i of e.lenses)null==n||Boolean(i.symbol.command)?s.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(o,i.symbol,jt.None)).then((e=>s.push(e||i.symbol))));return Promise.all(t)})).then((()=>s)).finally((()=>{setTimeout((()=>r.dispose()),100)}))}));var uQ=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},gQ=function(e,t){return function(i,n){t(i,n,e)}};const pQ=_a("ICodeLensCache");class mQ{constructor(e,t){this.lineCount=e,this.data=t}}let fQ=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Vo(20,.75);bn((()=>e.remove("codelens/cache",1)));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i),vt(e.onWillSaveState)((i=>{i.reason===lz.SHUTDOWN&&e.store(t,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>{var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),n=new dQ;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new mQ(e.getLineCount(),n);this._cache.set(e.uri.toString(),o)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const e of i.data.lenses)n.add(e.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 e in t){const i=t[e],n=[];for(const e of i.lines)n.push({range:new Gi(e,1,e,11)});const o=new dQ;o.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new mQ(i.lineCount,o))}}catch(e){}}};fQ=uQ([gQ(0,az)],fQ),wl(pQ,fQ);Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .codelens-decoration {\n\toverflow: hidden;\n\tdisplay: inline-block;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\tcolor: var(--vscode-editorCodeLens-foreground)\n}\n\n.monaco-editor .codelens-decoration > span,\n.monaco-editor .codelens-decoration > a {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\twhite-space: nowrap;\n\tvertical-align: sub;\n}\n\n.monaco-editor .codelens-decoration > a {\n\ttext-decoration: none;\n}\n\n.monaco-editor .codelens-decoration > a:hover {\n\tcursor: pointer;\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n\n.monaco-editor .codelens-decoration > a:hover .codicon {\n\tcolor: var(--vscode-editorLink-activeForeground) !important;\n}\n\n.monaco-editor .codelens-decoration .codicon {\n\tvertical-align: middle;\n\tcolor: currentColor !important;\n\tcolor: var(--vscode-editorCodeLens-foreground);\n}\n\n.monaco-editor .codelens-decoration > a:hover .codicon::before {\n\tcursor: pointer;\n}\n\n@keyframes fadein {\n\t0% { opacity: 0; visibility: visible;}\n\t100% { opacity: 1; }\n}\n\n.monaco-editor .codelens-decoration.fadein {\n\tanimation: fadein 0.1s linear;\n}\n",{});class _Q{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){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return 0!==this._lastHeight&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class AQ{constructor(e,t,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+AQ._idPool++,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${t}`}withCommands(e,t){this._commands.clear();let i=[],n=!1;for(let t=0;t{e.symbol.command&&l.push(e.symbol),n.addDecoration({range:e.symbol.range,options:Oy.EMPTY},(e=>this._decorationIds[t]=e)),a=a?Gi.plusRange(a,e.symbol.range):Gi.lift(e.symbol.range)})),this._viewZone=new _Q(a.startLineNumber-1,s,r),this._viewZoneId=o.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new AQ(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t&&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||Gi.isEmpty(n.range)!==i.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,i)=>{t.addDecoration({range:e.symbol.range,options:Oy.EMPTY},(e=>this._decorationIds[i]=e))}))}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=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},vQ=function(e,t){return function(i,n){t(i,n,e)}},yQ=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let xQ=class{constructor(e,t,i,n,o){this._editor=e,this._commandService=i,this._notificationService=n,this._codeLensCache=o,this._disposables=new It,this._localToDispose=new It,this._lenses=[],this._oldCodeLensModels=new It,this._provideCodeLensDebounce=t.for(Ws,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=t.for(Ws,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new An((()=>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((e=>{(e.hasChanged(44)||e.hasChanged(16)||e.hasChanged(15))&&this._updateLensStyle(),e.hasChanged(14)&&this._onModelChange()}))),this._disposables.add(Ws.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+tc(this._editor.getId()).toString(16),this._styleElement=pu(hu(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose(),this._styleElement.remove()}_getLayoutInfo(){let e,t=this._editor.getOption(16);return!t||t<5?(t=.9*this._editor.getOption(46)|0,e=this._editor.getOption(59)):e=t*Math.max(1.3,this._editor.getOption(59)/this._editor.getOption(46))|0,{codeLensHeight:e,fontSize:t}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(15),n=this._editor.getOption(44),o=`--codelens-font-family${this._styleClassName}`,s=`--codelens-font-features${this._styleClassName}`;let r=`\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(.5*t)}px; font-feature-settings: var(${s}) }\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; }\n\t\t`;i&&(r+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${o}), ${lt.fontFamily}}`),this._styleElement.textContent=r,this._editor.getContainerDomNode().style.setProperty(o,null!=i?i:"inherit"),this._editor.getContainerDomNode().style.setProperty(s,n.fontFeatureSettings),this._editor.changeViewZones((t=>{for(let i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){var e,t,i;null===(e=this._getCodeLensModelPromise)||void 0===e||e.cancel(),this._getCodeLensModelPromise=void 0,null===(t=this._resolveCodeLensesPromise)||void 0===t||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),null===(i=this._currentCodeLensModel)||void 0===i||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(14))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!Ws.has(e))return void(t&&this._localToDispose.add(pn((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4)));for(const t of Ws.all(e))if("function"==typeof t.onDidChange){let e=t.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new An((()=>{var t;const n=Date.now();null===(t=this._getCodeLensModelPromise)||void 0===t||t.cancel(),this._getCodeLensModelPromise=an((t=>hQ(e,t))),this._getCodeLensModelPromise.then((t=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=t,this._codeLensCache.put(e,t);const o=this._provideCodeLensDebounce.update(e,Date.now()-n);i.delay=o,this._renderCodeLensSymbols(t),this._resolveCodeLensesInViewportSoon()}),gt)}),this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add(Dt((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{let i=[],n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));let o=new bQ;i.forEach((e=>{e.dispose(o,t),this._lenses.splice(this._lenses.indexOf(e),1)})),o.commit(e)}))})),i.schedule()}))),this._localToDispose.add(this._editor.onDidFocusEditorWidget((()=>{i.schedule()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(Dt((()=>{if(this._editor.getModel()){const e=MD.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===(null==t?void 0:t.tagName)&&(t=t.parentElement),"A"===(null==t?void 0:t.tagName))for(const e of this._lenses){let i=e.getCommand(t);if(i){this._commandService.executeCommand(i.id,...i.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),i.schedule()}_disposeAllLenses(e,t){const i=new bQ;for(const e of this._lenses)e.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t,i=this._editor.getModel().getLineCount(),n=[];for(let o of e.lenses){let e=o.symbol.range.startLineNumber;e<1||e>i||(t&&t[t.length-1].symbol.range.startLineNumber===e?t.push(o):(t=[o],n.push(t)))}const o=MD.capture(this._editor),s=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=new bQ;let o=0,r=0;for(;rthis._resolveCodeLensesInViewportSoon()))),o++,r++)}for(;othis._resolveCodeLensesInViewportSoon()))),r++;i.commit(e)}))})),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach((e=>{const o=e.computeIfNecessary(t);o&&(i.push(o),n.push(e))})),0===i.length)return;const o=Date.now(),s=an((e=>{const o=i.map(((i,o)=>{const s=new Array(i.length),r=i.map(((i,n)=>i.symbol.command||"function"!=typeof i.provider.resolveCodeLens?(s[n]=i.symbol,Promise.resolve(void 0)):Promise.resolve(i.provider.resolveCodeLens(t,i.symbol,e)).then((e=>{s[n]=e}),pt)));return Promise.all(r).then((()=>{e.isCancellationRequested||n[o].isDisposed()||n[o].updateCommands(s)}))}));return Promise.all(o)}));this._resolveCodeLensesPromise=s,this._resolveCodeLensesPromise.then((()=>{const e=this._resolveCodeLensesDebounce.update(t,Date.now()-o);this._resolveCodeLensesScheduler.delay=e,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{gt(e),s===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}getModel(){return this._currentCodeLensModel}};function SQ(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}xQ.ID="css.editor.codeLens",xQ=CQ([vQ(1,pL),vQ(2,eg),vQ(3,Vk),vQ(4,pQ)],xQ),dp(xQ.ID,xQ),ap(class extends np{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:vx.hasCodeLensProvider,label:e(0,"Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return yQ(this,void 0,void 0,(function*(){if(!t.hasModel())return;const i=e.get(QF),n=e.get(eg),o=e.get(Vk),s=t.getSelection().positionLineNumber,r=t.getContribution(xQ.ID);if(!r)return;const a=r.getModel();if(!a)return;const l=[];for(const e of a.lenses)e.symbol.command&&e.symbol.range.startLineNumber===s&&l.push({label:e.symbol.command.title,command:e.symbol.command});if(0===l.length)return;const c=yield i.pick(l,{canPickMany:!1});if(c){if(a.isDisposed)return yield n.executeCommand(this.id);try{yield n.executeCommand(c.command.id,...c.command.arguments||[])}catch(e){o.error(e)}}}))}}),tg.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof Bi))throw wt();const n=e.get(Pl).getModel(i);if(!n)throw wt();const o=[],s=$s.ordered(n).reverse().map((e=>Promise.resolve(e.provideDocumentColors(n,jt.None)).then((e=>{if(Array.isArray(e))for(let t of e)o.push({range:t.range,color:[t.color.red,t.color.green,t.color.blue,t.color.alpha]})}))));return Promise.all(s).then((()=>o))})),tg.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,n]=t,{uri:o,range:s}=n;if(!(o instanceof Bi&&Array.isArray(i)&&4===i.length&&Gi.isIRange(s)))throw wt();const[r,a,l,c]=i,d=e.get(Pl).getModel(o);if(!d)throw wt();const h={range:s,color:{red:r,green:a,blue:l,alpha:c}},u=[],g=$s.ordered(d).reverse().map((e=>Promise.resolve(e.provideColorPresentations(d,h,jt.None)).then((e=>{Array.isArray(e)&&u.push(...e)}))));return Promise.all(g).then((()=>u))}));var EQ=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},kQ=function(e,t){return function(i,n){t(i,n,e)}};const DQ=Object.create({});let IQ=class e extends Lt{constructor(e,t){super(),this._editor=e,this._configurationService=t,this._localToDispose=this._register(new It),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=new Set,this._ruleFactory=new pA(this._editor),this._colorDecorationClassRefs=this._register(new It),this._register(e.onDidChangeModel((()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()}))),this._register(e.onDidChangeModelLanguage((()=>this.onModelChanged()))),this._register($s.onDidChange((()=>this.onModelChanged()))),this._register(e.onDidChangeConfiguration((()=>{let e=this._isEnabled;this._isEnabled=this.isEnabled(),e!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&"object"==typeof i){const e=i.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(17)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const t=this._editor.getModel();t&&$s.has(t)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new fn,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),e.RECOMPUTE_TIME))}))),this.beginCompute())}beginCompute(){this._computePromise=an((e=>{const t=this._editor.getModel();return t?function(e,t){const i=[],n=$s.ordered(e).reverse().map((n=>Promise.resolve(n.provideDocumentColors(e,t)).then((e=>{if(Array.isArray(e))for(let t of e)i.push({colorInfo:t,provider:n})}))));return Promise.all(n).then((()=>i))}(t,e):Promise.resolve([])})),this._computePromise.then((e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}),gt)}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((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:Oy.EMPTY})));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}updateColorDecorators(e){this._colorDecorationClassRefs.clear();let t=[];for(let i=0;ithis._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}isColorDecorationId(e){return this._colorDecoratorIds.has(e)}};IQ.ID="editor.contrib.colorDetector",IQ.RECOMPUTE_TIME=1e3,IQ=EQ([kQ(1,hl)],IQ),dp(IQ.ID,IQ);function LQ(e,t){return!!e[t]}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .goto-definition-link {\n\ttext-decoration: underline;\n\tcursor: pointer;\n}",{});class NQ{constructor(e,t){this.target=e.target,this.hasTriggerModifier=LQ(e.event,t.triggerModifier),this.hasSideBySideModifier=LQ(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class TQ{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=LQ(e,t.triggerModifier)}}class MQ{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 RQ(e){return"altKey"===e?_?new MQ(57,"metaKey",6,"altKey"):new MQ(5,"ctrlKey",6,"altKey"):_?new MQ(6,"altKey",57,"metaKey"):new MQ(6,"altKey",5,"ctrlKey")}class BQ extends Lt{constructor(e){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new zt),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new zt),this.onExecute=this._onExecute.event,this._onCancel=this._register(new zt),this.onCancel=this._onCancel.event,this._editor=e,this._opts=RQ(this._editor.getOption(70)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(70)){const e=RQ(this._editor.getOption(70));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new NQ(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new NQ(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new NQ(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new TQ(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new TQ(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()})))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;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()}}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-editor .peekview-widget .head {\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tjustify-content: space-between;\n\tflex-wrap: nowrap;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title {\n\tdisplay: flex;\n\talign-items: center;\n\tfont-size: 13px;\n\tmargin-left: 20px;\n\tmin-width: 0;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title.clickable {\n\tcursor: pointer;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty) {\n\tfont-size: 0.9em;\n\tmargin-left: 0.5em;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .meta {\n\twhite-space: nowrap;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .dirname {\n\twhite-space: nowrap;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .filename {\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty)::before {\n\tcontent: '-';\n\tpadding: 0 0.3em;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions {\n\tflex: 1;\n\ttext-align: right;\n\tpadding-right: 2px;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar {\n\tdisplay: inline-block;\n}\n\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar,\n.monaco-editor .peekview-widget .head .peekview-actions > .monaco-action-bar > .actions-container {\n\theight: 100%;\n}\n\n.monaco-editor .peekview-widget > .body {\n\tborder-top: 1px solid;\n\tposition: relative;\n}\n\n.monaco-editor .peekview-widget .head .peekview-title .codicon {\n\tmargin-right: 4px;\n}\n\n.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon {\n\tcolor: inherit !important;\n}\n",{});var OQ=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},FQ=function(e,t){return function(i,n){t(i,n,e)}};let PQ=class extends uD{constructor(e,t,i,n,o,s,r,a,l,c,d){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},n,o,s,r,a,l,c,d),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){ke(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};PQ=OQ([FQ(3,fa),FQ(4,Aa),FQ(5,eg),FQ(6,Sg),FQ(7,Tg),FQ(8,Vk),FQ(9,Sp),FQ(10,Sl)],PQ);Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n.monaco-editor .zone-widget {\n\tposition: absolute;\n\tz-index: 10;\n}\n\n\n.monaco-editor .zone-widget .zone-widget-container {\n\tborder-top-style: solid;\n\tborder-bottom-style: solid;\n\tborder-top-width: 0;\n\tborder-bottom-width: 0;\n\tposition: relative;\n}\n",{});const zQ=new jp(new Wp(0,122,204)),VQ={showArrow:!0,showFrame:!0,className:"",frameColor:zQ,arrowColor:zQ,keepEditorSelection:!1};class HQ{constructor(e,t,i,n,o,s){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this._onDomNodeTop=o,this._onComputedHeight=s}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class WQ{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class UQ{constructor(e){this._editor=e,this._ruleName=UQ._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),Au(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(){Au(this._ruleName),_u(`.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){1===e.column&&(e={lineNumber:e.lineNumber,column:2}),this._decorations=this._editor.deltaDecorations(this._decorations,[{range:Gi.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}UQ._IdGenerator=new ZM(".arrow-decoration-");class QQ{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new It,this.container=null,this._isShowing=!1,this.editor=e,this.options=ye(t),ke(this.options,VQ,!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((e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)})))}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.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],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 UQ(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){if(this.domNode.style.height=`${e}px`,this.container){let t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash&&this._resizeSash.layout()}get position(){const[e]=this._positionMarkerId;if(!e)return;const t=this.editor.getModel();if(!t)return;const i=t.getDecorationRange(e);return i?i.getStartPosition():void 0}show(e,t){const i=Gi.isIRange(e)?Gi.lift(e):Gi.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:i,options:Oy.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let e=this.editor.getOption(59),t=0;if(this.options.showArrow){t+=2*Math.round(e/3)}if(this.options.showFrame){t+=2*Math.round(e/9)}return t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),o=this._getWidth(n);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(n)+"px";const s=document.createElement("div");s.style.overflow="hidden";const r=this.editor.getOption(59),a=Math.max(12,this.editor.getLayoutInfo().height/r*.8);t=Math.min(t,a);let l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(r/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(c=Math.round(r/9)),this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new HQ(s,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e))),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new WQ("vs.editor.contrib.zoneWidget"+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}let d=t*r-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=d+"px",this.container.style.overflow="hidden"),this._doLayout(d,o),this.options.keepEditorSelection||this.editor.setSelection(e);const h=this.editor.getModel();if(h){const t=e.endLineNumber+1;t<=h.getLineCount()?this.revealLine(t,!1):this.revealLine(h.getLineCount(),!0)}}revealLine(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(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;let e;this._resizeSash=this._disposables.add(new TD(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((()=>{e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((t=>{if(e){let i=(t.currentY-e.startY)/this.editor.getOption(59),n=i<0?Math.ceil(i):Math.floor(i),o=e.heightInLines+n;o>5&&o<35&&this._relayout(o)}})))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-dropdown {\n\theight: 100%;\n\tpadding: 0;\n}\n\n.monaco-dropdown > .dropdown-label {\n\tcursor: pointer;\n\theight: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.monaco-dropdown > .dropdown-label > .action-label.disabled {\n\tcursor: default;\n}\n\n.monaco-dropdown-with-primary {\n\tdisplay: flex !important;\n\tflex-direction: row;\n\tborder-radius: 5px;\n}\n\n.monaco-dropdown-with-primary > .action-container > .action-label {\n\tmargin-right: 0;\n}\n\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label .codicon[class*='codicon-'] {\n\tfont-size: 12px;\n\tpadding-left: 0px;\n\tpadding-right: 0px;\n\tline-height: 16px;\n\tmargin-left: -3px;\n}\n\n.monaco-dropdown-with-primary > .dropdown-action-container > .monaco-dropdown > .dropdown-label > .action-label {\n\tdisplay: block;\n\tbackground-size: 16px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n}\n",{});class jQ extends qu{constructor(e,t){super(),this._onDidChangeVisibility=this._register(new zt),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=xu(e,Iu(".monaco-dropdown")),this._label=xu(this._element,Iu(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const e of[wu.CLICK,wu.MOUSE_DOWN,Op.Tap])this._register(Oh(this.element,e,(e=>Cu(e,!0))));for(const e of[wu.MOUSE_DOWN,Op.Tap])this._register(Oh(this._label,e,(e=>{e instanceof MouseEvent&&e.detail>1||(this.visible?this.hide():this.show())})));this._register(Oh(this._label,wu.KEY_UP,(e=>{const t=new vh(e);(t.equals(3)||t.equals(10))&&(Cu(e,!0),this.visible?this.hide():this.show())})));const n=i(this._label);n&&this._register(n),this._register(Pp.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class KQ extends jQ{constructor(e,t){super(e,t),this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class GQ extends FD{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new zt),this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=xu(e,Iu("a.action-label"));let t=[];return"string"==typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter((e=>!!e)):this.options.classNames&&(t=this.options.classNames),t.find((e=>"icon"===e))||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new KQ(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{var t;null===(t=this.element)||void 0===t||t.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return e.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}updateEnabled(){var e,t;const i=!this.getAction().enabled;null===(e=this.actionItem)||void 0===e||e.classList.toggle("disabled",i),null===(t=this.element)||void 0===t||t.classList.toggle("disabled",i)}}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-action-bar .action-item.menu-entry .action-label.icon {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 50%;\n\tbackground-size: 16px;\n}\n\n.monaco-action-bar .action-item.menu-entry .action-label {\n\tbackground-image: var(--menu-entry-icon-light);\n}\n\n.vs-dark .monaco-action-bar .action-item.menu-entry .action-label,\n.hc-black .monaco-action-bar .action-item.menu-entry .action-label {\n\tbackground-image: var(--menu-entry-icon-dark);\n}\n\n\n.monaco-dropdown-with-default {\n\tdisplay: flex !important;\n\tflex-direction: row;\n\tborder-radius: 5px;\n}\n\n.monaco-dropdown-with-default > .action-container > .action-label {\n\tmargin-right: 0;\n}\n\n.monaco-dropdown-with-default > .action-container.menu-entry > .action-label.icon {\n\twidth: 16px;\n\theight: 16px;\n\tbackground-repeat: no-repeat;\n\tbackground-position: 50%;\n\tbackground-size: 16px;\n}\n\n.monaco-dropdown-with-default > .action-container.menu-entry > .action-label {\n\tbackground-image: var(--menu-entry-icon-light);\n}\n\n.vs-dark .monaco-dropdown-with-default > .action-container.menu-entry > .action-label,\n.hc-black .monaco-dropdown-with-default > .action-container.menu-entry > .action-label {\n\tbackground-image: var(--menu-entry-icon-dark);\n}\n\n.monaco-dropdown-with-default > .dropdown-action-container > .monaco-dropdown > .dropdown-label .codicon[class*='codicon-'] {\n\tfont-size: 12px;\n\tpadding-left: 0px;\n\tpadding-right: 0px;\n\tline-height: 16px;\n\tmargin-left: -3px;\n}\n\n.monaco-dropdown-with-default > .dropdown-action-container > .monaco-dropdown > .dropdown-label > .action-label {\n\tdisplay: block;\n\tbackground-size: 16px;\n\tbackground-position: center center;\n\tbackground-repeat: no-repeat;\n}\n",{});var YQ=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},$Q=function(e,t){return function(i,n){t(i,n,e)}},qQ=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function JQ(e,t,i,n,o,s,r){const a=e.getActions(t);return function(e,t,i,n=e=>"navigation"===e,o=Number.MAX_SAFE_INTEGER,s=()=>!1,r=!1){let a,l;Array.isArray(t)?(a=t,l=t):(a=t.primary,l=t.secondary);const c=new Set;for(const[t,o]of e){let e;n(t)?(e=a,e.length>0&&r&&e.push(new Ju)):(e=l,e.length>0&&e.push(new Ju));for(let n of o){i&&(n=n instanceof Yg&&n.alt?n.alt:n);const o=e.push(n);n instanceof Xu&&c.add({group:t,action:n,index:o-1})}}for(const{group:e,action:t,index:i}of c){const r=n(e)?a:l,c=t.actions;(c.length<=1||r.length+c.length-2<=o)&&s(t,e,r.length)&&r.splice(i,1,...c)}if(a!==l&&a.length>o){const e=a.splice(o,a.length-o);l.unshift(...e,new Ju)}}(a,i,!1,"string"==typeof n?e=>e===n:n,o,s,r),function(e){const t=new It;for(const[,i]of e)for(const e of i)t.add(e);return t}(a)}let XQ=class extends PD{constructor(e,t,i,n,o){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon,draggable:null==t?void 0:t.draggable}),this._keybindingService=i,this._notificationService=n,this._contextKeyService=o,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new Nt),this._altKey=Ou.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return qQ(this,void 0,void 0,(function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(e){this._notificationService.error(e)}}))}render(e){super.render(e),e.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let t=!1,i=this._altKey.keyStatus.altKey||(f||A)&&this._altKey.keyStatus.shiftKey;const n=()=>{const e=t&&i;e!==this._wantsAltCommand&&(this._wantsAltCommand=e,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event((e=>{i=e.altKey||(f||A)&&e.shiftKey,n()}))),this._register(Oh(e,"mouseleave",(e=>{t=!1,n()}))),this._register(Oh(e,"mouseenter",(e=>{t=!0,n()})))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const t=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),i=t&&t.getLabel(),n=this._commandAction.tooltip||this._commandAction.label;let o=i?e(0,"{0} ({1})",n,i):n;if(!this._wantsAltCommand&&this._menuItemAction.alt){const t=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,i=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),n=i&&i.getLabel(),s=n?e(0,"{0} ({1})",t,n):t;o+=`\n[${WL.modifierLabels[S].altKey}] ${s}`}this.label.title=o}}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:i,label:n}=this;if(!i||!n)return;const o=this._commandAction.checked&&(null===(t=e.toggled)||void 0===t?void 0:t.icon)?e.toggled.icon:e.icon;if(o)if(Rg.isThemeIcon(o)){const e=Rg.asClassNameArray(o);n.classList.add(...e),this._itemClassDispose.value=Dt((()=>{n.classList.remove(...e)}))}else o.light&&n.style.setProperty("--menu-entry-icon-light",Ru(o.light)),o.dark&&n.style.setProperty("--menu-entry-icon-dark",Ru(o.dark)),n.classList.add("icon"),this._itemClassDispose.value=Dt((()=>{n.classList.remove("icon"),n.style.removeProperty("--menu-entry-icon-light"),n.style.removeProperty("--menu-entry-icon-dark")}))}};XQ=YQ([$Q(2,BL),$Q(3,Vk),$Q(4,Sg)],XQ);let ZQ=class extends GQ{constructor(e,t,i){var n,o;const s=Object.assign({},null!=t?t:Object.create(null),{menuAsChild:null!==(n=null==t?void 0:t.menuAsChild)&&void 0!==n&&n,classNames:null!==(o=null==t?void 0:t.classNames)&&void 0!==o?o:Rg.isThemeIcon(e.item.icon)?Rg.asClassName(e.item.icon):void 0});super(e,{getActions:()=>e.actions},i,s)}render(e){if(super.render(e),this.element){e.classList.add("menu-entry");const{icon:t}=this._action.item;t&&!Rg.isThemeIcon(t)&&(this.element.classList.add("icon"),t.light&&this.element.style.setProperty("--menu-entry-icon-light",Ru(t.light)),t.dark&&this.element.style.setProperty("--menu-entry-icon-dark",Ru(t.dark)))}}};ZQ=YQ([$Q(2,lI)],ZQ);let ej=class extends FD{constructor(e,t,i,n,o,s,r,a){var l,c,d;let h;super(null,e),this._keybindingService=i,this._notificationService=n,this._contextMenuService=o,this._menuService=s,this._instaService=r,this._storageService=a,this._container=null,this._storageKey=`${e.item.submenu._debugName}_lastActionId`;let u=a.get(this._storageKey,1);u&&(h=e.actions.find((e=>u===e.id))),h||(h=e.actions[0]),this._defaultAction=this._instaService.createInstance(XQ,h,void 0);const g=Object.assign({},null!=t?t:Object.create(null),{menuAsChild:null===(l=null==t?void 0:t.menuAsChild)||void 0===l||l,classNames:null!==(c=null==t?void 0:t.classNames)&&void 0!==c?c:["codicon","codicon-chevron-down"],actionRunner:null!==(d=null==t?void 0:t.actionRunner)&&void 0!==d?d:new qu});this._dropdown=new GQ(e,e.actions,this._contextMenuService,g),this._dropdown.actionRunner.onDidRun((e=>{e.action instanceof Yg&&this.update(e.action)}))}update(e){var t,i;this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(XQ,e,void 0),this._defaultAction.actionRunner=new class extends qu{runAction(e,t){return qQ(this,void 0,void 0,(function*(){yield e.run(void 0)}))}},this._container&&this._defaultAction.render((t=this._container,i=Iu(".action-container"),t.insertBefore(i,t.firstChild),i))}setActionContext(e){super.setActionContext(e),this._defaultAction.setActionContext(e),this._dropdown.setActionContext(e)}render(e){this._container=e,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const t=Iu(".action-container");this._defaultAction.render(xu(this._container,t)),this._register(Oh(t,wu.KEY_DOWN,(e=>{const t=new vh(e);t.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),t.stopPropagation())})));const i=Iu(".dropdown-action-container");this._dropdown.render(xu(this._container,i)),this._register(Oh(i,wu.KEY_DOWN,(e=>{var t;const i=new vh(e);i.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),null===(t=this._defaultAction.element)||void 0===t||t.focus(),i.stopPropagation())})))}focus(e){e?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(e){e?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};function tj(e,t,i){return t instanceof Yg?e.createInstance(XQ,t,void 0):t instanceof Gg?t.item.rememberDefaultAction?e.createInstance(ej,t,i):e.createInstance(ZQ,t,i):void 0}ej=YQ([$Q(2,BL),$Q(3,Vk),$Q(4,lI),$Q(5,jg),$Q(6,fa),$Q(7,az)],ej);var ij=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},nj=function(e,t){return function(i,n){t(i,n,e)}};const oj=_a("IPeekViewService");var sj;wl(oj,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose());this._widgets.set(e,{widget:t,listener:t.onDidClose((()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))}))})}}),function(t){t.inPeekEditor=new xg("inReferenceSearchEditor",!0,e(0,"Whether the current code editor is embedded inside peek")),t.notInPeekEditor=t.inPeekEditor.toNegated()}(sj||(sj={}));let rj=class{constructor(e,t){e instanceof PQ&&sj.inPeekEditor.bindTo(t)}dispose(){}};rj.ID="editor.contrib.referenceController",rj=ij([nj(1,Sg)],rj),dp(rj.ID,rj);const aj={headerBackgroundColor:jp.white,primaryHeadingColor:jp.fromHex("#333333"),secondaryHeadingColor:jp.fromHex("#6c6c6cb3")};let lj=class extends QQ{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new zt,this.onDidClose=this._onDidClose.event,ke(this.options,aj,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();let e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=Iu(".head"),this._bodyElement=Iu(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(t,i){const n=Iu(".peekview-title");this.options.supportOnTitleClick&&(n.classList.add("clickable"),Ph(n,"click",(e=>this._onTitleClick(e)))),xu(this._headElement,n),this._fillTitleIcon(n),this._primaryHeading=Iu("span.filename"),this._secondaryHeading=Iu("span.dirname"),this._metaHeading=Iu("span.meta"),xu(n,this._primaryHeading,this._secondaryHeading,this._metaHeading);const o=Iu(".peekview-actions");xu(this._headElement,o);const s=this._getActionBarOptions();this._actionbarWidget=new VD(o,s),this._disposables.add(this._actionbarWidget),i||this._actionbarWidget.push(new $u("peekview.close",e(0,"Close"),ys.close.classNames,!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:tj.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:Mh(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,Lu(this._metaHeading)):Nu(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(59)),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`)}};lj=ij([nj(2,fa)],lj);const cj=Jp("peekViewTitle.background",{dark:J_(Qm,.1),light:J_(Qm,.1),hc:null},e(0,"Background color of the peek view title area.")),dj=Jp("peekViewTitleLabel.foreground",{dark:jp.white,light:jp.black,hc:jp.white},e(0,"Color of the peek view title.")),hj=Jp("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hc:"#FFFFFF99"},e(0,"Color of the peek view title info.")),uj=Jp("peekView.border",{dark:Qm,light:Qm,hc:im},e(0,"Color of the peek view borders and arrow.")),gj=Jp("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:jp.black},e(0,"Background color of the peek view result list."));Jp("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:jp.white},e(0,"Foreground color for line nodes in the peek view result list.")),Jp("peekViewResult.fileForeground",{dark:jp.white,light:"#1E1E1E",hc:jp.white},e(0,"Foreground color for file nodes in the peek view result list.")),Jp("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},e(0,"Background color of the selected entry in the peek view result list.")),Jp("peekViewResult.selectionForeground",{dark:jp.white,light:"#6C6C6C",hc:jp.white},e(0,"Foreground color of the selected entry in the peek view result list."));const pj=Jp("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:jp.black},e(0,"Background color of the peek view editor."));Jp("peekViewEditorGutter.background",{dark:pj,light:pj,hc:pj},e(0,"Background color of the gutter in the peek view editor.")),Jp("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},e(0,"Match highlight color in the peek view result list.")),Jp("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},e(0,"Match highlight color in the peek view editor.")),Jp("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:nm},e(0,"Match highlight border in the peek view editor."));var mj=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class fj{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=eR.nextId()}get uri(){return this.link.uri}get range(){var e,t;return null!==(t=null!==(e=this._range)&&void 0!==e?e:this.link.targetSelectionRange)&&void 0!==t?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var t;const i=null===(t=this.parent.getPreview(this))||void 0===t?void 0:t.preview(this.range);return i?e(0,"symbol in {0} on line {1} at column {2}, {3}",IC(this.uri),this.range.startLineNumber,this.range.startColumn,i.value):e(0,"symbol in {0} on line {1} at column {2}",IC(this.uri),this.range.startLineNumber,this.range.startColumn)}}class _j{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:o,endLineNumber:s,endColumn:r}=e,a=i.getWordUntilPosition({lineNumber:n,column:o-t}),l=new Gi(n,a.startColumn,n,o),c=new Gi(s,r,s,1073741824),d=i.getValueInRange(l).replace(/^\s+/,""),h=i.getValueInRange(e);return{value:d+h+i.getValueInRange(c).replace(/\s+$/,""),highlight:{start:d.length,end:d.length+h.length}}}}class Aj{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new Po}dispose(){Et(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const t=this.children.length;return 1===t?e(0,"1 symbol in {0}, full path {1}",IC(this.uri),this.uri.fsPath):e(0,"{0} symbols in {1}, full path {2}",t,IC(this.uri),this.uri.fsPath)}resolve(e){return mj(this,void 0,void 0,(function*(){if(0!==this._previews.size)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{const i=yield e.createModelReference(t.uri);this._previews.set(t.uri,new _j(i))}catch(e){gt(e)}return this}))}}class bj{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new zt,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(bj._compareReferences);for(let t of e)if(n&&EC.isEqual(n.uri,t.uri,!0)||(n=new Aj(this,t.uri),this.groups.push(n)),0===n.children.length||0!==bj._compareReferences(t,n.children[n.children.length-1])){const e=new fj(i===t,n,t,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){Et(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new bj(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?e(0,"No results found"):1===this.references.length?e(0,"Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?e(0,"Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):e(0,"Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:i}=e,n=i.children.indexOf(e),o=i.children.length,s=i.parent.groups.length;return 1===s||t&&n+10?(n=t?(n+1)%o:(n+o-1)%o,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%s,i.parent.groups[n].children[0]):(n=(n+s-1)%s,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map(((i,n)=>({idx:n,prefixLen:$n(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLent.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()&&Gi.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 EC.compare(e.uri,t.uri)||Gi.compareRangesUsingStarts(e.range,t.range)}}function wj(e){if(!e)return;"string"==typeof e&&(e=Bi.file(e));const t=IC(e)||(e.scheme===Ih.file?e.fsPath:e.path);return f&&function(e){const t=Ci(e);return f?!(e.length>3)&&Do(t)&&(2===e.length||92===t.charCodeAt(2)):t===wi.sep}(t)?Cj(t):t}function Cj(e,t){return Do(e,t)?e.charAt(0).toUpperCase()+e.slice(1):e}Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n/* -- zone widget */\n.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget {\n\tborder-top-width: 1px;\n\tborder-bottom-width: 1px;\n}\n\n.monaco-editor .reference-zone-widget .inline {\n\tdisplay: inline-block;\n\tvertical-align: top;\n}\n\n.monaco-editor .reference-zone-widget .messages {\n\theight: 100%;\n\twidth: 100%;\n\ttext-align: center;\n\tpadding: 3em 0;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree {\n\tline-height: 23px;\n\tbackground-color: var(--vscode-peekViewResult-background);\n\tcolor: var(--vscode-peekViewResult-lineForeground);\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference {\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference-file {\n\tdisplay: inline-flex;\n\twidth: 100%;\n\theight: 100%;\n\tcolor: var(--vscode-peekViewResult-fileForeground);\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file {\n\tcolor: inherit !important;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) {\n\tbackground-color: var(--vscode-peekViewResult-selectionBackground);\n\tcolor: var(--vscode-peekViewResult-selectionForeground) !important;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .reference-file .count {\n\tmargin-right: 12px;\n\tmargin-left: auto;\n}\n\n.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight {\n\tbackground-color: var(--vscode-peekViewResult-matchHighlightBackground);\n}\n\n.monaco-editor .reference-zone-widget .preview .reference-decoration {\n\tbackground-color: var(--vscode-peekViewEditor-matchHighlightBackground);\n\tborder: 2px solid var(--vscode-peekViewEditor-matchHighlightBorder);\n\tbox-sizing: border-box;\n}\n\n.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,\n.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\n\tbackground-color: var(--vscode-peekViewEditor-background);\n}\n\n.monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\n\tbackground-color: var(--vscode-peekViewEditorGutter-background);\n}\n\n/* High Contrast Theming */\n\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file {\n\tfont-weight: bold;\n}\n\n.monaco-editor.hc-black .reference-zone-widget .ref-tree .referenceMatch .highlight {\n\tborder: 1px dotted var(--vscode-contrastActiveBorder, transparent);\n\tbox-sizing: border-box;\n}\n",{});var vj=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},yj=function(e,t){return function(i,n){t(i,n,e)}};let xj=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof bj||e instanceof Aj}getChildren(e){if(e instanceof bj)return e.groups;if(e instanceof Aj)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};xj=vj([yj(0,Gu)],xj);class Sj{getHeight(){return 23}getTemplateId(e){return e instanceof Aj?Ij.id:Nj.id}}let Ej=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof fj){const i=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(i)return i.value}return IC(e.uri)}};Ej=vj([yj(0,BL)],Ej);class kj{getId(e){return e instanceof fj?e.id:e.uri}}let Dj=class extends Lt{constructor(e,t,i){super(),this._uriLabel=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new IR(n,{supportHighlights:!0})),this.badge=new jM(xu(n,Iu(".count"))),this._register(function(e,t,i){return NT(t,{badgeBackground:(null==i?void 0:i.badgeBackground)||Lm,badgeForeground:(null==i?void 0:i.badgeForeground)||Nm,badgeBorder:im},e)}(this.badge,i)),e.appendChild(n)}set(t,i){let n=NC(t.uri);this.file.setLabel(wj(t.uri),this._uriLabel.getUriLabel(n,{relative:!0}),{title:this._uriLabel.getUriLabel(t.uri),matches:i});const o=t.children.length;this.badge.setCount(o),o>1?this.badge.setTitleFormat(e(0,"{0} references",o)):this.badge.setTitleFormat(e(0,"{0} reference",o))}};Dj=vj([yj(1,YL),yj(2,Tg)],Dj);let Ij=class e{constructor(t){this._instantiationService=t,this.templateId=e.id}renderTemplate(e){return this._instantiationService.createInstance(Dj,e)}renderElement(e,t,i){i.set(e.element,JN(e.filterData))}disposeTemplate(e){e.dispose()}};Ij.id="FileReferencesRenderer",Ij=vj([yj(0,fa)],Ij);class Lj{constructor(e){this.label=new CR(e)}set(e,t){var i;const n=null===(i=e.parent.getPreview(e))||void 0===i?void 0:i.preview(e.range);if(n&&n.value){const{value:e,highlight:i}=n;t&&!cT.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,JN(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[i]))}else this.label.set(`${IC(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class Nj{constructor(){this.templateId=Nj.id}renderTemplate(e){return new Lj(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}Nj.id="OneReferenceRenderer";class Tj{getWidgetAriaLabel(){return e(0,"References")}getAriaLabel(e){return e.ariaMessage}}var Mj=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Rj=function(e,t){return function(i,n){t(i,n,e)}},Bj=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Oj{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new It,this._callOnModelChange=new It,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(let t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],i=[];for(let n=0,o=e.children.length;n{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(Pj,"ReferencesWidget",this._treeContainer,new Sj,[this._instantiationService.createInstance(Ij),this._instantiationService.createInstance(Nj)],this._instantiationService.createInstance(xj),i),this._splitView.addView({onDidChange:Ft.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},QB.Distribute),this._splitView.addView({onDidChange:Ft.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},QB.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));let n=(e,t)=>{e instanceof fj&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._tree.onDidOpen((e=>{e.sideBySide?n(e.element,"side"):e.editorOptions.pinned?n(e.element,"goto"):n(e.element,"show")})),Nu(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Zh(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=e(0,"No results"),Lu(this._messageContainer),Promise.resolve(void 0)):(Nu(this._messageContainer),this._decorationsManager=new Oj(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(2!==t.detail)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"),Lu(this._treeContainer),Lu(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof fj?e:e instanceof Aj&&e.children.length>0?e.children[0]:void 0}revealReference(e){return Bj(this,void 0,void 0,(function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}))}_revealReference(t,i){return Bj(this,void 0,void 0,(function*(){if(this._revealedReference===t)return;this._revealedReference=t,t.uri.scheme!==Ih.inMemory?this.setTitle(DC(t.uri),this._uriLabel.getUriLabel(NC(t.uri))):this.setTitle(e(0,"References"));const n=this._textModelResolverService.createModelReference(t.uri);this._tree.getInput()===t.parent||(i&&this._tree.reveal(t.parent),yield this._tree.expand(t.parent)),this._tree.reveal(t);const o=yield n;if(!this._model)return void o.dispose();Et(this._previewModelReference);const s=o.object;if(s){const e=this._preview.getModel()===s.textEditorModel?0:1,i=Gi.lift(t.range).collapseToStart();this._previewModelReference=o,this._preview.setModel(s.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,e)}else this._preview.setModel(this._previewNotAvailableMessage),o.dispose()}))}};zj=Mj([Rj(3,Tg),Rj(4,Gu),Rj(5,fa),Rj(6,oj),Rj(7,YL),Rj(8,fy),Rj(9,BL),Rj(10,_l),Rj(11,Sl)],zj);var Vj=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Hj=function(e,t){return function(i,n){t(i,n,e)}},Wj=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Uj=new xg("referenceSearchVisible",!1,e(0,"Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Qj=class t{constructor(e,t,i,n,o,s,r,a){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=o,this._instantiationService=s,this._storageService=r,this._configurationService=a,this._disposables=new It,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Uj.bindTo(i)}static get(e){return e.getContribution(t.ID)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(t,i,n){let o;if(this._widget&&(o=this._widget.position),this.closeWidget(),o&&t.containsPosition(o))return;this._peekMode=n,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>{this.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((()=>{this._ignoreModelChangeEvent||this.closeWidget()})));const s="peekViewLayout",r=Fj.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance(zj,this._editor,this._defaultTreeKeyboardSupport,r),this._widget.setTitle(e(0,"Loading...")),this._widget.show(t),this._disposables.add(this._widget.onDidClose((()=>{i.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((e=>{let{element:t,kind:i}=e;if(t)switch(i){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":n?this._gotoReference(t):this.openReference(t,!1,!0)}})));const a=++this._requestIdPool;i.then((i=>{var n;if(a===this._requestIdPool&&this._widget)return null===(n=this._model)||void 0===n||n.dispose(),this._model=i,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(e(0,"{0} ({1})",this._model.title,this._model.references.length));let i=this._editor.getModel().uri,n=new Ki(t.startLineNumber,t.startColumn),o=this._model.nearestReference(i,n);if(o)return this._widget.setSelection(o).then((()=>{this._widget&&"editor"===this._editor.getOption(77)&&this._widget.focusOnPreviewEditor()}))}}));i.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return Wj(this,void 0,void 0,(function*(){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),o=this._editor.hasTextFocus(),s=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(n),yield this._gotoReference(n),o?this._editor.focus():this._widget&&s&&this._widget.focusOnPreviewEditor()}))}revealReference(e){return Wj(this,void 0,void 0,(function*(){this._editor.hasModel()&&this._model&&this._widget&&(yield this._widget.revealReference(e))}))}closeWidget(e=!0){var t,i;null===(t=this._widget)||void 0===t||t.dispose(),null===(i=this._model)||void 0===i||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){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const i=Gi.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:i}},this._editor).then((e=>{var n;if(this._ignoreModelChangeEvent=!1,e&&this._widget)if(this._editor===e)this._widget.show(i),this._widget.focusOnReferenceTree();else{const o=t.get(e),s=this._model.clone();this.closeWidget(),e.focus(),null==o||o.toggleWidget(i,an((e=>Promise.resolve(s))),null!==(n=this._peekMode)&&void 0!==n&&n)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,gt(e)}))}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:o}=e;this._editorService.openCodeEditor({resource:n,options:{selection:o,pinned:i}},this._editor,t)}};function jj(e,t){const i=function(e){let t=e.get(Aa).getFocusedCodeEditor();return t instanceof PQ?t.getParentEditor():t}(e);if(!i)return;const n=Qj.get(i);n&&t(n)}Qj.ID="editor.contrib.referencesController",Qj=Vj([Hj(2,Sg),Hj(3,Aa),Hj(4,Vk),Hj(5,fa),Hj(6,az),Hj(7,hl)],Qj),qg.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:ni(2089,60),when:og.or(Uj,sj.inPeekEditor),handler(e){jj(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),qg.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:og.or(Uj,sj.inPeekEditor),handler(e){jj(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),qg.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:og.or(Uj,sj.inPeekEditor),handler(e){jj(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),tg.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),tg.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),tg.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),tg.registerCommand("closeReferenceSearch",(e=>jj(e,(e=>e.closeWidget())))),qg.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:og.and(sj.inPeekEditor,og.not("config.editor.stablePeek"))}),qg.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:og.and(Uj,og.not("config.editor.stablePeek"))}),qg.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:og.and(Uj,iF,aF.negate(),cF.negate()),handler(e){var t;const i=null===(t=e.get(XO).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof fj&&jj(e,(e=>e.revealReference(i[0])))}}),qg.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:og.and(Uj,iF,aF.negate(),cF.negate()),handler(e){var t;const i=null===(t=e.get(XO).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof fj&&jj(e,(e=>e.openReference(i[0],!0,!0)))}}),tg.registerCommand("openReference",(e=>{var t;const i=null===(t=e.get(XO).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof fj&&jj(e,(e=>e.openReference(i[0],!1,!0)))}));var Kj=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Gj=function(e,t){return function(i,n){t(i,n,e)}};const Yj=new xg("hasSymbols",!1,e(0,"Whether there are symbol locations that can be navigated via keyboard-only.")),$j=_a("ISymbolNavigationService");let qj=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=Yj.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),null===(e=this._currentState)||void 0===e||e.dispose(),null===(t=this._currentMessage)||void 0===t||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new Jj(this._editorService),n=i.onDidChange((e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),o=i.getPosition();if(!n||!o)return;let s=!1,r=!1;for(const e of t.references)if(kC(e.uri,n.uri))s=!0,r=r||Gi.containsPosition(e.range,o);else if(s)break;s&&r||this.reset()}));this._currentState=kt(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:Gi.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){var t;null===(t=this._currentMessage)||void 0===t||t.dispose();const i=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),n=i?e(0,"Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,i.getLabel()):e(0,"Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(n)}};qj=Kj([Gj(0,Sg),Gj(1,Aa),Gj(2,Vk),Gj(3,BL)],qj),wl($j,qj,!0),rp(new class extends ip{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:Yj,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get($j).revealNext(t)}}),qg.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:Yj,primary:9,handler(e){e.get($j).reset()}});let Jj=class{constructor(e){this._listener=new Map,this._disposables=new It,this._onDidChange=new zt,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(),Et(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,kt(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){var t;null===(t=this._listener.get(e))||void 0===t||t.dispose(),this._listener.delete(e)}};Jj=Kj([Gj(0,Aa)],Jj);var Xj=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function Zj(e,t,i,n){const o=i.ordered(e).map((i=>Promise.resolve(n(i,e,t)).then(void 0,(e=>{pt(e)}))));return Promise.all(o).then((e=>{const t=[];for(let i of e)Array.isArray(i)?t.push(...i):i&&t.push(i);return t}))}function eK(e,t,i){return Zj(e,t,Ps,((e,t,n)=>e.provideDefinition(t,n,i)))}function tK(e,t,i){return Zj(e,t,zs,((e,t,n)=>e.provideDeclaration(t,n,i)))}function iK(e,t,i){return Zj(e,t,Vs,((e,t,n)=>e.provideImplementation(t,n,i)))}function nK(e,t,i){return Zj(e,t,Hs,((e,t,n)=>e.provideTypeDefinition(t,n,i)))}function oK(e,t,i,n){return Zj(e,t,Is,((e,t,o)=>Xj(this,void 0,void 0,(function*(){const s=yield e.provideReferences(t,o,{includeDeclaration:!0},n);if(!i||!s||2!==s.length)return s;const r=yield e.provideReferences(t,o,{includeDeclaration:!1},n);return r&&1===r.length?r:s}))))}function sK(e){return Xj(this,void 0,void 0,(function*(){const t=yield e(),i=new bj(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}))}sp("_executeDefinitionProvider",((e,t)=>sK((()=>eK(e,t,jt.None))))),sp("_executeDeclarationProvider",((e,t)=>sK((()=>tK(e,t,jt.None))))),sp("_executeImplementationProvider",((e,t)=>sK((()=>iK(e,t,jt.None))))),sp("_executeTypeDefinitionProvider",((e,t)=>sK((()=>nK(e,t,jt.None))))),sp("_executeReferenceProvider",((e,t)=>sK((()=>oK(e,t,!1,jt.None)))));var rK,aK,lK,cK,dK,hK,uK,gK,pK=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};Kg.appendMenuItem(Qg.EditorContext,{submenu:Qg.EditorContextPeek,title:e(0,"Peek"),group:"navigation",order:100});const mK=new Set;function fK(e){const t=new e;return cp(t),mK.add(t.id),t}class _K{constructor(e,t){this.model=e,this.position=t}static is(e){return!(!e||"object"!=typeof e)&&(e instanceof _K||!(!Ki.isIPosition(e.position)||!e.model))}}class AK extends np{constructor(e,t){super(t),this.configuration=e}run(e,t,i){if(!t.hasModel())return Promise.resolve(void 0);const n=e.get(Vk),o=e.get(Aa),s=e.get(gI),r=e.get($j),a=t.getModel(),l=t.getPosition(),c=_K.is(i)?i:new _K(a,l),d=new rH(t,5),h=ln(this._getLocationModel(c.model,c.position,d.token),d.token).then((e=>pK(this,void 0,void 0,(function*(){var i;if(!e||d.token.isCancellationRequested)return;let n;if(Uu(e.ariaMessage),e.referenceAt(a.uri,l)){const e=this._getAlternativeCommand(t);e!==this.id&&mK.has(e)&&(n=t.getAction(e))}const s=e.references.length;if(0===s){if(!this.configuration.muteMessage){const e=a.getWordAtPosition(l);null===(i=EU.get(t))||void 0===i||i.showMessage(this._getNoResultFoundMessage(e),l)}}else{if(1!==s||!n)return this._onResult(o,r,t,e);n.run()}}))),(e=>{n.error(e)})).finally((()=>{d.dispose()}));return s.showWhile(h,250),h}_onResult(e,t,i,n){return pK(this,void 0,void 0,(function*(){const o=this._getGoToPreference(i);if(i instanceof PQ||!(this.configuration.openInPeek||"peek"===o&&n.references.length>1)){const s=n.firstReference(),r=n.references.length>1&&"gotoAndPeek"===o,a=yield this._openReference(i,e,s,this.configuration.openToSide,!r);r&&a?this._openInPeek(a,n):n.dispose(),"goto"===o&&t.put(s)}else this._openInPeek(i,n)}))}_openReference(e,t,i,n,o){return pK(this,void 0,void 0,(function*(){let s;var r;if((r=i)&&Bi.isUri(r.uri)&&Gi.isIRange(r.range)&&(Gi.isIRange(r.originSelectionRange)||Gi.isIRange(r.targetSelectionRange))&&(s=i.targetSelectionRange),s||(s=i.range),!s)return;const a=yield t.openCodeEditor({resource:i.uri,options:{selection:Gi.collapseToStart(s),selectionRevealType:3}},e,n);if(a){if(o){const e=a.getModel(),t=a.deltaDecorations([],[{range:s,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{a.getModel()===e&&a.deltaDecorations(t,[])}),350)}return a}}))}_openInPeek(e,t){const i=Qj.get(e);i&&e.hasModel()?i.toggleWidget(e.getSelection(),an((e=>Promise.resolve(t))),this.configuration.openInPeek):t.dispose()}}class bK extends AK{_getLocationModel(t,i,n){return pK(this,void 0,void 0,(function*(){return new bj(yield eK(t,i,n),e(0,"Definitions"))}))}_getNoResultFoundMessage(t){return t&&t.word?e(0,"No definition found for '{0}'",t.word):e(0,"No definition found")}_getAlternativeCommand(e){return e.getOption(51).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(51).multipleDefinitions}}const wK=w&&!ia?2118:70;fK(((rK=class t extends bK{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:t.id,label:e(0,"Go to Definition"),alias:"Go to Definition",precondition:og.and(vx.hasDefinitionProvider,vx.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:vx.editorTextFocus,primary:wK,weight:100},contextMenuOpts:{group:"navigation",order:1.1}}),tg.registerCommandAlias("editor.action.goToDeclaration",t.id)}}).id="editor.action.revealDefinition",rK)),fK(((aK=class t extends bK{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:t.id,label:e(0,"Open Definition to the Side"),alias:"Open Definition to the Side",precondition:og.and(vx.hasDefinitionProvider,vx.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:vx.editorTextFocus,primary:ni(2089,wK),weight:100}}),tg.registerCommandAlias("editor.action.openDeclarationToTheSide",t.id)}}).id="editor.action.revealDefinitionAside",aK)),fK(((lK=class t extends bK{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:t.id,label:e(0,"Peek Definition"),alias:"Peek Definition",precondition:og.and(vx.hasDefinitionProvider,sj.notInPeekEditor,vx.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:vx.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:Qg.EditorContextPeek,group:"peek",order:2}}),tg.registerCommandAlias("editor.action.previewDeclaration",t.id)}}).id="editor.action.peekDefinition",lK));class CK extends AK{_getLocationModel(t,i,n){return pK(this,void 0,void 0,(function*(){return new bj(yield tK(t,i,n),e(0,"Declarations"))}))}_getNoResultFoundMessage(t){return t&&t.word?e(0,"No declaration found for '{0}'",t.word):e(0,"No declaration found")}_getAlternativeCommand(e){return e.getOption(51).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(51).multipleDeclarations}}fK(((cK=class t extends CK{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:t.id,label:e(0,"Go to Declaration"),alias:"Go to Declaration",precondition:og.and(vx.hasDeclarationProvider,vx.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage(t){return t&&t.word?e(0,"No declaration found for '{0}'",t.word):e(0,"No declaration found")}}).id="editor.action.revealDeclaration",cK)),fK(class extends CK{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:e(0,"Peek Declaration"),alias:"Peek Declaration",precondition:og.and(vx.hasDeclarationProvider,sj.notInPeekEditor,vx.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Qg.EditorContextPeek,group:"peek",order:3}})}});class vK extends AK{_getLocationModel(t,i,n){return pK(this,void 0,void 0,(function*(){return new bj(yield nK(t,i,n),e(0,"Type Definitions"))}))}_getNoResultFoundMessage(t){return t&&t.word?e(0,"No type definition found for '{0}'",t.word):e(0,"No type definition found")}_getAlternativeCommand(e){return e.getOption(51).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(51).multipleTypeDefinitions}}fK(((dK=class t extends vK{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:t.ID,label:e(0,"Go to Type Definition"),alias:"Go to Type Definition",precondition:og.and(vx.hasTypeDefinitionProvider,vx.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:vx.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}}).ID="editor.action.goToTypeDefinition",dK)),fK(((hK=class t extends vK{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:t.ID,label:e(0,"Peek Type Definition"),alias:"Peek Type Definition",precondition:og.and(vx.hasTypeDefinitionProvider,sj.notInPeekEditor,vx.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Qg.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",hK));class yK extends AK{_getLocationModel(t,i,n){return pK(this,void 0,void 0,(function*(){return new bj(yield iK(t,i,n),e(0,"Implementations"))}))}_getNoResultFoundMessage(t){return t&&t.word?e(0,"No implementation found for '{0}'",t.word):e(0,"No implementation found")}_getAlternativeCommand(e){return e.getOption(51).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(51).multipleImplementations}}fK(((uK=class t extends yK{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:t.ID,label:e(0,"Go to Implementations"),alias:"Go to Implementations",precondition:og.and(vx.hasImplementationProvider,vx.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:vx.editorTextFocus,primary:2118,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}}).ID="editor.action.goToImplementation",uK)),fK(((gK=class t extends yK{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:t.ID,label:e(0,"Peek Implementations"),alias:"Peek Implementations",precondition:og.and(vx.hasImplementationProvider,sj.notInPeekEditor,vx.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:vx.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:Qg.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",gK));class xK extends AK{_getNoResultFoundMessage(t){return t?e(0,"No references found for '{0}'",t.word):e(0,"No references found")}_getAlternativeCommand(e){return e.getOption(51).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(51).multipleReferences}}fK(class extends xK{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:e(0,"Go to References"),alias:"Go to References",precondition:og.and(vx.hasReferenceProvider,sj.notInPeekEditor,vx.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:vx.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}_getLocationModel(t,i,n){return pK(this,void 0,void 0,(function*(){return new bj(yield oK(t,i,!0,n),e(0,"References"))}))}}),fK(class extends xK{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:e(0,"Peek References"),alias:"Peek References",precondition:og.and(vx.hasReferenceProvider,sj.notInPeekEditor,vx.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Qg.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(t,i,n){return pK(this,void 0,void 0,(function*(){return new bj(yield oK(t,i,!1,n),e(0,"References"))}))}});class SK extends AK{constructor(t,i,n){super(t,{id:"editor.action.goToLocation",label:e(0,"Go to Any Symbol"),alias:"Go to Any Symbol",precondition:og.and(sj.notInPeekEditor,vx.isInWalkThroughSnippet.toNegated())}),this._references=i,this._gotoMultipleBehaviour=n}_getLocationModel(t,i,n){return pK(this,void 0,void 0,(function*(){return new bj(this._references,e(0,"Locations"))}))}_getNoResultFoundMessage(t){return t&&e(0,"No results for '{0}'",t.word)||""}_getGoToPreference(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(51).multipleReferences}_getAlternativeCommand(){return""}}tg.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Bi},{name:"position",description:"The position at which to start",constraint:Ki.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:(e,t,i,n,o,s,r)=>pK(void 0,void 0,void 0,(function*(){fe(Bi.isUri(t)),fe(Ki.isIPosition(i)),fe(Array.isArray(n)),fe(void 0===o||"string"==typeof o),fe(void 0===r||"boolean"==typeof r);const a=e.get(Aa),l=yield a.openCodeEditor({resource:t},a.getFocusedCodeEditor());if(lH(l))return l.setPosition(i),l.revealPositionInCenterIfOutsideViewport(i,0),l.invokeWithinContext((e=>{const t=new class extends SK{_getNoResultFoundMessage(e){return s||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(s),openInPeek:Boolean(r),openToSide:!1},n,o);e.get(fa).invokeFunction(t.run.bind(t),l)}))}))}),tg.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:Bi},{name:"position",description:"The position at which to start",constraint:Ki.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:(e,t,i,n,o)=>pK(void 0,void 0,void 0,(function*(){e.get(eg).executeCommand("editor.action.goToLocations",t,i,n,o,void 0,!0)}))}),tg.registerCommand({id:"editor.action.findReferences",handler:(t,i,n)=>{fe(Bi.isUri(i)),fe(Ki.isIPosition(n));const o=t.get(Aa);return o.openCodeEditor({resource:i},o.getFocusedCodeEditor()).then((t=>{if(!lH(t)||!t.hasModel())return;const i=Qj.get(t);if(!i)return;const o=an((i=>oK(t.getModel(),Ki.lift(n),!1,i).then((t=>new bj(t,e(0,"References")))))),s=new Gi(n.lineNumber,n.column,n.lineNumber,n.column);return Promise.resolve(i.toggleWidget(s,o,!1))}))}}),tg.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations"),Kg.appendMenuItems([{id:Qg.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:e(0,"Go to &&Definition")},group:"4_symbol_nav",order:2}},{id:Qg.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:e(0,"Go to &&Declaration")},group:"4_symbol_nav",order:3}},{id:Qg.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:e(0,"Go to &&Type Definition")},group:"4_symbol_nav",order:3}},{id:Qg.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:e(0,"Go to &&Implementations")},group:"4_symbol_nav",order:4}},{id:Qg.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:e(0,"Go to &&References")},group:"4_symbol_nav",order:5}}]);var EK=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},kK=function(e,t){return function(i,n){t(i,n,e)}};let DK=class t{constructor(e,t,i){this.textModelResolverService=t,this.languageService=i,this.toUnhook=new It,this.toUnhookForKeyboard=new It,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e;let n=new BQ(e);this.toUnhook.add(n),this.toUnhook.add(n.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,Ce(t))}))),this.toUnhook.add(n.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).then((()=>{this.removeLinkDecorations()}),(e=>{this.removeLinkDecorations(),gt(e)}))}))),this.toUnhook.add(n.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(e){return e.getContribution(t.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then((()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition((()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()}))),this.toUnhookForKeyboard.add(this.editor.onKeyDown((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(t){var i;this.toUnhookForKeyboard.clear();const n=t?null===(i=this.editor.getModel())||void 0===i?void 0:i.getWordAtPosition(t):null;if(!n)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===n.startColumn&&this.currentWordAtPosition.endColumn===n.endColumn&&this.currentWordAtPosition.word===n.word)return Promise.resolve(0);this.currentWordAtPosition=n;let o=new sH(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=an((e=>this.findDefinition(t,e))),this.previousPromise.then((i=>{if(i&&i.length&&o.validate(this.editor))if(i.length>1)this.addDecoration(new Gi(t.lineNumber,n.startColumn,t.lineNumber,n.endColumn),(new vR).appendText(e(0,"Click to show {0} definitions.",i.length)));else{let e=i[0];if(!e.uri)return;this.textModelResolverService.createModelReference(e.uri).then((i=>{if(!i.object||!i.object.textEditorModel)return void i.dispose();const{object:{textEditorModel:o}}=i,{startLineNumber:s}=e.range;if(s<1||s>o.getLineCount())return void i.dispose();const r=this.getPreviewValue(o,s,e);let a;a=e.originSelectionRange?Gi.lift(e.originSelectionRange):new Gi(t.lineNumber,n.startColumn,t.lineNumber,n.endColumn);const l=this.languageService.guessLanguageIdByFilepathOrFirstLine(o.uri);this.addDecoration(a,(new vR).appendCodeblock(l||"",r)),i.dispose()}))}else this.removeLinkDecorations()})).then(void 0,gt)}getPreviewValue(e,i,n){let o=n.targetSelectionRange?n.range:this.getPreviewRangeBasedOnBrackets(e,i);o.endLineNumber-o.startLineNumber>=t.MAX_SOURCE_PREVIEW_LINES&&(o=this.getPreviewRangeBasedOnIndentation(e,i));return this.stripIndentationFromPreviewRange(e,i,o)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;on)return new Gi(i,1,n+1,1);r=e.bracketPairs.findNextBracket(new Ki(a,l))}return new Gi(i,1,n+1,1)}addDecoration(e,t){const i={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[i])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&6===e.target.type&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&Ps.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel();return i?eK(i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext((e=>{const i=!t&&this.editor.getOption(78)&&!this.isInPeekEditor(e);return new bK({openToSide:t,openInPeek:i,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(e,this.editor)}))}isInPeekEditor(e){const t=e.get(Sg);return sj.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};DK.ID="editor.contrib.gotodefinitionatposition",DK.MAX_SOURCE_PREVIEW_LINES=8,DK=EK([kK(1,Gu),kK(2,_l)],DK),dp(DK.ID,DK),zg(((e,t)=>{const i=e.getColor(Ef);i&&t.addRule(`.monaco-editor .goto-definition-link { color: ${i} !important; }`)}));Wr("/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n.monaco-hover {\n\tcursor: default;\n\tposition: absolute;\n\toverflow: hidden;\n\tz-index: 50;\n\tuser-select: text;\n\t-webkit-user-select: text;\n\t-ms-user-select: text;\n\tbox-sizing: initial;\n\tanimation: fadein 100ms linear;\n\tline-height: 1.5em;\n}\n\n.monaco-hover.hidden {\n\tdisplay: none;\n}\n\n.monaco-hover a:hover {\n\tcursor: pointer;\n}\n\n.monaco-hover .hover-contents:not(.html-hover-contents) {\n\tpadding: 4px 8px;\n}\n\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) {\n\tmax-width: 500px;\n\tword-wrap: break-word;\n}\n\n.monaco-hover .markdown-hover > .hover-contents:not(.code-hover-contents) hr {\n\tmin-width: 100%;\n}\n\n.monaco-hover p,\n.monaco-hover .code,\n.monaco-hover ul {\n\tmargin: 8px 0;\n}\n\n.monaco-hover code {\n\tfont-family: var(--monaco-monospace-font);\n}\n\n.monaco-hover hr {\n\tbox-sizing: border-box;\n\tborder-left: 0px;\n\tborder-right: 0px;\n\tmargin-top: 4px;\n\tmargin-bottom: -4px;\n\tmargin-left: -8px;\n\tmargin-right: -8px;\n\theight: 1px;\n}\n\n.monaco-hover p:first-child,\n.monaco-hover .code:first-child,\n.monaco-hover ul:first-child {\n\tmargin-top: 0;\n}\n\n.monaco-hover p:last-child,\n.monaco-hover .code:last-child,\n.monaco-hover ul:last-child {\n\tmargin-bottom: 0;\n}\n\n/* MarkupContent Layout */\n.monaco-hover ul {\n\tpadding-left: 20px;\n}\n.monaco-hover ol {\n\tpadding-left: 20px;\n}\n\n.monaco-hover li > p {\n\tmargin-bottom: 0;\n}\n\n.monaco-hover li > ul {\n\tmargin-top: 0;\n}\n\n.monaco-hover code {\n\tborder-radius: 3px;\n\tpadding: 0 0.4em;\n}\n\n.monaco-hover .monaco-tokenized-source {\n\twhite-space: pre-wrap;\n}\n\n.monaco-hover .hover-row.status-bar {\n\tfont-size: 12px;\n\tline-height: 22px;\n}\n\n.monaco-hover .hover-row.status-bar .actions {\n\tdisplay: flex;\n\tpadding: 0px 8px;\n}\n\n.monaco-hover .hover-row.status-bar .actions .action-container {\n\tmargin-right: 16px;\n\tcursor: pointer;\n}\n\n.monaco-hover .hover-row.status-bar .actions .action-container .action .icon {\n\tpadding-right: 4px;\n}\n\n.monaco-hover .markdown-hover .hover-contents .codicon {\n\tcolor: inherit;\n\tfont-size: inherit;\n\tvertical-align: middle;\n}\n\n.monaco-hover .hover-contents a.code-link:hover,\n.monaco-hover .hover-contents a.code-link {\n\tcolor: inherit;\n}\n\n.monaco-hover .hover-contents a.code-link:before {\n\tcontent: '(';\n}\n\n.monaco-hover .hover-contents a.code-link:after {\n\tcontent: ')';\n}\n\n.monaco-hover .hover-contents a.code-link > span {\n\ttext-decoration: underline;\n\t/** Hack to force underline to show **/\n\tborder-bottom: 1px solid transparent;\n\ttext-underline-position: under;\n}\n\n/** Spans in markdown hovers need a margin-bottom to avoid looking cramped: https://github.com/microsoft/vscode/issues/101496 **/\n.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span {\n\tmargin-bottom: 4px;\n\tdisplay: inline-block;\n}\n\n.monaco-hover-content .action-container a {\n\t-webkit-user-select: none;\n\tuser-select: none;\n}\n\n.monaco-hover-content .action-container.disabled {\n\tpointer-events: none;\n\topacity: 0.4;\n\tcursor: default;\n}\n",{});const IK=Iu;class LK extends Lt{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new fS(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class NK extends Lt{constructor(e,t,i){super(),this.actionContainer=xu(e,IK("div.action-container")),this.action=xu(this.actionContainer,IK("a.action")),this.action.setAttribute("role","button"),t.iconClass&&xu(this.action,IK(`span.icon.${t.iconClass}`));xu(this.action,IK("span")).textContent=i?`${t.label} (${i})`:t.label,this._register(Oh(this.actionContainer,wu.MOUSE_DOWN,(e=>{e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer)}))),this.setEnabled(!0)}static render(e,t,i){return new NK(e,t,i)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}class TK{constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new zt,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new zt,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new zt,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}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)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){for(let e=0;e{this.backgroundColor=e.getColor(vf)||jp.white}))),this._register(Oh(this.pickedColorNode,wu.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(Oh(s,wu.CLICK,(()=>{this.model.color=this.model.originalColor,this.model.flushColor()}))),this._register(i.onDidChangeColor(this.onDidChangeColor,this)),this._register(i.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=jp.Format.CSS.format(i.color)||"",this.pickedColorNode.classList.toggle("light",i.color.rgba.a<.5?this.backgroundColor.isLighter():i.color.isLighter()),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=jp.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(MK(".codicon.codicon-color-mode"))}}class BK extends Lt{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this.domNode=MK(".colorpicker-body"),xu(e,this.domNode),this.saturationBox=new OK(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 PK(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new zK(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new jp(new Qp(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new jp(new Qp(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new jp(new Qp(360===i?0:i,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class OK extends Lt{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new zt,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new zt,this.onColorFlushed=this._onColorFlushed.event,this.domNode=MK(".saturation-wrap"),xu(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",xu(this.domNode,this.canvas),this.selection=MK(".saturation-selection"),xu(this.domNode,this.selection),this.layout(),this._register(zh(this.domNode,(e=>this.onMouseDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(e){this.monitor=this._register(new Vp);const t=tu(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.buttons,zp,(e=>this.onDidChangePosition(e.posx-t.left,e.posy-t.top)),(()=>null));const i=Vh(document,(()=>{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 jp(new Qp(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 o=i.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this.canvas.width,this.canvas.height),i.fillStyle=jp.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=o,i.fill()}paintSelection(e,t){this.selection.style.left=e*this.width+"px",this.selection.style.top=this.height-t*this.height+"px"}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class FK extends Lt{constructor(e,t){super(),this.model=t,this._onDidChange=new zt,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new zt,this.onColorFlushed=this._onColorFlushed.event,this.domNode=xu(e,MK(".strip")),this.overlay=xu(this.domNode,MK(".overlay")),this.slider=xu(this.domNode,MK(".slider")),this.slider.style.top="0px",this._register(zh(this.domNode,(e=>this.onMouseDown(e)))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onMouseDown(e){const t=this._register(new Vp),i=tu(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.buttons,zp,(e=>this.onDidChangeTop(e.posy-i.top)),(()=>null));const n=Vh(document,(()=>{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 PK extends FK{constructor(e,t){super(e,t),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:i,b:n}=e.rgba,o=new jp(new Wp(t,i,n,1)),s=new jp(new Wp(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${s} 100%)`}getValue(e){return e.hsva.a}}class zK extends FK{constructor(e,t){super(e,t),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class VK extends Xx{constructor(e,t,i,n){super(),this.model=t,this.pixelRatio=i,this._register(jr.onDidChange((()=>this.layout())));const o=MK(".colorpicker-widget");e.appendChild(o);const s=new RK(o,this.model,n);this.body=new BK(o,this.model,this.pixelRatio),this._register(s),this._register(this.body)}layout(){this.body.layout()}}var HK=function(e,t,i,n){var o,s=arguments.length,r=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},WK=function(e,t){return function(i,n){t(i,n,e)}},UK=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class QK{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let jK=class{constructor(e,t){this._editor=e,this._themeService=t}computeSync(e,t){return[]}computeAsync(e,t,i){return xn.fromPromise(this._computeAsync(e,t,i))}_computeAsync(e,t,i){return UK(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return[];const e=IQ.get(this._editor);if(!e)return[];for(const i of t){if(!e.isColorDecorationId(i.id))continue;const t=e.getColorData(i.range.getStartPosition());if(t){return[yield this._createColorHover(this._editor.getModel(),t.colorInfo,t.provider)]}}return[]}))}_createColorHover(e,t,i){return UK(this,void 0,void 0,(function*(){const n=e.getValueInRange(t.range),{red:o,green:s,blue:r,alpha:a}=t.color,l=new Wp(Math.round(255*o),Math.round(255*s),Math.round(255*r),a),c=new jp(l),d=yield SQ(e,t,i,jt.None),h=new TK(c,[],0);return h.colorPresentations=d||[],h.guessColorPresentation(c,n),new QK(this,Gi.lift(t.range),h,i)}))}renderHoverParts(e,t){if(0===t.length||!this._editor.hasModel())return Lt.None;const i=new It,n=t[0],o=this._editor.getModel(),s=n.model,r=i.add(new VK(e.fragment,s,this._editor.getOption(129),this._themeService));e.setColorPicker(r);let a=new Gi(n.range.startLineNumber,n.range.startColumn,n.range.endLineNumber,n.range.endColumn);const l=()=>{let t,i;if(s.presentation.textEdit){t=[s.presentation.textEdit],i=new Gi(s.presentation.textEdit.range.startLineNumber,s.presentation.textEdit.range.startColumn,s.presentation.textEdit.range.endLineNumber,s.presentation.textEdit.range.endColumn);const e=this._editor.getModel()._setTrackedRange(null,i,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",t),i=this._editor.getModel()._getTrackedRange(e)||i}else t=[{identifier:null,range:a,text:s.presentation.label,forceMoveMarkers:!1}],i=a.setEndPosition(a.endLineNumber,a.startColumn+s.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",t);s.presentation.additionalTextEdits&&(t=[...s.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",t),e.hide()),this._editor.pushUndoStop(),a=i},c=e=>SQ(o,{range:a,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},n.provider,jt.None).then((e=>{s.colorPresentations=e||[]}));return i.add(s.onColorFlushed((e=>{c(e).then(l)}))),i.add(s.onDidChangeColor(c)),i}};jK=HK([WK(1,Tg)],jK);var KK=function(e,t,i,n){return new(i||(i=Promise))((function(o,s){function r(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(r,a)}l((n=n.apply(e,t||[])).next())}))},GK=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,o){(function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)})(n,o,(t=e[i](t)).done,t.value)}))}}};class YK{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class $K extends Lt{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new zt),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new An((()=>this._triggerAsyncComputation()),0)),this._secondWaitScheduler=this._register(new An((()=>this._triggerSyncComputation()),0)),this._loadingMessageScheduler=this._register(new An((()=>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(53).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=function(e){const t=new Gt,i=e(t.token);return new Sn(t,(e=>sn(this,void 0,void 0,(function*(){var n,o;const s=t.token.onCancellationRequested((()=>{s.dispose(),t.dispose(),e.reject(new At)}));try{try{for(var r,a=rn(i);!(r=yield a.next()).done;){const i=r.value;if(t.token.isCancellationRequested)return;e.emitOne(i)}}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=a.return)&&(yield o.call(a))}finally{if(n)throw n.error}}s.dispose(),t.dispose()}catch(i){s.dispose(),t.dispose(),e.reject(i)}}))))}((e=>this._computer.computeAsync(e))),(()=>{KK(this,void 0,void 0,(function*(){var e,t;try{try{for(var i,n=GK(this._asyncIterable);!(i=yield n.next()).done;){const e=i.value;e&&(this._result.push(e),this._fireResult())}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&(yield t.call(n))}finally{if(e)throw e.error}}this._asyncIterableDone=!0,3!==this._state&&4!==this._state||this._setState(0)}catch(e){gt(e)}}))})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){3===this._state&&this._setState(4)}_fireResult(){if(1===this._state||2===this._state)return;const e=0===this._state,t=4===this._state;this._onResult.fire(new YK(this._result.slice(0),e,t))}start(e){if(0===e)0===this._state&&(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()}}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 qK{constructor(e,t){this.priority=e,this.range=t,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class JK{constructor(e,t,i){this.priority=e,this.owner=t,this.range=i,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}} /*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */var XK=Object.hasOwnProperty,ZK=Object.setPrototypeOf,eG=Object.isFrozen,tG=Object.getPrototypeOf,iG=Object.getOwnPropertyDescriptor,nG=Object.freeze,oG=Object.seal,sG=Object.create,rG="undefined"!=typeof Reflect&&Reflect,aG=rG.apply,lG=rG.construct;aG||(aG=function(e,t,i){return e.apply(t,i)}),nG||(nG=function(e){return e}),oG||(oG=function(e){return e}),lG||(lG=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t1?i-1:0),o=1;o/gm),FG=oG(/^data-[\-\w.\u00B7-\uFFFF]/),PG=oG(/^aria-[\-\w]+$/),zG=oG(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),VG=oG(/^(?:\w+script|data):/i),HG=oG(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),WG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function UG(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:QG(),i=function(t){return e(t)};if(i.version="2.3.1",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;var n=t.document,o=t.document,s=t.DocumentFragment,r=t.HTMLTemplateElement,a=t.Node,l=t.Element,c=t.NodeFilter,d=t.NamedNodeMap,h=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,u=t.Text,g=t.Comment,p=t.DOMParser,m=t.trustedTypes,f=l.prototype,_=yG(f,"cloneNode"),A=yG(f,"nextSibling"),b=yG(f,"childNodes"),w=yG(f,"parentNode");if("function"==typeof r){var C=o.createElement("template");C.content&&C.content.ownerDocument&&(o=C.content.ownerDocument)}var v=function(e,t){if("object"!==(void 0===e?"undefined":WG(e))||"function"!=typeof e.createPolicy)return null;var i=null,n="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(n)&&(i=t.currentScript.getAttribute(n));var o="dompurify"+(i?"#"+i:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(m,n),y=v&&te?v.createHTML(""):"",x=o,S=x.implementation,E=x.createNodeIterator,k=x.createDocumentFragment,D=x.getElementsByTagName,I=n.importNode,L={};try{L=vG(o).documentMode?o.documentMode:{}}catch(e){}var N={};i.isSupported="function"==typeof w&&S&&void 0!==S.createHTMLDocument&&9!==L;var T=BG,M=OG,R=FG,B=PG,O=VG,F=HG,P=zG,z=null,V=CG({},[].concat(UG(xG),UG(SG),UG(EG),UG(DG),UG(LG))),H=null,W=CG({},[].concat(UG(NG),UG(TG),UG(MG),UG(RG))),U=null,Q=null,j=!0,K=!0,G=!1,Y=!1,$=!1,q=!1,J=!1,X=!1,Z=!1,ee=!0,te=!1,ie=!0,ne=!0,oe=!1,se={},re=null,ae=CG({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),le=null,ce=CG({},["audio","video","img","source","image","track"]),de=null,he=CG({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ue="http://www.w3.org/1998/Math/MathML",ge="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",me=pe,fe=!1,_e=null,Ae=o.createElement("form"),be=function(e){_e&&_e===e||(e&&"object"===(void 0===e?"undefined":WG(e))||(e={}),e=vG(e),z="ALLOWED_TAGS"in e?CG({},e.ALLOWED_TAGS):V,H="ALLOWED_ATTR"in e?CG({},e.ALLOWED_ATTR):W,de="ADD_URI_SAFE_ATTR"in e?CG(vG(he),e.ADD_URI_SAFE_ATTR):he,le="ADD_DATA_URI_TAGS"in e?CG(vG(ce),e.ADD_DATA_URI_TAGS):ce,re="FORBID_CONTENTS"in e?CG({},e.FORBID_CONTENTS):ae,U="FORBID_TAGS"in e?CG({},e.FORBID_TAGS):{},Q="FORBID_ATTR"in e?CG({},e.FORBID_ATTR):{},se="USE_PROFILES"in e&&e.USE_PROFILES,j=!1!==e.ALLOW_ARIA_ATTR,K=!1!==e.ALLOW_DATA_ATTR,G=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=e.SAFE_FOR_TEMPLATES||!1,$=e.WHOLE_DOCUMENT||!1,X=e.RETURN_DOM||!1,Z=e.RETURN_DOM_FRAGMENT||!1,ee=!1!==e.RETURN_DOM_IMPORT,te=e.RETURN_TRUSTED_TYPE||!1,J=e.FORCE_BODY||!1,ie=!1!==e.SANITIZE_DOM,ne=!1!==e.KEEP_CONTENT,oe=e.IN_PLACE||!1,P=e.ALLOWED_URI_REGEXP||P,me=e.NAMESPACE||pe,Y&&(K=!1),Z&&(X=!0),se&&(z=CG({},[].concat(UG(LG))),H=[],!0===se.html&&(CG(z,xG),CG(H,NG)),!0===se.svg&&(CG(z,SG),CG(H,TG),CG(H,RG)),!0===se.svgFilters&&(CG(z,EG),CG(H,TG),CG(H,RG)),!0===se.mathMl&&(CG(z,DG),CG(H,MG),CG(H,RG))),e.ADD_TAGS&&(z===V&&(z=vG(z)),CG(z,e.ADD_TAGS)),e.ADD_ATTR&&(H===W&&(H=vG(H)),CG(H,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&CG(de,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(re===ae&&(re=vG(re)),CG(re,e.FORBID_CONTENTS)),ne&&(z["#text"]=!0),$&&CG(z,["html","head","body"]),z.table&&(CG(z,["tbody"]),delete U.tbody),nG&&nG(e),_e=e)},we=CG({},["mi","mo","mn","ms","mtext"]),Ce=CG({},["foreignobject","desc","title","annotation-xml"]),ve=CG({},SG);CG(ve,EG),CG(ve,kG);var ye=CG({},DG);CG(ye,IG);var xe=function(e){uG(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=y}catch(t){e.remove()}}},Se=function(e,t){try{uG(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){uG(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!H[e])if(X||Z)try{xe(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Ee=function(e){var t=void 0,i=void 0;if(J)e=""+e;else{var n=pG(e,/^[\r\n\t ]+/);i=n&&n[0]}var s=v?v.createHTML(e):e;if(me===pe)try{t=(new p).parseFromString(s,"text/html")}catch(e){}if(!t||!t.documentElement){t=S.createDocument(me,"template",null);try{t.documentElement.innerHTML=fe?"":s}catch(e){}}var r=t.body||t.documentElement;return e&&i&&r.insertBefore(o.createTextNode(i),r.childNodes[0]||null),me===pe?D.call(t,$?"html":"body")[0]:$?t.documentElement:r},ke=function(e){return E.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},De=function(e){return"object"===(void 0===a?"undefined":WG(a))?e instanceof a:e&&"object"===(void 0===e?"undefined":WG(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Ie=function(e,t,n){N[e]&&dG(N[e],(function(e){e.call(i,t,n,_e)}))},Le=function(e){var t,n=void 0;if(Ie("beforeSanitizeElements",e,null),!((t=e)instanceof u||t instanceof g||"string"==typeof t.nodeName&&"string"==typeof t.textContent&&"function"==typeof t.removeChild&&t.attributes instanceof h&&"function"==typeof t.removeAttribute&&"function"==typeof t.setAttribute&&"string"==typeof t.namespaceURI&&"function"==typeof t.insertBefore))return xe(e),!0;if(pG(e.nodeName,/[\u0080-\uFFFF]/))return xe(e),!0;var o=gG(e.nodeName);if(Ie("uponSanitizeElement",e,{tagName:o,allowedTags:z}),!De(e.firstElementChild)&&(!De(e.content)||!De(e.content.firstElementChild))&&AG(/<[/\w]/g,e.innerHTML)&&AG(/<[/\w]/g,e.textContent))return xe(e),!0;if("select"===o&&AG(/