|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{"+3Gp":function(mt,M,t){"use strict";t.d(M,"a",function(){return A}),t.d(M,"b",function(){return I});var f=t("MNsG"),B=t("Yr1X");const x=f.f?1.5:1.35,N=8;class A{constructor(L){this._bareFontInfoBrand=void 0,this.zoomLevel=L.zoomLevel,this.pixelRatio=L.pixelRatio,this.fontFamily=String(L.fontFamily),this.fontWeight=String(L.fontWeight),this.fontSize=L.fontSize,this.fontFeatureSettings=L.fontFeatureSettings,this.lineHeight=L.lineHeight|0,this.letterSpacing=L.letterSpacing}static createFromValidatedSettings(L,v,m,d){const D=L.get(42),S=L.get(46),r=L.get(45),_=L.get(44),b=L.get(58),h=L.get(55);return A._create(D,S,r,_,b,h,v,m,d)}static _create(L,v,m,d,D,S,r,_,b){D===0?D=x*m:D<N&&(D=D*m),D=Math.round(D),D<N&&(D=N);const h=1+(b?0:B.a.getZoomLevel()*.1);return m*=h,D*=h,new A({zoomLevel:r,pixelRatio:_,fontFamily:L,fontWeight:v,fontSize:m,fontFeatureSettings:d,lineHeight:D,letterSpacing:S})}getId(){return this.zoomLevel+"-"+this.pixelRatio+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.fontFeatureSettings+"-"+this.lineHeight+"-"+this.letterSpacing}getMassagedFontFamily(L){const v=A._wrapInQuotes(this.fontFamily);return L&&this.fontFamily!==L?`${v}, ${L}`:v}static _wrapInQuotes(L){return/[,"']/.test(L)?L:/[+ ]/.test(L)?`"${L}"`:L}}const F=1;class I extends A{constructor(L,v){super(L);this._editorStylingBrand=void 0,this.version=F,this.isTrusted=v,this.isMonospace=L.isMonospace,this.typicalHalfwidthCharacterWidth=L.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=L.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=L.canUseHalfwidthRightwardsArrow,this.spaceWidth=L.spaceWidth,this.middotWidth=L.middotWidth,this.wsmiddotWidth=L.wsmiddotWidth,this.maxDigitWidth=L.maxDigitWidth}equals(L){return this.fontFamily===L.fontFamily&&this.fontWeight===L.fontWeight&&this.fontSize===L.fontSize&&this.fontFeatureSettings===L.fontFeatureSettings&&this.lineHeight===L.lineHeight&&this.letterSpacing===L.letterSpacing&&this.typicalHalfwidthCharacterWidth===L.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===L.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===L.canUseHalfwidthRightwardsArrow&&this.spaceWidth===L.spaceWidth&&this.middotWidth===L.middotWidth&&this.wsmiddotWidth===L.wsmiddotWidth&&this.maxDigitWidth===L.maxDigitWidth}}},"+7oY":function(mt,M,t){"use strict";t.d(M,"a",function(){return N}),t.d(M,"g",function(){return A}),t.d(M,"b",function(){return F}),t.d(M,"f",function(){return I}),t.d(M,"d",function(){return v}),t.d(M,"c",function(){return m}),t.d(M,"e",function(){return d});var f=t("CRAX"),B=t("Cg/j"),x=t("ic2d");const N=Object(B.c)("configurationService");function A(D,S){const r=Object.create(null);for(let _ in D)F(r,_,D[_],S);return r}function F(D,S,r,_){const b=S.split("."),h=b.pop();let c=D;for(let p=0;p<b.length;p++){let E=b[p],y=c[E];switch(typeof y){case"undefined":y=c[E]=Object.create(null);break;case"object":break;default:_(`Ignoring ${S} as ${b.slice(0,p+1).join(".")} is ${JSON.stringify(y)}`);return}c=y}if(typeof c=="object"&&c!==null)try{c[h]=r}catch(p){_(`Ignoring ${S} as ${b.join(".")} is ${JSON.stringify(c)}`)}else _(`Ignoring ${S} as ${b.join(".")} is ${JSON.stringify(c)}`)}function I(D,S){const r=S.split(".");L(D,r)}function L(D,S){const r=S.shift();if(S.length===0){delete D[r];return}if(Object.keys(D).indexOf(r)!==-1){const _=D[r];typeof _=="object"&&!Array.isArray(_)&&(L(_,S),Object.keys(_).length===0&&delete D[r])}}function v(D,S,r){function _(c,p){let E=c;for(const y of p){if(typeof E!="object"||E===null)return;E=E[y]}return E}const b=S.split("."),h=_(D,b);return typeof h=="undefined"?r:h}function m(){const D=x.a.as(f.a.Configuration).getConfigurationProperties();return Object.keys(D)}function d(){const D=Object.create(null),S=x.a.as(f.a.Configuration).getConfigurationProperties();for(let r in S){let _=S[r].default;F(D,r,_,b=>console.error(`Conflict in default settings: ${b}`))}return D}},"+Fos":function(mt,M,t){"use strict";t.d(M,"a",function(){return I});var f=t("Ll0s"),B=t("cGHE"),x=t("aokT"),N=t("N0LK"),A=t("cIqD");class F{constructor(L,v,m){this._cursorPositionBrand=void 0,this.lineNumber=L,this.column=v,this.leftoverVisibleColumns=m}}class I{static leftPosition(L,v){if(v.column>L.getLineMinColumn(v.lineNumber))return v.delta(void 0,-N.L(L.getLineContent(v.lineNumber),v.column-1));if(v.lineNumber>1){const m=v.lineNumber-1;return new B.a(m,L.getLineMaxColumn(m))}else return v}static leftPositionAtomicSoftTabs(L,v,m){if(v.column<=L.getLineIndentColumn(v.lineNumber)){const d=L.getLineMinColumn(v.lineNumber),D=L.getLineContent(v.lineNumber),S=A.a.atomicPosition(D,v.column-1,m,0);if(S!==-1&&S+1>=d)return new B.a(v.lineNumber,S+1)}return this.leftPosition(L,v)}static left(L,v,m){const d=L.stickyTabStops?I.leftPositionAtomicSoftTabs(v,m,L.tabSize):I.leftPosition(v,m);return new F(d.lineNumber,d.column,0)}static moveLeft(L,v,m,d,D){let S,r;if(m.hasSelection()&&!d)S=m.selection.startLineNumber,r=m.selection.startColumn;else{const _=m.position.delta(void 0,-(D-1)),b=v.normalizePosition(I.clipPositionColumn(_,v),0),h=I.left(L,v,b);S=h.lineNumber,r=h.column}return m.move(d,S,r,0)}static clipPositionColumn(L,v){return new B.a(L.lineNumber,I.clipRange(L.column,v.getLineMinColumn(L.lineNumber),v.getLineMaxColumn(L.lineNumber)))}static clipRange(L,v,m){return L<v?v:L>m?m:L}static rightPosition(L,v,m){return m<L.getLineMaxColumn(v)?m=m+N.K(L.getLineContent(v),m-1):v<L.getLineCount()&&(v=v+1,m=L.getLineMinColumn(v)),new B.a(v,m)}static rightPositionAtomicSoftTabs(L,v,m,d,D){if(m<L.getLineIndentColumn(v)){const S=L.getLineContent(v),r=A.a.atomicPosition(S,m-1,d,1);if(r!==-1)return new B.a(v,r+1)}return this.rightPosition(L,v,m)}static right(L,v,m){const d=L.stickyTabStops?I.rightPositionAtomicSoftTabs(v,m.lineNumber,m.column,L.tabSize,L.indentSize):I.rightPosition(v,m.lineNumber,m.column);return new F(d.lineNumber,d.column,0)}static moveRight(L,v,m,d,D){let S,r;if(m.hasSelection()&&!d)S=m.selection.endLineNumber,r=m.selection.endColumn;else{const _=m.position.delta(void 0,D-1),b=v.normalizePosition(I.clipPositionColumn(_,v),1),h=I.right(L,v,b);S=h.lineNumber,r=h.column}return m.move(d,S,r,0)}static vertical(L,v,m,d,D,S,r){const _=f.a.visibleColumnFromColumn(v.getLineContent(m),d,L.tabSize)+D,b=v.getLineCount(),h=m===1&&d===1,c=m===b&&d===v.getLineMaxColumn(m),p=S<m?h:c;return m=S,m<1?(m=1,r?d=v.getLineMinColumn(m):d=Math.min(v.getLineMaxColumn(m),d)):m>b?(m=b,r?d=v.getLineMaxColumn(m):d=Math.min(v.getLineMaxColumn(m),d)):d=f.a.columnFromVisibleColumn2(L,v,m,_),p?D=0:D=_-f.a.visibleColumnFromColumn(v.getLineContent(m),d,L.tabSize),new F(m,d,D)}static down(L,v,m,d,D,S,r){return this.vertical(L,v,m,d,D,m+S,r)}static moveDown(L,v,m,d,D){let S,r;m.hasSelection()&&!d?(S=m.selection.endLineNumber,r=m.selection.endColumn):(S=m.position.lineNumber,r=m.position.column);let _=I.down(L,v,S,r,m.leftoverVisibleColumns,D,!0);return m.move(d,_.lineNumber,_.column,_.leftoverVisibleColumns)}static translateDown(L,v,m){let d=m.selection,D=I.down(L,v,d.selectionStartLineNumber,d.selectionStartColumn,m.selectionStartLeftoverVisibleColumns,1,!1),S=I.down(L,v,d.positionLineNumber,d.positionColumn,m.leftoverVisibleColumns,1,!1);return new f.f(new x.a(D.lineNumber,D.column,D.lineNumber,D.column),D.leftoverVisibleColumns,new B.a(S.lineNumber,S.column),S.leftoverVisibleColumns)}static up(L,v,m,d,D,S,r){return this.vertical(L,v,m,d,D,m-S,r)}static moveUp(L,v,m,d,D){let S,r;m.hasSelection()&&!d?(S=m.selection.startLineNumber,r=m.selection.startColumn):(S=m.position.lineNumber,r=m.position.column);let _=I.up(L,v,S,r,m.leftoverVisibleColumns,D,!0);return m.move(d,_.lineNumber,_.column,_.leftoverVisibleColumns)}static translateUp(L,v,m){let d=m.selection,D=I.up(L,v,d.selectionStartLineNumber,d.selectionStartColumn,m.selectionStartLeftoverVisibleColumns,1,!1),S=I.up(L,v,d.positionLineNumber,d.positionColumn,m.leftoverVisibleColumns,1,!1);return new f.f(new x.a(D.lineNumber,D.column,D.lineNumber,D.column),D.leftoverVisibleColumns,new B.a(S.lineNumber,S.column),S.leftoverVisibleColumns)}static _isBlankLine(L,v){return L.getLineFirstNonWhitespaceColumn(v)===0}static moveToPrevBlankLine(L,v,m,d){let D=m.position.lineNumber;for(;D>1&&this._isBlankLine(v,D);)D--;for(;D>1&&!this._isBlankLine(v,D);)D--;return m.move(d,D,v.getLineMinColumn(D),0)}static moveToNextBlankLine(L,v,m,d){const D=v.getLineCount();let S=m.position.lineNumber;for(;S<D&&this._isBlankLine(v,S);)S++;for(;S<D&&!this._isBlankLine(v,S);)S++;return m.move(d,S,v.getLineMinColumn(S),0)}static moveToBeginningOfLine(L,v,m,d){let D=m.position.lineNumber,S=v.getLineMinColumn(D),r=v.getLineFirstNonWhitespaceColumn(D)||S,_,b=m.position.column;return b===r?_=S:_=r,m.move(d,D,_,0)}static moveToEndOfLine(L,v,m,d,D){let S=m.position.lineNumber,r=v.getLineMaxColumn(S);return m.move(d,S,r,D?1073741824-r:0)}static moveToBeginningOfBuffer(L,v,m,d){return m.move(d,1,1,0)}static moveToEndOfBuffer(L,v,m,d){let D=v.getLineCount(),S=v.getLineMaxColumn(D);return m.move(d,D,S,0)}}},"+a1H":function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:function(){return t.e(331).then(t.bind(null,"O3xE"))}})},"+hIS":function(mt,M,t){"use strict";t.d(M,"a",function(){return F});var f=t("+sZP"),B={},x={},N=function(){function I(L){var v=this;this._languageId=L,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(function(m,d){v._lazyLoadPromiseResolve=m,v._lazyLoadPromiseReject=d})}return I.getOrCreate=function(L){return x[L]||(x[L]=new I(L)),x[L]},I.prototype.whenLoaded=function(){return this._lazyLoadPromise},I.prototype.load=function(){var L=this;return this._loadingTriggered||(this._loadingTriggered=!0,B[this._languageId].loader().then(function(v){return L._lazyLoadPromiseResolve(v)},function(v){return L._lazyLoadPromiseReject(v)})),this._lazyLoadPromise},I}();function A(I){return N.getOrCreate(I).load()}function F(I){var L=I.id;B[L]=I,f.languages.register(I);var v=N.getOrCreate(L);f.languages.setMonarchTokensProvider(L,v.whenLoaded().then(function(m){return m.language})),f.languages.onLanguage(L,function(){v.load().then(function(m){f.languages.setLanguageConfiguration(L,m.conf)})})}},"+sZP":function(mt,M,t){"use strict";var f=t("M/lh"),B=t.n(f);t.o(f,"languages")&&t.d(M,"languages",function(){return f.languages})},"/6w4":function(mt,M,t){},"/RFl":function(mt,M,t){"use strict";t.r(M),t.d(M,"DragAndDropController",function(){return d});var f=t("pmY6"),B=t("MNsG"),x=t("OhnE"),N=t("sswD"),A=t("cGHE"),F=t("aokT"),I=t("gCVg"),L=t("tX9W");class v{constructor(D,S,r){this.selection=D,this.targetPosition=S,this.copy=r,this.targetSelection=null}getEditOperations(D,S){let r=D.getValueInRange(this.selection);if(this.copy||S.addEditOperation(this.selection,null),S.addEditOperation(new F.a(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),r),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new I.a(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new I.a(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new I.a(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new I.a(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new I.a(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(D,S){return this.targetSelection}}function m(D){return B.f?D.altKey:D.ctrlKey}class d extends f.a{constructor(D){super();this._editor=D,this._register(this._editor.onMouseDown(S=>this._onEditorMouseDown(S))),this._register(this._editor.onMouseUp(S=>this._onEditorMouseUp(S))),this._register(this._editor.onMouseDrag(S=>this._onEditorMouseDrag(S))),this._register(this._editor.onMouseDrop(S=>this._onEditorMouseDrop(S))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(S=>this.onEditorKeyDown(S))),this._register(this._editor.onKeyUp(S=>this.onEditorKeyUp(S))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._dndDecorationIds=[],this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(D){if(!this._editor.getOption(31)||this._editor.getOption(18))return;m(D)&&(this._modifierPressed=!0),this._mouseDown&&m(D)&&this._editor.updateOptions({mouseStyle:"copy"})}onEditorKeyUp(D){if(!this._editor.getOption(31)||this._editor.getOption(18))return;m(D)&&(this._modifierPressed=!1),this._mouseDown&&D.keyCode===d.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"})}_onEditorMouseDown(D){this._mouseDown=!0}_onEditorMouseUp(D){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(D){let S=D.target;if(this._dragSelection===null){const r=this._editor.getSelections()||[];let _=r.filter(b=>S.position&&b.containsPosition(S.position));if(_.length===1)this._dragSelection=_[0];else return}m(D.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),S.position&&(this._dragSelection.containsPosition(S.position)?this._removeDecoration():this.showAt(S.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(D){if(D.target&&(this._hitContent(D.target)||this._hitMargin(D.target))&&D.target.position){let S=new A.a(D.target.position.lineNumber,D.target.position.column);if(this._dragSelection===null){let r=null;if(D.event.shiftKey){let _=this._editor.getSelection();if(_){const{selectionStartLineNumber:b,selectionStartColumn:h}=_;r=[new I.a(b,h,S.lineNumber,S.column)]}}else r=(this._editor.getSelections()||[]).map(_=>_.containsPosition(S)?new I.a(S.lineNumber,S.column,S.lineNumber,S.column):_);this._editor.setSelections(r||[],"mouse",3)}else(!this._dragSelection.containsPosition(S)||(m(D.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(S)||this._dragSelection.getStartPosition().equals(S)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(d.ID,new v(this._dragSelection,S,m(D.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(D){let S=[{range:new F.a(D.lineNumber,D.column,D.lineNumber,D.column),options:d._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,S),this._editor.revealPosition(D,1)}_removeDecoration(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}_hitContent(D){return D.type===6||D.type===7}_hitMargin(D){return D.type===2||D.type===3||D.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}d.ID="editor.contrib.dragAndDrop",d.TRIGGER_KEY_VALUE=B.f?6:5,d._DECORATION_OPTIONS=L.b.register({description:"dnd-target",className:"dnd-target"}),Object(N.l)(d.ID,d)},"/UlZ":function(mt,M,t){"use strict";t.d(M,"h",function(){return N}),t.d(M,"b",function(){return A}),t.d(M,"j",function(){return F}),t.d(M,"a",function(){return I}),t.d(M,"k",function(){return d}),t.d(M,"l",function(){return S}),t.d(M,"o",function(){return h}),t.d(M,"i",function(){return k}),t.d(M,"e",function(){return oe}),t.d(M,"f",function(){return ee}),t.d(M,"n",function(){return ue}),t.d(M,"c",function(){return bt}),t.d(M,"d",function(){return Tt}),t.d(M,"m",function(){return $t}),t.d(M,"g",function(){return it});var f=t("3/fG"),B=t("MNsG"),x=t("0JNc");const N=8;class A{constructor(re){this._values=re}hasChanged(re){return this._values[re]}}class F{constructor(){this._values=[]}_read(re){return this._values[re]}get(re){return this._values[re]}_write(re,We){this._values[re]=We}}class I{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class L{constructor(re,We,tt,Et){this.id=re,this.name=We,this.defaultValue=tt,this.schema=Et}compute(re,We,tt){return tt}}class v{constructor(re,We=null){this.schema=void 0,this.id=re,this.name="_never_",this.defaultValue=void 0,this.deps=We}validate(re){return this.defaultValue}}class m{constructor(re,We,tt,Et){this.id=re,this.name=We,this.defaultValue=tt,this.schema=Et}validate(re){return typeof re=="undefined"?this.defaultValue:re}compute(re,We,tt){return tt}}function d(re,We){return typeof re=="undefined"?We:re==="false"?!1:Boolean(re)}class D extends m{constructor(re,We,tt,Et=void 0){typeof Et!="undefined"&&(Et.type="boolean",Et.default=tt),super(re,We,tt,Et)}validate(re){return d(re,this.defaultValue)}}function S(re,We,tt,Et){if(typeof re=="undefined")return We;let It=parseInt(re,10);return isNaN(It)?We:(It=Math.max(tt,It),It=Math.min(Et,It),It|0)}class r extends m{constructor(re,We,tt,Et,It,Rt=void 0){typeof Rt!="undefined"&&(Rt.type="integer",Rt.default=tt,Rt.minimum=Et,Rt.maximum=It),super(re,We,tt,Rt),this.minimum=Et,this.maximum=It}static clampedInt(re,We,tt,Et){return S(re,We,tt,Et)}validate(re){return r.clampedInt(re,this.defaultValue,this.minimum,this.maximum)}}class _ extends m{constructor(re,We,tt,Et,It){typeof It!="undefined"&&(It.type="number",It.default=tt),super(re,We,tt,It),this.validationFn=Et}static clamp(re,We,tt){return re<We?We:re>tt?tt:re}static float(re,We){if(typeof re=="number")return re;if(typeof re=="undefined")return We;const tt=parseFloat(re);return isNaN(tt)?We:tt}validate(re){return this.validationFn(_.float(re,this.defaultValue))}}class b extends m{static string(re,We){return typeof re!="string"?We:re}constructor(re,We,tt,Et=void 0){typeof Et!="undefined"&&(Et.type="string",Et.default=tt),super(re,We,tt,Et)}validate(re){return b.string(re,this.defaultValue)}}function h(re,We,tt){return typeof re!="string"||tt.indexOf(re)===-1?We:re}class c extends m{constructor(re,We,tt,Et,It=void 0){typeof It!="undefined"&&(It.type="string",It.enum=Et,It.default=tt),super(re,We,tt,It),this._allowedValues=Et}validate(re){return h(re,this.defaultValue,this._allowedValues)}}class p extends L{constructor(re,We,tt,Et,It,Rt,vo=void 0){typeof vo!="undefined"&&(vo.type="string",vo.enum=It,vo.default=Et),super(re,We,tt,vo),this._allowedValues=It,this._convert=Rt}validate(re){return typeof re!="string"?this.defaultValue:this._allowedValues.indexOf(re)===-1?this.defaultValue:this._convert(re)}}function E(re){switch(re){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class y extends L{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[f.a("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),f.a("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),f.a("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:f.a("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(re){switch(re){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(re,We,tt){return tt===0?re.accessibilitySupport:tt}}class C extends L{constructor(){const re={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",re,{"editor.comments.insertSpace":{type:"boolean",default:re.insertSpace,description:f.a("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:re.ignoreEmptyLines,description:f.a("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(re){if(!re||typeof re!="object")return this.defaultValue;const We=re;return{insertSpace:d(We.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:d(We.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function O(re){switch(re){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var k;(function(re){re[re.Line=1]="Line",re[re.Block=2]="Block",re[re.Underline=3]="Underline",re[re.LineThin=4]="LineThin",re[re.BlockOutline=5]="BlockOutline",re[re.UnderlineThin=6]="UnderlineThin"})(k||(k={}));function Y(re){switch(re){case"line":return k.Line;case"block":return k.Block;case"underline":return k.Underline;case"line-thin":return k.LineThin;case"block-outline":return k.BlockOutline;case"underline-thin":return k.UnderlineThin}}class Q extends v{constructor(){super(126,[65,33])}compute(re,We,tt){const Et=["monaco-editor"];return We.get(33)&&Et.push(We.get(33)),re.extraEditorClassName&&Et.push(re.extraEditorClassName),We.get(65)==="default"?Et.push("mouse-default"):We.get(65)==="copy"&&Et.push("mouse-copy"),We.get(99)&&Et.push("showUnused"),We.get(124)&&Et.push("showDeprecated"),Et.join(" ")}}class H extends D{constructor(){super(32,"emptySelectionClipboard",!0,{description:f.a("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(re,We,tt){return tt&&re.emptySelectionClipboard}}class Z extends L{constructor(){const re={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",re,{"editor.find.cursorMoveOnType":{type:"boolean",default:re.cursorMoveOnType,description:f.a("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:re.seedSearchStringFromSelection,enumDescriptions:[f.a("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),f.a("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),f.a("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:f.a("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:re.autoFindInSelection,enumDescriptions:[f.a("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),f.a("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),f.a("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:f.a("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:re.globalFindClipboard,description:f.a("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:B.f},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:re.addExtraSpaceOnTop,description:f.a("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:re.loop,description:f.a("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(re){if(!re||typeof re!="object")return this.defaultValue;const We=re;return{cursorMoveOnType:d(We.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof re.seedSearchStringFromSelection=="boolean"?re.seedSearchStringFromSelection?"always":"never":h(We.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof re.autoFindInSelection=="boolean"?re.autoFindInSelection?"always":"never":h(We.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:d(We.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:d(We.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:d(We.loop,this.defaultValue.loop)}}}class oe extends L{constructor(){super(44,"fontLigatures",oe.OFF,{anyOf:[{type:"boolean",description:f.a("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:f.a("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:f.a("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(re){return typeof re=="undefined"?this.defaultValue:typeof re=="string"?re==="false"?oe.OFF:re==="true"?oe.ON:re:Boolean(re)?oe.ON:oe.OFF}}oe.OFF='"liga" off, "calt" off',oe.ON='"liga" on, "calt" on';class $ extends v{constructor(){super(43)}compute(re,We,tt){return re.fontInfo}}class te extends m{constructor(){super(45,"fontSize",bt.fontSize,{type:"number",minimum:6,maximum:100,default:bt.fontSize,description:f.a("fontSize","Controls the font size in pixels.")})}validate(re){let We=_.float(re,this.defaultValue);return We===0?bt.fontSize:_.clamp(We,6,100)}compute(re,We,tt){return re.fontInfo.fontSize}}class ne extends L{constructor(){super(46,"fontWeight",bt.fontWeight,{anyOf:[{type:"number",minimum:ne.MINIMUM_VALUE,maximum:ne.MAXIMUM_VALUE,errorMessage:f.a("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:ne.SUGGESTION_VALUES}],default:bt.fontWeight,description:f.a("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(re){return re==="normal"||re==="bold"?re:String(r.clampedInt(re,bt.fontWeight,ne.MINIMUM_VALUE,ne.MAXIMUM_VALUE))}}ne.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],ne.MINIMUM_VALUE=1,ne.MAXIMUM_VALUE=1e3;class Ee extends L{constructor(){const re={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:""},We={type:"string",enum:["peek","gotoAndPeek","goto"],default:re.multiple,enumDescriptions:[f.a("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),f.a("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),f.a("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},tt=["","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(50,"gotoLocation",re,{"editor.gotoLocation.multiple":{deprecationMessage:f.a("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:f.a("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},We),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:f.a("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},We),"editor.gotoLocation.multipleDeclarations":Object.assign({description:f.a("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},We),"editor.gotoLocation.multipleImplementations":Object.assign({description:f.a("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},We),"editor.gotoLocation.multipleReferences":Object.assign({description:f.a("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},We),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:re.alternativeDefinitionCommand,enum:tt,description:f.a("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:re.alternativeTypeDefinitionCommand,enum:tt,description:f.a("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:re.alternativeDeclarationCommand,enum:tt,description:f.a("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:re.alternativeImplementationCommand,enum:tt,description:f.a("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:re.alternativeReferenceCommand,enum:tt,description:f.a("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(re){var We,tt,Et,It,Rt;if(!re||typeof re!="object")return this.defaultValue;const vo=re;return{multiple:h(vo.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(We=vo.multipleDefinitions)!==null&&We!==void 0?We:h(vo.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(tt=vo.multipleTypeDefinitions)!==null&&tt!==void 0?tt:h(vo.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(Et=vo.multipleDeclarations)!==null&&Et!==void 0?Et:h(vo.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(It=vo.multipleImplementations)!==null&&It!==void 0?It:h(vo.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(Rt=vo.multipleReferences)!==null&&Rt!==void 0?Rt:h(vo.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:b.string(vo.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:b.string(vo.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:b.string(vo.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:b.string(vo.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:b.string(vo.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class fe extends L{constructor(){const re={enabled:!0,delay:300,sticky:!0,above:!0};super(52,"hover",re,{"editor.hover.enabled":{type:"boolean",default:re.enabled,description:f.a("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:re.delay,description:f.a("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:re.sticky,description:f.a("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:re.above,description:f.a("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(re){if(!re||typeof re!="object")return this.defaultValue;const We=re;return{enabled:d(We.enabled,this.defaultValue.enabled),delay:r.clampedInt(We.delay,this.defaultValue.delay,0,1e4),sticky:d(We.sticky,this.defaultValue.sticky),above:d(We.above,this.defaultValue.above)}}}class ee extends v{constructor(){super(129,[49,57,37,64,91,59,60,93,116,119,120,121,2])}compute(re,We,tt){return ee.computeLayout(We,{memory:re.memory,outerWidth:re.outerWidth,outerHeight:re.outerHeight,isDominatedByLongLines:re.isDominatedByLongLines,lineHeight:re.fontInfo.lineHeight,viewLineCount:re.viewLineCount,lineNumbersDigitCount:re.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:re.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:re.fontInfo.maxDigitWidth,pixelRatio:re.pixelRatio})}static computeContainedMinimapLineCount(re){const We=re.height/re.lineHeight,tt=re.scrollBeyondLastLine?We-1:0,Et=(re.viewLineCount+tt)/(re.pixelRatio*re.height),It=Math.floor(re.viewLineCount/Et);return{typicalViewportLineCount:We,extraLinesBeyondLastLine:tt,desiredRatio:Et,minimapLineCount:It}}static _computeMinimapLayout(re,We){const tt=re.outerWidth,Et=re.outerHeight,It=re.pixelRatio;if(!re.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(It*Et),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:Et};const Rt=We.stableMinimapLayoutInput,vo=Rt&&re.outerHeight===Rt.outerHeight&&re.lineHeight===Rt.lineHeight&&re.typicalHalfwidthCharacterWidth===Rt.typicalHalfwidthCharacterWidth&&re.pixelRatio===Rt.pixelRatio&&re.scrollBeyondLastLine===Rt.scrollBeyondLastLine&&re.minimap.enabled===Rt.minimap.enabled&&re.minimap.side===Rt.minimap.side&&re.minimap.size===Rt.minimap.size&&re.minimap.showSlider===Rt.minimap.showSlider&&re.minimap.renderCharacters===Rt.minimap.renderCharacters&&re.minimap.maxColumn===Rt.minimap.maxColumn&&re.minimap.scale===Rt.minimap.scale&&re.verticalScrollbarWidth===Rt.verticalScrollbarWidth&&re.isViewportWrapping===Rt.isViewportWrapping,Mo=re.lineHeight,xo=re.typicalHalfwidthCharacterWidth,Do=re.scrollBeyondLastLine,Lo=re.minimap.renderCharacters;let To=It>=2?Math.round(re.minimap.scale*2):re.minimap.scale;const Ht=re.minimap.maxColumn,Mt=re.minimap.size,Ue=re.minimap.side,dt=re.verticalScrollbarWidth,Ut=re.viewLineCount,Ye=re.remainingWidth,qe=re.isViewportWrapping,ct=Lo?2:3;let _t=Math.floor(It*Et);const Pt=_t/It;let Wt=!1,Vt=!1,so=ct*To,wo=To/It,No=1;if(Mt==="fill"||Mt==="fit"){const{typicalViewportLineCount:rt,extraLinesBeyondLastLine:lt,desiredRatio:pt,minimapLineCount:St}=ee.computeContainedMinimapLineCount({viewLineCount:Ut,scrollBeyondLastLine:Do,height:Et,lineHeight:Mo,pixelRatio:It}),Qt=Ut/St;if(Qt>1)Wt=!0,Vt=!0,To=1,so=1,wo=To/It;else{let bo=!1,qt=To+1;if(Mt==="fit"){const Eo=Math.ceil((Ut+lt)*so);qe&&vo&&Ye<=We.stableFitRemainingWidth?(bo=!0,qt=We.stableFitMaxMinimapScale):bo=Eo>_t}if(Mt==="fill"||bo){Wt=!0;const Eo=To;so=Math.min(Mo*It,Math.max(1,Math.floor(1/pt))),qe&&vo&&Ye<=We.stableFitRemainingWidth&&(qt=We.stableFitMaxMinimapScale),To=Math.min(qt,Math.max(1,Math.floor(so/ct))),To>Eo&&(No=Math.min(2,To/Eo)),wo=To/It/No,_t=Math.ceil(Math.max(rt,Ut+lt)*so),qe?(We.stableMinimapLayoutInput=re,We.stableFitRemainingWidth=Ye,We.stableFitMaxMinimapScale=To):(We.stableMinimapLayoutInput=null,We.stableFitRemainingWidth=0)}}}const di=Math.floor(Ht*wo),_o=Math.min(di,Math.max(0,Math.floor((Ye-dt-2)*wo/(xo+wo)))+N);let no=Math.floor(It*_o);const Lt=no/It;no=Math.floor(no*No);const xt=Lo?1:2,Nt=Ue==="left"?0:tt-_o-dt;return{renderMinimap:xt,minimapLeft:Nt,minimapWidth:_o,minimapHeightIsEditorHeight:Wt,minimapIsSampling:Vt,minimapScale:To,minimapLineHeight:so,minimapCanvasInnerWidth:no,minimapCanvasInnerHeight:_t,minimapCanvasOuterWidth:Lt,minimapCanvasOuterHeight:Pt}}static computeLayout(re,We){const tt=We.outerWidth|0,Et=We.outerHeight|0,It=We.lineHeight|0,Rt=We.lineNumbersDigitCount|0,vo=We.typicalHalfwidthCharacterWidth,Mo=We.maxDigitWidth,xo=We.pixelRatio,Do=We.viewLineCount,Lo=re.get(121),To=Lo==="inherit"?re.get(120):Lo,Ht=To==="inherit"?re.get(116):To,Mt=re.get(119),Ue=re.get(2),dt=We.isDominatedByLongLines,Ut=re.get(49),Ye=re.get(59).renderType!==0,qe=re.get(60),ct=re.get(93),_t=re.get(64),Pt=re.get(91),Wt=Pt.verticalScrollbarSize,Vt=Pt.verticalHasArrows,so=Pt.arrowSize,wo=Pt.horizontalScrollbarSize,No=re.get(57),di=re.get(37);let _o;if(typeof No=="string"&&/^\d+(\.\d+)?ch$/.test(No)){const Bo=parseFloat(No.substr(0,No.length-2));_o=r.clampedInt(Bo*vo,0,0,1e3)}else _o=r.clampedInt(No,0,0,1e3);di&&(_o+=16);let no=0;if(Ye){const Bo=Math.max(Rt,qe);no=Math.round(Bo*Mo)}let Lt=0;Ut&&(Lt=It);let xt=0,Nt=xt+Lt,rt=Nt+no,lt=rt+_o;const pt=tt-Lt-no-_o;let St=!1,Qt=!1,bo=-1;Ue!==2&&(To==="inherit"&&dt?(St=!0,Qt=!0):Ht==="on"||Ht==="bounded"?Qt=!0:Ht==="wordWrapColumn"&&(bo=Mt));const qt=ee._computeMinimapLayout({outerWidth:tt,outerHeight:Et,lineHeight:It,typicalHalfwidthCharacterWidth:vo,pixelRatio:xo,scrollBeyondLastLine:ct,minimap:_t,verticalScrollbarWidth:Wt,viewLineCount:Do,remainingWidth:pt,isViewportWrapping:Qt},We.memory||new I);qt.renderMinimap!==0&&qt.minimapLeft===0&&(xt+=qt.minimapWidth,Nt+=qt.minimapWidth,rt+=qt.minimapWidth,lt+=qt.minimapWidth);const Eo=pt-qt.minimapWidth,Ro=Math.max(1,Math.floor((Eo-Wt-2)/vo)),zo=Vt?so:0;return Qt&&(bo=Math.max(1,Ro),Ht==="bounded"&&(bo=Math.min(bo,Mt))),{width:tt,height:Et,glyphMarginLeft:xt,glyphMarginWidth:Lt,lineNumbersLeft:Nt,lineNumbersWidth:no,decorationsLeft:rt,decorationsWidth:_o,contentLeft:lt,contentWidth:Eo,minimap:qt,viewportColumn:Ro,isWordWrapMinified:St,isViewportWrapping:Qt,wrappingColumn:bo,verticalScrollbarWidth:Wt,horizontalScrollbarHeight:wo,overviewRuler:{top:zo,width:Wt,height:Et-2*zo,right:0}}}}class ie extends L{constructor(){const re={enabled:!0};super(56,"lightbulb",re,{"editor.lightbulb.enabled":{type:"boolean",default:re.enabled,description:f.a("codeActions","Enables the code action lightbulb in the editor.")}})}validate(re){if(!re||typeof re!="object")return this.defaultValue;const We=re;return{enabled:d(We.enabled,this.defaultValue.enabled)}}}class U extends L{constructor(){const re={enabled:!0,fontSize:0,fontFamily:""};super(125,"inlayHints",re,{"editor.inlayHints.enabled":{type:"boolean",default:re.enabled,description:f.a("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:re.fontSize,markdownDescription:f.a("inlayHints.fontSize","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:re.fontFamily,markdownDescription:f.a("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(re){if(!re||typeof re!="object")return this.defaultValue;const We=re;return{enabled:d(We.enabled,this.defaultValue.enabled),fontSize:r.clampedInt(We.fontSize,this.defaultValue.fontSize,0,100),fontFamily:b.string(We.fontFamily,this.defaultValue.fontFamily)}}}class G extends _{constructor(){super(58,"lineHeight",bt.lineHeight,re=>_.clamp(re,0,150),{markdownDescription:f.a("lineHeight",`Controls the line height.
|
|
|
- Use 0 to automatically compute the line height from the font size.
|
|
|
- Values between 0 and 8 will be used as a multiplier with the font size.
|
|
|
- Values greater than or equal to 8 will be used as effective values.`)})}compute(re,We,tt){return re.fontInfo.lineHeight}}class J extends L{constructor(){const re={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(64,"minimap",re,{"editor.minimap.enabled":{type:"boolean",default:re.enabled,description:f.a("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[f.a("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),f.a("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),f.a("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:re.size,description:f.a("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:re.side,description:f.a("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:re.showSlider,description:f.a("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:re.scale,minimum:1,maximum:3,enum:[1,2,3],description:f.a("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:re.renderCharacters,description:f.a("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:re.maxColumn,description:f.a("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(re){if(!re||typeof re!="object")return this.defaultValue;const We=re;return{enabled:d(We.enabled,this.defaultValue.enabled),size:h(We.size,this.defaultValue.size,["proportional","fill","fit"]),side:h(We.side,this.defaultValue.side,["right","left"]),showSlider:h(We.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:d(We.renderCharacters,this.defaultValue.renderCharacters),scale:r.clampedInt(We.scale,1,1,3),maxColumn:r.clampedInt(We.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function he(re){return re==="ctrlCmd"?B.f?"metaKey":"ctrlKey":"altKey"}class xe extends L{constructor(){super(74,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:f.a("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:f.a("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(re){if(!re||typeof re!="object")return this.defaultValue;const We=re;return{top:r.clampedInt(We.top,0,0,1e3),bottom:r.clampedInt(We.bottom,0,0,1e3)}}}class Ie extends L{constructor(){const re={enabled:!0,cycle:!1};super(75,"parameterHints",re,{"editor.parameterHints.enabled":{type:"boolean",default:re.enabled,description:f.a("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:re.cycle,description:f.a("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(re){if(!re||typeof re!="object")return this.defaultValue;const We=re;return{enabled:d(We.enabled,this.defaultValue.enabled),cycle:d(We.cycle,this.defaultValue.cycle)}}}class Le extends v{constructor(){super(127)}compute(re,We,tt){return re.pixelRatio}}class Te extends L{constructor(){const re={other:!0,comments:!1,strings:!1};super(78,"quickSuggestions",re,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:re.strings,description:f.a("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:re.comments,description:f.a("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:re.other,description:f.a("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:re,description:f.a("quickSuggestions","Controls whether suggestions should automatically show up while typing.")});this.defaultValue=re}validate(re){if(typeof re=="boolean")return re;if(re&&typeof re=="object"){const We=re,tt={other:d(We.other,this.defaultValue.other),comments:d(We.comments,this.defaultValue.comments),strings:d(We.strings,this.defaultValue.strings)};return tt.other&&tt.comments&&tt.strings?!0:!tt.other&&!tt.comments&&!tt.strings?!1:tt}return this.defaultValue}}class ze extends L{constructor(){super(59,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[f.a("lineNumbers.off","Line numbers are not rendered."),f.a("lineNumbers.on","Line numbers are rendered as absolute number."),f.a("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),f.a("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:f.a("lineNumbers","Controls the display of line numbers.")})}validate(re){let We=this.defaultValue.renderType,tt=this.defaultValue.renderFn;return typeof re!="undefined"&&(typeof re=="function"?(We=4,tt=re):re==="interval"?We=3:re==="relative"?We=2:re==="on"?We=1:We=0),{renderType:We,renderFn:tt}}}function ue(re){const We=re.get(86);return We==="editable"?re.get(80):!(We==="on")}class je extends L{constructor(){const re=[],We={type:"number",description:f.a("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(90,"rulers",re,{type:"array",items:{anyOf:[We,{type:["object"],properties:{column:We,color:{type:"string",description:f.a("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:re,description:f.a("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(re){if(Array.isArray(re)){let We=[];for(let tt of re)if(typeof tt=="number")We.push({column:r.clampedInt(tt,0,0,1e4),color:null});else if(tt&&typeof tt=="object"){const Et=tt;We.push({column:r.clampedInt(Et.column,0,0,1e4),color:Et.color})}return We.sort((tt,Et)=>tt.column-Et.column),We}return this.defaultValue}}function Pe(re,We){if(typeof re!="string")return We;switch(re){case"hidden":return 2;case"visible":return 3;default:return 1}}class ve extends L{constructor(){const re={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(91,"scrollbar",re,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[f.a("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),f.a("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),f.a("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:f.a("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[f.a("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),f.a("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),f.a("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:f.a("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:re.verticalScrollbarSize,description:f.a("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:re.horizontalScrollbarSize,description:f.a("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:re.scrollByPage,description:f.a("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(re){if(!re||typeof re!="object")return this.defaultValue;const We=re,tt=r.clampedInt(We.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),Et=r.clampedInt(We.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:r.clampedInt(We.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Pe(We.vertical,this.defaultValue.vertical),horizontal:Pe(We.horizontal,this.defaultValue.horizontal),useShadows:d(We.useShadows,this.defaultValue.useShadows),verticalHasArrows:d(We.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:d(We.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:d(We.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:d(We.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:tt,horizontalSliderSize:r.clampedInt(We.horizontalSliderSize,tt,0,1e3),verticalScrollbarSize:Et,verticalSliderSize:r.clampedInt(We.verticalSliderSize,Et,0,1e3),scrollByPage:d(We.scrollByPage,this.defaultValue.scrollByPage)}}}class ce extends L{constructor(){const re={enabled:!0,mode:"subwordSmart"};super(54,"inlineSuggest",re,{"editor.inlineSuggest.enabled":{type:"boolean",default:re.enabled,description:f.a("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(re){if(!re||typeof re!="object")return this.defaultValue;const We=re;return{enabled:d(We.enabled,this.defaultValue.enabled),mode:h(We.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class le extends L{constructor(){const re={enabled:Tt.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",re,{"editor.bracketPairColorization.enabled":{type:"boolean",default:re.enabled,description:f.a("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.")}})}validate(re){if(!re||typeof re!="object")return this.defaultValue;const We=re;return{enabled:d(We.enabled,this.defaultValue.enabled)}}}class Ce extends L{constructor(){const re={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",re,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[f.a("editor.guides.bracketPairs.true","Enables bracket pair guides."),f.a("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),f.a("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:re.bracketPairs,description:f.a("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[f.a("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),f.a("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),f.a("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:re.bracketPairsHorizontal,description:f.a("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:re.highlightActiveBracketPair,description:f.a("editor.guides.highlightActiveBracketPair","Controls whether bracket pair guides are enabled or not.")},"editor.guides.indentation":{type:"boolean",default:re.indentation,description:f.a("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:"boolean",default:re.highlightActiveIndentation,description:f.a("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(re){if(!re||typeof re!="object")return this.defaultValue;const We=re;return{bracketPairs:ye(We.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:ye(We.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:d(We.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:d(We.indentation,this.defaultValue.indentation),highlightActiveIndentation:d(We.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}function ye(re,We,tt){const Et=tt.indexOf(re);return Et===-1?We:tt[Et]}class ge extends L{constructor(){const re={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(105,"suggest",re,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[f.a("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),f.a("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:re.insertMode,description:f.a("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:re.filterGraceful,description:f.a("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:re.localityBonus,description:f.a("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:re.shareSuggestSelections,markdownDescription:f.a("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:re.snippetsPreventQuickSuggestions,description:f.a("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:re.showIcons,description:f.a("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:re.showStatusBar,description:f.a("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:re.preview,description:f.a("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:re.showInlineDetails,description:f.a("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:f.a("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:f.a("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:f.a("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(re){if(!re||typeof re!="object")return this.defaultValue;const We=re;return{insertMode:h(We.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:d(We.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:d(We.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:d(We.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:d(We.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:d(We.showIcons,this.defaultValue.showIcons),showStatusBar:d(We.showStatusBar,this.defaultValue.showStatusBar),preview:d(We.preview,this.defaultValue.preview),previewMode:h(We.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:d(We.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:d(We.showMethods,this.defaultValue.showMethods),showFunctions:d(We.showFunctions,this.defaultValue.showFunctions),showConstructors:d(We.showConstructors,this.defaultValue.showConstructors),showDeprecated:d(We.showDeprecated,this.defaultValue.showDeprecated),showFields:d(We.showFields,this.defaultValue.showFields),showVariables:d(We.showVariables,this.defaultValue.showVariables),showClasses:d(We.showClasses,this.defaultValue.showClasses),showStructs:d(We.showStructs,this.defaultValue.showStructs),showInterfaces:d(We.showInterfaces,this.defaultValue.showInterfaces),showModules:d(We.showModules,this.defaultValue.showModules),showProperties:d(We.showProperties,this.defaultValue.showProperties),showEvents:d(We.showEvents,this.defaultValue.showEvents),showOperators:d(We.showOperators,this.defaultValue.showOperators),showUnits:d(We.showUnits,this.defaultValue.showUnits),showValues:d(We.showValues,this.defaultValue.showValues),showConstants:d(We.showConstants,this.defaultValue.showConstants),showEnums:d(We.showEnums,this.defaultValue.showEnums),showEnumMembers:d(We.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:d(We.showKeywords,this.defaultValue.showKeywords),showWords:d(We.showWords,this.defaultValue.showWords),showColors:d(We.showColors,this.defaultValue.showColors),showFiles:d(We.showFiles,this.defaultValue.showFiles),showReferences:d(We.showReferences,this.defaultValue.showReferences),showFolders:d(We.showFolders,this.defaultValue.showFolders),showTypeParameters:d(We.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:d(We.showSnippets,this.defaultValue.showSnippets),showUsers:d(We.showUsers,this.defaultValue.showUsers),showIssues:d(We.showIssues,this.defaultValue.showIssues)}}}class Me extends L{constructor(){super(101,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:f.a("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(re){return!re||typeof re!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:d(re.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class De extends v{constructor(){super(128,[80])}compute(re,We,tt){const Et=We.get(80);return Et?!0:re.tabFocusMode}}function we(re){switch(re){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class Oe extends v{constructor(){super(130,[129])}compute(re,We,tt){const Et=We.get(129);return{isDominatedByLongLines:re.isDominatedByLongLines,isWordWrapMinified:Et.isWordWrapMinified,isViewportWrapping:Et.isViewportWrapping,wrappingColumn:Et.wrappingColumn}}}const nt="Consolas, 'Courier New', monospace",Ke="Menlo, Monaco, 'Courier New', monospace",et="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",bt={fontFamily:B.f?Ke:B.d?et:nt,fontWeight:"normal",fontSize:B.f?12:14,lineHeight:0,letterSpacing:0},Tt={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}},$t=[];function Xe(re){return $t[re.id]=re,re}const it={acceptSuggestionOnCommitCharacter:Xe(new D(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:f.a("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:Xe(new c(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",f.a("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:f.a("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:Xe(new y),accessibilityPageSize:Xe(new r(3,"accessibilityPageSize",10,1,1073741824,{description:f.a("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:Xe(new b(4,"ariaLabel",f.a("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:Xe(new c(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",f.a("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),f.a("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:f.a("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:Xe(new c(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",f.a("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:f.a("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:Xe(new c(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",f.a("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:f.a("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:Xe(new c(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",f.a("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),f.a("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:f.a("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:Xe(new p(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],E,{enumDescriptions:[f.a("editor.autoIndent.none","The editor will not insert indentation automatically."),f.a("editor.autoIndent.keep","The editor will keep the current line's indentation."),f.a("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),f.a("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),f.a("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:f.a("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:Xe(new D(10,"automaticLayout",!1)),autoSurround:Xe(new c(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[f.a("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),f.a("editor.autoSurround.quotes","Surround with quotes but not brackets."),f.a("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:f.a("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:Xe(new le),bracketPairGuides:Xe(new Ce),stickyTabStops:Xe(new D(103,"stickyTabStops",!1,{description:f.a("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:Xe(new D(14,"codeLens",!0,{description:f.a("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:Xe(new b(15,"codeLensFontFamily","",{description:f.a("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:Xe(new r(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:f.a("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used.")})),colorDecorators:Xe(new D(17,"colorDecorators",!0,{description:f.a("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:Xe(new D(18,"columnSelection",!1,{description:f.a("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:Xe(new C),contextmenu:Xe(new D(20,"contextmenu",!0)),copyWithSyntaxHighlighting:Xe(new D(21,"copyWithSyntaxHighlighting",!0,{description:f.a("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:Xe(new p(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],O,{description:f.a("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:Xe(new D(23,"cursorSmoothCaretAnimation",!1,{description:f.a("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:Xe(new p(24,"cursorStyle",k.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],Y,{description:f.a("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:Xe(new r(25,"cursorSurroundingLines",0,0,1073741824,{description:f.a("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:Xe(new c(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[f.a("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),f.a("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:f.a("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:Xe(new r(27,"cursorWidth",0,0,1073741824,{markdownDescription:f.a("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:Xe(new D(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:Xe(new D(29,"disableMonospaceOptimizations",!1)),domReadOnly:Xe(new D(30,"domReadOnly",!1)),dragAndDrop:Xe(new D(31,"dragAndDrop",!0,{description:f.a("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:Xe(new H),extraEditorClassName:Xe(new b(33,"extraEditorClassName","")),fastScrollSensitivity:Xe(new _(34,"fastScrollSensitivity",5,re=>re<=0?5:re,{markdownDescription:f.a("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:Xe(new Z),fixedOverflowWidgets:Xe(new D(36,"fixedOverflowWidgets",!1)),folding:Xe(new D(37,"folding",!0,{description:f.a("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:Xe(new c(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[f.a("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),f.a("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:f.a("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:Xe(new D(39,"foldingHighlight",!0,{description:f.a("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:Xe(new D(40,"foldingImportsByDefault",!1,{description:f.a("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),unfoldOnClickAfterEndOfLine:Xe(new D(41,"unfoldOnClickAfterEndOfLine",!1,{description:f.a("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:Xe(new b(42,"fontFamily",bt.fontFamily,{description:f.a("fontFamily","Controls the font family.")})),fontInfo:Xe(new $),fontLigatures2:Xe(new oe),fontSize:Xe(new te),fontWeight:Xe(new ne),formatOnPaste:Xe(new D(47,"formatOnPaste",!1,{description:f.a("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:Xe(new D(48,"formatOnType",!1,{description:f.a("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:Xe(new D(49,"glyphMargin",!0,{description:f.a("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:Xe(new Ee),hideCursorInOverviewRuler:Xe(new D(51,"hideCursorInOverviewRuler",!1,{description:f.a("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:Xe(new fe),inDiffEditor:Xe(new D(53,"inDiffEditor",!1)),letterSpacing:Xe(new _(55,"letterSpacing",bt.letterSpacing,re=>_.clamp(re,-5,20),{description:f.a("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:Xe(new ie),lineDecorationsWidth:Xe(new m(57,"lineDecorationsWidth",10)),lineHeight:Xe(new G),lineNumbers:Xe(new ze),lineNumbersMinChars:Xe(new r(60,"lineNumbersMinChars",5,1,300)),linkedEditing:Xe(new D(61,"linkedEditing",!1,{description:f.a("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:Xe(new D(62,"links",!0,{description:f.a("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:Xe(new c(63,"matchBrackets","always",["always","near","never"],{description:f.a("matchBrackets","Highlight matching brackets.")})),minimap:Xe(new J),mouseStyle:Xe(new c(65,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Xe(new _(66,"mouseWheelScrollSensitivity",1,re=>re===0?1:re,{markdownDescription:f.a("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:Xe(new D(67,"mouseWheelZoom",!1,{markdownDescription:f.a("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:Xe(new D(68,"multiCursorMergeOverlapping",!0,{description:f.a("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:Xe(new p(69,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],he,{markdownEnumDescriptions:[f.a("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),f.a("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:f.a({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go to Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:Xe(new c(70,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[f.a("multiCursorPaste.spread","Each cursor pastes a single line of the text."),f.a("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:f.a("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:Xe(new D(71,"occurrencesHighlight",!0,{description:f.a("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:Xe(new D(72,"overviewRulerBorder",!0,{description:f.a("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:Xe(new r(73,"overviewRulerLanes",3,0,3)),padding:Xe(new xe),parameterHints:Xe(new Ie),peekWidgetDefaultFocus:Xe(new c(76,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[f.a("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),f.a("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:f.a("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:Xe(new D(77,"definitionLinkOpensInPeek",!1,{description:f.a("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:Xe(new Te),quickSuggestionsDelay:Xe(new r(79,"quickSuggestionsDelay",10,0,1073741824,{description:f.a("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:Xe(new D(80,"readOnly",!1)),renameOnType:Xe(new D(81,"renameOnType",!1,{description:f.a("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:f.a("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:Xe(new D(82,"renderControlCharacters",!0,{description:f.a("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:Xe(new D(83,"renderFinalNewline",!0,{description:f.a("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:Xe(new c(84,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",f.a("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:f.a("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:Xe(new D(85,"renderLineHighlightOnlyWhenFocus",!1,{description:f.a("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:Xe(new c(86,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Xe(new c(87,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",f.a("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),f.a("renderWhitespace.selection","Render whitespace characters only on selected text."),f.a("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:f.a("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:Xe(new r(88,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:Xe(new D(89,"roundedSelection",!0,{description:f.a("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:Xe(new je),scrollbar:Xe(new ve),scrollBeyondLastColumn:Xe(new r(92,"scrollBeyondLastColumn",5,0,1073741824,{description:f.a("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:Xe(new D(93,"scrollBeyondLastLine",!0,{description:f.a("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:Xe(new D(94,"scrollPredominantAxis",!0,{description:f.a("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:Xe(new D(95,"selectionClipboard",!0,{description:f.a("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:B.d})),selectionHighlight:Xe(new D(96,"selectionHighlight",!0,{description:f.a("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:Xe(new D(97,"selectOnLineNumbers",!0)),showFoldingControls:Xe(new c(98,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[f.a("showFoldingControls.always","Always show the folding controls."),f.a("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:f.a("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:Xe(new D(99,"showUnused",!0,{description:f.a("showUnused","Controls fading out of unused code.")})),showDeprecated:Xe(new D(124,"showDeprecated",!0,{description:f.a("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:Xe(new U),snippetSuggestions:Xe(new c(100,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[f.a("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),f.a("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),f.a("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),f.a("snippetSuggestions.none","Do not show snippet suggestions.")],description:f.a("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:Xe(new Me),smoothScrolling:Xe(new D(102,"smoothScrolling",!1,{description:f.a("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:Xe(new r(104,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Xe(new ge),inlineSuggest:Xe(new ce),suggestFontSize:Xe(new r(106,"suggestFontSize",0,0,1e3,{markdownDescription:f.a("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:Xe(new r(107,"suggestLineHeight",0,0,1e3,{markdownDescription:f.a("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:Xe(new D(108,"suggestOnTriggerCharacters",!0,{description:f.a("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:Xe(new c(109,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[f.a("suggestSelection.first","Always select the first suggestion."),f.a("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),f.a("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:f.a("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:Xe(new c(110,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[f.a("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),f.a("tabCompletion.off","Disable tab completions."),f.a("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:f.a("tabCompletion","Enables tab completions.")})),tabIndex:Xe(new r(111,"tabIndex",0,-1,1073741824)),unusualLineTerminators:Xe(new c(112,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[f.a("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),f.a("unusualLineTerminators.off","Unusual line terminators are ignored."),f.a("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:f.a("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:Xe(new D(113,"useShadowDOM",!0)),useTabStops:Xe(new D(114,"useTabStops",!0,{description:f.a("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:Xe(new b(115,"wordSeparators",x.b,{description:f.a("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:Xe(new c(116,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[f.a("wordWrap.off","Lines will never wrap."),f.a("wordWrap.on","Lines will wrap at the viewport width."),f.a({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),f.a({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:f.a({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:Xe(new b(117,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:Xe(new b(118,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:Xe(new r(119,"wordWrapColumn",80,1,1073741824,{markdownDescription:f.a({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:Xe(new c(120,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Xe(new c(121,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:Xe(new p(122,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],we,{enumDescriptions:[f.a("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),f.a("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),f.a("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),f.a("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:f.a("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:Xe(new c(123,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[f.a("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),f.a("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:f.a("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:Xe(new Q),pixelRatio:Xe(new Le),tabFocusMode:Xe(new De),layoutInfo:Xe(new ee),wrappingInfo:Xe(new Oe)}},"/cAr":function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:function(){return t.e(340).then(t.bind(null,"8m5U"))}})},"/kV6":function(mt,M,t){"use strict";t.d(M,"a",function(){return A}),t.d(M,"b",function(){return m}),t.d(M,"d",function(){return D}),t.d(M,"c",function(){return S});class f{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(r,_){this._keyCodeToStr[r]=_,this._strToKeyCode[_.toLowerCase()]=r}keyCodeToStr(r){return this._keyCodeToStr[r]}strToKeyCode(r){return this._strToKeyCode[r.toLowerCase()]||0}}const B=new f,x=new f,N=new f,A=new Array(230),F={},I=[],L=Object.create(null),v=Object.create(null),m=[],d=[];for(let r=0;r<=193;r++)m[r]=-1;for(let r=0;r<=126;r++)d[r]=-1;(function(){const r="",_=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",r,r],[0,1,1,"Hyper",0,r,0,r,r,r],[0,1,2,"Super",0,r,0,r,r,r],[0,1,3,"Fn",0,r,0,r,r,r],[0,1,4,"FnLock",0,r,0,r,r,r],[0,1,5,"Suspend",0,r,0,r,r,r],[0,1,6,"Resume",0,r,0,r,r,r],[0,1,7,"Turbo",0,r,0,r,r,r],[0,1,8,"Sleep",0,r,0,"VK_SLEEP",r,r],[0,1,9,"WakeUp",0,r,0,r,r,r],[31,0,10,"KeyA",31,"A",65,"VK_A",r,r],[32,0,11,"KeyB",32,"B",66,"VK_B",r,r],[33,0,12,"KeyC",33,"C",67,"VK_C",r,r],[34,0,13,"KeyD",34,"D",68,"VK_D",r,r],[35,0,14,"KeyE",35,"E",69,"VK_E",r,r],[36,0,15,"KeyF",36,"F",70,"VK_F",r,r],[37,0,16,"KeyG",37,"G",71,"VK_G",r,r],[38,0,17,"KeyH",38,"H",72,"VK_H",r,r],[39,0,18,"KeyI",39,"I",73,"VK_I",r,r],[40,0,19,"KeyJ",40,"J",74,"VK_J",r,r],[41,0,20,"KeyK",41,"K",75,"VK_K",r,r],[42,0,21,"KeyL",42,"L",76,"VK_L",r,r],[43,0,22,"KeyM",43,"M",77,"VK_M",r,r],[44,0,23,"KeyN",44,"N",78,"VK_N",r,r],[45,0,24,"KeyO",45,"O",79,"VK_O",r,r],[46,0,25,"KeyP",46,"P",80,"VK_P",r,r],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",r,r],[48,0,27,"KeyR",48,"R",82,"VK_R",r,r],[49,0,28,"KeyS",49,"S",83,"VK_S",r,r],[50,0,29,"KeyT",50,"T",84,"VK_T",r,r],[51,0,30,"KeyU",51,"U",85,"VK_U",r,r],[52,0,31,"KeyV",52,"V",86,"VK_V",r,r],[53,0,32,"KeyW",53,"W",87,"VK_W",r,r],[54,0,33,"KeyX",54,"X",88,"VK_X",r,r],[55,0,34,"KeyY",55,"Y",89,"VK_Y",r,r],[56,0,35,"KeyZ",56,"Z",90,"VK_Z",r,r],[22,0,36,"Digit1",22,"1",49,"VK_1",r,r],[23,0,37,"Digit2",23,"2",50,"VK_2",r,r],[24,0,38,"Digit3",24,"3",51,"VK_3",r,r],[25,0,39,"Digit4",25,"4",52,"VK_4",r,r],[26,0,40,"Digit5",26,"5",53,"VK_5",r,r],[27,0,41,"Digit6",27,"6",54,"VK_6",r,r],[28,0,42,"Digit7",28,"7",55,"VK_7",r,r],[29,0,43,"Digit8",29,"8",56,"VK_8",r,r],[30,0,44,"Digit9",30,"9",57,"VK_9",r,r],[21,0,45,"Digit0",21,"0",48,"VK_0",r,r],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN",r,r],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE",r,r],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK",r,r],[2,1,49,"Tab",2,"Tab",9,"VK_TAB",r,r],[10,1,50,"Space",10,"Space",32,"VK_SPACE",r,r],[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,r,0,r,r,r],[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",r,r],[59,1,64,"F1",59,"F1",112,"VK_F1",r,r],[60,1,65,"F2",60,"F2",113,"VK_F2",r,r],[61,1,66,"F3",61,"F3",114,"VK_F3",r,r],[62,1,67,"F4",62,"F4",115,"VK_F4",r,r],[63,1,68,"F5",63,"F5",116,"VK_F5",r,r],[64,1,69,"F6",64,"F6",117,"VK_F6",r,r],[65,1,70,"F7",65,"F7",118,"VK_F7",r,r],[66,1,71,"F8",66,"F8",119,"VK_F8",r,r],[67,1,72,"F9",67,"F9",120,"VK_F9",r,r],[68,1,73,"F10",68,"F10",121,"VK_F10",r,r],[69,1,74,"F11",69,"F11",122,"VK_F11",r,r],[70,1,75,"F12",70,"F12",123,"VK_F12",r,r],[0,1,76,"PrintScreen",0,r,0,r,r,r],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL",r,r],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",r,r],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT",r,r],[14,1,80,"Home",14,"Home",36,"VK_HOME",r,r],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",r,r],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE",r,r],[13,1,83,"End",13,"End",35,"VK_END",r,r],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT",r,r],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",r],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",r],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",r],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",r],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK",r,r],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE",r,r],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY",r,r],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT",r,r],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD",r,r],[3,1,94,"NumpadEnter",3,r,0,r,r,r],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1",r,r],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2",r,r],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3",r,r],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4",r,r],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5",r,r],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6",r,r],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7",r,r],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8",r,r],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9",r,r],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0",r,r],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL",r,r],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102",r,r],[58,1,107,"ContextMenu",58,"ContextMenu",93,r,r,r],[0,1,108,"Power",0,r,0,r,r,r],[0,1,109,"NumpadEqual",0,r,0,r,r,r],[71,1,110,"F13",71,"F13",124,"VK_F13",r,r],[72,1,111,"F14",72,"F14",125,"VK_F14",r,r],[73,1,112,"F15",73,"F15",126,"VK_F15",r,r],[74,1,113,"F16",74,"F16",127,"VK_F16",r,r],[75,1,114,"F17",75,"F17",128,"VK_F17",r,r],[76,1,115,"F18",76,"F18",129,"VK_F18",r,r],[77,1,116,"F19",77,"F19",130,"VK_F19",r,r],[0,1,117,"F20",0,r,0,"VK_F20",r,r],[0,1,118,"F21",0,r,0,"VK_F21",r,r],[0,1,119,"F22",0,r,0,"VK_F22",r,r],[0,1,120,"F23",0,r,0,"VK_F23",r,r],[0,1,121,"F24",0,r,0,"VK_F24",r,r],[0,1,122,"Open",0,r,0,r,r,r],[0,1,123,"Help",0,r,0,r,r,r],[0,1,124,"Select",0,r,0,r,r,r],[0,1,125,"Again",0,r,0,r,r,r],[0,1,126,"Undo",0,r,0,r,r,r],[0,1,127,"Cut",0,r,0,r,r,r],[0,1,128,"Copy",0,r,0,r,r,r],[0,1,129,"Paste",0,r,0,r,r,r],[0,1,130,"Find",0,r,0,r,r,r],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE",r,r],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP",r,r],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN",r,r],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR",r,r],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1",r,r],[0,1,136,"KanaMode",0,r,0,r,r,r],[0,0,137,"IntlYen",0,r,0,r,r,r],[0,1,138,"Convert",0,r,0,r,r,r],[0,1,139,"NonConvert",0,r,0,r,r,r],[0,1,140,"Lang1",0,r,0,r,r,r],[0,1,141,"Lang2",0,r,0,r,r,r],[0,1,142,"Lang3",0,r,0,r,r,r],[0,1,143,"Lang4",0,r,0,r,r,r],[0,1,144,"Lang5",0,r,0,r,r,r],[0,1,145,"Abort",0,r,0,r,r,r],[0,1,146,"Props",0,r,0,r,r,r],[0,1,147,"NumpadParenLeft",0,r,0,r,r,r],[0,1,148,"NumpadParenRight",0,r,0,r,r,r],[0,1,149,"NumpadBackspace",0,r,0,r,r,r],[0,1,150,"NumpadMemoryStore",0,r,0,r,r,r],[0,1,151,"NumpadMemoryRecall",0,r,0,r,r,r],[0,1,152,"NumpadMemoryClear",0,r,0,r,r,r],[0,1,153,"NumpadMemoryAdd",0,r,0,r,r,r],[0,1,154,"NumpadMemorySubtract",0,r,0,r,r,r],[0,1,155,"NumpadClear",0,r,0,r,r,r],[0,1,156,"NumpadClearEntry",0,r,0,r,r,r],[5,1,0,r,5,"Ctrl",17,"VK_CONTROL",r,r],[4,1,0,r,4,"Shift",16,"VK_SHIFT",r,r],[6,1,0,r,6,"Alt",18,"VK_MENU",r,r],[57,1,0,r,57,"Meta",0,"VK_COMMAND",r,r],[5,1,157,"ControlLeft",5,r,0,"VK_LCONTROL",r,r],[4,1,158,"ShiftLeft",4,r,0,"VK_LSHIFT",r,r],[6,1,159,"AltLeft",6,r,0,"VK_LMENU",r,r],[57,1,160,"MetaLeft",57,r,0,"VK_LWIN",r,r],[5,1,161,"ControlRight",5,r,0,"VK_RCONTROL",r,r],[4,1,162,"ShiftRight",4,r,0,"VK_RSHIFT",r,r],[6,1,163,"AltRight",6,r,0,"VK_RMENU",r,r],[57,1,164,"MetaRight",57,r,0,"VK_RWIN",r,r],[0,1,165,"BrightnessUp",0,r,0,r,r,r],[0,1,166,"BrightnessDown",0,r,0,r,r,r],[0,1,167,"MediaPlay",0,r,0,r,r,r],[0,1,168,"MediaRecord",0,r,0,r,r,r],[0,1,169,"MediaFastForward",0,r,0,r,r,r],[0,1,170,"MediaRewind",0,r,0,r,r,r],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",r,r],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",r,r],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP",r,r],[0,1,174,"Eject",0,r,0,r,r,r],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",r,r],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",r,r],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",r,r],[0,1,178,"LaunchApp2",125,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",r,r],[0,1,179,"LaunchApp1",0,r,0,"VK_MEDIA_LAUNCH_APP1",r,r],[0,1,180,"SelectTask",0,r,0,r,r,r],[0,1,181,"LaunchScreenSaver",0,r,0,r,r,r],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH",r,r],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME",r,r],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK",r,r],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD",r,r],[0,1,186,"BrowserStop",0,r,0,"VK_BROWSER_STOP",r,r],[0,1,187,"BrowserRefresh",0,r,0,"VK_BROWSER_REFRESH",r,r],[0,1,188,"BrowserFavorites",0,r,0,"VK_BROWSER_FAVORITES",r,r],[0,1,189,"ZoomToggle",0,r,0,r,r,r],[0,1,190,"MailReply",0,r,0,r,r,r],[0,1,191,"MailForward",0,r,0,r,r,r],[0,1,192,"MailSend",0,r,0,r,r,r],[109,1,0,r,109,"KeyInComposition",229,r,r,r],[111,1,0,r,111,"ABNT_C2",194,"VK_ABNT_C2",r,r],[91,1,0,r,91,"OEM_8",223,"VK_OEM_8",r,r],[0,1,0,r,0,r,0,"VK_CLEAR",r,r],[0,1,0,r,0,r,0,"VK_KANA",r,r],[0,1,0,r,0,r,0,"VK_HANGUL",r,r],[0,1,0,r,0,r,0,"VK_JUNJA",r,r],[0,1,0,r,0,r,0,"VK_FINAL",r,r],[0,1,0,r,0,r,0,"VK_HANJA",r,r],[0,1,0,r,0,r,0,"VK_KANJI",r,r],[0,1,0,r,0,r,0,"VK_CONVERT",r,r],[0,1,0,r,0,r,0,"VK_NONCONVERT",r,r],[0,1,0,r,0,r,0,"VK_ACCEPT",r,r],[0,1,0,r,0,r,0,"VK_MODECHANGE",r,r],[0,1,0,r,0,r,0,"VK_SELECT",r,r],[0,1,0,r,0,r,0,"VK_PRINT",r,r],[0,1,0,r,0,r,0,"VK_EXECUTE",r,r],[0,1,0,r,0,r,0,"VK_SNAPSHOT",r,r],[0,1,0,r,0,r,0,"VK_HELP",r,r],[0,1,0,r,0,r,0,"VK_APPS",r,r],[0,1,0,r,0,r,0,"VK_PROCESSKEY",r,r],[0,1,0,r,0,r,0,"VK_PACKET",r,r],[0,1,0,r,0,r,0,"VK_DBE_SBCSCHAR",r,r],[0,1,0,r,0,r,0,"VK_DBE_DBCSCHAR",r,r],[0,1,0,r,0,r,0,"VK_ATTN",r,r],[0,1,0,r,0,r,0,"VK_CRSEL",r,r],[0,1,0,r,0,r,0,"VK_EXSEL",r,r],[0,1,0,r,0,r,0,"VK_EREOF",r,r],[0,1,0,r,0,r,0,"VK_PLAY",r,r],[0,1,0,r,0,r,0,"VK_ZOOM",r,r],[0,1,0,r,0,r,0,"VK_NONAME",r,r],[0,1,0,r,0,r,0,"VK_PA1",r,r],[0,1,0,r,0,r,0,"VK_OEM_CLEAR",r,r]];let b=[],h=[];for(const c of _){const[p,E,y,C,O,k,Y,Q,H,Z]=c;if(h[y]||(h[y]=!0,I[y]=C,L[C]=y,v[C.toLowerCase()]=y,E&&(m[y]=O,O!==0&&O!==3&&O!==5&&O!==4&&O!==6&&O!==57&&(d[O]=y))),!b[O]){if(b[O]=!0,!k)throw new Error(`String representation missing for key code ${O} around scan code ${C}`);B.define(O,k),x.define(O,H||k),N.define(O,Z||H||k)}Y&&(A[Y]=O),Q&&(F[Q]=O)}d[3]=46})();var D;(function(r){function _(y){return B.keyCodeToStr(y)}r.toString=_;function b(y){return B.strToKeyCode(y)}r.fromString=b;function h(y){return x.keyCodeToStr(y)}r.toUserSettingsUS=h;function c(y){return N.keyCodeToStr(y)}r.toUserSettingsGeneral=c;function p(y){return x.strToKeyCode(y)||N.strToKeyCode(y)}r.fromUserSettings=p;function E(y){if(y>=93&&y<=108)return null;switch(y){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return B.keyCodeToStr(y)}r.toElectronAccelerator=E})(D||(D={}));function S(r,_){const b=(_&65535)<<16>>>0;return(r|b)>>>0}},"/oaI":function(mt,M,t){},"0+8E":function(mt,M,t){"use strict";t.d(M,"b",function(){return h}),t.d(M,"a",function(){return c});var f=t("EffR"),B=t("4y0V"),x=t("Md8J"),N=t("WqXY"),A=t("OBOq"),F=t("GJhM"),I=t("G300"),L=t("zrhQ"),v=t("MI8n");class m{constructor(p,E=0,y=p.length,C=E-1){this.items=p,this.start=E,this.end=y,this.index=C}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 d{constructor(p=[],E=10){this._initialize(p),this._limit=E,this._onChange()}getHistory(){return this._elements}add(p){this._history.delete(p),this._history.add(p),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(p){return this._history.has(p)}_onChange(){this._reduceToLimit();const p=this._elements;this._navigator=new m(p,0,p.length,p.length)}_reduceToLimit(){const p=this._elements;p.length>this._limit&&this._initialize(p.slice(p.length-this._limit))}_currentPosition(){const p=this._navigator.current();return p?this._elements.indexOf(p):-1}_initialize(p){this._history=new Set;for(const E of p)this._history.add(E)}get _elements(){const p=[];return this._history.forEach(E=>p.push(E)),p}}var D=t("qj0h"),S=t("i/Rh"),r=t("3/fG");const _=f.a,b={inputBackground:L.a.fromHex("#3C3C3C"),inputForeground:L.a.fromHex("#CCCCCC"),inputValidationInfoBorder:L.a.fromHex("#55AAFF"),inputValidationInfoBackground:L.a.fromHex("#063B49"),inputValidationWarningBorder:L.a.fromHex("#B89500"),inputValidationWarningBackground:L.a.fromHex("#352A05"),inputValidationErrorBorder:L.a.fromHex("#BE1100"),inputValidationErrorBackground:L.a.fromHex("#5A1D1D")};class h extends I.a{constructor(p,E,y){var C;super();this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new v.b),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new v.b),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=E,this.options=y||Object.create(null),Object(D.f)(this.options,b,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(C=this.options.tooltip)!==null&&C!==void 0?C: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=f.q(p,_(".monaco-inputbox.idle"));let O=this.options.flexibleHeight?"textarea":"input",k=f.q(this.element,_(".ibwrapper"));if(this.input=f.q(k,_(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=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=f.q(k,_("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new F.b(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),f.q(p,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(H=>this.input.scrollTop=H.scrollTop));const Y=this._register(new B.a(document,"selectionchange")),Q=v.c.filter(Y.event,()=>{const H=document.getSelection();return(H==null?void 0:H.anchorNode)===k});this._register(Q(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 N.a(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(p){this.placeholder=p,this.input.setAttribute("placeholder",p)}setTooltip(p){this.tooltip=p,this.input.title=p}setAriaLabel(p){this.ariaLabel=p,p?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(p){this.input.value!==p&&(this.input.value=p,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:f.H(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(p=null){this.input.select(),p&&(this.input.setSelectionRange(p.start,p.end),p.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 f.I(this.input)}set width(p){if(this.options.flexibleHeight&&this.options.flexibleWidth){let E=0;if(this.mirror){const y=parseFloat(this.mirror.style.paddingLeft||"")||0,C=parseFloat(this.mirror.style.paddingRight||"")||0;E=y+C}this.input.style.width=p-E+"px"}else this.input.style.width=p+"px";this.mirror&&(this.mirror.style.width=p+"px")}set paddingRight(p){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${p}px)`:this.input.style.paddingRight=p+"px",this.mirror&&(this.mirror.style.paddingRight=p+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const p=this.cachedContentHeight,E=this.cachedHeight,y=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:p,height:E}),this.scrollableElement.setScrollPosition({scrollTop:y})}showMessage(p,E){this.message=p,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(p.type));const y=this.stylesForType(this.message.type);this.element.style.border=y.border?`1px solid ${y.border}`:"",(this.hasFocus()||E)&&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 p=null;return this.validation&&(p=this.validation(this.value),p?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(p)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),p==null?void 0:p.type}stylesForType(p){switch(p){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(p){switch(p){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let p,E=()=>p.style.width=f.I(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:C=>{if(!this.message)return null;p=f.q(C,_(".monaco-inputbox-container")),E();const O={inline:!0,className:"monaco-inputbox-message"},k=this.message.formatContent?Object(x.b)(this.message.content,O):Object(x.c)(this.message.content,O);k.classList.add(this.classForType(this.message.type));const Y=this.stylesForType(this.message.type);return k.style.backgroundColor=Y.background?Y.background.toString():"",k.style.color=Y.foreground?Y.foreground.toString():"",k.style.border=Y.border?`1px solid ${Y.border}`:"",f.q(p,k),null},onHide:()=>{this.state="closed"},layout:E});let y;this.message.type===3?y=r.a("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?y=r.a("alertWarningMessage","Warning: {0}",this.message.content):y=r.a("alertInfoMessage","Info: {0}",this.message.content),A.a(y),this.state="open"}_hideMessage(){if(!this.contextViewProvider)return;this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle"}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const p=this.value,E=p.charCodeAt(p.length-1),y=E===10?" ":"",C=(p+y).replace(/\u000c/g,"");C?this.mirror.textContent=p+y:this.mirror.innerText="\xA0",this.layout()}style(p){this.inputBackground=p.inputBackground,this.inputForeground=p.inputForeground,this.inputBorder=p.inputBorder,this.inputValidationInfoBackground=p.inputValidationInfoBackground,this.inputValidationInfoForeground=p.inputValidationInfoForeground,this.inputValidationInfoBorder=p.inputValidationInfoBorder,this.inputValidationWarningBackground=p.inputValidationWarningBackground,this.inputValidationWarningForeground=p.inputValidationWarningForeground,this.inputValidationWarningBorder=p.inputValidationWarningBorder,this.inputValidationErrorBackground=p.inputValidationErrorBackground,this.inputValidationErrorForeground=p.inputValidationErrorForeground,this.inputValidationErrorBorder=p.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const p=this.inputBackground?this.inputBackground.toString():"",E=this.inputForeground?this.inputForeground.toString():"",y=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=p,this.element.style.color=E,this.input.style.backgroundColor="inherit",this.input.style.color=E,this.element.style.borderWidth=y?"1px":"",this.element.style.borderStyle=y?"solid":"",this.element.style.borderColor=y}layout(){if(!this.mirror)return;const p=this.cachedContentHeight;this.cachedContentHeight=f.H(this.mirror),p!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(p){const E=this.inputElement,y=E.selectionStart,C=E.selectionEnd,O=E.value;y!==null&&C!==null&&(this.value=O.substr(0,y)+p+O.substr(C),E.setSelectionRange(y+1,y+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class c extends h{constructor(p,E,y){const C=r.a({key:"history.inputbox.hint",comment:["Text will be prefixed with \u21C5 plus a single space, then used as a hint where input field keeps history"]},"for history"),O=` or \u21C5 ${C}`,k=` (\u21C5 ${C})`;super(p,E,y);this.history=new d(y.history,100);const Y=()=>{if(y.showHistoryHint&&y.showHistoryHint()&&!this.placeholder.endsWith(O)&&!this.placeholder.endsWith(k)&&this.history.getHistory().length){const Q=this.placeholder.endsWith(")")?O:k,H=this.placeholder+Q;y.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=H:this.setPlaceHolder(H)}};this.observer=new MutationObserver((Q,H)=>{Q.forEach(Z=>{Z.target.textContent||Y()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>Y()),this.onblur(this.input,()=>{const Q=H=>{if(this.placeholder.endsWith(H)){const Z=this.placeholder.slice(0,this.placeholder.length-H.length);return y.showPlaceholderOnFocus?this.placeholder=Z:this.setPlaceHolder(Z),!0}else return!1};Q(k)||Q(O)})}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 p=this.getNextValue();p&&(p=p===this.value?this.getNextValue():p),p&&(this.value=p,A.c(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let p=this.getPreviousValue();p&&(p=p===this.value?this.getPreviousValue():p),p&&(this.value=p,A.c(this.value))}getCurrentValue(){let p=this.history.current();return p||(p=this.history.last(),this.history.next()),p}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}},"0/Sa":function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("aokT");class B{static insert(x,N){return{range:new f.a(x.lineNumber,x.column,x.lineNumber,x.column),text:N,forceMoveMarkers:!0}}static delete(x){return{range:x,text:null}}static replace(x,N){return{range:x,text:N}}static replaceMove(x,N){return{range:x,text:N,forceMoveMarkers:!0}}}},"03kh":function(mt,M,t){"use strict";t.d(M,"a",function(){return D});var f=t("qj0h"),B=t("Vxe3"),x=t("nB0o"),N=t("nnTU"),A=t("T8No"),F=t("Cg/j"),I=t("sM1p"),L=t("t9D7"),v=t("R3nR"),m=function(S,r,_,b){var h=arguments.length,c=h<3?r:b===null?b=Object.getOwnPropertyDescriptor(r,_):b,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(S,r,_,b);else for(var E=S.length-1;E>=0;E--)(p=S[E])&&(c=(h<3?p(c):h>3?p(r,_,c):p(r,_))||c);return h>3&&c&&Object.defineProperty(r,_,c),c},d=function(S,r){return function(_,b){r(_,b,S)}};let D=class extends x.a{constructor(r,_,b,h,c,p,E,y,C,O){super(r,Object.assign(Object.assign({},b.getRawOptions()),{overflowWidgetsDomNode:b.getOverflowWidgetsDomNode()}),{},h,c,p,E,y,C,O);this._parentEditor=b,this._overwriteOptions=_,super.updateOptions(this._overwriteOptions),this._register(b.onDidChangeConfiguration(k=>this._onParentConfigurationChanged(k)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(r){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(r){f.f(this._overwriteOptions,r,!0),super.updateOptions(this._overwriteOptions)}};D=m([d(3,F.a),d(4,B.a),d(5,N.b),d(6,A.b),d(7,L.b),d(8,I.a),d(9,v.b)],D)},"09fa":function(mt,M,t){"use strict";t.d(M,"b",function(){return N}),t.d(M,"c",function(){return A}),t.d(M,"a",function(){return L}),t.d(M,"d",function(){return v});var f=t("MI8n"),B=t("pmY6"),x=t("Cg/j");const N=Object(x.c)("logService");var A;(function(m){m[m.Trace=0]="Trace",m[m.Debug=1]="Debug",m[m.Info=2]="Info",m[m.Warning=3]="Warning",m[m.Error=4]="Error",m[m.Critical=5]="Critical",m[m.Off=6]="Off"})(A||(A={}));const F=A.Info;class I extends B.a{constructor(){super(...arguments);this.level=F,this._onDidChangeLogLevel=this._register(new f.b)}setLevel(m){this.level!==m&&(this.level=m,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class L extends I{constructor(m=F){super();this.setLevel(m)}trace(m,...d){this.getLevel()<=A.Trace&&console.log("%cTRACE","color: #888",m,...d)}debug(m,...d){this.getLevel()<=A.Debug&&console.log("%cDEBUG","background: #eee; color: #888",m,...d)}info(m,...d){this.getLevel()<=A.Info&&console.log("%c INFO","color: #33f",m,...d)}error(m,...d){this.getLevel()<=A.Error&&console.log("%c ERR","color: #f33",m,...d)}dispose(){}}class v extends B.a{constructor(m){super();this.logger=m,this._register(m)}getLevel(){return this.logger.getLevel()}trace(m,...d){this.logger.trace(m,...d)}debug(m,...d){this.logger.debug(m,...d)}info(m,...d){this.logger.info(m,...d)}error(m,...d){this.logger.error(m,...d)}}},"0JNc":function(mt,M,t){"use strict";t.d(M,"b",function(){return f}),t.d(M,"a",function(){return x}),t.d(M,"c",function(){return N}),t.d(M,"d",function(){return F});const f="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function B(L=""){let v="(-?\\d*\\.\\d\\w*)|([^";for(const m of f){if(L.indexOf(m)>=0)continue;v+="\\"+m}return v+="\\s]+)",new RegExp(v,"g")}const x=B();function N(L){let v=x;if(L&&L instanceof RegExp)if(L.global)v=L;else{let m="g";L.ignoreCase&&(m+="i"),L.multiline&&(m+="m"),L.unicode&&(m+="u"),v=new RegExp(L.source,m)}return v.lastIndex=0,v}const A={maxLen:1e3,windowSize:15,timeBudget:150};function F(L,v,m,d,D=A){if(m.length>D.maxLen){let h=L-D.maxLen/2;return h<0?h=0:d+=h,m=m.substring(h,L+D.maxLen/2),F(L,v,m,d,D)}const S=Date.now(),r=L-1-d;let _=-1,b=null;for(let h=1;!(Date.now()-S>=D.timeBudget);h++){const c=r-D.windowSize*h;v.lastIndex=Math.max(0,c);const p=I(v,m,r,_);if(!p&&b)break;if(b=p,c<=0)break;_=c}if(b){let h={word:b[0],startColumn:d+1+b.index,endColumn:d+1+b.index+b[0].length};return v.lastIndex=0,h}return null}function I(L,v,m,d){let D;for(;D=L.exec(v);){const S=D.index||0;if(S<=m&&L.lastIndex>=m)return D;if(d>0&&S>d)return null}return null}},"0oIH":function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:function(){return t.e(330).then(t.bind(null,"Eg73"))}})},"10Fh":function(mt,M,t){"use strict";t.r(M),t.d(M,"provideSelectionRanges",function(){return C});var f=t("6OMU"),B=t("JQT/"),x=t("/cxE"),N=t("sswD"),A=t("cGHE"),F=t("aokT"),I=t("gCVg"),L=t("wQH0"),v=t("twdY"),m=t("Z7SF"),d=t("N0LK");class D{provideSelectionRanges(O,k){const Y=[];for(const Q of k){const H=[];Y.push(H),this._addInWordRanges(H,O,Q),this._addWordRanges(H,O,Q),this._addWhitespaceLine(H,O,Q),H.push({range:O.getFullModelRange()})}return Y}_addInWordRanges(O,k,Y){const Q=k.getWordAtPosition(Y);if(!Q)return;let{word:H,startColumn:Z}=Q,oe=Y.column-Z,$=oe,te=oe,ne=0;for(;$>=0;$--){let Ee=H.charCodeAt($);if($!==oe&&(Ee===95||Ee===45))break;if(Object(d.G)(Ee)&&Object(d.H)(ne))break;ne=Ee}for($+=1;te<H.length;te++){let Ee=H.charCodeAt(te);if(Object(d.H)(Ee)&&Object(d.G)(ne))break;if(Ee===95||Ee===45)break;ne=Ee}$<te&&O.push({range:new F.a(Y.lineNumber,Z+$,Y.lineNumber,Z+te)})}_addWordRanges(O,k,Y){const Q=k.getWordAtPosition(Y);Q&&O.push({range:new F.a(Y.lineNumber,Q.startColumn,Y.lineNumber,Q.endColumn)})}_addWhitespaceLine(O,k,Y){k.getLineLength(Y.lineNumber)>0&&k.getLineFirstNonWhitespaceColumn(Y.lineNumber)===0&&k.getLineLastNonWhitespaceColumn(Y.lineNumber)===0&&O.push({range:new F.a(Y.lineNumber,1,Y.lineNumber,k.getLineMaxColumn(Y.lineNumber))})}}var S=t("3/fG"),r=t("fjLI"),_=t("nnTU"),b=function(O,k,Y,Q){function H(Z){return Z instanceof Y?Z:new Y(function(oe){oe(Z)})}return new(Y||(Y=Promise))(function(Z,oe){function $(Ee){try{ne(Q.next(Ee))}catch(fe){oe(fe)}}function te(Ee){try{ne(Q.throw(Ee))}catch(fe){oe(fe)}}function ne(Ee){Ee.done?Z(Ee.value):H(Ee.value).then($,te)}ne((Q=Q.apply(O,k||[])).next())})};class h{constructor(O,k){this.index=O,this.ranges=k}mov(O){let k=this.index+(O?1:-1);if(k<0||k>=this.ranges.length)return this;const Y=new h(k,this.ranges);return Y.ranges[k].equalsRange(this.ranges[this.index])?Y.mov(O):Y}}class c{constructor(O){this._editor=O,this._ignoreSelection=!1}static get(O){return O.getContribution(c.ID)}dispose(){var O;(O=this._selectionListener)===null||O===void 0||O.dispose()}run(O){return b(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const k=this._editor.getSelections(),Y=this._editor.getModel();if(!v.z.has(Y))return;if(this._state||(yield C(Y,k.map(H=>H.getPosition()),this._editor.getOption(101),B.a.None).then(H=>{var Z;if(!f.n(H)||H.length!==k.length)return;if(!this._editor.hasModel()||!f.g(this._editor.getSelections(),k,(oe,$)=>oe.equalsSelection($)))return;for(let oe=0;oe<H.length;oe++)H[oe]=H[oe].filter($=>$.containsPosition(k[oe].getStartPosition())&&$.containsPosition(k[oe].getEndPosition())),H[oe].unshift(k[oe]);this._state=H.map(oe=>new h(0,oe)),(Z=this._selectionListener)===null||Z===void 0||Z.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var oe;this._ignoreSelection||((oe=this._selectionListener)===null||oe===void 0||oe.dispose(),this._state=void 0)})})),!this._state)return;this._state=this._state.map(H=>H.mov(O));const Q=this._state.map(H=>I.a.fromPositions(H.ranges[H.index].getStartPosition(),H.ranges[H.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(Q)}finally{this._ignoreSelection=!1}})}}c.ID="editor.contrib.smartSelectController";class p extends N.b{constructor(O,k){super(k);this._forward=O}run(O,k){return b(this,void 0,void 0,function*(){let Y=c.get(k);Y&&(yield Y.run(this._forward))})}}class E extends p{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:S.a("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:L.a.editorTextFocus,primary:1024|512|17,mac:{primary:2048|256|1024|17,secondary:[256|1024|17]},weight:100},menuOpts:{menuId:r.b.MenubarSelectionMenu,group:"1_basic",title:S.a({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}_.a.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class y extends p{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:S.a("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:L.a.editorTextFocus,primary:1024|512|15,mac:{primary:2048|256|1024|15,secondary:[256|1024|15]},weight:100},menuOpts:{menuId:r.b.MenubarSelectionMenu,group:"1_basic",title:S.a({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}Object(N.l)(c.ID,c),Object(N.j)(E),Object(N.j)(y),v.z.register("*",new D);function C(O,k,Y,Q){return b(this,void 0,void 0,function*(){const H=v.z.all(O);H.length===1&&H.unshift(new m.a);let Z=[],oe=[];for(const $ of H)Z.push(Promise.resolve($.provideSelectionRanges(O,k,Q)).then(te=>{if(f.n(te)&&te.length===k.length)for(let ne=0;ne<k.length;ne++){oe[ne]||(oe[ne]=[]);for(const Ee of te[ne])F.a.isIRange(Ee.range)&&F.a.containsPosition(Ee.range,k[ne])&&oe[ne].push(F.a.lift(Ee.range))}},x.g));return yield Promise.all(Z),oe.map($=>{if($.length===0)return[];$.sort((fe,ee)=>A.a.isBefore(fe.getStartPosition(),ee.getStartPosition())?1:A.a.isBefore(ee.getStartPosition(),fe.getStartPosition())||A.a.isBefore(fe.getEndPosition(),ee.getEndPosition())?-1:A.a.isBefore(ee.getEndPosition(),fe.getEndPosition())?1:0);let te=[],ne;for(const fe of $)(!ne||F.a.containsRange(fe,ne)&&!F.a.equalsRange(fe,ne))&&(te.push(fe),ne=fe);if(!Y.selectLeadingAndTrailingWhitespace)return te;let Ee=[te[0]];for(let fe=1;fe<te.length;fe++){const ee=te[fe-1],ie=te[fe];if(ie.startLineNumber!==ee.startLineNumber||ie.endLineNumber!==ee.endLineNumber){const U=new F.a(ee.startLineNumber,O.getLineFirstNonWhitespaceColumn(ee.startLineNumber),ee.endLineNumber,O.getLineLastNonWhitespaceColumn(ee.endLineNumber));U.containsRange(ee)&&!U.equalsRange(ee)&&ie.containsRange(U)&&!ie.equalsRange(U)&&Ee.push(U);const G=new F.a(ee.startLineNumber,1,ee.endLineNumber,O.getLineMaxColumn(ee.endLineNumber));G.containsRange(ee)&&!G.equalsRange(U)&&ie.containsRange(G)&&!ie.equalsRange(G)&&Ee.push(G)}Ee.push(ie)}return Ee})})}Object(N.o)("_executeSelectionRangeProvider",function(O,...k){const[Y]=k;return C(O,Y,{selectLeadingAndTrailingWhitespace:!0},B.a.None)})},"1I1M":function(mt,M,t){"use strict";t.d(M,"a",function(){return I}),t.d(M,"b",function(){return L});var f=t("N0LK"),B=t("Ll0s"),x=t("snIX"),N=t("5v8Y"),A=t("cGHE"),F=t("aokT");class I{static _createWord(m,d,D,S,r){return{start:S,end:r,wordType:d,nextCharClass:D}}static _findPreviousWordOnLine(m,d,D){let S=d.getLineContent(D.lineNumber);return this._doFindPreviousWordOnLine(S,m,D)}static _doFindPreviousWordOnLine(m,d,D){let S=0;for(let r=D.column-2;r>=0;r--){let _=m.charCodeAt(r),b=d.get(_);if(b===0){if(S===2)return this._createWord(m,S,b,r+1,this._findEndOfWord(m,d,S,r+1));S=1}else if(b===2){if(S===1)return this._createWord(m,S,b,r+1,this._findEndOfWord(m,d,S,r+1));S=2}else if(b===1&&S!==0)return this._createWord(m,S,b,r+1,this._findEndOfWord(m,d,S,r+1))}return S!==0?this._createWord(m,S,1,0,this._findEndOfWord(m,d,S,0)):null}static _findEndOfWord(m,d,D,S){let r=m.length;for(let _=S;_<r;_++){let b=m.charCodeAt(_),h=d.get(b);if(h===1)return _;if(D===1&&h===2)return _;if(D===2&&h===0)return _}return r}static _findNextWordOnLine(m,d,D){let S=d.getLineContent(D.lineNumber);return this._doFindNextWordOnLine(S,m,D)}static _doFindNextWordOnLine(m,d,D){let S=0,r=m.length;for(let _=D.column-1;_<r;_++){let b=m.charCodeAt(_),h=d.get(b);if(h===0){if(S===2)return this._createWord(m,S,h,this._findStartOfWord(m,d,S,_-1),_);S=1}else if(h===2){if(S===1)return this._createWord(m,S,h,this._findStartOfWord(m,d,S,_-1),_);S=2}else if(h===1&&S!==0)return this._createWord(m,S,h,this._findStartOfWord(m,d,S,_-1),_)}return S!==0?this._createWord(m,S,1,this._findStartOfWord(m,d,S,r-1),r):null}static _findStartOfWord(m,d,D,S){for(let r=S;r>=0;r--){let _=m.charCodeAt(r),b=d.get(_);if(b===1)return r+1;if(D===1&&b===2)return r+1;if(D===2&&b===0)return r+1}return 0}static moveWordLeft(m,d,D,S){let r=D.lineNumber,_=D.column;_===1&&(r>1&&(r=r-1,_=d.getLineMaxColumn(r)));let b=I._findPreviousWordOnLine(m,d,new A.a(r,_));if(S===0)return new A.a(r,b?b.start+1:1);if(S===1)return b&&b.wordType===2&&b.end-b.start===1&&b.nextCharClass===0&&(b=I._findPreviousWordOnLine(m,d,new A.a(r,b.start+1))),new A.a(r,b?b.start+1:1);if(S===3){for(;b&&b.wordType===2;)b=I._findPreviousWordOnLine(m,d,new A.a(r,b.start+1));return new A.a(r,b?b.start+1:1)}return b&&_<=b.end+1&&(b=I._findPreviousWordOnLine(m,d,new A.a(r,b.start+1))),new A.a(r,b?b.end+1:1)}static _moveWordPartLeft(m,d){const D=d.lineNumber,S=m.getLineMaxColumn(D);if(d.column===1)return D>1?new A.a(D-1,m.getLineMaxColumn(D-1)):d;const r=m.getLineContent(D);for(let _=d.column-1;_>1;_--){const b=r.charCodeAt(_-2),h=r.charCodeAt(_-1);if(b===95&&h!==95)return new A.a(D,_);if(f.G(b)&&f.H(h))return new A.a(D,_);if(f.H(b)&&f.H(h)&&_+1<S){const c=r.charCodeAt(_);if(f.G(c))return new A.a(D,_)}}return new A.a(D,1)}static moveWordRight(m,d,D,S){let r=D.lineNumber,_=D.column,b=!1;_===d.getLineMaxColumn(r)&&(r<d.getLineCount()&&(b=!0,r=r+1,_=1));let h=I._findNextWordOnLine(m,d,new A.a(r,_));if(S===2)h&&h.wordType===2&&(h.end-h.start===1&&h.nextCharClass===0&&(h=I._findNextWordOnLine(m,d,new A.a(r,h.end+1)))),h?_=h.end+1:_=d.getLineMaxColumn(r);else if(S===3){for(b&&(_=0);h&&(h.wordType===2||h.start+1<=_);)h=I._findNextWordOnLine(m,d,new A.a(r,h.end+1));h?_=h.start+1:_=d.getLineMaxColumn(r)}else h&&!b&&_>=h.start+1&&(h=I._findNextWordOnLine(m,d,new A.a(r,h.end+1))),h?_=h.start+1:_=d.getLineMaxColumn(r);return new A.a(r,_)}static _moveWordPartRight(m,d){const D=d.lineNumber,S=m.getLineMaxColumn(D);if(d.column===S)return D<m.getLineCount()?new A.a(D+1,1):d;const r=m.getLineContent(D);for(let _=d.column+1;_<S;_++){const b=r.charCodeAt(_-2),h=r.charCodeAt(_-1);if(b!==95&&h===95)return new A.a(D,_);if(f.G(b)&&f.H(h))return new A.a(D,_);if(f.H(b)&&f.H(h)&&_+1<S){const c=r.charCodeAt(_);if(f.G(c))return new A.a(D,_)}}return new A.a(D,S)}static _deleteWordLeftWhitespace(m,d){const D=m.getLineContent(d.lineNumber),S=d.column-2,r=f.I(D,S);return r+1<S?new F.a(d.lineNumber,r+2,d.lineNumber,d.column):null}static deleteWordLeft(m,d){const D=m.wordSeparators,S=m.model,r=m.selection,_=m.whitespaceHeuristics;if(!r.isEmpty())return r;if(x.a.isAutoClosingPairDelete(m.autoClosingDelete,m.autoClosingBrackets,m.autoClosingQuotes,m.autoClosingPairs.autoClosingPairsOpenByEnd,m.model,[m.selection],m.autoClosedCharacters)){const E=m.selection.getPosition();return new F.a(E.lineNumber,E.column-1,E.lineNumber,E.column+1)}const b=new A.a(r.positionLineNumber,r.positionColumn);let h=b.lineNumber,c=b.column;if(h===1&&c===1)return null;if(_){let E=this._deleteWordLeftWhitespace(S,b);if(E)return E}let p=I._findPreviousWordOnLine(D,S,b);return d===0?p?c=p.start+1:c>1?c=1:(h--,c=S.getLineMaxColumn(h)):(p&&c<=p.end+1&&(p=I._findPreviousWordOnLine(D,S,new A.a(h,p.start+1))),p?c=p.end+1:c>1?c=1:(h--,c=S.getLineMaxColumn(h))),new F.a(h,c,b.lineNumber,b.column)}static deleteInsideWord(m,d,D){if(!D.isEmpty())return D;const S=new A.a(D.positionLineNumber,D.positionColumn);let r=this._deleteInsideWordWhitespace(d,S);return r||this._deleteInsideWordDetermineDeleteRange(m,d,S)}static _charAtIsWhitespace(m,d){const D=m.charCodeAt(d);return D===32||D===9}static _deleteInsideWordWhitespace(m,d){const D=m.getLineContent(d.lineNumber),S=D.length;if(S===0)return null;let r=Math.max(d.column-2,0);if(!this._charAtIsWhitespace(D,r))return null;let _=Math.min(d.column-1,S-1);if(!this._charAtIsWhitespace(D,_))return null;for(;r>0&&this._charAtIsWhitespace(D,r-1);)r--;for(;_+1<S&&this._charAtIsWhitespace(D,_+1);)_++;return new F.a(d.lineNumber,r+1,d.lineNumber,_+2)}static _deleteInsideWordDetermineDeleteRange(m,d,D){const S=d.getLineContent(D.lineNumber),r=S.length;if(r===0)return D.lineNumber>1?new F.a(D.lineNumber-1,d.getLineMaxColumn(D.lineNumber-1),D.lineNumber,1):D.lineNumber<d.getLineCount()?new F.a(D.lineNumber,1,D.lineNumber+1,1):new F.a(D.lineNumber,1,D.lineNumber,1);const _=E=>E.start+1<=D.column&&D.column<=E.end+1,b=(E,y)=>(E=Math.min(E,D.column),y=Math.max(y,D.column),new F.a(D.lineNumber,E,D.lineNumber,y)),h=E=>{let y=E.start+1,C=E.end+1,O=!1;for(;C-1<r&&this._charAtIsWhitespace(S,C-1);)O=!0,C++;if(!O)for(;y>1&&this._charAtIsWhitespace(S,y-2);)y--;return b(y,C)},c=I._findPreviousWordOnLine(m,d,D);if(c&&_(c))return h(c);const p=I._findNextWordOnLine(m,d,D);return p&&_(p)?h(p):c&&p?b(c.end+1,p.start+1):c?b(c.start+1,c.end+1):p?b(p.start+1,p.end+1):b(1,r+1)}static _deleteWordPartLeft(m,d){if(!d.isEmpty())return d;const D=d.getPosition(),S=I._moveWordPartLeft(m,D);return new F.a(D.lineNumber,D.column,S.lineNumber,S.column)}static _findFirstNonWhitespaceChar(m,d){let D=m.length;for(let S=d;S<D;S++){let r=m.charAt(S);if(r!==" "&&r!==" ")return S}return D}static _deleteWordRightWhitespace(m,d){const D=m.getLineContent(d.lineNumber),S=d.column-1,r=this._findFirstNonWhitespaceChar(D,S);return S+1<r?new F.a(d.lineNumber,d.column,d.lineNumber,r+1):null}static deleteWordRight(m,d){const D=m.wordSeparators,S=m.model,r=m.selection,_=m.whitespaceHeuristics;if(!r.isEmpty())return r;const b=new A.a(r.positionLineNumber,r.positionColumn);let h=b.lineNumber,c=b.column;const p=S.getLineCount(),E=S.getLineMaxColumn(h);if(h===p&&c===E)return null;if(_){let C=this._deleteWordRightWhitespace(S,b);if(C)return C}let y=I._findNextWordOnLine(D,S,b);return d===2?y?c=y.end+1:c<E||h===p?c=E:(h++,y=I._findNextWordOnLine(D,S,new A.a(h,1)),y?c=y.start+1:c=S.getLineMaxColumn(h)):(y&&c>=y.start+1&&(y=I._findNextWordOnLine(D,S,new A.a(h,y.end+1))),y?c=y.start+1:c<E||h===p?c=E:(h++,y=I._findNextWordOnLine(D,S,new A.a(h,1)),y?c=y.start+1:c=S.getLineMaxColumn(h))),new F.a(h,c,b.lineNumber,b.column)}static _deleteWordPartRight(m,d){if(!d.isEmpty())return d;const D=d.getPosition(),S=I._moveWordPartRight(m,D);return new F.a(D.lineNumber,D.column,S.lineNumber,S.column)}static _createWordAtPosition(m,d,D){const S=new F.a(d,D.start+1,d,D.end+1);return{word:m.getValueInRange(S),startColumn:S.startColumn,endColumn:S.endColumn}}static getWordAtPosition(m,d,D){const S=Object(N.a)(d),r=I._findPreviousWordOnLine(S,m,D);if(r&&r.wordType===1&&r.start<=D.column-1&&D.column-1<=r.end)return I._createWordAtPosition(m,D.lineNumber,r);const _=I._findNextWordOnLine(S,m,D);return _&&_.wordType===1&&_.start<=D.column-1&&D.column-1<=_.end?I._createWordAtPosition(m,D.lineNumber,_):null}static word(m,d,D,S,r){const _=Object(N.a)(m.wordSeparators);let b=I._findPreviousWordOnLine(_,d,r),h=I._findNextWordOnLine(_,d,r);if(!S){let C,O;return b&&b.wordType===1&&b.start<=r.column-1&&r.column-1<=b.end?(C=b.start+1,O=b.end+1):h&&h.wordType===1&&h.start<=r.column-1&&r.column-1<=h.end?(C=h.start+1,O=h.end+1):(b?C=b.end+1:C=1,h?O=h.start+1:O=d.getLineMaxColumn(r.lineNumber)),new B.f(new F.a(r.lineNumber,C,r.lineNumber,O),0,new A.a(r.lineNumber,O),0)}let c,p;b&&b.wordType===1&&b.start<r.column-1&&r.column-1<b.end?(c=b.start+1,p=b.end+1):h&&h.wordType===1&&h.start<r.column-1&&r.column-1<h.end?(c=h.start+1,p=h.end+1):(c=r.column,p=r.column);let E=r.lineNumber,y;if(D.selectionStart.containsPosition(r))y=D.selectionStart.endColumn;else if(r.isBeforeOrEqual(D.selectionStart.getStartPosition())){y=c;let C=new A.a(E,y);D.selectionStart.containsPosition(C)&&(y=D.selectionStart.endColumn)}else{y=p;let C=new A.a(E,y);D.selectionStart.containsPosition(C)&&(y=D.selectionStart.startColumn)}return D.move(!0,E,y,0)}}class L extends I{static deleteWordPartLeft(m){const d=v([I.deleteWordLeft(m,0),I.deleteWordLeft(m,2),I._deleteWordPartLeft(m.model,m.selection)]);return d.sort(F.a.compareRangesUsingEnds),d[2]}static deleteWordPartRight(m){const d=v([I.deleteWordRight(m,0),I.deleteWordRight(m,2),I._deleteWordPartRight(m.model,m.selection)]);return d.sort(F.a.compareRangesUsingStarts),d[0]}static moveWordPartLeft(m,d,D){const S=v([I.moveWordLeft(m,d,D,0),I.moveWordLeft(m,d,D,2),I._moveWordPartLeft(d,D)]);return S.sort(A.a.compare),S[2]}static moveWordPartRight(m,d,D){const S=v([I.moveWordRight(m,d,D,0),I.moveWordRight(m,d,D,2),I._moveWordPartRight(d,D)]);return S.sort(A.a.compare),S[0]}}function v(m){return m.filter(d=>Boolean(d))}},"1YUG":function(mt,M,t){"use strict";t.r(M),t.d(M,"CoreEditorCommand",function(){return c}),t.d(M,"EditorScroll_",function(){return p}),t.d(M,"RevealLine_",function(){return E}),t.d(M,"CoreNavigationCommands",function(){return C}),t.d(M,"CoreEditingCommands",function(){return Q});var f=t("3/fG"),B=t("D3Dy"),x=t("746U"),N=t("OBOq"),A=t("sswD"),F=t("Vxe3"),I=t("Ll0s"),L=t("cGHE"),v=t("aokT");class m{static columnSelect(oe,$,te,ne,Ee,fe){let ee=Math.abs(Ee-te)+1,ie=te>Ee,U=ne>fe,G=ne<fe,J=[];for(let he=0;he<ee;he++){let xe=te+(ie?-he:he),Ie=I.a.columnFromVisibleColumn2(oe,$,xe,ne),Le=I.a.columnFromVisibleColumn2(oe,$,xe,fe),Te=I.a.visibleColumnFromColumn2(oe,$,new L.a(xe,Ie)),ze=I.a.visibleColumnFromColumn2(oe,$,new L.a(xe,Le));if(G){if(Te>fe)continue;if(ze<ne)continue}if(U){if(ze>ne)continue;if(Te<fe)continue}J.push(new I.f(new v.a(xe,Ie,xe,Ie),0,new L.a(xe,Le),0))}if(J.length===0)for(let he=0;he<ee;he++){const xe=te+(ie?-he:he),Ie=$.getLineMaxColumn(xe);J.push(new I.f(new v.a(xe,Ie,xe,Ie),0,new L.a(xe,Ie),0))}return{viewStates:J,reversed:ie,fromLineNumber:te,fromVisualColumn:ne,toLineNumber:Ee,toVisualColumn:fe}}static columnSelectLeft(oe,$,te){let ne=te.toViewVisualColumn;return ne>0&&ne--,m.columnSelect(oe,$,te.fromViewLineNumber,te.fromViewVisualColumn,te.toViewLineNumber,ne)}static columnSelectRight(oe,$,te){let ne=0;const Ee=Math.min(te.fromViewLineNumber,te.toViewLineNumber),fe=Math.max(te.fromViewLineNumber,te.toViewLineNumber);for(let ie=Ee;ie<=fe;ie++){const U=$.getLineMaxColumn(ie),G=I.a.visibleColumnFromColumn2(oe,$,new L.a(ie,U));ne=Math.max(ne,G)}let ee=te.toViewVisualColumn;return ee<ne&&ee++,this.columnSelect(oe,$,te.fromViewLineNumber,te.fromViewVisualColumn,te.toViewLineNumber,ee)}static columnSelectUp(oe,$,te,ne){const Ee=ne?oe.pageSize:1,fe=Math.max(1,te.toViewLineNumber-Ee);return this.columnSelect(oe,$,te.fromViewLineNumber,te.fromViewVisualColumn,fe,te.toViewVisualColumn)}static columnSelectDown(oe,$,te,ne){const Ee=ne?oe.pageSize:1,fe=Math.min($.getLineCount(),te.toViewLineNumber+Ee);return this.columnSelect(oe,$,te.fromViewLineNumber,te.fromViewVisualColumn,fe,te.toViewVisualColumn)}}var d=t("snIX"),D=t("oAeH"),S=t("GR/f"),r=t("wQH0"),_=t("T8No"),b=t("nrhi");const h=0;class c extends A.c{runEditorCommand(oe,$,te){const ne=$._getViewModel();if(!ne)return;this.runCoreEditorCommand(ne,te||{})}}var p;(function(oe){const $=function(ne){if(!x.k(ne))return!1;const Ee=ne;return x.l(Ee.to)?!x.m(Ee.by)&&!x.l(Ee.by)||!x.m(Ee.value)&&!x.j(Ee.value)?!1:!(!x.m(Ee.revealCursor)&&!x.g(Ee.revealCursor)):!1};oe.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:$,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},oe.RawDirection={Up:"up",Down:"down"},oe.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"};function te(ne){let Ee;switch(ne.to){case oe.RawDirection.Up:Ee=1;break;case oe.RawDirection.Down:Ee=2;break;default:return null}let fe;switch(ne.by){case oe.RawUnit.Line:fe=1;break;case oe.RawUnit.WrappedLine:fe=2;break;case oe.RawUnit.Page:fe=3;break;case oe.RawUnit.HalfPage:fe=4;break;default:fe=2}const ee=Math.floor(ne.value||1),ie=!!ne.revealCursor;return{direction:Ee,unit:fe,value:ee,revealCursor:ie,select:!!ne.select}}oe.parse=te})(p||(p={}));var E;(function(oe){const $=function(te){if(!x.k(te))return!1;const ne=te;return!x.j(ne.lineNumber)&&!x.l(ne.lineNumber)?!1:!(!x.m(ne.at)&&!x.l(ne.at))};oe.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:$,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},oe.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(E||(E={}));class y{constructor(oe){oe.addImplementation(1e4,"code-editor",($,te)=>{const ne=$.get(F.a).getFocusedCodeEditor();return ne&&ne.hasTextFocus()?this._runEditorCommand($,ne,te):!1}),oe.addImplementation(1e3,"generic-dom-input-textarea",($,te)=>{const ne=document.activeElement;return ne&&["input","textarea"].indexOf(ne.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),oe.addImplementation(0,"generic-dom",($,te)=>{const ne=$.get(F.a).getActiveCodeEditor();return ne?(ne.focus(),this._runEditorCommand($,ne,te)):!1})}_runEditorCommand(oe,$,te){const ne=this.runEditorCommand(oe,$,te);return ne||!0}}var C;(function(oe){class $ extends c{constructor(ue){super(ue);this._inSelectionMode=ue.inSelectionMode}runCoreEditorCommand(ue,je){ue.model.pushStackElement(),ue.setCursorStates(je.source,3,[D.b.moveTo(ue,ue.getPrimaryCursorState(),this._inSelectionMode,je.position,je.viewPosition)]),ue.revealPrimaryCursor(je.source,!0)}}oe.MoveTo=Object(A.k)(new $({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),oe.MoveToSelect=Object(A.k)(new $({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class te extends c{runCoreEditorCommand(ue,je){ue.model.pushStackElement();const Pe=this._getColumnSelectResult(ue,ue.getPrimaryCursorState(),ue.getCursorColumnSelectData(),je);ue.setCursorStates(je.source,3,Pe.viewStates.map(ve=>I.d.fromViewState(ve))),ue.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:Pe.fromLineNumber,fromViewVisualColumn:Pe.fromVisualColumn,toViewLineNumber:Pe.toLineNumber,toViewVisualColumn:Pe.toVisualColumn}),Pe.reversed?ue.revealTopMostCursor(je.source):ue.revealBottomMostCursor(je.source)}}oe.ColumnSelect=Object(A.k)(new class extends te{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(ue,je,Pe,ve){const ce=ue.model.validatePosition(ve.position),le=ue.coordinatesConverter.validateViewPosition(new L.a(ve.viewPosition.lineNumber,ve.viewPosition.column),ce);let Ce=ve.doColumnSelect?Pe.fromViewLineNumber:le.lineNumber,ye=ve.doColumnSelect?Pe.fromViewVisualColumn:ve.mouseColumn-1;return m.columnSelect(ue.cursorConfig,ue,Ce,ye,le.lineNumber,ve.mouseColumn-1)}}),oe.CursorColumnSelectLeft=Object(A.k)(new class extends te{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:2048|1024|512|15,linux:{primary:0}}})}_getColumnSelectResult(ue,je,Pe,ve){return m.columnSelectLeft(ue.cursorConfig,ue,Pe)}}),oe.CursorColumnSelectRight=Object(A.k)(new class extends te{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:2048|1024|512|17,linux:{primary:0}}})}_getColumnSelectResult(ue,je,Pe,ve){return m.columnSelectRight(ue.cursorConfig,ue,Pe)}});class ne extends te{constructor(ue){super(ue);this._isPaged=ue.isPaged}_getColumnSelectResult(ue,je,Pe,ve){return m.columnSelectUp(ue.cursorConfig,ue,Pe,this._isPaged)}}oe.CursorColumnSelectUp=Object(A.k)(new ne({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:2048|1024|512|16,linux:{primary:0}}})),oe.CursorColumnSelectPageUp=Object(A.k)(new ne({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:2048|1024|512|11,linux:{primary:0}}}));class Ee extends te{constructor(ue){super(ue);this._isPaged=ue.isPaged}_getColumnSelectResult(ue,je,Pe,ve){return m.columnSelectDown(ue.cursorConfig,ue,Pe,this._isPaged)}}oe.CursorColumnSelectDown=Object(A.k)(new Ee({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:2048|1024|512|18,linux:{primary:0}}})),oe.CursorColumnSelectPageDown=Object(A.k)(new Ee({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:2048|1024|512|12,linux:{primary:0}}}));class fe extends c{constructor(){super({id:"cursorMove",precondition:void 0,description:D.a.description})}runCoreEditorCommand(ue,je){const Pe=D.a.parse(je);if(!Pe)return;this._runCursorMove(ue,je.source,Pe)}_runCursorMove(ue,je,Pe){ue.model.pushStackElement(),ue.setCursorStates(je,3,fe._move(ue,ue.getCursorStates(),Pe)),ue.revealPrimaryCursor(je,!0)}static _move(ue,je,Pe){const ve=Pe.select,ce=Pe.value;switch(Pe.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return D.b.simpleMove(ue,je,Pe.direction,ve,ce,Pe.unit);case 11:case 13:case 12:case 14:return D.b.viewportMove(ue,je,Pe.direction,ve,ce);default:return null}}}oe.CursorMoveImpl=fe,oe.CursorMove=Object(A.k)(new fe);class ee extends c{constructor(ue){super(ue);this._staticArgs=ue.args}runCoreEditorCommand(ue,je){let Pe=this._staticArgs;this._staticArgs.value===-1&&(Pe={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:ue.cursorConfig.pageSize}),ue.model.pushStackElement(),ue.setCursorStates(je.source,3,D.b.simpleMove(ue,ue.getCursorStates(),Pe.direction,Pe.select,Pe.value,Pe.unit)),ue.revealPrimaryCursor(je.source,!0)}}oe.CursorLeft=Object(A.k)(new ee({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:15,mac:{primary:15,secondary:[256|32]}}})),oe.CursorLeftSelect=Object(A.k)(new ee({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:1024|15}})),oe.CursorRight=Object(A.k)(new ee({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:17,mac:{primary:17,secondary:[256|36]}}})),oe.CursorRightSelect=Object(A.k)(new ee({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:1024|17}})),oe.CursorUp=Object(A.k)(new ee({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:16,mac:{primary:16,secondary:[256|46]}}})),oe.CursorUpSelect=Object(A.k)(new ee({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:1024|16,secondary:[2048|1024|16],mac:{primary:1024|16},linux:{primary:1024|16}}})),oe.CursorPageUp=Object(A.k)(new ee({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:11}})),oe.CursorPageUpSelect=Object(A.k)(new ee({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:1024|11}})),oe.CursorDown=Object(A.k)(new ee({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:18,mac:{primary:18,secondary:[256|44]}}})),oe.CursorDownSelect=Object(A.k)(new ee({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:1024|18,secondary:[2048|1024|18],mac:{primary:1024|18},linux:{primary:1024|18}}})),oe.CursorPageDown=Object(A.k)(new ee({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:12}})),oe.CursorPageDownSelect=Object(A.k)(new ee({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:1024|12}})),oe.CreateCursor=Object(A.k)(new class extends c{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(ue,je){let Pe;je.wholeLine?Pe=D.b.line(ue,ue.getPrimaryCursorState(),!1,je.position,je.viewPosition):Pe=D.b.moveTo(ue,ue.getPrimaryCursorState(),!1,je.position,je.viewPosition);const ve=ue.getCursorStates();if(ve.length>1){const ce=Pe.modelState?Pe.modelState.position:null,le=Pe.viewState?Pe.viewState.position:null;for(let Ce=0,ye=ve.length;Ce<ye;Ce++){const ge=ve[Ce];if(ce&&!ge.modelState.selection.containsPosition(ce))continue;if(le&&!ge.viewState.selection.containsPosition(le))continue;ve.splice(Ce,1),ue.model.pushStackElement(),ue.setCursorStates(je.source,3,ve);return}}ve.push(Pe),ue.model.pushStackElement(),ue.setCursorStates(je.source,3,ve)}}),oe.LastCursorMoveToSelect=Object(A.k)(new class extends c{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(ue,je){const Pe=ue.getLastAddedCursorIndex(),ve=ue.getCursorStates(),ce=ve.slice(0);ce[Pe]=D.b.moveTo(ue,ve[Pe],!0,je.position,je.viewPosition),ue.model.pushStackElement(),ue.setCursorStates(je.source,3,ce)}});class ie extends c{constructor(ue){super(ue);this._inSelectionMode=ue.inSelectionMode}runCoreEditorCommand(ue,je){ue.model.pushStackElement(),ue.setCursorStates(je.source,3,D.b.moveToBeginningOfLine(ue,ue.getCursorStates(),this._inSelectionMode)),ue.revealPrimaryCursor(je.source,!0)}}oe.CursorHome=Object(A.k)(new ie({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:14,mac:{primary:14,secondary:[2048|15]}}})),oe.CursorHomeSelect=Object(A.k)(new ie({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:1024|14,mac:{primary:1024|14,secondary:[2048|1024|15]}}}));class U extends c{constructor(ue){super(ue);this._inSelectionMode=ue.inSelectionMode}runCoreEditorCommand(ue,je){ue.model.pushStackElement(),ue.setCursorStates(je.source,3,this._exec(ue.getCursorStates())),ue.revealPrimaryCursor(je.source,!0)}_exec(ue){const je=[];for(let Pe=0,ve=ue.length;Pe<ve;Pe++){const ce=ue[Pe],le=ce.modelState.position.lineNumber;je[Pe]=I.d.fromModelState(ce.modelState.move(this._inSelectionMode,le,1,0))}return je}}oe.CursorLineStart=Object(A.k)(new U({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:0,mac:{primary:256|31}}})),oe.CursorLineStartSelect=Object(A.k)(new U({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:0,mac:{primary:256|1024|31}}}));class G extends c{constructor(ue){super(ue);this._inSelectionMode=ue.inSelectionMode}runCoreEditorCommand(ue,je){ue.model.pushStackElement(),ue.setCursorStates(je.source,3,D.b.moveToEndOfLine(ue,ue.getCursorStates(),this._inSelectionMode,je.sticky||!1)),ue.revealPrimaryCursor(je.source,!0)}}oe.CursorEnd=Object(A.k)(new G({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:h,kbExpr:r.a.textInputFocus,primary:13,mac:{primary:13,secondary:[2048|17]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:f.a("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),oe.CursorEndSelect=Object(A.k)(new G({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:h,kbExpr:r.a.textInputFocus,primary:1024|13,mac:{primary:1024|13,secondary:[2048|1024|17]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:f.a("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class J extends c{constructor(ue){super(ue);this._inSelectionMode=ue.inSelectionMode}runCoreEditorCommand(ue,je){ue.model.pushStackElement(),ue.setCursorStates(je.source,3,this._exec(ue,ue.getCursorStates())),ue.revealPrimaryCursor(je.source,!0)}_exec(ue,je){const Pe=[];for(let ve=0,ce=je.length;ve<ce;ve++){const le=je[ve],Ce=le.modelState.position.lineNumber,ye=ue.model.getLineMaxColumn(Ce);Pe[ve]=I.d.fromModelState(le.modelState.move(this._inSelectionMode,Ce,ye,0))}return Pe}}oe.CursorLineEnd=Object(A.k)(new J({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:0,mac:{primary:256|35}}})),oe.CursorLineEndSelect=Object(A.k)(new J({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:0,mac:{primary:256|1024|35}}}));class he extends c{constructor(ue){super(ue);this._inSelectionMode=ue.inSelectionMode}runCoreEditorCommand(ue,je){ue.model.pushStackElement(),ue.setCursorStates(je.source,3,D.b.moveToBeginningOfBuffer(ue,ue.getCursorStates(),this._inSelectionMode)),ue.revealPrimaryCursor(je.source,!0)}}oe.CursorTop=Object(A.k)(new he({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:2048|14,mac:{primary:2048|16}}})),oe.CursorTopSelect=Object(A.k)(new he({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:2048|1024|14,mac:{primary:2048|1024|16}}}));class xe extends c{constructor(ue){super(ue);this._inSelectionMode=ue.inSelectionMode}runCoreEditorCommand(ue,je){ue.model.pushStackElement(),ue.setCursorStates(je.source,3,D.b.moveToEndOfBuffer(ue,ue.getCursorStates(),this._inSelectionMode)),ue.revealPrimaryCursor(je.source,!0)}}oe.CursorBottom=Object(A.k)(new xe({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:2048|13,mac:{primary:2048|18}}})),oe.CursorBottomSelect=Object(A.k)(new xe({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:2048|1024|13,mac:{primary:2048|1024|18}}}));class Ie extends c{constructor(){super({id:"editorScroll",precondition:void 0,description:p.description})}runCoreEditorCommand(ue,je){const Pe=p.parse(je);if(!Pe)return;this._runEditorScroll(ue,je.source,Pe)}_runEditorScroll(ue,je,Pe){const ve=this._computeDesiredScrollTop(ue,Pe);if(Pe.revealCursor){const ce=ue.getCompletelyVisibleViewRangeAtScrollTop(ve);ue.setCursorStates(je,3,[D.b.findPositionInViewportIfOutside(ue,ue.getPrimaryCursorState(),ce,Pe.select)])}ue.setScrollTop(ve,0)}_computeDesiredScrollTop(ue,je){if(je.unit===1){const ce=ue.getCompletelyVisibleViewRange(),le=ue.coordinatesConverter.convertViewRangeToModelRange(ce);let Ce;je.direction===1?Ce=Math.max(1,le.startLineNumber-je.value):Ce=Math.min(ue.model.getLineCount(),le.startLineNumber+je.value);const ye=ue.coordinatesConverter.convertModelPositionToViewPosition(new L.a(Ce,1));return ue.getVerticalOffsetForLineNumber(ye.lineNumber)}let Pe;je.unit===3?Pe=ue.cursorConfig.pageSize*je.value:je.unit===4?Pe=Math.round(ue.cursorConfig.pageSize/2)*je.value:Pe=je.value;const ve=(je.direction===1?-1:1)*Pe;return ue.getScrollTop()+ve*ue.cursorConfig.lineHeight}}oe.EditorScrollImpl=Ie,oe.EditorScroll=Object(A.k)(new Ie),oe.ScrollLineUp=Object(A.k)(new class extends c{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:2048|16,mac:{primary:256|11}}})}runCoreEditorCommand(ue,je){oe.EditorScroll._runEditorScroll(ue,je.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})}}),oe.ScrollPageUp=Object(A.k)(new class extends c{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:2048|11,win:{primary:512|11},linux:{primary:512|11}}})}runCoreEditorCommand(ue,je){oe.EditorScroll._runEditorScroll(ue,je.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})}}),oe.ScrollLineDown=Object(A.k)(new class extends c{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:2048|18,mac:{primary:256|12}}})}runCoreEditorCommand(ue,je){oe.EditorScroll._runEditorScroll(ue,je.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})}}),oe.ScrollPageDown=Object(A.k)(new class extends c{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:2048|12,win:{primary:512|12},linux:{primary:512|12}}})}runCoreEditorCommand(ue,je){oe.EditorScroll._runEditorScroll(ue,je.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})}});class Le extends c{constructor(ue){super(ue);this._inSelectionMode=ue.inSelectionMode}runCoreEditorCommand(ue,je){ue.model.pushStackElement(),ue.setCursorStates(je.source,3,[D.b.word(ue,ue.getPrimaryCursorState(),this._inSelectionMode,je.position)]),ue.revealPrimaryCursor(je.source,!0)}}oe.WordSelect=Object(A.k)(new Le({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),oe.WordSelectDrag=Object(A.k)(new Le({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),oe.LastCursorWordSelect=Object(A.k)(new class extends c{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(ue,je){const Pe=ue.getLastAddedCursorIndex(),ve=ue.getCursorStates(),ce=ve.slice(0),le=ve[Pe];ce[Pe]=D.b.word(ue,le,le.modelState.hasSelection(),je.position),ue.model.pushStackElement(),ue.setCursorStates(je.source,3,ce)}});class Te extends c{constructor(ue){super(ue);this._inSelectionMode=ue.inSelectionMode}runCoreEditorCommand(ue,je){ue.model.pushStackElement(),ue.setCursorStates(je.source,3,[D.b.line(ue,ue.getPrimaryCursorState(),this._inSelectionMode,je.position,je.viewPosition)]),ue.revealPrimaryCursor(je.source,!1)}}oe.LineSelect=Object(A.k)(new Te({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),oe.LineSelectDrag=Object(A.k)(new Te({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class ze extends c{constructor(ue){super(ue);this._inSelectionMode=ue.inSelectionMode}runCoreEditorCommand(ue,je){const Pe=ue.getLastAddedCursorIndex(),ve=ue.getCursorStates(),ce=ve.slice(0);ce[Pe]=D.b.line(ue,ve[Pe],this._inSelectionMode,je.position,je.viewPosition),ue.model.pushStackElement(),ue.setCursorStates(je.source,3,ce)}}oe.LastCursorLineSelect=Object(A.k)(new ze({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),oe.LastCursorLineSelectDrag=Object(A.k)(new ze({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),oe.ExpandLineSelection=Object(A.k)(new class extends c{constructor(){super({id:"expandLineSelection",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:2048|42}})}runCoreEditorCommand(ue,je){ue.model.pushStackElement(),ue.setCursorStates(je.source,3,D.b.expandLineSelection(ue,ue.getCursorStates())),ue.revealPrimaryCursor(je.source,!0)}}),oe.CancelSelection=Object(A.k)(new class extends c{constructor(){super({id:"cancelSelection",precondition:r.a.hasNonEmptySelection,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:9,secondary:[1024|9]}})}runCoreEditorCommand(ue,je){ue.model.pushStackElement(),ue.setCursorStates(je.source,3,[D.b.cancelSelection(ue,ue.getPrimaryCursorState())]),ue.revealPrimaryCursor(je.source,!0)}}),oe.RemoveSecondaryCursors=Object(A.k)(new class extends c{constructor(){super({id:"removeSecondaryCursors",precondition:r.a.hasMultipleSelections,kbOpts:{weight:h+1,kbExpr:r.a.textInputFocus,primary:9,secondary:[1024|9]}})}runCoreEditorCommand(ue,je){ue.model.pushStackElement(),ue.setCursorStates(je.source,3,[ue.getPrimaryCursorState()]),ue.revealPrimaryCursor(je.source,!0),Object(N.c)(f.a("removedCursor","Removed secondary cursors"))}}),oe.RevealLine=Object(A.k)(new class extends c{constructor(){super({id:"revealLine",precondition:void 0,description:E.description})}runCoreEditorCommand(ue,je){const Pe=je,ve=Pe.lineNumber||0;let ce=typeof ve=="number"?ve+1:parseInt(ve)+1;ce<1&&(ce=1);const le=ue.model.getLineCount();ce>le&&(ce=le);const Ce=new v.a(ce,1,ce,ue.model.getLineMaxColumn(ce));let ye=0;if(Pe.at)switch(Pe.at){case E.RawAtArgument.Top:ye=3;break;case E.RawAtArgument.Center:ye=1;break;case E.RawAtArgument.Bottom:ye=4;break;default:break}const ge=ue.coordinatesConverter.convertModelRangeToViewRange(Ce);ue.revealRange(je.source,!1,ge,ye,0)}}),oe.SelectAll=new class extends y{constructor(){super(A.h)}runDOMCommand(){B.g&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(ue,je,Pe){const ve=je._getViewModel();if(!ve)return;this.runCoreEditorCommand(ve,Pe)}runCoreEditorCommand(ue,je){ue.model.pushStackElement(),ue.setCursorStates("keyboard",3,[D.b.selectAll(ue,ue.getPrimaryCursorState())])}},oe.SetSelection=Object(A.k)(new class extends c{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(ue,je){ue.model.pushStackElement(),ue.setCursorStates(je.source,3,[I.d.fromModelSelection(je.selection)])}})})(C||(C={}));const O=_.a.and(r.a.textInputFocus,r.a.columnSelection);function k(oe,$){b.a.registerKeybindingRule({id:oe,primary:$,when:O,weight:h+1})}k(C.CursorColumnSelectLeft.id,1024|15),k(C.CursorColumnSelectRight.id,1024|17),k(C.CursorColumnSelectUp.id,1024|16),k(C.CursorColumnSelectPageUp.id,1024|11),k(C.CursorColumnSelectDown.id,1024|18),k(C.CursorColumnSelectPageDown.id,1024|12);function Y(oe){return oe.register(),oe}var Q;(function(oe){class $ extends A.c{runEditorCommand(te,ne,Ee){const fe=ne._getViewModel();if(!fe)return;this.runCoreEditingCommand(ne,fe,Ee||{})}}oe.CoreEditingCommand=$,oe.LineBreakInsert=Object(A.k)(new class extends ${constructor(){super({id:"lineBreakInsert",precondition:r.a.writable,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:0,mac:{primary:256|45}}})}runCoreEditingCommand(te,ne,Ee){te.pushUndoStop(),te.executeCommands(this.id,S.a.lineBreakInsert(ne.cursorConfig,ne.model,ne.getCursorStates().map(fe=>fe.modelState.selection)))}}),oe.Outdent=Object(A.k)(new class extends ${constructor(){super({id:"outdent",precondition:r.a.writable,kbOpts:{weight:h,kbExpr:_.a.and(r.a.editorTextFocus,r.a.tabDoesNotMoveFocus),primary:1024|2}})}runCoreEditingCommand(te,ne,Ee){te.pushUndoStop(),te.executeCommands(this.id,S.a.outdent(ne.cursorConfig,ne.model,ne.getCursorStates().map(fe=>fe.modelState.selection))),te.pushUndoStop()}}),oe.Tab=Object(A.k)(new class extends ${constructor(){super({id:"tab",precondition:r.a.writable,kbOpts:{weight:h,kbExpr:_.a.and(r.a.editorTextFocus,r.a.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(te,ne,Ee){te.pushUndoStop(),te.executeCommands(this.id,S.a.tab(ne.cursorConfig,ne.model,ne.getCursorStates().map(fe=>fe.modelState.selection))),te.pushUndoStop()}}),oe.DeleteLeft=Object(A.k)(new class extends ${constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:1,secondary:[1024|1],mac:{primary:1,secondary:[1024|1,256|38,256|1]}}})}runCoreEditingCommand(te,ne,Ee){const[fe,ee]=d.a.deleteLeft(ne.getPrevEditOperationType(),ne.cursorConfig,ne.model,ne.getCursorStates().map(ie=>ie.modelState.selection),ne.getCursorAutoClosedCharacters());fe&&te.pushUndoStop(),te.executeCommands(this.id,ee),ne.setPrevEditOperationType(2)}}),oe.DeleteRight=Object(A.k)(new class extends ${constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:h,kbExpr:r.a.textInputFocus,primary:20,mac:{primary:20,secondary:[256|34,256|20]}}})}runCoreEditingCommand(te,ne,Ee){const[fe,ee]=d.a.deleteRight(ne.getPrevEditOperationType(),ne.cursorConfig,ne.model,ne.getCursorStates().map(ie=>ie.modelState.selection));fe&&te.pushUndoStop(),te.executeCommands(this.id,ee),ne.setPrevEditOperationType(3)}}),oe.Undo=new class extends y{constructor(){super(A.i)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(te,ne,Ee){return!ne.hasModel()||ne.getOption(80)===!0?void 0:ne.getModel().undo()}},oe.Redo=new class extends y{constructor(){super(A.g)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(te,ne,Ee){return!ne.hasModel()||ne.getOption(80)===!0?void 0:ne.getModel().redo()}}})(Q||(Q={}));class H extends A.a{constructor(oe,$,te){super({id:oe,precondition:void 0,description:te});this._handlerId=$}runCommand(oe,$){const te=oe.get(F.a).getFocusedCodeEditor();if(!te)return;te.trigger("keyboard",this._handlerId,$)}}function Z(oe,$){Y(new H("default:"+oe,oe)),Y(new H(oe,oe,$))}Z("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),Z("replacePreviousChar"),Z("compositionType"),Z("compositionStart"),Z("compositionEnd"),Z("paste"),Z("cut")},"1lwE":function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:function(){return t.e(365).then(t.bind(null,"cOMg"))}})},"23p7":function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:function(){return t.e(318).then(t.bind(null,"aA7r"))}})},"28lO":function(mt,M,t){"use strict";var f=t("Vhoy"),B=t("3/fG"),x=t("MD5Z"),N=t("t9D7");const A=Object(x.wc)("symbolIcon.arrayForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),F=Object(x.wc)("symbolIcon.booleanForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),I=Object(x.wc)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(B.a)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),L=Object(x.wc)("symbolIcon.colorForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),v=Object(x.wc)("symbolIcon.constantForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),m=Object(x.wc)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(B.a)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),d=Object(x.wc)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(B.a)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),D=Object(x.wc)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(B.a)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),S=Object(x.wc)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(B.a)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),r=Object(x.wc)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(B.a)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),_=Object(x.wc)("symbolIcon.fileForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),b=Object(x.wc)("symbolIcon.folderForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),h=Object(x.wc)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(B.a)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),c=Object(x.wc)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(B.a)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),p=Object(x.wc)("symbolIcon.keyForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),E=Object(x.wc)("symbolIcon.keywordForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),y=Object(x.wc)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(B.a)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),C=Object(x.wc)("symbolIcon.moduleForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),O=Object(x.wc)("symbolIcon.namespaceForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),k=Object(x.wc)("symbolIcon.nullForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Y=Object(x.wc)("symbolIcon.numberForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Q=Object(x.wc)("symbolIcon.objectForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),H=Object(x.wc)("symbolIcon.operatorForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Z=Object(x.wc)("symbolIcon.packageForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),oe=Object(x.wc)("symbolIcon.propertyForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),$=Object(x.wc)("symbolIcon.referenceForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),te=Object(x.wc)("symbolIcon.snippetForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ne=Object(x.wc)("symbolIcon.stringForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ee=Object(x.wc)("symbolIcon.structForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),fe=Object(x.wc)("symbolIcon.textForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ee=Object(x.wc)("symbolIcon.typeParameterForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),ie=Object(x.wc)("symbolIcon.unitForeground",{dark:x.cb,light:x.cb,hc:x.cb},Object(B.a)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),U=Object(x.wc)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(B.a)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Object(N.f)((G,J)=>{const he=G.getColor(A);he&&J.addRule(`${f.b.symbolArray.cssSelector} { color: ${he}; }`);const xe=G.getColor(F);xe&&J.addRule(`${f.b.symbolBoolean.cssSelector} { color: ${xe}; }`);const Ie=G.getColor(I);Ie&&J.addRule(`${f.b.symbolClass.cssSelector} { color: ${Ie}; }`);const Le=G.getColor(y);Le&&J.addRule(`${f.b.symbolMethod.cssSelector} { color: ${Le}; }`);const Te=G.getColor(L);Te&&J.addRule(`${f.b.symbolColor.cssSelector} { color: ${Te}; }`);const ze=G.getColor(v);ze&&J.addRule(`${f.b.symbolConstant.cssSelector} { color: ${ze}; }`);const ue=G.getColor(m);ue&&J.addRule(`${f.b.symbolConstructor.cssSelector} { color: ${ue}; }`);const je=G.getColor(d);je&&J.addRule(`
|
|
|
${f.b.symbolValue.cssSelector},${f.b.symbolEnum.cssSelector} { color: ${je}; }`);const Pe=G.getColor(D);Pe&&J.addRule(`${f.b.symbolEnumMember.cssSelector} { color: ${Pe}; }`);const ve=G.getColor(S);ve&&J.addRule(`${f.b.symbolEvent.cssSelector} { color: ${ve}; }`);const ce=G.getColor(r);ce&&J.addRule(`${f.b.symbolField.cssSelector} { color: ${ce}; }`);const le=G.getColor(_);le&&J.addRule(`${f.b.symbolFile.cssSelector} { color: ${le}; }`);const Ce=G.getColor(b);Ce&&J.addRule(`${f.b.symbolFolder.cssSelector} { color: ${Ce}; }`);const ye=G.getColor(h);ye&&J.addRule(`${f.b.symbolFunction.cssSelector} { color: ${ye}; }`);const ge=G.getColor(c);ge&&J.addRule(`${f.b.symbolInterface.cssSelector} { color: ${ge}; }`);const Me=G.getColor(p);Me&&J.addRule(`${f.b.symbolKey.cssSelector} { color: ${Me}; }`);const De=G.getColor(E);De&&J.addRule(`${f.b.symbolKeyword.cssSelector} { color: ${De}; }`);const we=G.getColor(C);we&&J.addRule(`${f.b.symbolModule.cssSelector} { color: ${we}; }`);const Oe=G.getColor(O);Oe&&J.addRule(`${f.b.symbolNamespace.cssSelector} { color: ${Oe}; }`);const nt=G.getColor(k);nt&&J.addRule(`${f.b.symbolNull.cssSelector} { color: ${nt}; }`);const Ke=G.getColor(Y);Ke&&J.addRule(`${f.b.symbolNumber.cssSelector} { color: ${Ke}; }`);const et=G.getColor(Q);et&&J.addRule(`${f.b.symbolObject.cssSelector} { color: ${et}; }`);const bt=G.getColor(H);bt&&J.addRule(`${f.b.symbolOperator.cssSelector} { color: ${bt}; }`);const Tt=G.getColor(Z);Tt&&J.addRule(`${f.b.symbolPackage.cssSelector} { color: ${Tt}; }`);const $t=G.getColor(oe);$t&&J.addRule(`${f.b.symbolProperty.cssSelector} { color: ${$t}; }`);const Xe=G.getColor($);Xe&&J.addRule(`${f.b.symbolReference.cssSelector} { color: ${Xe}; }`);const it=G.getColor(te);it&&J.addRule(`${f.b.symbolSnippet.cssSelector} { color: ${it}; }`);const re=G.getColor(ne);re&&J.addRule(`${f.b.symbolString.cssSelector} { color: ${re}; }`);const We=G.getColor(Ee);We&&J.addRule(`${f.b.symbolStruct.cssSelector} { color: ${We}; }`);const tt=G.getColor(fe);tt&&J.addRule(`${f.b.symbolText.cssSelector} { color: ${tt}; }`);const Et=G.getColor(ee);Et&&J.addRule(`${f.b.symbolTypeParameter.cssSelector} { color: ${Et}; }`);const It=G.getColor(ie);It&&J.addRule(`${f.b.symbolUnit.cssSelector} { color: ${It}; }`);const Rt=G.getColor(U);Rt&&J.addRule(`${f.b.symbolVariable.cssSelector} { color: ${Rt}; }`)})},"2ESN":function(mt,M,t){"use strict";t.r(M),t.d(M,"LinkDetector",function(){return ee});var f=t("X+cX"),B=t("JQT/"),x=t("/cxE"),N=t("eLzo"),A=t("pmY6"),F=t("tYmi"),I=t("MNsG"),L=t("gslv"),v=t("bY76"),m=t("YHy6"),d=t("sswD"),D=t("tX9W"),S=t("twdY"),r=t("aBYw"),_=t("6OMU"),b=t("746U"),h=t("aokT"),c=t("G2kB"),p=t("nnTU"),E=function(U,G,J,he){function xe(Ie){return Ie instanceof J?Ie:new J(function(Le){Le(Ie)})}return new(J||(J=Promise))(function(Ie,Le){function Te(je){try{ue(he.next(je))}catch(Pe){Le(Pe)}}function ze(je){try{ue(he.throw(je))}catch(Pe){Le(Pe)}}function ue(je){je.done?Ie(je.value):xe(je.value).then(Te,ze)}ue((he=he.apply(U,G||[])).next())})};class y{constructor(U,G){this._link=U,this._provider=G}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(U){return E(this,void 0,void 0,function*(){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,U)).then(G=>(this._link=G||this._link,this._link.url?this.resolve(U):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))})}}class C{constructor(U){this._disposables=new A.b;let G=[];for(const[J,he]of U){const xe=J.links.map(Ie=>new y(Ie,he));G=C._union(G,xe),Object(A.g)(J)&&this._disposables.add(J)}this.links=G}dispose(){this._disposables.dispose(),this.links.length=0}static _union(U,G){let J=[],he,xe,Ie,Le;for(he=0,Ie=0,xe=U.length,Le=G.length;he<xe&&Ie<Le;){const Te=U[he],ze=G[Ie];if(h.a.areIntersectingOrTouching(Te.range,ze.range)){he++;continue}const ue=h.a.compareRangesUsingStarts(Te.range,ze.range);ue<0?(J.push(Te),he++):(J.push(ze),Ie++)}for(;he<xe;he++)J.push(U[he]);for(;Ie<Le;Ie++)J.push(G[Ie]);return J}}function O(U,G){const J=[],he=S.u.ordered(U).reverse().map((xe,Ie)=>Promise.resolve(xe.provideLinks(U,G)).then(Le=>{Le&&(J[Ie]=[Le,xe])},x.g));return Promise.all(he).then(()=>{const xe=new C(Object(_.e)(J));return G.isCancellationRequested?(xe.dispose(),new C([])):xe})}p.a.registerCommand("_executeLinkProvider",(U,...G)=>E(void 0,void 0,void 0,function*(){let[J,he]=G;Object(b.c)(J instanceof v.a),typeof he!="number"&&(he=0);const xe=U.get(c.a).getModel(J);if(!xe)return[];const Ie=yield O(xe,B.a.None);if(!Ie)return[];for(let Te=0;Te<Math.min(he,Ie.links.length);Te++)yield Ie.links[Te].resolve(B.a.None);const Le=Ie.links.slice(0);return Ie.dispose(),Le}));var k=t("3/fG"),Y=t("sM1p"),Q=t("W9cx"),H=t("MD5Z"),Z=t("t9D7"),oe=function(U,G,J,he){var xe=arguments.length,Ie=xe<3?G:he===null?he=Object.getOwnPropertyDescriptor(G,J):he,Le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ie=Reflect.decorate(U,G,J,he);else for(var Te=U.length-1;Te>=0;Te--)(Le=U[Te])&&(Ie=(xe<3?Le(Ie):xe>3?Le(G,J,Ie):Le(G,J))||Ie);return xe>3&&Ie&&Object.defineProperty(G,J,Ie),Ie},$=function(U,G){return function(J,he){G(J,he,U)}},te=function(U,G,J,he){function xe(Ie){return Ie instanceof J?Ie:new J(function(Le){Le(Ie)})}return new(J||(J=Promise))(function(Ie,Le){function Te(je){try{ue(he.next(je))}catch(Pe){Le(Pe)}}function ze(je){try{ue(he.throw(je))}catch(Pe){Le(Pe)}}function ue(je){je.done?Ie(je.value):xe(je.value).then(Te,ze)}ue((he=he.apply(U,G||[])).next())})};function ne(U,G){const J=U.url&&/^command:/i.test(U.url.toString()),he=U.tooltip?U.tooltip:J?k.a("links.navigate.executeCmd","Execute command"):k.a("links.navigate.follow","Follow link"),xe=G?I.f?k.a("links.navigate.kb.meta.mac","cmd + click"):k.a("links.navigate.kb.meta","ctrl + click"):I.f?k.a("links.navigate.kb.alt.mac","option + click"):k.a("links.navigate.kb.alt","alt + click");if(U.url){let Ie="";if(/^command:/i.test(U.url.toString())){const Te=U.url.toString().match(/^command:([^?#]+)/);if(Te){const ze=Te[1],ue=k.a("tooltip.explanation","Execute command {0}",ze);Ie=` "${ue}"`}}const Le=new N.a("",!0).appendMarkdown(`[${he}](${U.url.toString(!0).replace(/ /g,"%20")}${Ie}) (${xe})`);return Le}else return new N.a().appendText(`${he} (${xe})`)}const Ee={general:D.b.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:D.b.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class fe{constructor(U,G){this.link=U,this.decorationId=G}static decoration(U,G){return{range:U.range,options:fe._getOptions(U,G,!1)}}static _getOptions(U,G,J){const he=Object.assign({},J?Ee.active:Ee.general);return he.hoverMessage=ne(U,G),he}activate(U,G){U.changeDecorationOptions(this.decorationId,fe._getOptions(this.link,G,!0))}deactivate(U,G){U.changeDecorationOptions(this.decorationId,fe._getOptions(this.link,G,!1))}}let ee=class U{constructor(G,J,he){this.listenersToRemove=new A.b,this.editor=G,this.openerService=J,this.notificationService=he;let xe=new r.a(G);this.listenersToRemove.add(xe),this.listenersToRemove.add(xe.onMouseMoveOrRelevantKeyDown(([Ie,Le])=>{this._onEditorMouseMove(Ie,Le)})),this.listenersToRemove.add(xe.onExecute(Ie=>{this.onEditorMouseUp(Ie)})),this.listenersToRemove.add(xe.onCancel(Ie=>{this.cleanUpActiveLinkDecoration()})),this.enabled=G.getOption(62),this.listenersToRemove.add(G.onDidChangeConfiguration(Ie=>{const Le=G.getOption(62);if(this.enabled===Le)return;this.enabled=Le,this.updateDecorations([]),this.stop(),this.beginCompute()})),this.listenersToRemove.add(G.onDidChangeModelContent(Ie=>this.onChange())),this.listenersToRemove.add(G.onDidChangeModel(Ie=>this.onModelChanged())),this.listenersToRemove.add(G.onDidChangeModelLanguage(Ie=>this.onModelModeChanged())),this.listenersToRemove.add(S.u.onDidChange(Ie=>this.onModelModeChanged())),this.timeout=new f.g,this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}static get(G){return G.getContribution(U.ID)}onModelChanged(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()}onModelModeChanged(){this.stop(),this.beginCompute()}onChange(){this.timeout.setIfNotSet(()=>this.beginCompute(),U.RECOMPUTE_TIME)}beginCompute(){return te(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.enabled)return;const G=this.editor.getModel();if(!S.u.has(G))return;this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=f.h(J=>O(G,J));try{this.activeLinksList=yield this.computePromise,this.updateDecorations(this.activeLinksList.links)}catch(J){Object(x.f)(J)}finally{this.computePromise=null}})}updateDecorations(G){const J=this.editor.getOption(69)==="altKey";let he=[],xe=Object.keys(this.currentOccurrences);for(let Te=0,ze=xe.length;Te<ze;Te++){let ue=xe[Te],je=this.currentOccurrences[ue];he.push(je.decorationId)}let Ie=[];if(G)for(const Te of G)Ie.push(fe.decoration(Te,J));let Le=this.editor.deltaDecorations(he,Ie);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let Te=0,ze=Le.length;Te<ze;Te++){let ue=new fe(G[Te],Le[Te]);this.currentOccurrences[ue.decorationId]=ue}}_onEditorMouseMove(G,J){const he=this.editor.getOption(69)==="altKey";if(this.isEnabled(G,J)){this.cleanUpActiveLinkDecoration();const xe=this.getLinkOccurrence(G.target.position);xe&&this.editor.changeDecorations(Ie=>{xe.activate(Ie,he),this.activeLinkDecorationId=xe.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const G=this.editor.getOption(69)==="altKey";if(this.activeLinkDecorationId){const J=this.currentOccurrences[this.activeLinkDecorationId];J&&this.editor.changeDecorations(he=>{J.deactivate(he,G)}),this.activeLinkDecorationId=null}}onEditorMouseUp(G){if(!this.isEnabled(G))return;const J=this.getLinkOccurrence(G.target.position);if(!J)return;this.openLinkOccurrence(J,G.hasSideBySideModifier,!0)}openLinkOccurrence(G,J,he=!1){if(!this.openerService)return;const{link:xe}=G;xe.resolve(B.a.None).then(Ie=>{if(typeof Ie=="string"&&this.editor.hasModel()){const Le=this.editor.getModel().uri;if(Le.scheme===F.c.file&&Ie.startsWith(`${F.c.file}:`)){const Te=v.a.parse(Ie);if(Te.scheme===F.c.file){const ze=L.i(Te);let ue=null;ze.startsWith("/./")?ue=`.${ze.substr(1)}`:ze.startsWith("//./")&&(ue=`.${ze.substr(2)}`),ue&&(Ie=L.g(Le,ue))}}}return this.openerService.open(Ie,{openToSide:J,fromUserGesture:he,allowContributedOpeners:!0,allowCommands:!0})},Ie=>{const Le=Ie instanceof Error?Ie.message:Ie;Le==="invalid"?this.notificationService.warn(k.a("invalid.url","Failed to open this link because it is not well-formed: {0}",xe.url.toString())):Le==="missing"?this.notificationService.warn(k.a("missing.url","Failed to open this link because its target is missing.")):Object(x.f)(Ie)})}getLinkOccurrence(G){if(!this.editor.hasModel()||!G)return null;const J=this.editor.getModel().getDecorationsInRange({startLineNumber:G.lineNumber,startColumn:G.column,endLineNumber:G.lineNumber,endColumn:G.column},0,!0);for(const he of J){const xe=this.currentOccurrences[he.id];if(xe)return xe}return null}isEnabled(G,J){return Boolean(G.target.type===6&&(G.hasTriggerModifier||J&&J.keyCodeIsTriggerKey))}stop(){var G;this.timeout.cancel(),this.activeLinksList&&((G=this.activeLinksList)===null||G===void 0||G.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){this.listenersToRemove.dispose(),this.stop(),this.timeout.dispose()}};ee.ID="editor.linkDetector",ee.RECOMPUTE_TIME=1e3,ee=oe([$(1,Q.a),$(2,Y.a)],ee);class ie extends d.b{constructor(){super({id:"editor.action.openLink",label:k.a("label","Open Link"),alias:"Open Link",precondition:void 0})}run(U,G){let J=ee.get(G);if(!J)return;if(!G.hasModel())return;let he=G.getSelections();for(let xe of he){let Ie=J.getLinkOccurrence(xe.getEndPosition());Ie&&J.openLinkOccurrence(Ie,!1)}}}Object(d.l)(ee.ID,ee),Object(d.j)(ie),Object(Z.f)((U,G)=>{const J=U.getColor(H.q);J&&G.addRule(`.monaco-editor .detected-link-active { color: ${J} !important; }`)})},"2MPD":function(mt,M,t){},"2Tsy":function(mt,M,t){},"2V9f":function(mt,M,t){},"3Rsk":function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var f=t("MI8n"),B=t("ic2d");const x={JSONContribution:"base.contributions.json"};function N(I){return I.length>0&&I.charAt(I.length-1)==="#"?I.substring(0,I.length-1):I}class A{constructor(){this._onDidChangeSchema=new f.b,this.schemasById={}}registerSchema(I,L){this.schemasById[N(I)]=L,this._onDidChangeSchema.fire(I)}notifySchemaChanged(I){this._onDidChangeSchema.fire(I)}}const F=new A;B.a.add(x.JSONContribution,F)},"3rx1":function(mt,M,t){"use strict";t.d(M,"a",function(){return F}),t.d(M,"b",function(){return I});var f=t("PTeM"),B=t("tYmi"),x=t("MNsG"),N=t("gslv"),A=t("bY76");function F(L){if(!L)return;typeof L=="string"&&(L=A.a.file(L));const v=Object(N.b)(L)||(L.scheme===B.c.file?L.fsPath:L.path);return x.i&&Object(f.c)(v)?I(v):v}function I(L){return Object(f.a)(L)?L.charAt(0).toUpperCase()+L.slice(1):L}},"44XX":function(mt,M,t){"use strict";t.d(M,"a",function(){return c}),t.d(M,"b",function(){return p});var f=t("EffR"),B=t("cMOf"),x=t("GJhM"),N=t("6OMU"),A=t("zrhQ"),F=t("MI8n"),I=t("pmY6"),L=t("Sdnv"),v=t("QuOb"),m=t("746U"),d=t("51B1"),D=t.n(d);const S={separatorBorder:A.a.transparent};class r{constructor(E,y,C,O){this.container=E,this.view=y,this.disposable=O,this._cachedVisibleSize=void 0,typeof C=="number"?(this._size=C,this._cachedVisibleSize=void 0,E.classList.add("visible")):(this._size=0,this._cachedVisibleSize=C.cachedVisibleSize)}set size(E){this._size=E}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize=="undefined"}setVisible(E,y){if(E===this.visible)return;E?(this.size=Object(L.b)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof y=="number"?y: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,y){this.layoutContainer(E),this.view.layout(this.size,E,y)}dispose(){return this.disposable.dispose(),this.view}}class _ extends r{layoutContainer(E){this.container.style.top=`${E}px`,this.container.style.height=`${this.size}px`}}class b extends r{layoutContainer(E){this.container.style.left=`${E}px`,this.container.style.width=`${this.size}px`}}var h;(function(E){E[E.Idle=0]="Idle",E[E.Busy=1]="Busy"})(h||(h={}));var c;(function(E){E.Distribute={type:"distribute"};function y(O){return{type:"split",index:O}}E.Split=y;function C(O){return{type:"invisible",cachedVisibleSize:O}}E.Invisible=C})(c||(c={}));class p extends I.a{constructor(E,y={}){var C,O;super();this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=h.Idle,this._onDidSashChange=this._register(new F.b),this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=this._register(new F.b),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.orientation=m.m(y.orientation)?0:y.orientation,this.inverseAltBehavior=!!y.inverseAltBehavior,this.proportionalLayout=m.m(y.proportionalLayout)?!0:!!y.proportionalLayout,this.getSashOrthogonalSize=y.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),E.appendChild(this.el),this.sashContainer=Object(f.q)(this.el,Object(f.a)(".sash-container")),this.viewContainer=Object(f.a)(".split-view-container"),this.scrollable=new v.a(125,f.V),this.scrollableElement=this._register(new x.c(this.viewContainer,{vertical:this.orientation===0?(C=y.scrollbarVisibility)!==null&&C!==void 0?C:1:2,horizontal:this.orientation===1?(O=y.scrollbarVisibility)!==null&&O!==void 0?O:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(k=>{this.viewContainer.scrollTop=k.scrollTop,this.viewContainer.scrollLeft=k.scrollLeft})),Object(f.q)(this.el,this.scrollableElement.getDomNode()),this.style(y.styles||S),y.descriptor&&(this.size=y.descriptor.size,y.descriptor.views.forEach((k,Y)=>{const Q=m.m(k.visible)||k.visible?k.size:{type:"invisible",cachedVisibleSize:k.size},H=k.view;this.doAddView(H,Q,Y,!0)}),this.contentSize=this.viewItems.reduce((k,Y)=>k+Y.size,0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(E){for(const y of this.sashItems)y.sash.orthogonalStartSash=E;this._orthogonalStartSash=E}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(E){for(const y of this.sashItems)y.sash.orthogonalEndSash=E;this._orthogonalEndSash=E}get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(E){if(this._startSnappingEnabled===E)return;this._startSnappingEnabled=E,this.updateSashEnablement()}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(E){if(this._endSnappingEnabled===E)return;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,y,C=this.viewItems.length,O){this.doAddView(E,y,C,O)}layout(E,y){const C=Math.max(this.size,this.contentSize);if(this.size=E,this.layoutContext=y,this.proportions)for(let O=0;O<this.viewItems.length;O++){const k=this.viewItems[O];k.size=Object(L.b)(Math.round(this.proportions[O]*E),k.minimumSize,k.maximumSize)}else{const O=Object(N.r)(this.viewItems.length),k=O.filter(Q=>this.viewItems[Q].priority===1),Y=O.filter(Q=>this.viewItems[Q].priority===2);this.resize(this.viewItems.length-1,E-C,void 0,k,Y)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(E=>E.size/this.contentSize))}onSashStart({sash:E,start:y,alt:C}){for(const Q of this.viewItems)Q.enabled=!1;const O=this.sashItems.findIndex(Q=>Q.sash===E),k=Object(I.e)(Object(f.i)(document.body,"keydown",Q=>Y(this.sashDragState.current,Q.altKey)),Object(f.i)(document.body,"keyup",()=>Y(this.sashDragState.current,!1))),Y=(Q,H)=>{const Z=this.viewItems.map(Ee=>Ee.size);let oe=Number.NEGATIVE_INFINITY,$=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(H=!H),H){const Ee=O===this.sashItems.length-1;if(Ee){const fe=this.viewItems[O];oe=(fe.minimumSize-fe.size)/2,$=(fe.maximumSize-fe.size)/2}else{const fe=this.viewItems[O+1];oe=(fe.size-fe.maximumSize)/2,$=(fe.size-fe.minimumSize)/2}}let te,ne;if(!H){const Ee=Object(N.r)(O,-1),fe=Object(N.r)(O+1,this.viewItems.length),ee=Ee.reduce((Le,Te)=>Le+(this.viewItems[Te].minimumSize-Z[Te]),0),ie=Ee.reduce((Le,Te)=>Le+(this.viewItems[Te].viewMaximumSize-Z[Te]),0),U=fe.length===0?Number.POSITIVE_INFINITY:fe.reduce((Le,Te)=>Le+(Z[Te]-this.viewItems[Te].minimumSize),0),G=fe.length===0?Number.NEGATIVE_INFINITY:fe.reduce((Le,Te)=>Le+(Z[Te]-this.viewItems[Te].viewMaximumSize),0),J=Math.max(ee,G),he=Math.min(U,ie),xe=this.findFirstSnapIndex(Ee),Ie=this.findFirstSnapIndex(fe);if(typeof xe=="number"){const Le=this.viewItems[xe],Te=Math.floor(Le.viewMinimumSize/2);te={index:xe,limitDelta:Le.visible?J-Te:J+Te,size:Le.size}}if(typeof Ie=="number"){const Le=this.viewItems[Ie],Te=Math.floor(Le.viewMinimumSize/2);ne={index:Ie,limitDelta:Le.visible?he+Te:he-Te,size:Le.size}}}this.sashDragState={start:Q,current:Q,index:O,sizes:Z,minDelta:oe,maxDelta:$,alt:H,snapBefore:te,snapAfter:ne,disposable:k}};Y(y,C)}onSashChange({current:E}){const{index:y,start:C,sizes:O,alt:k,minDelta:Y,maxDelta:Q,snapBefore:H,snapAfter:Z}=this.sashDragState;this.sashDragState.current=E;const oe=E-C,$=this.resize(y,oe,O,void 0,void 0,Y,Q,H,Z);if(k){const te=y===this.sashItems.length-1,ne=this.viewItems.map(G=>G.size),Ee=te?y:y+1,fe=this.viewItems[Ee],ee=fe.size-fe.maximumSize,ie=fe.size-fe.minimumSize,U=te?y-1:y+1;this.resize(U,-$,ne,void 0,void 0,ee,ie)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(E){this._onDidSashChange.fire(E),this.sashDragState.disposable.dispose(),this.saveProportions();for(const y of this.viewItems)y.enabled=!0}onViewChange(E,y){const C=this.viewItems.indexOf(E);if(C<0||C>=this.viewItems.length)return;y=typeof y=="number"?y:E.size,y=Object(L.b)(y,E.minimumSize,E.maximumSize),this.inverseAltBehavior&&C>0?(this.resize(C-1,Math.floor((E.size-y)/2)),this.distributeEmptySpace(),this.layoutViews()):(E.size=y,this.relayout([C],void 0))}resizeView(E,y){if(this.state!==h.Idle)throw new Error("Cant modify splitview");if(this.state=h.Busy,E<0||E>=this.viewItems.length)return;const C=Object(N.r)(this.viewItems.length).filter(Q=>Q!==E),O=[...C.filter(Q=>this.viewItems[Q].priority===1),E],k=C.filter(Q=>this.viewItems[Q].priority===2),Y=this.viewItems[E];y=Math.round(y),y=Object(L.b)(y,Y.minimumSize,Math.min(Y.maximumSize,this.size)),Y.size=y,this.relayout(O,k),this.state=h.Idle}distributeViewSizes(){const E=[];let y=0;for(const Q of this.viewItems)Q.maximumSize-Q.minimumSize>0&&(E.push(Q),y+=Q.size);const C=Math.floor(y/E.length);for(const Q of E)Q.size=Object(L.b)(C,Q.minimumSize,Q.maximumSize);const O=Object(N.r)(this.viewItems.length),k=O.filter(Q=>this.viewItems[Q].priority===1),Y=O.filter(Q=>this.viewItems[Q].priority===2);this.relayout(k,Y)}getViewSize(E){return E<0||E>=this.viewItems.length?-1:this.viewItems[E].size}doAddView(E,y,C=this.viewItems.length,O){if(this.state!==h.Idle)throw new Error("Cant modify splitview");this.state=h.Busy;const k=Object(f.a)(".split-view-view");C===this.viewItems.length?this.viewContainer.appendChild(k):this.viewContainer.insertBefore(k,this.viewContainer.children.item(C));const Y=E.onDidChange(te=>this.onViewChange(oe,te)),Q=Object(I.i)(()=>this.viewContainer.removeChild(k)),H=Object(I.e)(Y,Q);let Z;typeof y=="number"?Z=y:y.type==="split"?Z=this.getViewSize(y.index)/2:y.type==="invisible"?Z={cachedVisibleSize:y.cachedVisibleSize}:Z=E.minimumSize;const oe=this.orientation===0?new _(k,E,Z,H):new b(k,E,Z,H);if(this.viewItems.splice(C,0,oe),this.viewItems.length>1){let te={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const ne=this.orientation===0?new B.b(this.sashContainer,{getHorizontalSashTop:Le=>this.getSashPosition(Le),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},te),{orientation:1})):new B.b(this.sashContainer,{getVerticalSashLeft:Le=>this.getSashPosition(Le),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},te),{orientation:0})),Ee=this.orientation===0?Le=>({sash:ne,start:Le.startY,current:Le.currentY,alt:Le.altKey}):Le=>({sash:ne,start:Le.startX,current:Le.currentX,alt:Le.altKey}),fe=F.c.map(ne.onDidStart,Ee),ee=fe(this.onSashStart,this),ie=F.c.map(ne.onDidChange,Ee),U=ie(this.onSashChange,this),G=F.c.map(ne.onDidEnd,()=>this.sashItems.findIndex(Le=>Le.sash===ne)),J=G(this.onSashEnd,this),he=ne.onDidReset(()=>{const Le=this.sashItems.findIndex(Pe=>Pe.sash===ne),Te=Object(N.r)(Le,-1),ze=Object(N.r)(Le+1,this.viewItems.length),ue=this.findFirstSnapIndex(Te),je=this.findFirstSnapIndex(ze);if(typeof ue=="number"&&!this.viewItems[ue].visible)return;if(typeof je=="number"&&!this.viewItems[je].visible)return;this._onDidSashReset.fire(Le)}),xe=Object(I.e)(ee,U,J,he,ne),Ie={sash:ne,disposable:xe};this.sashItems.splice(C-1,0,Ie)}k.appendChild(E.element);let $;typeof y!="number"&&y.type==="split"&&($=[y.index]),O||this.relayout([C],$),this.state=h.Idle,!O&&typeof y!="number"&&y.type==="distribute"&&this.distributeViewSizes()}relayout(E,y){const C=this.viewItems.reduce((O,k)=>O+k.size,0);this.resize(this.viewItems.length-1,this.size-C,void 0,E,y),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(E,y,C=this.viewItems.map(oe=>oe.size),O,k,Y=Number.NEGATIVE_INFINITY,Q=Number.POSITIVE_INFINITY,H,Z){if(E<0||E>=this.viewItems.length)return 0;const oe=Object(N.r)(E,-1),$=Object(N.r)(E+1,this.viewItems.length);if(k)for(const Ie of k)Object(N.p)(oe,Ie),Object(N.p)($,Ie);if(O)for(const Ie of O)Object(N.o)(oe,Ie),Object(N.o)($,Ie);const te=oe.map(Ie=>this.viewItems[Ie]),ne=oe.map(Ie=>C[Ie]),Ee=$.map(Ie=>this.viewItems[Ie]),fe=$.map(Ie=>C[Ie]),ee=oe.reduce((Ie,Le)=>Ie+(this.viewItems[Le].minimumSize-C[Le]),0),ie=oe.reduce((Ie,Le)=>Ie+(this.viewItems[Le].maximumSize-C[Le]),0),U=$.length===0?Number.POSITIVE_INFINITY:$.reduce((Ie,Le)=>Ie+(C[Le]-this.viewItems[Le].minimumSize),0),G=$.length===0?Number.NEGATIVE_INFINITY:$.reduce((Ie,Le)=>Ie+(C[Le]-this.viewItems[Le].maximumSize),0),J=Math.max(ee,G,Y),he=Math.min(U,ie,Q);let xe=!1;if(H){const Ie=this.viewItems[H.index],Le=y>=H.limitDelta;xe=Le!==Ie.visible,Ie.setVisible(Le,H.size)}if(!xe&&Z){const Ie=this.viewItems[Z.index],Le=y<Z.limitDelta;xe=Le!==Ie.visible,Ie.setVisible(Le,Z.size)}if(xe)return this.resize(E,y,C,O,k,Y,Q);y=Object(L.b)(y,J,he);for(let Ie=0,Le=y;Ie<te.length;Ie++){const Te=te[Ie],ze=Object(L.b)(ne[Ie]+Le,Te.minimumSize,Te.maximumSize),ue=ze-ne[Ie];Le-=ue,Te.size=ze}for(let Ie=0,Le=y;Ie<Ee.length;Ie++){const Te=Ee[Ie],ze=Object(L.b)(fe[Ie]-Le,Te.minimumSize,Te.maximumSize),ue=ze-fe[Ie];Le+=ue,Te.size=ze}return y}distributeEmptySpace(E){const y=this.viewItems.reduce((Q,H)=>Q+H.size,0);let C=this.size-y;const O=Object(N.r)(this.viewItems.length-1,-1),k=O.filter(Q=>this.viewItems[Q].priority===1),Y=O.filter(Q=>this.viewItems[Q].priority===2);for(const Q of Y)Object(N.p)(O,Q);for(const Q of k)Object(N.o)(O,Q);typeof E=="number"&&Object(N.o)(O,E);for(let Q=0;C!==0&&Q<O.length;Q++){const H=this.viewItems[O[Q]],Z=Object(L.b)(H.size+C,H.minimumSize,H.maximumSize),oe=Z-H.size;C-=oe,H.size=Z}}layoutViews(){this.contentSize=this.viewItems.reduce((y,C)=>y+C.size,0);let E=0;for(const y of this.viewItems)y.layout(E,this.layoutContext),E+=y.size;this.sashItems.forEach(y=>y.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let E=!1;const y=this.viewItems.map(H=>E=H.size-H.minimumSize>0||E);E=!1;const C=this.viewItems.map(H=>E=H.maximumSize-H.size>0||E),O=[...this.viewItems].reverse();E=!1;const k=O.map(H=>E=H.size-H.minimumSize>0||E).reverse();E=!1;const Y=O.map(H=>E=H.maximumSize-H.size>0||E).reverse();let Q=0;for(let H=0;H<this.sashItems.length;H++){const{sash:Z}=this.sashItems[H],oe=this.viewItems[H];Q+=oe.size;const $=!(y[H]&&Y[H+1]),te=!(C[H]&&k[H+1]);if($&&te){const ne=Object(N.r)(H,-1),Ee=Object(N.r)(H+1,this.viewItems.length),fe=this.findFirstSnapIndex(ne),ee=this.findFirstSnapIndex(Ee),ie=typeof fe=="number"&&!this.viewItems[fe].visible,U=typeof ee=="number"&&!this.viewItems[ee].visible;ie&&k[H]&&(Q>0||this.startSnappingEnabled)?Z.state=1:U&&y[H]&&(Q<this.contentSize||this.endSnappingEnabled)?Z.state=2:Z.state=0}else $&&!te?Z.state=1:!$&&te?Z.state=2:Z.state=3}}getSashPosition(E){let y=0;for(let C=0;C<this.sashItems.length;C++)if(y+=this.viewItems[C].size,this.sashItems[C].sash===E)return y;return 0}findFirstSnapIndex(E){for(const y of E){const C=this.viewItems[y];if(!C.visible)continue;if(C.snap)return y}for(const y of E){const C=this.viewItems[y];if(C.visible&&C.maximumSize-C.minimumSize>0)return;if(!C.visible&&C.snap)return y}return}dispose(){super.dispose(),this.viewItems.forEach(E=>E.dispose()),this.viewItems=[],this.sashItems.forEach(E=>E.disposable.dispose()),this.sashItems=[]}}},"4bUh":function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("twdY");class B{constructor(N,A,F){this._lineTokensBrand=void 0,this._tokens=N,this._tokensCount=this._tokens.length>>>1,this._text=A,this._languageIdCodec=F}static createEmpty(N,A){const F=B.defaultTokenMetadata,I=new Uint32Array(2);return I[0]=N.length,I[1]=F,new B(I,N,A)}equals(N){return N instanceof B?this.slicedEquals(N,0,this._tokensCount):!1}slicedEquals(N,A,F){if(this._text!==N._text)return!1;if(this._tokensCount!==N._tokensCount)return!1;const I=A<<1,L=I+(F<<1);for(let v=I;v<L;v++)if(this._tokens[v]!==N._tokens[v])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(N){return N>0?this._tokens[N-1<<1]:0}getMetadata(N){const A=this._tokens[(N<<1)+1];return A}getLanguageId(N){const A=this._tokens[(N<<1)+1],F=f.D.getLanguageId(A);return this._languageIdCodec.decodeLanguageId(F)}getStandardTokenType(N){const A=this._tokens[(N<<1)+1];return f.D.getTokenType(A)}getForeground(N){const A=this._tokens[(N<<1)+1];return f.D.getForeground(A)}getClassName(N){const A=this._tokens[(N<<1)+1];return f.D.getClassNameFromMetadata(A)}getInlineStyle(N,A){const F=this._tokens[(N<<1)+1];return f.D.getInlineStyleFromMetadata(F,A)}getEndOffset(N){return this._tokens[N<<1]}findTokenIndexAtOffset(N){return B.findIndexInTokensArray(this._tokens,N)}inflate(){return this}sliceAndInflate(N,A,F){return new x(this,N,A,F)}static convertToEndOffset(N,A){const F=N.length>>>1,I=F-1;for(let L=0;L<I;L++)N[L<<1]=N[L+1<<1];N[I<<1]=A}static findIndexInTokensArray(N,A){if(N.length<=2)return 0;let F=0,I=(N.length>>>1)-1;for(;F<I;){const L=F+Math.floor((I-F)/2),v=N[L<<1];if(v===A)return L+1;v<A?F=L+1:v>A&&(I=L)}return F}withInserted(N){if(N.length===0)return this;let A=0,F=0,I="";const L=new Array;let v=0;for(;;){let m=A<this._tokensCount?this._tokens[A<<1]:-1,d=F<N.length?N[F]:null;if(m!==-1&&(d===null||m<=d.offset)){I+=this._text.substring(v,m);const D=this._tokens[(A<<1)+1];L.push(I.length,D),A++,v=m}else if(d){if(d.offset>v){I+=this._text.substring(v,d.offset);const D=this._tokens[(A<<1)+1];L.push(I.length,D),v=d.offset}I+=d.text,L.push(I.length,d.tokenMetadata),F++}else break}return new B(new Uint32Array(L),I,this._languageIdCodec)}}B.defaultTokenMetadata=(0<<11|1<<14|2<<23)>>>0;class x{constructor(N,A,F,I){this._source=N,this._startOffset=A,this._endOffset=F,this._deltaOffset=I,this._firstTokenIndex=N.findTokenIndexAtOffset(A),this._tokensCount=0;for(let L=this._firstTokenIndex,v=N.getCount();L<v;L++){const m=N.getStartOffset(L);if(m>=F)break;this._tokensCount++}}equals(N){return N instanceof x?this._startOffset===N._startOffset&&this._endOffset===N._endOffset&&this._deltaOffset===N._deltaOffset&&this._source.slicedEquals(N._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(N){return this._source.getForeground(this._firstTokenIndex+N)}getEndOffset(N){const A=this._source.getEndOffset(this._firstTokenIndex+N);return Math.min(this._endOffset,A)-this._startOffset+this._deltaOffset}getClassName(N){return this._source.getClassName(this._firstTokenIndex+N)}getInlineStyle(N,A){return this._source.getInlineStyle(this._firstTokenIndex+N,A)}findTokenIndexAtOffset(N){return this._source.findTokenIndexAtOffset(N+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}},"4rho":function(mt,M,t){},"4sI4":function(mt,M,t){"use strict";t.r(M),t.d(M,"StandaloneReferencesController",function(){return d});var f=t("sswD"),B=t("Vxe3"),x=t("QY8A"),N=t("+7oY"),A=t("T8No"),F=t("Cg/j"),I=t("sM1p"),L=t("A+jI"),v=function(D,S,r,_){var b=arguments.length,h=b<3?S:_===null?_=Object.getOwnPropertyDescriptor(S,r):_,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(D,S,r,_);else for(var p=D.length-1;p>=0;p--)(c=D[p])&&(h=(b<3?c(h):b>3?c(S,r,h):c(S,r))||h);return b>3&&h&&Object.defineProperty(S,r,h),h},m=function(D,S){return function(r,_){S(r,_,D)}};let d=class extends x.a{constructor(S,r,_,b,h,c,p){super(!0,S,r,_,b,h,c,p)}};d=v([m(1,A.b),m(2,B.a),m(3,I.a),m(4,F.a),m(5,L.a),m(6,N.a)],d),Object(f.l)(x.a.ID,d)},"4y0V":function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return x});var f=t("MI8n");class B{constructor(N,A,F){const I=L=>this.emitter.fire(L);this.emitter=new f.b({onFirstListenerAdd:()=>N.addEventListener(A,I,F),onLastListenerRemove:()=>N.removeEventListener(A,I,F)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function x(N){return N.preventDefault(),N.stopPropagation(),N}},"51B1":function(mt,M,t){},"51f4":function(mt,M,t){"use strict";t.d(M,"a",function(){return N});let f=!1,B=null;function x(A){if(!A.parent||A.parent===A)return null;try{let F=A.location,I=A.parent.location;if(F.origin!=="null"&&I.origin!=="null"&&F.origin!==I.origin)return f=!0,null}catch(F){return f=!0,null}return A.parent}class N{static getSameOriginWindowChain(){if(!B){B=[];let A=window,F;do F=x(A),F?B.push({window:A,iframeElement:A.frameElement||null}):B.push({window:A,iframeElement:null}),A=F;while(A)}return B.slice(0)}static hasDifferentOriginAncestor(){return B||this.getSameOriginWindowChain(),f}static getPositionOfChildWindowRelativeToAncestorWindow(A,F){if(!F||A===F)return{top:0,left:0};let I=0,L=0,v=this.getSameOriginWindowChain();for(const m of v){if(I+=m.window.scrollY,L+=m.window.scrollX,m.window===F)break;if(!m.iframeElement)break;let d=m.iframeElement.getBoundingClientRect();I+=d.top,L+=d.left}return{top:I,left:L}}}},"51su":function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var f=t("8LL/"),B=t.n(f);const x="monaco-mouse-cursor-text"},"5RaG":function(mt,M,t){"use strict";t.r(M),t.d(M,"CursorUndoRedoController",function(){return I}),t.d(M,"CursorUndo",function(){return L}),t.d(M,"CursorRedo",function(){return v});var f=t("pmY6"),B=t("sswD"),x=t("wQH0"),N=t("3/fG");class A{constructor(m){this.selections=m}equals(m){const d=this.selections.length,D=m.selections.length;if(d!==D)return!1;for(let S=0;S<d;S++)if(!this.selections[S].equalsSelection(m.selections[S]))return!1;return!0}}class F{constructor(m,d,D){this.cursorState=m,this.scrollTop=d,this.scrollLeft=D}}class I extends f.a{constructor(m){super();this._editor=m,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(m.onDidChangeModel(d=>{this._undoStack=[],this._redoStack=[]})),this._register(m.onDidChangeModelContent(d=>{this._undoStack=[],this._redoStack=[]})),this._register(m.onDidChangeCursorSelection(d=>{if(this._isCursorUndoRedo)return;if(!d.oldSelections)return;if(d.oldModelVersionId!==d.modelVersionId)return;const D=new A(d.oldSelections),S=this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(D);S||(this._undoStack.push(new F(D,m.getScrollTop(),m.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}static get(m){return m.getContribution(I.ID)}cursorUndo(){if(!this._editor.hasModel()||this._undoStack.length===0)return;this._redoStack.push(new F(new A(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop())}cursorRedo(){if(!this._editor.hasModel()||this._redoStack.length===0)return;this._undoStack.push(new F(new A(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop())}_applyState(m){this._isCursorUndoRedo=!0,this._editor.setSelections(m.cursorState.selections),this._editor.setScrollPosition({scrollTop:m.scrollTop,scrollLeft:m.scrollLeft}),this._isCursorUndoRedo=!1}}I.ID="editor.contrib.cursorUndoRedoController";class L extends B.b{constructor(){super({id:"cursorUndo",label:N.a("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:x.a.textInputFocus,primary:2048|51,weight:100}})}run(m,d,D){I.get(d).cursorUndo()}}class v extends B.b{constructor(){super({id:"cursorRedo",label:N.a("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(m,d,D){I.get(d).cursorRedo()}}Object(B.l)(I.ID,I),Object(B.j)(L),Object(B.j)(v)},"5TxY":function(mt,M,t){"use strict";t.d(M,"d",function(){return D}),t.d(M,"a",function(){return S}),t.d(M,"b",function(){return r}),t.d(M,"c",function(){return _});var f=t("D3Dy"),B=t("EffR"),x=t("X+cX"),N=t("MI8n"),A=t("pmY6"),F=t("ubTv"),I=t("MNsG"),L=t("N0LK"),v=t("Comh"),m=t("cGHE"),d=t("gCVg"),D;(function(c){c.Tap="-monaco-textarea-synthetic-tap"})(D||(D={}));const S={forceCopyWithSyntaxHighlighting:!1};class r{constructor(){this._lastState=null}set(c,p){this._lastState={lastCopiedValue:c,data:p}}get(c){return this._lastState&&this._lastState.lastCopiedValue===c?this._lastState.data:(this._lastState=null,null)}}r.INSTANCE=new r;class _ extends A.a{constructor(c,p){super();this.textArea=p,this._onFocus=this._register(new N.b),this.onFocus=this._onFocus.event,this._onBlur=this._register(new N.b),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new N.b),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new N.b),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new N.b),this.onCut=this._onCut.event,this._onPaste=this._register(new N.b),this.onPaste=this._onPaste.event,this._onType=this._register(new N.b),this.onType=this._onType.event,this._onCompositionStart=this._register(new N.b),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new N.b),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new N.b),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new N.b),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._host=c,this._textArea=this._register(new h(p)),this._asyncTriggerCut=this._register(new x.e(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new x.e(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=v.b.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._isDoingComposition=!1,this._nextCommand=0;let E=null;this._register(B.o(p.domNode,"keydown",k=>{(k.keyCode===109||this._isDoingComposition&&k.keyCode===1)&&k.stopPropagation(),k.equals(9)&&k.preventDefault(),E=k,this._onKeyDown.fire(k)})),this._register(B.o(p.domNode,"keyup",k=>{this._onKeyUp.fire(k)})),this._register(B.i(p.domNode,"compositionstart",k=>{if(v.c&&console.log("[compositionstart]",k),this._isDoingComposition)return;if(this._isDoingComposition=!0,I.f&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===k.data){const Y=E&&E.equals(109)&&(E.code==="ArrowRight"||E.code==="ArrowLeft");if(Y||f.g){v.c&&console.log("[compositionstart] Handling long press case on macOS + arrow key or Firefox",k),this._textAreaState=new v.b(this._textAreaState.value,this._textAreaState.selectionStart-1,this._textAreaState.selectionEnd,this._textAreaState.selectionStartPosition?new m.a(this._textAreaState.selectionStartPosition.lineNumber,this._textAreaState.selectionStartPosition.column-1):null,this._textAreaState.selectionEndPosition),this._onCompositionStart.fire({revealDeltaColumns:-1});return}}if(f.e){this._onCompositionStart.fire({revealDeltaColumns:-this._textAreaState.selectionStart});return}this._setAndWriteTextAreaState("compositionstart",v.b.EMPTY),this._onCompositionStart.fire({revealDeltaColumns:0})}));const y=k=>{const Y=this._textAreaState,Q=v.b.readFromTextArea(this._textArea);return[Q,v.b.deduceInput(Y,Q,k)]},C=()=>{const k=this._textAreaState,Y=v.b.readFromTextArea(this._textArea);return[Y,v.b.deduceAndroidCompositionInput(k,Y)]},O=k=>{const Y=this._textAreaState,Q=v.b.selectedText(k),H={text:Q.value,replacePrevCharCnt:Y.selectionEnd-Y.selectionStart,replaceNextCharCnt:0,positionDelta:0};return[Q,H]};this._register(B.i(p.domNode,"compositionupdate",k=>{if(v.c&&console.log("[compositionupdate]",k),f.e){const[H,Z]=C();this._textAreaState=H,this._onType.fire(Z),this._onCompositionUpdate.fire(k);return}const[Y,Q]=O(k.data||"");this._textAreaState=Y,this._onType.fire(Q),this._onCompositionUpdate.fire(k)})),this._register(B.i(p.domNode,"compositionend",k=>{if(v.c&&console.log("[compositionend]",k),!this._isDoingComposition)return;if(this._isDoingComposition=!1,f.e){const[H,Z]=C();this._textAreaState=H,this._onType.fire(Z),this._onCompositionEnd.fire();return}const[Y,Q]=O(k.data||"");this._textAreaState=Y,this._onType.fire(Q),(f.f||f.g)&&(this._textAreaState=v.b.readFromTextArea(this._textArea)),this._onCompositionEnd.fire()})),this._register(B.i(p.domNode,"input",()=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._isDoingComposition)return;const[k,Y]=y(I.f);if(Y.replacePrevCharCnt===0&&Y.text.length===1&&L.E(Y.text.charCodeAt(0)))return;this._textAreaState=k,this._nextCommand===0?(Y.text!==""||Y.replacePrevCharCnt!==0)&&this._onType.fire(Y):((Y.text!==""||Y.replacePrevCharCnt!==0)&&this._firePaste(Y.text,null),this._nextCommand=0)})),this._register(B.i(p.domNode,"cut",k=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(k),this._asyncTriggerCut.schedule()})),this._register(B.i(p.domNode,"copy",k=>{this._ensureClipboardGetsEditorSelection(k)})),this._register(B.i(p.domNode,"paste",k=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),b.canUseTextData(k)){const[Y,Q]=b.getTextData(k);Y!==""&&this._firePaste(Y,Q)}else this._textArea.getSelectionStart()!==this._textArea.getSelectionEnd()&&this._setAndWriteTextAreaState("paste",v.b.EMPTY),this._nextCommand=1})),this._register(B.i(p.domNode,"focus",()=>{const k=this._hasFocus;this._setHasFocus(!0),f.h&&!k&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(B.i(p.domNode,"blur",()=>{this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(B.i(p.domNode,D.Tap,()=>{f.e&&this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let c=0;return B.i(document,"selectionchange",p=>{if(!this._hasFocus)return;if(this._isDoingComposition)return;if(!f.f)return;const E=Date.now(),y=E-c;if(c=E,y<5)return;const C=E-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),C<100)return;if(!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const O=this._textArea.getValue();if(this._textAreaState.value!==O)return;const k=this._textArea.getSelectionStart(),Y=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===k&&this._textAreaState.selectionEnd===Y)return;const Q=this._textAreaState.deduceEditorPosition(k),H=this._host.deduceModelPosition(Q[0],Q[1],Q[2]),Z=this._textAreaState.deduceEditorPosition(Y),oe=this._host.deduceModelPosition(Z[0],Z[1],Z[2]),$=new d.a(H.lineNumber,H.column,oe.lineNumber,oe.column);this._onSelectionChangeRequest.fire($)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){const c=B.F(this.textArea.domNode);c?this._setHasFocus(c.activeElement===this.textArea.domNode):B.N(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}_setHasFocus(c){if(this._hasFocus===c)return;this._hasFocus=c,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(c,p){this._hasFocus||(p=p.collapseSelection()),p.writeToTextArea(c,this._textArea,this._hasFocus),this._textAreaState=p}writeScreenReaderContent(c){if(this._isDoingComposition)return;this._setAndWriteTextAreaState(c,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(c){const p=this._host.getDataToCopy(b.canUseTextData(c)),E={version:1,isFromEmptySelection:p.isFromEmptySelection,multicursorText:p.multicursorText,mode:p.mode};if(r.INSTANCE.set(f.g?p.text.replace(/\r\n/g,`
|
|
|
`):p.text,E),!b.canUseTextData(c)){this._setAndWriteTextAreaState("copy or cut",v.b.selectedText(p.text));return}b.setTextData(c,p.text,p.html,E)}_firePaste(c,p){p||(p=r.INSTANCE.get(c)),this._onPaste.fire({text:c,metadata:p})}}class b{static canUseTextData(c){return!!c.clipboardData}static getTextData(c){if(c.clipboardData){c.preventDefault();const p=c.clipboardData.getData(F.a.text);let E=null;const y=c.clipboardData.getData("vscode-editor-data");if(typeof y=="string")try{E=JSON.parse(y),E.version!==1&&(E=null)}catch(C){}return[p,E]}throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}static setTextData(c,p,E,y){if(c.clipboardData){c.clipboardData.setData(F.a.text,p),typeof E=="string"&&c.clipboardData.setData("text/html",E),c.clipboardData.setData("vscode-editor-data",JSON.stringify(y)),c.preventDefault();return}throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}class h extends A.a{constructor(c){super();this._actual=c,this._ignoreSelectionChangeTime=0}setIgnoreSelectionChangeTime(c){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.domNode.value}setValue(c,p){const E=this._actual.domNode;if(E.value===p)return;this.setIgnoreSelectionChangeTime("setValue"),E.value=p}getSelectionStart(){return this._actual.domNode.selectionDirection==="backward"?this._actual.domNode.selectionEnd:this._actual.domNode.selectionStart}getSelectionEnd(){return this._actual.domNode.selectionDirection==="backward"?this._actual.domNode.selectionStart:this._actual.domNode.selectionEnd}setSelectionRange(c,p,E){const y=this._actual.domNode;let C=null;const O=B.F(y);O?C=O.activeElement:C=document.activeElement;const k=C===y,Y=y.selectionStart,Q=y.selectionEnd;if(k&&Y===p&&Q===E){f.g&&window.parent!==window&&y.focus();return}if(k){this.setIgnoreSelectionChangeTime("setSelectionRange"),y.setSelectionRange(p,E),f.g&&window.parent!==window&&y.focus();return}try{const H=B.U(y);this.setIgnoreSelectionChangeTime("setSelectionRange"),y.focus(),y.setSelectionRange(p,E),B.S(y,H)}catch(H){}}}},"5nk5":function(mt,M,t){"use strict";t.d(M,"a",function(){return N}),t.d(M,"b",function(){return A});var f=t("HpOR"),B=t("erNZ");function x(I){return I.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class N{constructor(I,L,v,m){this.oldPosition=I,this.oldText=L,this.newPosition=v,this.newText=m}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 this.oldText.length===0?`(insert@${this.oldPosition} "${x(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${x(this.oldText)}")`:`(replace@${this.oldPosition} "${x(this.oldText)}" with "${x(this.newText)}")`}static _writeStringSize(I){return 4+2*I.length}static _writeString(I,L,v){const m=L.length;f.f(I,m,v),v+=4;for(let d=0;d<m;d++)f.e(I,L.charCodeAt(d),v),v+=2;return v}static _readString(I,L){const v=f.c(I,L);return L+=4,Object(B.b)(I,L,v)}writeSize(){return 4+4+N._writeStringSize(this.oldText)+N._writeStringSize(this.newText)}write(I,L){return f.f(I,this.oldPosition,L),L+=4,f.f(I,this.newPosition,L),L+=4,L=N._writeString(I,this.oldText,L),L=N._writeString(I,this.newText,L),L}static read(I,L,v){const m=f.c(I,L);L+=4;const d=f.c(I,L);L+=4;const D=N._readString(I,L);L+=N._writeStringSize(D);const S=N._readString(I,L);return L+=N._writeStringSize(S),v.push(new N(m,D,d,S)),L}}function A(I,L){if(I===null||I.length===0)return L;const v=new F(I,L);return v.compress()}class F{constructor(I,L){this._prevEdits=I,this._currEdits=L,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let I=0,L=0,v=this._getPrev(I),m=this._getCurr(L);for(;I<this._prevLen||L<this._currLen;){if(v===null){this._acceptCurr(m),m=this._getCurr(++L);continue}if(m===null){this._acceptPrev(v),v=this._getPrev(++I);continue}if(m.oldEnd<=v.newPosition){this._acceptCurr(m),m=this._getCurr(++L);continue}if(v.newEnd<=m.oldPosition){this._acceptPrev(v),v=this._getPrev(++I);continue}if(m.oldPosition<v.newPosition){const[_,b]=F._splitCurr(m,v.newPosition-m.oldPosition);this._acceptCurr(_),m=b;continue}if(v.newPosition<m.oldPosition){const[_,b]=F._splitPrev(v,m.oldPosition-v.newPosition);this._acceptPrev(_),v=b;continue}let S,r;if(m.oldEnd===v.newEnd)S=v,r=m,v=this._getPrev(++I),m=this._getCurr(++L);else if(m.oldEnd<v.newEnd){const[_,b]=F._splitPrev(v,m.oldLength);S=_,r=m,v=b,m=this._getCurr(++L)}else{const[_,b]=F._splitCurr(m,v.newLength);S=v,r=_,v=this._getPrev(++I),m=b}this._result[this._resultLen++]=new N(S.oldPosition,S.oldText,r.newPosition,r.newText),this._prevDeltaOffset+=S.newLength-S.oldLength,this._currDeltaOffset+=r.newLength-r.oldLength}const d=F._merge(this._result),D=F._removeNoOps(d);return D}_acceptCurr(I){this._result[this._resultLen++]=F._rebaseCurr(this._prevDeltaOffset,I),this._currDeltaOffset+=I.newLength-I.oldLength}_getCurr(I){return I<this._currLen?this._currEdits[I]:null}_acceptPrev(I){this._result[this._resultLen++]=F._rebasePrev(this._currDeltaOffset,I),this._prevDeltaOffset+=I.newLength-I.oldLength}_getPrev(I){return I<this._prevLen?this._prevEdits[I]:null}static _rebaseCurr(I,L){return new N(L.oldPosition-I,L.oldText,L.newPosition,L.newText)}static _rebasePrev(I,L){return new N(L.oldPosition,L.oldText,L.newPosition+I,L.newText)}static _splitPrev(I,L){const v=I.newText.substr(0,L),m=I.newText.substr(L);return[new N(I.oldPosition,I.oldText,I.newPosition,v),new N(I.oldEnd,"",I.newPosition+L,m)]}static _splitCurr(I,L){const v=I.oldText.substr(0,L),m=I.oldText.substr(L);return[new N(I.oldPosition,v,I.newPosition,I.newText),new N(I.oldPosition+L,m,I.newEnd,"")]}static _merge(I){if(I.length===0)return I;let L=[],v=0,m=I[0];for(let d=1;d<I.length;d++){const D=I[d];m.oldEnd===D.oldPosition?m=new N(m.oldPosition,m.oldText+D.oldText,m.newPosition,m.newText+D.newText):(L[v++]=m,m=D)}return L[v++]=m,L}static _removeNoOps(I){if(I.length===0)return I;let L=[],v=0;for(let m=0;m<I.length;m++){const d=I[m];if(d.oldText===d.newText)continue;L[v++]=d}return L}}},"5v8Y":function(mt,M,t){"use strict";t.d(M,"a",function(){return N});var f=t("MXAL");class B extends f.a{constructor(A){super(0);for(let F=0,I=A.length;F<I;F++)this.set(A.charCodeAt(F),2);this.set(32,1),this.set(9,1)}}function x(A){let F={};return I=>(F.hasOwnProperty(I)||(F[I]=A(I)),F[I])}const N=x(A=>new B(A))},"62hx":function(mt,M,t){},"6OMU":function(mt,M,t){"use strict";t.d(M,"t",function(){return f}),t.d(M,"u",function(){return B}),t.d(M,"g",function(){return x}),t.d(M,"d",function(){return N}),t.d(M,"h",function(){return A}),t.d(M,"q",function(){return F}),t.d(M,"l",function(){return I}),t.d(M,"e",function(){return L}),t.d(M,"m",function(){return v}),t.d(M,"n",function(){return m}),t.d(M,"f",function(){return d}),t.d(M,"i",function(){return D}),t.d(M,"j",function(){return r}),t.d(M,"k",function(){return _}),t.d(M,"r",function(){return b}),t.d(M,"b",function(){return h}),t.d(M,"p",function(){return c}),t.d(M,"o",function(){return p}),t.d(M,"c",function(){return E}),t.d(M,"s",function(){return C}),t.d(M,"a",function(){return k});function f(Y,Q=0){return Y[Y.length-(1+Q)]}function B(Y){if(Y.length===0)throw new Error("Invalid tail call");return[Y.slice(0,Y.length-1),Y[Y.length-1]]}function x(Y,Q,H=(Z,oe)=>Z===oe){if(Y===Q)return!0;if(!Y||!Q)return!1;if(Y.length!==Q.length)return!1;for(let Z=0,oe=Y.length;Z<oe;Z++)if(!H(Y[Z],Q[Z]))return!1;return!0}function N(Y,Q,H){let Z=0,oe=Y.length-1;for(;Z<=oe;){const $=(Z+oe)/2|0,te=H(Y[$],Q);if(te<0)Z=$+1;else if(te>0)oe=$-1;else return $}return-(Z+1)}function A(Y,Q){let H=0,Z=Y.length;if(Z===0)return 0;for(;H<Z;){const oe=Math.floor((H+Z)/2);Q(Y[oe])?Z=oe:H=oe+1}return H}function F(Y,Q,H){if(Y=Y|0,Y>=Q.length)throw new TypeError("invalid index");let Z=Q[Math.floor(Q.length*Math.random())],oe=[],$=[],te=[];for(let ne of Q){const Ee=H(ne,Z);Ee<0?oe.push(ne):Ee>0?$.push(ne):te.push(ne)}return Y<oe.length?F(Y,oe,H):Y<oe.length+te.length?te[0]:F(Y-(oe.length+te.length),$,H)}function I(Y,Q){const H=[];let Z;for(const oe of Y.slice(0).sort(Q))!Z||Q(Z[0],oe)!==0?(Z=[oe],H.push(Z)):Z.push(oe);return H}function L(Y){return Y.filter(Q=>!!Q)}function v(Y){return!Array.isArray(Y)||Y.length===0}function m(Y){return Array.isArray(Y)&&Y.length>0}function d(Y,Q=H=>H){const H=new Set;return Y.filter(Z=>{const oe=Q(Z);return H.has(oe)?!1:(H.add(oe),!0)})}function D(Y,Q){const H=S(Y,Q);return H===-1?void 0:Y[H]}function S(Y,Q){for(let H=Y.length-1;H>=0;H--){const Z=Y[H];if(Q(Z))return H}return-1}function r(Y,Q){return Y.length>0?Y[0]:Q}function _(Y){return[].concat(...Y)}function b(Y,Q){let H=typeof Q=="number"?Y:0;typeof Q=="number"?H=Y:(H=0,Q=Y);const Z=[];if(H<=Q)for(let oe=H;oe<Q;oe++)Z.push(oe);else for(let oe=H;oe>Q;oe--)Z.push(oe);return Z}function h(Y,Q,H){const Z=Y.slice(0,Q),oe=Y.slice(Q);return Z.concat(H,oe)}function c(Y,Q){const H=Y.indexOf(Q);H>-1&&(Y.splice(H,1),Y.unshift(Q))}function p(Y,Q){const H=Y.indexOf(Q);H>-1&&(Y.splice(H,1),Y.push(Q))}function E(Y){return Array.isArray(Y)?Y:[Y]}function y(Y,Q,H){const Z=O(Y,Q),oe=Y.length,$=H.length;Y.length=oe+$;for(let te=oe-1;te>=Z;te--)Y[te+$]=Y[te];for(let te=0;te<$;te++)Y[te+Z]=H[te]}function C(Y,Q,H,Z){const oe=O(Y,Q),$=Y.splice(oe,H);return y(Y,oe,Z),$}function O(Y,Q){return Q<0?Math.max(Q+Y.length,0):Math.min(Q,Y.length)}class k{constructor(Y){this.items=Y,this.firstIdx=0,this.lastIdx=this.items.length-1}takeWhile(Y){let Q=this.firstIdx;for(;Q<this.items.length&&Y(this.items[Q]);)Q++;const H=Q===this.firstIdx?null:this.items.slice(this.firstIdx,Q);return this.firstIdx=Q,H}takeFromEndWhile(Y){let Q=this.lastIdx;for(;Q>=0&&Y(this.items[Q]);)Q--;const H=Q===this.lastIdx?null:this.items.slice(Q+1,this.lastIdx+1);return this.lastIdx=Q,H}peek(){return this.items[this.firstIdx]}}},"6lNC":function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:function(){return t.e(343).then(t.bind(null,"meXB"))}})},"6vuP":function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("Cg/j");const B=Object(f.c)("dialogService")},"7/Ik":function(mt,M,t){"use strict";t.d(M,"b",function(){return D}),t.d(M,"a",function(){return S});var f=t("D3Dy"),B=t("ZQ78"),x=t("EffR"),N=t("pg8w"),A=t("8HAY"),F=t("pmY6"),I=t("MNsG"),L=t("746U"),v=t("yEoX"),m=t.n(v),d=t("3/fG");class D extends F.a{constructor(r,_,b={}){super();this.options=b,this._context=r||this,this._action=_,_ instanceof A.a&&this._register(_.onDidChange(h=>{if(!this.element)return;this.handleActionChangeEvent(h)}))}handleActionChangeEvent(r){r.enabled!==void 0&&this.updateEnabled(),r.checked!==void 0&&this.updateChecked(),r.class!==void 0&&this.updateClass(),r.label!==void 0&&(this.updateLabel(),this.updateTooltip()),r.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new A.b)),this._actionRunner}set actionRunner(r){this._actionRunner=r}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(r){this._context=r}render(r){const _=this.element=r;this._register(N.b.addTarget(r));const b=this.options&&this.options.draggable;b&&(r.draggable=!0,f.g&&this._register(Object(x.i)(r,x.d.DRAG_START,h=>{var c;return(c=h.dataTransfer)===null||c===void 0?void 0:c.setData(B.a.TEXT,this._action.label)}))),this._register(Object(x.i)(_,N.a.Tap,h=>this.onClick(h,!0))),this._register(Object(x.i)(_,x.d.MOUSE_DOWN,h=>{b||x.c.stop(h,!0),this._action.enabled&&h.button===0&&_.classList.add("active")})),I.f&&this._register(Object(x.i)(_,x.d.CONTEXT_MENU,h=>{h.button===0&&h.ctrlKey===!0&&this.onClick(h)})),this._register(Object(x.i)(_,x.d.CLICK,h=>{x.c.stop(h,!0),this.options&&this.options.isMenu||this.onClick(h)})),this._register(Object(x.i)(_,x.d.DBLCLICK,h=>{x.c.stop(h,!0)})),[x.d.MOUSE_UP,x.d.MOUSE_OUT].forEach(h=>{this._register(Object(x.i)(_,h,c=>{x.c.stop(c),_.classList.remove("active")}))})}onClick(r,_=!1){var b;x.c.stop(r,!0);const h=L.n(this._context)?((b=this.options)===null||b===void 0?void 0:b.useEventAsContext)?r:{preserveFocus:_}:this._context;this.actionRunner.run(this._action,h)}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(r){this.element&&(this.element.tabIndex=r?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class S extends D{constructor(r,_,b={}){super(r,_,b);this.options=b,this.options.icon=b.icon!==void 0?b.icon:!1,this.options.label=b.label!==void 0?b.label:!0,this.cssClass=""}render(r){super.render(r),this.element&&(this.label=Object(x.q)(this.element,Object(x.a)("a.action-label"))),this.label&&(this._action.id===A.d.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&&(Object(x.q)(this.element,Object(x.a)("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(r){this.label&&(this.label.tabIndex=r?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let r=null;this.getAction().tooltip?r=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(r=this.getAction().label,this.options.keybinding&&(r=d.a({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",r,this.options.keybinding))),r&&this.label&&(this.label.title=r)}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"))}}},"79sc":function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("Cg/j");const B=Object(f.c)("markerDecorationsService")},"7GBL":function(mt,M,t){},"7afs":function(mt,M,t){"use strict";t.d(M,"c",function(){return B}),t.d(M,"b",function(){return x}),t.d(M,"d",function(){return F}),t.d(M,"a",function(){return S});var f=t("N0LK");function B(r){return x(r,0)}function x(r,_){switch(typeof r){case"object":return r===null?N(349,_):Array.isArray(r)?I(r,_):L(r,_);case"string":return F(r,_);case"boolean":return A(r,_);case"number":return N(r,_);case"undefined":return N(937,_);default:return N(617,_)}}function N(r,_){return(_<<5)-_+r|0}function A(r,_){return N(r?433:863,_)}function F(r,_){_=N(149417,_);for(let b=0,h=r.length;b<h;b++)_=N(r.charCodeAt(b),_);return _}function I(r,_){return _=N(104579,_),r.reduce((b,h)=>x(h,b),_)}function L(r,_){return _=N(181387,_),Object.keys(r).sort().reduce((b,h)=>(b=F(h,b),x(r[h],b)),_)}function v(r,_,b=32){const h=b-_,c=~((1<<h)-1);return(r<<_|(c&r)>>>h)>>>0}function m(r,_=0,b=r.byteLength,h=0){for(let c=0;c<b;c++)r[_+c]=h}function d(r,_,b="0"){for(;r.length<_;)r=b+r;return r}function D(r,_=32){return r instanceof ArrayBuffer?Array.from(new Uint8Array(r)).map(b=>b.toString(16).padStart(2,"0")).join(""):d((r>>>0).toString(16),_/4)}class S{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(r){const _=r.length;if(_===0)return;const b=this._buff;let h=this._buffLen,c=this._leftoverHighSurrogate,p,E;for(c!==0?(p=c,E=-1,c=0):(p=r.charCodeAt(0),E=0);;){let y=p;if(f.E(p))if(E+1<_){const C=r.charCodeAt(E+1);f.F(C)?(E++,y=f.j(p,C)):y=65533}else{c=p;break}else f.F(p)&&(y=65533);if(h=this._push(b,h,y),E++,E<_)p=r.charCodeAt(E);else break}this._buffLen=h,this._leftoverHighSurrogate=c}_push(r,_,b){return b<128?r[_++]=b:b<2048?(r[_++]=192|(b&1984)>>>6,r[_++]=128|(b&63)>>>0):b<65536?(r[_++]=224|(b&61440)>>>12,r[_++]=128|(b&4032)>>>6,r[_++]=128|(b&63)>>>0):(r[_++]=240|(b&1835008)>>>18,r[_++]=128|(b&258048)>>>12,r[_++]=128|(b&4032)>>>6,r[_++]=128|(b&63)>>>0),_>=64&&(this._step(),_-=64,this._totalLen+=64,r[0]=r[64+0],r[1]=r[64+1],r[2]=r[64+2]),_}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()),D(this._h0)+D(this._h1)+D(this._h2)+D(this._h3)+D(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,m(this._buff,this._buffLen),this._buffLen>56&&(this._step(),m(this._buff));const r=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(r/4294967296),!1),this._buffDV.setUint32(60,r%4294967296,!1),this._step()}_step(){const r=S._bigBlock32,_=this._buffDV;for(let k=0;k<64;k+=4)r.setUint32(k,_.getUint32(k,!1),!1);for(let k=64;k<320;k+=4)r.setUint32(k,v(r.getUint32(k-12,!1)^r.getUint32(k-32,!1)^r.getUint32(k-56,!1)^r.getUint32(k-64,!1),1),!1);let b=this._h0,h=this._h1,c=this._h2,p=this._h3,E=this._h4,y,C,O;for(let k=0;k<80;k++)k<20?(y=h&c|~h&p,C=1518500249):k<40?(y=h^c^p,C=1859775393):k<60?(y=h&c|h&p|c&p,C=2400959708):(y=h^c^p,C=3395469782),O=v(b,5)+y+E+C+r.getUint32(k*4,!1)&4294967295,E=p,p=c,c=v(h,30),h=b,b=O;this._h0=this._h0+b&4294967295,this._h1=this._h1+h&4294967295,this._h2=this._h2+c&4294967295,this._h3=this._h3+p&4294967295,this._h4=this._h4+E&4294967295}}S._bigBlock32=new DataView(new ArrayBuffer(320))},"7lZ/":function(mt,M,t){"use strict";t.d(M,"a",function(){return N});var f=t("EffR"),B=t("fdyd"),x=t("qj0h");class N{constructor(A,F){this.supportIcons=F,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",A.appendChild(this.domNode)}get element(){return this.domNode}set(A,F=[],I="",L){if(A||(A=""),L&&(A=N.escapeNewLines(A,F)),this.didEverRender&&this.text===A&&this.title===I&&x.d(this.highlights,F))return;this.text=A,this.title=I,this.highlights=F,this.render()}render(){const A=[];let F=0;for(const I of this.highlights){if(I.end===I.start)continue;if(F<I.start){const m=this.text.substring(F,I.start);A.push(f.a("span",void 0,...this.supportIcons?Object(B.a)(m):[m])),F=I.end}const L=this.text.substring(I.start,I.end),v=f.a("span.highlight",void 0,...this.supportIcons?Object(B.a)(L):[L]);I.extraClasses&&v.classList.add(I.extraClasses),A.push(v),F=I.end}if(F<this.text.length){const I=this.text.substring(F);A.push(f.a("span",void 0,...this.supportIcons?Object(B.a)(I):[I]))}f.R(this.domNode,...A),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(A,F){let I=0,L=0;return A.replace(/\r\n|\r|\n/g,(v,m)=>{L=v===`\r
|
|
|
`?-1:0,m+=I;for(const d of F){if(d.end<=m)continue;d.start>=m&&(d.start+=L),d.end>=m&&(d.end+=L)}return I+=L,"\u23CE"})}}},"7zd4":function(mt,M,t){},"8ATB":function(mt,M,t){},"8HsV":function(mt,M,t){"use strict";t.d(M,"a",function(){return f});class f{constructor(...B){this._entries=new Map;for(let[x,N]of B)this.set(x,N)}set(B,x){const N=this._entries.get(B);return this._entries.set(B,x),N}has(B){return this._entries.has(B)}get(B){return this._entries.get(B)}}},"8LL/":function(mt,M,t){},"8XyJ":function(mt,M,t){"use strict";t.r(M),t.d(M,"InsertCursorAbove",function(){return E}),t.d(M,"InsertCursorBelow",function(){return y}),t.d(M,"MultiCursorSessionResult",function(){return Y}),t.d(M,"MultiCursorSession",function(){return Q}),t.d(M,"MultiCursorSelectionController",function(){return H}),t.d(M,"MultiCursorSelectionControllerAction",function(){return Z}),t.d(M,"AddSelectionToNextFindMatchAction",function(){return oe}),t.d(M,"AddSelectionToPreviousFindMatchAction",function(){return $}),t.d(M,"MoveSelectionToNextFindMatchAction",function(){return te}),t.d(M,"MoveSelectionToPreviousFindMatchAction",function(){return ne}),t.d(M,"SelectHighlightsAction",function(){return Ee}),t.d(M,"CompatChangeAll",function(){return fe}),t.d(M,"SelectionHighlighter",function(){return ie});var f=t("OBOq"),B=t("X+cX"),x=t("/kV6"),N=t("pmY6"),A=t("sswD"),F=t("oAeH"),I=t("aokT"),L=t("gCVg"),v=t("wQH0"),m=t("M1Kb"),d=t("tX9W"),D=t("twdY"),S=t("oQaD"),r=t("3/fG"),_=t("fjLI"),b=t("T8No"),h=t("MD5Z"),c=t("t9D7");function p(J,he){const xe=he.filter(Ie=>!J.find(Le=>Le.equals(Ie)));if(xe.length>=1){const Ie=xe.map(Te=>`line ${Te.viewState.position.lineNumber} column ${Te.viewState.position.column}`).join(", "),Le=xe.length===1?r.a("cursorAdded","Cursor added: {0}",Ie):r.a("cursorsAdded","Cursors added: {0}",Ie);Object(f.c)(Le)}}class E extends A.b{constructor(){super({id:"editor.action.insertCursorAbove",label:r.a("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:v.a.editorTextFocus,primary:2048|512|16,linux:{primary:1024|512|16,secondary:[2048|1024|16]},weight:100},menuOpts:{menuId:_.b.MenubarSelectionMenu,group:"3_multi",title:r.a({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(J,he,xe){if(!he.hasModel())return;let Ie=!0;xe&&xe.logicalLine===!1&&(Ie=!1);const Le=he._getViewModel();if(Le.cursorConfig.readOnly)return;Le.pushStackElement();const Te=Le.getCursorStates();Le.setCursorStates(xe.source,3,F.b.addCursorUp(Le,Te,Ie)),Le.revealTopMostCursor(xe.source),p(Te,Le.getCursorStates())}}class y extends A.b{constructor(){super({id:"editor.action.insertCursorBelow",label:r.a("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:v.a.editorTextFocus,primary:2048|512|18,linux:{primary:1024|512|18,secondary:[2048|1024|18]},weight:100},menuOpts:{menuId:_.b.MenubarSelectionMenu,group:"3_multi",title:r.a({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(J,he,xe){if(!he.hasModel())return;let Ie=!0;xe&&xe.logicalLine===!1&&(Ie=!1);const Le=he._getViewModel();if(Le.cursorConfig.readOnly)return;Le.pushStackElement();const Te=Le.getCursorStates();Le.setCursorStates(xe.source,3,F.b.addCursorDown(Le,Te,Ie)),Le.revealBottomMostCursor(xe.source),p(Te,Le.getCursorStates())}}class C extends A.b{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:r.a("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:v.a.editorTextFocus,primary:1024|512|39,weight:100},menuOpts:{menuId:_.b.MenubarSelectionMenu,group:"3_multi",title:r.a({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(J,he,xe){if(J.isEmpty())return;for(let Ie=J.startLineNumber;Ie<J.endLineNumber;Ie++){let Le=he.getLineMaxColumn(Ie);xe.push(new L.a(Ie,Le,Ie,Le))}J.endColumn>1&&xe.push(new L.a(J.endLineNumber,J.endColumn,J.endLineNumber,J.endColumn))}run(J,he){if(!he.hasModel())return;const xe=he.getModel(),Ie=he.getSelections(),Le=he._getViewModel(),Te=Le.getCursorStates();let ze=[];Ie.forEach(ue=>this.getCursorsForSelection(ue,xe,ze)),ze.length>0&&he.setSelections(ze),p(Te,Le.getCursorStates())}}class O extends A.b{constructor(){super({id:"editor.action.addCursorsToBottom",label:r.a("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(J,he){if(!he.hasModel())return;const xe=he.getSelections(),Ie=he.getModel().getLineCount();let Le=[];for(let ue=xe[0].startLineNumber;ue<=Ie;ue++)Le.push(new L.a(ue,xe[0].startColumn,ue,xe[0].endColumn));const Te=he._getViewModel(),ze=Te.getCursorStates();Le.length>0&&he.setSelections(Le),p(ze,Te.getCursorStates())}}class k extends A.b{constructor(){super({id:"editor.action.addCursorsToTop",label:r.a("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(J,he){if(!he.hasModel())return;const xe=he.getSelections();let Ie=[];for(let ze=xe[0].startLineNumber;ze>=1;ze--)Ie.push(new L.a(ze,xe[0].startColumn,ze,xe[0].endColumn));const Le=he._getViewModel(),Te=Le.getCursorStates();Ie.length>0&&he.setSelections(Ie),p(Te,Le.getCursorStates())}}class Y{constructor(J,he,xe){this.selections=J,this.revealRange=he,this.revealScrollType=xe}}class Q{constructor(J,he,xe,Ie,Le,Te,ze){this._editor=J,this.findController=he,this.isDisconnectedFromFindController=xe,this.searchText=Ie,this.wholeWord=Le,this.matchCase=Te,this.currentMatch=ze}static create(J,he){if(!J.hasModel())return null;const xe=he.getState();if(!J.hasTextFocus()&&xe.isRevealed&&xe.searchString.length>0)return new Q(J,he,!1,xe.searchString,xe.wholeWord,xe.matchCase,null);let Ie=!1,Le,Te;const ze=J.getSelections();ze.length===1&&ze[0].isEmpty()?(Ie=!0,Le=!0,Te=!0):(Le=xe.wholeWord,Te=xe.matchCase);const ue=J.getSelection();let je,Pe=null;if(ue.isEmpty()){const ve=J.getConfiguredWordAtPosition(ue.getStartPosition());if(!ve)return null;je=ve.word,Pe=new L.a(ue.startLineNumber,ve.startColumn,ue.startLineNumber,ve.endColumn)}else je=J.getModel().getValueInRange(ue).replace(/\r\n/g,`
|
|
|
`);return new Q(J,he,Ie,je,Le,Te,Pe)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const J=this._getNextMatch();if(!J)return null;const he=this._editor.getSelections();return new Y(he.concat(J),J,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const J=this._getNextMatch();if(!J)return null;const he=this._editor.getSelections();return new Y(he.slice(0,he.length-1).concat(J),J,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const Ie=this.currentMatch;return this.currentMatch=null,Ie}this.findController.highlightFindOptions();const J=this._editor.getSelections(),he=J[J.length-1],xe=this._editor.getModel().findNextMatch(this.searchText,he.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1);return xe?new L.a(xe.range.startLineNumber,xe.range.startColumn,xe.range.endLineNumber,xe.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const J=this._getPreviousMatch();if(!J)return null;const he=this._editor.getSelections();return new Y(he.concat(J),J,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const J=this._getPreviousMatch();if(!J)return null;const he=this._editor.getSelections();return new Y(he.slice(0,he.length-1).concat(J),J,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const Ie=this.currentMatch;return this.currentMatch=null,Ie}this.findController.highlightFindOptions();const J=this._editor.getSelections(),he=J[J.length-1],xe=this._editor.getModel().findPreviousMatch(this.searchText,he.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1);return xe?new L.a(xe.range.startLineNumber,xe.range.startColumn,xe.range.endLineNumber,xe.range.endColumn):null}selectAll(){return this._editor.hasModel()?(this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1,1073741824)):[]}}class H extends N.a{constructor(J){super();this._sessionDispose=this._register(new N.b),this._editor=J,this._ignoreSelectionChange=!1,this._session=null}static get(J){return J.getContribution(H.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(J){if(!this._session){const he=Q.create(this._editor,J);if(!he)return;this._session=he;const xe={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(xe.wholeWordOverride=1,xe.matchCaseOverride=1,xe.isRegexOverride=2),J.getState().change(xe,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(Ie=>{if(this._ignoreSelectionChange)return;this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(J.getState().onFindReplaceStateChange(Ie=>{(Ie.matchCase||Ie.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const J={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(J,!1)}this._session=null}_setSelections(J){this._ignoreSelectionChange=!0,this._editor.setSelections(J),this._ignoreSelectionChange=!1}_expandEmptyToWord(J,he){if(!he.isEmpty())return he;const xe=this._editor.getConfiguredWordAtPosition(he.getStartPosition());return xe?new L.a(he.startLineNumber,xe.startColumn,he.startLineNumber,xe.endColumn):he}_applySessionResult(J){if(!J)return;this._setSelections(J.selections),J.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(J.revealRange,J.revealScrollType)}getSession(J){return this._session}addSelectionToNextFindMatch(J){if(!this._editor.hasModel())return;if(!this._session){const he=this._editor.getSelections();if(he.length>1){const xe=J.getState(),Ie=xe.matchCase,Le=U(this._editor.getModel(),he,Ie);if(!Le){const Te=this._editor.getModel();let ze=[];for(let ue=0,je=he.length;ue<je;ue++)ze[ue]=this._expandEmptyToWord(Te,he[ue]);this._editor.setSelections(ze);return}}}this._beginSessionIfNeeded(J),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}addSelectionToPreviousFindMatch(J){this._beginSessionIfNeeded(J),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(J){this._beginSessionIfNeeded(J),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(J){this._beginSessionIfNeeded(J),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(J){if(!this._editor.hasModel())return;let he=null;const xe=J.getState();if(xe.isRevealed&&xe.searchString.length>0&&xe.isRegex)he=this._editor.getModel().findMatches(xe.searchString,!0,xe.isRegex,xe.matchCase,xe.wholeWord?this._editor.getOption(115):null,!1,1073741824);else{if(this._beginSessionIfNeeded(J),!this._session)return;he=this._session.selectAll()}if(xe.searchScope){const Ie=xe.searchScope;let Le=[];he.forEach(Te=>{Ie.forEach(ze=>{Te.range.endLineNumber<=ze.endLineNumber&&Te.range.startLineNumber>=ze.startLineNumber&&Le.push(Te)})}),he=Le}if(he.length>0){const Ie=this._editor.getSelection();for(let Le=0,Te=he.length;Le<Te;Le++){const ze=he[Le],ue=ze.range.intersectRanges(Ie);if(ue){he[Le]=he[0],he[0]=ze;break}}this._setSelections(he.map(Le=>new L.a(Le.range.startLineNumber,Le.range.startColumn,Le.range.endLineNumber,Le.range.endColumn)))}}}H.ID="editor.contrib.multiCursorController";class Z extends A.b{run(J,he){const xe=H.get(he);if(!xe)return;const Ie=S.CommonFindController.get(he);if(!Ie)return;const Le=he._getViewModel();if(Le){const Te=Le.getCursorStates();this._run(xe,Ie),p(Te,Le.getCursorStates())}}}class oe extends Z{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:r.a("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:v.a.focus,primary:2048|34,weight:100},menuOpts:{menuId:_.b.MenubarSelectionMenu,group:"3_multi",title:r.a({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(J,he){J.addSelectionToNextFindMatch(he)}}class $ extends Z{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:r.a("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:_.b.MenubarSelectionMenu,group:"3_multi",title:r.a({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(J,he){J.addSelectionToPreviousFindMatch(he)}}class te extends Z{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:r.a("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:v.a.focus,primary:Object(x.c)(2048|41,2048|34),weight:100}})}_run(J,he){J.moveSelectionToNextFindMatch(he)}}class ne extends Z{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:r.a("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(J,he){J.moveSelectionToPreviousFindMatch(he)}}class Ee extends Z{constructor(){super({id:"editor.action.selectHighlights",label:r.a("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:v.a.focus,primary:2048|1024|42,weight:100},menuOpts:{menuId:_.b.MenubarSelectionMenu,group:"3_multi",title:r.a({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(J,he){J.selectAll(he)}}class fe extends Z{constructor(){super({id:"editor.action.changeAll",label:r.a("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:b.a.and(v.a.writable,v.a.editorTextFocus),kbOpts:{kbExpr:v.a.editorTextFocus,primary:2048|60,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(J,he){J.selectAll(he)}}class ee{constructor(J,he,xe,Ie){this.searchText=J,this.matchCase=he,this.wordSeparators=xe,this.modelVersionId=Ie}static softEquals(J,he){return!J&&!he?!0:!J||!he?!1:J.searchText===he.searchText&&J.matchCase===he.matchCase&&J.wordSeparators===he.wordSeparators&&J.modelVersionId===he.modelVersionId}}class ie extends N.a{constructor(J){super();this.editor=J,this._isEnabled=J.getOption(96),this.decorations=[],this.updateSoon=this._register(new B.e(()=>this._update(),300)),this.state=null,this._register(J.onDidChangeConfiguration(he=>{this._isEnabled=J.getOption(96)})),this._register(J.onDidChangeCursorSelection(he=>{if(!this._isEnabled)return;he.selection.isEmpty()?he.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update()})),this._register(J.onDidChangeModel(he=>{this._setState(null)})),this._register(J.onDidChangeModelContent(he=>{this._isEnabled&&this.updateSoon.schedule()})),this._register(S.CommonFindController.get(J).getState().onFindReplaceStateChange(he=>{this._update()}))}_update(){this._setState(ie._createState(this._isEnabled,this.editor))}static _createState(J,he){if(!J)return null;if(!he.hasModel())return null;const xe=he.getSelection();if(xe.startLineNumber!==xe.endLineNumber)return null;const Ie=H.get(he);if(!Ie)return null;const Le=S.CommonFindController.get(he);if(!Le)return null;let Te=Ie.getSession(Le);if(!Te){const je=he.getSelections();if(je.length>1){const Pe=Le.getState(),ve=Pe.matchCase,ce=U(he.getModel(),je,ve);if(!ce)return null}Te=Q.create(he,Le)}if(!Te)return null;if(Te.currentMatch)return null;if(/^[ \t]+$/.test(Te.searchText))return null;if(Te.searchText.length>200)return null;const ze=Le.getState(),ue=ze.matchCase;if(ze.isRevealed){let je=ze.searchString;ue||(je=je.toLowerCase());let Pe=Te.searchText;if(ue||(Pe=Pe.toLowerCase()),je===Pe&&Te.matchCase===ze.matchCase&&Te.wholeWord===ze.wholeWord&&!ze.isRegex)return null}return new ee(Te.searchText,Te.matchCase,Te.wholeWord?he.getOption(115):null,he.getModel().getVersionId())}_setState(J){if(ee.softEquals(this.state,J)){this.state=J;return}if(this.state=J,!this.state){this.decorations=this.editor.deltaDecorations(this.decorations,[]);return}if(!this.editor.hasModel())return;const he=this.editor.getModel();if(he.isTooLargeForTokenization())return;const xe=D.i.has(he)&&this.editor.getOption(71);let Ie=he.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map(ue=>ue.range);Ie.sort(I.a.compareRangesUsingStarts);let Le=this.editor.getSelections();Le.sort(I.a.compareRangesUsingStarts);let Te=[];for(let ue=0,je=0,Pe=Ie.length,ve=Le.length;ue<Pe;){const ce=Ie[ue];if(je>=ve)Te.push(ce),ue++;else{const le=I.a.compareRangesUsingStarts(ce,Le[je]);le<0?((Le[je].isEmpty()||!I.a.areIntersecting(ce,Le[je]))&&Te.push(ce),ue++):(le>0||ue++,je++)}}const ze=Te.map(ue=>({range:ue,options:xe?ie._SELECTION_HIGHLIGHT:ie._SELECTION_HIGHLIGHT_OVERVIEW}));this.decorations=this.editor.deltaDecorations(this.decorations,ze)}dispose(){this._setState(null),super.dispose()}}ie.ID="editor.contrib.selectionHighlighter",ie._SELECTION_HIGHLIGHT_OVERVIEW=d.b.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",minimap:{color:Object(c.g)(h.cc),position:m.f.Inline},overviewRuler:{color:Object(c.g)(h.jc),position:m.g.Center}}),ie._SELECTION_HIGHLIGHT=d.b.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"});function U(J,he,xe){const Ie=G(J,he[0],!xe);for(let Le=1,Te=he.length;Le<Te;Le++){const ze=he[Le];if(ze.isEmpty())return!1;const ue=G(J,ze,!xe);if(Ie!==ue)return!1}return!0}function G(J,he,xe){const Ie=J.getValueInRange(he);return xe?Ie.toLowerCase():Ie}Object(A.l)(H.ID,H),Object(A.l)(ie.ID,ie),Object(A.j)(E),Object(A.j)(y),Object(A.j)(C),Object(A.j)(oe),Object(A.j)($),Object(A.j)(te),Object(A.j)(ne),Object(A.j)(Ee),Object(A.j)(fe),Object(A.j)(O),Object(A.j)(k)},"8Ydt":function(mt,M,t){"use strict";t.r(M),t.d(M,"DefinitionAction",function(){return ye});var f=t("D3Dy"),B=t("OBOq"),x=t("X+cX"),N=t("/kV6"),A=t("MNsG"),F=t("746U"),I=t("bY76"),L=t("vATl"),v=t("sFUC"),m=t("sswD"),d=t("Vxe3"),D=t("03kh"),S=t("cGHE"),r=t("aokT"),_=t("wQH0"),b=t("twdY"),h=t("QY8A"),c=t("9o5J"),p=t("MI8n"),E=t("pmY6"),y=t("gslv"),C=t("3/fG"),O=t("T8No"),k=t("9fML"),Y=t("Cg/j"),Q=t("bexQ"),H=t("nrhi"),Z=t("sM1p"),oe=function(Ke,et,bt,Tt){var $t=arguments.length,Xe=$t<3?et:Tt===null?Tt=Object.getOwnPropertyDescriptor(et,bt):Tt,it;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Xe=Reflect.decorate(Ke,et,bt,Tt);else for(var re=Ke.length-1;re>=0;re--)(it=Ke[re])&&(Xe=($t<3?it(Xe):$t>3?it(et,bt,Xe):it(et,bt))||Xe);return $t>3&&Xe&&Object.defineProperty(et,bt,Xe),Xe},$=function(Ke,et){return function(bt,Tt){et(bt,Tt,Ke)}};const te=new O.c("hasSymbols",!1,Object(C.a)("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),ne=Object(Y.c)("ISymbolNavigationService");let Ee=class{constructor(et,bt,Tt,$t){this._editorService=bt,this._notificationService=Tt,this._keybindingService=$t,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=te.bindTo(et)}reset(){var et,bt;this._ctxHasSymbols.reset(),(et=this._currentState)===null||et===void 0||et.dispose(),(bt=this._currentMessage)===null||bt===void 0||bt.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(et){const bt=et.parent.parent;if(bt.references.length<=1){this.reset();return}this._currentModel=bt,this._currentIdx=bt.references.indexOf(et),this._ctxHasSymbols.set(!0),this._showMessage();const Tt=new fe(this._editorService),$t=Tt.onDidChange(Xe=>{if(this._ignoreEditorChange)return;const it=this._editorService.getActiveCodeEditor();if(!it)return;const re=it.getModel(),We=it.getPosition();if(!re||!We)return;let tt=!1,Et=!1;for(const It of bt.references)if(Object(y.f)(It.uri,re.uri))tt=!0,Et=Et||r.a.containsPosition(It.range,We);else if(tt)break;(!tt||!Et)&&this.reset()});this._currentState=Object(E.e)(Tt,$t)}revealNext(et){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const bt=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:bt.uri,options:{selection:r.a.collapseToStart(bt.range),selectionRevealType:3}},et).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var et;(et=this._currentMessage)===null||et===void 0||et.dispose();const bt=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),Tt=bt?Object(C.a)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,bt.getLabel()):Object(C.a)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(Tt)}};Ee=oe([$(0,O.b),$(1,d.a),$(2,Z.a),$(3,Q.a)],Ee),Object(k.b)(ne,Ee,!0),Object(m.k)(new class extends m.c{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:te,kbOpts:{weight:100,primary:70}})}runEditorCommand(Ke,et){return Ke.get(ne).revealNext(et)}}),H.a.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:te,primary:9,handler(Ke){Ke.get(ne).reset()}});let fe=class{constructor(et){this._listener=new Map,this._disposables=new E.b,this._onDidChange=new p.b,this.onDidChange=this._onDidChange.event,this._disposables.add(et.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(et.onCodeEditorAdd(this._onDidAddEditor,this)),et.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),Object(E.f)(this._listener.values())}_onDidAddEditor(et){this._listener.set(et,Object(E.e)(et.onDidChangeCursorPosition(bt=>this._onDidChange.fire({editor:et})),et.onDidChangeModelContent(bt=>this._onDidChange.fire({editor:et}))))}_onDidRemoveEditor(et){var bt;(bt=this._listener.get(et))===null||bt===void 0||bt.dispose(),this._listener.delete(et)}};fe=oe([$(0,d.a)],fe);var ee=t("NR8r"),ie=t("iNS8"),U=t("fjLI"),G=t("nnTU"),J=t("tTk5"),he=t("vRMv"),xe=function(Ke,et,bt,Tt){function $t(Xe){return Xe instanceof bt?Xe:new bt(function(it){it(Xe)})}return new(bt||(bt=Promise))(function(Xe,it){function re(Et){try{tt(Tt.next(Et))}catch(It){it(It)}}function We(Et){try{tt(Tt.throw(Et))}catch(It){it(It)}}function tt(Et){Et.done?Xe(Et.value):$t(Et.value).then(re,We)}tt((Tt=Tt.apply(Ke,et||[])).next())})},Ie,Le,Te,ze,ue,je,Pe,ve;U.d.appendMenuItem(U.b.EditorContext,{submenu:U.b.EditorContextPeek,title:C.a("peek.submenu","Peek"),group:"navigation",order:100});const ce=new Set;function le(Ke){const et=new Ke;return Object(m.m)(et),ce.add(et.id),et}class Ce extends m.b{constructor(Ke,et){super(et);this._configuration=Ke}run(Ke,et){if(!et.hasModel())return Promise.resolve(void 0);const bt=Ke.get(Z.a),Tt=Ke.get(d.a),$t=Ke.get(J.a),Xe=Ke.get(ne),it=et.getModel(),re=et.getPosition(),We=new L.b(et,1|4),tt=Object(x.l)(this._getLocationModel(it,re,We.token),We.token).then(Et=>xe(this,void 0,void 0,function*(){if(!Et||We.token.isCancellationRequested)return;Object(B.a)(Et.ariaMessage);let It;if(Et.referenceAt(it.uri,re)){const vo=this._getAlternativeCommand(et);vo!==this.id&&ce.has(vo)&&(It=et.getAction(vo))}const Rt=Et.references.length;if(Rt===0){if(!this._configuration.muteMessage){const vo=it.getWordAtPosition(re);ee.a.get(et).showMessage(this._getNoResultFoundMessage(vo),re)}}else if(Rt===1&&It)It.run();else return this._onResult(Tt,Xe,et,Et)}),Et=>{bt.error(Et)}).finally(()=>{We.dispose()});return $t.showWhile(tt,250),tt}_onResult(Ke,et,bt,Tt){return xe(this,void 0,void 0,function*(){const $t=this._getGoToPreference(bt);if(!(bt instanceof D.a)&&(this._configuration.openInPeek||$t==="peek"&&Tt.references.length>1))this._openInPeek(bt,Tt);else{const Xe=Tt.firstReference(),it=Tt.references.length>1&&$t==="gotoAndPeek",re=yield this._openReference(bt,Ke,Xe,this._configuration.openToSide,!it);it&&re?this._openInPeek(re,Tt):Tt.dispose(),$t==="goto"&&et.put(Xe)}})}_openReference(Ke,et,bt,Tt,$t){return xe(this,void 0,void 0,function*(){let Xe;if(Object(b.I)(bt)&&(Xe=bt.targetSelectionRange),Xe||(Xe=bt.range),!Xe)return;const it=yield et.openCodeEditor({resource:bt.uri,options:{selection:r.a.collapseToStart(Xe),selectionRevealType:3}},Ke,Tt);if(!it)return;if($t){const re=it.getModel(),We=it.deltaDecorations([],[{range:Xe,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{it.getModel()===re&&it.deltaDecorations(We,[])},350)}return it})}_openInPeek(Ke,et){let bt=h.a.get(Ke);bt&&Ke.hasModel()?bt.toggleWidget(Ke.getSelection(),Object(x.h)(Tt=>Promise.resolve(et)),this._configuration.openInPeek):et.dispose()}}class ye extends Ce{_getLocationModel(Ke,et,bt){return xe(this,void 0,void 0,function*(){return new c.c(yield Object(he.b)(Ke,et,bt),C.a("def.title","Definitions"))})}_getNoResultFoundMessage(Ke){return Ke&&Ke.word?C.a("noResultWord","No definition found for '{0}'",Ke.word):C.a("generic.noResults","No definition found")}_getAlternativeCommand(Ke){return Ke.getOption(50).alternativeDefinitionCommand}_getGoToPreference(Ke){return Ke.getOption(50).multipleDefinitions}}const ge=A.h&&!f.i?2048|70:70;le((Ie=class Ke extends ye{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Ke.id,label:C.a("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:O.a.and(_.a.hasDefinitionProvider,_.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:ge,weight:100},contextMenuOpts:{group:"navigation",order:1.1}});G.a.registerCommandAlias("editor.action.goToDeclaration",Ke.id)}},Ie.id="editor.action.revealDefinition",Ie)),le((Le=class Ke extends ye{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:Ke.id,label:C.a("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:O.a.and(_.a.hasDefinitionProvider,_.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:Object(N.c)(2048|41,ge),weight:100}});G.a.registerCommandAlias("editor.action.openDeclarationToTheSide",Ke.id)}},Le.id="editor.action.revealDefinitionAside",Le)),le((Te=class Ke extends ye{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Ke.id,label:C.a("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:O.a.and(_.a.hasDefinitionProvider,ie.b.notInPeekEditor,_.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:512|70,linux:{primary:2048|1024|68},weight:100},contextMenuOpts:{menuId:U.b.EditorContextPeek,group:"peek",order:2}});G.a.registerCommandAlias("editor.action.previewDeclaration",Ke.id)}},Te.id="editor.action.peekDefinition",Te));class Me extends Ce{_getLocationModel(Ke,et,bt){return xe(this,void 0,void 0,function*(){return new c.c(yield Object(he.a)(Ke,et,bt),C.a("decl.title","Declarations"))})}_getNoResultFoundMessage(Ke){return Ke&&Ke.word?C.a("decl.noResultWord","No declaration found for '{0}'",Ke.word):C.a("decl.generic.noResults","No declaration found")}_getAlternativeCommand(Ke){return Ke.getOption(50).alternativeDeclarationCommand}_getGoToPreference(Ke){return Ke.getOption(50).multipleDeclarations}}le((ze=class Ke extends Me{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Ke.id,label:C.a("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:O.a.and(_.a.hasDeclarationProvider,_.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage(et){return et&&et.word?C.a("decl.noResultWord","No declaration found for '{0}'",et.word):C.a("decl.generic.noResults","No declaration found")}},ze.id="editor.action.revealDeclaration",ze)),le(class extends Me{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:C.a("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:O.a.and(_.a.hasDeclarationProvider,ie.b.notInPeekEditor,_.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:U.b.EditorContextPeek,group:"peek",order:3}})}});class De extends Ce{_getLocationModel(Ke,et,bt){return xe(this,void 0,void 0,function*(){return new c.c(yield Object(he.e)(Ke,et,bt),C.a("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(Ke){return Ke&&Ke.word?C.a("goToTypeDefinition.noResultWord","No type definition found for '{0}'",Ke.word):C.a("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(Ke){return Ke.getOption(50).alternativeTypeDefinitionCommand}_getGoToPreference(Ke){return Ke.getOption(50).multipleTypeDefinitions}}le((ue=class Ke extends De{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Ke.ID,label:C.a("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:O.a.and(_.a.hasTypeDefinitionProvider,_.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}},ue.ID="editor.action.goToTypeDefinition",ue)),le((je=class Ke extends De{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Ke.ID,label:C.a("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:O.a.and(_.a.hasTypeDefinitionProvider,ie.b.notInPeekEditor,_.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:U.b.EditorContextPeek,group:"peek",order:4}})}},je.ID="editor.action.peekTypeDefinition",je));class we extends Ce{_getLocationModel(Ke,et,bt){return xe(this,void 0,void 0,function*(){return new c.c(yield Object(he.c)(Ke,et,bt),C.a("impl.title","Implementations"))})}_getNoResultFoundMessage(Ke){return Ke&&Ke.word?C.a("goToImplementation.noResultWord","No implementation found for '{0}'",Ke.word):C.a("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(Ke){return Ke.getOption(50).alternativeImplementationCommand}_getGoToPreference(Ke){return Ke.getOption(50).multipleImplementations}}le((Pe=class Ke extends we{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:Ke.ID,label:C.a("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:O.a.and(_.a.hasImplementationProvider,_.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:2048|70,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}},Pe.ID="editor.action.goToImplementation",Pe)),le((ve=class Ke extends we{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:Ke.ID,label:C.a("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:O.a.and(_.a.hasImplementationProvider,ie.b.notInPeekEditor,_.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:2048|1024|70,weight:100},contextMenuOpts:{menuId:U.b.EditorContextPeek,group:"peek",order:5}})}},ve.ID="editor.action.peekImplementation",ve));class Oe extends Ce{_getNoResultFoundMessage(Ke){return Ke?C.a("references.no","No references found for '{0}'",Ke.word):C.a("references.noGeneric","No references found")}_getAlternativeCommand(Ke){return Ke.getOption(50).alternativeReferenceCommand}_getGoToPreference(Ke){return Ke.getOption(50).multipleReferences}}le(class extends Oe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:C.a("goToReferences.label","Go to References"),alias:"Go to References",precondition:O.a.and(_.a.hasReferenceProvider,ie.b.notInPeekEditor,_.a.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:_.a.editorTextFocus,primary:1024|70,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}_getLocationModel(et,bt,Tt){return xe(this,void 0,void 0,function*(){return new c.c(yield Object(he.d)(et,bt,!0,Tt),C.a("ref.title","References"))})}}),le(class extends Oe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:C.a("references.action.label","Peek References"),alias:"Peek References",precondition:O.a.and(_.a.hasReferenceProvider,ie.b.notInPeekEditor,_.a.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:U.b.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(et,bt,Tt){return xe(this,void 0,void 0,function*(){return new c.c(yield Object(he.d)(et,bt,!1,Tt),C.a("ref.title","References"))})}});class nt extends Ce{constructor(Ke,et,bt){super(Ke,{id:"editor.action.goToLocation",label:C.a("label.generic","Go to Any Symbol"),alias:"Go to Any Symbol",precondition:O.a.and(ie.b.notInPeekEditor,_.a.isInWalkThroughSnippet.toNegated())});this._references=et,this._gotoMultipleBehaviour=bt}_getLocationModel(Ke,et,bt){return xe(this,void 0,void 0,function*(){return new c.c(this._references,C.a("generic.title","Locations"))})}_getNoResultFoundMessage(Ke){return Ke&&C.a("generic.noResult","No results for '{0}'",Ke.word)||""}_getGoToPreference(Ke){var et;return(et=this._gotoMultipleBehaviour)!==null&&et!==void 0?et:Ke.getOption(50).multipleReferences}_getAlternativeCommand(){return""}}G.a.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:I.a},{name:"position",description:"The position at which to start",constraint:S.a.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:(Ke,et,bt,Tt,$t,Xe,it)=>xe(void 0,void 0,void 0,function*(){Object(F.c)(I.a.isUri(et)),Object(F.c)(S.a.isIPosition(bt)),Object(F.c)(Array.isArray(Tt)),Object(F.c)(typeof $t=="undefined"||typeof $t=="string"),Object(F.c)(typeof it=="undefined"||typeof it=="boolean");const re=Ke.get(d.a),We=yield re.openCodeEditor({resource:et},re.getFocusedCodeEditor());if(Object(v.b)(We))return We.setPosition(bt),We.revealPositionInCenterIfOutsideViewport(bt,0),We.invokeWithinContext(tt=>{const Et=new class extends nt{_getNoResultFoundMessage(It){return Xe||super._getNoResultFoundMessage(It)}}({muteMessage:!Boolean(Xe),openInPeek:Boolean(it),openToSide:!1},Tt,$t);tt.get(Y.a).invokeFunction(Et.run.bind(Et),We)})})}),G.a.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:I.a},{name:"position",description:"The position at which to start",constraint:S.a.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:(Ke,et,bt,Tt,$t)=>xe(void 0,void 0,void 0,function*(){Ke.get(G.b).executeCommand("editor.action.goToLocations",et,bt,Tt,$t,void 0,!0)})}),G.a.registerCommand({id:"editor.action.findReferences",handler:(Ke,et,bt)=>{Object(F.c)(I.a.isUri(et)),Object(F.c)(S.a.isIPosition(bt));const Tt=Ke.get(d.a);return Tt.openCodeEditor({resource:et},Tt.getFocusedCodeEditor()).then($t=>{if(!Object(v.b)($t)||!$t.hasModel())return;const Xe=h.a.get($t);if(!Xe)return;const it=Object(x.h)(We=>Object(he.d)($t.getModel(),S.a.lift(bt),!1,We).then(tt=>new c.c(tt,C.a("ref.title","References")))),re=new r.a(bt.lineNumber,bt.column,bt.lineNumber,bt.column);return Promise.resolve(Xe.toggleWidget(re,it,!1))})}}),G.a.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations"),U.d.appendMenuItems([{id:U.b.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:C.a({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},group:"4_symbol_nav",order:2}},{id:U.b.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:C.a({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},group:"4_symbol_nav",order:3}},{id:U.b.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:C.a({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},group:"4_symbol_nav",order:3}},{id:U.b.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:C.a({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},group:"4_symbol_nav",order:4}},{id:U.b.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:C.a({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},group:"4_symbol_nav",order:5}}])},"8gvo":function(mt,M,t){},"8tI9":function(mt,M,t){},"8z58":function(mt,M,t){"use strict";t.r(M),t.d(M,"CancellationTokenSource",function(){return Fu}),t.d(M,"Emitter",function(){return Bu}),t.d(M,"KeyCode",function(){return Wu}),t.d(M,"KeyMod",function(){return Uu}),t.d(M,"Position",function(){return Hu}),t.d(M,"Range",function(){return Vu}),t.d(M,"Selection",function(){return zu}),t.d(M,"SelectionDirection",function(){return Ku}),t.d(M,"MarkerSeverity",function(){return Gu}),t.d(M,"MarkerTag",function(){return Xu}),t.d(M,"Uri",function(){return $u}),t.d(M,"Token",function(){return Yu}),t.d(M,"editor",function(){return Zu}),t.d(M,"languages",function(){return Qu});var f=t("/UlZ"),B=t("JQT/"),x=t("MI8n"),N=t("/kV6"),A=t("bY76"),F=t("cGHE"),I=t("aokT"),L=t("gCVg"),v=t("Tcc1"),m;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(m||(m={}));var d;(function(e){e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(d||(d={}));var D;(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"})(D||(D={}));var S;(function(e){e[e.Deprecated=1]="Deprecated"})(S||(S={}));var r;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(r||(r={}));var _;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(_||(_={}));var b;(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"})(b||(b={}));var h;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(h||(h={}));var c;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(c||(c={}));var p;(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"})(p||(p={}));var E;(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.unfoldOnClickAfterEndOfLine=41]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=42]="fontFamily",e[e.fontInfo=43]="fontInfo",e[e.fontLigatures=44]="fontLigatures",e[e.fontSize=45]="fontSize",e[e.fontWeight=46]="fontWeight",e[e.formatOnPaste=47]="formatOnPaste",e[e.formatOnType=48]="formatOnType",e[e.glyphMargin=49]="glyphMargin",e[e.gotoLocation=50]="gotoLocation",e[e.hideCursorInOverviewRuler=51]="hideCursorInOverviewRuler",e[e.hover=52]="hover",e[e.inDiffEditor=53]="inDiffEditor",e[e.inlineSuggest=54]="inlineSuggest",e[e.letterSpacing=55]="letterSpacing",e[e.lightbulb=56]="lightbulb",e[e.lineDecorationsWidth=57]="lineDecorationsWidth",e[e.lineHeight=58]="lineHeight",e[e.lineNumbers=59]="lineNumbers",e[e.lineNumbersMinChars=60]="lineNumbersMinChars",e[e.linkedEditing=61]="linkedEditing",e[e.links=62]="links",e[e.matchBrackets=63]="matchBrackets",e[e.minimap=64]="minimap",e[e.mouseStyle=65]="mouseStyle",e[e.mouseWheelScrollSensitivity=66]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=67]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=68]="multiCursorMergeOverlapping",e[e.multiCursorModifier=69]="multiCursorModifier",e[e.multiCursorPaste=70]="multiCursorPaste",e[e.occurrencesHighlight=71]="occurrencesHighlight",e[e.overviewRulerBorder=72]="overviewRulerBorder",e[e.overviewRulerLanes=73]="overviewRulerLanes",e[e.padding=74]="padding",e[e.parameterHints=75]="parameterHints",e[e.peekWidgetDefaultFocus=76]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=77]="definitionLinkOpensInPeek",e[e.quickSuggestions=78]="quickSuggestions",e[e.quickSuggestionsDelay=79]="quickSuggestionsDelay",e[e.readOnly=80]="readOnly",e[e.renameOnType=81]="renameOnType",e[e.renderControlCharacters=82]="renderControlCharacters",e[e.renderFinalNewline=83]="renderFinalNewline",e[e.renderLineHighlight=84]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=85]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=86]="renderValidationDecorations",e[e.renderWhitespace=87]="renderWhitespace",e[e.revealHorizontalRightPadding=88]="revealHorizontalRightPadding",e[e.roundedSelection=89]="roundedSelection",e[e.rulers=90]="rulers",e[e.scrollbar=91]="scrollbar",e[e.scrollBeyondLastColumn=92]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=93]="scrollBeyondLastLine",e[e.scrollPredominantAxis=94]="scrollPredominantAxis",e[e.selectionClipboard=95]="selectionClipboard",e[e.selectionHighlight=96]="selectionHighlight",e[e.selectOnLineNumbers=97]="selectOnLineNumbers",e[e.showFoldingControls=98]="showFoldingControls",e[e.showUnused=99]="showUnused",e[e.snippetSuggestions=100]="snippetSuggestions",e[e.smartSelect=101]="smartSelect",e[e.smoothScrolling=102]="smoothScrolling",e[e.stickyTabStops=103]="stickyTabStops",e[e.stopRenderingLineAfter=104]="stopRenderingLineAfter",e[e.suggest=105]="suggest",e[e.suggestFontSize=106]="suggestFontSize",e[e.suggestLineHeight=107]="suggestLineHeight",e[e.suggestOnTriggerCharacters=108]="suggestOnTriggerCharacters",e[e.suggestSelection=109]="suggestSelection",e[e.tabCompletion=110]="tabCompletion",e[e.tabIndex=111]="tabIndex",e[e.unusualLineTerminators=112]="unusualLineTerminators",e[e.useShadowDOM=113]="useShadowDOM",e[e.useTabStops=114]="useTabStops",e[e.wordSeparators=115]="wordSeparators",e[e.wordWrap=116]="wordWrap",e[e.wordWrapBreakAfterCharacters=117]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=118]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=119]="wordWrapColumn",e[e.wordWrapOverride1=120]="wordWrapOverride1",e[e.wordWrapOverride2=121]="wordWrapOverride2",e[e.wrappingIndent=122]="wrappingIndent",e[e.wrappingStrategy=123]="wrappingStrategy",e[e.showDeprecated=124]="showDeprecated",e[e.inlayHints=125]="inlayHints",e[e.editorClassName=126]="editorClassName",e[e.pixelRatio=127]="pixelRatio",e[e.tabFocusMode=128]="tabFocusMode",e[e.layoutInfo=129]="layoutInfo",e[e.wrappingInfo=130]="wrappingInfo"})(E||(E={}));var y;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(y||(y={}));var C;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(C||(C={}));var O;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(O||(O={}));var k;(function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(k||(k={}));var Y;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Y||(Y={}));var Q;(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"})(Q||(Q={}));var H;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(H||(H={}));var Z;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(Z||(Z={}));var oe;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(oe||(oe={}));var $;(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"})($||($={}));var te;(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"})(te||(te={}));var ne;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(ne||(ne={}));var Ee;(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"})(Ee||(Ee={}));var fe;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(fe||(fe={}));var ee;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(ee||(ee={}));var ie;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(ie||(ie={}));var U;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(U||(U={}));var G;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(G||(G={}));var J;(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"})(J||(J={}));var he;(function(e){e[e.Deprecated=1]="Deprecated"})(he||(he={}));var xe;(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"})(xe||(xe={}));var Ie;(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"})(Ie||(Ie={}));var Le;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(Le||(Le={}));var Te;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(Te||(Te={}));class ze{static chord(e,i){return Object(N.c)(e,i)}}ze.CtrlCmd=2048,ze.Shift=1024,ze.Alt=512,ze.WinCtrl=256;function ue(){return{editor:void 0,languages:void 0,CancellationTokenSource:B.b,Emitter:x.b,KeyCode:Q,KeyMod:ze,Position:F.a,Range:I.a,Selection:L.a,SelectionDirection:U,MarkerSeverity:H,MarkerTag:Z,Uri:A.a,Token:v.a}}var je=t("siPX"),Pe=t("Vxe3"),ve=t("EffR"),ce=t("24hK"),le=t("QDVR"),Ce=t("Q4rV"),ye=t("tYmi"),ge=t("gslv"),Me=t("nnTU"),De;(function(e){e[e.API=0]="API",e[e.USER=1]="USER"})(De||(De={}));var we=t("W9cx"),Oe=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},nt=function(e,i){return function(s,l){i(s,l,e)}},Ke=function(e,i,s,l){function j(W){return W instanceof s?W:new s(function(z){z(W)})}return new(s||(s=Promise))(function(W,z){function de(Ze){try{st(l.next(Ze))}catch(wt){z(wt)}}function Fe(Ze){try{st(l.throw(Ze))}catch(wt){z(wt)}}function st(Ze){Ze.done?W(Ze.value):j(Ze.value).then(de,Fe)}st((l=l.apply(e,i||[])).next())})};let et=class{constructor(i){this._commandService=i}open(i,s){return Ke(this,void 0,void 0,function*(){if(!Object(we.c)(i,ye.c.command))return!1;if(!(s==null?void 0:s.allowCommands))return!0;typeof i=="string"&&(i=A.a.parse(i));let l=[];try{l=Object(Ce.a)(decodeURIComponent(i.query))}catch(j){try{l=Object(Ce.a)(i.query)}catch(W){}}return Array.isArray(l)||(l=[l]),yield this._commandService.executeCommand(i.path,...l),!0})}};et=Oe([nt(0,Me.b)],et);let bt=class{constructor(i){this._editorService=i}open(i,s){return Ke(this,void 0,void 0,function*(){typeof i=="string"&&(i=A.a.parse(i));let l;const j=/^L?(\d+)(?:,(\d+))?/.exec(i.fragment);return j&&(l={startLineNumber:parseInt(j[1]),startColumn:j[2]?parseInt(j[2]):1},i=i.with({fragment:""})),i.scheme===ye.c.file&&(i=Object(ge.h)(i)),yield this._editorService.openCodeEditor({resource:i,options:Object.assign({selection:l,context:(s==null?void 0:s.fromUserGesture)?De.USER:De.API},s==null?void 0:s.editorOptions)},this._editorService.getFocusedCodeEditor(),s==null?void 0:s.openToSide),!0})}};bt=Oe([nt(0,Pe.a)],bt);let Tt=class{constructor(i,s){this._openers=new ce.a,this._validators=new ce.a,this._resolvers=new ce.a,this._resolvedUriTargets=new le.b(l=>l.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new ce.a,this._defaultExternalOpener={openExternal:l=>Ke(this,void 0,void 0,function*(){return Object(we.c)(l,ye.c.http)||Object(we.c)(l,ye.c.https)?ve.Z(l):window.location.href=l,!0})},this._openers.push({open:(l,j)=>Ke(this,void 0,void 0,function*(){return(j==null?void 0:j.openExternal)||Object(we.c)(l,ye.c.mailto)||Object(we.c)(l,ye.c.http)||Object(we.c)(l,ye.c.https)?(yield this._doOpenExternal(l,j),!0):!1})}),this._openers.push(new et(s)),this._openers.push(new bt(i))}registerOpener(i){const s=this._openers.unshift(i);return{dispose:s}}registerValidator(i){const s=this._validators.push(i);return{dispose:s}}registerExternalUriResolver(i){const s=this._resolvers.push(i);return{dispose:s}}setDefaultExternalOpener(i){this._defaultExternalOpener=i}registerExternalOpener(i){const s=this._externalOpeners.push(i);return{dispose:s}}open(i,s){var l;return Ke(this,void 0,void 0,function*(){const j=typeof i=="string"?A.a.parse(i):i,W=(l=this._resolvedUriTargets.get(j))!==null&&l!==void 0?l:i;for(const z of this._validators)if(!(yield z.shouldOpen(W)))return!1;for(const z of this._openers){const de=yield z.open(i,s);if(de)return!0}return!1})}resolveExternalUri(i,s){return Ke(this,void 0,void 0,function*(){for(const l of this._resolvers)try{const j=yield l.resolveExternalUri(i,s);if(j)return this._resolvedUriTargets.has(j.resolved)||this._resolvedUriTargets.set(j.resolved,i),j}catch(j){}throw new Error("Could not resolve external URI: "+i.toString())})}_doOpenExternal(i,s){return Ke(this,void 0,void 0,function*(){const l=typeof i=="string"?A.a.parse(i):i;let j;try{j=(yield this.resolveExternalUri(l,s)).resolved}catch(z){j=l}let W;if(typeof i=="string"&&l.toString()===j.toString()?W=i:W=encodeURI(j.toString(!0)),s==null?void 0:s.allowContributedOpeners){const z=typeof(s==null?void 0:s.allowContributedOpeners)=="string"?s==null?void 0:s.allowContributedOpeners:void 0;for(const de of this._externalOpeners){const Fe=yield de.openExternal(W,{sourceUri:l,preferredOpenerId:z},B.a.None);if(Fe)return!0}}return this._defaultExternalOpener.openExternal(W,{sourceUri:l},B.a.None)})}dispose(){this._validators.clear()}};Tt=Oe([nt(0,Pe.a),nt(1,Me.b)],Tt);var $t=t("FWmy"),Xe=t("pmY6"),it=t("qj0h");const re={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class We extends Xe.a{constructor(e,i={}){super();this._onDidUpdate=this._register(new x.b),this._editor=e,this._options=it.f(i,re,!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(s=>{if(this.ignoreSelectionChange)return;this.nextIdx=-1})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(s=>{this.revealFirst=!0})),this._init()}_init(){let e=this._editor.getLineChanges();if(!e)return}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&(this._editor.getLineChanges()!==null&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1)))}_compute(e){this.ranges=[],e&&e.forEach(i=>{!this._options.ignoreCharChanges&&i.charChanges?i.charChanges.forEach(s=>{this.ranges.push({rhs:!0,range:new I.a(s.modifiedStartLineNumber,s.modifiedStartColumn,s.modifiedEndLineNumber,s.modifiedEndColumn)})}):i.modifiedEndLineNumber===0?this.ranges.push({rhs:!0,range:new I.a(i.modifiedStartLineNumber,1,i.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new I.a(i.modifiedStartLineNumber,1,i.modifiedEndLineNumber+1,1)})}),this.ranges.sort((i,s)=>I.a.compareRangesUsingStarts(i.range,s.range)),this._onDidUpdate.fire(this)}_initIdx(e){let i=!1,s=this._editor.getPosition();if(!s){this.nextIdx=0;return}for(let l=0,j=this.ranges.length;l<j&&!i;l++){let W=this.ranges[l].range;s.isBeforeOrEqual(W.getStartPosition())&&(this.nextIdx=l+(e?0:-1),i=!0)}i||(this.nextIdx=e?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(e,i){if($t.a(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;this.nextIdx===-1?this._initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let s=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let l=s.range.getStartPosition();this._editor.setPosition(l),this._editor.revealRangeInCenter(s.range,i)}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}}var tt=t("+3Gp"),Et=t("iuje"),It=t("M1Kb"),Rt=t("twdY"),vo=t("i/Ef"),Mo=t("pAvP"),xo=t("WBhO"),Do=t("t49l"),Lo=t("X+cX"),To=t("/cxE"),Ht=t("MNsG"),Mt=t("746U"),Ue=t("N0LK");const dt="$initialize";let Ut=!1;function Ye(e){if(!Ht.h)return;Ut||(Ut=!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 qe{constructor(e,i,s,l){this.vsWorker=e,this.req=i,this.method=s,this.args=l,this.type=0}}class ct{constructor(e,i,s,l){this.vsWorker=e,this.seq=i,this.res=s,this.err=l,this.type=1}}class _t{constructor(e,i,s,l){this.vsWorker=e,this.req=i,this.eventName=s,this.arg=l,this.type=2}}class Pt{constructor(e,i,s){this.vsWorker=e,this.req=i,this.event=s,this.type=3}}class Wt{constructor(e,i){this.vsWorker=e,this.req=i,this.type=4}}class Vt{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,i){const s=String(++this._lastSentReq);return new Promise((l,j)=>{this._pendingReplies[s]={resolve:l,reject:j},this._send(new qe(this._workerId,s,e,i))})}listen(e,i){let s=null;const l=new x.b({onFirstListenerAdd:()=>{s=String(++this._lastSentReq),this._pendingEmitters.set(s,l),this._send(new _t(this._workerId,s,e,i))},onLastListenerRemove:()=>{this._pendingEmitters.delete(s),this._send(new Wt(this._workerId,s)),s=null}});return l.event}handleMessage(e){if(!e||!e.vsWorker)return;if(this._workerId!==-1&&e.vsWorker!==this._workerId)return;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]){console.warn("Got reply to unknown seq");return}let i=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let s=e.err;e.err.$isError&&(s=new Error,s.name=e.err.name,s.message=e.err.message,s.stack=e.err.stack),i.reject(s);return}i.resolve(e.res)}_handleRequestMessage(e){let i=e.req,s=this._handler.handleMessage(e.method,e.args);s.then(l=>{this._send(new ct(this._workerId,i,l,void 0))},l=>{l.detail instanceof Error&&(l.detail=Object(To.h)(l.detail)),this._send(new ct(this._workerId,i,void 0,Object(To.h)(l)))})}_handleSubscribeEventMessage(e){const i=e.req,s=this._handler.handleEvent(e.eventName,e.arg)(l=>{this._send(new Pt(this._workerId,i,l))});this._pendingEvents.set(i,s)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){let i=[];if(e.type===0)for(let s=0;s<e.args.length;s++)e.args[s]instanceof ArrayBuffer&&i.push(e.args[s]);else e.type===1&&(e.res instanceof ArrayBuffer&&i.push(e.res));this._handler.sendMessage(e,i)}}class so extends Xe.a{constructor(e,i,s){super();let l=null;this._worker=this._register(e.create("vs/base/common/worker/simpleWorker",Fe=>{this._protocol.handleMessage(Fe)},Fe=>{l&&l(Fe)})),this._protocol=new Vt({sendMessage:(Fe,st)=>{this._worker.postMessage(Fe,st)},handleMessage:(Fe,st)=>{if(typeof s[Fe]!="function")return Promise.reject(new Error("Missing method "+Fe+" on main thread host."));try{return Promise.resolve(s[Fe].apply(s,st))}catch(Ze){return Promise.reject(Ze)}},handleEvent:(Fe,st)=>{if(No(Fe)){const Ze=s[Fe].call(s,st);if(typeof Ze!="function")throw new Error(`Missing dynamic event ${Fe} on main thread host.`);return Ze}if(wo(Fe)){const Ze=s[Fe];if(typeof Ze!="function")throw new Error(`Missing event ${Fe} on main thread host.`);return Ze}throw new Error(`Malformed event name ${Fe}`)}}),this._protocol.setWorkerId(this._worker.getId());let j=null;typeof Ht.b.require!="undefined"&&typeof Ht.b.require.getConfig=="function"?j=Ht.b.require.getConfig():typeof Ht.b.requirejs!="undefined"&&(j=Ht.b.requirejs.s.contexts._.config);const W=Mt.e(s);this._onModuleLoaded=this._protocol.sendMessage(dt,[this._worker.getId(),JSON.parse(JSON.stringify(j)),i,W]);const z=(Fe,st)=>this._request(Fe,st),de=(Fe,st)=>this._protocol.listen(Fe,st);this._lazyProxy=new Promise((Fe,st)=>{l=st,this._onModuleLoaded.then(Ze=>{Fe(di(Ze,z,de))},Ze=>{st(Ze),this._onError("Worker failed to load "+i,Ze)})})}getProxyObject(){return this._lazyProxy}_request(e,i){return new Promise((s,l)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(e,i).then(s,l)},l)})}_onError(e,i){console.error(e),console.info(i)}}function wo(e){return e[0]==="o"&&e[1]==="n"&&Ue.H(e.charCodeAt(2))}function No(e){return/^onDynamic/.test(e)&&Ue.H(e.charCodeAt(9))}function di(e,i,s){const l=z=>function(){const de=Array.prototype.slice.call(arguments,0);return i(z,de)},j=z=>function(de){return s(z,de)};let W={};for(const z of e){if(No(z)){W[z]=j(z);continue}if(wo(z)){W[z]=s(z,void 0);continue}W[z]=l(z)}return W}class _o{constructor(e,i){this._requestHandlerFactory=i,this._requestHandler=null,this._protocol=new Vt({sendMessage:(s,l)=>{e(s,l)},handleMessage:(s,l)=>this._handleMessage(s,l),handleEvent:(s,l)=>this._handleEvent(s,l)})}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,i){if(e===dt)return this.initialize(i[0],i[1],i[2],i[3]);if(!this._requestHandler||typeof this._requestHandler[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._requestHandler[e].apply(this._requestHandler,i))}catch(s){return Promise.reject(s)}}_handleEvent(e,i){if(!this._requestHandler)throw new Error("Missing requestHandler");if(No(e)){const s=this._requestHandler[e].call(this._requestHandler,i);if(typeof s!="function")throw new Error(`Missing dynamic event ${e} on request handler.`);return s}if(wo(e)){const s=this._requestHandler[e];if(typeof s!="function")throw new Error(`Missing event ${e} on request handler.`);return s}throw new Error(`Malformed event name ${e}`)}initialize(e,i,s,l){this._protocol.setWorkerId(e);const j=(de,Fe)=>this._protocol.sendMessage(de,Fe),W=(de,Fe)=>this._protocol.listen(de,Fe),z=di(l,j,W);return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(z),Promise.resolve(Mt.e(this._requestHandler))):(i&&(typeof i.baseUrl!="undefined"&&delete i.baseUrl,typeof i.paths!="undefined"&&(typeof i.paths.vs!="undefined"&&delete i.paths.vs),typeof i.trustedTypesPolicy!==void 0&&delete i.trustedTypesPolicy,i.catchError=!0,Ht.b.require.config(i)),new Promise((de,Fe)=>{const st=Ht.b.require;st([s],Ze=>{if(this._requestHandler=Ze.create(z),!this._requestHandler){Fe(new Error("No RequestHandler!"));return}de(Mt.e(this._requestHandler))},Fe)}))}}function no(e){return new _o(e,null)}var Lt;const xt=(Lt=window.trustedTypes)===null||Lt===void 0?void 0:Lt.createPolicy("defaultWorkerFactory",{createScriptURL:e=>e});function Nt(e,i){if(Ht.b.MonacoEnvironment){if(typeof Ht.b.MonacoEnvironment.getWorker=="function")return Ht.b.MonacoEnvironment.getWorker(e,i);if(typeof Ht.b.MonacoEnvironment.getWorkerUrl=="function"){const s=Ht.b.MonacoEnvironment.getWorkerUrl(e,i);return new Worker(xt?xt.createScriptURL(s):s,{name:i})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function rt(e){return typeof e.then=="function"}class lt{constructor(e,i,s,l,j){this.id=i;const W=Nt("workerMain.js",s);rt(W)?this.worker=W:this.worker=Promise.resolve(W),this.postMessage(e,[]),this.worker.then(z=>{z.onmessage=function(de){l(de.data)},z.onmessageerror=j,typeof z.addEventListener=="function"&&z.addEventListener("error",j)})}getId(){return this.id}postMessage(e,i){this.worker&&this.worker.then(s=>s.postMessage(e,i))}dispose(){this.worker&&this.worker.then(e=>e.terminate()),this.worker=null}}class pt{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,i,s){let l=++pt.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new lt(e,l,this._label||"anonymous"+l,i,j=>{Ye(j),this._webWorkerFailedBeforeError=j,s(j)})}}pt.LAST_WORKER_ID=0;var St=t("cMvZ"),Qt=t("Gw4z");const bo=3;function qt(e,i,s,l){const j=new Qt.a(e,i,s);return j.ComputeDiff(l)}class Eo{constructor(e){const i=[],s=[];for(let l=0,j=e.length;l<j;l++)i[l]=ri(e[l],1),s[l]=Zo(e[l],1);this.lines=e,this._startColumns=i,this._endColumns=s}getElements(){const e=[];for(let i=0,s=this.lines.length;i<s;i++)e[i]=this.lines[i].substring(this._startColumns[i]-1,this._endColumns[i]-1);return e}getStrictElement(e){return this.lines[e]}getStartLineNumber(e){return e+1}getEndLineNumber(e){return e+1}createCharSequence(e,i,s){const l=[],j=[],W=[];let z=0;for(let de=i;de<=s;de++){const Fe=this.lines[de],st=e?this._startColumns[de]:1,Ze=e?this._endColumns[de]:Fe.length+1;for(let wt=st;wt<Ze;wt++)l[z]=Fe.charCodeAt(wt-1),j[z]=de+1,W[z]=wt,z++}return new Ro(l,j,W)}}class Ro{constructor(e,i,s){this._charCodes=e,this._lineNumbers=i,this._columns=s}getElements(){return this._charCodes}getStartLineNumber(e){return this._lineNumbers[e]}getStartColumn(e){return this._columns[e]}getEndLineNumber(e){return this._lineNumbers[e]}getEndColumn(e){return this._columns[e]+1}}class zo{constructor(e,i,s,l,j,W,z,de){this.originalStartLineNumber=e,this.originalStartColumn=i,this.originalEndLineNumber=s,this.originalEndColumn=l,this.modifiedStartLineNumber=j,this.modifiedStartColumn=W,this.modifiedEndLineNumber=z,this.modifiedEndColumn=de}static createFromDiffChange(e,i,s){let l,j,W,z,de,Fe,st,Ze;return e.originalLength===0?(l=0,j=0,W=0,z=0):(l=i.getStartLineNumber(e.originalStart),j=i.getStartColumn(e.originalStart),W=i.getEndLineNumber(e.originalStart+e.originalLength-1),z=i.getEndColumn(e.originalStart+e.originalLength-1)),e.modifiedLength===0?(de=0,Fe=0,st=0,Ze=0):(de=s.getStartLineNumber(e.modifiedStart),Fe=s.getStartColumn(e.modifiedStart),st=s.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),Ze=s.getEndColumn(e.modifiedStart+e.modifiedLength-1)),new zo(l,j,W,z,de,Fe,st,Ze)}}function Bo(e){if(e.length<=1)return e;const i=[e[0]];let s=i[0];for(let l=1,j=e.length;l<j;l++){const W=e[l],z=W.originalStart-(s.originalStart+s.originalLength),de=W.modifiedStart-(s.modifiedStart+s.modifiedLength),Fe=Math.min(z,de);Fe<bo?(s.originalLength=W.originalStart+W.originalLength-s.originalStart,s.modifiedLength=W.modifiedStart+W.modifiedLength-s.modifiedStart):(i.push(W),s=W)}return i}class Jt{constructor(e,i,s,l,j){this.originalStartLineNumber=e,this.originalEndLineNumber=i,this.modifiedStartLineNumber=s,this.modifiedEndLineNumber=l,this.charChanges=j}static createFromDiffResult(e,i,s,l,j,W,z){let de,Fe,st,Ze,wt;if(i.originalLength===0?(de=s.getStartLineNumber(i.originalStart)-1,Fe=0):(de=s.getStartLineNumber(i.originalStart),Fe=s.getEndLineNumber(i.originalStart+i.originalLength-1)),i.modifiedLength===0?(st=l.getStartLineNumber(i.modifiedStart)-1,Ze=0):(st=l.getStartLineNumber(i.modifiedStart),Ze=l.getEndLineNumber(i.modifiedStart+i.modifiedLength-1)),W&&i.originalLength>0&&i.originalLength<20&&i.modifiedLength>0&&i.modifiedLength<20&&j()){const to=s.createCharSequence(e,i.originalStart,i.originalStart+i.originalLength-1),lo=l.createCharSequence(e,i.modifiedStart,i.modifiedStart+i.modifiedLength-1);let po=qt(to,lo,j,!0).changes;z&&(po=Bo(po)),wt=[];for(let Ho=0,Vo=po.length;Ho<Vo;Ho++)wt.push(zo.createFromDiffChange(po[Ho],to,lo))}return new Jt(de,Fe,st,Ze,wt)}}class fo{constructor(e,i,s){this.shouldComputeCharChanges=s.shouldComputeCharChanges,this.shouldPostProcessCharChanges=s.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=s.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=s.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=i,this.original=new Eo(e),this.modified=new Eo(i),this.continueLineDiff=ci(s.maxComputationTime),this.continueCharDiff=ci(s.maxComputationTime===0?0:Math.min(s.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const e=qt(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),i=e.changes,s=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const z=[];for(let de=0,Fe=i.length;de<Fe;de++)z.push(Jt.createFromDiffResult(this.shouldIgnoreTrimWhitespace,i[de],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:s,changes:z}}const l=[];let j=0,W=0;for(let z=-1,de=i.length;z<de;z++){const Fe=z+1<de?i[z+1]:null,st=Fe?Fe.originalStart:this.originalLines.length,Ze=Fe?Fe.modifiedStart:this.modifiedLines.length;for(;j<st&&W<Ze;){const wt=this.originalLines[j],to=this.modifiedLines[W];if(wt!==to){{let lo=ri(wt,1),po=ri(to,1);for(;lo>1&&po>1;){const Ho=wt.charCodeAt(lo-2),Vo=to.charCodeAt(po-2);if(Ho!==Vo)break;lo--,po--}(lo>1||po>1)&&this._pushTrimWhitespaceCharChange(l,j+1,1,lo,W+1,1,po)}{let lo=Zo(wt,1),po=Zo(to,1);const Ho=wt.length+1,Vo=to.length+1;for(;lo<Ho&&po<Vo;){const ii=wt.charCodeAt(lo-1),Jo=wt.charCodeAt(po-1);if(ii!==Jo)break;lo++,po++}(lo<Ho||po<Vo)&&this._pushTrimWhitespaceCharChange(l,j+1,lo,Ho,W+1,po,Vo)}}j++,W++}Fe&&(l.push(Jt.createFromDiffResult(this.shouldIgnoreTrimWhitespace,Fe,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),j+=Fe.originalLength,W+=Fe.modifiedLength)}return{quitEarly:s,changes:l}}_pushTrimWhitespaceCharChange(e,i,s,l,j,W,z){if(this._mergeTrimWhitespaceCharChange(e,i,s,l,j,W,z))return;let de;this.shouldComputeCharChanges&&(de=[new zo(i,s,i,l,j,W,j,z)]),e.push(new Jt(i,i,j,j,de))}_mergeTrimWhitespaceCharChange(e,i,s,l,j,W,z){const de=e.length;if(de===0)return!1;const Fe=e[de-1];return Fe.originalEndLineNumber===0||Fe.modifiedEndLineNumber===0?!1:Fe.originalEndLineNumber+1===i&&Fe.modifiedEndLineNumber+1===j?(Fe.originalEndLineNumber=i,Fe.modifiedEndLineNumber=j,this.shouldComputeCharChanges&&Fe.charChanges&&Fe.charChanges.push(new zo(i,s,i,l,j,W,j,z)),!0):!1}}function ri(e,i){const s=Ue.u(e);return s===-1?i:s+1}function Zo(e,i){const s=Ue.I(e);return s===-1?i:s+2}function ci(e){if(e===0)return()=>!0;const i=Date.now();return()=>Date.now()-i<e}var ki=t("LeU+");class wi{constructor(e,i,s,l){this._uri=e,this._lines=i,this._eol=s,this._versionId=l,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const i=e.changes;for(const s of i)this._acceptDeleteRange(s.range),this._acceptInsertText(new F.a(s.range.startLineNumber,s.range.startColumn),s.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,i=this._lines.length,s=new Uint32Array(i);for(let l=0;l<i;l++)s[l]=this._lines[l].length+e;this._lineStarts=new ki.a(s)}}_setLineText(e,i){this._lines[e]=i,this._lineStarts&&this._lineStarts.changeValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1));return}this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,i){if(i.length===0)return;let s=Object(Ue.Q)(i);if(s.length===1){this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+s[0]+this._lines[e.lineNumber-1].substring(e.column-1));return}s[s.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+s[0]);let l=new Uint32Array(s.length-1);for(let j=1;j<s.length;j++)this._lines.splice(e.lineNumber+j-1,0,s[j]),l[j-1]=s[j].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,l)}}var Zi=t("0JNc"),Vi=t("MXAL");class vi{constructor(e,i,s){const l=new Uint8Array(e*i);for(let j=0,W=e*i;j<W;j++)l[j]=s;this._data=l,this.rows=e,this.cols=i}get(e,i){return this._data[e*this.cols+i]}set(e,i,s){this._data[e*this.cols+i]=s}}class sn{constructor(e){let i=0,s=0;for(let j=0,W=e.length;j<W;j++){let[z,de,Fe]=e[j];de>i&&(i=de),z>s&&(s=z),Fe>s&&(s=Fe)}i++,s++;let l=new vi(s,i,0);for(let j=0,W=e.length;j<W;j++){let[z,de,Fe]=e[j];l.set(z,de,Fe)}this._states=l,this._maxCharCode=i}nextState(e,i){return i<0||i>=this._maxCharCode?0:this._states.get(e,i)}}let en=null;function on(){return en===null&&(en=new sn([[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]])),en}let cn=null;function Bi(){if(cn===null){cn=new Vi.a(0);const e=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let s=0;s<e.length;s++)cn.set(e.charCodeAt(s),1);const i=".,;";for(let s=0;s<i.length;s++)cn.set(i.charCodeAt(s),2)}return cn}class zi{static _createLink(e,i,s,l,j){let W=j-1;do{const z=i.charCodeAt(W),de=e.get(z);if(de!==2)break;W--}while(W>l);if(l>0){const z=i.charCodeAt(l-1),de=i.charCodeAt(W);(z===40&&de===41||z===91&&de===93||z===123&&de===125)&&W--}return{range:{startLineNumber:s,startColumn:l+1,endLineNumber:s,endColumn:W+2},url:i.substring(l,W+1)}}static computeLinks(e,i=on()){const s=Bi();let l=[];for(let j=1,W=e.getLineCount();j<=W;j++){const z=e.getLineContent(j),de=z.length;let Fe=0,st=0,Ze=0,wt=1,to=!1,lo=!1,po=!1,Ho=!1;for(;Fe<de;){let Vo=!1;const ii=z.charCodeAt(Fe);if(wt===13){let Jo;switch(ii){case 40:to=!0,Jo=0;break;case 41:Jo=to?0:1;break;case 91:po=!0,lo=!0,Jo=0;break;case 93:po=!1,Jo=lo?0:1;break;case 123:Ho=!0,Jo=0;break;case 125:Jo=Ho?0:1;break;case 39:Jo=Ze===34||Ze===96?0:1;break;case 34:Jo=Ze===39||Ze===96?0:1;break;case 96:Jo=Ze===39||Ze===34?0:1;break;case 42:Jo=Ze===42?1:0;break;case 124:Jo=Ze===124?1:0;break;case 32:Jo=po?0:1;break;default:Jo=s.get(ii)}Jo===1&&(l.push(zi._createLink(s,z,j,st,Fe)),Vo=!0)}else if(wt===12){let Jo;ii===91?(lo=!0,Jo=0):Jo=s.get(ii),Jo===1?Vo=!0:wt=13}else wt=i.nextState(wt,ii),wt===0&&(Vo=!0);Vo&&(wt=1,to=!1,lo=!1,Ho=!1,st=Fe+1,Ze=ii),Fe++}wt===13&&l.push(zi._createLink(s,z,j,st,de))}return l}}function Ji(e){return!e||typeof e.getLineCount!="function"||typeof e.getLineContent!="function"?[]:zi.computeLinks(e)}class ui{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,i,s,l,j){if(e&&i){let W=this.doNavigateValueSet(i,j);if(W)return{range:e,value:W}}if(s&&l){let W=this.doNavigateValueSet(l,j);if(W)return{range:s,value:W}}return null}doNavigateValueSet(e,i){let s=this.numberReplace(e,i);return s!==null?s:this.textReplace(e,i)}numberReplace(e,i){let s=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),l=Number(e),j=parseFloat(e);return!isNaN(l)&&!isNaN(j)&&l===j?l===0&&!i?null:(l=Math.floor(l*s),l+=i?s:-s,String(l/s)):null}textReplace(e,i){return this.valueSetsReplace(this._defaultValueSet,e,i)}valueSetsReplace(e,i,s){let l=null;for(let j=0,W=e.length;l===null&&j<W;j++)l=this.valueSetReplace(e[j],i,s);return l}valueSetReplace(e,i,s){let l=e.indexOf(i);return l>=0?(l+=s?1:-1,l<0?l=e.length-1:l%=e.length,e[l]):null}}ui.INSTANCE=new ui;var pn=t("5Y4S"),Hi=function(e,i,s,l){function j(W){return W instanceof s?W:new s(function(z){z(W)})}return new(s||(s=Promise))(function(W,z){function de(Ze){try{st(l.next(Ze))}catch(wt){z(wt)}}function Fe(Ze){try{st(l.throw(Ze))}catch(wt){z(wt)}}function st(Ze){Ze.done?W(Ze.value):j(Ze.value).then(de,Fe)}st((l=l.apply(e,i||[])).next())})};class Oi extends wi{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,i){let s=Object(Zi.d)(e.column,Object(Zi.c)(i),this._lines[e.lineNumber-1],0);return s?new I.a(e.lineNumber,s.startColumn,e.lineNumber,s.endColumn):null}words(e){const i=this._lines,s=this._wordenize.bind(this);let l=0,j="",W=0,z=[];return{*[Symbol.iterator](){for(;;)if(W<z.length){const de=j.substring(z[W].start,z[W].end);W+=1,yield de}else if(l<i.length)j=i[l],z=s(j,e),W=0,l+=1;else break}}}getLineWords(e,i){let s=this._lines[e-1],l=this._wordenize(s,i),j=[];for(const W of l)j.push({word:s.substring(W.start,W.end),startColumn:W.start+1,endColumn:W.end+1});return j}_wordenize(e,i){const s=[];let l;for(i.lastIndex=0;(l=i.exec(e))&&!(l[0].length===0);)s.push({start:l.index,end:l.index+l[0].length});return s}getValueInRange(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);let i=this._eol,s=e.startLineNumber-1,l=e.endLineNumber-1,j=[];j.push(this._lines[s].substring(e.startColumn-1));for(let W=s+1;W<l;W++)j.push(this._lines[W]);return j.push(this._lines[l].substring(0,e.endColumn-1)),j.join(i)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();let i=this._lineStarts.getIndexOf(e),s=this._lines[i.index].length;return{lineNumber:1+i.index,column:1+Math.min(i.remainder,s)}}_validateRange(e){const i=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),s=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return i.lineNumber!==e.startLineNumber||i.column!==e.startColumn||s.lineNumber!==e.endLineNumber||s.column!==e.endColumn?{startLineNumber:i.lineNumber,startColumn:i.column,endLineNumber:s.lineNumber,endColumn:s.column}:e}_validatePosition(e){if(!F.a.isIPosition(e))throw new Error("bad position");let{lineNumber:i,column:s}=e,l=!1;if(i<1)i=1,s=1,l=!0;else if(i>this._lines.length)i=this._lines.length,s=this._lines[i-1].length+1,l=!0;else{let j=this._lines[i-1].length+1;s<1?(s=1,l=!0):s>j&&(s=j,l=!0)}return l?{lineNumber:i,column:s}:e}}class Ii{constructor(e,i){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=i,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach(i=>e.push(this._models[i])),e}acceptNewModel(e){this._models[e.url]=new Oi(A.a.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,i){if(!this._models[e])return;let s=this._models[e];s.onEvents(i)}acceptRemovedModel(e){if(!this._models[e])return;delete this._models[e]}computeDiff(e,i,s,l){return Hi(this,void 0,void 0,function*(){const j=this._getModel(e),W=this._getModel(i);if(!j||!W)return null;const z=j.getLinesContent(),de=W.getLinesContent(),Fe=new fo(z,de,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:s,shouldMakePrettyDiff:!0,maxComputationTime:l}),st=Fe.computeDiff(),Ze=st.changes.length>0?!1:this._modelsAreIdentical(j,W);return{quitEarly:st.quitEarly,identical:Ze,changes:st.changes}})}_modelsAreIdentical(e,i){const s=e.getLineCount(),l=i.getLineCount();if(s!==l)return!1;for(let j=1;j<=s;j++){const W=e.getLineContent(j),z=i.getLineContent(j);if(W!==z)return!1}return!0}computeMoreMinimalEdits(e,i){return Hi(this,void 0,void 0,function*(){const s=this._getModel(e);if(!s)return i;const l=[];let j;i=i.slice(0).sort((W,z)=>{if(W.range&&z.range)return I.a.compareRangesUsingStarts(W.range,z.range);let de=W.range?0:1,Fe=z.range?0:1;return de-Fe});for(let{range:W,text:z,eol:de}of i){if(typeof de=="number"&&(j=de),I.a.isEmpty(W)&&!z)continue;const Fe=s.getValueInRange(W);if(z=z.replace(/\r\n|\n|\r/g,s.eol),Fe===z)continue;if(Math.max(z.length,Fe.length)>Ii._diffLimit){l.push({range:W,text:z});continue}const st=Object(Qt.b)(Fe,z,!1),Ze=s.offsetAt(I.a.lift(W).getStartPosition());for(const wt of st){const to=s.positionAt(Ze+wt.originalStart),lo=s.positionAt(Ze+wt.originalStart+wt.originalLength),po={text:z.substr(wt.modifiedStart,wt.modifiedLength),range:{startLineNumber:to.lineNumber,startColumn:to.column,endLineNumber:lo.lineNumber,endColumn:lo.column}};s.getValueInRange(po.range)!==po.text&&l.push(po)}}return typeof j=="number"&&l.push({eol:j,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),l})}computeLinks(e){return Hi(this,void 0,void 0,function*(){let i=this._getModel(e);return i?Ji(i):null})}textualSuggest(e,i,s,l){return Hi(this,void 0,void 0,function*(){const j=new pn.a(!0),W=new RegExp(s,l),z=new Set;e:for(let de of e){const Fe=this._getModel(de);if(!Fe)continue;for(let st of Fe.words(W)){if(st===i||!isNaN(Number(st)))continue;if(z.add(st),z.size>Ii._suggestionsLimit)break e}}return{words:Array.from(z),duration:j.elapsed()}})}computeWordRanges(e,i,s,l){return Hi(this,void 0,void 0,function*(){let j=this._getModel(e);if(!j)return Object.create(null);const W=new RegExp(s,l),z=Object.create(null);for(let de=i.startLineNumber;de<i.endLineNumber;de++){let Fe=j.getLineWords(de,W);for(const st of Fe){if(!isNaN(Number(st.word)))continue;let Ze=z[st.word];Ze||(Ze=[],z[st.word]=Ze),Ze.push({startLineNumber:de,startColumn:st.startColumn,endLineNumber:de,endColumn:st.endColumn})}}return z})}navigateValueSet(e,i,s,l,j){return Hi(this,void 0,void 0,function*(){let W=this._getModel(e);if(!W)return null;let z=new RegExp(l,j);i.startColumn===i.endColumn&&(i={startLineNumber:i.startLineNumber,startColumn:i.startColumn,endLineNumber:i.endLineNumber,endColumn:i.endColumn+1});let de=W.getValueInRange(i),Fe=W.getWordAtPosition({lineNumber:i.startLineNumber,column:i.startColumn},z);if(!Fe)return null;let st=W.getValueInRange(Fe),Ze=ui.INSTANCE.navigateValueSet(i,de,Fe,st,s);return Ze})}loadForeignModule(e,i,s){const l=(z,de)=>this._host.fhr(z,de),j=Mt.d(s,l);let W={host:j,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(W,i),Promise.resolve(Mt.e(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,i){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,i))}catch(s){return Promise.reject(s)}}}Ii._diffLimit=1e5,Ii._suggestionsLimit=1e4;function Qi(e){return new Ii(e,null)}typeof importScripts=="function"&&(Ht.b.monaco=ue());var Li=t("G2kB"),Ui=t("e0rL"),fi=t("6OMU"),$i=t("09fa"),rn=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},_i=function(e,i){return function(s,l){i(s,l,e)}},Pi=function(e,i,s,l){function j(W){return W instanceof s?W:new s(function(z){z(W)})}return new(s||(s=Promise))(function(W,z){function de(Ze){try{st(l.next(Ze))}catch(wt){z(wt)}}function Fe(Ze){try{st(l.throw(Ze))}catch(wt){z(wt)}}function st(Ze){Ze.done?W(Ze.value):j(Ze.value).then(de,Fe)}st((l=l.apply(e,i||[])).next())})};const ht=60*1e3,Ve=5*60*1e3;function K(e,i){let s=e.getModel(i);return s?!s.isTooLargeForSyncing():!1}let be=class extends Xe.a{constructor(i,s,l){super();this._modelService=i,this._workerManager=this._register(new Be(this._modelService)),this._logService=l,this._register(Rt.u.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(j,W)=>K(this._modelService,j.uri)?this._workerManager.withWorker().then(z=>z.computeLinks(j.uri)).then(z=>z&&{links:z}):Promise.resolve({links:[]})})),this._register(Rt.d.register("*",new Re(this._workerManager,s,this._modelService)))}dispose(){super.dispose()}computeDiff(i,s,l,j){return this._workerManager.withWorker().then(W=>W.computeDiff(i,s,l,j))}computeMoreMinimalEdits(i,s){if(Object(fi.n)(s)){if(!K(this._modelService,i))return Promise.resolve(s);const l=pn.a.create(!0),j=this._workerManager.withWorker().then(W=>W.computeMoreMinimalEdits(i,s));return j.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",i.toString(!0),l.elapsed())),Promise.race([j,Object(Lo.n)(1e3).then(()=>s)])}else return Promise.resolve(void 0)}canNavigateValueSet(i){return K(this._modelService,i)}navigateValueSet(i,s,l){return this._workerManager.withWorker().then(j=>j.navigateValueSet(i,s,l))}canComputeWordRanges(i){return K(this._modelService,i)}computeWordRanges(i,s){return this._workerManager.withWorker().then(l=>l.computeWordRanges(i,s))}};be=rn([_i(0,Li.a),_i(1,Ui.a),_i(2,$i.b)],be);class Re{constructor(e,i,s){this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=i,this._modelService=s}provideCompletionItems(e,i){return Pi(this,void 0,void 0,function*(){const s=this._configurationService.getValue(e.uri,i,"editor");if(!s.wordBasedSuggestions)return;const l=[];if(s.wordBasedSuggestionsMode==="currentDocument")K(this._modelService,e.uri)&&l.push(e.uri);else for(const Ze of this._modelService.getModels()){if(!K(this._modelService,Ze.uri))continue;Ze===e?l.unshift(Ze.uri):(s.wordBasedSuggestionsMode==="allDocuments"||Ze.getLanguageId()===e.getLanguageId())&&l.push(Ze.uri)}if(l.length===0)return;const j=St.b.getWordDefinition(e.getLanguageId()),W=e.getWordAtPosition(i),z=W?new I.a(i.lineNumber,W.startColumn,i.lineNumber,W.endColumn):I.a.fromPositions(i),de=z.setEndPosition(i.lineNumber,i.column),Fe=yield this._workerManager.withWorker(),st=yield Fe.textualSuggest(l,W==null?void 0:W.word,j);return st?{duration:st.duration,suggestions:st.words.map(Ze=>({kind:18,label:Ze,insertText:Ze,range:{insert:de,replace:z}}))}:void 0})}}class Be extends Xe.a{constructor(e){super();this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime();let i=this._register(new Lo.c);i.cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(Ve/2)),this._register(this._modelService.onModelRemoved(s=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;let e=this._modelService.getModels();e.length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;let e=new Date().getTime()-this._lastWorkerUsedTime;e>Ve&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new Bt(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)}}class at extends Xe.a{constructor(e,i,s){super();if(this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=i,!s){let l=new Lo.c;l.cancelAndSet(()=>this._checkStopModelSync(),Math.round(ht/2)),this._register(l)}}dispose(){for(let e in this._syncedModels)Object(Xe.f)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,i){for(const s of e){let l=s.toString();this._syncedModels[l]||this._beginModelSync(s,i),this._syncedModels[l]&&(this._syncedModelsLastUsedTime[l]=new Date().getTime())}}_checkStopModelSync(){let e=new Date().getTime(),i=[];for(let s in this._syncedModelsLastUsedTime){let l=e-this._syncedModelsLastUsedTime[s];l>ht&&i.push(s)}for(const s of i)this._stopModelSync(s)}_beginModelSync(e,i){let s=this._modelService.getModel(e);if(!s)return;if(!i&&s.isTooLargeForSyncing())return;let l=e.toString();this._proxy.acceptNewModel({url:s.uri.toString(),lines:s.getLinesContent(),EOL:s.getEOL(),versionId:s.getVersionId()});const j=new Xe.b;j.add(s.onDidChangeContent(W=>{this._proxy.acceptModelChanged(l.toString(),W)})),j.add(s.onWillDispose(()=>{this._stopModelSync(l)})),j.add(Object(Xe.i)(()=>{this._proxy.acceptRemovedModel(l)})),this._syncedModels[l]=j}_stopModelSync(e){let i=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],Object(Xe.f)(i)}}class vt{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class Gt{constructor(e){this._workerClient=e}fhr(e,i){return this._workerClient.fhr(e,i)}}class Bt extends Xe.a{constructor(e,i,s){super();this._disposed=!1,this._modelService=e,this._keepIdleModels=i,this._workerFactory=new pt(s),this._worker=null,this._modelManager=null}fhr(e,i){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new so(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new Gt(this)))}catch(e){Ye(e),this._worker=new vt(new Ii(new Gt(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>(Ye(e),this._worker=new vt(new Ii(new Gt(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new at(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,i=!1){return Pi(this,void 0,void 0,function*(){return this._disposed?Promise.reject(Object(To.b)()):this._getProxy().then(s=>(this._getOrCreateModelManager(s).ensureSyncedResources(e,i),s))})}computeDiff(e,i,s,l){return this._withSyncedResources([e,i],!0).then(j=>j.computeDiff(e.toString(),i.toString(),s,l))}computeMoreMinimalEdits(e,i){return this._withSyncedResources([e]).then(s=>s.computeMoreMinimalEdits(e.toString(),i))}computeLinks(e){return this._withSyncedResources([e]).then(i=>i.computeLinks(e.toString()))}textualSuggest(e,i,s){return Pi(this,void 0,void 0,function*(){const l=yield this._withSyncedResources(e),j=s.source,W=Object(Ue.M)(s);return l.textualSuggest(e.map(z=>z.toString()),i,j,W)})}computeWordRanges(e,i){return this._withSyncedResources([e]).then(s=>{let l=this._modelService.getModel(e);if(!l)return Promise.resolve(null);let j=St.b.getWordDefinition(l.getLanguageId()),W=j.source,z=Object(Ue.M)(j);return s.computeWordRanges(e.toString(),i,W,z)})}navigateValueSet(e,i,s){return this._withSyncedResources([e]).then(l=>{let j=this._modelService.getModel(e);if(!j)return null;let W=St.b.getWordDefinition(j.getLanguageId()),z=W.source,de=Object(Ue.M)(W);return l.navigateValueSet(e.toString(),i,s,z,de)})}dispose(){super.dispose(),this._disposed=!0}}function zt(e,i){return new ro(e,i)}class ro extends Bt{constructor(e,i){super(e,i.keepIdleModels||!1,i.label);this._foreignModuleId=i.moduleId,this._foreignModuleCreateData=i.createData||null,this._foreignModuleHost=i.host||null,this._foreignProxy=null}fhr(e,i){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!="function")return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,i))}catch(s){return Promise.reject(s)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{const i=this._foreignModuleHost?Mt.e(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,i).then(s=>{this._foreignModuleCreateData=null;const l=(z,de)=>e.fmr(z,de),j=(z,de)=>function(){const Fe=Array.prototype.slice.call(arguments,0);return de(z,Fe)};let W={};for(const z of s)W[z]=j(z,l);return W})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(i=>this.getProxy())}}var P=t("4bUh"),q=t("baJR"),Ae=t("qNAo");function Ge(e){return Array.isArray(e)}function ft(e){return!Ge(e)}function Dt(e){return typeof e=="string"}function jt(e){return!Dt(e)}function Xt(e){return!e}function uo(e,i){return e.ignoreCase&&i?i.toLowerCase():i}function io(e){return e.replace(/[&<>'"_]/g,"-")}function ho(e,i){console.log(`${e.languageId}: ${i}`)}function mo(e,i){return new Error(`${e.languageId}: ${i}`)}function Io(e,i,s,l,j){const W=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let z=null;return i.replace(W,function(de,Fe,st,Ze,wt,to,lo,po,Ho){return Xt(st)?Xt(Ze)?!Xt(wt)&&wt<l.length?uo(e,l[wt]):!Xt(lo)&&e&&typeof e[lo]=="string"?e[lo]:(z===null&&(z=j.split("."),z.unshift(j)),!Xt(to)&&to<z.length?uo(e,z[to]):""):uo(e,s):"$"})}function Ao(e,i){let s=i;for(;s&&s.length>0;){const l=e.tokenizer[s];if(l)return l;const j=s.lastIndexOf(".");j<0?s=null:s=s.substr(0,j)}return null}function Oo(e,i){let s=i;for(;s&&s.length>0;){const l=e.stateNames[s];if(l)return!0;const j=s.lastIndexOf(".");j<0?s=null:s=s.substr(0,j)}return!1}const Wo=5;class si{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,i){return this._INSTANCE.create(e,i)}create(e,i){if(e!==null&&e.depth>=this._maxCacheDepth)return new hi(e,i);let s=hi.getStackElementId(e);s.length>0&&(s+="|"),s+=i;let l=this._entries[s];return l||(l=new hi(e,i),this._entries[s]=l,l)}}si._INSTANCE=new si(Wo);class hi{constructor(e,i){this.parent=e,this.state=i,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let i="";for(;e!==null;)i.length>0&&(i+="|"),i+=e.state,e=e.parent;return i}static _equals(e,i){for(;e!==null&&i!==null;){if(e===i)return!0;if(e.state!==i.state)return!1;e=e.parent,i=i.parent}return e===null&&i===null}equals(e){return hi._equals(this,e)}push(e){return si.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return si.create(this.parent,e)}}class Uo{constructor(e,i){this.languageId=e,this.state=i}equals(e){return this.languageId===e.languageId&&this.state.equals(e.state)}clone(){let e=this.state.clone();return e===this.state?this:new Uo(this.languageId,this.state)}}class mi{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,i){return this._INSTANCE.create(e,i)}create(e,i){if(i!==null)return new Ri(e,i);if(e!==null&&e.depth>=this._maxCacheDepth)return new Ri(e,i);let s=hi.getStackElementId(e),l=this._entries[s];return l||(l=new Ri(e,null),this._entries[s]=l,l)}}mi._INSTANCE=new mi(Wo);class Ri{constructor(e,i){this.stack=e,this.embeddedModeData=i}clone(){let e=this.embeddedModeData?this.embeddedModeData.clone():null;return e===this.embeddedModeData?this:mi.create(this.stack,this.embeddedModeData)}equals(e){return e instanceof Ri&&this.stack.equals(e.stack)?this.embeddedModeData===null&&e.embeddedModeData===null?!0:this.embeddedModeData===null||e.embeddedModeData===null?!1:this.embeddedModeData.equals(e.embeddedModeData):!1}}class Di{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterMode(e,i){this._languageId=i}emit(e,i){if(this._lastTokenType===i&&this._lastTokenLanguage===this._languageId)return;this._lastTokenType=i,this._lastTokenLanguage=this._languageId,this._tokens.push(new v.a(e,i,this._languageId))}nestedModeTokenize(e,i,s,l){const j=s.languageId,W=s.state,z=Rt.E.get(j);if(!z)return this.enterMode(l,j),this.emit(l,""),W;let de=z.tokenize(e,i,W,l);return this._tokens=this._tokens.concat(de.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,de.endState}finalize(e){return new v.b(this._tokens,e)}}class pi{constructor(e,i){this._modeService=e,this._theme=i,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterMode(e,i){this._currentLanguageId=this._modeService.languageIdCodec.encodeLanguageId(i)}emit(e,i){let s=this._theme.match(this._currentLanguageId,i);if(this._lastTokenMetadata===s)return;this._lastTokenMetadata=s,this._tokens.push(e),this._tokens.push(s)}static _merge(e,i,s){let l=e!==null?e.length:0,j=i.length,W=s!==null?s.length:0;if(l===0&&j===0&&W===0)return new Uint32Array(0);if(l===0&&j===0)return s;if(j===0&&W===0)return e;let z=new Uint32Array(l+j+W);e!==null&&z.set(e);for(let de=0;de<j;de++)z[l+de]=i[de];return s!==null&&z.set(s,l+j),z}nestedModeTokenize(e,i,s,l){const j=s.languageId,W=s.state,z=Rt.E.get(j);if(!z)return this.enterMode(l,j),this.emit(l,""),W;let de=z.tokenize2(e,i,W,l);return this._prependTokens=pi._merge(this._prependTokens,this._tokens,de.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,de.endState}finalize(e){return new v.c(pi._merge(this._prependTokens,this._tokens,null),e)}}class Wi{constructor(e,i,s,l){this._modeService=e,this._standaloneThemeService=i,this._languageId=s,this._lexer=l,this._embeddedModes=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let j=!1;this._tokenizationRegistryListener=Rt.E.onDidChange(W=>{if(j)return;let z=!1;for(let de=0,Fe=W.changedLanguages.length;de<Fe;de++){let st=W.changedLanguages[de];if(this._embeddedModes[st]){z=!0;break}}z&&(j=!0,Rt.E.fire([this._languageId]),j=!1)})}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){let e=[];for(let i in this._embeddedModes){const s=Rt.E.get(i);if(s){if(s instanceof Wi){const j=s.getLoadStatus();j.loaded===!1&&e.push(j.promise)}continue}const l=Rt.E.getPromise(i);l&&e.push(l)}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(i=>{})}}getInitialState(){let e=si.create(null,this._lexer.start);return mi.create(e,null)}tokenize(e,i,s,l){let j=new Di,W=this._tokenize(e,i,s,l,j);return j.finalize(W)}tokenize2(e,i,s,l){let j=new pi(this._modeService,this._standaloneThemeService.getColorTheme().tokenTheme),W=this._tokenize(e,i,s,l,j);return j.finalize(W)}_tokenize(e,i,s,l,j){return s.embeddedModeData?this._nestedTokenize(e,i,s,l,j):this._myTokenize(e,i,s,l,j)}_findLeavingNestedModeOffset(e,i){let s=this._lexer.tokenizer[i.stack.state];if(!s&&(s=Ao(this._lexer,i.stack.state),!s))throw mo(this._lexer,"tokenizer state is not defined: "+i.stack.state);let l=-1,j=!1;for(const W of s){if(!jt(W.action)||W.action.nextEmbedded!=="@pop")continue;j=!0;let z=W.regex,de=W.regex.source;if(de.substr(0,4)==="^(?:"&&de.substr(de.length-1,1)===")"){let st=(z.ignoreCase?"i":"")+(z.unicode?"u":"");z=new RegExp(de.substr(4,de.length-5),st)}let Fe=e.search(z);if(Fe===-1||Fe!==0&&W.matchOnlyAtLineStart)continue;(l===-1||Fe<l)&&(l=Fe)}if(!j)throw mo(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+i.stack.state);return l}_nestedTokenize(e,i,s,l,j){let W=this._findLeavingNestedModeOffset(e,s);if(W===-1){let Fe=j.nestedModeTokenize(e,i,s.embeddedModeData,l);return mi.create(s.stack,new Uo(s.embeddedModeData.languageId,Fe))}let z=e.substring(0,W);z.length>0&&j.nestedModeTokenize(z,!1,s.embeddedModeData,l);let de=e.substring(W);return this._myTokenize(de,i,s,l+W,j)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,i,s,l,j){j.enterMode(l,this._languageId);const W=e.length,z=i&&this._lexer.includeLF?e+`
|
|
|
`:e,de=z.length;let Fe=s.embeddedModeData,st=s.stack,Ze=0,wt=null,to=!0;for(;to||Ze<de;){const lo=Ze,po=st.depth,Ho=wt?wt.groups.length:0,Vo=st.state;let ii=null,Jo=null,Go=null,Si=null,Ai=null;if(wt){ii=wt.matches;const Xo=wt.groups.shift();Jo=Xo.matched,Go=Xo.action,Si=wt.rule,wt.groups.length===0&&(wt=null)}else{if(!to&&Ze>=de)break;to=!1;let Xo=this._lexer.tokenizer[Vo];if(!Xo&&(Xo=Ao(this._lexer,Vo),!Xo))throw mo(this._lexer,"tokenizer state is not defined: "+Vo);let ei=z.substr(Ze);for(const Mi of Xo)if((Ze===0||!Mi.matchOnlyAtLineStart)&&(ii=ei.match(Mi.regex),ii)){Jo=ii[0],Go=Mi.action;break}}if(ii||(ii=[""],Jo=""),Go||(Ze<de&&(ii=[z.charAt(Ze)],Jo=ii[0]),Go=this._lexer.defaultToken),Jo===null)break;for(Ze+=Jo.length;ft(Go)&&jt(Go)&&Go.test;)Go=Go.test(Jo,ii,Vo,Ze===de);let ai=null;if(typeof Go=="string"||Array.isArray(Go))ai=Go;else if(Go.group)ai=Go.group;else if(Go.token!==null&&Go.token!==void 0){if(Go.tokenSubst?ai=Io(this._lexer,Go.token,Jo,ii,Vo):ai=Go.token,Go.nextEmbedded)if(Go.nextEmbedded==="@pop"){if(!Fe)throw mo(this._lexer,"cannot pop embedded mode if not inside one");Fe=null}else{if(Fe)throw mo(this._lexer,"cannot enter embedded mode from within an embedded mode");Ai=Io(this._lexer,Go.nextEmbedded,Jo,ii,Vo)}if(Go.goBack&&(Ze=Math.max(0,Ze-Go.goBack)),Go.switchTo&&typeof Go.switchTo=="string"){let Xo=Io(this._lexer,Go.switchTo,Jo,ii,Vo);if(Xo[0]==="@"&&(Xo=Xo.substr(1)),Ao(this._lexer,Xo))st=st.switchTo(Xo);else throw mo(this._lexer,"trying to switch to a state '"+Xo+"' that is undefined in rule: "+this._safeRuleName(Si))}else{if(Go.transform&&typeof Go.transform=="function")throw mo(this._lexer,"action.transform not supported");if(Go.next)if(Go.next==="@push"){if(st.depth>=this._lexer.maxStack)throw mo(this._lexer,"maximum tokenizer stack size reached: ["+st.state+","+st.parent.state+",...]");st=st.push(Vo)}else if(Go.next==="@pop"){if(st.depth<=1)throw mo(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(Si));st=st.pop()}else if(Go.next==="@popall")st=st.popall();else{let Xo=Io(this._lexer,Go.next,Jo,ii,Vo);if(Xo[0]==="@"&&(Xo=Xo.substr(1)),Ao(this._lexer,Xo))st=st.push(Xo);else throw mo(this._lexer,"trying to set a next state '"+Xo+"' that is undefined in rule: "+this._safeRuleName(Si))}}Go.log&&typeof Go.log=="string"&&ho(this._lexer,this._lexer.languageId+": "+Io(this._lexer,Go.log,Jo,ii,Vo))}if(ai===null)throw mo(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(Si));const Fo=Xo=>{let ei=this._modeService.getModeIdForLanguageName(Xo);ei&&(Xo=ei);const Mi=this._getNestedEmbeddedModeData(Xo);if(Ze<de){const qi=e.substr(Ze);return this._nestedTokenize(qi,i,mi.create(st,Mi),l+Ze,j)}else return mi.create(st,Mi)};if(Array.isArray(ai)){if(wt&&wt.groups.length>0)throw mo(this._lexer,"groups cannot be nested: "+this._safeRuleName(Si));if(ii.length!==ai.length+1)throw mo(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(Si));let Xo=0;for(let ei=1;ei<ii.length;ei++)Xo+=ii[ei].length;if(Xo!==Jo.length)throw mo(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(Si));wt={rule:Si,matches:ii,groups:[]};for(let ei=0;ei<ai.length;ei++)wt.groups[ei]={action:ai[ei],matched:ii[ei+1]};Ze-=Jo.length;continue}else{if(ai==="@rematch"&&(Ze-=Jo.length,Jo="",ii=null,ai="",Ai!==null))return Fo(Ai);if(Jo.length===0){if(de===0||po!==st.depth||Vo!==st.state||(wt?wt.groups.length:0)!==Ho)continue;throw mo(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(Si))}let Xo=null;if(Dt(ai)&&ai.indexOf("@brackets")===0){let ei=ai.substr("@brackets".length),Mi=fn(this._lexer,Jo);if(!Mi)throw mo(this._lexer,"@brackets token returned but no bracket defined as: "+Jo);Xo=io(Mi.token+ei)}else{let ei=ai===""?"":ai+this._lexer.tokenPostfix;Xo=io(ei)}lo<W&&j.emit(lo+l,Xo)}if(Ai!==null)return Fo(Ai)}return mi.create(st,Fe)}_getNestedEmbeddedModeData(e){let i=this._locateMode(e);if(i){let s=Rt.E.get(i);if(s)return new Uo(i,s.getInitialState())}return new Uo(i||vo.a,vo.b)}_locateMode(e){if(!e||!this._modeService.isRegisteredMode(e))return null;if(e===this._languageId)return e;const i=this._modeService.getModeId(e);return i&&(this._modeService.triggerMode(i),this._embeddedModes[i]=!0),i}}function fn(e,i){if(!i)return null;i=uo(e,i);let s=e.brackets;for(const l of s){if(l.open===i)return{token:l.token,bracketType:1};if(l.close===i)return{token:l.token,bracketType:-1}}return null}function In(e,i,s,l){return new Wi(e,i,s,l)}var an;const bn=(an=window.trustedTypes)===null||an===void 0?void 0:an.createPolicy("standaloneColorizer",{createHTML:e=>e});class Wn{static colorizeElement(e,i,s,l){l=l||{};let j=l.theme||"vs",W=l.mimeType||s.getAttribute("lang")||s.getAttribute("data-lang");if(!W)return console.error("Mode not detected"),Promise.resolve();e.setTheme(j);let z=s.firstChild?s.firstChild.nodeValue:"";s.className+=" "+j;let de=Fe=>{var st;const Ze=(st=bn==null?void 0:bn.createHTML(Fe))!==null&&st!==void 0?st:Fe;s.innerHTML=Ze};return this.colorize(i,z||"",W,l).then(de,Fe=>console.error(Fe))}static colorize(e,i,s,l){const j=e.languageIdCodec;let W=4;l&&typeof l.tabSize=="number"&&(W=l.tabSize),Ue.S(i)&&(i=i.substr(1));let z=Ue.Q(i),de=e.getModeId(s);if(!de)return Promise.resolve($n(z,W,j));e.triggerMode(de);const Fe=Rt.E.get(de);if(Fe)return gn(z,W,Fe,j);const st=Rt.E.getPromise(de);return st?new Promise((Ze,wt)=>{st.then(to=>{gn(z,W,to,j).then(Ze,wt)},wt)}):new Promise((Ze,wt)=>{let to=null,lo=null;const po=()=>{to&&(to.dispose(),to=null),lo&&(lo.dispose(),lo=null);const Ho=Rt.E.get(de);if(Ho){gn(z,W,Ho,j).then(Ze,wt);return}Ze($n(z,W,j))};lo=new Lo.g,lo.cancelAndSet(po,500),to=Rt.E.onDidChange(Ho=>{Ho.changedLanguages.indexOf(de)>=0&&po()})})}static colorizeLine(e,i,s,l,j=4){const W=Ae.g.isBasicASCII(e,i),z=Ae.g.containsRTL(e,W,s);let de=Object(q.e)(new q.c(!1,!0,e,!1,W,z,0,l,[],j,0,0,0,0,-1,"none",!1,!1,null));return de.html}static colorizeModelLine(e,i,s=4){let l=e.getLineContent(i);e.forceTokenization(i);let j=e.getLineTokens(i),W=j.inflate();return this.colorizeLine(l,e.mightContainNonBasicASCII(),e.mightContainRTL(),W,s)}}function gn(e,i,s,l){return new Promise((j,W)=>{const z=()=>{const de=Un(e,i,s,l);if(s instanceof Wi){const Fe=s.getLoadStatus();if(Fe.loaded===!1){Fe.promise.then(z,W);return}}j(de)};z()})}function $n(e,i,s){let l=[];const j=(0<<11|1<<14|2<<23)>>>0,W=new Uint32Array(2);W[0]=0,W[1]=j;for(let z=0,de=e.length;z<de;z++){let Fe=e[z];W[0]=Fe.length;const st=new P.a(W,Fe,s),Ze=Ae.g.isBasicASCII(Fe,!0),wt=Ae.g.containsRTL(Fe,Ze,!0);let to=Object(q.e)(new q.c(!1,!0,Fe,!1,Ze,wt,0,st,[],i,0,0,0,0,-1,"none",!1,!1,null));l=l.concat(to.html),l.push("<br/>")}return l.join("")}function Un(e,i,s,l){let j=[],W=s.getInitialState();for(let z=0,de=e.length;z<de;z++){let Fe=e[z],st=s.tokenize2(Fe,!0,W,0);P.a.convertToEndOffset(st.tokens,Fe.length);let Ze=new P.a(st.tokens,Fe,l);const wt=Ae.g.isBasicASCII(Fe,!0),to=Ae.g.containsRTL(Fe,wt,!0);let lo=Object(q.e)(new q.c(!1,!0,Fe,!1,wt,to,0,Ze.inflate(),[],i,0,0,0,0,-1,"none",!1,!1,null));j=j.concat(lo.html),j.push("<br/>"),W=st.endState}return j.join("")}var qo=t("uDWl"),oo=t("Szf2"),So=t("S3by"),Ne=t("sFUC"),ae=t("x/UI"),ke=t("iDAx"),Je=t("0/Sa"),g=t("+7oY"),u=t("CRAX");class w{constructor(e={},i=[],s=[]){this._contents=e,this._keys=i,this._overrides=s,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 this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?Object(g.d)(this.contents,e):this.contents}override(e){let i=this.overrideConfigurations.get(e);return i||(i=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,i)),i}merge(...e){const i=it.b(this.contents),s=it.b(this.overrides),l=[...this.keys];for(const j of e){this.mergeContents(i,j.contents);for(const W of j.overrides){const[z]=s.filter(de=>fi.g(de.identifiers,W.identifiers));z?this.mergeContents(z.contents,W.contents):s.push(it.b(W))}for(const W of j.keys)l.indexOf(W)===-1&&l.push(W)}return new w(i,l,s)}freeze(){return this.isFrozen=!0,this}createOverrideConfigurationModel(e){const i=this.getContentsForOverrideIdentifer(e);if(!i||typeof i!="object"||!Object.keys(i).length)return this;let s={};for(const l of fi.f([...Object.keys(this.contents),...Object.keys(i)])){let j=this.contents[l],W=i[l];W&&(typeof j=="object"&&typeof W=="object"?(j=it.b(j),this.mergeContents(j,W)):j=W),s[l]=j}return new w(s,this.keys,this.overrides)}mergeContents(e,i){for(const s of Object.keys(i)){if(s in e&&(Mt.k(e[s])&&Mt.k(i[s]))){this.mergeContents(e[s],i[s]);continue}e[s]=it.b(i[s])}}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?it.c(e):e}getContentsForOverrideIdentifer(e){for(const i of this.overrides)if(i.identifiers.indexOf(e)!==-1)return i.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,i){this.addKey(e),Object(g.b)(this.contents,e,i,s=>{throw new Error(s)})}removeValue(e){this.removeKey(e)&&Object(g.f)(this.contents,e)}addKey(e){let i=this.keys.length;for(let s=0;s<i;s++)e.indexOf(this.keys[s])===0&&(i=s);this.keys.splice(i,1,e)}removeKey(e){let i=this.keys.indexOf(e);return i!==-1?(this.keys.splice(i,1),!0):!1}}class V extends w{constructor(){const e=Object(g.e)(),i=Object(g.c)(),s=[];for(const l of Object.keys(e))u.b.test(l)&&s.push({identifiers:[Object(u.c)(l).trim()],keys:Object.keys(e[l]),contents:Object(g.g)(e[l],j=>console.error(`Conflict in default settings file: ${j}`))});super(e,i,s)}}class se{constructor(e,i,s=new w,l=new w,j=new le.b,W=new w,z=new le.b,de=!0){this._defaultConfiguration=e,this._localUserConfiguration=i,this._remoteUserConfiguration=s,this._workspaceConfiguration=l,this._folderConfigurations=j,this._memoryConfiguration=W,this._memoryConfigurationByResource=z,this._freeze=de,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new le.b,this._userConfiguration=null}getValue(e,i,s){const l=this.getConsolidateConfigurationModel(i,s);return l.getValue(e)}updateValue(e,i,s={}){let l;s.resource?(l=this._memoryConfigurationByResource.get(s.resource),l||(l=new w,this._memoryConfigurationByResource.set(s.resource,l))):l=this._memoryConfiguration,i===void 0?l.removeValue(e):l.setValue(e,i),s.resource||(this._workspaceConsolidatedConfiguration=null)}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}getConsolidateConfigurationModel(e,i){let s=this.getConsolidatedConfigurationModelForResource(e,i);return e.overrideIdentifier?s.override(e.overrideIdentifier):s}getConsolidatedConfigurationModelForResource({resource:e},i){let s=this.getWorkspaceConsolidatedConfiguration();if(i&&e){const l=i.getFolder(e);l&&(s=this.getFolderConsolidatedConfiguration(l.uri)||s);const j=this._memoryConfigurationByResource.get(e);j&&(s=s.merge(j))}return s}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 i=this._foldersConsolidatedConfigurations.get(e);if(!i){const s=this.getWorkspaceConsolidatedConfiguration(),l=this._folderConfigurations.get(e);l?(i=s.merge(l),this._freeze&&(i=i.freeze()),this._foldersConsolidatedConfigurations.set(e,i)):i=s}return i}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,i)=>{const{contents:s,overrides:l,keys:j}=this._folderConfigurations.get(i);return e.push([i,{contents:s,overrides:l,keys:j}]),e},[])}}static parse(e){const i=this.parseConfigurationModel(e.defaults),s=this.parseConfigurationModel(e.user),l=this.parseConfigurationModel(e.workspace),j=e.folders.reduce((W,z)=>(W.set(A.a.revive(z[0]),this.parseConfigurationModel(z[1])),W),new le.b);return new se(i,s,new w,l,j,new w,new le.b,!1)}static parseConfigurationModel(e){return new w(e.contents,e.keys,e.overrides).freeze()}}class pe{constructor(e,i,s,l){this.change=e,this.previous=i,this.currentConfiguraiton=s,this.currentWorkspace=l,this._previousConfiguration=void 0;const j=new Set;e.keys.forEach(z=>j.add(z)),e.overrides.forEach(([,z])=>z.forEach(de=>j.add(de))),this.affectedKeys=[...j.values()];const W=new w;this.affectedKeys.forEach(z=>W.setValue(z,{})),this.affectedKeysTree=W.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=se.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,i){var s;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(i){const l=this.previousConfiguration?this.previousConfiguration.getValue(e,i,(s=this.previous)===null||s===void 0?void 0:s.workspace):void 0,j=this.currentConfiguraiton.getValue(e,i,this.currentWorkspace);return!it.d(l,j)}return!0}return!1}doesAffectedKeysTreeContains(e,i){let s=Object(g.g)({[i]:!0},()=>{}),l;for(;typeof s=="object"&&(l=Object.keys(s)[0]);){if(e=e[l],!e)return!1;s=s[l]}return!0}}var Se=t("3/fG");const Qe=/^(cursor|delete)/;class ut extends Xe.a{constructor(e,i,s,l,j){super();this._contextKeyService=e,this._commandService=i,this._telemetryService=s,this._notificationService=l,this._logService=j,this._onDidUpdateKeybindings=this._register(new x.b),this._currentChord=null,this._currentChordChecker=new Lo.c,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=yt.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new Lo.g,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:x.c.None}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,i){const s=this._getResolver().lookupPrimaryKeybinding(e,i||this._contextKeyService);return s?s.resolvedKeybinding:void 0}dispatchEvent(e,i){return this._dispatch(e,i)}softDispatch(e,i){const s=this.resolveKeyboardEvent(e);if(s.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[l]=s.getDispatchParts();if(l===null)return null;const j=this._contextKeyService.getContext(i),W=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(j,W,l)}_enterChordMode(e,i){this._currentChord={keypress:e,label:i},this._currentChordStatusMessage=this._notificationService.status(Se.a("first.chord","({0}) was pressed. Waiting for second key of chord...",i));const s=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-s>5e3&&this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,i){return this._doDispatch(this.resolveKeyboardEvent(e),i,!1)}_singleModifierDispatch(e,i){const s=this.resolveKeyboardEvent(e),[l]=s.getSingleModifierDispatchParts();if(l)return this._ignoreSingleModifiers.has(l)?(this._log(`+ Ignoring single modifier ${l} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=yt.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=yt.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${l}.`),this._currentSingleModifier=l,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):l===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${l} ${l}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(s,i,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${l}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[j]=s.getParts();return this._ignoreSingleModifiers=new yt(j),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,i,s=!1){let l=!1;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let j=null,W=null;if(s){const[st]=e.getSingleModifierDispatchParts();j=st,W=st}else[j]=e.getDispatchParts(),W=this._currentChord?this._currentChord.keypress:null;if(j===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),l;const z=this._contextKeyService.getContext(i),de=e.getLabel(),Fe=this._getResolver().resolve(z,W,j);return this._logService.trace("KeybindingService#dispatch",de,Fe==null?void 0:Fe.commandId),Fe&&Fe.enterChord?(l=!0,this._enterChordMode(j,de),l):(this._currentChord&&((!Fe||!Fe.commandId)&&(this._notificationService.status(Se.a("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,de),{hideAfter:10*1e3}),l=!0)),this._leaveChordMode(),Fe&&Fe.commandId&&(Fe.bubble||(l=!0),typeof Fe.commandArgs=="undefined"?this._commandService.executeCommand(Fe.commandId).then(void 0,st=>this._notificationService.warn(st)):this._commandService.executeCommand(Fe.commandId,Fe.commandArgs).then(void 0,st=>this._notificationService.warn(st)),Qe.test(Fe.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:Fe.commandId,from:"keybinding"})),l)}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}}class yt{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}yt.EMPTY=new yt(null);var Ct=t("T8No");class At{constructor(e,i,s){this._log=s,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let l=0,j=e.length;l<j;l++){const W=e[l].command;W&&this._defaultBoundCommands.set(W,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=At.combine(e,i);for(let l=0,j=this._keybindings.length;l<j;l++){let W=this._keybindings[l];if(W.keypressParts.length===0)continue;if(W.when&&W.when.type===0)continue;this._addKeyPress(W.keypressParts[0],W)}}static _isTargetedForRemoval(e,i,s,l,j){if(e.command!==l)return!1;if(i&&e.keypressParts[0]!==i)return!1;if(s&&e.keypressParts[1]!==s)return!1;if(j){if(!e.when)return!1;if(!Object(Ct.e)(j,e.when))return!1}return!0}static combine(e,i){e=e.slice(0);let s=[];for(const l of i){if(!l.command||l.command.length===0||l.command.charAt(0)!=="-"){s.push(l);continue}const j=l.command.substr(1),W=l.keypressParts[0],z=l.keypressParts[1],de=l.when;for(let Fe=e.length-1;Fe>=0;Fe--)this._isTargetedForRemoval(e[Fe],W,z,j,de)&&e.splice(Fe,1)}return e.concat(s)}_addKeyPress(e,i){const s=this._map.get(e);if(typeof s=="undefined"){this._map.set(e,[i]),this._addToLookupMap(i);return}for(let l=s.length-1;l>=0;l--){let j=s[l];if(j.command===i.command)continue;const W=j.keypressParts.length>1,z=i.keypressParts.length>1;if(W&&z&&j.keypressParts[1]!==i.keypressParts[1])continue;At.whenIsEntirelyIncluded(j.when,i.when)&&this._removeFromLookupMap(j)}s.push(i),this._addToLookupMap(i)}_addToLookupMap(e){if(!e.command)return;let i=this._lookupMap.get(e.command);typeof i=="undefined"?(i=[e],this._lookupMap.set(e.command,i)):i.push(e)}_removeFromLookupMap(e){if(!e.command)return;let i=this._lookupMap.get(e.command);if(typeof i=="undefined")return;for(let s=0,l=i.length;s<l;s++)if(i[s]===e){i.splice(s,1);return}}static whenIsEntirelyIncluded(e,i){return!i||i.type===1?!0:!e||e.type===1?!1:Object(Ct.f)(e,i)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(e,i){const s=this._lookupMap.get(e);if(typeof s=="undefined"||s.length===0)return null;if(s.length===1)return s[0];for(let l=s.length-1;l>=0;l--){const j=s[l];if(i.contextMatchesRules(j.when))return j}return s[s.length-1]}resolve(e,i,s){this._log(`| Resolving ${s}${i?` chorded from ${i}`:""}`);let l=null;if(i!==null){const W=this._map.get(i);if(typeof W=="undefined")return this._log("\\ No keybinding entries."),null;l=[];for(let z=0,de=W.length;z<de;z++){let Fe=W[z];Fe.keypressParts[1]===s&&l.push(Fe)}}else{const W=this._map.get(s);if(typeof W=="undefined")return this._log("\\ No keybinding entries."),null;l=W}let j=this._findCommand(e,l);return j?i===null&&j.keypressParts.length>1&&j.keypressParts[1]!==null?(this._log(`\\ From ${l.length} keybinding entries, matched chord, when: ${Ft(j.when)}, source: ${Zt(j)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${l.length} keybinding entries, matched ${j.command}, when: ${Ft(j.when)}, source: ${Zt(j)}.`),{enterChord:!1,leaveChord:j.keypressParts.length>1,commandId:j.command,commandArgs:j.commandArgs,bubble:j.bubble}):(this._log(`\\ From ${l.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,i){for(let s=i.length-1;s>=0;s--){let l=i[s];if(!At.contextMatchesRules(e,l.when))continue;return l}return null}static contextMatchesRules(e,i){return i?i.evaluate(e):!0}}function Ft(e){return e?`${e.serialize()}`:"no when condition"}function Zt(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}var Yt=t("nrhi");class ao{constructor(e,i,s,l,j,W,z){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.keypressParts=e?Co(e.getDispatchParts()):[],e&&this.keypressParts.length===0&&(this.keypressParts=Co(e.getSingleModifierDispatchParts())),this.bubble=i?i.charCodeAt(0)===94:!1,this.command=this.bubble?i.substr(1):i,this.commandArgs=s,this.when=l,this.isDefault=j,this.extensionId=W,this.isBuiltinExtension=z}}function Co(e){let i=[];for(let s=0,l=e.length;s<l;s++){const j=e[s];if(!j)return i;i.push(j)}return i}var ko=t("i04g");class Qo extends oo.b{constructor(e,i){super();if(i.length===0)throw Object(To.c)("parts");this._os=e,this._parts=i}getLabel(){return ko.c.toLabel(this._os,this._parts,e=>this._getLabel(e))}getAriaLabel(){return ko.a.toLabel(this._os,this._parts,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:ko.b.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 oo.c(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 yi extends Qo{constructor(e,i){super(i,e.parts)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return N.d.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":N.d.toString(e.keyCode)}_getElectronAccelerator(e){return N.d.toElectronAccelerator(e.keyCode)}_getDispatchPart(e){return yi.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let i="";return e.ctrlKey&&(i+="ctrl+"),e.shiftKey&&(i+="shift+"),e.altKey&&(i+="alt+"),e.metaKey&&(i+="meta+"),i+=N.d.toString(e.keyCode),i}_getSingleModifierDispatchPart(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}static _scanCodeToKeyCode(e){const i=N.b[e];if(i!==-1)return i;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 oo.d)return e;const i=this._scanCodeToKeyCode(e.scanCode);return i===0?null:new oo.d(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,i)}static resolveUserBinding(e,i){const s=Co(e.map(l=>this._resolveSimpleUserBinding(l)));return s.length>0?[new yi(new oo.a(s),i)]:[]}}var Ko=t("sM1p"),li=t("EWX2"),Ki=t("A9l+"),xi=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},Ni=function(e,i){return function(s,l){i(s,l,e)}},Ti=function(e,i,s,l){function j(W){return W instanceof s?W:new s(function(z){z(W)})}return new(s||(s=Promise))(function(W,z){function de(Ze){try{st(l.next(Ze))}catch(wt){z(wt)}}function Fe(Ze){try{st(l.throw(Ze))}catch(wt){z(wt)}}function st(Ze){Ze.done?W(Ze.value):j(Ze.value).then(de,Fe)}st((l=l.apply(e,i||[])).next())})};class wn{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new x.b}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}function yn(e,i,s){return Object(Ne.b)(e)?i(e):s(e)}let En=class{constructor(i){this.modelService=i}setEditor(i){this.editor=i}createModelReference(i){let s=null;return this.editor&&(s=yn(this.editor,l=>this.findModel(l,i),l=>this.findModel(l.getOriginalEditor(),i)||this.findModel(l.getModifiedEditor(),i))),s?Promise.resolve(new Xe.c(new wn(s))):Promise.reject(new Error("Model not found"))}findModel(i,s){let l=this.modelService.getModel(s);return l&&l.uri.toString()!==s.toString()?null:l}};En=xi([Ni(0,Li.a)],En);class Mn{show(){return Mn.NULL_PROGRESS_RUNNER}showWhile(e,i){return Ti(this,void 0,void 0,function*(){yield e})}}Mn.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class Os{confirm(e){return this.doConfirm(e).then(i=>({confirmed:i,checkboxChecked:!1}))}doConfirm(e){let i=e.message;return e.detail&&(i=i+`
|
|
|
|
|
|
`+e.detail),Promise.resolve(window.confirm(i))}show(e,i,s,l){return Promise.resolve({choice:0})}}class Yn{info(e){return this.notify({severity:So.a.Info,message:e})}warn(e){return this.notify({severity:So.a.Warning,message:e})}error(e){return this.notify({severity:So.a.Error,message:e})}notify(e){switch(e.severity){case So.a.Error:console.error(e.message);break;case So.a.Warning:console.warn(e.message);break;default:console.log(e.message);break}return Yn.NO_OP}status(e,i){return Xe.a.None}}Yn.NO_OP=new Ko.b;class vs{constructor(e){this._onWillExecuteCommand=new x.b,this._onDidExecuteCommand=new x.b,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...i){const s=Me.a.getCommand(e);if(!s)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:i});const l=this._instantiationService.invokeFunction.apply(this._instantiationService,[s.handler,...i]);return this._onDidExecuteCommand.fire({commandId:e,args:i}),Promise.resolve(l)}catch(l){return Promise.reject(l)}}}class ns extends ut{constructor(e,i,s,l,j,W){super(e,i,s,l,j);this._cachedResolver=null,this._dynamicKeybindings=[],this._register(ve.i(W,ve.d.KEY_DOWN,z=>{const de=new qo.a(z),Fe=this._dispatch(de,de.target);Fe&&(de.preventDefault(),de.stopPropagation())})),this._register(ve.i(window,ve.d.KEY_UP,z=>{const de=new qo.a(z),Fe=this._singleModifierDispatch(de,de.target);Fe&&de.preventDefault()}))}addDynamicKeybinding(e,i,s,l){const j=Object(oo.e)(i,Ht.a),W=new Xe.b;return j&&(this._dynamicKeybindings.push({keybinding:j.parts,command:e,when:l,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),W.add(Object(Xe.i)(()=>{for(let z=0;z<this._dynamicKeybindings.length;z++){let de=this._dynamicKeybindings[z];if(de.command===e){this._dynamicKeybindings.splice(z,1),this.updateResolver({source:1});return}}}))),W.add(Me.a.registerCommand(e,s)),this.updateResolver({source:1}),W}updateResolver(e){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(e)}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(Yt.a.getDefaultKeybindings(),!0),i=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new At(e,i,s=>this._log(s))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,i){let s=[],l=0;for(const j of e){const W=j.when||void 0,z=j.keybinding;if(!z)s[l++]=new ao(void 0,j.command,j.commandArgs,W,i,null,!1);else{const de=yi.resolveUserBinding(z,Ht.a);for(const Fe of de)s[l++]=new ao(Fe,j.command,j.commandArgs,W,i,null,!1)}}return s}resolveKeyboardEvent(e){let i=new oo.d(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new yi(i,Ht.a)}}function pr(e){return e&&typeof e=="object"&&(!e.overrideIdentifier||typeof e.overrideIdentifier=="string")&&(!e.resource||e.resource instanceof A.a)}class br{constructor(){this._onDidChangeConfiguration=new x.b,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new se(new V,new w)}getValue(e,i){const s=typeof e=="string"?e:void 0,l=pr(e)?e:pr(i)?i:{};return this._configuration.getValue(s,l,void 0)}updateValues(e){const i={data:this._configuration.toData()};let s=[];for(const l of e){const[j,W]=l;if(this.getValue(j)===W)continue;this._configuration.updateValue(j,W),s.push(j)}if(s.length>0){const l=new pe({keys:s,overrides:[]},i,this._configuration);l.source=7,l.sourceConfig=null,this._onDidChangeConfiguration.fire(l)}return Promise.resolve()}}class zr{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new x.b,this.configurationService.onDidChangeConfiguration(i=>{this._onDidChangeConfiguration.fire({affectedKeys:i.affectedKeys,affectsConfiguration:(s,l)=>i.affectsConfiguration(l)})})}getValue(e,i,s){const l=F.a.isIPosition(i)?i:null,j=l?typeof s=="string"?s:void 0:typeof i=="string"?i:void 0;return typeof j=="undefined"?this.configurationService.getValue():this.configurationService.getValue(j)}}let Is=class{constructor(i){this.configurationService=i}getEOL(i,s){const l=this.configurationService.getValue("files.eol",{overrideIdentifier:s,resource:i});return l&&typeof l=="string"&&l!=="auto"?l:Ht.d||Ht.f?`
|
|
|
`:`\r
|
|
|
`}};Is=xi([Ni(0,g.a)],Is);class vr{publicLog(e,i){return Promise.resolve(void 0)}publicLog2(e,i){return this.publicLog(e,i)}}class As{constructor(){const e=A.a.from({scheme:As.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new li.b({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}}As.SCHEME="inmemory";function Cs(e,i,s){if(!i)return;if(!(e instanceof br))return;let l=[];Object.keys(i).forEach(j=>{Object(ke.d)(j)&&l.push([`editor.${j}`,i[j]]),s&&Object(ke.c)(j)&&l.push([`diffEditor.${j}`,i[j]])}),l.length>0&&e.updateValues(l)}class $a{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,i){return Ti(this,void 0,void 0,function*(){const s=new Map;for(let W of e){if(!(W instanceof ae.c))throw new Error("bad edit - only text edits are supported");const z=this._modelService.getModel(W.resource);if(!z)throw new Error("bad edit - model not found");if(typeof W.versionId=="number"&&z.getVersionId()!==W.versionId)throw new Error("bad state - model changed in the meantime");let de=s.get(z);de||(de=[],s.set(z,de)),de.push(Je.a.replaceMove(I.a.lift(W.textEdit.range),W.textEdit.text))}let l=0,j=0;for(const[W,z]of s)W.pushStackElement(),W.pushEditOperations([],z,()=>[]),W.pushStackElement(),j+=1,l+=z.length;return{ariaSummary:Ue.v(Ki.f.bulkEditServiceSummary,l,j)}})}}class er{getUriLabel(e,i){return e.scheme==="file"?e.fsPath:e.path}}class Kr{constructor(e,i){this._codeEditorService=e,this._container=i,this.onDidLayout=x.c.None}get dimension(){return this._dimension||(this._dimension=ve.z(window.document.body)),this._dimension}get container(){return this._container}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())===null||e===void 0||e.focus()}}var tr=t("OBOq"),or=t("nB0o"),Rs=t("lKfe"),ys=t("ZlPH"),Gr=t("cMOf"),Ns=t("HdwC"),Gi=t("vATl"),Ya=t("DTDp"),Es=t("WqXY"),Cr=t("GJhM"),An=t("8HAY"),Zn=t("sswD"),Hn=t("kYye"),ni=t("MD5Z"),nn=t("t9D7"),xn=t("Vhoy"),ss=t("v1vZ"),Xr=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},$r=function(e,i){return function(s,l){i(s,l,e)}},Yr=function(e,i,s,l){function j(W){return W instanceof s?W:new s(function(z){z(W)})}return new(s||(s=Promise))(function(W,z){function de(Ze){try{st(l.next(Ze))}catch(wt){z(wt)}}function Fe(Ze){try{st(l.throw(Ze))}catch(wt){z(wt)}}function st(Ze){Ze.done?W(Ze.value):j(Ze.value).then(de,Fe)}st((l=l.apply(e,i||[])).next())})},ir;const Ss=3;class rs{constructor(e,i,s,l){this.originalLineStart=e,this.originalLineEnd=i,this.modifiedLineStart=s,this.modifiedLineEnd=l}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class as{constructor(e){this.entries=e}}const ks=Object(ss.b)("diff-review-insert",xn.b.add,Se.a("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),Zr=Object(ss.b)("diff-review-remove",xn.b.remove,Se.a("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),nr=Object(ss.b)("diff-review-close",xn.b.close,Se.a("diffReviewCloseIcon","Icon for 'Close' in diff review."));let ws=class e extends Xe.a{constructor(i,s){super();this._modeService=s,this._width=0,this._diffEditor=i,this._isVisible=!1,this.shadow=Object(ys.b)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=Object(ys.b)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new Es.a(this.actionBarContainer.domNode)),this._actionBar.push(new An.a("diffreview.close",Se.a("label.close","Close"),"close-diff-review "+nn.d.asClassName(nr),!0,()=>Yr(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=Object(ys.b)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=Object(ys.b)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new Cr.a(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(i.onDidUpdateDiff(()=>{if(!this._isVisible)return;this._diffs=this._compute(),this._render()})),this._register(i.getModifiedEditor().onDidChangeCursorPosition(()=>{if(!this._isVisible)return;this._render()})),this._register(ve.o(this.domNode.domNode,"click",l=>{l.preventDefault();let j=ve.x(l.target,"diff-review-row");j&&this._goToRow(j)})),this._register(ve.o(this.domNode.domNode,"keydown",l=>{(l.equals(18)||l.equals(2048|18)||l.equals(512|18))&&(l.preventDefault(),this._goToRow(this._getNextRow())),(l.equals(16)||l.equals(2048|16)||l.equals(512|16))&&(l.preventDefault(),this._goToRow(this._getPrevRow())),(l.equals(9)||l.equals(2048|9)||l.equals(512|9)||l.equals(1024|9))&&(l.preventDefault(),this.hide()),(l.equals(10)||l.equals(3))&&(l.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let i=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let l=-1;for(let j=0,W=this._diffs.length;j<W;j++)if(this._diffs[j]===this._currentDiff){l=j;break}i=this._diffs.length+l-1}else i=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;i=i%this._diffs.length;const s=this._diffs[i].entries;this._diffEditor.setPosition(new F.a(s[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:s[0].modifiedLineStart,endColumn:1073741824,endLineNumber:s[s.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let i=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let l=-1;for(let j=0,W=this._diffs.length;j<W;j++)if(this._diffs[j]===this._currentDiff){l=j;break}i=l+1}else i=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;i=i%this._diffs.length;const s=this._diffs[i].entries;this._diffEditor.setPosition(new F.a(s[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:s[0].modifiedLineStart,endColumn:1073741824,endLineNumber:s[s.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}accept(){let i=-1,s=this._getCurrentFocusedRow();if(s){let l=parseInt(s.getAttribute("data-line"),10);isNaN(l)||(i=l)}this.hide(),i!==-1&&(this._diffEditor.setPosition(new F.a(i,1)),this._diffEditor.revealPosition(new F.a(i,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){let i=this._getCurrentFocusedRow();return i?i.previousElementSibling?i.previousElementSibling:i:this._getFirstRow()}_getNextRow(){let i=this._getCurrentFocusedRow();return i?i.nextElementSibling?i.nextElementSibling:i:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){let i=document.activeElement;return i&&/diff-review-row/.test(i.className)?i:null}_goToRow(i){let s=this._getCurrentFocusedRow();i.tabIndex=0,i.focus(),s&&s!==i&&(s.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(i,s,l){this._width=s,this.shadow.setTop(i-6),this.shadow.setWidth(s),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(i),this.domNode.setWidth(s),this.domNode.setHeight(l),this._content.setHeight(l),this._content.setWidth(s),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const i=this._diffEditor.getLineChanges();if(!i||i.length===0)return[];const s=this._diffEditor.getOriginalEditor().getModel(),l=this._diffEditor.getModifiedEditor().getModel();return!s||!l?[]:e._mergeAdjacent(i,s.getLineCount(),l.getLineCount())}static _mergeAdjacent(i,s,l){if(!i||i.length===0)return[];let j=[],W=0;for(let st=0,Ze=i.length;st<Ze;st++){const wt=i[st],to=wt.originalStartLineNumber,lo=wt.originalEndLineNumber,po=wt.modifiedStartLineNumber,Ho=wt.modifiedEndLineNumber;let Vo=[],ii=0;{const Jo=lo===0?to:to-1,Go=Ho===0?po:po-1;let Si=1,Ai=1;if(st>0){const Xo=i[st-1];Xo.originalEndLineNumber===0?Si=Xo.originalStartLineNumber+1:Si=Xo.originalEndLineNumber+1,Xo.modifiedEndLineNumber===0?Ai=Xo.modifiedStartLineNumber+1:Ai=Xo.modifiedEndLineNumber+1}let ai=Jo-Ss+1,Fo=Go-Ss+1;if(ai<Si){const Xo=Si-ai;ai=ai+Xo,Fo=Fo+Xo}if(Fo<Ai){const Xo=Ai-Fo;ai=ai+Xo,Fo=Fo+Xo}Vo[ii++]=new rs(ai,Jo,Fo,Go)}lo!==0&&(Vo[ii++]=new rs(to,lo,0,0)),Ho!==0&&(Vo[ii++]=new rs(0,0,po,Ho));{const Jo=lo===0?to+1:lo+1,Go=Ho===0?po+1:Ho+1;let Si=s,Ai=l;if(st+1<Ze){const Xo=i[st+1];Xo.originalEndLineNumber===0?Si=Xo.originalStartLineNumber:Si=Xo.originalStartLineNumber-1,Xo.modifiedEndLineNumber===0?Ai=Xo.modifiedStartLineNumber:Ai=Xo.modifiedStartLineNumber-1}let ai=Jo+Ss-1,Fo=Go+Ss-1;if(ai>Si){const Xo=Si-ai;ai=ai+Xo,Fo=Fo+Xo}if(Fo>Ai){const Xo=Ai-Fo;ai=ai+Xo,Fo=Fo+Xo}Vo[ii++]=new rs(Jo,ai,Go,Fo)}j[W++]=new as(Vo)}let z=j[0].entries,de=[],Fe=0;for(let st=1,Ze=j.length;st<Ze;st++){const wt=j[st].entries,to=z[z.length-1],lo=wt[0];if(to.getType()===0&&lo.getType()===0&&lo.originalLineStart<=to.originalLineEnd){z[z.length-1]=new rs(to.originalLineStart,lo.originalLineEnd,to.modifiedLineStart,lo.modifiedLineEnd),z=z.concat(wt.slice(1));continue}de[Fe++]=new as(z),z=wt}return de[Fe++]=new as(z),de}_findDiffIndex(i){const s=i.lineNumber;for(let l=0,j=this._diffs.length;l<j;l++){const W=this._diffs[l].entries,z=W[W.length-1].modifiedLineEnd;if(s<=z)return l}return 0}_render(){const i=this._diffEditor.getOriginalEditor().getOptions(),s=this._diffEditor.getModifiedEditor().getOptions(),l=this._diffEditor.getOriginalEditor().getModel(),j=this._diffEditor.getModifiedEditor().getModel(),W=l.getOptions(),z=j.getOptions();if(!this._isVisible||!l||!j){ve.t(this._content.domNode),this._currentDiff=null,this.scrollbar.scanDomNode();return}this._diffEditor.updateOptions({readOnly:!0});const de=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[de]===this._currentDiff)return;this._currentDiff=this._diffs[de];const Fe=this._diffs[de].entries;let st=document.createElement("div");st.className="diff-review-table",st.setAttribute("role","list"),st.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),Ns.a.applyFontInfoSlow(st,s.get(43));let Ze=0,wt=0,to=0,lo=0;for(let Fo=0,Xo=Fe.length;Fo<Xo;Fo++){const ei=Fe[Fo],Mi=ei.originalLineStart,qi=ei.originalLineEnd,gi=ei.modifiedLineStart,Yi=ei.modifiedLineEnd;Mi!==0&&(Ze===0||Mi<Ze)&&(Ze=Mi),qi!==0&&(wt===0||qi>wt)&&(wt=qi),gi!==0&&(to===0||gi<to)&&(to=gi),Yi!==0&&(lo===0||Yi>lo)&&(lo=Yi)}let po=document.createElement("div");po.className="diff-review-row";let Ho=document.createElement("div");Ho.className="diff-review-cell diff-review-summary";const Vo=wt-Ze+1,ii=lo-to+1;Ho.appendChild(document.createTextNode(`${de+1}/${this._diffs.length}: @@ -${Ze},${Vo} +${to},${ii} @@`)),po.setAttribute("data-line",String(to));const Jo=Fo=>Fo===0?Se.a("no_lines_changed","no lines changed"):Fo===1?Se.a("one_line_changed","1 line changed"):Se.a("more_lines_changed","{0} lines changed",Fo),Go=Jo(Vo),Si=Jo(ii);po.setAttribute("aria-label",Se.a({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",de+1,this._diffs.length,Ze,Go,to,Si)),po.appendChild(Ho),po.setAttribute("role","listitem"),st.appendChild(po);const Ai=s.get(58);let ai=to;for(let Fo=0,Xo=Fe.length;Fo<Xo;Fo++){const ei=Fe[Fo];e._renderSection(st,ei,ai,Ai,this._width,i,l,W,s,j,z,this._modeService.languageIdCodec),ei.modifiedLineStart!==0&&(ai=ei.modifiedLineEnd)}ve.t(this._content.domNode),this._content.domNode.appendChild(st),this.scrollbar.scanDomNode()}static _renderSection(i,s,l,j,W,z,de,Fe,st,Ze,wt,to){const lo=s.getType();let po="diff-review-row",Ho="";const Vo="diff-review-spacer";let ii=null;switch(lo){case 1:po="diff-review-row line-insert",Ho=" char-insert",ii=ks;break;case 2:po="diff-review-row line-delete",Ho=" char-delete",ii=Zr;break}const Jo=s.originalLineStart,Go=s.originalLineEnd,Si=s.modifiedLineStart,Ai=s.modifiedLineEnd,ai=Math.max(Ai-Si,Go-Jo),Fo=z.get(129),Xo=Fo.glyphMarginWidth+Fo.lineNumbersWidth,ei=st.get(129),Mi=10+ei.glyphMarginWidth+ei.lineNumbersWidth;for(let qi=0;qi<=ai;qi++){const gi=Jo===0?0:Jo+qi,Yi=Si===0?0:Si+qi,On=document.createElement("div");On.style.minWidth=W+"px",On.className=po,On.setAttribute("role","listitem"),Yi!==0&&(l=Yi),On.setAttribute("data-line",String(l));let tn=document.createElement("div");tn.className="diff-review-cell",tn.style.height=`${j}px`,On.appendChild(tn);const jn=document.createElement("span");jn.style.width=Xo+"px",jn.style.minWidth=Xo+"px",jn.className="diff-review-line-number"+Ho,gi!==0?jn.appendChild(document.createTextNode(String(gi))):jn.innerText="\xA0",tn.appendChild(jn);const _n=document.createElement("span");_n.style.width=Mi+"px",_n.style.minWidth=Mi+"px",_n.style.paddingRight="10px",_n.className="diff-review-line-number"+Ho,Yi!==0?_n.appendChild(document.createTextNode(String(Yi))):_n.innerText="\xA0",tn.appendChild(_n);const ps=document.createElement("span");if(ps.className=Vo,ii){const Dn=document.createElement("span");Dn.className=nn.d.asClassName(ii),Dn.innerText="\xA0\xA0",ps.appendChild(Dn)}else ps.innerText="\xA0\xA0";tn.appendChild(ps);let Pn;if(Yi!==0){let Dn=this._renderLine(Ze,st,wt.tabSize,Yi,to);e._ttPolicy&&(Dn=e._ttPolicy.createHTML(Dn)),tn.insertAdjacentHTML("beforeend",Dn),Pn=Ze.getLineContent(Yi)}else{let Dn=this._renderLine(de,z,Fe.tabSize,gi,to);e._ttPolicy&&(Dn=e._ttPolicy.createHTML(Dn)),tn.insertAdjacentHTML("beforeend",Dn),Pn=de.getLineContent(gi)}Pn.length===0&&(Pn=Se.a("blankLine","blank"));let bs="";switch(lo){case 0:gi===Yi?bs=Se.a({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",Pn,gi):bs=Se.a("equalLine","{0} original line {1} modified line {2}",Pn,gi,Yi);break;case 1:bs=Se.a("insertLine","+ {0} modified line {1}",Pn,Yi);break;case 2:bs=Se.a("deleteLine","- {0} original line {1}",Pn,gi);break}On.setAttribute("aria-label",bs),i.appendChild(On)}}static _renderLine(i,s,l,j,W){const z=i.getLineContent(j),de=s.get(43),Fe=P.a.createEmpty(z,W),st=Ae.g.isBasicASCII(z,i.mightContainNonBasicASCII()),Ze=Ae.g.containsRTL(z,st,i.mightContainRTL()),wt=Object(q.e)(new q.c(de.isMonospace&&!s.get(29),de.canUseHalfwidthRightwardsArrow,z,!1,st,Ze,0,Fe,[],l,0,de.spaceWidth,de.middotWidth,de.wsmiddotWidth,s.get(104),s.get(87),s.get(82),s.get(44)!==f.e.OFF,null));return wt.html}};ws._ttPolicy=(ir=window.trustedTypes)===null||ir===void 0?void 0:ir.createPolicy("diffReview",{createHTML:e=>e}),ws=Xr([$r(1,xo.a)],ws),Object(nn.f)((e,i)=>{const s=e.getColor(Hn.D);s&&i.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${s}; }`);const l=e.getColor(ni.yc);l&&i.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${l} 0 -6px 6px -6px inset; }`)});class Qr extends Zn.b{constructor(){super({id:"editor.action.diffReview.next",label:Se.a("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:Ct.a.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,i){const s=yr(e);s&&s.diffReviewNext()}}class sr extends Zn.b{constructor(){super({id:"editor.action.diffReview.prev",label:Se.a("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:Ct.a.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1024|65,weight:100}})}run(e,i){const s=yr(e);s&&s.diffReviewPrev()}}function yr(e){const i=e.get(Pe.a),s=i.listDiffEditors(),l=i.getActiveCodeEditor();if(!l)return null;for(let j=0,W=s.length;j<W;j++){const z=s[j];if(z.getModifiedEditor().getId()===l.getId()||z.getOriginalEditor().getId()===l.getId())return z}return null}Object(Zn.j)(Qr),Object(Zn.j)(sr);var Jr=t("erNZ"),Vn=t("tX9W"),js=t("MvK1"),Er=t("dBaI"),vn=t("Cg/j"),Ps=t("8HsV"),zn=t("Uzvx"),Fs=function(e,i,s,l){function j(W){return W instanceof s?W:new s(function(z){z(W)})}return new(s||(s=Promise))(function(W,z){function de(Ze){try{st(l.next(Ze))}catch(wt){z(wt)}}function Fe(Ze){try{st(l.throw(Ze))}catch(wt){z(wt)}}function st(Ze){Ze.done?W(Ze.value):j(Ze.value).then(de,Fe)}st((l=l.apply(e,i||[])).next())})};class qr extends Xe.a{constructor(e,i,s,l,j,W){super();this._viewZoneId=e,this._marginDomNode=i,this.editor=s,this.diff=l,this._contextMenuService=j,this._clipboardService=W,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=xn.b.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const z=s.getOption(58),de=s.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${z}px`,this._diffActions.style.lineHeight=`${z}px`,this._marginDomNode.appendChild(this._diffActions);const Fe=[],st=l.modifiedEndLineNumber===0;Fe.push(new An.a("diff.clipboard.copyDeletedContent",st?l.originalEndLineNumber>l.modifiedStartLineNumber?Se.a("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):Se.a("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):l.originalEndLineNumber>l.modifiedStartLineNumber?Se.a("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):Se.a("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,()=>Fs(this,void 0,void 0,function*(){const po=new I.a(l.originalStartLineNumber,1,l.originalEndLineNumber+1,1),Ho=l.originalModel.getValueInRange(po);yield this._clipboardService.writeText(Ho)})));let Ze=0,wt;l.originalEndLineNumber>l.modifiedStartLineNumber&&(wt=new An.a("diff.clipboard.copyDeletedLineContent",st?Se.a("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",l.originalStartLineNumber):Se.a("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",l.originalStartLineNumber),void 0,!0,()=>Fs(this,void 0,void 0,function*(){const po=l.originalModel.getLineContent(l.originalStartLineNumber+Ze);if(po===""){const Ho=l.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(Ho===0?`
|
|
|
`:`\r
|
|
|
`)}else yield this._clipboardService.writeText(po)})),Fe.push(wt));const to=s.getOption(80);to||Fe.push(new An.a("diff.inline.revertChange",Se.a("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>Fs(this,void 0,void 0,function*(){const po=new I.a(l.originalStartLineNumber,1,l.originalEndLineNumber,l.originalModel.getLineMaxColumn(l.originalEndLineNumber)),Ho=l.originalModel.getValueInRange(po);if(l.modifiedEndLineNumber===0){const Vo=s.getModel().getLineMaxColumn(l.modifiedStartLineNumber);s.executeEdits("diffEditor",[{range:new I.a(l.modifiedStartLineNumber,Vo,l.modifiedStartLineNumber,Vo),text:de+Ho}])}else{const Vo=s.getModel().getLineMaxColumn(l.modifiedEndLineNumber);s.executeEdits("diffEditor",[{range:new I.a(l.modifiedStartLineNumber,1,l.modifiedEndLineNumber,Vo),text:Ho}])}})));const lo=(po,Ho)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:po,y:Ho}),getActions:()=>(wt&&(wt.label=st?Se.a("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",l.originalStartLineNumber+Ze):Se.a("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",l.originalStartLineNumber+Ze)),Fe),autoSelectFirstItem:!0})};this._register(ve.o(this._diffActions,"mousedown",po=>{const{top:Ho,height:Vo}=ve.D(this._diffActions);let ii=Math.floor(z/3);po.preventDefault(),lo(po.posx,Ho+Vo+ii)})),this._register(s.onMouseMove(po=>{if(po.target.type===8||po.target.type===5){const Ho=po.target.detail.viewZoneId;Ho===this._viewZoneId?(this.visibility=!0,Ze=this._updateLightBulbPosition(this._marginDomNode,po.event.browserEvent.y,z)):this.visibility=!1}else this.visibility=!1})),this._register(s.onMouseDown(po=>{if(!po.event.rightButton)return;if(po.target.type===8||po.target.type===5){const Ho=po.target.detail.viewZoneId;Ho===this._viewZoneId&&(po.event.preventDefault(),Ze=this._updateLightBulbPosition(this._marginDomNode,po.event.browserEvent.y,z),lo(po.event.posx,po.event.posy+z))}}))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,e?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}_updateLightBulbPosition(e,i,s){const{top:l}=ve.D(e),j=i-l,W=Math.floor(j/s),z=W*s;if(this._diffActions.style.top=`${z}px`,this.diff.viewLineCounts){let de=0;for(let Fe=0;Fe<this.diff.viewLineCounts.length;Fe++)if(de+=this.diff.viewLineCounts[Fe],W<de)return Fe}return W}}var Bs=t("9XeP"),Ws=t("tTk5"),ea=t("o39E"),ta=t("51su"),oa=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},Fn=function(e,i){return function(s,l){i(s,l,e)}},Ls;class rr{constructor(e,i){this._contextMenuService=e,this._clipboardService=i,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter(i=>!this._zonesMap[String(i.id)])}clean(e){this._zones.length>0&&e.changeViewZones(i=>{for(const s of this._zones)i.removeZone(s)}),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,i,s,l){const j=l?Gi.c.capture(e):null;e.changeViewZones(W=>{var z;for(const de of this._zones)W.removeZone(de);for(const de of this._inlineDiffMargins)de.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let de=0,Fe=s.zones.length;de<Fe;de++){const st=s.zones[de];st.suppressMouseDown=!0;const Ze=W.addZone(st);this._zones.push(Ze),this._zonesMap[String(Ze)]=!0,s.zones[de].diff&&st.marginDomNode&&(st.suppressMouseDown=!1,((z=s.zones[de].diff)===null||z===void 0?void 0:z.originalModel.getValueLength())!==0&&this._inlineDiffMargins.push(new qr(Ze,st.marginDomNode,e,s.zones[de].diff,this._contextMenuService,this._clipboardService)))}}),j&&j.restore(e),this._decorations=e.deltaDecorations(this._decorations,s.decorations),i&&i.setZones(s.overviewZones)}}let ia=0;const na=Object(ss.b)("diff-insert",xn.b.add,Se.a("diffInsertIcon","Line decoration for inserts in the diff editor.")),ls=Object(ss.b)("diff-remove",xn.b.remove,Se.a("diffRemoveIcon","Line decoration for removals in the diff editor.")),ar=(Ls=window.trustedTypes)===null||Ls===void 0?void 0:Ls.createPolicy("diffEditorWidget",{createHTML:e=>e});let Kn=class e extends Xe.a{constructor(i,s,l,j,W,z,de,Fe,st,Ze,wt,to){super();this._editorProgressService=to,this._onDidDispose=this._register(new x.b),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new x.b),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new x.b),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=W,this._codeEditorService=Fe,this._contextKeyService=this._register(z.createScoped(i)),this._instantiationService=de.createChild(new Ps.a([Ct.b,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=st,this._notificationService=Ze,this._id=++ia,this._state=0,this._updatingDiffProgress=null,this._domElement=i,s=s||{},this._options=Vs(s,{enableSplitViewResizing:!0,renderSideBySide:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),typeof s.isInEmbeddedEditor!="undefined"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",s.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new Lo.e(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=Object(ys.b)(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(ve.o(this._overviewDomElement,"mousedown",po=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(po)})),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 rr(wt,j),this._modifiedEditorState=new rr(wt,j),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new ea.a(this._containerDomElement,s.dimension,()=>this._onDidContainerSizeChanged())),s.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(s,l.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(s,l.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=de.createInstance(ws,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 Jn(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new Hs(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(st.onDidColorThemeChange(po=>{this._strategy&&this._strategy.applyColors(po)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const lo=Zn.d.getDiffEditorContributions();for(const po of lo)try{this._register(de.createInstance(po.ctor,this))}catch(Ho){Object(To.f)(Ho)}this._codeEditorService.addDiffEditor(this)}_setState(i){if(this._state===i)return;this._state=i,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),this._state===1&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(i,s){let l="monaco-diff-editor monaco-editor-background ";return s&&(l+="side-by-side "),l+=Object(nn.e)(i.type),l}_recreateOverviewRulers(){if(!this._options.renderOverviewRuler)return;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(i,s){const l=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(i),s);this._register(l.onDidScrollChange(W=>{if(this._isHandlingScrollEvent)return;if(!W.scrollTopChanged&&!W.scrollLeftChanged&&!W.scrollHeightChanged)return;this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:W.scrollLeft,scrollTop:W.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport()})),this._register(l.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(l.onDidChangeConfiguration(W=>{if(!l.getModel())return;W.hasChanged(43)&&this._updateDecorationsRunner.schedule(),W.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations())})),this._register(l.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(l.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const j=this._contextKeyService.createKey("isInDiffLeftEditor",l.hasWidgetFocus());return this._register(l.onDidFocusEditorWidget(()=>j.set(!0))),this._register(l.onDidBlurEditorWidget(()=>j.set(!1))),this._register(l.onDidContentSizeChange(W=>{const z=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,de=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:de,contentWidth:z,contentHeightChanged:W.contentHeightChanged,contentWidthChanged:W.contentWidthChanged})})),l}_createRightHandSideEditor(i,s){const l=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(i),s);this._register(l.onDidScrollChange(W=>{if(this._isHandlingScrollEvent)return;if(!W.scrollTopChanged&&!W.scrollLeftChanged&&!W.scrollHeightChanged)return;this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:W.scrollLeft,scrollTop:W.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport()})),this._register(l.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(l.onDidChangeConfiguration(W=>{if(!l.getModel())return;W.hasChanged(43)&&this._updateDecorationsRunner.schedule(),W.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations())})),this._register(l.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(l.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(l.onDidChangeModelOptions(W=>{W.tabSize&&this._updateDecorationsRunner.schedule()}));const j=this._contextKeyService.createKey("isInDiffRightEditor",l.hasWidgetFocus());return this._register(l.onDidFocusEditorWidget(()=>j.set(!0))),this._register(l.onDidBlurEditorWidget(()=>j.set(!1))),this._register(l.onDidContentSizeChange(W=>{const z=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,de=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:de,contentWidth:z,contentHeightChanged:W.contentHeightChanged,contentWidthChanged:W.contentWidthChanged})})),l}_createInnerEditor(i,s,l,j){return i.createInstance(or.a,s,l,j)}dispose(){this._codeEditorService.removeDiffEditor(this),this._beginUpdateDecorationsTimeout!==-1&&(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 Et.a.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(i){const s=Vs(i,this._options),l=wr(this._options,s);this._options=s;const j=l.ignoreTrimWhitespace||l.renderIndicators,W=this._isVisible&&(l.maxComputationTime||l.maxFileSize);j?this._beginUpdateDecorations():W&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(i)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(i)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),l.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new Jn(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new Hs(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),l.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(i){if(i&&(!i.original||!i.modified))throw new Error(i.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(i?i.original:null),this._modifiedEditor.setModel(i?i.modified:null),this._updateDecorationsRunner.cancel(),i&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),i&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getDomNode(){return this._domElement}getVisibleColumnFromPosition(i){return this._modifiedEditor.getVisibleColumnFromPosition(i)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(i){this._modifiedEditor.setPosition(i)}revealLine(i,s=0){this._modifiedEditor.revealLine(i,s)}revealLineInCenter(i,s=0){this._modifiedEditor.revealLineInCenter(i,s)}revealLineInCenterIfOutsideViewport(i,s=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(i,s)}revealLineNearTop(i,s=0){this._modifiedEditor.revealLineNearTop(i,s)}revealPosition(i,s=0){this._modifiedEditor.revealPosition(i,s)}revealPositionInCenter(i,s=0){this._modifiedEditor.revealPositionInCenter(i,s)}revealPositionInCenterIfOutsideViewport(i,s=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(i,s)}revealPositionNearTop(i,s=0){this._modifiedEditor.revealPositionNearTop(i,s)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(i){this._modifiedEditor.setSelection(i)}setSelections(i){this._modifiedEditor.setSelections(i)}revealLines(i,s,l=0){this._modifiedEditor.revealLines(i,s,l)}revealLinesInCenter(i,s,l=0){this._modifiedEditor.revealLinesInCenter(i,s,l)}revealLinesInCenterIfOutsideViewport(i,s,l=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(i,s,l)}revealLinesNearTop(i,s,l=0){this._modifiedEditor.revealLinesNearTop(i,s,l)}revealRange(i,s=0,l=!1,j=!0){this._modifiedEditor.revealRange(i,s,l,j)}revealRangeInCenter(i,s=0){this._modifiedEditor.revealRangeInCenter(i,s)}revealRangeInCenterIfOutsideViewport(i,s=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(i,s)}revealRangeNearTop(i,s=0){this._modifiedEditor.revealRangeNearTop(i,s)}revealRangeNearTopIfOutsideViewport(i,s=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(i,s)}revealRangeAtTop(i,s=0){this._modifiedEditor.revealRangeAtTop(i,s)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){const i=this._originalEditor.saveViewState(),s=this._modifiedEditor.saveViewState();return{original:i,modified:s}}restoreViewState(i){if(i&&i.original&&i.modified){const s=i;this._originalEditor.restoreViewState(s.original),this._modifiedEditor.restoreViewState(s.modified)}}layout(i){this._elementSizeObserver.observe(i)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(i,s,l){this._modifiedEditor.trigger(i,s,l)}changeDecorations(i){return this._modifiedEditor.changeDecorations(i)}_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 i=this._elementSizeObserver.getHeight(),s=this._getReviewHeight(),l=e.ENTIRE_DIFF_OVERVIEW_WIDTH-2*e.ONE_OVERVIEW_WIDTH,j=this._modifiedEditor.getLayoutInfo();j&&(this._originalOverviewRuler.setLayout({top:0,width:e.ONE_OVERVIEW_WIDTH,right:l+e.ONE_OVERVIEW_WIDTH,height:i-s}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:e.ONE_OVERVIEW_WIDTH,height:i-s}))}_onViewZonesChanged(){if(this._currentlyChangingViewZones)return;this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),e.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(i,s){return!i&&!s?!0:!i||!s?!1:i.toString()===s.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const i=this._originalEditor.getModel(),s=this._modifiedEditor.getModel();if(!i||!s)return;this._diffComputationToken++;const l=this._diffComputationToken,j=this._options.maxFileSize*1024*1024,W=z=>{const de=z.getValueLength();return j===0||de<=j};if(!W(i)||!W(s)){(!e._equals(i.uri,this._lastOriginalWarning)||!e._equals(s.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=i.uri,this._lastModifiedWarning=s.uri,this._notificationService.warn(Se.a("diff.tooLarge","Cannot compare files because one file is too large.")));return}this._setState(1),this._editorWorkerService.computeDiff(i.uri,s.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then(z=>{l===this._diffComputationToken&&i===this._originalEditor.getModel()&&s===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=z,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},z=>{l===this._diffComputationToken&&i===this._originalEditor.getModel()&&s===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const i=this._diffComputationResult?this._diffComputationResult.changes:[],s=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),l=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),j=this._strategy.getEditorsDiffDecorations(i,this._options.ignoreTrimWhitespace,this._options.renderIndicators,s,l);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,j.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,j.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(i){const s=Object.assign({},i);return s.inDiffEditor=!0,s.automaticLayout=!1,s.scrollbar=Object.assign({},s.scrollbar||{}),s.scrollbar.vertical="visible",s.folding=!1,s.codeLens=this._options.diffCodeLens,s.fixedOverflowWidgets=!0,s.minimap=Object.assign({},s.minimap||{}),s.minimap.enabled=!1,s}_adjustOptionsForLeftHandSide(i){const s=this._adjustOptionsForSubEditor(i);return this._options.renderSideBySide?s.wordWrapOverride1=this._options.diffWordWrap:s.wordWrapOverride1="off",i.originalAriaLabel&&(s.ariaLabel=i.originalAriaLabel),s.readOnly=!this._options.originalEditable,s.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},s),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(i){const s=this._adjustOptionsForSubEditor(i);return i.modifiedAriaLabel&&(s.ariaLabel=i.modifiedAriaLabel),s.wordWrapOverride1=this._options.diffWordWrap,s.revealHorizontalRightPadding=f.g.revealHorizontalRightPadding.defaultValue+e.ENTIRE_DIFF_OVERVIEW_WIDTH,s.scrollbar.verticalHasArrows=!1,s.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},s),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const i=this._elementSizeObserver.getWidth(),s=this._elementSizeObserver.getHeight(),l=this._getReviewHeight(),j=this._strategy.layout();this._originalDomNode.style.width=j+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=i-j+"px",this._modifiedDomNode.style.left=j+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=s-l+"px",this._overviewDomElement.style.width=e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=i-e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:j,height:s-l}),this._modifiedEditor.layout({width:i-j-(this._options.renderOverviewRuler?e.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:s-l}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(s-l,i,l),this._layoutOverviewViewport()}_layoutOverviewViewport(){const i=this._computeOverviewViewport();i?(this._overviewViewportDomElement.setTop(i.top),this._overviewViewportDomElement.setHeight(i.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const i=this._modifiedEditor.getLayoutInfo();if(!i)return null;const s=this._modifiedEditor.getScrollTop(),l=this._modifiedEditor.getScrollHeight(),j=Math.max(0,i.height),W=Math.max(0,j-2*0),z=l>0?W/l:0,de=Math.max(0,Math.floor(i.height*z)),Fe=Math.floor(s*z);return{height:de,top:Fe}}_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(i){this._strategy&&this._strategy.dispose(),this._strategy=i,i.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(i,s){const l=this._diffComputationResult?this._diffComputationResult.changes:[];if(l.length===0||i<s(l[0]))return null;let j=0,W=l.length-1;for(;j<W;){const z=Math.floor((j+W)/2),de=s(l[z]),Fe=z+1<=W?s(l[z+1]):1073741824;i<de?W=z-1:i>=Fe?j=z+1:(j=z,W=z)}return l[j]}_getEquivalentLineForOriginalLineNumber(i){const s=this._getLineChangeAtOrBeforeLineNumber(i,Fe=>Fe.originalStartLineNumber);if(!s)return i;const l=s.originalStartLineNumber+(s.originalEndLineNumber>0?-1:0),j=s.modifiedStartLineNumber+(s.modifiedEndLineNumber>0?-1:0),W=s.originalEndLineNumber>0?s.originalEndLineNumber-s.originalStartLineNumber+1:0,z=s.modifiedEndLineNumber>0?s.modifiedEndLineNumber-s.modifiedStartLineNumber+1:0,de=i-l;return de<=W?j+Math.min(de,z):j+z-W+de}_getEquivalentLineForModifiedLineNumber(i){const s=this._getLineChangeAtOrBeforeLineNumber(i,Fe=>Fe.modifiedStartLineNumber);if(!s)return i;const l=s.originalStartLineNumber+(s.originalEndLineNumber>0?-1:0),j=s.modifiedStartLineNumber+(s.modifiedEndLineNumber>0?-1:0),W=s.originalEndLineNumber>0?s.originalEndLineNumber-s.originalStartLineNumber+1:0,z=s.modifiedEndLineNumber>0?s.modifiedEndLineNumber-s.modifiedStartLineNumber+1:0,de=i-j;return de<=z?l+Math.min(de,W):l+W-z+de}getDiffLineInformationForOriginal(i){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(i)}:null}getDiffLineInformationForModified(i){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(i)}:null}};Kn.ONE_OVERVIEW_WIDTH=15,Kn.ENTIRE_DIFF_OVERVIEW_WIDTH=30,Kn.UPDATE_DIFF_DECORATIONS_DELAY=200,Kn=oa([Fn(3,Bs.a),Fn(4,Mo.a),Fn(5,Ct.b),Fn(6,vn.a),Fn(7,Pe.a),Fn(8,nn.b),Fn(9,Ko.a),Fn(10,zn.a),Fn(11,Ws.a)],Kn);class lr extends Xe.a{constructor(e){super();this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const i=(e.getColor(ni.m)||ni.i).transparent(2),s=(e.getColor(ni.o)||ni.j).transparent(2),l=!i.equals(this._insertColor)||!s.equals(this._removeColor);return this._insertColor=i,this._removeColor=s,l}getEditorsDiffDecorations(e,i,s,l,j){j=j.sort((Fe,st)=>Fe.afterLineNumber-st.afterLineNumber),l=l.sort((Fe,st)=>Fe.afterLineNumber-st.afterLineNumber);const W=this._getViewZones(e,l,j,s),z=this._getOriginalEditorDecorations(e,i,s),de=this._getModifiedEditorDecorations(e,i,s);return{original:{decorations:z.decorations,overviewZones:z.overviewZones,zones:W.original},modified:{decorations:de.decorations,overviewZones:de.overviewZones,zones:W.modified}}}}class Us{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class Qn{constructor(e,i,s,l,j){this._lineChanges=e,this._originalForeignVZ=i,this._modifiedForeignVZ=s,this._originalEditor=l,this._modifiedEditor=j}static _getViewLineCount(e,i,s){const l=e.getModel(),j=e._getViewModel();if(l&&j){const W=_s(l,j,i,s);return W.endLineNumber-W.startLineNumber+1}return s-i+1}getViewZones(){const e=this._originalEditor.getOption(58),i=this._modifiedEditor.getOption(58),s=this._originalEditor.getOption(130).wrappingColumn!==-1,l=this._modifiedEditor.getOption(130).wrappingColumn!==-1,j=s||l,W=this._originalEditor.getModel(),z=this._originalEditor._getViewModel().coordinatesConverter,de=this._modifiedEditor._getViewModel().coordinatesConverter,Fe={original:[],modified:[]};let st=0,Ze=0,wt=0,to=0,lo=0,po=0;const Ho=(Ai,ai)=>Ai.afterLineNumber-ai.afterLineNumber,Vo=(Ai,ai)=>{if(ai.domNode===null&&Ai.length>0){const Fo=Ai[Ai.length-1];if(Fo.afterLineNumber===ai.afterLineNumber&&Fo.domNode===null){Fo.heightInLines+=ai.heightInLines;return}}Ai.push(ai)},ii=new Us(this._modifiedForeignVZ),Jo=new Us(this._originalForeignVZ);let Go=1,Si=1;for(let Ai=0,ai=this._lineChanges.length;Ai<=ai;Ai++){const Fo=Ai<ai?this._lineChanges[Ai]:null;Fo!==null?(wt=Fo.originalStartLineNumber+(Fo.originalEndLineNumber>0?-1:0),to=Fo.modifiedStartLineNumber+(Fo.modifiedEndLineNumber>0?-1:0),Ze=Fo.originalEndLineNumber>0?Qn._getViewLineCount(this._originalEditor,Fo.originalStartLineNumber,Fo.originalEndLineNumber):0,st=Fo.modifiedEndLineNumber>0?Qn._getViewLineCount(this._modifiedEditor,Fo.modifiedStartLineNumber,Fo.modifiedEndLineNumber):0,lo=Math.max(Fo.originalStartLineNumber,Fo.originalEndLineNumber),po=Math.max(Fo.modifiedStartLineNumber,Fo.modifiedEndLineNumber)):(wt+=1e7+Ze,to+=1e7+st,lo=wt,po=to);let Xo=[],ei=[];if(j){let gi;Fo?Fo.originalEndLineNumber>0?gi=Fo.originalStartLineNumber-Go:gi=Fo.modifiedStartLineNumber-Si:gi=W.getLineCount()-Go;for(let Yi=0;Yi<gi;Yi++){const On=Go+Yi,tn=Si+Yi,jn=z.getModelLineViewLineCount(On),_n=de.getModelLineViewLineCount(tn);jn<_n?Xo.push({afterLineNumber:On,heightInLines:_n-jn,domNode:null,marginDomNode:null}):jn>_n&&ei.push({afterLineNumber:tn,heightInLines:jn-_n,domNode:null,marginDomNode:null})}Fo&&(Go=(Fo.originalEndLineNumber>0?Fo.originalEndLineNumber:Fo.originalStartLineNumber)+1,Si=(Fo.modifiedEndLineNumber>0?Fo.modifiedEndLineNumber:Fo.modifiedStartLineNumber)+1)}for(;ii.current&&ii.current.afterLineNumber<=po;){let gi;ii.current.afterLineNumber<=to?gi=wt-to+ii.current.afterLineNumber:gi=lo;let Yi=null;Fo&&Fo.modifiedStartLineNumber<=ii.current.afterLineNumber&&ii.current.afterLineNumber<=Fo.modifiedEndLineNumber&&(Yi=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),Xo.push({afterLineNumber:gi,heightInLines:ii.current.height/i,domNode:null,marginDomNode:Yi}),ii.advance()}for(;Jo.current&&Jo.current.afterLineNumber<=lo;){let gi;Jo.current.afterLineNumber<=wt?gi=to-wt+Jo.current.afterLineNumber:gi=po,ei.push({afterLineNumber:gi,heightInLines:Jo.current.height/e,domNode:null}),Jo.advance()}if(Fo!==null&&ds(Fo)){const gi=this._produceOriginalFromDiff(Fo,Ze,st);gi&&Xo.push(gi)}if(Fo!==null&&Rn(Fo)){const gi=this._produceModifiedFromDiff(Fo,Ze,st);gi&&ei.push(gi)}let Mi=0,qi=0;for(Xo=Xo.sort(Ho),ei=ei.sort(Ho);Mi<Xo.length&&qi<ei.length;){const gi=Xo[Mi],Yi=ei[qi],On=gi.afterLineNumber-wt,tn=Yi.afterLineNumber-to;On<tn?(Vo(Fe.original,gi),Mi++):tn<On?(Vo(Fe.modified,Yi),qi++):gi.shouldNotShrink?(Vo(Fe.original,gi),Mi++):Yi.shouldNotShrink?(Vo(Fe.modified,Yi),qi++):gi.heightInLines>=Yi.heightInLines?(gi.heightInLines-=Yi.heightInLines,qi++):(Yi.heightInLines-=gi.heightInLines,Mi++)}for(;Mi<Xo.length;)Vo(Fe.original,Xo[Mi]),Mi++;for(;qi<ei.length;)Vo(Fe.modified,ei[qi]),qi++}return{original:Qn._ensureDomNodes(Fe.original),modified:Qn._ensureDomNodes(Fe.modified)}}static _ensureDomNodes(e){return e.map(i=>(i.domNode||(i.domNode=Sr()),i))}}function Gn(e,i,s,l,j){return{range:new I.a(e,i,s,l),options:j}}const Sn={charDelete:Vn.b.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:Vn.b.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:Vn.b.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:Vn.b.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:Vn.b.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:Vn.b.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+nn.d.asClassName(na),marginClassName:"line-insert",isWholeLine:!0}),lineDelete:Vn.b.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:Vn.b.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+nn.d.asClassName(ls),marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:Vn.b.register({description:"diff-editor-line-delete-margin",marginClassName:"line-delete"})};class Jn extends lr{constructor(e,i){super(e);this._disableSash=i===!1,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new Gr.b(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(s=>this._onSashDrag(s)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(e){const i=e===!1;this._disableSash!==i&&(this._disableSash=i,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const i=this._dataSource.getWidth(),s=i-(this._dataSource.getOptions().renderOverviewRuler?Kn.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let l=Math.floor((e||.5)*s);const j=Math.floor(.5*s);return l=this._disableSash?j:l||j,s>Jn.MINIMUM_EDITOR_WIDTH*2?(l<Jn.MINIMUM_EDITOR_WIDTH&&(l=Jn.MINIMUM_EDITOR_WIDTH),l>s-Jn.MINIMUM_EDITOR_WIDTH&&(l=s-Jn.MINIMUM_EDITOR_WIDTH)):l=j,this._sashPosition!==l&&(this._sashPosition=l,this._sash.layout()),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const i=this._dataSource.getWidth(),s=i-(this._dataSource.getOptions().renderOverviewRuler?Kn.ENTIRE_DIFF_OVERVIEW_WIDTH:0),l=this.layout((this._startSashPosition+(e.currentX-e.startX))/s);this._sashRatio=l/s,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,i,s){const l=this._dataSource.getOriginalEditor(),j=this._dataSource.getModifiedEditor(),W=new sa(e,i,s,l,j);return W.getViewZones()}_getOriginalEditorDecorations(e,i,s){const l=this._dataSource.getOriginalEditor(),j=String(this._removeColor),W={decorations:[],overviewZones:[]},z=l.getModel(),de=l._getViewModel();for(const Fe of e)if(Rn(Fe)){W.decorations.push({range:new I.a(Fe.originalStartLineNumber,1,Fe.originalEndLineNumber,1073741824),options:s?Sn.lineDeleteWithSign:Sn.lineDelete}),(!ds(Fe)||!Fe.charChanges)&&W.decorations.push(Gn(Fe.originalStartLineNumber,1,Fe.originalEndLineNumber,1073741824,Sn.charDeleteWholeLine));const st=_s(z,de,Fe.originalStartLineNumber,Fe.originalEndLineNumber);if(W.overviewZones.push(new js.a(st.startLineNumber,st.endLineNumber,j)),Fe.charChanges){for(const Ze of Fe.charChanges)if(Rn(Ze))if(i)for(let wt=Ze.originalStartLineNumber;wt<=Ze.originalEndLineNumber;wt++){let to,lo;wt===Ze.originalStartLineNumber?to=Ze.originalStartColumn:to=z.getLineFirstNonWhitespaceColumn(wt),wt===Ze.originalEndLineNumber?lo=Ze.originalEndColumn:lo=z.getLineLastNonWhitespaceColumn(wt),W.decorations.push(Gn(wt,to,wt,lo,Sn.charDelete))}else W.decorations.push(Gn(Ze.originalStartLineNumber,Ze.originalStartColumn,Ze.originalEndLineNumber,Ze.originalEndColumn,Sn.charDelete))}}return W}_getModifiedEditorDecorations(e,i,s){const l=this._dataSource.getModifiedEditor(),j=String(this._insertColor),W={decorations:[],overviewZones:[]},z=l.getModel(),de=l._getViewModel();for(const Fe of e)if(ds(Fe)){W.decorations.push({range:new I.a(Fe.modifiedStartLineNumber,1,Fe.modifiedEndLineNumber,1073741824),options:s?Sn.lineInsertWithSign:Sn.lineInsert}),(!Rn(Fe)||!Fe.charChanges)&&W.decorations.push(Gn(Fe.modifiedStartLineNumber,1,Fe.modifiedEndLineNumber,1073741824,Sn.charInsertWholeLine));const st=_s(z,de,Fe.modifiedStartLineNumber,Fe.modifiedEndLineNumber);if(W.overviewZones.push(new js.a(st.startLineNumber,st.endLineNumber,j)),Fe.charChanges){for(const Ze of Fe.charChanges)if(ds(Ze))if(i)for(let wt=Ze.modifiedStartLineNumber;wt<=Ze.modifiedEndLineNumber;wt++){let to,lo;wt===Ze.modifiedStartLineNumber?to=Ze.modifiedStartColumn:to=z.getLineFirstNonWhitespaceColumn(wt),wt===Ze.modifiedEndLineNumber?lo=Ze.modifiedEndColumn:lo=z.getLineLastNonWhitespaceColumn(wt),W.decorations.push(Gn(wt,to,wt,lo,Sn.charInsert))}else W.decorations.push(Gn(Ze.modifiedStartLineNumber,Ze.modifiedStartColumn,Ze.modifiedEndLineNumber,Ze.modifiedEndColumn,Sn.charInsert))}}return W}}Jn.MINIMUM_EDITOR_WIDTH=100;class sa extends Qn{constructor(e,i,s,l,j){super(e,i,s,l,j)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,i,s){return s>i?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:s-i,domNode:null}:null}_produceModifiedFromDiff(e,i,s){return i>s?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:i-s,domNode:null}:null}}class Hs extends lr{constructor(e,i){super(e);this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange(s=>{this._decorationsLeft!==s.decorationsLeft&&(this._decorationsLeft=s.decorationsLeft,e.relayoutEditors())}))}setEnableSplitViewResizing(e){}_getViewZones(e,i,s,l){const j=this._dataSource.getOriginalEditor(),W=this._dataSource.getModifiedEditor(),z=new dr(e,i,s,j,W,l);return z.getViewZones()}_getOriginalEditorDecorations(e,i,s){const l=String(this._removeColor),j={decorations:[],overviewZones:[]},W=this._dataSource.getOriginalEditor(),z=W.getModel(),de=W._getViewModel();for(const Fe of e)if(Rn(Fe)){j.decorations.push({range:new I.a(Fe.originalStartLineNumber,1,Fe.originalEndLineNumber,1073741824),options:Sn.lineDeleteMargin});const st=_s(z,de,Fe.originalStartLineNumber,Fe.originalEndLineNumber);j.overviewZones.push(new js.a(st.startLineNumber,st.endLineNumber,l))}return j}_getModifiedEditorDecorations(e,i,s){const l=this._dataSource.getModifiedEditor(),j=String(this._insertColor),W={decorations:[],overviewZones:[]},z=l.getModel(),de=l._getViewModel();for(const Fe of e)if(ds(Fe)){W.decorations.push({range:new I.a(Fe.modifiedStartLineNumber,1,Fe.modifiedEndLineNumber,1073741824),options:s?Sn.lineInsertWithSign:Sn.lineInsert});const st=_s(z,de,Fe.modifiedStartLineNumber,Fe.modifiedEndLineNumber);if(W.overviewZones.push(new js.a(st.startLineNumber,st.endLineNumber,j)),Fe.charChanges){for(const Ze of Fe.charChanges)if(ds(Ze))if(i)for(let wt=Ze.modifiedStartLineNumber;wt<=Ze.modifiedEndLineNumber;wt++){let to,lo;wt===Ze.modifiedStartLineNumber?to=Ze.modifiedStartColumn:to=z.getLineFirstNonWhitespaceColumn(wt),wt===Ze.modifiedEndLineNumber?lo=Ze.modifiedEndColumn:lo=z.getLineLastNonWhitespaceColumn(wt),W.decorations.push(Gn(wt,to,wt,lo,Sn.charInsert))}else W.decorations.push(Gn(Ze.modifiedStartLineNumber,Ze.modifiedStartColumn,Ze.modifiedEndLineNumber,Ze.modifiedEndColumn,Sn.charInsert))}else W.decorations.push(Gn(Fe.modifiedStartLineNumber,1,Fe.modifiedEndLineNumber,1073741824,Sn.charInsertWholeLine))}return W}layout(){return Math.max(5,this._decorationsLeft)}}class dr extends Qn{constructor(e,i,s,l,j,W){super(e,i,s,l,j);this._originalModel=l.getModel(),this._renderIndicators=W,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,i,s){const l=document.createElement("div");return l.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:s,domNode:document.createElement("div"),marginDomNode:l}}_produceModifiedFromDiff(e,i,s){const l=document.createElement("div");l.className=`view-lines line-delete ${ta.a}`;const j=document.createElement("div");j.className="inline-deleted-margin-view-zone";const W={shouldNotShrink:!0,afterLineNumber:e.modifiedEndLineNumber===0?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:i,minWidthInPx:0,domNode:l,marginDomNode:j,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let z=e.originalStartLineNumber;z<=e.originalEndLineNumber;z++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(z),null,null);return this._pendingLineChange.push(e),this._pendingViewZones.push(W),W}_finalize(e){const i=this._modifiedEditor.getOptions(),s=this._modifiedEditor.getModel().getOptions().tabSize,l=i.get(43),j=i.get(29),W=l.typicalHalfwidthCharacterWidth,z=i.get(92),de=this._originalModel.mightContainNonBasicASCII(),Fe=this._originalModel.mightContainRTL(),st=i.get(58),Ze=i.get(129),wt=Ze.decorationsWidth,to=i.get(104),lo=i.get(87),po=i.get(82),Ho=i.get(44),Vo=this._lineBreaksComputer.finalize();let ii=0;for(let Jo=0;Jo<this._pendingLineChange.length;Jo++){const Go=this._pendingLineChange[Jo],Si=this._pendingViewZones[Jo],Ai=Si.domNode;Ns.a.applyFontInfoSlow(Ai,l);const ai=Si.marginDomNode;Ns.a.applyFontInfoSlow(ai,l);const Fo=[];if(Go.charChanges)for(const tn of Go.charChanges)Rn(tn)&&Fo.push(new Ae.a(new I.a(tn.originalStartLineNumber,tn.originalStartColumn,tn.originalEndLineNumber,tn.originalEndColumn),"char-delete",0));const Xo=Fo.length>0,ei=Object(Jr.a)(1e4);let Mi=0,qi=0,gi=null;for(let tn=Go.originalStartLineNumber;tn<=Go.originalEndLineNumber;tn++){const jn=tn-Go.originalStartLineNumber,_n=this._originalModel.getLineTokens(tn),ps=_n.getLineContent(),Pn=Vo[ii++],bs=Er.a.filter(Fo,tn,1,ps.length+1);if(Pn){let Dn=0;for(const Vr of Pn.breakOffsets){const Ju=_n.sliceAndInflate(Dn,Vr,0),qu=ps.substring(Dn,Vr);Mi=Math.max(Mi,this._renderOriginalLine(qi++,qu,Ju,Er.a.extractWrapped(bs,Dn,Vr),Xo,de,Fe,l,j,st,wt,to,lo,po,Ho,s,ei,ai)),Dn=Vr}for(gi||(gi=[]);gi.length<jn;)gi[gi.length]=1;gi[jn]=Pn.breakOffsets.length,Si.heightInLines+=Pn.breakOffsets.length-1;const Ql=document.createElement("div");Ql.className="line-delete",e.original.push({afterLineNumber:tn,afterColumn:0,heightInLines:Pn.breakOffsets.length-1,domNode:Sr(),marginDomNode:Ql})}else Mi=Math.max(Mi,this._renderOriginalLine(qi++,ps,_n,bs,Xo,de,Fe,l,j,st,wt,to,lo,po,Ho,s,ei,ai))}Mi+=z;const Yi=ei.build(),On=ar?ar.createHTML(Yi):Yi;if(Ai.innerHTML=On,Si.minWidthInPx=Mi*W,gi){const tn=Go.originalEndLineNumber-Go.originalStartLineNumber;for(;gi.length<=tn;)gi[gi.length]=1}Si.diff.viewLineCounts=gi}e.original.sort((Jo,Go)=>Jo.afterLineNumber-Go.afterLineNumber)}_renderOriginalLine(e,i,s,l,j,W,z,de,Fe,st,Ze,wt,to,lo,po,Ho,Vo,ii){Vo.appendASCIIString('<div class="view-line'),j||Vo.appendASCIIString(" char-delete"),Vo.appendASCIIString('" style="top:'),Vo.appendASCIIString(String(e*st)),Vo.appendASCIIString('px;width:1000000px;">');const Jo=Ae.g.isBasicASCII(i,W),Go=Ae.g.containsRTL(i,Jo,z),Si=Object(q.d)(new q.c(de.isMonospace&&!Fe,de.canUseHalfwidthRightwardsArrow,i,!1,Jo,Go,0,s,l,Ho,0,de.spaceWidth,de.middotWidth,de.wsmiddotWidth,wt,to,lo,po!==f.e.OFF,null),Vo);if(Vo.appendASCIIString("</div>"),this._renderIndicators){const Ai=document.createElement("div");Ai.className=`delete-sign ${nn.d.asClassName(ls)}`,Ai.setAttribute("style",`position:absolute;top:${e*st}px;width:${Ze}px;height:${st}px;right:0;`),ii.appendChild(Ai)}return Si.characterMapping.getAbsoluteOffset(Si.characterMapping.length)}}function ra(e,i){return Object(f.o)(e,i,["off","on","inherit"])}function ds(e){return e.modifiedEndLineNumber>0}function Rn(e){return e.originalEndLineNumber>0}function Sr(){const e=document.createElement("div");return e.className="diagonal-fill",e}function _s(e,i,s,l){const j=e.getLineCount();return s=Math.min(j,Math.max(1,s)),l=Math.min(j,Math.max(1,l)),i.coordinatesConverter.convertModelRangeToViewRange(new I.a(s,e.getLineMinColumn(s),l,e.getLineMaxColumn(l)))}function Vs(e,i){return{enableSplitViewResizing:Object(f.k)(e.enableSplitViewResizing,i.enableSplitViewResizing),renderSideBySide:Object(f.k)(e.renderSideBySide,i.renderSideBySide),maxComputationTime:Object(f.l)(e.maxComputationTime,i.maxComputationTime,0,1073741824),maxFileSize:Object(f.l)(e.maxFileSize,i.maxFileSize,0,1073741824),ignoreTrimWhitespace:Object(f.k)(e.ignoreTrimWhitespace,i.ignoreTrimWhitespace),renderIndicators:Object(f.k)(e.renderIndicators,i.renderIndicators),originalEditable:Object(f.k)(e.originalEditable,i.originalEditable),diffCodeLens:Object(f.k)(e.diffCodeLens,i.diffCodeLens),renderOverviewRuler:Object(f.k)(e.renderOverviewRuler,i.renderOverviewRuler),diffWordWrap:ra(e.diffWordWrap,i.diffWordWrap)}}function wr(e,i){return{enableSplitViewResizing:e.enableSplitViewResizing!==i.enableSplitViewResizing,renderSideBySide:e.renderSideBySide!==i.renderSideBySide,maxComputationTime:e.maxComputationTime!==i.maxComputationTime,maxFileSize:e.maxFileSize!==i.maxFileSize,ignoreTrimWhitespace:e.ignoreTrimWhitespace!==i.ignoreTrimWhitespace,renderIndicators:e.renderIndicators!==i.renderIndicators,originalEditable:e.originalEditable!==i.originalEditable,diffCodeLens:e.diffCodeLens!==i.diffCodeLens,renderOverviewRuler:e.renderOverviewRuler!==i.renderOverviewRuler,diffWordWrap:e.diffWordWrap!==i.diffWordWrap}}Object(nn.f)((e,i)=>{const s=e.getColor(ni.m);s&&(i.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${s}; }`),i.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${s}; }`),i.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${s}; }`));const l=e.getColor(ni.o);l&&(i.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${l}; }`),i.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${l}; }`),i.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${l}; }`));const j=e.getColor(ni.n);j&&i.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${e.type==="hc"?"dashed":"solid"} ${j}; }`);const W=e.getColor(ni.p);W&&i.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${e.type==="hc"?"dashed":"solid"} ${W}; }`);const z=e.getColor(ni.yc);z&&i.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${z}; }`);const de=e.getColor(ni.k);de&&i.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${de}; }`);const Fe=e.getColor(ni.Ac);Fe&&i.addRule(`
|
|
|
.monaco-diff-editor .diffViewport {
|
|
|
background: ${Fe};
|
|
|
}
|
|
|
`);const st=e.getColor(ni.Bc);st&&i.addRule(`
|
|
|
.monaco-diff-editor .diffViewport:hover {
|
|
|
background: ${st};
|
|
|
}
|
|
|
`);const Ze=e.getColor(ni.zc);Ze&&i.addRule(`
|
|
|
.monaco-diff-editor .diffViewport:active {
|
|
|
background: ${Ze};
|
|
|
}
|
|
|
`);const wt=e.getColor(ni.l);i.addRule(`
|
|
|
.monaco-editor .diagonal-fill {
|
|
|
background-image: linear-gradient(
|
|
|
-45deg,
|
|
|
${wt} 12.5%,
|
|
|
#0000 12.5%, #0000 50%,
|
|
|
${wt} 50%, ${wt} 62.5%,
|
|
|
#0000 62.5%, #0000 100%
|
|
|
);
|
|
|
background-size: 8px 8px;
|
|
|
}
|
|
|
`)});var aa=t("9Y+e"),Ds=t("scqD"),Tn=t("fjLI"),ts=t("bexQ"),os=t("R3nR");class cr extends Xe.a{constructor(){super();this._onCodeEditorAdd=this._register(new x.b),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new x.b),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new x.b),this._onDiffEditorRemove=this._register(new x.b),this._onDecorationTypeRegistered=this._register(new x.b),this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(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 i=this.listCodeEditors();for(const s of i){if(s.hasTextFocus())return s;s.hasWidgetFocus()&&(e=s)}return e}setModelProperty(e,i,s){const l=e.toString();let j;this._modelProperties.has(l)?j=this._modelProperties.get(l):(j=new Map,this._modelProperties.set(l,j)),j.set(i,s)}getModelProperty(e,i){const s=e.toString();if(this._modelProperties.has(s)){const l=this._modelProperties.get(s);return l.get(i)}return}}var la=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},da=function(e,i){return function(s,l){i(s,l,e)}};class ca{constructor(e,i,s){this._parent=e,this._editorId=i,this._styleSheet=s,this._refCount=0}ref(){this._refCount++}unref(){var e;this._refCount--,this._refCount===0&&((e=this._styleSheet.parentNode)===null||e===void 0||e.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(e,i){const s=this._styleSheet.sheet;s.insertRule(e,i)}removeRulesContainingSelector(e){ve.Q(e,this._styleSheet)}}class o{constructor(e){this._styleSheet=e}ref(){}unref(){}insertRule(e,i){const s=this._styleSheet.sheet;s.insertRule(e,i)}removeRulesContainingSelector(e){ve.Q(e,this._styleSheet)}}let n=class extends cr{constructor(i,s){super();this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._globalStyleSheet=i||null,this._themeService=s}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=new o(ve.w())),this._globalStyleSheet}_getOrCreateStyleSheet(i){if(!i)return this._getOrCreateGlobalStyleSheet();const s=i.getContainerDomNode();if(!ve.O(s))return this._getOrCreateGlobalStyleSheet();const l=i.getId();if(!this._editorStyleSheets.has(l)){const j=new ca(this,l,ve.w(s));this._editorStyleSheets.set(l,j)}return this._editorStyleSheets.get(l)}_removeEditorStyleSheets(i){this._editorStyleSheets.delete(i)}registerDecorationType(i,s,l,j,W){let z=this._decorationOptionProviders.get(s);if(!z){const de=this._getOrCreateStyleSheet(W),Fe={styleSheet:de,key:s,parentTypeKey:j,options:l||Object.create(null)};j?z=new a(this._themeService,de,Fe):z=new T(i,this._themeService,de,Fe),this._decorationOptionProviders.set(s,z),this._onDecorationTypeRegistered.fire(s)}z.refCount++}removeDecorationType(i){const s=this._decorationOptionProviders.get(i);s&&(s.refCount--,s.refCount<=0&&(this._decorationOptionProviders.delete(i),s.dispose(),this.listCodeEditors().forEach(l=>l.removeDecorations(i))))}resolveDecorationOptions(i,s){const l=this._decorationOptionProviders.get(i);if(!l)throw new Error("Unknown decoration type key: "+i);return l.getOptions(this,s)}};n=la([da(1,nn.b)],n);class a{constructor(e,i,s){this._styleSheet=i,this._styleSheet.ref(),this._parentTypeKey=s.parentTypeKey,this.refCount=0,this._beforeContentRules=new X(3,s,e),this._afterContentRules=new X(4,s,e)}getOptions(e,i){const s=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(s.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(s.afterContentClassName=this._afterContentRules.className),s}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}class T{constructor(e,i,s,l){this._disposables=new Xe.b,this.description=e,this._styleSheet=s,this._styleSheet.ref(),this.refCount=0;const j=Ze=>{const wt=new X(Ze,l,i);return this._disposables.add(wt),wt.hasContent?wt.className:void 0},W=Ze=>{const wt=new X(Ze,l,i);return this._disposables.add(wt),wt.hasContent?{className:wt.className,hasLetterSpacing:wt.hasLetterSpacing}:null};this.className=j(0);const z=W(1);if(z&&(this.inlineClassName=z.className,this.inlineClassNameAffectsLetterSpacing=z.hasLetterSpacing),this.beforeContentClassName=j(3),this.afterContentClassName=j(4),l.options.beforeInjectedText&&l.options.beforeInjectedText.contentText){const Ze=W(5);this.beforeInjectedText={content:l.options.beforeInjectedText.contentText,inlineClassName:Ze==null?void 0:Ze.className,inlineClassNameAffectsLetterSpacing:(Ze==null?void 0:Ze.hasLetterSpacing)||l.options.beforeInjectedText.affectsLetterSpacing}}if(l.options.afterInjectedText&&l.options.afterInjectedText.contentText){const Ze=W(6);this.afterInjectedText={content:l.options.afterInjectedText.contentText,inlineClassName:Ze==null?void 0:Ze.className,inlineClassNameAffectsLetterSpacing:(Ze==null?void 0:Ze.hasLetterSpacing)||l.options.afterInjectedText.affectsLetterSpacing}}this.glyphMarginClassName=j(2);const de=l.options;this.isWholeLine=Boolean(de.isWholeLine),this.stickiness=de.rangeBehavior;const Fe=de.light&&de.light.overviewRulerColor||de.overviewRulerColor,st=de.dark&&de.dark.overviewRulerColor||de.overviewRulerColor;(typeof Fe!="undefined"||typeof st!="undefined")&&(this.overviewRuler={color:Fe||st,darkColor:st||Fe,position:de.overviewRulerLane||It.g.Center})}getOptions(e,i){return i?{description:this.description,inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness,before:this.beforeInjectedText,after:this.afterInjectedText}:this}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}const R={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",fontSize:"font-size:{0};",fontFamily:"font-family:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",padding:"padding:{0};",width:"width:{0};",height:"height:{0};",verticalAlign:"vertical-align:{0};"};class X{constructor(e,i,s){this._theme=s.getColorTheme(),this._ruleType=e,this._providerArgs=i,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let l=me.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(l=l+" "+me.getClassName(this._providerArgs.parentTypeKey,e)),this._className=l,this._unThemedSelector=me.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors?this._themeListener=s.onDidColorThemeChange(j=>{this._theme=s.getColorTheme(),this._removeCSS(),this._buildCSS()}):this._themeListener=null}dispose(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}get hasContent(){return this._hasContent}get hasLetterSpacing(){return this._hasLetterSpacing}get className(){return this._className}_buildCSS(){const e=this._providerArgs.options;let i,s,l;switch(this._ruleType){case 0:i=this.getCSSTextForModelDecorationClassName(e),s=this.getCSSTextForModelDecorationClassName(e.light),l=this.getCSSTextForModelDecorationClassName(e.dark);break;case 1:i=this.getCSSTextForModelDecorationInlineClassName(e),s=this.getCSSTextForModelDecorationInlineClassName(e.light),l=this.getCSSTextForModelDecorationInlineClassName(e.dark);break;case 2:i=this.getCSSTextForModelDecorationGlyphMarginClassName(e),s=this.getCSSTextForModelDecorationGlyphMarginClassName(e.light),l=this.getCSSTextForModelDecorationGlyphMarginClassName(e.dark);break;case 3:i=this.getCSSTextForModelDecorationContentClassName(e.before),s=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.before),l=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.before);break;case 4:i=this.getCSSTextForModelDecorationContentClassName(e.after),s=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.after),l=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.after);break;case 5:i=this.getCSSTextForModelDecorationContentClassName(e.beforeInjectedText),s=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.beforeInjectedText),l=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.beforeInjectedText);break;case 6:i=this.getCSSTextForModelDecorationContentClassName(e.afterInjectedText),s=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.afterInjectedText),l=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.afterInjectedText);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const j=this._providerArgs.styleSheet;let W=!1;i.length>0&&(j.insertRule(`${this._unThemedSelector} {${i}}`,0),W=!0),s.length>0&&(j.insertRule(`.vs${this._unThemedSelector} {${s}}`,0),W=!0),l.length>0&&(j.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${l}}`,0),W=!0),this._hasContent=W}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(e){if(!e)return"";const i=[];return this.collectCSSText(e,["backgroundColor"],i),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],i),this.collectBorderSettingsCSSText(e,i),i.join("")}getCSSTextForModelDecorationInlineClassName(e){if(!e)return"";const i=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],i),e.letterSpacing&&(this._hasLetterSpacing=!0),i.join("")}getCSSTextForModelDecorationContentClassName(e){if(!e)return"";const i=[];if(typeof e!="undefined"){if(this.collectBorderSettingsCSSText(e,i),typeof e.contentIconPath!="undefined"&&i.push(Ue.v(R.contentIconPath,ve.s(A.a.revive(e.contentIconPath)))),typeof e.contentText=="string"){const s=e.contentText.match(/^.*$/m)[0],l=s.replace(/['\\]/g,"\\$&");i.push(Ue.v(R.contentText,l))}this.collectCSSText(e,["verticalAlign","fontStyle","fontWeight","fontSize","fontFamily","textDecoration","color","opacity","backgroundColor","margin","padding"],i),this.collectCSSText(e,["width","height"],i)&&i.push("display:inline-block;")}return i.join("")}getCSSTextForModelDecorationGlyphMarginClassName(e){if(!e)return"";const i=[];return typeof e.gutterIconPath!="undefined"&&(i.push(Ue.v(R.gutterIconPath,ve.s(A.a.revive(e.gutterIconPath)))),typeof e.gutterIconSize!="undefined"&&i.push(Ue.v(R.gutterIconSize,e.gutterIconSize))),i.join("")}collectBorderSettingsCSSText(e,i){return this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],i)?(i.push(Ue.v("box-sizing: border-box;")),!0):!1}collectCSSText(e,i,s){const l=s.length;for(let j of i){const W=this.resolveValue(e[j]);typeof W=="string"&&s.push(Ue.v(R[j],W))}return s.length!==l}resolveValue(e){if(Object(Et.b)(e)){this._usesThemeColors=!0;const i=this._theme.getColor(e.id);return i?i.toString():"transparent"}return e}}class me{static getClassName(e,i){return"ced-"+e+"-"+i}static getSelector(e,i,s){let l=".monaco-editor ."+this.getClassName(e,s);return i&&(l=l+"."+this.getClassName(i,s)),s===3?l+="::before":s===4&&(l+="::after"),l}}var _e=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},He=function(e,i){return function(s,l){i(s,l,e)}};let $e=class extends n{constructor(i,s,l){super(i,l);this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=s.createKey("editorIsOpen",!1),this._activeCodeEditor=null}_checkContextKey(){let i=!1;for(const s of this.listCodeEditors())if(!s.isSimpleWidget){i=!0;break}this._editorIsOpen.set(i)}setActiveCodeEditor(i){this._activeCodeEditor=i}getActiveCodeEditor(){return this._activeCodeEditor}openCodeEditor(i,s,l){return s?Promise.resolve(this.doOpenEditor(s,i)):Promise.resolve(null)}doOpenEditor(i,s){const l=this.findModel(i,s.resource);if(!l){if(s.resource){const W=s.resource.scheme;if(W===ye.c.http||W===ye.c.https)return Object(ve.Z)(s.resource.toString()),i}return null}const j=s.options?s.options.selection:null;if(j)if(typeof j.endLineNumber=="number"&&typeof j.endColumn=="number")i.setSelection(j),i.revealRangeInCenter(j,1);else{const W={lineNumber:j.startLineNumber,column:j.startColumn};i.setPosition(W),i.revealPositionInCenter(W,1)}return i}findModel(i,s){const l=i.getModel();return l&&l.uri.toString()!==s.toString()?null:l}};$e=_e([He(1,Ct.b),He(2,nn.b)],$e);var ot=t("ubTv"),Ot=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},gt=function(e,i){return function(s,l){i(s,l,e)}};let kt=0,Kt=!1;function eo(e){if(!e){if(Kt)return;Kt=!0}tr.b(e||document.body)}let co=class extends or.a{constructor(i,s,l,j,W,z,de,Fe,st,Ze){const wt=Object.assign({},s);wt.ariaLabel=wt.ariaLabel||Ki.g.editorViewAccessibleLabel,wt.ariaLabel=wt.ariaLabel+";"+Ki.g.accessibilityHelpMessage,super(i,wt,{},l,j,W,z,Fe,st,Ze),de instanceof ns?this._standaloneKeybindingService=de:this._standaloneKeybindingService=null,eo(wt.ariaContainerElement)}addCommand(i,s,l){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;let j="DYNAMIC_"+ ++kt,W=Ct.a.deserialize(l);return this._standaloneKeybindingService.addDynamicKeybinding(j,i,s,W),j}createContextKey(i,s){return this._contextKeyService.createKey(i,s)}addAction(i){if(typeof i.id!="string"||typeof i.label!="string"||typeof i.run!="function")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"),Xe.a.None;const s=i.id,l=i.label,j=Ct.a.and(Ct.a.equals("editorId",this.getId()),Ct.a.deserialize(i.precondition)),W=i.keybindings,z=Ct.a.and(j,Ct.a.deserialize(i.keybindingContext)),de=i.contextMenuGroupId||null,Fe=i.contextMenuOrder||0,st=(lo,...po)=>Promise.resolve(i.run(this,...po)),Ze=new Xe.b,wt=this.getId()+":"+s;if(Ze.add(Me.a.registerCommand(wt,st)),de){let lo={command:{id:wt,title:l},when:j,group:de,order:Fe};Ze.add(Tn.d.appendMenuItem(Tn.b.EditorContext,lo))}if(Array.isArray(W))for(const lo of W)Ze.add(this._standaloneKeybindingService.addDynamicKeybinding(wt,lo,st,z));let to=new aa.a(wt,l,l,j,st,this._contextKeyService);return this._actions[s]=to,Ze.add(Object(Xe.i)(()=>{delete this._actions[s]})),Ze}_triggerCommand(i,s){if(this._codeEditorService instanceof $e)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(i,s)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(i,s)}};co=Ot([gt(2,vn.a),gt(3,Pe.a),gt(4,Me.b),gt(5,Ct.b),gt(6,ts.a),gt(7,nn.b),gt(8,Ko.a),gt(9,os.b)],co);let go=class extends co{constructor(i,s,l,j,W,z,de,Fe,st,Ze,wt,to,lo,po,Ho){const Vo=Object.assign({},s);Cs(to,Vo,!1);const ii=Ze.registerEditorContainer(i);typeof Vo.theme=="string"&&Ze.setTheme(Vo.theme),typeof Vo.autoDetectHighContrast!="undefined"&&Ze.setAutoDetectHighContrast(Boolean(Vo.autoDetectHighContrast));let Jo=Vo.model;delete Vo.model,super(i,Vo,j,W,z,de,Fe,Ze,wt,lo),this._contextViewService=st,this._configurationService=to,this._standaloneThemeService=Ze,this._register(l),this._register(ii);let Go;if(typeof Jo=="undefined"?(Go=jo(po,Ho,Vo.value||"",Vo.language||ot.a.text,void 0),this._ownsModel=!0):(Go=Jo,this._ownsModel=!1),this._attachModel(Go),Go){let Si={oldModelUrl:null,newModelUrl:Go.uri};this._onDidChangeModel.fire(Si)}}dispose(){super.dispose()}updateOptions(i){Cs(this._configurationService,i,!1),typeof i.theme=="string"&&this._standaloneThemeService.setTheme(i.theme),typeof i.autoDetectHighContrast!="undefined"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(i.autoDetectHighContrast)),super.updateOptions(i)}_attachModel(i){super._attachModel(i),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode)}_postDetachModelCleanup(i){super._postDetachModelCleanup(i),i&&this._ownsModel&&(i.dispose(),this._ownsModel=!1)}};go=Ot([gt(3,vn.a),gt(4,Pe.a),gt(5,Me.b),gt(6,Ct.b),gt(7,ts.a),gt(8,zn.b),gt(9,Ds.a),gt(10,Ko.a),gt(11,g.a),gt(12,os.b),gt(13,Li.a),gt(14,xo.a)],go);let yo=class extends Kn{constructor(i,s,l,j,W,z,de,Fe,st,Ze,wt,to,lo,po,Ho){const Vo=Object.assign({},s);Cs(to,Vo,!0);const ii=Ze.registerEditorContainer(i);typeof Vo.theme=="string"&&Ze.setTheme(Vo.theme),typeof Vo.autoDetectHighContrast!="undefined"&&Ze.setAutoDetectHighContrast(Boolean(Vo.autoDetectHighContrast)),super(i,Vo,{},Ho,Fe,W,j,st,Ze,wt,lo,po),this._contextViewService=de,this._configurationService=to,this._standaloneThemeService=Ze,this._register(l),this._register(ii),this._contextViewService.setContainer(this._containerDomElement)}dispose(){super.dispose()}updateOptions(i){Cs(this._configurationService,i,!0),typeof i.theme=="string"&&this._standaloneThemeService.setTheme(i.theme),typeof i.autoDetectHighContrast!="undefined"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(i.autoDetectHighContrast)),super.updateOptions(i)}_createInnerEditor(i,s,l){return i.createInstance(co,s,l)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(i,s,l){return this.getModifiedEditor().addCommand(i,s,l)}createContextKey(i,s){return this.getModifiedEditor().createContextKey(i,s)}addAction(i){return this.getModifiedEditor().addAction(i)}};yo=Ot([gt(3,vn.a),gt(4,Ct.b),gt(5,ts.a),gt(6,zn.b),gt(7,Mo.a),gt(8,Pe.a),gt(9,Ds.a),gt(10,Ko.a),gt(11,g.a),gt(12,zn.a),gt(13,Ws.a),gt(14,Bs.a)],yo);function jo(e,i,s,l,j){if(s=s||"",!l){const W=s.indexOf(`
|
|
|
`);let z=s;return W!==-1&&(z=s.substring(0,W)),Po(e,s,i.createByFilepathOrFirstLine(j||null,z),j)}return Po(e,s,i.create(l),j)}function Po(e,i,s,l){return e.createModel(i,s,l)}var ti=t("MqQJ"),oi=t("ic2d");const $o=Object.prototype.hasOwnProperty;class Yo{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(vo.a,0),this._register(ti.b,1),this._nextLanguageId=2}_register(e,i){this._languageIdToLanguage[i]=e,this._languageToLanguageId.set(e,i)}register(e){if(this._languageToLanguageId.has(e))return;const i=this._nextLanguageId++;this._register(e,i)}encodeLanguageId(e){return this._languageToLanguageId.get(e)||0}decodeLanguageId(e){return this._languageIdToLanguage[e]||vo.a}}class Ei extends Xe.a{constructor(e=!0,i=!1){super();this._onDidChange=this._register(new x.b),this.onDidChange=this._onDidChange.event,Ei.instanceCount++,this._warnOnOverwrite=i,this.languageIdCodec=new Yo,this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(ti.a.onDidChangeLanguages(s=>{this._initializeFromRegistry()})))}dispose(){Ei.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},ot.b();const e=ti.a.getLanguages();this._registerLanguages(e)}_registerLanguages(e){for(const i of e)this._registerLanguage(i);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(i=>{let s=this._languages[i];s.name&&(this._nameMap[s.name]=s.identifier),s.aliases.forEach(l=>{this._lowercaseNameMap[l.toLowerCase()]=s.identifier}),s.mimetypes.forEach(l=>{this._mimeTypesMap[l]=s.identifier})}),oi.a.as(u.a.Configuration).registerOverrideIdentifiers(ti.a.getLanguages().map(i=>i.id)),this._onDidChange.fire()}_registerLanguage(e){const i=e.id;let s;$o.call(this._languages,i)?s=this._languages[i]:(this.languageIdCodec.register(i),s={identifier:i,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},this._languages[i]=s),this._mergeLanguage(s,e)}_mergeLanguage(e,i){const s=i.id;let l=null;if(Array.isArray(i.mimetypes)&&i.mimetypes.length>0&&(e.mimetypes.push(...i.mimetypes),l=i.mimetypes[0]),l||(l=`text/x-${s}`,e.mimetypes.push(l)),Array.isArray(i.extensions)){i.configuration?e.extensions=i.extensions.concat(e.extensions):e.extensions=e.extensions.concat(i.extensions);for(let z of i.extensions)ot.d({id:s,mime:l,extension:z},this._warnOnOverwrite)}if(Array.isArray(i.filenames))for(let z of i.filenames)ot.d({id:s,mime:l,filename:z},this._warnOnOverwrite),e.filenames.push(z);if(Array.isArray(i.filenamePatterns))for(let z of i.filenamePatterns)ot.d({id:s,mime:l,filepattern:z},this._warnOnOverwrite);if(typeof i.firstLine=="string"&&i.firstLine.length>0){let z=i.firstLine;z.charAt(0)!=="^"&&(z="^"+z);try{let de=new RegExp(z);Ue.N(de)||ot.d({id:s,mime:l,firstline:de},this._warnOnOverwrite)}catch(de){Object(To.f)(de)}}e.aliases.push(s);let j=null;if(typeof i.aliases!="undefined"&&Array.isArray(i.aliases)&&(i.aliases.length===0?j=[null]:j=i.aliases),j!==null)for(const z of j){if(!z||z.length===0)continue;e.aliases.push(z)}let W=j!==null&&j.length>0;if(!(W&&j[0]===null)){let z=(W?j[0]:null)||s;(W||!e.name)&&(e.name=z)}i.configuration&&e.configurationFiles.push(i.configuration)}isRegisteredMode(e){return $o.call(this._mimeTypesMap,e)?!0:$o.call(this._languages,e)}getModeIdForLanguageNameLowercase(e){return $o.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e]:null}extractModeIds(e){return e?e.split(",").map(i=>i.trim()).map(i=>$o.call(this._mimeTypesMap,i)?this._mimeTypesMap[i]:i).filter(i=>$o.call(this._languages,i)):[]}validateLanguageId(e){return!e||e===vo.a?vo.a:$o.call(this._languages,e)?e:null}getModeIdsFromFilepathOrFirstLine(e,i){if(!e&&!i)return[];let s=ot.c(e,i);return this.extractModeIds(s.join(","))}}Ei.instanceCount=0;class Ci{constructor(e,i){this._selector=i,this.languageId=this._selector();let s;this._onDidChange=new x.b({onFirstListenerAdd:()=>{s=e(()=>this._evaluate())},onLastListenerRemove:()=>{s.dispose()}}),this.onDidChange=this._onDidChange.event}_evaluate(){const e=this._selector();if(e===this.languageId)return;this.languageId=e,this._onDidChange.fire(this.languageId)}}class bi extends Xe.a{constructor(e=!1){super();this._onDidEncounterLanguage=this._register(new x.b),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onLanguagesMaybeChanged=this._register(new x.b({leakWarningThreshold:200})),this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,bi.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new Ei(!0,e)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onLanguagesMaybeChanged.fire()))}dispose(){bi.instanceCount--,super.dispose()}isRegisteredMode(e){return this._registry.isRegisteredMode(e)}getModeIdForLanguageName(e){return this._registry.getModeIdForLanguageNameLowercase(e)}getModeIdByFilepathOrFirstLine(e,i){const s=this._registry.getModeIdsFromFilepathOrFirstLine(e,i);return Object(fi.j)(s,null)}getModeId(e){const i=this._registry.extractModeIds(e);return Object(fi.j)(i,null)}validateLanguageId(e){return this._registry.validateLanguageId(e)}create(e){return new Ci(this.onLanguagesMaybeChanged,()=>{const i=this.getModeId(e);return this._createModeAndGetLanguageIdentifier(i)})}createByFilepathOrFirstLine(e,i){return new Ci(this.onLanguagesMaybeChanged,()=>{const s=this.getModeIdByFilepathOrFirstLine(e,i);return this._createModeAndGetLanguageIdentifier(s)})}_createModeAndGetLanguageIdentifier(e){const i=this.validateLanguageId(e||"plaintext")||vo.a;return this._getOrCreateMode(i),i}triggerMode(e){const i=this.getModeId(e);this._getOrCreateMode(i||"plaintext")}_getOrCreateMode(e){if(!this._encounteredLanguages.has(e)){this._encounteredLanguages.add(e);const i=this.validateLanguageId(e)||vo.a;this._onDidEncounterLanguage.fire(i)}}}bi.instanceCount=0;var ji=t("OAO6"),ln=t("7afs"),Xi=t("oFSf"),dn=t("QRHv"),Cn=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},un=function(e,i){return function(s,l){i(s,l,e)}};let hn=class{constructor(i,s,l,j){this._legend=i,this._themeService=s,this._modeService=l,this._logService=j,this._hashTable=new cs,this._hasWarnedOverlappingTokens=!1}getMetadata(i,s,l){const j=this._modeService.languageIdCodec.encodeLanguageId(l),W=this._hashTable.get(i,s,j);let z;if(W)z=W.metadata,this._logService.getLevel()===$i.c.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${i} / ${s}: foreground ${Rt.D.getForeground(z)}, fontStyle ${Rt.D.getFontStyle(z).toString(2)}`);else{let de=this._legend.tokenTypes[i];const Fe=[];if(de){let st=s;for(let wt=0;st>0&&wt<this._legend.tokenModifiers.length;wt++)st&1&&Fe.push(this._legend.tokenModifiers[wt]),st=st>>1;st>0&&this._logService.getLevel()===$i.c.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${s.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),Fe.push("not-in-legend"));const Ze=this._themeService.getColorTheme().getTokenStyleMetadata(de,Fe,l);if(typeof Ze=="undefined")z=2147483647;else{if(z=0,typeof Ze.italic!="undefined"){const wt=(Ze.italic?1:0)<<11;z|=wt|1}if(typeof Ze.bold!="undefined"){const wt=(Ze.bold?2:0)<<11;z|=wt|2}if(typeof Ze.underline!="undefined"){const wt=(Ze.underline?4:0)<<11;z|=wt|4}if(Ze.foreground){const wt=Ze.foreground<<14;z|=wt|8}z===0&&(z=2147483647)}}else this._logService.getLevel()===$i.c.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${i} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),z=2147483647,de="not-in-legend";this._hashTable.add(i,s,j,z),this._logService.getLevel()===$i.c.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${i} (${de}) / ${s} (${Fe.join(" ")}): foreground ${Rt.D.getForeground(z)}, fontStyle ${Rt.D.getFontStyle(z).toString(2)}`)}return z}warnOverlappingSemanticTokens(i,s){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${i}, column ${s}`))}};hn=Cn([un(1,nn.b),un(2,xo.a),un(3,$i.b)],hn);function Nn(e,i,s){const l=e.data,j=e.data.length/5|0,W=Math.max(Math.ceil(j/1024),400),z=[];let de=0,Fe=1,st=0;for(;de<j;){const Ze=de;let wt=Math.min(Ze+W,j);if(wt<j){let Go=wt;for(;Go-1>Ze&&l[5*Go]===0;)Go--;if(Go-1===Ze){let Si=wt;for(;Si+1<j&&l[5*Si]===0;)Si++;wt=Si}else wt=Go}let to=new Uint32Array((wt-Ze)*4),lo=0,po=0,Ho=0,Vo=0,ii=0;for(;de<wt;){const Go=5*de,Si=l[Go],Ai=l[Go+1],ai=Fe+Si|0,Fo=Si===0?st+Ai|0:Ai,Xo=l[Go+2],ei=l[Go+3],Mi=l[Go+4],qi=i.getMetadata(ei,Mi,s);qi!==2147483647&&(po===0&&(po=ai),Ho===ai&&ii>Fo&&(i.warnOverlappingSemanticTokens(ai,Fo+1),Vo<Fo?to[lo-4+2]=Fo:lo-=4),to[lo]=ai-po,to[lo+1]=Fo,to[lo+2]=Fo+Xo,to[lo+3]=qi,lo+=4,Ho=ai,Vo=Fo,ii=Fo+Xo),Fe=ai,st=Fo,de++}lo!==to.length&&(to=to.subarray(0,lo));const Jo=new dn.a(po,new dn.c(to));z.push(Jo)}return z}class Jl{constructor(e,i,s,l){this.tokenTypeIndex=e,this.tokenModifierSet=i,this.languageId=s,this.metadata=l,this.next=null}}class cs{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=cs._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<cs._SIZES.length?2/3*this._currentLength:0),this._elements=[],cs._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,i){for(let s=0;s<i;s++)e[s]=null}_hash2(e,i){return(e<<5)-e+i|0}_hashFunc(e,i,s){return this._hash2(this._hash2(e,i),s)%this._currentLength}get(e,i,s){const l=this._hashFunc(e,i,s);let j=this._elements[l];for(;j;){if(j.tokenTypeIndex===e&&j.tokenModifierSet===i&&j.languageId===s)return j;j=j.next}return null}add(e,i,s,l){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const j=this._elements;this._currentLengthIndex++,this._currentLength=cs._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<cs._SIZES.length?2/3*this._currentLength:0),this._elements=[],cs._nullOutEntries(this._elements,this._currentLength);for(const W of j){let z=W;for(;z;){const de=z.next;z.next=null,this._add(z),z=de}}}this._add(new Jl(e,i,s,l))}_add(e){const i=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[i],this._elements[i]=e}}cs._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143];var ql=t("HpOR");function ed(e){for(let i=0,s=e.length;i<s;i+=4){const l=e[i+0],j=e[i+1],W=e[i+2],z=e[i+3];e[i+0]=z,e[i+1]=W,e[i+2]=j,e[i+3]=l}}function td(e){const i=new Uint8Array(e.buffer,e.byteOffset,e.length*4);return Ht.e()||ed(i),ql.a.wrap(i)}function Za(e){const i=new Uint32Array(od(e));let s=0;if(i[s++]=e.id,e.type==="full")i[s++]=1,i[s++]=e.data.length,i.set(e.data,s),s+=e.data.length;else{i[s++]=2,i[s++]=e.deltas.length;for(const l of e.deltas)i[s++]=l.start,i[s++]=l.deleteCount,l.data?(i[s++]=l.data.length,i.set(l.data,s),s+=l.data.length):i[s++]=0}return td(i)}function od(e){let i=0;if(i+=1+1,e.type==="full")i+=1+e.data.length;else{i+=1,i+=(1+1+1)*e.deltas.length;for(const s of e.deltas)s.data&&(i+=s.data.length)}return i}var us=function(e,i,s,l){function j(W){return W instanceof s?W:new s(function(z){z(W)})}return new(s||(s=Promise))(function(W,z){function de(Ze){try{st(l.next(Ze))}catch(wt){z(wt)}}function Fe(Ze){try{st(l.throw(Ze))}catch(wt){z(wt)}}function st(Ze){Ze.done?W(Ze.value):j(Ze.value).then(de,Fe)}st((l=l.apply(e,i||[])).next())})};function Lr(e){return e&&!!e.data}function Qa(e){return e&&Array.isArray(e.edits)}class id{constructor(e,i){this.provider=e,this.tokens=i}}function Ja(e){return Rt.l.has(e)}function nd(e){const i=Rt.l.orderedGroups(e);return i.length>0?i[0]:[]}function qa(e,i,s,l){return us(this,void 0,void 0,function*(){const j=nd(e),W=yield Promise.all(j.map(z=>us(this,void 0,void 0,function*(){let de;try{de=yield z.provideDocumentSemanticTokens(e,z===i?s:null,l)}catch(Fe){Object(To.g)(Fe),de=null}return(!de||!Lr(de)&&!Qa(de))&&(de=null),new id(z,de)})));for(const z of W)if(z.tokens)return z;return W.length>0?W[0]:null})}function sd(e){const i=Rt.l.orderedGroups(e);return i.length>0?i[0]:null}class rd{constructor(e,i){this.provider=e,this.tokens=i}}function eh(e){return Rt.k.has(e)}function el(e){const i=Rt.k.orderedGroups(e);return i.length>0?i[0]:[]}function tl(e,i,s){return us(this,void 0,void 0,function*(){const l=el(e),j=yield Promise.all(l.map(W=>us(this,void 0,void 0,function*(){let z;try{z=yield W.provideDocumentRangeSemanticTokens(e,i,s)}catch(de){Object(To.g)(de),z=null}return(!z||!Lr(z))&&(z=null),new rd(W,z)})));for(const W of j)if(W.tokens)return W;return j.length>0?j[0]:null})}Me.a.registerCommand("_provideDocumentSemanticTokensLegend",(e,...i)=>us(void 0,void 0,void 0,function*(){const[s]=i;Object(Mt.c)(s instanceof A.a);const l=e.get(Li.a).getModel(s);if(!l)return;const j=sd(l);return j?j[0].getLegend():e.get(Me.b).executeCommand("_provideDocumentRangeSemanticTokensLegend",s)})),Me.a.registerCommand("_provideDocumentSemanticTokens",(e,...i)=>us(void 0,void 0,void 0,function*(){const[s]=i;Object(Mt.c)(s instanceof A.a);const l=e.get(Li.a).getModel(s);if(!l)return;if(!Ja(l))return e.get(Me.b).executeCommand("_provideDocumentRangeSemanticTokens",s,l.getFullModelRange());const j=yield qa(l,null,null,B.a.None);if(!j)return;const{provider:W,tokens:z}=j;if(!z||!Lr(z))return;const de=Za({id:0,type:"full",data:z.data});return z.resultId&&W.releaseDocumentSemanticTokens(z.resultId),de})),Me.a.registerCommand("_provideDocumentRangeSemanticTokensLegend",(e,...i)=>us(void 0,void 0,void 0,function*(){const[s,l]=i;Object(Mt.c)(s instanceof A.a);const j=e.get(Li.a).getModel(s);if(!j)return;const W=el(j);if(W.length===0)return;if(W.length===1)return W[0].getLegend();if(!l||!I.a.isIRange(l))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),W[0].getLegend();const z=yield tl(j,I.a.lift(l),B.a.None);return z?z.provider.getLegend():void 0})),Me.a.registerCommand("_provideDocumentRangeSemanticTokens",(e,...i)=>us(void 0,void 0,void 0,function*(){const[s,l]=i;Object(Mt.c)(s instanceof A.a),Object(Mt.c)(I.a.isIRange(l));const j=e.get(Li.a).getModel(s);if(!j)return;const W=yield tl(j,I.a.lift(l),B.a.None);return!W||!W.tokens?void 0:Za({id:0,type:"full",data:W.tokens.data})}));var ad=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},Ms=function(e,i){return function(s,l){i(s,l,e)}};function hs(e){return e.toString()}function ol(e){const i=new ln.a,s=e.createSnapshot();let l;for(;l=s.read();)i.update(l);return i.digest()}class ld{constructor(e,i,s){this._modelEventListeners=new Xe.b,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose(()=>i(e))),this._modelEventListeners.add(e.onDidChangeLanguage(l=>s(e,l)))}_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 dd=Ht.d||Ht.f?1:2;class cd{constructor(e,i,s,l,j,W,z,de){this.uri=e,this.initialUndoRedoSnapshot=i,this.time=s,this.sharesUndoRedoStack=l,this.heapSize=j,this.sha1=W,this.versionId=z,this.alternativeVersionId=de}}let _r=class e extends Xe.a{constructor(i,s,l,j,W,z,de){super();this._configurationService=i,this._resourcePropertiesService=s,this._themeService=l,this._logService=j,this._undoRedoService=W,this._modeService=z,this._languageConfigurationService=de,this._onModelAdded=this._register(new x.b),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new x.b),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new x.b),this.onModelModeChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new hd(this._themeService,this._modeService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new ud(this,this._themeService,this._configurationService,this._semanticStyling))}static _readModelOptions(i,s){var l;let j=f.d.tabSize;if(i.editor&&typeof i.editor.tabSize!="undefined"){const lo=parseInt(i.editor.tabSize,10);isNaN(lo)||(j=lo),j<1&&(j=1)}let W=j;if(i.editor&&typeof i.editor.indentSize!="undefined"&&i.editor.indentSize!=="tabSize"){const lo=parseInt(i.editor.indentSize,10);isNaN(lo)||(W=lo),W<1&&(W=1)}let z=f.d.insertSpaces;i.editor&&typeof i.editor.insertSpaces!="undefined"&&(z=i.editor.insertSpaces==="false"?!1:Boolean(i.editor.insertSpaces));let de=dd;const Fe=i.eol;Fe===`\r
|
|
|
`?de=2:Fe===`
|
|
|
`&&(de=1);let st=f.d.trimAutoWhitespace;i.editor&&typeof i.editor.trimAutoWhitespace!="undefined"&&(st=i.editor.trimAutoWhitespace==="false"?!1:Boolean(i.editor.trimAutoWhitespace));let Ze=f.d.detectIndentation;i.editor&&typeof i.editor.detectIndentation!="undefined"&&(Ze=i.editor.detectIndentation==="false"?!1:Boolean(i.editor.detectIndentation));let wt=f.d.largeFileOptimizations;i.editor&&typeof i.editor.largeFileOptimizations!="undefined"&&(wt=i.editor.largeFileOptimizations==="false"?!1:Boolean(i.editor.largeFileOptimizations));let to=f.d.bracketPairColorizationOptions;return((l=i.editor)===null||l===void 0?void 0:l.bracketPairColorization)&&typeof i.editor.bracketPairColorization=="object"&&(to={enabled:!!i.editor.bracketPairColorization.enabled}),{isForSimpleWidget:s,tabSize:j,indentSize:W,insertSpaces:z,detectIndentation:Ze,defaultEOL:de,trimAutoWhitespace:st,largeFileOptimizations:wt,bracketPairColorizationOptions:to}}_getEOL(i,s){if(i)return this._resourcePropertiesService.getEOL(i,s);const l=this._configurationService.getValue("files.eol",{overrideIdentifier:s});return l&&typeof l=="string"&&l!=="auto"?l:Ht.a===3||Ht.a===2?`
|
|
|
`:`\r
|
|
|
`}_shouldRestoreUndoStack(){const i=this._configurationService.getValue("files.restoreUndoStack");return typeof i=="boolean"?i:!0}getCreationOptions(i,s,l){let j=this._modelCreationOptionsByLanguageAndResource[i+s];if(!j){const W=this._configurationService.getValue("editor",{overrideIdentifier:i,resource:s}),z=this._getEOL(s,i);j=e._readModelOptions({editor:W,eol:z},l),this._modelCreationOptionsByLanguageAndResource[i+s]=j}return j}_updateModelOptions(){const i=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const s=Object.keys(this._models);for(let l=0,j=s.length;l<j;l++){const W=s[l],z=this._models[W],de=z.model.getLanguageId(),Fe=z.model.uri,st=i[de+Fe],Ze=this.getCreationOptions(de,Fe,z.model.isForSimpleWidget);e._setModelOptionsForModel(z.model,Ze,st)}}static _setModelOptionsForModel(i,s,l){if(l&&l.defaultEOL!==s.defaultEOL&&i.getLineCount()===1&&i.setEOL(s.defaultEOL===1?0:1),l&&l.detectIndentation===s.detectIndentation&&l.insertSpaces===s.insertSpaces&&l.tabSize===s.tabSize&&l.indentSize===s.indentSize&&l.trimAutoWhitespace===s.trimAutoWhitespace&&Object(it.d)(l.bracketPairColorizationOptions,s.bracketPairColorizationOptions))return;s.detectIndentation?(i.detectIndentation(s.insertSpaces,s.tabSize),i.updateOptions({trimAutoWhitespace:s.trimAutoWhitespace,bracketColorizationOptions:s.bracketPairColorizationOptions})):i.updateOptions({insertSpaces:s.insertSpaces,tabSize:s.tabSize,indentSize:s.indentSize,trimAutoWhitespace:s.trimAutoWhitespace,bracketColorizationOptions:s.bracketPairColorizationOptions})}_insertDisposedModel(i){this._disposedModels.set(hs(i.uri),i),this._disposedModelsHeapSize+=i.heapSize}_removeDisposedModel(i){const s=this._disposedModels.get(hs(i));return s&&(this._disposedModelsHeapSize-=s.heapSize),this._disposedModels.delete(hs(i)),s}_ensureDisposedModelsHeapSize(i){if(this._disposedModelsHeapSize>i){const s=[];for(this._disposedModels.forEach(l=>{l.sharesUndoRedoStack||s.push(l)}),s.sort((l,j)=>l.time-j.time);s.length>0&&this._disposedModelsHeapSize>i;){const l=s.shift();this._removeDisposedModel(l.uri),l.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(l.initialUndoRedoSnapshot)}}}_createModelData(i,s,l,j){const W=this.getCreationOptions(s,l,j),z=new Vn.c(i,W,s,l,this._undoRedoService,this._modeService,this._languageConfigurationService);if(l&&this._disposedModels.has(hs(l))){const st=this._removeDisposedModel(l),Ze=this._undoRedoService.getElements(l),wt=ol(z)===st.sha1;if(wt||st.sharesUndoRedoStack){for(const to of Ze.past)Object(Xi.b)(to)&&to.matchesResource(l)&&to.setModel(z);for(const to of Ze.future)Object(Xi.b)(to)&&to.matchesResource(l)&&to.setModel(z);this._undoRedoService.setElementsValidFlag(l,!0,to=>Object(Xi.b)(to)&&to.matchesResource(l)),wt&&(z._overwriteVersionId(st.versionId),z._overwriteAlternativeVersionId(st.alternativeVersionId),z._overwriteInitialUndoRedoSnapshot(st.initialUndoRedoSnapshot))}else st.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(st.initialUndoRedoSnapshot)}const de=hs(z.uri);if(this._models[de])throw new Error("ModelService: Cannot add model because it already exists!");const Fe=new ld(z,st=>this._onWillDispose(st),(st,Ze)=>this._onDidChangeLanguage(st,Ze));return this._models[de]=Fe,Fe}createModel(i,s,l,j=!1){let W;return s?(W=this._createModelData(i,s.languageId,l,j),this.setMode(W.model,s)):W=this._createModelData(i,ti.b,l,j),this._onModelAdded.fire(W.model),W.model}setMode(i,s){if(!s)return;const l=this._models[hs(i.uri)];if(!l)return;l.setLanguage(s)}getModels(){const i=[],s=Object.keys(this._models);for(let l=0,j=s.length;l<j;l++){const W=s[l];i.push(this._models[W].model)}return i}getModel(i){const s=hs(i),l=this._models[s];return l?l.model:null}getSemanticTokensProviderStyling(i){return this._semanticStyling.get(i)}_schemaShouldMaintainUndoRedoElements(i){return i.scheme===ye.c.file||i.scheme===ye.c.vscodeRemote||i.scheme===ye.c.userData||i.scheme===ye.c.vscodeNotebookCell||i.scheme==="fake-fs"}_onWillDispose(i){const s=hs(i.uri),l=this._models[s],j=this._undoRedoService.getUriComparisonKey(i.uri)!==i.uri.toString();let W=!1,z=0;if(j||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(i.uri)){const Fe=this._undoRedoService.getElements(i.uri);if(Fe.past.length>0||Fe.future.length>0){for(const st of Fe.past)Object(Xi.b)(st)&&st.matchesResource(i.uri)&&(W=!0,z+=st.heapSize(i.uri),st.setModel(i.uri));for(const st of Fe.future)Object(Xi.b)(st)&&st.matchesResource(i.uri)&&(W=!0,z+=st.heapSize(i.uri),st.setModel(i.uri))}}const de=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(W)if(!j&&z>de){const Fe=l.model.getInitialUndoRedoSnapshot();Fe!==null&&this._undoRedoService.restoreSnapshot(Fe)}else this._ensureDisposedModelsHeapSize(de-z),this._undoRedoService.setElementsValidFlag(i.uri,!1,Fe=>Object(Xi.b)(Fe)&&Fe.matchesResource(i.uri)),this._insertDisposedModel(new cd(i.uri,l.model.getInitialUndoRedoSnapshot(),Date.now(),j,z,ol(i),i.getVersionId(),i.getAlternativeVersionId()));else if(!j){const Fe=l.model.getInitialUndoRedoSnapshot();Fe!==null&&this._undoRedoService.restoreSnapshot(Fe)}delete this._models[s],l.dispose(),delete this._modelCreationOptionsByLanguageAndResource[i.getLanguageId()+i.uri],this._onModelRemoved.fire(i)}_onDidChangeLanguage(i,s){const l=s.oldLanguage,j=i.getLanguageId(),W=this.getCreationOptions(l,i.uri,i.isForSimpleWidget),z=this.getCreationOptions(j,i.uri,i.isForSimpleWidget);e._setModelOptionsForModel(i,z,W),this._onModelModeChanged.fire({model:i,oldModeId:l})}};_r.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,_r=ad([Ms(0,g.a),Ms(1,Ui.b),Ms(2,nn.b),Ms(3,$i.b),Ms(4,ji.a),Ms(5,xo.a),Ms(6,St.a)],_r);const il="editor.semanticHighlighting";function nl(e,i,s){var l;const j=(l=s.getValue(il,{overrideIdentifier:e.getLanguageId(),resource:e.uri}))===null||l===void 0?void 0:l.enabled;return typeof j=="boolean"?j:i.getColorTheme().semanticHighlighting}class ud extends Xe.a{constructor(e,i,s,l){super();this._watchers=Object.create(null),this._semanticStyling=l;const j=de=>{this._watchers[de.uri.toString()]=new zs(de,i,this._semanticStyling)},W=(de,Fe)=>{Fe.dispose(),delete this._watchers[de.uri.toString()]},z=()=>{for(let de of e.getModels()){const Fe=this._watchers[de.uri.toString()];nl(de,i,s)?Fe||j(de):Fe&&W(de,Fe)}};this._register(e.onModelAdded(de=>{nl(de,i,s)&&j(de)})),this._register(e.onModelRemoved(de=>{const Fe=this._watchers[de.uri.toString()];Fe&&W(de,Fe)})),this._register(s.onDidChangeConfiguration(de=>{de.affectsConfiguration(il)&&z()})),this._register(i.onDidColorThemeChange(z))}}class hd extends Xe.a{constructor(e,i,s){super();this._themeService=e,this._modeService=i,this._logService=s,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 hn(e.getLegend(),this._themeService,this._modeService,this._logService)),this._caches.get(e)}}class md{constructor(e,i,s){this.provider=e,this.resultId=i,this.data=s}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}class zs extends Xe.a{constructor(e,i,s){super();this._isDisposed=!1,this._model=e,this._semanticStyling=s,this._fetchDocumentSemanticTokens=this._register(new Lo.e(()=>this._fetchDocumentSemanticTokensNow(),zs.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()})),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 l=()=>{Object(Xe.f)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const j of Rt.l.all(e))typeof j.onDidChange=="function"&&this._documentProvidersChangeListeners.push(j.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};l(),this._register(Rt.l.onDidChange(()=>{l(),this._fetchDocumentSemanticTokens.schedule()})),this._register(i.onDidColorThemeChange(j=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule()})),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(!Ja(this._model)){this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1);return}const e=new B.b,i=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,s=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,l=qa(this._model,i,s,e.token);this._currentDocumentRequestCancellationTokenSource=e;const j=[],W=this._model.onDidChangeContent(z=>{j.push(z)});l.then(z=>{if(this._currentDocumentRequestCancellationTokenSource=null,W.dispose(),!z)this._setDocumentSemanticTokens(null,null,null,j);else{const{provider:de,tokens:Fe}=z,st=this._semanticStyling.get(de);this._setDocumentSemanticTokens(de,Fe||null,st,j)}},z=>{const de=z&&(To.e(z)||typeof z.message=="string"&&z.message.indexOf("busy")!==-1);de||To.f(z),this._currentDocumentRequestCancellationTokenSource=null,W.dispose(),j.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule())})}static _copy(e,i,s,l,j){for(let W=0;W<j;W++)s[l+W]=e[i+W]}_setDocumentSemanticTokens(e,i,s,l){const j=this._currentDocumentResponse,W=()=>{l.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule()};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&i&&e.releaseDocumentSemanticTokens(i.resultId);return}if(!e||!s){this._model.setSemanticTokens(null,!1);return}if(!i){this._model.setSemanticTokens(null,!0),W();return}if(Qa(i)){if(!j){this._model.setSemanticTokens(null,!0);return}if(i.edits.length===0)i={resultId:i.resultId,data:j.data};else{let z=0;for(const wt of i.edits)z+=(wt.data?wt.data.length:0)-wt.deleteCount;const de=j.data,Fe=new Uint32Array(de.length+z);let st=de.length,Ze=Fe.length;for(let wt=i.edits.length-1;wt>=0;wt--){const to=i.edits[wt],lo=st-(to.start+to.deleteCount);lo>0&&(zs._copy(de,st-lo,Fe,Ze-lo,lo),Ze-=lo),to.data&&(zs._copy(to.data,0,Fe,Ze-to.data.length,to.data.length),Ze-=to.data.length),st=to.start}st>0&&zs._copy(de,0,Fe,0,st),i={resultId:i.resultId,data:Fe}}}if(Lr(i)){this._currentDocumentResponse=new md(e,i.resultId,i.data);const z=Nn(i,s,this._model.getLanguageId());if(l.length>0)for(const de of l)for(const Fe of z)for(const st of de.changes)Fe.applyEdit(st.range,st.text);this._model.setSemanticTokens(z,!0)}else this._model.setSemanticTokens(null,!0);W()}}zs.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY=300;var ms=t("zrhQ");class gd{constructor(e,i,s,l,j){this._parsedThemeRuleBrand=void 0,this.token=e,this.index=i,this.fontStyle=s,this.foreground=l,this.background=j}}function fd(e){if(!e||!Array.isArray(e))return[];let i=[],s=0;for(let l=0,j=e.length;l<j;l++){let W=e[l],z=-1;if(typeof W.fontStyle=="string"){z=0;let st=W.fontStyle.split(" ");for(let Ze=0,wt=st.length;Ze<wt;Ze++){let to=st[Ze];switch(to){case"italic":z=z|1;break;case"bold":z=z|2;break;case"underline":z=z|4;break}}}let de=null;typeof W.foreground=="string"&&(de=W.foreground);let Fe=null;typeof W.background=="string"&&(Fe=W.background),i[s++]=new gd(W.token||"",l,z,de,Fe)}return i}function pd(e,i){e.sort((Ze,wt)=>{let to=Ed(Ze.token,wt.token);return to!==0?to:Ze.index-wt.index});let s=0,l="000000",j="ffffff";for(;e.length>=1&&e[0].token==="";){let Ze=e.shift();Ze.fontStyle!==-1&&(s=Ze.fontStyle),Ze.foreground!==null&&(l=Ze.foreground),Ze.background!==null&&(j=Ze.background)}let W=new vd;for(let Ze of i)W.getId(Ze);let z=W.getId(l),de=W.getId(j),Fe=new rl(s,z,de),st=new al(Fe);for(let Ze=0,wt=e.length;Ze<wt;Ze++){let to=e[Ze];st.insert(to.token,to.fontStyle,W.getId(to.foreground),W.getId(to.background))}return new sl(W,st)}const bd=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class vd{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(e===null)return 0;const i=e.match(bd);if(!i)throw new Error("Illegal value for token color: "+e);e=i[1].toUpperCase();let s=this._color2id.get(e);return s||(s=++this._lastColorId,this._color2id.set(e,s),this._id2color[s]=ms.a.fromHex("#"+e),s)}getColorMap(){return this._id2color.slice(0)}}class sl{constructor(e,i){this._colorMap=e,this._root=i,this._cache=new Map}static createFromRawTokenTheme(e,i){return this.createFromParsedTokenTheme(fd(e),i)}static createFromParsedTokenTheme(e,i){return pd(e,i)}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,i){let s=this._cache.get(i);if(typeof s=="undefined"){let l=this._match(i),j=yd(i);s=(l.metadata|j<<8)>>>0,this._cache.set(i,s)}return(s|e<<0)>>>0}}const Cd=/\b(comment|string|regex|regexp)\b/;function yd(e){let i=e.match(Cd);if(!i)return 0;switch(i[1]){case"comment":return 1;case"string":return 2;case"regex":return 4;case"regexp":return 4}throw new Error("Unexpected match for standard token type!")}function Ed(e,i){return e<i?-1:e>i?1:0}class rl{constructor(e,i,s){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=i,this._background=s,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}clone(){return new rl(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,i,s){e!==-1&&(this._fontStyle=e),i!==0&&(this._foreground=i),s!==0&&(this._background=s),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}class al{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;let i=e.indexOf("."),s,l;i===-1?(s=e,l=""):(s=e.substring(0,i),l=e.substring(i+1));let j=this._children.get(s);return typeof j!="undefined"?j.match(l):this._mainRule}insert(e,i,s,l){if(e===""){this._mainRule.acceptOverwrite(i,s,l);return}let j=e.indexOf("."),W,z;j===-1?(W=e,z=""):(W=e.substring(0,j),z=e.substring(j+1));let de=this._children.get(W);typeof de=="undefined"&&(de=new al(this._mainRule.clone()),this._children.set(W,de)),de.insert(z,i,s,l)}}function Sd(e){let i=[];for(let s=1,l=e.length;s<l;s++){let j=e[s];i[s]=`.mtk${s} { color: ${j}; }`}return i.push(".mtki { font-style: italic; }"),i.push(".mtkb { font-weight: bold; }"),i.push(".mtku { text-decoration: underline; text-underline-position: under; }"),i.join(`
|
|
|
`)}const wd={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:{[ni.r]:"#FFFFFE",[ni.B]:"#000000",[ni.J]:"#E5EBF1",[Hn.A]:"#D3D3D3",[Hn.a]:"#939393",[ni.R]:"#ADD6FF4D"}},Ld={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:{[ni.r]:"#1E1E1E",[ni.B]:"#D4D4D4",[ni.J]:"#3A3D41",[Hn.A]:"#404040",[Hn.a]:"#707070",[ni.R]:"#ADD6FF26"}},_d={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:{[ni.r]:"#000000",[ni.B]:"#FFFFFF",[Hn.A]:"#FFFFFF",[Hn.a]:"#FFFFFF"}};var ua=t("nEHx");function Dd(){const e=new x.b,i=Object(ss.a)();return i.onDidChange(()=>e.fire()),{onDidChange:e.event,getCSS(){const s={},l=W=>{let z=W.defaults;for(;nn.d.isThemeIcon(z);){const Fe=i.getIcon(z.id);if(!Fe)return;z=Fe.defaults}const de=z.fontId;if(de){const Fe=i.getIconFont(de);if(Fe)return s[de]=Fe,`.codicon-${W.id}:before { content: '${z.fontCharacter}'; font-family: ${Object(ve.r)(de)}; }`}return`.codicon-${W.id}:before { content: '${z.fontCharacter}'; }`},j=[];for(let W of i.getIcons()){const z=l(W);z&&j.push(z)}for(let W in s){const z=s[W],de=z.definition.src.map(Fe=>`${Object(ve.s)(Fe.location)} format('${Fe.format}')`).join(", ");j.push(`@font-face { src: ${de}; font-family: ${Object(ve.r)(W)}; font-display: block; }`)}return j.join(`
|
|
|
`)}}}const xs="vs",Dr="vs-dark",Ks="hc-black",Md=oi.a.as(ni.a.ColorContribution),xd=oi.a.as(nn.a.ThemingContribution);class ll{constructor(e,i){this.semanticHighlighting=!1,this.themeData=i;let s=i.base;e.length>0?(Mr(e)?this.id=e:this.id=s+" "+e,this.themeName=e):(this.id=s,this.themeName=s),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 i in this.themeData.colors)e.set(i,ms.a.fromHex(this.themeData.colors[i]));if(this.themeData.inherit){let i=ha(this.themeData.base);for(let s in i.colors)e.has(s)||e.set(s,ms.a.fromHex(i.colors[s]))}this.colors=e}return this.colors}getColor(e,i){const s=this.getColors().get(e);return s||(i!==!1?this.getDefault(e):void 0)}getDefault(e){let i=this.defaultColors[e];return i||(i=Md.resolveDefaultColor(e,this),this.defaultColors[e]=i,i)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case xs:return ua.a.LIGHT;case Ks:return ua.a.HIGH_CONTRAST;default:return ua.a.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],i=[];if(this.themeData.inherit){let j=ha(this.themeData.base);e=j.rules,j.encodedTokensColors&&(i=j.encodedTokensColors)}const s=this.themeData.colors["editor.foreground"],l=this.themeData.colors["editor.background"];if(s||l){const j={token:""};s&&(j.foreground=s),l&&(j.background=l),e.push(j)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(i=this.themeData.encodedTokensColors),this._tokenTheme=sl.createFromRawTokenTheme(e,i)}return this._tokenTheme}getTokenStyleMetadata(e,i,s){const l=this.tokenTheme._match([e].concat(i).join(".")),j=l.metadata,W=Rt.D.getForeground(j),z=Rt.D.getFontStyle(j);return{foreground:W,italic:Boolean(z&1),bold:Boolean(z&2),underline:Boolean(z&4)}}}function Mr(e){return e===xs||e===Dr||e===Ks}function ha(e){switch(e){case xs:return wd;case Dr:return Ld;case Ks:return _d}}function ma(e){let i=ha(e);return new ll(e,i)}class Td extends Xe.a{constructor(){super();this._onColorThemeChange=this._register(new x.b),this.onDidColorThemeChange=this._onColorThemeChange.event,this._environment=Object.create(null),this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(xs,ma(xs)),this._knownThemes.set(Dr,ma(Dr)),this._knownThemes.set(Ks,ma(Ks));const e=Dd();this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}
|
|
|
${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(xs),e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}),ve.m("(forced-colors: active)",()=>{this._updateActualTheme()})}registerEditorContainer(e){return ve.O(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=ve.w(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),Xe.a.None}_registerShadowDomContainer(e){const i=ve.w(e);return i.className="monaco-colors",i.textContent=this._allCSS,this._styleElements.push(i),{dispose:()=>{for(let s=0;s<this._styleElements.length;s++)if(this._styleElements[s]===i){this._styleElements.splice(s,1);return}}}}defineTheme(e,i){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!Mr(i.base)&&!Mr(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new ll(e,i)),Mr(e)&&this._knownThemes.forEach(s=>{s.base===e&&s.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let i;this._knownThemes.has(e)?i=this._knownThemes.get(e):i=this._knownThemes.get(xs),this._desiredTheme=i,this._updateActualTheme()}_updateActualTheme(){const e=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(Ks):this._desiredTheme;if(this._theme===e)return;this._theme=e,this._updateThemeOrColorMap()}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._updateActualTheme()}_updateThemeOrColorMap(){let e=[],i={},s={addRule:j=>{i[j]||(e.push(j),i[j]=!0)}};xd.getThemingParticipants().forEach(j=>j(this._theme,s,this._environment));const l=this._colorMapOverride||this._theme.tokenTheme.getColorMap();s.addRule(Sd(l)),this._themeCSS=e.join(`
|
|
|
`),this._updateCSS(),Rt.E.setColorMap(l),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}
|
|
|
${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}}var Gs=t("JYp7"),Od=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},Id=function(e,i){return function(s,l){i(s,l,e)}};const ur="data-keybinding-context";class ga{constructor(e,i){this._id=e,this._parent=i,this._value=Object.create(null),this._value._contextId=e}setValue(e,i){return this._value[e]!==i?(this._value[e]=i,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){const i=this._value[e];return typeof i=="undefined"&&this._parent?this._parent.getValue(e):i}}class Xs extends ga{constructor(){super(-1,null)}setValue(e,i){return!1}removeValue(e){return!1}getValue(e){return}}Xs.INSTANCE=new Xs;class xr extends ga{constructor(e,i,s){super(e,null);this._configurationService=i,this._values=le.c.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(l=>{if(l.source===6){const j=Array.from(Gs.a.map(this._values,([W])=>W));this._values.clear(),s.fire(new cl(j))}else{const j=[];for(const W of l.affectedKeys){const z=`config.${W}`,de=this._values.findSuperstr(z);de!==void 0&&(j.push(...Gs.a.map(de,([Fe])=>Fe)),this._values.deleteSuperstr(z)),this._values.has(z)&&(j.push(z),this._values.delete(z))}s.fire(new cl(j))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(xr._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const i=e.substr(xr._keyPrefix.length),s=this._configurationService.getValue(i);let l;switch(typeof s){case"number":case"boolean":case"string":l=s;break;default:Array.isArray(s)?l=JSON.stringify(s):l=s}return this._values.set(e,l),l}setValue(e,i){return super.setValue(e,i)}removeValue(e){return super.removeValue(e)}}xr._keyPrefix="config.";class Ad{constructor(e,i,s){this._service=e,this._key=i,this._defaultValue=s,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue=="undefined"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class dl{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class cl{constructor(e){this.keys=e}affectsSome(e){for(const i of this.keys)if(e.has(i))return!0;return!1}}class Rd{constructor(e){this.events=e}affectsSome(e){for(const i of this.events)if(i.affectsSome(e))return!0;return!1}}class ul{constructor(e){this._onDidChangeContext=new x.e({merge:i=>new Rd(i)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,i){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Ad(this,e,i)}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 Nd(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const i=this.getContextValuesContainer(this._myContextId),s=At.contextMatchesRules(i,e);return s}getContextKeyValue(e){return this._isDisposed?void 0:this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,i){if(this._isDisposed)return;const s=this.getContextValuesContainer(this._myContextId);if(!s)return;s.setValue(e,i)&&this._onDidChangeContext.fire(new dl(e))}removeContext(e){if(this._isDisposed)return;this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new dl(e))}getContext(e){return this._isDisposed?Xs.INSTANCE:this.getContextValuesContainer(kd(e))}}let fa=class extends ul{constructor(i){super(0);this._contexts=new Map,this._toDispose=new Xe.b,this._lastContextId=0;const s=new xr(this._myContextId,i,this._onDidChangeContext);this._contexts.set(this._myContextId,s),this._toDispose.add(s)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(i){return this._isDisposed?Xs.INSTANCE:this._contexts.get(i)||Xs.INSTANCE}createChildContext(i=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let s=++this._lastContextId;return this._contexts.set(s,new ga(s,this.getContextValuesContainer(i))),s}disposeContext(i){this._isDisposed||this._contexts.delete(i)}};fa=Od([Id(0,g.a)],fa);class Nd extends ul{constructor(e,i){super(e.createChildContext());if(this._parentChangeListener=new Xe.d,this._parent=e,this._updateParentChangeListener(),this._domNode=i,this._domNode.hasAttribute(ur)){let s="";this._domNode.classList&&(s=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${s?": "+s:""}`)}this._domNode.setAttribute(ur,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){if(this._isDisposed)return;this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(ur),this._isDisposed=!0}getContextValuesContainer(e){return this._isDisposed?Xs.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){if(this._isDisposed)return;this._parent.disposeContext(e)}}function kd(e){for(;e;){if(e.hasAttribute(ur)){const i=e.getAttribute(ur);return i?parseInt(i,10):NaN}e=e.parentElement}return 0}Me.a.registerCommand(Ct.d,function(e,i,s){e.get(Ct.b).createKey(String(i),s)}),Me.a.registerCommand({id:"getContextKeyInfo",handler(){return[...Ct.c.all()].sort((e,i)=>e.key.localeCompare(i.key))},description:{description:Object(Se.a)("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),Me.a.registerCommand("_generateContextKeyInfo",function(){const e=[],i=new Set;for(let s of Ct.c.all())i.has(s.key)||(i.add(s.key),e.push(s));e.sort((s,l)=>s.key.localeCompare(l.key)),console.log(JSON.stringify(e,void 0,2))});var pa=t("XXUj"),ba=t("XSiN"),jd=t("D3Dy"),$s=t("pg8w"),hl=t("7/Ik"),ml=t("udvx"),Pd=t("CjF5"),gl=t("nuFA"),th=t("TT2d"),gs;(function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"})(gs||(gs={}));function Ys(e,i,s){const l=s.mode===gs.ALIGN?s.offset:s.offset+s.size,j=s.mode===gs.ALIGN?s.offset+s.size:s.offset;return s.position===0?i<=e-l?l:i<=j?j-i:Math.max(e-i,0):i<=j?j-i:i<=e-l?l:0}class hr extends Xe.a{constructor(e,i){super();this.container=null,this.delegate=null,this.toDisposeOnClean=Xe.a.None,this.toDisposeOnSetContainer=Xe.a.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=ve.a(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,ve.K(this.view),this.setContainer(e,i),this._register(Object(Xe.i)(()=>this.setContainer(null,1)))}setContainer(e,i){var s;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(s=this.shadowRootHostElement)===null||s===void 0||s.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=i!==1,this.useShadowDOM=i===3,this.useShadowDOM){this.shadowRootHostElement=ve.a(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const j=document.createElement("style");j.textContent=Fd,this.shadowRoot.appendChild(j),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(ve.a("slot"))}else this.container.appendChild(this.view);const l=new Xe.b;hr.BUBBLE_UP_EVENTS.forEach(j=>{l.add(ve.o(this.container,j,W=>{this.onDOMEvent(W,!1)}))}),hr.BUBBLE_DOWN_EVENTS.forEach(j=>{l.add(ve.o(this.container,j,W=>{this.onDOMEvent(W,!0)},!0))}),this.toDisposeOnSetContainer=l}}show(e){this.isVisible()&&this.hide(),ve.t(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",ve.W(this.view),this.toDisposeOnClean=e.render(this.view)||Xe.a.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){if(!this.isVisible())return;if(this.delegate.canRelayout===!1&&!(Ht.c&&Pd.a.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}doLayout(){if(!this.isVisible())return;let e=this.delegate.getAnchor(),i;if(ve.M(e)){let Ze=ve.D(e);i={top:Ze.top,left:Ze.left,width:Ze.width,height:Ze.height}}else i={top:e.y,left:e.x,width:e.width||1,height:e.height||2};const s=ve.I(this.view),l=ve.H(this.view),j=this.delegate.anchorPosition||0,W=this.delegate.anchorAlignment||0,z=this.delegate.anchorAxisAlignment||0;let de,Fe;if(z===0){const Ze={offset:i.top-window.pageYOffset,size:i.height,position:j===0?0:1},wt={offset:i.left,size:i.width,position:W===0?0:1,mode:gs.ALIGN};de=Ys(window.innerHeight,l,Ze)+window.pageYOffset,gl.a.intersects({start:de,end:de+l},{start:Ze.offset,end:Ze.offset+Ze.size})&&(wt.mode=gs.AVOID),Fe=Ys(window.innerWidth,s,wt)}else{const Ze={offset:i.left,size:i.width,position:W===0?0:1},wt={offset:i.top,size:i.height,position:j===0?0:1,mode:gs.ALIGN};Fe=Ys(window.innerWidth,s,Ze),gl.a.intersects({start:Fe,end:Fe+s},{start:Ze.offset,end:Ze.offset+Ze.size})&&(wt.mode=gs.AVOID),de=Ys(window.innerHeight,l,wt)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(j===0?"bottom":"top"),this.view.classList.add(W===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const st=ve.D(this.container);this.view.style.top=`${de-(this.useFixedPosition?ve.D(this.view).top:st.top)}px`,this.view.style.left=`${Fe-(this.useFixedPosition?ve.D(this.view).left:st.left)}px`,this.view.style.width="initial"}hide(e){const i=this.delegate;this.delegate=null,(i==null?void 0:i.onHide)&&i.onHide(e),this.toDisposeOnClean.dispose(),ve.K(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,i){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):i&&!ve.L(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}hr.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],hr.BUBBLE_DOWN_EVENTS=["click"];let Fd=`
|
|
|
:host {
|
|
|
all: initial; /* 1st rule so subsequent properties are reset. */
|
|
|
}
|
|
|
|
|
|
@font-face {
|
|
|
font-family: "codicon";
|
|
|
font-display: block;
|
|
|
src: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");
|
|
|
}
|
|
|
|
|
|
.codicon[class*='codicon-'] {
|
|
|
font: normal normal normal 16px/1 codicon;
|
|
|
display: inline-block;
|
|
|
text-decoration: none;
|
|
|
text-rendering: auto;
|
|
|
text-align: center;
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
user-select: none;
|
|
|
-webkit-user-select: none;
|
|
|
-ms-user-select: none;
|
|
|
}
|
|
|
|
|
|
:host {
|
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;
|
|
|
}
|
|
|
|
|
|
:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
|
|
|
:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }
|
|
|
:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }
|
|
|
:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }
|
|
|
:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }
|
|
|
|
|
|
:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }
|
|
|
:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }
|
|
|
:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }
|
|
|
:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }
|
|
|
:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }
|
|
|
|
|
|
:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }
|
|
|
: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; }
|
|
|
: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; }
|
|
|
: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; }
|
|
|
: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; }
|
|
|
`;var is=t("EJc0");const va=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,Ca=/(&)?(&)([^\s&])/g,fl=Object(xn.e)("menu-selection",xn.b.check),pl=Object(xn.e)("menu-submenu",xn.b.chevronRight);var Tr;(function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"})(Tr||(Tr={}));class Zs extends Es.a{constructor(e,i,s={}){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const l=document.createElement("div");l.classList.add("monaco-menu"),l.setAttribute("role","presentation"),super(l,{orientation:1,actionViewItemProvider:z=>this.doGetActionViewItem(z,s,j),context:s.context,actionRunner:s.actionRunner,ariaLabel:s.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Ht.f||Ht.d?[10]:[]],keyDown:!0}}),this.menuElement=l,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new Xe.b),this.initializeStyleSheet(e),this._register($s.b.addTarget(l)),Object(ve.i)(l,ve.d.KEY_DOWN,z=>{const de=new qo.a(z);de.equals(2)&&z.preventDefault()}),s.enableMnemonics&&this.menuDisposables.add(Object(ve.i)(l,ve.d.KEY_DOWN,z=>{const de=z.key.toLocaleLowerCase();if(this.mnemonics.has(de)){ve.c.stop(z,!0);const Fe=this.mnemonics.get(de);if(Fe.length===1&&(Fe[0]instanceof bl&&Fe[0].container&&this.focusItemByElement(Fe[0].container),Fe[0].onClick(z)),Fe.length>1){const st=Fe.shift();st&&st.container&&(this.focusItemByElement(st.container),Fe.push(st)),this.mnemonics.set(de,Fe)}}})),Ht.d&&this._register(Object(ve.i)(l,ve.d.KEY_DOWN,z=>{const de=new qo.a(z);de.equals(14)||de.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),ve.c.stop(z,!0)):(de.equals(13)||de.equals(12))&&(this.focusedItem=0,this.focusPrevious(),ve.c.stop(z,!0))})),this._register(Object(ve.i)(this.domNode,ve.d.MOUSE_OUT,z=>{let de=z.relatedTarget;Object(ve.L)(de,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),z.stopPropagation())})),this._register(Object(ve.i)(this.actionsList,ve.d.MOUSE_OVER,z=>{let de=z.target;if(!de||!Object(ve.L)(de,this.actionsList)||de===this.actionsList)return;for(;de.parentElement!==this.actionsList&&de.parentElement!==null;)de=de.parentElement;if(de.classList.contains("action-item")){const Fe=this.focusedItem;this.setFocusedItem(de),Fe!==this.focusedItem&&this.updateFocus()}})),this._register($s.b.addTarget(this.actionsList)),this._register(Object(ve.i)(this.actionsList,$s.a.Tap,z=>{let de=z.initialTarget;if(!de||!Object(ve.L)(de,this.actionsList)||de===this.actionsList)return;for(;de.parentElement!==this.actionsList&&de.parentElement!==null;)de=de.parentElement;if(de.classList.contains("action-item")){const Fe=this.focusedItem;this.setFocusedItem(de),Fe!==this.focusedItem&&this.updateFocus()}}));let j={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Cr.a(l,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const W=this.scrollableElement.getDomNode();W.style.position="",this._register(Object(ve.i)(l,$s.a.Change,z=>{ve.c.stop(z,!0);const de=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:de-z.translationY})})),this._register(Object(ve.i)(W,ve.d.MOUSE_UP,z=>{z.preventDefault()})),l.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,i=i.filter(z=>{var de;return((de=s.submenuIds)===null||de===void 0?void 0:de.has(z.id))?(console.warn(`Found submenu cycle: ${z.id}`),!1):!0}),this.push(i,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(z=>!(z instanceof Ea)).forEach((z,de,Fe)=>{z.updatePositionInSet(de+1,Fe.length)})}initializeStyleSheet(e){Object(ve.O)(e)?(this.styleSheet=Object(ve.w)(e),this.styleSheet.textContent=vl):(Zs.globalStyleSheet||(Zs.globalStyleSheet=Object(ve.w)(),Zs.globalStyleSheet.textContent=vl),this.styleSheet=Zs.globalStyleSheet)}style(e){const i=this.getContainer(),s=e.foregroundColor?`${e.foregroundColor}`:"",l=e.backgroundColor?`${e.backgroundColor}`:"",j=e.borderColor?`1px solid ${e.borderColor}`:"",W=e.shadowColor?`0 2px 4px ${e.shadowColor}`:"";i.style.border=j,this.domNode.style.color=s,this.domNode.style.backgroundColor=l,i.style.boxShadow=W,this.viewItems&&this.viewItems.forEach(z=>{(z instanceof ya||z instanceof Ea)&&z.style(e)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const i=this.focusedItem;this.setFocusedItem(e),i!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let i=0;i<this.actionsList.children.length;i++){let s=this.actionsList.children[i];if(e===s){this.focusedItem=i;break}}}updateFocus(e){super.updateFocus(e,!0),typeof this.focusedItem!="undefined"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(e,i,s){if(e instanceof An.d)return new Ea(i.context,e,{icon:!0});if(e instanceof An.e){const l=new bl(e,e.actions,s,Object.assign(Object.assign({},i),{submenuIds:new Set([...i.submenuIds||[],e.id])}));if(i.enableMnemonics){const j=l.getMnemonic();if(j&&l.isEnabled()){let W=[];this.mnemonics.has(j)&&(W=this.mnemonics.get(j)),W.push(l),this.mnemonics.set(j,W)}}return l}else{const l={enableMnemonics:i.enableMnemonics,useEventAsContext:i.useEventAsContext};if(i.getKeyBinding){const W=i.getKeyBinding(e);if(W){const z=W.getLabel();z&&(l.keybinding=z)}}const j=new ya(i.context,e,l);if(i.enableMnemonics){const W=j.getMnemonic();if(W&&j.isEnabled()){let z=[];this.mnemonics.has(W)&&(z=this.mnemonics.get(W)),z.push(j),this.mnemonics.set(W,z)}}return j}}}class ya extends hl.b{constructor(e,i,s={}){if(s.isMenu=!0,super(i,i,s),this.options=s,this.options.icon=s.icon!==void 0?s.icon:!1,this.options.label=s.label!==void 0?s.label:!0,this.cssClass="",this.options.label&&s.enableMnemonics){let l=this.getAction().label;if(l){let j=va.exec(l);j&&(this.mnemonic=(j[1]?j[1]:j[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new Lo.e(()=>{if(!this.element)return;this._register(Object(ve.i)(this.element,ve.d.MOUSE_UP,l=>{if(ve.c.stop(l,!0),jd.g){const j=new ba.a(l);if(j.rightButton)return;this.onClick(l)}else setTimeout(()=>{this.onClick(l)},0)})),this._register(Object(ve.i)(this.element,ve.d.CONTEXT_MENU,l=>{ve.c.stop(l,!0)}))},100),this._register(this.runOnceToEnableMouseUp)}render(e){if(super.render(e),!this.element)return;this.container=e,this.item=Object(ve.q)(this.element,Object(ve.a)("a.action-menu-item")),this._action.id===An.d.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=Object(ve.q)(this.item,Object(ve.a)("span.menu-item-check"+fl.cssSelector)),this.check.setAttribute("role","none"),this.label=Object(ve.q)(this.item,Object(ve.a)("span.action-label")),this.options.label&&this.options.keybinding&&(Object(ve.q)(this.item,Object(ve.a)("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,i){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${i}`))}updateLabel(){if(!this.label)return;if(this.options.label){Object(ve.t)(this.label);let e=Object(is.e)(this.getAction().label);if(e){const i=Bd(e);this.options.enableMnemonics||(e=i),this.label.setAttribute("aria-label",i.replace(/&&/g,"&"));const s=va.exec(e);if(s){e=Ue.s(e),Ca.lastIndex=0;let l=Ca.exec(e);for(;l&&l[1];)l=Ca.exec(e);const j=W=>W.replace(/&&/g,"&");l?this.label.append(Ue.J(j(e.substr(0,l.index))," "),Object(ve.a)("u",{"aria-hidden":"true"},l[3]),Ue.O(j(e.substr(l.index+l[0].length))," ")):this.label.innerText=j(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(s[1]?s[1]:s[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=Se.a({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.item&&(this.item.title=e)}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),e!==void 0?(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"),i=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,s=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,l=e&&this.menuStyle.selectionBorderColor?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=i?i.toString():"",this.item.style.backgroundColor=s?s.toString():""),this.check&&(this.check.style.color=i?i.toString():""),this.container&&(this.container.style.border=l)}style(e){this.menuStyle=e,this.applyStyle()}}class bl extends ya{constructor(e,i,s,l){super(e,e,l);this.submenuActions=i,this.parentData=s,this.submenuOptions=l,this.mysubmenu=null,this.submenuDisposables=this._register(new Xe.b),this.mouseOver=!1,this.expandDirection=l&&l.expandDirection!==void 0?l.expandDirection:Tr.Right,this.showScheduler=new Lo.e(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new Lo.e(()=>{this.element&&!Object(ve.L)(Object(ve.y)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){if(super.render(e),!this.element)return;this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=Object(ve.q)(this.item,Object(ve.a)("span.submenu-indicator"+pl.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(Object(ve.i)(this.element,ve.d.KEY_UP,i=>{let s=new qo.a(i);(s.equals(17)||s.equals(3))&&(ve.c.stop(i,!0),this.createSubmenu(!0))})),this._register(Object(ve.i)(this.element,ve.d.KEY_DOWN,i=>{let s=new qo.a(i);Object(ve.y)()===this.item&&((s.equals(17)||s.equals(3))&&ve.c.stop(i,!0))})),this._register(Object(ve.i)(this.element,ve.d.MOUSE_OVER,i=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(Object(ve.i)(this.element,ve.d.MOUSE_LEAVE,i=>{this.mouseOver=!1})),this._register(Object(ve.i)(this.element,ve.d.FOCUS_OUT,i=>{this.element&&!Object(ve.L)(Object(ve.y)(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)}))}updateEnabled(){}onClick(e){ve.c.stop(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(i){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,i,s,l){const j={top:0,left:0};return j.left=Ys(e.width,i.width,{position:l===Tr.Right?0:1,offset:s.left,size:s.width}),j.left>=s.left&&j.left<s.left+s.width&&(s.left+10+i.width<=e.width&&(j.left=s.left+10),s.top+=10,s.height=0),j.top=Ys(e.height,i.height,{position:0,offset:s.top,size:0}),j.top+i.height===s.top&&j.top+s.height+i.height<=e.height&&(j.top+=s.height),j}createSubmenu(e=!0){if(!this.element)return;if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=Object(ve.q)(this.element,Object(ve.a)("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const i=getComputedStyle(this.parentData.parent.domNode),s=parseFloat(i.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new Zs(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new An.c],this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const l=this.element.getBoundingClientRect(),j={top:l.top-s,left:l.left,height:l.height+2*s,width:l.width},W=this.submenuContainer.getBoundingClientRect(),{top:z,left:de}=this.calculateSubmenuMenuLayout(new ve.b(window.innerWidth,window.innerHeight),ve.b.lift(W),j,this.expandDirection);this.submenuContainer.style.left=`${de-W.left}px`,this.submenuContainer.style.top=`${z-W.top}px`,this.submenuDisposables.add(Object(ve.i)(this.submenuContainer,ve.d.KEY_UP,Fe=>{let st=new qo.a(Fe);st.equals(15)&&(ve.c.stop(Fe,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(Object(ve.i)(this.submenuContainer,ve.d.KEY_DOWN,Fe=>{let st=new qo.a(Fe);st.equals(15)&&ve.c.stop(Fe,!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 i;this.item&&((i=this.item)===null||i===void 0||i.setAttribute("aria-expanded",e))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused"),i=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=i?`${i}`:""),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 Ea extends hl.a{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}function Bd(e){const i=va,s=i.exec(e);if(!s)return e;const l=!s[1];return e.replace(i,l?"$2$3":"").trim()}let vl=`
|
|
|
.monaco-menu {
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
${Object(ml.a)(fl)}
|
|
|
${Object(ml.a)(pl)}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar {
|
|
|
text-align: right;
|
|
|
overflow: hidden;
|
|
|
white-space: nowrap;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar .actions-container {
|
|
|
display: flex;
|
|
|
margin: 0 auto;
|
|
|
padding: 0;
|
|
|
width: 100%;
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .actions-container {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.reverse .actions-container {
|
|
|
flex-direction: row-reverse;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar .action-item {
|
|
|
cursor: pointer;
|
|
|
display: inline-block;
|
|
|
transition: transform 50ms ease;
|
|
|
position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar .action-item.disabled {
|
|
|
cursor: default;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.animated .action-item.active {
|
|
|
transform: scale(1.272019649, 1.272019649); /* 1.272019649 = \u221A\u03C6 */
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar .action-item .icon,
|
|
|
.monaco-menu .monaco-action-bar .action-item .codicon {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar .action-item .codicon {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar .action-label {
|
|
|
font-size: 11px;
|
|
|
margin-right: 4px;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar .action-item.disabled .action-label,
|
|
|
.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
|
|
|
/* Vertical actions */
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical {
|
|
|
text-align: left;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item {
|
|
|
display: block;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
|
|
display: block;
|
|
|
border-bottom: 1px solid #bbb;
|
|
|
padding-top: 1px;
|
|
|
margin-left: .8em;
|
|
|
margin-right: .8em;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .secondary-actions .monaco-action-bar .action-label {
|
|
|
margin-left: 6px;
|
|
|
}
|
|
|
|
|
|
/* Action Items */
|
|
|
.monaco-menu .monaco-action-bar .action-item.select-container {
|
|
|
overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */
|
|
|
flex: 1;
|
|
|
max-width: 170px;
|
|
|
min-width: 60px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
margin-right: 10px;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical {
|
|
|
margin-left: 0;
|
|
|
overflow: visible;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .actions-container {
|
|
|
display: block;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item {
|
|
|
padding: 0;
|
|
|
transform: none;
|
|
|
display: flex;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item.active {
|
|
|
transform: none;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
|
|
|
flex: 1 1 auto;
|
|
|
display: flex;
|
|
|
height: 2em;
|
|
|
align-items: center;
|
|
|
position: relative;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label {
|
|
|
flex: 1 1 auto;
|
|
|
text-decoration: none;
|
|
|
padding: 0 1em;
|
|
|
background: none;
|
|
|
font-size: 12px;
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .keybinding,
|
|
|
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
|
|
display: inline-block;
|
|
|
flex: 2 1 auto;
|
|
|
padding: 0 1em;
|
|
|
text-align: right;
|
|
|
font-size: 12px;
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
|
|
height: 100%;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {
|
|
|
font-size: 16px !important;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {
|
|
|
margin-left: auto;
|
|
|
margin-right: -20px;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {
|
|
|
opacity: 0.4;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {
|
|
|
display: inline-block;
|
|
|
box-sizing: border-box;
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item {
|
|
|
position: static;
|
|
|
overflow: visible;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {
|
|
|
position: absolute;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
|
|
padding: 0.5em 0 0 0;
|
|
|
margin-bottom: 0.5em;
|
|
|
width: 100%;
|
|
|
height: 0px !important;
|
|
|
margin-left: .8em !important;
|
|
|
margin-right: .8em !important;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {
|
|
|
padding: 0.7em 1em 0.1em 1em;
|
|
|
font-weight: bold;
|
|
|
opacity: 1;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label:hover {
|
|
|
color: inherit;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
|
|
|
position: absolute;
|
|
|
visibility: hidden;
|
|
|
width: 1em;
|
|
|
height: 100%;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {
|
|
|
visibility: visible;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
}
|
|
|
|
|
|
/* Context Menu */
|
|
|
|
|
|
.context-view.monaco-menu-container {
|
|
|
outline: 0;
|
|
|
border: none;
|
|
|
animation: fadeIn 0.083s linear;
|
|
|
-webkit-app-region: no-drag;
|
|
|
}
|
|
|
|
|
|
.context-view.monaco-menu-container :focus,
|
|
|
.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,
|
|
|
.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {
|
|
|
outline: 0;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-item {
|
|
|
border: thin solid transparent; /* prevents jumping behaviour on hover or focus */
|
|
|
}
|
|
|
|
|
|
|
|
|
/* High Contrast Theming */
|
|
|
:host-context(.hc-black) .context-view.monaco-menu-container {
|
|
|
box-shadow: none;
|
|
|
}
|
|
|
|
|
|
:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {
|
|
|
background: none;
|
|
|
}
|
|
|
|
|
|
/* Vertical Action Bar Styles */
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical {
|
|
|
padding: .5em 0;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-menu-item {
|
|
|
height: 1.8em;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),
|
|
|
.monaco-menu .monaco-action-bar.vertical .keybinding {
|
|
|
font-size: inherit;
|
|
|
padding: 0 2em;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .menu-item-check {
|
|
|
font-size: inherit;
|
|
|
width: 2em;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
|
|
font-size: inherit;
|
|
|
padding: 0.2em 0 0 0;
|
|
|
margin-bottom: 0.2em;
|
|
|
}
|
|
|
|
|
|
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {
|
|
|
margin-left: 0;
|
|
|
margin-right: 0;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
|
|
font-size: 60%;
|
|
|
padding: 0 1.8em;
|
|
|
}
|
|
|
|
|
|
:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {
|
|
|
height: 100%;
|
|
|
mask-size: 10px 10px;
|
|
|
-webkit-mask-size: 10px 10px;
|
|
|
}
|
|
|
|
|
|
.monaco-menu .action-item {
|
|
|
cursor: default;
|
|
|
}
|
|
|
|
|
|
/* Arrows */
|
|
|
.monaco-scrollable-element > .scrollbar > .scra {
|
|
|
cursor: pointer;
|
|
|
font-size: 11px !important;
|
|
|
}
|
|
|
|
|
|
.monaco-scrollable-element > .visible {
|
|
|
opacity: 1;
|
|
|
|
|
|
/* Background rule added for IE9 - to allow clicks on dom node */
|
|
|
background:rgba(0,0,0,0);
|
|
|
|
|
|
transition: opacity 100ms linear;
|
|
|
}
|
|
|
.monaco-scrollable-element > .invisible {
|
|
|
opacity: 0;
|
|
|
pointer-events: none;
|
|
|
}
|
|
|
.monaco-scrollable-element > .invisible.fade {
|
|
|
transition: opacity 800ms linear;
|
|
|
}
|
|
|
|
|
|
/* Scrollable Content Inset Shadow */
|
|
|
.monaco-scrollable-element > .shadow {
|
|
|
position: absolute;
|
|
|
display: none;
|
|
|
}
|
|
|
.monaco-scrollable-element > .shadow.top {
|
|
|
display: block;
|
|
|
top: 0;
|
|
|
left: 3px;
|
|
|
height: 3px;
|
|
|
width: 100%;
|
|
|
box-shadow: #DDD 0 6px 6px -6px inset;
|
|
|
}
|
|
|
.monaco-scrollable-element > .shadow.left {
|
|
|
display: block;
|
|
|
top: 3px;
|
|
|
left: 0;
|
|
|
height: 100%;
|
|
|
width: 3px;
|
|
|
box-shadow: #DDD 6px 0 6px -6px inset;
|
|
|
}
|
|
|
.monaco-scrollable-element > .shadow.top-left-corner {
|
|
|
display: block;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
height: 3px;
|
|
|
width: 3px;
|
|
|
}
|
|
|
.monaco-scrollable-element > .shadow.top.left {
|
|
|
box-shadow: #DDD 6px 6px 6px -6px inset;
|
|
|
}
|
|
|
|
|
|
/* ---------- Default Style ---------- */
|
|
|
|
|
|
:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider {
|
|
|
background: rgba(100, 100, 100, .4);
|
|
|
}
|
|
|
:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider {
|
|
|
background: rgba(121, 121, 121, .4);
|
|
|
}
|
|
|
:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider {
|
|
|
background: rgba(111, 195, 223, .6);
|
|
|
}
|
|
|
|
|
|
.monaco-scrollable-element > .scrollbar > .slider:hover {
|
|
|
background: rgba(100, 100, 100, .7);
|
|
|
}
|
|
|
:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover {
|
|
|
background: rgba(111, 195, 223, .8);
|
|
|
}
|
|
|
|
|
|
.monaco-scrollable-element > .scrollbar > .slider.active {
|
|
|
background: rgba(0, 0, 0, .6);
|
|
|
}
|
|
|
:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active {
|
|
|
background: rgba(191, 191, 191, .4);
|
|
|
}
|
|
|
:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active {
|
|
|
background: rgba(111, 195, 223, 1);
|
|
|
}
|
|
|
|
|
|
:host-context(.vs-dark) .monaco-scrollable-element .shadow.top {
|
|
|
box-shadow: none;
|
|
|
}
|
|
|
|
|
|
:host-context(.vs-dark) .monaco-scrollable-element .shadow.left {
|
|
|
box-shadow: #000 6px 0 6px -6px inset;
|
|
|
}
|
|
|
|
|
|
:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left {
|
|
|
box-shadow: #000 6px 6px 6px -6px inset;
|
|
|
}
|
|
|
|
|
|
:host-context(.hc-black) .monaco-scrollable-element .shadow.top {
|
|
|
box-shadow: none;
|
|
|
}
|
|
|
|
|
|
:host-context(.hc-black) .monaco-scrollable-element .shadow.left {
|
|
|
box-shadow: none;
|
|
|
}
|
|
|
|
|
|
:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left {
|
|
|
box-shadow: none;
|
|
|
}
|
|
|
`;var oh=t("eizg"),fs=t("ptcw");class Wd{constructor(e,i,s,l,j){this.contextViewService=e,this.telemetryService=i,this.notificationService=s,this.keybindingService=l,this.themeService=j,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const i=e.getActions();if(!i.length)return;this.focusToReturn=document.activeElement;let s,l=Object(ve.M)(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:j=>{let W=e.getMenuClassName?e.getMenuClassName():"";W&&(j.className+=" "+W),this.options.blockMouse&&(this.block=j.appendChild(Object(ve.a)(".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",Object(ve.i)(this.block,ve.d.MOUSE_DOWN,Fe=>Fe.stopPropagation()));const z=new Xe.b,de=e.actionRunner||new An.b;return de.onBeforeRun(this.onActionRun,this,z),de.onDidRun(this.onDidActionRun,this,z),s=new Zs(j,i,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:de,getKeyBinding:e.getKeyBinding?e.getKeyBinding:Fe=>this.keybindingService.lookupKeybinding(Fe.id)}),z.add(Object(fs.c)(s,this.themeService)),s.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,z),s.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,z),z.add(Object(ve.i)(window,ve.d.BLUR,()=>this.contextViewService.hideContextView(!0))),z.add(Object(ve.i)(window,ve.d.MOUSE_DOWN,Fe=>{if(Fe.defaultPrevented)return;let st=new ba.a(Fe),Ze=st.target;if(st.rightButton)return;for(;Ze;){if(Ze===j)return;Ze=Ze.parentElement}this.contextViewService.hideContextView(!0)})),Object(Xe.e)(z,s)},focus:()=>{s&&s.focus(!!e.autoSelectFirstItem)},onHide:j=>{e.onHide&&e.onHide(!!j),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},l,!!l)}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&&!Object(To.e)(e.error)&&this.notificationService.error(e.error)}}var Ud=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},mr=function(e,i){return function(s,l){i(s,l,e)}};let Sa=class extends Xe.a{constructor(i,s,l,j,W){super();this.contextMenuHandler=new Wd(l,i,s,j,W)}configure(i){this.contextMenuHandler.configure(i)}showContextMenu(i){this.contextMenuHandler.showContextMenu(i),ve.e.getInstance().resetKeyStatus()}};Sa=Ud([mr(0,pa.a),mr(1,Ko.a),mr(2,zn.b),mr(3,ts.a),mr(4,nn.b)],Sa);const Or=Object(vn.c)("layoutService");var Hd=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},Vd=function(e,i){return function(s,l){i(s,l,e)}};let wa=class extends Xe.a{constructor(i){super();this.layoutService=i,this.currentViewDisposable=Xe.a.None,this.container=i.container,this.contextView=this._register(new hr(this.container,1)),this.layout(),this._register(i.onDidLayout(()=>this.layout()))}setContainer(i,s){this.contextView.setContainer(i,s||1)}showContextView(i,s,l){s?s!==this.container&&(this.container=s,this.setContainer(s,l?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(i);const j=Object(Xe.i)(()=>{this.currentViewDisposable===j&&this.hideContextView()});return this.currentViewDisposable=j,j}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(i){this.contextView.hide(i)}};wa=Hd([Vd(0,Or)],wa);var Cl=t("6vuP"),Qs=t("r0BQ");class zd{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class Kd{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let i of this._nodes.values())i.outgoing.size===0&&e.push(i);return e}insertEdge(e,i){const s=this.lookupOrInsertNode(e),l=this.lookupOrInsertNode(i);s.outgoing.set(this._hashFn(i),l),l.incoming.set(this._hashFn(e),s)}removeNode(e){const i=this._hashFn(e);this._nodes.delete(i);for(let s of this._nodes.values())s.outgoing.delete(i),s.incoming.delete(i)}lookupOrInsertNode(e){const i=this._hashFn(e);let s=this._nodes.get(i);return s||(s=new zd(e),this._nodes.set(i,s)),s}isEmpty(){return this._nodes.size===0}toString(){let e=[];for(let[i,s]of this._nodes)e.push(`${i}, (incoming)[${[...s.incoming.keys()].join(", ")}], (outgoing)[${[...s.outgoing.keys()].join(",")}]`);return e.join(`
|
|
|
`)}findCycleSlow(){for(let[e,i]of this._nodes){const s=new Set([e]),l=this._findCycle(i,s);if(l)return l}return}_findCycle(e,i){for(let[s,l]of e.outgoing){if(i.has(s))return[...i,s].join(" -> ");i.add(s);const j=this._findCycle(l,i);if(j)return j;i.delete(s)}return}}const yl=!1;class El extends Error{constructor(e){var i;super("cyclic dependency between services");this.message=(i=e.findCycleSlow())!==null&&i!==void 0?i:`UNABLE to detect cycle, dumping graph:
|
|
|
${e.toString()}`}}class La{constructor(e=new Ps.a,i=!1,s){this._activeInstantiations=new Set,this._services=e,this._strict=i,this._parent=s,this._services.set(vn.a,this)}createChild(e){return new La(e,this._strict,this)}invokeFunction(e,...i){let s=Bn.traceInvocation(e),l=!1;try{const j={get:(W,z)=>{if(l)throw Object(To.d)("service accessor is only valid during the invocation of its target method");const de=this._getOrCreateServiceInstance(W,s);if(!de&&z!==vn.d)throw new Error(`[invokeFunction] unknown service '${W}'`);return de}};return e(j,...i)}finally{l=!0,s.stop()}}createInstance(e,...i){let s,l;return e instanceof Qs.a?(s=Bn.traceCreation(e.ctor),l=this._createInstance(e.ctor,e.staticArguments.concat(i),s)):(s=Bn.traceCreation(e),l=this._createInstance(e,i,s)),s.stop(),l}_createInstance(e,i=[],s){let l=vn.b.getServiceDependencies(e).sort((z,de)=>z.index-de.index),j=[];for(const z of l){let de=this._getOrCreateServiceInstance(z.id,s);if(!de&&this._strict&&!z.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${z.id}.`);j.push(de)}let W=l.length>0?l[0].index:i.length;if(i.length!==W){console.warn(`[createInstance] First service dependency of ${e.name} at position ${W+1} conflicts with ${i.length} static arguments`);let z=W-i.length;z>0?i=i.concat(new Array(z)):i=i.slice(0,W)}return new e(...[...i,...j])}_setServiceInstance(e,i){if(this._services.get(e)instanceof Qs.a)this._services.set(e,i);else if(this._parent)this._parent._setServiceInstance(e,i);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){let i=this._services.get(e);return!i&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):i}_getOrCreateServiceInstance(e,i){let s=this._getServiceInstanceOrDescriptor(e);return s instanceof Qs.a?this._safeCreateAndCacheServiceInstance(e,s,i.branch(e,!0)):(i.branch(e,!1),s)}_safeCreateAndCacheServiceInstance(e,i,s){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,i,s)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,i,s){const l=new Kd(z=>z.id.toString());let j=0;const W=[{id:e,desc:i,_trace:s}];for(;W.length;){const z=W.pop();if(l.lookupOrInsertNode(z),j++>1e3)throw new El(l);for(let de of vn.b.getServiceDependencies(z.desc.ctor)){let Fe=this._getServiceInstanceOrDescriptor(de.id);if(!Fe&&!de.optional&&console.warn(`[createInstance] ${e} depends on ${de.id} which is NOT registered.`),Fe instanceof Qs.a){const st={id:de.id,desc:Fe,_trace:z._trace.branch(de.id,!0)};l.insertEdge(z,st),W.push(st)}}}for(;;){const z=l.roots();if(z.length===0){if(!l.isEmpty())throw new El(l);break}for(const{data:de}of z){const Fe=this._getServiceInstanceOrDescriptor(de.id);if(Fe instanceof Qs.a){const st=this._createServiceInstanceWithOwner(de.id,de.desc.ctor,de.desc.staticArguments,de.desc.supportsDelayedInstantiation,de._trace);this._setServiceInstance(de.id,st)}l.removeNode(de)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,i,s=[],l,j){if(this._services.get(e)instanceof Qs.a)return this._createServiceInstance(i,s,l,j);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,i,s,l,j);throw new Error(`illegalState - creating UNKNOWN service instance ${i.name}`)}_createServiceInstance(e,i=[],s,l){if(s){const j=new Lo.b(()=>this._createInstance(e,i,l));return new Proxy(Object.create(null),{get(W,z){if(z in W)return W[z];let de=j.value,Fe=de[z];return typeof Fe!="function"||(Fe=Fe.bind(de),W[z]=Fe),Fe},set(W,z,de){return j.value[z]=de,!0}})}else return this._createInstance(e,i,l)}}class Bn{constructor(e,i){this.type=e,this.name=i,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return yl?new Bn(1,e.name||e.toString().substring(0,42).replace(/\n/g,"")):Bn._None}static traceCreation(e){return yl?new Bn(0,e.name):Bn._None}branch(e,i){let s=new Bn(2,e.toString());return this._dep.push([e,i,s]),s}stop(){let e=Date.now()-this._start;Bn._totals+=e;let i=!1;function s(j,W){let z=[],de=new Array(j+1).join(" ");for(const[Fe,st,Ze]of W._dep)if(st&&Ze){i=!0,z.push(`${de}CREATES -> ${Fe}`);let wt=s(j+1,Ze);wt&&z.push(wt)}else z.push(`${de}uses -> ${Fe}`);return z.join(`
|
|
|
`)}let l=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${s(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Bn._totals.toFixed(2)}ms)`];(e>2||i)&&console.log(l.join(`
|
|
|
`))}}Bn._None=new class extends Bn{constructor(){super(-1,null)}stop(){}branch(){return this}},Bn._totals=0;var Gd=t("R8sh"),_a=t("k9mg"),qn=t("tADe");class Xd{constructor(){this._byResource=new le.b,this._byOwner=new Map}set(e,i,s){let l=this._byResource.get(e);l||(l=new Map,this._byResource.set(e,l)),l.set(i,s);let j=this._byOwner.get(i);j||(j=new le.b,this._byOwner.set(i,j)),j.set(e,s)}get(e,i){let s=this._byResource.get(e);return s==null?void 0:s.get(i)}delete(e,i){let s=!1,l=!1,j=this._byResource.get(e);j&&(s=j.delete(i));let W=this._byOwner.get(i);if(W&&(l=W.delete(e)),s!==l)throw new Error("illegal state");return s&&l}values(e){var i,s,l,j;return typeof e=="string"?(s=(i=this._byOwner.get(e))===null||i===void 0?void 0:i.values())!==null&&s!==void 0?s:Gs.a.empty():A.a.isUri(e)?(j=(l=this._byResource.get(e))===null||l===void 0?void 0:l.values())!==null&&j!==void 0?j:Gs.a.empty():Gs.a.map(Gs.a.concat(...this._byOwner.values()),W=>W[1])}}class $d{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new le.b,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const i of e){const s=this._data.get(i);s&&this._substract(s);const l=this._resourceStats(i);this._add(l),this._data.set(i,l)}}_resourceStats(e){const i={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===ye.c.inMemory||e.scheme===ye.c.walkThrough||e.scheme===ye.c.walkThroughSnippet)return i;for(const{severity:s}of this._service.read({resource:e}))s===qn.c.Error?i.errors+=1:s===qn.c.Warning?i.warnings+=1:s===qn.c.Info?i.infos+=1:i.unknowns+=1;return i}_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 Js{constructor(){this._onMarkerChanged=new x.a({delay:0,merge:Js._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new Xd,this._stats=new $d(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,i){for(const s of i||[])this.changeOne(e,s,[])}changeOne(e,i,s){if(Object(fi.m)(s)){const l=this._data.delete(i,e);l&&this._onMarkerChanged.fire([i])}else{const l=[];for(const j of s){const W=Js._toMarker(e,i,j);W&&l.push(W)}this._data.set(i,e,l),this._onMarkerChanged.fire([i])}}static _toMarker(e,i,s){let{code:l,severity:j,message:W,source:z,startLineNumber:de,startColumn:Fe,endLineNumber:st,endColumn:Ze,relatedInformation:wt,tags:to}=s;return W?(de=de>0?de:1,Fe=Fe>0?Fe:1,st=st>=de?st:de,Ze=Ze>0?Ze:Fe,{resource:i,owner:e,code:l,severity:j,message:W,source:z,startLineNumber:de,startColumn:Fe,endLineNumber:st,endColumn:Ze,relatedInformation:wt,tags:to}):void 0}read(e=Object.create(null)){let{owner:i,resource:s,severities:l,take:j}=e;if((!j||j<0)&&(j=-1),i&&s){const W=this._data.get(s,i);if(W){const z=[];for(const de of W)if(Js._accept(de,l)){const Fe=z.push(de);if(j>0&&Fe===j)break}return z}else return[]}else if(!i&&!s){const W=[];for(let z of this._data.values())for(let de of z)if(Js._accept(de,l)){const Fe=W.push(de);if(j>0&&Fe===j)return W}return W}else{const W=this._data.values(s!=null?s:i),z=[];for(const de of W)for(const Fe of de)if(Js._accept(Fe,l)){const st=z.push(Fe);if(j>0&&st===j)return z}return z}}static _accept(e,i){return i===void 0||(i&e.severity)===e.severity}static _merge(e){const i=new le.b;for(let s of e)for(let l of s)i.set(l,!0);return Array.from(i.keys())}}var Sl=t("A+jI"),wl=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},Ir=function(e,i){return function(s,l){i(s,l,e)}};let Da=class{constructor(i){this._commandService=i}createMenu(i,s,l){return new Ma(i,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},l),this._commandService,s,this)}};Da=wl([Ir(0,Me.b)],Da);let Ma=class e{constructor(i,s,l,j,W){this._id=i,this._options=s,this._commandService=l,this._contextKeyService=j,this._menuService=W,this._disposables=new Xe.b,this._menuGroups=[],this._contextKeys=new Set,this._build();const z=new Lo.e(()=>{this._build(),this._onDidChange.fire(this)},s.eventDebounceDelay);this._disposables.add(z),this._disposables.add(Tn.d.onDidChangeMenu(st=>{st.has(i)&&z.schedule()}));const de=this._disposables.add(new Xe.b),Fe=()=>{const st=new Lo.e(()=>this._onDidChange.fire(this),s.eventDebounceDelay);de.add(st),de.add(j.onDidChangeContext(Ze=>{Ze.affectsSome(this._contextKeys)&&st.schedule()}))};this._onDidChange=new x.b({onFirstListenerAdd:Fe,onLastListenerRemove:de.clear.bind(de)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const i=Tn.d.getMenuItems(this._id);let s;i.sort(e._compareMenuItems);for(const l of i){const j=l.group||"";(!s||s[0]!==j)&&(s=[j,[]],this._menuGroups.push(s)),s[1].push(l),this._collectContextKeys(l)}}_collectContextKeys(i){if(e._fillInKbExprKeys(i.when,this._contextKeys),Object(Tn.f)(i)){if(i.command.precondition&&e._fillInKbExprKeys(i.command.precondition,this._contextKeys),i.command.toggled){const s=i.command.toggled.condition||i.command.toggled;e._fillInKbExprKeys(s,this._contextKeys)}}else this._options.emitEventsForSubmenuChanges&&Tn.d.getMenuItems(i.submenu).forEach(this._collectContextKeys,this)}getActions(i){const s=[];for(let l of this._menuGroups){const[j,W]=l,z=[];for(const de of W)if(this._contextKeyService.contextMatchesRules(de.when)){const Fe=Object(Tn.f)(de)?new Tn.c(de.command,de.alt,i,this._contextKeyService,this._commandService):new Tn.e(de,this._menuService,this._contextKeyService,i);z.push(Fe)}z.length>0&&s.push([j,z])}return s}static _fillInKbExprKeys(i,s){if(i)for(let l of i.keys())s.add(l)}static _compareMenuItems(i,s){let l=i.group,j=s.group;if(l!==j){if(l){if(!j)return-1}else return 1;if(l==="navigation")return-1;if(j==="navigation")return 1;let de=l.localeCompare(j);if(de!==0)return de}let W=i.order||0,z=s.order||0;return W<z?-1:W>z?1:e._compareTitles(Object(Tn.f)(i)?i.command.title:i.title,Object(Tn.f)(s)?s.command.title:s.title)}static _compareTitles(i,s){const l=typeof i=="string"?i:i.original,j=typeof s=="string"?s:s.original;return l.localeCompare(j)}};Ma=wl([Ir(2,Me.b),Ir(3,Ct.b),Ir(4,Tn.a)],Ma);var Yd=t("79sc"),Zd=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},Ll=function(e,i){return function(s,l){i(s,l,e)}};class Qd extends Xe.a{constructor(e){super();this.model=e,this._markersData=new Map,this._register(Object(Xe.i)(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(e,i){const s=[...this._markersData.keys()];this._markersData.clear();const l=this.model.deltaDecorations(s,i);for(let j=0;j<l.length;j++)this._markersData.set(l[j],e[j]);return s.length!==0||l.length!==0}getMarker(e){return this._markersData.get(e.id)}}let xa=class extends Xe.a{constructor(i,s){super();this._markerService=s,this._onDidChangeMarker=this._register(new x.b),this._markerDecorations=new le.b,i.getModels().forEach(l=>this._onModelAdded(l)),this._register(i.onModelAdded(this._onModelAdded,this)),this._register(i.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(i=>i.dispose()),this._markerDecorations.clear()}getMarker(i,s){const l=this._markerDecorations.get(i);return l&&l.getMarker(s)||null}_handleMarkerChange(i){i.forEach(s=>{const l=this._markerDecorations.get(s);l&&this._updateDecorations(l)})}_onModelAdded(i){const s=new Qd(i);this._markerDecorations.set(i.uri,s),this._updateDecorations(s)}_onModelRemoved(i){const s=this._markerDecorations.get(i.uri);s&&(s.dispose(),this._markerDecorations.delete(i.uri)),(i.uri.scheme===ye.c.inMemory||i.uri.scheme===ye.c.internal||i.uri.scheme===ye.c.vscode)&&(this._markerService&&this._markerService.read({resource:i.uri}).map(l=>l.owner).forEach(l=>this._markerService.remove(l,[i.uri])))}_updateDecorations(i){const s=this._markerService.read({resource:i.model.uri,take:500});let l=s.map(j=>({range:this._createDecorationRange(i.model,j),options:this._createDecorationOption(j)}));i.update(s,l)&&this._onDidChangeMarker.fire(i.model)}_createDecorationRange(i,s){let l=I.a.lift(s);return s.severity===qn.c.Hint&&!this._hasMarkerTag(s,1)&&!this._hasMarkerTag(s,2)&&(l=l.setEndPosition(l.startLineNumber,l.startColumn+2)),i.validateRange(l)}_createDecorationOption(i){let s,l,j,W,z;switch(i.severity){case qn.c.Hint:this._hasMarkerTag(i,2)?s=void 0:this._hasMarkerTag(i,1)?s="squiggly-unnecessary":s="squiggly-hint",j=0;break;case qn.c.Warning:s="squiggly-warning",l=Object(nn.g)(Hn.O),j=20,z={color:Object(nn.g)(ni.gc),position:It.f.Inline};break;case qn.c.Info:s="squiggly-info",l=Object(nn.g)(Hn.M),j=10;break;case qn.c.Error:default:s="squiggly-error",l=Object(nn.g)(Hn.L),j=30,z={color:Object(nn.g)(ni.Yb),position:It.f.Inline};break}return i.tags&&(i.tags.indexOf(1)!==-1&&(W="squiggly-inline-unnecessary"),i.tags.indexOf(2)!==-1&&(W="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:s,showIfCollapsed:!0,overviewRuler:{color:l,position:It.g.Right},minimap:z,zIndex:j,inlineClassName:W}}_hasMarkerTag(i,s){return i.tags?i.tags.indexOf(s)>=0:!1}};xa=Zd([Ll(0,Li.a),Ll(1,qn.b)],xa);var _l=t("9fML"),Jd=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},Dl=function(e,i){return function(s,l){i(s,l,e)}};let Ta=class extends Xe.a{constructor(i,s){super();this._contextKeyService=i,this._configurationService=s,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new x.b,this._accessibilityModeEnabledContext=os.a.bindTo(this._contextKeyService);const l=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(j=>{j.affectsConfiguration("editor.accessibilitySupport")&&(l(),this._onDidChangeScreenReaderOptimized.fire())})),l(),this.onDidChangeScreenReaderOptimized(()=>l())}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const i=this._configurationService.getValue("editor.accessibilitySupport");return i==="on"||i==="auto"&&this._accessibilitySupport===2}getAccessibilitySupport(){return this._accessibilitySupport}};Ta=Jd([Dl(0,Ct.b),Dl(1,g.a)],Ta);var Ar=function(e,i,s,l){function j(W){return W instanceof s?W:new s(function(z){z(W)})}return new(s||(s=Promise))(function(W,z){function de(Ze){try{st(l.next(Ze))}catch(wt){z(wt)}}function Fe(Ze){try{st(l.throw(Ze))}catch(wt){z(wt)}}function st(Ze){Ze.done?W(Ze.value):j(Ze.value).then(de,Fe)}st((l=l.apply(e,i||[])).next())})};class qd{constructor(){this.mapTextToType=new Map,this.findText=""}writeText(e,i){return Ar(this,void 0,void 0,function*(){if(i){this.mapTextToType.set(i,e);return}try{return yield navigator.clipboard.writeText(e)}catch(j){console.error(j)}const s=document.activeElement,l=document.body.appendChild(Object(ve.a)("textarea",{"aria-hidden":!0}));l.style.height="1px",l.style.width="1px",l.style.position="absolute",l.value=e,l.focus(),l.select(),document.execCommand("copy"),s instanceof HTMLElement&&s.focus(),document.body.removeChild(l);return})}readText(e){return Ar(this,void 0,void 0,function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(i){return console.error(i),""}})}readFindText(){return Ar(this,void 0,void 0,function*(){return this.findText})}writeFindText(e){return Ar(this,void 0,void 0,function*(){this.findText=e})}}var ec=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},Ml=function(e,i){return function(s,l){i(s,l,e)}},Rr=function(e,i,s,l){function j(W){return W instanceof s?W:new s(function(z){z(W)})}return new(s||(s=Promise))(function(W,z){function de(Ze){try{st(l.next(Ze))}catch(wt){z(wt)}}function Fe(Ze){try{st(l.throw(Ze))}catch(wt){z(wt)}}function st(Ze){Ze.done?W(Ze.value):j(Ze.value).then(de,Fe)}st((l=l.apply(e,i||[])).next())})};const qs=!1;function Nr(e){return e.scheme===ye.c.file?e.fsPath:e.path}let xl=0;class kr{constructor(e,i,s,l,j,W,z){this.id=++xl,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=i,this.strResource=s,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=l,this.groupOrder=j,this.sourceId=W,this.sourceOrder=z,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,i){this.resourceLabel=e,this.reason=i}}class Ol{constructor(){this.elements=new Map}createMessage(){const e=[],i=[];for(const[,l]of this.elements){const j=l.reason===0?e:i;j.push(l.resourceLabel)}let s=[];return e.length>0&&s.push(Se.a({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),i.length>0&&s.push(Se.a({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",i.join(", "))),s.join(`
|
|
|
`)}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,i){this.elements.set(e,i)}delete(e){return this.elements.delete(e)}}class tc{constructor(e,i,s,l,j,W,z){this.id=++xl,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=i,this.strResources=s,this.groupId=l,this.groupOrder=j,this.sourceId=W,this.sourceOrder=z,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,i,s){this.removedResources||(this.removedResources=new Ol),this.removedResources.has(i)||this.removedResources.set(i,new Tl(e,s))}setValid(e,i,s){s?this.invalidatedResources&&(this.invalidatedResources.delete(i),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new Ol),this.invalidatedResources.has(i)||this.invalidatedResources.set(i,new Tl(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Il{constructor(e,i){this.resourceLabel=e,this.strResource=i,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let i=0;i<this._past.length;i++)e.push(` * [UNDO] ${this._past[i]}`);for(let i=this._future.length-1;i>=0;i--)e.push(` * [REDO] ${this._future[i]}`);return e.join(`
|
|
|
`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,i){e.type===1?e.setValid(this.resourceLabel,this.strResource,i):e.setValid(i)}setElementsValidFlag(e,i){for(const s of this._past)i(s.actual)&&this._setElementValidFlag(s,e);for(const s of this._future)i(s.actual)&&this._setElementValidFlag(s,e)}pushElement(e){for(const i of this._future)i.type===1&&i.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const i=[];for(let s=0,l=this._past.length;s<l;s++)i.push(this._past[s].id);for(let s=this._future.length-1;s>=0;s--)i.push(this._future[s].id);return new ji.b(e,i)}restoreSnapshot(e){const i=e.elements.length;let s=!0,l=0,j=-1;for(let z=0,de=this._past.length;z<de;z++,l++){const Fe=this._past[z];s&&(l>=i||Fe.id!==e.elements[l])&&(s=!1,j=0),!s&&Fe.type===1&&Fe.removeResource(this.resourceLabel,this.strResource,0)}let W=-1;for(let z=this._future.length-1;z>=0;z--,l++){const de=this._future[z];s&&(l>=i||de.id!==e.elements[l])&&(s=!1,W=z),!s&&de.type===1&&de.removeResource(this.resourceLabel,this.strResource,0)}j!==-1&&(this._past=this._past.slice(0,j)),W!==-1&&(this._future=this._future.slice(W+1)),this.versionId++}getElements(){const e=[],i=[];for(const s of this._past)e.push(s.actual);for(const s of this._future)i.push(s.actual);return{past:e,future:i}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,i){for(let s=this._past.length-1;s>=0;s--)if(this._past[s]===e){i.has(this.strResource)?this._past[s]=i.get(this.strResource):this._past.splice(s,1);break}this.versionId++}splitFutureWorkspaceElement(e,i){for(let s=this._future.length-1;s>=0;s--)if(this._future[s]===e){i.has(this.strResource)?this._future[s]=i.get(this.strResource):this._future.splice(s,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 Oa{constructor(e){this.editStacks=e,this._versionIds=[];for(let i=0,s=this.editStacks.length;i<s;i++)this._versionIds[i]=this.editStacks[i].versionId}isValid(){for(let e=0,i=this.editStacks.length;e<i;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const Al=new Il("","");Al.locked=!0;let jr=class{constructor(i,s){this._dialogService=i,this._notificationService=s,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(i){for(const s of this._uriComparisonKeyComputers)if(s[0]===i.scheme)return s[1].getComparisonKey(i);return i.toString()}_print(i){console.log("------------------------------------"),console.log(`AFTER ${i}: `);let s=[];for(const l of this._editStacks)s.push(l[1].toString());console.log(s.join(`
|
|
|
`))}pushElement(i,s=ji.c.None,l=ji.d.None){if(i.type===0){const j=Nr(i.resource),W=this.getUriComparisonKey(i.resource);this._pushElement(new kr(i,j,W,s.id,s.nextOrder(),l.id,l.nextOrder()))}else{const j=new Set,W=[],z=[];for(const de of i.resources){const Fe=Nr(de),st=this.getUriComparisonKey(de);if(j.has(st))continue;j.add(st),W.push(Fe),z.push(st)}W.length===1?this._pushElement(new kr(i,W[0],z[0],s.id,s.nextOrder(),l.id,l.nextOrder())):this._pushElement(new tc(i,W,z,s.id,s.nextOrder(),l.id,l.nextOrder()))}qs&&this._print("pushElement")}_pushElement(i){for(let s=0,l=i.strResources.length;s<l;s++){const j=i.resourceLabels[s],W=i.strResources[s];let z;this._editStacks.has(W)?z=this._editStacks.get(W):(z=new Il(j,W),this._editStacks.set(W,z)),z.pushElement(i)}}getLastElement(i){const s=this.getUriComparisonKey(i);if(this._editStacks.has(s)){const l=this._editStacks.get(s);if(l.hasFutureElements())return null;const j=l.getClosestPastElement();return j?j.actual:null}return null}_splitPastWorkspaceElement(i,s){const l=i.actual.split(),j=new Map;for(const W of l){const z=Nr(W.resource),de=this.getUriComparisonKey(W.resource),Fe=new kr(W,z,de,0,0,0,0);j.set(Fe.strResource,Fe)}for(const W of i.strResources){if(s&&s.has(W))continue;const z=this._editStacks.get(W);z.splitPastWorkspaceElement(i,j)}}_splitFutureWorkspaceElement(i,s){const l=i.actual.split(),j=new Map;for(const W of l){const z=Nr(W.resource),de=this.getUriComparisonKey(W.resource),Fe=new kr(W,z,de,0,0,0,0);j.set(Fe.strResource,Fe)}for(const W of i.strResources){if(s&&s.has(W))continue;const z=this._editStacks.get(W);z.splitFutureWorkspaceElement(i,j)}}removeElements(i){const s=typeof i=="string"?i:this.getUriComparisonKey(i);if(this._editStacks.has(s)){const l=this._editStacks.get(s);l.dispose(),this._editStacks.delete(s)}qs&&this._print("removeElements")}setElementsValidFlag(i,s,l){const j=this.getUriComparisonKey(i);if(this._editStacks.has(j)){const W=this._editStacks.get(j);W.setElementsValidFlag(s,l)}qs&&this._print("setElementsValidFlag")}createSnapshot(i){const s=this.getUriComparisonKey(i);if(this._editStacks.has(s)){const l=this._editStacks.get(s);return l.createSnapshot(i)}return new ji.b(i,[])}restoreSnapshot(i){const s=this.getUriComparisonKey(i.resource);if(this._editStacks.has(s)){const l=this._editStacks.get(s);l.restoreSnapshot(i),!l.hasPastElements()&&!l.hasFutureElements()&&(l.dispose(),this._editStacks.delete(s))}qs&&this._print("restoreSnapshot")}getElements(i){const s=this.getUriComparisonKey(i);if(this._editStacks.has(s)){const l=this._editStacks.get(s);return l.getElements()}return{past:[],future:[]}}_findClosestUndoElementWithSource(i){if(!i)return[null,null];let s=null,l=null;for(const[j,W]of this._editStacks){const z=W.getClosestPastElement();if(!z)continue;z.sourceId===i&&((!s||z.sourceOrder>s.sourceOrder)&&(s=z,l=j))}return[s,l]}canUndo(i){if(i instanceof ji.d){const[,l]=this._findClosestUndoElementWithSource(i.id);return!!l}const s=this.getUriComparisonKey(i);if(this._editStacks.has(s)){const l=this._editStacks.get(s);return l.hasPastElements()}return!1}_onError(i,s){Object(To.f)(i);for(const l of s.strResources)this.removeElements(l);this._notificationService.error(i)}_acquireLocks(i){for(const s of i.editStacks)if(s.locked)throw new Error("Cannot acquire edit stack lock");for(const s of i.editStacks)s.locked=!0;return()=>{for(const s of i.editStacks)s.locked=!1}}_safeInvokeWithLocks(i,s,l,j,W){const z=this._acquireLocks(l);let de;try{de=s()}catch(Fe){return z(),j.dispose(),this._onError(Fe,i)}return de?de.then(()=>(z(),j.dispose(),W()),Fe=>(z(),j.dispose(),this._onError(Fe,i))):(z(),j.dispose(),W())}_invokeWorkspacePrepare(i){return Rr(this,void 0,void 0,function*(){if(typeof i.actual.prepareUndoRedo=="undefined")return Xe.a.None;const s=i.actual.prepareUndoRedo();return typeof s=="undefined"?Xe.a.None:s})}_invokeResourcePrepare(i,s){if(i.actual.type!==1||typeof i.actual.prepareUndoRedo=="undefined")return s(Xe.a.None);const l=i.actual.prepareUndoRedo();return l?Object(Xe.g)(l)?s(l):l.then(j=>s(j)):s(Xe.a.None)}_getAffectedEditStacks(i){const s=[];for(const l of i.strResources)s.push(this._editStacks.get(l)||Al);return new Oa(s)}_tryToSplitAndUndo(i,s,l,j){if(s.canSplit())return this._splitPastWorkspaceElement(s,l),this._notificationService.warn(j),new Pr(this._undo(i,0,!0));for(const W of s.strResources)this.removeElements(W);return this._notificationService.warn(j),new Pr}_checkWorkspaceUndo(i,s,l,j){if(s.removedResources)return this._tryToSplitAndUndo(i,s,s.removedResources,Se.a({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",s.label,s.removedResources.createMessage()));if(j&&s.invalidatedResources)return this._tryToSplitAndUndo(i,s,s.invalidatedResources,Se.a({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",s.label,s.invalidatedResources.createMessage()));const W=[];for(const de of l.editStacks)de.getClosestPastElement()!==s&&W.push(de.resourceLabel);if(W.length>0)return this._tryToSplitAndUndo(i,s,null,Se.a({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",s.label,W.join(", ")));const z=[];for(const de of l.editStacks)de.locked&&z.push(de.resourceLabel);return z.length>0?this._tryToSplitAndUndo(i,s,null,Se.a({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",s.label,z.join(", "))):l.isValid()?null:this._tryToSplitAndUndo(i,s,null,Se.a({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",s.label))}_workspaceUndo(i,s,l){const j=this._getAffectedEditStacks(s),W=this._checkWorkspaceUndo(i,s,j,!1);return W?W.returnValue:this._confirmAndExecuteWorkspaceUndo(i,s,j,l)}_isPartOfUndoGroup(i){if(!i.groupId)return!1;for(const[,s]of this._editStacks){const l=s.getClosestPastElement();if(!l)continue;if(l===i){const j=s.getSecondClosestPastElement();if(j&&j.groupId===i.groupId)return!0}if(l.groupId===i.groupId)return!0}return!1}_confirmAndExecuteWorkspaceUndo(i,s,l,j){return Rr(this,void 0,void 0,function*(){if(s.canSplit()&&!this._isPartOfUndoGroup(s)){const de=yield this._dialogService.show(So.a.Info,Se.a("confirmWorkspace","Would you like to undo '{0}' across all files?",s.label),[Se.a({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",l.editStacks.length),Se.a("nok","Undo this File"),Se.a("cancel","Cancel")],{cancelId:2});if(de.choice===2)return;if(de.choice===1)return this._splitPastWorkspaceElement(s,null),this._undo(i,0,!0);const Fe=this._checkWorkspaceUndo(i,s,l,!1);if(Fe)return Fe.returnValue;j=!0}let W;try{W=yield this._invokeWorkspacePrepare(s)}catch(de){return this._onError(de,s)}const z=this._checkWorkspaceUndo(i,s,l,!0);if(z)return W.dispose(),z.returnValue;for(const de of l.editStacks)de.moveBackward(s);return this._safeInvokeWithLocks(s,()=>s.actual.undo(),l,W,()=>this._continueUndoInGroup(s.groupId,j))})}_resourceUndo(i,s,l){if(!s.isValid){i.flushAllElements();return}if(i.locked){const j=Se.a({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",s.label);this._notificationService.warn(j);return}return this._invokeResourcePrepare(s,j=>(i.moveBackward(s),this._safeInvokeWithLocks(s,()=>s.actual.undo(),new Oa([i]),j,()=>this._continueUndoInGroup(s.groupId,l))))}_findClosestUndoElementInGroup(i){if(!i)return[null,null];let s=null,l=null;for(const[j,W]of this._editStacks){const z=W.getClosestPastElement();if(!z)continue;z.groupId===i&&((!s||z.groupOrder>s.groupOrder)&&(s=z,l=j))}return[s,l]}_continueUndoInGroup(i,s){if(!i)return;const[,l]=this._findClosestUndoElementInGroup(i);if(l)return this._undo(l,0,s)}undo(i){if(i instanceof ji.d){const[,s]=this._findClosestUndoElementWithSource(i.id);return s?this._undo(s,i.id,!1):void 0}return typeof i=="string"?this._undo(i,0,!1):this._undo(this.getUriComparisonKey(i),0,!1)}_undo(i,s=0,l){if(!this._editStacks.has(i))return;const j=this._editStacks.get(i),W=j.getClosestPastElement();if(!W)return;if(W.groupId){const[de,Fe]=this._findClosestUndoElementInGroup(W.groupId);if(W!==de&&Fe)return this._undo(Fe,s,l)}const z=W.sourceId!==s||W.confirmBeforeUndo;if(z&&!l)return this._confirmAndContinueUndo(i,s,W);try{return W.type===1?this._workspaceUndo(i,W,l):this._resourceUndo(j,W,l)}finally{qs&&this._print("undo")}}_confirmAndContinueUndo(i,s,l){return Rr(this,void 0,void 0,function*(){const j=yield this._dialogService.show(So.a.Info,Se.a("confirmDifferentSource","Would you like to undo '{0}'?",l.label),[Se.a("confirmDifferentSource.yes","Yes"),Se.a("cancel","Cancel")],{cancelId:1});return j.choice===1?void 0:this._undo(i,s,!0)})}_findClosestRedoElementWithSource(i){if(!i)return[null,null];let s=null,l=null;for(const[j,W]of this._editStacks){const z=W.getClosestFutureElement();if(!z)continue;z.sourceId===i&&((!s||z.sourceOrder<s.sourceOrder)&&(s=z,l=j))}return[s,l]}canRedo(i){if(i instanceof ji.d){const[,l]=this._findClosestRedoElementWithSource(i.id);return!!l}const s=this.getUriComparisonKey(i);if(this._editStacks.has(s)){const l=this._editStacks.get(s);return l.hasFutureElements()}return!1}_tryToSplitAndRedo(i,s,l,j){if(s.canSplit())return this._splitFutureWorkspaceElement(s,l),this._notificationService.warn(j),new Pr(this._redo(i));for(const W of s.strResources)this.removeElements(W);return this._notificationService.warn(j),new Pr}_checkWorkspaceRedo(i,s,l,j){if(s.removedResources)return this._tryToSplitAndRedo(i,s,s.removedResources,Se.a({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",s.label,s.removedResources.createMessage()));if(j&&s.invalidatedResources)return this._tryToSplitAndRedo(i,s,s.invalidatedResources,Se.a({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",s.label,s.invalidatedResources.createMessage()));const W=[];for(const de of l.editStacks)de.getClosestFutureElement()!==s&&W.push(de.resourceLabel);if(W.length>0)return this._tryToSplitAndRedo(i,s,null,Se.a({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",s.label,W.join(", ")));const z=[];for(const de of l.editStacks)de.locked&&z.push(de.resourceLabel);return z.length>0?this._tryToSplitAndRedo(i,s,null,Se.a({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",s.label,z.join(", "))):l.isValid()?null:this._tryToSplitAndRedo(i,s,null,Se.a({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",s.label))}_workspaceRedo(i,s){const l=this._getAffectedEditStacks(s),j=this._checkWorkspaceRedo(i,s,l,!1);return j?j.returnValue:this._executeWorkspaceRedo(i,s,l)}_executeWorkspaceRedo(i,s,l){return Rr(this,void 0,void 0,function*(){let j;try{j=yield this._invokeWorkspacePrepare(s)}catch(z){return this._onError(z,s)}const W=this._checkWorkspaceRedo(i,s,l,!0);if(W)return j.dispose(),W.returnValue;for(const z of l.editStacks)z.moveForward(s);return this._safeInvokeWithLocks(s,()=>s.actual.redo(),l,j,()=>this._continueRedoInGroup(s.groupId))})}_resourceRedo(i,s){if(!s.isValid){i.flushAllElements();return}if(i.locked){const l=Se.a({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",s.label);this._notificationService.warn(l);return}return this._invokeResourcePrepare(s,l=>(i.moveForward(s),this._safeInvokeWithLocks(s,()=>s.actual.redo(),new Oa([i]),l,()=>this._continueRedoInGroup(s.groupId))))}_findClosestRedoElementInGroup(i){if(!i)return[null,null];let s=null,l=null;for(const[j,W]of this._editStacks){const z=W.getClosestFutureElement();if(!z)continue;z.groupId===i&&((!s||z.groupOrder<s.groupOrder)&&(s=z,l=j))}return[s,l]}_continueRedoInGroup(i){if(!i)return;const[,s]=this._findClosestRedoElementInGroup(i);if(s)return this._redo(s)}redo(i){if(i instanceof ji.d){const[,s]=this._findClosestRedoElementWithSource(i.id);return s?this._redo(s):void 0}return typeof i=="string"?this._redo(i):this._redo(this.getUriComparisonKey(i))}_redo(i){if(!this._editStacks.has(i))return;const s=this._editStacks.get(i),l=s.getClosestFutureElement();if(!l)return;if(l.groupId){const[j,W]=this._findClosestRedoElementInGroup(l.groupId);if(l!==j&&W)return this._redo(W)}try{return l.type===1?this._workspaceRedo(i,l):this._resourceRedo(s,l)}finally{qs&&this._print("redo")}}};jr=ec([Ml(0,Cl.a),Ml(1,Ko.a)],jr);class Pr{constructor(e){this.returnValue=e}}Object(_l.b)(ji.a,jr);var ih=t("Z1pP"),Rl=t("fdyd"),nh=t("/6w4");const oc={buttonBackground:ms.a.fromHex("#0E639C"),buttonHoverBackground:ms.a.fromHex("#006BB3"),buttonForeground:ms.a.white};class Nl extends Xe.a{constructor(e,i){super();this._onDidClick=this._register(new x.b),this.options=i||Object.create(null),Object(it.f)(this.options,oc,!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($s.b.addTarget(this._element)),[ve.d.CLICK,$s.a.Tap].forEach(s=>{this._register(Object(ve.i)(this._element,s,l=>{if(!this.enabled){ve.c.stop(l);return}this._onDidClick.fire(l)}))}),this._register(Object(ve.i)(this._element,ve.d.KEY_DOWN,s=>{const l=new qo.a(s);let j=!1;this.enabled&&(l.equals(3)||l.equals(10))?(this._onDidClick.fire(s),j=!0):l.equals(9)&&(this._element.blur(),j=!0),j&&ve.c.stop(l,!0)})),this._register(Object(ve.i)(this._element,ve.d.MOUSE_OVER,s=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register(Object(ve.i)(this._element,ve.d.MOUSE_OUT,s=>{this.applyStyles()})),this.focusTracker=this._register(Object(ve.Y)(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;this.options.secondary?e=this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:e=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,i;this.options.secondary?(i=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(i=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const s=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=i,this._element.style.backgroundColor=e,this._element.style.borderWidth=s?"1px":"",this._element.style.borderStyle=s?"solid":"",this._element.style.borderColor=s}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?Object(ve.R)(this._element,...Object(Rl.a)(e)):this._element.textContent=e,typeof this.options.title=="string"?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")}}var kl=t("O/se"),sh=t("HyZH");const jl="done",Pl="active",Ia="infinite",Fl="discrete",ic={progressBarBackground:ms.a.fromHex("#0E70C0")};class nc extends Xe.a{constructor(e,i){super();this.options=i||Object.create(null),Object(it.f)(this.options,ic,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this._register(this.showDelayedScheduler=new Lo.e(()=>Object(ve.W)(this.element),0)),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(Pl,Ia,Fl),this.workedVal=0,this.totalWork=void 0}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(jl),this.element.classList.contains(Ia)?(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(Fl,jl),this.element.classList.add(Pl,Ia),this}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}}}var sc=t("nD70"),rh=t("CDaH");const Aa={},rc=new sc.a("quick-input-button-icon-");function Ra(e){if(!e)return;let i;const s=e.dark.toString();return Aa[s]?i=Aa[s]:(i=rc.nextId(),ve.v(`.${i}`,`background-image: ${ve.s(e.light||e.dark)}`),ve.v(`.vs-dark .${i}, .hc-black .${i}`,`background-image: ${ve.s(e.dark)}`),Aa[s]=i),i}var Xn=t("zdb4"),ac=t("0+8E");const lc=ve.a;class dc extends Xe.a{constructor(e){super();this.parent=e,this.onKeyDown=i=>ve.i(this.inputBox.inputElement,ve.d.KEY_DOWN,s=>{i(new qo.a(s))}),this.onMouseDown=i=>ve.i(this.inputBox.inputElement,ve.d.MOUSE_DOWN,s=>{i(new ba.a(s))}),this.onDidChange=i=>this.inputBox.onDidChange(i),this.container=ve.q(this.parent,lc(".quick-input-box")),this.inputBox=this._register(new ac.b(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 this.inputBox.inputElement.type==="password"}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,i){this.inputBox.inputElement.setAttribute(e,i)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===So.a.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===So.a.Info?1:e===So.a.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===So.a.Info?1:e===So.a.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}var cc=t("7lZ/"),uc=t("xONI"),ah=t("q/I2");const Fr=ve.a;class Bl{constructor(e,i,s){this.os=i,this.keyElements=new Set,this.options=s||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=ve.q(e,Fr(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,i){if(this.didEverRender&&this.keybinding===e&&Bl.areSame(this.matches,i))return;this.keybinding=e,this.matches=i,this.render()}render(){if(this.clear(),this.keybinding){let[e,i]=this.keybinding.getParts();e&&this.renderPart(this.domNode,e,this.matches?this.matches.firstPart:null),i&&(ve.q(this.domNode,Fr("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,i,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(){ve.t(this.domNode),this.keyElements.clear()}renderPart(e,i,s){const l=ko.c.modifierLabels[this.os];i.ctrlKey&&this.renderKey(e,l.ctrlKey,Boolean(s==null?void 0:s.ctrlKey),l.separator),i.shiftKey&&this.renderKey(e,l.shiftKey,Boolean(s==null?void 0:s.shiftKey),l.separator),i.altKey&&this.renderKey(e,l.altKey,Boolean(s==null?void 0:s.altKey),l.separator),i.metaKey&&this.renderKey(e,l.metaKey,Boolean(s==null?void 0:s.metaKey),l.separator);const j=i.keyLabel;j&&this.renderKey(e,j,Boolean(s==null?void 0:s.keyCode),"")}renderKey(e,i,s,l){ve.q(e,this.createKeyElement(i,s?".highlight":"")),l&&ve.q(e,Fr("span.monaco-keybinding-key-separator",void 0,l))}renderUnbound(e){ve.q(e,this.createKeyElement(Object(Se.a)("unbound","Unbound")))}createKeyElement(e,i=""){const s=Fr("span.monaco-keybinding-key"+i,void 0,e);return this.keyElements.add(s),s}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 i of this.keyElements)this.labelBackground&&(i.style.backgroundColor=(e=this.labelBackground)===null||e===void 0?void 0:e.toString()),this.labelBorder&&(i.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(i.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(i.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(e,i){return e===i||!e&&!i?!0:!!e&&!!i&&Object(it.d)(e.firstPart,i.firstPart)&&Object(it.d)(e.chordPart,i.chordPart)}}const Wl=new Lo.b(()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}});function hc(e,i,s=!1){const l=e||"",j=i||"",W=Wl.value.collator.compare(l,j);return Wl.value.collatorIsNumeric&&W===0&&l!==j?l<j?-1:1:W}function mc(e,i,s){const l=e.toLowerCase(),j=i.toLowerCase(),W=gc(e,i,s);if(W)return W;const z=l.endsWith(s),de=j.endsWith(s);if(z!==de)return z?-1:1;const Fe=hc(l,j);return Fe!==0?Fe:l.localeCompare(j)}function gc(e,i,s){const l=e.toLowerCase(),j=i.toLowerCase(),W=l.startsWith(s),z=j.startsWith(s);if(W!==z)return W?-1:1;if(W&&z){if(l.length<j.length)return-1;if(l.length>j.length)return 1}return 0}var Ul=t("ZCR3"),Hl=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},fc=function(e,i,s,l){function j(W){return W instanceof s?W:new s(function(z){z(W)})}return new(s||(s=Promise))(function(W,z){function de(Ze){try{st(l.next(Ze))}catch(wt){z(wt)}}function Fe(Ze){try{st(l.throw(Ze))}catch(wt){z(wt)}}function st(Ze){Ze.done?W(Ze.value):j(Ze.value).then(de,Fe)}st((l=l.apply(e,i||[])).next())})};const es=ve.a;class pc{constructor(e){this.hidden=!1,this._onChecked=new x.b,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 Br{get templateId(){return Br.ID}renderTemplate(e){const i=Object.create(null);i.toDisposeElement=[],i.toDisposeTemplate=[],i.entry=ve.q(e,es(".quick-input-list-entry"));const s=ve.q(i.entry,es("label.quick-input-list-label"));i.toDisposeTemplate.push(ve.o(s,ve.d.CLICK,Fe=>{i.checkbox.offsetParent||Fe.preventDefault()})),i.checkbox=ve.q(s,es("input.quick-input-list-checkbox")),i.checkbox.type="checkbox",i.toDisposeTemplate.push(ve.o(i.checkbox,ve.d.CHANGE,Fe=>{i.element.checked=i.checkbox.checked}));const l=ve.q(s,es(".quick-input-list-rows")),j=ve.q(l,es(".quick-input-list-row")),W=ve.q(l,es(".quick-input-list-row"));i.label=new uc.a(j,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const z=ve.q(j,es(".quick-input-list-entry-keybinding"));i.keybinding=new Bl(z,Ht.a);const de=ve.q(W,es(".quick-input-list-label-meta"));return i.detail=new cc.a(de,!0),i.separator=ve.q(i.entry,es(".quick-input-list-separator")),i.actionBar=new Es.a(i.entry),i.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),i.toDisposeTemplate.push(i.actionBar),i}renderElement(e,i,s){s.toDisposeElement=Object(Xe.f)(s.toDisposeElement),s.element=e,s.checkbox.checked=e.checked,s.toDisposeElement.push(e.onChecked(Fe=>s.checkbox.checked=Fe));const{labelHighlights:l,descriptionHighlights:j,detailHighlights:W}=e,z=Object.create(null);z.matches=l||[],z.descriptionTitle=e.saneDescription,z.descriptionMatches=j||[],z.extraClasses=e.item.iconClasses,z.italic=e.item.italic,z.strikethrough=e.item.strikethrough,s.label.setLabel(e.saneLabel,e.saneDescription,z),s.keybinding.set(e.item.keybinding),s.detail.set(e.saneDetail,W),e.separator&&e.separator.label?(s.separator.textContent=e.separator.label,s.separator.style.display=""):s.separator.style.display="none",s.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),s.actionBar.clear();const de=e.item.buttons;de&&de.length?(s.actionBar.push(de.map((Fe,st)=>{let Ze=Fe.iconClass||(Fe.iconPath?Ra(Fe.iconPath):void 0);Fe.alwaysVisible&&(Ze=Ze?`${Ze} always-visible`:"always-visible");const wt=new An.a(`id-${st}`,"",Ze,!0,()=>fc(this,void 0,void 0,function*(){e.fireButtonTriggered({button:Fe,item:e.item})}));return wt.tooltip=Fe.tooltip||"",wt}),{icon:!0,label:!1}),s.entry.classList.add("has-actions")):s.entry.classList.remove("has-actions")}disposeElement(e,i,s){s.toDisposeElement=Object(Xe.f)(s.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=Object(Xe.f)(e.toDisposeElement),e.toDisposeTemplate=Object(Xe.f)(e.toDisposeTemplate)}}Br.ID="listelement";class bc{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return Br.ID}}var mn;(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"})(mn||(mn={}));class Na{constructor(e,i,s){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 x.b,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new x.b,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new x.b,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new x.b,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new x.b,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new x.b,this.onKeyDown=this._onKeyDown.event,this._onLeave=new x.b,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=i,this.container=ve.q(this.parent,es(".quick-input-list"));const l=new bc,j=new Cc;this.list=s.createList("QuickInput",this.container,l,[new Br],{identityProvider:{getId:W=>W.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:j}),this.list.getHTMLElement().id=i,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(W=>{const z=new qo.a(W);switch(z.keyCode){case 10:this.toggleCheckbox();break;case 31:(Ht.f?W.metaKey:W.ctrlKey)&&this.list.setFocus(Object(fi.r)(this.list.length));break;case 16:const de=this.list.getFocus();de.length===1&&de[0]===0&&this._onLeave.fire();break;case 18:const Fe=this.list.getFocus();Fe.length===1&&Fe[0]===this.list.length-1&&this._onLeave.fire();break}this._onKeyDown.fire(z)})),this.disposables.push(this.list.onMouseDown(W=>{W.browserEvent.button!==2&&W.browserEvent.preventDefault()})),this.disposables.push(ve.i(this.container,ve.d.CLICK,W=>{(W.x||W.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(W=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(W=>{typeof W.index=="number"&&(W.browserEvent.preventDefault(),this.list.setSelection([W.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return x.c.map(this.list.onDidChangeFocus,e=>e.elements.map(i=>i.item))}get onDidChangeSelection(){return x.c.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(i=>i.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,i=!0){for(let s=0,l=e.length;s<l;s++){const j=e[s];if(!j.hidden)if(j.checked)i=!0;else return!1}return i}getCheckedCount(){let e=0;const i=this.elements;for(let s=0,l=i.length;s<l;s++)i[s].checked&&e++;return e}getVisibleCount(){let e=0;const i=this.elements;for(let s=0,l=i.length;s<l;s++)i[s].hidden||e++;return e}setAllVisibleChecked(e){try{this._fireCheckedEvents=!1,this.elements.forEach(i=>{i.hidden||(i.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=Object(Xe.f)(this.elementDisposables);const i=s=>this.fireButtonTriggered(s);this.inputElements=e,this.elements=e.reduce((s,l,j)=>{var W,z,de;if(l.type!=="separator"){const Fe=j&&e[j-1],st=l.label&&l.label.replace(/\r?\n/g," "),Ze=l.meta&&l.meta.replace(/\r?\n/g," "),wt=l.description&&l.description.replace(/\r?\n/g," "),to=l.detail&&l.detail.replace(/\r?\n/g," "),lo=l.ariaLabel||[st,wt,to].map(po=>Object(xn.c)(po)).filter(po=>!!po).join(", ");s.push(new pc({index:j,item:l,saneLabel:st,saneMeta:Ze,saneAriaLabel:lo,saneDescription:wt,saneDetail:to,labelHighlights:(W=l.highlights)===null||W===void 0?void 0:W.label,descriptionHighlights:(z=l.highlights)===null||z===void 0?void 0:z.description,detailHighlights:(de=l.highlights)===null||de===void 0?void 0:de.detail,checked:!1,separator:Fe&&Fe.type==="separator"?Fe:void 0,fireButtonTriggered:i}))}return s},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(s=>s.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((s,l,j)=>(s.set(l.item,j),s),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(i=>this.elementsToIndexes.has(i)).map(i=>this.elementsToIndexes.get(i))),e.length>0){const i=this.list.getFocus()[0];typeof i=="number"&&this.list.reveal(i)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(i=>this.elementsToIndexes.has(i)).map(i=>this.elementsToIndexes.get(i)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const i=new Set;for(const s of e)i.add(s);for(const s of this.elements)s.checked=i.has(s.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;e===mn.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=mn.First),e===mn.Previous&&this.list.getFocus()[0]===0&&(e=mn.Last),e===mn.Second&&this.list.length<2&&(e=mn.First);switch(e){case mn.First:this.list.focusFirst();break;case mn.Second:this.list.focusNth(1);break;case mn.Last:this.list.focusLast();break;case mn.Next:this.list.focusNext();break;case mn.Previous:this.list.focusPrevious();break;case mn.NextPage:this.list.focusNextPage();break;case mn.PreviousPage:this.list.focusPreviousPage();break}const i=this.list.getFocus()[0];typeof i=="number"&&this.list.reveal(i)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${Math.floor(e/44)*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(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(s=>{s.labelHighlights=void 0,s.descriptionHighlights=void 0,s.detailHighlights=void 0,s.hidden=!1;const l=s.index&&this.inputElements[s.index-1];s.separator=l&&l.type==="separator"?l:void 0});else{let s;this.elements.forEach(l=>{const j=this.matchOnLabel?Object(Mt.p)(Object(is.c)(e,Object(is.d)(l.saneLabel))):void 0,W=this.matchOnDescription?Object(Mt.p)(Object(is.c)(e,Object(is.d)(l.saneDescription||""))):void 0,z=this.matchOnDetail?Object(Mt.p)(Object(is.c)(e,Object(is.d)(l.saneDetail||""))):void 0,de=this.matchOnMeta?Object(Mt.p)(Object(is.c)(e,Object(is.d)(l.saneMeta||""))):void 0;if(j||W||z||de?(l.labelHighlights=j,l.descriptionHighlights=W,l.detailHighlights=z,l.hidden=!1):(l.labelHighlights=void 0,l.descriptionHighlights=void 0,l.detailHighlights=void 0,l.hidden=!l.item.alwaysShow),l.separator=void 0,!this.sortByLabel){const Fe=l.index&&this.inputElements[l.index-1];s=Fe&&Fe.type==="separator"?Fe:s,s&&!l.hidden&&(l.separator=s,s=void 0)}})}const i=this.elements.filter(s=>!s.hidden);if(this.sortByLabel&&e){const s=e.toLowerCase();i.sort((l,j)=>vc(l,j,s))}return this.elementsToIndexes=i.reduce((s,l,j)=>(s.set(l.item,j),s),new Map),this.list.splice(0,this.list.length,i),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(i.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),i=this.allVisibleChecked(e);for(const s of e)s.checked=!i}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=Object(Xe.f)(this.elementDisposables),this.disposables=Object(Xe.f)(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)}}Hl([Ul.a],Na.prototype,"onDidChangeFocus",null),Hl([Ul.a],Na.prototype,"onDidChangeSelection",null);function vc(e,i,s){const l=e.labelHighlights||[],j=i.labelHighlights||[];return l.length&&!j.length?-1:!l.length&&j.length?1:l.length===0&&j.length===0?0:mc(e.saneLabel,i.saneLabel,s)}class Cc{getWidgetAriaLabel(){return Object(Se.a)("quickInput","Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}var Vl=function(e,i,s,l){function j(W){return W instanceof s?W:new s(function(z){z(W)})}return new(s||(s=Promise))(function(W,z){function de(Ze){try{st(l.next(Ze))}catch(wt){z(wt)}}function Fe(Ze){try{st(l.throw(Ze))}catch(wt){z(wt)}}function st(Ze){Ze.done?W(Ze.value):j(Ze.value).then(de,Fe)}st((l=l.apply(e,i||[])).next())})};const kn=ve.a,yc=Object(xn.e)("quick-input-back",xn.b.arrowLeft),ka={iconClass:yc.classNames,tooltip:Object(Se.a)("quickInput.back","Back"),handle:-1};class ja extends Xe.a{constructor(e){super();this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=ja.noPromptMessage,this._severity=So.a.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new x.b),this.onDidHideEmitter=this._register(new x.b),this.onDisposeEmitter=this._register(new x.b),this.visibleDisposables=this._register(new Xe.b),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 i=this._ignoreFocusOut!==e&&!Ht.c;this._ignoreFocusOut=e&&!Ht.c,i&&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(){if(this.visible)return;this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&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(){if(!this.visible)return;this.ui.hide()}didHide(e=Xn.c.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="\xA0");const i=this.getDescription();if(this.ui.description1.textContent!==i&&(this.ui.description1.textContent=i),this.ui.description2.textContent!==i&&(this.ui.description2.textContent=i),this.busy&&!this.busyDelay&&(this.busyDelay=new Lo.g,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 l=this.buttons.filter(W=>W===ka);this.ui.leftActionBar.push(l.map((W,z)=>{const de=new An.a(`id-${z}`,"",W.iconClass||Ra(W.iconPath),!0,()=>Vl(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(W)}));return de.tooltip=W.tooltip||"",de}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const j=this.buttons.filter(W=>W!==ka);this.ui.rightActionBar.push(j.map((W,z)=>{const de=new An.a(`id-${z}`,"",W.iconClass||Ra(W.iconPath),!0,()=>Vl(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(W)}));return de.tooltip=W.tooltip||"",de}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const s=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==s&&(this._lastValidationMessage=s,ve.R(this.ui.message,...Object(Rl.a)(s))),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?Object(Se.a)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==So.a.Ignore){const i=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=i.foreground?`${i.foreground}`:"",this.ui.message.style.backgroundColor=i.background?`${i.background}`:"",this.ui.message.style.border=i.border?`1px solid ${i.border}`:"",this.ui.message.style.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}ja.noPromptMessage=Object(Se.a)("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class Wr extends ja{constructor(){super(...arguments);this._value="",this.onDidChangeValueEmitter=this._register(new x.b),this.onWillAcceptEmitter=this._register(new x.b),this.onDidAcceptEmitter=this._register(new x.b),this.onDidCustomEmitter=this._register(new x.b),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()?Xn.a.NONE:Xn.a.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new x.b),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new x.b),this.onDidTriggerItemButtonEmitter=this._register(new x.b),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._value!==e&&(this._value=e||"",this.update(),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?Xn.b: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(mn.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{if(e===this.value)return;this._value=e;const i=this.ui.list.filter(this.filterValue(this.ui.inputBox.value));i&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(e)})),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(mn.Next),this.canSelectMany&&this.ui.list.domFocus(),ve.c.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(mn.Previous):this.ui.list.focus(mn.Last),this.canSelectMany&&this.ui.list.domFocus(),ve.c.stop(e,!0);break;case 12:this.ui.list.focus(mn.NextPage),this.canSelectMany&&this.ui.list.domFocus(),ve.c.stop(e,!0);break;case 11:this.ui.list.focus(mn.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),ve.c.stop(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(mn.First),ve.c.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(mn.Last),ve.c.stop(e,!0));break}})),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=>{if(this.activeItemsUpdated)return;if(this.activeItemsToConfirm!==this._activeItems&&Object(fi.g)(e,this._activeItems,(i,s)=>i===s))return;this._activeItems=e,this.onDidChangeActiveEmitter.fire(e)})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:i})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}if(this.selectedItemsToConfirm!==this._selectedItems&&Object(fi.g)(e,this._selectedItems,(s,l)=>s===l))return;this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(i instanceof MouseEvent&&i.button===1)})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{if(!this.canSelectMany)return;if(this.selectedItemsToConfirm!==this._selectedItems&&Object(fi.g)(e,this._selectedItems,(i,s)=>i===s))return;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 i=!1;this.onWillAcceptEmitter.fire({veto:()=>i=!0}),i||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return ve.i(this.ui.container,ve.d.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const i=new qo.a(e),s=i.keyCode,l=this._quickNavigate.keybindings,j=l.some(W=>{const[z,de]=W.getParts();return de?!1:z.shiftKey&&s===4?!(i.ctrlKey||i.altKey||i.metaKey):z.altKey&&s===6||z.ctrlKey&&s===5?!0:!!(z.metaKey&&s===57)});j&&(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,i=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",i&&!this.description);const s={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!i,progressBar:!i,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(s),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 l=this.ariaLabel||this.placeholder||Wr.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==l&&(this.ui.inputBox.ariaLabel=l),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){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());switch(this._itemActivation){case Xn.a.NONE:this._itemActivation=Xn.a.FIRST;break;case Xn.a.SECOND:this.ui.list.focus(mn.Second),this._itemActivation=Xn.a.FIRST;break;case Xn.a.LAST:this.ui.list.focus(mn.Last),this._itemActivation=Xn.a.FIRST;break;default:this.trySelectFirst();break}}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),s.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(mn.First)),this.keepScrollPosition&&(this.scrollTop=e)}}Wr.DEFAULT_ARIA_LABEL=Object(Se.a)("quickInputBox.ariaLabel","Type to narrow down results.");class Pa extends Xe.a{constructor(e){super();this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new x.b),this.onDidCustomEmitter=this._register(new x.b),this.onDidTriggerButtonEmitter=this._register(new x.b),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new x.b),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new x.b),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=i=>{this.keyMods.ctrlCmd=i.ctrlKey||i.metaKey,this.keyMods.alt=i.altKey};this._register(ve.i(window,ve.d.KEY_DOWN,e,!0)),this._register(ve.i(window,ve.d.KEY_UP,e,!0)),this._register(ve.i(window,ve.d.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=ve.q(this.parentElement,kn(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const i=ve.w(e),s=ve.q(e,kn(".quick-input-titlebar")),l=this._register(new Es.a(s));l.domNode.classList.add("quick-input-left-action-bar");const j=ve.q(s,kn(".quick-input-title")),W=this._register(new Es.a(s));W.domNode.classList.add("quick-input-right-action-bar");const z=ve.q(e,kn(".quick-input-description")),de=ve.q(e,kn(".quick-input-header")),Fe=ve.q(de,kn("input.quick-input-check-all"));Fe.type="checkbox",this._register(ve.o(Fe,ve.d.CHANGE,ei=>{const Mi=Fe.checked;ai.setAllVisibleChecked(Mi)})),this._register(ve.i(Fe,ve.d.CLICK,ei=>{(ei.x||ei.y)&&to.setFocus()}));const st=ve.q(de,kn(".quick-input-description")),Ze=ve.q(de,kn(".quick-input-and-message")),wt=ve.q(Ze,kn(".quick-input-filter")),to=this._register(new dc(wt));to.setAttribute("aria-describedby",`${this.idPrefix}message`);const lo=ve.q(wt,kn(".quick-input-visible-count"));lo.setAttribute("aria-live","polite"),lo.setAttribute("aria-atomic","true");const po=new kl.a(lo,{countFormat:Object(Se.a)({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),Ho=ve.q(wt,kn(".quick-input-count"));Ho.setAttribute("aria-live","polite");const Vo=new kl.a(Ho,{countFormat:Object(Se.a)({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),ii=ve.q(de,kn(".quick-input-action")),Jo=new Nl(ii);Jo.label=Object(Se.a)("ok","OK"),this._register(Jo.onDidClick(ei=>{this.onDidAcceptEmitter.fire()}));const Go=ve.q(de,kn(".quick-input-action")),Si=new Nl(Go);Si.label=Object(Se.a)("custom","Custom"),this._register(Si.onDidClick(ei=>{this.onDidCustomEmitter.fire()}));const Ai=ve.q(Ze,kn(`#${this.idPrefix}message.quick-input-message`)),ai=this._register(new Na(e,this.idPrefix+"list",this.options));this._register(ai.onChangedAllVisibleChecked(ei=>{Fe.checked=ei})),this._register(ai.onChangedVisibleCount(ei=>{po.setCount(ei)})),this._register(ai.onChangedCheckedCount(ei=>{Vo.setCount(ei)})),this._register(ai.onLeave(()=>{setTimeout(()=>{to.setFocus(),this.controller instanceof Wr&&this.controller.canSelectMany&&ai.clearFocus()},0)})),this._register(ai.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const Fo=new nc(e);Fo.getContainer().classList.add("quick-input-progress");const Xo=ve.Y(e);return this._register(Xo),this._register(ve.i(e,ve.d.FOCUS,ei=>{this.previousFocusElement=ei.relatedTarget instanceof HTMLElement?ei.relatedTarget:void 0},!0)),this._register(Xo.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(Xn.c.Blur),this.previousFocusElement=void 0})),this._register(ve.i(e,ve.d.FOCUS,ei=>{to.setFocus()})),this._register(ve.i(e,ve.d.KEY_DOWN,ei=>{const Mi=new qo.a(ei);switch(Mi.keyCode){case 3:ve.c.stop(ei,!0),this.onDidAcceptEmitter.fire();break;case 9:ve.c.stop(ei,!0),this.hide(Xn.c.Gesture);break;case 2:if(!Mi.altKey&&!Mi.ctrlKey&&!Mi.metaKey){const qi=[".action-label.codicon"];e.classList.contains("show-checkboxes")?qi.push("input"):qi.push("input[type=text]"),this.getUI().list.isDisplayed()&&qi.push(".monaco-list");const gi=e.querySelectorAll(qi.join(", "));Mi.shiftKey&&Mi.target===gi[0]?(ve.c.stop(ei,!0),gi[gi.length-1].focus()):!Mi.shiftKey&&Mi.target===gi[gi.length-1]&&(ve.c.stop(ei,!0),gi[0].focus())}break}})),this.ui={container:e,styleSheet:i,leftActionBar:l,titleBar:s,title:j,description1:z,description2:st,rightActionBar:W,checkAll:Fe,filterContainer:wt,inputBox:to,visibleCountContainer:lo,visibleCount:po,countContainer:Ho,count:Vo,okContainer:ii,ok:Jo,message:Ai,customButtonContainer:Go,customButton:Si,list:ai,progressBar:Fo,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:ei=>this.show(ei),hide:()=>this.hide(),setVisibilities:ei=>this.setVisibilities(ei),setComboboxAccessibility:ei=>this.setComboboxAccessibility(ei),setEnabled:ei=>this.setEnabled(ei),setContextKey:ei=>this.options.setContextKey(ei)},this.updateStyles(),this.ui}pick(e,i={},s=B.a.None){return new Promise((l,j)=>{let W=st=>{W=l,i.onKeyMods&&i.onKeyMods(z.keyMods),l(st)};if(s.isCancellationRequested){W(void 0);return}const z=this.createQuickPick();let de;const Fe=[z,z.onDidAccept(()=>{if(z.canSelectMany)W(z.selectedItems.slice()),z.hide();else{const st=z.activeItems[0];st&&(W(st),z.hide())}}),z.onDidChangeActive(st=>{const Ze=st[0];Ze&&i.onDidFocus&&i.onDidFocus(Ze)}),z.onDidChangeSelection(st=>{if(!z.canSelectMany){const Ze=st[0];Ze&&(W(Ze),z.hide())}}),z.onDidTriggerItemButton(st=>i.onDidTriggerItemButton&&i.onDidTriggerItemButton(Object.assign(Object.assign({},st),{removeItem:()=>{const Ze=z.items.indexOf(st.item);if(Ze!==-1){const wt=z.items.slice(),to=wt.splice(Ze,1),lo=z.activeItems.filter(Ho=>Ho!==to[0]),po=z.keepScrollPosition;z.keepScrollPosition=!0,z.items=wt,lo&&(z.activeItems=lo),z.keepScrollPosition=po}}}))),z.onDidChangeValue(st=>{de&&!st&&(z.activeItems.length!==1||z.activeItems[0]!==de)&&(z.activeItems=[de])}),s.onCancellationRequested(()=>{z.hide()}),z.onDidHide(()=>{Object(Xe.f)(Fe),W(void 0)})];z.title=i.title,z.canSelectMany=!!i.canPickMany,z.placeholder=i.placeHolder,z.ignoreFocusOut=!!i.ignoreFocusLost,z.matchOnDescription=!!i.matchOnDescription,z.matchOnDetail=!!i.matchOnDetail,z.matchOnLabel=i.matchOnLabel===void 0||i.matchOnLabel,z.autoFocusOnList=i.autoFocusOnList===void 0||i.autoFocusOnList,z.quickNavigate=i.quickNavigate,z.contextKey=i.contextKey,z.busy=!0,Promise.all([e,i.activeItem]).then(([st,Ze])=>{de=Ze,z.busy=!1,z.items=st,z.canSelectMany&&(z.selectedItems=st.filter(wt=>wt.type!=="separator"&&wt.picked)),de&&(z.activeItems=[de])}),z.show(),Promise.resolve(e).then(void 0,st=>{j(st),z.hide()})})}createQuickPick(){const e=this.getUI();return new Wr(e)}show(e){const i=this.getUI();this.onShowEmitter.fire();const s=this.controller;this.controller=e,s&&s.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(So.a.Ignore),i.visibleCount.setCount(0),i.count.setCount(0),ve.R(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 l=this.options.backKeybindingLabel();ka.tooltip=l?Object(Se.a)("quickInput.backWithKeybinding","Back ({0})",l):Object(Se.a)("quickInput.back","Back"),i.container.style.display="",this.updateLayout(),i.inputBox.setFocus()}setVisibilities(e){const i=this.getUI();i.title.style.display=e.title?"":"none",i.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",i.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",i.checkAll.style.display=e.checkAll?"":"none",i.filterContainer.style.display=e.inputBox?"":"none",i.visibleCountContainer.style.display=e.visibleCount?"":"none",i.countContainer.style.display=e.count?"":"none",i.okContainer.style.display=e.ok?"":"none",i.customButtonContainer.style.display=e.customButton?"":"none",i.message.style.display=e.message?"":"none",i.progressBar.getContainer().style.display=e.progressBar?"":"none",i.list.display(!!e.list),i.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const i=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(i.inputBox.setAttribute("role","combobox"),i.inputBox.setAttribute("aria-haspopup","true"),i.inputBox.setAttribute("aria-autocomplete","list"),i.inputBox.setAttribute("aria-activedescendant",i.list.getActiveDescendant()||"")):(i.inputBox.removeAttribute("role"),i.inputBox.removeAttribute("aria-haspopup"),i.inputBox.removeAttribute("aria-autocomplete"),i.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const i of this.getUI().leftActionBar.viewItems)i.getAction().enabled=e;for(const i of this.getUI().rightActionBar.viewItems)i.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var i;const s=this.controller;if(s){const l=!((i=this.ui)===null||i===void 0?void 0:i.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",l||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),s.didHide(e)}}layout(e,i){this.dimension=e,this.titleBarOffset=i,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,i=Math.min(this.dimension.width*.62,Pa.MAX_WIDTH);e.width=i+"px",e.marginLeft="-"+i/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:i,quickInputForeground:s,contrastBorder:l,widgetShadow:j}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=i?i.toString():"",this.ui.container.style.color=s?s.toString():"",this.ui.container.style.border=l?`1px solid ${l}`:"",this.ui.container.style.boxShadow=j?`0 0 8px 2px ${j}`:"",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 W=[];this.styles.list.pickerGroupBorder&&W.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&W.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)&&(W.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&W.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&W.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&W.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&W.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&W.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),W.push("}"));const z=W.join(`
|
|
|
`);z!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=z)}}}Pa.MAX_WIDTH=600;var Fa=t("C/vA"),zl=t("Lx4V"),Ba=t("Zr1c"),Ec=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},Kl=function(e,i){return function(s,l){i(s,l,e)}};let Wa=class extends Xe.a{constructor(i,s){super();this.quickInputService=i,this.instantiationService=s,this.registry=oi.a.as(zl.b.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(i="",s){this.doShowOrPick(i,!1,s)}doShowOrPick(i,s,l){var j;const[W,z]=this.getOrInstantiateProvider(i),de=this.visibleQuickAccess,Fe=de==null?void 0:de.descriptor;if(de&&z&&Fe===z){i!==z.prefix&&!(l==null?void 0:l.preserveValue)&&(de.picker.value=i),this.adjustValueSelection(de.picker,z,l);return}if(z&&!(l==null?void 0:l.preserveValue)){let po;if(de&&Fe&&Fe!==z){const Ho=de.value.substr(Fe.prefix.length);Ho&&(po=`${z.prefix}${Ho}`)}if(!po){const Ho=W==null?void 0:W.defaultFilterValue;Ho===zl.a.LAST?po=this.lastAcceptedPickerValues.get(z):typeof Ho=="string"&&(po=`${z.prefix}${Ho}`)}typeof po=="string"&&(i=po)}const st=new Xe.b,Ze=st.add(this.quickInputService.createQuickPick());Ze.value=i,this.adjustValueSelection(Ze,z,l),Ze.placeholder=z==null?void 0:z.placeholder,Ze.quickNavigate=l==null?void 0:l.quickNavigateConfiguration,Ze.hideInput=!!Ze.quickNavigate&&!de,(typeof(l==null?void 0:l.itemActivation)=="number"||(l==null?void 0:l.quickNavigateConfiguration))&&(Ze.itemActivation=(j=l==null?void 0:l.itemActivation)!==null&&j!==void 0?j:Ba.b.SECOND),Ze.contextKey=z==null?void 0:z.contextKey,Ze.filterValue=po=>po.substring(z?z.prefix.length:0),(z==null?void 0:z.placeholder)&&(Ze.ariaLabel=z==null?void 0:z.placeholder);let wt,to;s&&(wt=new Promise(po=>to=po),st.add(Object(Fa.a)(Ze.onWillAccept)(po=>{po.veto(),Ze.hide()}))),st.add(this.registerPickerListeners(Ze,W,z,i));const lo=st.add(new B.b);if(W&&st.add(W.provide(Ze,lo.token)),Object(Fa.a)(Ze.onDidHide)(()=>{Ze.selectedItems.length===0&&lo.cancel(),st.dispose(),to==null||to(Ze.selectedItems)}),Ze.show(),s)return wt}adjustValueSelection(i,s,l){var j;let W;(l==null?void 0:l.preserveValue)?W=[i.value.length,i.value.length]:W=[(j=s==null?void 0:s.prefix.length)!==null&&j!==void 0?j:0,i.value.length],i.valueSelection=W}registerPickerListeners(i,s,l,j){const W=new Xe.b,z=this.visibleQuickAccess={picker:i,descriptor:l,value:j};return W.add(Object(Xe.i)(()=>{z===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),W.add(i.onDidChangeValue(de=>{const[Fe]=this.getOrInstantiateProvider(de);Fe!==s?this.show(de,{preserveValue:!0}):z.value=de})),l&&W.add(i.onDidAccept(()=>{this.lastAcceptedPickerValues.set(l,i.value)})),W}getOrInstantiateProvider(i){const s=this.registry.getQuickAccessProvider(i);if(!s)return[void 0,void 0];let l=this.mapProviderToDescriptor.get(s);return l||(l=this.instantiationService.createInstance(s.ctor),this.mapProviderToDescriptor.set(s,l)),[l,s]}};Wa=Ec([Kl(0,Ba.a),Kl(1,vn.a)],Wa);var Sc=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},gr=function(e,i){return function(s,l){i(s,l,e)}};let Ua=class extends nn.c{constructor(i,s,l,j,W){super(l);this.instantiationService=i,this.contextKeyService=s,this.accessibilityService=j,this.layoutService=W,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(Wa))),this._quickAccess}createController(i=this.layoutService,s){var l,j;const W={idPrefix:"quickInput_",container:i.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:de=>this.setContextKey(de),returnFocus:()=>i.focus(),createList:(de,Fe,st,Ze,wt)=>this.instantiationService.createInstance(_a.d,de,Fe,st,Ze,wt),styles:this.computeStyles()},z=this._register(new Pa(Object.assign(Object.assign({},W),s)));return z.layout(i.dimension,(j=(l=i.offset)===null||l===void 0?void 0:l.top)!==null&&j!==void 0?j:0),this._register(i.onDidLayout(de=>{var Fe,st;return z.layout(de,(st=(Fe=i.offset)===null||Fe===void 0?void 0:Fe.top)!==null&&st!==void 0?st:0)})),this._register(z.onShow(()=>this.resetContextKeys())),this._register(z.onHide(()=>this.resetContextKeys())),z}setContextKey(i){let s;if(i&&(s=this.contexts.get(i),s||(s=new Ct.c(i,!1).bindTo(this.contextKeyService),this.contexts.set(i,s))),s&&s.get())return;this.resetContextKeys(),s&&s.set(!0)}resetContextKeys(){this.contexts.forEach(i=>{i.get()&&i.reset()})}pick(i,s={},l=B.a.None){return this.controller.pick(i,s,l)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},Object(fs.d)(this.theme,{quickInputBackground:ni.qc,quickInputForeground:ni.rc,quickInputTitleBackground:ni.vc,contrastBorder:ni.h,widgetShadow:ni.Nc})),inputBox:Object(fs.d)(this.theme,{inputForeground:ni.jb,inputBackground:ni.hb,inputBorder:ni.ib,inputValidationInfoBackground:ni.nb,inputValidationInfoForeground:ni.pb,inputValidationInfoBorder:ni.ob,inputValidationWarningBackground:ni.qb,inputValidationWarningForeground:ni.sb,inputValidationWarningBorder:ni.rb,inputValidationErrorBackground:ni.kb,inputValidationErrorForeground:ni.mb,inputValidationErrorBorder:ni.lb}),countBadge:Object(fs.d)(this.theme,{badgeBackground:ni.c,badgeForeground:ni.d,badgeBorder:ni.h}),button:Object(fs.d)(this.theme,{buttonForeground:ni.f,buttonBackground:ni.e,buttonHoverBackground:ni.g,buttonBorder:ni.h}),progressBar:Object(fs.d)(this.theme,{progressBarBackground:ni.pc}),keybindingLabel:Object(fs.d)(this.theme,{keybindingLabelBackground:ni.tb,keybindingLabelForeground:ni.wb,keybindingLabelBorder:ni.ub,keybindingLabelBottomBorder:ni.vb,keybindingLabelShadow:ni.Nc}),list:Object(fs.d)(this.theme,{listBackground:ni.qc,listInactiveFocusForeground:ni.tc,listInactiveSelectionIconForeground:ni.uc,listInactiveFocusBackground:ni.sc,listFocusOutline:ni.b,listInactiveFocusOutline:ni.b,pickerGroupBorder:ni.kc,pickerGroupForeground:ni.lc})}}};Ua=Sc([gr(0,vn.a),gr(1,Ct.b),gr(2,nn.b),gr(3,os.b),gr(4,Or)],Ua);var Gl=function(e,i,s,l){var j=arguments.length,W=j<3?i:l===null?l=Object.getOwnPropertyDescriptor(i,s):l,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(e,i,s,l);else for(var de=e.length-1;de>=0;de--)(z=e[de])&&(W=(j<3?z(W):j>3?z(i,s,W):z(i,s))||W);return j>3&&W&&Object.defineProperty(i,s,W),W},Ts=function(e,i){return function(s,l){i(s,l,e)}};let Ha=class extends Ua{constructor(i,s,l,j,W,z){super(s,l,j,W,z);this.host=void 0;const de=fr.get(i);this.host={_serviceBrand:void 0,get container(){return de.widget.getDomNode()},get dimension(){return i.getLayoutInfo()},get onDidLayout(){return i.onDidLayoutChange},focus:()=>i.focus()}}createController(){return super.createController(this.host)}};Ha=Gl([Ts(1,vn.a),Ts(2,Ct.b),Ts(3,nn.b),Ts(4,os.b),Ts(5,Or)],Ha);let Va=class{constructor(i,s){this.instantiationService=i,this.codeEditorService=s,this.mapEditorToService=new Map}get activeService(){const i=this.codeEditorService.getFocusedCodeEditor();if(!i)throw new Error("Quick input service needs a focused editor to work.");let s=this.mapEditorToService.get(i);if(!s){const l=s=this.instantiationService.createInstance(Ha,i);this.mapEditorToService.set(i,s),Object(Fa.a)(i.onDidDispose)(()=>{l.dispose(),this.mapEditorToService.delete(i)})}return s}get quickAccess(){return this.activeService.quickAccess}pick(i,s={},l=B.a.None){return this.activeService.pick(i,s,l)}createQuickPick(){return this.activeService.createQuickPick()}};Va=Gl([Ts(0,vn.a),Ts(1,Pe.a)],Va);class fr{constructor(e){this.editor=e,this.widget=new za(this.editor)}static get(e){return e.getContribution(fr.ID)}dispose(){this.widget.dispose()}}fr.ID="editor.controller.quickInput";class za{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return za.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}za.ID="editor.contrib.quickInputWidget",Object(Zn.l)(fr.ID,fr);var Fi;(function(e){const i=new Ps.a;class s{constructor(de,Fe){this._serviceId=de,this._factory=Fe,this._value=null}get id(){return this._serviceId}get(de){if(!this._value){if(de&&(this._value=de[this._serviceId.toString()]),this._value||(this._value=this._factory(de)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");i.set(this._serviceId,this._value)}return this._value}}e.LazyStaticService=s;let l=[];function j(de,Fe){let st=new s(de,Fe);return l.push(st),st}function W(de){let Fe=new Ps.a;for(const[Ze,wt]of Object(_l.a)())Fe.set(Ze,wt);for(let Ze in de)de.hasOwnProperty(Ze)&&Fe.set(Object(vn.c)(Ze),de[Ze]);l.forEach(Ze=>Fe.set(Ze.id,Ze.get(de)));let st=new La(Fe,!0);return Fe.set(vn.a,st),[Fe,st]}e.init=W,e.instantiationService=j(vn.a,()=>new La(i,!0));const z=new br;e.configurationService=j(g.a,()=>z),e.resourceConfigurationService=j(Ui.a,()=>new zr(z)),e.resourcePropertiesService=j(Ui.b,()=>new Is(z)),e.contextService=j(li.a,()=>new As),e.labelService=j(Gd.a,()=>new er),e.telemetryService=j(pa.a,()=>new vr),e.dialogService=j(Cl.a,()=>new Os),e.notificationService=j(Ko.a,()=>new Yn),e.markerService=j(qn.b,()=>new Js),e.modeService=j(xo.a,de=>new bi),e.standaloneThemeService=j(Ds.a,()=>new Td),e.logService=j($i.b,()=>new $i.d(new $i.a)),e.undoRedoService=j(ji.a,de=>new jr(e.dialogService.get(de),e.notificationService.get(de))),e.languageConfigurationService=j(St.a,de=>new St.c(e.configurationService.get(de),e.modeService.get(de))),e.modelService=j(Li.a,de=>new _r(e.configurationService.get(de),e.resourcePropertiesService.get(de),e.standaloneThemeService.get(de),e.logService.get(de),e.undoRedoService.get(de),e.modeService.get(de),e.languageConfigurationService.get(de))),e.markerDecorationsService=j(Yd.a,de=>new xa(e.modelService.get(de),e.markerService.get(de))),e.contextKeyService=j(Ct.b,de=>new fa(e.configurationService.get(de))),e.codeEditorService=j(Pe.a,de=>new $e(null,e.contextKeyService.get(de),e.standaloneThemeService.get(de))),e.editorProgressService=j(Ws.a,()=>new Mn),e.storageService=j(Sl.a,()=>new Sl.b),e.editorWorkerService=j(Mo.a,de=>new be(e.modelService.get(de),e.resourceConfigurationService.get(de),e.logService.get(de)))})(Fi||(Fi={}));class wc extends Xe.a{constructor(e,i){super();const[s,l]=Fi.init(i);this._serviceCollection=s,this._instantiationService=l;const j=this.get(g.a),W=this.get(Ko.a),z=this.get(pa.a),de=this.get(nn.b),Fe=this.get($i.b),st=this.get(Ct.b);let Ze=(Ho,Vo)=>{let ii=null;return i&&(ii=i[Ho.toString()]),ii||(ii=Vo()),this._serviceCollection.set(Ho,ii),ii};Ze(os.b,()=>new Ta(st,j)),Ze(_a.a,()=>new _a.b(de));let wt=Ze(Me.b,()=>new vs(this._instantiationService)),to=Ze(ts.a,()=>this._register(new ns(st,wt,z,W,Fe,e))),lo=Ze(Or,()=>new Kr(Fi.codeEditorService.get(Pe.a),e));Ze(Ba.a,()=>new Va(l,Fi.codeEditorService.get(Pe.a)));let po=Ze(zn.b,()=>this._register(new wa(lo)));Ze(Bs.a,()=>new qd),Ze(zn.a,()=>{const Ho=new Sa(z,W,po,to,de);return Ho.configure({blockMouse:!1}),this._register(Ho)}),Ze(Tn.a,()=>new Da(wt)),Ze(ae.a,()=>new $a(Fi.modelService.get(Li.a)))}get(e){let i=this._serviceCollection.get(e);if(!i)throw new Error("Missing service "+e);return i}set(e,i){this._serviceCollection.set(e,i)}has(e){return this._serviceCollection.has(e)}}function Xl(e,i,s){let l=new wc(e,i),j=null;l.has(Do.a)||(j=new En(Fi.modelService.get()),l.set(Do.a,j)),l.has(we.a)||l.set(we.a,new Tt(l.get(Pe.a),l.get(Me.b)));let W=s(l);return j&&j.setEditor(W),W}function Lc(e,i,s){return Xl(e,s||{},l=>new go(e,i,l,l.get(vn.a),l.get(Pe.a),l.get(Me.b),l.get(Ct.b),l.get(ts.a),l.get(zn.b),l.get(Ds.a),l.get(Ko.a),l.get(g.a),l.get(os.b),l.get(Li.a),l.get(xo.a)))}function _c(e){return Fi.codeEditorService.get().onCodeEditorAdd(i=>{e(i)})}function Dc(e,i,s){return Xl(e,s||{},l=>new yo(e,i,l,l.get(vn.a),l.get(Ct.b),l.get(ts.a),l.get(zn.b),l.get(Mo.a),l.get(Pe.a),l.get(Ds.a),l.get(Ko.a),l.get(g.a),l.get(zn.a),l.get(Ws.a),l.get(Bs.a)))}function Mc(e,i){return new We(e,i)}function xc(e,i,s){return jo(Fi.modelService.get(),Fi.modeService.get(),e,i,s)}function Tc(e,i){Fi.modelService.get().setMode(e,Fi.modeService.get().create(i))}function Oc(e,i,s){e&&Fi.markerService.get().changeOne(i,e.uri,s)}function Ic(e){return Fi.markerService.get().read(e)}function Ac(e){return Fi.markerService.get().onMarkerChanged(e)}function Rc(e){return Fi.modelService.get().getModel(e)}function Nc(){return Fi.modelService.get().getModels()}function kc(e){return Fi.modelService.get().onModelAdded(e)}function jc(e){return Fi.modelService.get().onModelRemoved(e)}function Pc(e){return Fi.modelService.get().onModelModeChanged(i=>{e({model:i.model,oldLanguage:i.oldModeId})})}function Fc(e){return zt(Fi.modelService.get(),e)}function Bc(e,i){const s=Fi.standaloneThemeService.get();return s.registerEditorContainer(e),Wn.colorizeElement(s,Fi.modeService.get(),e,i)}function Wc(e,i,s){const l=Fi.standaloneThemeService.get();return l.registerEditorContainer(document.body),Wn.colorize(Fi.modeService.get(),e,i,s)}function Uc(e,i,s=4){const l=Fi.standaloneThemeService.get();return l.registerEditorContainer(document.body),Wn.colorizeModelLine(e,i,s)}function Hc(e){let i=Rt.E.get(e);return i||{getInitialState:()=>vo.b,tokenize:(s,l,j,W)=>Object(vo.c)(e,s,j,W)}}function Vc(e,i){let s=Fi.modeService.get();s.triggerMode(i);let l=Hc(i),j=Object(Ue.Q)(e),W=[],z=l.getInitialState();for(let de=0,Fe=j.length;de<Fe;de++){let st=j[de],Ze=l.tokenize(st,!0,z,0);W[de]=Ze.tokens,z=Ze.endState}return W}function zc(e,i){Fi.standaloneThemeService.get().defineTheme(e,i)}function Kc(e){Fi.standaloneThemeService.get().setTheme(e)}function Gc(){Object(Ns.b)()}function Xc(e,i){return Me.a.registerCommand({id:e,handler:i})}function $c(){return{create:Lc,onDidCreateEditor:_c,createDiffEditor:Dc,createDiffNavigator:Mc,createModel:xc,setModelLanguage:Tc,setModelMarkers:Oc,getModelMarkers:Ic,onDidChangeMarkers:Ac,getModels:Nc,getModel:Rc,onDidCreateModel:kc,onWillDisposeModel:jc,onDidChangeModelLanguage:Pc,createWebWorker:Fc,colorizeElement:Bc,colorize:Wc,colorizeModelLine:Uc,tokenize:Vc,defineTheme:zc,setTheme:Kc,remeasureFonts:Gc,registerCommand:Xc,AccessibilitySupport:m,ContentWidgetPositionPreference:_,CursorChangeReason:b,DefaultEndOfLine:h,EditorAutoIndentStrategy:p,EditorOption:E,EndOfLinePreference:y,EndOfLineSequence:C,MinimapPosition:oe,MouseTargetType:$,OverlayWidgetPositionPreference:te,OverviewRulerLane:ne,RenderLineNumbersType:Ee,RenderMinimap:fe,ScrollbarVisibility:ie,ScrollType:ee,TextEditorCursorBlinkingStyle:xe,TextEditorCursorStyle:Ie,TrackedRangeStickiness:Le,WrappingIndent:Te,ConfigurationChangedEvent:f.b,BareFontInfo:tt.a,FontInfo:tt.b,TextModelResolvedOptions:It.h,FindMatch:It.b,EditorType:Et.a,EditorOptions:f.g}}function Yc(e,i){if(!i)return!1;if(!Array.isArray(i))return!1;for(const s of i)if(!e(s))return!1;return!0}function Ur(e,i){return typeof e=="boolean"?e:i}function $l(e,i){return typeof e=="string"?e:i}function Zc(e){const i={};for(const s of e)i[s]=!0;return i}function Yl(e,i=!1){i&&(e=e.map(function(l){return l.toLowerCase()}));const s=Zc(e);return i?function(l){return s[l.toLowerCase()]!==void 0&&s.hasOwnProperty(l.toLowerCase())}:function(l){return s[l]!==void 0&&s.hasOwnProperty(l)}}function Ka(e,i){i=i.replace(/@@/g,"");let s=0,l;do l=!1,i=i.replace(/@(\w+)/g,function(W,z){l=!0;let de="";if(typeof e[z]=="string")de=e[z];else if(e[z]&&e[z]instanceof RegExp)de=e[z].source;else throw e[z]===void 0?mo(e,"language definition does not contain attribute '"+z+"', used at: "+i):mo(e,"attribute reference '"+z+"' must be a string, used at: "+i);return Xt(de)?"":"(?:"+de+")"}),s++;while(l&&s<5);i=i.replace(/\x01/g,"@");let j=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(i,j)}function Qc(e,i,s,l){if(l<0)return e;if(l<i.length)return i[l];if(l>=100){l=l-100;let j=s.split(".");if(j.unshift(s),l<j.length)return j[l]}return null}function Jc(e,i,s,l){let j=-1,W=s,z=s.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);z&&(z[3]&&(j=parseInt(z[3]),z[2]&&(j=j+100)),W=z[4]);let de="~",Fe=W;!W||W.length===0?(de="!=",Fe=""):/^\w*$/.test(Fe)?de="==":(z=W.match(/^(@|!@|~|!~|==|!=)(.*)$/),z&&(de=z[1],Fe=z[2]));let st;if((de==="~"||de==="!~")&&/^(\w|\|)*$/.test(Fe)){let Ze=Yl(Fe.split("|"),e.ignoreCase);st=function(wt){return de==="~"?Ze(wt):!Ze(wt)}}else if(de==="@"||de==="!@"){let Ze=e[Fe];if(!Ze)throw mo(e,"the @ match target '"+Fe+"' is not defined, in rule: "+i);if(!Yc(function(to){return typeof to=="string"},Ze))throw mo(e,"the @ match target '"+Fe+"' must be an array of strings, in rule: "+i);let wt=Yl(Ze,e.ignoreCase);st=function(to){return de==="@"?wt(to):!wt(to)}}else if(de==="~"||de==="!~")if(Fe.indexOf("$")<0){let Ze=Ka(e,"^"+Fe+"$");st=function(wt){return de==="~"?Ze.test(wt):!Ze.test(wt)}}else st=function(Ze,wt,to,lo){let po=Ka(e,"^"+Io(e,Fe,wt,to,lo)+"$");return po.test(Ze)};else if(Fe.indexOf("$")<0){let Ze=uo(e,Fe);st=function(wt){return de==="=="?wt===Ze:wt!==Ze}}else{let Ze=uo(e,Fe);st=function(wt,to,lo,po,Ho){let Vo=Io(e,Ze,to,lo,po);return de==="=="?wt===Vo:wt!==Vo}}return j===-1?{name:s,value:l,test:function(Ze,wt,to,lo){return st(Ze,Ze,wt,to,lo)}}:{name:s,value:l,test:function(Ze,wt,to,lo){let po=Qc(Ze,wt,to,j);return st(po||"",Ze,wt,to,lo)}}}function Ga(e,i,s){if(s){if(typeof s=="string")return s;if(s.token||s.token===""){if(typeof s.token!="string")throw mo(e,"a 'token' attribute must be of type string, in rule: "+i);{let l={token:s.token};if(s.token.indexOf("$")>=0&&(l.tokenSubst=!0),typeof s.bracket=="string")if(s.bracket==="@open")l.bracket=1;else if(s.bracket==="@close")l.bracket=-1;else throw mo(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+i);if(s.next){if(typeof s.next!="string")throw mo(e,"the next state must be a string value in rule: "+i);{let j=s.next;if(!/^(@pop|@push|@popall)$/.test(j)&&(j[0]==="@"&&(j=j.substr(1)),j.indexOf("$")<0&&!Oo(e,Io(e,j,"",[],""))))throw mo(e,"the next state '"+s.next+"' is not defined in rule: "+i);l.next=j}}return typeof s.goBack=="number"&&(l.goBack=s.goBack),typeof s.switchTo=="string"&&(l.switchTo=s.switchTo),typeof s.log=="string"&&(l.log=s.log),typeof s.nextEmbedded=="string"&&(l.nextEmbedded=s.nextEmbedded,e.usesEmbedded=!0),l}}else if(Array.isArray(s)){let l=[];for(let j=0,W=s.length;j<W;j++)l[j]=Ga(e,i,s[j]);return{group:l}}else if(s.cases){let l=[];for(let W in s.cases)if(s.cases.hasOwnProperty(W)){const z=Ga(e,i,s.cases[W]);W==="@default"||W==="@"||W===""?l.push({test:void 0,value:z,name:W}):W==="@eos"?l.push({test:function(de,Fe,st,Ze){return Ze},value:z,name:W}):l.push(Jc(e,i,W,z))}const j=e.defaultToken;return{test:function(W,z,de,Fe){for(const st of l){const Ze=!st.test||st.test(W,z,de,Fe);if(Ze)return st.value}return j}}}else throw mo(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+i)}else return{token:""}}class qc{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,i){let s;if(typeof i=="string")s=i;else if(i instanceof RegExp)s=i.source;else throw mo(e,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=s.length>0&&s[0]==="^",this.name=this.name+": "+s,this.regex=Ka(e,"^(?:"+(this.matchOnlyAtLineStart?s.substr(1):s)+")")}setAction(e,i){this.action=Ga(e,this.name,i)}}function eu(e,i){if(!i||typeof i!="object")throw new Error("Monarch: expecting a language definition object");let s={};s.languageId=e,s.includeLF=Ur(i.includeLF,!1),s.noThrow=!1,s.maxStack=100,s.start=typeof i.start=="string"?i.start:null,s.ignoreCase=Ur(i.ignoreCase,!1),s.unicode=Ur(i.unicode,!1),s.tokenPostfix=$l(i.tokenPostfix,"."+s.languageId),s.defaultToken=$l(i.defaultToken,"source"),s.usesEmbedded=!1;let l=i;l.languageId=e,l.includeLF=s.includeLF,l.ignoreCase=s.ignoreCase,l.unicode=s.unicode,l.noThrow=s.noThrow,l.usesEmbedded=s.usesEmbedded,l.stateNames=i.tokenizer,l.defaultToken=s.defaultToken;function j(z,de,Fe){for(const st of Fe){let Ze=st.include;if(Ze){if(typeof Ze!="string")throw mo(s,"an 'include' attribute must be a string at: "+z);if(Ze[0]==="@"&&(Ze=Ze.substr(1)),!i.tokenizer[Ze])throw mo(s,"include target '"+Ze+"' is not defined at: "+z);j(z+"."+Ze,de,i.tokenizer[Ze])}else{const wt=new qc(z);if(Array.isArray(st)&&st.length>=1&&st.length<=3)if(wt.setRegex(l,st[0]),st.length>=3)if(typeof st[1]=="string")wt.setAction(l,{token:st[1],next:st[2]});else if(typeof st[1]=="object"){const to=st[1];to.next=st[2],wt.setAction(l,to)}else throw mo(s,"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: "+z);else wt.setAction(l,st[1]);else{if(!st.regex)throw mo(s,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+z);st.name&&(typeof st.name=="string"&&(wt.name=st.name)),st.matchOnlyAtStart&&(wt.matchOnlyAtLineStart=Ur(st.matchOnlyAtLineStart,!1)),wt.setRegex(l,st.regex),wt.setAction(l,st.action)}de.push(wt)}}}if(!i.tokenizer||typeof i.tokenizer!="object")throw mo(s,"a language definition must define the 'tokenizer' attribute as an object");s.tokenizer=[];for(let z in i.tokenizer)if(i.tokenizer.hasOwnProperty(z)){s.start||(s.start=z);const de=i.tokenizer[z];s.tokenizer[z]=new Array,j("tokenizer."+z,s.tokenizer[z],de)}if(s.usesEmbedded=l.usesEmbedded,i.brackets){if(!Array.isArray(i.brackets))throw mo(s,"the 'brackets' attribute must be defined as an array")}else i.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let W=[];for(let z of i.brackets){let de=z;if(de&&Array.isArray(de)&&de.length===3&&(de={token:de[2],open:de[0],close:de[1]}),de.open===de.close)throw mo(s,"open and close brackets in a 'brackets' attribute must be different: "+de.open+`
|
|
|
hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof de.open=="string"&&typeof de.token=="string"&&typeof de.close=="string")W.push({token:de.token+s.tokenPostfix,open:uo(s,de.open),close:uo(s,de.close)});else throw mo(s,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return s.brackets=W,s.noThrow=!0,s}function tu(e){ti.a.registerLanguage(e)}function ou(){let e=[];return e=e.concat(ti.a.getLanguages()),e}function iu(e){const i=Fi.modeService.get();return i.languageIdCodec.encodeLanguageId(e)}function nu(e,i){let s=Fi.modeService.get().onDidEncounterLanguage(l=>{l===l&&(s.dispose(),i())});return s}function su(e,i){const s=Fi.modeService.get().validateLanguageId(e);if(!s)throw new Error(`Cannot set configuration for unknown language ${e}`);return St.b.register(s,i,100)}class ru{constructor(e,i){this._languageId=e,this._actual=i}getInitialState(){return this._actual.getInitialState()}tokenize(e,i,s,l){if(typeof this._actual.tokenize=="function")return Hr.adaptTokenize(this._languageId,this._actual,e,s,l);throw new Error("Not supported!")}tokenize2(e,i,s){let l=this._actual.tokenizeEncoded(e,s);return new v.c(l.tokens,l.endState)}}class Hr{constructor(e,i,s,l){this._languageId=e,this._actual=i,this._modeService=s,this._standaloneThemeService=l}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,i,s){let l=[],j=0;for(let W=0,z=e.length;W<z;W++){const de=e[W];let Fe=de.startIndex;W===0?Fe=0:Fe<j&&(Fe=j),l[W]=new v.a(Fe+s,de.scopes,i),j=Fe}return l}static adaptTokenize(e,i,s,l,j){let W=i.tokenize(s,l),z=Hr._toClassicTokens(W.tokens,e,j),de;return W.endState.equals(l)?de=l:de=W.endState,new v.b(z,de)}tokenize(e,i,s,l){return Hr.adaptTokenize(this._languageId,this._actual,e,s,l)}_toBinaryTokens(e,i,s){const l=e.encodeLanguageId(this._languageId),j=this._standaloneThemeService.getColorTheme().tokenTheme;let W=[],z=0,de=0;for(let st=0,Ze=i.length;st<Ze;st++){const wt=i[st],to=j.match(l,wt.scopes);if(z>0&&W[z-1]===to)continue;let lo=wt.startIndex;st===0?lo=0:lo<de&&(lo=de),W[z++]=lo+s,W[z++]=to,de=lo}let Fe=new Uint32Array(z);for(let st=0;st<z;st++)Fe[st]=W[st];return Fe}tokenize2(e,i,s,l){let j=this._actual.tokenize(e,s),W=this._toBinaryTokens(this._modeService.languageIdCodec,j.tokens,l),z;return j.endState.equals(s)?z=s:z=j.endState,new v.c(W,z)}}function au(e){return"tokenizeEncoded"in e}function Zl(e){return e&&typeof e.then=="function"}function lu(e){if(e){const i=[null];for(let s=1,l=e.length;s<l;s++)i[s]=ms.a.fromHex(e[s]);Fi.standaloneThemeService.get().setColorMapOverride(i)}else Fi.standaloneThemeService.get().setColorMapOverride(null)}function du(e,i){const s=Fi.modeService.get().validateLanguageId(e);if(!s)throw new Error(`Cannot set tokens provider for unknown language ${e}`);const l=j=>au(j)?new ru(s,j):new Hr(s,j,Fi.modeService.get(),Fi.standaloneThemeService.get());return Zl(i)?Rt.E.registerPromise(e,i.then(j=>l(j))):Rt.E.register(e,l(i))}function cu(e,i){const s=l=>In(Fi.modeService.get(),Fi.standaloneThemeService.get(),e,eu(e,l));return Zl(i)?Rt.E.registerPromise(e,i.then(l=>s(l))):Rt.E.register(e,s(i))}function uu(e,i){return Rt.x.register(e,i)}function hu(e,i){return Rt.y.register(e,i)}function mu(e,i){return Rt.A.register(e,i)}function gu(e,i){return Rt.p.register(e,{provideHover:(s,l,j)=>{let W=s.getWordAtPosition(l);return Promise.resolve(i.provideHover(s,l,j)).then(z=>z?(!z.range&&W&&(z.range=new I.a(l.lineNumber,W.startColumn,l.lineNumber,W.endColumn)),z.range||(z.range=new I.a(l.lineNumber,l.column,l.lineNumber,l.column)),z):void 0)}})}function fu(e,i){return Rt.m.register(e,i)}function pu(e,i){return Rt.i.register(e,i)}function bu(e,i){return Rt.v.register(e,i)}function vu(e,i){return Rt.f.register(e,i)}function Cu(e,i){return Rt.q.register(e,i)}function yu(e,i){return Rt.F.register(e,i)}function Eu(e,i){return Rt.b.register(e,i)}function Su(e,i,s){return Rt.a.register(e,{providedCodeActionKinds:s==null?void 0:s.providedCodeActionKinds,provideCodeActions:(l,j,W,z)=>{let de=Fi.markerService.get().read({resource:l.uri}).filter(Fe=>I.a.areIntersectingOrTouching(Fe,j));return i.provideCodeActions(l,j,{markers:de,only:W.only},z)},resolveCodeAction:i.resolveCodeAction})}function wu(e,i){return Rt.g.register(e,i)}function Lu(e,i){return Rt.j.register(e,i)}function _u(e,i){return Rt.w.register(e,i)}function Du(e,i){return Rt.u.register(e,i)}function Mu(e,i){return Rt.d.register(e,i)}function xu(e,i){return Rt.c.register(e,i)}function Tu(e,i){return Rt.o.register(e,i)}function Ou(e,i){return Rt.e.register(e,i)}function Iu(e,i){return Rt.z.register(e,i)}function Au(e,i){return Rt.l.register(e,i)}function Ru(e,i){return Rt.k.register(e,i)}function Nu(e,i){return Rt.t.register(e,i)}function ku(e,i){return Rt.r.register(e,i)}function ju(){return{register:tu,getLanguages:ou,onLanguage:nu,getEncodedLanguageId:iu,setLanguageConfiguration:su,setColorMap:lu,setTokensProvider:du,setMonarchTokensProvider:cu,registerReferenceProvider:uu,registerRenameProvider:hu,registerCompletionItemProvider:Mu,registerSignatureHelpProvider:mu,registerHoverProvider:gu,registerDocumentSymbolProvider:fu,registerDocumentHighlightProvider:pu,registerLinkedEditingRangeProvider:bu,registerDefinitionProvider:vu,registerImplementationProvider:Cu,registerTypeDefinitionProvider:yu,registerCodeLensProvider:Eu,registerCodeActionProvider:Su,registerDocumentFormattingEditProvider:wu,registerDocumentRangeFormattingEditProvider:Lu,registerOnTypeFormattingEditProvider:_u,registerLinkProvider:Du,registerColorProvider:xu,registerFoldingRangeProvider:Tu,registerDeclarationProvider:Ou,registerSelectionRangeProvider:Iu,registerDocumentSemanticTokensProvider:Au,registerDocumentRangeSemanticTokensProvider:Ru,registerInlineCompletionsProvider:Nu,registerInlayHintsProvider:ku,DocumentHighlightKind:c,CompletionItemKind:D,CompletionItemTag:S,CompletionItemInsertTextRule:d,SymbolKind:J,SymbolTag:he,IndentAction:O,CompletionTriggerKind:r,SignatureHelpTriggerKind:G,InlayHintKind:k,InlineCompletionTriggerKind:Y,FoldingRangeKind:Rt.n}}var Pu=t("hN88"),Xa;f.g.wrappingIndent.defaultValue=0,f.g.glyphMargin.defaultValue=!1,f.g.autoIndent.defaultValue=3,f.g.overviewRulerLanes.defaultValue=2,Pu.a.setFormatterSelector((e,i,s)=>Promise.resolve(e[0]));const Ln=ue();Ln.editor=$c(),Ln.languages=ju();const Fu=Ln.CancellationTokenSource,Bu=Ln.Emitter,Wu=Ln.KeyCode,Uu=Ln.KeyMod,Hu=Ln.Position,Vu=Ln.Range,zu=Ln.Selection,Ku=Ln.SelectionDirection,Gu=Ln.MarkerSeverity,Xu=Ln.MarkerTag,$u=Ln.Uri,Yu=Ln.Token,Zu=Ln.editor,Qu=Ln.languages;(((Xa=Ht.b.MonacoEnvironment)===null||Xa===void 0?void 0:Xa.globalAPI)||typeof define=="function"&&t("FzHg"))&&(self.monaco=Ln),typeof self.require!="undefined"&&typeof self.require.config=="function"&&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"]})},"9B1q":function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:function(){return t.e(326).then(t.bind(null,"v7Iz"))}})},"9XAT":function(mt,M,t){"use strict";t.r(M),t.d(M,"cssDefaults",function(){return I}),t.d(M,"scssDefaults",function(){return L}),t.d(M,"lessDefaults",function(){return v});var f=t("M/lh"),B=t.n(f),x=t("CzyV"),N=function(){function d(D,S,r){this._onDidChange=new x.Emitter,this._languageId=D,this.setOptions(S),this.setModeConfiguration(r)}return Object.defineProperty(d.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"diagnosticsOptions",{get:function(){return this.options},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),d.prototype.setOptions=function(D){this._options=D||Object.create(null),this._onDidChange.fire(this)},d.prototype.setDiagnosticsOptions=function(D){this.setOptions(D)},d.prototype.setModeConfiguration=function(D){this._modeConfiguration=D||Object.create(null),this._onDidChange.fire(this)},d}(),A={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}},F={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},I=new N("css",A,F),L=new N("scss",A,F),v=new N("less",A,F);x.languages.css={cssDefaults:I,lessDefaults:v,scssDefaults:L};function m(){return t.e(314).then(t.bind(null,"20/g"))}x.languages.onLanguage("less",function(){m().then(function(d){return d.setupMode(v)})}),x.languages.onLanguage("scss",function(){m().then(function(d){return d.setupMode(L)})}),x.languages.onLanguage("css",function(){m().then(function(d){return d.setupMode(I)})})},"9XeP":function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("Cg/j");const B=Object(f.c)("clipboardService")},"9Y+e":function(mt,M,t){"use strict";t.d(M,"a",function(){return f});class f{constructor(B,x,N,A,F,I){this.id=B,this.label=x,this.alias=N,this._precondition=A,this._run=F,this._contextKeyService=I}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}},"9fML":function(mt,M,t){"use strict";t.d(M,"b",function(){return x}),t.d(M,"a",function(){return N});var f=t("r0BQ");const B=[];function x(A,F,I){F instanceof f.a||(F=new f.a(F,[],I)),B.push([A,F])}function N(){return B}},"9o5J":function(mt,M,t){"use strict";t.d(M,"b",function(){return d}),t.d(M,"a",function(){return S}),t.d(M,"c",function(){return r});var f=t("/cxE"),B=t("MI8n"),x=t("nD70"),N=t("pmY6"),A=t("QDVR"),F=t("gslv"),I=t("N0LK"),L=t("aokT"),v=t("3/fG"),m=function(_,b,h,c){function p(E){return E instanceof h?E:new h(function(y){y(E)})}return new(h||(h=Promise))(function(E,y){function C(Y){try{k(c.next(Y))}catch(Q){y(Q)}}function O(Y){try{k(c.throw(Y))}catch(Q){y(Q)}}function k(Y){Y.done?E(Y.value):p(Y.value).then(C,O)}k((c=c.apply(_,b||[])).next())})};class d{constructor(_,b,h,c){this.isProviderFirst=_,this.parent=b,this.link=h,this._rangeCallback=c,this.id=x.b.nextId()}get uri(){return this.link.uri}get range(){var _,b;return(b=(_=this._range)!==null&&_!==void 0?_:this.link.targetSelectionRange)!==null&&b!==void 0?b:this.link.range}set range(_){this._range=_,this._rangeCallback(this)}get ariaMessage(){var _;const b=(_=this.parent.getPreview(this))===null||_===void 0?void 0:_.preview(this.range);return b?Object(v.a)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",Object(F.b)(this.uri),this.range.startLineNumber,this.range.startColumn,b.value):Object(v.a)("aria.oneReference","symbol in {0} on line {1} at column {2}",Object(F.b)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class D{constructor(_){this._modelReference=_}dispose(){this._modelReference.dispose()}preview(_,b=8){const h=this._modelReference.object.textEditorModel;if(!h)return;const{startLineNumber:c,startColumn:p,endLineNumber:E,endColumn:y}=_,C=h.getWordUntilPosition({lineNumber:c,column:p-b}),O=new L.a(c,C.startColumn,c,p),k=new L.a(E,y,E,1073741824),Y=h.getValueInRange(O).replace(/^\s+/,""),Q=h.getValueInRange(_),H=h.getValueInRange(k).replace(/\s+$/,"");return{value:Y+Q+H,highlight:{start:Y.length,end:Y.length+Q.length}}}}class S{constructor(_,b){this.parent=_,this.uri=b,this.children=[],this._previews=new A.b}dispose(){Object(N.f)(this._previews.values()),this._previews.clear()}getPreview(_){return this._previews.get(_.uri)}get ariaMessage(){const _=this.children.length;return _===1?Object(v.a)("aria.fileReferences.1","1 symbol in {0}, full path {1}",Object(F.b)(this.uri),this.uri.fsPath):Object(v.a)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",_,Object(F.b)(this.uri),this.uri.fsPath)}resolve(_){return m(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(let b of this.children){if(this._previews.has(b.uri))continue;try{const h=yield _.createModelReference(b.uri);this._previews.set(b.uri,new D(h))}catch(h){Object(f.f)(h)}}return this})}}class r{constructor(_,b){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new B.b,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=_,this._title=b;const[h]=_;_.sort(r._compareReferences);let c;for(let p of _)if((!c||!F.e.isEqual(c.uri,p.uri,!0))&&(c=new S(this,p.uri),this.groups.push(c)),c.children.length===0||r._compareReferences(p,c.children[c.children.length-1])!==0){const E=new d(h===p,c,p,y=>this._onDidChangeReferenceRange.fire(y));this.references.push(E),c.children.push(E)}}dispose(){Object(N.f)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new r(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?Object(v.a)("aria.result.0","No results found"):this.references.length===1?Object(v.a)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?Object(v.a)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):Object(v.a)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(_,b){let{parent:h}=_,c=h.children.indexOf(_),p=h.children.length,E=h.parent.groups.length;return E===1||b&&c+1<p||!b&&c>0?(b?c=(c+1)%p:c=(c+p-1)%p,h.children[c]):(c=h.parent.groups.indexOf(h),b?(c=(c+1)%E,h.parent.groups[c].children[0]):(c=(c+E-1)%E,h.parent.groups[c].children[h.parent.groups[c].children.length-1]))}nearestReference(_,b){const h=this.references.map((c,p)=>({idx:p,prefixLen:I.d(c.uri.toString(),_.toString()),offsetDist:Math.abs(c.range.startLineNumber-b.lineNumber)*100+Math.abs(c.range.startColumn-b.column)})).sort((c,p)=>c.prefixLen>p.prefixLen?-1:c.prefixLen<p.prefixLen?1:c.offsetDist<p.offsetDist?-1:c.offsetDist>p.offsetDist?1:0)[0];return h?this.references[h.idx]:void 0}referenceAt(_,b){for(const h of this.references)if(h.uri.toString()===_.toString()&&L.a.containsPosition(h.range,b))return h;return}firstReference(){for(const _ of this.references)if(_.isProviderFirst)return _;return this.references[0]}static _compareReferences(_,b){return F.e.compare(_.uri,b.uri)||L.a.compareRangesUsingStarts(_.range,b.range)}}},"A+jI":function(mt,M,t){"use strict";t.d(M,"a",function(){return d}),t.d(M,"c",function(){return D}),t.d(M,"b",function(){return r});var f=t("MI8n"),B=t("pmY6"),x=t("746U"),N=t("X+cX"),A=function(_,b,h,c){function p(E){return E instanceof h?E:new h(function(y){y(E)})}return new(h||(h=Promise))(function(E,y){function C(Y){try{k(c.next(Y))}catch(Q){y(Q)}}function O(Y){try{k(c.throw(Y))}catch(Q){y(Q)}}function k(Y){Y.done?E(Y.value):p(Y.value).then(C,O)}k((c=c.apply(_,b||[])).next())})},F;(function(_){_[_.None=0]="None",_[_.Initialized=1]="Initialized",_[_.Closed=2]="Closed"})(F||(F={}));class I extends B.a{constructor(_,b=Object.create(null)){super();this.database=_,this.options=b,this._onDidChangeStorage=this._register(new f.b),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=F.None,this.cache=new Map,this.flushDelayer=new N.f(I.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(_=>this.onDidChangeItemsExternal(_)))}onDidChangeItemsExternal(_){var b,h;(b=_.changed)===null||b===void 0||b.forEach((c,p)=>this.accept(p,c)),(h=_.deleted)===null||h===void 0||h.forEach(c=>this.accept(c,void 0))}accept(_,b){if(this.state===F.Closed)return;let h=!1;if(Object(x.n)(b))h=this.cache.delete(_);else{const c=this.cache.get(_);c!==b&&(this.cache.set(_,b),h=!0)}h&&this._onDidChangeStorage.fire(_)}get(_,b){const h=this.cache.get(_);return Object(x.n)(h)?b:h}getBoolean(_,b){const h=this.get(_);return Object(x.n)(h)?b:h==="true"}getNumber(_,b){const h=this.get(_);return Object(x.n)(h)?b:parseInt(h,10)}set(_,b){return A(this,void 0,void 0,function*(){if(this.state===F.Closed)return;if(Object(x.n)(b))return this.delete(_);const h=String(b),c=this.cache.get(_);return c===h?void 0:(this.cache.set(_,h),this.pendingInserts.set(_,h),this.pendingDeletes.delete(_),this._onDidChangeStorage.fire(_),this.flushDelayer.trigger(()=>this.flushPending()))})}delete(_){return A(this,void 0,void 0,function*(){if(this.state===F.Closed)return;const b=this.cache.delete(_);return b?(this.pendingDeletes.has(_)||this.pendingDeletes.add(_),this.pendingInserts.delete(_),this._onDidChangeStorage.fire(_),this.flushDelayer.trigger(()=>this.flushPending())):void 0})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return A(this,void 0,void 0,function*(){if(!this.hasPending)return;const _={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(_).finally(()=>{var b;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(b=this.whenFlushedCallbacks.pop())===null||b===void 0||b()})})}dispose(){this.flushDelayer.dispose(),super.dispose()}}I.DEFAULT_FLUSH_DELAY=100;class L{constructor(){this.onDidChangeItemsExternal=f.c.None,this.items=new Map}updateItems(_){return A(this,void 0,void 0,function*(){_.insert&&_.insert.forEach((b,h)=>this.items.set(h,b)),_.delete&&_.delete.forEach(b=>this.items.delete(b))})}}var v=t("Cg/j");const m="__$__targetStorageMarker",d=Object(v.c)("storageService");var D;(function(_){_[_.NONE=0]="NONE",_[_.SHUTDOWN=1]="SHUTDOWN"})(D||(D={}));class S extends B.a{constructor(_={flushInterval:S.DEFAULT_FLUSH_INTERVAL}){super();this.options=_,this._onDidChangeValue=this._register(new f.e),this._onDidChangeTarget=this._register(new f.e),this._onWillSaveState=this._register(new f.b),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(_,b){b===m?(_===0?this._globalKeyTargets=void 0:_===1&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:_})):this._onDidChangeValue.fire({scope:_,key:b,target:this.getKeyTargets(_)[b]})}get(_,b,h){var c;return(c=this.getStorage(b))===null||c===void 0?void 0:c.get(_,h)}getBoolean(_,b,h){var c;return(c=this.getStorage(b))===null||c===void 0?void 0:c.getBoolean(_,h)}getNumber(_,b,h){var c;return(c=this.getStorage(b))===null||c===void 0?void 0:c.getNumber(_,h)}store(_,b,h,c){if(Object(x.n)(b)){this.remove(_,h);return}this.withPausedEmitters(()=>{var p;this.updateKeyTarget(_,h,c),(p=this.getStorage(h))===null||p===void 0||p.set(_,b)})}remove(_,b){this.withPausedEmitters(()=>{var h;this.updateKeyTarget(_,b,void 0),(h=this.getStorage(b))===null||h===void 0||h.delete(_)})}withPausedEmitters(_){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{_()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(_,b,h){var c,p;const E=this.getKeyTargets(b);typeof h=="number"?E[_]!==h&&(E[_]=h,(c=this.getStorage(b))===null||c===void 0||c.set(m,JSON.stringify(E))):typeof E[_]=="number"&&(delete E[_],(p=this.getStorage(b))===null||p===void 0||p.set(m,JSON.stringify(E)))}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(_){return _===0?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(_){const b=this.get(m,_);if(b)try{return JSON.parse(b)}catch(h){}return Object.create(null)}}S.DEFAULT_FLUSH_INTERVAL=60*1e3;class r extends S{constructor(){super();this.globalStorage=this._register(new I(new L)),this.workspaceStorage=this._register(new I(new L)),this._register(this.workspaceStorage.onDidChangeStorage(_=>this.emitDidChangeValue(1,_))),this._register(this.globalStorage.onDidChangeStorage(_=>this.emitDidChangeValue(0,_)))}getStorage(_){return _===0?this.globalStorage:this.workspaceStorage}}},"A9l+":function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"c",function(){return x}),t.d(M,"b",function(){return N}),t.d(M,"d",function(){return F}),t.d(M,"e",function(){return I}),t.d(M,"g",function(){return L}),t.d(M,"h",function(){return v}),t.d(M,"f",function(){return m});var f=t("3/fG"),B;(function(d){d.noSelection=f.a("noSelection","No selection"),d.singleSelectionRange=f.a("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),d.singleSelection=f.a("singleSelection","Line {0}, Column {1}"),d.multiSelectionRange=f.a("multiSelectionRange","{0} selections ({1} characters selected)"),d.multiSelection=f.a("multiSelection","{0} selections"),d.emergencyConfOn=f.a("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),d.openingDocs=f.a("openingDocs","Now opening the Editor Accessibility documentation page."),d.readonlyDiffEditor=f.a("readonlyDiffEditor"," in a read-only pane of a diff editor."),d.editableDiffEditor=f.a("editableDiffEditor"," in a pane of a diff editor."),d.readonlyEditor=f.a("readonlyEditor"," in a read-only code editor"),d.editableEditor=f.a("editableEditor"," in a code editor"),d.changeConfigToOnMac=f.a("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),d.changeConfigToOnWinLinux=f.a("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),d.auto_on=f.a("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),d.auto_off=f.a("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),d.tabFocusModeOnMsg=f.a("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),d.tabFocusModeOnMsgNoKb=f.a("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),d.tabFocusModeOffMsg=f.a("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),d.tabFocusModeOffMsgNoKb=f.a("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),d.openDocMac=f.a("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),d.openDocWinLinux=f.a("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),d.outroMsg=f.a("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),d.showAccessibilityHelpAction=f.a("showAccessibilityHelpAction","Show Accessibility Help")})(B||(B={}));var x;(function(d){d.inspectTokensAction=f.a("inspectTokens","Developer: Inspect Tokens")})(x||(x={}));var N;(function(d){d.gotoLineActionLabel=f.a("gotoLineActionLabel","Go to Line/Column...")})(N||(N={}));var A;(function(d){d.helpQuickAccessActionLabel=f.a("helpQuickAccess","Show all Quick Access Providers")})(A||(A={}));var F;(function(d){d.quickCommandActionLabel=f.a("quickCommandActionLabel","Command Palette"),d.quickCommandHelp=f.a("quickCommandActionHelp","Show And Run Commands")})(F||(F={}));var I;(function(d){d.quickOutlineActionLabel=f.a("quickOutlineActionLabel","Go to Symbol..."),d.quickOutlineByCategoryActionLabel=f.a("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(I||(I={}));var L;(function(d){d.editorViewAccessibleLabel=f.a("editorViewAccessibleLabel","Editor content"),d.accessibilityHelpMessage=f.a("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(L||(L={}));var v;(function(d){d.toggleHighContrast=f.a("toggleHighContrast","Toggle High Contrast Theme")})(v||(v={}));var m;(function(d){d.bulkEditServiceSummary=f.a("bulkEditServiceSummary","Made {0} edits in {1} files")})(m||(m={}))},AKMP:function(mt,M,t){"use strict";t.d(M,"b",function(){return F}),t.d(M,"a",function(){return I});var f=t("EffR"),B=t("51f4"),x=t("XSiN"),N=t("pmY6"),A=t("MNsG");function F(L,v){let m=new x.a(v);return m.preventDefault(),{leftButton:m.leftButton,buttons:m.buttons,posx:m.posx,posy:m.posy}}class I{constructor(){this._hooks=new N.b,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(L,v){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const m=this._onStopCallback;this._onStopCallback=null,L&&m&&m(v)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(L,v,m,d,D){if(this.isMonitoring())return;this._mouseMoveEventMerger=m,this._mouseMoveCallback=d,this._onStopCallback=D;const S=B.a.getSameOriginWindowChain(),r=A.c?"pointermove":"mousemove",_="mouseup",b=S.map(c=>c.window.document),h=f.F(L);h&&b.unshift(h);for(const c of b)this._hooks.add(f.l(c,r,p=>{if(p.buttons!==v){this.stopMonitoring(!0);return}this._mouseMoveCallback(p)},(p,E)=>this._mouseMoveEventMerger(p,E))),this._hooks.add(f.i(c,_,p=>this.stopMonitoring(!0)));if(B.a.hasDifferentOriginAncestor()){let c=S[S.length-1];this._hooks.add(f.i(c.window.document,"mouseout",p=>{let E=new x.a(p);E.target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(f.i(c.window.document,"mouseover",p=>{let E=new x.a(p);E.target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(f.i(c.window.document.body,"mouseleave",p=>{this.stopMonitoring(!0)}))}}}},AbCa:function(mt,M,t){},ApJL:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:function(){return t.e(322).then(t.bind(null,"AoeA"))}})},Apug:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("N0LK");class B{static visibleColumnFromColumn(x,N,A){const F=x.length,I=N-1<F?N-1:F;let L=0,v=0;for(;v<I;){const m=f.z(x,I,v);if(v+=m>=65536?2:1,m===9)L=B.nextRenderTabStop(L,A);else{let d=f.w(m);for(;v<I;){const D=f.z(x,I,v),S=f.w(D);if(f.c(d,S))break;v+=D>=65536?2:1,d=S}f.D(m)||f.B(m)?L=L+2:L=L+1}}return L}static visibleColumnsByColumns(x,N){const A=x.length;let F=new Array;F.push(-1);let I=0,L=0;for(;L<A;){const v=f.z(x,A,L);if(L+=v>=65536?2:1,F.push(I),v>=65536&&F.push(I),v===9)I=B.nextRenderTabStop(I,N);else{let m=f.w(v);for(;L<A;){const d=f.z(x,A,L),D=f.w(d);if(f.c(m,D))break;L+=d>=65536?2:1,F.push(I),v>=65536&&F.push(I),m=D}f.D(v)||f.B(v)?I=I+2:I=I+1}}return F.push(I),F}static visibleColumnFromColumn2(x,N,A){return this.visibleColumnFromColumn(N.getLineContent(A.lineNumber),A.column,x.tabSize)}static columnFromVisibleColumn(x,N,A){if(N<=0)return 1;const F=x.length;let I=0,L=1,v=0;for(;v<F;){const m=f.z(x,F,v);v+=m>=65536?2:1;let d;if(m===9)d=B.nextRenderTabStop(I,A);else{let S=f.w(m);for(;v<F;){const r=f.z(x,F,v),_=f.w(r);if(f.c(S,_))break;v+=r>=65536?2:1,S=_}f.D(m)||f.B(m)?d=I+2:d=I+1}const D=v+1;if(d>=N){const S=N-I,r=d-N;return r<S?D:L}I=d,L=D}return F+1}static columnFromVisibleColumn2(x,N,A,F){let I=this.columnFromVisibleColumn(N.getLineContent(A),F,x.tabSize),L=N.getLineMinColumn(A);if(I<L)return L;let v=N.getLineMaxColumn(A);return I>v?v:I}static nextRenderTabStop(x,N){return x+N-x%N}static nextIndentTabStop(x,N){return x+N-x%N}static prevRenderTabStop(x,N){return Math.max(0,x-1-(x-1)%N)}static prevIndentTabStop(x,N){return Math.max(0,x-1-(x-1)%N)}}},BEdG:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:function(){return t.e(373).then(t.bind(null,"aH2L"))}})},BFtn:function(mt,M,t){"use strict";t.d(M,"a",function(){return f}),t.d(M,"b",function(){return x});function f(N,A){let F=N.getCount(),I=N.findTokenIndexAtOffset(A),L=N.getLanguageId(I),v=I;for(;v+1<F&&N.getLanguageId(v+1)===L;)v++;let m=I;for(;m>0&&N.getLanguageId(m-1)===L;)m--;return new B(N,L,m,v+1,N.getStartOffset(m),N.getEndOffset(v))}class B{constructor(N,A,F,I,L,v){this._scopedLineTokensBrand=void 0,this._actual=N,this.languageId=A,this._firstTokenIndex=F,this._lastTokenIndex=I,this.firstCharOffset=L,this._lastCharOffset=v}getLineContent(){const N=this._actual.getLineContent();return N.substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(N){const A=this._actual.getLineContent();return A.substring(0,this.firstCharOffset+N)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(N){return this._actual.findTokenIndexAtOffset(N+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(N){return this._actual.getStandardTokenType(N+this._firstTokenIndex)}}function x(N){return(N&7)!==0}},BUKB:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:function(){return t.e(369).then(t.bind(null,"xT+r"))}})},BjKj:function(mt,M,t){},"C1Q+":function(mt,M,t){"use strict";t.d(M,"f",function(){return We}),t.d(M,"e",function(){return Rt}),t.d(M,"b",function(){return vo}),t.d(M,"g",function(){return Mo}),t.d(M,"h",function(){return xo}),t.d(M,"d",function(){return Do}),t.d(M,"c",function(){return Lo}),t.d(M,"a",function(){return To});var f=t("JQT/");class B{constructor(Ht){this.executor=Ht,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(Ht){this._error=Ht}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var x=t("pmY6"),N=t("N0LK"),A=t("sswD"),F=t("x/UI"),I=t("wQH0"),L=t("hJVp"),v=t("/cxE"),m=t("NR8r"),d=t("Cg/j"),D=t("EffR"),S=t("8HAY"),r=t("cGHE"),_=t("twdY"),b=t("nlbu"),h=t("Uzvx"),c=t("bexQ"),p=function(Ht,Mt,Ue,dt){var Ut=arguments.length,Ye=Ut<3?Mt:dt===null?dt=Object.getOwnPropertyDescriptor(Mt,Ue):dt,qe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ye=Reflect.decorate(Ht,Mt,Ue,dt);else for(var ct=Ht.length-1;ct>=0;ct--)(qe=Ht[ct])&&(Ye=(Ut<3?qe(Ye):Ut>3?qe(Mt,Ue,Ye):qe(Mt,Ue))||Ye);return Ut>3&&Ye&&Object.defineProperty(Mt,Ue,Ye),Ye},E=function(Ht,Mt){return function(Ue,dt){Mt(Ue,dt,Ht)}},y=function(Ht,Mt,Ue,dt){function Ut(Ye){return Ye instanceof Ue?Ye:new Ue(function(qe){qe(Ye)})}return new(Ue||(Ue=Promise))(function(Ye,qe){function ct(Wt){try{Pt(dt.next(Wt))}catch(Vt){qe(Vt)}}function _t(Wt){try{Pt(dt.throw(Wt))}catch(Vt){qe(Vt)}}function Pt(Wt){Wt.done?Ye(Wt.value):Ut(Wt.value).then(ct,_t)}Pt((dt=dt.apply(Ht,Mt||[])).next())})};class C extends S.a{constructor(Ht,Mt){super(Ht.command?Ht.command.id:Ht.title,O(Ht.title),void 0,!Ht.disabled,Mt);this.action=Ht}}function O(Ht){return Ht.replace(/\r\n|\r|\n/g," ")}let k=class extends x.a{constructor(Mt,Ue,dt,Ut){super();this._editor=Mt,this._delegate=Ue,this._contextMenuService=dt,this._visible=!1,this._showingActions=this._register(new x.d),this._keybindingResolver=new Y({getKeybindings:()=>Ut.getKeybindings()})}get isVisible(){return this._visible}show(Mt,Ue,dt,Ut){return y(this,void 0,void 0,function*(){const Ye=Ut.includeDisabledActions?Ue.allActions:Ue.validActions;if(!Ye.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,Object(v.b)();this._visible=!0,this._showingActions.value=Ue;const qe=this.getMenuActions(Mt,Ye,Ue.documentation),ct=r.a.isIPosition(dt)?this._toCoords(dt):dt||{x:0,y:0},_t=this._keybindingResolver.getResolver(),Pt=this._editor.getOption(113);this._contextMenuService.showContextMenu({domForShadowRoot:Pt?this._editor.getDomNode():void 0,getAnchor:()=>ct,getActions:()=>qe,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:Wt=>Wt instanceof C?_t(Wt.action):void 0})})}getMenuActions(Mt,Ue,dt){var Ut,Ye;const qe=Wt=>new C(Wt.action,()=>this._delegate.onSelectCodeAction(Wt)),ct=Ue.map(qe),_t=[...dt],Pt=this._editor.getModel();if(Pt&&ct.length)for(const Wt of _.a.all(Pt))Wt._getAdditionalMenuItems&&_t.push(...Wt._getAdditionalMenuItems({trigger:Mt.type,only:(Ye=(Ut=Mt.filter)===null||Ut===void 0?void 0:Ut.include)===null||Ye===void 0?void 0:Ye.value},Ue.map(Vt=>Vt.action)));return _t.length&&ct.push(new S.d,..._t.map(Wt=>qe(new L.a({title:Wt.title,command:Wt},void 0)))),ct}_toCoords(Mt){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(Mt,1),this._editor.render();const Ue=this._editor.getScrolledVisiblePosition(Mt),dt=Object(D.D)(this._editor.getDomNode()),Ut=dt.left+Ue.left,Ye=dt.top+Ue.top+Ue.height;return{x:Ut,y:Ye}}};k=p([E(2,h.a),E(3,c.a)],k);class Y{constructor(Ht){this._keybindingProvider=Ht}getResolver(){const Ht=new B(()=>this._keybindingProvider.getKeybindings().filter(Mt=>Y.codeActionCommands.indexOf(Mt.command)>=0).filter(Mt=>Mt.resolvedKeybinding).map(Mt=>{let Ue=Mt.commandArgs;return Mt.command===L.e?Ue={kind:b.b.SourceOrganizeImports.value}:Mt.command===L.c&&(Ue={kind:b.b.SourceFixAll.value}),Object.assign({resolvedKeybinding:Mt.resolvedKeybinding},b.a.fromUser(Ue,{kind:b.b.None,apply:"never"}))}));return Mt=>{if(Mt.kind){const Ue=this.bestKeybindingForCodeAction(Mt,Ht.getValue());return Ue==null?void 0:Ue.resolvedKeybinding}return}}bestKeybindingForCodeAction(Ht,Mt){if(!Ht.kind)return;const Ue=new b.b(Ht.kind);return Mt.filter(dt=>dt.kind.contains(Ue)).filter(dt=>dt.preferred?Ht.isPreferred:!0).reduceRight((dt,Ut)=>dt?dt.kind.contains(Ut.kind)?Ut:dt:Ut,void 0)}}Y.codeActionCommands=[L.f,L.b,L.g,L.e,L.c];var Q=t("AKMP"),H=t("pg8w"),Z=t("Vhoy"),oe=t("MI8n"),$=t("MNXI"),te=t("tX9W"),ne=t("3/fG"),Ee=t("MD5Z"),fe=t("t9D7"),ee=function(Ht,Mt,Ue,dt){var Ut=arguments.length,Ye=Ut<3?Mt:dt===null?dt=Object.getOwnPropertyDescriptor(Mt,Ue):dt,qe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ye=Reflect.decorate(Ht,Mt,Ue,dt);else for(var ct=Ht.length-1;ct>=0;ct--)(qe=Ht[ct])&&(Ye=(Ut<3?qe(Ye):Ut>3?qe(Mt,Ue,Ye):qe(Mt,Ue))||Ye);return Ut>3&&Ye&&Object.defineProperty(Mt,Ue,Ye),Ye},ie=function(Ht,Mt){return function(Ue,dt){Mt(Ue,dt,Ht)}},U;(function(Ht){Ht.Hidden={type:0};class Mt{constructor(Ue,dt,Ut,Ye){this.actions=Ue,this.trigger=dt,this.editorPosition=Ut,this.widgetPosition=Ye,this.type=1}}Ht.Showing=Mt})(U||(U={}));let G=class Ht extends x.a{constructor(Mt,Ue,dt,Ut){super();this._editor=Mt,this._quickFixActionId=Ue,this._preferredFixActionId=dt,this._keybindingService=Ut,this._onClick=this._register(new oe.b),this.onClick=this._onClick.event,this._state=U.Hidden,this._domNode=document.createElement("div"),this._domNode.className=Z.b.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(Ye=>{const qe=this._editor.getModel();(this.state.type!==1||!qe||this.state.editorPosition.lineNumber>=qe.getLineCount())&&this.hide()})),H.b.ignoreTarget(this._domNode),this._register(D.n(this._domNode,Ye=>{if(this.state.type!==1)return;this._editor.focus(),Ye.preventDefault();const{top:qe,height:ct}=D.D(this._domNode),_t=this._editor.getOption(58);let Pt=Math.floor(_t/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(Pt+=_t),this._onClick.fire({x:Ye.posx,y:qe+ct+Pt,actions:this.state.actions,trigger:this.state.trigger})})),this._register(D.i(this._domNode,"mouseenter",Ye=>{if((Ye.buttons&1)!==1)return;this.hide();const qe=new Q.a;qe.startMonitoring(Ye.target,Ye.buttons,Q.b,()=>{},()=>{qe.dispose()})})),this._register(this._editor.onDidChangeConfiguration(Ye=>{Ye.hasChanged(56)&&!this._editor.getOption(56).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 this._state.type===1?this._state.widgetPosition:null}update(Mt,Ue,dt){if(Mt.validActions.length<=0)return this.hide();const Ut=this._editor.getOptions();if(!Ut.get(56).enabled)return this.hide();const Ye=this._editor.getModel();if(!Ye)return this.hide();const{lineNumber:qe,column:ct}=Ye.validatePosition(dt),_t=Ye.getOptions().tabSize,Pt=Ut.get(43),Wt=Ye.getLineContent(qe),Vt=te.c.computeIndentLevel(Wt,_t),so=Pt.spaceWidth*Vt>22,wo=di=>di>2&&this._editor.getTopForLineNumber(di)===this._editor.getTopForLineNumber(di-1);let No=qe;if(!so){if(qe>1&&!wo(qe-1))No-=1;else if(!wo(qe+1))No+=1;else if(ct*Pt.spaceWidth<22)return this.hide()}this.state=new U.Showing(Mt,Ue,dt,{position:{lineNumber:No,column:1},preference:Ht._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=U.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(Mt){this._state=Mt,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...Z.b.lightBulb.classNamesArray),this._domNode.classList.add(...Z.b.lightbulbAutofix.classNamesArray);const Ue=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(Ue){this.title=ne.a("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",Ue.getLabel());return}}this._domNode.classList.remove(...Z.b.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...Z.b.lightBulb.classNamesArray);const Mt=this._keybindingService.lookupKeybinding(this._quickFixActionId);Mt?this.title=ne.a("codeActionWithKb","Show Code Actions ({0})",Mt.getLabel()):this.title=ne.a("codeAction","Show Code Actions")}set title(Mt){this._domNode.title=Mt}};G._posPref=[0],G=ee([ie(3,c.a)],G),Object(fe.f)((Ht,Mt)=>{var Ue;const dt=(Ue=Ht.getColor(Ee.r))===null||Ue===void 0?void 0:Ue.transparent(.7),Ut=Ht.getColor(Ee.O);Ut&&Mt.addRule(`
|
|
|
.monaco-editor .contentWidgets ${Z.b.lightBulb.cssSelector} {
|
|
|
color: ${Ut};
|
|
|
background-color: ${dt};
|
|
|
}`);const Ye=Ht.getColor(Ee.N);Ye&&Mt.addRule(`
|
|
|
.monaco-editor .contentWidgets ${Z.b.lightbulbAutofix.cssSelector} {
|
|
|
color: ${Ye};
|
|
|
background-color: ${dt};
|
|
|
}`)});var J=function(Ht,Mt,Ue,dt){var Ut=arguments.length,Ye=Ut<3?Mt:dt===null?dt=Object.getOwnPropertyDescriptor(Mt,Ue):dt,qe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ye=Reflect.decorate(Ht,Mt,Ue,dt);else for(var ct=Ht.length-1;ct>=0;ct--)(qe=Ht[ct])&&(Ye=(Ut<3?qe(Ye):Ut>3?qe(Mt,Ue,Ye):qe(Mt,Ue))||Ye);return Ut>3&&Ye&&Object.defineProperty(Mt,Ue,Ye),Ye},he=function(Ht,Mt){return function(Ue,dt){Mt(Ue,dt,Ht)}},xe=function(Ht,Mt,Ue,dt){function Ut(Ye){return Ye instanceof Ue?Ye:new Ue(function(qe){qe(Ye)})}return new(Ue||(Ue=Promise))(function(Ye,qe){function ct(Wt){try{Pt(dt.next(Wt))}catch(Vt){qe(Vt)}}function _t(Wt){try{Pt(dt.throw(Wt))}catch(Vt){qe(Vt)}}function Pt(Wt){Wt.done?Ye(Wt.value):Ut(Wt.value).then(ct,_t)}Pt((dt=dt.apply(Ht,Mt||[])).next())})},Ie=function(Ht,Mt,Ue,dt,Ut){if(dt==="m")throw new TypeError("Private method is not writable");if(dt==="a"&&!Ut)throw new TypeError("Private accessor was defined without a setter");if(typeof Mt=="function"?Ht!==Mt||!Ut:!Mt.has(Ht))throw new TypeError("Cannot write private member to an object whose class did not declare it");return dt==="a"?Ut.call(Ht,Ue):Ut?Ut.value=Ue:Mt.set(Ht,Ue),Ue},Le=function(Ht,Mt,Ue,dt){if(Ue==="a"&&!dt)throw new TypeError("Private accessor was defined without a getter");if(typeof Mt=="function"?Ht!==Mt||!dt:!Mt.has(Ht))throw new TypeError("Cannot read private member from an object whose class did not declare it");return Ue==="m"?dt:Ue==="a"?dt.call(Ht):dt?dt.value:Mt.get(Ht)},Te;let ze=class extends x.a{constructor(Mt,Ue,dt,Ut,Ye){super();this._editor=Mt,this.delegate=Ut,this._activeCodeActions=this._register(new x.d),Te.set(this,!1),this._codeActionWidget=new B(()=>this._register(Ye.createInstance(k,this._editor,{onSelectCodeAction:qe=>xe(this,void 0,void 0,function*(){this.delegate.applyCodeAction(qe,!0)})}))),this._lightBulbWidget=new B(()=>{const qe=this._register(Ye.createInstance(G,this._editor,Ue,dt));return this._register(qe.onClick(ct=>this.showCodeActionList(ct.trigger,ct.actions,ct,{includeDisabledActions:!1}))),qe})}dispose(){Ie(this,Te,!0,"f"),super.dispose()}update(Mt){var Ue,dt,Ut;return xe(this,void 0,void 0,function*(){if(Mt.type!==1){(Ue=this._lightBulbWidget.rawValue)===null||Ue===void 0||Ue.hide();return}let Ye;try{Ye=yield Mt.actions}catch(qe){Object(v.f)(qe);return}if(Le(this,Te,"f"))return;if(this._lightBulbWidget.getValue().update(Ye,Mt.trigger,Mt.position),Mt.trigger.type===1){if((dt=Mt.trigger.filter)===null||dt===void 0?void 0:dt.include){const ct=this.tryGetValidActionToApply(Mt.trigger,Ye);if(ct){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(ct,!1)}finally{Ye.dispose()}return}if(Mt.trigger.context){const _t=this.getInvalidActionThatWouldHaveBeenApplied(Mt.trigger,Ye);if(_t&&_t.action.disabled){m.a.get(this._editor).showMessage(_t.action.disabled,Mt.trigger.context.position),Ye.dispose();return}}}const qe=!!((Ut=Mt.trigger.filter)===null||Ut===void 0?void 0:Ut.include);if(Mt.trigger.context&&(!Ye.allActions.length||!qe&&!Ye.validActions.length)){m.a.get(this._editor).showMessage(Mt.trigger.context.notAvailableMessage,Mt.trigger.context.position),this._activeCodeActions.value=Ye,Ye.dispose();return}this._activeCodeActions.value=Ye,this._codeActionWidget.getValue().show(Mt.trigger,Ye,Mt.position,{includeDisabledActions:qe})}else this._codeActionWidget.getValue().isVisible?Ye.dispose():this._activeCodeActions.value=Ye})}getInvalidActionThatWouldHaveBeenApplied(Mt,Ue){return Ue.allActions.length&&(Mt.autoApply==="first"&&Ue.validActions.length===0||Mt.autoApply==="ifSingle"&&Ue.allActions.length===1)?Ue.allActions.find(({action:dt})=>dt.disabled):void 0}tryGetValidActionToApply(Mt,Ue){return Ue.validActions.length&&(Mt.autoApply==="first"&&Ue.validActions.length>0||Mt.autoApply==="ifSingle"&&Ue.validActions.length===1)?Ue.validActions[0]:void 0}showCodeActionList(Mt,Ue,dt,Ut){return xe(this,void 0,void 0,function*(){this._codeActionWidget.getValue().show(Mt,Ue,dt,Ut)})}};Te=new WeakMap,ze=J([he(4,d.a)],ze);var ue=t("nnTU"),je=t("T8No"),Pe=t("tADe"),ve=t("sM1p"),ce=t("tTk5"),le=t("XXUj"),Ce=t("X+cX"),ye=t("gslv"),ge=t("aokT"),Me=function(Ht,Mt,Ue,dt){if(Ue==="a"&&!dt)throw new TypeError("Private accessor was defined without a getter");if(typeof Mt=="function"?Ht!==Mt||!dt:!Mt.has(Ht))throw new TypeError("Cannot read private member from an object whose class did not declare it");return Ue==="m"?dt:Ue==="a"?dt.call(Ht):dt?dt.value:Mt.get(Ht)},De=function(Ht,Mt,Ue,dt,Ut){if(dt==="m")throw new TypeError("Private method is not writable");if(dt==="a"&&!Ut)throw new TypeError("Private accessor was defined without a setter");if(typeof Mt=="function"?Ht!==Mt||!Ut:!Mt.has(Ht))throw new TypeError("Cannot write private member to an object whose class did not declare it");return dt==="a"?Ut.call(Ht,Ue):Ut?Ut.value=Ue:Mt.set(Ht,Ue),Ue},we;const Oe=new je.c("supportedCodeAction","");class nt extends x.a{constructor(Ht,Mt,Ue,dt=250){super();this._editor=Ht,this._markerService=Mt,this._signalChange=Ue,this._delay=dt,this._autoTriggerTimer=this._register(new Ce.g),this._register(this._markerService.onMarkerChanged(Ut=>this._onMarkerChanges(Ut))),this._register(this._editor.onDidChangeCursorPosition(()=>this._onCursorChange()))}trigger(Ht){const Mt=this._getRangeOfSelectionUnlessWhitespaceEnclosed(Ht);return this._createEventAndSignalChange(Ht,Mt)}_onMarkerChanges(Ht){const Mt=this._editor.getModel();if(!Mt)return;Ht.some(Ue=>Object(ye.f)(Ue,Mt.uri))&&this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_getRangeOfMarker(Ht){const Mt=this._editor.getModel();if(!Mt)return;for(const Ue of this._markerService.read({resource:Mt.uri})){const dt=Mt.validateRange(Ue);if(ge.a.intersectRanges(dt,Ht))return ge.a.lift(dt)}return}_getRangeOfSelectionUnlessWhitespaceEnclosed(Ht){if(!this._editor.hasModel())return;const Mt=this._editor.getModel(),Ue=this._editor.getSelection();if(Ue.isEmpty()&&Ht.type===2){const{lineNumber:dt,column:Ut}=Ue.getPosition(),Ye=Mt.getLineContent(dt);if(Ye.length===0)return;if(Ut===1){if(/\s/.test(Ye[0]))return}else if(Ut===Mt.getLineMaxColumn(dt)){if(/\s/.test(Ye[Ye.length-1]))return}else if(/\s/.test(Ye[Ut-2])&&/\s/.test(Ye[Ut-1]))return}return Ue}_createEventAndSignalChange(Ht,Mt){const Ue=this._editor.getModel();if(!Mt||!Ue){this._signalChange(void 0);return}const dt=this._getRangeOfMarker(Mt),Ut=dt?dt.getStartPosition():Mt.getStartPosition(),Ye={trigger:Ht,selection:Mt,position:Ut};return this._signalChange(Ye),Ye}}var Ke;(function(Ht){Ht.Empty={type:0};class Mt{constructor(Ue,dt,Ut,Ye){this.trigger=Ue,this.rangeOrSelection=dt,this.position=Ut,this._cancellablePromise=Ye,this.type=1,this.actions=Ye.catch(qe=>{if(Object(v.e)(qe))return et;throw qe})}cancel(){this._cancellablePromise.cancel()}}Ht.Triggered=Mt})(Ke||(Ke={}));const et={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class bt extends x.a{constructor(Ht,Mt,Ue,dt){super();this._editor=Ht,this._markerService=Mt,this._progressService=dt,this._codeActionOracle=this._register(new x.d),this._state=Ke.Empty,this._onDidChangeState=this._register(new oe.b),this.onDidChangeState=this._onDidChangeState.event,we.set(this,!1),this._supportedCodeActions=Oe.bindTo(Ue),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(_.a.onDidChange(()=>this._update())),this._update()}dispose(){if(Me(this,we,"f"))return;De(this,we,!0,"f"),super.dispose(),this.setState(Ke.Empty,!0)}_update(){if(Me(this,we,"f"))return;this._codeActionOracle.value=void 0,this.setState(Ke.Empty);const Ht=this._editor.getModel();if(Ht&&_.a.has(Ht)&&!this._editor.getOption(80)){const Mt=[];for(const Ue of _.a.all(Ht))Array.isArray(Ue.providedCodeActionKinds)&&Mt.push(...Ue.providedCodeActionKinds);this._supportedCodeActions.set(Mt.join(" ")),this._codeActionOracle.value=new nt(this._editor,this._markerService,Ue=>{var dt;if(!Ue){this.setState(Ke.Empty);return}const Ut=Object(Ce.h)(Ye=>Object(L.d)(Ht,Ue.selection,Ue.trigger,ce.b.None,Ye));Ue.trigger.type===1&&((dt=this._progressService)===null||dt===void 0||dt.showWhile(Ut,250)),this.setState(new Ke.Triggered(Ue.trigger,Ue.selection,Ue.position,Ut))},void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(Ht){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(Ht)}setState(Ht,Mt){if(Ht===this._state)return;this._state.type===1&&this._state.cancel(),this._state=Ht,!Mt&&!Me(this,we,"f")&&this._onDidChangeState.fire(Ht)}}we=new WeakMap;var Tt=function(Ht,Mt,Ue,dt){var Ut=arguments.length,Ye=Ut<3?Mt:dt===null?dt=Object.getOwnPropertyDescriptor(Mt,Ue):dt,qe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ye=Reflect.decorate(Ht,Mt,Ue,dt);else for(var ct=Ht.length-1;ct>=0;ct--)(qe=Ht[ct])&&(Ye=(Ut<3?qe(Ye):Ut>3?qe(Mt,Ue,Ye):qe(Mt,Ue))||Ye);return Ut>3&&Ye&&Object.defineProperty(Mt,Ue,Ye),Ye},$t=function(Ht,Mt){return function(Ue,dt){Mt(Ue,dt,Ht)}},Xe=function(Ht,Mt,Ue,dt){function Ut(Ye){return Ye instanceof Ue?Ye:new Ue(function(qe){qe(Ye)})}return new(Ue||(Ue=Promise))(function(Ye,qe){function ct(Wt){try{Pt(dt.next(Wt))}catch(Vt){qe(Vt)}}function _t(Wt){try{Pt(dt.throw(Wt))}catch(Vt){qe(Vt)}}function Pt(Wt){Wt.done?Ye(Wt.value):Ut(Wt.value).then(ct,_t)}Pt((dt=dt.apply(Ht,Mt||[])).next())})};function it(Ht){return je.a.regex(Oe.keys()[0],new RegExp("(\\s|^)"+Object(N.t)(Ht.value)+"\\b"))}const re={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:ne.a("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:ne.a("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[ne.a("args.schema.apply.first","Always apply the first returned code action."),ne.a("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),ne.a("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:ne.a("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};let We=class Ht extends x.a{constructor(Mt,Ue,dt,Ut,Ye){super();this._instantiationService=Ye,this._editor=Mt,this._model=this._register(new bt(this._editor,Ue,dt,Ut)),this._register(this._model.onDidChangeState(qe=>this.update(qe))),this._ui=new B(()=>this._register(new ze(Mt,Rt.Id,To.Id,{applyCodeAction:(qe,ct)=>Xe(this,void 0,void 0,function*(){try{yield this._applyCodeAction(qe)}finally{ct&&this._trigger({type:2,filter:{}})}})},this._instantiationService)))}static get(Mt){return Mt.getContribution(Ht.ID)}update(Mt){this._ui.getValue().update(Mt)}showCodeActions(Mt,Ue,dt){return this._ui.getValue().showCodeActionList(Mt,Ue,dt,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(Mt,Ue,dt){if(!this._editor.hasModel())return;m.a.get(this._editor).closeMessage();const Ut=this._editor.getPosition();this._trigger({type:1,filter:Ue,autoApply:dt,context:{notAvailableMessage:Mt,position:Ut}})}_trigger(Mt){return this._model.trigger(Mt)}_applyCodeAction(Mt){return this._instantiationService.invokeFunction(tt,Mt,this._editor)}};We.ID="editor.contrib.quickFixController",We=Tt([$t(1,Pe.b),$t(2,je.b),$t(3,ce.a),$t(4,d.a)],We);function tt(Ht,Mt,Ue){return Xe(this,void 0,void 0,function*(){const dt=Ht.get(F.a),Ut=Ht.get(ue.b),Ye=Ht.get(le.a),qe=Ht.get(ve.a);if(Ye.publicLog2("codeAction.applyCodeAction",{codeActionTitle:Mt.action.title,codeActionKind:Mt.action.kind,codeActionIsPreferred:!!Mt.action.isPreferred}),yield Mt.resolve(f.a.None),Mt.action.edit&&(yield dt.apply(F.b.convert(Mt.action.edit),{editor:Ue,label:Mt.action.title})),Mt.action.command)try{yield Ut.executeCommand(Mt.action.command.id,...Mt.action.command.arguments||[])}catch(ct){const _t=Et(ct);qe.error(typeof _t=="string"?_t:ne.a("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function Et(Ht){return typeof Ht=="string"?Ht:Ht instanceof Error&&typeof Ht.message=="string"?Ht.message:void 0}function It(Ht,Mt,Ue,dt){if(Ht.hasModel()){const Ut=We.get(Ht);Ut&&Ut.manualTriggerAtCurrentPosition(Mt,Ue,dt)}}class Rt extends A.b{constructor(){super({id:Rt.Id,label:ne.a("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:je.a.and(I.a.writable,I.a.hasCodeActionsProvider),kbOpts:{kbExpr:I.a.editorTextFocus,primary:2048|84,weight:100}})}run(Ht,Mt){return It(Mt,ne.a("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0)}}Rt.Id="editor.action.quickFix";class vo extends A.c{constructor(){super({id:L.b,precondition:je.a.and(I.a.writable,I.a.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:re}]}})}runEditorCommand(Ht,Mt,Ue){const dt=b.a.fromUser(Ue,{kind:b.b.Empty,apply:"ifSingle"});return It(Mt,typeof(Ue==null?void 0:Ue.kind)=="string"?dt.preferred?ne.a("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",Ue.kind):ne.a("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",Ue.kind):dt.preferred?ne.a("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):ne.a("editor.action.codeAction.noneMessage","No code actions available"),{include:dt.kind,includeSourceActions:!0,onlyIncludePreferredActions:dt.preferred},dt.apply)}}class Mo extends A.b{constructor(){super({id:L.f,label:ne.a("refactor.label","Refactor..."),alias:"Refactor...",precondition:je.a.and(I.a.writable,I.a.hasCodeActionsProvider),kbOpts:{kbExpr:I.a.editorTextFocus,primary:2048|1024|48,mac:{primary:256|1024|48},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:je.a.and(I.a.writable,it(b.b.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:re}]}})}run(Ht,Mt,Ue){const dt=b.a.fromUser(Ue,{kind:b.b.Refactor,apply:"never"});return It(Mt,typeof(Ue==null?void 0:Ue.kind)=="string"?dt.preferred?ne.a("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",Ue.kind):ne.a("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",Ue.kind):dt.preferred?ne.a("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):ne.a("editor.action.refactor.noneMessage","No refactorings available"),{include:b.b.Refactor.contains(dt.kind)?dt.kind:b.b.None,onlyIncludePreferredActions:dt.preferred},dt.apply)}}class xo extends A.b{constructor(){super({id:L.g,label:ne.a("source.label","Source Action..."),alias:"Source Action...",precondition:je.a.and(I.a.writable,I.a.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:je.a.and(I.a.writable,it(b.b.Source))},description:{description:"Source Action...",args:[{name:"args",schema:re}]}})}run(Ht,Mt,Ue){const dt=b.a.fromUser(Ue,{kind:b.b.Source,apply:"never"});return It(Mt,typeof(Ue==null?void 0:Ue.kind)=="string"?dt.preferred?ne.a("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",Ue.kind):ne.a("editor.action.source.noneMessage.kind","No source actions for '{0}' available",Ue.kind):dt.preferred?ne.a("editor.action.source.noneMessage.preferred","No preferred source actions available"):ne.a("editor.action.source.noneMessage","No source actions available"),{include:b.b.Source.contains(dt.kind)?dt.kind:b.b.None,includeSourceActions:!0,onlyIncludePreferredActions:dt.preferred},dt.apply)}}class Do extends A.b{constructor(){super({id:L.e,label:ne.a("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:je.a.and(I.a.writable,it(b.b.SourceOrganizeImports)),kbOpts:{kbExpr:I.a.editorTextFocus,primary:1024|512|45,weight:100}})}run(Ht,Mt){return It(Mt,ne.a("editor.action.organize.noneMessage","No organize imports action available"),{include:b.b.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}class Lo extends A.b{constructor(){super({id:L.c,label:ne.a("fixAll.label","Fix All"),alias:"Fix All",precondition:je.a.and(I.a.writable,it(b.b.SourceFixAll))})}run(Ht,Mt){return It(Mt,ne.a("fixAll.noneMessage","No fix all action available"),{include:b.b.SourceFixAll,includeSourceActions:!0},"ifSingle")}}class To extends A.b{constructor(){super({id:To.Id,label:ne.a("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:je.a.and(I.a.writable,it(b.b.QuickFix)),kbOpts:{kbExpr:I.a.editorTextFocus,primary:512|1024|84,mac:{primary:2048|512|84},weight:100}})}run(Ht,Mt){return It(Mt,ne.a("editor.action.autoFix.noneMessage","No auto fixes available"),{include:b.b.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}To.Id="editor.action.autoFix"},C6rC:function(mt,M,t){},CClx:function(mt,M,t){},CDaH:function(mt,M,t){},CRAX:function(mt,M,t){"use strict";t.d(M,"a",function(){return F}),t.d(M,"b",function(){return h}),t.d(M,"c",function(){return c});var f=t("MI8n"),B=t("746U"),x=t("3/fG"),N=t("3Rsk"),A=t("ic2d");const F={Configuration:"base.contributions.configuration"},I={properties:{},patternProperties:{}},L={properties:{},patternProperties:{}},v={properties:{},patternProperties:{}},m={properties:{},patternProperties:{}},d={properties:{},patternProperties:{}},D={properties:{},patternProperties:{}},S="vscode://schemas/settings/resourceLanguage",r=A.a.as(N.a.JSONContribution);class _{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new f.b,this._onDidUpdateConfiguration=new f.b,this.defaultValues={},this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:x.a("defaultLanguageConfigurationOverrides.title","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={},r.registerSchema(S,this.resourceLanguageSettingsSchema)}registerConfiguration(C,O=!0){this.registerConfigurations([C],O)}registerConfigurations(C,O=!0){const k=this.doRegisterConfigurations(C,O);r.registerSchema(S,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(k)}registerOverrideIdentifiers(C){for(const O of C)this.overrideIdentifiers.add(O);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(C,O){const k=[];return C.forEach(Y=>{k.push(...this.validateAndRegisterProperties(Y,O,Y.extensionInfo)),this.configurationContributors.push(Y),this.registerJSONConfiguration(Y)}),k}validateAndRegisterProperties(C,O=!0,k,Y=3){var Q;Y=B.n(C.scope)?Y:C.scope;let H=[],Z=C.properties;if(Z)for(let $ in Z){if(O&&y($)){delete Z[$];continue}const te=Z[$];if(this.updatePropertyDefaultValue($,te),h.test($)?te.scope=void 0:(te.scope=B.n(te.scope)?Y:te.scope,te.restricted=B.n(te.restricted)?!!((Q=k==null?void 0:k.restrictedConfigurations)===null||Q===void 0?void 0:Q.includes($)):te.restricted),Z[$].hasOwnProperty("included")&&!Z[$].included){this.excludedConfigurationProperties[$]=Z[$],delete Z[$];continue}else this.configurationProperties[$]=Z[$];!Z[$].deprecationMessage&&Z[$].markdownDeprecationMessage&&(Z[$].deprecationMessage=Z[$].markdownDeprecationMessage),H.push($)}let oe=C.allOf;if(oe)for(let $ of oe)H.push(...this.validateAndRegisterProperties($,O,k,Y));return H}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(C){const O=k=>{let Y=k.properties;if(Y)for(const H in Y)this.updateSchema(H,Y[H]);let Q=k.allOf;Q&&Q.forEach(O)};O(C)}updateSchema(C,O){I.properties[C]=O;switch(O.scope){case 1:L.properties[C]=O;break;case 2:v.properties[C]=O;break;case 6:m.properties[C]=O;break;case 3:d.properties[C]=O;break;case 4:D.properties[C]=O;break;case 5:D.properties[C]=O,this.resourceLanguageSettingsSchema.properties[C]=O;break}}updateOverridePropertyPatternKey(){for(const C of this.overrideIdentifiers.values()){const O=`[${C}]`,k={type:"object",description:x.a("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:x.a("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:S};this.updatePropertyDefaultValue(O,k),I.properties[O]=k,L.properties[O]=k,v.properties[O]=k,m.properties[O]=k,d.properties[O]=k,D.properties[O]=k}this._onDidSchemaChange.fire()}updatePropertyDefaultValue(C,O){let k=this.defaultValues[C];B.m(k)&&(k=O.default),B.m(k)&&(k=p(O.type)),O.default=k}}const b="\\[.*\\]$",h=new RegExp(b);function c(C){return C.substring(1,C.length-1)}function p(C){const O=Array.isArray(C)?C[0]:C;switch(O){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const E=new _;A.a.add(F.Configuration,E);function y(C){return C.trim()?h.test(C)?x.a("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",C):E.getConfigurationProperties()[C]!==void 0?x.a("config.property.duplicate","Cannot register '{0}'. This property is already registered.",C):null:x.a("config.property.empty","Cannot register an empty property")}},CZ1j:function(mt,M,t){"use strict";t.d(M,"b",function(){return f}),t.d(M,"a",function(){return B});function f(x){return x<0?0:x>255?255:x|0}function B(x){return x<0?0:x>4294967295?4294967295:x|0}},CdFp:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:function(){return t.e(317).then(t.bind(null,"6Xso"))}})},Cduo:function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var f=t("0/Sa"),B=t("aokT");class x{static _handleEolEdits(N,A){let F,I=[];for(let L of A)typeof L.eol=="number"&&(F=L.eol),L.range&&typeof L.text=="string"&&I.push(L);return typeof F=="number"&&(N.hasModel()&&N.getModel().pushEOL(F)),I}static _isFullModelReplaceEdit(N,A){if(!N.hasModel())return!1;const F=N.getModel(),I=F.validateRange(A.range),L=F.getFullModelRange();return L.equalsRange(I)}static execute(N,A,F){F&&N.pushUndoStop();const I=x._handleEolEdits(N,A);I.length===1&&x._isFullModelReplaceEdit(N,I[0])?N.executeEdits("formatEditsCommand",I.map(L=>f.a.replace(B.a.lift(L.range),L.text))):N.executeEdits("formatEditsCommand",I.map(L=>f.a.replaceMove(B.a.lift(L.range),L.text))),F&&N.pushUndoStop()}}},CjF5:function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var f=t("D3Dy"),B=t("MNsG");const x={clipboard:{writeText:B.g||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:B.g||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>B.g||f.i?0:navigator.keyboard||f.h?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}},CjOT:function(mt,M,t){},Comh:function(mt,M,t){"use strict";t.d(M,"c",function(){return N}),t.d(M,"b",function(){return A}),t.d(M,"a",function(){return F});var f=t("N0LK"),B=t("cGHE"),x=t("aokT");const N=!1;class A{constructor(I,L,v,m,d){this.value=I,this.selectionStart=L,this.selectionEnd=v,this.selectionStartPosition=m,this.selectionEndPosition=d}toString(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}static readFromTextArea(I){return new A(I.getValue(),I.getSelectionStart(),I.getSelectionEnd(),null,null)}collapseSelection(){return new A(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(I,L,v){N&&console.log("writeToTextArea "+I+": "+this.toString()),L.setValue(I,this.value),v&&L.setSelectionRange(I,this.selectionStart,this.selectionEnd)}deduceEditorPosition(I){if(I<=this.selectionStart){const m=this.value.substring(I,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,m,-1)}if(I>=this.selectionEnd){const m=this.value.substring(this.selectionEnd,I);return this._finishDeduceEditorPosition(this.selectionEndPosition,m,1)}const L=this.value.substring(this.selectionStart,I);if(L.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition(this.selectionStartPosition,L,1);const v=this.value.substring(I,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,v,-1)}_finishDeduceEditorPosition(I,L,v){let m=0,d=-1;for(;(d=L.indexOf(`
|
|
|
`,d+1))!==-1;)m++;return[I,v*L.length,m]}static selectedText(I){return new A(I,0,I.length,null,null)}static deduceInput(I,L,v){if(!I)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};N&&(console.log("------------------------deduceInput"),console.log("PREVIOUS STATE: "+I.toString()),console.log("CURRENT STATE: "+L.toString()));let m=I.value,d=I.selectionStart,D=I.selectionEnd,S=L.value,r=L.selectionStart,_=L.selectionEnd;const b=m.substring(D),h=S.substring(_),c=f.e(b,h);S=S.substring(0,S.length-c),m=m.substring(0,m.length-c);const p=m.substring(0,d),E=S.substring(0,r),y=f.d(p,E);if(S=S.substring(y),m=m.substring(y),r-=y,d-=y,_-=y,D-=y,N&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+m+">, selectionStart: "+d+", selectionEnd: "+D),console.log("AFTER DIFFING CURRENT STATE: <"+S+">, selectionStart: "+r+", selectionEnd: "+_)),v&&r===_&&m.length>0){let O=null;if(r===S.length?S.startsWith(m)&&(O=S.substring(m.length)):S.endsWith(m)&&(O=S.substring(0,S.length-m.length)),O!==null&&O.length>0&&(/\uFE0F/.test(O)||f.k(O)))return{text:O,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0}}if(r===_){if(m===S&&d===0&&D===m.length&&r===S.length&&S.indexOf(`
|
|
|
`)===-1&&f.l(S))return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const O=p.length-y;return N&&console.log("REMOVE PREVIOUS: "+(p.length-y)+" chars"),{text:S,replacePrevCharCnt:O,replaceNextCharCnt:0,positionDelta:0}}const C=D-d;return{text:S,replacePrevCharCnt:C,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(I,L){if(!I)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(N&&(console.log("------------------------deduceAndroidCompositionInput"),console.log("PREVIOUS STATE: "+I.toString()),console.log("CURRENT STATE: "+L.toString())),I.value===L.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:L.selectionEnd-I.selectionEnd};const v=Math.min(f.d(I.value,L.value),I.selectionEnd),m=Math.min(f.e(I.value,L.value),I.value.length-I.selectionEnd),d=I.value.substring(v,I.value.length-m),D=L.value.substring(v,L.value.length-m),S=I.selectionStart-v,r=I.selectionEnd-v,_=L.selectionStart-v,b=L.selectionEnd-v;return N&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+d+">, selectionStart: "+S+", selectionEnd: "+r),console.log("AFTER DIFFING CURRENT STATE: <"+D+">, selectionStart: "+_+", selectionEnd: "+b)),{text:D,replacePrevCharCnt:r,replaceNextCharCnt:d.length-r,positionDelta:b-D.length}}}A.EMPTY=new A("",0,0,null,null);class F{static _getPageOfLine(I,L){return Math.floor((I-1)/L)}static _getRangeForPage(I,L){const v=I*L,m=v+1,d=v+L;return new x.a(m,1,d+1,1)}static fromEditorSelection(I,L,v,m,d){const D=F._getPageOfLine(v.startLineNumber,m),S=F._getRangeForPage(D,m),r=F._getPageOfLine(v.endLineNumber,m),_=F._getRangeForPage(r,m),b=S.intersectRanges(new x.a(1,1,v.startLineNumber,v.startColumn));let h=L.getValueInRange(b,1);const c=L.getLineCount(),p=L.getLineMaxColumn(c),E=_.intersectRanges(new x.a(v.endLineNumber,v.endColumn,c,p));let y=L.getValueInRange(E,1),C;if(D===r||D+1===r)C=L.getValueInRange(v,1);else{const O=S.intersectRanges(v),k=_.intersectRanges(v);C=L.getValueInRange(O,1)+String.fromCharCode(8230)+L.getValueInRange(k,1)}if(d){const O=500;h.length>O&&(h=h.substring(h.length-O,h.length)),y.length>O&&(y=y.substring(0,O)),C.length>2*O&&(C=C.substring(0,O)+String.fromCharCode(8230)+C.substring(C.length-O,C.length))}return new A(h+C+y,h.length,h.length+C.length,new B.a(v.startLineNumber,v.startColumn),new B.a(v.endLineNumber,v.endColumn))}}},CriS:function(mt,M,t){"use strict";var f=t("M/lh"),B=t.n(f);t.o(f,"Emitter")&&t.d(M,"Emitter",function(){return f.Emitter}),t.o(f,"MarkerSeverity")&&t.d(M,"MarkerSeverity",function(){return f.MarkerSeverity}),t.o(f,"Range")&&t.d(M,"Range",function(){return f.Range}),t.o(f,"Uri")&&t.d(M,"Uri",function(){return f.Uri}),t.o(f,"editor")&&t.d(M,"editor",function(){return f.editor}),t.o(f,"languages")&&t.d(M,"languages",function(){return f.languages})},CxEt:function(mt,M,t){"use strict";t.r(M);var f=t("sswD"),B=t("C1Q+");Object(f.l)(B.f.ID,B.f),Object(f.j)(B.e),Object(f.j)(B.g),Object(f.j)(B.h),Object(f.j)(B.d),Object(f.j)(B.a),Object(f.j)(B.c),Object(f.k)(new B.b)},CzyV:function(mt,M,t){"use strict";var f=t("M/lh"),B=t.n(f);t.o(f,"Emitter")&&t.d(M,"Emitter",function(){return f.Emitter}),t.o(f,"MarkerSeverity")&&t.d(M,"MarkerSeverity",function(){return f.MarkerSeverity}),t.o(f,"Range")&&t.d(M,"Range",function(){return f.Range}),t.o(f,"Uri")&&t.d(M,"Uri",function(){return f.Uri}),t.o(f,"editor")&&t.d(M,"editor",function(){return f.editor}),t.o(f,"languages")&&t.d(M,"languages",function(){return f.languages})},D3Dy:function(mt,M,t){"use strict";t.d(M,"d",function(){return x}),t.d(M,"b",function(){return N}),t.d(M,"l",function(){return A}),t.d(M,"c",function(){return F}),t.d(M,"a",function(){return I}),t.d(M,"g",function(){return v}),t.d(M,"j",function(){return m}),t.d(M,"f",function(){return d}),t.d(M,"h",function(){return D}),t.d(M,"k",function(){return S}),t.d(M,"e",function(){return r}),t.d(M,"i",function(){return _});var f=t("MI8n");class B{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new f.b,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}getZoomFactor(){return this._zoomFactor}getPixelRatio(){let b=document.createElement("canvas").getContext("2d"),h=window.devicePixelRatio||1,c=b.webkitBackingStorePixelRatio||b.mozBackingStorePixelRatio||b.msBackingStorePixelRatio||b.oBackingStorePixelRatio||b.backingStorePixelRatio||1;return h/c}}B.INSTANCE=new B;function x(){return B.INSTANCE.getZoomLevel()}function N(){return B.INSTANCE.getTimeSinceLastZoomLevelChanged()}function A(b){return B.INSTANCE.onDidChangeZoomLevel(b)}function F(){return B.INSTANCE.getZoomFactor()}function I(){return B.INSTANCE.getPixelRatio()}const L=navigator.userAgent,v=L.indexOf("Firefox")>=0,m=L.indexOf("AppleWebKit")>=0,d=L.indexOf("Chrome")>=0,D=!d&&L.indexOf("Safari")>=0,S=!d&&!D&&m,r=L.indexOf("Android")>=0,_=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches},DTDp:function(mt,M,t){},Dvnd:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:function(){return t.e(335).then(t.bind(null,"y0OK"))}})},"E+ie":function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"csp",extensions:[],aliases:["CSP","csp"],loader:function(){return t.e(325).then(t.bind(null,"p+q7"))}})},E4kL:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:function(){return t.e(374).then(t.bind(null,"EaLm"))}})},EIAu:function(mt,M,t){"use strict";t.d(M,"b",function(){return F}),t.d(M,"a",function(){return h});var f=t("N0LK"),B=t("erNZ"),x=t("aokT");class N{constructor(c,p,E,y,C,O){this._richEditBracketBrand=void 0,this.languageId=c,this.index=p,this.open=E,this.close=y,this.forwardRegex=C,this.reversedRegex=O,this._openSet=N._toSet(this.open),this._closeSet=N._toSet(this.close)}isOpen(c){return this._openSet.has(c)}isClose(c){return this._closeSet.has(c)}static _toSet(c){const p=new Set;for(const E of c)p.add(E);return p}}function A(c){const p=c.length;c=c.map(k=>[k[0].toLowerCase(),k[1].toLowerCase()]);const E=[];for(let k=0;k<p;k++)E[k]=k;const y=(k,Y)=>{const[Q,H]=k,[Z,oe]=Y;return Q===Z||Q===oe||H===Z||H===oe},C=(k,Y)=>{const Q=Math.min(k,Y),H=Math.max(k,Y);for(let Z=0;Z<p;Z++)E[Z]===H&&(E[Z]=Q)};for(let k=0;k<p;k++){const Y=c[k];for(let Q=k+1;Q<p;Q++){const H=c[Q];y(Y,H)&&C(E[k],E[Q])}}const O=[];for(let k=0;k<p;k++){let Y=[],Q=[];for(let H=0;H<p;H++)if(E[H]===k){const[Z,oe]=c[H];Y.push(Z),Q.push(oe)}Y.length>0&&O.push({open:Y,close:Q})}return O}class F{constructor(c,p){this._richEditBracketsBrand=void 0;const E=A(p);this.brackets=E.map((y,C)=>new N(c,C,y.open,y.close,m(y.open,y.close,E,C),d(y.open,y.close,E,C))),this.forwardRegex=D(this.brackets),this.reversedRegex=S(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const y of this.brackets){for(const C of y.open)this.textIsBracket[C]=y,this.textIsOpenBracket[C]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,C.length);for(const C of y.close)this.textIsBracket[C]=y,this.textIsOpenBracket[C]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,C.length)}}}function I(c,p,E,y){for(let C=0,O=p.length;C<O;C++){if(C===E)continue;const k=p[C];for(const Y of k.open)Y.indexOf(c)>=0&&y.push(Y);for(const Y of k.close)Y.indexOf(c)>=0&&y.push(Y)}}function L(c,p){return c.length-p.length}function v(c){if(c.length<=1)return c;const p=[],E=new Set;for(const y of c){if(E.has(y))continue;p.push(y),E.add(y)}return p}function m(c,p,E,y){let C=[];C=C.concat(c),C=C.concat(p);for(let O=0,k=C.length;O<k;O++)I(C[O],E,y,C);return C=v(C),C.sort(L),C.reverse(),_(C)}function d(c,p,E,y){let C=[];C=C.concat(c),C=C.concat(p);for(let O=0,k=C.length;O<k;O++)I(C[O],E,y,C);return C=v(C),C.sort(L),C.reverse(),_(C.map(b))}function D(c){let p=[];for(const E of c){for(const y of E.open)p.push(y);for(const y of E.close)p.push(y)}return p=v(p),_(p)}function S(c){let p=[];for(const E of c){for(const y of E.open)p.push(y);for(const y of E.close)p.push(y)}return p=v(p),_(p.map(b))}function r(c){const p=/^[\w ]+$/.test(c);return c=f.t(c),p?`\\b${c}\\b`:c}function _(c){let p=`(${c.map(r).join(")|(")})`;return f.q(p,!0)}const b=function(){function c(y){if(B.d){const C=new Uint16Array(y.length);let O=0;for(let k=y.length-1;k>=0;k--)C[O++]=y.charCodeAt(k);return B.c().decode(C)}else{let C=[],O=0;for(let k=y.length-1;k>=0;k--)C[O++]=y.charAt(k);return C.join("")}}let p=null,E=null;return function(C){return p!==C&&(p=C,E=c(p)),E}}();class h{static _findPrevBracketInText(c,p,E,y){let C=E.match(c);if(!C)return null;let O=E.length-(C.index||0),k=C[0].length,Y=y+O;return new x.a(p,Y-k+1,p,Y+1)}static findPrevBracketInRange(c,p,E,y,C){const O=b(E),k=O.substring(E.length-C,E.length-y);return this._findPrevBracketInText(c,p,k,y)}static findNextBracketInText(c,p,E,y){let C=E.match(c);if(!C)return null;let O=C.index||0,k=C[0].length;if(k===0)return null;let Y=y+O;return new x.a(p,Y+1,p,Y+1+k)}static findNextBracketInRange(c,p,E,y,C){const O=E.substring(y,C);return this.findNextBracketInText(c,p,O,y)}}},EJc0:function(mt,M,t){"use strict";t.d(M,"a",function(){return I}),t.d(M,"b",function(){return v}),t.d(M,"e",function(){return d}),t.d(M,"d",function(){return D}),t.d(M,"c",function(){return r});var f=t("Vhoy"),B=t("fpMC"),x=t("N0LK");const N="$(",A=new RegExp(`\\$\\(${f.a.iconNameExpression}(?:${f.a.iconModifierExpression})?\\)`,"g"),F=new RegExp(`(\\\\)?${A.source}`,"g");function I(_){return _.replace(F,(b,h)=>h?b:`\\${b}`)}const L=new RegExp(`\\\\${A.source}`,"g");function v(_){return _.replace(L,b=>`\\${b}`)}const m=new RegExp(`(\\s)?(\\\\)?${A.source}(\\s)?`,"g");function d(_){return _.indexOf(N)===-1?_:_.replace(m,(b,h,c,p)=>c?b:h||p||"")}function D(_){const b=_.indexOf(N);return b===-1?{text:_}:S(_,b)}function S(_,b){const h=[];let c="";function p(H){if(H){c+=H;for(const Z of H)h.push(C)}}let E=-1,y="",C=0,O,k,Y=b;const Q=_.length;for(p(_.substr(0,b));Y<Q;){if(O=_[Y],k=_[Y+1],O===N[0]&&k===N[1])E=Y,p(y),y=N,Y++;else if(O===")"&&E!==-1){const H=Y-E+1;C+=H,E=-1,y=""}else E!==-1?/^[a-z0-9\-]$/i.test(O)?y+=O:(p(y),E=-1,y=""):p(O);Y++}return p(y),{text:c,iconOffsets:h}}function r(_,b,h=!1){const{text:c,iconOffsets:p}=b;if(!p||p.length===0)return Object(B.g)(_,c,h);const E=Object(x.J)(c," "),y=c.length-E.length,C=Object(B.g)(_,E,h);if(C)for(const O of C){const k=p[O.start+y]+y;O.start+=k,O.end+=k}return C}},EOst:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:function(){return t.e(371).then(t.bind(null,"87dK"))}})},"EPS+":function(mt,M,t){},EWX2:function(mt,M,t){"use strict";t.d(M,"a",function(){return x}),t.d(M,"b",function(){return A});var f=t("QDVR"),B=t("Cg/j");const x=Object(B.c)("contextService");class N{constructor(F,I,L,v,m){this._id=F,this._transient=L,this._configuration=v,this._ignorePathCasing=m,this._foldersMap=f.c.forUris(this._ignorePathCasing),this.folders=I}get folders(){return this._folders}set folders(F){this._folders=F,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(F){this._configuration=F}getFolder(F){return F&&this._foldersMap.findSubstr(F.with({scheme:F.scheme,authority:F.authority,path:F.path}))||null}updateFoldersMap(){this._foldersMap=f.c.forUris(this._ignorePathCasing);for(const F of this.folders)this._foldersMap.set(F.uri,F)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}class A{constructor(F,I){this.raw=I,this.uri=F.uri,this.index=F.index,this.name=F.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}},EffR:function(mt,M,t){"use strict";t.d(M,"t",function(){return d}),t.d(M,"N",function(){return D}),t.d(M,"i",function(){return r}),t.d(M,"o",function(){return h}),t.d(M,"n",function(){return c}),t.d(M,"g",function(){return p}),t.d(M,"h",function(){return E}),t.d(M,"j",function(){return y}),t.d(M,"k",function(){return C}),t.d(M,"T",function(){return Y}),t.d(M,"V",function(){return Q}),t.d(M,"l",function(){return te}),t.d(M,"A",function(){return ne}),t.d(M,"z",function(){return Ee}),t.d(M,"b",function(){return ee}),t.d(M,"G",function(){return ie}),t.d(M,"X",function(){return U}),t.d(M,"D",function(){return G}),t.d(M,"f",function(){return J}),t.d(M,"I",function(){return he}),t.d(M,"C",function(){return xe}),t.d(M,"B",function(){return Ie}),t.d(M,"H",function(){return Le}),t.d(M,"L",function(){return Te}),t.d(M,"x",function(){return ze}),t.d(M,"J",function(){return ue}),t.d(M,"O",function(){return Pe}),t.d(M,"F",function(){return ve}),t.d(M,"y",function(){return ce}),t.d(M,"w",function(){return le}),t.d(M,"v",function(){return Me}),t.d(M,"Q",function(){return De}),t.d(M,"M",function(){return we}),t.d(M,"d",function(){return Oe}),t.d(M,"c",function(){return nt}),t.d(M,"U",function(){return Ke}),t.d(M,"S",function(){return et}),t.d(M,"Y",function(){return Tt}),t.d(M,"q",function(){return $t}),t.d(M,"P",function(){return Xe}),t.d(M,"R",function(){return it}),t.d(M,"a",function(){return Et}),t.d(M,"W",function(){return It}),t.d(M,"K",function(){return Rt}),t.d(M,"E",function(){return vo}),t.d(M,"u",function(){return Mo}),t.d(M,"Z",function(){return xo}),t.d(M,"p",function(){return Do}),t.d(M,"s",function(){return Lo}),t.d(M,"r",function(){return To}),t.d(M,"e",function(){return Ht}),t.d(M,"m",function(){return Mt});var f=t("D3Dy"),B=t("CjF5"),x=t("uDWl"),N=t("XSiN"),A=t("X+cX"),F=t("/cxE"),I=t("MI8n"),L=t("pmY6"),v=t("tYmi"),m=t("MNsG");function d(Ue){for(;Ue.firstChild;)Ue.firstChild.remove()}function D(Ue){var dt;return(dt=Ue==null?void 0:Ue.isConnected)!==null&&dt!==void 0?dt:!1}class S{constructor(Ue,dt,Ut,Ye){this._node=Ue,this._type=dt,this._handler=Ut,this._options=Ye||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){if(!this._handler)return;this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null}}function r(Ue,dt,Ut,Ye){return new S(Ue,dt,Ut,Ye)}function _(Ue){return function(dt){return Ue(new N.a(dt))}}function b(Ue){return function(dt){return Ue(new x.a(dt))}}let h=function(dt,Ut,Ye,qe){let ct=Ye;return Ut==="click"||Ut==="mousedown"?ct=_(Ye):(Ut==="keydown"||Ut==="keypress"||Ut==="keyup")&&(ct=b(Ye)),r(dt,Ut,ct,qe)},c=function(dt,Ut,Ye){let qe=_(Ut);return p(dt,qe,Ye)};function p(Ue,dt,Ut){return r(Ue,m.c&&B.a.pointerEvents?Oe.POINTER_DOWN:Oe.MOUSE_DOWN,dt,Ut)}function E(Ue,dt,Ut){return r(Ue,m.c&&B.a.pointerEvents?Oe.POINTER_UP:Oe.MOUSE_UP,dt,Ut)}function y(Ue,dt){return r(Ue,"mouseout",Ut=>{let Ye=Ut.relatedTarget;for(;Ye&&Ye!==Ue;)Ye=Ye.parentNode;if(Ye===Ue)return;dt(Ut)})}function C(Ue,dt){return r(Ue,"pointerout",Ut=>{let Ye=Ut.relatedTarget;for(;Ye&&Ye!==Ue;)Ye=Ye.parentNode;if(Ye===Ue)return;dt(Ut)})}let O=null;function k(Ue){if(!O){const dt=Ut=>setTimeout(()=>Ut(new Date().getTime()),0);O=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||dt}return O.call(self,Ue)}let Y,Q;class H{constructor(Ue,dt=0){this._runner=Ue,this.priority=dt,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(this._canceled)return;try{this._runner()}catch(Ue){Object(F.f)(Ue)}}static sort(Ue,dt){return dt.priority-Ue.priority}}(function(){let Ue=[],dt=null,Ut=!1,Ye=!1,qe=()=>{for(Ut=!1,dt=Ue,Ue=[],Ye=!0;dt.length>0;){dt.sort(H.sort);let ct=dt.shift();ct.execute()}Ye=!1};Q=(ct,_t=0)=>{let Pt=new H(ct,_t);return Ue.push(Pt),Ut||(Ut=!0,k(qe)),Pt},Y=(ct,_t)=>{if(Ye){let Pt=new H(ct,_t);return dt.push(Pt),Pt}else return Q(ct,_t)}})();const Z=8,oe=function(Ue,dt){return dt};class $ extends L.a{constructor(Ue,dt,Ut,Ye=oe,qe=Z){super();let ct=null,_t=0,Pt=this._register(new A.g),Wt=()=>{_t=new Date().getTime(),Ut(ct),ct=null};this._register(r(Ue,dt,Vt=>{ct=Ye(ct,Vt);let so=new Date().getTime()-_t;so>=qe?(Pt.cancel(),Wt()):Pt.setIfNotSet(Wt,qe-so)}))}}function te(Ue,dt,Ut,Ye,qe){return new $(Ue,dt,Ut,Ye,qe)}function ne(Ue){return document.defaultView.getComputedStyle(Ue,null)}function Ee(Ue){if(Ue!==document.body)return new ee(Ue.clientWidth,Ue.clientHeight);if(m.c&&window.visualViewport)return new ee(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new ee(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new ee(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new ee(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class fe{static convertToPixels(Ue,dt){return parseFloat(dt)||0}static getDimension(Ue,dt,Ut){let Ye=ne(Ue),qe="0";return Ye&&(Ye.getPropertyValue?qe=Ye.getPropertyValue(dt):qe=Ye.getAttribute(Ut)),fe.convertToPixels(Ue,qe)}static getBorderLeftWidth(Ue){return fe.getDimension(Ue,"border-left-width","borderLeftWidth")}static getBorderRightWidth(Ue){return fe.getDimension(Ue,"border-right-width","borderRightWidth")}static getBorderTopWidth(Ue){return fe.getDimension(Ue,"border-top-width","borderTopWidth")}static getBorderBottomWidth(Ue){return fe.getDimension(Ue,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(Ue){return fe.getDimension(Ue,"padding-left","paddingLeft")}static getPaddingRight(Ue){return fe.getDimension(Ue,"padding-right","paddingRight")}static getPaddingTop(Ue){return fe.getDimension(Ue,"padding-top","paddingTop")}static getPaddingBottom(Ue){return fe.getDimension(Ue,"padding-bottom","paddingBottom")}static getMarginLeft(Ue){return fe.getDimension(Ue,"margin-left","marginLeft")}static getMarginTop(Ue){return fe.getDimension(Ue,"margin-top","marginTop")}static getMarginRight(Ue){return fe.getDimension(Ue,"margin-right","marginRight")}static getMarginBottom(Ue){return fe.getDimension(Ue,"margin-bottom","marginBottom")}}class ee{constructor(Ue,dt){this.width=Ue,this.height=dt}with(Ue=this.width,dt=this.height){return Ue!==this.width||dt!==this.height?new ee(Ue,dt):this}static is(Ue){return typeof Ue=="object"&&typeof Ue.height=="number"&&typeof Ue.width=="number"}static lift(Ue){return Ue instanceof ee?Ue:new ee(Ue.width,Ue.height)}static equals(Ue,dt){return Ue===dt?!0:!Ue||!dt?!1:Ue.width===dt.width&&Ue.height===dt.height}}function ie(Ue){let dt=Ue.offsetParent,Ut=Ue.offsetTop,Ye=Ue.offsetLeft;for(;(Ue=Ue.parentNode)!==null&&Ue!==document.body&&Ue!==document.documentElement;){Ut-=Ue.scrollTop;const qe=je(Ue)?null:ne(Ue);qe&&(Ye-=qe.direction!=="rtl"?Ue.scrollLeft:-Ue.scrollLeft),Ue===dt&&(Ye+=fe.getBorderLeftWidth(Ue),Ut+=fe.getBorderTopWidth(Ue),Ut+=Ue.offsetTop,Ye+=Ue.offsetLeft,dt=Ue.offsetParent)}return{left:Ye,top:Ut}}function U(Ue,dt,Ut){typeof dt=="number"&&(Ue.style.width=`${dt}px`),typeof Ut=="number"&&(Ue.style.height=`${Ut}px`)}function G(Ue){let dt=Ue.getBoundingClientRect();return{left:dt.left+J.scrollX,top:dt.top+J.scrollY,width:dt.width,height:dt.height}}const J=new class{get scrollX(){return typeof window.scrollX=="number"?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return typeof window.scrollY=="number"?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function he(Ue){let dt=fe.getMarginLeft(Ue)+fe.getMarginRight(Ue);return Ue.offsetWidth+dt}function xe(Ue){let dt=fe.getBorderLeftWidth(Ue)+fe.getBorderRightWidth(Ue),Ut=fe.getPaddingLeft(Ue)+fe.getPaddingRight(Ue);return Ue.offsetWidth-dt-Ut}function Ie(Ue){let dt=fe.getBorderTopWidth(Ue)+fe.getBorderBottomWidth(Ue),Ut=fe.getPaddingTop(Ue)+fe.getPaddingBottom(Ue);return Ue.offsetHeight-dt-Ut}function Le(Ue){let dt=fe.getMarginTop(Ue)+fe.getMarginBottom(Ue);return Ue.offsetHeight+dt}function Te(Ue,dt){for(;Ue;){if(Ue===dt)return!0;Ue=Ue.parentNode}return!1}function ze(Ue,dt,Ut){for(;Ue&&Ue.nodeType===Ue.ELEMENT_NODE;){if(Ue.classList.contains(dt))return Ue;if(Ut){if(typeof Ut=="string"){if(Ue.classList.contains(Ut))return null}else if(Ue===Ut)return null}Ue=Ue.parentNode}return null}function ue(Ue,dt,Ut){return!!ze(Ue,dt,Ut)}function je(Ue){return Ue&&!!Ue.host&&!!Ue.mode}function Pe(Ue){return!!ve(Ue)}function ve(Ue){for(;Ue.parentNode;){if(Ue===document.body)return null;Ue=Ue.parentNode}return je(Ue)?Ue:null}function ce(){let Ue=document.activeElement;for(;Ue==null?void 0:Ue.shadowRoot;)Ue=Ue.shadowRoot.activeElement;return Ue}function le(Ue=document.getElementsByTagName("head")[0]){let dt=document.createElement("style");return dt.type="text/css",dt.media="screen",Ue.appendChild(dt),dt}let Ce=null;function ye(){return Ce||(Ce=le()),Ce}function ge(Ue){var dt,Ut;return((dt=Ue==null?void 0:Ue.sheet)===null||dt===void 0?void 0:dt.rules)?Ue.sheet.rules:((Ut=Ue==null?void 0:Ue.sheet)===null||Ut===void 0?void 0:Ut.cssRules)?Ue.sheet.cssRules:[]}function Me(Ue,dt,Ut=ye()){if(!Ut||!dt)return;Ut.sheet.insertRule(Ue+"{"+dt+"}",0)}function De(Ue,dt=ye()){if(!dt)return;let Ut=ge(dt),Ye=[];for(let qe=0;qe<Ut.length;qe++){let ct=Ut[qe];ct.selectorText.indexOf(Ue)!==-1&&Ye.push(qe)}for(let qe=Ye.length-1;qe>=0;qe--)dt.sheet.deleteRule(Ye[qe])}function we(Ue){return typeof HTMLElement=="object"?Ue instanceof HTMLElement:Ue&&typeof Ue=="object"&&Ue.nodeType===1&&typeof Ue.nodeName=="string"}const Oe={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",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:f.j?"webkitAnimationStart":"animationstart",ANIMATION_END:f.j?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:f.j?"webkitAnimationIteration":"animationiteration"},nt={stop:function(Ue,dt){Ue.preventDefault?Ue.preventDefault():Ue.returnValue=!1,dt&&(Ue.stopPropagation?Ue.stopPropagation():Ue.cancelBubble=!0)}};function Ke(Ue){let dt=[];for(let Ut=0;Ue&&Ue.nodeType===Ue.ELEMENT_NODE;Ut++)dt[Ut]=Ue.scrollTop,Ue=Ue.parentNode;return dt}function et(Ue,dt){for(let Ut=0;Ue&&Ue.nodeType===Ue.ELEMENT_NODE;Ut++)Ue.scrollTop!==dt[Ut]&&(Ue.scrollTop=dt[Ut]),Ue=Ue.parentNode}class bt extends L.a{constructor(Ue){super();this._onDidFocus=this._register(new I.b),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new I.b),this.onDidBlur=this._onDidBlur.event;let dt=Te(document.activeElement,Ue),Ut=!1;const Ye=()=>{Ut=!1,dt||(dt=!0,this._onDidFocus.fire())},qe=()=>{dt&&(Ut=!0,window.setTimeout(()=>{Ut&&(Ut=!1,dt=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{let ct=Te(document.activeElement,Ue);ct!==dt&&(dt?qe():Ye())},this._register(r(Ue,Oe.FOCUS,Ye,!0)),this._register(r(Ue,Oe.BLUR,qe,!0))}}function Tt(Ue){return new bt(Ue)}function $t(Ue,...dt){if(Ue.append(...dt),dt.length===1&&typeof dt[0]!="string")return dt[0]}function Xe(Ue,dt){return Ue.insertBefore(dt,Ue.firstChild),dt}function it(Ue,...dt){Ue.innerText="",$t(Ue,...dt)}const re=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var We;(function(Ue){Ue.HTML="http://www.w3.org/1999/xhtml",Ue.SVG="http://www.w3.org/2000/svg"})(We||(We={}));function tt(Ue,dt,Ut,...Ye){let qe=re.exec(dt);if(!qe)throw new Error("Bad use of emmet");Ut=Object.assign({},Ut||{});let ct=qe[1]||"div",_t;return Ue!==We.HTML?_t=document.createElementNS(Ue,ct):_t=document.createElement(ct),qe[3]&&(_t.id=qe[3]),qe[4]&&(_t.className=qe[4].replace(/\./g," ").trim()),Object.keys(Ut).forEach(Pt=>{const Wt=Ut[Pt];if(typeof Wt=="undefined")return;/^on\w+$/.test(Pt)?_t[Pt]=Wt:Pt==="selected"?Wt&&_t.setAttribute(Pt,"true"):_t.setAttribute(Pt,Wt)}),_t.append(...Ye),_t}function Et(Ue,dt,...Ut){return tt(We.HTML,Ue,dt,...Ut)}Et.SVG=function(Ue,dt,...Ut){return tt(We.SVG,Ue,dt,...Ut)};function It(...Ue){for(let dt of Ue)dt.style.display="",dt.removeAttribute("aria-hidden")}function Rt(...Ue){for(let dt of Ue)dt.style.display="none",dt.setAttribute("aria-hidden","true")}function vo(Ue){return Array.prototype.slice.call(document.getElementsByTagName(Ue),0)}function Mo(Ue){const dt=window.devicePixelRatio*Ue;return Math.max(1,Math.floor(dt))/window.devicePixelRatio}function xo(Ue){window.open(Ue,"_blank","noopener")}function Do(Ue){const dt=()=>{Ue(),Ut=Q(dt)};let Ut=Q(dt);return Object(L.i)(()=>Ut.dispose())}v.b.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function Lo(Ue){return Ue?`url('${v.a.asBrowserUri(Ue).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function To(Ue){return`'${Ue.replace(/'/g,"%27")}'`}class Ht extends I.b{constructor(){super();this._subscriptions=new L.b,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(r(window,"keydown",Ue=>{if(Ue.defaultPrevented)return;const dt=new x.a(Ue);if(dt.keyCode===6&&Ue.repeat)return;if(Ue.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(Ue.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(Ue.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(Ue.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(dt.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=Ue.altKey,this._keyStatus.ctrlKey=Ue.ctrlKey,this._keyStatus.metaKey=Ue.metaKey,this._keyStatus.shiftKey=Ue.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=Ue,this.fire(this._keyStatus))},!0)),this._subscriptions.add(r(window,"keyup",Ue=>{if(Ue.defaultPrevented)return;!Ue.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!Ue.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!Ue.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!Ue.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=Ue.altKey,this._keyStatus.ctrlKey=Ue.ctrlKey,this._keyStatus.metaKey=Ue.metaKey,this._keyStatus.shiftKey=Ue.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=Ue,this.fire(this._keyStatus))},!0)),this._subscriptions.add(r(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(r(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(r(document.body,"mousemove",Ue=>{Ue.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(r(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 Ht.instance||(Ht.instance=new Ht),Ht.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}function Mt(Ue,dt){const Ut=window.matchMedia(Ue);typeof Ut.addEventListener=="function"?Ut.addEventListener("change",dt):Ut.addListener(dt)}},EzsQ:function(mt,M,t){},FmXZ:function(mt,M,t){"use strict";t.d(M,"b",function(){return N}),t.d(M,"a",function(){return A});var f=t("MNsG"),B=t("3/fG"),x=t("T8No");const N=new x.c("isWindows",f.i,Object(B.a)("isWindows","Whether the operating system is Windows")),A="inputFocus"},FvUK:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:function(){return t.e(336).then(t.bind(null,"OfHX"))}})},FzHg:function(mt,M){(function(t,f){mt.exports=function(){var B={722:function(A){A.exports=t}},x={};function N(A){if(x[A])return x[A].exports;var F=x[A]={exports:{}},I=!0;try{B[A](F,F.exports,N),I=!1}finally{I&&delete x[A]}return F.exports}return N.ab=f+"/",N(722)}()}).call(this,{},"/")},G2kB:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return x});var f=t("Cg/j");const B=Object(f.c)("modelService");function x(N){return!N.isTooLargeForSyncing()&&!N.isForSimpleWidget}},G300:function(mt,M,t){"use strict";t.d(M,"a",function(){return F});var f=t("EffR"),B=t("uDWl"),x=t("XSiN"),N=t("pg8w"),A=t("pmY6");class F extends A.a{onclick(I,L){this._register(f.i(I,f.d.CLICK,v=>L(new x.a(v))))}onmousedown(I,L){this._register(f.i(I,f.d.MOUSE_DOWN,v=>L(new x.a(v))))}onmouseover(I,L){this._register(f.i(I,f.d.MOUSE_OVER,v=>L(new x.a(v))))}onnonbubblingmouseout(I,L){this._register(f.j(I,v=>L(new x.a(v))))}onkeydown(I,L){this._register(f.i(I,f.d.KEY_DOWN,v=>L(new B.a(v))))}onkeyup(I,L){this._register(f.i(I,f.d.KEY_UP,v=>L(new B.a(v))))}oninput(I,L){this._register(f.i(I,f.d.INPUT,L))}onblur(I,L){this._register(f.i(I,f.d.BLUR,L))}onfocus(I,L){this._register(f.i(I,f.d.FOCUS,L))}ignoreGesture(I){N.b.ignoreTarget(I)}}},GJhM:function(mt,M,t){"use strict";t.d(M,"b",function(){return Ee}),t.d(M,"c",function(){return fe}),t.d(M,"a",function(){return ee});var f=t("D3Dy"),B=t("EffR"),x=t("ZlPH"),N=t("XSiN"),A=t("AKMP"),F=t("G300"),I=t("X+cX");const L=11;class v extends F.a{constructor(U){super();this._onActivate=U.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=U.bgWidth+"px",this.bgDomNode.style.height=U.bgHeight+"px",typeof U.top!="undefined"&&(this.bgDomNode.style.top="0px"),typeof U.left!="undefined"&&(this.bgDomNode.style.left="0px"),typeof U.bottom!="undefined"&&(this.bgDomNode.style.bottom="0px"),typeof U.right!="undefined"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=U.className,this.domNode.classList.add(...U.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width=L+"px",this.domNode.style.height=L+"px",typeof U.top!="undefined"&&(this.domNode.style.top=U.top+"px"),typeof U.left!="undefined"&&(this.domNode.style.left=U.left+"px"),typeof U.bottom!="undefined"&&(this.domNode.style.bottom=U.bottom+"px"),typeof U.right!="undefined"&&(this.domNode.style.right=U.right+"px"),this._mouseMoveMonitor=this._register(new A.a),this.onmousedown(this.bgDomNode,G=>this._arrowMouseDown(G)),this.onmousedown(this.domNode,G=>this._arrowMouseDown(G)),this._mousedownRepeatTimer=this._register(new I.c),this._mousedownScheduleRepeatTimer=this._register(new I.g)}_arrowMouseDown(U){const G=()=>{this._mousedownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(G,200),this._mouseMoveMonitor.startMonitoring(U.target,U.buttons,A.b,J=>{},()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()}),U.preventDefault()}}var m=t("pmY6");class d extends m.a{constructor(U,G,J){super();this._visibility=U,this._visibleClassName=G,this._invisibleClassName=J,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new I.g)}setVisibility(U){this._visibility!==U&&(this._visibility=U,this._updateShouldBeVisible())}setShouldBeVisible(U){this._rawShouldBeVisible=U,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const U=this._applyVisibilitySetting();this._shouldBeVisible!==U&&(this._shouldBeVisible=U,this.ensureVisibility())}setIsNeeded(U){this._isNeeded!==U&&(this._isNeeded=U,this.ensureVisibility())}setDomNode(U){this._domNode=U,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){if(this._isVisible)return;this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)},0)}_hide(U){if(this._revealTimer.cancel(),!this._isVisible)return;this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(U?" fade":""))}}var D=t("MNsG");const S=140;class r extends F.a{constructor(U){super();this._lazyRender=U.lazyRender,this._host=U.host,this._scrollable=U.scrollable,this._scrollByPage=U.scrollByPage,this._scrollbarState=U.scrollbarState,this._visibilityController=this._register(new d(U.visibility,"visible scrollbar "+U.extraScrollbarClassName,"invisible scrollbar "+U.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new A.a),this._shouldRender=!0,this.domNode=Object(x.b)(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,G=>this._domNodeMouseDown(G))}_createArrow(U){const G=this._register(new v(U));this.domNode.domNode.appendChild(G.bgDomNode),this.domNode.domNode.appendChild(G.domNode)}_createSlider(U,G,J,he){this.slider=Object(x.b)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(U),this.slider.setLeft(G),typeof J=="number"&&this.slider.setWidth(J),typeof he=="number"&&this.slider.setHeight(he),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,xe=>{xe.leftButton&&(xe.preventDefault(),this._sliderMouseDown(xe,()=>{}))}),this.onclick(this.slider.domNode,xe=>{xe.leftButton&&xe.stopPropagation()})}_onElementSize(U){return this._scrollbarState.setVisibleSize(U)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(U){return this._scrollbarState.setScrollSize(U)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(U){return this._scrollbarState.setScrollPosition(U)&&(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(){if(!this._shouldRender)return;this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition())}_domNodeMouseDown(U){if(U.target!==this.domNode.domNode)return;this._onMouseDown(U)}delegateMouseDown(U){const G=this.domNode.domNode.getClientRects()[0].top,J=G+this._scrollbarState.getSliderPosition(),he=G+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),xe=this._sliderMousePosition(U);J<=xe&&xe<=he?U.leftButton&&(U.preventDefault(),this._sliderMouseDown(U,()=>{})):this._onMouseDown(U)}_onMouseDown(U){let G,J;if(U.target===this.domNode.domNode&&typeof U.browserEvent.offsetX=="number"&&typeof U.browserEvent.offsetY=="number")G=U.browserEvent.offsetX,J=U.browserEvent.offsetY;else{const xe=B.D(this.domNode.domNode);G=U.posx-xe.left,J=U.posy-xe.top}const he=this._mouseDownRelativePosition(G,J);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(he):this._scrollbarState.getDesiredScrollPositionFromOffset(he)),U.leftButton&&(U.preventDefault(),this._sliderMouseDown(U,()=>{}))}_sliderMouseDown(U,G){const J=this._sliderMousePosition(U),he=this._sliderOrthogonalMousePosition(U),xe=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(U.target,U.buttons,A.b,Ie=>{const Le=this._sliderOrthogonalMousePosition(Ie),Te=Math.abs(Le-he);if(D.i&&Te>S){this._setDesiredScrollPositionNow(xe.getScrollPosition());return}const ze=this._sliderMousePosition(Ie),ue=ze-J;this._setDesiredScrollPositionNow(xe.getDesiredScrollPositionFromDelta(ue))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),G()}),this._host.onDragStart()}_setDesiredScrollPositionNow(U){const G={};this.writeScrollPosition(G,U),this._scrollable.setScrollPositionNow(G)}updateScrollbarSize(U){this._updateScrollbarSize(U),this._scrollbarState.setScrollbarSize(U),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}const _=20;class b{constructor(U,G,J,he,xe,Ie){this._scrollbarSize=Math.round(G),this._oppositeScrollbarSize=Math.round(J),this._arrowSize=Math.round(U),this._visibleSize=he,this._scrollSize=xe,this._scrollPosition=Ie,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new b(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(U){const G=Math.round(U);return this._visibleSize!==G?(this._visibleSize=G,this._refreshComputedValues(),!0):!1}setScrollSize(U){const G=Math.round(U);return this._scrollSize!==G?(this._scrollSize=G,this._refreshComputedValues(),!0):!1}setScrollPosition(U){const G=Math.round(U);return this._scrollPosition!==G?(this._scrollPosition=G,this._refreshComputedValues(),!0):!1}setScrollbarSize(U){this._scrollbarSize=Math.round(U)}setOppositeScrollbarSize(U){this._oppositeScrollbarSize=Math.round(U)}static _computeValues(U,G,J,he,xe){const Ie=Math.max(0,J-U),Le=Math.max(0,Ie-2*G),Te=he>0&&he>J;if(!Te)return{computedAvailableSize:Math.round(Ie),computedIsNeeded:Te,computedSliderSize:Math.round(Le),computedSliderRatio:0,computedSliderPosition:0};const ze=Math.round(Math.max(_,Math.floor(J*Le/he))),ue=(Le-ze)/(he-J),je=xe*ue;return{computedAvailableSize:Math.round(Ie),computedIsNeeded:Te,computedSliderSize:Math.round(ze),computedSliderRatio:ue,computedSliderPosition:Math.round(je)}}_refreshComputedValues(){const U=b._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=U.computedAvailableSize,this._computedIsNeeded=U.computedIsNeeded,this._computedSliderSize=U.computedSliderSize,this._computedSliderRatio=U.computedSliderRatio,this._computedSliderPosition=U.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(U){if(!this._computedIsNeeded)return 0;const G=U-this._arrowSize-this._computedSliderSize/2;return Math.round(G/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(U){if(!this._computedIsNeeded)return 0;const G=U-this._arrowSize;let J=this._scrollPosition;return G<this._computedSliderPosition?J-=this._visibleSize:J+=this._visibleSize,J}getDesiredScrollPositionFromDelta(U){if(!this._computedIsNeeded)return 0;const G=this._computedSliderPosition+U;return Math.round(G/this._computedSliderRatio)}}var h=t("Vhoy");const c=Object(h.e)("scrollbar-button-left",h.b.triangleLeft),p=Object(h.e)("scrollbar-button-right",h.b.triangleRight);class E extends r{constructor(U,G,J){const he=U.getScrollDimensions(),xe=U.getCurrentScrollPosition();super({lazyRender:G.lazyRender,host:J,scrollbarState:new b(G.horizontalHasArrows?G.arrowSize:0,G.horizontal===2?0:G.horizontalScrollbarSize,G.vertical===2?0:G.verticalScrollbarSize,he.width,he.scrollWidth,xe.scrollLeft),visibility:G.horizontal,extraScrollbarClassName:"horizontal",scrollable:U,scrollByPage:G.scrollByPage});if(G.horizontalHasArrows){const Ie=(G.arrowSize-L)/2,Le=(G.horizontalScrollbarSize-L)/2;this._createArrow({className:"scra",icon:c,top:Le,left:Ie,bottom:void 0,right:void 0,bgWidth:G.arrowSize,bgHeight:G.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new N.b(null,1,0))}),this._createArrow({className:"scra",icon:p,top:Le,left:void 0,bottom:void 0,right:Ie,bgWidth:G.arrowSize,bgHeight:G.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new N.b(null,-1,0))})}this._createSlider(Math.floor((G.horizontalScrollbarSize-G.horizontalSliderSize)/2),0,void 0,G.horizontalSliderSize)}_updateSlider(U,G){this.slider.setWidth(U),this.slider.setLeft(G)}_renderDomNode(U,G){this.domNode.setWidth(U),this.domNode.setHeight(G),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(U){return this._shouldRender=this._onElementScrollSize(U.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(U.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(U.width)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(U,G){return U}_sliderMousePosition(U){return U.posx}_sliderOrthogonalMousePosition(U){return U.posy}_updateScrollbarSize(U){this.slider.setHeight(U)}writeScrollPosition(U,G){U.scrollLeft=G}updateOptions(U){this.updateScrollbarSize(U.horizontal===2?0:U.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(U.vertical===2?0:U.verticalScrollbarSize),this._visibilityController.setVisibility(U.horizontal),this._scrollByPage=U.scrollByPage}}const y=Object(h.e)("scrollbar-button-up",h.b.triangleUp),C=Object(h.e)("scrollbar-button-down",h.b.triangleDown);class O extends r{constructor(U,G,J){const he=U.getScrollDimensions(),xe=U.getCurrentScrollPosition();super({lazyRender:G.lazyRender,host:J,scrollbarState:new b(G.verticalHasArrows?G.arrowSize:0,G.vertical===2?0:G.verticalScrollbarSize,0,he.height,he.scrollHeight,xe.scrollTop),visibility:G.vertical,extraScrollbarClassName:"vertical",scrollable:U,scrollByPage:G.scrollByPage});if(G.verticalHasArrows){const Ie=(G.arrowSize-L)/2,Le=(G.verticalScrollbarSize-L)/2;this._createArrow({className:"scra",icon:y,top:Ie,left:Le,bottom:void 0,right:void 0,bgWidth:G.verticalScrollbarSize,bgHeight:G.arrowSize,onActivate:()=>this._host.onMouseWheel(new N.b(null,0,1))}),this._createArrow({className:"scra",icon:C,top:void 0,left:Le,bottom:Ie,right:void 0,bgWidth:G.verticalScrollbarSize,bgHeight:G.arrowSize,onActivate:()=>this._host.onMouseWheel(new N.b(null,0,-1))})}this._createSlider(0,Math.floor((G.verticalScrollbarSize-G.verticalSliderSize)/2),G.verticalSliderSize,void 0)}_updateSlider(U,G){this.slider.setHeight(U),this.slider.setTop(G)}_renderDomNode(U,G){this.domNode.setWidth(G),this.domNode.setHeight(U),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(U){return this._shouldRender=this._onElementScrollSize(U.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(U.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(U.height)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(U,G){return G}_sliderMousePosition(U){return U.posy}_sliderOrthogonalMousePosition(U){return U.posx}_updateScrollbarSize(U){this.slider.setWidth(U)}writeScrollPosition(U,G){U.scrollTop=G}updateOptions(U){this.updateScrollbarSize(U.vertical===2?0:U.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(U.vertical),this._scrollByPage=U.scrollByPage}}var k=t("MI8n"),Y=t("QuOb"),Q=t("eq1K");const H=500,Z=50,oe=!0;class ${constructor(U,G,J){this.timestamp=U,this.deltaX=G,this.deltaY=J,this.score=0}}class te{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let U=1,G=0,J=1,he=this._rear;do{const xe=he===this._front?U:Math.pow(2,-J);if(U-=xe,G+=this._memory[he].score*xe,he===this._front)break;he=(this._capacity+he-1)%this._capacity,J++}while(!0);return G<=.5}accept(U,G,J){const he=new $(U,G,J);he.score=this._computeScore(he),this._front===-1&&this._rear===-1?(this._memory[0]=he,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]=he)}_computeScore(U){if(Math.abs(U.deltaX)>0&&Math.abs(U.deltaY)>0)return 1;let G=.5;const J=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(U.deltaX)||!this._isAlmostInt(U.deltaY))&&(G+=.25),Math.min(Math.max(G,0),1)}_isAlmostInt(U){const G=Math.abs(Math.round(U)-U);return G<.01}}te.INSTANCE=new te;class ne extends F.a{constructor(U,G,J){super();this._onScroll=this._register(new k.b),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new k.b),U.style.overflow="hidden",this._options=ie(G),this._scrollable=J,this._register(this._scrollable.onScroll(xe=>{this._onWillScroll.fire(xe),this._onDidScroll(xe),this._onScroll.fire(xe)}));const he={onMouseWheel:xe=>this._onMouseWheel(xe),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new O(this._scrollable,this._options,he)),this._horizontalScrollbar=this._register(new E(this._scrollable,this._options,he)),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(U),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Object(x.b)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Object(x.b)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Object(x.b)(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,xe=>this._onMouseOver(xe)),this.onnonbubblingmouseout(this._listenOnDomNode,xe=>this._onMouseOut(xe)),this._hideTimeout=this._register(new I.g),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=Object(m.f)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(U){this._verticalScrollbar.delegateMouseDown(U)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(U){this._scrollable.setScrollDimensions(U,!1)}updateClassName(U){this._options.className=U,D.f&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(U){typeof U.handleMouseWheel!="undefined"&&(this._options.handleMouseWheel=U.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof U.mouseWheelScrollSensitivity!="undefined"&&(this._options.mouseWheelScrollSensitivity=U.mouseWheelScrollSensitivity),typeof U.fastScrollSensitivity!="undefined"&&(this._options.fastScrollSensitivity=U.fastScrollSensitivity),typeof U.scrollPredominantAxis!="undefined"&&(this._options.scrollPredominantAxis=U.scrollPredominantAxis),typeof U.horizontal!="undefined"&&(this._options.horizontal=U.horizontal),typeof U.vertical!="undefined"&&(this._options.vertical=U.vertical),typeof U.horizontalScrollbarSize!="undefined"&&(this._options.horizontalScrollbarSize=U.horizontalScrollbarSize),typeof U.verticalScrollbarSize!="undefined"&&(this._options.verticalScrollbarSize=U.verticalScrollbarSize),typeof U.scrollByPage!="undefined"&&(this._options.scrollByPage=U.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(U){const G=this._mouseWheelToDispose.length>0;if(G===U)return;if(this._mouseWheelToDispose=Object(m.f)(this._mouseWheelToDispose),U){const J=he=>{this._onMouseWheel(new N.b(he))};this._mouseWheelToDispose.push(B.i(this._listenOnDomNode,B.d.MOUSE_WHEEL,J,{passive:!1}))}}_onMouseWheel(U){const G=te.INSTANCE;if(oe){const xe=window.devicePixelRatio/Object(f.c)();D.i||D.d?G.accept(Date.now(),U.deltaX/xe,U.deltaY/xe):G.accept(Date.now(),U.deltaX,U.deltaY)}let J=!1;if(U.deltaY||U.deltaX){let xe=U.deltaY*this._options.mouseWheelScrollSensitivity,Ie=U.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(xe)>=Math.abs(Ie)?Ie=0:xe=0),this._options.flipAxes&&([xe,Ie]=[Ie,xe]);const Le=!D.f&&U.browserEvent&&U.browserEvent.shiftKey;(this._options.scrollYToX||Le)&&!Ie&&(Ie=xe,xe=0),U.browserEvent&&U.browserEvent.altKey&&(Ie=Ie*this._options.fastScrollSensitivity,xe=xe*this._options.fastScrollSensitivity);const Te=this._scrollable.getFutureScrollPosition();let ze={};if(xe){const ue=Z*xe,je=Te.scrollTop-(ue<0?Math.floor(ue):Math.ceil(ue));this._verticalScrollbar.writeScrollPosition(ze,je)}if(Ie){const ue=Z*Ie,je=Te.scrollLeft-(ue<0?Math.floor(ue):Math.ceil(ue));this._horizontalScrollbar.writeScrollPosition(ze,je)}if(ze=this._scrollable.validateScrollPosition(ze),Te.scrollLeft!==ze.scrollLeft||Te.scrollTop!==ze.scrollTop){const ue=oe&&this._options.mouseWheelSmoothScroll&&G.isPhysicalMouseWheel();ue?this._scrollable.setScrollPositionSmooth(ze):this._scrollable.setScrollPositionNow(ze),J=!0}}let he=J;!he&&this._options.alwaysConsumeMouseWheel&&(he=!0),!he&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(he=!0),he&&(U.preventDefault(),U.stopPropagation())}_onDidScroll(U){this._shouldRender=this._horizontalScrollbar.onDidScroll(U)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(U)||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)return;if(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows){const U=this._scrollable.getCurrentScrollPosition(),G=U.scrollTop>0,J=U.scrollLeft>0,he=J?" left":"",xe=G?" top":"",Ie=J||G?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${he}`),this._topShadowDomNode.setClassName(`shadow${xe}`),this._topLeftShadowDomNode.setClassName(`shadow${Ie}${xe}${he}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(U){this._mouseIsOver=!1,this._hide()}_onMouseOver(U){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(),H)}}class Ee extends ne{constructor(U,G){G=G||{},G.mouseWheelSmoothScroll=!1;const J=new Y.a(0,he=>B.V(he));super(U,G,J);this._register(J)}setScrollPosition(U){this._scrollable.setScrollPositionNow(U)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class fe extends ne{constructor(U,G,J){super(U,G,J)}setScrollPosition(U){U.reuseAnimation?this._scrollable.setScrollPositionSmooth(U,U.reuseAnimation):this._scrollable.setScrollPositionNow(U)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class ee extends Ee{constructor(U,G){super(U,G);this._element=U,this.onScroll(J=>{J.scrollTopChanged&&(this._element.scrollTop=J.scrollTop),J.scrollLeftChanged&&(this._element.scrollLeft=J.scrollLeft)}),this.scanDomNode()}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})}}function ie(U){const G={lazyRender:typeof U.lazyRender!="undefined"?U.lazyRender:!1,className:typeof U.className!="undefined"?U.className:"",useShadows:typeof U.useShadows!="undefined"?U.useShadows:!0,handleMouseWheel:typeof U.handleMouseWheel!="undefined"?U.handleMouseWheel:!0,flipAxes:typeof U.flipAxes!="undefined"?U.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof U.consumeMouseWheelIfScrollbarIsNeeded!="undefined"?U.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof U.alwaysConsumeMouseWheel!="undefined"?U.alwaysConsumeMouseWheel:!1,scrollYToX:typeof U.scrollYToX!="undefined"?U.scrollYToX:!1,mouseWheelScrollSensitivity:typeof U.mouseWheelScrollSensitivity!="undefined"?U.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof U.fastScrollSensitivity!="undefined"?U.fastScrollSensitivity:5,scrollPredominantAxis:typeof U.scrollPredominantAxis!="undefined"?U.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof U.mouseWheelSmoothScroll!="undefined"?U.mouseWheelSmoothScroll:!0,arrowSize:typeof U.arrowSize!="undefined"?U.arrowSize:11,listenOnDomNode:typeof U.listenOnDomNode!="undefined"?U.listenOnDomNode:null,horizontal:typeof U.horizontal!="undefined"?U.horizontal:1,horizontalScrollbarSize:typeof U.horizontalScrollbarSize!="undefined"?U.horizontalScrollbarSize:10,horizontalSliderSize:typeof U.horizontalSliderSize!="undefined"?U.horizontalSliderSize:0,horizontalHasArrows:typeof U.horizontalHasArrows!="undefined"?U.horizontalHasArrows:!1,vertical:typeof U.vertical!="undefined"?U.vertical:1,verticalScrollbarSize:typeof U.verticalScrollbarSize!="undefined"?U.verticalScrollbarSize:10,verticalHasArrows:typeof U.verticalHasArrows!="undefined"?U.verticalHasArrows:!1,verticalSliderSize:typeof U.verticalSliderSize!="undefined"?U.verticalSliderSize:0,scrollByPage:typeof U.scrollByPage!="undefined"?U.scrollByPage:!1};return G.horizontalSliderSize=typeof U.horizontalSliderSize!="undefined"?U.horizontalSliderSize:G.horizontalScrollbarSize,G.verticalSliderSize=typeof U.verticalSliderSize!="undefined"?U.verticalSliderSize:G.verticalScrollbarSize,D.f&&(G.className+=" mac"),G}},"GR/f":function(mt,M,t){"use strict";t.d(M,"a",function(){return D}),t.d(M,"b",function(){return S});var f=t("/cxE"),B=t("N0LK"),x=t("LCkn"),N=t("zN7H"),A=t("aokT"),F=t("gCVg");class I{constructor(c,p,E){this._range=c,this._charBeforeSelection=p,this._charAfterSelection=E}getEditOperations(c,p){p.addTrackedEditOperation(new A.a(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),p.addTrackedEditOperation(new A.a(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(c,p){let E=p.getInverseEditOperations(),y=E[0].range,C=E[1].range;return new F.a(y.endLineNumber,y.endColumn,C.endLineNumber,C.endColumn-this._charAfterSelection.length)}}var L=t("Ll0s"),v=t("5v8Y"),m=t("KDc4"),d=t("cMvZ");class D{static indent(c,p,E){if(p===null||E===null)return[];let y=[];for(let C=0,O=E.length;C<O;C++)y[C]=new N.a(E[C],{isUnshift:!1,tabSize:c.tabSize,indentSize:c.indentSize,insertSpaces:c.insertSpaces,useTabStops:c.useTabStops,autoIndent:c.autoIndent});return y}static outdent(c,p,E){let y=[];for(let C=0,O=E.length;C<O;C++)y[C]=new N.a(E[C],{isUnshift:!0,tabSize:c.tabSize,indentSize:c.indentSize,insertSpaces:c.insertSpaces,useTabStops:c.useTabStops,autoIndent:c.autoIndent});return y}static shiftIndent(c,p,E){return E=E||1,N.a.shiftIndent(p,p.length+E,c.tabSize,c.indentSize,c.insertSpaces)}static unshiftIndent(c,p,E){return E=E||1,N.a.unshiftIndent(p,p.length+E,c.tabSize,c.indentSize,c.insertSpaces)}static _distributedPaste(c,p,E,y){let C=[];for(let O=0,k=E.length;O<k;O++)C[O]=new x.a(E[O],y[O]);return new L.e(0,C,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(c,p,E,y,C){let O=[];for(let k=0,Y=E.length;k<Y;k++){const Q=E[k];let H=Q.getPosition();if(C&&!Q.isEmpty()&&(C=!1),C&&y.indexOf(`
|
|
|
`)!==y.length-1&&(C=!1),C){let Z=new A.a(H.lineNumber,1,H.lineNumber,1);O[k]=new x.b(Z,y,Q,!0)}else O[k]=new x.a(Q,y)}return new L.e(0,O,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(c,p,E,y,C){if(y)return null;if(p.length===1)return null;if(C&&C.length===p.length)return C;if(c.multiCursorPaste==="spread"){E.charCodeAt(E.length-1)===10&&(E=E.substr(0,E.length-1)),E.charCodeAt(E.length-1)===13&&(E=E.substr(0,E.length-1));let O=B.Q(E);if(O.length===p.length)return O}return null}static paste(c,p,E,y,C,O){const k=this._distributePasteToCursors(c,E,y,C,O);return k?(E=E.sort(A.a.compareRangesUsingStarts),this._distributedPaste(c,p,E,k)):this._simplePaste(c,p,E,y,C)}static _goodIndentForLine(c,p,E){let y=null,C="";const O=d.b.getInheritIndentForLine(c.autoIndent,p,E,!1);if(O)y=O.action,C=O.indentation;else if(E>1){let k;for(k=E-1;k>=1;k--){const H=p.getLineContent(k),Z=B.I(H);if(Z>=0)break}if(k<1)return null;const Y=p.getLineMaxColumn(k),Q=d.b.getEnterAction(c.autoIndent,p,new A.a(k,Y,k,Y));Q&&(C=Q.indentation+Q.appendText)}return y&&(y===m.b.Indent&&(C=D.shiftIndent(c,C)),y===m.b.Outdent&&(C=D.unshiftIndent(c,C)),C=c.normalizeIndentation(C)),C||null}static _replaceJumpToNextIndent(c,p,E,y){let C="",O=E.getStartPosition();if(c.insertSpaces){let k=L.a.visibleColumnFromColumn2(c,p,O),Y=c.indentSize,Q=Y-k%Y;for(let H=0;H<Q;H++)C+=" "}else C=" ";return new x.a(E,C,y)}static tab(c,p,E){let y=[];for(let C=0,O=E.length;C<O;C++){const k=E[C];if(k.isEmpty()){let Y=p.getLineContent(k.startLineNumber);if(/^\s*$/.test(Y)&&p.isCheapToTokenize(k.startLineNumber)){let Q=this._goodIndentForLine(c,p,k.startLineNumber);Q=Q||" ";let H=c.normalizeIndentation(Q);if(!Y.startsWith(H)){y[C]=new x.a(new A.a(k.startLineNumber,1,k.startLineNumber,Y.length+1),H,!0);continue}}y[C]=this._replaceJumpToNextIndent(c,p,k,!0)}else{if(k.startLineNumber===k.endLineNumber){let Y=p.getLineMaxColumn(k.startLineNumber);if(k.startColumn!==1||k.endColumn!==Y){y[C]=this._replaceJumpToNextIndent(c,p,k,!1);continue}}y[C]=new N.a(k,{isUnshift:!1,tabSize:c.tabSize,indentSize:c.indentSize,insertSpaces:c.insertSpaces,useTabStops:c.useTabStops,autoIndent:c.autoIndent})}}return y}static compositionType(c,p,E,y,C,O,k,Y){const Q=y.map(H=>this._compositionType(E,H,C,O,k,Y));return new L.e(4,Q,{shouldPushStackElementBefore:_(c,4),shouldPushStackElementAfter:!1})}static _compositionType(c,p,E,y,C,O){if(!p.isEmpty())return null;const k=p.getPosition(),Y=Math.max(1,k.column-y),Q=Math.min(c.getLineMaxColumn(k.lineNumber),k.column+C),H=new A.a(k.lineNumber,Y,k.lineNumber,Q),Z=c.getValueInRange(H);return Z===E&&O===0?null:new x.d(H,E,0,O)}static _typeCommand(c,p,E){return E?new x.e(c,p,!0):new x.a(c,p,!0)}static _enter(c,p,E,y){if(c.autoIndent===0)return D._typeCommand(y,`
|
|
|
`,E);if(!p.isCheapToTokenize(y.getStartPosition().lineNumber)||c.autoIndent===1){let Y=p.getLineContent(y.startLineNumber),Q=B.x(Y).substring(0,y.startColumn-1);return D._typeCommand(y,`
|
|
|
`+c.normalizeIndentation(Q),E)}const C=d.b.getEnterAction(c.autoIndent,p,y);if(C){if(C.indentAction===m.b.None)return D._typeCommand(y,`
|
|
|
`+c.normalizeIndentation(C.indentation+C.appendText),E);if(C.indentAction===m.b.Indent)return D._typeCommand(y,`
|
|
|
`+c.normalizeIndentation(C.indentation+C.appendText),E);if(C.indentAction===m.b.IndentOutdent){const Y=c.normalizeIndentation(C.indentation),Q=c.normalizeIndentation(C.indentation+C.appendText),H=`
|
|
|
`+Q+`
|
|
|
`+Y;return E?new x.e(y,H,!0):new x.d(y,H,-1,Q.length-Y.length,!0)}else if(C.indentAction===m.b.Outdent){const Y=D.unshiftIndent(c,C.indentation);return D._typeCommand(y,`
|
|
|
`+c.normalizeIndentation(Y+C.appendText),E)}}const O=p.getLineContent(y.startLineNumber),k=B.x(O).substring(0,y.startColumn-1);if(c.autoIndent>=4){const Y=d.b.getIndentForEnter(c.autoIndent,p,y,{unshiftIndent:Q=>D.unshiftIndent(c,Q),shiftIndent:Q=>D.shiftIndent(c,Q),normalizeIndentation:Q=>c.normalizeIndentation(Q)});if(Y){let Q=L.a.visibleColumnFromColumn2(c,p,y.getEndPosition());const H=y.endColumn,Z=p.getLineContent(y.endLineNumber),oe=B.u(Z);if(oe>=0?y=y.setEndPosition(y.endLineNumber,Math.max(y.endColumn,oe+1)):y=y.setEndPosition(y.endLineNumber,p.getLineMaxColumn(y.endLineNumber)),E)return new x.e(y,`
|
|
|
`+c.normalizeIndentation(Y.afterEnter),!0);{let $=0;return H<=oe+1&&(c.insertSpaces||(Q=Math.ceil(Q/c.indentSize)),$=Math.min(Q+1-c.normalizeIndentation(Y.afterEnter).length-1,0)),new x.d(y,`
|
|
|
`+c.normalizeIndentation(Y.afterEnter),0,$,!0)}}}return D._typeCommand(y,`
|
|
|
`+c.normalizeIndentation(k),E)}static _isAutoIndentType(c,p,E){if(c.autoIndent<4)return!1;for(let y=0,C=E.length;y<C;y++)if(!p.isCheapToTokenize(E[y].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(c,p,E,y){const C=d.b.getIndentationAtPosition(p,E.startLineNumber,E.startColumn),O=d.b.getIndentActionForType(c.autoIndent,p,E,y,{shiftIndent:k=>D.shiftIndent(c,k),unshiftIndent:k=>D.unshiftIndent(c,k)});if(O===null)return null;if(O!==c.normalizeIndentation(C)){const k=p.getLineFirstNonWhitespaceColumn(E.startLineNumber);return k===0?D._typeCommand(new A.a(E.startLineNumber,1,E.endLineNumber,E.endColumn),c.normalizeIndentation(O)+y,!1):D._typeCommand(new A.a(E.startLineNumber,1,E.endLineNumber,E.endColumn),c.normalizeIndentation(O)+p.getLineContent(E.startLineNumber).substring(k-1,E.startColumn-1)+y,!1)}return null}static _isAutoClosingOvertype(c,p,E,y,C){if(c.autoClosingOvertype==="never")return!1;if(!c.autoClosingPairs.autoClosingPairsCloseSingleChar.has(C))return!1;for(let O=0,k=E.length;O<k;O++){const Y=E[O];if(!Y.isEmpty())return!1;const Q=Y.getPosition(),H=p.getLineContent(Q.lineNumber),Z=H.charAt(Q.column-1);if(Z!==C)return!1;const oe=Object(L.g)(C),$=Q.column>2?H.charCodeAt(Q.column-2):0;if($===92&&oe)return!1;if(c.autoClosingOvertype==="auto"){let te=!1;for(let ne=0,Ee=y.length;ne<Ee;ne++){const fe=y[ne];if(Q.lineNumber===fe.startLineNumber&&Q.column===fe.startColumn){te=!0;break}}if(!te)return!1}}return!0}static _runAutoClosingOvertype(c,p,E,y,C){let O=[];for(let k=0,Y=y.length;k<Y;k++){const Q=y[k],H=Q.getPosition(),Z=new A.a(H.lineNumber,H.column,H.lineNumber,H.column+1);O[k]=new x.a(Z,C)}return new L.e(4,O,{shouldPushStackElementBefore:_(c,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(c,p){const E=p.charAt(0),y=c.autoClosingPairs.autoClosingPairsOpenByStart.get(E)||[],C=c.autoClosingPairs.autoClosingPairsCloseByStart.get(E)||[],O=y.some(Y=>p.startsWith(Y.open)),k=C.some(Y=>p.startsWith(Y.close));return!O&&k}static _findAutoClosingPairOpen(c,p,E,y){const C=c.autoClosingPairs.autoClosingPairsOpenByEnd.get(y);if(!C)return null;let O=null;for(const k of C)if(O===null||k.open.length>O.open.length){let Y=!0;for(const Q of E){const H=p.getValueInRange(new A.a(Q.lineNumber,Q.column-k.open.length+1,Q.lineNumber,Q.column));if(H+y!==k.open){Y=!1;break}}Y&&(O=k)}return O}static _findSubAutoClosingPairClose(c,p){if(p.open.length<=1)return"";const E=p.close.charAt(p.close.length-1),y=c.autoClosingPairs.autoClosingPairsCloseByEnd.get(E)||[];let C=null;for(const O of y)O.open!==p.open&&p.open.includes(O.open)&&p.close.endsWith(O.close)&&((!C||O.open.length>C.open.length)&&(C=O));return C?C.close:""}static _getAutoClosingPairClose(c,p,E,y,C){const O=Object(L.g)(y),k=O?c.autoClosingQuotes:c.autoClosingBrackets;if(k==="never")return null;const Y=this._findAutoClosingPairOpen(c,p,E.map(oe=>oe.getPosition()),y);if(!Y)return null;const Q=this._findSubAutoClosingPairClose(c,Y);let H=!0;const Z=O?c.shouldAutoCloseBefore.quote:c.shouldAutoCloseBefore.bracket;for(let oe=0,$=E.length;oe<$;oe++){const te=E[oe];if(!te.isEmpty())return null;const ne=te.getPosition(),Ee=p.getLineContent(ne.lineNumber),fe=Ee.substring(ne.column-1);if(fe.startsWith(Q)||(H=!1),Ee.length>ne.column-1){const U=Ee.charAt(ne.column-1),G=D._isBeforeClosingBrace(c,fe);if(!G&&!Z(U))return null}if(!p.isCheapToTokenize(ne.lineNumber))return null;if(Y.open.length===1&&(y==="'"||y==='"')&&k!=="always"){const U=Object(v.a)(c.wordSeparators);if(C&&ne.column>1&&U.get(Ee.charCodeAt(ne.column-2))===0)return null;if(!C&&ne.column>2&&U.get(Ee.charCodeAt(ne.column-3))===0)return null}p.forceTokenization(ne.lineNumber);const ee=p.getLineTokens(ne.lineNumber);let ie=!1;try{ie=d.b.shouldAutoClosePair(Y,ee,C?ne.column:ne.column-1)}catch(U){Object(f.f)(U)}if(!ie)return null}return H?Y.close.substring(0,Y.close.length-Q.length):Y.close}static _runAutoClosingOpenCharType(c,p,E,y,C,O,k){let Y=[];for(let Q=0,H=y.length;Q<H;Q++){const Z=y[Q];Y[Q]=new S(Z,C,O,k)}return new L.e(4,Y,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(c,p){return Object(L.g)(p)?c.autoSurround==="quotes"||c.autoSurround==="languageDefined":c.autoSurround==="brackets"||c.autoSurround==="languageDefined"}static _isSurroundSelectionType(c,p,E,y){if(!D._shouldSurroundChar(c,y)||!c.surroundingPairs.hasOwnProperty(y))return!1;const C=Object(L.g)(y);for(let O=0,k=E.length;O<k;O++){const Y=E[O];if(Y.isEmpty())return!1;let Q=!0;for(let H=Y.startLineNumber;H<=Y.endLineNumber;H++){const Z=p.getLineContent(H),oe=H===Y.startLineNumber?Y.startColumn-1:0,$=H===Y.endLineNumber?Y.endColumn-1:Z.length,te=Z.substring(oe,$);if(/[^ \t]/.test(te)){Q=!1;break}}if(Q)return!1;if(C&&Y.startLineNumber===Y.endLineNumber&&Y.startColumn+1===Y.endColumn){const H=p.getValueInRange(Y);if(Object(L.g)(H))return!1}}return!0}static _runSurroundSelectionType(c,p,E,y,C){let O=[];for(let k=0,Y=y.length;k<Y;k++){const Q=y[k],H=p.surroundingPairs[C];O[k]=new I(Q,C,H)}return new L.e(0,O,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(c,p,E){return!!(E.length===1&&p.isCheapToTokenize(E[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(c,p,E,y,C){if(!p.electricChars.hasOwnProperty(C)||!y.isEmpty())return null;let O=y.getPosition();E.forceTokenization(O.lineNumber);let k=E.getLineTokens(O.lineNumber),Y;try{Y=d.b.onElectricCharacter(C,k,O.column)}catch(Q){return Object(f.f)(Q),null}if(!Y)return null;if(Y.matchOpenBracket){let Q=(k.getLineContent()+C).lastIndexOf(Y.matchOpenBracket)+1,H=E.findMatchingBracketUp(Y.matchOpenBracket,{lineNumber:O.lineNumber,column:Q});if(H){if(H.startLineNumber===O.lineNumber)return null;let Z=E.getLineContent(H.startLineNumber),oe=B.x(Z),$=p.normalizeIndentation(oe),te=E.getLineContent(O.lineNumber),ne=E.getLineFirstNonWhitespaceColumn(O.lineNumber)||O.column,Ee=te.substring(ne-1,O.column-1),fe=$+Ee+C,ee=new A.a(O.lineNumber,1,O.lineNumber,O.column);const ie=new x.a(ee,fe);return new L.e(r(fe,c),[ie],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(c,p,E,y,C,O){if(!y||F.a.selectionsArrEqual(y,C))return null;let k=null;for(const Q of C){if(!Q.isEmpty())return null;const H=Q.getPosition(),Z=E.getValueInRange(new A.a(H.lineNumber,H.column-1,H.lineNumber,H.column));if(k===null)k=Z;else if(k!==Z)return null}if(!k)return null;if(this._isAutoClosingOvertype(p,E,C,O,k)){const Q=C.map(H=>new x.a(new A.a(H.positionLineNumber,H.positionColumn,H.positionLineNumber,H.positionColumn+1),"",!1));return new L.e(4,Q,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const Y=this._getAutoClosingPairClose(p,E,C,k,!1);return Y!==null?this._runAutoClosingOpenCharType(c,p,E,C,k,!1,Y):null}static typeWithInterceptors(c,p,E,y,C,O,k){if(!c&&k===`
|
|
|
`){let H=[];for(let Z=0,oe=C.length;Z<oe;Z++)H[Z]=D._enter(E,y,!1,C[Z]);return new L.e(4,H,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!c&&this._isAutoIndentType(E,y,C)){let H=[],Z=!1;for(let oe=0,$=C.length;oe<$;oe++)if(H[oe]=this._runAutoIndentType(E,y,C[oe],k),!H[oe]){Z=!0;break}if(!Z)return new L.e(4,H,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!c&&this._isAutoClosingOvertype(E,y,C,O,k))return this._runAutoClosingOvertype(p,E,y,C,k);if(!c){const H=this._getAutoClosingPairClose(E,y,C,k,!0);if(H)return this._runAutoClosingOpenCharType(p,E,y,C,k,!0,H)}if(this._isSurroundSelectionType(E,y,C,k))return this._runSurroundSelectionType(p,E,y,C,k);if(!c&&this._isTypeInterceptorElectricChar(E,y,C)){const H=this._typeInterceptorElectricChar(p,E,y,C[0],k);if(H)return H}let Y=[];for(let H=0,Z=C.length;H<Z;H++)Y[H]=new x.a(C[H],k);const Q=r(k,p);return new L.e(Q,Y,{shouldPushStackElementBefore:_(p,Q),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(c,p,E,y,C){let O=[];for(let Y=0,Q=y.length;Y<Q;Y++)O[Y]=new x.a(y[Y],C);const k=r(C,c);return new L.e(k,O,{shouldPushStackElementBefore:_(c,k),shouldPushStackElementAfter:!1})}static lineInsertBefore(c,p,E){if(p===null||E===null)return[];let y=[];for(let C=0,O=E.length;C<O;C++){let k=E[C].positionLineNumber;if(k===1)y[C]=new x.e(new A.a(1,1,1,1),`
|
|
|
`);else{k--;let Y=p.getLineMaxColumn(k);y[C]=this._enter(c,p,!1,new A.a(k,Y,k,Y))}}return y}static lineInsertAfter(c,p,E){if(p===null||E===null)return[];let y=[];for(let C=0,O=E.length;C<O;C++){const k=E[C].positionLineNumber;let Y=p.getLineMaxColumn(k);y[C]=this._enter(c,p,!1,new A.a(k,Y,k,Y))}return y}static lineBreakInsert(c,p,E){let y=[];for(let C=0,O=E.length;C<O;C++)y[C]=this._enter(c,p,!0,E[C]);return y}}class S extends x.d{constructor(c,p,E,y){super(c,(E?p:"")+y,0,-y.length);this._openCharacter=p,this._closeCharacter=y,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(c,p){let E=p.getInverseEditOperations(),y=E[0].range;return this.closeCharacterRange=new A.a(y.startLineNumber,y.endColumn-this._closeCharacter.length,y.endLineNumber,y.endColumn),this.enclosingRange=new A.a(y.startLineNumber,y.endColumn-this._openCharacter.length-this._closeCharacter.length,y.endLineNumber,y.endColumn),super.computeCursorState(c,p)}}function r(c,p){return c===" "?p===5||p===6?6:5:4}function _(c,p){return h(c)&&!h(p)?!0:c===5?!1:b(c)!==b(p)}function b(c){return c===6||c===5?"space":c}function h(c){return c===4||c===5||c===6}},GZrW:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:function(){return t.e(364).then(t.bind(null,"Csoz"))}})},Gb1F:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:function(){return t.e(360).then(t.bind(null,"ynbn"))}})},GvMn:function(mt,M,t){"use strict";t.r(M);var f=t("X+cX"),B=t("/cxE"),x=t("vATl"),N=t("sswD"),A=t("aokT"),F=t("gCVg"),I=t("wQH0"),L=t("tX9W"),v=t("pAvP"),m=t("kYye"),d=t("3/fG"),D=t("t9D7");class S{constructor(p,E,y){this._editRange=p,this._originalSelection=E,this._text=y}getEditOperations(p,E){E.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(p,E){const y=E.getInverseEditOperations(),C=y[0].range;return this._originalSelection.isEmpty()?new F.a(C.endLineNumber,Math.min(this._originalSelection.positionColumn,C.endColumn),C.endLineNumber,Math.min(this._originalSelection.positionColumn,C.endColumn)):new F.a(C.endLineNumber,C.endColumn-this._text.length,C.endLineNumber,C.endColumn)}}var r=function(p,E,y,C){var O=arguments.length,k=O<3?E:C===null?C=Object.getOwnPropertyDescriptor(E,y):C,Y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(p,E,y,C);else for(var Q=p.length-1;Q>=0;Q--)(Y=p[Q])&&(k=(O<3?Y(k):O>3?Y(E,y,k):Y(E,y))||k);return O>3&&k&&Object.defineProperty(E,y,k),k},_=function(p,E){return function(y,C){E(y,C,p)}};let b=class p{constructor(E,y){this.decorationIds=[],this.editor=E,this.editorWorkerService=y}static get(E){return E.getContribution(p.ID)}dispose(){}run(E,y){this.currentRequest&&this.currentRequest.cancel();const C=this.editor.getSelection(),O=this.editor.getModel();if(!O||!C)return;let k=C;if(k.startLineNumber!==k.endLineNumber)return;const Y=new x.a(this.editor,1|4),Q=O.uri;return this.editorWorkerService.canNavigateValueSet(Q)?(this.currentRequest=Object(f.h)(H=>this.editorWorkerService.navigateValueSet(Q,k,y)),this.currentRequest.then(H=>{if(!H||!H.range||!H.value)return;if(!Y.validate(this.editor))return;let Z=A.a.lift(H.range),oe=H.range,$=H.value.length-(k.endColumn-k.startColumn);oe={startLineNumber:oe.startLineNumber,startColumn:oe.startColumn,endLineNumber:oe.endLineNumber,endColumn:oe.startColumn+H.value.length},$>1&&(k=new F.a(k.startLineNumber,k.startColumn,k.endLineNumber,k.endColumn+$-1));const te=new S(Z,k,H.value);this.editor.pushUndoStop(),this.editor.executeCommand(E,te),this.editor.pushUndoStop(),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[{range:oe,options:p.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=Object(f.n)(350),this.decorationRemover.then(()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[])).catch(B.f)}).catch(B.f)):Promise.resolve(void 0)}};b.ID="editor.contrib.inPlaceReplaceController",b.DECORATION=L.b.register({description:"in-place-replace",className:"valueSetReplacement"}),b=r([_(1,v.a)],b);class h extends N.b{constructor(){super({id:"editor.action.inPlaceReplace.up",label:d.a("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:I.a.writable,kbOpts:{kbExpr:I.a.editorTextFocus,primary:2048|1024|82,weight:100}})}run(p,E){const y=b.get(E);return y?y.run(this.id,!0):Promise.resolve(void 0)}}class c extends N.b{constructor(){super({id:"editor.action.inPlaceReplace.down",label:d.a("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:I.a.writable,kbOpts:{kbExpr:I.a.editorTextFocus,primary:2048|1024|84,weight:100}})}run(p,E){const y=b.get(E);return y?y.run(this.id,!1):Promise.resolve(void 0)}}Object(N.l)(b.ID,b),Object(N.j)(h),Object(N.j)(c),Object(D.f)((p,E)=>{const y=p.getColor(m.k);y&&E.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${y}; }`)})},Gw4z:function(mt,M,t){"use strict";t.d(M,"b",function(){return N}),t.d(M,"a",function(){return L});class f{constructor(v,m,d,D){this.originalStart=v,this.originalLength=m,this.modifiedStart=d,this.modifiedLength=D}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var B=t("7afs");class x{constructor(v){this.source=v}getElements(){const v=this.source,m=new Int32Array(v.length);for(let d=0,D=v.length;d<D;d++)m[d]=v.charCodeAt(d);return m}}function N(v,m,d){return new L(new x(v),new x(m)).ComputeDiff(d).changes}class A{static Assert(v,m){if(!v)throw new Error(m)}}class F{static Copy(v,m,d,D,S){for(let r=0;r<S;r++)d[D+r]=v[m+r]}static Copy2(v,m,d,D,S){for(let r=0;r<S;r++)d[D+r]=v[m+r]}}class I{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new f(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(v,m){this.m_originalStart=Math.min(this.m_originalStart,v),this.m_modifiedStart=Math.min(this.m_modifiedStart,m),this.m_originalCount++}AddModifiedElement(v,m){this.m_originalStart=Math.min(this.m_originalStart,v),this.m_modifiedStart=Math.min(this.m_modifiedStart,m),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 L{constructor(v,m,d=null){this.ContinueProcessingPredicate=d,this._originalSequence=v,this._modifiedSequence=m;const[D,S,r]=L._getElements(v),[_,b,h]=L._getElements(m);this._hasStrings=r&&h,this._originalStringElements=D,this._originalElementsOrHash=S,this._modifiedStringElements=_,this._modifiedElementsOrHash=b,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(v){return v.length>0&&typeof v[0]=="string"}static _getElements(v){const m=v.getElements();if(L._isStringArray(m)){const d=new Int32Array(m.length);for(let D=0,S=m.length;D<S;D++)d[D]=Object(B.d)(m[D],0);return[m,d,!0]}return m instanceof Int32Array?[[],m,!1]:[[],new Int32Array(m),!1]}ElementsAreEqual(v,m){return this._originalElementsOrHash[v]!==this._modifiedElementsOrHash[m]?!1:this._hasStrings?this._originalStringElements[v]===this._modifiedStringElements[m]:!0}ElementsAreStrictEqual(v,m){if(!this.ElementsAreEqual(v,m))return!1;const d=L._getStrictElement(this._originalSequence,v),D=L._getStrictElement(this._modifiedSequence,m);return d===D}static _getStrictElement(v,m){return typeof v.getStrictElement=="function"?v.getStrictElement(m):null}OriginalElementsAreEqual(v,m){return this._originalElementsOrHash[v]!==this._originalElementsOrHash[m]?!1:this._hasStrings?this._originalStringElements[v]===this._originalStringElements[m]:!0}ModifiedElementsAreEqual(v,m){return this._modifiedElementsOrHash[v]!==this._modifiedElementsOrHash[m]?!1:this._hasStrings?this._modifiedStringElements[v]===this._modifiedStringElements[m]:!0}ComputeDiff(v){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,v)}_ComputeDiff(v,m,d,D,S){const r=[!1];let _=this.ComputeDiffRecursive(v,m,d,D,r);return S&&(_=this.PrettifyChanges(_)),{quitEarly:r[0],changes:_}}ComputeDiffRecursive(v,m,d,D,S){for(S[0]=!1;v<=m&&d<=D&&this.ElementsAreEqual(v,d);)v++,d++;for(;m>=v&&D>=d&&this.ElementsAreEqual(m,D);)m--,D--;if(v>m||d>D){let p;return d<=D?(A.Assert(v===m+1,"originalStart should only be one more than originalEnd"),p=[new f(v,0,d,D-d+1)]):v<=m?(A.Assert(d===D+1,"modifiedStart should only be one more than modifiedEnd"),p=[new f(v,m-v+1,d,0)]):(A.Assert(v===m+1,"originalStart should only be one more than originalEnd"),A.Assert(d===D+1,"modifiedStart should only be one more than modifiedEnd"),p=[]),p}const r=[0],_=[0],b=this.ComputeRecursionPoint(v,m,d,D,r,_,S),h=r[0],c=_[0];if(b!==null)return b;if(!S[0]){const p=this.ComputeDiffRecursive(v,h,d,c,S);let E=[];return S[0]?E=[new f(h+1,m-(h+1)+1,c+1,D-(c+1)+1)]:E=this.ComputeDiffRecursive(h+1,m,c+1,D,S),this.ConcatenateChanges(p,E)}return[new f(v,m-v+1,d,D-d+1)]}WALKTRACE(v,m,d,D,S,r,_,b,h,c,p,E,y,C,O,k,Y,Q){let H=null,Z=null,oe=new I,$=m,te=d,ne=y[0]-k[0]-D,Ee=-1073741824,fe=this.m_forwardHistory.length-1;do{const ee=ne+v;ee===$||ee<te&&h[ee-1]<h[ee+1]?(p=h[ee+1],C=p-ne-D,p<Ee&&oe.MarkNextChange(),Ee=p,oe.AddModifiedElement(p+1,C),ne=ee+1-v):(p=h[ee-1]+1,C=p-ne-D,p<Ee&&oe.MarkNextChange(),Ee=p-1,oe.AddOriginalElement(p,C+1),ne=ee-1-v),fe>=0&&(h=this.m_forwardHistory[fe],v=h[0],$=1,te=h.length-1)}while(--fe>=-1);if(H=oe.getReverseChanges(),Q[0]){let ee=y[0]+1,ie=k[0]+1;if(H!==null&&H.length>0){const U=H[H.length-1];ee=Math.max(ee,U.getOriginalEnd()),ie=Math.max(ie,U.getModifiedEnd())}Z=[new f(ee,E-ee+1,ie,O-ie+1)]}else{oe=new I,$=r,te=_,ne=y[0]-k[0]-b,Ee=1073741824,fe=Y?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const ee=ne+S;ee===$||ee<te&&c[ee-1]>=c[ee+1]?(p=c[ee+1]-1,C=p-ne-b,p>Ee&&oe.MarkNextChange(),Ee=p+1,oe.AddOriginalElement(p+1,C+1),ne=ee+1-S):(p=c[ee-1],C=p-ne-b,p>Ee&&oe.MarkNextChange(),Ee=p,oe.AddModifiedElement(p+1,C+1),ne=ee-1-S),fe>=0&&(c=this.m_reverseHistory[fe],S=c[0],$=1,te=c.length-1)}while(--fe>=-1);Z=oe.getChanges()}return this.ConcatenateChanges(H,Z)}ComputeRecursionPoint(v,m,d,D,S,r,_){let b=0,h=0,c=0,p=0,E=0,y=0;v--,d--,S[0]=0,r[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const C=m-v+(D-d),O=C+1,k=new Int32Array(O),Y=new Int32Array(O),Q=D-d,H=m-v,Z=v-d,oe=m-D,$=H-Q,te=$%2===0;k[Q]=v,Y[H]=m,_[0]=!1;for(let ne=1;ne<=C/2+1;ne++){let Ee=0,fe=0;c=this.ClipDiagonalBound(Q-ne,ne,Q,O),p=this.ClipDiagonalBound(Q+ne,ne,Q,O);for(let ie=c;ie<=p;ie+=2){ie===c||ie<p&&k[ie-1]<k[ie+1]?b=k[ie+1]:b=k[ie-1]+1,h=b-(ie-Q)-Z;const U=b;for(;b<m&&h<D&&this.ElementsAreEqual(b+1,h+1);)b++,h++;if(k[ie]=b,b+h>Ee+fe&&(Ee=b,fe=h),!te&&Math.abs(ie-H)<=ne-1&&b>=Y[ie])return S[0]=b,r[0]=h,U<=Y[ie]&&1447>0&&ne<=1447+1?this.WALKTRACE(Q,c,p,Z,H,E,y,oe,k,Y,b,m,S,h,D,r,te,_):null}const ee=(Ee-v+(fe-d)-ne)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(Ee,ee))return _[0]=!0,S[0]=Ee,r[0]=fe,ee>0&&1447>0&&ne<=1447+1?this.WALKTRACE(Q,c,p,Z,H,E,y,oe,k,Y,b,m,S,h,D,r,te,_):(v++,d++,[new f(v,m-v+1,d,D-d+1)]);E=this.ClipDiagonalBound(H-ne,ne,H,O),y=this.ClipDiagonalBound(H+ne,ne,H,O);for(let ie=E;ie<=y;ie+=2){ie===E||ie<y&&Y[ie-1]>=Y[ie+1]?b=Y[ie+1]-1:b=Y[ie-1],h=b-(ie-H)-oe;const U=b;for(;b>v&&h>d&&this.ElementsAreEqual(b,h);)b--,h--;if(Y[ie]=b,te&&Math.abs(ie-Q)<=ne&&b<=k[ie])return S[0]=b,r[0]=h,U>=k[ie]&&1447>0&&ne<=1447+1?this.WALKTRACE(Q,c,p,Z,H,E,y,oe,k,Y,b,m,S,h,D,r,te,_):null}if(ne<=1447){let ie=new Int32Array(p-c+2);ie[0]=Q-c+1,F.Copy2(k,c,ie,1,p-c+1),this.m_forwardHistory.push(ie),ie=new Int32Array(y-E+2),ie[0]=H-E+1,F.Copy2(Y,E,ie,1,y-E+1),this.m_reverseHistory.push(ie)}}return this.WALKTRACE(Q,c,p,Z,H,E,y,oe,k,Y,b,m,S,h,D,r,te,_)}PrettifyChanges(v){for(let m=0;m<v.length;m++){const d=v[m],D=m<v.length-1?v[m+1].originalStart:this._originalElementsOrHash.length,S=m<v.length-1?v[m+1].modifiedStart:this._modifiedElementsOrHash.length,r=d.originalLength>0,_=d.modifiedLength>0;for(;d.originalStart+d.originalLength<D&&d.modifiedStart+d.modifiedLength<S&&(!r||this.OriginalElementsAreEqual(d.originalStart,d.originalStart+d.originalLength))&&(!_||this.ModifiedElementsAreEqual(d.modifiedStart,d.modifiedStart+d.modifiedLength));){const h=this.ElementsAreStrictEqual(d.originalStart,d.modifiedStart),c=this.ElementsAreStrictEqual(d.originalStart+d.originalLength,d.modifiedStart+d.modifiedLength);if(c&&!h)break;d.originalStart++,d.modifiedStart++}let b=[null];if(m<v.length-1&&this.ChangesOverlap(v[m],v[m+1],b)){v[m]=b[0],v.splice(m+1,1),m--;continue}}for(let m=v.length-1;m>=0;m--){const d=v[m];let D=0,S=0;if(m>0){const p=v[m-1];D=p.originalStart+p.originalLength,S=p.modifiedStart+p.modifiedLength}const r=d.originalLength>0,_=d.modifiedLength>0;let b=0,h=this._boundaryScore(d.originalStart,d.originalLength,d.modifiedStart,d.modifiedLength);for(let p=1;;p++){const E=d.originalStart-p,y=d.modifiedStart-p;if(E<D||y<S)break;if(r&&!this.OriginalElementsAreEqual(E,E+d.originalLength))break;if(_&&!this.ModifiedElementsAreEqual(y,y+d.modifiedLength))break;const C=E===D&&y===S,O=(C?5:0)+this._boundaryScore(E,d.originalLength,y,d.modifiedLength);O>h&&(h=O,b=p)}d.originalStart-=b,d.modifiedStart-=b;const c=[null];if(m>0&&this.ChangesOverlap(v[m-1],v[m],c)){v[m-1]=c[0],v.splice(m,1),m++;continue}}if(this._hasStrings)for(let m=1,d=v.length;m<d;m++){const D=v[m-1],S=v[m],r=S.originalStart-D.originalStart-D.originalLength,_=D.originalStart,b=S.originalStart+S.originalLength,h=b-_,c=D.modifiedStart,p=S.modifiedStart+S.modifiedLength,E=p-c;if(r<5&&h<20&&E<20){const y=this._findBetterContiguousSequence(_,h,c,E,r);if(y){const[C,O]=y;(C!==D.originalStart+D.originalLength||O!==D.modifiedStart+D.modifiedLength)&&(D.originalLength=C-D.originalStart,D.modifiedLength=O-D.modifiedStart,S.originalStart=C+r,S.modifiedStart=O+r,S.originalLength=b-S.originalStart,S.modifiedLength=p-S.modifiedStart)}}}return v}_findBetterContiguousSequence(v,m,d,D,S){if(m<S||D<S)return null;const r=v+m-S+1,_=d+D-S+1;let b=0,h=0,c=0;for(let p=v;p<r;p++)for(let E=d;E<_;E++){const y=this._contiguousSequenceScore(p,E,S);y>0&&y>b&&(b=y,h=p,c=E)}return b>0?[h,c]:null}_contiguousSequenceScore(v,m,d){let D=0;for(let S=0;S<d;S++){if(!this.ElementsAreEqual(v+S,m+S))return 0;D+=this._originalStringElements[v+S].length}return D}_OriginalIsBoundary(v){return v<=0||v>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[v])}_OriginalRegionIsBoundary(v,m){if(this._OriginalIsBoundary(v)||this._OriginalIsBoundary(v-1))return!0;if(m>0){const d=v+m;if(this._OriginalIsBoundary(d-1)||this._OriginalIsBoundary(d))return!0}return!1}_ModifiedIsBoundary(v){return v<=0||v>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[v])}_ModifiedRegionIsBoundary(v,m){if(this._ModifiedIsBoundary(v)||this._ModifiedIsBoundary(v-1))return!0;if(m>0){const d=v+m;if(this._ModifiedIsBoundary(d-1)||this._ModifiedIsBoundary(d))return!0}return!1}_boundaryScore(v,m,d,D){const S=this._OriginalRegionIsBoundary(v,m)?1:0,r=this._ModifiedRegionIsBoundary(d,D)?1:0;return S+r}ConcatenateChanges(v,m){let d=[];if(v.length===0||m.length===0)return m.length>0?m:v;if(this.ChangesOverlap(v[v.length-1],m[0],d)){const D=new Array(v.length+m.length-1);return F.Copy(v,0,D,0,v.length-1),D[v.length-1]=d[0],F.Copy(m,1,D,v.length,m.length-1),D}else{const D=new Array(v.length+m.length);return F.Copy(v,0,D,0,v.length),F.Copy(m,0,D,v.length,m.length),D}}ChangesOverlap(v,m,d){if(A.Assert(v.originalStart<=m.originalStart,"Left change is not less than or equal to right change"),A.Assert(v.modifiedStart<=m.modifiedStart,"Left change is not less than or equal to right change"),v.originalStart+v.originalLength>=m.originalStart||v.modifiedStart+v.modifiedLength>=m.modifiedStart){const D=v.originalStart;let S=v.originalLength;const r=v.modifiedStart;let _=v.modifiedLength;return v.originalStart+v.originalLength>=m.originalStart&&(S=m.originalStart+m.originalLength-v.originalStart),v.modifiedStart+v.modifiedLength>=m.modifiedStart&&(_=m.modifiedStart+m.modifiedLength-v.modifiedStart),d[0]=new f(D,S,r,_),!0}else return d[0]=null,!1}ClipDiagonalBound(v,m,d,D){if(v>=0&&v<D)return v;const S=d,r=D-d-1,_=m%2===0;if(v<0){const b=S%2===0;return _===b?0:1}else{const b=r%2===0;return _===b?D-1:D-2}}}},"H+DO":function(mt,M,t){"use strict";t.d(M,"a",function(){return L});var f=t("C/vA"),B=t("pmY6"),x=t("746U"),N=t("sFUC"),A=t("M1Kb"),F=t("kYye"),I=t("t9D7");class L{constructor(v){this.options=v,this.rangeHighlightDecorationId=void 0}provide(v,m){var d;const D=new B.b;v.canAcceptInBackground=!!((d=this.options)===null||d===void 0?void 0:d.canAcceptInBackground),v.matchOnLabel=v.matchOnDescription=v.matchOnDetail=v.sortByLabel=!1;const S=D.add(new B.d);return S.value=this.doProvide(v,m),D.add(this.onDidActiveTextEditorControlChange(()=>{S.value=void 0,S.value=this.doProvide(v,m)})),D}doProvide(v,m){const d=new B.b,D=this.activeTextEditorControl;if(D&&this.canProvideWithTextEditor(D)){const S={editor:D},r=Object(N.a)(D);if(r){let _=Object(x.p)(D.saveViewState());d.add(r.onDidChangeCursorPosition(()=>{_=Object(x.p)(D.saveViewState())})),S.restoreViewState=()=>{_&&D===this.activeTextEditorControl&&D.restoreViewState(_)},d.add(Object(f.a)(m.onCancellationRequested)(()=>{var b;return(b=S.restoreViewState)===null||b===void 0?void 0:b.call(S)}))}d.add(Object(B.i)(()=>this.clearDecorations(D))),d.add(this.provideWithTextEditor(S,v,m))}else d.add(this.provideWithoutTextEditor(v,m));return d}canProvideWithTextEditor(v){return!0}gotoLocation({editor:v},m){v.setSelection(m.range),v.revealRangeInCenter(m.range,0),m.preserveFocus||v.focus()}getModel(v){var m;return Object(N.c)(v)?(m=v.getModel())===null||m===void 0?void 0:m.modified:v.getModel()}addDecorations(v,m){v.changeDecorations(d=>{const D=[];this.rangeHighlightDecorationId&&(D.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),D.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const S=[{range:m,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:m,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:Object(I.g)(F.N),position:A.g.Full}}}],[r,_]=d.deltaDecorations(D,S);this.rangeHighlightDecorationId={rangeHighlightId:r,overviewRulerDecorationId:_}})}clearDecorations(v){const m=this.rangeHighlightDecorationId;m&&(v.changeDecorations(d=>{d.deltaDecorations([m.overviewRulerDecorationId,m.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}},H4T2:function(mt,M,t){"use strict";t.r(M),t.d(M,"GotoDefinitionAtPositionEditorContribution",function(){return Y});var f=t("X+cX"),B=t("/cxE"),x=t("eLzo"),N=t("pmY6"),A=t("746U"),F=t("62hx"),I=t.n(F),L=t("vATl"),v=t("sswD"),m=t("cGHE"),d=t("aokT"),D=t("twdY"),S=t("WBhO"),r=t("t49l"),_=t("aBYw"),b=t("iNS8"),h=t("3/fG"),c=t("T8No"),p=t("MD5Z"),E=t("t9D7"),y=t("8Ydt"),C=t("vRMv"),O=function(Q,H,Z,oe){var $=arguments.length,te=$<3?H:oe===null?oe=Object.getOwnPropertyDescriptor(H,Z):oe,ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")te=Reflect.decorate(Q,H,Z,oe);else for(var Ee=Q.length-1;Ee>=0;Ee--)(ne=Q[Ee])&&(te=($<3?ne(te):$>3?ne(H,Z,te):ne(H,Z))||te);return $>3&&te&&Object.defineProperty(H,Z,te),te},k=function(Q,H){return function(Z,oe){H(Z,oe,Q)}};let Y=class Q{constructor(H,Z,oe){this.textModelResolverService=Z,this.modeService=oe,this.toUnhook=new N.b,this.toUnhookForKeyboard=new N.b,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=H;let $=new _.a(H);this.toUnhook.add($),this.toUnhook.add($.onMouseMoveOrRelevantKeyDown(([te,ne])=>{this.startFindDefinitionFromMouse(te,Object(A.p)(ne))})),this.toUnhook.add($.onExecute(te=>{this.isEnabled(te)&&this.gotoDefinition(te.target.position,te.hasSideBySideModifier).then(()=>{this.removeLinkDecorations()},ne=>{this.removeLinkDecorations(),Object(B.f)(ne)})})),this.toUnhook.add($.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(H){return H.getContribution(Q.ID)}startFindDefinitionFromCursor(H){return this.startFindDefinition(H).then(()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(Z=>{Z&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(H,Z){if(H.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(H,Z)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const oe=H.target.position;this.startFindDefinition(oe)}startFindDefinition(H){var Z;this.toUnhookForKeyboard.clear();const oe=H?(Z=this.editor.getModel())===null||Z===void 0?void 0:Z.getWordAtPosition(H):null;if(!oe)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===oe.startColumn&&this.currentWordAtPosition.endColumn===oe.endColumn&&this.currentWordAtPosition.word===oe.word)return Promise.resolve(0);this.currentWordAtPosition=oe;let $=new L.a(this.editor,4|1|2|8);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Object(f.h)(te=>this.findDefinition(H,te)),this.previousPromise.then(te=>{if(!te||!te.length||!$.validate(this.editor)){this.removeLinkDecorations();return}if(te.length>1)this.addDecoration(new d.a(H.lineNumber,oe.startColumn,H.lineNumber,oe.endColumn),new x.a().appendText(h.a("multipleResults","Click to show {0} definitions.",te.length)));else{let ne=te[0];if(!ne.uri)return;this.textModelResolverService.createModelReference(ne.uri).then(Ee=>{if(!Ee.object||!Ee.object.textEditorModel){Ee.dispose();return}const{object:{textEditorModel:fe}}=Ee,{startLineNumber:ee}=ne.range;if(ee<1||ee>fe.getLineCount()){Ee.dispose();return}const ie=this.getPreviewValue(fe,ee,ne);let U;ne.originSelectionRange?U=d.a.lift(ne.originSelectionRange):U=new d.a(H.lineNumber,oe.startColumn,H.lineNumber,oe.endColumn);const G=this.modeService.getModeIdByFilepathOrFirstLine(fe.uri);this.addDecoration(U,new x.a().appendCodeblock(G||"",ie)),Ee.dispose()})}}).then(void 0,B.f)}getPreviewValue(H,Z,oe){let $=oe.targetSelectionRange?oe.range:this.getPreviewRangeBasedOnBrackets(H,Z);const te=$.endLineNumber-$.startLineNumber;te>=Q.MAX_SOURCE_PREVIEW_LINES&&($=this.getPreviewRangeBasedOnIndentation(H,Z));const ne=this.stripIndentationFromPreviewRange(H,Z,$);return ne}stripIndentationFromPreviewRange(H,Z,oe){const $=H.getLineFirstNonWhitespaceColumn(Z);let te=$;for(let Ee=Z+1;Ee<oe.endLineNumber;Ee++){const fe=H.getLineFirstNonWhitespaceColumn(Ee);te=Math.min(te,fe)}const ne=H.getValueInRange(oe).replace(new RegExp(`^\\s{${te-1}}`,"gm"),"").trim();return ne}getPreviewRangeBasedOnIndentation(H,Z){const oe=H.getLineFirstNonWhitespaceColumn(Z),$=Math.min(H.getLineCount(),Z+Q.MAX_SOURCE_PREVIEW_LINES);let te=Z+1;for(;te<$;te++){let ne=H.getLineFirstNonWhitespaceColumn(te);if(oe===ne)break}return new d.a(Z,1,te+1,1)}getPreviewRangeBasedOnBrackets(H,Z){const oe=Math.min(H.getLineCount(),Z+Q.MAX_SOURCE_PREVIEW_LINES),$=[];let te=!0,ne=H.findNextBracket(new m.a(Z,1));for(;ne!==null;){if($.length===0)$.push(ne);else{const ie=$[$.length-1];if(ie.open[0]===ne.open[0]&&ie.isOpen&&!ne.isOpen?$.pop():$.push(ne),$.length===0)if(te)te=!1;else return new d.a(Z,1,ne.range.endLineNumber+1,1)}const Ee=H.getLineMaxColumn(Z);let fe=ne.range.endLineNumber,ee=ne.range.endColumn;if(Ee===ne.range.endColumn&&(fe++,ee=1),fe>oe)return new d.a(Z,1,oe+1,1);ne=H.findNextBracket(new m.a(fe,ee))}return new d.a(Z,1,oe+1,1)}addDecoration(H,Z){const oe={range:H,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:Z}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[oe])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(H,Z){return this.editor.hasModel()&&H.isNoneOrSingleMouseDown&&H.target.type===6&&(H.hasTriggerModifier||(Z?Z.keyCodeIsTriggerKey:!1))&&D.f.has(this.editor.getModel())}findDefinition(H,Z){const oe=this.editor.getModel();return oe?Object(C.b)(oe,H,Z):Promise.resolve(null)}gotoDefinition(H,Z){return this.editor.setPosition(H),this.editor.invokeWithinContext(oe=>{const $=!Z&&this.editor.getOption(77)&&!this.isInPeekEditor(oe),te=new y.DefinitionAction({openToSide:Z,openInPeek:$,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0});return te.run(oe,this.editor)})}isInPeekEditor(H){const Z=H.get(c.b);return b.b.inPeekEditor.getValue(Z)}dispose(){this.toUnhook.dispose()}};Y.ID="editor.contrib.gotodefinitionatposition",Y.MAX_SOURCE_PREVIEW_LINES=8,Y=O([k(1,r.a),k(2,S.a)],Y),Object(v.l)(Y.ID,Y),Object(E.f)((Q,H)=>{const Z=Q.getColor(p.q);Z&&H.addRule(`.monaco-editor .goto-definition-link { color: ${Z} !important; }`)})},H6Gb:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:function(){return t.e(347).then(t.bind(null,"lXEz"))}})},HdwC:function(mt,M,t){"use strict";t.d(M,"b",function(){return S}),t.d(M,"a",function(){return _});var f=t("D3Dy"),B=t("MI8n"),x=t("pmY6"),N=t("MNsG"),A=t("/UlZ");class F{constructor(b,h){this.chr=b,this.type=h,this.width=0}fulfill(b){this.width=b}}class I{constructor(b,h){this._bareFontInfo=b,this._requests=h,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 b=this._bareFontInfo.getMassagedFontFamily(f.h?A.c.fontFamily:null),h=document.createElement("div");h.style.position="absolute",h.style.top="-50000px",h.style.width="50000px";const c=document.createElement("div");c.style.fontFamily=b,c.style.fontWeight=this._bareFontInfo.fontWeight,c.style.fontSize=this._bareFontInfo.fontSize+"px",c.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,c.style.lineHeight=this._bareFontInfo.lineHeight+"px",c.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",h.appendChild(c);const p=document.createElement("div");p.style.fontFamily=b,p.style.fontWeight="bold",p.style.fontSize=this._bareFontInfo.fontSize+"px",p.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,p.style.lineHeight=this._bareFontInfo.lineHeight+"px",p.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",h.appendChild(p);const E=document.createElement("div");E.style.fontFamily=b,E.style.fontWeight=this._bareFontInfo.fontWeight,E.style.fontSize=this._bareFontInfo.fontSize+"px",E.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,E.style.lineHeight=this._bareFontInfo.lineHeight+"px",E.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",E.style.fontStyle="italic",h.appendChild(E);const y=[];for(const C of this._requests){let O;C.type===0&&(O=c),C.type===2&&(O=p),C.type===1&&(O=E),O.appendChild(document.createElement("br"));const k=document.createElement("span");I._render(k,C),O.appendChild(k),y.push(k)}this._container=h,this._testElements=y}static _render(b,h){if(h.chr===" "){let c="\xA0";for(let p=0;p<8;p++)c+=c;b.innerText=c}else{let c=h.chr;for(let p=0;p<8;p++)c+=c;b.textContent=c}}_readFromDomElements(){for(let b=0,h=this._requests.length;b<h;b++){const c=this._requests[b],p=this._testElements[b];c.fulfill(p.offsetWidth/256)}}}function L(b,h){const c=new I(b,h);c.read()}var v=t("o39E"),m=t("iDAx"),d=t("+3Gp");class D{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(b){const h=b.getId();return!!this._values[h]}get(b){const h=b.getId();return this._values[h]}put(b,h){const c=b.getId();this._keys[c]=b,this._values[c]=h}remove(b){const h=b.getId();delete this._keys[h],delete this._values[h]}getValues(){return Object.keys(this._keys).map(b=>this._values[b])}}function S(){r.INSTANCE.clearCache()}class r extends x.a{constructor(){super();this._onDidChange=this._register(new B.b),this.onDidChange=this._onDidChange.event,this._cache=new D,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearCache(){this._cache=new D,this._onDidChange.fire()}_writeToCache(b,h){this._cache.put(b,h),!h.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const b=this._cache.getValues();let h=!1;for(const c of b)c.isTrusted||(h=!0,this._cache.remove(c));h&&this._onDidChange.fire()}readConfiguration(b){if(!this._cache.has(b)){let h=r._actualReadConfiguration(b);(h.typicalHalfwidthCharacterWidth<=2||h.typicalFullwidthCharacterWidth<=2||h.spaceWidth<=2||h.maxDigitWidth<=2)&&(h=new d.b({zoomLevel:f.d(),pixelRatio:f.a(),fontFamily:h.fontFamily,fontWeight:h.fontWeight,fontSize:h.fontSize,fontFeatureSettings:h.fontFeatureSettings,lineHeight:h.lineHeight,letterSpacing:h.letterSpacing,isMonospace:h.isMonospace,typicalHalfwidthCharacterWidth:Math.max(h.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(h.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:h.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(h.spaceWidth,5),middotWidth:Math.max(h.middotWidth,5),wsmiddotWidth:Math.max(h.wsmiddotWidth,5),maxDigitWidth:Math.max(h.maxDigitWidth,5)},!1)),this._writeToCache(b,h)}return this._cache.get(b)}static createRequest(b,h,c,p){const E=new F(b,h);return c.push(E),p&&p.push(E),E}static _actualReadConfiguration(b){const h=[],c=[],p=this.createRequest("n",0,h,c),E=this.createRequest("\uFF4D",0,h,null),y=this.createRequest(" ",0,h,c),C=this.createRequest("0",0,h,c),O=this.createRequest("1",0,h,c),k=this.createRequest("2",0,h,c),Y=this.createRequest("3",0,h,c),Q=this.createRequest("4",0,h,c),H=this.createRequest("5",0,h,c),Z=this.createRequest("6",0,h,c),oe=this.createRequest("7",0,h,c),$=this.createRequest("8",0,h,c),te=this.createRequest("9",0,h,c),ne=this.createRequest("\u2192",0,h,c),Ee=this.createRequest("\uFFEB",0,h,null),fe=this.createRequest("\xB7",0,h,c),ee=this.createRequest(String.fromCharCode(11825),0,h,null),ie="|/-_ilm%";for(let Ie=0,Le=ie.length;Ie<Le;Ie++)this.createRequest(ie.charAt(Ie),0,h,c),this.createRequest(ie.charAt(Ie),1,h,c),this.createRequest(ie.charAt(Ie),2,h,c);L(b,h);const U=Math.max(C.width,O.width,k.width,Y.width,Q.width,H.width,Z.width,oe.width,$.width,te.width);let G=b.fontFeatureSettings===A.e.OFF;const J=c[0].width;for(let Ie=1,Le=c.length;G&&Ie<Le;Ie++){const Te=J-c[Ie].width;if(Te<-.001||Te>.001){G=!1;break}}let he=!0;G&&Ee.width!==J&&(he=!1),Ee.width>ne.width&&(he=!1);const xe=f.b()>2e3;return new d.b({zoomLevel:f.d(),pixelRatio:f.a(),fontFamily:b.fontFamily,fontWeight:b.fontWeight,fontSize:b.fontSize,fontFeatureSettings:b.fontFeatureSettings,lineHeight:b.lineHeight,letterSpacing:b.letterSpacing,isMonospace:G,typicalHalfwidthCharacterWidth:p.width,typicalFullwidthCharacterWidth:E.width,canUseHalfwidthRightwardsArrow:he,spaceWidth:y.width,middotWidth:fe.width,wsmiddotWidth:ee.width,maxDigitWidth:U},xe)}}r.INSTANCE=new r;class _ extends m.a{constructor(b,h,c=null,p){super(b,h);this.accessibilityService=p,this._elementSizeObserver=this._register(new v.a(c,h.dimension,()=>this._recomputeOptions())),this._register(r.INSTANCE.onDidChange(()=>this._recomputeOptions())),this._validatedOptions.get(10)&&this._elementSizeObserver.startObserving(),this._register(f.l(E=>this._recomputeOptions())),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions())),this._recomputeOptions()}static applyFontInfoSlow(b,h){b.style.fontFamily=h.getMassagedFontFamily(f.h?A.c.fontFamily:null),b.style.fontWeight=h.fontWeight,b.style.fontSize=h.fontSize+"px",b.style.fontFeatureSettings=h.fontFeatureSettings,b.style.lineHeight=h.lineHeight+"px",b.style.letterSpacing=h.letterSpacing+"px"}static applyFontInfo(b,h){b.setFontFamily(h.getMassagedFontFamily(f.h?A.c.fontFamily:null)),b.setFontWeight(h.fontWeight),b.setFontSize(h.fontSize),b.setFontFeatureSettings(h.fontFeatureSettings),b.setLineHeight(h.lineHeight),b.setLetterSpacing(h.letterSpacing)}observeReferenceElement(b){this._elementSizeObserver.observe(b)}updatePixelRatio(){this._recomputeOptions()}static _getExtraEditorClassName(){let b="";return!f.h&&!f.k&&(b+="no-user-select "),f.h&&(b+="no-minimap-shadow "),N.f&&(b+="mac "),b}_getEnvConfiguration(){return{extraEditorClassName:_._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:f.j||f.g,pixelRatio:f.a(),zoomLevel:f.d(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}readConfiguration(b){return r.INSTANCE.readConfiguration(b)}}},HgMQ:function(mt,M,t){},HpOR:function(mt,M,t){"use strict";(function(f){t.d(M,"a",function(){return N}),t.d(M,"b",function(){return A}),t.d(M,"e",function(){return F}),t.d(M,"c",function(){return I}),t.d(M,"f",function(){return L}),t.d(M,"d",function(){return v}),t.d(M,"g",function(){return m});const B=typeof f!="undefined";let x;class N{constructor(d){this.buffer=d,this.byteLength=this.buffer.byteLength}static wrap(d){return B&&!f.isBuffer(d)&&(d=f.from(d.buffer,d.byteOffset,d.byteLength)),new N(d)}toString(){return B?this.buffer.toString():(x||(x=new TextDecoder),x.decode(this.buffer))}}function A(d,D){return d[D+0]<<0>>>0|d[D+1]<<8>>>0}function F(d,D,S){d[S+0]=D&255,D=D>>>8,d[S+1]=D&255}function I(d,D){return d[D]*Math.pow(2,24)+d[D+1]*Math.pow(2,16)+d[D+2]*Math.pow(2,8)+d[D+3]}function L(d,D,S){d[S+3]=D,D=D>>>8,d[S+2]=D,D=D>>>8,d[S+1]=D,D=D>>>8,d[S]=D}function v(d,D){return d[D]}function m(d,D,S){d[S]=D}}).call(this,t("HDXh").Buffer)},HyZH:function(mt,M,t){},"I/Lx":function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:function(){return t.e(328).then(t.bind(null,"yswY"))}})},"J+ZK":function(mt,M,t){},"JQT/":function(mt,M,t){"use strict";t.d(M,"a",function(){return x}),t.d(M,"b",function(){return A});var f=t("MI8n");const B=Object.freeze(function(F,I){const L=setTimeout(F.bind(I),0);return{dispose(){clearTimeout(L)}}});var x;(function(F){function I(L){return L===F.None||L===F.Cancelled||L instanceof N?!0:!L||typeof L!="object"?!1:typeof L.isCancellationRequested=="boolean"&&typeof L.onCancellationRequested=="function"}F.isCancellationToken=I,F.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:f.c.None}),F.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:B})})(x||(x={}));class N{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?B:(this._emitter||(this._emitter=new f.b),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class A{constructor(F){this._token=void 0,this._parentListener=void 0,this._parentListener=F&&F.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new N),this._token}cancel(){this._token?this._token instanceof N&&this._token.cancel():this._token=x.Cancelled}dispose(F=!1){F&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof N&&this._token.dispose():this._token=x.None}}},JlLP:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:function(){return t.e(349).then(t.bind(null,"W1QP"))}})},KDc4:function(mt,M,t){"use strict";t.d(M,"b",function(){return f}),t.d(M,"c",function(){return B}),t.d(M,"a",function(){return x});var f;(function(A){A[A.None=0]="None",A[A.Indent=1]="Indent",A[A.IndentOutdent=2]="IndentOutdent",A[A.Outdent=3]="Outdent"})(f||(f={}));class B{constructor(A){if(this._standardAutoClosingPairConditionalBrand=void 0,this.open=A.open,this.close=A.close,this._standardTokenMask=0,Array.isArray(A.notIn))for(let F=0,I=A.notIn.length;F<I;F++){const L=A.notIn[F];switch(L){case"string":this._standardTokenMask|=2;break;case"comment":this._standardTokenMask|=1;break;case"regex":this._standardTokenMask|=4;break}}}isOK(A){return(this._standardTokenMask&A)===0}}class x{constructor(A){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const F of A)N(this.autoClosingPairsOpenByStart,F.open.charAt(0),F),N(this.autoClosingPairsOpenByEnd,F.open.charAt(F.open.length-1),F),N(this.autoClosingPairsCloseByStart,F.close.charAt(0),F),N(this.autoClosingPairsCloseByEnd,F.close.charAt(F.close.length-1),F),F.close.length===1&&F.open.length===1&&N(this.autoClosingPairsCloseSingleChar,F.close,F)}}function N(A,F,I){A.has(F)?A.get(F).push(I):A.set(F,[I])}},KTWA:function(mt,M,t){"use strict";t.r(M);var f=t("sswD"),B=t("wQH0"),x=t("aokT"),N=t("gCVg");class A{constructor(m,d){this._selection=m,this._isMovingLeft=d}getEditOperations(m,d){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const D=this._selection.startLineNumber,S=this._selection.startColumn,r=this._selection.endColumn;if(this._isMovingLeft&&S===1)return;if(!this._isMovingLeft&&r===m.getLineMaxColumn(D))return;if(this._isMovingLeft){const _=new x.a(D,S-1,D,S),b=m.getValueInRange(_);d.addEditOperation(_,null),d.addEditOperation(new x.a(D,r,D,r),b)}else{const _=new x.a(D,r,D,r+1),b=m.getValueInRange(_);d.addEditOperation(_,null),d.addEditOperation(new x.a(D,S,D,S),b)}}computeCursorState(m,d){return this._isMovingLeft?new N.a(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new N.a(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}var F=t("3/fG");class I extends f.b{constructor(m,d){super(d);this.left=m}run(m,d){if(!d.hasModel())return;let D=[],S=d.getSelections();for(const r of S)D.push(new A(r,this.left));d.pushUndoStop(),d.executeCommands(this.id,D),d.pushUndoStop()}}class L extends I{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:F.a("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:B.a.writable})}}class v extends I{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:F.a("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:B.a.writable})}}Object(f.j)(L),Object(f.j)(v)},KaET:function(mt,M,t){},KgQ1:function(mt,M,t){},Krc3:function(mt,M,t){},LCkn:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"c",function(){return x}),t.d(M,"e",function(){return N}),t.d(M,"d",function(){return A}),t.d(M,"b",function(){return F});var f=t("gCVg");class B{constructor(I,L,v=!1){this._range=I,this._text=L,this.insertsAutoWhitespace=v}getEditOperations(I,L){L.addTrackedEditOperation(this._range,this._text)}computeCursorState(I,L){let v=L.getInverseEditOperations(),m=v[0].range;return new f.a(m.endLineNumber,m.endColumn,m.endLineNumber,m.endColumn)}}class x{constructor(I,L){this._range=I,this._text=L}getEditOperations(I,L){L.addTrackedEditOperation(this._range,this._text)}computeCursorState(I,L){const v=L.getInverseEditOperations(),m=v[0].range;return new f.a(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn)}}class N{constructor(I,L,v=!1){this._range=I,this._text=L,this.insertsAutoWhitespace=v}getEditOperations(I,L){L.addTrackedEditOperation(this._range,this._text)}computeCursorState(I,L){let v=L.getInverseEditOperations(),m=v[0].range;return new f.a(m.startLineNumber,m.startColumn,m.startLineNumber,m.startColumn)}}class A{constructor(I,L,v,m,d=!1){this._range=I,this._text=L,this._columnDeltaOffset=m,this._lineNumberDeltaOffset=v,this.insertsAutoWhitespace=d}getEditOperations(I,L){L.addTrackedEditOperation(this._range,this._text)}computeCursorState(I,L){let v=L.getInverseEditOperations(),m=v[0].range;return new f.a(m.endLineNumber+this._lineNumberDeltaOffset,m.endColumn+this._columnDeltaOffset,m.endLineNumber+this._lineNumberDeltaOffset,m.endColumn+this._columnDeltaOffset)}}class F{constructor(I,L,v,m=!1){this._range=I,this._text=L,this._initialSelection=v,this._forceMoveMarkers=m,this._selectionId=null}getEditOperations(I,L){L.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=L.trackSelection(this._initialSelection)}computeCursorState(I,L){return L.getTrackedSelection(this._selectionId)}}},LRks:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:function(){return t.e(368).then(t.bind(null,"05+/"))}})},LUcL:function(mt,M,t){"use strict";t.r(M),t.d(M,"DeleteWordPartLeft",function(){return I}),t.d(M,"DeleteWordPartRight",function(){return L}),t.d(M,"WordPartLeftCommand",function(){return v}),t.d(M,"CursorWordPartLeft",function(){return m}),t.d(M,"CursorWordPartLeftSelect",function(){return d}),t.d(M,"WordPartRightCommand",function(){return D}),t.d(M,"CursorWordPartRight",function(){return S}),t.d(M,"CursorWordPartRightSelect",function(){return r});var f=t("sswD"),B=t("1I1M"),x=t("aokT"),N=t("wQH0"),A=t("s7Km"),F=t("nnTU");class I extends A.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:N.a.writable,kbOpts:{kbExpr:N.a.textInputFocus,primary:0,mac:{primary:256|512|1},weight:100}})}_delete(_,b){let h=B.b.deleteWordPartLeft(_);return h||new x.a(1,1,1,1)}}class L extends A.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:N.a.writable,kbOpts:{kbExpr:N.a.textInputFocus,primary:0,mac:{primary:256|512|20},weight:100}})}_delete(_,b){let h=B.b.deleteWordPartRight(_);if(h)return h;const c=_.model.getLineCount(),p=_.model.getLineMaxColumn(c);return new x.a(c,p,c,p)}}class v extends A.MoveWordCommand{_move(_,b,h,c){return B.b.moveWordPartLeft(_,b,h)}}class m extends v{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:N.a.textInputFocus,primary:0,mac:{primary:256|512|15},weight:100}})}}F.a.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class d extends v{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:N.a.textInputFocus,primary:0,mac:{primary:256|512|1024|15},weight:100}})}}F.a.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class D extends A.MoveWordCommand{_move(_,b,h,c){return B.b.moveWordPartRight(_,b,h)}}class S extends D{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:N.a.textInputFocus,primary:0,mac:{primary:256|512|17},weight:100}})}}class r extends D{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:N.a.textInputFocus,primary:0,mac:{primary:256|512|1024|17},weight:100}})}}Object(f.k)(new I),Object(f.k)(new L),Object(f.k)(new m),Object(f.k)(new d),Object(f.k)(new S),Object(f.k)(new r)},"LeU+":function(mt,M,t){"use strict";t.d(M,"b",function(){return B}),t.d(M,"a",function(){return x});var f=t("CZ1j");class B{constructor(N,A){this._prefixSumIndexOfResultBrand=void 0,this.index=N,this.remainder=A}}class x{constructor(N){this.values=N,this.prefixSum=new Uint32Array(N.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(N,A){N=Object(f.a)(N);const F=this.values,I=this.prefixSum,L=A.length;return L===0?!1:(this.values=new Uint32Array(F.length+L),this.values.set(F.subarray(0,N),0),this.values.set(F.subarray(N),N+L),this.values.set(A,N),N-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=N-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(I.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(N,A){return N=Object(f.a)(N),A=Object(f.a)(A),this.values[N]===A?!1:(this.values[N]=A,N-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=N-1),!0)}removeValues(N,A){N=Object(f.a)(N),A=Object(f.a)(A);const F=this.values,I=this.prefixSum;if(N>=F.length)return!1;let L=F.length-N;return A>=L&&(A=L),A===0?!1:(this.values=new Uint32Array(F.length-A),this.values.set(F.subarray(0,N),0),this.values.set(F.subarray(N+A),N),this.prefixSum=new Uint32Array(this.values.length),N-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=N-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(I.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(N){return N<0?0:(N=Object(f.a)(N),this._getPrefixSum(N))}_getPrefixSum(N){if(N<=this.prefixSumValidIndex[0])return this.prefixSum[N];let A=this.prefixSumValidIndex[0]+1;A===0&&(this.prefixSum[0]=this.values[0],A++),N>=this.values.length&&(N=this.values.length-1);for(let F=A;F<=N;F++)this.prefixSum[F]=this.prefixSum[F-1]+this.values[F];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],N),this.prefixSum[N]}getIndexOf(N){N=Math.floor(N),this.getTotalSum();let A=0,F=this.values.length-1,I=0,L=0,v=0;for(;A<=F;)if(I=A+(F-A)/2|0,L=this.prefixSum[I],v=L-this.values[I],N<v)F=I-1;else if(N>=L)A=I+1;else break;return new B(I,N-v)}}},LexI:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"go",extensions:[".go"],aliases:["Go"],loader:function(){return t.e(329).then(t.bind(null,"lHAa"))}})},Lkt1:function(mt,M,t){"use strict";t.r(M),t.d(M,"StandaloneCommandsQuickAccessProvider",function(){return Te}),t.d(M,"GotoLineAction",function(){return ze});var f=t("ic2d"),B=t("Lx4V"),x=t("A9l+"),N=t("Vxe3"),A=t("EJc0"),F=t("6OMU"),I=t("746U"),L=t("3/fG");function v(ue,je){return je&&(ue.stack||ue.stacktrace)?L.a("stackTrace.format","{0}: {1}",d(ue),m(ue.stack)||m(ue.stacktrace)):d(ue)}function m(ue){return Array.isArray(ue)?ue.join(`
|
|
|
`):ue}function d(ue){return typeof ue.code=="string"&&typeof ue.errno=="number"&&typeof ue.syscall=="string"?L.a("nodeExceptionMessage","A system error occurred ({0})",ue.message):ue.message||L.a("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function D(ue=null,je=!1){if(!ue)return L.a("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(ue)){const Pe=F.e(ue),ve=D(Pe[0],je);return Pe.length>1?L.a("error.moreErrors","{0} ({1} errors in total)",ve,Pe.length):ve}if(I.l(ue))return ue;if(ue.detail){const Pe=ue.detail;if(Pe.error)return v(Pe.error,je);if(Pe.exception)return v(Pe.exception,je)}return ue.stack?v(ue,je):ue.message?ue.message:L.a("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var S=t("/cxE"),r=t("fpMC"),_=t("pmY6"),b=t("QDVR"),h=t("S3by"),c=t("nnTU"),p=t("+7oY"),E=t("6vuP"),y=t("Cg/j"),C=t("bexQ"),O=t("X+cX"),k=t("JQT/"),Y=function(ue,je,Pe,ve){function ce(le){return le instanceof Pe?le:new Pe(function(Ce){Ce(le)})}return new(Pe||(Pe=Promise))(function(le,Ce){function ye(De){try{Me(ve.next(De))}catch(we){Ce(we)}}function ge(De){try{Me(ve.throw(De))}catch(we){Ce(we)}}function Me(De){De.done?le(De.value):ce(De.value).then(ye,ge)}Me((ve=ve.apply(ue,je||[])).next())})},Q;(function(ue){ue[ue.NO_ACTION=0]="NO_ACTION",ue[ue.CLOSE_PICKER=1]="CLOSE_PICKER",ue[ue.REFRESH_PICKER=2]="REFRESH_PICKER",ue[ue.REMOVE_ITEM=3]="REMOVE_ITEM"})(Q||(Q={}));function H(ue){const je=ue;return Array.isArray(je.items)}function Z(ue){const je=ue;return!!je.picks&&je.additionalPicks instanceof Promise}class oe extends _.a{constructor(ue,je){super();this.prefix=ue,this.options=je}provide(ue,je){var Pe;const ve=new _.b;ue.canAcceptInBackground=!!((Pe=this.options)===null||Pe===void 0?void 0:Pe.canAcceptInBackground),ue.matchOnLabel=ue.matchOnDescription=ue.matchOnDetail=ue.sortByLabel=!1;let ce;const le=ve.add(new _.d),Ce=()=>Y(this,void 0,void 0,function*(){const ye=le.value=new _.b;ce==null||ce.dispose(!0),ue.busy=!1,ce=new k.b(je);const ge=ce.token,Me=ue.value.substr(this.prefix.length).trim(),De=this._getPicks(Me,ye,ge),we=(Oe,nt)=>{var Ke;let et,bt;if(H(Oe)?(et=Oe.items,bt=Oe.active):et=Oe,et.length===0){if(nt)return!1;Me.length>0&&((Ke=this.options)===null||Ke===void 0?void 0:Ke.noResultsPick)&&(et=[this.options.noResultsPick])}return ue.items=et,bt&&(ue.activeItems=[bt]),!0};if(!(De===null))if(Z(De)){let Oe=!1,nt=!1;yield Promise.all([(()=>Y(this,void 0,void 0,function*(){if(yield Object(O.n)(oe.FAST_PICKS_RACE_DELAY),ge.isCancellationRequested)return;nt||(Oe=we(De.picks,!0))}))(),(()=>Y(this,void 0,void 0,function*(){ue.busy=!0;try{const Ke=yield De.additionalPicks;if(ge.isCancellationRequested)return;let et,bt;H(De.picks)?(et=De.picks.items,bt=De.picks.active):et=De.picks;let Tt,$t;if(H(Ke)?(Tt=Ke.items,$t=Ke.active):Tt=Ke,Tt.length>0||!Oe){let Xe;if(!bt&&!$t){const it=ue.activeItems[0];it&&et.indexOf(it)!==-1&&(Xe=it)}we({items:[...et,...Tt],active:bt||$t||Xe})}}finally{ge.isCancellationRequested||(ue.busy=!1),nt=!0}}))()])}else if(!(De instanceof Promise))we(De);else{ue.busy=!0;try{const Oe=yield De;if(ge.isCancellationRequested)return;we(Oe)}finally{ge.isCancellationRequested||(ue.busy=!1)}}});return ve.add(ue.onDidChangeValue(()=>Ce())),Ce(),ve.add(ue.onDidAccept(ye=>{const[ge]=ue.selectedItems;typeof(ge==null?void 0:ge.accept)=="function"&&(ye.inBackground||ue.hide(),ge.accept(ue.keyMods,ye))})),ve.add(ue.onDidTriggerItemButton(({button:ye,item:ge})=>Y(this,void 0,void 0,function*(){var Me,De;if(typeof ge.trigger=="function"){const we=(De=(Me=ge.buttons)===null||Me===void 0?void 0:Me.indexOf(ye))!==null&&De!==void 0?De:-1;if(we>=0){const Oe=ge.trigger(we,ue.keyMods),nt=typeof Oe=="number"?Oe:yield Oe;if(je.isCancellationRequested)return;switch(nt){case Q.NO_ACTION:break;case Q.CLOSE_PICKER:ue.hide();break;case Q.REFRESH_PICKER:Ce();break;case Q.REMOVE_ITEM:const Ke=ue.items.indexOf(ge);if(Ke!==-1){const et=ue.items.slice(),bt=et.splice(Ke,1),Tt=ue.activeItems.filter(Xe=>Xe!==bt[0]),$t=ue.keepScrollPosition;ue.keepScrollPosition=!0,ue.items=et,Tt&&(ue.activeItems=Tt),ue.keepScrollPosition=$t}break}}}}))),ve}}oe.FAST_PICKS_RACE_DELAY=200;var $=t("A+jI"),te=t("XXUj"),ne=function(ue,je,Pe,ve){var ce=arguments.length,le=ce<3?je:ve===null?ve=Object.getOwnPropertyDescriptor(je,Pe):ve,Ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")le=Reflect.decorate(ue,je,Pe,ve);else for(var ye=ue.length-1;ye>=0;ye--)(Ce=ue[ye])&&(le=(ce<3?Ce(le):ce>3?Ce(je,Pe,le):Ce(je,Pe))||le);return ce>3&&le&&Object.defineProperty(je,Pe,le),le},Ee=function(ue,je){return function(Pe,ve){je(Pe,ve,ue)}},fe=function(ue,je,Pe,ve){function ce(le){return le instanceof Pe?le:new Pe(function(Ce){Ce(le)})}return new(Pe||(Pe=Promise))(function(le,Ce){function ye(De){try{Me(ve.next(De))}catch(we){Ce(we)}}function ge(De){try{Me(ve.throw(De))}catch(we){Ce(we)}}function Me(De){De.done?le(De.value):ce(De.value).then(ye,ge)}Me((ve=ve.apply(ue,je||[])).next())})};let ee=class ue extends oe{constructor(je,Pe,ve,ce,le,Ce){super(ue.PREFIX,je);this.instantiationService=Pe,this.keybindingService=ve,this.commandService=ce,this.telemetryService=le,this.dialogService=Ce,this.commandsHistory=this._register(this.instantiationService.createInstance(ie)),this.options=je}_getPicks(je,Pe,ve){return fe(this,void 0,void 0,function*(){const ce=yield this.getCommandPicks(Pe,ve);if(ve.isCancellationRequested)return[];const le=[];for(const Me of ce){const De=Object(I.p)(ue.WORD_FILTER(je,Me.label)),we=Me.commandAlias?Object(I.p)(ue.WORD_FILTER(je,Me.commandAlias)):void 0;De||we?(Me.highlights={label:De,detail:this.options.showAlias?we:void 0},le.push(Me)):je===Me.commandId&&le.push(Me)}const Ce=new Map;for(const Me of le){const De=Ce.get(Me.label);De?(Me.description=Me.commandId,De.description=De.commandId):Ce.set(Me.label,Me)}le.sort((Me,De)=>{const we=this.commandsHistory.peek(Me.commandId),Oe=this.commandsHistory.peek(De.commandId);return we&&Oe?we>Oe?-1:1:we?-1:Oe?1:Me.label.localeCompare(De.label)});const ye=[];let ge=!1;for(let Me=0;Me<le.length;Me++){const De=le[Me],we=this.keybindingService.lookupKeybinding(De.commandId),Oe=we?Object(L.a)("commandPickAriaLabelWithKeybinding","{0}, {1}",De.label,we.getAriaLabel()):De.label;Me===0&&this.commandsHistory.peek(De.commandId)&&(ye.push({type:"separator",label:Object(L.a)("recentlyUsed","recently used")}),ge=!0),Me!==0&&ge&&!this.commandsHistory.peek(De.commandId)&&(ye.push({type:"separator",label:Object(L.a)("morecCommands","other commands")}),ge=!1),ye.push(Object.assign(Object.assign({},De),{ariaLabel:Oe,detail:this.options.showAlias&&De.commandAlias!==De.label?De.commandAlias:void 0,keybinding:we,accept:()=>fe(this,void 0,void 0,function*(){this.commandsHistory.push(De.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:De.commandId,from:"quick open"});try{yield this.commandService.executeCommand(De.commandId)}catch(nt){Object(S.e)(nt)||this.dialogService.show(h.a.Error,Object(L.a)("canNotRun","Command '{0}' resulted in an error ({1})",De.label,D(nt)))}})}))}return ye})}};ee.PREFIX=">",ee.WORD_FILTER=Object(r.j)(r.h,r.i,r.f),ee=ne([Ee(1,y.a),Ee(2,C.a),Ee(3,c.b),Ee(4,te.a),Ee(5,E.a)],ee);let ie=class ue extends _.a{constructor(je,Pe){super();this.storageService=je,this.configurationService=Pe,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=ue.getConfiguredCommandHistoryLength(this.configurationService),ue.cache&&ue.cache.limit!==this.configuredCommandsHistoryLength&&(ue.cache.limit=this.configuredCommandsHistoryLength,ue.saveState(this.storageService))}load(){const je=this.storageService.get(ue.PREF_KEY_CACHE,0);let Pe;if(je)try{Pe=JSON.parse(je)}catch(ce){}const ve=ue.cache=new b.a(this.configuredCommandsHistoryLength,1);if(Pe){let ce;Pe.usesLRU?ce=Pe.entries:ce=Pe.entries.sort((le,Ce)=>le.value-Ce.value),ce.forEach(le=>ve.set(le.key,le.value))}ue.counter=this.storageService.getNumber(ue.PREF_KEY_COUNTER,0,ue.counter)}push(je){if(!ue.cache)return;ue.cache.set(je,ue.counter++),ue.saveState(this.storageService)}peek(je){var Pe;return(Pe=ue.cache)===null||Pe===void 0?void 0:Pe.peek(je)}static saveState(je){if(!ue.cache)return;const Pe={usesLRU:!0,entries:[]};ue.cache.forEach((ve,ce)=>Pe.entries.push({key:ce,value:ve})),je.store(ue.PREF_KEY_CACHE,JSON.stringify(Pe),0,0),je.store(ue.PREF_KEY_COUNTER,ue.counter,0,0)}static getConfiguredCommandHistoryLength(je){var Pe,ve;const ce=je.getValue(),le=(ve=(Pe=ce.workbench)===null||Pe===void 0?void 0:Pe.commandPalette)===null||ve===void 0?void 0:ve.history;return typeof le=="number"?le:ue.DEFAULT_COMMANDS_HISTORY_LENGTH}};ie.DEFAULT_COMMANDS_HISTORY_LENGTH=50,ie.PREF_KEY_CACHE="commandPalette.mru.cache",ie.PREF_KEY_COUNTER="commandPalette.mru.counter",ie.counter=1,ie=ne([Ee(0,$.a),Ee(1,p.a)],ie);class U extends ee{constructor(ue,je,Pe,ve,ce,le){super(ue,je,Pe,ve,ce,le)}getCodeEditorCommandPicks(){const ue=this.activeTextEditorControl;if(!ue)return[];const je=[];for(const Pe of ue.getSupportedActions())je.push({commandId:Pe.id,commandAlias:Pe.alias,label:Object(A.e)(Pe.label)||Pe.id});return je}}var G=t("sswD"),J=t("wQH0"),he=t("Zr1c"),xe=function(ue,je,Pe,ve){var ce=arguments.length,le=ce<3?je:ve===null?ve=Object.getOwnPropertyDescriptor(je,Pe):ve,Ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")le=Reflect.decorate(ue,je,Pe,ve);else for(var ye=ue.length-1;ye>=0;ye--)(Ce=ue[ye])&&(le=(ce<3?Ce(le):ce>3?Ce(je,Pe,le):Ce(je,Pe))||le);return ce>3&&le&&Object.defineProperty(je,Pe,le),le},Ie=function(ue,je){return function(Pe,ve){je(Pe,ve,ue)}},Le=function(ue,je,Pe,ve){function ce(le){return le instanceof Pe?le:new Pe(function(Ce){Ce(le)})}return new(Pe||(Pe=Promise))(function(le,Ce){function ye(De){try{Me(ve.next(De))}catch(we){Ce(we)}}function ge(De){try{Me(ve.throw(De))}catch(we){Ce(we)}}function Me(De){De.done?le(De.value):ce(De.value).then(ye,ge)}Me((ve=ve.apply(ue,je||[])).next())})};let Te=class extends U{constructor(je,Pe,ve,ce,le,Ce){super({showAlias:!1},je,ve,ce,le,Ce);this.codeEditorService=Pe}get activeTextEditorControl(){return Object(I.p)(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return Le(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}};Te=xe([Ie(0,y.a),Ie(1,N.a),Ie(2,C.a),Ie(3,c.b),Ie(4,te.a),Ie(5,E.a)],Te),f.a.as(B.b.Quickaccess).registerQuickAccessProvider({ctor:Te,prefix:Te.PREFIX,helpEntries:[{description:x.d.quickCommandHelp,needsEditor:!0}]});class ze extends G.b{constructor(){super({id:"editor.action.quickCommand",label:x.d.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:J.a.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(ue){ue.get(he.a).quickAccess.show(Te.PREFIX)}}Object(G.j)(ze)},Ll0s:function(mt,M,t){"use strict";t.d(M,"b",function(){return d}),t.d(M,"f",function(){return D}),t.d(M,"c",function(){return S}),t.d(M,"d",function(){return b}),t.d(M,"e",function(){return h}),t.d(M,"g",function(){return c});var f=t("/cxE"),B=t("cGHE"),x=t("aokT"),N=t("gCVg"),A=t("tX9W"),F=t("cMvZ"),I=t("Apug");t.d(M,"a",function(){return I.a});const L=()=>!0,v=()=>!1,m=p=>p===" "||p===" ";class d{constructor(p,E,y){this._cursorMoveConfigurationBrand=void 0,this._languageId=p;const C=y.options,O=C.get(129);this.readOnly=C.get(80),this.tabSize=E.tabSize,this.indentSize=E.indentSize,this.insertSpaces=E.insertSpaces,this.stickyTabStops=C.get(103),this.lineHeight=C.get(58),this.pageSize=Math.max(1,Math.floor(O.height/this.lineHeight)-2),this.useTabStops=C.get(114),this.wordSeparators=C.get(115),this.emptySelectionClipboard=C.get(32),this.copyWithSyntaxHighlighting=C.get(21),this.multiCursorMergeOverlapping=C.get(68),this.multiCursorPaste=C.get(70),this.autoClosingBrackets=C.get(5),this.autoClosingQuotes=C.get(8),this.autoClosingDelete=C.get(6),this.autoClosingOvertype=C.get(7),this.autoSurround=C.get(11),this.autoIndent=C.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:d._getShouldAutoClose(p,this.autoClosingQuotes),bracket:d._getShouldAutoClose(p,this.autoClosingBrackets)},this.autoClosingPairs=F.b.getAutoClosingPairs(p);let k=d._getSurroundingPairs(p);if(k)for(const Y of k)this.surroundingPairs[Y.open]=Y.close}static shouldRecreate(p){return p.hasChanged(129)||p.hasChanged(115)||p.hasChanged(32)||p.hasChanged(68)||p.hasChanged(70)||p.hasChanged(5)||p.hasChanged(8)||p.hasChanged(6)||p.hasChanged(7)||p.hasChanged(11)||p.hasChanged(114)||p.hasChanged(58)||p.hasChanged(80)}get electricChars(){if(!this._electricChars){this._electricChars={};let p=d._getElectricCharacters(this._languageId);if(p)for(const E of p)this._electricChars[E]=!0}return this._electricChars}normalizeIndentation(p){return A.c.normalizeIndentation(p,this.indentSize,this.insertSpaces)}static _getElectricCharacters(p){try{return F.b.getElectricCharacters(p)}catch(E){return Object(f.f)(E),null}}static _getShouldAutoClose(p,E){switch(E){case"beforeWhitespace":return m;case"languageDefined":return d._getLanguageDefinedShouldAutoClose(p);case"always":return L;case"never":return v}}static _getLanguageDefinedShouldAutoClose(p){try{const E=F.b.getAutoCloseBeforeSet(p);return y=>E.indexOf(y)!==-1}catch(E){return Object(f.f)(E),v}}static _getSurroundingPairs(p){try{return F.b.getSurroundingPairs(p)}catch(E){return Object(f.f)(E),null}}}class D{constructor(p,E,y,C){this._singleCursorStateBrand=void 0,this.selectionStart=p,this.selectionStartLeftoverVisibleColumns=E,this.position=y,this.leftoverVisibleColumns=C,this.selection=D._computeSelection(this.selectionStart,this.position)}equals(p){return this.selectionStartLeftoverVisibleColumns===p.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===p.leftoverVisibleColumns&&this.position.equals(p.position)&&this.selectionStart.equalsRange(p.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(p,E,y,C){return p?new D(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new B.a(E,y),C):new D(new x.a(E,y,E,y),C,new B.a(E,y),C)}static _computeSelection(p,E){let y,C,O,k;return p.isEmpty()?(y=p.startLineNumber,C=p.startColumn,O=E.lineNumber,k=E.column):E.isBeforeOrEqual(p.getStartPosition())?(y=p.endLineNumber,C=p.endColumn,O=E.lineNumber,k=E.column):(y=p.startLineNumber,C=p.startColumn,O=E.lineNumber,k=E.column),new N.a(y,C,O,k)}}class S{constructor(p,E,y,C){this._cursorContextBrand=void 0,this.model=p,this.viewModel=E,this.coordinatesConverter=y,this.cursorConfig=C}}class r{constructor(p){this.modelState=p,this.viewState=null}}class _{constructor(p){this.modelState=null,this.viewState=p}}class b{constructor(p,E){this._cursorStateBrand=void 0,this.modelState=p,this.viewState=E}static fromModelState(p){return new r(p)}static fromViewState(p){return new _(p)}static fromModelSelection(p){const E=p.selectionStartLineNumber,y=p.selectionStartColumn,C=p.positionLineNumber,O=p.positionColumn,k=new D(new x.a(E,y,E,y),0,new B.a(C,O),0);return b.fromModelState(k)}static fromModelSelections(p){let E=[];for(let y=0,C=p.length;y<C;y++)E[y]=this.fromModelSelection(p[y]);return E}equals(p){return this.viewState.equals(p.viewState)&&this.modelState.equals(p.modelState)}}class h{constructor(p,E,y){this._editOperationResultBrand=void 0,this.type=p,this.commands=E,this.shouldPushStackElementBefore=y.shouldPushStackElementBefore,this.shouldPushStackElementAfter=y.shouldPushStackElementAfter}}function c(p){return p==="'"||p==='"'||p==="`"}},Lx4V:function(mt,M,t){"use strict";t.d(M,"a",function(){return N}),t.d(M,"b",function(){return A});var f=t("6OMU"),B=t("pmY6"),x=t("ic2d"),N;(function(I){I[I.PRESERVE=0]="PRESERVE",I[I.LAST=1]="LAST"})(N||(N={}));const A={Quickaccess:"workbench.contributions.quickaccess"};class F{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(I){return I.prefix.length===0?this.defaultProvider=I:this.providers.push(I),this.providers.sort((L,v)=>v.prefix.length-L.prefix.length),Object(B.i)(()=>{this.providers.splice(this.providers.indexOf(I),1),this.defaultProvider===I&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return Object(f.e)([this.defaultProvider,...this.providers])}getQuickAccessProvider(I){const L=I&&this.providers.find(v=>I.startsWith(v.prefix))||void 0;return L||this.defaultProvider}}x.a.add(A.Quickaccess,new F)},"M/lh":function(mt,M,t){self.MonacoEnvironment=function(f){function B(x){return x.replace(/\/$/,"")}return{globalAPI:!1,getWorkerUrl:function(x,N){var A=t.p,F=(A?B(A)+"/":"")+f[N];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(F)){var I=String(window.location),L=I.substr(0,I.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(F.substring(0,L.length)!==L){/^(\/\/)/.test(F)&&(F=window.location.protocol+F);var v="/*"+N+'*/importScripts("'+F+'");',m=new Blob([v],{type:"application/javascript"});return URL.createObjectURL(m)}}return F}}}({editorWorkerService:"editor.worker.js",css:"css.worker.js",html:"html.worker.js",json:"json.worker.js",typescript:"ts.worker.js",javascript:"ts.worker.js",less:"css.worker.js",scss:"css.worker.js",handlebars:"html.worker.js",razor:"html.worker.js"}),t("SBYE"),t("bk7F"),t("KTWA"),t("w29/"),t("CxEt"),t("d6R0"),t("n01l"),t("fD5p"),t("1YUG"),t("5RaG"),t("/RFl"),t("oQaD"),t("dgXF"),t("bfR1"),t("cIJc"),t("lY/7"),t("MyPo"),t("8Ydt"),t("H4T2"),t("rugR"),t("oiKk"),t("GvMn"),t("gJAb"),t("dH+W"),t("2ESN"),t("8XyJ"),t("WwIK"),t("Lkt1"),t("hFIF"),t("4sI4"),t("Q631"),t("10Fh"),t("tXSY"),t("ep4t"),t("vVA1"),t("k7pc"),t("ba9Q"),t("XtJs"),t("s7Km"),t("LUcL"),mt.exports=t("8z58"),t("CdFp"),t("23p7"),t("OOlL"),t("li8W"),t("kdPm"),t("ApJL"),t("jrbv"),t("gqHg"),t("p3Ex"),t("E+ie"),t("9B1q"),t("9XAT"),t("SvYn"),t("I/Lx"),t("LexI"),t("0oIH"),t("+a1H"),t("hFdI"),t("c2dO"),t("zQEy"),t("k7mE"),t("cldp"),t("p5tG"),t("Dvnd"),t("FvUK"),t("ZvGG"),t("QFiB"),t("ZkA/"),t("/cAr"),t("xYNL"),t("jVwG"),t("6lNC"),t("q8qy"),t("sStQ"),t("oKJv"),t("H6Gb"),t("y3CF"),t("JlLP"),t("j2o1"),t("woZy"),t("iLY9"),t("Msxo"),t("ajgA"),t("QiAa"),t("pI2L"),t("yKqg"),t("ij/i"),t("XQgg"),t("Gb1F"),t("xmOD"),t("c9ML"),t("Mzro"),t("GZrW"),t("1lwE"),t("w9QG"),t("ufhN"),t("LRks"),t("BUKB"),t("n18v"),t("EOst"),t("z3hU"),t("nrBJ"),t("BEdG"),t("E4kL")},M1Kb:function(mt,M,t){"use strict";t.d(M,"g",function(){return B}),t.d(M,"f",function(){return x}),t.d(M,"h",function(){return N}),t.d(M,"b",function(){return A}),t.d(M,"c",function(){return F}),t.d(M,"d",function(){return I}),t.d(M,"e",function(){return L}),t.d(M,"i",function(){return v}),t.d(M,"a",function(){return m});var f=t("qj0h"),B;(function(d){d[d.Left=1]="Left",d[d.Center=2]="Center",d[d.Right=4]="Right",d[d.Full=7]="Full"})(B||(B={}));var x;(function(d){d[d.Inline=1]="Inline",d[d.Gutter=2]="Gutter"})(x||(x={}));class N{constructor(d){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,d.tabSize|0),this.indentSize=d.tabSize|0,this.insertSpaces=Boolean(d.insertSpaces),this.defaultEOL=d.defaultEOL|0,this.trimAutoWhitespace=Boolean(d.trimAutoWhitespace),this.bracketPairColorizationOptions=d.bracketPairColorizationOptions}equals(d){return this.tabSize===d.tabSize&&this.indentSize===d.indentSize&&this.insertSpaces===d.insertSpaces&&this.defaultEOL===d.defaultEOL&&this.trimAutoWhitespace===d.trimAutoWhitespace&&Object(f.d)(this.bracketPairColorizationOptions,d.bracketPairColorizationOptions)}createChangeEvent(d){return{tabSize:this.tabSize!==d.tabSize,indentSize:this.indentSize!==d.indentSize,insertSpaces:this.insertSpaces!==d.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==d.trimAutoWhitespace}}}class A{constructor(d,D){this._findMatchBrand=void 0,this.range=d,this.matches=D}}var F;(function(d){d[d.Disabled=0]="Disabled",d[d.EnabledForActive=1]="EnabledForActive",d[d.Enabled=2]="Enabled"})(F||(F={}));class I{constructor(d,D,S){this.visibleColumn=d,this.className=D,this.horizontalLine=S}}class L{constructor(d,D){this.top=d,this.endColumn=D}}class v{constructor(d,D,S,r,_,b){this.identifier=d,this.range=D,this.text=S,this.forceMoveMarkers=r,this.isAutoWhitespaceEdit=_,this._isTracked=b}}class m{constructor(d,D,S){this.reverseEdits=d,this.changes=D,this.trimAutoWhitespaceLineNumbers=S}}},M46C:function(mt,M,t){"use strict";t.d(M,"f",function(){return f}),t.d(M,"b",function(){return B}),t.d(M,"g",function(){return x}),t.d(M,"h",function(){return N}),t.d(M,"i",function(){return A}),t.d(M,"e",function(){return F}),t.d(M,"d",function(){return I}),t.d(M,"c",function(){return L}),t.d(M,"a",function(){return v});class f{constructor(){this.changeType=1}}class B{constructor(m,d,D,S,r){this.ownerId=m,this.lineNumber=d,this.column=D,this.options=S,this.order=r}static applyInjectedText(m,d){if(!d||d.length===0)return m;let D="",S=0;for(const r of d)D+=m.substring(S,r.column-1),S=r.column-1,D+=r.options.content;return D+=m.substring(S),D}static fromDecorations(m){const d=[];for(const D of m)D.options.before&&D.options.before.content.length>0&&d.push(new B(D.ownerId,D.range.startLineNumber,D.range.startColumn,D.options.before,0)),D.options.after&&D.options.after.content.length>0&&d.push(new B(D.ownerId,D.range.endLineNumber,D.range.endColumn,D.options.after,1));return d.sort((D,S)=>D.lineNumber===S.lineNumber?D.column===S.column?D.order-S.order:D.column-S.column:D.lineNumber-S.lineNumber),d}}class x{constructor(m,d,D){this.changeType=2,this.lineNumber=m,this.detail=d,this.injectedText=D}}class N{constructor(m,d){this.changeType=3,this.fromLineNumber=m,this.toLineNumber=d}}class A{constructor(m,d,D,S){this.changeType=4,this.injectedTexts=S,this.fromLineNumber=m,this.toLineNumber=d,this.detail=D}}class F{constructor(){this.changeType=5}}class I{constructor(m,d,D,S){this.changes=m,this.versionId=d,this.isUndoing=D,this.isRedoing=S,this.resultingSelection=null}containsEvent(m){for(let d=0,D=this.changes.length;d<D;d++){const S=this.changes[d];if(S.changeType===m)return!0}return!1}static merge(m,d){const D=[].concat(m.changes).concat(d.changes),S=d.versionId,r=m.isUndoing||d.isUndoing,_=m.isRedoing||d.isRedoing;return new I(D,S,r,_)}}class L{constructor(m){this.changes=m}}class v{constructor(m,d){this.rawContentChangedEvent=m,this.contentChangedEvent=d}merge(m){const d=I.merge(this.rawContentChangedEvent,m.rawContentChangedEvent),D=v._mergeChangeEvents(this.contentChangedEvent,m.contentChangedEvent);return new v(d,D)}static _mergeChangeEvents(m,d){const D=[].concat(m.changes).concat(d.changes),S=d.eol,r=d.versionId,_=m.isUndoing||d.isUndoing,b=m.isRedoing||d.isRedoing,h=m.isFlush||d.isFlush;return{changes:D,eol:S,versionId:r,isUndoing:_,isRedoing:b,isFlush:h}}}},MD5Z:function(mt,M,t){"use strict";t.d(M,"a",function(){return L}),t.d(M,"wc",function(){return d}),t.d(M,"cb",function(){return D}),t.d(M,"ab",function(){return S}),t.d(M,"db",function(){return r}),t.d(M,"bb",function(){return _}),t.d(M,"h",function(){return b}),t.d(M,"b",function(){return h}),t.d(M,"Jc",function(){return c}),t.d(M,"Ic",function(){return p}),t.d(M,"Hc",function(){return E}),t.d(M,"Nc",function(){return y}),t.d(M,"hb",function(){return C}),t.d(M,"jb",function(){return O}),t.d(M,"ib",function(){return k}),t.d(M,"fb",function(){return Y}),t.d(M,"eb",function(){return Q}),t.d(M,"gb",function(){return H}),t.d(M,"nb",function(){return Z}),t.d(M,"pb",function(){return oe}),t.d(M,"ob",function(){return $}),t.d(M,"qb",function(){return te}),t.d(M,"sb",function(){return ne}),t.d(M,"rb",function(){return Ee}),t.d(M,"kb",function(){return fe}),t.d(M,"mb",function(){return ee}),t.d(M,"lb",function(){return ie}),t.d(M,"f",function(){return J}),t.d(M,"e",function(){return he}),t.d(M,"g",function(){return xe}),t.d(M,"c",function(){return Ie}),t.d(M,"d",function(){return Le}),t.d(M,"yc",function(){return Te}),t.d(M,"Ac",function(){return ze}),t.d(M,"Bc",function(){return ue}),t.d(M,"zc",function(){return je}),t.d(M,"pc",function(){return Pe}),t.d(M,"s",function(){return ve}),t.d(M,"u",function(){return ce}),t.d(M,"t",function(){return le}),t.d(M,"T",function(){return Ce}),t.d(M,"V",function(){return ye}),t.d(M,"U",function(){return ge}),t.d(M,"K",function(){return Me}),t.d(M,"M",function(){return De}),t.d(M,"L",function(){return we}),t.d(M,"D",function(){return Oe}),t.d(M,"C",function(){return nt}),t.d(M,"r",function(){return Ke}),t.d(M,"B",function(){return et}),t.d(M,"W",function(){return bt}),t.d(M,"Y",function(){return Tt}),t.d(M,"X",function(){return $t}),t.d(M,"Z",function(){return Xe}),t.d(M,"qc",function(){return it}),t.d(M,"rc",function(){return re}),t.d(M,"vc",function(){return We}),t.d(M,"lc",function(){return tt}),t.d(M,"kc",function(){return Et}),t.d(M,"tb",function(){return It}),t.d(M,"wb",function(){return Rt}),t.d(M,"ub",function(){return vo}),t.d(M,"vb",function(){return Mo}),t.d(M,"P",function(){return xo}),t.d(M,"Q",function(){return Do}),t.d(M,"J",function(){return Lo}),t.d(M,"R",function(){return To}),t.d(M,"S",function(){return Ht}),t.d(M,"v",function(){return Mt}),t.d(M,"x",function(){return Ue}),t.d(M,"z",function(){return dt}),t.d(M,"w",function(){return Ut}),t.d(M,"y",function(){return Ye}),t.d(M,"A",function(){return qe}),t.d(M,"H",function(){return ct}),t.d(M,"E",function(){return _t}),t.d(M,"G",function(){return Pt}),t.d(M,"F",function(){return Wt}),t.d(M,"I",function(){return Vt}),t.d(M,"q",function(){return so}),t.d(M,"O",function(){return xt}),t.d(M,"N",function(){return Nt}),t.d(M,"i",function(){return rt}),t.d(M,"j",function(){return lt}),t.d(M,"m",function(){return pt}),t.d(M,"o",function(){return St}),t.d(M,"n",function(){return Qt}),t.d(M,"p",function(){return bo}),t.d(M,"k",function(){return qt}),t.d(M,"l",function(){return Eo}),t.d(M,"Eb",function(){return Ro}),t.d(M,"Fb",function(){return zo}),t.d(M,"Hb",function(){return Bo}),t.d(M,"xb",function(){return Jt}),t.d(M,"yb",function(){return fo}),t.d(M,"zb",function(){return ri}),t.d(M,"Nb",function(){return Zo}),t.d(M,"Ob",function(){return ci}),t.d(M,"Pb",function(){return ki}),t.d(M,"Lb",function(){return wi}),t.d(M,"Mb",function(){return Zi}),t.d(M,"Jb",function(){return Vi}),t.d(M,"Kb",function(){return vi}),t.d(M,"Ab",function(){return sn}),t.d(M,"Ib",function(){return en}),t.d(M,"Gb",function(){return on}),t.d(M,"Bb",function(){return cn}),t.d(M,"Db",function(){return Bi}),t.d(M,"Cb",function(){return zi}),t.d(M,"Mc",function(){return Ji}),t.d(M,"Gc",function(){return ui}),t.d(M,"tc",function(){return Hi}),t.d(M,"uc",function(){return Oi}),t.d(M,"sc",function(){return Ii}),t.d(M,"Rb",function(){return Qi}),t.d(M,"Sb",function(){return Li}),t.d(M,"Qb",function(){return Ui}),t.d(M,"Vb",function(){return fi}),t.d(M,"Tb",function(){return $i}),t.d(M,"Ub",function(){return rn}),t.d(M,"Wb",function(){return _i}),t.d(M,"Kc",function(){return Pi}),t.d(M,"Ec",function(){return ht}),t.d(M,"Fc",function(){return Ve}),t.d(M,"Cc",function(){return K}),t.d(M,"Dc",function(){return be}),t.d(M,"ic",function(){return Re}),t.d(M,"jc",function(){return Be}),t.d(M,"Zb",function(){return at}),t.d(M,"cc",function(){return vt}),t.d(M,"bc",function(){return Gt}),t.d(M,"Yb",function(){return Bt}),t.d(M,"gc",function(){return zt}),t.d(M,"Xb",function(){return ro}),t.d(M,"ac",function(){return P}),t.d(M,"ec",function(){return q}),t.d(M,"fc",function(){return Ae}),t.d(M,"dc",function(){return Ge}),t.d(M,"mc",function(){return ft}),t.d(M,"oc",function(){return Dt}),t.d(M,"nc",function(){return jt}),t.d(M,"Lc",function(){return ho}),t.d(M,"hc",function(){return mo}),t.d(M,"xc",function(){return Oo});var f=t("X+cX"),B=t("zrhQ"),x=t("MI8n"),N=t("746U"),A=t("3/fG"),F=t("3Rsk"),I=t("ic2d");const L={ColorContribution:"base.contributions.colors"};class v{constructor(){this._onDidChangeSchema=new x.b,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(Uo,mi,Ri,Di=!1,pi){let Wi={id:Uo,description:Ri,defaults:mi,needsTransparency:Di,deprecationMessage:pi};this.colorsById[Uo]=Wi;let fn={type:"string",description:Ri,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return pi&&(fn.deprecationMessage=pi),this.colorSchema.properties[Uo]=fn,this.colorReferenceSchema.enum.push(Uo),this.colorReferenceSchema.enumDescriptions.push(Ri),this._onDidChangeSchema.fire(),Uo}resolveDefaultColor(Uo,mi){const Ri=this.colorsById[Uo];if(Ri&&Ri.defaults){const Di=Ri.defaults[mi.type];return Oo(Di,mi)}return}getColorSchema(){return this.colorSchema}toString(){let Uo=(mi,Ri)=>{let Di=mi.indexOf(".")===-1?0:1,pi=Ri.indexOf(".")===-1?0:1;return Di!==pi?Di-pi:mi.localeCompare(Ri)};return Object.keys(this.colorsById).sort(Uo).map(mi=>`- \`${mi}\`: ${this.colorsById[mi].description}`).join(`
|
|
|
`)}}const m=new v;I.a.add(L.ColorContribution,m);function d(Uo,mi,Ri,Di,pi){return m.registerColor(Uo,mi,Ri,Di,pi)}const D=d("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},A.a("foreground","Overall foreground color. This color is only used if not overridden by a component.")),S=d("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},A.a("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),r=d("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},A.a("iconForeground","The default color for icons in the workbench.")),_=d("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},A.a("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),b=d("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},A.a("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),h=d("contrastActiveBorder",{light:null,dark:null,hc:_},A.a("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),c=d("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},A.a("textLinkForeground","Foreground color for links in text.")),p=d("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},A.a("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),E=d("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:B.a.black},A.a("textCodeBlockBackground","Background color for code blocks in text.")),y=d("widget.shadow",{dark:ho(B.a.black,.36),light:ho(B.a.black,.16),hc:null},A.a("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),C=d("input.background",{dark:"#3C3C3C",light:B.a.white,hc:B.a.black},A.a("inputBoxBackground","Input box background.")),O=d("input.foreground",{dark:D,light:D,hc:D},A.a("inputBoxForeground","Input box foreground.")),k=d("input.border",{dark:null,light:null,hc:b},A.a("inputBoxBorder","Input box border.")),Y=d("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:b},A.a("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),Q=d("inputOption.activeBackground",{dark:ho(_,.4),light:ho(_,.2),hc:B.a.transparent},A.a("inputOption.activeBackground","Background color of activated options in input fields.")),H=d("inputOption.activeForeground",{dark:B.a.white,light:B.a.black,hc:null},A.a("inputOption.activeForeground","Foreground color of activated options in input fields.")),Z=d("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:B.a.black},A.a("inputValidationInfoBackground","Input validation background color for information severity.")),oe=d("inputValidation.infoForeground",{dark:null,light:null,hc:null},A.a("inputValidationInfoForeground","Input validation foreground color for information severity.")),$=d("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:b},A.a("inputValidationInfoBorder","Input validation border color for information severity.")),te=d("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:B.a.black},A.a("inputValidationWarningBackground","Input validation background color for warning severity.")),ne=d("inputValidation.warningForeground",{dark:null,light:null,hc:null},A.a("inputValidationWarningForeground","Input validation foreground color for warning severity.")),Ee=d("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:b},A.a("inputValidationWarningBorder","Input validation border color for warning severity.")),fe=d("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:B.a.black},A.a("inputValidationErrorBackground","Input validation background color for error severity.")),ee=d("inputValidation.errorForeground",{dark:null,light:null,hc:null},A.a("inputValidationErrorForeground","Input validation foreground color for error severity.")),ie=d("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:b},A.a("inputValidationErrorBorder","Input validation border color for error severity.")),U=d("dropdown.background",{dark:"#3C3C3C",light:B.a.white,hc:B.a.black},A.a("dropdownBackground","Dropdown background.")),G=d("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:B.a.white},A.a("dropdownForeground","Dropdown foreground.")),J=d("button.foreground",{dark:B.a.white,light:B.a.white,hc:B.a.white},A.a("buttonForeground","Button foreground color.")),he=d("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},A.a("buttonBackground","Button background color.")),xe=d("button.hoverBackground",{dark:io(he,.2),light:uo(he,.2),hc:null},A.a("buttonHoverBackground","Button background color when hovering.")),Ie=d("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:B.a.black},A.a("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),Le=d("badge.foreground",{dark:B.a.white,light:"#333",hc:B.a.white},A.a("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),Te=d("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},A.a("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),ze=d("scrollbarSlider.background",{dark:B.a.fromHex("#797979").transparent(.4),light:B.a.fromHex("#646464").transparent(.4),hc:ho(b,.6)},A.a("scrollbarSliderBackground","Scrollbar slider background color.")),ue=d("scrollbarSlider.hoverBackground",{dark:B.a.fromHex("#646464").transparent(.7),light:B.a.fromHex("#646464").transparent(.7),hc:ho(b,.8)},A.a("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),je=d("scrollbarSlider.activeBackground",{dark:B.a.fromHex("#BFBFBF").transparent(.4),light:B.a.fromHex("#000000").transparent(.6),hc:b},A.a("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),Pe=d("progressBar.background",{dark:B.a.fromHex("#0E70C0"),light:B.a.fromHex("#0E70C0"),hc:b},A.a("progressBarBackground","Background color of the progress bar that can show for long running operations.")),ve=d("editorError.background",{dark:null,light:null,hc:null},A.a("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ce=d("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hc:null},A.a("editorError.foreground","Foreground color of error squigglies in the editor.")),le=d("editorError.border",{dark:null,light:null,hc:B.a.fromHex("#E47777").transparent(.8)},A.a("errorBorder","Border color of error boxes in the editor.")),Ce=d("editorWarning.background",{dark:null,light:null,hc:null},A.a("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ye=d("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},A.a("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),ge=d("editorWarning.border",{dark:null,light:null,hc:B.a.fromHex("#FFCC00").transparent(.8)},A.a("warningBorder","Border color of warning boxes in the editor.")),Me=d("editorInfo.background",{dark:null,light:null,hc:null},A.a("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),De=d("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},A.a("editorInfo.foreground","Foreground color of info squigglies in the editor.")),we=d("editorInfo.border",{dark:null,light:null,hc:B.a.fromHex("#3794FF").transparent(.8)},A.a("infoBorder","Border color of info boxes in the editor.")),Oe=d("editorHint.foreground",{dark:B.a.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},A.a("editorHint.foreground","Foreground color of hint squigglies in the editor.")),nt=d("editorHint.border",{dark:null,light:null,hc:B.a.fromHex("#eeeeee").transparent(.8)},A.a("hintBorder","Border color of hint boxes in the editor.")),Ke=d("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:B.a.black},A.a("editorBackground","Editor background color.")),et=d("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:B.a.white},A.a("editorForeground","Editor default foreground color.")),bt=d("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},A.a("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),Tt=d("editorWidget.foreground",{dark:D,light:D,hc:D},A.a("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),$t=d("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:b},A.a("editorWidgetBorder","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.")),Xe=d("editorWidget.resizeBorder",{light:null,dark:null,hc:null},A.a("editorWidgetResizeBorder","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.")),it=d("quickInput.background",{dark:bt,light:bt,hc:bt},A.a("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),re=d("quickInput.foreground",{dark:Tt,light:Tt,hc:Tt},A.a("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),We=d("quickInputTitle.background",{dark:new B.a(new B.c(255,255,255,.105)),light:new B.a(new B.c(0,0,0,.06)),hc:"#000000"},A.a("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),tt=d("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:B.a.white},A.a("pickerGroupForeground","Quick picker color for grouping labels.")),Et=d("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:B.a.white},A.a("pickerGroupBorder","Quick picker color for grouping borders.")),It=d("keybindingLabel.background",{dark:new B.a(new B.c(128,128,128,.17)),light:new B.a(new B.c(221,221,221,.4)),hc:B.a.transparent},A.a("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),Rt=d("keybindingLabel.foreground",{dark:B.a.fromHex("#CCCCCC"),light:B.a.fromHex("#555555"),hc:B.a.white},A.a("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),vo=d("keybindingLabel.border",{dark:new B.a(new B.c(51,51,51,.6)),light:new B.a(new B.c(204,204,204,.4)),hc:new B.a(new B.c(111,195,223))},A.a("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),Mo=d("keybindingLabel.bottomBorder",{dark:new B.a(new B.c(68,68,68,.6)),light:new B.a(new B.c(187,187,187,.4)),hc:new B.a(new B.c(111,195,223))},A.a("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),xo=d("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},A.a("editorSelectionBackground","Color of the editor selection.")),Do=d("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},A.a("editorSelectionForeground","Color of the selected text for high contrast.")),Lo=d("editor.inactiveSelectionBackground",{light:ho(xo,.5),dark:ho(xo,.5),hc:ho(xo,.5)},A.a("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),To=d("editor.selectionHighlightBackground",{light:Ao(xo,Ke,.3,.6),dark:Ao(xo,Ke,.3,.6),hc:null},A.a("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),Ht=d("editor.selectionHighlightBorder",{light:null,dark:null,hc:h},A.a("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),Mt=d("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},A.a("editorFindMatch","Color of the current search match.")),Ue=d("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},A.a("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),dt=d("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},A.a("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Ut=d("editor.findMatchBorder",{light:null,dark:null,hc:h},A.a("editorFindMatchBorder","Border color of the current search match.")),Ye=d("editor.findMatchHighlightBorder",{light:null,dark:null,hc:h},A.a("findMatchHighlightBorder","Border color of the other search matches.")),qe=d("editor.findRangeHighlightBorder",{dark:null,light:null,hc:ho(h,.4)},A.a("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),ct=d("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},A.a("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),_t=d("editorHoverWidget.background",{light:bt,dark:bt,hc:bt},A.a("hoverBackground","Background color of the editor hover.")),Pt=d("editorHoverWidget.foreground",{light:Tt,dark:Tt,hc:Tt},A.a("hoverForeground","Foreground color of the editor hover.")),Wt=d("editorHoverWidget.border",{light:$t,dark:$t,hc:$t},A.a("hoverBorder","Border color of the editor hover.")),Vt=d("editorHoverWidget.statusBarBackground",{dark:io(_t,.2),light:uo(_t,.05),hc:bt},A.a("statusBarBackground","Background color of the editor hover status bar.")),so=d("editorLink.activeForeground",{dark:"#4E94CE",light:B.a.blue,hc:B.a.cyan},A.a("activeLinkForeground","Color of active links.")),wo=d("editorInlayHint.foreground",{dark:ho(Le,.8),light:ho(Le,.8),hc:Le},A.a("editorInlayHintForeground","Foreground color of inline hints")),No=d("editorInlayHint.background",{dark:ho(Ie,.6),light:ho(Ie,.3),hc:Ie},A.a("editorInlayHintBackground","Background color of inline hints")),di=d("editorInlayHint.typeForeground",{dark:wo,light:wo,hc:wo},A.a("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),_o=d("editorInlayHint.typeBackground",{dark:No,light:No,hc:No},A.a("editorInlayHintBackgroundTypes","Background color of inline hints for types")),no=d("editorInlayHint.parameterForeground",{dark:wo,light:wo,hc:wo},A.a("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),Lt=d("editorInlayHint.parameterBackground",{dark:No,light:No,hc:No},A.a("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),xt=d("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},A.a("editorLightBulbForeground","The color used for the lightbulb actions icon.")),Nt=d("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},A.a("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),rt=new B.a(new B.c(155,185,85,.2)),lt=new B.a(new B.c(255,0,0,.2)),pt=d("diffEditor.insertedTextBackground",{dark:rt,light:rt,hc:null},A.a("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),St=d("diffEditor.removedTextBackground",{dark:lt,light:lt,hc:null},A.a("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Qt=d("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},A.a("diffEditorInsertedOutline","Outline color for the text that got inserted.")),bo=d("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},A.a("diffEditorRemovedOutline","Outline color for text that got removed.")),qt=d("diffEditor.border",{dark:null,light:null,hc:b},A.a("diffEditorBorder","Border color between the two text editors.")),Eo=d("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},A.a("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),Ro=d("list.focusBackground",{dark:null,light:null,hc:null},A.a("listFocusBackground","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.")),zo=d("list.focusForeground",{dark:null,light:null,hc:null},A.a("listFocusForeground","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.")),Bo=d("list.focusOutline",{dark:_,light:_,hc:h},A.a("listFocusOutline","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.")),Jt=d("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},A.a("listActiveSelectionBackground","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.")),fo=d("list.activeSelectionForeground",{dark:B.a.white,light:B.a.white,hc:null},A.a("listActiveSelectionForeground","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.")),ri=d("list.activeSelectionIconForeground",{dark:null,light:null,hc:null},A.a("listActiveSelectionIconForeground","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.")),Zo=d("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},A.a("listInactiveSelectionBackground","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.")),ci=d("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},A.a("listInactiveSelectionForeground","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.")),ki=d("list.inactiveSelectionIconForeground",{dark:null,light:null,hc:null},A.a("listInactiveSelectionIconForeground","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.")),wi=d("list.inactiveFocusBackground",{dark:null,light:null,hc:null},A.a("listInactiveFocusBackground","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.")),Zi=d("list.inactiveFocusOutline",{dark:null,light:null,hc:null},A.a("listInactiveFocusOutline","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.")),Vi=d("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},A.a("listHoverBackground","List/Tree background when hovering over items using the mouse.")),vi=d("list.hoverForeground",{dark:null,light:null,hc:null},A.a("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),sn=d("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},A.a("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),en=d("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:_},A.a("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),on=d("list.focusHighlightForeground",{dark:en,light:Io(Jt,en,"#9DDDFF"),hc:en},A.a("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),cn=d("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:B.a.black},A.a("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),Bi=d("listFilterWidget.outline",{dark:B.a.transparent,light:B.a.transparent,hc:"#f38518"},A.a("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),zi=d("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:b},A.a("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),Ji=d("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},A.a("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),ui=d("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},A.a("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),pn=d("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,A.a("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),Hi=d("quickInputList.focusForeground",{dark:fo,light:fo,hc:fo},A.a("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),Oi=d("quickInputList.focusIconForeground",{dark:ri,light:ri,hc:ri},A.a("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),Ii=d("quickInputList.focusBackground",{dark:mo(pn,Jt),light:mo(pn,Jt),hc:null},A.a("quickInput.listFocusBackground","Quick picker background color for the focused item.")),Qi=d("menu.border",{dark:null,light:null,hc:b},A.a("menuBorder","Border color of menus.")),Li=d("menu.foreground",{dark:G,light:D,hc:G},A.a("menuForeground","Foreground color of menu items.")),Ui=d("menu.background",{dark:U,light:U,hc:U},A.a("menuBackground","Background color of menu items.")),fi=d("menu.selectionForeground",{dark:fo,light:fo,hc:fo},A.a("menuSelectionForeground","Foreground color of the selected menu item in menus.")),$i=d("menu.selectionBackground",{dark:Jt,light:Jt,hc:Jt},A.a("menuSelectionBackground","Background color of the selected menu item in menus.")),rn=d("menu.selectionBorder",{dark:null,light:null,hc:h},A.a("menuSelectionBorder","Border color of the selected menu item in menus.")),_i=d("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:b},A.a("menuSeparatorBackground","Color of a separator menu item in menus.")),Pi=d("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hc:null},A.a("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),ht=d("editor.snippetTabstopHighlightBackground",{dark:new B.a(new B.c(124,124,124,.3)),light:new B.a(new B.c(10,50,100,.2)),hc:new B.a(new B.c(124,124,124,.3))},A.a("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),Ve=d("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},A.a("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),K=d("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},A.a("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),be=d("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new B.a(new B.c(10,50,100,.5)),hc:"#525252"},A.a("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),Re=d("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},A.a("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),Be=d("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},A.a("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),at=d("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},A.a("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),vt=d("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hc:"#ffffff"},A.a("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),Gt=d("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},A.a("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),Bt=d("minimap.errorHighlight",{dark:new B.a(new B.c(255,18,18,.7)),light:new B.a(new B.c(255,18,18,.7)),hc:new B.a(new B.c(255,50,50,1))},A.a("minimapError","Minimap marker color for errors.")),zt=d("minimap.warningHighlight",{dark:ye,light:ye,hc:ge},A.a("overviewRuleWarning","Minimap marker color for warnings.")),ro=d("minimap.background",{dark:null,light:null,hc:null},A.a("minimapBackground","Minimap background color.")),P=d("minimap.foregroundOpacity",{dark:B.a.fromHex("#000f"),light:B.a.fromHex("#000f"),hc:B.a.fromHex("#000f")},A.a("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),q=d("minimapSlider.background",{light:ho(ze,.5),dark:ho(ze,.5),hc:ho(ze,.5)},A.a("minimapSliderBackground","Minimap slider background color.")),Ae=d("minimapSlider.hoverBackground",{light:ho(ue,.5),dark:ho(ue,.5),hc:ho(ue,.5)},A.a("minimapSliderHoverBackground","Minimap slider background color when hovering.")),Ge=d("minimapSlider.activeBackground",{light:ho(je,.5),dark:ho(je,.5),hc:ho(je,.5)},A.a("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),ft=d("problemsErrorIcon.foreground",{dark:ce,light:ce,hc:ce},A.a("problemsErrorIconForeground","The color used for the problems error icon.")),Dt=d("problemsWarningIcon.foreground",{dark:ye,light:ye,hc:ye},A.a("problemsWarningIconForeground","The color used for the problems warning icon.")),jt=d("problemsInfoIcon.foreground",{dark:De,light:De,hc:De},A.a("problemsInfoIconForeground","The color used for the problems info icon."));function Xt(Uo,mi){var Ri,Di,pi;switch(Uo.op){case 0:return(Ri=Oo(Uo.value,mi))===null||Ri===void 0?void 0:Ri.darken(Uo.factor);case 1:return(Di=Oo(Uo.value,mi))===null||Di===void 0?void 0:Di.lighten(Uo.factor);case 2:return(pi=Oo(Uo.value,mi))===null||pi===void 0?void 0:pi.transparent(Uo.factor);case 3:for(const In of Uo.values){const an=Oo(In,mi);if(an)return an}return;case 5:return Oo(mi.defines(Uo.if)?Uo.then:Uo.else,mi);case 4:const Wi=Oo(Uo.value,mi);if(!Wi)return;const fn=Oo(Uo.background,mi);return fn?Wi.isDarkerThan(fn)?B.a.getLighterColor(Wi,fn,Uo.factor).transparent(Uo.transparency):B.a.getDarkerColor(Wi,fn,Uo.factor).transparent(Uo.transparency):Wi.transparent(Uo.factor*Uo.transparency);default:throw Object(N.b)(Uo)}}function uo(Uo,mi){return{op:0,value:Uo,factor:mi}}function io(Uo,mi){return{op:1,value:Uo,factor:mi}}function ho(Uo,mi){return{op:2,value:Uo,factor:mi}}function mo(...Uo){return{op:3,values:Uo}}function Io(Uo,mi,Ri){return{op:5,if:Uo,then:mi,else:Ri}}function Ao(Uo,mi,Ri,Di){return{op:4,value:Uo,background:mi,factor:Ri,transparency:Di}}function Oo(Uo,mi){return Uo===null?void 0:typeof Uo=="string"?Uo[0]==="#"?B.a.fromHex(Uo):mi.getColor(Uo):Uo instanceof B.a?Uo:typeof Uo=="object"?Xt(Uo,mi):void 0}const Wo="vscode://schemas/workbench-colors";let si=I.a.as(F.a.JSONContribution);si.registerSchema(Wo,m.getColorSchema());const hi=new f.e(()=>si.notifySchemaChanged(Wo),200);m.onDidChangeSchema(()=>{hi.isScheduled()||hi.schedule()})},MNXI:function(mt,M,t){},MXAL:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return x});var f=t("CZ1j");class B{constructor(N){let A=Object(f.b)(N);this._defaultValue=A,this._asciiMap=B._createAsciiMap(A),this._map=new Map}static _createAsciiMap(N){let A=new Uint8Array(256);for(let F=0;F<256;F++)A[F]=N;return A}set(N,A){let F=Object(f.b)(A);N>=0&&N<256?this._asciiMap[N]=F:this._map.set(N,F)}get(N){return N>=0&&N<256?this._asciiMap[N]:this._map.get(N)||this._defaultValue}}class x{constructor(){this._actual=new B(0)}add(N){this._actual.set(N,1)}has(N){return this._actual.get(N)===1}}},Md8J:function(mt,M,t){"use strict";t.d(M,"c",function(){return B}),t.d(M,"b",function(){return x}),t.d(M,"a",function(){return N});var f=t("EffR");function B(m,d={}){const D=N(d);return D.textContent=m,D}function x(m,d={}){const D=N(d);return F(D,I(m,!!d.renderCodeSegments),d.actionHandler,d.renderCodeSegments),D}function N(m){const d=m.inline?"span":"div",D=document.createElement(d);return m.className&&(D.className=m.className),D}class A{constructor(m){this.source=m,this.index=0}eos(){return this.index>=this.source.length}next(){const m=this.peek();return this.advance(),m}peek(){return this.source[this.index]}advance(){this.index++}}function F(m,d,D,S){let r;if(d.type===2)r=document.createTextNode(d.content||"");else if(d.type===3)r=document.createElement("b");else if(d.type===4)r=document.createElement("i");else if(d.type===7&&S)r=document.createElement("code");else if(d.type===5&&D){const _=document.createElement("a");_.href="#",D.disposables.add(f.o(_,"click",b=>{D.callback(String(d.index),b)})),r=_}else d.type===8?r=document.createElement("br"):d.type===1&&(r=m);r&&m!==r&&m.appendChild(r),r&&Array.isArray(d.children)&&d.children.forEach(_=>{F(r,_,D,S)})}function I(m,d){const D={type:1,children:[]};let S=0,r=D;const _=[],b=new A(m);for(;!b.eos();){let h=b.next();const c=h==="\\"&&v(b.peek(),d)!==0;if(c&&(h=b.next()),!c&&L(h,d)&&h===b.peek()){b.advance(),r.type===2&&(r=_.pop());const p=v(h,d);if(r.type===p||r.type===5&&p===6)r=_.pop();else{const E={type:p,children:[]};p===5&&(E.index=S,S++),r.children.push(E),_.push(r),r=E}}else if(h===`
|
|
|
`)r.type===2&&(r=_.pop()),r.children.push({type:8});else if(r.type!==2){const p={type:2,content:h};r.children.push(p),_.push(r),r=p}else r.content+=h}return r.type===2&&(r=_.pop()),_.length,D}function L(m,d){return v(m,d)!==0}function v(m,d){switch(m){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return d?7:0;default:return 0}}},MqQJ:function(mt,M,t){"use strict";t.d(M,"a",function(){return L}),t.d(M,"b",function(){return v});var f=t("3/fG"),B=t("MI8n"),x=t("cMvZ"),N=t("ic2d"),A=t("ubTv");const F={ModesRegistry:"editor.modesRegistry"};class I{constructor(){this._onDidChangeLanguages=new B.b,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}registerLanguage(d){return this._languages.push(d),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let D=0,S=this._languages.length;D<S;D++)if(this._languages[D]===d){this._languages.splice(D,1);return}}}}getLanguages(){return[].concat(this._languages).concat(this._dynamicLanguages)}}const L=new I;N.a.add(F.ModesRegistry,L);const v="plaintext",m=".txt";L.registerLanguage({id:v,extensions:[m],aliases:[f.a("plainText.alias","Plain Text"),"text"],mimetypes:[A.a.text]}),x.b.register(v,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0)},MrjW:function(mt,M,t){"use strict";t.d(M,"i",function(){return c}),t.d(M,"e",function(){return p}),t.d(M,"d",function(){return E}),t.d(M,"g",function(){return y}),t.d(M,"f",function(){return C}),t.d(M,"b",function(){return O}),t.d(M,"a",function(){return k}),t.d(M,"c",function(){return Y}),t.d(M,"h",function(){return Q});var f=t("wxcJ");const B=65,x=97,N=90,A=122,F=46,I=47,L=92,v=58,m=63;class d extends Error{constructor(H,Z,oe){let $;typeof Z=="string"&&Z.indexOf("not ")===0?($="must not be",Z=Z.replace(/^not /,"")):$="must be";const te=H.indexOf(".")!==-1?"property":"argument";let ne=`The "${H}" ${te} ${$} of type ${Z}`;ne+=`. Received type ${typeof oe}`,super(ne),this.code="ERR_INVALID_ARG_TYPE"}}function D(H,Z){if(typeof H!="string")throw new d(Z,"string",H)}function S(H){return H===I||H===L}function r(H){return H===I}function _(H){return H>=B&&H<=N||H>=x&&H<=A}function b(H,Z,oe,$){let te="",ne=0,Ee=-1,fe=0,ee=0;for(let ie=0;ie<=H.length;++ie){if(ie<H.length)ee=H.charCodeAt(ie);else{if($(ee))break;ee=I}if($(ee)){if(!(Ee===ie-1||fe===1))if(fe===2){if(te.length<2||ne!==2||te.charCodeAt(te.length-1)!==F||te.charCodeAt(te.length-2)!==F){if(te.length>2){const U=te.lastIndexOf(oe);U===-1?(te="",ne=0):(te=te.slice(0,U),ne=te.length-1-te.lastIndexOf(oe)),Ee=ie,fe=0;continue}else if(te.length!==0){te="",ne=0,Ee=ie,fe=0;continue}}Z&&(te+=te.length>0?`${oe}..`:"..",ne=2)}else te.length>0?te+=`${oe}${H.slice(Ee+1,ie)}`:te=H.slice(Ee+1,ie),ne=ie-Ee-1;Ee=ie,fe=0}else ee===F&&fe!==-1?++fe:fe=-1}return te}function h(H,Z){if(Z===null||typeof Z!="object")throw new d("pathObject","Object",Z);const oe=Z.dir||Z.root,$=Z.base||`${Z.name||""}${Z.ext||""}`;return oe?oe===Z.root?`${oe}${$}`:`${oe}${H}${$}`:$}const c={resolve(...H){let Z="",oe="",$=!1;for(let te=H.length-1;te>=-1;te--){let ne;if(te>=0){if(ne=H[te],D(ne,"path"),ne.length===0)continue}else Z.length===0?ne=f.a():(ne=f.b[`=${Z}`]||f.a(),(ne===void 0||ne.slice(0,2).toLowerCase()!==Z.toLowerCase()&&ne.charCodeAt(2)===L)&&(ne=`${Z}\\`));const Ee=ne.length;let fe=0,ee="",ie=!1;const U=ne.charCodeAt(0);if(Ee===1)S(U)&&(fe=1,ie=!0);else if(S(U))if(ie=!0,S(ne.charCodeAt(1))){let G=2,J=G;for(;G<Ee&&!S(ne.charCodeAt(G));)G++;if(G<Ee&&G!==J){const he=ne.slice(J,G);for(J=G;G<Ee&&S(ne.charCodeAt(G));)G++;if(G<Ee&&G!==J){for(J=G;G<Ee&&!S(ne.charCodeAt(G));)G++;(G===Ee||G!==J)&&(ee=`\\\\${he}\\${ne.slice(J,G)}`,fe=G)}}}else fe=1;else _(U)&&ne.charCodeAt(1)===v&&(ee=ne.slice(0,2),fe=2,Ee>2&&S(ne.charCodeAt(2))&&(ie=!0,fe=3));if(ee.length>0)if(Z.length>0){if(ee.toLowerCase()!==Z.toLowerCase())continue}else Z=ee;if($){if(Z.length>0)break}else if(oe=`${ne.slice(fe)}\\${oe}`,$=ie,ie&&Z.length>0)break}return oe=b(oe,!$,"\\",S),$?`${Z}\\${oe}`:`${Z}${oe}`||"."},normalize(H){D(H,"path");const Z=H.length;if(Z===0)return".";let oe=0,$,te=!1;const ne=H.charCodeAt(0);if(Z===1)return r(ne)?"\\":H;if(S(ne))if(te=!0,S(H.charCodeAt(1))){let fe=2,ee=fe;for(;fe<Z&&!S(H.charCodeAt(fe));)fe++;if(fe<Z&&fe!==ee){const ie=H.slice(ee,fe);for(ee=fe;fe<Z&&S(H.charCodeAt(fe));)fe++;if(fe<Z&&fe!==ee){for(ee=fe;fe<Z&&!S(H.charCodeAt(fe));)fe++;if(fe===Z)return`\\\\${ie}\\${H.slice(ee)}\\`;fe!==ee&&($=`\\\\${ie}\\${H.slice(ee,fe)}`,oe=fe)}}}else oe=1;else _(ne)&&H.charCodeAt(1)===v&&($=H.slice(0,2),oe=2,Z>2&&S(H.charCodeAt(2))&&(te=!0,oe=3));let Ee=oe<Z?b(H.slice(oe),!te,"\\",S):"";return Ee.length===0&&!te&&(Ee="."),Ee.length>0&&S(H.charCodeAt(Z-1))&&(Ee+="\\"),$===void 0?te?`\\${Ee}`:Ee:te?`${$}\\${Ee}`:`${$}${Ee}`},isAbsolute(H){D(H,"path");const Z=H.length;if(Z===0)return!1;const oe=H.charCodeAt(0);return S(oe)||Z>2&&_(oe)&&H.charCodeAt(1)===v&&S(H.charCodeAt(2))},join(...H){if(H.length===0)return".";let Z,oe;for(let ne=0;ne<H.length;++ne){const Ee=H[ne];D(Ee,"path"),Ee.length>0&&(Z===void 0?Z=oe=Ee:Z+=`\\${Ee}`)}if(Z===void 0)return".";let $=!0,te=0;if(typeof oe=="string"&&S(oe.charCodeAt(0))){++te;const ne=oe.length;ne>1&&S(oe.charCodeAt(1))&&(++te,ne>2&&(S(oe.charCodeAt(2))?++te:$=!1))}if($){for(;te<Z.length&&S(Z.charCodeAt(te));)te++;te>=2&&(Z=`\\${Z.slice(te)}`)}return c.normalize(Z)},relative(H,Z){if(D(H,"from"),D(Z,"to"),H===Z)return"";const oe=c.resolve(H),$=c.resolve(Z);if(oe===$)return"";if(H=oe.toLowerCase(),Z=$.toLowerCase(),H===Z)return"";let te=0;for(;te<H.length&&H.charCodeAt(te)===L;)te++;let ne=H.length;for(;ne-1>te&&H.charCodeAt(ne-1)===L;)ne--;const Ee=ne-te;let fe=0;for(;fe<Z.length&&Z.charCodeAt(fe)===L;)fe++;let ee=Z.length;for(;ee-1>fe&&Z.charCodeAt(ee-1)===L;)ee--;const ie=ee-fe,U=Ee<ie?Ee:ie;let G=-1,J=0;for(;J<U;J++){const xe=H.charCodeAt(te+J);if(xe!==Z.charCodeAt(fe+J))break;xe===L&&(G=J)}if(J!==U){if(G===-1)return $}else{if(ie>U){if(Z.charCodeAt(fe+J)===L)return $.slice(fe+J+1);if(J===2)return $.slice(fe+J)}Ee>U&&(H.charCodeAt(te+J)===L?G=J:J===2&&(G=3)),G===-1&&(G=0)}let he="";for(J=te+G+1;J<=ne;++J)(J===ne||H.charCodeAt(J)===L)&&(he+=he.length===0?"..":"\\..");return fe+=G,he.length>0?`${he}${$.slice(fe,ee)}`:($.charCodeAt(fe)===L&&++fe,$.slice(fe,ee))},toNamespacedPath(H){if(typeof H!="string")return H;if(H.length===0)return"";const Z=c.resolve(H);if(Z.length<=2)return H;if(Z.charCodeAt(0)===L){if(Z.charCodeAt(1)===L){const oe=Z.charCodeAt(2);if(oe!==m&&oe!==F)return`\\\\?\\UNC\\${Z.slice(2)}`}}else if(_(Z.charCodeAt(0))&&Z.charCodeAt(1)===v&&Z.charCodeAt(2)===L)return`\\\\?\\${Z}`;return H},dirname(H){D(H,"path");const Z=H.length;if(Z===0)return".";let oe=-1,$=0;const te=H.charCodeAt(0);if(Z===1)return S(te)?H:".";if(S(te)){if(oe=$=1,S(H.charCodeAt(1))){let fe=2,ee=fe;for(;fe<Z&&!S(H.charCodeAt(fe));)fe++;if(fe<Z&&fe!==ee){for(ee=fe;fe<Z&&S(H.charCodeAt(fe));)fe++;if(fe<Z&&fe!==ee){for(ee=fe;fe<Z&&!S(H.charCodeAt(fe));)fe++;if(fe===Z)return H;fe!==ee&&(oe=$=fe+1)}}}}else _(te)&&H.charCodeAt(1)===v&&(oe=Z>2&&S(H.charCodeAt(2))?3:2,$=oe);let ne=-1,Ee=!0;for(let fe=Z-1;fe>=$;--fe)if(S(H.charCodeAt(fe))){if(!Ee){ne=fe;break}}else Ee=!1;if(ne===-1){if(oe===-1)return".";ne=oe}return H.slice(0,ne)},basename(H,Z){Z!==void 0&&D(Z,"ext"),D(H,"path");let oe=0,$=-1,te=!0,ne;if(H.length>=2&&_(H.charCodeAt(0))&&H.charCodeAt(1)===v&&(oe=2),Z!==void 0&&Z.length>0&&Z.length<=H.length){if(Z===H)return"";let Ee=Z.length-1,fe=-1;for(ne=H.length-1;ne>=oe;--ne){const ee=H.charCodeAt(ne);if(S(ee)){if(!te){oe=ne+1;break}}else fe===-1&&(te=!1,fe=ne+1),Ee>=0&&(ee===Z.charCodeAt(Ee)?--Ee===-1&&($=ne):(Ee=-1,$=fe))}return oe===$?$=fe:$===-1&&($=H.length),H.slice(oe,$)}for(ne=H.length-1;ne>=oe;--ne)if(S(H.charCodeAt(ne))){if(!te){oe=ne+1;break}}else $===-1&&(te=!1,$=ne+1);return $===-1?"":H.slice(oe,$)},extname(H){D(H,"path");let Z=0,oe=-1,$=0,te=-1,ne=!0,Ee=0;H.length>=2&&H.charCodeAt(1)===v&&_(H.charCodeAt(0))&&(Z=$=2);for(let fe=H.length-1;fe>=Z;--fe){const ee=H.charCodeAt(fe);if(S(ee)){if(!ne){$=fe+1;break}continue}te===-1&&(ne=!1,te=fe+1),ee===F?oe===-1?oe=fe:Ee!==1&&(Ee=1):oe!==-1&&(Ee=-1)}return oe===-1||te===-1||Ee===0||Ee===1&&oe===te-1&&oe===$+1?"":H.slice(oe,te)},format:h.bind(null,"\\"),parse(H){D(H,"path");const Z={root:"",dir:"",base:"",ext:"",name:""};if(H.length===0)return Z;const oe=H.length;let $=0,te=H.charCodeAt(0);if(oe===1)return S(te)?(Z.root=Z.dir=H,Z):(Z.base=Z.name=H,Z);if(S(te)){if($=1,S(H.charCodeAt(1))){let G=2,J=G;for(;G<oe&&!S(H.charCodeAt(G));)G++;if(G<oe&&G!==J){for(J=G;G<oe&&S(H.charCodeAt(G));)G++;if(G<oe&&G!==J){for(J=G;G<oe&&!S(H.charCodeAt(G));)G++;G===oe?$=G:G!==J&&($=G+1)}}}}else if(_(te)&&H.charCodeAt(1)===v){if(oe<=2)return Z.root=Z.dir=H,Z;if($=2,S(H.charCodeAt(2))){if(oe===3)return Z.root=Z.dir=H,Z;$=3}}$>0&&(Z.root=H.slice(0,$));let ne=-1,Ee=$,fe=-1,ee=!0,ie=H.length-1,U=0;for(;ie>=$;--ie){if(te=H.charCodeAt(ie),S(te)){if(!ee){Ee=ie+1;break}continue}fe===-1&&(ee=!1,fe=ie+1),te===F?ne===-1?ne=ie:U!==1&&(U=1):ne!==-1&&(U=-1)}return fe!==-1&&(ne===-1||U===0||U===1&&ne===fe-1&&ne===Ee+1?Z.base=Z.name=H.slice(Ee,fe):(Z.name=H.slice(Ee,ne),Z.base=H.slice(Ee,fe),Z.ext=H.slice(ne,fe))),Ee>0&&Ee!==$?Z.dir=H.slice(0,Ee-1):Z.dir=Z.root,Z},sep:"\\",delimiter:";",win32:null,posix:null},p={resolve(...H){let Z="",oe=!1;for(let $=H.length-1;$>=-1&&!oe;$--){const te=$>=0?H[$]:f.a();if(D(te,"path"),te.length===0)continue;Z=`${te}/${Z}`,oe=te.charCodeAt(0)===I}return Z=b(Z,!oe,"/",r),oe?`/${Z}`:Z.length>0?Z:"."},normalize(H){if(D(H,"path"),H.length===0)return".";const Z=H.charCodeAt(0)===I,oe=H.charCodeAt(H.length-1)===I;return H=b(H,!Z,"/",r),H.length===0?Z?"/":oe?"./":".":(oe&&(H+="/"),Z?`/${H}`:H)},isAbsolute(H){return D(H,"path"),H.length>0&&H.charCodeAt(0)===I},join(...H){if(H.length===0)return".";let Z;for(let oe=0;oe<H.length;++oe){const $=H[oe];D($,"path"),$.length>0&&(Z===void 0?Z=$:Z+=`/${$}`)}return Z===void 0?".":p.normalize(Z)},relative(H,Z){if(D(H,"from"),D(Z,"to"),H===Z)return"";if(H=p.resolve(H),Z=p.resolve(Z),H===Z)return"";const oe=1,$=H.length,te=$-oe,ne=1,Ee=Z.length-ne,fe=te<Ee?te:Ee;let ee=-1,ie=0;for(;ie<fe;ie++){const G=H.charCodeAt(oe+ie);if(G!==Z.charCodeAt(ne+ie))break;G===I&&(ee=ie)}if(ie===fe)if(Ee>fe){if(Z.charCodeAt(ne+ie)===I)return Z.slice(ne+ie+1);if(ie===0)return Z.slice(ne+ie)}else te>fe&&(H.charCodeAt(oe+ie)===I?ee=ie:ie===0&&(ee=0));let U="";for(ie=oe+ee+1;ie<=$;++ie)(ie===$||H.charCodeAt(ie)===I)&&(U+=U.length===0?"..":"/..");return`${U}${Z.slice(ne+ee)}`},toNamespacedPath(H){return H},dirname(H){if(D(H,"path"),H.length===0)return".";const Z=H.charCodeAt(0)===I;let oe=-1,$=!0;for(let te=H.length-1;te>=1;--te)if(H.charCodeAt(te)===I){if(!$){oe=te;break}}else $=!1;return oe===-1?Z?"/":".":Z&&oe===1?"//":H.slice(0,oe)},basename(H,Z){Z!==void 0&&D(Z,"ext"),D(H,"path");let oe=0,$=-1,te=!0,ne;if(Z!==void 0&&Z.length>0&&Z.length<=H.length){if(Z===H)return"";let Ee=Z.length-1,fe=-1;for(ne=H.length-1;ne>=0;--ne){const ee=H.charCodeAt(ne);if(ee===I){if(!te){oe=ne+1;break}}else fe===-1&&(te=!1,fe=ne+1),Ee>=0&&(ee===Z.charCodeAt(Ee)?--Ee===-1&&($=ne):(Ee=-1,$=fe))}return oe===$?$=fe:$===-1&&($=H.length),H.slice(oe,$)}for(ne=H.length-1;ne>=0;--ne)if(H.charCodeAt(ne)===I){if(!te){oe=ne+1;break}}else $===-1&&(te=!1,$=ne+1);return $===-1?"":H.slice(oe,$)},extname(H){D(H,"path");let Z=-1,oe=0,$=-1,te=!0,ne=0;for(let Ee=H.length-1;Ee>=0;--Ee){const fe=H.charCodeAt(Ee);if(fe===I){if(!te){oe=Ee+1;break}continue}$===-1&&(te=!1,$=Ee+1),fe===F?Z===-1?Z=Ee:ne!==1&&(ne=1):Z!==-1&&(ne=-1)}return Z===-1||$===-1||ne===0||ne===1&&Z===$-1&&Z===oe+1?"":H.slice(Z,$)},format:h.bind(null,"/"),parse(H){D(H,"path");const Z={root:"",dir:"",base:"",ext:"",name:""};if(H.length===0)return Z;const oe=H.charCodeAt(0)===I;let $;oe?(Z.root="/",$=1):$=0;let te=-1,ne=0,Ee=-1,fe=!0,ee=H.length-1,ie=0;for(;ee>=$;--ee){const U=H.charCodeAt(ee);if(U===I){if(!fe){ne=ee+1;break}continue}Ee===-1&&(fe=!1,Ee=ee+1),U===F?te===-1?te=ee:ie!==1&&(ie=1):te!==-1&&(ie=-1)}if(Ee!==-1){const U=ne===0&&oe?1:ne;te===-1||ie===0||ie===1&&te===Ee-1&&te===ne+1?Z.base=Z.name=H.slice(U,Ee):(Z.name=H.slice(U,te),Z.base=H.slice(U,Ee),Z.ext=H.slice(te,Ee))}return ne>0?Z.dir=H.slice(0,ne-1):oe&&(Z.dir="/"),Z},sep:"/",delimiter:":",win32:null,posix:null};p.win32=c.win32=c,p.posix=c.posix=p;const E=f.c==="win32"?c.normalize:p.normalize,y=f.c==="win32"?c.resolve:p.resolve,C=f.c==="win32"?c.relative:p.relative,O=f.c==="win32"?c.dirname:p.dirname,k=f.c==="win32"?c.basename:p.basename,Y=f.c==="win32"?c.extname:p.extname,Q=f.c==="win32"?c.sep:p.sep},Msxo:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:function(){return t.e(353).then(t.bind(null,"Qx4d"))}})},MvK1:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return x});class f{constructor(N,A,F){this._colorZoneBrand=void 0,this.from=N|0,this.to=A|0,this.colorId=F|0}static compare(N,A){return N.colorId===A.colorId?N.from===A.from?N.to-A.to:N.from-A.from:N.colorId-A.colorId}}class B{constructor(N,A,F){this._overviewRulerZoneBrand=void 0,this.startLineNumber=N,this.endLineNumber=A,this.color=F,this._colorZone=null}static compare(N,A){return N.color===A.color?N.startLineNumber===A.startLineNumber?N.endLineNumber-A.endLineNumber:N.startLineNumber-A.startLineNumber:N.color<A.color?-1:1}setColorZone(N){this._colorZone=N}getColorZones(){return this._colorZone}}class x{constructor(N){this._getVerticalOffsetForLine=N,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(N){this._zones=N,this._zones.sort(B.compare)}setLineHeight(N){return this._lineHeight===N?!1:(this._lineHeight=N,this._colorZonesInvalid=!0,!0)}setPixelRatio(N){this._pixelRatio=N,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(N){return this._domWidth===N?!1:(this._domWidth=N,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(N){return this._domHeight===N?!1:(this._domHeight=N,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(N){return this._outerHeight===N?!1:(this._outerHeight=N,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const N=this._colorZonesInvalid,A=Math.floor(this._lineHeight),F=Math.floor(this.getCanvasHeight()),I=Math.floor(this._outerHeight),L=F/I,v=Math.floor(4*this._pixelRatio/2);let m=[];for(let d=0,D=this._zones.length;d<D;d++){const S=this._zones[d];if(!N){const y=S.getColorZones();if(y){m.push(y);continue}}const r=Math.floor(L*this._getVerticalOffsetForLine(S.startLineNumber)),_=Math.floor(L*(this._getVerticalOffsetForLine(S.endLineNumber)+A));let b=Math.floor((r+_)/2),h=_-b;h<v&&(h=v),b-h<0&&(b=h),b+h>F&&(b=F-h);const c=S.color;let p=this._color2Id[c];p||(p=++this._lastAssignedId,this._color2Id[c]=p,this._id2Color[p]=c);const E=new f(b-h,b+h,p);S.setColorZone(E),m.push(E)}return this._colorZonesInvalid=!1,m.sort(f.compare),m}}},MyPo:function(mt,M,t){"use strict";t.r(M),t.d(M,"StandaloneGotoLineQuickAccessProvider",function(){return h}),t.d(M,"GotoLineAction",function(){return c});var f=t("pmY6"),B=t("sFUC"),x=t("H+DO"),N=t("3/fG");class A extends x.a{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(p){const E=Object(N.a)("cannotRunGotoLine","Open a text editor first to go to a line.");return p.items=[{label:E}],p.ariaLabel=E,f.a.None}provideWithTextEditor(p,E,y){const C=p.editor,O=new f.b;O.add(E.onDidAccept(Q=>{const[H]=E.selectedItems;if(H){if(!this.isValidLineNumber(C,H.lineNumber))return;this.gotoLocation(p,{range:this.toRange(H.lineNumber,H.column),keyMods:E.keyMods,preserveFocus:Q.inBackground}),Q.inBackground||E.hide()}}));const k=()=>{const Q=this.parsePosition(C,E.value.trim().substr(A.PREFIX.length)),H=this.getPickLabel(C,Q.lineNumber,Q.column);if(E.items=[{lineNumber:Q.lineNumber,column:Q.column,label:H}],E.ariaLabel=H,!this.isValidLineNumber(C,Q.lineNumber)){this.clearDecorations(C);return}const Z=this.toRange(Q.lineNumber,Q.column);C.revealRangeInCenter(Z,0),this.addDecorations(C,Z)};k(),O.add(E.onDidChangeValue(()=>k()));const Y=Object(B.a)(C);if(Y){const Q=Y.getOptions(),H=Q.get(59);H.renderType===2&&(Y.updateOptions({lineNumbers:"on"}),O.add(Object(f.i)(()=>Y.updateOptions({lineNumbers:"relative"}))))}return O}toRange(p=1,E=1){return{startLineNumber:p,startColumn:E,endLineNumber:p,endColumn:E}}parsePosition(p,E){const y=E.split(/,|:|#/).map(O=>parseInt(O,10)).filter(O=>!isNaN(O)),C=this.lineCount(p)+1;return{lineNumber:y[0]>0?y[0]:C+y[0],column:y[1]}}getPickLabel(p,E,y){if(this.isValidLineNumber(p,E))return this.isValidColumn(p,E,y)?Object(N.a)("gotoLineColumnLabel","Go to line {0} and character {1}.",E,y):Object(N.a)("gotoLineLabel","Go to line {0}.",E);const C=p.getPosition()||{lineNumber:1,column:1},O=this.lineCount(p);return O>1?Object(N.a)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",C.lineNumber,C.column,O):Object(N.a)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",C.lineNumber,C.column)}isValidLineNumber(p,E){return!E||typeof E!="number"?!1:E>0&&E<=this.lineCount(p)}isValidColumn(p,E,y){if(!y||typeof y!="number")return!1;const C=this.getModel(p);if(!C)return!1;const O={lineNumber:E,column:y};return C.validatePosition(O).equals(O)}lineCount(p){var E,y;return(y=(E=this.getModel(p))===null||E===void 0?void 0:E.getLineCount())!==null&&y!==void 0?y:0}}A.PREFIX=":";var F=t("ic2d"),I=t("Lx4V"),L=t("Vxe3"),v=t("746U"),m=t("A9l+"),d=t("MI8n"),D=t("sswD"),S=t("wQH0"),r=t("Zr1c"),_=function(p,E,y,C){var O=arguments.length,k=O<3?E:C===null?C=Object.getOwnPropertyDescriptor(E,y):C,Y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(p,E,y,C);else for(var Q=p.length-1;Q>=0;Q--)(Y=p[Q])&&(k=(O<3?Y(k):O>3?Y(E,y,k):Y(E,y))||k);return O>3&&k&&Object.defineProperty(E,y,k),k},b=function(p,E){return function(y,C){E(y,C,p)}};let h=class extends A{constructor(E){super();this.editorService=E,this.onDidActiveTextEditorControlChange=d.c.None}get activeTextEditorControl(){return Object(v.p)(this.editorService.getFocusedCodeEditor())}};h=_([b(0,L.a)],h),F.a.as(I.b.Quickaccess).registerQuickAccessProvider({ctor:h,prefix:h.PREFIX,helpEntries:[{description:m.b.gotoLineActionLabel,needsEditor:!0}]});class c extends D.b{constructor(){super({id:"editor.action.gotoLine",label:m.b.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:S.a.focus,primary:2048|37,mac:{primary:256|37},weight:100}})}run(p){p.get(r.a).quickAccess.show(h.PREFIX)}}Object(D.j)(c)},Mzro:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:function(){return t.e(363).then(t.bind(null,"l/4i"))}})},NQK8:function(mt,M,t){"use strict";var f=t("M/lh"),B=t.n(f);t.o(f,"Emitter")&&t.d(M,"Emitter",function(){return f.Emitter}),t.o(f,"Range")&&t.d(M,"Range",function(){return f.Range}),t.o(f,"Uri")&&t.d(M,"Uri",function(){return f.Uri}),t.o(f,"editor")&&t.d(M,"editor",function(){return f.editor}),t.o(f,"languages")&&t.d(M,"languages",function(){return f.languages})},NR8r:function(mt,M,t){"use strict";t.d(M,"a",function(){return _});var f=t("OBOq"),B=t("X+cX"),x=t("pmY6"),N=t("synD"),A=t.n(N),F=t("sswD"),I=t("aokT"),L=t("3/fG"),v=t("T8No"),m=t("MD5Z"),d=t("nEHx"),D=t("t9D7"),S=function(c,p,E,y){var C=arguments.length,O=C<3?p:y===null?y=Object.getOwnPropertyDescriptor(p,E):y,k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(c,p,E,y);else for(var Y=c.length-1;Y>=0;Y--)(k=c[Y])&&(O=(C<3?k(O):C>3?k(p,E,O):k(p,E))||O);return C>3&&O&&Object.defineProperty(p,E,O),O},r=function(c,p){return function(E,y){p(E,y,c)}};let _=class c{constructor(p,E){this._messageWidget=new x.d,this._messageListeners=new x.b,this._editor=p,this._visible=c.MESSAGE_VISIBLE.bindTo(E),this._editorListener=this._editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit())}static get(p){return p.getContribution(c.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(p,E){Object(f.a)(p),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new h(this._editor,E,p),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 B.g(()=>this.closeMessage(),3e3));let y;this._messageListeners.add(this._editor.onMouseMove(C=>{if(!C.target.position)return;y?y.containsPosition(C.target.position)||this.closeMessage():y=new I.a(E.lineNumber-3,1,C.target.position.lineNumber+3,1)}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(h.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(L.a("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())}};_.ID="editor.contrib.messageController",_.MESSAGE_VISIBLE=new v.c("messageVisible",!1,L.a("messageVisible","Whether the editor is currently showing an inline message")),_=S([r(1,v.b)],_);const b=F.c.bindToContribution(_.get);Object(F.k)(new b({id:"leaveEditorMessage",precondition:_.MESSAGE_VISIBLE,handler:c=>c.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class h{constructor(c,{lineNumber:p,column:E},y){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=c,this._editor.revealLinesInCenterIfOutsideViewport(p,p,0),this._position={lineNumber:p,column:E-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const C=document.createElement("div");C.classList.add("anchor","top"),this._domNode.appendChild(C);const O=document.createElement("div");O.classList.add("message"),O.textContent=y,this._domNode.appendChild(O);const k=document.createElement("div");k.classList.add("anchor","below"),this._domNode.appendChild(k),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(c){let p;const E=()=>{c.dispose(),clearTimeout(p),c.getDomNode().removeEventListener("animationend",E)};return p=setTimeout(E,110),c.getDomNode().addEventListener("animationend",E),c.getDomNode().classList.add("fadeOut"),{dispose:E}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(c){this._domNode.classList.toggle("below",c===2)}}Object(F.l)(_.ID,_),Object(D.f)((c,p)=>{const E=c.getColor(m.ob);if(E){let O=c.type===d.a.HIGH_CONTRAST?2:1;p.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ${E}; }`),p.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ${E}; }`),p.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${O}px solid ${E}; }`)}const y=c.getColor(m.nb);y&&p.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${y}; }`);const C=c.getColor(m.pb);C&&p.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${C}; }`)})},"O/se":function(mt,M,t){"use strict";t.d(M,"a",function(){return L});var f=t("EffR"),B=t("zrhQ"),x=t("qj0h"),N=t("N0LK"),A=t("VPJY"),F=t.n(A);const I={badgeBackground:B.a.fromHex("#4D4D4D"),badgeForeground:B.a.fromHex("#FFFFFF")};class L{constructor(v,m){this.count=0,this.options=m||Object.create(null),Object(x.f)(this.options,I,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=Object(f.q)(v,Object(f.a)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(v){this.count=v,this.render()}setTitleFormat(v){this.titleFormat=v,this.render()}render(){this.element.textContent=Object(N.v)(this.countFormat,this.count),this.element.title=Object(N.v)(this.titleFormat,this.count),this.applyStyles()}style(v){this.badgeBackground=v.badgeBackground,this.badgeForeground=v.badgeForeground,this.badgeBorder=v.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const v=this.badgeBackground?this.badgeBackground.toString():"",m=this.badgeForeground?this.badgeForeground.toString():"",d=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=v,this.element.style.color=m,this.element.style.borderWidth=d?"1px":"",this.element.style.borderStyle=d?"solid":"",this.element.style.borderColor=d}}}},OAO6:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return x}),t.d(M,"c",function(){return N}),t.d(M,"d",function(){return A});var f=t("Cg/j");const B=Object(f.c)("undoRedoService");class x{constructor(F,I){this.resource=F,this.elements=I}}class N{constructor(){this.id=N._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}N._ID=0,N.None=new N;class A{constructor(){this.id=A._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}A._ID=0,A.None=new A},OBOq:function(mt,M,t){"use strict";t.d(M,"b",function(){return d}),t.d(M,"a",function(){return D}),t.d(M,"c",function(){return S});var f=t("EffR"),B=t("MNsG"),x=t("UCkY"),N=t.n(x);const A=2e4;let F,I,L,v,m;function d(_){F=document.createElement("div"),F.className="monaco-aria-container";const b=()=>{const c=document.createElement("div");return c.className="monaco-alert",c.setAttribute("role","alert"),c.setAttribute("aria-atomic","true"),F.appendChild(c),c};I=b(),L=b();const h=()=>{const c=document.createElement("div");return c.className="monaco-status",c.setAttribute("role","complementary"),c.setAttribute("aria-live","polite"),c.setAttribute("aria-atomic","true"),F.appendChild(c),c};v=h(),m=h(),_.appendChild(F)}function D(_){if(!F)return;I.textContent!==_?(f.t(L),r(I,_)):(f.t(I),r(L,_))}function S(_){if(!F)return;B.f?D(_):v.textContent!==_?(f.t(m),r(v,_)):(f.t(v),r(m,_))}function r(_,b){f.t(_),b.length>A&&(b=b.substr(0,A)),_.textContent=b,_.style.visibility="hidden",_.style.visibility="visible"}},OKK6:function(mt,M,t){},OOlL:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:function(){return t.e(319).then(t.bind(null,"NlLO"))}})},OhnE:function(mt,M,t){},PTeM:function(mt,M,t){"use strict";t.d(M,"d",function(){return A}),t.d(M,"b",function(){return F}),t.d(M,"c",function(){return L}),t.d(M,"a",function(){return v});var f=t("MrjW"),B=t("MNsG"),x=t("N0LK");function N(m){return m.replace(/[\\/]/g,f.e.sep)}function A(m){return m.indexOf("/")===-1&&(m=N(m)),/^[a-zA-Z]:(\/|$)/.test(m)&&(m="/"+m),m}function F(m,d,D,S=f.h){if(m===d)return!0;if(!m||!d)return!1;if(d.length>m.length)return!1;if(D){const r=Object(x.R)(m,d);if(!r)return!1;if(d.length===m.length)return!0;let _=d.length;return d.charAt(d.length-1)===S&&_--,m.charAt(_)===S}return d.charAt(d.length-1)!==S&&(d+=S),m.indexOf(d)===0}function I(m){return m>=65&&m<=90||m>=97&&m<=122}function L(m){const d=Object(f.d)(m);return B.i?m.length>3?!1:v(d)&&(m.length===2||d.charCodeAt(2)===92):d===f.e.sep}function v(m){return B.i?I(m.charCodeAt(0))&&m.charCodeAt(1)===58:!1}},Q4rV:function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var f=t("HpOR"),B=t("bY76");function x(A){let F=JSON.parse(A);return F=N(F),F}function N(A,F=0){if(!A||F>200)return A;if(typeof A=="object"){switch(A.$mid){case 1:return B.a.revive(A);case 2:return new RegExp(A.source,A.flags)}if(A instanceof f.a||A instanceof Uint8Array)return A;if(Array.isArray(A))for(let I=0;I<A.length;++I)A[I]=N(A[I],F+1);else for(const I in A)Object.hasOwnProperty.call(A,I)&&(A[I]=N(A[I],F+1))}return A}},Q631:function(mt,M,t){"use strict";t.r(M),t.d(M,"rename",function(){return G}),t.d(M,"RenameAction",function(){return he});var f=t("OBOq"),B=t("X+cX"),x=t("JQT/"),N=t("/cxE"),A=t("pmY6"),F=t("746U"),I=t("bY76"),L=t("vATl"),v=t("sswD"),m=t("x/UI"),d=t("Vxe3"),D=t("cGHE"),S=t("aokT"),r=t("wQH0"),_=t("twdY"),b=t("e0rL"),h=t("NR8r"),c=t("3/fG"),p=t("CRAX"),E=t("T8No"),y=t("Cg/j"),C=t("09fa"),O=t("sM1p"),k=t("tTk5"),Y=t("ic2d"),Q=t("BjKj"),H=t("bexQ"),Z=t("MD5Z"),oe=t("t9D7"),$=function(Ie,Le,Te,ze){var ue=arguments.length,je=ue<3?Le:ze===null?ze=Object.getOwnPropertyDescriptor(Le,Te):ze,Pe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")je=Reflect.decorate(Ie,Le,Te,ze);else for(var ve=Ie.length-1;ve>=0;ve--)(Pe=Ie[ve])&&(je=(ue<3?Pe(je):ue>3?Pe(Le,Te,je):Pe(Le,Te))||je);return ue>3&&je&&Object.defineProperty(Le,Te,je),je},te=function(Ie,Le){return function(Te,ze){Le(Te,ze,Ie)}};const ne=new E.c("renameInputVisible",!1,Object(c.a)("renameInputVisible","Whether the rename input widget is visible"));let Ee=class{constructor(Le,Te,ze,ue,je){this._editor=Le,this._acceptKeybindings=Te,this._themeService=ze,this._keybindingService=ue,this._disposables=new A.b,this.allowEditorOverflow=!0,this._visibleContextKey=ne.bindTo(je),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(Pe=>{Pe.hasChanged(43)&&this._updateFont()})),this._disposables.add(ze.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",Object(c.a)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const Le=()=>{var Te,ze;const[ue,je]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(ue),this._label.innerText=Object(c.a)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(Te=this._keybindingService.lookupKeybinding(ue))===null||Te===void 0?void 0:Te.getLabel(),(ze=this._keybindingService.lookupKeybinding(je))===null||ze===void 0?void 0:ze.getLabel())};Le(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(Le)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(Le){var Te,ze,ue,je;if(!this._input||!this._domNode)return;const Pe=Le.getColor(Z.Nc);this._domNode.style.backgroundColor=String((Te=Le.getColor(Z.W))!==null&&Te!==void 0?Te:""),this._domNode.style.boxShadow=Pe?` 0 0 8px 2px ${Pe}`:"",this._domNode.style.color=String((ze=Le.getColor(Z.jb))!==null&&ze!==void 0?ze:""),this._input.style.backgroundColor=String((ue=Le.getColor(Z.hb))!==null&&ue!==void 0?ue:"");const ve=Le.getColor(Z.ib);this._input.style.borderWidth=ve?"1px":"0px",this._input.style.borderStyle=ve?"solid":"none",this._input.style.borderColor=(je=ve==null?void 0:ve.toString())!==null&&je!==void 0?je:"none"}_updateFont(){if(!this._input||!this._label)return;const Le=this._editor.getOption(43);this._input.style.fontFamily=Le.fontFamily,this._input.style.fontWeight=Le.fontWeight,this._input.style.fontSize=`${Le.fontSize}px`,this._label.style.fontSize=`${Le.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(Le){Le||this.cancelInput(!0)}acceptInput(Le){this._currentAcceptInput&&this._currentAcceptInput(Le)}cancelInput(Le){this._currentCancelInput&&this._currentCancelInput(Le)}getInput(Le,Te,ze,ue,je,Pe){this._domNode.classList.toggle("preview",je),this._position=new D.a(Le.startLineNumber,Le.startColumn),this._input.value=Te,this._input.setAttribute("selectionStart",ze.toString()),this._input.setAttribute("selectionEnd",ue.toString()),this._input.size=Math.max((Le.endColumn-Le.startColumn)*1.1,20);const ve=new A.b;return new Promise(ce=>{this._currentCancelInput=le=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,ce(le),!0),this._currentAcceptInput=le=>{if(this._input.value.trim().length===0||this._input.value===Te){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,ce({newName:this._input.value,wantsPreview:je&&le})},Pe.onCancellationRequested(()=>this.cancelInput(!0)),ve.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!1))),this._show()}).finally(()=>{ve.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};Ee=$([te(2,oe.b),te(3,H.a),te(4,E.b)],Ee);var fe=function(Ie,Le,Te,ze){var ue=arguments.length,je=ue<3?Le:ze===null?ze=Object.getOwnPropertyDescriptor(Le,Te):ze,Pe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")je=Reflect.decorate(Ie,Le,Te,ze);else for(var ve=Ie.length-1;ve>=0;ve--)(Pe=Ie[ve])&&(je=(ue<3?Pe(je):ue>3?Pe(Le,Te,je):Pe(Le,Te))||je);return ue>3&&je&&Object.defineProperty(Le,Te,je),je},ee=function(Ie,Le){return function(Te,ze){Le(Te,ze,Ie)}},ie=function(Ie,Le,Te,ze){function ue(je){return je instanceof Te?je:new Te(function(Pe){Pe(je)})}return new(Te||(Te=Promise))(function(je,Pe){function ve(Ce){try{le(ze.next(Ce))}catch(ye){Pe(ye)}}function ce(Ce){try{le(ze.throw(Ce))}catch(ye){Pe(ye)}}function le(Ce){Ce.done?je(Ce.value):ue(Ce.value).then(ve,ce)}le((ze=ze.apply(Ie,Le||[])).next())})};class U{constructor(Ie,Le){this.model=Ie,this.position=Le,this._providerRenameIdx=0,this._providers=_.y.ordered(Ie)}hasProvider(){return this._providers.length>0}resolveRenameLocation(Ie){return ie(this,void 0,void 0,function*(){const Le=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const ze=this._providers[this._providerRenameIdx];if(!ze.resolveRenameLocation)break;let ue=yield ze.resolveRenameLocation(this.model,this.position,Ie);if(!ue)continue;if(ue.rejectReason){Le.push(ue.rejectReason);continue}return ue}const Te=this.model.getWordAtPosition(this.position);return Te?{range:new S.a(this.position.lineNumber,Te.startColumn,this.position.lineNumber,Te.endColumn),text:Te.word,rejectReason:Le.length>0?Le.join(`
|
|
|
`):void 0}:{range:S.a.fromPositions(this.position),text:"",rejectReason:Le.length>0?Le.join(`
|
|
|
`):void 0}})}provideRenameEdits(Ie,Le){return ie(this,void 0,void 0,function*(){return this._provideRenameEdits(Ie,this._providerRenameIdx,[],Le)})}_provideRenameEdits(Ie,Le,Te,ze){return ie(this,void 0,void 0,function*(){const ue=this._providers[Le];if(!ue)return{edits:[],rejectReason:Te.join(`
|
|
|
`)};const je=yield ue.provideRenameEdits(this.model,this.position,Ie,ze);if(je){if(je.rejectReason)return this._provideRenameEdits(Ie,Le+1,Te.concat(je.rejectReason),ze)}else return this._provideRenameEdits(Ie,Le+1,Te.concat(c.a("no result","No result.")),ze);return je})}}function G(Ie,Le,Te){return ie(this,void 0,void 0,function*(){const ze=new U(Ie,Le),ue=yield ze.resolveRenameLocation(x.a.None);return(ue==null?void 0:ue.rejectReason)?{edits:[],rejectReason:ue.rejectReason}:ze.provideRenameEdits(Te,x.a.None)})}let J=class Ie{constructor(Le,Te,ze,ue,je,Pe,ve){this.editor=Le,this._instaService=Te,this._notificationService=ze,this._bulkEditService=ue,this._progressService=je,this._logService=Pe,this._configService=ve,this._dispoableStore=new A.b,this._cts=new x.b,this._renameInputField=this._dispoableStore.add(new B.b(()=>this._dispoableStore.add(this._instaService.createInstance(Ee,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(Le){return Le.getContribution(Ie.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}run(){return ie(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const Le=this.editor.getPosition(),Te=new U(this.editor.getModel(),Le);if(!Te.hasProvider())return;this._cts=new L.b(this.editor,4|1);let ze;try{const Ce=Te.resolveRenameLocation(this._cts.token);this._progressService.showWhile(Ce,250),ze=yield Ce}catch(Ce){h.a.get(this.editor).showMessage(Ce||c.a("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),Le);return}if(!ze)return;if(ze.rejectReason){h.a.get(this.editor).showMessage(ze.rejectReason,Le);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new L.b(this.editor,4|1,ze.range);let ue=this.editor.getSelection(),je=0,Pe=ze.text.length;!S.a.isEmpty(ue)&&!S.a.spansMultipleLines(ue)&&S.a.containsRange(ze.range,ue)&&(je=Math.max(0,ue.startColumn-ze.range.startColumn),Pe=Math.min(ze.range.endColumn,ue.endColumn)-ze.range.startColumn);const ve=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),ce=yield this._renameInputField.value.getInput(ze.range,ze.text,je,Pe,ve,this._cts.token);if(typeof ce=="boolean"){ce&&this.editor.focus();return}this.editor.focus();const le=Object(B.l)(Te.provideRenameEdits(ce.newName,this._cts.token),this._cts.token).then(Ce=>ie(this,void 0,void 0,function*(){if(!Ce||!this.editor.hasModel())return;if(Ce.rejectReason){this._notificationService.info(Ce.rejectReason);return}this.editor.setSelection(S.a.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(m.b.convert(Ce),{editor:this.editor,showPreview:ce.wantsPreview,label:c.a("label","Renaming '{0}'",ze==null?void 0:ze.text),quotableLabel:c.a("quotableLabel","Renaming {0}",ze==null?void 0:ze.text)}).then(ye=>{ye.ariaSummary&&Object(f.a)(c.a("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",ze.text,ce.newName,ye.ariaSummary))}).catch(ye=>{this._notificationService.error(c.a("rename.failedApply","Rename failed to apply edits")),this._logService.error(ye)})}),Ce=>{this._notificationService.error(c.a("rename.failed","Rename failed to compute edits")),this._logService.error(Ce)});return this._progressService.showWhile(le,250),le})}acceptRenameInput(Le){this._renameInputField.value.acceptInput(Le)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};J.ID="editor.contrib.renameController",J=fe([ee(1,y.a),ee(2,O.a),ee(3,m.a),ee(4,k.a),ee(5,C.b),ee(6,b.a)],J);class he extends v.b{constructor(){super({id:"editor.action.rename",label:c.a("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:E.a.and(r.a.writable,r.a.hasRenameProvider),kbOpts:{kbExpr:r.a.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(Ie,Le){const Te=Ie.get(d.a),[ze,ue]=Array.isArray(Le)&&Le||[void 0,void 0];return I.a.isUri(ze)&&D.a.isIPosition(ue)?Te.openCodeEditor({resource:ze},Te.getActiveCodeEditor()).then(je=>{if(!je)return;je.setPosition(ue),je.invokeWithinContext(Pe=>(this.reportTelemetry(Pe,je),this.run(Pe,je)))},N.f):super.runCommand(Ie,Le)}run(Ie,Le){const Te=J.get(Le);return Te?Te.run():Promise.resolve()}}Object(v.l)(J.ID,J),Object(v.j)(he);const xe=v.c.bindToContribution(J.get);Object(v.k)(new xe({id:"acceptRenameInput",precondition:ne,handler:Ie=>Ie.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:r.a.focus,primary:3}})),Object(v.k)(new xe({id:"acceptRenameInputWithPreview",precondition:E.a.and(ne,E.a.has("config.editor.rename.enablePreview")),handler:Ie=>Ie.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:r.a.focus,primary:1024+3}})),Object(v.k)(new xe({id:"cancelRenameInput",precondition:ne,handler:Ie=>Ie.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:r.a.focus,primary:9,secondary:[1024|9]}})),Object(v.n)("_executeDocumentRenameProvider",function(Ie,Le,...Te){const[ze]=Te;return Object(F.c)(typeof ze=="string"),G(Ie,Le,ze)}),Object(v.n)("_executePrepareRename",function(Ie,Le){return ie(this,void 0,void 0,function*(){const Te=new U(Ie,Le),ze=yield Te.resolveRenameLocation(x.a.None);if(ze==null?void 0:ze.rejectReason)throw new Error(ze.rejectReason);return ze})}),Y.a.as(p.a.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:c.a("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})},QDVR:function(mt,M,t){"use strict";t.d(M,"c",function(){return v}),t.d(M,"b",function(){return d}),t.d(M,"a",function(){return S});var f=t("N0LK"),B,x;class N{constructor(){this._value="",this._pos=0}reset(r){return this._value=r,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(r){const _=r.charCodeAt(0),b=this._value.charCodeAt(this._pos);return _-b}value(){return this._value[this._pos]}}class A{constructor(r=!0){this._caseSensitive=r}reset(r){return this._value=r,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let r=!0;for(;this._to<this._value.length;this._to++){const _=this._value.charCodeAt(this._to);if(_===46)if(r)this._from++;else break;else r=!1}return this}cmp(r){return this._caseSensitive?Object(f.h)(r,this._value,0,r.length,this._from,this._to):Object(f.i)(r,this._value,0,r.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class F{constructor(r=!0,_=!0){this._splitOnBackslash=r,this._caseSensitive=_}reset(r){return this._value=r.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let r=!0;for(;this._to<this._value.length;this._to++){const _=this._value.charCodeAt(this._to);if(_===47||this._splitOnBackslash&&_===92)if(r)this._from++;else break;else r=!1}return this}cmp(r){return this._caseSensitive?Object(f.h)(r,this._value,0,r.length,this._from,this._to):Object(f.i)(r,this._value,0,r.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class I{constructor(r){this._ignorePathCasing=r,this._states=[],this._stateIdx=0}reset(r){return this._value=r,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new F(!1,!this._ignorePathCasing(r)),this._pathIterator.reset(r.path),this._pathIterator.value()&&this._states.push(3)),this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(r){if(this._states[this._stateIdx]===1)return Object(f.g)(r,this._value.scheme);if(this._states[this._stateIdx]===2)return Object(f.g)(r,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(r);if(this._states[this._stateIdx]===4)return Object(f.f)(r,this._value.query);if(this._states[this._stateIdx]===5)return Object(f.f)(r,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}class L{constructor(){this.height=1}rotateLeft(){const r=this.right;return this.right=r.left,r.left=this,this.updateHeight(),r.updateHeight(),r}rotateRight(){const r=this.left;return this.left=r.right,r.right=this,this.updateHeight(),r.updateHeight(),r}updateHeight(){this.height=1+Math.max(this.heightLeft,this.heightRight)}balanceFactor(){return this.heightRight-this.heightLeft}get heightLeft(){var r,_;return(_=(r=this.left)===null||r===void 0?void 0:r.height)!==null&&_!==void 0?_:0}get heightRight(){var r,_;return(_=(r=this.right)===null||r===void 0?void 0:r.height)!==null&&_!==void 0?_:0}}class v{constructor(r){this._iter=r}static forUris(r=()=>!1){return new v(new I(r))}static forStrings(){return new v(new N)}static forConfigKeys(){return new v(new A)}clear(){this._root=void 0}set(r,_){const b=this._iter.reset(r);let h;this._root||(this._root=new L,this._root.segment=b.value());const c=[];for(h=this._root;;){const E=b.cmp(h.segment);if(E>0)h.left||(h.left=new L,h.left.segment=b.value()),c.push([-1,h]),h=h.left;else if(E<0)h.right||(h.right=new L,h.right.segment=b.value()),c.push([1,h]),h=h.right;else if(b.hasNext())b.next(),h.mid||(h.mid=new L,h.mid.segment=b.value()),c.push([0,h]),h=h.mid;else break}const p=h.value;h.value=_,h.key=r;for(let E=c.length-1;E>=0;E--){const y=c[E][1];y.updateHeight();const C=y.balanceFactor();if(C<-1||C>1){const O=c[E][0],k=c[E+1][0];if(O===1&&k===1)c[E][1]=y.rotateLeft();else if(O===-1&&k===-1)c[E][1]=y.rotateRight();else if(O===1&&k===-1)y.right=c[E+1][1]=c[E+1][1].rotateRight(),c[E][1]=y.rotateLeft();else if(O===-1&&k===1)y.left=c[E+1][1]=c[E+1][1].rotateLeft(),c[E][1]=y.rotateRight();else throw new Error;if(E>0)switch(c[E-1][0]){case-1:c[E-1][1].left=c[E][1];break;case 1:c[E-1][1].right=c[E][1];break;case 0:c[E-1][1].mid=c[E][1];break}else this._root=c[0][1]}}return p}get(r){var _;return(_=this._getNode(r))===null||_===void 0?void 0:_.value}_getNode(r){const _=this._iter.reset(r);let b=this._root;for(;b;){const h=_.cmp(b.segment);if(h>0)b=b.left;else if(h<0)b=b.right;else if(_.hasNext())_.next(),b=b.mid;else break}return b}has(r){const _=this._getNode(r);return!((_==null?void 0:_.value)===void 0&&(_==null?void 0:_.mid)===void 0)}delete(r){return this._delete(r,!1)}deleteSuperstr(r){return this._delete(r,!0)}_delete(r,_){var b;const h=this._iter.reset(r),c=[];let p=this._root;for(;p;){const E=h.cmp(p.segment);if(E>0)c.push([-1,p]),p=p.left;else if(E<0)c.push([1,p]),p=p.right;else if(h.hasNext())h.next(),c.push([0,p]),p=p.mid;else break}if(!p)return;if(_?(p.left=void 0,p.mid=void 0,p.right=void 0,p.height=1):(p.key=void 0,p.value=void 0),!p.mid&&!p.value)if(p.left&&p.right){const E=this._min(p.right),{key:y,value:C,segment:O}=E;this._delete(E.key,!1),p.key=y,p.value=C,p.segment=O}else{const E=(b=p.left)!==null&&b!==void 0?b:p.right;if(c.length>0){const[y,C]=c[c.length-1];switch(y){case-1:C.left=E;break;case 0:C.mid=E;break;case 1:C.right=E;break}}else this._root=E}for(let E=c.length-1;E>=0;E--){const y=c[E][1];y.updateHeight();const C=y.balanceFactor();if(C>1?(y.right.balanceFactor()>=0||(y.right=c[E+1][1]=c[E+1][1].rotateRight()),c[E][1]=y.rotateLeft()):C<-1&&(y.left.balanceFactor()<=0||(y.left=c[E+1][1]=c[E+1][1].rotateLeft()),c[E][1]=y.rotateRight()),E>0)switch(c[E-1][0]){case-1:c[E-1][1].left=c[E][1];break;case 1:c[E-1][1].right=c[E][1];break;case 0:c[E-1][1].mid=c[E][1];break}else this._root=c[0][1]}}_min(r){for(;r.left;)r=r.left;return r}findSubstr(r){const _=this._iter.reset(r);let b=this._root,h;for(;b;){const c=_.cmp(b.segment);if(c>0)b=b.left;else if(c<0)b=b.right;else if(_.hasNext())_.next(),h=b.value||h,b=b.mid;else break}return b&&b.value||h}findSuperstr(r){const _=this._iter.reset(r);let b=this._root;for(;b;){const h=_.cmp(b.segment);if(h>0)b=b.left;else if(h<0)b=b.right;else if(_.hasNext())_.next(),b=b.mid;else return b.mid?this._entries(b.mid):void 0}return}forEach(r){for(const[_,b]of this)r(b,_)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(r){if(!r)return;r.left&&(yield*this._entries(r.left)),r.value&&(yield[r.key,r.value]),r.mid&&(yield*this._entries(r.mid)),r.right&&(yield*this._entries(r.right))}}class m{constructor(r,_){this.uri=r,this.value=_}}class d{constructor(r,_){this[B]="ResourceMap",r instanceof d?(this.map=new Map(r.map),this.toKey=_!=null?_:d.defaultToKey):(this.map=new Map,this.toKey=r!=null?r:d.defaultToKey)}set(r,_){return this.map.set(this.toKey(r),new m(r,_)),this}get(r){var _;return(_=this.map.get(this.toKey(r)))===null||_===void 0?void 0:_.value}has(r){return this.map.has(this.toKey(r))}get size(){return this.map.size}clear(){this.map.clear()}delete(r){return this.map.delete(this.toKey(r))}forEach(r,_){typeof _!="undefined"&&(r=r.bind(_));for(let[b,h]of this.map)r(h.value,h.uri,this)}*values(){for(let r of this.map.values())yield r.value}*keys(){for(let r of this.map.values())yield r.uri}*entries(){for(let r of this.map.values())yield[r.uri,r.value]}*[(B=Symbol.toStringTag,Symbol.iterator)](){for(let[,r]of this.map)yield[r.uri,r.value]}}d.defaultToKey=r=>r.toString();class D{constructor(){this[x]="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 r;return(r=this._head)===null||r===void 0?void 0:r.value}get last(){var r;return(r=this._tail)===null||r===void 0?void 0:r.value}has(r){return this._map.has(r)}get(r,_=0){const b=this._map.get(r);return b?(_!==0&&this.touch(b,_),b.value):void 0}set(r,_,b=0){let h=this._map.get(r);if(h)h.value=_,b!==0&&this.touch(h,b);else{h={key:r,value:_,next:void 0,previous:void 0};switch(b){case 0:this.addItemLast(h);break;case 1:this.addItemFirst(h);break;case 2:this.addItemLast(h);break;default:this.addItemLast(h);break}this._map.set(r,h),this._size++}return this}delete(r){return!!this.remove(r)}remove(r){const _=this._map.get(r);return _?(this._map.delete(r),this.removeItem(_),this._size--,_.value):void 0}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const r=this._head;return this._map.delete(r.key),this.removeItem(r),this._size--,r.value}forEach(r,_){const b=this._state;let h=this._head;for(;h;){if(_?r.bind(_)(h.value,h.key,this):r(h.value,h.key,this),this._state!==b)throw new Error("LinkedMap got modified during iteration.");h=h.next}}keys(){const r=this,_=this._state;let b=this._head;const h={[Symbol.iterator](){return h},next(){if(r._state!==_)throw new Error("LinkedMap got modified during iteration.");if(b){const c={value:b.key,done:!1};return b=b.next,c}else return{value:void 0,done:!0}}};return h}values(){const r=this,_=this._state;let b=this._head;const h={[Symbol.iterator](){return h},next(){if(r._state!==_)throw new Error("LinkedMap got modified during iteration.");if(b){const c={value:b.value,done:!1};return b=b.next,c}else return{value:void 0,done:!0}}};return h}entries(){const r=this,_=this._state;let b=this._head;const h={[Symbol.iterator](){return h},next(){if(r._state!==_)throw new Error("LinkedMap got modified during iteration.");if(b){const c={value:[b.key,b.value],done:!1};return b=b.next,c}else return{value:void 0,done:!0}}};return h}[(x=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(r){if(r>=this.size)return;if(r===0){this.clear();return}let _=this._head,b=this.size;for(;_&&b>r;)this._map.delete(_.key),_=_.next,b--;this._head=_,this._size=b,_&&(_.previous=void 0),this._state++}addItemFirst(r){if(!this._head&&!this._tail)this._tail=r;else if(this._head)r.next=this._head,this._head.previous=r;else throw new Error("Invalid list");this._head=r,this._state++}addItemLast(r){if(!this._head&&!this._tail)this._head=r;else if(this._tail)r.previous=this._tail,this._tail.next=r;else throw new Error("Invalid list");this._tail=r,this._state++}removeItem(r){if(r===this._head&&r===this._tail)this._head=void 0,this._tail=void 0;else if(r===this._head){if(!r.next)throw new Error("Invalid list");r.next.previous=void 0,this._head=r.next}else if(r===this._tail){if(!r.previous)throw new Error("Invalid list");r.previous.next=void 0,this._tail=r.previous}else{const _=r.next,b=r.previous;if(!_||!b)throw new Error("Invalid list");_.previous=b,b.next=_}r.next=void 0,r.previous=void 0,this._state++}touch(r,_){if(!this._head||!this._tail)throw new Error("Invalid list");if(_!==1&&_!==2)return;if(_===1){if(r===this._head)return;const b=r.next,h=r.previous;r===this._tail?(h.next=void 0,this._tail=h):(b.previous=h,h.next=b),r.previous=void 0,r.next=this._head,this._head.previous=r,this._head=r,this._state++}else if(_===2){if(r===this._tail)return;const b=r.next,h=r.previous;r===this._head?(b.previous=void 0,this._head=b):(b.previous=h,h.next=b),r.next=void 0,r.previous=this._tail,this._tail.next=r,this._tail=r,this._state++}}toJSON(){const r=[];return this.forEach((_,b)=>{r.push([b,_])}),r}fromJSON(r){this.clear();for(const[_,b]of r)this.set(_,b)}}class S extends D{constructor(r,_=1){super();this._limit=r,this._ratio=Math.min(Math.max(0,_),1)}get limit(){return this._limit}set limit(r){this._limit=r,this.checkTrim()}get(r,_=2){return super.get(r,_)}peek(r){return super.get(r,0)}set(r,_){return super.set(r,_,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},QFiB:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:function(){return t.e(338).then(t.bind(null,"PhST"))}})},QMLA:function(mt,M,t){},QRHv:function(mt,M,t){"use strict";t.d(M,"f",function(){return F}),t.d(M,"b",function(){return v}),t.d(M,"c",function(){return m}),t.d(M,"a",function(){return D}),t.d(M,"e",function(){return _}),t.d(M,"d",function(){return b});var f=t("6OMU"),B=t("4bUh"),x=t("cGHE"),N=t("aokT"),A=t("twdY");function F(h){let c=0,p=0,E=0,y=0;for(let C=0,O=h.length;C<O;C++){const k=h.charCodeAt(C);k===13?(c===0&&(p=C),c++,C+1<O&&h.charCodeAt(C+1)===10?(y|=2,C++):y|=3,E=C+1):k===10&&(y|=1,c===0&&(p=C),c++,E=C+1)}return c===0&&(p=h.length),[c,p,h.length-E,y]}function I(h){return(h<<0|0<<8|0<<11|1<<14|2<<23)>>>0}const L=new Uint32Array(0).buffer;class v{constructor(){this.tokens=[]}add(h,c){if(this.tokens.length>0){const p=this.tokens[this.tokens.length-1],E=p.startLineNumber+p.tokens.length-1;if(E+1===h){p.tokens.push(c);return}}this.tokens.push(new S(h,[c]))}}class m{constructor(h){this._tokens=h,this._tokenCount=h.length/4}toString(h){let c=[];for(let p=0;p<this._tokenCount;p++)c.push(`(${this._getDeltaLine(p)+h},${this._getStartCharacter(p)}-${this._getEndCharacter(p)})`);return`[${c.join(",")}]`}getMaxDeltaLine(){const h=this._getTokenCount();return h===0?-1:this._getDeltaLine(h-1)}getRange(){const h=this._getTokenCount();if(h===0)return null;const c=this._getStartCharacter(0),p=this._getDeltaLine(h-1),E=this._getEndCharacter(h-1);return new N.a(0,c+1,p,E+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(h){return this._tokens[4*h]}_getStartCharacter(h){return this._tokens[4*h+1]}_getEndCharacter(h){return this._tokens[4*h+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(h){let c=0,p=this._getTokenCount()-1;for(;c<p;){const E=c+Math.floor((p-c)/2),y=this._getDeltaLine(E);if(y<h)c=E+1;else if(y>h)p=E-1;else{let C=E;for(;C>c&&this._getDeltaLine(C-1)===h;)C--;let O=E;for(;O<p&&this._getDeltaLine(O+1)===h;)O++;return new d(this._tokens.subarray(4*C,4*O+4))}}return this._getDeltaLine(c)===h?new d(this._tokens.subarray(4*c,4*c+4)):null}clear(){this._tokenCount=0}removeTokens(h,c,p,E){const y=this._tokens,C=this._tokenCount;let O=0,k=!1,Y=0;for(let Q=0;Q<C;Q++){const H=4*Q,Z=y[H],oe=y[H+1],$=y[H+2],te=y[H+3];if((Z>h||Z===h&&$>=c)&&(Z<p||Z===p&&oe<=E))k=!0;else{if(O===0&&(Y=Z),k){const ne=4*O;y[ne]=Z-Y,y[ne+1]=oe,y[ne+2]=$,y[ne+3]=te}O++}}return this._tokenCount=O,Y}split(h,c,p,E){const y=this._tokens,C=this._tokenCount;let O=[],k=[],Y=O,Q=0,H=0;for(let Z=0;Z<C;Z++){const oe=4*Z,$=y[oe],te=y[oe+1],ne=y[oe+2],Ee=y[oe+3];if($>h||$===h&&ne>=c){if($<p||$===p&&te<=E)continue;Y!==k&&(Y=k,Q=0,H=$)}Y[Q++]=$-H,Y[Q++]=te,Y[Q++]=ne,Y[Q++]=Ee}return[new m(new Uint32Array(O)),new m(new Uint32Array(k)),H]}acceptDeleteRange(h,c,p,E,y){const C=this._tokens,O=this._tokenCount,k=E-c;let Y=0,Q=!1;for(let H=0;H<O;H++){const Z=4*H;let oe=C[Z],$=C[Z+1],te=C[Z+2];const ne=C[Z+3];if(oe<c||oe===c&&te<=p){Y++;continue}else if(oe===c&&$<p)oe===E&&te>y?te-=y-p:te=p;else if(oe===c&&$===p)if(oe===E&&te>y)te-=y-p;else{Q=!0;continue}else if(oe<E||oe===E&&$<y)if(oe===E&&te>y)oe===c?($=p,te=$+(te-y)):($=0,te=$+(te-y));else{Q=!0;continue}else if(oe>E){if(k===0&&!Q){Y=O;break}oe-=k}else if(oe===E&&$>=y)h&&oe===0&&($+=h,te+=h),oe-=k,$-=y-p,te-=y-p;else throw new Error("Not possible!");const Ee=4*Y;C[Ee]=oe,C[Ee+1]=$,C[Ee+2]=te,C[Ee+3]=ne,Y++}this._tokenCount=Y}acceptInsertText(h,c,p,E,y,C){const O=p===0&&E===1&&(C>=48&&C<=57||C>=65&&C<=90||C>=97&&C<=122),k=this._tokens,Y=this._tokenCount;for(let Q=0;Q<Y;Q++){const H=4*Q;let Z=k[H],oe=k[H+1],$=k[H+2];if(Z<h||Z===h&&$<c)continue;if(Z===h&&$===c)if(O)$+=1;else continue;else if(Z===h&&oe<c&&c<$)p===0?$+=E:$=c;else{if(Z===h&&oe===c&&O)continue;if(Z===h)if(Z+=p,p===0)oe+=E,$+=E;else{const te=$-oe;oe=y+(oe-c),$=oe+te}else Z+=p}k[H]=Z,k[H+1]=oe,k[H+2]=$}}}class d{constructor(h){this._tokens=h}getCount(){return this._tokens.length/4}getStartCharacter(h){return this._tokens[4*h+1]}getEndCharacter(h){return this._tokens[4*h+2]}getMetadata(h){return this._tokens[4*h+3]}}class D{constructor(h,c){this.startLineNumber=h,this.tokens=c,this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}toString(){return this.tokens.toString(this.startLineNumber)}_updateEndLineNumber(){this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}isEmpty(){return this.tokens.isEmpty()}getLineTokens(h){return this.startLineNumber<=h&&h<=this.endLineNumber?this.tokens.getLineTokens(h-this.startLineNumber):null}getRange(){const h=this.tokens.getRange();return h&&new N.a(this.startLineNumber+h.startLineNumber,h.startColumn,this.startLineNumber+h.endLineNumber,h.endColumn)}removeTokens(h){const c=h.startLineNumber-this.startLineNumber,p=h.endLineNumber-this.startLineNumber;this.startLineNumber+=this.tokens.removeTokens(c,h.startColumn-1,p,h.endColumn-1),this._updateEndLineNumber()}split(h){const c=h.startLineNumber-this.startLineNumber,p=h.endLineNumber-this.startLineNumber,[E,y,C]=this.tokens.split(c,h.startColumn-1,p,h.endColumn-1);return[new D(this.startLineNumber,E),new D(this.startLineNumber+C,y)]}applyEdit(h,c){const[p,E,y]=F(c);this.acceptEdit(h,p,E,y,c.length>0?c.charCodeAt(0):0)}acceptEdit(h,c,p,E,y){this._acceptDeleteRange(h),this._acceptInsertText(new x.a(h.startLineNumber,h.startColumn),c,p,E,y),this._updateEndLineNumber()}_acceptDeleteRange(h){if(h.startLineNumber===h.endLineNumber&&h.startColumn===h.endColumn)return;const c=h.startLineNumber-this.startLineNumber,p=h.endLineNumber-this.startLineNumber;if(p<0){const y=p-c;this.startLineNumber-=y;return}const E=this.tokens.getMaxDeltaLine();if(c>=E+1)return;if(c<0&&p>=E+1){this.startLineNumber=0,this.tokens.clear();return}if(c<0){const y=-c;this.startLineNumber-=y,this.tokens.acceptDeleteRange(h.startColumn-1,0,0,p,h.endColumn-1)}else this.tokens.acceptDeleteRange(0,c,h.startColumn-1,p,h.endColumn-1)}_acceptInsertText(h,c,p,E,y){if(c===0&&p===0)return;const C=h.lineNumber-this.startLineNumber;if(C<0){this.startLineNumber+=c;return}const O=this.tokens.getMaxDeltaLine();if(C>=O+1)return;this.tokens.acceptInsertText(C,h.column-1,c,p,E,y)}}class S{constructor(h,c){this.startLineNumber=h,this.tokens=c}}function r(h){return h instanceof Uint32Array?h:new Uint32Array(h)}class _{constructor(h){this._pieces=[],this._isComplete=!1,this._languageIdCodec=h}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(h,c){this._pieces=h||[],this._isComplete=c}setPartial(h,c){let p=h;if(c.length>0){const y=c[0].getRange(),C=c[c.length-1].getRange();if(!y||!C)return h;p=h.plusRange(y).plusRange(C)}let E=null;for(let y=0,C=this._pieces.length;y<C;y++){const O=this._pieces[y];if(O.endLineNumber<p.startLineNumber)continue;if(O.startLineNumber>p.endLineNumber){E=E||{index:y};break}if(O.removeTokens(p),O.isEmpty()){this._pieces.splice(y,1),y--,C--;continue}if(O.endLineNumber<p.startLineNumber)continue;if(O.startLineNumber>p.endLineNumber){E=E||{index:y};continue}const[k,Y]=O.split(p);if(k.isEmpty()){E=E||{index:y};continue}if(Y.isEmpty())continue;this._pieces.splice(y,1,k,Y),y++,C++,E=E||{index:y}}return E=E||{index:this._pieces.length},c.length>0&&(this._pieces=f.b(this._pieces,E.index,c)),p}isComplete(){return this._isComplete}addSemanticTokens(h,c){const p=this._pieces;if(p.length===0)return c;const E=_._findFirstPieceWithLine(p,h),y=p[E].getLineTokens(h);if(!y)return c;const C=c.getCount(),O=y.getCount();let k=0,Y=[],Q=0,H=0;const Z=(oe,$)=>{if(oe===H)return;H=oe,Y[Q++]=oe,Y[Q++]=$};for(let oe=0;oe<O;oe++){const $=y.getStartCharacter(oe),te=y.getEndCharacter(oe),ne=y.getMetadata(oe),Ee=((ne&1?2048:0)|(ne&2?4096:0)|(ne&4?8192:0)|(ne&8?8372224:0)|(ne&16?4286578688:0))>>>0,fe=~Ee>>>0;for(;k<C&&c.getEndOffset(k)<=$;)Z(c.getEndOffset(k),c.getMetadata(k)),k++;for(k<C&&c.getStartOffset(k)<$&&Z($,c.getMetadata(k));k<C&&c.getEndOffset(k)<te;)Z(c.getEndOffset(k),c.getMetadata(k)&fe|ne&Ee),k++;if(k<C)Z(te,c.getMetadata(k)&fe|ne&Ee),c.getEndOffset(k)===te&&k++;else{const ee=Math.min(Math.max(0,k-1),C-1);Z(te,c.getMetadata(ee)&fe|ne&Ee)}}for(;k<C;)Z(c.getEndOffset(k),c.getMetadata(k)),k++;return new B.a(new Uint32Array(Y),c.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(h,c){let p=0,E=h.length-1;for(;p<E;){let y=p+Math.floor((E-p)/2);if(h[y].endLineNumber<c)p=y+1;else if(h[y].startLineNumber>c)E=y-1;else{for(;y>p&&h[y-1].startLineNumber<=c&&c<=h[y-1].endLineNumber;)y--;return y}}return p}acceptEdit(h,c,p,E,y){for(const C of this._pieces)C.acceptEdit(h,c,p,E,y)}}class b{constructor(h){this._lineTokens=[],this._len=0,this._languageIdCodec=h}flush(){this._lineTokens=[],this._len=0}getTokens(h,c,p){let E=null;if(c<this._len&&(E=this._lineTokens[c]),E!==null&&E!==L)return new B.a(r(E),p,this._languageIdCodec);const y=new Uint32Array(2);return y[0]=p.length,y[1]=I(this._languageIdCodec.encodeLanguageId(h)),new B.a(y,p,this._languageIdCodec)}static _massageTokens(h,c,p){const E=p?r(p):null;if(c===0){let y=!1;if(E&&E.length>1&&(y=A.D.getLanguageId(E[1])!==h),!y)return L}if(!E||E.length===0){const y=new Uint32Array(2);return y[0]=c,y[1]=I(h),y.buffer}return E[E.length-2]=c,E.byteOffset===0&&E.byteLength===E.buffer.byteLength?E.buffer:E}_ensureLine(h){for(;h>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(h,c){if(c===0)return;h+c>this._len&&(c=this._len-h),this._lineTokens.splice(h,c),this._len-=c}_insertLines(h,c){if(c===0)return;let p=[];for(let E=0;E<c;E++)p[E]=null;this._lineTokens=f.b(this._lineTokens,h,p),this._len+=c}setTokens(h,c,p,E,y){const C=b._massageTokens(this._languageIdCodec.encodeLanguageId(h),p,E);this._ensureLine(c);const O=this._lineTokens[c];return this._lineTokens[c]=C,y?!b._equals(O,C):!1}static _equals(h,c){if(!h||!c)return!h&&!c;const p=r(h),E=r(c);if(p.length!==E.length)return!1;for(let y=0,C=p.length;y<C;y++)if(p[y]!==E[y])return!1;return!0}acceptEdit(h,c,p){this._acceptDeleteRange(h),this._acceptInsertText(new x.a(h.startLineNumber,h.startColumn),c,p)}_acceptDeleteRange(h){const c=h.startLineNumber-1;if(c>=this._len)return;if(h.startLineNumber===h.endLineNumber){if(h.startColumn===h.endColumn)return;this._lineTokens[c]=b._delete(this._lineTokens[c],h.startColumn-1,h.endColumn-1);return}this._lineTokens[c]=b._deleteEnding(this._lineTokens[c],h.startColumn-1);const p=h.endLineNumber-1;let E=null;p<this._len&&(E=b._deleteBeginning(this._lineTokens[p],h.endColumn-1)),this._lineTokens[c]=b._append(this._lineTokens[c],E),this._deleteLines(h.startLineNumber,h.endLineNumber-h.startLineNumber)}_acceptInsertText(h,c,p){if(c===0&&p===0)return;const E=h.lineNumber-1;if(E>=this._len)return;if(c===0){this._lineTokens[E]=b._insert(this._lineTokens[E],h.column-1,p);return}this._lineTokens[E]=b._deleteEnding(this._lineTokens[E],h.column-1),this._lineTokens[E]=b._insert(this._lineTokens[E],h.column-1,p),this._insertLines(h.lineNumber,c)}static _deleteBeginning(h,c){return h===null||h===L?h:b._delete(h,0,c)}static _deleteEnding(h,c){if(h===null||h===L)return h;const p=r(h),E=p[p.length-2];return b._delete(h,c,E)}static _delete(h,c,p){if(h===null||h===L||c===p)return h;const E=r(h),y=E.length>>>1;if(c===0&&E[E.length-2]===p)return L;const C=B.a.findIndexInTokensArray(E,c),O=C>0?E[C-1<<1]:0,k=E[C<<1];if(p<k){const oe=p-c;for(let $=C;$<y;$++)E[$<<1]-=oe;return h}let Y,Q;O!==c?(E[C<<1]=c,Y=C+1<<1,Q=c):(Y=C<<1,Q=O);const H=p-c;for(let oe=C+1;oe<y;oe++){const $=E[oe<<1]-H;$>Q&&(E[Y++]=$,E[Y++]=E[(oe<<1)+1],Q=$)}if(Y===E.length)return h;let Z=new Uint32Array(Y);return Z.set(E.subarray(0,Y),0),Z.buffer}static _append(h,c){if(c===L)return h;if(h===L)return c;if(h===null)return h;if(c===null)return null;const p=r(h),E=r(c),y=E.length>>>1;let C=new Uint32Array(p.length+E.length);C.set(p,0);let O=p.length;const k=p[p.length-2];for(let Y=0;Y<y;Y++)C[O++]=E[Y<<1]+k,C[O++]=E[(Y<<1)+1];return C.buffer}static _insert(h,c,p){if(h===null||h===L)return h;const E=r(h),y=E.length>>>1;let C=B.a.findIndexInTokensArray(E,c);if(C>0){const O=E[C-1<<1];O===c&&C--}for(let O=C;O<y;O++)E[O<<1]+=p;return h}}},QVNv:function(mt,M,t){"use strict";t.d(M,"b",function(){return c}),t.d(M,"g",function(){return p}),t.d(M,"a",function(){return y}),t.d(M,"c",function(){return O}),t.d(M,"e",function(){return Y}),t.d(M,"d",function(){return $}),t.d(M,"f",function(){return ne});var f=t("JQT/"),B=t("/cxE"),x=t("fpMC"),N=t("pmY6"),A=t("5Y4S"),F=t("746U"),I=t("bY76"),L=t("cGHE"),v=t("aokT"),m=t("twdY"),d=t("t49l"),D=t("uACm"),S=t("3/fG"),r=t("fjLI"),_=t("nnTU"),b=t("T8No"),h=function(Ee,fe,ee,ie){function U(G){return G instanceof ee?G:new ee(function(J){J(G)})}return new(ee||(ee=Promise))(function(G,J){function he(Le){try{Ie(ie.next(Le))}catch(Te){J(Te)}}function xe(Le){try{Ie(ie.throw(Le))}catch(Te){J(Te)}}function Ie(Le){Le.done?G(Le.value):U(Le.value).then(he,xe)}Ie((ie=ie.apply(Ee,fe||[])).next())})};const c={Visible:new b.c("suggestWidgetVisible",!1,Object(S.a)("suggestWidgetVisible","Whether suggestion are visible")),DetailsVisible:new b.c("suggestWidgetDetailsVisible",!1,Object(S.a)("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new b.c("suggestWidgetMultipleSuggestions",!1,Object(S.a)("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new b.c("suggestionMakesTextEdit",!0,Object(S.a)("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new b.c("acceptSuggestionOnEnter",!0,Object(S.a)("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new b.c("suggestionHasInsertAndReplaceRange",!1,Object(S.a)("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new b.c("suggestionInsertMode",void 0,{type:"string",description:Object(S.a)("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new b.c("suggestionCanResolve",!1,Object(S.a)("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},p=new r.b("suggestWidgetStatusBar");class E{constructor(Ee,fe,ee,ie){this.position=Ee,this.completion=fe,this.container=ee,this.provider=ie,this.isInvalid=!1,this.score=x.a.Default,this.distance=0,this.textLabel=typeof fe.label=="string"?fe.label:fe.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=fe.sortText&&fe.sortText.toLowerCase(),this.filterTextLow=fe.filterText&&fe.filterText.toLowerCase(),v.a.isIRange(fe.range)?(this.editStart=new L.a(fe.range.startLineNumber,fe.range.startColumn),this.editInsertEnd=new L.a(fe.range.endLineNumber,fe.range.endColumn),this.editReplaceEnd=new L.a(fe.range.endLineNumber,fe.range.endColumn),this.isInvalid=this.isInvalid||v.a.spansMultipleLines(fe.range)||fe.range.startLineNumber!==Ee.lineNumber):(this.editStart=new L.a(fe.range.insert.startLineNumber,fe.range.insert.startColumn),this.editInsertEnd=new L.a(fe.range.insert.endLineNumber,fe.range.insert.endColumn),this.editReplaceEnd=new L.a(fe.range.replace.endLineNumber,fe.range.replace.endColumn),this.isInvalid=this.isInvalid||v.a.spansMultipleLines(fe.range.insert)||v.a.spansMultipleLines(fe.range.replace)||fe.range.insert.startLineNumber!==Ee.lineNumber||fe.range.replace.startLineNumber!==Ee.lineNumber||fe.range.insert.startColumn!==fe.range.replace.startColumn),typeof ie.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(Ee){return h(this,void 0,void 0,function*(){if(!this._resolveCache){const fe=Ee.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,Ee)).then(ee=>{Object.assign(this.completion,ee),this._isResolved=!0,fe.dispose()},ee=>{Object(B.e)(ee)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}class y{constructor(Ee=2,fe=new Set,ee=new Set,ie=!0){this.snippetSortOrder=Ee,this.kindFilter=fe,this.providerFilter=ee,this.showDeprecated=ie}}y.default=new y;let C;function O(){return C}class k{constructor(Ee,fe,ee,ie){this.items=Ee,this.needsClipboard=fe,this.durations=ee,this.disposable=ie}}function Y(Ee,fe,ee=y.default,ie={triggerKind:0},U=f.a.None){return h(this,void 0,void 0,function*(){const G=new A.a(!0);fe=fe.clone();const J=Ee.getWordAtPosition(fe),he=J?new v.a(fe.lineNumber,J.startColumn,fe.lineNumber,J.endColumn):v.a.fromPositions(fe),xe={replace:he,insert:he.setEndPosition(fe.lineNumber,fe.column)},Ie=[],Le=new N.b,Te=[];let ze=!1;const ue=(Pe,ve,ce)=>{var le,Ce,ye;if(!ve)return;for(let ge of ve.suggestions)if(!ee.kindFilter.has(ge.kind)){if(!ee.showDeprecated&&((le=ge==null?void 0:ge.tags)===null||le===void 0?void 0:le.includes(1)))continue;ge.range||(ge.range=xe),ge.sortText||(ge.sortText=typeof ge.label=="string"?ge.label:ge.label.label),!ze&&ge.insertTextRules&&ge.insertTextRules&4&&(ze=D.c.guessNeedsClipboard(ge.insertText)),Ie.push(new E(fe,ge,ve,Pe))}Object(N.g)(ve)&&Le.add(ve),Te.push({providerName:(Ce=Pe._debugDisplayName)!==null&&Ce!==void 0?Ce:"unkown_provider",elapsedProvider:(ye=ve.duration)!==null&&ye!==void 0?ye:-1,elapsedOverall:ce.elapsed()})},je=(()=>h(this,void 0,void 0,function*(){if(!C||ee.kindFilter.has(27))return;if(ee.providerFilter.size>0&&!ee.providerFilter.has(C))return;const Pe=new A.a(!0),ve=yield C.provideCompletionItems(Ee,fe,ie,U);ue(C,ve,Pe)}))();for(let Pe of m.d.orderedGroups(Ee)){let ve=Ie.length;if(yield Promise.all(Pe.map(ce=>h(this,void 0,void 0,function*(){if(ee.providerFilter.size>0&&!ee.providerFilter.has(ce))return;try{const le=new A.a(!0),Ce=yield ce.provideCompletionItems(Ee,fe,ie,U);ue(ce,Ce,le)}catch(le){Object(B.g)(le)}}))),ve!==Ie.length||U.isCancellationRequested)break}return yield je,U.isCancellationRequested?(Le.dispose(),Promise.reject(Object(B.b)())):new k(Ie.sort($(ee.snippetSortOrder)),ze,{entries:Te,elapsed:G.elapsed()},Le)})}function Q(Ee,fe){if(Ee.sortTextLow&&fe.sortTextLow){if(Ee.sortTextLow<fe.sortTextLow)return-1;if(Ee.sortTextLow>fe.sortTextLow)return 1}return Ee.completion.label<fe.completion.label?-1:Ee.completion.label>fe.completion.label?1:Ee.completion.kind-fe.completion.kind}function H(Ee,fe){if(Ee.completion.kind!==fe.completion.kind){if(Ee.completion.kind===27)return-1;if(fe.completion.kind===27)return 1}return Q(Ee,fe)}function Z(Ee,fe){if(Ee.completion.kind!==fe.completion.kind){if(Ee.completion.kind===27)return 1;if(fe.completion.kind===27)return-1}return Q(Ee,fe)}const oe=new Map;oe.set(0,H),oe.set(2,Z),oe.set(1,Q);function $(Ee){return oe.get(Ee)}_.a.registerCommand("_executeCompletionItemProvider",(Ee,...fe)=>h(void 0,void 0,void 0,function*(){const[ee,ie,U,G]=fe;Object(F.c)(I.a.isUri(ee)),Object(F.c)(L.a.isIPosition(ie)),Object(F.c)(typeof U=="string"||!U),Object(F.c)(typeof G=="number"||!G);const J=yield Ee.get(d.a).createModelReference(ee);try{const he={incomplete:!1,suggestions:[]},xe=[],Ie=yield Y(J.object.textEditorModel,L.a.lift(ie),void 0,{triggerCharacter:U,triggerKind:U?1:0});for(const Le of Ie.items)xe.length<(G!=null?G:0)&&xe.push(Le.resolve(f.a.None)),he.incomplete=he.incomplete||Le.container.incomplete,he.suggestions.push(Le.completion);try{return yield Promise.all(xe),he}finally{setTimeout(()=>Ie.disposable.dispose(),100)}}finally{J.dispose()}}));const te=new class{constructor(){this.onlyOnceSuggestions=[]}provideCompletionItems(){let Ee=this.onlyOnceSuggestions.slice(0),fe={suggestions:Ee};return this.onlyOnceSuggestions.length=0,fe}};m.d.register("*",te);function ne(Ee,fe){setTimeout(()=>{te.onlyOnceSuggestions.push(...fe),Ee.getContribution("editor.contrib.suggestController").triggerSuggest(new Set().add(te))},0)}},QY8A:function(mt,M,t){"use strict";t.d(M,"a",function(){return $t});var f=t("X+cX"),B=t("/cxE"),x=t("/kV6"),N=t("pmY6"),A=t("Vxe3"),F=t("cGHE"),I=t("aokT"),L=t("iNS8"),v=t("3/fG"),m=t("nnTU"),d=t("+7oY"),D=t("T8No"),S=t("Cg/j"),r=t("nrhi"),_=t("k9mg"),b=t("sM1p"),h=t("A+jI"),c=t("9o5J"),p=t("EffR"),E=t("44XX"),y=t("zrhQ"),C=t("MI8n"),O=t("tYmi"),k=t("gslv"),Y=t("KaET"),Q=t("03kh"),H=t("tX9W"),Z=t("cMvZ"),oe=t("WBhO"),$=t("t49l"),te=t("O/se"),ne=t("7lZ/"),Ee=t("xONI"),fe=t("fpMC"),ee=t("3rx1"),ie=t("bexQ"),U=t("R8sh"),G=t("ptcw"),J=t("t9D7"),he=function(it,re,We,tt){var Et=arguments.length,It=Et<3?re:tt===null?tt=Object.getOwnPropertyDescriptor(re,We):tt,Rt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")It=Reflect.decorate(it,re,We,tt);else for(var vo=it.length-1;vo>=0;vo--)(Rt=it[vo])&&(It=(Et<3?Rt(It):Et>3?Rt(re,We,It):Rt(re,We))||It);return Et>3&&It&&Object.defineProperty(re,We,It),It},xe=function(it,re){return function(We,tt){re(We,tt,it)}};let Ie=class{constructor(re){this._resolverService=re}hasChildren(re){return re instanceof c.c?!0:re instanceof c.a}getChildren(re){if(re instanceof c.c)return re.groups;if(re instanceof c.a)return re.resolve(this._resolverService).then(We=>We.children);throw new Error("bad tree")}};Ie=he([xe(0,$.a)],Ie);class Le{getHeight(){return 23}getTemplateId(it){return it instanceof c.a?je.id:ve.id}}let Te=class{constructor(re){this._keybindingService=re}getKeyboardNavigationLabel(re){var We;if(re instanceof c.b){const tt=(We=re.parent.getPreview(re))===null||We===void 0?void 0:We.preview(re.range);if(tt)return tt.value}return Object(k.b)(re.uri)}};Te=he([xe(0,ie.a)],Te);class ze{getId(it){return it instanceof c.b?it.id:it.uri}}let ue=class extends N.a{constructor(re,We,tt){super();this._uriLabel=We;const Et=document.createElement("div");Et.classList.add("reference-file"),this.file=this._register(new Ee.a(Et,{supportHighlights:!0})),this.badge=new te.a(p.q(Et,p.a(".count"))),this._register(Object(G.a)(this.badge,tt)),re.appendChild(Et)}set(re,We){let tt=Object(k.d)(re.uri);this.file.setLabel(Object(ee.a)(re.uri),this._uriLabel.getUriLabel(tt,{relative:!0}),{title:this._uriLabel.getUriLabel(re.uri),matches:We});const Et=re.children.length;this.badge.setCount(Et),Et>1?this.badge.setTitleFormat(Object(v.a)("referencesCount","{0} references",Et)):this.badge.setTitleFormat(Object(v.a)("referenceCount","{0} reference",Et))}};ue=he([xe(1,U.a),xe(2,J.b)],ue);let je=class it{constructor(re){this._instantiationService=re,this.templateId=it.id}renderTemplate(re){return this._instantiationService.createInstance(ue,re)}renderElement(re,We,tt){tt.set(re.element,Object(fe.c)(re.filterData))}disposeTemplate(re){re.dispose()}};je.id="FileReferencesRenderer",je=he([xe(0,S.a)],je);class Pe{constructor(it){this.label=new ne.a(it,!1)}set(it,re){var We;const tt=(We=it.parent.getPreview(it))===null||We===void 0?void 0:We.preview(it.range);if(!tt||!tt.value)this.label.set(`${Object(k.b)(it.uri)}:${it.range.startLineNumber+1}:${it.range.startColumn+1}`);else{const{value:Et,highlight:It}=tt;re&&!fe.a.isDefault(re)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(Et,Object(fe.c)(re))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(Et,[It]))}}}class ve{constructor(){this.templateId=ve.id}renderTemplate(it){return new Pe(it)}renderElement(it,re,We){We.set(it.element,it.filterData)}disposeTemplate(){}}ve.id="OneReferenceRenderer";class ce{getWidgetAriaLabel(){return Object(v.a)("treeAriaLabel","References")}getAriaLabel(it){return it.ariaMessage}}var le=t("MD5Z"),Ce=t("OAO6"),ye=function(it,re,We,tt){var Et=arguments.length,It=Et<3?re:tt===null?tt=Object.getOwnPropertyDescriptor(re,We):tt,Rt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")It=Reflect.decorate(it,re,We,tt);else for(var vo=it.length-1;vo>=0;vo--)(Rt=it[vo])&&(It=(Et<3?Rt(It):Et>3?Rt(re,We,It):Rt(re,We))||It);return Et>3&&It&&Object.defineProperty(re,We,It),It},ge=function(it,re){return function(We,tt){re(We,tt,it)}},Me=function(it,re,We,tt){function Et(It){return It instanceof We?It:new We(function(Rt){Rt(It)})}return new(We||(We=Promise))(function(It,Rt){function vo(Do){try{xo(tt.next(Do))}catch(Lo){Rt(Lo)}}function Mo(Do){try{xo(tt.throw(Do))}catch(Lo){Rt(Lo)}}function xo(Do){Do.done?It(Do.value):Et(Do.value).then(vo,Mo)}xo((tt=tt.apply(it,re||[])).next())})};class De{constructor(it,re){this._editor=it,this._model=re,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new N.b,this._callOnModelChange=new N.b,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const it=this._editor.getModel();if(!it)return;for(let re of this._model.references)if(re.uri.toString()===it.uri.toString()){this._addDecorations(re.parent);return}}_addDecorations(it){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const re=[],We=[];for(let Et=0,It=it.children.length;Et<It;Et++){let Rt=it.children[Et];if(this._decorationIgnoreSet.has(Rt.id))continue;if(Rt.uri.toString()!==this._editor.getModel().uri.toString())continue;re.push({range:Rt.range,options:De.DecorationOptions}),We.push(Et)}const tt=this._editor.deltaDecorations([],re);for(let Et=0;Et<tt.length;Et++)this._decorations.set(tt[Et],it.children[We[Et]])}_onDecorationChanged(){const it=[],re=this._editor.getModel();if(!re)return;for(let[We,tt]of this._decorations){const Et=re.getDecorationRange(We);if(!Et)continue;let It=!1;if(I.a.equalsRange(Et,tt.range))continue;if(I.a.spansMultipleLines(Et))It=!0;else{const Rt=tt.range.endColumn-tt.range.startColumn,vo=Et.endColumn-Et.startColumn;Rt!==vo&&(It=!0)}It?(this._decorationIgnoreSet.add(tt.id),it.push(We)):tt.range=Et}for(let We=0,tt=it.length;We<tt;We++)this._decorations.delete(it[We]);this._editor.deltaDecorations(it,[])}removeDecorations(){this._editor.deltaDecorations([...this._decorations.keys()],[]),this._decorations.clear()}}De.DecorationOptions=H.b.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class we{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(it){let re,We;try{const tt=JSON.parse(it);re=tt.ratio,We=tt.heightInLines}catch(tt){}return{ratio:re||.7,heightInLines:We||18}}}class Oe extends _.c{}let nt=class extends L.c{constructor(re,We,tt,Et,It,Rt,vo,Mo,xo,Do,Lo,To){super(re,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},Rt);this._defaultTreeKeyboardSupport=We,this.layoutData=tt,this._textModelResolverService=It,this._instantiationService=Rt,this._peekViewService=vo,this._uriLabel=Mo,this._undoRedoService=xo,this._keybindingService=Do,this._modeService=Lo,this._languageConfigurationService=To,this._disposeOnNewModel=new N.b,this._callOnDispose=new N.b,this._onDidSelectReference=new C.b,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new p.b(0,0),this._applyTheme(Et.getColorTheme()),this._callOnDispose.add(Et.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(re,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),Object(N.f)(this._preview),Object(N.f)(this._previewNotAvailableMessage),Object(N.f)(this._tree),Object(N.f)(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(re){const We=re.getColor(L.e)||y.a.transparent;this.style({arrowColor:We,frameColor:We,headerBackgroundColor:re.getColor(L.p)||y.a.transparent,primaryHeadingColor:re.getColor(L.q),secondaryHeadingColor:re.getColor(L.r)})}show(re){this.editor.revealRangeInCenterIfOutsideViewport(re,0),super.show(re,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(re){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:re.ctrlKey||re.metaKey||re.altKey?"side":"open",source:"title"})}_fillBody(re){this.setCssClass("reference-zone-widget"),this._messageContainer=p.q(re,p.a("div.messages")),p.K(this._messageContainer),this._splitView=new E.b(re,{orientation:1}),this._previewContainer=p.q(re,p.a("div.preview.inline"));let We={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(Q.a,this._previewContainer,We,this.editor),p.K(this._previewContainer),this._previewNotAvailableMessage=new H.c(v.a("missingPreviewMessage","no preview available"),H.c.DEFAULT_CREATION_OPTIONS,null,null,this._undoRedoService,this._modeService,this._languageConfigurationService),this._treeContainer=p.q(re,p.a("div.ref-tree.inline"));const tt={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new ce,keyboardNavigationLabelProvider:this._instantiationService.createInstance(Te),identityProvider:new ze,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:L.j}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(p.o(this._treeContainer,"keydown",It=>{It.equals(9)&&(this._keybindingService.dispatchEvent(It,It.target),It.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(Oe,"ReferencesWidget",this._treeContainer,new Le,[this._instantiationService.createInstance(je),this._instantiationService.createInstance(ve)],this._instantiationService.createInstance(Ie),tt),this._splitView.addView({onDidChange:C.c.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:It=>{this._preview.layout({height:this._dim.height,width:It})}},E.a.Distribute),this._splitView.addView({onDidChange:C.c.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:It=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${It}px`,this._tree.layout(this._dim.height,It)}},E.a.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let Et=(It,Rt)=>{It instanceof c.b&&(Rt==="show"&&this._revealReference(It,!1),this._onDidSelectReference.fire({element:It,kind:Rt,source:"tree"}))};this._tree.onDidOpen(It=>{It.sideBySide?Et(It.element,"side"):It.editorOptions.pinned?Et(It.element,"goto"):Et(It.element,"show")}),p.K(this._treeContainer)}_onWidth(re){this._dim&&this._doLayoutBody(this._dim.height,re)}_doLayoutBody(re,We){super._doLayoutBody(re,We),this._dim=new p.b(We,re),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(We),this._splitView.resizeView(0,We*this.layoutData.ratio)}setSelection(re){return this._revealReference(re,!0).then(()=>{if(!this._model)return;this._tree.setSelection([re]),this._tree.setFocus([re])})}setModel(re){return this._disposeOnNewModel.clear(),this._model=re,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=v.a("noResults","No results"),p.W(this._messageContainer),Promise.resolve(void 0)):(p.K(this._messageContainer),this._decorationsManager=new De(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(re=>this._tree.rerender(re))),this._disposeOnNewModel.add(this._preview.onMouseDown(re=>{const{event:We,target:tt}=re;if(We.detail!==2)return;const Et=this._getFocusedReference();if(!Et)return;this._onDidSelectReference.fire({element:{uri:Et.uri,range:tt.range},kind:We.ctrlKey||We.metaKey||We.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),p.W(this._treeContainer),p.W(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[re]=this._tree.getFocus();return re instanceof c.b?re:re instanceof c.a&&re.children.length>0?re.children[0]:void 0}revealReference(re){return Me(this,void 0,void 0,function*(){yield this._revealReference(re,!1),this._onDidSelectReference.fire({element:re,kind:"goto",source:"tree"})})}_revealReference(re,We){return Me(this,void 0,void 0,function*(){if(this._revealedReference===re)return;this._revealedReference=re,re.uri.scheme!==O.c.inMemory?this.setTitle(Object(k.c)(re.uri),this._uriLabel.getUriLabel(Object(k.d)(re.uri))):this.setTitle(v.a("peekView.alternateTitle","References"));const tt=this._textModelResolverService.createModelReference(re.uri);this._tree.getInput()===re.parent?this._tree.reveal(re):(We&&this._tree.reveal(re.parent),yield this._tree.expand(re.parent),this._tree.reveal(re));const Et=yield tt;if(!this._model){Et.dispose();return}Object(N.f)(this._previewModelReference);const It=Et.object;if(It){const Rt=this._preview.getModel()===It.textEditorModel?0:1,vo=I.a.lift(re.range).collapseToStart();this._previewModelReference=Et,this._preview.setModel(It.textEditorModel),this._preview.setSelection(vo),this._preview.revealRangeInCenter(vo,Rt)}else this._preview.setModel(this._previewNotAvailableMessage),Et.dispose()})}};nt=ye([ge(3,J.b),ge(4,$.a),ge(5,S.a),ge(6,L.a),ge(7,U.a),ge(8,Ce.a),ge(9,ie.a),ge(10,oe.a),ge(11,Z.a)],nt),Object(J.f)((it,re)=>{const We=it.getColor(L.m);We&&re.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${We}; }`);const tt=it.getColor(L.h);tt&&re.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${tt}; }`);const Et=it.getColor(L.i);Et&&re.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${Et}; box-sizing: border-box; }`);const It=it.getColor(le.b);It&&re.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${It}; box-sizing: border-box; }`);const Rt=it.getColor(L.j);Rt&&re.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${Rt}; }`);const vo=it.getColor(L.l);vo&&re.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${vo}; }`);const Mo=it.getColor(L.k);Mo&&re.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${Mo}; }`);const xo=it.getColor(L.n);xo&&re.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${xo}; }`);const Do=it.getColor(L.o);Do&&re.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${Do} !important; }`);const Lo=it.getColor(L.f);Lo&&re.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input { background-color: ${Lo};}`);const To=it.getColor(L.g);To&&re.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .margin { background-color: ${To};}`)});var Ke=function(it,re,We,tt){var Et=arguments.length,It=Et<3?re:tt===null?tt=Object.getOwnPropertyDescriptor(re,We):tt,Rt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")It=Reflect.decorate(it,re,We,tt);else for(var vo=it.length-1;vo>=0;vo--)(Rt=it[vo])&&(It=(Et<3?Rt(It):Et>3?Rt(re,We,It):Rt(re,We))||It);return Et>3&&It&&Object.defineProperty(re,We,It),It},et=function(it,re){return function(We,tt){re(We,tt,it)}},bt=function(it,re,We,tt){function Et(It){return It instanceof We?It:new We(function(Rt){Rt(It)})}return new(We||(We=Promise))(function(It,Rt){function vo(Do){try{xo(tt.next(Do))}catch(Lo){Rt(Lo)}}function Mo(Do){try{xo(tt.throw(Do))}catch(Lo){Rt(Lo)}}function xo(Do){Do.done?It(Do.value):Et(Do.value).then(vo,Mo)}xo((tt=tt.apply(it,re||[])).next())})};const Tt=new D.c("referenceSearchVisible",!1,v.a("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let $t=class it{constructor(re,We,tt,Et,It,Rt,vo,Mo){this._defaultTreeKeyboardSupport=re,this._editor=We,this._editorService=Et,this._notificationService=It,this._instantiationService=Rt,this._storageService=vo,this._configurationService=Mo,this._disposables=new N.b,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Tt.bindTo(tt)}static get(re){return re.getContribution(it.ID)}dispose(){var re,We;this._referenceSearchVisible.reset(),this._disposables.dispose(),(re=this._widget)===null||re===void 0||re.dispose(),(We=this._model)===null||We===void 0||We.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(re,We,tt){let Et;if(this._widget&&(Et=this._widget.position),this.closeWidget(),!!Et&&re.containsPosition(Et))return;this._peekMode=tt,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const It="peekViewLayout",Rt=we.fromJSON(this._storageService.get(It,0,"{}"));this._widget=this._instantiationService.createInstance(nt,this._editor,this._defaultTreeKeyboardSupport,Rt),this._widget.setTitle(v.a("labelLoading","Loading...")),this._widget.show(re),this._disposables.add(this._widget.onDidClose(()=>{We.cancel(),this._widget&&(this._storageService.store(It,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(Mo=>{let{element:xo,kind:Do}=Mo;if(!xo)return;switch(Do){case"open":(Mo.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(xo,!1,!1);break;case"side":this.openReference(xo,!0,!1);break;case"goto":tt?this._gotoReference(xo):this.openReference(xo,!1,!0);break}}));const vo=++this._requestIdPool;We.then(Mo=>{var xo;if(vo!==this._requestIdPool||!this._widget){Mo.dispose();return}return(xo=this._model)===null||xo===void 0||xo.dispose(),this._model=Mo,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(v.a("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let Do=this._editor.getModel().uri,Lo=new F.a(re.startLineNumber,re.startColumn),To=this._model.nearestReference(Do,Lo);if(To)return this._widget.setSelection(To).then(()=>{this._widget&&this._editor.getOption(76)==="editor"&&this._widget.focusOnPreviewEditor()})}return})},Mo=>{this._notificationService.error(Mo)})}changeFocusBetweenPreviewAndReferences(){if(!this._widget)return;this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor()}goToNextOrPreviousReference(re){return bt(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const We=this._widget.position;if(!We)return;const tt=this._model.nearestReference(this._editor.getModel().uri,We);if(!tt)return;const Et=this._model.nextOrPreviousReference(tt,re),It=this._editor.hasTextFocus(),Rt=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(Et),yield this._gotoReference(Et),It?this._editor.focus():this._widget&&Rt&&this._widget.focusOnPreviewEditor()})}revealReference(re){return bt(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;yield this._widget.revealReference(re)})}closeWidget(re=!0){var We,tt;(We=this._widget)===null||We===void 0||We.dispose(),(tt=this._model)===null||tt===void 0||tt.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,re&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(re){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const We=I.a.lift(re.range).collapseToStart();return this._editorService.openCodeEditor({resource:re.uri,options:{selection:We}},this._editor).then(tt=>{var Et;if(this._ignoreModelChangeEvent=!1,!tt||!this._widget){this.closeWidget();return}if(this._editor===tt)this._widget.show(We),this._widget.focusOnReferenceTree();else{const It=it.get(tt),Rt=this._model.clone();this.closeWidget(),tt.focus(),It.toggleWidget(We,Object(f.h)(vo=>Promise.resolve(Rt)),(Et=this._peekMode)!==null&&Et!==void 0?Et:!1)}},tt=>{this._ignoreModelChangeEvent=!1,Object(B.f)(tt)})}openReference(re,We,tt){We||this.closeWidget();const{uri:Et,range:It}=re;this._editorService.openCodeEditor({resource:Et,options:{selection:It,pinned:tt}},this._editor,We)}};$t.ID="editor.contrib.referencesController",$t=Ke([et(2,D.b),et(3,A.a),et(4,b.a),et(5,S.a),et(6,h.a),et(7,d.a)],$t);function Xe(it,re){const We=Object(L.d)(it);if(!We)return;let tt=$t.get(We);tt&&re(tt)}r.a.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Object(x.c)(2048|41,60),when:D.a.or(Tt,L.b.inPeekEditor),handler(it){Xe(it,re=>{re.changeFocusBetweenPreviewAndReferences()})}}),r.a.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:D.a.or(Tt,L.b.inPeekEditor),handler(it){Xe(it,re=>{re.goToNextOrPreviousReference(!0)})}}),r.a.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1024|62,secondary:[1024|70],when:D.a.or(Tt,L.b.inPeekEditor),handler(it){Xe(it,re=>{re.goToNextOrPreviousReference(!1)})}}),m.a.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),m.a.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),m.a.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),m.a.registerCommand("closeReferenceSearch",it=>Xe(it,re=>re.closeWidget())),r.a.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1024|9],when:D.a.and(L.b.inPeekEditor,D.a.not("config.editor.stablePeek"))}),r.a.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1024|9],when:D.a.and(Tt,D.a.not("config.editor.stablePeek"))}),r.a.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2048|18]},when:D.a.and(Tt,_.e),handler(it){var re;const We=it.get(_.a),tt=(re=We.lastFocusedList)===null||re===void 0?void 0:re.getFocus();Array.isArray(tt)&&tt[0]instanceof c.b&&Xe(it,Et=>Et.revealReference(tt[0]))}}),r.a.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2048|3,mac:{primary:256|3},when:D.a.and(Tt,_.e),handler(it){var re;const We=it.get(_.a),tt=(re=We.lastFocusedList)===null||re===void 0?void 0:re.getFocus();Array.isArray(tt)&&tt[0]instanceof c.b&&Xe(it,Et=>Et.openReference(tt[0],!0,!0))}}),m.a.registerCommand("openReference",it=>{var re;const We=it.get(_.a),tt=(re=We.lastFocusedList)===null||re===void 0?void 0:re.getFocus();Array.isArray(tt)&&tt[0]instanceof c.b&&Xe(it,Et=>Et.openReference(tt[0],!1,!0))})},QaAZ:function(mt,M,t){},QiAa:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"redis",extensions:[".redis"],aliases:["redis"],loader:function(){return t.e(355).then(t.bind(null,"j6Xs"))}})},QuOb:function(mt,M,t){"use strict";t.d(M,"a",function(){return N});var f=t("MI8n"),B=t("pmY6");class x{constructor(d,D,S,r,_,b){this._scrollStateBrand=void 0,d=d|0,D=D|0,S=S|0,r=r|0,_=_|0,b=b|0,this.rawScrollLeft=S,this.rawScrollTop=b,d<0&&(d=0),S+d>D&&(S=D-d),S<0&&(S=0),r<0&&(r=0),b+r>_&&(b=_-r),b<0&&(b=0),this.width=d,this.scrollWidth=D,this.scrollLeft=S,this.height=r,this.scrollHeight=_,this.scrollTop=b}equals(d){return this.rawScrollLeft===d.rawScrollLeft&&this.rawScrollTop===d.rawScrollTop&&this.width===d.width&&this.scrollWidth===d.scrollWidth&&this.scrollLeft===d.scrollLeft&&this.height===d.height&&this.scrollHeight===d.scrollHeight&&this.scrollTop===d.scrollTop}withScrollDimensions(d,D){return new x(typeof d.width!="undefined"?d.width:this.width,typeof d.scrollWidth!="undefined"?d.scrollWidth:this.scrollWidth,D?this.rawScrollLeft:this.scrollLeft,typeof d.height!="undefined"?d.height:this.height,typeof d.scrollHeight!="undefined"?d.scrollHeight:this.scrollHeight,D?this.rawScrollTop:this.scrollTop)}withScrollPosition(d){return new x(this.width,this.scrollWidth,typeof d.scrollLeft!="undefined"?d.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof d.scrollTop!="undefined"?d.scrollTop:this.rawScrollTop)}createScrollEvent(d,D){const S=this.width!==d.width,r=this.scrollWidth!==d.scrollWidth,_=this.scrollLeft!==d.scrollLeft,b=this.height!==d.height,h=this.scrollHeight!==d.scrollHeight,c=this.scrollTop!==d.scrollTop;return{inSmoothScrolling:D,oldWidth:d.width,oldScrollWidth:d.scrollWidth,oldScrollLeft:d.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:d.height,oldScrollHeight:d.scrollHeight,oldScrollTop:d.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:S,scrollWidthChanged:r,scrollLeftChanged:_,heightChanged:b,scrollHeightChanged:h,scrollTopChanged:c}}}class N extends B.a{constructor(d,D){super();this._scrollableBrand=void 0,this._onScroll=this._register(new f.b),this.onScroll=this._onScroll.event,this._smoothScrollDuration=d,this._scheduleAtNextAnimationFrame=D,this._state=new x(0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(d){this._smoothScrollDuration=d}validateScrollPosition(d){return this._state.withScrollPosition(d)}getScrollDimensions(){return this._state}setScrollDimensions(d,D){const S=this._state.withScrollDimensions(d,D);this._setState(S,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(d){const D=this._state.withScrollPosition(d);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(D,!1)}setScrollPositionSmooth(d,D){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(d);if(this._smoothScrolling){d={scrollLeft:typeof d.scrollLeft=="undefined"?this._smoothScrolling.to.scrollLeft:d.scrollLeft,scrollTop:typeof d.scrollTop=="undefined"?this._smoothScrolling.to.scrollTop:d.scrollTop};const S=this._state.withScrollPosition(d);if(this._smoothScrolling.to.scrollLeft===S.scrollLeft&&this._smoothScrolling.to.scrollTop===S.scrollTop)return;let r;D?r=new L(this._smoothScrolling.from,S,this._smoothScrolling.startTime,this._smoothScrolling.duration):r=this._smoothScrolling.combine(this._state,S,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{const S=this._state.withScrollPosition(d);this._smoothScrolling=L.start(this._state,S,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{if(!this._smoothScrolling)return;this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling()})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const d=this._smoothScrolling.tick(),D=this._state.withScrollPosition(d);if(this._setState(D,!0),!this._smoothScrolling)return;if(d.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{if(!this._smoothScrolling)return;this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling()})}_setState(d,D){const S=this._state;if(S.equals(d))return;this._state=d,this._onScroll.fire(this._state.createScrollEvent(S,D))}}class A{constructor(d,D,S){this.scrollLeft=d,this.scrollTop=D,this.isDone=S}}function F(d,D){const S=D-d;return function(r){return d+S*m(r)}}function I(d,D,S){return function(r){return r<S?d(r/S):D((r-S)/(1-S))}}class L{constructor(d,D,S,r){this.from=d,this.to=D,this.duration=r,this.startTime=S,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(d,D,S){const r=Math.abs(d-D);if(r>2.5*S){let _,b;return d<D?(_=d+.75*S,b=D-.75*S):(_=d-.75*S,b=D+.75*S),I(F(d,_),F(b,D),.33)}return F(d,D)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(d){this.to=d.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(d){const D=(d-this.startTime)/this.duration;if(D<1){const S=this.scrollLeft(D),r=this.scrollTop(D);return new A(S,r,!1)}return new A(this.to.scrollLeft,this.to.scrollTop,!0)}combine(d,D,S){return L.start(d,D,S)}static start(d,D,S){S=S+10;const r=Date.now()-10;return new L(d,D,r,S)}}function v(d){return Math.pow(d,3)}function m(d){return 1-v(1-d)}},R3nR:function(mt,M,t){"use strict";t.d(M,"b",function(){return x}),t.d(M,"a",function(){return N});var f=t("T8No"),B=t("Cg/j");const x=Object(B.c)("accessibilityService"),N=new f.c("accessibilityModeEnabled",!1)},R8sh:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("Cg/j");const B=Object(f.c)("labelService")},RMfO:function(mt,M,t){},S3by:function(mt,M,t){"use strict";var f=t("N0LK"),B;(function(x){x[x.Ignore=0]="Ignore",x[x.Info=1]="Info",x[x.Warning=2]="Warning",x[x.Error=3]="Error"})(B||(B={})),function(x){const N="error",A="warning",F="warn",I="info",L="ignore";function v(d){return d?f.r(N,d)?x.Error:f.r(A,d)||f.r(F,d)?x.Warning:f.r(I,d)?x.Info:x.Ignore:x.Ignore}x.fromValue=v;function m(d){switch(d){case x.Error:return N;case x.Warning:return A;case x.Info:return I;default:return L}}x.toString=m}(B||(B={})),M.a=B},SBYE:function(mt,M,t){"use strict";t.r(M);var f=t("QaAZ"),B=t.n(f),x=t("EffR"),N=t("ZlPH"),A=t("Md8J"),F=t("OBOq"),I=t("G300"),L=t("pmY6"),v=t("MNsG"),m=t("N0LK"),d=t("bY76"),D=t("sswD"),S=t("wQH0"),r=t("k7pc"),_=t("T8No"),b=t("Cg/j"),h=t("bexQ"),c=t("W9cx"),p=t("MD5Z"),E=t("t9D7"),y=t("A9l+"),C=function($,te,ne,Ee){var fe=arguments.length,ee=fe<3?te:Ee===null?Ee=Object.getOwnPropertyDescriptor(te,ne):Ee,ie;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate($,te,ne,Ee);else for(var U=$.length-1;U>=0;U--)(ie=$[U])&&(ee=(fe<3?ie(ee):fe>3?ie(te,ne,ee):ie(te,ne))||ee);return fe>3&&ee&&Object.defineProperty(te,ne,ee),ee},O=function($,te){return function(ne,Ee){te(ne,Ee,$)}};const k=new _.c("accessibilityHelpWidgetVisible",!1);let Y=class $ extends L.a{constructor(te,ne){super();this._editor=te,this._widget=this._register(ne.createInstance(H,this._editor))}static get(te){return te.getContribution($.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};Y.ID="editor.contrib.accessibilityHelpController",Y=C([O(1,b.a)],Y);function Q($,te){return!$||$.length===0?y.a.noSelection:$.length===1?te?m.v(y.a.singleSelectionRange,$[0].positionLineNumber,$[0].positionColumn,te):m.v(y.a.singleSelection,$[0].positionLineNumber,$[0].positionColumn):te?m.v(y.a.multiSelectionRange,$.length,te):$.length>0?m.v(y.a.multiSelection,$.length):""}let H=class $ extends I.a{constructor(te,ne,Ee,fe){super();this._contextKeyService=ne,this._keybindingService=Ee,this._openerService=fe,this._editor=te,this._isVisibleKey=k.bindTo(this._contextKeyService),this._domNode=Object(N.b)(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=Object(N.b)(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(x.o(this._contentDomNode.domNode,"keydown",ee=>{if(!this._isVisible)return;if(ee.equals(2048|35)&&(Object(F.a)(y.a.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),x.t(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),ee.preventDefault(),ee.stopPropagation()),ee.equals(2048|38)){Object(F.a)(y.a.openingDocs);let ie=this._editor.getRawOptions().accessibilityHelpUrl;typeof ie=="undefined"&&(ie="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(d.a.parse(ie)),ee.preventDefault(),ee.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return $.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){if(this._isVisible)return;this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus()}_descriptionForCommand(te,ne,Ee){let fe=this._keybindingService.lookupKeybinding(te);return fe?m.v(ne,fe.getAriaLabel()):m.v(Ee,te)}_buildContent(){const te=this._editor.getOptions(),ne=this._editor.getSelections();let Ee=0;if(ne){const U=this._editor.getModel();U&&ne.forEach(G=>{Ee+=U.getValueLengthInRange(G)})}let fe=Q(ne,Ee);te.get(53)?te.get(80)?fe+=y.a.readonlyDiffEditor:fe+=y.a.editableDiffEditor:te.get(80)?fe+=y.a.readonlyEditor:fe+=y.a.editableEditor;const ee=v.f?y.a.changeConfigToOnMac:y.a.changeConfigToOnWinLinux;switch(te.get(2)){case 0:fe+=`
|
|
|
|
|
|
- `+ee;break;case 2:fe+=`
|
|
|
|
|
|
- `+y.a.auto_on;break;case 1:fe+=`
|
|
|
|
|
|
- `+y.a.auto_off,fe+=" "+ee;break}te.get(128)?fe+=`
|
|
|
|
|
|
- `+this._descriptionForCommand(r.ToggleTabFocusModeAction.ID,y.a.tabFocusModeOnMsg,y.a.tabFocusModeOnMsgNoKb):fe+=`
|
|
|
|
|
|
- `+this._descriptionForCommand(r.ToggleTabFocusModeAction.ID,y.a.tabFocusModeOffMsg,y.a.tabFocusModeOffMsgNoKb);const ie=v.f?y.a.openDocMac:y.a.openDocWinLinux;fe+=`
|
|
|
|
|
|
- `+ie,fe+=`
|
|
|
|
|
|
`+y.a.outroMsg,this._contentDomNode.domNode.appendChild(Object(A.b)(fe)),this._contentDomNode.domNode.setAttribute("aria-label",fe)}hide(){if(!this._isVisible)return;this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,x.t(this._contentDomNode.domNode),this._editor.focus()}_layout(){let te=this._editor.getLayoutInfo(),ne=Math.max(5,Math.min($.WIDTH,te.width-40)),Ee=Math.max(5,Math.min($.HEIGHT,te.height-40));this._domNode.setWidth(ne),this._domNode.setHeight(Ee);let fe=Math.round((te.height-Ee)/2);this._domNode.setTop(fe);let ee=Math.round((te.width-ne)/2);this._domNode.setLeft(ee)}};H.ID="editor.contrib.accessibilityHelpWidget",H.WIDTH=500,H.HEIGHT=300,H=C([O(1,_.b),O(2,h.a),O(3,c.a)],H);class Z extends D.b{constructor(){super({id:"editor.action.showAccessibilityHelp",label:y.a.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:512|59,weight:100,linux:{primary:512|1024|59,secondary:[512|59]}}})}run($,te){let ne=Y.get(te);ne&&ne.show()}}Object(D.l)(Y.ID,Y),Object(D.j)(Z);const oe=D.c.bindToContribution(Y.get);Object(D.k)(new oe({id:"closeAccessibilityHelp",precondition:k,handler:$=>$.hide(),kbOpts:{weight:100+100,kbExpr:S.a.focus,primary:9,secondary:[1024|9]}})),Object(E.f)(($,te)=>{const ne=$.getColor(p.W);ne&&te.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${ne}; }`);const Ee=$.getColor(p.Y);Ee&&te.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${Ee}; }`);const fe=$.getColor(p.Nc);fe&&te.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${fe}; }`);const ee=$.getColor(p.h);ee&&te.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${ee}; }`)})},Sdnv:function(mt,M,t){"use strict";t.d(M,"b",function(){return f}),t.d(M,"a",function(){return B});function f(x,N,A){return Math.min(Math.max(x,N),A)}class B{constructor(){this._n=1,this._val=0}update(x){return this._val=this._val+(x-this._val)/this._n,this._n+=1,this}get value(){return this._val}}},Ssw4:function(mt,M,t){"use strict";(function(f){t.d(M,"a",function(){return F}),t.d(M,"b",function(){return D});let B;(function(){function S(r){B=r()}S.amd=!0,function(r,_){typeof exports=="object"&&typeof f!="undefined"?f.exports=_():typeof S=="function"&&S.amd?S(_):(r=typeof globalThis!="undefined"?globalThis:r||self,r.marked=_())}(this,function(){"use strict";function r(Lt,xt){for(var Nt=0;Nt<xt.length;Nt++){var rt=xt[Nt];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(Lt,rt.key,rt)}}function _(Lt,xt,Nt){return xt&&r(Lt.prototype,xt),Nt&&r(Lt,Nt),Lt}function b(Lt,xt){if(!Lt)return;if(typeof Lt=="string")return h(Lt,xt);var Nt=Object.prototype.toString.call(Lt).slice(8,-1);if(Nt==="Object"&&Lt.constructor&&(Nt=Lt.constructor.name),Nt==="Map"||Nt==="Set")return Array.from(Lt);if(Nt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Nt))return h(Lt,xt)}function h(Lt,xt){(xt==null||xt>Lt.length)&&(xt=Lt.length);for(var Nt=0,rt=new Array(xt);Nt<xt;Nt++)rt[Nt]=Lt[Nt];return rt}function c(Lt,xt){var Nt=typeof Symbol!="undefined"&&Lt[Symbol.iterator]||Lt["@@iterator"];if(Nt)return(Nt=Nt.call(Lt)).next.bind(Nt);if(Array.isArray(Lt)||(Nt=b(Lt))||xt&&Lt&&typeof Lt.length=="number"){Nt&&(Lt=Nt);var rt=0;return function(){return rt>=Lt.length?{done:!0}:{done:!1,value:Lt[rt++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p={exports:{}};function E(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function y(Lt){p.exports.defaults=Lt}p.exports={defaults:E(),getDefaults:E,changeDefaults:y};var C=/[&<>"']/,O=/[&<>"']/g,k=/[<>"']|&(?!#?\w+;)/,Y=/[<>"']|&(?!#?\w+;)/g,Q={"&":"&","<":"<",">":">",'"':""","'":"'"},H=function(xt){return Q[xt]};function Z(Lt,xt){if(xt){if(C.test(Lt))return Lt.replace(O,H)}else if(k.test(Lt))return Lt.replace(Y,H);return Lt}var oe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function $(Lt){return Lt.replace(oe,function(xt,Nt){return Nt=Nt.toLowerCase(),Nt==="colon"?":":Nt.charAt(0)==="#"?Nt.charAt(1)==="x"?String.fromCharCode(parseInt(Nt.substring(2),16)):String.fromCharCode(+Nt.substring(1)):""})}var te=/(^|[^\[])\^/g;function ne(Lt,xt){Lt=Lt.source||Lt,xt=xt||"";var Nt={replace:function(lt,pt){return pt=pt.source||pt,pt=pt.replace(te,"$1"),Lt=Lt.replace(lt,pt),Nt},getRegex:function(){return new RegExp(Lt,xt)}};return Nt}var Ee=/[^\w:]/g,fe=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ee(Lt,xt,Nt){if(Lt){var rt;try{rt=decodeURIComponent($(Nt)).replace(Ee,"").toLowerCase()}catch(lt){return null}if(rt.indexOf("javascript:")===0||rt.indexOf("vbscript:")===0||rt.indexOf("data:")===0)return null}xt&&!fe.test(Nt)&&(Nt=he(xt,Nt));try{Nt=encodeURI(Nt).replace(/%25/g,"%")}catch(lt){return null}return Nt}var ie={},U=/^[^:]+:\/*[^/]*$/,G=/^([^:]+:)[\s\S]*$/,J=/^([^:]+:\/*[^/]*)[\s\S]*$/;function he(Lt,xt){ie[" "+Lt]||(U.test(Lt)?ie[" "+Lt]=Lt+"/":ie[" "+Lt]=Te(Lt,"/",!0)),Lt=ie[" "+Lt];var Nt=Lt.indexOf(":")===-1;return xt.substring(0,2)==="//"?Nt?xt:Lt.replace(G,"$1")+xt:xt.charAt(0)==="/"?Nt?xt:Lt.replace(J,"$1")+xt:Lt+xt}var xe={exec:function(){}};function Ie(Lt){for(var xt=1,Nt,rt;xt<arguments.length;xt++){Nt=arguments[xt];for(rt in Nt)Object.prototype.hasOwnProperty.call(Nt,rt)&&(Lt[rt]=Nt[rt])}return Lt}function Le(Lt,xt){var Nt=Lt.replace(/\|/g,function(pt,St,Qt){for(var bo=!1,qt=St;--qt>=0&&Qt[qt]==="\\";)bo=!bo;return bo?"|":" |"}),rt=Nt.split(/ \|/),lt=0;if(rt[0].trim()||rt.shift(),rt[rt.length-1].trim()||rt.pop(),rt.length>xt)rt.splice(xt);else for(;rt.length<xt;)rt.push("");for(;lt<rt.length;lt++)rt[lt]=rt[lt].trim().replace(/\\\|/g,"|");return rt}function Te(Lt,xt,Nt){var rt=Lt.length;if(rt===0)return"";for(var lt=0;lt<rt;){var pt=Lt.charAt(rt-lt-1);if(pt===xt&&!Nt)lt++;else if(pt!==xt&&Nt)lt++;else break}return Lt.substr(0,rt-lt)}function ze(Lt,xt){if(Lt.indexOf(xt[1])===-1)return-1;for(var Nt=Lt.length,rt=0,lt=0;lt<Nt;lt++)if(Lt[lt]==="\\")lt++;else if(Lt[lt]===xt[0])rt++;else if(Lt[lt]===xt[1]&&(rt--,rt<0))return lt;return-1}function ue(Lt){Lt&&Lt.sanitize&&!Lt.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function je(Lt,xt){if(xt<1)return"";for(var Nt="";xt>1;)xt&1&&(Nt+=Lt),xt>>=1,Lt+=Lt;return Nt+Lt}var Pe={escape:Z,unescape:$,edit:ne,cleanUrl:ee,resolveUrl:he,noopTest:xe,merge:Ie,splitCells:Le,rtrim:Te,findClosingBracket:ze,checkSanitizeDeprecation:ue,repeatString:je},ve=p.exports.defaults,ce=Pe.rtrim,le=Pe.splitCells,Ce=Pe.escape,ye=Pe.findClosingBracket;function ge(Lt,xt,Nt,rt){var lt=xt.href,pt=xt.title?Ce(xt.title):null,St=Lt[1].replace(/\\([\[\]])/g,"$1");if(Lt[0].charAt(0)!=="!"){rt.state.inLink=!0;var Qt={type:"link",raw:Nt,href:lt,title:pt,text:St,tokens:rt.inlineTokens(St,[])};return rt.state.inLink=!1,Qt}else return{type:"image",raw:Nt,href:lt,title:pt,text:Ce(St)}}function Me(Lt,xt){var Nt=Lt.match(/^(\s+)(?:```)/);if(Nt===null)return xt;var rt=Nt[1];return xt.split(`
|
|
|
`).map(function(lt){var pt=lt.match(/^\s+/);if(pt===null)return lt;var St=pt[0];return St.length>=rt.length?lt.slice(rt.length):lt}).join(`
|
|
|
`)}var De=function(){function Lt(Nt){this.options=Nt||ve}var xt=Lt.prototype;return xt.space=function(rt){var lt=this.rules.block.newline.exec(rt);if(lt)return lt[0].length>1?{type:"space",raw:lt[0]}:{raw:`
|
|
|
`}},xt.code=function(rt){var lt=this.rules.block.code.exec(rt);if(lt){var pt=lt[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:lt[0],codeBlockStyle:"indented",text:this.options.pedantic?pt:ce(pt,`
|
|
|
`)}}},xt.fences=function(rt){var lt=this.rules.block.fences.exec(rt);if(lt){var pt=lt[0],St=Me(pt,lt[3]||"");return{type:"code",raw:pt,lang:lt[2]?lt[2].trim():lt[2],text:St}}},xt.heading=function(rt){var lt=this.rules.block.heading.exec(rt);if(lt){var pt=lt[2].trim();if(/#$/.test(pt)){var St=ce(pt,"#");(this.options.pedantic||(!St||/ $/.test(St)))&&(pt=St.trim())}var Qt={type:"heading",raw:lt[0],depth:lt[1].length,text:pt,tokens:[]};return this.lexer.inline(Qt.text,Qt.tokens),Qt}},xt.hr=function(rt){var lt=this.rules.block.hr.exec(rt);if(lt)return{type:"hr",raw:lt[0]}},xt.blockquote=function(rt){var lt=this.rules.block.blockquote.exec(rt);if(lt){var pt=lt[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:lt[0],tokens:this.lexer.blockTokens(pt,[]),text:pt}}},xt.list=function(rt){var lt=this.rules.block.list.exec(rt);if(lt){var pt,St,Qt,bo,qt,Eo,Ro,zo,Bo,Jt,fo=lt[1].trim(),ri=fo.length>1,Zo={type:"list",raw:"",ordered:ri,start:ri?+fo.slice(0,-1):"",loose:!1,items:[]};fo=ri?"\\d{1,9}\\"+fo.slice(-1):"\\"+fo,this.options.pedantic&&(fo=ri?fo:"[*+-]");for(var ci=new RegExp("^( {0,3}"+fo+")((?: [^\\n]*| *)(?:\\n[^\\n]*)*(?:\\n|$))");rt&&!this.rules.block.hr.test(rt);){if(!(lt=ci.exec(rt)))break;Bo=lt[2].split(`
|
|
|
`),this.options.pedantic?(bo=2,Jt=Bo[0].trimLeft()):(bo=lt[2].search(/[^ ]/),bo=lt[1].length+(bo>4?1:bo),Jt=Bo[0].slice(bo-lt[1].length)),Eo=!1,pt=lt[0],!Bo[0]&&/^ *$/.test(Bo[1])&&(pt=lt[1]+Bo.slice(0,2).join(`
|
|
|
`)+`
|
|
|
`,Zo.loose=!0,Bo=[]);var ki=new RegExp("^ {0,"+Math.min(3,bo-1)+"}(?:[*+-]|\\d{1,9}[.)])");for(qt=1;qt<Bo.length;qt++){if(zo=Bo[qt],this.options.pedantic&&(zo=zo.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),ki.test(zo)){pt=lt[1]+Bo.slice(0,qt).join(`
|
|
|
`)+`
|
|
|
`;break}if(!Eo){zo.trim()||(Eo=!0),zo.search(/[^ ]/)>=bo?Jt+=`
|
|
|
`+zo.slice(bo):Jt+=`
|
|
|
`+zo;continue}if(zo.search(/[^ ]/)>=bo||!zo.trim()){Jt+=`
|
|
|
`+zo.slice(bo);continue}else{pt=lt[1]+Bo.slice(0,qt).join(`
|
|
|
`)+`
|
|
|
`;break}}Zo.loose||(Ro?Zo.loose=!0:/\n *\n *$/.test(pt)&&(Ro=!0)),this.options.gfm&&(St=/^\[[ xX]\] /.exec(Jt),St&&(Qt=St[0]!=="[ ] ",Jt=Jt.replace(/^\[[ xX]\] +/,""))),Zo.items.push({type:"list_item",raw:pt,task:!!St,checked:Qt,loose:!1,text:Jt}),Zo.raw+=pt,rt=rt.slice(pt.length)}Zo.items[Zo.items.length-1].raw=pt.trimRight(),Zo.items[Zo.items.length-1].text=Jt.trimRight(),Zo.raw=Zo.raw.trimRight();var wi=Zo.items.length;for(qt=0;qt<wi;qt++)this.lexer.state.top=!1,Zo.items[qt].tokens=this.lexer.blockTokens(Zo.items[qt].text,[]),Zo.items[qt].tokens.some(function(Zi){return Zi.type==="space"})&&(Zo.loose=!0,Zo.items[qt].loose=!0);return Zo}},xt.html=function(rt){var lt=this.rules.block.html.exec(rt);if(lt){var pt={type:"html",raw:lt[0],pre:!this.options.sanitizer&&(lt[1]==="pre"||lt[1]==="script"||lt[1]==="style"),text:lt[0]};return this.options.sanitize&&(pt.type="paragraph",pt.text=this.options.sanitizer?this.options.sanitizer(lt[0]):Ce(lt[0]),pt.tokens=[],this.lexer.inline(pt.text,pt.tokens)),pt}},xt.def=function(rt){var lt=this.rules.block.def.exec(rt);if(lt){lt[3]&&(lt[3]=lt[3].substring(1,lt[3].length-1));var pt=lt[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:pt,raw:lt[0],href:lt[2],title:lt[3]}}},xt.table=function(rt){var lt=this.rules.block.table.exec(rt);if(lt){var pt={type:"table",header:le(lt[1]).map(function(Ro){return{text:Ro}}),align:lt[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:lt[3]?lt[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(pt.header.length===pt.align.length){pt.raw=lt[0];var St=pt.align.length,Qt,bo,qt,Eo;for(Qt=0;Qt<St;Qt++)/^ *-+: *$/.test(pt.align[Qt])?pt.align[Qt]="right":/^ *:-+: *$/.test(pt.align[Qt])?pt.align[Qt]="center":/^ *:-+ *$/.test(pt.align[Qt])?pt.align[Qt]="left":pt.align[Qt]=null;for(St=pt.rows.length,Qt=0;Qt<St;Qt++)pt.rows[Qt]=le(pt.rows[Qt],pt.header.length).map(function(Ro){return{text:Ro}});for(St=pt.header.length,bo=0;bo<St;bo++)pt.header[bo].tokens=[],this.lexer.inlineTokens(pt.header[bo].text,pt.header[bo].tokens);for(St=pt.rows.length,bo=0;bo<St;bo++)for(Eo=pt.rows[bo],qt=0;qt<Eo.length;qt++)Eo[qt].tokens=[],this.lexer.inlineTokens(Eo[qt].text,Eo[qt].tokens);return pt}}},xt.lheading=function(rt){var lt=this.rules.block.lheading.exec(rt);if(lt){var pt={type:"heading",raw:lt[0],depth:lt[2].charAt(0)==="="?1:2,text:lt[1],tokens:[]};return this.lexer.inline(pt.text,pt.tokens),pt}},xt.paragraph=function(rt){var lt=this.rules.block.paragraph.exec(rt);if(lt){var pt={type:"paragraph",raw:lt[0],text:lt[1].charAt(lt[1].length-1)===`
|
|
|
`?lt[1].slice(0,-1):lt[1],tokens:[]};return this.lexer.inline(pt.text,pt.tokens),pt}},xt.text=function(rt){var lt=this.rules.block.text.exec(rt);if(lt){var pt={type:"text",raw:lt[0],text:lt[0],tokens:[]};return this.lexer.inline(pt.text,pt.tokens),pt}},xt.escape=function(rt){var lt=this.rules.inline.escape.exec(rt);if(lt)return{type:"escape",raw:lt[0],text:Ce(lt[1])}},xt.tag=function(rt){var lt=this.rules.inline.tag.exec(rt);if(lt)return!this.lexer.state.inLink&&/^<a /i.test(lt[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(lt[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(lt[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(lt[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:lt[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(lt[0]):Ce(lt[0]):lt[0]}},xt.link=function(rt){var lt=this.rules.inline.link.exec(rt);if(lt){var pt=lt[2].trim();if(!this.options.pedantic&&/^</.test(pt)){if(!/>$/.test(pt))return;var St=ce(pt.slice(0,-1),"\\");if((pt.length-St.length)%2===0)return}else{var Qt=ye(lt[2],"()");if(Qt>-1){var bo=lt[0].indexOf("!")===0?5:4,qt=bo+lt[1].length+Qt;lt[2]=lt[2].substring(0,Qt),lt[0]=lt[0].substring(0,qt).trim(),lt[3]=""}}var Eo=lt[2],Ro="";if(this.options.pedantic){var zo=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Eo);zo&&(Eo=zo[1],Ro=zo[3])}else Ro=lt[3]?lt[3].slice(1,-1):"";return Eo=Eo.trim(),/^</.test(Eo)&&(this.options.pedantic&&!/>$/.test(pt)?Eo=Eo.slice(1):Eo=Eo.slice(1,-1)),ge(lt,{href:Eo&&Eo.replace(this.rules.inline._escapes,"$1"),title:Ro&&Ro.replace(this.rules.inline._escapes,"$1")},lt[0],this.lexer)}},xt.reflink=function(rt,lt){var pt;if((pt=this.rules.inline.reflink.exec(rt))||(pt=this.rules.inline.nolink.exec(rt))){var St=(pt[2]||pt[1]).replace(/\s+/g," ");if(St=lt[St.toLowerCase()],!St||!St.href){var Qt=pt[0].charAt(0);return{type:"text",raw:Qt,text:Qt}}return ge(pt,St,pt[0],this.lexer)}},xt.emStrong=function(rt,lt,pt){pt===void 0&&(pt="");var St=this.rules.inline.emStrong.lDelim.exec(rt);if(!St)return;if(St[3]&&pt.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))return;var Qt=St[1]||St[2]||"";if(!Qt||Qt&&(pt===""||this.rules.inline.punctuation.exec(pt))){var bo=St[0].length-1,qt,Eo,Ro=bo,zo=0,Bo=St[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Bo.lastIndex=0,lt=lt.slice(-1*rt.length+bo);(St=Bo.exec(lt))!=null;){if(qt=St[1]||St[2]||St[3]||St[4]||St[5]||St[6],!qt)continue;if(Eo=qt.length,St[3]||St[4]){Ro+=Eo;continue}else if((St[5]||St[6])&&(bo%3&&!((bo+Eo)%3))){zo+=Eo;continue}if(Ro-=Eo,Ro>0)continue;if(Eo=Math.min(Eo,Eo+Ro+zo),Math.min(bo,Eo)%2){var Jt=rt.slice(1,bo+St.index+Eo);return{type:"em",raw:rt.slice(0,bo+St.index+Eo+1),text:Jt,tokens:this.lexer.inlineTokens(Jt,[])}}var fo=rt.slice(2,bo+St.index+Eo-1);return{type:"strong",raw:rt.slice(0,bo+St.index+Eo+1),text:fo,tokens:this.lexer.inlineTokens(fo,[])}}}},xt.codespan=function(rt){var lt=this.rules.inline.code.exec(rt);if(lt){var pt=lt[2].replace(/\n/g," "),St=/[^ ]/.test(pt),Qt=/^ /.test(pt)&&/ $/.test(pt);return St&&Qt&&(pt=pt.substring(1,pt.length-1)),pt=Ce(pt,!0),{type:"codespan",raw:lt[0],text:pt}}},xt.br=function(rt){var lt=this.rules.inline.br.exec(rt);if(lt)return{type:"br",raw:lt[0]}},xt.del=function(rt){var lt=this.rules.inline.del.exec(rt);if(lt)return{type:"del",raw:lt[0],text:lt[2],tokens:this.lexer.inlineTokens(lt[2],[])}},xt.autolink=function(rt,lt){var pt=this.rules.inline.autolink.exec(rt);if(pt){var St,Qt;return pt[2]==="@"?(St=Ce(this.options.mangle?lt(pt[1]):pt[1]),Qt="mailto:"+St):(St=Ce(pt[1]),Qt=St),{type:"link",raw:pt[0],text:St,href:Qt,tokens:[{type:"text",raw:St,text:St}]}}},xt.url=function(rt,lt){var pt;if(pt=this.rules.inline.url.exec(rt)){var St,Qt;if(pt[2]==="@")St=Ce(this.options.mangle?lt(pt[0]):pt[0]),Qt="mailto:"+St;else{var bo;do bo=pt[0],pt[0]=this.rules.inline._backpedal.exec(pt[0])[0];while(bo!==pt[0]);St=Ce(pt[0]),pt[1]==="www."?Qt="http://"+St:Qt=St}return{type:"link",raw:pt[0],text:St,href:Qt,tokens:[{type:"text",raw:St,text:St}]}}},xt.inlineText=function(rt,lt){var pt=this.rules.inline.text.exec(rt);if(pt){var St;return this.lexer.state.inRawBlock?St=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(pt[0]):Ce(pt[0]):pt[0]:St=Ce(this.options.smartypants?lt(pt[0]):pt[0]),{type:"text",raw:pt[0],text:St}}},Lt}(),we=Pe.noopTest,Oe=Pe.edit,nt=Pe.merge,Ke={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:we,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};Ke._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Ke._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Ke.def=Oe(Ke.def).replace("label",Ke._label).replace("title",Ke._title).getRegex(),Ke.bullet=/(?:[*+-]|\d{1,9}[.)])/,Ke.listItemStart=Oe(/^( *)(bull) */).replace("bull",Ke.bullet).getRegex(),Ke.list=Oe(Ke.list).replace(/bull/g,Ke.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Ke.def.source+")").getRegex(),Ke._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ke._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Ke.html=Oe(Ke.html,"i").replace("comment",Ke._comment).replace("tag",Ke._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ke.paragraph=Oe(Ke._paragraph).replace("hr",Ke.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ke._tag).getRegex(),Ke.blockquote=Oe(Ke.blockquote).replace("paragraph",Ke.paragraph).getRegex(),Ke.normal=nt({},Ke),Ke.gfm=nt({},Ke.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)\\|?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Ke.gfm.table=Oe(Ke.gfm.table).replace("hr",Ke.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ke._tag).getRegex(),Ke.pedantic=nt({},Ke.normal,{html:Oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ke._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:we,paragraph:Oe(Ke.normal._paragraph).replace("hr",Ke.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",Ke.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var et={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:we,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:we,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};et._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",et.punctuation=Oe(et.punctuation).replace(/punctuation/g,et._punctuation).getRegex(),et.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,et.escapedEmSt=/\\\*|\\_/g,et._comment=Oe(Ke._comment).replace("(?:-->|$)","-->").getRegex(),et.emStrong.lDelim=Oe(et.emStrong.lDelim).replace(/punct/g,et._punctuation).getRegex(),et.emStrong.rDelimAst=Oe(et.emStrong.rDelimAst,"g").replace(/punct/g,et._punctuation).getRegex(),et.emStrong.rDelimUnd=Oe(et.emStrong.rDelimUnd,"g").replace(/punct/g,et._punctuation).getRegex(),et._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,et._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,et._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,et.autolink=Oe(et.autolink).replace("scheme",et._scheme).replace("email",et._email).getRegex(),et._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,et.tag=Oe(et.tag).replace("comment",et._comment).replace("attribute",et._attribute).getRegex(),et._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,et._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,et._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,et.link=Oe(et.link).replace("label",et._label).replace("href",et._href).replace("title",et._title).getRegex(),et.reflink=Oe(et.reflink).replace("label",et._label).getRegex(),et.reflinkSearch=Oe(et.reflinkSearch,"g").replace("reflink",et.reflink).replace("nolink",et.nolink).getRegex(),et.normal=nt({},et),et.pedantic=nt({},et.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Oe(/^!?\[(label)\]\((.*?)\)/).replace("label",et._label).getRegex(),reflink:Oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",et._label).getRegex()}),et.gfm=nt({},et.normal,{escape:Oe(et.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),et.gfm.url=Oe(et.gfm.url,"i").replace("email",et.gfm._extended_email).getRegex(),et.breaks=nt({},et.gfm,{br:Oe(et.br).replace("{2,}","*").getRegex(),text:Oe(et.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var bt={block:Ke,inline:et},Tt=De,$t=p.exports.defaults,Xe=bt.block,it=bt.inline,re=Pe.repeatString;function We(Lt){return Lt.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function tt(Lt){var xt="",Nt,rt,lt=Lt.length;for(Nt=0;Nt<lt;Nt++)rt=Lt.charCodeAt(Nt),Math.random()>.5&&(rt="x"+rt.toString(16)),xt+="&#"+rt+";";return xt}var Et=function(){function Lt(Nt){this.tokens=[],this.tokens.links=Object.create(null),this.options=Nt||$t,this.options.tokenizer=this.options.tokenizer||new Tt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var rt={block:Xe.normal,inline:it.normal};this.options.pedantic?(rt.block=Xe.pedantic,rt.inline=it.pedantic):this.options.gfm&&(rt.block=Xe.gfm,this.options.breaks?rt.inline=it.breaks:rt.inline=it.gfm),this.tokenizer.rules=rt}Lt.lex=function(rt,lt){var pt=new Lt(lt);return pt.lex(rt)},Lt.lexInline=function(rt,lt){var pt=new Lt(lt);return pt.inlineTokens(rt)};var xt=Lt.prototype;return xt.lex=function(rt){rt=rt.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(rt,this.tokens);for(var lt;lt=this.inlineQueue.shift();)this.inlineTokens(lt.src,lt.tokens);return this.tokens},xt.blockTokens=function(rt,lt){var pt=this;lt===void 0&&(lt=[]),this.options.pedantic&&(rt=rt.replace(/^ +$/gm,""));for(var St,Qt,bo,qt;rt;){if(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(Ro){return(St=Ro.call({lexer:pt},rt,lt))?(rt=rt.substring(St.raw.length),lt.push(St),!0):!1}))continue;if(St=this.tokenizer.space(rt)){rt=rt.substring(St.raw.length),St.type&<.push(St);continue}if(St=this.tokenizer.code(rt)){rt=rt.substring(St.raw.length),Qt=lt[lt.length-1],Qt&&(Qt.type==="paragraph"||Qt.type==="text")?(Qt.raw+=`
|
|
|
`+St.raw,Qt.text+=`
|
|
|
`+St.text,this.inlineQueue[this.inlineQueue.length-1].src=Qt.text):lt.push(St);continue}if(St=this.tokenizer.fences(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.heading(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.hr(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.blockquote(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.list(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.html(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.def(rt)){rt=rt.substring(St.raw.length),Qt=lt[lt.length-1],Qt&&(Qt.type==="paragraph"||Qt.type==="text")?(Qt.raw+=`
|
|
|
`+St.raw,Qt.text+=`
|
|
|
`+St.raw,this.inlineQueue[this.inlineQueue.length-1].src=Qt.text):this.tokens.links[St.tag]||(this.tokens.links[St.tag]={href:St.href,title:St.title});continue}if(St=this.tokenizer.table(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.lheading(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(bo=rt,this.options.extensions&&this.options.extensions.startBlock&&function(){var Ro=Infinity,zo=rt.slice(1),Bo=void 0;pt.options.extensions.startBlock.forEach(function(Jt){Bo=Jt.call({lexer:this},zo),typeof Bo=="number"&&Bo>=0&&(Ro=Math.min(Ro,Bo))}),Ro<Infinity&&Ro>=0&&(bo=rt.substring(0,Ro+1))}(),this.state.top&&(St=this.tokenizer.paragraph(bo))){Qt=lt[lt.length-1],qt&&Qt.type==="paragraph"?(Qt.raw+=`
|
|
|
`+St.raw,Qt.text+=`
|
|
|
`+St.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=Qt.text):lt.push(St),qt=bo.length!==rt.length,rt=rt.substring(St.raw.length);continue}if(St=this.tokenizer.text(rt)){rt=rt.substring(St.raw.length),Qt=lt[lt.length-1],Qt&&Qt.type==="text"?(Qt.raw+=`
|
|
|
`+St.raw,Qt.text+=`
|
|
|
`+St.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=Qt.text):lt.push(St);continue}if(rt){var Eo="Infinite loop on byte: "+rt.charCodeAt(0);if(this.options.silent){console.error(Eo);break}else throw new Error(Eo)}}return this.state.top=!0,lt},xt.inline=function(rt,lt){this.inlineQueue.push({src:rt,tokens:lt})},xt.inlineTokens=function(rt,lt){var pt=this;lt===void 0&&(lt=[]);var St,Qt,bo,qt=rt,Eo,Ro,zo;if(this.tokens.links){var Bo=Object.keys(this.tokens.links);if(Bo.length>0)for(;(Eo=this.tokenizer.rules.inline.reflinkSearch.exec(qt))!=null;)Bo.includes(Eo[0].slice(Eo[0].lastIndexOf("[")+1,-1))&&(qt=qt.slice(0,Eo.index)+"["+re("a",Eo[0].length-2)+"]"+qt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Eo=this.tokenizer.rules.inline.blockSkip.exec(qt))!=null;)qt=qt.slice(0,Eo.index)+"["+re("a",Eo[0].length-2)+"]"+qt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Eo=this.tokenizer.rules.inline.escapedEmSt.exec(qt))!=null;)qt=qt.slice(0,Eo.index)+"++"+qt.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;rt;){if(Ro||(zo=""),Ro=!1,this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(fo){return(St=fo.call({lexer:pt},rt,lt))?(rt=rt.substring(St.raw.length),lt.push(St),!0):!1}))continue;if(St=this.tokenizer.escape(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.tag(rt)){rt=rt.substring(St.raw.length),Qt=lt[lt.length-1],Qt&&St.type==="text"&&Qt.type==="text"?(Qt.raw+=St.raw,Qt.text+=St.text):lt.push(St);continue}if(St=this.tokenizer.link(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.reflink(rt,this.tokens.links)){rt=rt.substring(St.raw.length),Qt=lt[lt.length-1],Qt&&St.type==="text"&&Qt.type==="text"?(Qt.raw+=St.raw,Qt.text+=St.text):lt.push(St);continue}if(St=this.tokenizer.emStrong(rt,qt,zo)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.codespan(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.br(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.del(rt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(St=this.tokenizer.autolink(rt,tt)){rt=rt.substring(St.raw.length),lt.push(St);continue}if(!this.state.inLink&&(St=this.tokenizer.url(rt,tt))){rt=rt.substring(St.raw.length),lt.push(St);continue}if(bo=rt,this.options.extensions&&this.options.extensions.startInline&&function(){var fo=Infinity,ri=rt.slice(1),Zo=void 0;pt.options.extensions.startInline.forEach(function(ci){Zo=ci.call({lexer:this},ri),typeof Zo=="number"&&Zo>=0&&(fo=Math.min(fo,Zo))}),fo<Infinity&&fo>=0&&(bo=rt.substring(0,fo+1))}(),St=this.tokenizer.inlineText(bo,We)){rt=rt.substring(St.raw.length),St.raw.slice(-1)!=="_"&&(zo=St.raw.slice(-1)),Ro=!0,Qt=lt[lt.length-1],Qt&&Qt.type==="text"?(Qt.raw+=St.raw,Qt.text+=St.text):lt.push(St);continue}if(rt){var Jt="Infinite loop on byte: "+rt.charCodeAt(0);if(this.options.silent){console.error(Jt);break}else throw new Error(Jt)}}return lt},_(Lt,null,[{key:"rules",get:function(){return{block:Xe,inline:it}}}]),Lt}(),It=p.exports.defaults,Rt=Pe.cleanUrl,vo=Pe.escape,Mo=function(){function Lt(Nt){this.options=Nt||It}var xt=Lt.prototype;return xt.code=function(rt,lt,pt){var St=(lt||"").match(/\S*/)[0];if(this.options.highlight){var Qt=this.options.highlight(rt,St);Qt!=null&&Qt!==rt&&(pt=!0,rt=Qt)}return rt=rt.replace(/\n$/,"")+`
|
|
|
`,St?'<pre><code class="'+this.options.langPrefix+vo(St,!0)+'">'+(pt?rt:vo(rt,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(pt?rt:vo(rt,!0))+`</code></pre>
|
|
|
`},xt.blockquote=function(rt){return`<blockquote>
|
|
|
`+rt+`</blockquote>
|
|
|
`},xt.html=function(rt){return rt},xt.heading=function(rt,lt,pt,St){return this.options.headerIds?"<h"+lt+' id="'+this.options.headerPrefix+St.slug(pt)+'">'+rt+"</h"+lt+`>
|
|
|
`:"<h"+lt+">"+rt+"</h"+lt+`>
|
|
|
`},xt.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},xt.list=function(rt,lt,pt){var St=lt?"ol":"ul",Qt=lt&&pt!==1?' start="'+pt+'"':"";return"<"+St+Qt+`>
|
|
|
`+rt+"</"+St+`>
|
|
|
`},xt.listitem=function(rt){return"<li>"+rt+`</li>
|
|
|
`},xt.checkbox=function(rt){return"<input "+(rt?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},xt.paragraph=function(rt){return"<p>"+rt+`</p>
|
|
|
`},xt.table=function(rt,lt){return lt&&(lt="<tbody>"+lt+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+rt+`</thead>
|
|
|
`+lt+`</table>
|
|
|
`},xt.tablerow=function(rt){return`<tr>
|
|
|
`+rt+`</tr>
|
|
|
`},xt.tablecell=function(rt,lt){var pt=lt.header?"th":"td",St=lt.align?"<"+pt+' align="'+lt.align+'">':"<"+pt+">";return St+rt+"</"+pt+`>
|
|
|
`},xt.strong=function(rt){return"<strong>"+rt+"</strong>"},xt.em=function(rt){return"<em>"+rt+"</em>"},xt.codespan=function(rt){return"<code>"+rt+"</code>"},xt.br=function(){return this.options.xhtml?"<br/>":"<br>"},xt.del=function(rt){return"<del>"+rt+"</del>"},xt.link=function(rt,lt,pt){if(rt=Rt(this.options.sanitize,this.options.baseUrl,rt),rt===null)return pt;var St='<a href="'+vo(rt)+'"';return lt&&(St+=' title="'+lt+'"'),St+=">"+pt+"</a>",St},xt.image=function(rt,lt,pt){if(rt=Rt(this.options.sanitize,this.options.baseUrl,rt),rt===null)return pt;var St='<img src="'+rt+'" alt="'+pt+'"';return lt&&(St+=' title="'+lt+'"'),St+=this.options.xhtml?"/>":">",St},xt.text=function(rt){return rt},Lt}(),xo=function(){function Lt(){}var xt=Lt.prototype;return xt.strong=function(rt){return rt},xt.em=function(rt){return rt},xt.codespan=function(rt){return rt},xt.del=function(rt){return rt},xt.html=function(rt){return rt},xt.text=function(rt){return rt},xt.link=function(rt,lt,pt){return""+pt},xt.image=function(rt,lt,pt){return""+pt},xt.br=function(){return""},Lt}(),Do=function(){function Lt(){this.seen={}}var xt=Lt.prototype;return xt.serialize=function(rt){return rt.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},xt.getNextSafeSlug=function(rt,lt){var pt=rt,St=0;if(this.seen.hasOwnProperty(pt)){St=this.seen[rt];do St++,pt=rt+"-"+St;while(this.seen.hasOwnProperty(pt))}return lt||(this.seen[rt]=St,this.seen[pt]=0),pt},xt.slug=function(rt,lt){lt===void 0&&(lt={});var pt=this.serialize(rt);return this.getNextSafeSlug(pt,lt.dryrun)},Lt}(),Lo=Mo,To=xo,Ht=Do,Mt=p.exports.defaults,Ue=Pe.unescape,dt=function(){function Lt(Nt){this.options=Nt||Mt,this.options.renderer=this.options.renderer||new Lo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new To,this.slugger=new Ht}Lt.parse=function(rt,lt){var pt=new Lt(lt);return pt.parse(rt)},Lt.parseInline=function(rt,lt){var pt=new Lt(lt);return pt.parseInline(rt)};var xt=Lt.prototype;return xt.parse=function(rt,lt){lt===void 0&&(lt=!0);var pt="",St,Qt,bo,qt,Eo,Ro,zo,Bo,Jt,fo,ri,Zo,ci,ki,wi,Zi,Vi,vi,sn,en=rt.length;for(St=0;St<en;St++){if(fo=rt[St],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[fo.type]&&(sn=this.options.extensions.renderers[fo.type].call({parser:this},fo),sn!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(fo.type))){pt+=sn||"";continue}switch(fo.type){case"space":continue;case"hr":{pt+=this.renderer.hr();continue}case"heading":{pt+=this.renderer.heading(this.parseInline(fo.tokens),fo.depth,Ue(this.parseInline(fo.tokens,this.textRenderer)),this.slugger);continue}case"code":{pt+=this.renderer.code(fo.text,fo.lang,fo.escaped);continue}case"table":{for(Bo="",zo="",qt=fo.header.length,Qt=0;Qt<qt;Qt++)zo+=this.renderer.tablecell(this.parseInline(fo.header[Qt].tokens),{header:!0,align:fo.align[Qt]});for(Bo+=this.renderer.tablerow(zo),Jt="",qt=fo.rows.length,Qt=0;Qt<qt;Qt++){for(Ro=fo.rows[Qt],zo="",Eo=Ro.length,bo=0;bo<Eo;bo++)zo+=this.renderer.tablecell(this.parseInline(Ro[bo].tokens),{header:!1,align:fo.align[bo]});Jt+=this.renderer.tablerow(zo)}pt+=this.renderer.table(Bo,Jt);continue}case"blockquote":{Jt=this.parse(fo.tokens),pt+=this.renderer.blockquote(Jt);continue}case"list":{for(ri=fo.ordered,Zo=fo.start,ci=fo.loose,qt=fo.items.length,Jt="",Qt=0;Qt<qt;Qt++)wi=fo.items[Qt],Zi=wi.checked,Vi=wi.task,ki="",wi.task&&(vi=this.renderer.checkbox(Zi),ci?wi.tokens.length>0&&wi.tokens[0].type==="paragraph"?(wi.tokens[0].text=vi+" "+wi.tokens[0].text,wi.tokens[0].tokens&&wi.tokens[0].tokens.length>0&&wi.tokens[0].tokens[0].type==="text"&&(wi.tokens[0].tokens[0].text=vi+" "+wi.tokens[0].tokens[0].text)):wi.tokens.unshift({type:"text",text:vi}):ki+=vi),ki+=this.parse(wi.tokens,ci),Jt+=this.renderer.listitem(ki,Vi,Zi);pt+=this.renderer.list(Jt,ri,Zo);continue}case"html":{pt+=this.renderer.html(fo.text);continue}case"paragraph":{pt+=this.renderer.paragraph(this.parseInline(fo.tokens));continue}case"text":{for(Jt=fo.tokens?this.parseInline(fo.tokens):fo.text;St+1<en&&rt[St+1].type==="text";)fo=rt[++St],Jt+=`
|
|
|
`+(fo.tokens?this.parseInline(fo.tokens):fo.text);pt+=lt?this.renderer.paragraph(Jt):Jt;continue}default:{var on='Token with "'+fo.type+'" type was not found.';if(this.options.silent){console.error(on);return}else throw new Error(on)}}}return pt},xt.parseInline=function(rt,lt){lt=lt||this.renderer;var pt="",St,Qt,bo,qt=rt.length;for(St=0;St<qt;St++){if(Qt=rt[St],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Qt.type]&&(bo=this.options.extensions.renderers[Qt.type].call({parser:this},Qt),bo!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(Qt.type))){pt+=bo||"";continue}switch(Qt.type){case"escape":{pt+=lt.text(Qt.text);break}case"html":{pt+=lt.html(Qt.text);break}case"link":{pt+=lt.link(Qt.href,Qt.title,this.parseInline(Qt.tokens,lt));break}case"image":{pt+=lt.image(Qt.href,Qt.title,Qt.text);break}case"strong":{pt+=lt.strong(this.parseInline(Qt.tokens,lt));break}case"em":{pt+=lt.em(this.parseInline(Qt.tokens,lt));break}case"codespan":{pt+=lt.codespan(Qt.text);break}case"br":{pt+=lt.br();break}case"del":{pt+=lt.del(this.parseInline(Qt.tokens,lt));break}case"text":{pt+=lt.text(Qt.text);break}default:{var Eo='Token with "'+Qt.type+'" type was not found.';if(this.options.silent){console.error(Eo);return}else throw new Error(Eo)}}}return pt},Lt}(),Ut=Et,Ye=dt,qe=De,ct=Mo,_t=xo,Pt=Do,Wt=Pe.merge,Vt=Pe.checkSanitizeDeprecation,so=Pe.escape,wo=p.exports.getDefaults,No=p.exports.changeDefaults,di=p.exports.defaults;function _o(Lt,xt,Nt){if(typeof Lt=="undefined"||Lt===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Lt!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Lt)+", string expected");if(typeof xt=="function"&&(Nt=xt,xt=null),xt=Wt({},_o.defaults,xt||{}),Vt(xt),Nt){var rt=xt.highlight,lt;try{lt=Ut.lex(Lt,xt)}catch(bo){return Nt(bo)}var pt=function(qt){var Eo;if(!qt)try{xt.walkTokens&&_o.walkTokens(lt,xt.walkTokens),Eo=Ye.parse(lt,xt)}catch(Ro){qt=Ro}return xt.highlight=rt,qt?Nt(qt):Nt(null,Eo)};if(!rt||rt.length<3)return pt();if(delete xt.highlight,!lt.length)return pt();var St=0;_o.walkTokens(lt,function(bo){bo.type==="code"&&(St++,setTimeout(function(){rt(bo.text,bo.lang,function(qt,Eo){if(qt)return pt(qt);Eo!=null&&Eo!==bo.text&&(bo.text=Eo,bo.escaped=!0),St--,St===0&&pt()})},0))}),St===0&&pt();return}try{var Qt=Ut.lex(Lt,xt);return xt.walkTokens&&_o.walkTokens(Qt,xt.walkTokens),Ye.parse(Qt,xt)}catch(bo){if(bo.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,xt.silent)return"<p>An error occurred:</p><pre>"+so(bo.message+"",!0)+"</pre>";throw bo}}_o.options=_o.setOptions=function(Lt){return Wt(_o.defaults,Lt),No(_o.defaults),_o},_o.getDefaults=wo,_o.defaults=di,_o.use=function(){for(var Lt=this,xt=arguments.length,Nt=new Array(xt),rt=0;rt<xt;rt++)Nt[rt]=arguments[rt];var lt=Wt.apply(void 0,[{}].concat(Nt)),pt=_o.defaults.extensions||{renderers:{},childTokens:{}},St;Nt.forEach(function(Qt){if(Qt.extensions&&(St=!0,Qt.extensions.forEach(function(qt){if(!qt.name)throw new Error("extension name required");if(qt.renderer){var Eo=pt.renderers?pt.renderers[qt.name]:null;Eo?pt.renderers[qt.name]=function(){for(var Ro=arguments.length,zo=new Array(Ro),Bo=0;Bo<Ro;Bo++)zo[Bo]=arguments[Bo];var Jt=qt.renderer.apply(this,zo);return Jt===!1&&(Jt=Eo.apply(this,zo)),Jt}:pt.renderers[qt.name]=qt.renderer}if(qt.tokenizer){if(!qt.level||qt.level!=="block"&&qt.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");pt[qt.level]?pt[qt.level].unshift(qt.tokenizer):pt[qt.level]=[qt.tokenizer],qt.start&&(qt.level==="block"?pt.startBlock?pt.startBlock.push(qt.start):pt.startBlock=[qt.start]:qt.level==="inline"&&(pt.startInline?pt.startInline.push(qt.start):pt.startInline=[qt.start]))}qt.childTokens&&(pt.childTokens[qt.name]=qt.childTokens)})),Qt.renderer&&function(){var qt=_o.defaults.renderer||new ct,Eo=function(Bo){var Jt=qt[Bo];qt[Bo]=function(){for(var fo=arguments.length,ri=new Array(fo),Zo=0;Zo<fo;Zo++)ri[Zo]=arguments[Zo];var ci=Qt.renderer[Bo].apply(qt,ri);return ci===!1&&(ci=Jt.apply(qt,ri)),ci}};for(var Ro in Qt.renderer)Eo(Ro);lt.renderer=qt}(),Qt.tokenizer&&function(){var qt=_o.defaults.tokenizer||new qe,Eo=function(Bo){var Jt=qt[Bo];qt[Bo]=function(){for(var fo=arguments.length,ri=new Array(fo),Zo=0;Zo<fo;Zo++)ri[Zo]=arguments[Zo];var ci=Qt.tokenizer[Bo].apply(qt,ri);return ci===!1&&(ci=Jt.apply(qt,ri)),ci}};for(var Ro in Qt.tokenizer)Eo(Ro);lt.tokenizer=qt}(),Qt.walkTokens){var bo=_o.defaults.walkTokens;lt.walkTokens=function(qt){Qt.walkTokens.call(Lt,qt),bo&&bo(qt)}}St&&(lt.extensions=pt),_o.setOptions(lt)})},_o.walkTokens=function(Lt,xt){for(var Nt=function(){var St=lt.value;xt(St);switch(St.type){case"table":{for(var Qt=c(St.header),bo;!(bo=Qt()).done;){var qt=bo.value;_o.walkTokens(qt.tokens,xt)}for(var Eo=c(St.rows),Ro;!(Ro=Eo()).done;)for(var zo=Ro.value,Bo=c(zo),Jt;!(Jt=Bo()).done;){var fo=Jt.value;_o.walkTokens(fo.tokens,xt)}break}case"list":{_o.walkTokens(St.items,xt);break}default:_o.defaults.extensions&&_o.defaults.extensions.childTokens&&_o.defaults.extensions.childTokens[St.type]?_o.defaults.extensions.childTokens[St.type].forEach(function(ri){_o.walkTokens(St[ri],xt)}):St.tokens&&_o.walkTokens(St.tokens,xt)}},rt=c(Lt),lt;!(lt=rt()).done;)Nt()},_o.parseInline=function(Lt,xt){if(typeof Lt=="undefined"||Lt===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Lt!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Lt)+", string expected");xt=Wt({},_o.defaults,xt||{}),Vt(xt);try{var Nt=Ut.lexInline(Lt,xt);return xt.walkTokens&&_o.walkTokens(Nt,xt.walkTokens),Ye.parseInline(Nt,xt)}catch(rt){if(rt.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,xt.silent)return"<p>An error occurred:</p><pre>"+so(rt.message+"",!0)+"</pre>";throw rt}},_o.Parser=Ye,_o.parser=Ye.parse,_o.Renderer=ct,_o.TextRenderer=_t,_o.Lexer=Ut,_o.lexer=Ut.lex,_o.Tokenizer=qe,_o.Slugger=Pt,_o.parse=_o;var no=_o;return no})})();var x=B,N=B.Parser,A=B.parser,F=B.Renderer,I=B.TextRenderer,L=B.Lexer,v=B.lexer,m=B.Tokenizer,d=B.Slugger,D=B.parse}).call(this,t("Vg/k")(mt))},SvYn:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:function(){return t.e(327).then(t.bind(null,"Dsrv"))}})},Szf2:function(mt,M,t){"use strict";t.d(M,"e",function(){return B}),t.d(M,"d",function(){return N}),t.d(M,"a",function(){return A}),t.d(M,"c",function(){return I}),t.d(M,"b",function(){return L});var f=t("/cxE");function B(v,m){if(v===0)return null;const d=(v&65535)>>>0,D=(v&4294901760)>>>16;return D!==0?new A([x(d,m),x(D,m)]):new A([x(d,m)])}function x(v,m){const d=!!(v&2048),D=!!(v&256),S=m===2?D:d,r=!!(v&1024),_=!!(v&512),b=m===2?d:D,h=v&255;return new N(S,r,_,b,h)}class N{constructor(v,m,d,D,S){this.ctrlKey=v,this.shiftKey=m,this.altKey=d,this.metaKey=D,this.keyCode=S}equals(v){return this.ctrlKey===v.ctrlKey&&this.shiftKey===v.shiftKey&&this.altKey===v.altKey&&this.metaKey===v.metaKey&&this.keyCode===v.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toChord(){return new A([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}class A{constructor(v){if(v.length===0)throw Object(f.c)("parts");this.parts=v}}class F{constructor(v,m,d,D,S){this.ctrlKey=v,this.shiftKey=m,this.altKey=d,this.metaKey=D,this.scanCode=S}isDuplicateModifierCase(){return this.ctrlKey&&(this.scanCode===157||this.scanCode===161)||this.shiftKey&&(this.scanCode===158||this.scanCode===162)||this.altKey&&(this.scanCode===159||this.scanCode===163)||this.metaKey&&(this.scanCode===160||this.scanCode===164)}}class I{constructor(v,m,d,D,S,r){this.ctrlKey=v,this.shiftKey=m,this.altKey=d,this.metaKey=D,this.keyLabel=S,this.keyAriaLabel=r}}class L{}},TQUy:function(mt,M,t){"use strict";t.d(M,"b",function(){return A}),t.d(M,"a",function(){return F});var f=t("N0LK"),B=t("4bUh"),x=t("i/Ef");const N={getInitialState:()=>x.b,tokenize2:(L,v,m,d)=>Object(x.d)(0,L,m,d)};function A(L,v,m=N){return I(L,v,m||N)}function F(L,v,m,d,D,S,r){let _="<div>",b=d,h=0,c=!0;for(let p=0,E=v.getCount();p<E;p++){const y=v.getEndOffset(p);if(y<=d)continue;let C="";for(;b<y&&b<D;b++){const O=L.charCodeAt(b);switch(O){case 9:let k=S-(b+h)%S;for(h+=k-1;k>0;)r&&c?(C+=" ",c=!1):(C+=" ",c=!0),k--;break;case 60:C+="<",c=!1;break;case 62:C+=">",c=!1;break;case 38:C+="&",c=!1;break;case 0:C+="�",c=!1;break;case 65279:case 8232:case 8233:case 133:C+="\uFFFD",c=!1;break;case 13:C+="​",c=!1;break;case 32:r&&c?(C+=" ",c=!1):(C+=" ",c=!0);break;default:C+=String.fromCharCode(O),c=!1}}if(_+=`<span style="${v.getInlineStyle(p,m)}">${C}</span>`,y>D||b>=D)break}return _+="</div>",_}function I(L,v,m){let d='<div class="monaco-tokenized-source">';const D=f.Q(L);let S=m.getInitialState();for(let r=0,_=D.length;r<_;r++){const b=D[r];r>0&&(d+="<br/>");const h=m.tokenize2(b,!0,S,0);B.a.convertToEndOffset(h.tokens,b.length);const c=new B.a(h.tokens,b,v),p=c.inflate();let E=0;for(let y=0,C=p.getCount();y<C;y++){const O=p.getClassName(y),k=p.getEndOffset(y);d+=`<span class="${O}">${f.s(b.substring(E,k))}</span>`,E=k}S=h.endState}return d+="</div>",d}},TT2d:function(mt,M,t){},Tcc1:function(mt,M,t){"use strict";t.d(M,"a",function(){return f}),t.d(M,"b",function(){return B}),t.d(M,"c",function(){return x});class f{constructor(N,A,F){this._tokenBrand=void 0,this.offset=N|0,this.type=A,this.language=F}toString(){return"("+this.offset+", "+this.type+")"}}class B{constructor(N,A){this._tokenizationResultBrand=void 0,this.tokens=N,this.endState=A}}class x{constructor(N,A){this._tokenizationResult2Brand=void 0,this.tokens=N,this.endState=A}}},UCkY:function(mt,M,t){},Uzvx:function(mt,M,t){"use strict";t.d(M,"b",function(){return B}),t.d(M,"a",function(){return x});var f=t("Cg/j");const B=Object(f.c)("contextViewService"),x=Object(f.c)("contextMenuService")},VPJY:function(mt,M,t){},"Vg/k":function(mt,M){(function(t){mt.exports=function(){var f={46:function(N){N.exports=function(A){if(!A.webpackPolyfill){var F=Object.create(A);F.children||(F.children=[]),Object.defineProperty(F,"loaded",{enumerable:!0,get:function(){return F.l}}),Object.defineProperty(F,"id",{enumerable:!0,get:function(){return F.i}}),Object.defineProperty(F,"exports",{enumerable:!0}),F.webpackPolyfill=1}return F}}},B={};function x(N){if(B[N])return B[N].exports;var A=B[N]={exports:{}},F=!0;try{f[N](A,A.exports,x),F=!1}finally{F&&delete B[N]}return A.exports}return x.ab=t+"/",x(46)}()}).call(this,"/")},Vtyv:function(mt,M,t){},VvMK:function(mt,M,t){},Vxe3:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("Cg/j");const B=Object(f.c)("codeEditorService")},W9cx:function(mt,M,t){"use strict";t.d(M,"a",function(){return F}),t.d(M,"b",function(){return I}),t.d(M,"c",function(){return L});var f=t("pmY6"),B=t("N0LK"),x=t("bY76"),N=t("Cg/j"),A=function(v,m,d,D){function S(r){return r instanceof d?r:new d(function(_){_(r)})}return new(d||(d=Promise))(function(r,_){function b(p){try{c(D.next(p))}catch(E){_(E)}}function h(p){try{c(D.throw(p))}catch(E){_(E)}}function c(p){p.done?r(p.value):S(p.value).then(b,h)}c((D=D.apply(v,m||[])).next())})};const F=Object(N.c)("openerService"),I=Object.freeze({_serviceBrand:void 0,registerOpener(){return f.a.None},registerValidator(){return f.a.None},registerExternalUriResolver(){return f.a.None},setDefaultExternalOpener(){},registerExternalOpener(){return f.a.None},open(){return A(this,void 0,void 0,function*(){return!1})},resolveExternalUri(v){return A(this,void 0,void 0,function*(){return{resolved:v,dispose(){}}})}});function L(v,m){return x.a.isUri(v)?Object(B.r)(v.scheme,m):Object(B.R)(v,m+":")}},WBhO:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("Cg/j");const B=Object(f.c)("modeService")},WaSP:function(mt,M,t){"use strict";t.d(M,"a",function(){return U});var f=t("6OMU"),B=t("pmY6"),x=t("N0LK"),N=t("dFcq"),A=t("0/Sa"),F=t("aokT"),I=t("gCVg"),L=t("tX9W"),v=t("R8sh"),m=t("MD5Z"),d=t("t9D7"),D=t("EWX2"),S=t("uACm"),r=t("3rx1"),_=t("MrjW"),b=t("gslv");const h=new Uint8Array(16),c=[];for(let G=0;G<256;G++)c.push(G.toString(16).padStart(2,"0"));let p;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?p=crypto.getRandomValues.bind(crypto):p=function(G){for(let J=0;J<G.length;J++)G[J]=Math.floor(Math.random()*256);return G};function E(){p(h),h[6]=h[6]&15|64,h[8]=h[8]&63|128;let G=0,J="";return J+=c[h[G++]],J+=c[h[G++]],J+=c[h[G++]],J+=c[h[G++]],J+="-",J+=c[h[G++]],J+=c[h[G++]],J+="-",J+=c[h[G++]],J+=c[h[G++]],J+="-",J+=c[h[G++]],J+=c[h[G++]],J+="-",J+=c[h[G++]],J+=c[h[G++]],J+=c[h[G++]],J+=c[h[G++]],J+=c[h[G++]],J+=c[h[G++]],J}var y=t("cMvZ"),C=t("3/fG"),O=t("bY76");const k="code-workspace";function Y(G){const J=G;return typeof(J==null?void 0:J.id)=="string"&&O.a.isUri(J.uri)}function Q(G){return G.configuration?{id:G.id,configPath:G.configuration}:G.folders.length===1?{id:G.id,uri:G.folders[0].uri}:void 0}class H{constructor(G){this._delegates=G}resolve(G){for(const J of this._delegates){let he=J.resolve(G);if(he!==void 0)return he}return}}class Z{constructor(G,J,he,xe){this._model=G,this._selection=J,this._selectionIdx=he,this._overtypingCapturer=xe}resolve(G){const{name:J}=G;if(J==="SELECTION"||J==="TM_SELECTED_TEXT"){let he=this._model.getValueInRange(this._selection)||void 0,xe=this._selection.startLineNumber!==this._selection.endLineNumber;if(!he&&this._overtypingCapturer){const Ie=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);Ie&&(he=Ie.value,xe=Ie.multiline)}if(he&&xe&&G.snippet){const Ie=this._model.getLineContent(this._selection.startLineNumber),Le=Object(x.x)(Ie,0,this._selection.startColumn-1);let Te=Le;G.snippet.walk(ue=>ue===G?!1:(ue instanceof S.d&&(Te=Object(x.x)(Object(x.Q)(ue.value).pop())),!0));const ze=Object(x.d)(Te,Le);he=he.replace(/(\r\n|\r|\n)(.*)/g,(ue,je,Pe)=>`${je}${Te.substr(ze)}${Pe}`)}return he}else{if(J==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(J==="TM_CURRENT_WORD"){const he=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return he&&he.word||void 0}else{if(J==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(J==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber)}}return}}class oe{constructor(G,J){this._labelService=G,this._model=J}resolve(G){const{name:J}=G;if(J==="TM_FILENAME")return _.a(this._model.uri.fsPath);if(J==="TM_FILENAME_BASE"){const he=_.a(this._model.uri.fsPath),xe=he.lastIndexOf(".");return xe<=0?he:he.slice(0,xe)}else{if(J==="TM_DIRECTORY")return _.b(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(Object(b.d)(this._model.uri));if(J==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(J==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}return}}class ${constructor(G,J,he,xe){this._readClipboardText=G,this._selectionIdx=J,this._selectionCount=he,this._spread=xe}resolve(G){if(G.name!=="CLIPBOARD")return;const J=this._readClipboardText();if(!J)return;if(this._spread){const he=J.split(/\r\n|\n|\r/).filter(xe=>!Object(x.C)(xe));if(he.length===this._selectionCount)return he[this._selectionIdx]}return J}}class te{constructor(G,J){this._model=G,this._selection=J}resolve(G){const{name:J}=G,he=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),xe=y.b.getComments(he);return xe?J==="LINE_COMMENT"?xe.lineCommentToken||void 0:J==="BLOCK_COMMENT_START"?xe.blockCommentStartToken||void 0:J==="BLOCK_COMMENT_END"&&xe.blockCommentEndToken||void 0:void 0}}class ne{constructor(){this._date=new Date}resolve(G){const{name:J}=G;return J==="CURRENT_YEAR"?String(this._date.getFullYear()):J==="CURRENT_YEAR_SHORT"?String(this._date.getFullYear()).slice(-2):J==="CURRENT_MONTH"?String(this._date.getMonth().valueOf()+1).padStart(2,"0"):J==="CURRENT_DATE"?String(this._date.getDate().valueOf()).padStart(2,"0"):J==="CURRENT_HOUR"?String(this._date.getHours().valueOf()).padStart(2,"0"):J==="CURRENT_MINUTE"?String(this._date.getMinutes().valueOf()).padStart(2,"0"):J==="CURRENT_SECOND"?String(this._date.getSeconds().valueOf()).padStart(2,"0"):J==="CURRENT_DAY_NAME"?ne.dayNames[this._date.getDay()]:J==="CURRENT_DAY_NAME_SHORT"?ne.dayNamesShort[this._date.getDay()]:J==="CURRENT_MONTH_NAME"?ne.monthNames[this._date.getMonth()]:J==="CURRENT_MONTH_NAME_SHORT"?ne.monthNamesShort[this._date.getMonth()]:J==="CURRENT_SECONDS_UNIX"?String(Math.floor(this._date.getTime()/1e3)):void 0}}ne.dayNames=[C.a("Sunday","Sunday"),C.a("Monday","Monday"),C.a("Tuesday","Tuesday"),C.a("Wednesday","Wednesday"),C.a("Thursday","Thursday"),C.a("Friday","Friday"),C.a("Saturday","Saturday")],ne.dayNamesShort=[C.a("SundayShort","Sun"),C.a("MondayShort","Mon"),C.a("TuesdayShort","Tue"),C.a("WednesdayShort","Wed"),C.a("ThursdayShort","Thu"),C.a("FridayShort","Fri"),C.a("SaturdayShort","Sat")],ne.monthNames=[C.a("January","January"),C.a("February","February"),C.a("March","March"),C.a("April","April"),C.a("May","May"),C.a("June","June"),C.a("July","July"),C.a("August","August"),C.a("September","September"),C.a("October","October"),C.a("November","November"),C.a("December","December")],ne.monthNamesShort=[C.a("JanuaryShort","Jan"),C.a("FebruaryShort","Feb"),C.a("MarchShort","Mar"),C.a("AprilShort","Apr"),C.a("MayShort","May"),C.a("JuneShort","Jun"),C.a("JulyShort","Jul"),C.a("AugustShort","Aug"),C.a("SeptemberShort","Sep"),C.a("OctoberShort","Oct"),C.a("NovemberShort","Nov"),C.a("DecemberShort","Dec")];class Ee{constructor(G){this._workspaceService=G}resolve(G){if(!this._workspaceService)return;const J=Q(this._workspaceService.getWorkspace());return J?G.name==="WORKSPACE_NAME"?this._resolveWorkspaceName(J):G.name==="WORKSPACE_FOLDER"?this._resoveWorkspacePath(J):void 0:void 0}_resolveWorkspaceName(G){if(Y(G))return _.a(G.uri.path);let J=_.a(G.configPath.path);return J.endsWith(k)&&(J=J.substr(0,J.length-k.length-1)),J}_resoveWorkspacePath(G){if(Y(G))return Object(r.b)(G.uri.fsPath);let J=_.a(G.configPath.path),he=G.configPath.fsPath;return he.endsWith(J)&&(he=he.substr(0,he.length-J.length-1)),he?Object(r.b)(he):"/"}}class fe{resolve(G){const{name:J}=G;return J==="RANDOM"?Math.random().toString().slice(-6):J==="RANDOM_HEX"?Math.random().toString(16).slice(-6):J==="UUID"?E():void 0}}Object(d.f)((G,J)=>{function he(xe){const Ie=G.getColor(xe);return Ie?Ie.toString():"transparent"}J.addRule(`.monaco-editor .snippet-placeholder { background-color: ${he(m.Ec)}; outline-color: ${he(m.Fc)}; }`),J.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${he(m.Cc)}; outline-color: ${he(m.Dc)}; }`)});class ee{constructor(G,J,he,xe){this._editor=G,this._snippet=J,this._offset=he,this._snippetLineLeadingWhitespace=xe,this._nestingLevel=1,this._placeholderGroups=Object(f.l)(J.placeholders,S.b.compareByIndex),this._placeholderGroupsIdx=-1}dispose(){this._placeholderDecorations&&this._editor.deltaDecorations([...this._placeholderDecorations.values()],[]),this._placeholderGroups.length=0}_initDecorations(){if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const G=this._editor.getModel();this._editor.changeDecorations(J=>{for(const he of this._snippet.placeholders){const xe=this._snippet.offset(he),Ie=this._snippet.fullLen(he),Le=F.a.fromPositions(G.getPositionAt(this._offset+xe),G.getPositionAt(this._offset+xe+Ie)),Te=he.isFinalTabstop?ee._decor.inactiveFinal:ee._decor.inactive,ze=J.addDecoration(Le,Te);this._placeholderDecorations.set(he,ze)}})}move(G){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let xe=[];for(const Ie of this._placeholderGroups[this._placeholderGroupsIdx])if(Ie.transform){const Le=this._placeholderDecorations.get(Ie),Te=this._editor.getModel().getDecorationRange(Le),ze=this._editor.getModel().getValueInRange(Te),ue=Ie.transform.resolve(ze).split(/\r\n|\r|\n/);for(let je=1;je<ue.length;je++)ue[je]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+ue[je]);xe.push(A.a.replace(Te,ue.join(this._editor.getModel().getEOL())))}xe.length>0&&this._editor.executeEdits("snippet.placeholderTransform",xe)}let J=!1;G===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,J=!0):G===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,J=!0);const he=this._editor.getModel().changeDecorations(xe=>{const Ie=new Set,Le=[];for(const Te of this._placeholderGroups[this._placeholderGroupsIdx]){const ze=this._placeholderDecorations.get(Te),ue=this._editor.getModel().getDecorationRange(ze);Le.push(new I.a(ue.startLineNumber,ue.startColumn,ue.endLineNumber,ue.endColumn)),J=J&&this._hasPlaceholderBeenCollapsed(Te),xe.changeDecorationOptions(ze,Te.isFinalTabstop?ee._decor.activeFinal:ee._decor.active),Ie.add(Te);for(const je of this._snippet.enclosingPlaceholders(Te)){const Pe=this._placeholderDecorations.get(je);xe.changeDecorationOptions(Pe,je.isFinalTabstop?ee._decor.activeFinal:ee._decor.active),Ie.add(je)}}for(const[Te,ze]of this._placeholderDecorations)Ie.has(Te)||xe.changeDecorationOptions(ze,Te.isFinalTabstop?ee._decor.inactiveFinal:ee._decor.inactive);return Le});return J?this.move(G):he!=null?he:[]}_hasPlaceholderBeenCollapsed(G){let J=G;for(;J;){if(J instanceof S.b){const he=this._placeholderDecorations.get(J),xe=this._editor.getModel().getDecorationRange(he);if(xe.isEmpty()&&J.toString().length>0)return!0}J=J.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}computePossibleSelections(){const G=new Map;for(const J of this._placeholderGroups){let he;for(const xe of J){if(xe.isFinalTabstop)break;he||(he=[],G.set(xe.index,he));const Ie=this._placeholderDecorations.get(xe),Le=this._editor.getModel().getDecorationRange(Ie);if(!Le){G.delete(xe.index);break}he.push(Le)}}return G}get choice(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}merge(G){const J=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(he=>{for(const xe of this._placeholderGroups[this._placeholderGroupsIdx]){const Ie=G.shift();console.assert(!Ie._placeholderDecorations);const Le=Ie._snippet.placeholderInfo.last.index;for(const ze of Ie._snippet.placeholderInfo.all)ze.isFinalTabstop?ze.index=xe.index+(Le+1)/this._nestingLevel:ze.index=xe.index+ze.index/this._nestingLevel;this._snippet.replace(xe,Ie._snippet.children);const Te=this._placeholderDecorations.get(xe);he.removeDecoration(Te),this._placeholderDecorations.delete(xe);for(const ze of Ie._snippet.placeholders){const ue=Ie._snippet.offset(ze),je=Ie._snippet.fullLen(ze),Pe=F.a.fromPositions(J.getPositionAt(Ie._offset+ue),J.getPositionAt(Ie._offset+ue+je)),ve=he.addDecoration(Pe,ee._decor.inactive);this._placeholderDecorations.set(ze,ve)}}this._placeholderGroups=Object(f.l)(this._snippet.placeholders,S.b.compareByIndex)})}}ee._decor={active:L.b.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:L.b.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:L.b.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:L.b.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const ie={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};class U{constructor(G,J,he=ie){this._templateMerges=[],this._snippets=[],this._editor=G,this._template=J,this._options=he}static adjustWhitespace(G,J,he,xe,Ie){const Le=G.getLineContent(J.lineNumber),Te=Object(x.x)(Le,0,J.column-1);let ze;return he.walk(ue=>{if(!(ue instanceof S.d)||ue.parent instanceof S.a)return!0;const je=ue.value.split(/\r\n|\r|\n/);if(xe){const ve=he.offset(ue);if(ve===0)je[0]=G.normalizeIndentation(je[0]);else{ze=ze!=null?ze:he.toString();let ce=ze.charCodeAt(ve-1);(ce===10||ce===13)&&(je[0]=G.normalizeIndentation(Te+je[0]))}for(let ce=1;ce<je.length;ce++)je[ce]=G.normalizeIndentation(Te+je[ce])}const Pe=je.join(G.getEOL());return Pe!==ue.value&&(ue.parent.replace(ue,[new S.d(Pe)]),ze=void 0),!0}),Te}static adjustSelection(G,J,he,xe){if(he!==0||xe!==0){const{positionLineNumber:Ie,positionColumn:Le}=J,Te=Le-he,ze=Le+xe,ue=G.validateRange({startLineNumber:Ie,startColumn:Te,endLineNumber:Ie,endColumn:ze});J=I.a.createWithDirection(ue.startLineNumber,ue.startColumn,ue.endLineNumber,ue.endColumn,J.getDirection())}return J}static createEditsAndSnippets(G,J,he,xe,Ie,Le,Te,ze){const ue=[],je=[];if(!G.hasModel())return{edits:ue,snippets:je};const Pe=G.getModel(),ve=G.invokeWithinContext(we=>we.get(D.a)),ce=G.invokeWithinContext(we=>new oe(we.get(v.a),Pe)),le=()=>Te;let Ce=0,ye=Pe.getValueInRange(U.adjustSelection(Pe,G.getSelection(),he,0)),ge=Pe.getValueInRange(U.adjustSelection(Pe,G.getSelection(),0,xe)),Me=Pe.getLineFirstNonWhitespaceColumn(G.getSelection().positionLineNumber);const De=G.getSelections().map((we,Oe)=>({selection:we,idx:Oe})).sort((we,Oe)=>F.a.compareRangesUsingStarts(we.selection,Oe.selection));for(const{selection:we,idx:Oe}of De){let nt=U.adjustSelection(Pe,we,he,0),Ke=U.adjustSelection(Pe,we,0,xe);ye!==Pe.getValueInRange(nt)&&(nt=we),ge!==Pe.getValueInRange(Ke)&&(Ke=we);const et=we.setStartPosition(nt.startLineNumber,nt.startColumn).setEndPosition(Ke.endLineNumber,Ke.endColumn),bt=new S.c().parse(J,!0,Ie),Tt=et.getStartPosition(),$t=U.adjustWhitespace(Pe,Tt,bt,Le||Oe>0&&Me!==Pe.getLineFirstNonWhitespaceColumn(we.positionLineNumber),!0);bt.resolveVariables(new H([ce,new $(le,Oe,De.length,G.getOption(70)==="spread"),new Z(Pe,we,Oe,ze),new te(Pe,we),new ne,new Ee(ve),new fe]));const Xe=Pe.getOffsetAt(Tt)+Ce;Ce+=bt.toString().length-Pe.getValueLengthInRange(et),ue[Oe]=A.a.replace(et,bt.toString()),ue[Oe].identifier={major:Oe,minor:0},je[Oe]=new ee(G,bt,Xe,$t)}return{edits:ue,snippets:je}}dispose(){Object(B.f)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:G,snippets:J}=U.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer);this._snippets=J,this._editor.executeEdits("snippet",G,he=>this._snippets[0].hasPlaceholder?this._move(!0):he.filter(xe=>!!xe.identifier).map(xe=>I.a.fromPositions(xe.range.getEndPosition()))),this._editor.revealRange(this._editor.getSelections()[0])}merge(G,J=ie){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,G]);const{edits:he,snippets:xe}=U.createEditsAndSnippets(this._editor,G,J.overwriteBefore,J.overwriteAfter,!0,J.adjustWhitespace,J.clipboardText,J.overtypingCapturer);this._editor.executeEdits("snippet",he,Ie=>{for(const Le of this._snippets)Le.merge(xe);return console.assert(xe.length===0),this._snippets[0].hasPlaceholder?this._move(void 0):Ie.filter(Le=>!!Le.identifier).map(Le=>I.a.fromPositions(Le.range.getEndPosition()))})}next(){const G=this._move(!0);this._editor.setSelections(G),this._editor.revealPositionInCenterIfOutsideViewport(G[0].getPosition())}prev(){const G=this._move(!1);this._editor.setSelections(G),this._editor.revealPositionInCenterIfOutsideViewport(G[0].getPosition())}_move(G){const J=[];for(const he of this._snippets){const xe=he.move(G);J.push(...xe)}return J}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get choice(){return this._snippets[0].choice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const G=this._editor.getSelections();if(G.length<this._snippets.length)return!1;let J=new Map;for(const he of this._snippets){const xe=he.computePossibleSelections();if(J.size===0)for(const[Ie,Le]of xe){Le.sort(F.a.compareRangesUsingStarts);for(const Te of G)if(Le[0].containsRange(Te)){J.set(Ie,[]);break}}if(J.size===0)return!1;J.forEach((Ie,Le)=>{Ie.push(...xe.get(Le))})}G.sort(F.a.compareRangesUsingStarts);for(let[he,xe]of J){if(xe.length!==G.length){J.delete(he);continue}xe.sort(F.a.compareRangesUsingStarts);for(let Ie=0;Ie<xe.length;Ie++)if(!xe[Ie].containsRange(G[Ie])){J.delete(he);continue}}return J.size>0}}},WqXY:function(mt,M,t){"use strict";t.d(M,"a",function(){return d});var f=t("EffR"),B=t("uDWl"),x=t("7/Ik"),N=t("8HAY"),A=t("MI8n"),F=t("pmY6"),I=t("746U"),L=t("yEoX"),v=t.n(L),m=function(D,S,r,_){function b(h){return h instanceof r?h:new r(function(c){c(h)})}return new(r||(r=Promise))(function(h,c){function p(C){try{y(_.next(C))}catch(O){c(O)}}function E(C){try{y(_.throw(C))}catch(O){c(O)}}function y(C){C.done?h(C.value):b(C.value).then(p,E)}y((_=_.apply(D,S||[])).next())})};class d extends F.a{constructor(D,S={}){var r,_,b,h,c,p;super();this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new A.b),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new A.b({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new A.b),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new A.b),this.onBeforeRun=this._onBeforeRun.event,this.options=S,this._context=(r=S.context)!==null&&r!==void 0?r:null,this._orientation=(_=this.options.orientation)!==null&&_!==void 0?_:0,this._triggerKeys={keyDown:(h=(b=this.options.triggerKeys)===null||b===void 0?void 0:b.keyDown)!==null&&h!==void 0?h:!1,keys:(p=(c=this.options.triggerKeys)===null||c===void 0?void 0:c.keys)!==null&&p!==void 0?p:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new N.b,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(C=>this._onDidRun.fire(C))),this._register(this._actionRunner.onBeforeRun(C=>this._onBeforeRun.fire(C))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",S.animated!==!1&&this.domNode.classList.add("animated");let E,y;switch(this._orientation){case 0:E=[15],y=[17];break;case 1:E=[16],y=[18],this.domNode.className+=" vertical";break}this._register(f.i(this.domNode,f.d.KEY_DOWN,C=>{const O=new B.a(C);let k=!0;const Y=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;E&&(O.equals(E[0])||O.equals(E[1]))?k=this.focusPrevious():y&&(O.equals(y[0])||O.equals(y[1]))?k=this.focusNext():O.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():O.equals(14)?k=this.focusFirst():O.equals(13)?k=this.focusLast():O.equals(2)&&Y instanceof x.b&&Y.trapsArrowNavigation?k=this.focusNext():this.isTriggerKeyEvent(O)?this._triggerKeys.keyDown?this.doTrigger(O):this.triggerKeyDown=!0:k=!1,k&&(O.preventDefault(),O.stopPropagation())})),this._register(f.i(this.domNode,f.d.KEY_UP,C=>{const O=new B.a(C);this.isTriggerKeyEvent(O)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(O)),O.preventDefault(),O.stopPropagation()):(O.equals(2)||O.equals(1024|2))&&this.updateFocusedItem()})),this.focusTracker=this._register(f.Y(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(f.y()===this.domNode||!f.L(f.y(),this.domNode))&&(this._onDidBlur.fire(),this.focusedItem=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),D.appendChild(this.domNode)}isTriggerKeyEvent(D){let S=!1;return this._triggerKeys.keys.forEach(r=>{S=S||D.equals(r)}),S}updateFocusedItem(){for(let D=0;D<this.actionsList.children.length;D++){const S=this.actionsList.children[D];if(f.L(f.y(),S)){this.focusedItem=D;break}}}get context(){return this._context}set context(D){this._context=D,this.viewItems.forEach(S=>S.setActionContext(D))}get actionRunner(){return this._actionRunner}set actionRunner(D){D&&(this._actionRunner=D,this.viewItems.forEach(S=>S.actionRunner=D))}getContainer(){return this.domNode}push(D,S={}){const r=Array.isArray(D)?D:[D];let _=I.j(S.index)?S.index:null;r.forEach(b=>{const h=document.createElement("li");h.className="action-item",h.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(f.i(h,f.d.CONTEXT_MENU,p=>{f.c.stop(p,!0)}));let c;this.options.actionViewItemProvider&&(c=this.options.actionViewItemProvider(b)),c||(c=new x.a(this.context,b,S)),c.actionRunner=this._actionRunner,c.setActionContext(this.context),c.render(h),this.focusable&&c instanceof x.b&&this.viewItems.length===0&&c.setFocusable(!0),_===null||_<0||_>=this.actionsList.children.length?(this.actionsList.appendChild(h),this.viewItems.push(c),this._actionIds.push(b.id)):(this.actionsList.insertBefore(h,this.actionsList.children[_]),this.viewItems.splice(_,0,c),this._actionIds.splice(_,0,b.id),_++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem)}clear(){Object(F.f)(this.viewItems),this.viewItems=[],this._actionIds=[],f.t(this.actionsList)}length(){return this.viewItems.length}focus(D){let S=!1,r;if(D===void 0?S=!0:typeof D=="number"?r=D:typeof D=="boolean"&&(S=D),S&&typeof this.focusedItem=="undefined"){const _=this.viewItems.findIndex(b=>b.isEnabled());this.focusedItem=_===-1?void 0:_,this.updateFocus()}else r!==void 0&&(this.focusedItem=r),this.updateFocus()}focusFirst(){return this.focusedItem=this.length()>1?1:0,this.focusPrevious()}focusLast(){return this.focusedItem=this.length()<2?0:this.length()-2,this.focusNext()}focusNext(){if(typeof this.focusedItem=="undefined")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const D=this.focusedItem;let S;do{if(this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=D,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,S=this.viewItems[this.focusedItem]}while(this.focusedItem!==D&&this.options.focusOnlyEnabledItems&&!S.isEnabled());return this.updateFocus(),!0}focusPrevious(){if(typeof this.focusedItem=="undefined")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const D=this.focusedItem;let S;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=D,!1;this.focusedItem=this.viewItems.length-1}S=this.viewItems[this.focusedItem]}while(this.focusedItem!==D&&this.options.focusOnlyEnabledItems&&!S.isEnabled());return this.updateFocus(!0),!0}updateFocus(D,S){typeof this.focusedItem=="undefined"&&this.actionsList.focus({preventScroll:S});for(let r=0;r<this.viewItems.length;r++){const _=this.viewItems[r],b=_;if(r===this.focusedItem){let h=!0;I.i(b.focus)||(h=!1),this.options.focusOnlyEnabledItems&&I.i(_.isEnabled)&&!_.isEnabled()&&(h=!1),h?b.focus(D):this.actionsList.focus({preventScroll:S})}else I.i(b.blur)&&b.blur()}}doTrigger(D){if(typeof this.focusedItem=="undefined")return;const S=this.viewItems[this.focusedItem];if(S instanceof x.b){const r=S._context===null||S._context===void 0?D:S._context;this.run(S._action,r)}}run(D,S){return m(this,void 0,void 0,function*(){yield this._actionRunner.run(D,S)})}dispose(){Object(F.f)(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}},WwIK:function(mt,M,t){"use strict";t.r(M),t.d(M,"TriggerParameterHintsAction",function(){return Pe});var f=t("pmY6"),B=t("sswD"),x=t("wQH0"),N=t("twdY"),A=t("JQT/"),F=t("/cxE"),I=t("746U"),L=t("bY76"),v=t("cGHE"),m=t("t49l"),d=t("nnTU"),D=t("T8No"),S=function(le,Ce,ye,ge){function Me(De){return De instanceof ye?De:new ye(function(we){we(De)})}return new(ye||(ye=Promise))(function(De,we){function Oe(et){try{Ke(ge.next(et))}catch(bt){we(bt)}}function nt(et){try{Ke(ge.throw(et))}catch(bt){we(bt)}}function Ke(et){et.done?De(et.value):Me(et.value).then(Oe,nt)}Ke((ge=ge.apply(le,Ce||[])).next())})};const r={Visible:new D.c("parameterHintsVisible",!1),MultipleSignatures:new D.c("parameterHintsMultipleSignatures",!1)};function _(le,Ce,ye,ge){return S(this,void 0,void 0,function*(){const Me=N.A.ordered(le);for(const De of Me)try{const we=yield De.provideSignatureHelp(le,Ce,ge,ye);if(we)return we}catch(we){Object(F.g)(we)}return})}d.a.registerCommand("_executeSignatureHelpProvider",(le,...Ce)=>S(void 0,void 0,void 0,function*(){const[ye,ge,Me]=Ce;Object(I.c)(L.a.isUri(ye)),Object(I.c)(v.a.isIPosition(ge)),Object(I.c)(typeof Me=="string"||!Me);const De=yield le.get(m.a).createModelReference(ye);try{const we=yield _(De.object.textEditorModel,v.a.lift(ge),{triggerKind:N.B.Invoke,isRetrigger:!1,triggerCharacter:Me},A.a.None);return we?(setTimeout(()=>we.dispose(),0),we.value):void 0}finally{De.dispose()}}));var b=t("3/fG"),h=t("Cg/j"),c=t("EffR"),p=t("OBOq"),E=t("GJhM"),y=t("Vhoy"),C=t("MI8n"),O=t("N0LK"),k=t("yrU1"),Y=t("v6HE"),Q=t("WBhO"),H=t("X+cX"),Z=t("MXAL"),oe=function(le,Ce,ye,ge){function Me(De){return De instanceof ye?De:new ye(function(we){we(De)})}return new(ye||(ye=Promise))(function(De,we){function Oe(et){try{Ke(ge.next(et))}catch(bt){we(bt)}}function nt(et){try{Ke(ge.throw(et))}catch(bt){we(bt)}}function Ke(et){et.done?De(et.value):Me(et.value).then(Oe,nt)}Ke((ge=ge.apply(le,Ce||[])).next())})},$;(function(le){le.Default={type:0};class Ce{constructor(ge,Me){this.request=ge,this.previouslyActiveHints=Me,this.type=2}}le.Pending=Ce;class ye{constructor(ge){this.hints=ge,this.type=1}}le.Active=ye})($||($={}));class te extends f.a{constructor(le,Ce=te.DEFAULT_DELAY){super();this._onChangedHints=this._register(new C.b),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=$.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new f.d),this.triggerChars=new Z.b,this.retriggerChars=new Z.b,this.triggerId=0,this.editor=le,this.throttledDelayer=new H.a(Ce),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(ye=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(ye=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(ye=>this.onCursorChange(ye))),this._register(this.editor.onDidChangeModelContent(ye=>this.onModelContentChange())),this._register(N.A.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(ye=>this.onDidType(ye))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(le){this._state.type===2&&this._state.request.cancel(),this._state=le}cancel(le=!1){this.state=$.Default,this.throttledDelayer.cancel(),le||this._onChangedHints.fire(void 0)}trigger(le,Ce){const ye=this.editor.getModel();if(!ye||!N.A.has(ye))return;const ge=++this.triggerId;this._pendingTriggers.push(le),this.throttledDelayer.trigger(()=>this.doTrigger(ge),Ce).catch(F.f)}next(){if(this.state.type!==1)return;const le=this.state.hints.signatures.length,Ce=this.state.hints.activeSignature,ye=Ce%le===le-1,ge=this.editor.getOption(75).cycle;if((le<2||ye)&&!ge){this.cancel();return}this.updateActiveSignature(ye&&ge?0:Ce+1)}previous(){if(this.state.type!==1)return;const le=this.state.hints.signatures.length,Ce=this.state.hints.activeSignature,ye=Ce===0,ge=this.editor.getOption(75).cycle;if((le<2||ye)&&!ge){this.cancel();return}this.updateActiveSignature(ye&&ge?le-1:Ce-1)}updateActiveSignature(le){if(this.state.type!==1)return;this.state=new $.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:le})),this._onChangedHints.fire(this.state.hints)}doTrigger(le){return oe(this,void 0,void 0,function*(){const Ce=this.state.type===1||this.state.type===2,ye=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const ge=this._pendingTriggers.reduce(ne);this._pendingTriggers=[];const Me={triggerKind:ge.triggerKind,triggerCharacter:ge.triggerCharacter,isRetrigger:Ce,activeSignatureHelp:ye};if(!this.editor.hasModel())return!1;const De=this.editor.getModel(),we=this.editor.getPosition();this.state=new $.Pending(Object(H.h)(Oe=>_(De,we,Me,Oe)),ye);try{const Oe=yield this.state.request;return le!==this.triggerId?(Oe==null||Oe.dispose(),!1):!Oe||!Oe.value.signatures||Oe.value.signatures.length===0?(Oe==null||Oe.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new $.Active(Oe.value),this._lastSignatureHelpResult.value=Oe,this._onChangedHints.fire(this.state.hints),!0)}catch(Oe){return le===this.triggerId&&(this.state=$.Default),Object(F.f)(Oe),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new Z.b,this.retriggerChars=new Z.b;const le=this.editor.getModel();if(!le)return;for(const Ce of N.A.ordered(le)){for(const ye of Ce.signatureHelpTriggerCharacters||[])this.triggerChars.add(ye.charCodeAt(0)),this.retriggerChars.add(ye.charCodeAt(0));for(const ye of Ce.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(ye.charCodeAt(0))}}onDidType(le){if(!this.triggerOnType)return;const Ce=le.length-1,ye=le.charCodeAt(Ce);(this.triggerChars.has(ye)||this.isTriggered&&this.retriggerChars.has(ye))&&this.trigger({triggerKind:N.B.TriggerCharacter,triggerCharacter:le.charAt(Ce)})}onCursorChange(le){le.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:N.B.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:N.B.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(75).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}te.DEFAULT_DELAY=120;function ne(le,Ce){switch(Ce.triggerKind){case N.B.Invoke:return Ce;case N.B.ContentChange:return le;case N.B.TriggerCharacter:default:return Ce}}var Ee=t("W9cx"),fe=t("MD5Z"),ee=t("v1vZ"),ie=t("nEHx"),U=t("t9D7"),G=function(le,Ce,ye,ge){var Me=arguments.length,De=Me<3?Ce:ge===null?ge=Object.getOwnPropertyDescriptor(Ce,ye):ge,we;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")De=Reflect.decorate(le,Ce,ye,ge);else for(var Oe=le.length-1;Oe>=0;Oe--)(we=le[Oe])&&(De=(Me<3?we(De):Me>3?we(Ce,ye,De):we(Ce,ye))||De);return Me>3&&De&&Object.defineProperty(Ce,ye,De),De},J=function(le,Ce){return function(ye,ge){Ce(ye,ge,le)}};const he=c.a,xe=Object(ee.b)("parameter-hints-next",y.b.chevronDown,b.a("parameterHintsNextIcon","Icon for show next parameter hint.")),Ie=Object(ee.b)("parameter-hints-previous",y.b.chevronUp,b.a("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let Le=class le extends f.a{constructor(Ce,ye,ge,Me){super();this.editor=Ce,this.renderDisposeables=this._register(new f.b),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new Y.a({editor:Ce},Me,ge)),this.model=this._register(new te(Ce)),this.keyVisible=r.Visible.bindTo(ye),this.keyMultipleSignatures=r.MultipleSignatures.bindTo(ye),this._register(this.model.onChangedHints(De=>{De?(this.show(),this.render(De)):this.hide()}))}createParameterHintDOMNodes(){const Ce=he(".editor-widget.parameter-hints-widget"),ye=c.q(Ce,he(".phwrapper"));ye.tabIndex=-1;const ge=c.q(ye,he(".controls")),Me=c.q(ge,he(".button"+U.d.asCSSSelector(Ie))),De=c.q(ge,he(".overloads")),we=c.q(ge,he(".button"+U.d.asCSSSelector(xe)));this._register(c.i(Me,"click",Tt=>{c.c.stop(Tt),this.previous()})),this._register(c.i(we,"click",Tt=>{c.c.stop(Tt),this.next()}));const Oe=he(".body"),nt=new E.a(Oe,{});this._register(nt),ye.appendChild(nt.getDomNode());const Ke=c.q(Oe,he(".signature")),et=c.q(Oe,he(".docs"));Ce.style.userSelect="text",this.domNodes={element:Ce,signature:Ke,overloads:De,docs:et,scrollbar:nt},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(Tt=>{this.visible&&this.editor.layoutContentWidget(this)}));const bt=()=>{if(!this.domNodes)return;const Tt=this.editor.getOption(43);this.domNodes.element.style.fontSize=`${Tt.fontSize}px`,this.domNodes.element.style.lineHeight=`${Tt.lineHeight/Tt.fontSize}`};bt(),this._register(C.c.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(Tt=>Tt.hasChanged(43)).on(bt,null)),this._register(this.editor.onDidLayoutChange(Tt=>this.updateMaxHeight())),this.updateMaxHeight()}show(){if(this.visible)return;this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes&&this.domNodes.element.classList.add("visible")},100),this.editor.layoutContentWidget(this)}hide(){if(this.renderDisposeables.clear(),!this.visible)return;this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes&&this.domNodes.element.classList.remove("visible"),this.editor.layoutContentWidget(this)}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(Ce){var ye;if(this.renderDisposeables.clear(),!this.domNodes)return;const ge=Ce.signatures.length>1;this.domNodes.element.classList.toggle("multiple",ge),this.keyMultipleSignatures.set(ge),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const Me=Ce.signatures[Ce.activeSignature];if(!Me)return;const De=c.q(this.domNodes.signature,he(".code")),we=this.editor.getOption(43);De.style.fontSize=`${we.fontSize}px`,De.style.fontFamily=we.fontFamily;const Oe=Me.parameters.length>0,nt=(ye=Me.activeParameter)!==null&&ye!==void 0?ye:Ce.activeParameter;if(Oe)this.renderParameters(De,Me,nt);else{const bt=c.q(De,he("span"));bt.textContent=Me.label}const Ke=Me.parameters[nt];if(Ke==null?void 0:Ke.documentation){const bt=he("span.documentation");if(typeof Ke.documentation=="string")bt.textContent=Ke.documentation;else{const Tt=this.renderMarkdownDocs(Ke.documentation);bt.appendChild(Tt.element)}c.q(this.domNodes.docs,he("p",{},bt))}if(!(Me.documentation===void 0))if(typeof Me.documentation=="string")c.q(this.domNodes.docs,he("p",{},Me.documentation));else{const bt=this.renderMarkdownDocs(Me.documentation);c.q(this.domNodes.docs,bt.element)}const et=this.hasDocs(Me,Ke);if(this.domNodes.signature.classList.toggle("has-docs",et),this.domNodes.docs.classList.toggle("empty",!et),this.domNodes.overloads.textContent=String(Ce.activeSignature+1).padStart(Ce.signatures.length.toString().length,"0")+"/"+Ce.signatures.length,Ke){let bt="";const Tt=Me.parameters[nt];Array.isArray(Tt.label)?bt=Me.label.substring(Tt.label[0],Tt.label[1]):bt=Tt.label,Tt.documentation&&(bt+=typeof Tt.documentation=="string"?`, ${Tt.documentation}`:`, ${Tt.documentation.value}`),Me.documentation&&(bt+=typeof Me.documentation=="string"?`, ${Me.documentation}`:`, ${Me.documentation.value}`),this.announcedLabel!==bt&&(p.a(b.a("hint","{0}, hint",bt)),this.announcedLabel=bt)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(Ce){const ye=this.renderDisposeables.add(this.markdownRenderer.render(Ce,{asyncRenderCallback:()=>{var ge;(ge=this.domNodes)===null||ge===void 0||ge.scrollbar.scanDomNode()}}));return ye.element.classList.add("markdown-docs"),ye}hasDocs(Ce,ye){return ye&&typeof ye.documentation=="string"&&Object(I.a)(ye.documentation).length>0||(ye&&typeof ye.documentation=="object"&&Object(I.a)(ye.documentation).value.length>0||Ce.documentation&&typeof Ce.documentation=="string"&&Object(I.a)(Ce.documentation).length>0)?!0:!!(Ce.documentation&&typeof Ce.documentation=="object"&&Object(I.a)(Ce.documentation.value).length>0)}renderParameters(Ce,ye,ge){const[Me,De]=this.getParameterLabelOffsets(ye,ge),we=document.createElement("span");we.textContent=ye.label.substring(0,Me);const Oe=document.createElement("span");Oe.textContent=ye.label.substring(Me,De),Oe.className="parameter active";const nt=document.createElement("span");nt.textContent=ye.label.substring(De),c.q(Ce,we,Oe,nt)}getParameterLabelOffsets(Ce,ye){const ge=Ce.parameters[ye];if(ge){if(Array.isArray(ge.label))return ge.label;if(ge.label.length){const Me=new RegExp(`(\\W|^)${Object(O.t)(ge.label)}(?=\\W|$)`,"g");Me.test(Ce.label);const De=Me.lastIndex-ge.label.length;return De>=0?[De,Me.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return le.ID}trigger(Ce){this.model.trigger(Ce,0)}updateMaxHeight(){if(!this.domNodes)return;const Ce=Math.max(this.editor.getLayoutInfo().height/4,250),ye=`${Ce}px`;this.domNodes.element.style.maxHeight=ye;const ge=this.domNodes.element.getElementsByClassName("phwrapper");ge.length&&(ge[0].style.maxHeight=ye)}};Le.ID="editor.widget.parameterHintsWidget",Le=G([J(1,D.b),J(2,Ee.a),J(3,Q.a)],Le);const Te=Object(fe.wc)("editorHoverWidget.highlightForeground",{dark:fe.Ib,light:fe.Ib,hc:fe.Ib},b.a("editorHoverWidgetHighlightForeground","Foreground color of the active item in the parameter hint."));Object(U.f)((le,Ce)=>{const ye=le.getColor(fe.F);if(ye){const Ke=le.type===ie.a.HIGH_CONTRAST?2:1;Ce.addRule(`.monaco-editor .parameter-hints-widget { border: ${Ke}px solid ${ye}; }`),Ce.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${ye.transparent(.5)}; }`),Ce.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${ye.transparent(.5)}; }`)}const ge=le.getColor(fe.E);ge&&Ce.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${ge}; }`);const Me=le.getColor(fe.Jc);Me&&Ce.addRule(`.monaco-editor .parameter-hints-widget a { color: ${Me}; }`);const De=le.getColor(fe.Ic);De&&Ce.addRule(`.monaco-editor .parameter-hints-widget a:hover { color: ${De}; }`);const we=le.getColor(fe.G);we&&Ce.addRule(`.monaco-editor .parameter-hints-widget { color: ${we}; }`);const Oe=le.getColor(fe.Hc);Oe&&Ce.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${Oe}; }`);const nt=le.getColor(Te);nt&&Ce.addRule(`.monaco-editor .parameter-hints-widget .parameter.active { color: ${nt}}`)});var ze=function(le,Ce,ye,ge){var Me=arguments.length,De=Me<3?Ce:ge===null?ge=Object.getOwnPropertyDescriptor(Ce,ye):ge,we;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")De=Reflect.decorate(le,Ce,ye,ge);else for(var Oe=le.length-1;Oe>=0;Oe--)(we=le[Oe])&&(De=(Me<3?we(De):Me>3?we(Ce,ye,De):we(Ce,ye))||De);return Me>3&&De&&Object.defineProperty(Ce,ye,De),De},ue=function(le,Ce){return function(ye,ge){Ce(ye,ge,le)}};let je=class le extends f.a{constructor(Ce,ye){super();this.editor=Ce,this.widget=this._register(ye.createInstance(Le,this.editor))}static get(Ce){return Ce.getContribution(le.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(Ce){this.widget.trigger(Ce)}};je.ID="editor.controller.parameterHints",je=ze([ue(1,h.a)],je);class Pe extends B.b{constructor(){super({id:"editor.action.triggerParameterHints",label:b.a("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:x.a.hasSignatureHelpProvider,kbOpts:{kbExpr:x.a.editorTextFocus,primary:2048|1024|10,weight:100}})}run(le,Ce){const ye=je.get(Ce);ye&&ye.trigger({triggerKind:N.B.Invoke})}}Object(B.l)(je.ID,je),Object(B.j)(Pe);const ve=100+75,ce=B.c.bindToContribution(je.get);Object(B.k)(new ce({id:"closeParameterHints",precondition:r.Visible,handler:le=>le.cancel(),kbOpts:{weight:ve,kbExpr:x.a.focus,primary:9,secondary:[1024|9]}})),Object(B.k)(new ce({id:"showPrevParameterHint",precondition:D.a.and(r.Visible,r.MultipleSignatures),handler:le=>le.previous(),kbOpts:{weight:ve,kbExpr:x.a.focus,primary:16,secondary:[512|16],mac:{primary:16,secondary:[512|16,256|46]}}})),Object(B.k)(new ce({id:"showNextParameterHint",precondition:D.a.and(r.Visible,r.MultipleSignatures),handler:le=>le.next(),kbOpts:{weight:ve,kbExpr:x.a.focus,primary:18,secondary:[512|18],mac:{primary:18,secondary:[512|18,256|44]}}}))},"X+cX":function(mt,M,t){"use strict";t.d(M,"k",function(){return A}),t.d(M,"h",function(){return F}),t.d(M,"l",function(){return I}),t.d(M,"a",function(){return v}),t.d(M,"f",function(){return m}),t.d(M,"n",function(){return d}),t.d(M,"i",function(){return D}),t.d(M,"j",function(){return S}),t.d(M,"g",function(){return r}),t.d(M,"c",function(){return _}),t.d(M,"e",function(){return b}),t.d(M,"m",function(){return h}),t.d(M,"b",function(){return c}),t.d(M,"d",function(){return p});var f=t("JQT/"),B=t("/cxE"),x=t("pmY6"),N=function(E,y,C,O){function k(Y){return Y instanceof C?Y:new C(function(Q){Q(Y)})}return new(C||(C=Promise))(function(Y,Q){function H($){try{oe(O.next($))}catch(te){Q(te)}}function Z($){try{oe(O.throw($))}catch(te){Q(te)}}function oe($){$.done?Y($.value):k($.value).then(H,Z)}oe((O=O.apply(E,y||[])).next())})};function A(E){return!!E&&typeof E.then=="function"}function F(E){const y=new f.b,C=E(y.token),O=new Promise((k,Y)=>{const Q=y.token.onCancellationRequested(()=>{Q.dispose(),y.dispose(),Y(Object(B.b)())});Promise.resolve(C).then(H=>{Q.dispose(),y.dispose(),k(H)},H=>{Q.dispose(),y.dispose(),Y(H)})});return new class{cancel(){y.cancel()}then(k,Y){return O.then(k,Y)}catch(k){return this.then(void 0,k)}finally(k){return O.finally(k)}}}function I(E,y,C){return Promise.race([E,new Promise(O=>y.onCancellationRequested(()=>O(C)))])}class L{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(E){if(this.activePromise){if(this.queuedPromiseFactory=E,!this.queuedPromise){const y=()=>{this.queuedPromise=null;const C=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,C};this.queuedPromise=new Promise(C=>{this.activePromise.then(y,y).then(C)})}return new Promise((y,C)=>{this.queuedPromise.then(y,C)})}return this.activePromise=E(),new Promise((y,C)=>{this.activePromise.then(O=>{this.activePromise=null,y(O)},O=>{this.activePromise=null,C(O)})})}}class v{constructor(E){this.defaultDelay=E,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(E,y=this.defaultDelay){return this.task=E,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((C,O)=>{this.doResolve=C,this.doReject=O}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const C=this.task;return this.task=null,C()}return})),this.timeout=setTimeout(()=>{this.timeout=null,this.doResolve&&this.doResolve(null)},y),this.completionPromise}isTriggered(){return this.timeout!==null}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(Object(B.b)()),this.completionPromise=null)}cancelTimeout(){this.timeout!==null&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancel()}}class m{constructor(E){this.delayer=new v(E),this.throttler=new L}trigger(E,y){return this.delayer.trigger(()=>this.throttler.queue(E),y)}dispose(){this.delayer.dispose()}}function d(E,y){return y?new Promise((C,O)=>{const k=setTimeout(()=>{Y.dispose(),C()},E),Y=y.onCancellationRequested(()=>{clearTimeout(k),Y.dispose(),O(Object(B.b)())})}):F(C=>d(E,C))}function D(E,y=0){const C=setTimeout(E,y);return Object(x.i)(()=>clearTimeout(C))}function S(E,y=O=>!!O,C=null){let O=0;const k=E.length,Y=()=>{if(O>=k)return Promise.resolve(C);const Q=E[O++],H=Promise.resolve(Q());return H.then(Z=>y(Z)?Promise.resolve(Z):Y())};return Y()}class r{constructor(E,y){this._token=-1,typeof E=="function"&&typeof y=="number"&&this.setIfNotSet(E,y)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(E,y){this.cancel(),this._token=setTimeout(()=>{this._token=-1,E()},y)}setIfNotSet(E,y){if(this._token!==-1)return;this._token=setTimeout(()=>{this._token=-1,E()},y)}}class _{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(E,y){this.cancel(),this._token=setInterval(()=>{E()},y)}}class b{constructor(E,y){this.timeoutToken=-1,this.runner=E,this.timeout=y,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 this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}let h;(function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?h=E=>{const y=setTimeout(()=>{const O=Date.now()+15;E(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,O-Date.now())}}))});let C=!1;return{dispose(){if(C)return;C=!0,clearTimeout(y)}}}:h=(E,y)=>{const C=requestIdleCallback(E,typeof y=="number"?{timeout:y}:void 0);let O=!1;return{dispose(){if(O)return;O=!0,cancelIdleCallback(C)}}}})();class c{constructor(E){this._didRun=!1,this._executor=()=>{try{this._value=E()}catch(y){this._error=y}finally{this._didRun=!0}},this._handle=h(()=>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}}var p;(function(E){function y(O){return N(this,void 0,void 0,function*(){let k;const Y=yield Promise.all(O.map(Q=>Q.then(H=>H,H=>{k||(k=H);return})));if(typeof k!="undefined")throw k;return Y})}E.settled=y;function C(O){return new Promise((k,Y)=>N(this,void 0,void 0,function*(){try{yield O(k,Y)}catch(Q){Y(Q)}}))}E.withAsyncBody=C})(p||(p={}))},XQgg:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:function(){return t.e(359).then(t.bind(null,"/0xJ"))}})},XSiN:function(mt,M,t){"use strict";t.d(M,"a",function(){return N}),t.d(M,"b",function(){return A});var f=t("D3Dy"),B=t("51f4"),x=t("MNsG");class N{constructor(F){this.timestamp=Date.now(),this.browserEvent=F,this.leftButton=F.button===0,this.middleButton=F.button===1,this.rightButton=F.button===2,this.buttons=F.buttons,this.target=F.target,this.detail=F.detail||1,F.type==="dblclick"&&(this.detail=2),this.ctrlKey=F.ctrlKey,this.shiftKey=F.shiftKey,this.altKey=F.altKey,this.metaKey=F.metaKey,typeof F.pageX=="number"?(this.posx=F.pageX,this.posy=F.pageY):(this.posx=F.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=F.clientY+document.body.scrollTop+document.documentElement.scrollTop);let I=B.a.getPositionOfChildWindowRelativeToAncestorWindow(self,F.view);this.posx-=I.left,this.posy-=I.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class A{constructor(F,I=0,L=0){if(this.browserEvent=F||null,this.target=F?F.target||F.targetNode||F.srcElement:null,this.deltaY=L,this.deltaX=I,F){let v=F,m=F;if(typeof v.wheelDeltaY!="undefined")this.deltaY=v.wheelDeltaY/120;else if(typeof m.VERTICAL_AXIS!="undefined"&&m.axis===m.VERTICAL_AXIS)this.deltaY=-m.detail/3;else if(F.type==="wheel"){const d=F;d.deltaMode===d.DOM_DELTA_LINE?f.g&&!x.f?this.deltaY=-F.deltaY/3:this.deltaY=-F.deltaY:this.deltaY=-F.deltaY/40}if(typeof v.wheelDeltaX!="undefined")f.h&&x.i?this.deltaX=-(v.wheelDeltaX/120):this.deltaX=v.wheelDeltaX/120;else if(typeof m.HORIZONTAL_AXIS!="undefined"&&m.axis===m.HORIZONTAL_AXIS)this.deltaX=-F.detail/3;else if(F.type==="wheel"){const d=F;d.deltaMode===d.DOM_DELTA_LINE?f.g&&!x.f?this.deltaX=-F.deltaX/3:this.deltaX=-F.deltaX:this.deltaX=-F.deltaX/40}this.deltaY===0&&this.deltaX===0&&F.wheelDelta&&(this.deltaY=F.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}},XXBq:function(mt,M,t){},XXUj:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("Cg/j");const B=Object(f.c)("telemetryService")},XtJs:function(mt,M,t){"use strict";t.r(M),t.d(M,"getOccurrencesAtPosition",function(){return Q});var f=t("OBOq"),B=t("6OMU"),x=t("X+cX"),N=t("JQT/"),A=t("/cxE"),F=t("pmY6"),I=t("sswD"),L=t("aokT"),v=t("wQH0"),m=t("M1Kb"),d=t("tX9W"),D=t("twdY"),S=t("3/fG"),r=t("T8No"),_=t("MD5Z"),b=t("t9D7"),h=function(U,G,J,he){var xe=arguments.length,Ie=xe<3?G:he===null?he=Object.getOwnPropertyDescriptor(G,J):he,Le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ie=Reflect.decorate(U,G,J,he);else for(var Te=U.length-1;Te>=0;Te--)(Le=U[Te])&&(Ie=(xe<3?Le(Ie):xe>3?Le(G,J,Ie):Le(G,J))||Ie);return xe>3&&Ie&&Object.defineProperty(G,J,Ie),Ie},c=function(U,G){return function(J,he){G(J,he,U)}};const p=Object(_.wc)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},S.a("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0),E=Object(_.wc)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},S.a("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),y=Object(_.wc)("editor.wordHighlightBorder",{light:null,dark:null,hc:_.b},S.a("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),C=Object(_.wc)("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:_.b},S.a("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),O=Object(_.wc)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},S.a("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),k=Object(_.wc)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},S.a("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Y=new r.c("hasWordHighlights",!1);function Q(U,G,J){const he=D.i.ordered(U);return Object(x.j)(he.map(xe=>()=>Promise.resolve(xe.provideDocumentHighlights(U,G,J)).then(void 0,A.g)),B.n)}class H{constructor(U,G,J){this._wordRange=this._getCurrentWordRange(U,G),this.result=Object(x.h)(he=>this._compute(U,G,J,he))}_getCurrentWordRange(U,G){const J=U.getWordAtPosition(G.getPosition());return J?new L.a(G.startLineNumber,J.startColumn,G.startLineNumber,J.endColumn):null}isValid(U,G,J){const he=G.startLineNumber,xe=G.startColumn,Ie=G.endColumn,Le=this._getCurrentWordRange(U,G);let Te=Boolean(this._wordRange&&this._wordRange.equalsRange(Le));for(let ze=0,ue=J.length;!Te&&ze<ue;ze++){let je=U.getDecorationRange(J[ze]);je&&je.startLineNumber===he&&(je.startColumn<=xe&&je.endColumn>=Ie&&(Te=!0))}return Te}cancel(){this.result.cancel()}}class Z extends H{_compute(U,G,J,he){return Q(U,G.getPosition(),he).then(xe=>xe||[])}}class oe extends H{constructor(U,G,J){super(U,G,J);this._selectionIsEmpty=G.isEmpty()}_compute(U,G,J,he){return Object(x.n)(250,he).then(()=>{if(!G.isEmpty())return[];const xe=U.getWordAtPosition(G.getPosition());if(!xe||xe.word.length>1e3)return[];const Ie=U.findMatches(xe.word,!0,!1,!0,J,!1);return Ie.map(Le=>({range:Le.range,kind:D.h.Text}))})}isValid(U,G,J){const he=G.isEmpty();return this._selectionIsEmpty!==he?!1:super.isValid(U,G,J)}}function $(U,G,J){return D.i.has(U)?new Z(U,G,J):new oe(U,G,J)}Object(I.n)("_executeDocumentHighlights",(U,G)=>Q(U,G,N.a.None));class te{constructor(U,G){this.toUnhook=new F.b,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=U,this._hasWordHighlights=Y.bindTo(G),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(71),this.model=this.editor.getModel(),this.toUnhook.add(U.onDidChangeCursorPosition(J=>{if(this._ignorePositionChangeEvent)return;if(!this.occurrencesHighlight)return;this._onPositionChanged(J)})),this.toUnhook.add(U.onDidChangeModelContent(J=>{this._stopAll()})),this.toUnhook.add(U.onDidChangeConfiguration(J=>{let he=this.editor.getOption(71);this.occurrencesHighlight!==he&&(this.occurrencesHighlight=he,this._stopAll())})),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){if(!this.occurrencesHighlight)return;this._run()}_getSortedHighlights(){return B.e(this._decorationIds.map(U=>this.model.getDecorationRange(U)).sort(L.a.compareRangesUsingStarts))}moveNext(){let U=this._getSortedHighlights(),G=U.findIndex(xe=>xe.containsPosition(this.editor.getPosition())),J=(G+1)%U.length,he=U[J];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(he.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(he);const xe=this._getWord();if(xe){const Ie=this.editor.getModel().getLineContent(he.startLineNumber);Object(f.a)(`${Ie}, ${J+1} of ${U.length} for '${xe.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let U=this._getSortedHighlights(),G=U.findIndex(xe=>xe.containsPosition(this.editor.getPosition())),J=(G-1+U.length)%U.length,he=U[J];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(he.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(he);const xe=this._getWord();if(xe){const Ie=this.editor.getModel().getLineContent(he.startLineNumber);Object(f.a)(`${Ie}, ${J+1} of ${U.length} for '${xe.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(U){if(!this.occurrencesHighlight){this._stopAll();return}if(U.reason!==3){this._stopAll();return}this._run()}_getWord(){let U=this.editor.getSelection(),G=U.startLineNumber,J=U.startColumn;return this.model.getWordAtPosition({lineNumber:G,column:J})}_run(){let U=this.editor.getSelection();if(U.startLineNumber!==U.endLineNumber){this._stopAll();return}let G=U.startColumn,J=U.endColumn;const he=this._getWord();if(!he||he.startColumn>G||he.endColumn<J){this._stopAll();return}const xe=this.workerRequest&&this.workerRequest.isValid(this.model,U,this._decorationIds);if(this.lastCursorPositionChangeTime=new Date().getTime(),xe)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();let Ie=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=$(this.model,this.editor.getSelection(),this.editor.getOption(115)),this.workerRequest.result.then(Le=>{Ie===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=Le||[],this._beginRenderDecorations())},A.f)}}_beginRenderDecorations(){let U=new Date().getTime(),G=this.lastCursorPositionChangeTime+250;U>=G?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},G-U)}renderDecorations(){this.renderDecorationsTimer=-1;let U=[];for(const G of this.workerRequestValue)G.range&&U.push({range:G.range,options:te._getDecorationOptions(G.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,U),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(U){return U===D.h.Write?this._WRITE_OPTIONS:U===D.h.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}te._WRITE_OPTIONS=d.b.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Object(b.g)(k),position:m.g.Center},minimap:{color:Object(b.g)(_.cc),position:m.f.Inline}}),te._TEXT_OPTIONS=d.b.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Object(b.g)(_.jc),position:m.g.Center},minimap:{color:Object(b.g)(_.cc),position:m.f.Inline}}),te._REGULAR_OPTIONS=d.b.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Object(b.g)(O),position:m.g.Center},minimap:{color:Object(b.g)(_.cc),position:m.f.Inline}});let ne=class U extends F.a{constructor(G,J){super();this.wordHighlighter=null;const he=()=>{G.hasModel()&&(this.wordHighlighter=new te(G,J))};this._register(G.onDidChangeModel(xe=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),he()})),he()}static get(G){return G.getContribution(U.ID)}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(G){this.wordHighlighter&&G&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};ne.ID="editor.contrib.wordHighlighter",ne=h([c(1,r.b)],ne);class Ee extends I.b{constructor(U,G){super(G);this._isNext=U}run(U,G){const J=ne.get(G);if(!J)return;this._isNext?J.moveNext():J.moveBack()}}class fe extends Ee{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:S.a("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:Y,kbOpts:{kbExpr:v.a.editorTextFocus,primary:65,weight:100}})}}class ee extends Ee{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:S.a("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:Y,kbOpts:{kbExpr:v.a.editorTextFocus,primary:1024|65,weight:100}})}}class ie extends I.b{constructor(){super({id:"editor.action.wordHighlight.trigger",label:S.a("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:Y.toNegated(),kbOpts:{kbExpr:v.a.editorTextFocus,primary:0,weight:100}})}run(U,G,J){const he=ne.get(G);if(!he)return;he.restoreViewState(!0)}}Object(I.l)(ne.ID,ne),Object(I.j)(fe),Object(I.j)(ee),Object(I.j)(ie),Object(b.f)((U,G)=>{const J=U.getColor(_.R);J&&(G.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${J}; }`),G.addRule(`.monaco-editor .selectionHighlight { background-color: ${J.transparent(.5)}; }`));const he=U.getColor(p);he&&G.addRule(`.monaco-editor .wordHighlight { background-color: ${he}; }`);const xe=U.getColor(E);xe&&G.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${xe}; }`);const Ie=U.getColor(_.S);Ie&&G.addRule(`.monaco-editor .selectionHighlight { border: 1px ${U.type==="hc"?"dotted":"solid"} ${Ie}; box-sizing: border-box; }`);const Le=U.getColor(y);Le&&G.addRule(`.monaco-editor .wordHighlight { border: 1px ${U.type==="hc"?"dashed":"solid"} ${Le}; box-sizing: border-box; }`);const Te=U.getColor(C);Te&&G.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${U.type==="hc"?"dashed":"solid"} ${Te}; box-sizing: border-box; }`)})},YHy6:function(mt,M,t){},Yr1X:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("MI8n");const B=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new f.b,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(x){if(x=Math.min(Math.max(-5,x),20),this._zoomLevel===x)return;this._zoomLevel=x,this._onDidChangeZoomLevel.fire(this._zoomLevel)}}},Z1pP:function(mt,M,t){},Z7SF:function(mt,M,t){"use strict";t.d(M,"a",function(){return A});var f=t("24hK"),B=t("cGHE"),x=t("aokT"),N=function(F,I,L,v){function m(d){return d instanceof L?d:new L(function(D){D(d)})}return new(L||(L=Promise))(function(d,D){function S(b){try{_(v.next(b))}catch(h){D(h)}}function r(b){try{_(v.throw(b))}catch(h){D(h)}}function _(b){b.done?d(b.value):m(b.value).then(S,r)}_((v=v.apply(F,I||[])).next())})};class A{provideSelectionRanges(F,I){return N(this,void 0,void 0,function*(){const L=[];for(const v of I){const m=[];L.push(m);const d=new Map;yield new Promise(D=>A._bracketsRightYield(D,0,F,v,d)),yield new Promise(D=>A._bracketsLeftYield(D,0,F,v,d,m))}return L})}static _bracketsRightYield(F,I,L,v,m){const d=new Map,D=Date.now();for(;;){if(I>=A._maxRounds){F();break}if(!v){F();break}let S=L.findNextBracket(v);if(!S){F();break}let r=Date.now()-D;if(r>A._maxDuration){setTimeout(()=>A._bracketsRightYield(F,I+1,L,v,m));break}const _=S.close[0];if(S.isOpen){let b=d.has(_)?d.get(_):0;d.set(_,b+1)}else{let b=d.has(_)?d.get(_):0;if(b-=1,d.set(_,Math.max(0,b)),b<0){let h=m.get(_);h||(h=new f.a,m.set(_,h)),h.push(S.range)}}v=S.range.getEndPosition()}}static _bracketsLeftYield(F,I,L,v,m,d){const D=new Map,S=Date.now();for(;;){if(I>=A._maxRounds&&m.size===0){F();break}if(!v){F();break}let r=L.findPrevBracket(v);if(!r){F();break}let _=Date.now()-S;if(_>A._maxDuration){setTimeout(()=>A._bracketsLeftYield(F,I+1,L,v,m,d));break}const b=r.close[0];if(r.isOpen){let h=D.has(b)?D.get(b):0;if(h-=1,D.set(b,Math.max(0,h)),h<0){let c=m.get(b);if(c){let p=c.shift();c.size===0&&m.delete(b);const E=x.a.fromPositions(r.range.getEndPosition(),p.getStartPosition()),y=x.a.fromPositions(r.range.getStartPosition(),p.getEndPosition());d.push({range:E}),d.push({range:y}),A._addBracketLeading(L,y,d)}}}else{let h=D.has(b)?D.get(b):0;D.set(b,h+1)}v=r.range.getStartPosition()}}static _addBracketLeading(F,I,L){if(I.startLineNumber===I.endLineNumber)return;const v=I.startLineNumber,m=F.getLineFirstNonWhitespaceColumn(v);m!==0&&m!==I.startColumn&&(L.push({range:x.a.fromPositions(new B.a(v,m),I.getEndPosition())}),L.push({range:x.a.fromPositions(new B.a(v,1),I.getEndPosition())}));const d=v-1;if(d>0){const D=F.getLineFirstNonWhitespaceColumn(d);D===I.startColumn&&D!==F.getLineLastNonWhitespaceColumn(d)&&(L.push({range:x.a.fromPositions(new B.a(d,D),I.getEndPosition())}),L.push({range:x.a.fromPositions(new B.a(d,1),I.getEndPosition())}))}}}A._maxDuration=30,A._maxRounds=2},ZCR3:function(mt,M,t){"use strict";t.d(M,"a",function(){return f});function f(B,x,N){let A=null,F=null;if(typeof N.value=="function"?(A="value",F=N.value,F.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof N.get=="function"&&(A="get",F=N.get),!F)throw new Error("not supported");const I=`$memoize$${x}`;N[A]=function(...L){return this.hasOwnProperty(I)||Object.defineProperty(this,I,{configurable:!1,enumerable:!1,writable:!1,value:F.apply(this,L)}),this[I]}}},ZQ78:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return x}),t.d(M,"c",function(){return N});var f=t("ubTv");const B={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:f.a.text,TERMINALS:"Terminals"};class x{constructor(A){this.data=A}update(){}getData(){return this.data}}const N={CurrentDragAndDropData:void 0}},"ZkA/":function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:function(){return t.e(339).then(t.bind(null,"DTUS"))}})},ZlPH:function(mt,M,t){"use strict";t.d(M,"a",function(){return f}),t.d(M,"b",function(){return B});class f{constructor(x){this.domNode=x,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(x){if(this._maxWidth===x)return;this._maxWidth=x,this.domNode.style.maxWidth=this._maxWidth+"px"}setWidth(x){if(this._width===x)return;this._width=x,this.domNode.style.width=this._width+"px"}setHeight(x){if(this._height===x)return;this._height=x,this.domNode.style.height=this._height+"px"}setTop(x){if(this._top===x)return;this._top=x,this.domNode.style.top=this._top+"px"}unsetTop(){if(this._top===-1)return;this._top=-1,this.domNode.style.top=""}setLeft(x){if(this._left===x)return;this._left=x,this.domNode.style.left=this._left+"px"}setBottom(x){if(this._bottom===x)return;this._bottom=x,this.domNode.style.bottom=this._bottom+"px"}setRight(x){if(this._right===x)return;this._right=x,this.domNode.style.right=this._right+"px"}setFontFamily(x){if(this._fontFamily===x)return;this._fontFamily=x,this.domNode.style.fontFamily=this._fontFamily}setFontWeight(x){if(this._fontWeight===x)return;this._fontWeight=x,this.domNode.style.fontWeight=this._fontWeight}setFontSize(x){if(this._fontSize===x)return;this._fontSize=x,this.domNode.style.fontSize=this._fontSize+"px"}setFontFeatureSettings(x){if(this._fontFeatureSettings===x)return;this._fontFeatureSettings=x,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings}setLineHeight(x){if(this._lineHeight===x)return;this._lineHeight=x,this.domNode.style.lineHeight=this._lineHeight+"px"}setLetterSpacing(x){if(this._letterSpacing===x)return;this._letterSpacing=x,this.domNode.style.letterSpacing=this._letterSpacing+"px"}setClassName(x){if(this._className===x)return;this._className=x,this.domNode.className=this._className}toggleClassName(x,N){this.domNode.classList.toggle(x,N),this._className=this.domNode.className}setDisplay(x){if(this._display===x)return;this._display=x,this.domNode.style.display=this._display}setPosition(x){if(this._position===x)return;this._position=x,this.domNode.style.position=this._position}setVisibility(x){if(this._visibility===x)return;this._visibility=x,this.domNode.style.visibility=this._visibility}setBackgroundColor(x){if(this._backgroundColor===x)return;this._backgroundColor=x,this.domNode.style.backgroundColor=this._backgroundColor}setLayerHinting(x){if(this._layerHint===x)return;this._layerHint=x,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":""}setBoxShadow(x){if(this._boxShadow===x)return;this._boxShadow=x,this.domNode.style.boxShadow=x}setContain(x){if(this._contain===x)return;this._contain=x,this.domNode.style.contain=this._contain}setAttribute(x,N){this.domNode.setAttribute(x,N)}removeAttribute(x){this.domNode.removeAttribute(x)}appendChild(x){this.domNode.appendChild(x.domNode)}removeChild(x){this.domNode.removeChild(x.domNode)}}function B(x){return new f(x)}},Zr1c:function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var f=t("Cg/j"),B=t("zdb4");t.d(M,"b",function(){return B.a});const x=Object(f.c)("quickInputService")},ZvGG:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:function(){return t.e(337).then(t.bind(null,"yUwd"))}})},aBYw:function(mt,M,t){"use strict";t.d(M,"a",function(){return v});var f=t("MI8n"),B=t("pmY6"),x=t("MNsG");function N(m,d){return!!m[d]}class A{constructor(m,d){this.target=m.target,this.hasTriggerModifier=N(m.event,d.triggerModifier),this.hasSideBySideModifier=N(m.event,d.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=m.event.detail<=1}}class F{constructor(m,d){this.keyCodeIsTriggerKey=m.keyCode===d.triggerKey,this.keyCodeIsSideBySideKey=m.keyCode===d.triggerSideBySideKey,this.hasTriggerModifier=N(m,d.triggerModifier)}}class I{constructor(m,d,D,S){this.triggerKey=m,this.triggerModifier=d,this.triggerSideBySideKey=D,this.triggerSideBySideModifier=S}equals(m){return this.triggerKey===m.triggerKey&&this.triggerModifier===m.triggerModifier&&this.triggerSideBySideKey===m.triggerSideBySideKey&&this.triggerSideBySideModifier===m.triggerSideBySideModifier}}function L(m){return m==="altKey"?x.f?new I(57,"metaKey",6,"altKey"):new I(5,"ctrlKey",6,"altKey"):x.f?new I(6,"altKey",57,"metaKey"):new I(6,"altKey",5,"ctrlKey")}class v extends B.a{constructor(m){super();this._onMouseMoveOrRelevantKeyDown=this._register(new f.b),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new f.b),this.onExecute=this._onExecute.event,this._onCancel=this._register(new f.b),this.onCancel=this._onCancel.event,this._editor=m,this._opts=L(this._editor.getOption(69)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(d=>{if(d.hasChanged(69)){const D=L(this._editor.getOption(69));if(this._opts.equals(D))return;this._opts=D,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(d=>this._onEditorMouseMove(new A(d,this._opts)))),this._register(this._editor.onMouseDown(d=>this._onEditorMouseDown(new A(d,this._opts)))),this._register(this._editor.onMouseUp(d=>this._onEditorMouseUp(new A(d,this._opts)))),this._register(this._editor.onKeyDown(d=>this._onEditorKeyDown(new F(d,this._opts)))),this._register(this._editor.onKeyUp(d=>this._onEditorKeyUp(new F(d,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(d=>this._onDidChangeCursorSelection(d))),this._register(this._editor.onDidChangeModel(d=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(d=>{(d.scrollTopChanged||d.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(m){m.selection&&m.selection.startColumn!==m.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(m){this._lastMouseMoveEvent=m,this._onMouseMoveOrRelevantKeyDown.fire([m,null])}_onEditorMouseDown(m){this._hasTriggerKeyOnMouseDown=m.hasTriggerModifier,this._lineNumberOnMouseDown=m.target.position?m.target.position.lineNumber:0}_onEditorMouseUp(m){const d=m.target.position?m.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===d&&this._onExecute.fire(m)}_onEditorKeyDown(m){this._lastMouseMoveEvent&&(m.keyCodeIsTriggerKey||m.keyCodeIsSideBySideKey&&m.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,m]):m.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(m){m.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}},ajgA:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:function(){return t.e(354).then(t.bind(null,"Fzfo"))}})},al33:function(mt,M,t){"use strict";t.d(M,"a",function(){return d}),t.d(M,"b",function(){return _});var f=t("MI8n"),B=t("7afs"),x=t("pmY6"),N=t("QDVR"),A=t("Sdnv"),F=t("l2gE"),I=t("MrjW");function L(b,h,c,p){if(Array.isArray(b)){let E=0;for(const y of b){const C=L(y,h,c,p);if(C===10)return C;C>E&&(E=C)}return E}else{if(typeof b=="string")return p?b==="*"?5:b===c?10:0:0;if(b){const{language:E,pattern:y,scheme:C,hasAccessToAllModels:O}=b;if(!p&&!O)return 0;let k=0;if(C)if(C===h.scheme)k=10;else if(C==="*")k=5;else return 0;if(E)if(E===c)k=10;else if(E==="*")k=Math.max(k,5);else return 0;if(y){let Y;if(typeof y=="string"?Y=y:Y=Object.assign(Object.assign({},y),{base:Object(I.d)(y.base)}),Y===h.fsPath||Object(F.a)(Y,h.fsPath))k=10;else return 0}return k}else return 0}}var v=t("G2kB");function m(b){return typeof b=="string"?!1:Array.isArray(b)?b.every(m):!!b.exclusive}class d{constructor(){this._clock=0,this._entries=[],this._onDidChange=new f.b}get onDidChange(){return this._onDidChange.event}register(b,h){let c={selector:b,provider:h,_score:-1,_time:this._clock++};return this._entries.push(c),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),Object(x.i)(()=>{if(c){let p=this._entries.indexOf(c);p>=0&&(this._entries.splice(p,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),c=void 0)}})}has(b){return this.all(b).length>0}all(b){if(!b)return[];this._updateScores(b);const h=[];for(let c of this._entries)c._score>0&&h.push(c.provider);return h}ordered(b){const h=[];return this._orderedForEach(b,c=>h.push(c.provider)),h}orderedGroups(b){const h=[];let c,p;return this._orderedForEach(b,E=>{c&&p===E._score?c.push(E.provider):(p=E._score,c=[E.provider],h.push(c))}),h}_orderedForEach(b,h){if(!b)return;this._updateScores(b);for(const c of this._entries)c._score>0&&h(c)}_updateScores(b){let h={uri:b.uri.toString(),language:b.getLanguageId()};if(this._lastCandidate&&this._lastCandidate.language===h.language&&this._lastCandidate.uri===h.uri)return;this._lastCandidate=h;for(let c of this._entries)if(c._score=L(c.selector,b.uri,b.getLanguageId(),Object(v.b)(b)),m(c.selector)&&c._score>0){for(let p of this._entries)p._score=0;c._score=1e3;break}this._entries.sort(d._compareByScoreAndTime)}static _compareByScoreAndTime(b,h){return b._score<h._score?1:b._score>h._score?-1:b._time<h._time?1:b._time>h._time?-1:0}}const D=new WeakMap;let S=0;function r(b){let h=D.get(b);return h===void 0&&(h=++S,D.set(b,h)),h}class _{constructor(b,h,c=Number.MAX_SAFE_INTEGER){this._registry=b,this.min=h,this.max=c,this._cache=new N.a(50,.7)}_key(b){return b.id+this._registry.all(b).reduce((h,c)=>Object(B.b)(r(c),h),0)}_clamp(b){return b===void 0?this.min:Math.min(this.max,Math.max(this.min,Math.floor(b*1.3)))}get(b){const h=this._key(b),c=this._cache.get(h);return this._clamp(c==null?void 0:c.value)}update(b,h){const c=this._key(b);let p=this._cache.get(c);return p||(p=new A.a,this._cache.set(c,p)),p.update(h),this.get(b)}}},aokT:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("cGHE");class B{constructor(x,N,A,F){x>A||x===A&&N>F?(this.startLineNumber=A,this.startColumn=F,this.endLineNumber=x,this.endColumn=N):(this.startLineNumber=x,this.startColumn=N,this.endLineNumber=A,this.endColumn=F)}isEmpty(){return B.isEmpty(this)}static isEmpty(x){return x.startLineNumber===x.endLineNumber&&x.startColumn===x.endColumn}containsPosition(x){return B.containsPosition(this,x)}static containsPosition(x,N){return N.lineNumber<x.startLineNumber||N.lineNumber>x.endLineNumber||N.lineNumber===x.startLineNumber&&N.column<x.startColumn?!1:!(N.lineNumber===x.endLineNumber&&N.column>x.endColumn)}containsRange(x){return B.containsRange(this,x)}static containsRange(x,N){return N.startLineNumber<x.startLineNumber||N.endLineNumber<x.startLineNumber||(N.startLineNumber>x.endLineNumber||N.endLineNumber>x.endLineNumber||N.startLineNumber===x.startLineNumber&&N.startColumn<x.startColumn)?!1:!(N.endLineNumber===x.endLineNumber&&N.endColumn>x.endColumn)}strictContainsRange(x){return B.strictContainsRange(this,x)}static strictContainsRange(x,N){return N.startLineNumber<x.startLineNumber||N.endLineNumber<x.startLineNumber||(N.startLineNumber>x.endLineNumber||N.endLineNumber>x.endLineNumber||N.startLineNumber===x.startLineNumber&&N.startColumn<=x.startColumn)?!1:!(N.endLineNumber===x.endLineNumber&&N.endColumn>=x.endColumn)}plusRange(x){return B.plusRange(this,x)}static plusRange(x,N){let A,F,I,L;return N.startLineNumber<x.startLineNumber?(A=N.startLineNumber,F=N.startColumn):N.startLineNumber===x.startLineNumber?(A=N.startLineNumber,F=Math.min(N.startColumn,x.startColumn)):(A=x.startLineNumber,F=x.startColumn),N.endLineNumber>x.endLineNumber?(I=N.endLineNumber,L=N.endColumn):N.endLineNumber===x.endLineNumber?(I=N.endLineNumber,L=Math.max(N.endColumn,x.endColumn)):(I=x.endLineNumber,L=x.endColumn),new B(A,F,I,L)}intersectRanges(x){return B.intersectRanges(this,x)}static intersectRanges(x,N){let A=x.startLineNumber,F=x.startColumn,I=x.endLineNumber,L=x.endColumn,v=N.startLineNumber,m=N.startColumn,d=N.endLineNumber,D=N.endColumn;return A<v?(A=v,F=m):A===v&&(F=Math.max(F,m)),I>d?(I=d,L=D):I===d&&(L=Math.min(L,D)),A>I||A===I&&F>L?null:new B(A,F,I,L)}equalsRange(x){return B.equalsRange(this,x)}static equalsRange(x,N){return!!x&&!!N&&x.startLineNumber===N.startLineNumber&&x.startColumn===N.startColumn&&x.endLineNumber===N.endLineNumber&&x.endColumn===N.endColumn}getEndPosition(){return B.getEndPosition(this)}static getEndPosition(x){return new f.a(x.endLineNumber,x.endColumn)}getStartPosition(){return B.getStartPosition(this)}static getStartPosition(x){return new f.a(x.startLineNumber,x.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(x,N){return new B(this.startLineNumber,this.startColumn,x,N)}setStartPosition(x,N){return new B(x,N,this.endLineNumber,this.endColumn)}collapseToStart(){return B.collapseToStart(this)}static collapseToStart(x){return new B(x.startLineNumber,x.startColumn,x.startLineNumber,x.startColumn)}static fromPositions(x,N=x){return new B(x.lineNumber,x.column,N.lineNumber,N.column)}static lift(x){return x?new B(x.startLineNumber,x.startColumn,x.endLineNumber,x.endColumn):null}static isIRange(x){return x&&typeof x.startLineNumber=="number"&&typeof x.startColumn=="number"&&typeof x.endLineNumber=="number"&&typeof x.endColumn=="number"}static areIntersectingOrTouching(x,N){return x.endLineNumber<N.startLineNumber||x.endLineNumber===N.startLineNumber&&x.endColumn<N.startColumn?!1:!(N.endLineNumber<x.startLineNumber||N.endLineNumber===x.startLineNumber&&N.endColumn<x.startColumn)}static areIntersecting(x,N){return x.endLineNumber<N.startLineNumber||x.endLineNumber===N.startLineNumber&&x.endColumn<=N.startColumn?!1:!(N.endLineNumber<x.startLineNumber||N.endLineNumber===x.startLineNumber&&N.endColumn<=x.startColumn)}static compareRangesUsingStarts(x,N){if(x&&N){const I=x.startLineNumber|0,L=N.startLineNumber|0;if(I===L){const v=x.startColumn|0,m=N.startColumn|0;if(v===m){const d=x.endLineNumber|0,D=N.endLineNumber|0;if(d===D){const S=x.endColumn|0,r=N.endColumn|0;return S-r}return d-D}return v-m}return I-L}const A=x?1:0,F=N?1:0;return A-F}static compareRangesUsingEnds(x,N){return x.endLineNumber===N.endLineNumber?x.endColumn===N.endColumn?x.startLineNumber===N.startLineNumber?x.startColumn-N.startColumn:x.startLineNumber-N.startLineNumber:x.endColumn-N.endColumn:x.endLineNumber-N.endLineNumber}static spansMultipleLines(x){return x.endLineNumber>x.startLineNumber}}},bY76:function(mt,M,t){"use strict";t.d(M,"a",function(){return D}),t.d(M,"b",function(){return c});var f=t("MrjW"),B=t("MNsG");const x=/^\w[\w\d+.-]*$/,N=/^\//,A=/^\/\//;function F(O,k){if(!O.scheme&&k)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${O.authority}", path: "${O.path}", query: "${O.query}", fragment: "${O.fragment}"}`);if(O.scheme&&!x.test(O.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(O.path){if(O.authority){if(!N.test(O.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(A.test(O.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function I(O,k){return!O&&!k?"file":O}function L(O,k){switch(O){case"https":case"http":case"file":k?k[0]!==m&&(k=m+k):k=m;break}return k}const v="",m="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class D{constructor(O,k,Y,Q,H,Z=!1){typeof O=="object"?(this.scheme=O.scheme||v,this.authority=O.authority||v,this.path=O.path||v,this.query=O.query||v,this.fragment=O.fragment||v):(this.scheme=I(O,Z),this.authority=k||v,this.path=L(this.scheme,Y||v),this.query=Q||v,this.fragment=H||v,F(this,Z))}static isUri(O){return O instanceof D?!0:O?typeof O.authority=="string"&&typeof O.fragment=="string"&&typeof O.path=="string"&&typeof O.query=="string"&&typeof O.scheme=="string"&&typeof O.fsPath=="string"&&typeof O.with=="function"&&typeof O.toString=="function":!1}get fsPath(){return c(this,!1)}with(O){if(!O)return this;let{scheme:k,authority:Y,path:Q,query:H,fragment:Z}=O;return k===void 0?k=this.scheme:k===null&&(k=v),Y===void 0?Y=this.authority:Y===null&&(Y=v),Q===void 0?Q=this.path:Q===null&&(Q=v),H===void 0?H=this.query:H===null&&(H=v),Z===void 0?Z=this.fragment:Z===null&&(Z=v),k===this.scheme&&Y===this.authority&&Q===this.path&&H===this.query&&Z===this.fragment?this:new r(k,Y,Q,H,Z)}static parse(O,k=!1){const Y=d.exec(O);return Y?new r(Y[2]||v,C(Y[4]||v),C(Y[5]||v),C(Y[7]||v),C(Y[9]||v),k):new r(v,v,v,v,v)}static file(O){let k=v;if(B.i&&(O=O.replace(/\\/g,m)),O[0]===m&&O[1]===m){const Y=O.indexOf(m,2);Y===-1?(k=O.substring(2),O=m):(k=O.substring(2,Y),O=O.substring(Y)||m)}return new r("file",k,O,v,v)}static from(O){const k=new r(O.scheme,O.authority,O.path,O.query,O.fragment);return F(k,!0),k}static joinPath(O,...k){if(!O.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let Y;return B.i&&O.scheme==="file"?Y=D.file(f.i.join(c(O,!0),...k)).path:Y=f.e.join(O.path,...k),O.with({path:Y})}toString(O=!1){return p(this,O)}toJSON(){return this}static revive(O){if(O){if(O instanceof D)return O;{const k=new r(O);return k._formatted=O.external,k._fsPath=O._sep===S?O.fsPath:null,k}}else return O}}const S=B.i?1:void 0;class r extends D{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=c(this,!1)),this._fsPath}toString(O=!1){return O?p(this,!0):(this._formatted||(this._formatted=p(this,!1)),this._formatted)}toJSON(){const O={$mid:1};return this._fsPath&&(O.fsPath=this._fsPath,O._sep=S),this._formatted&&(O.external=this._formatted),this.path&&(O.path=this.path),this.scheme&&(O.scheme=this.scheme),this.authority&&(O.authority=this.authority),this.query&&(O.query=this.query),this.fragment&&(O.fragment=this.fragment),O}}const _={[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 b(O,k){let Y,Q=-1;for(let H=0;H<O.length;H++){const Z=O.charCodeAt(H);if(Z>=97&&Z<=122||Z>=65&&Z<=90||Z>=48&&Z<=57||Z===45||Z===46||Z===95||Z===126||k&&Z===47)Q!==-1&&(Y+=encodeURIComponent(O.substring(Q,H)),Q=-1),Y!==void 0&&(Y+=O.charAt(H));else{Y===void 0&&(Y=O.substr(0,H));const oe=_[Z];oe!==void 0?(Q!==-1&&(Y+=encodeURIComponent(O.substring(Q,H)),Q=-1),Y+=oe):Q===-1&&(Q=H)}}return Q!==-1&&(Y+=encodeURIComponent(O.substring(Q))),Y!==void 0?Y:O}function h(O){let k;for(let Y=0;Y<O.length;Y++){const Q=O.charCodeAt(Y);Q===35||Q===63?(k===void 0&&(k=O.substr(0,Y)),k+=_[Q]):k!==void 0&&(k+=O[Y])}return k!==void 0?k:O}function c(O,k){let Y;return O.authority&&O.path.length>1&&O.scheme==="file"?Y=`//${O.authority}${O.path}`:O.path.charCodeAt(0)===47&&(O.path.charCodeAt(1)>=65&&O.path.charCodeAt(1)<=90||O.path.charCodeAt(1)>=97&&O.path.charCodeAt(1)<=122)&&O.path.charCodeAt(2)===58?k?Y=O.path.substr(1):Y=O.path[1].toLowerCase()+O.path.substr(2):Y=O.path,B.i&&(Y=Y.replace(/\//g,"\\")),Y}function p(O,k){const Y=k?h:b;let Q="",{scheme:H,authority:Z,path:oe,query:$,fragment:te}=O;if(H&&(Q+=H,Q+=":"),(Z||H==="file")&&(Q+=m,Q+=m),Z){let ne=Z.indexOf("@");if(ne!==-1){const Ee=Z.substr(0,ne);Z=Z.substr(ne+1),ne=Ee.indexOf(":"),ne===-1?Q+=Y(Ee,!1):(Q+=Y(Ee.substr(0,ne),!1),Q+=":",Q+=Y(Ee.substr(ne+1),!1)),Q+="@"}Z=Z.toLowerCase(),ne=Z.indexOf(":"),ne===-1?Q+=Y(Z,!1):(Q+=Y(Z.substr(0,ne),!1),Q+=Z.substr(ne))}if(oe){if(oe.length>=3&&oe.charCodeAt(0)===47&&oe.charCodeAt(2)===58){const ne=oe.charCodeAt(1);ne>=65&&ne<=90&&(oe=`/${String.fromCharCode(ne+32)}:${oe.substr(3)}`)}else if(oe.length>=2&&oe.charCodeAt(1)===58){const ne=oe.charCodeAt(0);ne>=65&&ne<=90&&(oe=`${String.fromCharCode(ne+32)}:${oe.substr(2)}`)}Q+=Y(oe,!0)}return $&&(Q+="?",Q+=Y($,!1)),te&&(Q+="#",Q+=k?te:b(te,!1)),Q}function E(O){try{return decodeURIComponent(O)}catch(k){return O.length>3?O.substr(0,3)+E(O.substr(3)):O}}const y=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(O){return O.match(y)?O.replace(y,k=>E(k)):O}},ba9Q:function(mt,M,t){"use strict";t.r(M);var f=t("sswD"),B=t("LCkn"),x=t("+Fos"),N=t("aokT"),A=t("wQH0"),F=t("3/fG");class I extends f.b{constructor(){super({id:"editor.action.transposeLetters",label:F.a("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:A.a.writable,kbOpts:{kbExpr:A.a.textInputFocus,primary:0,mac:{primary:256|50},weight:100}})}run(L,v){if(!v.hasModel())return;let m=v.getModel(),d=[],D=v.getSelections();for(let S of D){if(!S.isEmpty())continue;let r=S.startLineNumber,_=S.startColumn,b=m.getLineMaxColumn(r);if(r===1&&(_===1||_===2&&b===2))continue;let h=_===b?S.getPosition():x.a.rightPosition(m,S.getPosition().lineNumber,S.getPosition().column),c=x.a.leftPosition(m,h),p=x.a.leftPosition(m,c),E=m.getValueInRange(N.a.fromPositions(p,c)),y=m.getValueInRange(N.a.fromPositions(c,h)),C=N.a.fromPositions(p,h);d.push(new B.a(C,y+E))}d.length>0&&(v.pushUndoStop(),v.executeCommands(this.id,d),v.pushUndoStop())}}Object(f.j)(I)},baJR:function(mt,M,t){"use strict";t.d(M,"b",function(){return A}),t.d(M,"c",function(){return F}),t.d(M,"a",function(){return I}),t.d(M,"d",function(){return m}),t.d(M,"e",function(){return D});var f=t("N0LK"),B=t("erNZ"),x=t("dBaI");class N{constructor(O,k,Y){this._linePartBrand=void 0,this.endIndex=O,this.type=k,this.metadata=Y}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class A{constructor(O,k){this.startOffset=O,this.endOffset=k}equals(O){return this.startOffset===O.startOffset&&this.endOffset===O.endOffset}}class F{constructor(O,k,Y,Q,H,Z,oe,$,te,ne,Ee,fe,ee,ie,U,G,J,he,xe){this.useMonospaceOptimizations=O,this.canUseHalfwidthRightwardsArrow=k,this.lineContent=Y,this.continuesWithWrappedLine=Q,this.isBasicASCII=H,this.containsRTL=Z,this.fauxIndentLength=oe,this.lineTokens=$,this.lineDecorations=te.sort(x.a.compare),this.tabSize=ne,this.startVisibleColumn=Ee,this.spaceWidth=fe,this.stopRenderingLineAfter=U,this.renderWhitespace=G==="all"?4:G==="boundary"?1:G==="selection"?2:G==="trailing"?3:0,this.renderControlCharacters=J,this.fontLigatures=he,this.selectionsOnLine=xe&&xe.sort((Te,ze)=>Te.startOffset<ze.startOffset?-1:1);const Ie=Math.abs(ie-fe),Le=Math.abs(ee-fe);Ie<Le?(this.renderSpaceWidth=ie,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=ee,this.renderSpaceCharCode=183)}sameSelection(O){if(this.selectionsOnLine===null)return O===null;if(O===null)return!1;if(O.length!==this.selectionsOnLine.length)return!1;for(let k=0;k<this.selectionsOnLine.length;k++)if(!this.selectionsOnLine[k].equals(O[k]))return!1;return!0}equals(O){return this.useMonospaceOptimizations===O.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===O.canUseHalfwidthRightwardsArrow&&this.lineContent===O.lineContent&&this.continuesWithWrappedLine===O.continuesWithWrappedLine&&this.isBasicASCII===O.isBasicASCII&&this.containsRTL===O.containsRTL&&this.fauxIndentLength===O.fauxIndentLength&&this.tabSize===O.tabSize&&this.startVisibleColumn===O.startVisibleColumn&&this.spaceWidth===O.spaceWidth&&this.renderSpaceWidth===O.renderSpaceWidth&&this.renderSpaceCharCode===O.renderSpaceCharCode&&this.stopRenderingLineAfter===O.stopRenderingLineAfter&&this.renderWhitespace===O.renderWhitespace&&this.renderControlCharacters===O.renderControlCharacters&&this.fontLigatures===O.fontLigatures&&x.a.equalsArr(this.lineDecorations,O.lineDecorations)&&this.lineTokens.equals(O.lineTokens)&&this.sameSelection(O.selectionsOnLine)}}class I{constructor(O,k){this.partIndex=O,this.charIndex=k}}class L{constructor(O,k){this.length=O,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}static getPartIndex(O){return(O&4294901760)>>>16}static getCharIndex(O){return(O&65535)>>>0}setColumnInfo(O,k,Y,Q){const H=(k<<16|Y<<0)>>>0;this._data[O-1]=H,this._absoluteOffsets[O-1]=Q+Y}getAbsoluteOffset(O){return this._absoluteOffsets.length===0?0:this._absoluteOffsets[O-1]}charOffsetToPartData(O){return this.length===0?0:O<0?this._data[0]:O>=this.length?this._data[this.length-1]:this._data[O]}getDomPosition(O){const k=this.charOffsetToPartData(O-1),Y=L.getPartIndex(k),Q=L.getCharIndex(k);return new I(Y,Q)}getColumn(O,k){const Y=this.partDataToCharOffset(O.partIndex,k,O.charIndex);return Y+1}partDataToCharOffset(O,k,Y){if(this.length===0)return 0;let Q=(O<<16|Y<<0)>>>0,H=0,Z=this.length-1;for(;H+1<Z;){let U=H+Z>>>1,G=this._data[U];if(G===Q)return U;G>Q?Z=U:H=U}if(H===Z)return H;let oe=this._data[H],$=this._data[Z];if(oe===Q)return H;if($===Q)return Z;let te=L.getPartIndex(oe),ne=L.getCharIndex(oe),Ee=L.getPartIndex($),fe;te!==Ee?fe=k:fe=L.getCharIndex($);let ee=Y-ne,ie=fe-Y;return ee<=ie?H:Z}}class v{constructor(O,k,Y){this._renderLineOutputBrand=void 0,this.characterMapping=O,this.containsRTL=k,this.containsForeignElements=Y}}function m(O,k){if(O.lineContent.length===0){if(O.lineDecorations.length>0){k.appendASCIIString("<span>");let Y=0,Q=0,H=0;for(const oe of O.lineDecorations)(oe.type===1||oe.type===2)&&(k.appendASCIIString('<span class="'),k.appendASCIIString(oe.className),k.appendASCIIString('"></span>'),oe.type===1&&(H|=1,Y++),oe.type===2&&(H|=2,Q++));k.appendASCIIString("</span>");const Z=new L(1,Y+Q);return Z.setColumnInfo(1,Y,0,0),new v(Z,!1,H)}return k.appendASCIIString("<span><span></span></span>"),new v(new L(0,0),!1,0)}return y(r(O),k)}class d{constructor(O,k,Y,Q){this.characterMapping=O,this.html=k,this.containsRTL=Y,this.containsForeignElements=Q}}function D(O){let k=Object(B.a)(1e4),Y=m(O,k);return new d(Y.characterMapping,k.build(),Y.containsRTL,Y.containsForeignElements)}class S{constructor(O,k,Y,Q,H,Z,oe,$,te,ne,Ee,fe,ee,ie,U){this.fontIsMonospace=O,this.canUseHalfwidthRightwardsArrow=k,this.lineContent=Y,this.len=Q,this.isOverflowing=H,this.parts=Z,this.containsForeignElements=oe,this.fauxIndentLength=$,this.tabSize=te,this.startVisibleColumn=ne,this.containsRTL=Ee,this.spaceWidth=fe,this.renderSpaceCharCode=ee,this.renderWhitespace=ie,this.renderControlCharacters=U}}function r(O){const k=O.lineContent;let Y,Q;O.stopRenderingLineAfter!==-1&&O.stopRenderingLineAfter<k.length?(Y=!0,Q=O.stopRenderingLineAfter):(Y=!1,Q=k.length);let H=_(O.lineTokens,O.fauxIndentLength,Q);(O.renderWhitespace===4||O.renderWhitespace===1||O.renderWhitespace===2&&!!O.selectionsOnLine||O.renderWhitespace===3)&&(H=p(O,k,Q,H));let Z=0;if(O.lineDecorations.length>0){for(let oe=0,$=O.lineDecorations.length;oe<$;oe++){const te=O.lineDecorations[oe];te.type===3||te.type===1?Z|=1:te.type===2&&(Z|=2)}H=E(k,Q,H,O.lineDecorations)}return O.containsRTL||(H=b(k,H,!O.isBasicASCII||O.fontLigatures)),O.renderControlCharacters&&!O.isBasicASCII&&(H=c(k,H)),new S(O.useMonospaceOptimizations,O.canUseHalfwidthRightwardsArrow,k,Q,Y,H,Z,O.fauxIndentLength,O.tabSize,O.startVisibleColumn,O.containsRTL,O.spaceWidth,O.renderSpaceCharCode,O.renderWhitespace,O.renderControlCharacters)}function _(O,k,Y){let Q=[],H=0;k>0&&(Q[H++]=new N(k,"",0));for(let Z=0,oe=O.getCount();Z<oe;Z++){const $=O.getEndOffset(Z);if($<=k)continue;const te=O.getClassName(Z);if($>=Y){Q[H++]=new N(Y,te,0);break}Q[H++]=new N($,te,0)}return Q}function b(O,k,Y){let Q=0,H=[],Z=0;if(Y)for(let oe=0,$=k.length;oe<$;oe++){const te=k[oe],ne=te.endIndex;if(Q+50<ne){const Ee=te.type,fe=te.metadata;let ee=-1,ie=Q;for(let U=Q;U<ne;U++)O.charCodeAt(U)===32&&(ee=U),ee!==-1&&U-ie>=50&&(H[Z++]=new N(ee+1,Ee,fe),ie=ee+1,ee=-1);ie!==ne&&(H[Z++]=new N(ne,Ee,fe))}else H[Z++]=te;Q=ne}else for(let oe=0,$=k.length;oe<$;oe++){const te=k[oe],ne=te.endIndex;let Ee=ne-Q;if(Ee>50){const fe=te.type,ee=te.metadata,ie=Math.ceil(Ee/50);for(let U=1;U<ie;U++){let G=Q+U*50;H[Z++]=new N(G,fe,ee)}H[Z++]=new N(ne,fe,ee)}else H[Z++]=te;Q=ne}return H}function h(O){return O<32?O!==9:O===127?!0:O>=8234&&O<=8238||O>=8294&&O<=8297||O>=8206&&O<=8207||O===1564}function c(O,k){let Y=[],Q=new N(0,"",0),H=0;for(const Z of k){const oe=Z.endIndex;for(;H<oe;H++){const $=O.charCodeAt(H);h($)&&(H>Q.endIndex&&(Q=new N(H,Z.type,Z.metadata),Y.push(Q)),Q=new N(H+1,"mtkcontrol",Z.metadata),Y.push(Q))}H>Q.endIndex&&(Q=new N(oe,Z.type,Z.metadata),Y.push(Q))}return Y}function p(O,k,Y,Q){const H=O.continuesWithWrappedLine,Z=O.fauxIndentLength,oe=O.tabSize,$=O.startVisibleColumn,te=O.useMonospaceOptimizations,ne=O.selectionsOnLine,Ee=O.renderWhitespace===1,fe=O.renderWhitespace===3,ee=O.renderSpaceWidth!==O.spaceWidth;let ie=[],U=0,G=0,J=Q[G].type,he=Q[G].endIndex;const xe=Q.length;let Ie=!1,Le=f.u(k),Te;Le===-1?(Ie=!0,Le=Y,Te=Y):Te=f.I(k);let ze=!1,ue=0,je=ne&&ne[ue],Pe=$%oe;for(let ce=Z;ce<Y;ce++){const le=k.charCodeAt(ce);je&&ce>=je.endOffset&&(ue++,je=ne&&ne[ue]);let Ce;if(ce<Le||ce>Te)Ce=!0;else if(le===9)Ce=!0;else if(le===32)if(Ee)if(ze)Ce=!0;else{const ye=ce+1<Y?k.charCodeAt(ce+1):0;Ce=ye===32||ye===9}else Ce=!0;else Ce=!1;if(Ce&&ne&&(Ce=!!je&&je.startOffset<=ce&&je.endOffset>ce),Ce&&fe&&(Ce=Ie||ce>Te),ze){if(!Ce||!te&&Pe>=oe){if(ee){const ye=U>0?ie[U-1].endIndex:Z;for(let ge=ye+1;ge<=ce;ge++)ie[U++]=new N(ge,"mtkw",1)}else ie[U++]=new N(ce,"mtkw",1);Pe=Pe%oe}}else(ce===he||Ce&&ce>Z)&&(ie[U++]=new N(ce,J,0),Pe=Pe%oe);for(le===9?Pe=oe:f.D(le)?Pe+=2:Pe++,ze=Ce;ce===he&&(G++,G<xe);)J=Q[G].type,he=Q[G].endIndex}let ve=!1;if(ze)if(H&&Ee){let ce=Y>0?k.charCodeAt(Y-1):0,le=Y>1?k.charCodeAt(Y-2):0,Ce=ce===32&&le!==32&&le!==9;Ce||(ve=!0)}else ve=!0;if(ve)if(ee){const ce=U>0?ie[U-1].endIndex:Z;for(let le=ce+1;le<=Y;le++)ie[U++]=new N(le,"mtkw",1)}else ie[U++]=new N(Y,"mtkw",1);else ie[U++]=new N(Y,J,0);return ie}function E(O,k,Y,Q){Q.sort(x.a.compare);const H=x.b.normalize(O,Q),Z=H.length;let oe=0,$=[],te=0,ne=0;for(let fe=0,ee=Y.length;fe<ee;fe++){const ie=Y[fe],U=ie.endIndex,G=ie.type,J=ie.metadata;for(;oe<Z&&H[oe].startOffset<U;){const he=H[oe];if(he.startOffset>ne&&(ne=he.startOffset,$[te++]=new N(ne,G,J)),he.endOffset+1<=U)ne=he.endOffset+1,$[te++]=new N(ne,G+" "+he.className,J|he.metadata),oe++;else{ne=U,$[te++]=new N(ne,G+" "+he.className,J|he.metadata);break}}U>ne&&(ne=U,$[te++]=new N(ne,G,J))}const Ee=Y[Y.length-1].endIndex;if(oe<Z&&H[oe].startOffset===Ee)for(;oe<Z&&H[oe].startOffset===Ee;){const fe=H[oe];$[te++]=new N(ne,fe.className,fe.metadata),oe++}return $}function y(O,k){const Y=O.fontIsMonospace,Q=O.canUseHalfwidthRightwardsArrow,H=O.containsForeignElements,Z=O.lineContent,oe=O.len,$=O.isOverflowing,te=O.parts,ne=O.fauxIndentLength,Ee=O.tabSize,fe=O.startVisibleColumn,ee=O.containsRTL,ie=O.spaceWidth,U=O.renderSpaceCharCode,G=O.renderWhitespace,J=O.renderControlCharacters,he=new L(oe+1,te.length);let xe=!1,Ie=0,Le=fe,Te=0,ze=0,ue=0,je=0;ee?k.appendASCIIString('<span dir="ltr">'):k.appendASCIIString("<span>");for(let Pe=0,ve=te.length;Pe<ve;Pe++){je+=ue;const ce=te[Pe],le=ce.endIndex,Ce=ce.type,ye=G!==0&&ce.isWhitespace(),ge=ye&&!Y&&(Ce==="mtkw"||!H),Me=Ie===le&&ce.isPseudoAfter();if(Te=0,k.appendASCIIString('<span class="'),k.appendASCIIString(ge?"mtkz":Ce),k.appendASCII(34),ye){let De=0;{let we=Ie,Oe=Le;for(;we<le;we++){const nt=Z.charCodeAt(we),Ke=(nt===9?Ee-Oe%Ee:1)|0;De+=Ke,we>=ne&&(Oe+=Ke)}}for(ge&&(k.appendASCIIString(' style="width:'),k.appendASCIIString(String(ie*De)),k.appendASCIIString('px"')),k.appendASCII(62);Ie<le;Ie++){he.setColumnInfo(Ie+1,Pe-ze,Te,je),ze=0;const we=Z.charCodeAt(Ie);let Oe;if(we===9){Oe=Ee-Le%Ee|0,!Q||Oe>1?k.write1(8594):k.write1(65515);for(let nt=2;nt<=Oe;nt++)k.write1(160)}else Oe=1,k.write1(U);Te+=Oe,Ie>=ne&&(Le+=Oe)}ue=De}else{let De=0;for(k.appendASCII(62);Ie<le;Ie++){he.setColumnInfo(Ie+1,Pe-ze,Te,je),ze=0;const we=Z.charCodeAt(Ie);let Oe=1,nt=1;switch(we){case 9:Oe=Ee-Le%Ee,nt=Oe;for(let Ke=1;Ke<=Oe;Ke++)k.write1(160);break;case 32:k.write1(160);break;case 60:k.appendASCIIString("<");break;case 62:k.appendASCIIString(">");break;case 38:k.appendASCIIString("&");break;case 0:J?k.write1(9216):k.appendASCIIString("�");break;case 65279:case 8232:case 8233:case 133:k.write1(65533);break;default:f.D(we)&&nt++,J&&we<32?k.write1(9216+we):J&&we===127?k.write1(9249):J&&h(we)?(k.appendASCIIString("[U+"),k.appendASCIIString(C(we)),k.appendASCIIString("]"),Oe=8):k.write1(we)}Te+=Oe,De+=Oe,Ie>=ne&&(Le+=nt)}ue=De}Me?ze++:ze=0,Ie>=oe&&!xe&&ce.isPseudoAfter()&&(xe=!0,he.setColumnInfo(Ie+1,Pe,Te,je)),k.appendASCIIString("</span>")}return xe||he.setColumnInfo(oe+1,te.length-1,Te,je),$&&k.appendASCIIString("<span>…</span>"),k.appendASCIIString("</span>"),new v(he,ee,H)}function C(O){return O.toString(16).toUpperCase().padStart(4,"0")}},bexQ:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("Cg/j");const B=Object(f.c)("keybindingService")},bfR1:function(mt,M,t){"use strict";t.r(M);var f=t("sswD"),B=t("Yr1X"),x=t("3/fG");class N extends f.b{constructor(){super({id:"editor.action.fontZoomIn",label:x.a("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(I,L){B.a.setZoomLevel(B.a.getZoomLevel()+1)}}class A extends f.b{constructor(){super({id:"editor.action.fontZoomOut",label:x.a("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(I,L){B.a.setZoomLevel(B.a.getZoomLevel()-1)}}class F extends f.b{constructor(){super({id:"editor.action.fontZoomReset",label:x.a("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(I,L){B.a.setZoomLevel(0)}}Object(f.j)(N),Object(f.j)(A),Object(f.j)(F)},bk7F:function(mt,M,t){"use strict";t.r(M),t.d(M,"BracketMatchingController",function(){return y});var f=t("X+cX"),B=t("pmY6"),x=t("8ATB"),N=t.n(x),A=t("sswD"),F=t("cGHE"),I=t("aokT"),L=t("gCVg"),v=t("wQH0"),m=t("M1Kb"),d=t("tX9W"),D=t("kYye"),S=t("3/fG"),r=t("fjLI"),_=t("MD5Z"),b=t("t9D7");const h=Object(_.wc)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},S.a("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class c extends A.b{constructor(){super({id:"editor.action.jumpToBracket",label:S.a("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:v.a.editorTextFocus,primary:2048|1024|88,weight:100}})}run(C,O){let k=y.get(O);if(!k)return;k.jumpToBracket()}}class p extends A.b{constructor(){super({id:"editor.action.selectToBracket",label:S.a("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(C,O,k){const Y=y.get(O);if(!Y)return;let Q=!0;k&&k.selectBrackets===!1&&(Q=!1),Y.selectToBracket(Q)}}class E{constructor(C,O,k){this.position=C,this.brackets=O,this.options=k}}class y extends B.a{constructor(C){super();this._editor=C,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new f.e(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(63),this._updateBracketsSoon.schedule(),this._register(C.onDidChangeCursorPosition(O=>{if(this._matchBrackets==="never")return;this._updateBracketsSoon.schedule()})),this._register(C.onDidChangeModelContent(O=>{this._updateBracketsSoon.schedule()})),this._register(C.onDidChangeModel(O=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()})),this._register(C.onDidChangeModelLanguageConfiguration(O=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(C.onDidChangeConfiguration(O=>{O.hasChanged(63)&&(this._matchBrackets=this._editor.getOption(63),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(C.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(C.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}static get(C){return C.getContribution(y.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const C=this._editor.getModel(),O=this._editor.getSelections().map(k=>{const Y=k.getStartPosition(),Q=C.matchBracket(Y);let H=null;if(Q)Q[0].containsPosition(Y)?H=Q[1].getStartPosition():Q[1].containsPosition(Y)&&(H=Q[0].getStartPosition());else{const Z=C.findEnclosingBrackets(Y);if(Z)H=Z[0].getStartPosition();else{const oe=C.findNextBracket(Y);oe&&oe.range&&(H=oe.range.getStartPosition())}}return H?new L.a(H.lineNumber,H.column,H.lineNumber,H.column):new L.a(Y.lineNumber,Y.column,Y.lineNumber,Y.column)});this._editor.setSelections(O),this._editor.revealRange(O[0])}selectToBracket(C){if(!this._editor.hasModel())return;const O=this._editor.getModel(),k=[];this._editor.getSelections().forEach(Y=>{const Q=Y.getStartPosition();let H=O.matchBracket(Q);if(!H&&(H=O.findEnclosingBrackets(Q),!H)){const $=O.findNextBracket(Q);$&&$.range&&(H=O.matchBracket($.range.getStartPosition()))}let Z=null,oe=null;if(H){H.sort(I.a.compareRangesUsingStarts);const[$,te]=H;if(Z=C?$.getStartPosition():$.getEndPosition(),oe=C?te.getEndPosition():te.getStartPosition(),te.containsPosition(Q)){const ne=Z;Z=oe,oe=ne}}Z&&oe&&k.push(new L.a(Z.lineNumber,Z.column,oe.lineNumber,oe.column))}),k.length>0&&(this._editor.setSelections(k),this._editor.revealRange(k[0]))}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let C=[],O=0;for(const k of this._lastBracketsData){let Y=k.brackets;Y&&(C[O++]={range:Y[0],options:k.options},C[O++]={range:Y[1],options:k.options})}this._decorations=this._editor.deltaDecorations(this._decorations,C)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const C=this._editor.getSelections();if(C.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const O=this._editor.getModel(),k=O.getVersionId();let Y=[];this._lastVersionId===k&&(Y=this._lastBracketsData);let Q=[],H=0;for(let ne=0,Ee=C.length;ne<Ee;ne++){let fe=C[ne];fe.isEmpty()&&(Q[H++]=fe.getStartPosition())}Q.length>1&&Q.sort(F.a.compare);let Z=[],oe=0,$=0,te=Y.length;for(let ne=0,Ee=Q.length;ne<Ee;ne++){let fe=Q[ne];for(;$<te&&Y[$].position.isBefore(fe);)$++;if($<te&&Y[$].position.equals(fe))Z[oe++]=Y[$];else{let ee=O.matchBracket(fe),ie=y._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!ee&&this._matchBrackets==="always"&&(ee=O.findEnclosingBrackets(fe,20),ie=y._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),Z[oe++]=new E(fe,ee,ie)}}this._lastBracketsData=Z,this._lastVersionId=k}}y.ID="editor.contrib.bracketMatchingController",y._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=d.b.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:Object(b.g)(h),position:m.g.Center}}),y._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=d.b.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"}),Object(A.l)(y.ID,y),Object(A.j)(p),Object(A.j)(c),Object(b.f)((C,O)=>{const k=C.getColor(D.j);k&&O.addRule(`.monaco-editor .bracket-match { background-color: ${k}; }`);const Y=C.getColor(D.k);Y&&O.addRule(`.monaco-editor .bracket-match { border: 1px solid ${Y}; }`)}),r.d.appendMenuItem(r.b.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:S.a({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2})},c2dO:function(mt,M,t){"use strict";t.r(M),t.d(M,"htmlLanguageService",function(){return S}),t.d(M,"htmlDefaults",function(){return r}),t.d(M,"handlebarLanguageService",function(){return _}),t.d(M,"handlebarDefaults",function(){return b}),t.d(M,"razorLanguageService",function(){return h}),t.d(M,"razorDefaults",function(){return c}),t.d(M,"registerHTMLLanguageService",function(){return E});var f=t("M/lh"),B=t.n(f),x=t("NQK8"),N=function(y,C,O,k){function Y(Q){return Q instanceof O?Q:new O(function(H){H(Q)})}return new(O||(O=Promise))(function(Q,H){function Z(te){try{$(k.next(te))}catch(ne){H(ne)}}function oe(te){try{$(k.throw(te))}catch(ne){H(ne)}}function $(te){te.done?Q(te.value):Y(te.value).then(Z,oe)}$((k=k.apply(y,C||[])).next())})},A=function(y,C){var O={label:0,sent:function(){if(Q[0]&1)throw Q[1];return Q[1]},trys:[],ops:[]},k,Y,Q,H;return H={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(H[Symbol.iterator]=function(){return this}),H;function Z($){return function(te){return oe([$,te])}}function oe($){if(k)throw new TypeError("Generator is already executing.");for(;O;)try{if(k=1,Y&&(Q=$[0]&2?Y.return:$[0]?Y.throw||((Q=Y.return)&&Q.call(Y),0):Y.next)&&!(Q=Q.call(Y,$[1])).done)return Q;(Y=0,Q)&&($=[$[0]&2,Q.value]);switch($[0]){case 0:case 1:Q=$;break;case 4:return O.label++,{value:$[1],done:!1};case 5:O.label++,Y=$[1],$=[0];continue;case 7:$=O.ops.pop(),O.trys.pop();continue;default:if(!(Q=O.trys,Q=Q.length>0&&Q[Q.length-1])&&($[0]===6||$[0]===2)){O=0;continue}if($[0]===3&&(!Q||$[1]>Q[0]&&$[1]<Q[3])){O.label=$[1];break}if($[0]===6&&O.label<Q[1]){O.label=Q[1],Q=$;break}if(Q&&O.label<Q[2]){O.label=Q[2],O.ops.push($);break}Q[2]&&O.ops.pop(),O.trys.pop();continue}$=C.call(y,O)}catch(te){$=[6,te],Y=0}finally{k=Q=0}if($[0]&5)throw $[1];return{value:$[0]?$[1]:void 0,done:!0}}},F=function(){function y(C,O,k){this._onDidChange=new x.Emitter,this._languageId=C,this.setOptions(O),this.setModeConfiguration(k)}return Object.defineProperty(y.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),y.prototype.setOptions=function(C){this._options=C||Object.create(null),this._onDidChange.fire(this)},y.prototype.setModeConfiguration=function(C){this._modeConfiguration=C||Object.create(null),this._onDidChange.fire(this)},y}(),I={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:null,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},L={format:I,suggest:{},data:{useDefaultDataProvider:!0}};function v(y){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:y===m,documentFormattingEdits:y===m,documentRangeFormattingEdits:y===m}}var m="html",d="handlebars",D="razor",S=E(m,L,v(m)),r=S.defaults,_=E(d,L,v(d)),b=_.defaults,h=E(D,L,v(D)),c=h.defaults;x.languages.html={htmlDefaults:r,razorDefaults:c,handlebarDefaults:b,htmlLanguageService:S,handlebarLanguageService:_,razorLanguageService:h,registerHTMLLanguageService:E};function p(){return t.e(315).then(t.bind(null,"+lu7"))}function E(y,C,O){var k=this;C===void 0&&(C=L),O===void 0&&(O=v(y));var Y=new F(y,C,O),Q,H=x.languages.onLanguage(y,function(){return N(k,void 0,void 0,function(){return A(this,function(Z){switch(Z.label){case 0:return[4,p()];case 1:return Q=Z.sent().setupMode(Y),[2]}})})});return{defaults:Y,dispose:function(){H.dispose(),Q==null||Q.dispose(),Q=void 0}}}},c9ML:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:function(){return t.e(362).then(t.bind(null,"QJnQ"))}})},cGHE:function(mt,M,t){"use strict";t.d(M,"a",function(){return f});class f{constructor(B,x){this.lineNumber=B,this.column=x}with(B=this.lineNumber,x=this.column){return B===this.lineNumber&&x===this.column?this:new f(B,x)}delta(B=0,x=0){return this.with(this.lineNumber+B,this.column+x)}equals(B){return f.equals(this,B)}static equals(B,x){return!B&&!x?!0:!!B&&!!x&&B.lineNumber===x.lineNumber&&B.column===x.column}isBefore(B){return f.isBefore(this,B)}static isBefore(B,x){return B.lineNumber<x.lineNumber?!0:x.lineNumber<B.lineNumber?!1:B.column<x.column}isBeforeOrEqual(B){return f.isBeforeOrEqual(this,B)}static isBeforeOrEqual(B,x){return B.lineNumber<x.lineNumber?!0:x.lineNumber<B.lineNumber?!1:B.column<=x.column}static compare(B,x){let N=B.lineNumber|0,A=x.lineNumber|0;if(N===A){let F=B.column|0,I=x.column|0;return F-I}return N-A}clone(){return new f(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(B){return new f(B.lineNumber,B.column)}static isIPosition(B){return B&&typeof B.lineNumber=="number"&&typeof B.column=="number"}}},cIJc:function(mt,M,t){"use strict";t.r(M);var f=t("6OMU"),B=t("JQT/"),x=t("/cxE"),N=t("/kV6"),A=t("pmY6"),F=t("sswD"),I=t("Vxe3"),L=t("MXAL"),v=t("aokT"),m=t("wQH0"),d=t("twdY"),D=t("pAvP"),S=t("hN88"),r=t("Cduo"),_=t("3/fG"),b=t("nnTU"),h=t("T8No"),c=t("Cg/j"),p=t("tTk5"),E=function(H,Z,oe,$){var te=arguments.length,ne=te<3?Z:$===null?$=Object.getOwnPropertyDescriptor(Z,oe):$,Ee;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ne=Reflect.decorate(H,Z,oe,$);else for(var fe=H.length-1;fe>=0;fe--)(Ee=H[fe])&&(ne=(te<3?Ee(ne):te>3?Ee(Z,oe,ne):Ee(Z,oe))||ne);return te>3&&ne&&Object.defineProperty(Z,oe,ne),ne},y=function(H,Z){return function(oe,$){Z(oe,$,H)}},C=function(H,Z,oe,$){function te(ne){return ne instanceof oe?ne:new oe(function(Ee){Ee(ne)})}return new(oe||(oe=Promise))(function(ne,Ee){function fe(U){try{ie($.next(U))}catch(G){Ee(G)}}function ee(U){try{ie($.throw(U))}catch(G){Ee(G)}}function ie(U){U.done?ne(U.value):te(U.value).then(fe,ee)}ie(($=$.apply(H,Z||[])).next())})};let O=class{constructor(Z,oe){this._workerService=oe,this._callOnDispose=new A.b,this._callOnModel=new A.b,this._editor=Z,this._callOnDispose.add(Z.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(Z.onDidChangeModel(()=>this._update())),this._callOnDispose.add(Z.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(d.w.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){if(this._callOnModel.clear(),!this._editor.getOption(48))return;if(!this._editor.hasModel())return;const Z=this._editor.getModel(),[oe]=d.w.ordered(Z);if(!oe||!oe.autoFormatTriggerCharacters)return;let $=new L.b;for(let te of oe.autoFormatTriggerCharacters)$.add(te.charCodeAt(0));this._callOnModel.add(this._editor.onDidType(te=>{let ne=te.charCodeAt(te.length-1);$.has(ne)&&this._trigger(String.fromCharCode(ne))}))}_trigger(Z){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const oe=this._editor.getModel(),$=this._editor.getPosition();let te=!1;const ne=this._editor.onDidChangeModelContent(Ee=>{if(Ee.isFlush){te=!0,ne.dispose();return}for(let fe=0,ee=Ee.changes.length;fe<ee;fe++){const ie=Ee.changes[fe];if(ie.range.endLineNumber<=$.lineNumber){te=!0,ne.dispose();return}}});Object(S.e)(this._workerService,oe,$,Z,oe.getFormattingOptions()).then(Ee=>{if(ne.dispose(),te)return;Object(f.n)(Ee)&&(r.a.execute(this._editor,Ee,!0),Object(S.b)(Ee))},Ee=>{throw ne.dispose(),Ee})}};O.ID="editor.contrib.autoFormat",O=E([y(1,D.a)],O);let k=class{constructor(Z,oe){this.editor=Z,this._instantiationService=oe,this._callOnDispose=new A.b,this._callOnModel=new A.b,this._callOnDispose.add(Z.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(Z.onDidChangeModel(()=>this._update())),this._callOnDispose.add(Z.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(d.j.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){if(this._callOnModel.clear(),!this.editor.getOption(47))return;if(!this.editor.hasModel())return;if(!d.j.has(this.editor.getModel()))return;this._callOnModel.add(this.editor.onDidPaste(({range:Z})=>this._trigger(Z)))}_trigger(Z){if(!this.editor.hasModel())return;if(this.editor.getSelections().length>1)return;this._instantiationService.invokeFunction(S.c,this.editor,Z,2,p.b.None,B.a.None).catch(x.f)}};k.ID="editor.contrib.formatOnPaste",k=E([y(1,c.a)],k);class Y extends F.b{constructor(){super({id:"editor.action.formatDocument",label:_.a("formatDocument.label","Format Document"),alias:"Format Document",precondition:h.a.and(m.a.notInCompositeEditor,m.a.writable,m.a.hasDocumentFormattingProvider),kbOpts:{kbExpr:m.a.editorTextFocus,primary:1024|512|36,linux:{primary:2048|1024|39},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(H,Z){return C(this,void 0,void 0,function*(){if(Z.hasModel()){const oe=H.get(c.a),$=H.get(p.a);yield $.showWhile(oe.invokeFunction(S.d,Z,1,p.b.None,B.a.None),250)}})}}class Q extends F.b{constructor(){super({id:"editor.action.formatSelection",label:_.a("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:h.a.and(m.a.writable,m.a.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(N.c)(2048|41,2048|36),weight:100},contextMenuOpts:{when:m.a.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(H,Z){return C(this,void 0,void 0,function*(){if(!Z.hasModel())return;const oe=H.get(c.a),$=Z.getModel(),te=Z.getSelections().map(Ee=>Ee.isEmpty()?new v.a(Ee.startLineNumber,1,Ee.startLineNumber,$.getLineMaxColumn(Ee.startLineNumber)):Ee),ne=H.get(p.a);yield ne.showWhile(oe.invokeFunction(S.c,Z,te,1,p.b.None,B.a.None),250)})}}Object(F.l)(O.ID,O),Object(F.l)(k.ID,k),Object(F.j)(Y),Object(F.j)(Q),b.a.registerCommand("editor.action.format",H=>C(void 0,void 0,void 0,function*(){const Z=H.get(I.a).getFocusedCodeEditor();if(!Z||!Z.hasModel())return;const oe=H.get(b.b);Z.getSelection().isEmpty()?yield oe.executeCommand("editor.action.formatDocument"):yield oe.executeCommand("editor.action.formatSelection")}))},cIqD:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("Ll0s");class B{static whitespaceVisibleColumn(x,N,A){const F=x.length;let I=0,L=-1,v=-1;for(let m=0;m<F;m++){if(m===N)return[L,v,I];I%A===0&&(L=m,v=I);const d=x.charCodeAt(m);switch(d){case 32:I+=1;break;case 9:I=f.a.nextRenderTabStop(I,A);break;default:return[-1,-1,-1]}}return N===F?[L,v,I]:[-1,-1,-1]}static atomicPosition(x,N,A,F){const I=x.length,[L,v,m]=B.whitespaceVisibleColumn(x,N,A);if(m===-1)return-1;let d;switch(F){case 0:d=!0;break;case 1:d=!1;break;case 2:if(m%A===0)return N;d=m%A<=A/2;break}if(d){if(L===-1)return-1;let r=v;for(let _=L;_<I;++_){if(r===v+A)return L;const b=x.charCodeAt(_);switch(b){case 32:r+=1;break;case 9:r=f.a.nextRenderTabStop(r,A);break;default:return-1}}return r===v+A?L:-1}const D=f.a.nextRenderTabStop(m,A);let S=m;for(let r=N;r<I;r++){if(S===D)return r;const _=x.charCodeAt(r);switch(_){case 32:S+=1;break;case 9:S=f.a.nextRenderTabStop(S,A);break;default:return-1}}return S===D?I:-1}}},cMOf:function(mt,M,t){"use strict";t.d(M,"a",function(){return S}),t.d(M,"b",function(){return y});var f=t("EffR"),B=t("4y0V"),x=t("pg8w"),N=t("X+cX"),A=t("ZCR3"),F=t("MI8n"),I=t("pmY6"),L=t("MNsG"),v=t("undH"),m=t.n(v),d=function(C,O,k,Y){var Q=arguments.length,H=Q<3?O:Y===null?Y=Object.getOwnPropertyDescriptor(O,k):Y,Z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(C,O,k,Y);else for(var oe=C.length-1;oe>=0;oe--)(Z=C[oe])&&(H=(Q<3?Z(H):Q>3?Z(O,k,H):Z(O,k))||H);return Q>3&&H&&Object.defineProperty(O,k,H),H};let D=!1;var S;(function(C){C.North="north",C.South="south",C.East="east",C.West="west"})(S||(S={}));let r=4;const _=new F.b;let b=300;const h=new F.b;class c{constructor(){this.disposables=new I.b}get onPointerMove(){return this.disposables.add(new B.a(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new B.a(window,"mouseup")).event}dispose(){this.disposables.dispose()}}d([A.a],c.prototype,"onPointerMove",null),d([A.a],c.prototype,"onPointerUp",null);class p{constructor(C){this.el=C,this.disposables=new I.b}get onPointerMove(){return this.disposables.add(new B.a(this.el,x.a.Change)).event}get onPointerUp(){return this.disposables.add(new B.a(this.el,x.a.End)).event}dispose(){this.disposables.dispose()}}d([A.a],p.prototype,"onPointerMove",null),d([A.a],p.prototype,"onPointerUp",null);class E{constructor(C){this.factory=C}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}d([A.a],E.prototype,"onPointerMove",null),d([A.a],E.prototype,"onPointerUp",null);class y extends I.a{constructor(C,O,k){super();this.hoverDelay=b,this.hoverDelayer=this._register(new N.a(this.hoverDelay)),this._state=3,this._onDidEnablementChange=this._register(new F.b),this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=this._register(new F.b),this.onDidStart=this._onDidStart.event,this._onDidChange=this._register(new F.b),this.onDidChange=this._onDidChange.event,this._onDidReset=this._register(new F.b),this.onDidReset=this._onDidReset.event,this._onDidEnd=this._register(new F.b),this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=this._register(new I.b),this.orthogonalStartDragHandleDisposables=this._register(new I.b),this.orthogonalEndSashDisposables=this._register(new I.b),this.orthogonalEndDragHandleDisposables=this._register(new I.b),this.el=Object(f.q)(C,Object(f.a)(".monaco-sash")),k.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${k.orthogonalEdge}`),L.f&&this.el.classList.add("mac");const Y=this._register(new B.a(this.el,"mousedown")).event;this._register(Y(ne=>this.onPointerStart(ne,new c),this));const Q=this._register(new B.a(this.el,"dblclick")).event;this._register(Q(this.onPointerDoublePress,this));const H=this._register(new B.a(this.el,"mouseenter")).event;this._register(H(()=>y.onMouseEnter(this)));const Z=this._register(new B.a(this.el,"mouseleave")).event;this._register(Z(()=>y.onMouseLeave(this))),this._register(x.b.addTarget(this.el));const oe=F.c.map(this._register(new B.a(this.el,x.a.Start)).event,ne=>{var Ee;return Object.assign(Object.assign({},ne),{target:(Ee=ne.initialTarget)!==null&&Ee!==void 0?Ee:null})});this._register(oe(ne=>this.onPointerStart(ne,new p(this.el)),this));const $=this._register(new B.a(this.el,x.a.Tap)).event,te=F.c.map(F.c.filter(F.c.debounce($,(ne,Ee)=>{var fe;return{event:Ee,count:((fe=ne==null?void 0:ne.count)!==null&&fe!==void 0?fe:0)+1}},250),({count:ne})=>ne===2),({event:ne})=>{var Ee;return Object.assign(Object.assign({},ne),{target:(Ee=ne.initialTarget)!==null&&Ee!==void 0?Ee:null})});this._register(te(this.onPointerDoublePress,this)),typeof k.size=="number"?(this.size=k.size,k.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=r,this._register(_.event(ne=>{this.size=ne,this.layout()}))),this._register(h.event(ne=>this.hoverDelay=ne)),this.hidden=!1,this.layoutProvider=O,this.orthogonalStartSash=k.orthogonalStartSash,this.orthogonalEndSash=k.orthogonalEndSash,this.orientation=k.orientation||0,this.orientation===1?(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",D),this.layout()}get state(){return this._state}set state(C){if(this._state===C)return;this.el.classList.toggle("disabled",C===0),this.el.classList.toggle("minimum",C===1),this.el.classList.toggle("maximum",C===2),this._state=C,this._onDidEnablementChange.fire(C)}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(C){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),C){const O=k=>{this.orthogonalStartDragHandleDisposables.clear(),k!==0&&(this._orthogonalStartDragHandle=Object(f.q)(this.el,Object(f.a)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(Object(I.i)(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new B.a(this._orthogonalStartDragHandle,"mouseenter")).event(()=>y.onMouseEnter(C),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new B.a(this._orthogonalStartDragHandle,"mouseleave")).event(()=>y.onMouseLeave(C),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(C.onDidEnablementChange(O,this)),O(C.state)}this._orthogonalStartSash=C}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(C){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),C){const O=k=>{this.orthogonalEndDragHandleDisposables.clear(),k!==0&&(this._orthogonalEndDragHandle=Object(f.q)(this.el,Object(f.a)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(Object(I.i)(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new B.a(this._orthogonalEndDragHandle,"mouseenter")).event(()=>y.onMouseEnter(C),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new B.a(this._orthogonalEndDragHandle,"mouseleave")).event(()=>y.onMouseLeave(C),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(C.onDidEnablementChange(O,this)),O(C.state)}this._orthogonalEndSash=C}onPointerStart(C,O){f.c.stop(C);let k=!1;if(!C.__orthogonalSashEvent){const ee=this.getOrthogonalSash(C);ee&&(k=!0,C.__orthogonalSashEvent=!0,ee.onPointerStart(C,new E(O)))}if(this.linkedSash&&!C.__linkedSashEvent&&(C.__linkedSashEvent=!0,this.linkedSash.onPointerStart(C,new E(O))),!this.state)return;const Y=Object(f.E)("iframe");for(const ee of Y)ee.style.pointerEvents="none";const Q=C.pageX,H=C.pageY,Z=C.altKey,oe={startX:Q,currentX:Q,startY:H,currentY:H,altKey:Z};this.el.classList.add("active"),this._onDidStart.fire(oe);const $=Object(f.w)(this.el),te=()=>{let ee="";k?ee="all-scroll":this.orientation===1?this.state===1?ee="s-resize":this.state===2?ee="n-resize":ee=L.f?"row-resize":"ns-resize":this.state===1?ee="e-resize":this.state===2?ee="w-resize":ee=L.f?"col-resize":"ew-resize",$.textContent=`* { cursor: ${ee} !important; }`},ne=new I.b;te(),k||this.onDidEnablementChange(te,null,ne);const Ee=ee=>{f.c.stop(ee,!1);const ie={startX:Q,currentX:ee.pageX,startY:H,currentY:ee.pageY,altKey:Z};this._onDidChange.fire(ie)},fe=ee=>{f.c.stop(ee,!1),this.el.removeChild($),this.el.classList.remove("active"),this._onDidEnd.fire(),ne.dispose();for(const ie of Y)ie.style.pointerEvents="auto"};O.onPointerMove(Ee,null,ne),O.onPointerUp(fe,null,ne),ne.add(O)}onPointerDoublePress(C){const O=this.getOrthogonalSash(C);O&&O._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(C,O=!1){C.el.classList.contains("active")?(C.hoverDelayer.cancel(),C.el.classList.add("hover")):C.hoverDelayer.trigger(()=>C.el.classList.add("hover"),C.hoverDelay).then(void 0,()=>{}),!O&&C.linkedSash&&y.onMouseEnter(C.linkedSash,!0)}static onMouseLeave(C,O=!1){C.hoverDelayer.cancel(),C.el.classList.remove("hover"),!O&&C.linkedSash&&y.onMouseLeave(C.linkedSash,!0)}clearSashHoverState(){y.onMouseLeave(this)}layout(){if(this.orientation===0){const C=this.layoutProvider;this.el.style.left=C.getVerticalSashLeft(this)-this.size/2+"px",C.getVerticalSashTop&&(this.el.style.top=C.getVerticalSashTop(this)+"px"),C.getVerticalSashHeight&&(this.el.style.height=C.getVerticalSashHeight(this)+"px")}else{const C=this.layoutProvider;this.el.style.top=C.getHorizontalSashTop(this)-this.size/2+"px",C.getHorizontalSashLeft&&(this.el.style.left=C.getHorizontalSashLeft(this)+"px"),C.getHorizontalSashWidth&&(this.el.style.width=C.getHorizontalSashWidth(this)+"px")}}hide(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")}getOrthogonalSash(C){return!C.target||!(C.target instanceof HTMLElement)?void 0:C.target.classList.contains("orthogonal-drag-handle")?C.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}},cMvZ:function(mt,M,t){"use strict";t.d(M,"a",function(){return C}),t.d(M,"c",function(){return O}),t.d(M,"b",function(){return $});var f=t("MI8n"),B=t("pmY6"),x=t("N0LK"),N=t("0JNc"),A=t("KDc4"),F=t("BFtn");class I{constructor(ee){if(ee.autoClosingPairs?this._autoClosingPairs=ee.autoClosingPairs.map(ie=>new A.c(ie)):ee.brackets?this._autoClosingPairs=ee.brackets.map(ie=>new A.c({open:ie[0],close:ie[1]})):this._autoClosingPairs=[],ee.colorizedBracketPairs?this._colorizedBracketPairs=L(ee.colorizedBracketPairs.map(ie=>[ie[0],ie[1]])):ee.brackets?this._colorizedBracketPairs=L(ee.brackets.map(ie=>[ie[0],ie[1]]).filter(ie=>!(ie[0]==="<"&&ie[1]===">"))):this._colorizedBracketPairs=[],ee.__electricCharacterSupport&&ee.__electricCharacterSupport.docComment){const ie=ee.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new A.c({open:ie.open,close:ie.close||""}))}this._autoCloseBefore=typeof ee.autoCloseBefore=="string"?ee.autoCloseBefore:I.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=ee.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}static shouldAutoClosePair(ee,ie,U){if(ie.getTokenCount()===0)return!0;const G=ie.findTokenIndexAtOffset(U-2),J=ie.getStandardTokenType(G);return ee.isOK(J)}getSurroundingPairs(){return this._surroundingPairs}getColorizedBrackets(){return this._colorizedBracketPairs}}I.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=`;:.,=}])>
|
|
|
`;function L(ee){return ee.filter(([ie,U])=>ie!==""&&U!=="")}var v=t("EIAu");class m{constructor(ee){this._richEditBrackets=ee}getElectricCharacters(){let ee=[];if(this._richEditBrackets)for(const ie of this._richEditBrackets.brackets)for(const U of ie.close){const G=U.charAt(U.length-1);ee.push(G)}return ee=ee.filter((ie,U,G)=>G.indexOf(ie)===U),ee}onElectricCharacter(ee,ie,U){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const G=ie.findTokenIndexAtOffset(U-1);if(Object(F.b)(ie.getStandardTokenType(G)))return null;const J=this._richEditBrackets.reversedRegex,he=ie.getLineContent().substring(0,U-1)+ee,xe=v.a.findPrevBracketInRange(J,1,he,0,he.length);if(!xe)return null;const Ie=he.substring(xe.startColumn-1,xe.endColumn-1).toLowerCase(),Le=this._richEditBrackets.textIsOpenBracket[Ie];if(Le)return null;const Te=ie.getActualLineContentBefore(xe.startColumn-1);return/^\s*$/.test(Te)?{matchOpenBracket:Ie}:null}}function d(ee){return ee.global&&(ee.lastIndex=0),!0}class D{constructor(ee){this._indentationRules=ee}shouldIncrease(ee){return!!(this._indentationRules&&(this._indentationRules.increaseIndentPattern&&d(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(ee)))}shouldDecrease(ee){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&d(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(ee))}shouldIndentNextLine(ee){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&d(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(ee))}shouldIgnore(ee){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&d(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(ee))}getIndentMetadata(ee){let ie=0;return this.shouldIncrease(ee)&&(ie+=1),this.shouldDecrease(ee)&&(ie+=2),this.shouldIndentNextLine(ee)&&(ie+=4),this.shouldIgnore(ee)&&(ie+=8),ie}}var S=t("/cxE");class r{constructor(ee){ee=ee||{},ee.brackets=ee.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],ee.brackets.forEach(ie=>{const U=r._createOpenBracketRegExp(ie[0]),G=r._createCloseBracketRegExp(ie[1]);U&&G&&this._brackets.push({open:ie[0],openRegExp:U,close:ie[1],closeRegExp:G})}),this._regExpRules=ee.onEnterRules||[]}onEnter(ee,ie,U,G){if(ee>=3)for(let J=0,he=this._regExpRules.length;J<he;J++){let xe=this._regExpRules[J];const Ie=[{reg:xe.beforeText,text:U},{reg:xe.afterText,text:G},{reg:xe.previousLineText,text:ie}].every(Le=>Le.reg?(Le.reg.lastIndex=0,Le.reg.test(Le.text)):!0);if(Ie)return xe.action}if(ee>=2&&(U.length>0&&G.length>0))for(let J=0,he=this._brackets.length;J<he;J++){let xe=this._brackets[J];if(xe.openRegExp.test(U)&&xe.closeRegExp.test(G))return{indentAction:A.b.IndentOutdent}}if(ee>=2&&U.length>0)for(let J=0,he=this._brackets.length;J<he;J++){let xe=this._brackets[J];if(xe.openRegExp.test(U))return{indentAction:A.b.Indent}}return null}static _createOpenBracketRegExp(ee){let ie=x.t(ee);return/\B/.test(ie.charAt(0))||(ie="\\b"+ie),ie+="\\s*$",r._safeRegExp(ie)}static _createCloseBracketRegExp(ee){let ie=x.t(ee);return/\B/.test(ie.charAt(ie.length-1))||(ie=ie+"\\b"),ie="^\\s*"+ie,r._safeRegExp(ie)}static _safeRegExp(ee){try{return new RegExp(ee)}catch(ie){return Object(S.f)(ie),null}}}var _=t("Cg/j"),b=t("+7oY"),h=t("WBhO"),c=t("9fML"),p=function(ee,ie,U,G){var J=arguments.length,he=J<3?ie:G===null?G=Object.getOwnPropertyDescriptor(ie,U):G,xe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")he=Reflect.decorate(ee,ie,U,G);else for(var Ie=ee.length-1;Ie>=0;Ie--)(xe=ee[Ie])&&(he=(J<3?xe(he):J>3?xe(ie,U,he):xe(ie,U))||he);return J>3&&he&&Object.defineProperty(ie,U,he),he},E=function(ee,ie){return function(U,G){ie(U,G,ee)}};class y{constructor(ee){this.languageId=ee}affects(ee){return this.languageId?this.languageId===ee:!0}}const C=Object(_.c)("languageConfigurationService");let O=class extends B.a{constructor(ie,U){super();this.configurationService=ie,this.modeService=U,this.onDidChangeEmitter=this._register(new f.b),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const G=new Set(Object.values(Y));this._register(this.configurationService.onDidChangeConfiguration(J=>{const he=J.change.keys.some(Ie=>G.has(Ie)),xe=J.change.overrides.filter(([Ie,Le])=>Le.some(Te=>G.has(Te))).map(([Ie])=>this.modeService.validateLanguageId(Ie));if(he)this.configurations.clear(),this.onDidChangeEmitter.fire(new y(void 0));else for(const Ie of xe)Ie&&(this.configurations.delete(Ie),this.onDidChangeEmitter.fire(new y(Ie)))})),this._register($.onDidChange(J=>{this.configurations.delete(J.languageId),this.onDidChangeEmitter.fire(new y(J.languageId))}))}getLanguageConfiguration(ie){let U=this.configurations.get(ie);return U||(U=k(ie,this.configurationService,this.modeService),this.configurations.set(ie,U)),U}};O=p([E(0,b.a),E(1,h.a)],O);function k(ee,ie,U){let G=$.getLanguageConfiguration(ee);if(!G){const Ie=U.validateLanguageId(ee);if(!Ie)throw new Error("Unexpected languageId");G=new fe(Ie,{})}const J=Q(G.languageId,ie),he=ne([G.underlyingConfig,J]),xe=new fe(G.languageId,he);return xe}const Y={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function Q(ee,ie){const U=ie.getValue(Y.brackets,{overrideIdentifier:ee}),G=ie.getValue(Y.colorizedBracketPairs,{overrideIdentifier:ee});return{brackets:H(U),colorizedBracketPairs:H(G)}}function H(ee){return Array.isArray(ee)?ee.map(ie=>!Array.isArray(ie)||ie.length!==2?void 0:[ie[0],ie[1]]).filter(ie=>!!ie):void 0}class Z{constructor(ee){this.languageId=ee}}class oe{constructor(){this._entries=new Map,this._onDidChange=new f.b,this.onDidChange=this._onDidChange.event}register(ee,ie,U=0){let G=this._entries.get(ee);G||(G=new te(ee),this._entries.set(ee,G));const J=G.register(ie,U);return this._onDidChange.fire(new Z(ee)),Object(B.i)(()=>{J.dispose(),this._onDidChange.fire(new Z(ee))})}getLanguageConfiguration(ee){let ie=this._entries.get(ee);return(ie==null?void 0:ie.getResolvedConfiguration())||null}getIndentationRules(ee){const ie=this.getLanguageConfiguration(ee);return ie&&ie.indentationRules||null}_getElectricCharacterSupport(ee){let ie=this.getLanguageConfiguration(ee);return ie&&ie.electricCharacter||null}getElectricCharacters(ee){let ie=this._getElectricCharacterSupport(ee);return ie?ie.getElectricCharacters():[]}onElectricCharacter(ee,ie,U){let G=Object(F.a)(ie,U-1),J=this._getElectricCharacterSupport(G.languageId);return J?J.onElectricCharacter(ee,G,U-G.firstCharOffset):null}getComments(ee){let ie=this.getLanguageConfiguration(ee);return ie&&ie.comments||null}_getCharacterPairSupport(ee){let ie=this.getLanguageConfiguration(ee);return ie&&ie.characterPair||null}getAutoClosingPairs(ee){const ie=this._getCharacterPairSupport(ee);return new A.a(ie?ie.getAutoClosingPairs():[])}getAutoCloseBeforeSet(ee){let ie=this._getCharacterPairSupport(ee);return ie?ie.getAutoCloseBeforeSet():I.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED}getSurroundingPairs(ee){let ie=this._getCharacterPairSupport(ee);return ie?ie.getSurroundingPairs():[]}shouldAutoClosePair(ee,ie,U){const G=Object(F.a)(ie,U-1);return I.shouldAutoClosePair(ee,G,U-G.firstCharOffset)}getWordDefinition(ee){let ie=this.getLanguageConfiguration(ee);return ie?Object(N.c)(ie.wordDefinition||null):Object(N.c)(null)}getFoldingRules(ee){let ie=this.getLanguageConfiguration(ee);return ie?ie.foldingRules:{}}getIndentRulesSupport(ee){let ie=this.getLanguageConfiguration(ee);return ie&&ie.indentRulesSupport||null}getPrecedingValidLine(ee,ie,U){let G=ee.getLanguageIdAtPosition(ie,0);if(ie>1){let J,he=-1;for(J=ie-1;J>=1;J--){if(ee.getLanguageIdAtPosition(J,0)!==G)return he;let xe=ee.getLineContent(J);if(U.shouldIgnore(xe)||/^\s+$/.test(xe)||xe===""){he=J;continue}return J}}return-1}getInheritIndentForLine(ee,ie,U,G=!0){if(ee<4)return null;const J=this.getIndentRulesSupport(ie.getLanguageId());if(!J)return null;if(U<=1)return{indentation:"",action:null};const he=this.getPrecedingValidLine(ie,U,J);if(he<0)return null;if(he<1)return{indentation:"",action:null};const xe=ie.getLineContent(he);if(J.shouldIncrease(xe)||J.shouldIndentNextLine(xe))return{indentation:x.x(xe),action:A.b.Indent,line:he};if(J.shouldDecrease(xe))return{indentation:x.x(xe),action:null,line:he};{if(he===1)return{indentation:x.x(ie.getLineContent(he)),action:null,line:he};const Ie=he-1,Le=J.getIndentMetadata(ie.getLineContent(Ie));if(!(Le&(1|2))&&Le&4){let Te=0;for(let ze=Ie-1;ze>0;ze--){if(J.shouldIndentNextLine(ie.getLineContent(ze)))continue;Te=ze;break}return{indentation:x.x(ie.getLineContent(Te+1)),action:null,line:Te+1}}if(G)return{indentation:x.x(ie.getLineContent(he)),action:null,line:he};for(let Te=he;Te>0;Te--){const ze=ie.getLineContent(Te);if(J.shouldIncrease(ze))return{indentation:x.x(ze),action:A.b.Indent,line:Te};if(J.shouldIndentNextLine(ze)){let ue=0;for(let je=Te-1;je>0;je--){if(J.shouldIndentNextLine(ie.getLineContent(Te)))continue;ue=je;break}return{indentation:x.x(ie.getLineContent(ue+1)),action:null,line:ue+1}}else if(J.shouldDecrease(ze))return{indentation:x.x(ze),action:null,line:Te}}return{indentation:x.x(ie.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(ee,ie,U,G,J){if(ee<4)return null;const he=this.getLanguageConfiguration(U);if(!he)return null;const xe=this.getIndentRulesSupport(U);if(!xe)return null;const Ie=this.getInheritIndentForLine(ee,ie,G),Le=ie.getLineContent(G);if(Ie){const Te=Ie.line;if(Te!==void 0){const ze=he.onEnter(ee,"",ie.getLineContent(Te),"");if(ze){let ue=x.x(ie.getLineContent(Te));return ze.removeText&&(ue=ue.substring(0,ue.length-ze.removeText)),ze.indentAction===A.b.Indent||ze.indentAction===A.b.IndentOutdent?ue=J.shiftIndent(ue):ze.indentAction===A.b.Outdent&&(ue=J.unshiftIndent(ue)),xe.shouldDecrease(Le)&&(ue=J.unshiftIndent(ue)),ze.appendText&&(ue+=ze.appendText),x.x(ue)}}return xe.shouldDecrease(Le)?Ie.action===A.b.Indent?Ie.indentation:J.unshiftIndent(Ie.indentation):Ie.action===A.b.Indent?J.shiftIndent(Ie.indentation):Ie.indentation}return null}getIndentForEnter(ee,ie,U,G){if(ee<4)return null;ie.forceTokenization(U.startLineNumber);const J=ie.getLineTokens(U.startLineNumber),he=Object(F.a)(J,U.startColumn-1),xe=he.getLineContent();let Ie=!1,Le;he.firstCharOffset>0&&J.getLanguageId(0)!==he.languageId?(Ie=!0,Le=xe.substr(0,U.startColumn-1-he.firstCharOffset)):Le=J.getLineContent().substring(0,U.startColumn-1);let Te;if(U.isEmpty())Te=xe.substr(U.startColumn-1-he.firstCharOffset);else{const Ce=this.getScopedLineTokens(ie,U.endLineNumber,U.endColumn);Te=Ce.getLineContent().substr(U.endColumn-1-he.firstCharOffset)}const ze=this.getIndentRulesSupport(he.languageId);if(!ze)return null;const ue=Le,je=x.x(Le),Pe={getLineTokens:Ce=>ie.getLineTokens(Ce),getLanguageId:()=>ie.getLanguageId(),getLanguageIdAtPosition:(Ce,ye)=>ie.getLanguageIdAtPosition(Ce,ye),getLineContent:Ce=>Ce===U.startLineNumber?ue:ie.getLineContent(Ce)},ve=x.x(J.getLineContent()),ce=this.getInheritIndentForLine(ee,Pe,U.startLineNumber+1);if(!ce){const Ce=Ie?ve:je;return{beforeEnter:Ce,afterEnter:Ce}}let le=Ie?ve:ce.indentation;return ce.action===A.b.Indent&&(le=G.shiftIndent(le)),ze.shouldDecrease(Te)&&(le=G.unshiftIndent(le)),{beforeEnter:Ie?ve:je,afterEnter:le}}getIndentActionForType(ee,ie,U,G,J){if(ee<4)return null;const he=this.getScopedLineTokens(ie,U.startLineNumber,U.startColumn);if(he.firstCharOffset)return null;const xe=this.getIndentRulesSupport(he.languageId);if(!xe)return null;const Ie=he.getLineContent(),Le=Ie.substr(0,U.startColumn-1-he.firstCharOffset);let Te;if(U.isEmpty())Te=Ie.substr(U.startColumn-1-he.firstCharOffset);else{const ze=this.getScopedLineTokens(ie,U.endLineNumber,U.endColumn);Te=ze.getLineContent().substr(U.endColumn-1-he.firstCharOffset)}if(!xe.shouldDecrease(Le+Te)&&xe.shouldDecrease(Le+G+Te)){const ze=this.getInheritIndentForLine(ee,ie,U.startLineNumber,!1);if(!ze)return null;let ue=ze.indentation;return ze.action!==A.b.Indent&&(ue=J.unshiftIndent(ue)),ue}return null}getIndentMetadata(ee,ie){const U=this.getIndentRulesSupport(ee.getLanguageId());return U?ie<1||ie>ee.getLineCount()?null:U.getIndentMetadata(ee.getLineContent(ie)):null}getEnterAction(ee,ie,U){const G=this.getScopedLineTokens(ie,U.startLineNumber,U.startColumn),J=this.getLanguageConfiguration(G.languageId);if(!J)return null;const he=G.getLineContent(),xe=he.substr(0,U.startColumn-1-G.firstCharOffset);let Ie;if(U.isEmpty())Ie=he.substr(U.startColumn-1-G.firstCharOffset);else{const ve=this.getScopedLineTokens(ie,U.endLineNumber,U.endColumn);Ie=ve.getLineContent().substr(U.endColumn-1-G.firstCharOffset)}let Le="";if(U.startLineNumber>1&&G.firstCharOffset===0){const ve=this.getScopedLineTokens(ie,U.startLineNumber-1);ve.languageId===G.languageId&&(Le=ve.getLineContent())}const Te=J.onEnter(ee,Le,xe,Ie);if(!Te)return null;const ze=Te.indentAction;let ue=Te.appendText;const je=Te.removeText||0;ue?ze===A.b.Indent&&(ue=" "+ue):ze===A.b.Indent||ze===A.b.IndentOutdent?ue=" ":ue="";let Pe=this.getIndentationAtPosition(ie,U.startLineNumber,U.startColumn);return je&&(Pe=Pe.substring(0,Pe.length-je)),{indentAction:ze,appendText:ue,removeText:je,indentation:Pe}}getIndentationAtPosition(ee,ie,U){const G=ee.getLineContent(ie);let J=x.x(G);return J.length>U-1&&(J=J.substring(0,U-1)),J}getScopedLineTokens(ee,ie,U){ee.forceTokenization(ie);const G=ee.getLineTokens(ie),J=typeof U=="undefined"?ee.getLineMaxColumn(ie)-1:U-1;return Object(F.a)(G,J)}}const $=new oe;class te{constructor(ee){this.languageId=ee,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(ee,ie){const U=new Ee(ee,ie,++this._order);return this._entries.push(U),this._resolved=null,Object(B.i)(()=>{for(let G=0;G<this._entries.length;G++)if(this._entries[G]===U){this._entries.splice(G,1),this._resolved=null;break}})}getResolvedConfiguration(){if(!this._resolved){const ee=this._resolve();ee&&(this._resolved=new fe(this.languageId,ee))}return this._resolved}_resolve(){return this._entries.length===0?null:(this._entries.sort(Ee.cmp),ne(this._entries.map(ee=>ee.configuration)))}}function ne(ee){let ie={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 U of ee)ie={comments:U.comments||ie.comments,brackets:U.brackets||ie.brackets,wordPattern:U.wordPattern||ie.wordPattern,indentationRules:U.indentationRules||ie.indentationRules,onEnterRules:U.onEnterRules||ie.onEnterRules,autoClosingPairs:U.autoClosingPairs||ie.autoClosingPairs,surroundingPairs:U.surroundingPairs||ie.surroundingPairs,autoCloseBefore:U.autoCloseBefore||ie.autoCloseBefore,folding:U.folding||ie.folding,colorizedBracketPairs:U.colorizedBracketPairs||ie.colorizedBracketPairs,__electricCharacterSupport:U.__electricCharacterSupport||ie.__electricCharacterSupport};return ie}class Ee{constructor(ee,ie,U){this.configuration=ee,this.priority=ie,this.order=U}static cmp(ee,ie){return ee.priority===ie.priority?ee.order-ie.order:ee.priority-ie.priority}}class fe{constructor(ee,ie){this.languageId=ee,this.underlyingConfig=ie,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new r(this.underlyingConfig):null,this.comments=fe._handleComments(this.underlyingConfig),this.characterPair=new I(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||N.a,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new D(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{}}getWordDefinition(){return Object(N.c)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new v.b(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new m(this.brackets)),this._electricCharacter}onEnter(ee,ie,U,G){return this._onEnterSupport?this._onEnterSupport.onEnter(ee,ie,U,G):null}static _handleComments(ee){let ie=ee.comments;if(!ie)return null;let U={};if(ie.lineComment&&(U.lineCommentToken=ie.lineComment),ie.blockComment){let[G,J]=ie.blockComment;U.blockCommentStartToken=G,U.blockCommentEndToken=J}return U}}Object(c.b)(C,O)},"ci+S":function(mt,M,t){},cl4r:function(mt,M,t){},cldp:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"javascript",extensions:[".js",".es6",".jsx",".mjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:function(){return t.e(313).then(t.bind(null,"7Xl7"))}})},cqdO:function(mt,M,t){"use strict";t.d(M,"e",function(){return H}),t.d(M,"f",function(){return Z}),t.d(M,"a",function(){return te}),t.d(M,"h",function(){return fe}),t.d(M,"g",function(){return ee}),t.d(M,"d",function(){return G}),t.d(M,"b",function(){return J}),t.d(M,"c",function(){return ve});var f=t("EffR"),B=t("4y0V"),x=t("uDWl"),N=t("pg8w"),A=t("OBOq");class F{constructor(ce){this.spliceables=ce}splice(ce,le,Ce){this.spliceables.forEach(ye=>ye.splice(ce,le,Ce))}}var I=t("6OMU"),L=t("X+cX"),v=t("zrhQ"),m=t("ZCR3"),d=t("MI8n"),D=t("fpMC"),S=t("pmY6"),r=t("Sdnv"),_=t("qj0h"),b=t("MNsG"),h=t("746U"),c=t("4rho");class p extends Error{constructor(ce,le){super(`ListError [${ce}] ${le}`)}}var E=t("feEw"),y=function(ce,le,Ce,ye){var ge=arguments.length,Me=ge<3?le:ye===null?ye=Object.getOwnPropertyDescriptor(le,Ce):ye,De;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Me=Reflect.decorate(ce,le,Ce,ye);else for(var we=ce.length-1;we>=0;we--)(De=ce[we])&&(Me=(ge<3?De(Me):ge>3?De(le,Ce,Me):De(le,Ce))||Me);return ge>3&&Me&&Object.defineProperty(le,Ce,Me),Me},C=function(ce,le,Ce,ye){function ge(Me){return Me instanceof Ce?Me:new Ce(function(De){De(Me)})}return new(Ce||(Ce=Promise))(function(Me,De){function we(Ke){try{nt(ye.next(Ke))}catch(et){De(et)}}function Oe(Ke){try{nt(ye.throw(Ke))}catch(et){De(et)}}function nt(Ke){Ke.done?Me(Ke.value):ge(Ke.value).then(we,Oe)}nt((ye=ye.apply(ce,le||[])).next())})};class O{constructor(ce){this.trait=ce,this.renderedElements=[]}get templateId(){return`template:${this.trait.trait}`}renderTemplate(ce){return ce}renderElement(ce,le,Ce){const ye=this.renderedElements.findIndex(ge=>ge.templateData===Ce);if(ye>=0){const ge=this.renderedElements[ye];this.trait.unrender(Ce),ge.index=le}else{const ge={index:le,templateData:Ce};this.renderedElements.push(ge)}this.trait.renderIndex(le,Ce)}splice(ce,le,Ce){const ye=[];for(const ge of this.renderedElements)ge.index<ce?ye.push(ge):ge.index>=ce+le&&ye.push({index:ge.index+Ce-le,templateData:ge.templateData});this.renderedElements=ye}renderIndexes(ce){for(const{index:le,templateData:Ce}of this.renderedElements)ce.indexOf(le)>-1&&this.trait.renderIndex(le,Ce)}disposeTemplate(ce){const le=this.renderedElements.findIndex(Ce=>Ce.templateData===ce);if(le<0)return;this.renderedElements.splice(le,1)}}class k{constructor(ce){this._trait=ce,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new d.b,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new O(this)}splice(ce,le,Ce){var ye;le=Math.max(0,Math.min(le,this.length-ce));const ge=Ce.length-le,Me=ce+le,De=[...this.sortedIndexes.filter(Oe=>Oe<ce),...Ce.map((Oe,nt)=>Oe?nt+ce:-1).filter(Oe=>Oe!==-1),...this.sortedIndexes.filter(Oe=>Oe>=Me).map(Oe=>Oe+ge)],we=this.length+ge;if(this.sortedIndexes.length>0&&De.length===0&&we>0){const Oe=(ye=this.sortedIndexes.find(nt=>nt>=ce))!==null&&ye!==void 0?ye:we-1;De.push(Math.min(Oe,we-1))}this.renderer.splice(ce,le,Ce.length),this._set(De,De),this.length=we}renderIndex(ce,le){le.classList.toggle(this._trait,this.contains(ce))}unrender(ce){ce.classList.remove(this._trait)}set(ce,le){return this._set(ce,[...ce].sort(ze),le)}_set(ce,le,Ce){const ye=this.indexes,ge=this.sortedIndexes;this.indexes=ce,this.sortedIndexes=le;const Me=Le(ge,ce);return this.renderer.renderIndexes(Me),this._onChange.fire({indexes:ce,browserEvent:Ce}),ye}get(){return this.indexes}contains(ce){return Object(I.d)(this.sortedIndexes,ce,ze)>=0}dispose(){Object(S.f)(this._onChange)}}y([m.a],k.prototype,"renderer",null);class Y extends k{constructor(ce){super("selected");this.setAriaSelected=ce}renderIndex(ce,le){super.renderIndex(ce,le),this.setAriaSelected&&(this.contains(ce)?le.setAttribute("aria-selected","true"):le.setAttribute("aria-selected","false"))}}class Q{constructor(ce,le,Ce){this.trait=ce,this.view=le,this.identityProvider=Ce}splice(ce,le,Ce){if(!this.identityProvider)return this.trait.splice(ce,le,Ce.map(()=>!1));const ye=this.trait.get().map(Me=>this.identityProvider.getId(this.view.element(Me)).toString()),ge=Ce.map(Me=>ye.indexOf(this.identityProvider.getId(Me).toString())>-1);this.trait.splice(ce,le,ge)}}function H(ce){return ce.tagName==="INPUT"||ce.tagName==="TEXTAREA"}function Z(ce){return ce.classList.contains("monaco-editor")?!0:ce.classList.contains("monaco-list")?!1:ce.parentElement?Z(ce.parentElement):!1}class oe{constructor(ce,le,Ce){this.list=ce,this.view=le,this.disposables=new S.b,this.multipleSelectionDisposables=new S.b,this.onKeyDown.filter(ye=>ye.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(ye=>ye.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(ye=>ye.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(ye=>ye.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(ye=>ye.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(ye=>ye.keyCode===9).on(this.onEscape,this,this.disposables),Ce.multipleSelectionSupport!==!1&&this.onKeyDown.filter(ye=>(b.f?ye.metaKey:ye.ctrlKey)&&ye.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return d.c.chain(this.disposables.add(new B.a(this.view.domNode,"keydown")).event).filter(ce=>!H(ce.target)).map(ce=>new x.a(ce))}updateOptions(ce){ce.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),ce.multipleSelectionSupport&&this.onKeyDown.filter(le=>(b.f?le.metaKey:le.ctrlKey)&&le.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(ce){ce.preventDefault(),ce.stopPropagation(),this.list.setSelection(this.list.getFocus(),ce.browserEvent)}onUpArrow(ce){ce.preventDefault(),ce.stopPropagation(),this.list.focusPrevious(1,!1,ce.browserEvent);const le=this.list.getFocus()[0];this.list.setAnchor(le),this.list.reveal(le),this.view.domNode.focus()}onDownArrow(ce){ce.preventDefault(),ce.stopPropagation(),this.list.focusNext(1,!1,ce.browserEvent);const le=this.list.getFocus()[0];this.list.setAnchor(le),this.list.reveal(le),this.view.domNode.focus()}onPageUpArrow(ce){ce.preventDefault(),ce.stopPropagation(),this.list.focusPreviousPage(ce.browserEvent);const le=this.list.getFocus()[0];this.list.setAnchor(le),this.list.reveal(le),this.view.domNode.focus()}onPageDownArrow(ce){ce.preventDefault(),ce.stopPropagation(),this.list.focusNextPage(ce.browserEvent);const le=this.list.getFocus()[0];this.list.setAnchor(le),this.list.reveal(le),this.view.domNode.focus()}onCtrlA(ce){ce.preventDefault(),ce.stopPropagation(),this.list.setSelection(Object(I.r)(this.list.length),ce.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(ce){this.list.getSelection().length&&(ce.preventDefault(),ce.stopPropagation(),this.list.setSelection([],ce.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}y([m.a],oe.prototype,"onKeyDown",null);var $;(function(ce){ce[ce.Idle=0]="Idle",ce[ce.Typing=1]="Typing"})($||($={}));const te=new class{mightProducePrintableCharacter(ce){return ce.ctrlKey||ce.metaKey||ce.altKey?!1:ce.keyCode>=31&&ce.keyCode<=56||ce.keyCode>=21&&ce.keyCode<=30||ce.keyCode>=93&&ce.keyCode<=102||ce.keyCode>=80&&ce.keyCode<=90}};class ne{constructor(ce,le,Ce,ye){this.list=ce,this.view=le,this.keyboardNavigationLabelProvider=Ce,this.delegate=ye,this.enabled=!1,this.state=$.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new S.b,this.disposables=new S.b,this.updateOptions(ce.options)}updateOptions(ce){const le=typeof ce.enableKeyboardNavigation=="undefined"?!0:!!ce.enableKeyboardNavigation;le?this.enable():this.disable(),typeof ce.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=ce.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const ce=d.c.chain(this.enabledDisposables.add(new B.a(this.view.domNode,"keydown")).event).filter(ye=>!H(ye.target)).filter(()=>this.automaticKeyboardNavigation||this.triggered).map(ye=>new x.a(ye)).filter(ye=>this.delegate.mightProducePrintableCharacter(ye)).forEach(ye=>{ye.stopPropagation(),ye.preventDefault()}).map(ye=>ye.browserEvent.key).event,le=d.c.debounce(ce,()=>null,800),Ce=d.c.reduce(d.c.any(ce,le),(ye,ge)=>ge===null?null:(ye||"")+ge);Ce(this.onInput,this,this.enabledDisposables),le(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){if(!this.enabled)return;this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1}onClear(){var ce;const le=this.list.getFocus();if(le.length>0&&le[0]===this.previouslyFocused){const Ce=(ce=this.list.options.accessibilityProvider)===null||ce===void 0?void 0:ce.getAriaLabel(this.list.element(le[0]));Ce&&Object(A.a)(Ce)}this.previouslyFocused=-1}onInput(ce){if(!ce){this.state=$.Idle,this.triggered=!1;return}const le=this.list.getFocus(),Ce=le.length>0?le[0]:0,ye=this.state===$.Idle?1:0;this.state=$.Typing;for(let ge=0;ge<this.list.length;ge++){const Me=(Ce+ge+ye)%this.list.length,De=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(Me)),we=De&&De.toString();if(typeof we=="undefined"||Object(D.h)(ce,we)){this.previouslyFocused=Ce,this.list.setFocus([Me]),this.list.reveal(Me);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class Ee{constructor(ce,le){this.list=ce,this.view=le,this.disposables=new S.b;const Ce=d.c.chain(this.disposables.add(new B.a(le.domNode,"keydown")).event).filter(ye=>!H(ye.target)).map(ye=>new x.a(ye));Ce.filter(ye=>ye.keyCode===2&&!ye.ctrlKey&&!ye.metaKey&&!ye.shiftKey&&!ye.altKey).on(this.onTab,this,this.disposables)}onTab(ce){if(ce.target!==this.view.domNode)return;const le=this.list.getFocus();if(le.length===0)return;const Ce=this.view.domElement(le[0]);if(!Ce)return;const ye=Ce.querySelector("[tabIndex]");if(!ye||!(ye instanceof HTMLElement)||ye.tabIndex===-1)return;const ge=window.getComputedStyle(ye);if(ge.visibility==="hidden"||ge.display==="none")return;ce.preventDefault(),ce.stopPropagation(),ye.focus()}dispose(){this.disposables.dispose()}}function fe(ce){return b.f?ce.browserEvent.metaKey:ce.browserEvent.ctrlKey}function ee(ce){return ce.browserEvent.shiftKey}function ie(ce){return ce instanceof MouseEvent&&ce.button===2}const U={isSelectionSingleChangeEvent:fe,isSelectionRangeChangeEvent:ee};class G{constructor(ce){this.list=ce,this.disposables=new S.b,this._onPointer=new d.b,this.onPointer=this._onPointer.event,ce.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||U),this.mouseSupport=typeof ce.options.mouseSupport=="undefined"||!!ce.options.mouseSupport,this.mouseSupport&&(ce.onMouseDown(this.onMouseDown,this,this.disposables),ce.onContextMenu(this.onContextMenu,this,this.disposables),ce.onMouseDblClick(this.onDoubleClick,this,this.disposables),ce.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(N.b.addTarget(ce.getHTMLElement()))),d.c.any(ce.onMouseClick,ce.onMouseMiddleClick,ce.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(ce){ce.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,ce.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||U))}isSelectionSingleChangeEvent(ce){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(ce):!1}isSelectionRangeChangeEvent(ce){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(ce):!1}isSelectionChangeEvent(ce){return this.isSelectionSingleChangeEvent(ce)||this.isSelectionRangeChangeEvent(ce)}onMouseDown(ce){if(Z(ce.browserEvent.target))return;document.activeElement!==ce.browserEvent.target&&this.list.domFocus()}onContextMenu(ce){if(Z(ce.browserEvent.target))return;const le=typeof ce.index=="undefined"?[]:[ce.index];this.list.setFocus(le,ce.browserEvent)}onViewPointer(ce){if(!this.mouseSupport)return;if(H(ce.browserEvent.target)||Z(ce.browserEvent.target))return;const le=ce.index;if(typeof le=="undefined"){this.list.setFocus([],ce.browserEvent),this.list.setSelection([],ce.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionRangeChangeEvent(ce))return this.changeSelection(ce);if(this.isSelectionChangeEvent(ce))return this.changeSelection(ce);this.list.setFocus([le],ce.browserEvent),this.list.setAnchor(le),ie(ce.browserEvent)||this.list.setSelection([le],ce.browserEvent),this._onPointer.fire(ce)}onDoubleClick(ce){if(H(ce.browserEvent.target)||Z(ce.browserEvent.target))return;if(this.isSelectionChangeEvent(ce))return;const le=this.list.getFocus();this.list.setSelection(le,ce.browserEvent)}changeSelection(ce){const le=ce.index;let Ce=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(ce)){if(typeof Ce=="undefined"){const nt=this.list.getFocus()[0];Ce=nt!=null?nt:le,this.list.setAnchor(Ce)}const ye=Math.min(Ce,le),ge=Math.max(Ce,le),Me=Object(I.r)(ye,ge+1),De=this.list.getSelection(),we=Ie(Le(De,[Ce]),Ce);if(we.length===0)return;const Oe=Le(Me,Te(De,we));this.list.setSelection(Oe,ce.browserEvent),this.list.setFocus([le],ce.browserEvent)}else if(this.isSelectionSingleChangeEvent(ce)){const ye=this.list.getSelection(),ge=ye.filter(Me=>Me!==le);this.list.setFocus([le]),this.list.setAnchor(le),ye.length===ge.length?this.list.setSelection([...ge,le],ce.browserEvent):this.list.setSelection(ge,ce.browserEvent)}}dispose(){this.disposables.dispose()}}class J{constructor(ce,le){this.styleElement=ce,this.selectorSuffix=le}style(ce){const le=this.selectorSuffix&&`.${this.selectorSuffix}`,Ce=[];ce.listBackground&&(ce.listBackground.isOpaque()?Ce.push(`.monaco-list${le} .monaco-list-rows { background: ${ce.listBackground}; }`):b.f||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),ce.listFocusBackground&&(Ce.push(`.monaco-list${le}:focus .monaco-list-row.focused { background-color: ${ce.listFocusBackground}; }`),Ce.push(`.monaco-list${le}:focus .monaco-list-row.focused:hover { background-color: ${ce.listFocusBackground}; }`)),ce.listFocusForeground&&Ce.push(`.monaco-list${le}:focus .monaco-list-row.focused { color: ${ce.listFocusForeground}; }`),ce.listActiveSelectionBackground&&(Ce.push(`.monaco-list${le}:focus .monaco-list-row.selected { background-color: ${ce.listActiveSelectionBackground}; }`),Ce.push(`.monaco-list${le}:focus .monaco-list-row.selected:hover { background-color: ${ce.listActiveSelectionBackground}; }`)),ce.listActiveSelectionForeground&&Ce.push(`.monaco-list${le}:focus .monaco-list-row.selected { color: ${ce.listActiveSelectionForeground}; }`),ce.listActiveSelectionIconForeground&&Ce.push(`.monaco-list${le}:focus .monaco-list-row.selected .codicon { color: ${ce.listActiveSelectionIconForeground}; }`),ce.listFocusAndSelectionBackground&&Ce.push(`
|
|
|
.monaco-drag-image,
|
|
|
.monaco-list${le}:focus .monaco-list-row.selected.focused { background-color: ${ce.listFocusAndSelectionBackground}; }
|
|
|
`),ce.listFocusAndSelectionForeground&&Ce.push(`
|
|
|
.monaco-drag-image,
|
|
|
.monaco-list${le}:focus .monaco-list-row.selected.focused { color: ${ce.listFocusAndSelectionForeground}; }
|
|
|
`),ce.listInactiveFocusForeground&&(Ce.push(`.monaco-list${le} .monaco-list-row.focused { color: ${ce.listInactiveFocusForeground}; }`),Ce.push(`.monaco-list${le} .monaco-list-row.focused:hover { color: ${ce.listInactiveFocusForeground}; }`)),ce.listInactiveSelectionIconForeground&&Ce.push(`.monaco-list${le} .monaco-list-row.focused .codicon { color: ${ce.listInactiveSelectionIconForeground}; }`),ce.listInactiveFocusBackground&&(Ce.push(`.monaco-list${le} .monaco-list-row.focused { background-color: ${ce.listInactiveFocusBackground}; }`),Ce.push(`.monaco-list${le} .monaco-list-row.focused:hover { background-color: ${ce.listInactiveFocusBackground}; }`)),ce.listInactiveSelectionBackground&&(Ce.push(`.monaco-list${le} .monaco-list-row.selected { background-color: ${ce.listInactiveSelectionBackground}; }`),Ce.push(`.monaco-list${le} .monaco-list-row.selected:hover { background-color: ${ce.listInactiveSelectionBackground}; }`)),ce.listInactiveSelectionForeground&&Ce.push(`.monaco-list${le} .monaco-list-row.selected { color: ${ce.listInactiveSelectionForeground}; }`),ce.listHoverBackground&&Ce.push(`.monaco-list${le}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${ce.listHoverBackground}; }`),ce.listHoverForeground&&Ce.push(`.monaco-list${le} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${ce.listHoverForeground}; }`),ce.listSelectionOutline&&Ce.push(`.monaco-list${le} .monaco-list-row.selected { outline: 1px dotted ${ce.listSelectionOutline}; outline-offset: -1px; }`),ce.listFocusOutline&&Ce.push(`
|
|
|
.monaco-drag-image,
|
|
|
.monaco-list${le}:focus .monaco-list-row.focused { outline: 1px solid ${ce.listFocusOutline}; outline-offset: -1px; }
|
|
|
`),ce.listInactiveFocusOutline&&Ce.push(`.monaco-list${le} .monaco-list-row.focused { outline: 1px dotted ${ce.listInactiveFocusOutline}; outline-offset: -1px; }`),ce.listHoverOutline&&Ce.push(`.monaco-list${le} .monaco-list-row:hover { outline: 1px dashed ${ce.listHoverOutline}; outline-offset: -1px; }`),ce.listDropBackground&&Ce.push(`
|
|
|
.monaco-list${le}.drop-target,
|
|
|
.monaco-list${le} .monaco-list-rows.drop-target,
|
|
|
.monaco-list${le} .monaco-list-row.drop-target { background-color: ${ce.listDropBackground} !important; color: inherit !important; }
|
|
|
`),ce.listFilterWidgetBackground&&Ce.push(`.monaco-list-type-filter { background-color: ${ce.listFilterWidgetBackground} }`),ce.listFilterWidgetOutline&&Ce.push(`.monaco-list-type-filter { border: 1px solid ${ce.listFilterWidgetOutline}; }`),ce.listFilterWidgetNoMatchesOutline&&Ce.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${ce.listFilterWidgetNoMatchesOutline}; }`),ce.listMatchesShadow&&Ce.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${ce.listMatchesShadow}; }`),ce.tableColumnsBorder&&Ce.push(`
|
|
|
.monaco-table:hover > .monaco-split-view2,
|
|
|
.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {
|
|
|
border-color: ${ce.tableColumnsBorder};
|
|
|
}`),this.styleElement.textContent=Ce.join(`
|
|
|
`)}}const he={listFocusBackground:v.a.fromHex("#7FB0D0"),listActiveSelectionBackground:v.a.fromHex("#0E639C"),listActiveSelectionForeground:v.a.fromHex("#FFFFFF"),listActiveSelectionIconForeground:v.a.fromHex("#FFFFFF"),listFocusAndSelectionBackground:v.a.fromHex("#094771"),listFocusAndSelectionForeground:v.a.fromHex("#FFFFFF"),listInactiveSelectionBackground:v.a.fromHex("#3F3F46"),listInactiveSelectionIconForeground:v.a.fromHex("#FFFFFF"),listHoverBackground:v.a.fromHex("#2A2D2E"),listDropBackground:v.a.fromHex("#383B3D"),treeIndentGuidesStroke:v.a.fromHex("#a9a9a9"),tableColumnsBorder:v.a.fromHex("#cccccc").transparent(.2)},xe={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function Ie(ce,le){const Ce=ce.indexOf(le);if(Ce===-1)return[];const ye=[];let ge=Ce-1;for(;ge>=0&&ce[ge]===le-(Ce-ge);)ye.push(ce[ge--]);for(ye.reverse(),ge=Ce;ge<ce.length&&ce[ge]===le+(ge-Ce);)ye.push(ce[ge++]);return ye}function Le(ce,le){const Ce=[];let ye=0,ge=0;for(;ye<ce.length||ge<le.length;)if(ye>=ce.length)Ce.push(le[ge++]);else if(ge>=le.length)Ce.push(ce[ye++]);else if(ce[ye]===le[ge]){Ce.push(ce[ye]),ye++,ge++;continue}else ce[ye]<le[ge]?Ce.push(ce[ye++]):Ce.push(le[ge++]);return Ce}function Te(ce,le){const Ce=[];let ye=0,ge=0;for(;ye<ce.length||ge<le.length;)if(ye>=ce.length)Ce.push(le[ge++]);else if(ge>=le.length)Ce.push(ce[ye++]);else if(ce[ye]===le[ge]){ye++,ge++;continue}else ce[ye]<le[ge]?Ce.push(ce[ye++]):ge++;return Ce}const ze=(ce,le)=>ce-le;class ue{constructor(ce,le){this._templateId=ce,this.renderers=le}get templateId(){return this._templateId}renderTemplate(ce){return this.renderers.map(le=>le.renderTemplate(ce))}renderElement(ce,le,Ce,ye){let ge=0;for(const Me of this.renderers)Me.renderElement(ce,le,Ce[ge++],ye)}disposeElement(ce,le,Ce,ye){let ge=0;for(const Me of this.renderers)Me.disposeElement&&Me.disposeElement(ce,le,Ce[ge],ye),ge+=1}disposeTemplate(ce){let le=0;for(const Ce of this.renderers)Ce.disposeTemplate(ce[le++])}}class je{constructor(ce){this.accessibilityProvider=ce,this.templateId="a18n"}renderTemplate(ce){return ce}renderElement(ce,le,Ce){const ye=this.accessibilityProvider.getAriaLabel(ce);ye?Ce.setAttribute("aria-label",ye):Ce.removeAttribute("aria-label");const ge=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(ce);typeof ge=="number"?Ce.setAttribute("aria-level",`${ge}`):Ce.removeAttribute("aria-level")}disposeTemplate(ce){}}class Pe{constructor(ce,le){this.list=ce,this.dnd=le}getDragElements(ce){const le=this.list.getSelectedElements(),Ce=le.indexOf(ce)>-1?le:[ce];return Ce}getDragURI(ce){return this.dnd.getDragURI(ce)}getDragLabel(ce,le){return this.dnd.getDragLabel?this.dnd.getDragLabel(ce,le):void 0}onDragStart(ce,le){this.dnd.onDragStart&&this.dnd.onDragStart(ce,le)}onDragOver(ce,le,Ce,ye){return this.dnd.onDragOver(ce,le,Ce,ye)}onDragLeave(ce,le,Ce,ye){var ge,Me;(Me=(ge=this.dnd).onDragLeave)===null||Me===void 0||Me.call(ge,ce,le,Ce,ye)}onDragEnd(ce){this.dnd.onDragEnd&&this.dnd.onDragEnd(ce)}drop(ce,le,Ce,ye){this.dnd.drop(ce,le,Ce,ye)}}class ve{constructor(ce,le,Ce,ye,ge=xe){var Me;this.user=ce,this._options=ge,this.focus=new k("focused"),this.anchor=new k("anchor"),this.eventBufferer=new d.d,this._ariaLabel="",this.disposables=new S.b,this._onDidDispose=new d.b,this.onDidDispose=this._onDidDispose.event;const De=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(Me=this._options.accessibilityProvider)===null||Me===void 0?void 0:Me.getWidgetRole():"list";this.selection=new Y(De!=="listbox"),Object(_.f)(ge,he,!1);const we=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=ge.accessibilityProvider,this.accessibilityProvider&&(we.push(new je(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),ye=ye.map(nt=>new ue(nt.templateId,[...we,nt]));const Oe=Object.assign(Object.assign({},ge),{dnd:ge.dnd&&new Pe(this,ge.dnd)});if(this.view=new E.b(le,Ce,ye,Oe),this.view.domNode.setAttribute("role",De),ge.styleController)this.styleController=ge.styleController(this.view.domId);else{const nt=Object(f.w)(this.view.domNode);this.styleController=new J(nt,this.view.domId)}if(this.spliceable=new F([new Q(this.focus,this.view,ge.identityProvider),new Q(this.selection,this.view,ge.identityProvider),new Q(this.anchor,this.view,ge.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 Ee(this,this.view)),(typeof ge.keyboardSupport!="boolean"||ge.keyboardSupport)&&(this.keyboardController=new oe(this,this.view,ge),this.disposables.add(this.keyboardController)),ge.keyboardNavigationLabelProvider){const nt=ge.keyboardNavigationDelegate||te;this.typeLabelController=new ne(this,this.view,ge.keyboardNavigationLabelProvider,nt),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(ge),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()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return d.c.map(this.eventBufferer.wrapEvent(this.focus.onChange),ce=>this.toListEvent(ce))}get onDidChangeSelection(){return d.c.map(this.eventBufferer.wrapEvent(this.selection.onChange),ce=>this.toListEvent(ce))}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 ce=!1;const le=d.c.chain(this.disposables.add(new B.a(this.view.domNode,"keydown")).event).map(ge=>new x.a(ge)).filter(ge=>ce=ge.keyCode===58||ge.shiftKey&&ge.keyCode===68).map(B.b).filter(()=>!1).event,Ce=d.c.chain(this.disposables.add(new B.a(this.view.domNode,"keyup")).event).forEach(()=>ce=!1).map(ge=>new x.a(ge)).filter(ge=>ge.keyCode===58||ge.shiftKey&&ge.keyCode===68).map(B.b).map(({browserEvent:ge})=>{const Me=this.getFocus(),De=Me.length?Me[0]:void 0,we=typeof De!="undefined"?this.view.element(De):void 0,Oe=typeof De!="undefined"?this.view.domElement(De):this.view.domNode;return{index:De,element:we,anchor:Oe,browserEvent:ge}}).event,ye=d.c.chain(this.view.onContextMenu).filter(ge=>!ce).map(({element:ge,index:Me,browserEvent:De})=>({element:ge,index:Me,anchor:{x:De.pageX+1,y:De.pageY},browserEvent:De})).event;return d.c.any(le,Ce,ye)}get onKeyDown(){return this.disposables.add(new B.a(this.view.domNode,"keydown")).event}get onDidFocus(){return d.c.signal(this.disposables.add(new B.a(this.view.domNode,"focus",!0)).event)}createMouseController(ce){return new G(this)}updateOptions(ce={}){var le;this._options=Object.assign(Object.assign({},this._options),ce),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(ce),(le=this.keyboardController)===null||le===void 0||le.updateOptions(ce),this.view.updateOptions(ce)}get options(){return this._options}splice(ce,le,Ce=[]){if(ce<0||ce>this.view.length)throw new p(this.user,`Invalid start index: ${ce}`);if(le<0)throw new p(this.user,`Invalid delete count: ${le}`);if(le===0&&Ce.length===0)return;this.eventBufferer.bufferEvents(()=>this.spliceable.splice(ce,le,Ce))}rerender(){this.view.rerender()}element(ce){return this.view.element(ce)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(ce){this.view.setScrollTop(ce)}get ariaLabel(){return this._ariaLabel}set ariaLabel(ce){this._ariaLabel=ce,this.view.domNode.setAttribute("aria-label",ce)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(ce,le){this.view.layout(ce,le)}setSelection(ce,le){for(const Ce of ce)if(Ce<0||Ce>=this.length)throw new p(this.user,`Invalid index ${Ce}`);this.selection.set(ce,le)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(ce=>this.view.element(ce))}setAnchor(ce){if(typeof ce=="undefined"){this.anchor.set([]);return}if(ce<0||ce>=this.length)throw new p(this.user,`Invalid index ${ce}`);this.anchor.set([ce])}getAnchor(){return Object(I.j)(this.anchor.get(),void 0)}getAnchorElement(){const ce=this.getAnchor();return typeof ce=="undefined"?void 0:this.element(ce)}setFocus(ce,le){for(const Ce of ce)if(Ce<0||Ce>=this.length)throw new p(this.user,`Invalid index ${Ce}`);this.focus.set(ce,le)}focusNext(ce=1,le=!1,Ce,ye){if(this.length===0)return;const ge=this.focus.get(),Me=this.findNextIndex(ge.length>0?ge[0]+ce:0,le,ye);Me>-1&&this.setFocus([Me],Ce)}focusPrevious(ce=1,le=!1,Ce,ye){if(this.length===0)return;const ge=this.focus.get(),Me=this.findPreviousIndex(ge.length>0?ge[0]-ce:0,le,ye);Me>-1&&this.setFocus([Me],Ce)}focusNextPage(ce,le){return C(this,void 0,void 0,function*(){let Ce=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);Ce=Ce===0?0:Ce-1;const ye=this.view.element(Ce),ge=this.getFocusedElements()[0];if(ge!==ye){const Me=this.findPreviousIndex(Ce,!1,le);Me>-1&&ge!==this.view.element(Me)?this.setFocus([Me],ce):this.setFocus([Ce],ce)}else{const Me=this.view.getScrollTop();this.view.setScrollTop(Me+this.view.renderHeight-this.view.elementHeight(Ce)),this.view.getScrollTop()!==Me&&(this.setFocus([]),yield Object(L.n)(0),yield this.focusNextPage(ce,le))}})}focusPreviousPage(ce,le){return C(this,void 0,void 0,function*(){let Ce;const ye=this.view.getScrollTop();ye===0?Ce=this.view.indexAt(ye):Ce=this.view.indexAfter(ye-1);const ge=this.view.element(Ce),Me=this.getFocusedElements()[0];if(Me!==ge){const De=this.findNextIndex(Ce,!1,le);De>-1&&Me!==this.view.element(De)?this.setFocus([De],ce):this.setFocus([Ce],ce)}else{const De=ye;this.view.setScrollTop(ye-this.view.renderHeight),this.view.getScrollTop()!==De&&(this.setFocus([]),yield Object(L.n)(0),yield this.focusPreviousPage(ce,le))}})}focusLast(ce,le){if(this.length===0)return;const Ce=this.findPreviousIndex(this.length-1,!1,le);Ce>-1&&this.setFocus([Ce],ce)}focusFirst(ce,le){this.focusNth(0,ce,le)}focusNth(ce,le,Ce){if(this.length===0)return;const ye=this.findNextIndex(ce,!1,Ce);ye>-1&&this.setFocus([ye],le)}findNextIndex(ce,le=!1,Ce){for(let ye=0;ye<this.length;ye++){if(ce>=this.length&&!le)return-1;if(ce=ce%this.length,!Ce||Ce(this.element(ce)))return ce;ce++}return-1}findPreviousIndex(ce,le=!1,Ce){for(let ye=0;ye<this.length;ye++){if(ce<0&&!le)return-1;if(ce=(this.length+ce%this.length)%this.length,!Ce||Ce(this.element(ce)))return ce;ce--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(ce=>this.view.element(ce))}reveal(ce,le){if(ce<0||ce>=this.length)throw new p(this.user,`Invalid index ${ce}`);const Ce=this.view.getScrollTop(),ye=this.view.elementTop(ce),ge=this.view.elementHeight(ce);if(Object(h.j)(le)){const Me=ge-this.view.renderHeight;this.view.setScrollTop(Me*Object(r.b)(le,0,1)+ye)}else{const Me=ye+ge,De=Ce+this.view.renderHeight;ye<Ce&&Me>=De||(ye<Ce||Me>=De&&ge>=this.view.renderHeight?this.view.setScrollTop(ye):Me>=De&&this.view.setScrollTop(Me-this.view.renderHeight))}}getRelativeTop(ce){if(ce<0||ce>=this.length)throw new p(this.user,`Invalid index ${ce}`);const le=this.view.getScrollTop(),Ce=this.view.elementTop(ce),ye=this.view.elementHeight(ce);if(Ce<le||Ce+ye>le+this.view.renderHeight)return null;const ge=ye-this.view.renderHeight;return Math.abs((le-Ce)/ge)}getHTMLElement(){return this.view.domNode}style(ce){this.styleController.style(ce)}toListEvent({indexes:ce,browserEvent:le}){return{indexes:ce,elements:ce.map(Ce=>this.view.element(Ce)),browserEvent:le}}_onFocusChange(){const ce=this.focus.get();this.view.domNode.classList.toggle("element-focused",ce.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var ce;const le=this.focus.get();if(le.length>0){let Ce;((ce=this.accessibilityProvider)===null||ce===void 0?void 0:ce.getActiveDescendantId)&&(Ce=this.accessibilityProvider.getActiveDescendantId(this.view.element(le[0]))),this.view.domNode.setAttribute("aria-activedescendant",Ce||this.view.getElementDomId(le[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const ce=this.selection.get();this.view.domNode.classList.toggle("selection-none",ce.length===0),this.view.domNode.classList.toggle("selection-single",ce.length===1),this.view.domNode.classList.toggle("selection-multiple",ce.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}y([m.a],ve.prototype,"onDidChangeFocus",null),y([m.a],ve.prototype,"onDidChangeSelection",null),y([m.a],ve.prototype,"onContextMenu",null),y([m.a],ve.prototype,"onKeyDown",null),y([m.a],ve.prototype,"onDidFocus",null)},d6R0:function(mt,M,t){"use strict";t.r(M),t.d(M,"CodeLensContribution",function(){return je});var f=t("EffR"),B=t("X+cX"),x=t("/cxE"),N=t("7afs"),A=t("pmY6"),F=t("vATl"),I=t("sswD"),L=t("/UlZ"),v=t("wQH0"),m=t("twdY"),d=t("al33"),D=t("JQT/"),S=t("746U"),r=t("bY76"),_=t("G2kB"),b=t("nnTU"),h=function(Pe,ve,ce,le){function Ce(ye){return ye instanceof ce?ye:new ce(function(ge){ge(ye)})}return new(ce||(ce=Promise))(function(ye,ge){function Me(Oe){try{we(le.next(Oe))}catch(nt){ge(nt)}}function De(Oe){try{we(le.throw(Oe))}catch(nt){ge(nt)}}function we(Oe){Oe.done?ye(Oe.value):Ce(Oe.value).then(Me,De)}we((le=le.apply(Pe,ve||[])).next())})};class c{constructor(){this.lenses=[],this._disposables=new A.b}dispose(){this._disposables.dispose()}add(Pe,ve){this._disposables.add(Pe);for(const ce of Pe.lenses)this.lenses.push({symbol:ce,provider:ve})}}function p(Pe,ve){return h(this,void 0,void 0,function*(){const ce=m.b.ordered(Pe),le=new Map,Ce=new c,ye=ce.map((ge,Me)=>h(this,void 0,void 0,function*(){le.set(ge,Me);try{const De=yield Promise.resolve(ge.provideCodeLenses(Pe,ve));De&&Ce.add(De,ge)}catch(De){Object(x.g)(De)}}));return yield Promise.all(ye),Ce.lenses=Ce.lenses.sort((ge,Me)=>ge.symbol.range.startLineNumber<Me.symbol.range.startLineNumber?-1:ge.symbol.range.startLineNumber>Me.symbol.range.startLineNumber?1:le.get(ge.provider)<le.get(Me.provider)?-1:le.get(ge.provider)>le.get(Me.provider)?1:ge.symbol.range.startColumn<Me.symbol.range.startColumn?-1:ge.symbol.range.startColumn>Me.symbol.range.startColumn?1:0),Ce})}b.a.registerCommand("_executeCodeLensProvider",function(Pe,...ve){let[ce,le]=ve;Object(S.c)(r.a.isUri(ce)),Object(S.c)(typeof le=="number"||!le);const Ce=Pe.get(_.a).getModel(ce);if(!Ce)throw Object(x.c)();const ye=[],ge=new A.b;return p(Ce,D.a.None).then(Me=>{ge.add(Me);let De=[];for(const we of Me.lenses)le==null||Boolean(we.symbol.command)?ye.push(we.symbol):le-- >0&&we.provider.resolveCodeLens&&De.push(Promise.resolve(we.provider.resolveCodeLens(Ce,we.symbol,D.a.None)).then(Oe=>ye.push(Oe||we.symbol)));return Promise.all(De)}).then(()=>ye).finally(()=>{setTimeout(()=>ge.dispose(),100)})});var E=t("C/vA"),y=t("QDVR"),C=t("aokT"),O=t("9fML"),k=t("Cg/j"),Y=t("A+jI"),Q=function(Pe,ve,ce,le){var Ce=arguments.length,ye=Ce<3?ve:le===null?le=Object.getOwnPropertyDescriptor(ve,ce):le,ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ye=Reflect.decorate(Pe,ve,ce,le);else for(var Me=Pe.length-1;Me>=0;Me--)(ge=Pe[Me])&&(ye=(Ce<3?ge(ye):Ce>3?ge(ve,ce,ye):ge(ve,ce))||ye);return Ce>3&&ye&&Object.defineProperty(ve,ce,ye),ye},H=function(Pe,ve){return function(ce,le){ve(ce,le,Pe)}};const Z=Object(k.c)("ICodeLensCache");class oe{constructor(Pe,ve){this.lineCount=Pe,this.data=ve}}let $=class{constructor(ve){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new y.a(20,.75);const ce="codelens/cache";Object(B.m)(()=>ve.remove(ce,1));const le="codelens/cache2",Ce=ve.get(le,1,"{}");this._deserialize(Ce),Object(E.a)(ve.onWillSaveState)(ye=>{ye.reason===Y.c.SHUTDOWN&&ve.store(le,this._serialize(),1,1)})}put(ve,ce){const le=ce.lenses.map(ge=>{var Me;return{range:ge.symbol.range,command:ge.symbol.command&&{id:"",title:(Me=ge.symbol.command)===null||Me===void 0?void 0:Me.title}}}),Ce=new c;Ce.add({lenses:le,dispose:()=>{}},this._fakeProvider);const ye=new oe(ve.getLineCount(),Ce);this._cache.set(ve.uri.toString(),ye)}get(ve){const ce=this._cache.get(ve.uri.toString());return ce&&ce.lineCount===ve.getLineCount()?ce.data:void 0}delete(ve){this._cache.delete(ve.uri.toString())}_serialize(){const ve=Object.create(null);for(const[ce,le]of this._cache){const Ce=new Set;for(const ye of le.data.lenses)Ce.add(ye.symbol.range.startLineNumber);ve[ce]={lineCount:le.lineCount,lines:[...Ce.values()]}}return JSON.stringify(ve)}_deserialize(ve){try{const ce=JSON.parse(ve);for(const le in ce){const Ce=ce[le],ye=[];for(const Me of Ce.lines)ye.push({range:new C.a(Me,1,Me,11)});const ge=new c;ge.add({lenses:ye,dispose(){}},this._fakeProvider),this._cache.set(le,new oe(Ce.lineCount,ge))}}catch(ce){}}};$=Q([H(0,Y.a)],$),Object(O.b)(Z,$);var te=t("fdyd"),ne=t("RMfO"),Ee=t("tX9W"),fe=t("kYye"),ee=t("MD5Z"),ie=t("t9D7");class U{constructor(Pe,ve,ce){this.afterLineNumber=Pe,this.heightInPx=ve,this._onHeight=ce,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(Pe){this._lastHeight===void 0?this._lastHeight=Pe:this._lastHeight!==Pe&&(this._lastHeight=Pe,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class G{constructor(Pe,ve,ce){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=Pe,this._id=`codelens.widget-${G._idPool++}`,this.updatePosition(ce),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${ve}`}withCommands(Pe,ve){this._commands.clear();let ce=[],le=!1;for(let Ce=0;Ce<Pe.length;Ce++){const ye=Pe[Ce];if(!ye)continue;if(le=!0,ye.command){const ge=Object(te.a)(ye.command.title.trim());ye.command.id?(ce.push(f.a("a",{id:String(Ce),title:ye.command.tooltip},...ge)),this._commands.set(String(Ce),ye.command)):ce.push(f.a("span",{title:ye.command.tooltip},...ge)),Ce+1<Pe.length&&ce.push(f.a("span",void 0,"\xA0|\xA0"))}}le?(f.R(this._domNode,...ce),this._isEmpty&&ve&&this._domNode.classList.add("fadein"),this._isEmpty=!1):f.R(this._domNode,f.a("span",void 0,"no commands"))}getCommand(Pe){return Pe.parentElement===this._domNode?this._commands.get(Pe.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(Pe){const ve=this._editor.getModel().getLineFirstNonWhitespaceColumn(Pe);this._widgetPosition={position:{lineNumber:Pe,column:ve},preference:[1]}}getPosition(){return this._widgetPosition||null}}G._idPool=0;class J{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(Pe,ve){this._addDecorations.push(Pe),this._addDecorationsCallbacks.push(ve)}removeDecoration(Pe){this._removeDecorations.push(Pe)}commit(Pe){let ve=Pe.deltaDecorations(this._removeDecorations,this._addDecorations);for(let ce=0,le=ve.length;ce<le;ce++)this._addDecorationsCallbacks[ce](ve[ce])}}class he{constructor(Pe,ve,ce,le,Ce,ye,ge){this._isDisposed=!1,this._editor=ve,this._className=ce,this._data=Pe,this._decorationIds=[];let Me,De=[];this._data.forEach((we,Oe)=>{we.symbol.command&&De.push(we.symbol),le.addDecoration({range:we.symbol.range,options:Ee.b.EMPTY},nt=>this._decorationIds[Oe]=nt),Me?Me=C.a.plusRange(Me,we.symbol.range):Me=C.a.lift(we.symbol.range)}),this._viewZone=new U(Me.startLineNumber-1,ye,ge),this._viewZoneId=Ce.addZone(this._viewZone),De.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(De,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new G(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(Pe,ve){this._decorationIds.forEach(Pe.removeDecoration,Pe),this._decorationIds=[],ve&&ve.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((Pe,ve)=>{const ce=this._editor.getModel().getDecorationRange(Pe),le=this._data[ve].symbol;return!!(ce&&C.a.isEmpty(le.range)===ce.isEmpty())})}updateCodeLensSymbols(Pe,ve){this._decorationIds.forEach(ve.removeDecoration,ve),this._decorationIds=[],this._data=Pe,this._data.forEach((ce,le)=>{ve.addDecoration({range:ce.symbol.range,options:Ee.b.EMPTY},Ce=>this._decorationIds[le]=Ce)})}updateHeight(Pe,ve){this._viewZone.heightInPx=Pe,ve.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(Pe){if(!this._viewZone.isVisible())return null;for(let ve=0;ve<this._decorationIds.length;ve++){const ce=Pe.getDecorationRange(this._decorationIds[ve]);ce&&(this._data[ve].symbol.range=ce)}return this._data}updateCommands(Pe){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(Pe,!0);for(let ve=0;ve<this._data.length;ve++){const ce=Pe[ve];if(ce){const{symbol:le}=this._data[ve];le.command=ce.command||le.command}}}getCommand(Pe){var ve;return(ve=this._contentWidget)===null||ve===void 0?void 0:ve.getCommand(Pe)}getLineNumber(){const Pe=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return Pe?Pe.startLineNumber:-1}update(Pe){if(this.isValid()){const ve=this._editor.getModel().getDecorationRange(this._decorationIds[0]);ve&&(this._viewZone.afterLineNumber=ve.startLineNumber-1,Pe.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(ve.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}getItems(){return this._data}}Object(ie.f)((Pe,ve)=>{const ce=Pe.getColor(fe.x);ce&&(ve.addRule(`.monaco-editor .codelens-decoration { color: ${ce}; }`),ve.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${ce}; }`));const le=Pe.getColor(ee.q);le&&(ve.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${le} !important; }`),ve.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${le} !important; }`))});var xe=t("3/fG"),Ie=t("sM1p"),Le=t("Zr1c"),Te=function(Pe,ve,ce,le){var Ce=arguments.length,ye=Ce<3?ve:le===null?le=Object.getOwnPropertyDescriptor(ve,ce):le,ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ye=Reflect.decorate(Pe,ve,ce,le);else for(var Me=Pe.length-1;Me>=0;Me--)(ge=Pe[Me])&&(ye=(Ce<3?ge(ye):Ce>3?ge(ve,ce,ye):ge(ve,ce))||ye);return Ce>3&&ye&&Object.defineProperty(ve,ce,ye),ye},ze=function(Pe,ve){return function(ce,le){ve(ce,le,Pe)}},ue=function(Pe,ve,ce,le){function Ce(ye){return ye instanceof ce?ye:new ce(function(ge){ge(ye)})}return new(ce||(ce=Promise))(function(ye,ge){function Me(Oe){try{we(le.next(Oe))}catch(nt){ge(nt)}}function De(Oe){try{we(le.throw(Oe))}catch(nt){ge(nt)}}function we(Oe){Oe.done?ye(Oe.value):Ce(Oe.value).then(Me,De)}we((le=le.apply(Pe,ve||[])).next())})};let je=class{constructor(ve,ce,le,Ce){this._editor=ve,this._commandService=ce,this._notificationService=le,this._codeLensCache=Ce,this._disposables=new A.b,this._localToDispose=new A.b,this._lenses=[],this._getCodeLensModelDelays=new d.b(m.b,250,2500),this._oldCodeLensModels=new A.b,this._resolveCodeLensesDelays=new d.b(m.b,250,2500),this._resolveCodeLensesScheduler=new B.e(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDelays.min),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(ye=>{(ye.hasChanged(43)||ye.hasChanged(16)||ye.hasChanged(15))&&this._updateLensStyle(),ye.hasChanged(14)&&this._onModelChange()})),this._disposables.add(m.b.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+Object(N.c)(this._editor.getId()).toString(16),this._styleElement=f.w(f.O(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var ve;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(ve=this._currentCodeLensModel)===null||ve===void 0||ve.dispose(),this._styleElement.remove()}_getLayoutInfo(){let ve=this._editor.getOption(16),ce;return!ve||ve<5?(ve=this._editor.getOption(45)*.9|0,ce=this._editor.getOption(58)):ce=ve*Math.max(1.3,this._editor.getOption(58)/this._editor.getOption(45))|0,{codeLensHeight:ce,fontSize:ve}}_updateLensStyle(){const{codeLensHeight:ve,fontSize:ce}=this._getLayoutInfo(),le=this._editor.getOption(15),Ce=this._editor.getOption(43),ye=`--codelens-font-family${this._styleClassName}`,ge=`--codelens-font-features${this._styleClassName}`;let Me=`
|
|
|
.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${ve}px; font-size: ${ce}px; padding-right: ${Math.round(ce*.5)}px; font-feature-settings: var(${ge}) }
|
|
|
.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${ve}px; font-size: ${ce}px; }
|
|
|
`;le&&(Me+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${ye}), ${L.c.fontFamily}}`),this._styleElement.textContent=Me,this._editor.getContainerDomNode().style.setProperty(ye,le!=null?le:"inherit"),this._editor.getContainerDomNode().style.setProperty(ge,Ce.fontFeatureSettings),this._editor.changeViewZones(De=>{for(let we of this._lenses)we.updateHeight(ve,De)})}_localDispose(){var ve,ce,le;(ve=this._getCodeLensModelPromise)===null||ve===void 0||ve.cancel(),this._getCodeLensModelPromise=void 0,(ce=this._resolveCodeLensesPromise)===null||ce===void 0||ce.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(le=this._currentCodeLensModel)===null||le===void 0||le.dispose()}_onModelChange(){this._localDispose();const ve=this._editor.getModel();if(!ve)return;if(!this._editor.getOption(14))return;const ce=this._codeLensCache.get(ve);if(ce&&this._renderCodeLensSymbols(ce),!m.b.has(ve)){ce&&this._localToDispose.add(Object(B.i)(()=>{const Ce=this._codeLensCache.get(ve);ce===Ce&&(this._codeLensCache.delete(ve),this._onModelChange())},30*1e3));return}for(const Ce of m.b.all(ve))if(typeof Ce.onDidChange=="function"){let ye=Ce.onDidChange(()=>le.schedule());this._localToDispose.add(ye)}const le=new B.e(()=>{var Ce;const ye=Date.now();(Ce=this._getCodeLensModelPromise)===null||Ce===void 0||Ce.cancel(),this._getCodeLensModelPromise=Object(B.h)(ge=>p(ve,ge)),this._getCodeLensModelPromise.then(ge=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=ge,this._codeLensCache.put(ve,ge);const Me=this._getCodeLensModelDelays.update(ve,Date.now()-ye);le.delay=Me,this._renderCodeLensSymbols(ge),this._resolveCodeLensesInViewportSoon()},x.f)},this._getCodeLensModelDelays.get(ve));this._localToDispose.add(le),this._localToDispose.add(Object(A.i)(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(Ce=>{this._editor.changeViewZones(ye=>{let ge=[],Me=-1;this._lenses.forEach(we=>{!we.isValid()||Me===we.getLineNumber()?ge.push(we):(we.update(ye),Me=we.getLineNumber())});let De=new J;ge.forEach(we=>{we.dispose(De,ye),this._lenses.splice(this._lenses.indexOf(we),1)}),De.commit(Ce)})}),le.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{le.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(Ce=>{Ce.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Object(A.i)(()=>{if(this._editor.getModel()){const Ce=F.c.capture(this._editor);this._editor.changeDecorations(ye=>{this._editor.changeViewZones(ge=>{this._disposeAllLenses(ye,ge)})}),Ce.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(Ce=>{if(Ce.target.type!==9)return;let ye=Ce.target.element;if((ye==null?void 0:ye.tagName)==="SPAN"&&(ye=ye.parentElement),(ye==null?void 0:ye.tagName)==="A")for(const ge of this._lenses){let Me=ge.getCommand(ye);if(Me){this._commandService.executeCommand(Me.id,...Me.arguments||[]).catch(De=>this._notificationService.error(De));break}}})),le.schedule()}_disposeAllLenses(ve,ce){const le=new J;for(const Ce of this._lenses)Ce.dispose(le,ce);ve&&le.commit(ve),this._lenses.length=0}_renderCodeLensSymbols(ve){if(!this._editor.hasModel())return;let ce=this._editor.getModel().getLineCount(),le=[],Ce;for(let Me of ve.lenses){let De=Me.symbol.range.startLineNumber;if(De<1||De>ce)continue;Ce&&Ce[Ce.length-1].symbol.range.startLineNumber===De?Ce.push(Me):(Ce=[Me],le.push(Ce))}const ye=F.c.capture(this._editor),ge=this._getLayoutInfo();this._editor.changeDecorations(Me=>{this._editor.changeViewZones(De=>{const we=new J;let Oe=0,nt=0;for(;nt<le.length&&Oe<this._lenses.length;){let Ke=le[nt][0].symbol.range.startLineNumber,et=this._lenses[Oe].getLineNumber();et<Ke?(this._lenses[Oe].dispose(we,De),this._lenses.splice(Oe,1)):et===Ke?(this._lenses[Oe].updateCodeLensSymbols(le[nt],we),nt++,Oe++):(this._lenses.splice(Oe,0,new he(le[nt],this._editor,this._styleClassName,we,De,ge.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),Oe++,nt++)}for(;Oe<this._lenses.length;)this._lenses[Oe].dispose(we,De),this._lenses.splice(Oe,1);for(;nt<le.length;)this._lenses.push(new he(le[nt],this._editor,this._styleClassName,we,De,ge.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),nt++;we.commit(Me)})}),ye.restore(this._editor)}_resolveCodeLensesInViewportSoon(){const ve=this._editor.getModel();ve&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var ve;(ve=this._resolveCodeLensesPromise)===null||ve===void 0||ve.cancel(),this._resolveCodeLensesPromise=void 0;const ce=this._editor.getModel();if(!ce)return;const le=[],Ce=[];if(this._lenses.forEach(Me=>{const De=Me.computeIfNecessary(ce);De&&(le.push(De),Ce.push(Me))}),le.length===0)return;const ye=Date.now(),ge=Object(B.h)(Me=>{const De=le.map((we,Oe)=>{const nt=new Array(we.length),Ke=we.map((et,bt)=>!et.symbol.command&&typeof et.provider.resolveCodeLens=="function"?Promise.resolve(et.provider.resolveCodeLens(ce,et.symbol,Me)).then(Tt=>{nt[bt]=Tt},x.g):(nt[bt]=et.symbol,Promise.resolve(void 0)));return Promise.all(Ke).then(()=>{!Me.isCancellationRequested&&!Ce[Oe].isDisposed()&&Ce[Oe].updateCommands(nt)})});return Promise.all(De)});this._resolveCodeLensesPromise=ge,this._resolveCodeLensesPromise.then(()=>{const Me=this._resolveCodeLensesDelays.update(ce,Date.now()-ye);this._resolveCodeLensesScheduler.delay=Me,this._currentCodeLensModel&&this._codeLensCache.put(ce,this._currentCodeLensModel),this._oldCodeLensModels.clear(),ge===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},Me=>{Object(x.f)(Me),ge===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getLenses(){return this._lenses}};je.ID="css.editor.codeLens",je=Te([ze(1,b.b),ze(2,Ie.a),ze(3,Z)],je),Object(I.l)(je.ID,je),Object(I.j)(class extends I.b{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:v.a.hasCodeLensProvider,label:Object(xe.a)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(ve,ce){return ue(this,void 0,void 0,function*(){if(!ce.hasModel())return;const le=ve.get(Le.a),Ce=ve.get(b.b),ye=ve.get(Ie.a),ge=ce.getSelection().positionLineNumber,Me=ce.getContribution(je.ID),De=[];for(let Oe of Me.getLenses())if(Oe.getLineNumber()===ge)for(let nt of Oe.getItems()){const{command:Ke}=nt.symbol;Ke&&De.push({label:Ke.title,command:Ke})}if(De.length===0)return;const we=yield le.pick(De,{canPickMany:!1});if(!we)return;try{yield Ce.executeCommand(we.command.id,...we.command.arguments||[])}catch(Oe){ye.error(Oe)}})}})},dBaI:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return A});var f=t("N0LK");class B{constructor(F,I,L,v){this.startColumn=F,this.endColumn=I,this.className=L,this.type=v,this._lineDecorationBrand=void 0}static _equals(F,I){return F.startColumn===I.startColumn&&F.endColumn===I.endColumn&&F.className===I.className&&F.type===I.type}static equalsArr(F,I){const L=F.length,v=I.length;if(L!==v)return!1;for(let m=0;m<L;m++)if(!B._equals(F[m],I[m]))return!1;return!0}static extractWrapped(F,I,L){if(F.length===0)return F;const v=I+1,m=L+1,d=L-I,D=[];let S=0;for(const r of F){if(r.endColumn<=v||r.startColumn>=m)continue;D[S++]=new B(Math.max(1,r.startColumn-v+1),Math.min(d+1,r.endColumn-v+1),r.className,r.type)}return D}static filter(F,I,L,v){if(F.length===0)return[];let m=[],d=0;for(let D=0,S=F.length;D<S;D++){const r=F[D],_=r.range;if(_.endLineNumber<I||_.startLineNumber>I)continue;if(_.isEmpty()&&(r.type===0||r.type===3))continue;const b=_.startLineNumber===I?_.startColumn:L,h=_.endLineNumber===I?_.endColumn:v;m[d++]=new B(b,h,r.inlineClassName,r.type)}return m}static _typeCompare(F,I){const L=[2,0,1,3];return L[F]-L[I]}static compare(F,I){if(F.startColumn!==I.startColumn)return F.startColumn-I.startColumn;if(F.endColumn!==I.endColumn)return F.endColumn-I.endColumn;const L=B._typeCompare(F.type,I.type);return L!==0?L:F.className!==I.className?F.className<I.className?-1:1:0}}class x{constructor(F,I,L,v){this.startOffset=F,this.endOffset=I,this.className=L,this.metadata=v}}class N{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(F){let I=0;for(let L=0,v=F.length;L<v;L++)I|=F[L];return I}consumeLowerThan(F,I,L){for(;this.count>0&&this.stopOffsets[0]<F;){let v=0;for(;v+1<this.count&&this.stopOffsets[v]===this.stopOffsets[v+1];)v++;L.push(new x(I,this.stopOffsets[v],this.classNames.join(" "),N._metadata(this.metadata))),I=this.stopOffsets[v]+1,this.stopOffsets.splice(0,v+1),this.classNames.splice(0,v+1),this.metadata.splice(0,v+1),this.count-=v+1}return this.count>0&&I<F&&(L.push(new x(I,F-1,this.classNames.join(" "),N._metadata(this.metadata))),I=F),I}insert(F,I,L){if(this.count===0||this.stopOffsets[this.count-1]<=F)this.stopOffsets.push(F),this.classNames.push(I),this.metadata.push(L);else for(let v=0;v<this.count;v++)if(this.stopOffsets[v]>=F){this.stopOffsets.splice(v,0,F),this.classNames.splice(v,0,I),this.metadata.splice(v,0,L);break}this.count++;return}}class A{static normalize(F,I){if(I.length===0)return[];let L=[];const v=new N;let m=0;for(let d=0,D=I.length;d<D;d++){const S=I[d];let r=S.startColumn,_=S.endColumn;const b=S.className,h=S.type===1?2:S.type===2?4:0;if(r>1){const E=F.charCodeAt(r-2);f.E(E)&&r--}if(_>1){const E=F.charCodeAt(_-2);f.E(E)&&_--}const c=r-1,p=_-2;m=v.consumeLowerThan(c,m,L),v.count===0&&(m=c),v.insert(p,b,h)}return v.consumeLowerThan(1073741824,m,L),L}}},dFcq:function(mt,M,t){},"dH+W":function(mt,M,t){"use strict";t.r(M),t.d(M,"DuplicateSelectionAction",function(){return oe}),t.d(M,"AbstractSortLinesAction",function(){return Ee}),t.d(M,"SortLinesAscendingAction",function(){return fe}),t.d(M,"SortLinesDescendingAction",function(){return ee}),t.d(M,"DeleteDuplicateLinesAction",function(){return ie}),t.d(M,"TrimTrailingWhitespaceAction",function(){return U}),t.d(M,"DeleteLinesAction",function(){return G}),t.d(M,"IndentLinesAction",function(){return J}),t.d(M,"InsertLineBeforeAction",function(){return xe}),t.d(M,"InsertLineAfterAction",function(){return Ie}),t.d(M,"AbstractDeleteAllToBoundaryAction",function(){return Le}),t.d(M,"DeleteAllLeftAction",function(){return Te}),t.d(M,"DeleteAllRightAction",function(){return ze}),t.d(M,"JoinLinesAction",function(){return ue}),t.d(M,"TransposeAction",function(){return je}),t.d(M,"AbstractCaseAction",function(){return Pe}),t.d(M,"UpperCaseAction",function(){return ve}),t.d(M,"LowerCaseAction",function(){return ce}),t.d(M,"TitleCaseAction",function(){return Ce}),t.d(M,"SnakeCaseAction",function(){return ye});var f=t("/kV6"),B=t("1YUG"),x=t("sswD"),N=t("LCkn"),A=t("N0LK"),F=t("0/Sa"),I=t("aokT");class L{constructor(ge,Me){this._selection=ge,this._cursors=Me,this._selectionId=null}getEditOperations(ge,Me){let De=v(ge,this._cursors);for(let we=0,Oe=De.length;we<Oe;we++){let nt=De[we];Me.addEditOperation(nt.range,nt.text)}this._selectionId=Me.trackSelection(this._selection)}computeCursorState(ge,Me){return Me.getTrackedSelection(this._selectionId)}}function v(ge,Me){Me.sort((Ke,et)=>Ke.lineNumber===et.lineNumber?Ke.column-et.column:Ke.lineNumber-et.lineNumber);for(let Ke=Me.length-2;Ke>=0;Ke--)Me[Ke].lineNumber===Me[Ke+1].lineNumber&&Me.splice(Ke,1);let De=[],we=0,Oe=0,nt=Me.length;for(let Ke=1,et=ge.getLineCount();Ke<=et;Ke++){let bt=ge.getLineContent(Ke),Tt=bt.length+1,$t=0;if(Oe<nt&&Me[Oe].lineNumber===Ke&&($t=Me[Oe].column,Oe++,$t===Tt))continue;if(bt.length===0)continue;let Xe=A.I(bt),it=0;if(Xe===-1)it=1;else if(Xe!==bt.length-1)it=Xe+2;else continue;it=Math.max($t,it),De[we++]=F.a.delete(new I.a(Ke,it,Ke,Tt))}return De}var m=t("GR/f"),d=t("cGHE"),D=t("gCVg"),S=t("wQH0");class r{constructor(ge,Me,De){this._selection=ge,this._isCopyingDown=Me,this._noop=De||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(ge,Me){let De=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,De.startLineNumber<De.endLineNumber&&De.endColumn===1&&(this._endLineNumberDelta=1,De=De.setEndPosition(De.endLineNumber-1,ge.getLineMaxColumn(De.endLineNumber-1)));let we=[];for(let nt=De.startLineNumber;nt<=De.endLineNumber;nt++)we.push(ge.getLineContent(nt));const Oe=we.join(`
|
|
|
`);Oe===""&&(this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++)),this._noop?Me.addEditOperation(new I.a(De.endLineNumber,ge.getLineMaxColumn(De.endLineNumber),De.endLineNumber+1,1),De.endLineNumber===ge.getLineCount()?"":`
|
|
|
`):this._isCopyingDown?Me.addEditOperation(new I.a(De.startLineNumber,1,De.startLineNumber,1),Oe+`
|
|
|
`):Me.addEditOperation(new I.a(De.endLineNumber,ge.getLineMaxColumn(De.endLineNumber),De.endLineNumber,ge.getLineMaxColumn(De.endLineNumber)),`
|
|
|
`+Oe),this._selectionId=Me.trackSelection(De),this._selectionDirection=this._selection.getDirection()}computeCursorState(ge,Me){let De=Me.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let we=De.startLineNumber,Oe=De.startColumn,nt=De.endLineNumber,Ke=De.endColumn;this._startLineNumberDelta!==0&&(we=we+this._startLineNumberDelta,Oe=1),this._endLineNumberDelta!==0&&(nt=nt+this._endLineNumberDelta,Ke=1),De=D.a.createWithDirection(we,Oe,nt,Ke,this._selectionDirection)}return De}}var _=t("zN7H"),b=t("KDc4"),h=t("cMvZ");function c(ge,Me){let De=0;for(let we=0;we<ge.length;we++)ge.charAt(we)===" "?De+=Me:De++;return De}function p(ge,Me,De){ge=ge<0?0:ge;let we="";if(!De){let Oe=Math.floor(ge/Me);ge=ge%Me;for(let nt=0;nt<Oe;nt++)we+=" "}for(let Oe=0;Oe<ge;Oe++)we+=" ";return we}class E{constructor(ge,Me,De){this._selection=ge,this._isMovingDown=Me,this._autoIndent=De,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(ge,Me){let De=ge.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===De){this._selectionId=Me.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=Me.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let we=this._selection;we.startLineNumber<we.endLineNumber&&we.endColumn===1&&(this._moveEndPositionDown=!0,we=we.setEndPosition(we.endLineNumber-1,ge.getLineMaxColumn(we.endLineNumber-1)));const{tabSize:Oe,indentSize:nt,insertSpaces:Ke}=ge.getOptions();let et=this.buildIndentConverter(Oe,nt,Ke),bt={getLineTokens:Tt=>ge.getLineTokens(Tt),getLanguageId:()=>ge.getLanguageId(),getLanguageIdAtPosition:(Tt,$t)=>ge.getLanguageIdAtPosition(Tt,$t),getLineContent:null};if(we.startLineNumber===we.endLineNumber&&ge.getLineMaxColumn(we.startLineNumber)===1){let Tt=we.startLineNumber,$t=this._isMovingDown?Tt+1:Tt-1;ge.getLineMaxColumn($t)===1?Me.addEditOperation(new I.a(1,1,1,1),null):(Me.addEditOperation(new I.a(Tt,1,Tt,1),ge.getLineContent($t)),Me.addEditOperation(new I.a($t,1,$t,ge.getLineMaxColumn($t)),null)),we=new D.a($t,1,$t,1)}else{let Tt,$t;if(this._isMovingDown){Tt=we.endLineNumber+1,$t=ge.getLineContent(Tt),Me.addEditOperation(new I.a(Tt-1,ge.getLineMaxColumn(Tt-1),Tt,ge.getLineMaxColumn(Tt)),null);let Xe=$t;if(this.shouldAutoIndent(ge,we)){let it=this.matchEnterRule(ge,et,Oe,Tt,we.startLineNumber-1);if(it!==null){let We=A.x(ge.getLineContent(Tt)),tt=it+c(We,Oe),Et=p(tt,Oe,Ke);Xe=Et+this.trimLeft($t)}else{bt.getLineContent=tt=>tt===we.startLineNumber?ge.getLineContent(Tt):ge.getLineContent(tt);let We=h.b.getGoodIndentForLine(this._autoIndent,bt,ge.getLanguageIdAtPosition(Tt,1),we.startLineNumber,et);if(We!==null){let tt=A.x(ge.getLineContent(Tt)),Et=c(We,Oe),It=c(tt,Oe);if(Et!==It){let Rt=p(Et,Oe,Ke);Xe=Rt+this.trimLeft($t)}}}Me.addEditOperation(new I.a(we.startLineNumber,1,we.startLineNumber,1),Xe+`
|
|
|
`);let re=this.matchEnterRuleMovingDown(ge,et,Oe,we.startLineNumber,Tt,Xe);if(re!==null)re!==0&&this.getIndentEditsOfMovingBlock(ge,Me,we,Oe,Ke,re);else{bt.getLineContent=tt=>tt===we.startLineNumber?Xe:tt>=we.startLineNumber+1&&tt<=we.endLineNumber+1?ge.getLineContent(tt-1):ge.getLineContent(tt);let We=h.b.getGoodIndentForLine(this._autoIndent,bt,ge.getLanguageIdAtPosition(Tt,1),we.startLineNumber+1,et);if(We!==null){const tt=A.x(ge.getLineContent(we.startLineNumber)),Et=c(We,Oe),It=c(tt,Oe);if(Et!==It){const Rt=Et-It;this.getIndentEditsOfMovingBlock(ge,Me,we,Oe,Ke,Rt)}}}}else Me.addEditOperation(new I.a(we.startLineNumber,1,we.startLineNumber,1),Xe+`
|
|
|
`)}else if(Tt=we.startLineNumber-1,$t=ge.getLineContent(Tt),Me.addEditOperation(new I.a(Tt,1,Tt+1,1),null),Me.addEditOperation(new I.a(we.endLineNumber,ge.getLineMaxColumn(we.endLineNumber),we.endLineNumber,ge.getLineMaxColumn(we.endLineNumber)),`
|
|
|
`+$t),this.shouldAutoIndent(ge,we)){bt.getLineContent=it=>it===Tt?ge.getLineContent(we.startLineNumber):ge.getLineContent(it);let Xe=this.matchEnterRule(ge,et,Oe,we.startLineNumber,we.startLineNumber-2);if(Xe!==null)Xe!==0&&this.getIndentEditsOfMovingBlock(ge,Me,we,Oe,Ke,Xe);else{let it=h.b.getGoodIndentForLine(this._autoIndent,bt,ge.getLanguageIdAtPosition(we.startLineNumber,1),Tt,et);if(it!==null){let re=A.x(ge.getLineContent(we.startLineNumber)),We=c(it,Oe),tt=c(re,Oe);if(We!==tt){let Et=We-tt;this.getIndentEditsOfMovingBlock(ge,Me,we,Oe,Ke,Et)}}}}}this._selectionId=Me.trackSelection(we)}buildIndentConverter(ge,Me,De){return{shiftIndent:we=>_.a.shiftIndent(we,we.length+1,ge,Me,De),unshiftIndent:we=>_.a.unshiftIndent(we,we.length+1,ge,Me,De)}}parseEnterResult(ge,Me,De,we,Oe){if(Oe){let nt=Oe.indentation;Oe.indentAction===b.b.None||Oe.indentAction===b.b.Indent?nt=Oe.indentation+Oe.appendText:Oe.indentAction===b.b.IndentOutdent?nt=Oe.indentation:Oe.indentAction===b.b.Outdent&&(nt=Me.unshiftIndent(Oe.indentation)+Oe.appendText);let Ke=ge.getLineContent(we);if(this.trimLeft(Ke).indexOf(this.trimLeft(nt))>=0){let et=A.x(ge.getLineContent(we)),bt=A.x(nt),Tt=h.b.getIndentMetadata(ge,we);Tt!==null&&Tt&2&&(bt=Me.unshiftIndent(bt));let $t=c(bt,De),Xe=c(et,De);return $t-Xe}}return null}matchEnterRuleMovingDown(ge,Me,De,we,Oe,nt){if(A.I(nt)>=0){let Ke=ge.getLineMaxColumn(Oe),et=h.b.getEnterAction(this._autoIndent,ge,new I.a(Oe,Ke,Oe,Ke));return this.parseEnterResult(ge,Me,De,we,et)}else{let Ke=we-1;for(;Ke>=1;){let Tt=ge.getLineContent(Ke),$t=A.I(Tt);if($t>=0)break;Ke--}if(Ke<1||we>ge.getLineCount())return null;let et=ge.getLineMaxColumn(Ke),bt=h.b.getEnterAction(this._autoIndent,ge,new I.a(Ke,et,Ke,et));return this.parseEnterResult(ge,Me,De,we,bt)}}matchEnterRule(ge,Me,De,we,Oe,nt){let Ke=Oe;for(;Ke>=1;){let Tt;Ke===Oe&&nt!==void 0?Tt=nt:Tt=ge.getLineContent(Ke);let $t=A.I(Tt);if($t>=0)break;Ke--}if(Ke<1||we>ge.getLineCount())return null;let et=ge.getLineMaxColumn(Ke),bt=h.b.getEnterAction(this._autoIndent,ge,new I.a(Ke,et,Ke,et));return this.parseEnterResult(ge,Me,De,we,bt)}trimLeft(ge){return ge.replace(/^\s+/,"")}shouldAutoIndent(ge,Me){if(this._autoIndent<4)return!1;if(!ge.isCheapToTokenize(Me.startLineNumber))return!1;let De=ge.getLanguageIdAtPosition(Me.startLineNumber,1),we=ge.getLanguageIdAtPosition(Me.endLineNumber,1);return De!==we?!1:!(h.b.getIndentRulesSupport(De)===null)}getIndentEditsOfMovingBlock(ge,Me,De,we,Oe,nt){for(let Ke=De.startLineNumber;Ke<=De.endLineNumber;Ke++){let et=ge.getLineContent(Ke),bt=A.x(et),Tt=c(bt,we),$t=Tt+nt,Xe=p($t,we,Oe);Xe!==bt&&(Me.addEditOperation(new I.a(Ke,1,Ke,bt.length+1),Xe),Ke===De.endLineNumber&&De.endColumn<=bt.length+1&&Xe===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(ge,Me){let De=Me.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(De=De.setEndPosition(De.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&De.startLineNumber<De.endLineNumber&&(De=De.setEndPosition(De.endLineNumber,2)),De}}class y{constructor(ge,Me){this.selection=ge,this.descending=Me,this.selectionId=null}static getCollator(){return y._COLLATOR||(y._COLLATOR=new Intl.Collator),y._COLLATOR}getEditOperations(ge,Me){let De=O(ge,this.selection,this.descending);De&&Me.addEditOperation(De.range,De.text),this.selectionId=Me.trackSelection(this.selection)}computeCursorState(ge,Me){return Me.getTrackedSelection(this.selectionId)}static canRun(ge,Me,De){if(ge===null)return!1;let we=C(ge,Me,De);if(!we)return!1;for(let Oe=0,nt=we.before.length;Oe<nt;Oe++)if(we.before[Oe]!==we.after[Oe])return!0;return!1}}y._COLLATOR=null;function C(ge,Me,De){let we=Me.startLineNumber,Oe=Me.endLineNumber;if(Me.endColumn===1&&Oe--,we>=Oe)return null;let nt=[];for(let et=we;et<=Oe;et++)nt.push(ge.getLineContent(et));let Ke=nt.slice(0);return Ke.sort(y.getCollator().compare),De===!0&&(Ke=Ke.reverse()),{startLineNumber:we,endLineNumber:Oe,before:nt,after:Ke}}function O(ge,Me,De){let we=C(ge,Me,De);return we?F.a.replace(new I.a(we.startLineNumber,1,we.endLineNumber,ge.getLineMaxColumn(we.endLineNumber)),we.after.join(`
|
|
|
`)):null}var k=t("3/fG"),Y=t("fjLI");class Q extends x.b{constructor(ge,Me){super(Me);this.down=ge}run(ge,Me){if(!Me.hasModel())return;const De=Me.getSelections().map((nt,Ke)=>({selection:nt,index:Ke,ignore:!1}));De.sort((nt,Ke)=>I.a.compareRangesUsingStarts(nt.selection,Ke.selection));let we=De[0];for(let nt=1;nt<De.length;nt++){const Ke=De[nt];we.selection.endLineNumber===Ke.selection.startLineNumber&&(we.index<Ke.index?Ke.ignore=!0:(we.ignore=!0,we=Ke))}const Oe=[];for(const nt of De)Oe.push(new r(nt.selection,this.down,nt.ignore));Me.pushUndoStop(),Me.executeCommands(this.id,Oe),Me.pushUndoStop()}}class H extends Q{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:k.a("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:S.a.writable,kbOpts:{kbExpr:S.a.editorTextFocus,primary:512|1024|16,linux:{primary:2048|512|1024|16},weight:100},menuOpts:{menuId:Y.b.MenubarSelectionMenu,group:"2_line",title:k.a({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}class Z extends Q{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:k.a("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:S.a.writable,kbOpts:{kbExpr:S.a.editorTextFocus,primary:512|1024|18,linux:{primary:2048|512|1024|18},weight:100},menuOpts:{menuId:Y.b.MenubarSelectionMenu,group:"2_line",title:k.a({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}class oe extends x.b{constructor(){super({id:"editor.action.duplicateSelection",label:k.a("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:S.a.writable,menuOpts:{menuId:Y.b.MenubarSelectionMenu,group:"2_line",title:k.a({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(ge,Me,De){if(!Me.hasModel())return;const we=[],Oe=Me.getSelections(),nt=Me.getModel();for(const Ke of Oe)if(Ke.isEmpty())we.push(new r(Ke,!0));else{const et=new D.a(Ke.endLineNumber,Ke.endColumn,Ke.endLineNumber,Ke.endColumn);we.push(new N.c(et,nt.getValueInRange(Ke)))}Me.pushUndoStop(),Me.executeCommands(this.id,we),Me.pushUndoStop()}}class $ extends x.b{constructor(ge,Me){super(Me);this.down=ge}run(ge,Me){let De=[],we=Me.getSelections()||[];const Oe=Me.getOption(9);for(const nt of we)De.push(new E(nt,this.down,Oe));Me.pushUndoStop(),Me.executeCommands(this.id,De),Me.pushUndoStop()}}class te extends ${constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:k.a("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:S.a.writable,kbOpts:{kbExpr:S.a.editorTextFocus,primary:512|16,linux:{primary:512|16},weight:100},menuOpts:{menuId:Y.b.MenubarSelectionMenu,group:"2_line",title:k.a({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}class ne extends ${constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:k.a("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:S.a.writable,kbOpts:{kbExpr:S.a.editorTextFocus,primary:512|18,linux:{primary:512|18},weight:100},menuOpts:{menuId:Y.b.MenubarSelectionMenu,group:"2_line",title:k.a({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}class Ee extends x.b{constructor(ge,Me){super(Me);this.descending=ge}run(ge,Me){const De=Me.getSelections()||[];for(const Oe of De)if(!y.canRun(Me.getModel(),Oe,this.descending))return;let we=[];for(let Oe=0,nt=De.length;Oe<nt;Oe++)we[Oe]=new y(De[Oe],this.descending);Me.pushUndoStop(),Me.executeCommands(this.id,we),Me.pushUndoStop()}}class fe extends Ee{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:k.a("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:S.a.writable})}}class ee extends Ee{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:k.a("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:S.a.writable})}}class ie extends x.b{constructor(){super({id:"editor.action.removeDuplicateLines",label:k.a("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:S.a.writable})}run(ge,Me){if(!Me.hasModel())return;let De=Me.getModel();if(De.getLineCount()===1&&De.getLineMaxColumn(1)===1)return;let we=[],Oe=[],nt=0;for(let Ke of Me.getSelections()){let et=new Set,bt=[];for(let it=Ke.startLineNumber;it<=Ke.endLineNumber;it++){let re=De.getLineContent(it);if(et.has(re))continue;bt.push(re),et.add(re)}let Tt=new D.a(Ke.startLineNumber,1,Ke.endLineNumber,De.getLineMaxColumn(Ke.endLineNumber)),$t=Ke.startLineNumber-nt,Xe=new D.a($t,1,$t+bt.length-1,bt[bt.length-1].length);we.push(F.a.replace(Tt,bt.join(`
|
|
|
`))),Oe.push(Xe),nt+=Ke.endLineNumber-Ke.startLineNumber+1-bt.length}Me.pushUndoStop(),Me.executeEdits(this.id,we,Oe),Me.pushUndoStop()}}class U extends x.b{constructor(){super({id:U.ID,label:k.a("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:S.a.writable,kbOpts:{kbExpr:S.a.editorTextFocus,primary:Object(f.c)(2048|41,2048|54),weight:100}})}run(ge,Me,De){let we=[];De.reason==="auto-save"&&(we=(Me.getSelections()||[]).map(Ke=>new d.a(Ke.positionLineNumber,Ke.positionColumn)));let Oe=Me.getSelection();if(Oe===null)return;let nt=new L(Oe,we);Me.pushUndoStop(),Me.executeCommands(this.id,[nt]),Me.pushUndoStop()}}U.ID="editor.action.trimTrailingWhitespace";class G extends x.b{constructor(){super({id:"editor.action.deleteLines",label:k.a("lines.delete","Delete Line"),alias:"Delete Line",precondition:S.a.writable,kbOpts:{kbExpr:S.a.textInputFocus,primary:2048|1024|41,weight:100}})}run(ge,Me){if(!Me.hasModel())return;let De=this._getLinesToRemove(Me),we=Me.getModel();if(we.getLineCount()===1&&we.getLineMaxColumn(1)===1)return;let Oe=0,nt=[],Ke=[];for(let et=0,bt=De.length;et<bt;et++){const Tt=De[et];let $t=Tt.startLineNumber,Xe=Tt.endLineNumber,it=1,re=we.getLineMaxColumn(Xe);Xe<we.getLineCount()?(Xe+=1,re=1):$t>1&&($t-=1,it=we.getLineMaxColumn($t)),nt.push(F.a.replace(new D.a($t,it,Xe,re),"")),Ke.push(new D.a($t-Oe,Tt.positionColumn,$t-Oe,Tt.positionColumn)),Oe+=Tt.endLineNumber-Tt.startLineNumber+1}Me.pushUndoStop(),Me.executeEdits(this.id,nt,Ke),Me.pushUndoStop()}_getLinesToRemove(ge){let Me=ge.getSelections().map(Oe=>{let nt=Oe.endLineNumber;return Oe.startLineNumber<Oe.endLineNumber&&Oe.endColumn===1&&(nt-=1),{startLineNumber:Oe.startLineNumber,selectionStartColumn:Oe.selectionStartColumn,endLineNumber:nt,positionColumn:Oe.positionColumn}});Me.sort((Oe,nt)=>Oe.startLineNumber===nt.startLineNumber?Oe.endLineNumber-nt.endLineNumber:Oe.startLineNumber-nt.startLineNumber);let De=[],we=Me[0];for(let Oe=1;Oe<Me.length;Oe++)we.endLineNumber+1>=Me[Oe].startLineNumber?we.endLineNumber=Me[Oe].endLineNumber:(De.push(we),we=Me[Oe]);return De.push(we),De}}class J extends x.b{constructor(){super({id:"editor.action.indentLines",label:k.a("lines.indent","Indent Line"),alias:"Indent Line",precondition:S.a.writable,kbOpts:{kbExpr:S.a.editorTextFocus,primary:2048|89,weight:100}})}run(ge,Me){const De=Me._getViewModel();if(!De)return;Me.pushUndoStop(),Me.executeCommands(this.id,m.a.indent(De.cursorConfig,Me.getModel(),Me.getSelections())),Me.pushUndoStop()}}class he extends x.b{constructor(){super({id:"editor.action.outdentLines",label:k.a("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:S.a.writable,kbOpts:{kbExpr:S.a.editorTextFocus,primary:2048|87,weight:100}})}run(ge,Me){B.CoreEditingCommands.Outdent.runEditorCommand(ge,Me,null)}}class xe extends x.b{constructor(){super({id:"editor.action.insertLineBefore",label:k.a("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:S.a.writable,kbOpts:{kbExpr:S.a.editorTextFocus,primary:2048|1024|3,weight:100}})}run(ge,Me){const De=Me._getViewModel();if(!De)return;Me.pushUndoStop(),Me.executeCommands(this.id,m.a.lineInsertBefore(De.cursorConfig,Me.getModel(),Me.getSelections()))}}class Ie extends x.b{constructor(){super({id:"editor.action.insertLineAfter",label:k.a("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:S.a.writable,kbOpts:{kbExpr:S.a.editorTextFocus,primary:2048|3,weight:100}})}run(ge,Me){const De=Me._getViewModel();if(!De)return;Me.pushUndoStop(),Me.executeCommands(this.id,m.a.lineInsertAfter(De.cursorConfig,Me.getModel(),Me.getSelections()))}}class Le extends x.b{run(ge,Me){if(!Me.hasModel())return;const De=Me.getSelection();let we=this._getRangesToDelete(Me),Oe=[];for(let et=0,bt=we.length-1;et<bt;et++){let Tt=we[et],$t=we[et+1];I.a.intersectRanges(Tt,$t)===null?Oe.push(Tt):we[et+1]=I.a.plusRange(Tt,$t)}Oe.push(we[we.length-1]);let nt=this._getEndCursorState(De,Oe),Ke=Oe.map(et=>F.a.replace(et,""));Me.pushUndoStop(),Me.executeEdits(this.id,Ke,nt),Me.pushUndoStop()}}class Te extends Le{constructor(){super({id:"deleteAllLeft",label:k.a("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:S.a.writable,kbOpts:{kbExpr:S.a.textInputFocus,primary:0,mac:{primary:2048|1},weight:100}})}_getEndCursorState(ge,Me){let De=null,we=[],Oe=0;return Me.forEach(nt=>{let Ke;if(nt.endColumn===1&&Oe>0){let et=nt.startLineNumber-Oe;Ke=new D.a(et,nt.startColumn,et,nt.startColumn)}else Ke=new D.a(nt.startLineNumber,nt.startColumn,nt.startLineNumber,nt.startColumn);Oe+=nt.endLineNumber-nt.startLineNumber,nt.intersectRanges(ge)?De=Ke:we.push(Ke)}),De&&we.unshift(De),we}_getRangesToDelete(ge){let Me=ge.getSelections();if(Me===null)return[];let De=Me,we=ge.getModel();return we===null?[]:(De.sort(I.a.compareRangesUsingStarts),De=De.map(Oe=>{if(Oe.isEmpty())if(Oe.startColumn===1){let nt=Math.max(1,Oe.startLineNumber-1),Ke=Oe.startLineNumber===1?1:we.getLineContent(nt).length+1;return new I.a(nt,Ke,Oe.startLineNumber,1)}else return new I.a(Oe.startLineNumber,1,Oe.startLineNumber,Oe.startColumn);else return new I.a(Oe.startLineNumber,1,Oe.endLineNumber,Oe.endColumn)}),De)}}class ze extends Le{constructor(){super({id:"deleteAllRight",label:k.a("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:S.a.writable,kbOpts:{kbExpr:S.a.textInputFocus,primary:0,mac:{primary:256|41,secondary:[2048|20]},weight:100}})}_getEndCursorState(ge,Me){let De=null,we=[];for(let Oe=0,nt=Me.length,Ke=0;Oe<nt;Oe++){let et=Me[Oe],bt=new D.a(et.startLineNumber-Ke,et.startColumn,et.startLineNumber-Ke,et.startColumn);et.intersectRanges(ge)?De=bt:we.push(bt)}return De&&we.unshift(De),we}_getRangesToDelete(ge){let Me=ge.getModel();if(Me===null)return[];let De=ge.getSelections();if(De===null)return[];let we=De.map(Oe=>{if(Oe.isEmpty()){const nt=Me.getLineMaxColumn(Oe.startLineNumber);return Oe.startColumn===nt?new I.a(Oe.startLineNumber,Oe.startColumn,Oe.startLineNumber+1,1):new I.a(Oe.startLineNumber,Oe.startColumn,Oe.startLineNumber,nt)}return Oe});return we.sort(I.a.compareRangesUsingStarts),we}}class ue extends x.b{constructor(){super({id:"editor.action.joinLines",label:k.a("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:S.a.writable,kbOpts:{kbExpr:S.a.editorTextFocus,primary:0,mac:{primary:256|40},weight:100}})}run(ge,Me){let De=Me.getSelections();if(De===null)return;let we=Me.getSelection();if(we===null)return;De.sort(I.a.compareRangesUsingStarts);let Oe=[],nt=De.reduce((Xe,it)=>Xe.isEmpty()?Xe.endLineNumber===it.startLineNumber?(we.equalsSelection(Xe)&&(we=it),it):it.startLineNumber>Xe.endLineNumber+1?(Oe.push(Xe),it):new D.a(Xe.startLineNumber,Xe.startColumn,it.endLineNumber,it.endColumn):it.startLineNumber>Xe.endLineNumber?(Oe.push(Xe),it):new D.a(Xe.startLineNumber,Xe.startColumn,it.endLineNumber,it.endColumn));Oe.push(nt);let Ke=Me.getModel();if(Ke===null)return;let et=[],bt=[],Tt=we,$t=0;for(let Xe=0,it=Oe.length;Xe<it;Xe++){let re=Oe[Xe],We=re.startLineNumber,tt=1,Et=0,It,Rt,vo=Ke.getLineContent(re.endLineNumber).length-re.endColumn;if(re.isEmpty()||re.startLineNumber===re.endLineNumber){let Do=re.getStartPosition();Do.lineNumber<Ke.getLineCount()?(It=We+1,Rt=Ke.getLineMaxColumn(It)):(It=Do.lineNumber,Rt=Ke.getLineMaxColumn(Do.lineNumber))}else It=re.endLineNumber,Rt=Ke.getLineMaxColumn(It);let Mo=Ke.getLineContent(We);for(let Do=We+1;Do<=It;Do++){let Lo=Ke.getLineContent(Do),To=Ke.getLineFirstNonWhitespaceColumn(Do);if(To>=1){let Ht=!0;Mo===""&&(Ht=!1),Ht&&(Mo.charAt(Mo.length-1)===" "||Mo.charAt(Mo.length-1)===" ")&&(Ht=!1,Mo=Mo.replace(/[\s\uFEFF\xA0]+$/g," "));let Mt=Lo.substr(To-1);Mo+=(Ht?" ":"")+Mt,Ht?Et=Mt.length+1:Et=Mt.length}else Et=0}let xo=new I.a(We,tt,It,Rt);if(!xo.isEmpty()){let Do;re.isEmpty()?(et.push(F.a.replace(xo,Mo)),Do=new D.a(xo.startLineNumber-$t,Mo.length-Et+1,We-$t,Mo.length-Et+1)):re.startLineNumber===re.endLineNumber?(et.push(F.a.replace(xo,Mo)),Do=new D.a(re.startLineNumber-$t,re.startColumn,re.endLineNumber-$t,re.endColumn)):(et.push(F.a.replace(xo,Mo)),Do=new D.a(re.startLineNumber-$t,re.startColumn,re.startLineNumber-$t,Mo.length-vo)),I.a.intersectRanges(xo,we)!==null?Tt=Do:bt.push(Do)}$t+=xo.endLineNumber-xo.startLineNumber}bt.unshift(Tt),Me.pushUndoStop(),Me.executeEdits(this.id,et,bt),Me.pushUndoStop()}}class je extends x.b{constructor(){super({id:"editor.action.transpose",label:k.a("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:S.a.writable})}run(ge,Me){let De=Me.getSelections();if(De===null)return;let we=Me.getModel();if(we===null)return;let Oe=[];for(let nt=0,Ke=De.length;nt<Ke;nt++){let et=De[nt];if(!et.isEmpty())continue;let bt=et.getStartPosition(),Tt=we.getLineMaxColumn(bt.lineNumber);if(bt.column>=Tt){if(bt.lineNumber===we.getLineCount())continue;let $t=new I.a(bt.lineNumber,Math.max(1,bt.column-1),bt.lineNumber+1,1),Xe=we.getValueInRange($t).split("").reverse().join("");Oe.push(new N.a(new D.a(bt.lineNumber,Math.max(1,bt.column-1),bt.lineNumber+1,1),Xe))}else{let $t=new I.a(bt.lineNumber,Math.max(1,bt.column-1),bt.lineNumber,bt.column+1),Xe=we.getValueInRange($t).split("").reverse().join("");Oe.push(new N.b($t,Xe,new D.a(bt.lineNumber,bt.column+1,bt.lineNumber,bt.column+1)))}}Me.pushUndoStop(),Me.executeCommands(this.id,Oe),Me.pushUndoStop()}}class Pe extends x.b{run(ge,Me){const De=Me.getSelections();if(De===null)return;const we=Me.getModel();if(we===null)return;const Oe=Me.getOption(115),nt=[];for(const Ke of De)if(Ke.isEmpty()){const et=Ke.getStartPosition(),bt=Me.getConfiguredWordAtPosition(et);if(!bt)continue;const Tt=new I.a(et.lineNumber,bt.startColumn,et.lineNumber,bt.endColumn),$t=we.getValueInRange(Tt);nt.push(F.a.replace(Tt,this._modifyText($t,Oe)))}else{const et=we.getValueInRange(Ke);nt.push(F.a.replace(Ke,this._modifyText(et,Oe)))}Me.pushUndoStop(),Me.executeEdits(this.id,nt),Me.pushUndoStop()}}class ve extends Pe{constructor(){super({id:"editor.action.transformToUppercase",label:k.a("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:S.a.writable})}_modifyText(ge,Me){return ge.toLocaleUpperCase()}}class ce extends Pe{constructor(){super({id:"editor.action.transformToLowercase",label:k.a("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:S.a.writable})}_modifyText(ge,Me){return ge.toLocaleLowerCase()}}class le{constructor(ge,Me){this._pattern=ge,this._flags=Me,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(ge){}}return this._actual}isSupported(){return this.get()!==null}}class Ce extends Pe{constructor(){super({id:"editor.action.transformToTitlecase",label:k.a("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:S.a.writable})}_modifyText(ge,Me){const De=Ce.titleBoundary.get();return De?ge.toLocaleLowerCase().replace(De,we=>we.toLocaleUpperCase()):ge}}Ce.titleBoundary=new le("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class ye extends Pe{constructor(){super({id:"editor.action.transformToSnakecase",label:k.a("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:S.a.writable})}_modifyText(ge,Me){const De=ye.caseBoundary.get(),we=ye.singleLetters.get();return!De||!we?ge:ge.replace(De,"$1_$2").replace(we,"$1_$2$3").toLocaleLowerCase()}}ye.caseBoundary=new le("(\\p{Ll})(\\p{Lu})","gmu"),ye.singleLetters=new le("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu"),Object(x.j)(H),Object(x.j)(Z),Object(x.j)(oe),Object(x.j)(te),Object(x.j)(ne),Object(x.j)(fe),Object(x.j)(ee),Object(x.j)(ie),Object(x.j)(U),Object(x.j)(G),Object(x.j)(J),Object(x.j)(he),Object(x.j)(xe),Object(x.j)(Ie),Object(x.j)(Te),Object(x.j)(ze),Object(x.j)(ue),Object(x.j)(je),Object(x.j)(ve),Object(x.j)(ce),ye.caseBoundary.isSupported()&&ye.singleLetters.isSupported()&&Object(x.j)(ye),Ce.titleBoundary.isSupported()&&Object(x.j)(Ce)},dgXF:function(mt,M,t){"use strict";t.r(M),t.d(M,"FoldingController",function(){return Tt}),t.d(M,"foldBackgroundBackground",function(){return dt}),t.d(M,"editorFoldForeground",function(){return Ut});var f=t("X+cX"),B=t("/cxE"),x=t("/kV6"),N=t("pmY6"),A=t("N0LK"),F=t("746U"),I=t("CjOT"),L=t("vATl"),v=t("sswD"),m=t("wQH0"),d=t("twdY"),D=t("cMvZ"),S=t("MI8n");const r=65535,_=16777215,b=4278190080;class h{constructor(Ye,qe,ct){if(Ye.length!==qe.length||Ye.length>r)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=Ye,this._endIndexes=qe,this._collapseStates=new Uint32Array(Math.ceil(Ye.length/32)),this._types=ct,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let Ye=[],qe=(ct,_t)=>{let Pt=Ye[Ye.length-1];return this.getStartLineNumber(Pt)<=ct&&this.getEndLineNumber(Pt)>=_t};for(let ct=0,_t=this._startIndexes.length;ct<_t;ct++){let Pt=this._startIndexes[ct],Wt=this._endIndexes[ct];if(Pt>_||Wt>_)throw new Error("startLineNumber or endLineNumber must not exceed "+_);for(;Ye.length>0&&!qe(Pt,Wt);)Ye.pop();let Vt=Ye.length>0?Ye[Ye.length-1]:-1;Ye.push(ct),this._startIndexes[ct]=Pt+((Vt&255)<<24),this._endIndexes[ct]=Wt+((Vt&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(Ye){return this._startIndexes[Ye]&_}getEndLineNumber(Ye){return this._endIndexes[Ye]&_}getType(Ye){return this._types?this._types[Ye]:void 0}hasTypes(){return!!this._types}isCollapsed(Ye){let qe=Ye/32|0,ct=Ye%32;return(this._collapseStates[qe]&1<<ct)!==0}setCollapsed(Ye,qe){let ct=Ye/32|0,_t=Ye%32,Pt=this._collapseStates[ct];qe?this._collapseStates[ct]=Pt|1<<_t:this._collapseStates[ct]=Pt&~(1<<_t)}setCollapsedAllOfType(Ye,qe){let ct=!1;if(this._types)for(let _t=0;_t<this._types.length;_t++)this._types[_t]===Ye&&(this.setCollapsed(_t,qe),ct=!0);return ct}toRegion(Ye){return new c(this,Ye)}getParentIndex(Ye){this.ensureParentIndices();let qe=((this._startIndexes[Ye]&b)>>>24)+((this._endIndexes[Ye]&b)>>>16);return qe===r?-1:qe}contains(Ye,qe){return this.getStartLineNumber(Ye)<=qe&&this.getEndLineNumber(Ye)>=qe}findIndex(Ye){let qe=0,ct=this._startIndexes.length;if(ct===0)return-1;for(;qe<ct;){let _t=Math.floor((qe+ct)/2);Ye<this.getStartLineNumber(_t)?ct=_t:qe=_t+1}return qe-1}findRange(Ye){let qe=this.findIndex(Ye);if(qe>=0){let ct=this.getEndLineNumber(qe);if(ct>=Ye)return qe;for(qe=this.getParentIndex(qe);qe!==-1;){if(this.contains(qe,Ye))return qe;qe=this.getParentIndex(qe)}}return-1}toString(){let Ye=[];for(let qe=0;qe<this.length;qe++)Ye[qe]=`[${this.isCollapsed(qe)?"+":"-"}] ${this.getStartLineNumber(qe)}/${this.getEndLineNumber(qe)}`;return Ye.join(", ")}}class c{constructor(Ye,qe){this.ranges=Ye,this.index=qe}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(Ye){return Ye.startLineNumber<=this.startLineNumber&&Ye.endLineNumber>=this.endLineNumber}containsLine(Ye){return this.startLineNumber<=Ye&&Ye<=this.endLineNumber}}class p{constructor(Ye,qe){this._updateEventEmitter=new S.b,this.onDidChange=this._updateEventEmitter.event,this._textModel=Ye,this._decorationProvider=qe,this._regions=new h(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}get regions(){return this._regions}get textModel(){return this._textModel}get isInitialized(){return this._isInitialized}toggleCollapseState(Ye){if(!Ye.length)return;Ye=Ye.sort((ct,_t)=>ct.regionIndex-_t.regionIndex);const qe={};this._decorationProvider.changeDecorations(ct=>{let _t=0,Pt=-1,Wt=-1;const Vt=so=>{for(;_t<so;){const wo=this._regions.getEndLineNumber(_t),No=this._regions.isCollapsed(_t);wo<=Pt&&ct.changeDecorationOptions(this._editorDecorationIds[_t],this._decorationProvider.getDecorationOption(No,wo<=Wt)),No&&wo>Wt&&(Wt=wo),_t++}};for(let so of Ye){let wo=so.regionIndex,No=this._editorDecorationIds[wo];if(No&&!qe[No]){qe[No]=!0,Vt(wo);let di=!this._regions.isCollapsed(wo);this._regions.setCollapsed(wo,di),Pt=Math.max(Pt,this._regions.getEndLineNumber(wo))}}Vt(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:Ye})}update(Ye,qe=[]){let ct=[],_t=(di,_o)=>{for(let no of qe)if(di<no&&no<=_o)return!0;return!1},Pt=-1,Wt=(di,_o)=>{const no=Ye.getStartLineNumber(di),Lt=Ye.getEndLineNumber(di);_o||(_o=Ye.isCollapsed(di)),_o&&_t(no,Lt)&&(_o=!1),Ye.setCollapsed(di,_o);const xt=this._textModel.getLineMaxColumn(no),Nt={startLineNumber:no,startColumn:Math.max(xt-1,1),endLineNumber:no,endColumn:xt};ct.push({range:Nt,options:this._decorationProvider.getDecorationOption(_o,Lt<=Pt)}),_o&&Lt>Pt&&(Pt=Lt)},Vt=0,so=()=>{for(;Vt<this._regions.length;){let di=this._regions.isCollapsed(Vt);if(Vt++,di)return Vt-1}return-1},wo=0,No=so();for(;No!==-1&&wo<Ye.length;){let di=this._textModel.getDecorationRange(this._editorDecorationIds[No]);if(di){let _o=di.startLineNumber;if(di.startColumn===Math.max(di.endColumn-1,1)&&this._textModel.getLineMaxColumn(_o)===di.endColumn)for(;wo<Ye.length;){let no=Ye.getStartLineNumber(wo);if(_o>=no)Wt(wo,_o===no),wo++;else break}}No=so()}for(;wo<Ye.length;)Wt(wo,!1),wo++;this._editorDecorationIds=this._decorationProvider.deltaDecorations(this._editorDecorationIds,ct),this._regions=Ye,this._isInitialized=!0,this._updateEventEmitter.fire({model:this})}getMemento(){let Ye=[];for(let qe=0;qe<this._regions.length;qe++)if(this._regions.isCollapsed(qe)){let ct=this._textModel.getDecorationRange(this._editorDecorationIds[qe]);if(ct){let _t=ct.startLineNumber,Pt=ct.endLineNumber+this._regions.getEndLineNumber(qe)-this._regions.getStartLineNumber(qe);Ye.push({startLineNumber:_t,endLineNumber:Pt})}}return Ye.length>0?Ye:void 0}applyMemento(Ye){if(!Array.isArray(Ye))return;let qe=[];for(let ct of Ye){let _t=this.getRegionAtLine(ct.startLineNumber);_t&&!_t.isCollapsed&&qe.push(_t)}this.toggleCollapseState(qe)}dispose(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}getAllRegionsAtLine(Ye,qe){let ct=[];if(this._regions){let _t=this._regions.findRange(Ye),Pt=1;for(;_t>=0;){let Wt=this._regions.toRegion(_t);(!qe||qe(Wt,Pt))&&ct.push(Wt),Pt++,_t=Wt.parentIndex}}return ct}getRegionAtLine(Ye){if(this._regions){let qe=this._regions.findRange(Ye);if(qe>=0)return this._regions.toRegion(qe)}return null}getRegionsInside(Ye,qe){let ct=[],_t=Ye?Ye.regionIndex+1:0,Pt=Ye?Ye.endLineNumber:Number.MAX_VALUE;if(qe&&qe.length===2){const Wt=[];for(let Vt=_t,so=this._regions.length;Vt<so;Vt++){let wo=this._regions.toRegion(Vt);if(this._regions.getStartLineNumber(Vt)<Pt){for(;Wt.length>0&&!wo.containedBy(Wt[Wt.length-1]);)Wt.pop();Wt.push(wo),qe(wo,Wt.length)&&ct.push(wo)}else break}}else for(let Wt=_t,Vt=this._regions.length;Wt<Vt;Wt++){let so=this._regions.toRegion(Wt);if(this._regions.getStartLineNumber(Wt)<Pt)(!qe||qe(so))&&ct.push(so);else break}return ct}}function E(Ye,qe,ct){let _t=[];for(let Pt of ct){let Wt=Ye.getRegionAtLine(Pt);if(Wt){const Vt=!Wt.isCollapsed;if(_t.push(Wt),qe>1){let so=Ye.getRegionsInside(Wt,(wo,No)=>wo.isCollapsed!==Vt&&No<qe);_t.push(...so)}}}Ye.toggleCollapseState(_t)}function y(Ye,qe,ct=Number.MAX_VALUE,_t){let Pt=[];if(_t&&_t.length>0)for(let Wt of _t){let Vt=Ye.getRegionAtLine(Wt);if(Vt&&(Vt.isCollapsed!==qe&&Pt.push(Vt),ct>1)){let so=Ye.getRegionsInside(Vt,(wo,No)=>wo.isCollapsed!==qe&&No<ct);Pt.push(...so)}}else{let Wt=Ye.getRegionsInside(null,(Vt,so)=>Vt.isCollapsed!==qe&&so<ct);Pt.push(...Wt)}Ye.toggleCollapseState(Pt)}function C(Ye,qe,ct,_t){let Pt=[];for(let Wt of _t){let Vt=Ye.getAllRegionsAtLine(Wt,(so,wo)=>so.isCollapsed!==qe&&wo<=ct);Pt.push(...Vt)}Ye.toggleCollapseState(Pt)}function O(Ye,qe,ct){let _t=[];for(let Pt of ct){let Wt=Ye.getAllRegionsAtLine(Pt,Vt=>Vt.isCollapsed!==qe);Wt.length>0&&_t.push(Wt[0])}Ye.toggleCollapseState(_t)}function k(Ye,qe,ct,_t){let Pt=(Vt,so)=>so===qe&&Vt.isCollapsed!==ct&&!_t.some(wo=>Vt.containsLine(wo)),Wt=Ye.getRegionsInside(null,Pt);Ye.toggleCollapseState(Wt)}function Y(Ye,qe,ct){let _t=[];for(let Vt of ct)_t.push(Ye.getAllRegionsAtLine(Vt,void 0)[0]);let Pt=Vt=>_t.every(so=>!so.containedBy(Vt)&&!Vt.containedBy(so))&&Vt.isCollapsed!==qe,Wt=Ye.getRegionsInside(null,Pt);Ye.toggleCollapseState(Wt)}function Q(Ye,qe,ct){let _t=Ye.textModel,Pt=Ye.regions,Wt=[];for(let Vt=Pt.length-1;Vt>=0;Vt--)if(ct!==Pt.isCollapsed(Vt)){let so=Pt.getStartLineNumber(Vt);qe.test(_t.getLineContent(so))&&Wt.push(Pt.toRegion(Vt))}Ye.toggleCollapseState(Wt)}function H(Ye,qe,ct){let _t=Ye.regions,Pt=[];for(let Wt=_t.length-1;Wt>=0;Wt--)ct!==_t.isCollapsed(Wt)&&qe===_t.getType(Wt)&&Pt.push(_t.toRegion(Wt));Ye.toggleCollapseState(Pt)}function Z(Ye,qe){let ct=null,_t=qe.getRegionAtLine(Ye);if(_t!==null&&(ct=_t.startLineNumber,Ye===ct)){let Pt=_t.parentIndex;Pt!==-1?ct=qe.regions.getStartLineNumber(Pt):ct=null}return ct}function oe(Ye,qe){let ct=qe.getRegionAtLine(Ye);if(ct!==null&&ct.startLineNumber===Ye){if(Ye!==ct.startLineNumber)return ct.startLineNumber;{let _t=ct.parentIndex,Pt=0;for(_t!==-1&&(Pt=qe.regions.getStartLineNumber(ct.parentIndex));ct!==null;)if(ct.regionIndex>0){if(ct=qe.regions.toRegion(ct.regionIndex-1),ct.startLineNumber<=Pt)return null;if(ct.parentIndex===_t)return ct.startLineNumber}else return null}}else if(qe.regions.length>0)for(ct=qe.regions.toRegion(qe.regions.length-1);ct!==null;){if(ct.startLineNumber<Ye)return ct.startLineNumber;ct.regionIndex>0?ct=qe.regions.toRegion(ct.regionIndex-1):ct=null}return null}function $(Ye,qe){let ct=qe.getRegionAtLine(Ye);if(ct!==null&&ct.startLineNumber===Ye){let _t=ct.parentIndex,Pt=0;if(_t!==-1)Pt=qe.regions.getEndLineNumber(ct.parentIndex);else{if(qe.regions.length===0)return null;Pt=qe.regions.getEndLineNumber(qe.regions.length-1)}for(;ct!==null;)if(ct.regionIndex<qe.regions.length){if(ct=qe.regions.toRegion(ct.regionIndex+1),ct.startLineNumber>=Pt)return null;if(ct.parentIndex===_t)return ct.startLineNumber}else return null}else if(qe.regions.length>0)for(ct=qe.regions.toRegion(0);ct!==null;){if(ct.startLineNumber>Ye)return ct.startLineNumber;ct.regionIndex<qe.regions.length?ct=qe.regions.toRegion(ct.regionIndex+1):ct=null}return null}var te=t("6OMU"),ne=t("aokT");class Ee{constructor(Ye){this._updateEventEmitter=new S.b,this._foldingModel=Ye,this._foldingModelListener=Ye.onDidChange(qe=>this.updateHiddenRanges()),this._hiddenRanges=[],Ye.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}updateHiddenRanges(){let Ye=!1,qe=[],ct=0,_t=0,Pt=Number.MAX_VALUE,Wt=-1,Vt=this._foldingModel.regions;for(;ct<Vt.length;ct++){if(!Vt.isCollapsed(ct))continue;let so=Vt.getStartLineNumber(ct)+1,wo=Vt.getEndLineNumber(ct);if(Pt<=so&&wo<=Wt)continue;!Ye&&_t<this._hiddenRanges.length&&this._hiddenRanges[_t].startLineNumber===so&&this._hiddenRanges[_t].endLineNumber===wo?(qe.push(this._hiddenRanges[_t]),_t++):(Ye=!0,qe.push(new ne.a(so,1,wo,1))),Pt=so,Wt=wo}(Ye||_t<this._hiddenRanges.length)&&this.applyHiddenRanges(qe)}applyMemento(Ye){if(!Array.isArray(Ye)||Ye.length===0)return!1;let qe=[];for(let ct of Ye){if(!ct.startLineNumber||!ct.endLineNumber)return!1;qe.push(new ne.a(ct.startLineNumber+1,1,ct.endLineNumber,1))}return this.applyHiddenRanges(qe),!0}getMemento(){return this._hiddenRanges.map(Ye=>({startLineNumber:Ye.startLineNumber-1,endLineNumber:Ye.endLineNumber}))}applyHiddenRanges(Ye){this._hiddenRanges=Ye,this._updateEventEmitter.fire(Ye)}hasRanges(){return this._hiddenRanges.length>0}isHidden(Ye){return ee(this._hiddenRanges,Ye)!==null}adjustSelections(Ye){let qe=!1,ct=this._foldingModel.textModel,_t=null,Pt=Wt=>((!_t||!fe(Wt,_t))&&(_t=ee(this._hiddenRanges,Wt)),_t?_t.startLineNumber-1:null);for(let Wt=0,Vt=Ye.length;Wt<Vt;Wt++){let so=Ye[Wt],wo=Pt(so.startLineNumber);wo&&(so=so.setStartPosition(wo,ct.getLineMaxColumn(wo)),qe=!0);let No=Pt(so.endLineNumber);No&&(so=so.setEndPosition(No,ct.getLineMaxColumn(No)),qe=!0),Ye[Wt]=so}return qe}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function fe(Ye,qe){return Ye>=qe.startLineNumber&&Ye<=qe.endLineNumber}function ee(Ye,qe){let ct=Object(te.h)(Ye,_t=>qe<_t.startLineNumber)-1;return ct>=0&&Ye[ct].endLineNumber>=qe?Ye[ct]:null}var ie=t("tX9W");const U=5e3,G="indent";class J{constructor(Ye){this.editorModel=Ye,this.id=G}dispose(){}compute(Ye){let qe=D.b.getFoldingRules(this.editorModel.getLanguageId()),ct=qe&&!!qe.offSide,_t=qe&&qe.markers;return Promise.resolve(xe(this.editorModel,ct,_t))}}class he{constructor(Ye){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=Ye}insertFirst(Ye,qe,ct){if(Ye>_||qe>_)return;let _t=this._length;this._startIndexes[_t]=Ye,this._endIndexes[_t]=qe,this._length++,ct<1e3&&(this._indentOccurrences[ct]=(this._indentOccurrences[ct]||0)+1)}toIndentRanges(Ye){if(this._length<=this._foldingRangesLimit){let qe=new Uint32Array(this._length),ct=new Uint32Array(this._length);for(let _t=this._length-1,Pt=0;_t>=0;_t--,Pt++)qe[Pt]=this._startIndexes[_t],ct[Pt]=this._endIndexes[_t];return new h(qe,ct)}else{let qe=0,ct=this._indentOccurrences.length;for(let Vt=0;Vt<this._indentOccurrences.length;Vt++){let so=this._indentOccurrences[Vt];if(so){if(so+qe>this._foldingRangesLimit){ct=Vt;break}qe+=so}}const _t=Ye.getOptions().tabSize;let Pt=new Uint32Array(this._foldingRangesLimit),Wt=new Uint32Array(this._foldingRangesLimit);for(let Vt=this._length-1,so=0;Vt>=0;Vt--){let wo=this._startIndexes[Vt],No=Ye.getLineContent(wo),di=ie.c.computeIndentLevel(No,_t);(di<ct||di===ct&&qe++<this._foldingRangesLimit)&&(Pt[so]=wo,Wt[so]=this._endIndexes[Vt],so++)}return new h(Pt,Wt)}}}function xe(Ye,qe,ct,_t=U){const Pt=Ye.getOptions().tabSize;let Wt=new he(_t),Vt;ct&&(Vt=new RegExp(`(${ct.start.source})|(?:${ct.end.source})`));let so=[],wo=Ye.getLineCount()+1;so.push({indent:-1,endAbove:wo,line:wo});for(let No=Ye.getLineCount();No>0;No--){let di=Ye.getLineContent(No),_o=ie.c.computeIndentLevel(di,Pt),no=so[so.length-1];if(_o===-1){qe&&(no.endAbove=No);continue}let Lt;if(Vt&&(Lt=di.match(Vt)))if(Lt[1]){let xt=so.length-1;for(;xt>0&&so[xt].indent!==-2;)xt--;if(xt>0){so.length=xt+1,no=so[xt],Wt.insertFirst(No,no.line,_o),no.line=No,no.indent=_o,no.endAbove=No;continue}}else{so.push({indent:-2,endAbove:No,line:No});continue}if(no.indent>_o){do so.pop(),no=so[so.length-1];while(no.indent>_o);let xt=no.endAbove-1;xt-No>=1&&Wt.insertFirst(No,xt,_o)}no.indent===_o?no.endAbove=No:so.push({indent:_o,endAbove:No,line:No})}return Wt.toIndentRanges(Ye)}const Ie=5e3,Le={},Te="syntax";class ze{constructor(Ye,qe,ct,_t=Ie){this.editorModel=Ye,this.providers=qe,this.limit=_t,this.id=Te;for(const Pt of qe)typeof Pt.onDidChange=="function"&&(this.disposables||(this.disposables=new N.b),this.disposables.add(Pt.onDidChange(ct)))}compute(Ye){return ue(this.providers,this.editorModel,Ye).then(qe=>{if(qe){let ct=Pe(qe,this.limit);return ct}return null})}dispose(){var Ye;(Ye=this.disposables)===null||Ye===void 0||Ye.dispose()}}function ue(Ye,qe,ct){let _t=null,Pt=Ye.map((Wt,Vt)=>Promise.resolve(Wt.provideFoldingRanges(qe,Le,ct)).then(so=>{if(ct.isCancellationRequested)return;if(Array.isArray(so)){Array.isArray(_t)||(_t=[]);let wo=qe.getLineCount();for(let No of so)No.start>0&&No.end>No.start&&No.end<=wo&&_t.push({start:No.start,end:No.end,rank:Vt,kind:No.kind})}},B.g));return Promise.all(Pt).then(Wt=>_t)}class je{constructor(Ye){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=Ye}add(Ye,qe,ct,_t){if(Ye>_||qe>_)return;let Pt=this._length;this._startIndexes[Pt]=Ye,this._endIndexes[Pt]=qe,this._nestingLevels[Pt]=_t,this._types[Pt]=ct,this._length++,_t<30&&(this._nestingLevelCounts[_t]=(this._nestingLevelCounts[_t]||0)+1)}toIndentRanges(){if(this._length<=this._foldingRangesLimit){let Ye=new Uint32Array(this._length),qe=new Uint32Array(this._length);for(let ct=0;ct<this._length;ct++)Ye[ct]=this._startIndexes[ct],qe[ct]=this._endIndexes[ct];return new h(Ye,qe,this._types)}else{let Ye=0,qe=this._nestingLevelCounts.length;for(let Wt=0;Wt<this._nestingLevelCounts.length;Wt++){let Vt=this._nestingLevelCounts[Wt];if(Vt){if(Vt+Ye>this._foldingRangesLimit){qe=Wt;break}Ye+=Vt}}let ct=new Uint32Array(this._foldingRangesLimit),_t=new Uint32Array(this._foldingRangesLimit),Pt=[];for(let Wt=0,Vt=0;Wt<this._length;Wt++){let so=this._nestingLevels[Wt];(so<qe||so===qe&&Ye++<this._foldingRangesLimit)&&(ct[Vt]=this._startIndexes[Wt],_t[Vt]=this._endIndexes[Wt],Pt[Vt]=this._types[Wt],Vt++)}return new h(ct,_t,Pt)}}}function Pe(Ye,qe){let ct=Ye.sort((Vt,so)=>{let wo=Vt.start-so.start;return wo===0&&(wo=Vt.rank-so.rank),wo}),_t=new je(qe),Pt,Wt=[];for(let Vt of ct)if(!Pt)Pt=Vt,_t.add(Vt.start,Vt.end,Vt.kind&&Vt.kind.value,Wt.length);else if(Vt.start>Pt.start)if(Vt.end<=Pt.end)Wt.push(Pt),Pt=Vt,_t.add(Vt.start,Vt.end,Vt.kind&&Vt.kind.value,Wt.length);else{if(Vt.start>Pt.end){do Pt=Wt.pop();while(Pt&&Vt.start>Pt.end);Pt&&Wt.push(Pt),Pt=Vt}_t.add(Vt.start,Vt.end,Vt.kind&&Vt.kind.value,Wt.length)}return _t.toIndentRanges()}const ve="init";class ce{constructor(Ye,qe,ct,_t){if(this.editorModel=Ye,this.id=ve,qe.length){let Pt=Wt=>({range:{startLineNumber:Wt.startLineNumber,startColumn:0,endLineNumber:Wt.endLineNumber,endColumn:Ye.getLineLength(Wt.endLineNumber)},options:{description:"folding-initializing-range-provider",stickiness:1}});this.decorationIds=Ye.deltaDecorations([],qe.map(Pt)),this.timeout=setTimeout(ct,_t)}}dispose(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),typeof this.timeout=="number"&&(clearTimeout(this.timeout),this.timeout=void 0)}compute(Ye){let qe=[];if(this.decorationIds)for(let ct of this.decorationIds){let _t=this.editorModel.getDecorationRange(ct);_t&&qe.push({start:_t.startLineNumber,end:_t.endLineNumber,rank:1})}return Promise.resolve(Pe(qe,Number.MAX_VALUE))}}var le=t("3/fG"),Ce=t("T8No"),ye=t("MD5Z"),ge=t("t9D7"),Me=t("Vhoy"),De=t("v1vZ");const we=Object(De.b)("folding-expanded",Me.b.chevronDown,Object(le.a)("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),Oe=Object(De.b)("folding-collapsed",Me.b.chevronRight,Object(le.a)("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin."));class nt{constructor(Ye){this.editor=Ye,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}getDecorationOption(Ye,qe){return qe?nt.HIDDEN_RANGE_DECORATION:Ye?this.showFoldingHighlights?nt.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:nt.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?nt.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:nt.EXPANDED_VISUAL_DECORATION}deltaDecorations(Ye,qe){return this.editor.deltaDecorations(Ye,qe)}changeDecorations(Ye){return this.editor.changeDecorations(Ye)}}nt.COLLAPSED_VISUAL_DECORATION=ie.b.register({description:"folding-collapsed-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:ge.d.asClassName(Oe)}),nt.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=ie.b.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:ge.d.asClassName(Oe)}),nt.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=ie.b.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:ge.d.asClassName(we)}),nt.EXPANDED_VISUAL_DECORATION=ie.b.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+ge.d.asClassName(we)}),nt.HIDDEN_RANGE_DECORATION=ie.b.register({description:"folding-hidden-range-decoration",stickiness:1});var Ke=function(Ye,qe,ct,_t){var Pt=arguments.length,Wt=Pt<3?qe:_t===null?_t=Object.getOwnPropertyDescriptor(qe,ct):_t,Vt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Wt=Reflect.decorate(Ye,qe,ct,_t);else for(var so=Ye.length-1;so>=0;so--)(Vt=Ye[so])&&(Wt=(Pt<3?Vt(Wt):Pt>3?Vt(qe,ct,Wt):Vt(qe,ct))||Wt);return Pt>3&&Wt&&Object.defineProperty(qe,ct,Wt),Wt},et=function(Ye,qe){return function(ct,_t){qe(ct,_t,Ye)}};const bt=new Ce.c("foldingEnabled",!1);let Tt=class Ye extends N.a{constructor(qe,ct){super();this.contextKeyService=ct,this.localToDispose=this._register(new N.b),this.editor=qe;const _t=this.editor.getOptions();this._isEnabled=_t.get(37),this._useFoldingProviders=_t.get(38)!=="indentation",this._unfoldOnClickAfterEndOfLine=_t.get(41),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=_t.get(40),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingStateMemento=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new nt(qe),this.foldingDecorationProvider.autoHideFoldingControls=_t.get(98)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=_t.get(39),this.foldingEnabled=bt.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(Pt=>{if(Pt.hasChanged(37)&&(this._isEnabled=this.editor.getOptions().get(37),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),Pt.hasChanged(98)||Pt.hasChanged(39)){const Wt=this.editor.getOptions();this.foldingDecorationProvider.autoHideFoldingControls=Wt.get(98)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=Wt.get(39),this.onModelContentChanged()}Pt.hasChanged(38)&&(this._useFoldingProviders=this.editor.getOptions().get(38)!=="indentation",this.onFoldingStrategyChanged()),Pt.hasChanged(41)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(41)),Pt.hasChanged(40)&&(this._foldingImportsByDefault=this.editor.getOptions().get(40))})),this.onModelChanged()}static get(qe){return qe.getContribution(Ye.ID)}saveViewState(){let qe=this.editor.getModel();if(!qe||!this._isEnabled||qe.isTooLargeForTokenization())return{};if(this.foldingModel){let ct=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),_t=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:ct,lineCount:qe.getLineCount(),provider:_t,foldedImports:this._currentModelHasFoldedImports}}return}restoreViewState(qe){let ct=this.editor.getModel();if(!ct||!this._isEnabled||ct.isTooLargeForTokenization()||!this.hiddenRangeModel)return;if(!qe||qe.lineCount!==ct.getLineCount())return;if(this._currentModelHasFoldedImports=!!qe.foldedImports,!qe.collapsedRegions)return;(qe.provider===Te||qe.provider===ve)&&(this.foldingStateMemento=qe);const _t=qe.collapsedRegions;if(this.hiddenRangeModel.applyMemento(_t)){const Pt=this.getFoldingModel();Pt&&Pt.then(Wt=>{if(Wt){this._restoringViewState=!0;try{Wt.applyMemento(_t)}finally{this._restoringViewState=!1}}}).then(void 0,B.f)}}onModelChanged(){this.localToDispose.clear();let qe=this.editor.getModel();if(!this._isEnabled||!qe||qe.isTooLargeForTokenization())return;this._currentModelHasFoldedImports=!1,this.foldingModel=new p(qe,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new Ee(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(ct=>this.onHiddenRangesChanges(ct))),this.updateScheduler=new f.a(200),this.cursorChangedScheduler=new f.e(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(d.o.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(()=>this.onModelContentChanged())),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(ct=>this.onEditorMouseDown(ct))),this.localToDispose.add(this.editor.onMouseUp(ct=>this.onEditorMouseUp(ct))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.foldingStateMemento=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.onModelContentChanged()}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()}getRangeProvider(qe){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new J(qe),this._useFoldingProviders&&this.foldingModel){let ct=d.o.ordered(this.foldingModel.textModel);if(ct.length===0&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions){const _t=this.rangeProvider=new ce(qe,this.foldingStateMemento.collapsedRegions,()=>{this.foldingStateMemento=null,this.onFoldingStrategyChanged()},3e4);return _t}else ct.length>0&&(this.rangeProvider=new ze(qe,ct,()=>this.onModelContentChanged()))}return this.foldingStateMemento=null,this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onModelContentChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const qe=this.foldingModel;if(!qe)return null;const ct=this.getRangeProvider(qe.textModel);let _t=this.foldingRegionPromise=Object(f.h)(Pt=>ct.compute(Pt));return _t.then(Pt=>{if(Pt&&_t===this.foldingRegionPromise){let Wt;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const wo=Pt.setCollapsedAllOfType(d.n.Imports.value,!0);wo&&(Wt=L.c.capture(this.editor),this._currentModelHasFoldedImports=wo)}let Vt=this.editor.getSelections(),so=Vt?Vt.map(wo=>wo.startLineNumber):[];qe.update(Pt,so),Wt&&Wt.restore(this.editor)}return qe})}).then(void 0,qe=>(Object(B.f)(qe),null)))}onHiddenRangesChanges(qe){if(this.hiddenRangeModel&&qe.length&&!this._restoringViewState){let ct=this.editor.getSelections();ct&&(this.hiddenRangeModel.adjustSelections(ct)&&this.editor.setSelections(ct))}this.editor.setHiddenAreas(qe)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const qe=this.getFoldingModel();if(!qe)return;qe.then(ct=>{if(ct){let _t=this.editor.getSelections();if(_t&&_t.length>0){let Pt=[];for(let Wt of _t){let Vt=Wt.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(Vt)&&Pt.push(...ct.getAllRegionsAtLine(Vt,so=>so.isCollapsed&&Vt>so.startLineNumber))}Pt.length&&(ct.toggleCollapseState(Pt),this.reveal(_t[0].getPosition()))}}}).then(void 0,B.f)}onEditorMouseDown(qe){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!qe.target||!qe.target.range)return;if(!qe.event.leftButton&&!qe.event.middleButton)return;const ct=qe.target.range;let _t=!1;switch(qe.target.type){case 4:const Pt=qe.target.detail,Wt=qe.target.element.offsetLeft,Vt=Pt.offsetX-Wt;if(Vt<5)return;_t=!0;break;case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()){const so=qe.target.detail;if(!so.isAfterLines)break}return}case 6:{if(this.hiddenRangeModel.hasRanges()){let so=this.editor.getModel();if(so&&ct.startColumn===so.getLineMaxColumn(ct.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:ct.startLineNumber,iconClicked:_t}}onEditorMouseUp(qe){const ct=this.getFoldingModel();if(!ct||!this.mouseDownInfo||!qe.target)return;let _t=this.mouseDownInfo.lineNumber,Pt=this.mouseDownInfo.iconClicked,Wt=qe.target.range;if(!Wt||Wt.startLineNumber!==_t)return;if(Pt){if(qe.target.type!==4)return}else{let Vt=this.editor.getModel();if(!Vt||Wt.startColumn!==Vt.getLineMaxColumn(_t))return}ct.then(Vt=>{if(Vt){let so=Vt.getRegionAtLine(_t);if(so&&so.startLineNumber===_t){let wo=so.isCollapsed;if(Pt||wo){let No=qe.event.altKey,di=[];if(No){let _o=Lt=>!Lt.containedBy(so)&&!so.containedBy(Lt),no=Vt.getRegionsInside(null,_o);for(const Lt of no)Lt.isCollapsed&&di.push(Lt);di.length===0&&(di=no)}else{let _o=qe.event.middleButton||qe.event.shiftKey;if(_o)for(const no of Vt.getRegionsInside(so))no.isCollapsed===wo&&di.push(no);(wo||!_o||di.length===0)&&di.push(so)}Vt.toggleCollapseState(di),this.reveal({lineNumber:_t,column:1})}}}}).then(void 0,B.f)}reveal(qe){this.editor.revealPositionInCenterIfOutsideViewport(qe,0)}};Tt.ID="editor.contrib.folding",Tt=Ke([et(1,Ce.b)],Tt);class $t extends v.b{runEditorCommand(Ye,qe,ct){let _t=Tt.get(qe);if(!_t)return;let Pt=_t.getFoldingModel();if(Pt)return this.reportTelemetry(Ye,qe),Pt.then(Wt=>{if(Wt){this.invoke(_t,Wt,qe,ct);const Vt=qe.getSelection();Vt&&_t.reveal(Vt.getStartPosition())}})}getSelectedLines(Ye){let qe=Ye.getSelections();return qe?qe.map(ct=>ct.startLineNumber):[]}getLineNumbers(Ye,qe){return Ye&&Ye.selectionLines?Ye.selectionLines.map(ct=>ct+1):this.getSelectedLines(qe)}run(Ye,qe){}}function Xe(Ye){if(!F.m(Ye)){if(!F.k(Ye))return!1;const qe=Ye;if(!F.m(qe.levels)&&!F.j(qe.levels))return!1;if(!F.m(qe.direction)&&!F.l(qe.direction))return!1;if(!F.m(qe.selectionLines)&&(!F.f(qe.selectionLines)||!qe.selectionLines.every(F.j)))return!1}return!0}class it extends $t{constructor(){super({id:"editor.unfold",label:le.a("unfoldAction.label","Unfold"),alias:"Unfold",precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:2048|1024|89,mac:{primary:2048|512|89},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:`Property-value pairs that can be passed through this argument:
|
|
|
* 'levels': Number of levels to unfold. If not set, defaults to 1.
|
|
|
* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.
|
|
|
* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.
|
|
|
`,constraint:Xe,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(Ye,qe,ct,_t){let Pt=_t&&_t.levels||1,Wt=this.getLineNumbers(_t,ct);_t&&_t.direction==="up"?C(qe,!1,Pt,Wt):y(qe,!1,Pt,Wt)}}class re extends $t{constructor(){super({id:"editor.unfoldRecursively",label:le.a("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|89),weight:100}})}invoke(Ye,qe,ct,_t){y(qe,!1,Number.MAX_VALUE,this.getSelectedLines(ct))}}class We extends $t{constructor(){super({id:"editor.fold",label:le.a("foldAction.label","Fold"),alias:"Fold",precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:2048|1024|87,mac:{primary:2048|512|87},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:`Property-value pairs that can be passed through this argument:
|
|
|
* 'levels': Number of levels to fold.
|
|
|
* 'direction': If 'up', folds given number of levels up otherwise folds down.
|
|
|
* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.
|
|
|
If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.
|
|
|
`,constraint:Xe,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(Ye,qe,ct,_t){let Pt=this.getLineNumbers(_t,ct);const Wt=_t&&_t.levels,Vt=_t&&_t.direction;typeof Wt!="number"&&typeof Vt!="string"?O(qe,!0,Pt):Vt==="up"?C(qe,!0,Wt||1,Pt):y(qe,!0,Wt||1,Pt)}}class tt extends $t{constructor(){super({id:"editor.toggleFold",label:le.a("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|42),weight:100}})}invoke(Ye,qe,ct){let _t=this.getSelectedLines(ct);E(qe,1,_t)}}class Et extends $t{constructor(){super({id:"editor.foldRecursively",label:le.a("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|87),weight:100}})}invoke(Ye,qe,ct){let _t=this.getSelectedLines(ct);y(qe,!0,Number.MAX_VALUE,_t)}}class It extends $t{constructor(){super({id:"editor.foldAllBlockComments",label:le.a("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|85),weight:100}})}invoke(Ye,qe,ct){if(qe.regions.hasTypes())H(qe,d.n.Comment.value,!0);else{const _t=ct.getModel();if(!_t)return;const Pt=D.b.getComments(_t.getLanguageId());if(Pt&&Pt.blockCommentStartToken){let Wt=new RegExp("^\\s*"+Object(A.t)(Pt.blockCommentStartToken));Q(qe,Wt,!0)}}}}class Rt extends $t{constructor(){super({id:"editor.foldAllMarkerRegions",label:le.a("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|29),weight:100}})}invoke(Ye,qe,ct){if(qe.regions.hasTypes())H(qe,d.n.Region.value,!0);else{const _t=ct.getModel();if(!_t)return;const Pt=D.b.getFoldingRules(_t.getLanguageId());if(Pt&&Pt.markers&&Pt.markers.start){let Wt=new RegExp(Pt.markers.start);Q(qe,Wt,!0)}}}}class vo extends $t{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:le.a("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|30),weight:100}})}invoke(Ye,qe,ct){if(qe.regions.hasTypes())H(qe,d.n.Region.value,!1);else{const _t=ct.getModel();if(!_t)return;const Pt=D.b.getFoldingRules(_t.getLanguageId());if(Pt&&Pt.markers&&Pt.markers.start){let Wt=new RegExp(Pt.markers.start);Q(qe,Wt,!1)}}}}class Mo extends $t{constructor(){super({id:"editor.foldAllExcept",label:le.a("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|83),weight:100}})}invoke(Ye,qe,ct){let _t=this.getSelectedLines(ct);Y(qe,!0,_t)}}class xo extends $t{constructor(){super({id:"editor.unfoldAllExcept",label:le.a("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|81),weight:100}})}invoke(Ye,qe,ct){let _t=this.getSelectedLines(ct);Y(qe,!1,_t)}}class Do extends $t{constructor(){super({id:"editor.foldAll",label:le.a("foldAllAction.label","Fold All"),alias:"Fold All",precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|21),weight:100}})}invoke(Ye,qe,ct){y(qe,!0)}}class Lo extends $t{constructor(){super({id:"editor.unfoldAll",label:le.a("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|40),weight:100}})}invoke(Ye,qe,ct){y(qe,!1)}}class To extends $t{getFoldingLevel(){return parseInt(this.id.substr(To.ID_PREFIX.length))}invoke(Ye,qe,ct){k(qe,this.getFoldingLevel(),!0,this.getSelectedLines(ct))}}To.ID_PREFIX="editor.foldLevel",To.ID=Ye=>To.ID_PREFIX+Ye;class Ht extends $t{constructor(){super({id:"editor.gotoParentFold",label:le.a("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,weight:100}})}invoke(Ye,qe,ct){let _t=this.getSelectedLines(ct);if(_t.length>0){let Pt=Z(_t[0],qe);Pt!==null&&ct.setSelection({startLineNumber:Pt,startColumn:1,endLineNumber:Pt,endColumn:1})}}}class Mt extends $t{constructor(){super({id:"editor.gotoPreviousFold",label:le.a("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,weight:100}})}invoke(Ye,qe,ct){let _t=this.getSelectedLines(ct);if(_t.length>0){let Pt=oe(_t[0],qe);Pt!==null&&ct.setSelection({startLineNumber:Pt,startColumn:1,endLineNumber:Pt,endColumn:1})}}}class Ue extends $t{constructor(){super({id:"editor.gotoNextFold",label:le.a("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,weight:100}})}invoke(Ye,qe,ct){let _t=this.getSelectedLines(ct);if(_t.length>0){let Pt=$(_t[0],qe);Pt!==null&&ct.setSelection({startLineNumber:Pt,startColumn:1,endLineNumber:Pt,endColumn:1})}}}Object(v.l)(Tt.ID,Tt),Object(v.j)(it),Object(v.j)(re),Object(v.j)(We),Object(v.j)(Et),Object(v.j)(Do),Object(v.j)(Lo),Object(v.j)(It),Object(v.j)(Rt),Object(v.j)(vo),Object(v.j)(Mo),Object(v.j)(xo),Object(v.j)(tt),Object(v.j)(Ht),Object(v.j)(Mt),Object(v.j)(Ue);for(let Ye=1;Ye<=7;Ye++)Object(v.m)(new To({id:To.ID(Ye),label:le.a("foldLevelAction.label","Fold Level {0}",Ye),alias:`Fold Level ${Ye}`,precondition:bt,kbOpts:{kbExpr:m.a.editorTextFocus,primary:Object(x.c)(2048|41,2048|21+Ye),weight:100}}));const dt=Object(ye.wc)("editor.foldBackground",{light:Object(ye.Lc)(ye.P,.3),dark:Object(ye.Lc)(ye.P,.3),hc:null},le.a("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0),Ut=Object(ye.wc)("editorGutter.foldingControlForeground",{dark:ye.db,light:ye.db,hc:ye.db},le.a("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));Object(ge.f)((Ye,qe)=>{const ct=Ye.getColor(dt);ct&&qe.addRule(`.monaco-editor .folded-background { background-color: ${ct}; }`);const _t=Ye.getColor(Ut);_t&&qe.addRule(`
|
|
|
.monaco-editor .cldr${ge.d.asCSSSelector(we)},
|
|
|
.monaco-editor .cldr${ge.d.asCSSSelector(Oe)} {
|
|
|
color: ${_t} !important;
|
|
|
}
|
|
|
`)})},e0rL:function(mt,M,t){"use strict";t.d(M,"a",function(){return B}),t.d(M,"b",function(){return x});var f=t("Cg/j");const B=Object(f.c)("textResourceConfigurationService"),x=Object(f.c)("textResourcePropertiesService")},e1ni:function(mt,M,t){},eC1c:function(mt,M,t){},eLzo:function(mt,M,t){"use strict";t.d(M,"a",function(){return x}),t.d(M,"b",function(){return N}),t.d(M,"c",function(){return A}),t.d(M,"e",function(){return I}),t.d(M,"d",function(){return L});var f=t("/cxE"),B=t("EJc0");class x{constructor(v="",m=!1){var d,D,S;if(this.value=v,typeof this.value!="string")throw Object(f.c)("value");typeof m=="boolean"?(this.isTrusted=m,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(d=m.isTrusted)!==null&&d!==void 0?d:void 0,this.supportThemeIcons=(D=m.supportThemeIcons)!==null&&D!==void 0?D:!1,this.supportHtml=(S=m.supportHtml)!==null&&S!==void 0?S:!1)}appendText(v,m=0){return this.value+=F(this.supportThemeIcons?Object(B.a)(v):v).replace(/([ \t]+)/g,(d,D)=>" ".repeat(D.length)).replace(/\>/gm,"\\>").replace(/\n/g,m===1?`\\
|
|
|
`:`
|
|
|
|
|
|
`),this}appendMarkdown(v){return this.value+=v,this}appendCodeblock(v,m){return this.value+="\n```",this.value+=v,this.value+=`
|
|
|
`,this.value+=m,this.value+="\n```\n",this}}function N(v){return A(v)?!v.value:Array.isArray(v)?v.every(N):!0}function A(v){return v instanceof x?!0:v&&typeof v=="object"?typeof v.value=="string"&&(typeof v.isTrusted=="boolean"||v.isTrusted===void 0)&&(typeof v.supportThemeIcons=="boolean"||v.supportThemeIcons===void 0):!1}function F(v){return v.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}function I(v){return v&&v.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}function L(v){const m=[],d=v.split("|").map(S=>S.trim());v=d[0];const D=d[1];if(D){const S=/height=(\d+)/.exec(D),r=/width=(\d+)/.exec(D),_=S?S[1]:"",b=r?r[1]:"",h=isFinite(parseInt(b)),c=isFinite(parseInt(_));h&&m.push(`width="${b}"`),c&&m.push(`height="${_}"`)}return{href:v,dimensions:m}}},eUTo:function(mt,M,t){"use strict";t.d(M,"c",function(){return H}),t.d(M,"a",function(){return $}),t.d(M,"b",function(){return Ee});var f=t("EffR"),B=t("uDWl"),x=t("7/Ik"),N=t("pg8w"),A=t("8HAY"),F=t("MI8n"),I=t("QMLA");class L extends A.b{constructor(fe,ee){super();this._onDidChangeVisibility=this._register(new F.b),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=Object(f.q)(fe,Object(f.a)(".monaco-dropdown")),this._label=Object(f.q)(this._element,Object(f.a)(".dropdown-label"));let ie=ee.labelRenderer;ie||(ie=G=>(G.textContent=ee.label||"",null));for(const G of[f.d.CLICK,f.d.MOUSE_DOWN,N.a.Tap])this._register(Object(f.i)(this.element,G,J=>f.c.stop(J,!0)));for(const G of[f.d.MOUSE_DOWN,N.a.Tap])this._register(Object(f.i)(this._label,G,J=>{if(J instanceof MouseEvent&&J.detail>1)return;this.visible?this.hide():this.show()}));this._register(Object(f.i)(this._label,f.d.KEY_UP,G=>{const J=new B.a(G);(J.equals(3)||J.equals(10))&&(f.c.stop(G,!0),this.visible?this.hide():this.show())}));const U=ie(this._label);U&&this._register(U),this._register(N.b.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 v extends L{constructor(fe,ee){super(fe,ee);this._actions=[],this._contextMenuProvider=ee.contextMenuProvider,this.actions=ee.actions||[],this.actionProvider=ee.actionProvider,this.menuClassName=ee.menuClassName||"",this.menuAsChild=!!ee.menuAsChild}set menuOptions(fe){this._menuOptions=fe}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(fe){this._actions=fe}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:fe=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(fe):void 0,getKeyBinding:fe=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(fe):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 m extends x.b{constructor(fe,ee,ie,U=Object.create(null)){super(null,fe,U);this.actionItem=null,this._onDidChangeVisibility=this._register(new F.b),this.menuActionsOrProvider=ee,this.contextMenuProvider=ie,this.options=U,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(fe){this.actionItem=fe;const ee=G=>{this.element=Object(f.q)(G,Object(f.a)("a.action-label"));let J=[];return typeof this.options.classNames=="string"?J=this.options.classNames.split(/\s+/g).filter(he=>!!he):this.options.classNames&&(J=this.options.classNames),J.find(he=>he==="icon")||J.push("codicon"),this.element.classList.add(...J),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},ie=Array.isArray(this.menuActionsOrProvider),U={contextMenuProvider:this.contextMenuProvider,labelRenderer:ee,menuAsChild:this.options.menuAsChild,actions:ie?this.menuActionsOrProvider:void 0,actionProvider:ie?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new v(fe,U)),this._register(this.dropdownMenu.onDidChangeVisibility(G=>{var J;(J=this.element)===null||J===void 0||J.setAttribute("aria-expanded",`${G}`),this._onDidChangeVisibility.fire(G)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const G=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return G.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(fe){super.setActionContext(fe),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=fe:this.dropdownMenu.menuOptions={context:fe})}updateEnabled(){var fe,ee;const ie=!this.getAction().enabled;(fe=this.actionItem)===null||fe===void 0||fe.classList.toggle("disabled",ie),(ee=this.element)===null||ee===void 0||ee.classList.toggle("disabled",ie)}}var d=t("i04g"),D=t("pmY6"),S=t("MNsG"),r=t("r6Ki"),_=t("3/fG"),b=t("fjLI"),h=t("T8No"),c=t("Uzvx"),p=t("Cg/j"),E=t("bexQ"),y=t("sM1p"),C=t("A+jI"),O=t("t9D7"),k=function(fe,ee,ie,U){var G=arguments.length,J=G<3?ee:U===null?U=Object.getOwnPropertyDescriptor(ee,ie):U,he;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")J=Reflect.decorate(fe,ee,ie,U);else for(var xe=fe.length-1;xe>=0;xe--)(he=fe[xe])&&(J=(G<3?he(J):G>3?he(ee,ie,J):he(ee,ie))||J);return G>3&&J&&Object.defineProperty(ee,ie,J),J},Y=function(fe,ee){return function(ie,U){ee(ie,U,fe)}},Q=function(fe,ee,ie,U){function G(J){return J instanceof ie?J:new ie(function(he){he(J)})}return new(ie||(ie=Promise))(function(J,he){function xe(Te){try{Le(U.next(Te))}catch(ze){he(ze)}}function Ie(Te){try{Le(U.throw(Te))}catch(ze){he(ze)}}function Le(Te){Te.done?J(Te.value):G(Te.value).then(xe,Ie)}Le((U=U.apply(fe,ee||[])).next())})};function H(fe,ee,ie,U,G,J,he){const xe=fe.getActions(ee),Ie=typeof U=="string"?Le=>Le===U:U;return oe(xe,ie,!1,Ie,G,J,he),Z(xe)}function Z(fe){const ee=new D.b;for(const[,ie]of fe)for(const U of ie)ee.add(U);return ee}function oe(fe,ee,ie,U=xe=>xe==="navigation",G=Number.MAX_SAFE_INTEGER,J=()=>!1,he=!1){let xe,Ie;Array.isArray(ee)?(xe=ee,Ie=ee):(xe=ee.primary,Ie=ee.secondary);const Le=new Set;for(const[Te,ze]of fe){let ue;U(Te)?(ue=xe,ue.length>0&&he&&ue.push(new A.d)):(ue=Ie,ue.length>0&&ue.push(new A.d));for(let je of ze){ie&&(je=je instanceof b.c&&je.alt?je.alt:je);const Pe=ue.push(je);je instanceof A.e&&Le.add({group:Te,action:je,index:Pe-1})}}for(const{group:Te,action:ze,index:ue}of Le){const je=U(Te)?xe:Ie,Pe=ze.actions;(Pe.length<=1||je.length+Pe.length-2<=G)&&J(ze,Te,je.length)&&je.splice(ue,1,...Pe)}if(xe!==Ie&&xe.length>G){const Te=xe.splice(G,xe.length-G);Ie.unshift(...Te,new A.d)}}let $=class extends x.a{constructor(ee,ie,U,G,J){super(void 0,ee,{icon:!!(ee.class||ee.item.icon),label:!ee.class&&!ee.item.icon,draggable:ie==null?void 0:ie.draggable});this._keybindingService=U,this._notificationService=G,this._contextKeyService=J,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new D.d),this._altKey=f.e.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(ee){return Q(this,void 0,void 0,function*(){ee.preventDefault(),ee.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(ie){this._notificationService.error(ie)}})}render(ee){super.render(ee),ee.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let ie=!1,U=this._altKey.keyStatus.altKey||(S.i||S.d)&&this._altKey.keyStatus.shiftKey;const G=()=>{const J=ie&&U;J!==this._wantsAltCommand&&(this._wantsAltCommand=J,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event(J=>{U=J.altKey||(S.i||S.d)&&J.shiftKey,G()})),this._register(Object(f.i)(ee,"mouseleave",J=>{ie=!1,G()})),this._register(Object(f.i)(ee,"mouseenter",J=>{ie=!0,G()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const ee=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),ie=ee&&ee.getLabel(),U=this._commandAction.tooltip||this._commandAction.label;let G=ie?Object(_.a)("titleAndKb","{0} ({1})",U,ie):U;if(!this._wantsAltCommand&&this._menuItemAction.alt){const J=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,he=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),xe=he&&he.getLabel(),Ie=xe?Object(_.a)("titleAndKb","{0} ({1})",J,xe):J;G+=`
|
|
|
[${d.c.modifierLabels[S.a].altKey}] ${Ie}`}this.label.title=G}}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(ee){var ie;this._itemClassDispose.value=void 0;const{element:U,label:G}=this;if(!U||!G)return;const J=this._commandAction.checked&&((ie=ee.toggled)===null||ie===void 0?void 0:ie.icon)?ee.toggled.icon:ee.icon;if(!J)return;if(O.d.isThemeIcon(J)){const he=O.d.asClassNameArray(J);G.classList.add(...he),this._itemClassDispose.value=Object(D.i)(()=>{G.classList.remove(...he)})}else J.light&&G.style.setProperty("--menu-entry-icon-light",Object(f.s)(J.light)),J.dark&&G.style.setProperty("--menu-entry-icon-dark",Object(f.s)(J.dark)),G.classList.add("icon"),this._itemClassDispose.value=Object(D.i)(()=>{G.classList.remove("icon"),G.style.removeProperty("--menu-entry-icon-light"),G.style.removeProperty("--menu-entry-icon-dark")})}};$=k([Y(2,E.a),Y(3,y.a),Y(4,h.b)],$);let te=class extends m{constructor(ee,ie,U){var G,J;const he=Object.assign({},ie!=null?ie:Object.create(null),{menuAsChild:(G=ie==null?void 0:ie.menuAsChild)!==null&&G!==void 0?G:!1,classNames:(J=ie==null?void 0:ie.classNames)!==null&&J!==void 0?J:O.d.isThemeIcon(ee.item.icon)?O.d.asClassName(ee.item.icon):void 0});super(ee,{getActions:()=>ee.actions},U,he)}render(ee){if(super.render(ee),this.element){ee.classList.add("menu-entry");const{icon:ie}=this._action.item;ie&&!O.d.isThemeIcon(ie)&&(this.element.classList.add("icon"),ie.light&&this.element.style.setProperty("--menu-entry-icon-light",Object(f.s)(ie.light)),ie.dark&&this.element.style.setProperty("--menu-entry-icon-dark",Object(f.s)(ie.dark)))}}};te=k([Y(2,c.a)],te);let ne=class extends x.b{constructor(ee,ie,U,G,J,he,xe,Ie){var Le,Te,ze;super(null,ee);this._keybindingService=U,this._notificationService=G,this._contextMenuService=J,this._menuService=he,this._instaService=xe,this._storageService=Ie,this._container=null,this._storageKey=`${ee.item.submenu._debugName}_lastActionId`;let ue,je=Ie.get(this._storageKey,1);je&&(ue=ee.actions.find(ve=>je===ve.id)),ue||(ue=ee.actions[0]),this._defaultAction=this._instaService.createInstance($,ue,void 0);const Pe=Object.assign({},ie!=null?ie:Object.create(null),{menuAsChild:(Le=ie==null?void 0:ie.menuAsChild)!==null&&Le!==void 0?Le:!0,classNames:(Te=ie==null?void 0:ie.classNames)!==null&&Te!==void 0?Te:["codicon","codicon-chevron-down"],actionRunner:(ze=ie==null?void 0:ie.actionRunner)!==null&&ze!==void 0?ze:new A.b});this._dropdown=new m(ee,ee.actions,this._contextMenuService,Pe),this._dropdown.actionRunner.onDidRun(ve=>{ve.action instanceof b.c&&this.update(ve.action)})}update(ee){this._storageService.store(this._storageKey,ee.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance($,ee,void 0),this._defaultAction.actionRunner=new class extends A.b{runAction(ie,U){return Q(this,void 0,void 0,function*(){yield ie.run(void 0)})}},this._container&&this._defaultAction.render(Object(f.P)(this._container,Object(f.a)(".action-container")))}setActionContext(ee){super.setActionContext(ee),this._defaultAction.setActionContext(ee),this._dropdown.setActionContext(ee)}render(ee){this._container=ee,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const ie=Object(f.a)(".action-container");this._defaultAction.render(Object(f.q)(this._container,ie)),this._register(Object(f.i)(ie,f.d.KEY_DOWN,G=>{const J=new B.a(G);J.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),J.stopPropagation())}));const U=Object(f.a)(".dropdown-action-container");this._dropdown.render(Object(f.q)(this._container,U)),this._register(Object(f.i)(U,f.d.KEY_DOWN,G=>{var J;const he=new B.a(G);he.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(J=this._defaultAction.element)===null||J===void 0||J.focus(),he.stopPropagation())}))}focus(ee){ee?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(ee){ee?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};ne=k([Y(2,E.a),Y(3,y.a),Y(4,c.a),Y(5,b.a),Y(6,p.a),Y(7,C.a)],ne);function Ee(fe,ee,ie){return ee instanceof b.c?fe.createInstance($,ee,void 0):ee instanceof b.e?ee.item.rememberDefaultAction?fe.createInstance(ne,ee,ie):fe.createInstance(te,ee,ie):void 0}},eizg:function(mt,M,t){},ep4t:function(mt,M,t){"use strict";t.r(M),t.d(M,"SuggestController",function(){return fi}),t.d(M,"TriggerSuggestAction",function(){return rn});var f=t("OBOq"),B=t("6OMU"),x=t("X+cX"),N=t("JQT/"),A=t("/cxE"),F=t("MI8n"),I=t("Szf2"),L=t("pmY6"),v=t("MNsG"),m=t("5Y4S"),d=t("746U"),D=t("vATl"),S=t("sswD"),r=t("0/Sa"),_=t("cGHE"),b=t("aokT"),h=t("wQH0"),c=t("tXSY"),p=t("uACm"),E=t("QDVR"),y=t("twdY"),C=t("+7oY"),O=t("9fML"),k=t("Cg/j"),Y=t("A+jI"),Q=function(ht,Ve,K,be){var Re=arguments.length,Be=Re<3?Ve:be===null?be=Object.getOwnPropertyDescriptor(Ve,K):be,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Be=Reflect.decorate(ht,Ve,K,be);else for(var vt=ht.length-1;vt>=0;vt--)(at=ht[vt])&&(Be=(Re<3?at(Be):Re>3?at(Ve,K,Be):at(Ve,K))||Be);return Re>3&&Be&&Object.defineProperty(Ve,K,Be),Be},H=function(ht,Ve){return function(K,be){Ve(K,be,ht)}};class Z{constructor(ht){this.name=ht}select(ht,Ve,K){if(K.length===0)return 0;let be=K[0].score[0];for(let Re=0;Re<K.length;Re++){const{score:Be,completion:at}=K[Re];if(Be[0]!==be)break;if(at.preselect)return Re}return 0}}class oe extends Z{constructor(){super("first")}memorize(ht,Ve,K){}toJSON(){return}fromJSON(){}}class $ extends Z{constructor(){super("recentlyUsed");this._cache=new E.a(300,.66),this._seq=0}memorize(ht,Ve,K){const be=`${ht.getLanguageId()}/${K.textLabel}`;this._cache.set(be,{touch:this._seq++,type:K.completion.kind,insertText:K.completion.insertText})}select(ht,Ve,K){if(K.length===0)return 0;const be=ht.getLineContent(Ve.lineNumber).substr(Ve.column-10,Ve.column-1);if(/\s$/.test(be))return super.select(ht,Ve,K);let Re=K[0].score[0],Be=-1,at=-1,vt=-1;for(let Gt=0;Gt<K.length&&!(K[Gt].score[0]!==Re);Gt++){const Bt=`${ht.getLanguageId()}/${K[Gt].textLabel}`,zt=this._cache.peek(Bt);if(zt&&zt.touch>vt&&zt.type===K[Gt].completion.kind&&zt.insertText===K[Gt].completion.insertText&&(vt=zt.touch,at=Gt),K[Gt].completion.preselect&&Be===-1)return Be=Gt}return at!==-1?at:Be!==-1?Be:0}toJSON(){return this._cache.toJSON()}fromJSON(ht){this._cache.clear();let Ve=0;for(const[K,be]of ht)be.touch=Ve,be.type=typeof be.type=="number"?be.type:Object(y.G)(be.type),this._cache.set(K,be);this._seq=this._cache.size}}class te extends Z{constructor(){super("recentlyUsedByPrefix");this._trie=E.c.forStrings(),this._seq=0}memorize(ht,Ve,K){const{word:be}=ht.getWordUntilPosition(Ve),Re=`${ht.getLanguageId()}/${be}`;this._trie.set(Re,{type:K.completion.kind,insertText:K.completion.insertText,touch:this._seq++})}select(ht,Ve,K){let{word:be}=ht.getWordUntilPosition(Ve);if(!be)return super.select(ht,Ve,K);let Re=`${ht.getLanguageId()}/${be}`,Be=this._trie.get(Re);if(Be||(Be=this._trie.findSubstr(Re)),Be)for(let at=0;at<K.length;at++){let{kind:vt,insertText:Gt}=K[at].completion;if(vt===Be.type&&Gt===Be.insertText)return at}return super.select(ht,Ve,K)}toJSON(){let ht=[];return this._trie.forEach((Ve,K)=>ht.push([K,Ve])),ht.sort((Ve,K)=>-(Ve[1].touch-K[1].touch)).forEach((Ve,K)=>Ve[1].touch=K),ht.slice(0,200)}fromJSON(ht){if(this._trie.clear(),ht.length>0){this._seq=ht[0][1].touch+1;for(const[Ve,K]of ht)K.type=typeof K.type=="number"?K.type:Object(y.G)(K.type),this._trie.set(Ve,K)}}}let ne=class ht{constructor(Ve,K){this._storageService=Ve,this._configService=K,this._disposables=new L.b,this._persistSoon=new x.e(()=>this._saveState(),500),this._disposables.add(Ve.onWillSaveState(be=>{be.reason===Y.c.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(Ve,K,be){this._withStrategy(Ve,K).memorize(Ve,K,be),this._persistSoon.schedule()}select(Ve,K,be){return this._withStrategy(Ve,K).select(Ve,K,be)}_withStrategy(Ve,K){var be;const Re=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:Ve.getLanguageIdAtPosition(K.lineNumber,K.column),resource:Ve.uri});if(((be=this._strategy)===null||be===void 0?void 0:be.name)!==Re){this._saveState();const Be=ht._strategyCtors.get(Re)||oe;this._strategy=new Be;try{const at=this._configService.getValue("editor.suggest.shareSuggestSelections"),vt=at?0:1,Gt=this._storageService.get(`${ht._storagePrefix}/${Re}`,vt);Gt&&this._strategy.fromJSON(JSON.parse(Gt))}catch(at){}}return this._strategy}_saveState(){if(this._strategy){const Ve=this._configService.getValue("editor.suggest.shareSuggestSelections"),K=Ve?0:1,be=JSON.stringify(this._strategy);this._storageService.store(`${ht._storagePrefix}/${this._strategy.name}`,be,K,1)}}};ne._strategyCtors=new Map([["recentlyUsedByPrefix",te],["recentlyUsed",$],["first",oe]]),ne._storagePrefix="suggest/memories",ne=Q([H(0,Y.a),H(1,C.a)],ne);const Ee=Object(k.c)("ISuggestMemories");Object(O.b)(Ee,ne,!0);var fe=t("T8No"),ee=function(ht,Ve,K,be){var Re=arguments.length,Be=Re<3?Ve:be===null?be=Object.getOwnPropertyDescriptor(Ve,K):be,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Be=Reflect.decorate(ht,Ve,K,be);else for(var vt=ht.length-1;vt>=0;vt--)(at=ht[vt])&&(Be=(Re<3?at(Be):Re>3?at(Ve,K,Be):at(Ve,K))||Be);return Re>3&&Be&&Object.defineProperty(Ve,K,Be),Be},ie=function(ht,Ve){return function(K,be){Ve(K,be,ht)}};let U=class ht{constructor(Ve,K){this._editor=Ve,this._enabled=!1,this._ckAtEnd=ht.AtEnd.bindTo(K),this._configListener=this._editor.onDidChangeConfiguration(be=>be.hasChanged(110)&&this._update()),this._update()}dispose(){var Ve;this._configListener.dispose(),(Ve=this._selectionListener)===null||Ve===void 0||Ve.dispose(),this._ckAtEnd.reset()}_update(){const Ve=this._editor.getOption(110)==="on";if(this._enabled===Ve)return;if(this._enabled=Ve,this._enabled){const K=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const be=this._editor.getModel(),Re=this._editor.getSelection(),Be=be.getWordAtPosition(Re.getStartPosition());if(!Be){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(Be.endColumn===Re.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(K),K()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};U.AtEnd=new fe.c("atEndOfWord",!1),U=ee([ie(1,fe.b)],U);var G=t("3/fG"),J=t("fjLI"),he=t("nnTU"),xe=t("nrhi"),Ie=t("09fa"),Le=t("QVNv"),Te=function(ht,Ve,K,be){var Re=arguments.length,Be=Re<3?Ve:be===null?be=Object.getOwnPropertyDescriptor(Ve,K):be,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Be=Reflect.decorate(ht,Ve,K,be);else for(var vt=ht.length-1;vt>=0;vt--)(at=ht[vt])&&(Be=(Re<3?at(Be):Re>3?at(Ve,K,Be):at(Ve,K))||Be);return Re>3&&Be&&Object.defineProperty(Ve,K,Be),Be},ze=function(ht,Ve){return function(K,be){Ve(K,be,ht)}};let ue=class ht{constructor(Ve,K){this._editor=Ve,this._index=0,this._ckOtherSuggestions=ht.OtherSuggestions.bindTo(K)}dispose(){this.reset()}reset(){var Ve;this._ckOtherSuggestions.reset(),(Ve=this._listener)===null||Ve===void 0||Ve.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:Ve,index:K},be){if(Ve.items.length===0){this.reset();return}let Re=ht._moveIndex(!0,Ve,K);if(Re===K){this.reset();return}this._acceptNext=be,this._model=Ve,this._index=K,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(Ve,K,be){let Re=be;for(;!(Re=(Re+K.items.length+(Ve?1:-1))%K.items.length,Re===be);)if(!K.items[Re].completion.additionalTextEdits)break;return Re}next(){this._move(!0)}prev(){this._move(!1)}_move(Ve){if(!this._model)return;try{this._ignore=!0,this._index=ht._moveIndex(Ve,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};ue.OtherSuggestions=new fe.c("hasOtherSuggestions",!1),ue=Te([ze(1,fe.b)],ue);var je=t("MXAL");class Pe{constructor(ht,Ve,K){this._disposables=new L.b,this._disposables.add(Ve.onDidShow(()=>this._onItem(Ve.getFocusedItem()))),this._disposables.add(Ve.onDidFocus(this._onItem,this)),this._disposables.add(Ve.onDidHide(this.reset,this)),this._disposables.add(ht.onWillType(be=>{if(this._active&&!Ve.isFrozen()){const Re=be.charCodeAt(be.length-1);this._active.acceptCharacters.has(Re)&&ht.getOption(0)&&K(this._active.item)}}))}_onItem(ht){if(!ht||!Object(B.n)(ht.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===ht.item)return;const Ve=new je.b;for(const K of ht.item.completion.commitCharacters)K.length>0&&Ve.add(K.charCodeAt(0));this._active={acceptCharacters:Ve,item:ht}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}var ve=t("N0LK"),ce=t("gCVg"),le=t("pAvP"),Ce=t("Z7SF"),ye=function(ht,Ve,K,be){function Re(Be){return Be instanceof K?Be:new K(function(at){at(Be)})}return new(K||(K=Promise))(function(Be,at){function vt(zt){try{Bt(be.next(zt))}catch(ro){at(ro)}}function Gt(zt){try{Bt(be.throw(zt))}catch(ro){at(ro)}}function Bt(zt){zt.done?Be(zt.value):Re(zt.value).then(vt,Gt)}Bt((be=be.apply(ht,Ve||[])).next())})};class ge{static create(ht,Ve){return ye(this,void 0,void 0,function*(){if(!Ve.getOption(105).localityBonus)return ge.None;if(!Ve.hasModel())return ge.None;const K=Ve.getModel(),be=Ve.getPosition();if(!ht.canComputeWordRanges(K.uri))return ge.None;const[Re]=yield new Ce.a().provideSelectionRanges(K,[be]);if(Re.length===0)return ge.None;const Be=yield ht.computeWordRanges(K.uri,Re[0].range);if(!Be)return ge.None;const at=K.getWordUntilPosition(be);return delete Be[at.word],new class extends ge{distance(vt,Gt){if(!be.equals(Ve.getPosition()))return 0;if(Gt.kind===17)return 2<<20;let Bt=typeof Gt.label=="string"?Gt.label:Gt.label.label,zt=Be[Bt];if(Object(B.m)(zt))return 2<<20;let ro=Object(B.d)(zt,b.a.fromPositions(vt),b.a.compareRangesUsingStarts),P=ro>=0?zt[ro]:zt[Math.max(0,~ro-1)],q=Re.length;for(const Ae of Re){if(!b.a.containsRange(Ae.range,P))break;q-=1}return q}}})}}ge.None=new class extends ge{distance(){return 0}};var Me=t("9XeP"),De=t("XXUj"),we=t("fpMC");class Oe{constructor(ht,Ve){this.leadingLineContent=ht,this.characterCountDelta=Ve}}class nt{constructor(ht,Ve,K,be,Re,Be,at){this.clipboardText=at,this._snippetCompareFn=nt._compareCompletionItems,this._items=ht,this._column=Ve,this._wordDistance=be,this._options=Re,this._refilterKind=1,this._lineContext=K,Be==="top"?this._snippetCompareFn=nt._compareCompletionItemsSnippetsUp:Be==="bottom"&&(this._snippetCompareFn=nt._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(ht){(this._lineContext.leadingLineContent!==ht.leadingLineContent||this._lineContext.characterCountDelta!==ht.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<ht.characterCountDelta&&this._filteredItems?2:1,this._lineContext=ht)}get items(){return this._ensureCachedState(),this._filteredItems}get allProvider(){return this._ensureCachedState(),this._providerInfo.keys()}get incomplete(){this._ensureCachedState();const ht=new Set;for(let[Ve,K]of this._providerInfo)K&&ht.add(Ve);return ht}adopt(ht){let Ve=[];for(let K=0;K<this._items.length;)ht.has(this._items[K].provider)?K++:(Ve.push(this._items[K]),this._items[K]=this._items[this._items.length-1],this._items.pop());return this._refilterKind=1,Ve}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._providerInfo=new Map;const ht=[],{leadingLineContent:Ve,characterCountDelta:K}=this._lineContext;let be="",Re="";const Be=this._refilterKind===1?this._items:this._filteredItems,at=[],vt=!this._options.filterGraceful||Be.length>2e3?we.d:we.e;for(let Gt=0;Gt<Be.length;Gt++){const Bt=Be[Gt];if(Bt.isInvalid)continue;this._providerInfo.set(Bt.provider,Boolean(Bt.container.incomplete));const zt=Bt.position.column-Bt.editStart.column,ro=zt+K-(Bt.position.column-this._column);if(be.length!==ro&&(be=ro===0?"":Ve.slice(-ro),Re=be.toLowerCase()),Bt.word=be,ro===0)Bt.score=we.a.Default;else{let P=0;for(;P<zt;){const q=be.charCodeAt(P);if(q===32||q===9)P+=1;else break}if(P>=ro)Bt.score=we.a.Default;else if(typeof Bt.completion.filterText=="string"){let q=vt(be,Re,P,Bt.completion.filterText,Bt.filterTextLow,0,!1);if(!q)continue;Object(ve.g)(Bt.completion.filterText,Bt.textLabel)===0?Bt.score=q:(Bt.score=Object(we.b)(be,Re,P,Bt.textLabel,Bt.labelLow,0),Bt.score[0]=q[0])}else{let q=vt(be,Re,P,Bt.textLabel,Bt.labelLow,0,!1);if(!q)continue;Bt.score=q}}Bt.idx=Gt,Bt.distance=this._wordDistance.distance(Bt.position,Bt.completion),at.push(Bt),ht.push(Bt.textLabel.length)}this._filteredItems=at.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:ht.length?Object(B.q)(ht.length-.85,ht,(Gt,Bt)=>Gt-Bt):0}}static _compareCompletionItems(ht,Ve){return ht.score[0]>Ve.score[0]?-1:ht.score[0]<Ve.score[0]?1:ht.distance<Ve.distance?-1:ht.distance>Ve.distance?1:ht.idx<Ve.idx?-1:ht.idx>Ve.idx?1:0}static _compareCompletionItemsSnippetsDown(ht,Ve){if(ht.completion.kind!==Ve.completion.kind){if(ht.completion.kind===27)return 1;if(Ve.completion.kind===27)return-1}return nt._compareCompletionItems(ht,Ve)}static _compareCompletionItemsSnippetsUp(ht,Ve){if(ht.completion.kind!==Ve.completion.kind){if(ht.completion.kind===27)return-1;if(Ve.completion.kind===27)return 1}return nt._compareCompletionItems(ht,Ve)}}var Ke=function(ht,Ve,K,be){var Re=arguments.length,Be=Re<3?Ve:be===null?be=Object.getOwnPropertyDescriptor(Ve,K):be,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Be=Reflect.decorate(ht,Ve,K,be);else for(var vt=ht.length-1;vt>=0;vt--)(at=ht[vt])&&(Be=(Re<3?at(Be):Re>3?at(Ve,K,Be):at(Ve,K))||Be);return Re>3&&Be&&Object.defineProperty(Ve,K,Be),Be},et=function(ht,Ve){return function(K,be){Ve(K,be,ht)}},bt=function(ht,Ve,K,be){function Re(Be){return Be instanceof K?Be:new K(function(at){at(Be)})}return new(K||(K=Promise))(function(Be,at){function vt(zt){try{Bt(be.next(zt))}catch(ro){at(ro)}}function Gt(zt){try{Bt(be.throw(zt))}catch(ro){at(ro)}}function Bt(zt){zt.done?Be(zt.value):Re(zt.value).then(vt,Gt)}Bt((be=be.apply(ht,Ve||[])).next())})};class Tt{constructor(ht,Ve,K,be){this.leadingLineContent=ht.getLineContent(Ve.lineNumber).substr(0,Ve.column-1),this.leadingWord=ht.getWordUntilPosition(Ve),this.lineNumber=Ve.lineNumber,this.column=Ve.column,this.auto=K,this.shy=be}static shouldAutoTrigger(ht){if(!ht.hasModel())return!1;const Ve=ht.getModel(),K=ht.getPosition();Ve.tokenizeIfCheap(K.lineNumber);const be=Ve.getWordAtPosition(K);return be?be.endColumn!==K.column?!1:!!isNaN(Number(be.word)):!1}}function $t(ht){return ht.getOption(105).preview}function Xe(ht,Ve,K){if(!Boolean(Ve.getContextKeyValue("inlineSuggestionVisible")))return!0;const be=K.getValue("editor.inlineSuggest.allowQuickSuggestions");return be!==void 0?Boolean(be):!1}function it(ht,Ve,K){if(!Boolean(Ve.getContextKeyValue("inlineSuggestionVisible")))return!0;const be=K.getValue("editor.inlineSuggest.allowSuggestOnTriggerCharacters");return be!==void 0?Boolean(be):!1}let re=class ht{constructor(Ve,K,be,Re,Be,at,vt){this._editor=Ve,this._editorWorkerService=K,this._clipboardService=be,this._telemetryService=Re,this._logService=Be,this._contextKeyService=at,this._configurationService=vt,this._toDispose=new L.b,this._quickSuggestDelay=10,this._triggerCharacterListener=new L.b,this._triggerQuickSuggest=new x.g,this._state=0,this._completionDisposables=new L.b,this._onDidCancel=new F.b,this._onDidTrigger=new F.b,this._onDidSuggest=new F.b,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new ce.a(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters(),this._updateQuickSuggest()})),this._toDispose.add(y.d.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(Bt=>{this._onCursorChange(Bt)}));let Gt=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{Gt=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{Gt=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{Gt||this._refilterCompletionItems()})),this._updateTriggerCharacters(),this._updateQuickSuggest()}dispose(){Object(L.f)(this._triggerCharacterListener),Object(L.f)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateQuickSuggest(){this._quickSuggestDelay=this._editor.getOption(79),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&this._quickSuggestDelay!==0||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(80)||!this._editor.hasModel()||!this._editor.getOption(108))return;const Ve=new Map;for(const be of y.d.all(this._editor.getModel()))for(const Re of be.triggerCharacters||[]){let Be=Ve.get(Re);Be||(Be=new Set,Be.add(Object(Le.c)()),Ve.set(Re,Be)),Be.add(be)}const K=be=>{if(!it(this._editor,this._contextKeyService,this._configurationService))return;if(Tt.shouldAutoTrigger(this._editor))return;if(!be){const at=this._editor.getPosition(),vt=this._editor.getModel();be=vt.getLineContent(at.lineNumber).substr(0,at.column-1)}let Re="";Object(ve.F)(be.charCodeAt(be.length-1))?Object(ve.E)(be.charCodeAt(be.length-2))&&(Re=be.substr(be.length-2)):Re=be.charAt(be.length-1);const Be=Ve.get(Re);if(Be){const at=this._completionModel?{items:this._completionModel.adopt(Be),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,triggerCharacter:Re},Boolean(this._completionModel),Be,at)}};this._triggerCharacterListener.add(this._editor.onDidType(K)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(K))}get state(){return this._state}cancel(Ve=!1){var K;this._state!==0&&(this._triggerQuickSuggest.cancel(),(K=this._requestToken)===null||K===void 0||K.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:Ve}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._state!==0&&(!this._editor.hasModel()||!y.d.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._state===2,shy:!1},!0))}_onCursorChange(Ve){if(!this._editor.hasModel())return;const K=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!Ve.selection.isEmpty()||Ve.reason!==0&&Ve.reason!==3||Ve.source!=="keyboard"&&Ve.source!=="deleteLeft"){this.cancel();return}this._state===0&&Ve.reason===0?(K.containsRange(this._currentSelection)||K.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._state!==0&&Ve.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._state===0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){if(this._editor.getOption(78)===!1)return;if(this._editor.getOption(105).snippetsPreventQuickSuggestions&&c.SnippetController2.get(this._editor).isInSnippet())return;this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._state!==0)return;if(!Tt.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel())return;const Ve=this._editor.getModel(),K=this._editor.getPosition(),be=this._editor.getOption(78);if(be===!1)return;if(!(be===!0)){Ve.tokenizeIfCheap(K.lineNumber);const Re=Ve.getLineTokens(K.lineNumber),Be=Re.getStandardTokenType(Re.findTokenIndexAtOffset(Math.max(K.column-1-1,0))),at=be.other&&Be===0||be.comments&&Be===1||be.strings&&Be===2;if(!at)return}if(!Xe(this._editor,this._contextKeyService,this._configurationService))return;if(!y.d.has(Ve))return;this.trigger({auto:!0,shy:!1})},this._quickSuggestDelay)}_refilterCompletionItems(){Promise.resolve().then(()=>{if(this._state===0)return;if(!this._editor.hasModel())return;const Ve=this._editor.getModel(),K=this._editor.getPosition(),be=new Tt(Ve,K,this._state===2,!1);this._onNewContext(be)})}trigger(Ve,K=!1,be,Re){var Be;if(!this._editor.hasModel())return;const at=this._editor.getModel(),vt=Ve.auto,Gt=new Tt(at,this._editor.getPosition(),vt,Ve.shy);this.cancel(K),this._state=vt?2:1,this._onDidTrigger.fire({auto:vt,shy:Ve.shy,position:this._editor.getPosition()}),this._context=Gt;let Bt={triggerKind:(Be=Ve.triggerKind)!==null&&Be!==void 0?Be:0};Ve.triggerCharacter&&(Bt={triggerKind:1,triggerCharacter:Ve.triggerCharacter}),this._requestToken=new N.b;const zt=this._editor.getOption(100);let ro=1;switch(zt){case"top":ro=0;break;case"bottom":ro=2;break}const{itemKind:P,showDeprecated:q}=ht._createSuggestFilter(this._editor),Ae=ge.create(this._editorWorkerService,this._editor),Ge=Object(Le.e)(at,this._editor.getPosition(),new Le.a(ro,P,be,q),Bt,this._requestToken.token);Promise.all([Ge,Ae]).then(([ft,Dt])=>bt(this,void 0,void 0,function*(){var jt;if((jt=this._requestToken)===null||jt===void 0||jt.dispose(),!this._editor.hasModel())return;let Xt=Re==null?void 0:Re.clipboardText;if(!Xt&&ft.needsClipboard&&(Xt=yield this._clipboardService.readText()),this._state===0)return;const uo=this._editor.getModel();let io=ft.items;if(Re){const mo=Object(Le.d)(ro);io=io.concat(Re.items).sort(mo)}const ho=new Tt(uo,this._editor.getPosition(),vt,Ve.shy);this._completionModel=new nt(io,this._context.column,{leadingLineContent:ho.leadingLineContent,characterCountDelta:ho.column-this._context.column},Dt,this._editor.getOption(105),this._editor.getOption(100),Xt),this._completionDisposables.add(ft.disposable),this._onNewContext(ho),this._reportDurationsTelemetry(ft.durations)})).catch(A.f)}_reportDurationsTelemetry(Ve){if(this._telemetryGate++%230!==0)return;setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(Ve)}),this._logService.debug("suggest.durations.json",Ve)})}static _createSuggestFilter(Ve){const K=new Set,be=Ve.getOption(100);be==="none"&&K.add(27);const Re=Ve.getOption(105);return Re.showMethods||K.add(0),Re.showFunctions||K.add(1),Re.showConstructors||K.add(2),Re.showFields||K.add(3),Re.showVariables||K.add(4),Re.showClasses||K.add(5),Re.showStructs||K.add(6),Re.showInterfaces||K.add(7),Re.showModules||K.add(8),Re.showProperties||K.add(9),Re.showEvents||K.add(10),Re.showOperators||K.add(11),Re.showUnits||K.add(12),Re.showValues||K.add(13),Re.showConstants||K.add(14),Re.showEnums||K.add(15),Re.showEnumMembers||K.add(16),Re.showKeywords||K.add(17),Re.showWords||K.add(18),Re.showColors||K.add(19),Re.showFiles||K.add(20),Re.showReferences||K.add(21),Re.showColors||K.add(22),Re.showFolders||K.add(23),Re.showTypeParameters||K.add(24),Re.showSnippets||K.add(27),Re.showUsers||K.add(25),Re.showIssues||K.add(26),{itemKind:K,showDeprecated:Re.showDeprecated}}_onNewContext(Ve){if(!this._context)return;if(Ve.lineNumber!==this._context.lineNumber){this.cancel();return}if(Object(ve.x)(Ve.leadingLineContent)!==Object(ve.x)(this._context.leadingLineContent)){this.cancel();return}if(Ve.column<this._context.column){Ve.leadingWord.word?this.trigger({auto:this._context.auto,shy:!1},!0):this.cancel();return}if(!this._completionModel)return;if(Ve.leadingWord.word.length!==0&&Ve.leadingWord.startColumn>this._context.leadingWord.startColumn){const K=new Set(y.d.all(this._editor.getModel()));for(let Re of this._completionModel.allProvider)K.delete(Re);const be=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,K,{items:be,clipboardText:this._completionModel.clipboardText});return}if(Ve.column>this._context.column&&this._completionModel.incomplete.size>0&&Ve.leadingWord.word.length!==0){const{incomplete:K}=this._completionModel,be=this._completionModel.adopt(K);this.trigger({auto:this._state===2,shy:!1,triggerKind:2},!0,K,{items:be,clipboardText:this._completionModel.clipboardText})}else{let K=this._completionModel.lineContext,be=!1;if(this._completionModel.lineContext={leadingLineContent:Ve.leadingLineContent,characterCountDelta:Ve.column-this._context.column},this._completionModel.items.length===0){if(Tt.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn<Ve.leadingWord.startColumn){this.trigger({auto:this._context.auto,shy:!1},!0);return}if(this._context.auto){this.cancel();return}else if(this._completionModel.lineContext=K,be=this._completionModel.items.length>0,be&&Ve.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:be})}}};re=Ke([et(1,le.a),et(2,Me.a),et(3,De.a),et(4,Ie.b),et(5,fe.b),et(6,C.a)],re);class We{constructor(ht,Ve){this._disposables=new L.b,this._lastOvertyped=[],this._empty=!0,this._disposables.add(ht.onWillType(()=>{if(!this._empty)return;if(!ht.hasModel())return;const K=ht.getSelections(),be=K.length;let Re=!1;for(let at=0;at<be;at++)if(!K[at].isEmpty()){Re=!0;break}if(!Re)return;this._lastOvertyped=[];const Be=ht.getModel();for(let at=0;at<be;at++){const vt=K[at];if(Be.getValueLengthInRange(vt)>We._maxSelectionLength)return;this._lastOvertyped[at]={value:Be.getValueInRange(vt),multiline:vt.startLineNumber!==vt.endLineNumber}}this._empty=!1})),this._disposables.add(Ve.onDidCancel(K=>{!this._empty&&!K.retrigger&&(this._empty=!0)}))}getLastOvertypedInfo(ht){return!this._empty&&ht>=0&&ht<this._lastOvertyped.length?this._lastOvertyped[ht]:void 0}dispose(){this._disposables.dispose()}}We._maxSelectionLength=51200;var tt=t("EffR"),Et=t("udvx"),It=t("cqdO"),Rt=t("Sdnv"),vo=t("CClx"),Mo=t("03kh"),xo=t("WqXY"),Do=t("eUTo"),Lo=function(ht,Ve,K,be){var Re=arguments.length,Be=Re<3?Ve:be===null?be=Object.getOwnPropertyDescriptor(Ve,K):be,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Be=Reflect.decorate(ht,Ve,K,be);else for(var vt=ht.length-1;vt>=0;vt--)(at=ht[vt])&&(Be=(Re<3?at(Be):Re>3?at(Ve,K,Be):at(Ve,K))||Be);return Re>3&&Be&&Object.defineProperty(Ve,K,Be),Be},To=function(ht,Ve){return function(K,be){Ve(K,be,ht)}};class Ht extends Do.a{updateLabel(){const ht=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!ht)return super.updateLabel();this.label&&(this.label.textContent=Object(G.a)("ddd","{0} ({1})",this._action.label,Ht.symbolPrintEnter(ht)))}static symbolPrintEnter(ht){var Ve;return(Ve=ht.getLabel())===null||Ve===void 0?void 0:Ve.replace(/\benter\b/gi,"\u23CE")}}let Mt=class{constructor(Ve,K,be,Re){this._menuService=be,this._contextKeyService=Re,this._menuDisposables=new L.b,this.element=tt.q(Ve,tt.a(".suggest-status-bar"));const Be=at=>at instanceof J.c?K.createInstance(Ht,at,void 0):void 0;this._leftActions=new xo.a(this.element,{actionViewItemProvider:Be}),this._rightActions=new xo.a(this.element,{actionViewItemProvider:Be}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const Ve=this._menuService.createMenu(Le.g,this._contextKeyService),K=()=>{const be=[],Re=[];for(let[Be,at]of Ve.getActions())Be==="left"?be.push(...at):Re.push(...at);this._leftActions.clear(),this._leftActions.push(be),this._rightActions.clear(),this._rightActions.push(Re)};this._menuDisposables.add(Ve.onDidChange(()=>K())),this._menuDisposables.add(Ve)}hide(){this._menuDisposables.clear()}};Mt=Lo([To(1,k.a),To(2,J.a),To(3,fe.b)],Mt);var Ue=t("28lO"),dt=t("MD5Z"),Ut=t("ptcw"),Ye=t("t9D7"),qe=t("cMOf");class ct{constructor(){this._onDidWillResize=new F.b,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new F.b,this.onDidResize=this._onDidResize.event,this._sashListener=new L.b,this._size=new tt.b(0,0),this._minSize=new tt.b(0,0),this._maxSize=new tt.b(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new qe.b(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new qe.b(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new qe.b(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:qe.a.North}),this._southSash=new qe.b(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:qe.a.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let ht,Ve=0,K=0;this._sashListener.add(F.c.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{ht===void 0&&(this._onDidWillResize.fire(),ht=this._size,Ve=0,K=0)})),this._sashListener.add(F.c.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{ht!==void 0&&(ht=void 0,Ve=0,K=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(be=>{ht&&(K=be.currentX-be.startX,this.layout(ht.height+Ve,ht.width+K),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(be=>{ht&&(K=-(be.currentX-be.startX),this.layout(ht.height+Ve,ht.width+K),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(be=>{ht&&(Ve=-(be.currentY-be.startY),this.layout(ht.height+Ve,ht.width+K),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(be=>{ht&&(Ve=be.currentY-be.startY,this.layout(ht.height+Ve,ht.width+K),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(F.c.any(this._eastSash.onDidReset,this._westSash.onDidReset)(be=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(F.c.any(this._northSash.onDidReset,this._southSash.onDidReset)(be=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(ht,Ve,K,be){this._northSash.state=ht?3:0,this._eastSash.state=Ve?3:0,this._southSash.state=K?3:0,this._westSash.state=be?3:0}layout(ht=this.size.height,Ve=this.size.width){const{height:K,width:be}=this._minSize,{height:Re,width:Be}=this._maxSize;ht=Math.max(K,Math.min(Re,ht)),Ve=Math.max(be,Math.min(Be,Ve));const at=new tt.b(Ve,ht);tt.b.equals(at,this._size)||(this.domNode.style.height=ht+"px",this.domNode.style.width=Ve+"px",this._size=at,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(ht){this._maxSize=ht}get maxSize(){return this._maxSize}set minSize(ht){this._minSize=ht}get minSize(){return this._minSize}set preferredSize(ht){this._preferredSize=ht}get preferredSize(){return this._preferredSize}}var _t=t("D3Dy"),Pt=t("GJhM"),Wt=t("Vhoy"),Vt=t("eLzo"),so=t("v6HE"),wo=t("/UlZ"),No=function(ht,Ve,K,be){var Re=arguments.length,Be=Re<3?Ve:be===null?be=Object.getOwnPropertyDescriptor(Ve,K):be,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Be=Reflect.decorate(ht,Ve,K,be);else for(var vt=ht.length-1;vt>=0;vt--)(at=ht[vt])&&(Be=(Re<3?at(Be):Re>3?at(Ve,K,Be):at(Ve,K))||Be);return Re>3&&Be&&Object.defineProperty(Ve,K,Be),Be},di=function(ht,Ve){return function(K,be){Ve(K,be,ht)}};function _o(ht){return!!ht&&Boolean(ht.completion.documentation||ht.completion.detail&&ht.completion.detail!==ht.completion.label)}let no=class{constructor(Ve,K){this._editor=Ve,this._onDidClose=new F.b,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new F.b,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new L.b,this._renderDisposeable=new L.b,this._borderWidth=1,this._size=new tt.b(330,0),this.domNode=tt.a(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=K.createInstance(so.a,{editor:Ve}),this._body=tt.a(".body"),this._scrollbar=new Pt.a(this._body,{}),tt.q(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=tt.q(this._body,tt.a(".header")),this._close=tt.q(this._header,tt.a("span"+Wt.b.close.cssSelector)),this._close.title=G.a("details.close","Close"),this._type=tt.q(this._header,tt.a("p.type")),this._docs=tt.q(this._body,tt.a("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(be=>{be.hasChanged(43)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const Ve=this._editor.getOptions(),K=Ve.get(43),be=K.getMassagedFontFamily(_t.h?wo.c.fontFamily:null),Re=Ve.get(106)||K.fontSize,Be=Ve.get(107)||K.lineHeight,at=K.fontWeight,vt=`${Re}px`,Gt=`${Be}px`;this.domNode.style.fontSize=vt,this.domNode.style.lineHeight=`${Be/Re}`,this.domNode.style.fontWeight=at,this.domNode.style.fontFeatureSettings=K.fontFeatureSettings,this._type.style.fontFamily=be,this._close.style.height=Gt,this._close.style.width=Gt}getLayoutInfo(){const Ve=this._editor.getOption(107)||this._editor.getOption(43).lineHeight,K=this._borderWidth,be=K*2;return{lineHeight:Ve,borderWidth:K,borderHeight:be,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=G.a("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(Ve,K){var be,Re;this._renderDisposeable.clear();let{detail:Be,documentation:at}=Ve.completion;if(K){let vt="";vt+=`score: ${Ve.score[0]}
|
|
|
`,vt+=`prefix: ${(be=Ve.word)!==null&&be!==void 0?be:"(no prefix)"}
|
|
|
`,vt+=`word: ${Ve.completion.filterText?Ve.completion.filterText+" (filterText)":Ve.textLabel}
|
|
|
`,vt+=`distance: ${Ve.distance} (localityBonus-setting)
|
|
|
`,vt+=`index: ${Ve.idx}, based on ${Ve.completion.sortText&&`sortText: "${Ve.completion.sortText}"`||"label"}
|
|
|
`,vt+=`commit_chars: ${(Re=Ve.completion.commitCharacters)===null||Re===void 0?void 0:Re.join("")}
|
|
|
`,at=new Vt.a().appendCodeblock("empty",vt),Be=`Provider: ${Ve.provider._debugDisplayName}`}if(!K&&!_o(Ve)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),Be){const vt=Be.length>1e5?`${Be.substr(0,1e5)}\u2026`:Be;this._type.textContent=vt,this._type.title=vt,tt.W(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(vt))}else tt.t(this._type),this._type.title="",tt.K(this._type),this.domNode.classList.add("no-type");if(tt.t(this._docs),typeof at=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=at;else if(at){this._docs.classList.add("markdown-docs"),tt.t(this._docs);const vt=this._markdownRenderer.render(at);this._docs.appendChild(vt.element),this._renderDisposeable.add(vt),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=vt=>{vt.preventDefault(),vt.stopPropagation()},this._close.onclick=vt=>{vt.preventDefault(),vt.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(Ve,K){const be=new tt.b(Ve,K);tt.b.equals(be,this._size)||(this._size=be,tt.X(this.domNode,Ve,K)),this._scrollbar.scanDomNode()}scrollDown(Ve=8){this._body.scrollTop+=Ve}scrollUp(Ve=8){this._body.scrollTop-=Ve}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(Ve){this._borderWidth=Ve}get borderWidth(){return this._borderWidth}};no=No([di(1,k.a)],no);class Lt{constructor(ht,Ve){this.widget=ht,this._editor=Ve,this._disposables=new L.b,this._added=!1,this._resizable=new ct,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(ht.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let K,be,Re=0,Be=0;this._disposables.add(this._resizable.onDidWillResize(()=>{K=this._topLeft,be=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(at=>{if(K&&be){this.widget.layout(at.dimension.width,at.dimension.height);let vt=!1;at.west&&(Be=be.width-at.dimension.width,vt=!0),at.north&&(Re=be.height-at.dimension.height,vt=!0),vt&&this._applyTopLeft({top:K.top+Re,left:K.left+Be})}at.done&&(K=void 0,be=void 0,Re=0,Be=0,this._userSize=at.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var at;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(at=this._userSize)!==null&&at!==void 0?at:this.widget.size)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(ht=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),ht&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(ht){var Ve;const K=tt.D(ht);this._anchorBox=K,this._placeAtAnchor(this._anchorBox,(Ve=this._userSize)!==null&&Ve!==void 0?Ve:this.widget.size)}_placeAtAnchor(ht,Ve){var K;const be=tt.z(document.body),Re=this.widget.getLayoutInfo(),Be=new tt.b(220,2*Re.lineHeight),at=ht.top,vt=function(){const Dt=be.width-(ht.left+ht.width+Re.borderWidth+Re.horizontalPadding),jt=-Re.borderWidth+ht.left+ht.width,Xt=new tt.b(Dt,be.height-ht.top-Re.borderHeight-Re.verticalPadding),uo=Xt.with(void 0,ht.top+ht.height-Re.borderHeight-Re.verticalPadding);return{top:at,left:jt,fit:Dt-Ve.width,maxSizeTop:Xt,maxSizeBottom:uo,minSize:Be.with(Math.min(Dt,Be.width))}}(),Gt=function(){const Dt=ht.left-Re.borderWidth-Re.horizontalPadding,jt=Math.max(Re.horizontalPadding,ht.left-Ve.width-Re.borderWidth),Xt=new tt.b(Dt,be.height-ht.top-Re.borderHeight-Re.verticalPadding),uo=Xt.with(void 0,ht.top+ht.height-Re.borderHeight-Re.verticalPadding);return{top:at,left:jt,fit:Dt-Ve.width,maxSizeTop:Xt,maxSizeBottom:uo,minSize:Be.with(Math.min(Dt,Be.width))}}(),Bt=function(){const Dt=ht.left,jt=-Re.borderWidth+ht.top+ht.height,Xt=new tt.b(ht.width-Re.borderHeight,be.height-ht.top-ht.height-Re.verticalPadding);return{top:jt,left:Dt,fit:Xt.height-Ve.height,maxSizeBottom:Xt,maxSizeTop:Xt,minSize:Be.with(Xt.width)}}(),zt=[vt,Gt,Bt],ro=(K=zt.find(Dt=>Dt.fit>=0))!==null&&K!==void 0?K:zt.sort((Dt,jt)=>jt.fit-Dt.fit)[0],P=ht.top+ht.height-Re.borderHeight;let q,Ae=Ve.height;const Ge=Math.max(ro.maxSizeTop.height,ro.maxSizeBottom.height);Ae>Ge&&(Ae=Ge);let ft;Ae<=ro.maxSizeTop.height?(q=!0,ft=ro.maxSizeTop):(q=!1,ft=ro.maxSizeBottom),this._applyTopLeft({left:ro.left,top:q?ro.top:P-Ae}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!q,ro===vt,q,ro!==vt),this._resizable.minSize=ro.minSize,this._resizable.maxSize=ft,this._resizable.layout(Ae,Math.min(ft.width,Ve.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(ht){this._topLeft=ht,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var xt=t("xONI"),Nt=t("bY76"),rt=t("tYmi"),lt=t("gslv"),pt=t("MqQJ"),St;(function(ht){ht[ht.FILE=0]="FILE",ht[ht.FOLDER=1]="FOLDER",ht[ht.ROOT_FOLDER=2]="ROOT_FOLDER"})(St||(St={}));function Qt(ht,Ve,K,be){const Re=be===St.ROOT_FOLDER?["rootfolder-icon"]:be===St.FOLDER?["folder-icon"]:["file-icon"];if(K){let Be;if(K.scheme===rt.c.data){const at=lt.a.parseMetaData(K);Be=at.get(lt.a.META_DATA_LABEL)}else Be=qt(Object(lt.c)(K).toLowerCase());if(be===St.FOLDER)Re.push(`${Be}-name-folder-icon`);else{if(Be){if(Re.push(`${Be}-name-file-icon`),Be.length<=255){const vt=Be.split(".");for(let Gt=1;Gt<vt.length;Gt++)Re.push(`${vt.slice(Gt).join(".")}-ext-file-icon`)}Re.push("ext-file-icon")}const at=bo(ht,Ve,K);at&&Re.push(`${qt(at)}-lang-file-icon`)}}return Re}function bo(ht,Ve,K){if(!K)return null;let be=null;if(K.scheme===rt.c.data){const Re=lt.a.parseMetaData(K),Be=Re.get(lt.a.META_DATA_MIME);Be&&(be=Ve.getModeId(Be))}else{const Re=ht.getModel(K);Re&&(be=Re.getLanguageId())}return be&&be!==pt.b?be:Ve.getModeIdByFilepathOrFirstLine(K)}function qt(ht){return ht.replace(/[\11\12\14\15\40]/g,"/")}var Eo=t("G2kB"),Ro=t("WBhO"),zo=t("v1vZ"),Bo=function(ht,Ve,K,be){var Re=arguments.length,Be=Re<3?Ve:be===null?be=Object.getOwnPropertyDescriptor(Ve,K):be,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Be=Reflect.decorate(ht,Ve,K,be);else for(var vt=ht.length-1;vt>=0;vt--)(at=ht[vt])&&(Be=(Re<3?at(Be):Re>3?at(Ve,K,Be):at(Ve,K))||Be);return Re>3&&Be&&Object.defineProperty(Ve,K,Be),Be},Jt=function(ht,Ve){return function(K,be){Ve(K,be,ht)}},fo;function ri(ht){return`suggest-aria-id:${ht}`}const Zo=Object(zo.b)("suggest-more-info",Wt.b.chevronRight,G.a("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),ci=new(fo=class ht{extract(Ve,K){if(Ve.textLabel.match(ht._regexStrict))return K[0]=Ve.textLabel,!0;if(Ve.completion.detail&&Ve.completion.detail.match(ht._regexStrict))return K[0]=Ve.completion.detail,!0;if(typeof Ve.completion.documentation=="string"){const be=ht._regexRelaxed.exec(Ve.completion.documentation);if(be&&(be.index===0||be.index+be[0].length===Ve.completion.documentation.length))return K[0]=be[0],!0}return!1}},fo._regexRelaxed=/(#([\da-fA-F]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))/,fo._regexStrict=new RegExp(`^${fo._regexRelaxed.source}$`,"i"),fo);let ki=class{constructor(Ve,K,be,Re){this._editor=Ve,this._modelService=K,this._modeService=be,this._themeService=Re,this._onDidToggleDetails=new F.b,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(Ve){const K=Object.create(null);K.disposables=new L.b,K.root=Ve,K.root.classList.add("show-file-icons"),K.icon=Object(tt.q)(Ve,Object(tt.a)(".icon")),K.colorspan=Object(tt.q)(K.icon,Object(tt.a)("span.colorspan"));const be=Object(tt.q)(Ve,Object(tt.a)(".contents")),Re=Object(tt.q)(be,Object(tt.a)(".main"));K.iconContainer=Object(tt.q)(Re,Object(tt.a)(".icon-label.codicon")),K.left=Object(tt.q)(Re,Object(tt.a)("span.left")),K.right=Object(tt.q)(Re,Object(tt.a)("span.right")),K.iconLabel=new xt.a(K.left,{supportHighlights:!0,supportIcons:!0}),K.disposables.add(K.iconLabel),K.parametersLabel=Object(tt.q)(K.left,Object(tt.a)("span.signature-label")),K.qualifierLabel=Object(tt.q)(K.left,Object(tt.a)("span.qualifier-label")),K.detailsLabel=Object(tt.q)(K.right,Object(tt.a)("span.details-label")),K.readMore=Object(tt.q)(K.right,Object(tt.a)("span.readMore"+Ye.d.asCSSSelector(Zo))),K.readMore.title=G.a("readMore","Read More");const Be=()=>{const at=this._editor.getOptions(),vt=at.get(43),Gt=vt.getMassagedFontFamily(_t.h?wo.c.fontFamily:null),Bt=vt.fontFeatureSettings,zt=at.get(106)||vt.fontSize,ro=at.get(107)||vt.lineHeight,P=vt.fontWeight,q=`${zt}px`,Ae=`${ro}px`;K.root.style.fontSize=q,K.root.style.fontWeight=P,Re.style.fontFamily=Gt,Re.style.fontFeatureSettings=Bt,Re.style.lineHeight=Ae,K.icon.style.height=Ae,K.icon.style.width=Ae,K.readMore.style.height=Ae,K.readMore.style.width=Ae};return Be(),K.disposables.add(this._editor.onDidChangeConfiguration(at=>{(at.hasChanged(43)||at.hasChanged(106)||at.hasChanged(107))&&Be()})),K}renderElement(Ve,K,be){const{completion:Re}=Ve;be.root.id=ri(K),be.colorspan.style.backgroundColor="";const Be={labelEscapeNewLines:!0,matches:Object(we.c)(Ve.score)};let at=[];if(Re.kind===19&&ci.extract(Ve,at))be.icon.className="icon customcolor",be.iconContainer.className="icon hide",be.colorspan.style.backgroundColor=at[0];else if(Re.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){be.icon.className="icon hide",be.iconContainer.className="icon hide";const vt=Qt(this._modelService,this._modeService,Nt.a.from({scheme:"fake",path:Ve.textLabel}),St.FILE),Gt=Qt(this._modelService,this._modeService,Nt.a.from({scheme:"fake",path:Re.detail}),St.FILE);Be.extraClasses=vt.length>Gt.length?vt:Gt}else Re.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(be.icon.className="icon hide",be.iconContainer.className="icon hide",Be.extraClasses=Object(B.k)([Qt(this._modelService,this._modeService,Nt.a.from({scheme:"fake",path:Ve.textLabel}),St.FOLDER),Qt(this._modelService,this._modeService,Nt.a.from({scheme:"fake",path:Re.detail}),St.FOLDER)])):(be.icon.className="icon hide",be.iconContainer.className="",be.iconContainer.classList.add("suggest-icon",...Object(y.H)(Re.kind).split(" ")));Re.tags&&Re.tags.indexOf(1)>=0&&(Be.extraClasses=(Be.extraClasses||[]).concat(["deprecated"]),Be.matches=[]),be.iconLabel.setLabel(Ve.textLabel,void 0,Be),typeof Re.label=="string"?(be.parametersLabel.textContent="",be.detailsLabel.textContent=wi(Re.detail||""),be.root.classList.add("string-label")):(be.parametersLabel.textContent=wi(Re.label.detail||""),be.detailsLabel.textContent=wi(Re.label.description||""),be.root.classList.remove("string-label")),this._editor.getOption(105).showInlineDetails?Object(tt.W)(be.detailsLabel):Object(tt.K)(be.detailsLabel),_o(Ve)?(be.right.classList.add("can-expand-details"),Object(tt.W)(be.readMore),be.readMore.onmousedown=vt=>{vt.stopPropagation(),vt.preventDefault()},be.readMore.onclick=vt=>{vt.stopPropagation(),vt.preventDefault(),this._onDidToggleDetails.fire()}):(be.right.classList.remove("can-expand-details"),Object(tt.K)(be.readMore),be.readMore.onmousedown=null,be.readMore.onclick=null)}disposeTemplate(Ve){Ve.disposables.dispose()}};ki=Bo([Jt(1,Eo.a),Jt(2,Ro.a),Jt(3,Ye.b)],ki);function wi(ht){return ht.replace(/\r\n|\r|\n/g,"")}var Zi=function(ht,Ve,K,be){var Re=arguments.length,Be=Re<3?Ve:be===null?be=Object.getOwnPropertyDescriptor(Ve,K):be,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Be=Reflect.decorate(ht,Ve,K,be);else for(var vt=ht.length-1;vt>=0;vt--)(at=ht[vt])&&(Be=(Re<3?at(Be):Re>3?at(Ve,K,Be):at(Ve,K))||Be);return Re>3&&Be&&Object.defineProperty(Ve,K,Be),Be},Vi=function(ht,Ve){return function(K,be){Ve(K,be,ht)}},vi=function(ht,Ve,K,be){function Re(Be){return Be instanceof K?Be:new K(function(at){at(Be)})}return new(K||(K=Promise))(function(Be,at){function vt(zt){try{Bt(be.next(zt))}catch(ro){at(ro)}}function Gt(zt){try{Bt(be.throw(zt))}catch(ro){at(ro)}}function Bt(zt){zt.done?Be(zt.value):Re(zt.value).then(vt,Gt)}Bt((be=be.apply(ht,Ve||[])).next())})};const sn=Object(dt.wc)("editorSuggestWidget.background",{dark:dt.W,light:dt.W,hc:dt.W},G.a("editorSuggestWidgetBackground","Background color of the suggest widget.")),en=Object(dt.wc)("editorSuggestWidget.border",{dark:dt.X,light:dt.X,hc:dt.X},G.a("editorSuggestWidgetBorder","Border color of the suggest widget.")),on=Object(dt.wc)("editorSuggestWidget.foreground",{dark:dt.B,light:dt.B,hc:dt.B},G.a("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),cn=Object(dt.wc)("editorSuggestWidget.selectedForeground",{dark:dt.tc,light:dt.tc,hc:dt.tc},G.a("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),Bi=Object(dt.wc)("editorSuggestWidget.selectedIconForeground",{dark:dt.uc,light:dt.uc,hc:dt.uc},G.a("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget.")),zi=Object(dt.wc)("editorSuggestWidget.selectedBackground",{dark:dt.sc,light:dt.sc,hc:dt.sc},G.a("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),Ji=Object(dt.wc)("editorSuggestWidget.highlightForeground",{dark:dt.Ib,light:dt.Ib,hc:dt.Ib},G.a("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),ui=Object(dt.wc)("editorSuggestWidget.focusHighlightForeground",{dark:dt.Gb,light:dt.Gb,hc:dt.Gb},G.a("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));class pn{constructor(ht,Ve){this._service=ht,this._key=`suggestWidget.size/${Ve.getEditorType()}/${Ve instanceof Mo.a}`}restore(){var ht;const Ve=(ht=this._service.get(this._key,0))!==null&&ht!==void 0?ht:"";try{const K=JSON.parse(Ve);if(tt.b.is(K))return tt.b.lift(K)}catch(K){}return}store(ht){this._service.store(this._key,JSON.stringify(ht),0,1)}reset(){this._service.remove(this._key,0)}}let Hi=class ht{constructor(Ve,K,be,Re,Be){this.editor=Ve,this._storageService=K,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new x.g,this._disposables=new L.b,this._onDidSelect=new F.b,this._onDidFocus=new F.b,this._onDidHide=new F.b,this._onDidShow=new F.b,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new F.b,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new ct,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new Oi(this,Ve),this._persistedSize=new pn(K,Ve);class at{constructor(P,q,Ae=!1,Ge=!1){this.persistedSize=P,this.currentSize=q,this.persistHeight=Ae,this.persistWidth=Ge}}let vt;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),vt=new at(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(P=>{var q,Ae,Ge,ft;if(this._resize(P.dimension.width,P.dimension.height),vt&&(vt.persistHeight=vt.persistHeight||!!P.north||!!P.south,vt.persistWidth=vt.persistWidth||!!P.east||!!P.west),!P.done)return;if(vt){const{itemHeight:Dt,defaultSize:jt}=this.getLayoutInfo(),Xt=Math.round(Dt/2);let{width:uo,height:io}=this.element.size;(!vt.persistHeight||Math.abs(vt.currentSize.height-io)<=Xt)&&(io=(Ae=(q=vt.persistedSize)===null||q===void 0?void 0:q.height)!==null&&Ae!==void 0?Ae:jt.height),(!vt.persistWidth||Math.abs(vt.currentSize.width-uo)<=Xt)&&(uo=(ft=(Ge=vt.persistedSize)===null||Ge===void 0?void 0:Ge.width)!==null&&ft!==void 0?ft:jt.width),this._persistedSize.store(new tt.b(uo,io))}this._contentWidget.unlockPreference(),vt=void 0})),this._messageElement=tt.q(this.element.domNode,tt.a(".message")),this._listElement=tt.q(this.element.domNode,tt.a(".tree"));const Gt=Be.createInstance(no,this.editor);Gt.onDidClose(this.toggleDetails,this,this._disposables),this._details=new Lt(Gt,this.editor);const Bt=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(105).showIcons);Bt();const zt=Be.createInstance(ki,this.editor);this._disposables.add(zt),this._disposables.add(zt.onDidToggleDetails(()=>this.toggleDetails())),this._list=new It.c("SuggestWidget",this._listElement,{getHeight:P=>this.getLayoutInfo().itemHeight,getTemplateId:P=>"suggestion"},[zt],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:()=>"option",getAriaLabel:P=>{if(P.isResolved&&this._isDetailsVisible()){const{documentation:q,detail:Ae}=P.completion,Ge=ve.v("{0}{1}",Ae||"",q?typeof q=="string"?q:q.value:"");return G.a("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",P.textLabel,Ge)}else return P.textLabel},getWidgetAriaLabel:()=>G.a("suggest","Suggest"),getWidgetRole:()=>"listbox"}}),this._status=Be.createInstance(Mt,this.element.domNode);const ro=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(105).showStatusBar);ro(),this._disposables.add(Object(Ut.b)(this._list,Re,{listInactiveFocusBackground:zi,listInactiveFocusOutline:dt.b})),this._disposables.add(Re.onDidColorThemeChange(P=>this._onThemeChange(P))),this._onThemeChange(Re.getColorTheme()),this._disposables.add(this._list.onMouseDown(P=>this._onListMouseDownOrTap(P))),this._disposables.add(this._list.onTap(P=>this._onListMouseDownOrTap(P))),this._disposables.add(this._list.onDidChangeSelection(P=>this._onListSelection(P))),this._disposables.add(this._list.onDidChangeFocus(P=>this._onListFocus(P))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(P=>{P.hasChanged(105)&&(ro(),Bt())})),this._ctxSuggestWidgetVisible=Le.b.Visible.bindTo(be),this._ctxSuggestWidgetDetailsVisible=Le.b.DetailsVisible.bindTo(be),this._ctxSuggestWidgetMultipleSuggestions=Le.b.MultipleSuggestions.bindTo(be),this._disposables.add(tt.o(this._details.widget.domNode,"keydown",P=>{this._onDetailsKeydown.fire(P)})),this._disposables.add(this.editor.onMouseDown(P=>this._onEditorMouseDown(P)))}dispose(){var Ve;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(Ve=this._loadingTimeout)===null||Ve===void 0||Ve.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(Ve){this._details.widget.domNode.contains(Ve.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(Ve.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(Ve){if(typeof Ve.element=="undefined"||typeof Ve.index=="undefined")return;Ve.browserEvent.preventDefault(),Ve.browserEvent.stopPropagation(),this._select(Ve.element,Ve.index)}_onListSelection(Ve){Ve.elements.length&&this._select(Ve.elements[0],Ve.indexes[0])}_select(Ve,K){const be=this._completionModel;be&&(this._onDidSelect.fire({item:Ve,index:K,model:be}),this.editor.focus())}_onThemeChange(Ve){const K=Ve.getColor(sn);K&&(this.element.domNode.style.backgroundColor=K.toString(),this._messageElement.style.backgroundColor=K.toString(),this._details.widget.domNode.style.backgroundColor=K.toString());const be=Ve.getColor(en);be&&(this.element.domNode.style.borderColor=be.toString(),this._messageElement.style.borderColor=be.toString(),this._status.element.style.borderTopColor=be.toString(),this._details.widget.domNode.style.borderColor=be.toString(),this._detailsBorderColor=be.toString());const Re=Ve.getColor(dt.bb);Re&&(this._detailsFocusBorderColor=Re.toString()),this._details.widget.borderWidth=Ve.type==="hc"?2:1}_onListFocus(Ve){var K;if(this._ignoreFocusEvents)return;if(!Ve.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0});return}if(!this._completionModel)return;const be=Ve.elements[0],Re=Ve.indexes[0];be!==this._focusedItem&&((K=this._currentSuggestionDetails)===null||K===void 0||K.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=be,this._list.reveal(Re),this._currentSuggestionDetails=Object(x.h)(Be=>vi(this,void 0,void 0,function*(){const at=Object(x.i)(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250);Be.onCancellationRequested(()=>at.dispose());const vt=yield be.resolve(Be);return at.dispose(),vt})),this._currentSuggestionDetails.then(()=>{if(Re>=this._list.length||be!==this._list.element(Re))return;this._ignoreFocusEvents=!0,this._list.splice(Re,1,[be]),this._list.setFocus([Re]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:ri(Re)})}).catch(A.f)),this._onDidFocus.fire({item:be,index:Re,model:this._completionModel})}_setState(Ve){if(this._state===Ve)return;this._state=Ve,this.element.domNode.classList.toggle("frozen",Ve===4),this.element.domNode.classList.remove("message");switch(Ve){case 0:tt.K(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=ht.LOADING_MESSAGE,tt.K(this._listElement,this._status.element),tt.W(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=ht.NO_SUGGESTIONS_MESSAGE,tt.K(this._listElement,this._status.element),tt.W(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:tt.K(this._messageElement),tt.W(this._listElement,this._status.element),this._show();break;case 4:tt.K(this._messageElement),tt.W(this._listElement,this._status.element),this._show();break;case 5:tt.K(this._messageElement),tt.W(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(Ve,K){if(this._state!==0)return;this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!Ve,this._isAuto||(this._loadingTimeout=Object(x.i)(()=>this._setState(1),K))}showSuggestions(Ve,K,be,Re){var Be,at;if(this._contentWidget.setPosition(this.editor.getPosition()),(Be=this._loadingTimeout)===null||Be===void 0||Be.dispose(),(at=this._currentSuggestionDetails)===null||at===void 0||at.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==Ve&&(this._completionModel=Ve),be&&this._state!==2&&this._state!==0){this._setState(4);return}const vt=this._completionModel.items.length,Gt=vt===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(vt>1),Gt){this._setState(Re?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(be?4:3),this._list.reveal(K,0),this._list.setFocus([K]),this._layout(this.element.size),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){return this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel?{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}:void 0}toggleDetailsFocus(){this._state===5?(this._setState(3),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._detailsFocusBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsFocusBorderColor))}toggleDetails(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(_o(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(Ve){this._details.show(),Ve?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var Ve;(Ve=this._loadingTimeout)===null||Ve===void 0||Ve.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const K=this._persistedSize.restore(),be=Math.ceil(this.getLayoutInfo().itemHeight*4.3);K&&K.height<be&&this._persistedSize.store(K.with(void 0,be))}isFrozen(){return this._state===4}_afterRender(Ve){if(Ve===null){this._isDetailsVisible()&&this._details.hide();return}if(this._state===2||this._state===1)return;this._isDetailsVisible()&&this._details.show(),this._positionDetails()}_layout(Ve){var K,be,Re;if(!this.editor.hasModel())return;if(!this.editor.getDomNode())return;const Be=tt.z(document.body),at=this.getLayoutInfo();Ve||(Ve=at.defaultSize);let vt=Ve.height,Gt=Ve.width;if(this._status.element.style.lineHeight=`${at.itemHeight}px`,this._state===2||this._state===1)vt=at.itemHeight+at.borderHeight,Gt=at.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new tt.b(Gt,vt),this._contentWidget.setPreference(2);else{const Bt=Be.width-at.borderHeight-2*at.horizontalPadding;Gt>Bt&&(Gt=Bt);const zt=this._completionModel?this._completionModel.stats.pLabelLen*at.typicalHalfwidthCharacterWidth:Gt,ro=at.statusBarHeight+this._list.contentHeight+at.borderHeight,P=at.itemHeight+at.statusBarHeight,q=tt.D(this.editor.getDomNode()),Ae=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),Ge=q.top+Ae.top+Ae.height,ft=Math.min(Be.height-Ge-at.verticalPadding,ro),Dt=q.top+Ae.top-at.verticalPadding,jt=Math.min(Dt,ro);let Xt=Math.min(Math.max(jt,ft)+at.borderHeight,ro);vt===((K=this._cappedHeight)===null||K===void 0?void 0:K.capped)&&(vt=this._cappedHeight.wanted),vt<P&&(vt=P),vt>Xt&&(vt=Xt);const uo=150;vt>ft||this._forceRenderingAbove&&Dt>uo?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),Xt=jt):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),Xt=ft),this.element.preferredSize=new tt.b(zt,at.defaultSize.height),this.element.maxSize=new tt.b(Bt,Xt),this.element.minSize=new tt.b(220,P),this._cappedHeight=vt===ro?{wanted:(Re=(be=this._cappedHeight)===null||be===void 0?void 0:be.wanted)!==null&&Re!==void 0?Re:Ve.height,capped:vt}:void 0}this._resize(Gt,vt)}_resize(Ve,K){const{width:be,height:Re}=this.element.maxSize;Ve=Math.min(be,Ve),K=Math.min(Re,K);const{statusBarHeight:Be}=this.getLayoutInfo();this._list.layout(K-Be,Ve),this._listElement.style.height=`${K-Be}px`,this.element.layout(K,Ve),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode)}getLayoutInfo(){const Ve=this.editor.getOption(43),K=Object(Rt.b)(this.editor.getOption(107)||Ve.lineHeight,8,1e3),be=!this.editor.getOption(105).showStatusBar||this._state===2||this._state===1?0:K,Re=this._details.widget.borderWidth,Be=2*Re;return{itemHeight:K,statusBarHeight:be,borderWidth:Re,borderHeight:Be,typicalHalfwidthCharacterWidth:Ve.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new tt.b(430,be+12*K+Be)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(Ve){this._storageService.store("expandSuggestionDocs",Ve,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};Hi.LOADING_MESSAGE=G.a("suggestWidget.loading","Loading..."),Hi.NO_SUGGESTIONS_MESSAGE=G.a("suggestWidget.noSuggestions","No suggestions."),Hi=Zi([Vi(1,Y.a),Vi(2,fe.b),Vi(3,Ye.b),Vi(4,k.a)],Hi);class Oi{constructor(ht,Ve){this._widget=ht,this._editor=Ve,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:ht,width:Ve}=this._widget.element.size,{borderWidth:K,horizontalPadding:be}=this._widget.getLayoutInfo();return new tt.b(Ve+2*K+be,ht+2*K)}afterRender(ht){this._widget._afterRender(ht)}setPreference(ht){this._preferenceLocked||(this._preference=ht)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(ht){this._position=ht}}Object(Ye.f)((ht,Ve)=>{const K=ht.getColor(Ji);K&&Ve.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${K}; }`);const be=ht.getColor(ui);K&&Ve.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight { color: ${be}; }`);const Re=ht.getColor(on);Re&&Ve.addRule(`.monaco-editor .suggest-widget, .monaco-editor .suggest-details { color: ${Re}; }`);const Be=ht.getColor(cn);Be&&Ve.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused { color: ${Be}; }`);const at=ht.getColor(Bi);at&&Ve.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon { color: ${at}; }`);const vt=ht.getColor(dt.Jc);vt&&Ve.addRule(`.monaco-editor .suggest-details a { color: ${vt}; }`);const Gt=ht.getColor(dt.Ic);Gt&&Ve.addRule(`.monaco-editor .suggest-details a:hover { color: ${Gt}; }`);const Bt=ht.getColor(dt.Hc);Bt&&Ve.addRule(`.monaco-editor .suggest-details code { background-color: ${Bt}; }`)});var Ii=function(ht,Ve,K,be){var Re=arguments.length,Be=Re<3?Ve:be===null?be=Object.getOwnPropertyDescriptor(Ve,K):be,at;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Be=Reflect.decorate(ht,Ve,K,be);else for(var vt=ht.length-1;vt>=0;vt--)(at=ht[vt])&&(Be=(Re<3?at(Be):Re>3?at(Ve,K,Be):at(Ve,K))||Be);return Re>3&&Be&&Object.defineProperty(Ve,K,Be),Be},Qi=function(ht,Ve){return function(K,be){Ve(K,be,ht)}};let Li=!1;class Ui{constructor(ht,Ve){this._model=ht,this._position=Ve;const K=ht.getLineMaxColumn(Ve.lineNumber);if(K!==Ve.column){const be=ht.getOffsetAt(Ve),Re=ht.getPositionAt(be+1);this._marker=ht.deltaDecorations([],[{range:b.a.fromPositions(Ve,Re),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(ht){if(this._model.isDisposed()||this._position.lineNumber!==ht.lineNumber)return 0;if(this._marker){const Ve=this._model.getDecorationRange(this._marker[0]),K=this._model.getOffsetAt(Ve.getStartPosition());return K-this._model.getOffsetAt(ht)}else return this._model.getLineMaxColumn(ht.lineNumber)-ht.column}}let fi=class ht{constructor(Ve,K,be,Re,Be,at){this._memoryService=K,this._commandService=be,this._contextKeyService=Re,this._instantiationService=Be,this._logService=at,this._lineSuffix=new L.d,this._toDispose=new L.b,this._selectors=new $i(zt=>zt.priority),this.editor=Ve,this.model=Be.createInstance(re,this.editor);const vt=Le.b.InsertMode.bindTo(Re);vt.set(Ve.getOption(105).insertMode),this.model.onDidTrigger(()=>vt.set(Ve.getOption(105).insertMode)),this.widget=this._toDispose.add(new x.b(()=>{const zt=this._instantiationService.createInstance(Hi,this.editor);this._toDispose.add(zt),this._toDispose.add(zt.onDidSelect(Ge=>this._insertSuggestion(Ge,0),this));const ro=new Pe(this.editor,zt,Ge=>this._insertSuggestion(Ge,2));this._toDispose.add(ro),this._toDispose.add(this.model.onDidSuggest(Ge=>{Ge.completionModel.items.length===0&&ro.reset()}));const P=Le.b.MakesTextEdit.bindTo(this._contextKeyService),q=Le.b.HasInsertAndReplaceRange.bindTo(this._contextKeyService),Ae=Le.b.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(Object(L.i)(()=>{P.reset(),q.reset(),Ae.reset()})),this._toDispose.add(zt.onDidFocus(({item:Ge})=>{const ft=this.editor.getPosition(),Dt=Ge.editStart.column,jt=ft.column;let Xt=!0;if(this.editor.getOption(1)==="smart"&&this.model.state===2&&!Ge.completion.additionalTextEdits&&!(Ge.completion.insertTextRules&4)&&jt-Dt===Ge.completion.insertText.length){const uo=this.editor.getModel().getValueInRange({startLineNumber:ft.lineNumber,startColumn:Dt,endLineNumber:ft.lineNumber,endColumn:jt});Xt=uo!==Ge.completion.insertText}P.set(Xt),q.set(!_.a.equals(Ge.editInsertEnd,Ge.editReplaceEnd)),Ae.set(Boolean(Ge.provider.resolveCompletionItem)||Boolean(Ge.completion.documentation)||Ge.completion.detail!==Ge.completion.label)})),this._toDispose.add(zt.onDetailsKeyDown(Ge=>{if(Ge.toKeybinding().equals(new I.d(!0,!1,!1,!1,33))||v.f&&Ge.toKeybinding().equals(new I.d(!1,!1,!1,!0,33))){Ge.stopPropagation();return}Ge.toKeybinding().isModifierKey()||this.editor.focus()})),zt})),this._overtypingCapturer=this._toDispose.add(new x.b(()=>this._toDispose.add(new We(this.editor,this.model)))),this._alternatives=this._toDispose.add(new x.b(()=>this._toDispose.add(new ue(this.editor,this._contextKeyService)))),this._toDispose.add(Be.createInstance(U,Ve)),this._toDispose.add(this.model.onDidTrigger(zt=>{this.widget.value.showTriggered(zt.auto,zt.shy?250:50),this._lineSuffix.value=new Ui(this.editor.getModel(),zt.position)})),this._toDispose.add(this.model.onDidSuggest(zt=>{if(!zt.shy){let ro=-1;for(const P of this._selectors.itemsOrderedByPriorityDesc)if(ro=P.select(this.editor.getModel(),this.editor.getPosition(),zt.completionModel.items),ro!==-1)break;ro===-1&&(ro=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),zt.completionModel.items)),this.widget.value.showSuggestions(zt.completionModel,ro,zt.isFrozen,zt.auto)}})),this._toDispose.add(this.model.onDidCancel(zt=>{zt.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{Li||(this.model.cancel(),this.model.clear())}));let Gt=Le.b.AcceptSuggestionsOnEnter.bindTo(Re),Bt=()=>{const zt=this.editor.getOption(1);Gt.set(zt==="on"||zt==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>Bt())),Bt()}static get(Ve){return Ve.getContribution(ht.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(Ve,K){if(!Ve||!Ve.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const be=this.editor.getModel(),Re=be.getAlternativeVersionId(),{item:Be}=Ve,at=[],vt=new N.b;K&1||this.editor.pushUndoStop();const Gt=this.getOverwriteInfo(Be,Boolean(K&8));if(this._memoryService.memorize(be,this.editor.getPosition(),Be),Array.isArray(Be.completion.additionalTextEdits)){const zt=D.c.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",Be.completion.additionalTextEdits.map(ro=>r.a.replace(b.a.lift(ro.range),ro.text))),zt.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!Be.isResolved){const zt=new m.a(!0);let ro;const P=be.onDidChangeContent(ft=>{if(ft.isFlush){vt.cancel(),P.dispose();return}for(let Dt of ft.changes){const jt=b.a.getEndPosition(Dt.range);(!ro||_.a.isBefore(jt,ro))&&(ro=jt)}});let q=K;K|=2;let Ae=!1,Ge=this.editor.onWillType(()=>{Ge.dispose(),Ae=!0,q&2||this.editor.pushUndoStop()});at.push(Be.resolve(vt.token).then(()=>{if(!Be.completion.additionalTextEdits||vt.token.isCancellationRequested)return!1;if(ro&&Be.completion.additionalTextEdits.some(Dt=>_.a.isBefore(ro,b.a.getStartPosition(Dt.range))))return!1;Ae&&this.editor.pushUndoStop();const ft=D.c.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",Be.completion.additionalTextEdits.map(Dt=>r.a.replace(b.a.lift(Dt.range),Dt.text))),ft.restoreRelativeVerticalPositionOfCursor(this.editor),(Ae||!(q&2))&&this.editor.pushUndoStop(),!0}).then(ft=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",zt.elapsed(),ft),P.dispose(),Ge.dispose()}))}let{insertText:Bt}=Be.completion;Be.completion.insertTextRules&4||(Bt=p.c.escape(Bt)),c.SnippetController2.get(this.editor).insert(Bt,{overwriteBefore:Gt.overwriteBefore,overwriteAfter:Gt.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(Be.completion.insertTextRules&1),clipboardText:Ve.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),K&2||this.editor.pushUndoStop(),Be.completion.command?Be.completion.command.id===rn.id?this.model.trigger({auto:!0,shy:!1},!0):(at.push(this._commandService.executeCommand(Be.completion.command.id,...Be.completion.command.arguments?[...Be.completion.command.arguments]:[]).catch(A.f)),this.model.cancel()):this.model.cancel(),K&4&&this._alternatives.value.set(Ve,zt=>{for(vt.cancel();be.canUndo();){Re!==be.getAlternativeVersionId()&&be.undo(),this._insertSuggestion(zt,1|2|(K&8?8:0));break}}),this._alertCompletionItem(Be),Promise.all(at).finally(()=>{this.model.clear(),vt.dispose()})}getOverwriteInfo(Ve,K){Object(d.c)(this.editor.hasModel());let be=this.editor.getOption(105).insertMode==="replace";K&&(be=!be);const Re=Ve.position.column-Ve.editStart.column,Be=(be?Ve.editReplaceEnd.column:Ve.editInsertEnd.column)-Ve.position.column,at=this.editor.getPosition().column-Ve.position.column,vt=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:Re+at,overwriteAfter:Be+vt}}_alertCompletionItem(Ve){if(Object(B.n)(Ve.completion.additionalTextEdits)){let K=G.a("aria.alert.snippet","Accepting '{0}' made {1} additional edits",Ve.textLabel,Ve.completion.additionalTextEdits.length);Object(f.a)(K)}}triggerSuggest(Ve){this.editor.hasModel()&&(this.model.trigger({auto:!1,shy:!1},!1,Ve),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(Ve){if(!this.editor.hasModel())return;const K=this.editor.getPosition(),be=()=>{K.equals(this.editor.getPosition())&&this._commandService.executeCommand(Ve.fallback)},Re=Be=>{if(Be.completion.insertTextRules&4||Be.completion.additionalTextEdits)return!0;const at=this.editor.getPosition(),vt=Be.editStart.column,Gt=at.column;if(Gt-vt!==Be.completion.insertText.length)return!0;const Bt=this.editor.getModel().getValueInRange({startLineNumber:at.lineNumber,startColumn:vt,endLineNumber:at.lineNumber,endColumn:Gt});return Bt!==Be.completion.insertText};F.c.once(this.model.onDidTrigger)(Be=>{let at=[];F.c.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{Object(L.f)(at),be()},void 0,at),this.model.onDidSuggest(({completionModel:vt})=>{if(Object(L.f)(at),vt.items.length===0){be();return}const Gt=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),vt.items),Bt=vt.items[Gt];if(!Re(Bt)){be();return}this.editor.pushUndoStop(),this._insertSuggestion({index:Gt,item:Bt,model:vt},4|1|2)},void 0,at)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(K,0),this.editor.focus()}acceptSelectedSuggestion(Ve,K){const be=this.widget.value.getFocusedItem();let Re=0;Ve&&(Re|=4),K&&(Re|=8),this._insertSuggestion(be,Re)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){if(!this.widget.isInitialized)return;this.widget.value.stopForceRenderingAbove()}registerSelector(Ve){return this._selectors.register(Ve)}};fi.ID="editor.contrib.suggestController",fi=Ii([Qi(1,Ee),Qi(2,he.b),Qi(3,fe.b),Qi(4,k.a),Qi(5,Ie.b)],fi);class $i{constructor(ht){this.prioritySelector=ht,this._items=new Array}register(ht){if(this._items.indexOf(ht)!==-1)throw new Error("Value is already registered");return this._items.push(ht),this._items.sort((Ve,K)=>this.prioritySelector(K)-this.prioritySelector(Ve)),{dispose:()=>{const Ve=this._items.indexOf(ht);Ve>=0&&this._items.splice(Ve,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class rn extends S.b{constructor(){super({id:rn.id,label:G.a("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:fe.a.and(h.a.writable,h.a.hasCompletionItemProvider),kbOpts:{kbExpr:h.a.textInputFocus,primary:2048|10,secondary:[2048|39],mac:{primary:256|10,secondary:[512|9,2048|39]},weight:100}})}run(ht,Ve){const K=fi.get(Ve);if(!K)return;K.triggerSuggest()}}rn.id="editor.action.triggerSuggest",Object(S.l)(fi.ID,fi),Object(S.j)(rn);const _i=100+90,Pi=S.c.bindToContribution(fi.get);Object(S.k)(new Pi({id:"acceptSelectedSuggestion",precondition:Le.b.Visible,handler(ht){ht.acceptSelectedSuggestion(!0,!1)}})),xe.a.registerKeybindingRule({id:"acceptSelectedSuggestion",when:fe.a.and(Le.b.Visible,h.a.textInputFocus),primary:2,weight:_i}),xe.a.registerKeybindingRule({id:"acceptSelectedSuggestion",when:fe.a.and(Le.b.Visible,h.a.textInputFocus,Le.b.AcceptSuggestionsOnEnter,Le.b.MakesTextEdit),primary:3,weight:_i}),J.d.appendMenuItem(Le.g,{command:{id:"acceptSelectedSuggestion",title:G.a("accept.insert","Insert")},group:"left",order:1,when:Le.b.HasInsertAndReplaceRange.toNegated()}),J.d.appendMenuItem(Le.g,{command:{id:"acceptSelectedSuggestion",title:G.a("accept.insert","Insert")},group:"left",order:1,when:fe.a.and(Le.b.HasInsertAndReplaceRange,Le.b.InsertMode.isEqualTo("insert"))}),J.d.appendMenuItem(Le.g,{command:{id:"acceptSelectedSuggestion",title:G.a("accept.replace","Replace")},group:"left",order:1,when:fe.a.and(Le.b.HasInsertAndReplaceRange,Le.b.InsertMode.isEqualTo("replace"))}),Object(S.k)(new Pi({id:"acceptAlternativeSelectedSuggestion",precondition:fe.a.and(Le.b.Visible,h.a.textInputFocus),kbOpts:{weight:_i,kbExpr:h.a.textInputFocus,primary:1024|3,secondary:[1024|2]},handler(ht){ht.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:Le.g,group:"left",order:2,when:fe.a.and(Le.b.HasInsertAndReplaceRange,Le.b.InsertMode.isEqualTo("insert")),title:G.a("accept.replace","Replace")},{menuId:Le.g,group:"left",order:2,when:fe.a.and(Le.b.HasInsertAndReplaceRange,Le.b.InsertMode.isEqualTo("replace")),title:G.a("accept.insert","Insert")}]})),he.a.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),Object(S.k)(new Pi({id:"hideSuggestWidget",precondition:Le.b.Visible,handler:ht=>ht.cancelSuggestWidget(),kbOpts:{weight:_i,kbExpr:h.a.textInputFocus,primary:9,secondary:[1024|9]}})),Object(S.k)(new Pi({id:"selectNextSuggestion",precondition:fe.a.and(Le.b.Visible,Le.b.MultipleSuggestions),handler:ht=>ht.selectNextSuggestion(),kbOpts:{weight:_i,kbExpr:h.a.textInputFocus,primary:18,secondary:[2048|18],mac:{primary:18,secondary:[2048|18,256|44]}}})),Object(S.k)(new Pi({id:"selectNextPageSuggestion",precondition:fe.a.and(Le.b.Visible,Le.b.MultipleSuggestions),handler:ht=>ht.selectNextPageSuggestion(),kbOpts:{weight:_i,kbExpr:h.a.textInputFocus,primary:12,secondary:[2048|12]}})),Object(S.k)(new Pi({id:"selectLastSuggestion",precondition:fe.a.and(Le.b.Visible,Le.b.MultipleSuggestions),handler:ht=>ht.selectLastSuggestion()})),Object(S.k)(new Pi({id:"selectPrevSuggestion",precondition:fe.a.and(Le.b.Visible,Le.b.MultipleSuggestions),handler:ht=>ht.selectPrevSuggestion(),kbOpts:{weight:_i,kbExpr:h.a.textInputFocus,primary:16,secondary:[2048|16],mac:{primary:16,secondary:[2048|16,256|46]}}})),Object(S.k)(new Pi({id:"selectPrevPageSuggestion",precondition:fe.a.and(Le.b.Visible,Le.b.MultipleSuggestions),handler:ht=>ht.selectPrevPageSuggestion(),kbOpts:{weight:_i,kbExpr:h.a.textInputFocus,primary:11,secondary:[2048|11]}})),Object(S.k)(new Pi({id:"selectFirstSuggestion",precondition:fe.a.and(Le.b.Visible,Le.b.MultipleSuggestions),handler:ht=>ht.selectFirstSuggestion()})),Object(S.k)(new Pi({id:"toggleSuggestionDetails",precondition:Le.b.Visible,handler:ht=>ht.toggleSuggestionDetails(),kbOpts:{weight:_i,kbExpr:h.a.textInputFocus,primary:2048|10,secondary:[2048|39],mac:{primary:256|10,secondary:[2048|39]}},menuOpts:[{menuId:Le.g,group:"right",order:1,when:fe.a.and(Le.b.DetailsVisible,Le.b.CanResolve),title:G.a("detail.more","show less")},{menuId:Le.g,group:"right",order:1,when:fe.a.and(Le.b.DetailsVisible.toNegated(),Le.b.CanResolve),title:G.a("detail.less","show more")}]})),Object(S.k)(new Pi({id:"toggleExplainMode",precondition:Le.b.Visible,handler:ht=>ht.toggleExplainMode(),kbOpts:{weight:100,primary:2048|85}})),Object(S.k)(new Pi({id:"toggleSuggestionFocus",precondition:Le.b.Visible,handler:ht=>ht.toggleSuggestionFocus(),kbOpts:{weight:_i,kbExpr:h.a.textInputFocus,primary:2048|512|10,mac:{primary:256|512|10}}})),Object(S.k)(new Pi({id:"insertBestCompletion",precondition:fe.a.and(h.a.textInputFocus,fe.a.equals("config.editor.tabCompletion","on"),U.AtEnd,Le.b.Visible.toNegated(),ue.OtherSuggestions.toNegated(),c.SnippetController2.InSnippetMode.toNegated()),handler:(ht,Ve)=>{ht.triggerSuggestAndAcceptBest(Object(d.k)(Ve)?Object.assign({fallback:"tab"},Ve):{fallback:"tab"})},kbOpts:{weight:_i,primary:2}})),Object(S.k)(new Pi({id:"insertNextSuggestion",precondition:fe.a.and(h.a.textInputFocus,fe.a.equals("config.editor.tabCompletion","on"),ue.OtherSuggestions,Le.b.Visible.toNegated(),c.SnippetController2.InSnippetMode.toNegated()),handler:ht=>ht.acceptNextSuggestion(),kbOpts:{weight:_i,kbExpr:h.a.textInputFocus,primary:2}})),Object(S.k)(new Pi({id:"insertPrevSuggestion",precondition:fe.a.and(h.a.textInputFocus,fe.a.equals("config.editor.tabCompletion","on"),ue.OtherSuggestions,Le.b.Visible.toNegated(),c.SnippetController2.InSnippetMode.toNegated()),handler:ht=>ht.acceptPrevSuggestion(),kbOpts:{weight:_i,kbExpr:h.a.textInputFocus,primary:1024|2}})),Object(S.j)(class extends S.b{constructor(){super({id:"editor.action.resetSuggestSize",label:G.a("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(ht,Ve){fi.get(Ve).resetWidgetSize()}})},eq1K:function(mt,M,t){},erNZ:function(mt,M,t){"use strict";t.d(M,"c",function(){return v}),t.d(M,"d",function(){return m}),t.d(M,"a",function(){return d}),t.d(M,"b",function(){return D});var f=t("N0LK"),B=t("MNsG"),x=t("HpOR");let N;function A(){return N||(N=new TextDecoder("UTF-16LE")),N}let F;function I(){return F||(F=new TextDecoder("UTF-16BE")),F}let L;function v(){return L||(L=B.e()?A():I()),L}const m=typeof TextDecoder!="undefined";let d,D;m?(d=h=>new _(h),D=S):(d=h=>new b,D=r);function S(h,c,p){const E=new Uint16Array(h.buffer,c,p);return p>0&&(E[0]===65279||E[0]===65534)?r(h,c,p):A().decode(E)}function r(h,c,p){let E=[],y=0;for(let C=0;C<p;C++){const O=x.b(h,c);c+=2,E[y++]=String.fromCharCode(O)}return E.join("")}class _{constructor(h){this._capacity=h|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";const h=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return v().decode(h)}_flushBuffer(){const h=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[h]:this._completedStrings[this._completedStrings.length]=h}write1(h){const c=this._capacity-this._bufferLength;c<=1&&((c===0||f.E(h))&&this._flushBuffer()),this._buffer[this._bufferLength++]=h}appendASCII(h){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=h}appendASCIIString(h){const c=h.length;if(this._bufferLength+c>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=h;return}for(let p=0;p<c;p++)this._buffer[this._bufferLength++]=h.charCodeAt(p)}}class b{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(h){this._pieces[this._piecesLen++]=String.fromCharCode(h)}appendASCII(h){this._pieces[this._piecesLen++]=String.fromCharCode(h)}appendASCIIString(h){this._pieces[this._piecesLen++]=h}}},fD5p:function(mt,M,t){"use strict";t.r(M),t.d(M,"ContextMenuController",function(){return _});var f=t("EffR"),B=t("7/Ik"),x=t("8HAY"),N=t("pmY6"),A=t("MNsG"),F=t("sswD"),I=t("wQH0"),L=t("3/fG"),v=t("fjLI"),m=t("T8No"),d=t("Uzvx"),D=t("bexQ"),S=function(h,c,p,E){var y=arguments.length,C=y<3?c:E===null?E=Object.getOwnPropertyDescriptor(c,p):E,O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(h,c,p,E);else for(var k=h.length-1;k>=0;k--)(O=h[k])&&(C=(y<3?O(C):y>3?O(c,p,C):O(c,p))||C);return y>3&&C&&Object.defineProperty(c,p,C),C},r=function(h,c){return function(p,E){c(p,E,h)}};let _=class h{constructor(c,p,E,y,C,O){this._contextMenuService=p,this._contextViewService=E,this._contextKeyService=y,this._keybindingService=C,this._menuService=O,this._toDispose=new N.b,this._contextMenuIsBeingShownCount=0,this._editor=c,this._toDispose.add(this._editor.onContextMenu(k=>this._onContextMenu(k))),this._toDispose.add(this._editor.onMouseWheel(k=>{if(this._contextMenuIsBeingShownCount>0){const Y=this._contextViewService.getContextViewElement(),Q=k.srcElement;Q.shadowRoot&&f.F(Y)===Q.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(k=>{k.keyCode===58&&(k.preventDefault(),k.stopPropagation(),this.showContextMenu())}))}static get(c){return c.getContribution(h.ID)}_onContextMenu(c){if(!this._editor.hasModel())return;if(!this._editor.getOption(20)){this._editor.focus(),c.target.position&&!this._editor.getSelection().containsPosition(c.target.position)&&this._editor.setPosition(c.target.position);return}if(c.target.type===12)return;if(c.event.preventDefault(),c.event.stopPropagation(),c.target.type!==6&&c.target.type!==7&&c.target.type!==1)return;if(this._editor.focus(),c.target.position){let E=!1;for(const y of this._editor.getSelections())if(y.containsPosition(c.target.position)){E=!0;break}E||this._editor.setPosition(c.target.position)}let p=null;c.target.type!==1&&(p={x:c.event.posx-1,width:2,y:c.event.posy-1,height:2}),this.showContextMenu(p)}showContextMenu(c){if(!this._editor.getOption(20))return;if(!this._editor.hasModel())return;if(!this._contextMenuService){this._editor.focus();return}const p=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?v.b.SimpleEditorContext:v.b.EditorContext);p.length>0&&this._doShowContextMenu(p,c)}_getMenuActions(c,p){const E=[],y=this._menuService.createMenu(p,this._contextKeyService),C=y.getActions({arg:c.uri});y.dispose();for(let O of C){const[,k]=O;let Y=0;for(const Q of k)if(Q instanceof v.e){const H=this._getMenuActions(c,Q.item.submenu);H.length>0&&(E.push(new x.e(Q.id,Q.label,H)),Y++)}else E.push(Q),Y++;Y&&E.push(new x.d)}return E.length&&E.pop(),E}_doShowContextMenu(c,p=null){if(!this._editor.hasModel())return;const E=this._editor.getOption(52);if(this._editor.updateOptions({hover:{enabled:!1}}),!p){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const C=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),O=f.D(this._editor.getDomNode()),k=O.left+C.left,Y=O.top+C.top+C.height;p={x:k,y:Y}}const y=this._editor.getOption(113)&&!A.c;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:y?this._editor.getDomNode():void 0,getAnchor:()=>p,getActions:()=>c,getActionViewItem:C=>{const O=this._keybindingFor(C);if(O)return new B.a(C,C,{label:!0,keybinding:O.getLabel(),isMenu:!0});const k=C;return typeof k.getActionViewItem=="function"?k.getActionViewItem():new B.a(C,C,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:C=>this._keybindingFor(C),onHide:C=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:E})}})}_keybindingFor(c){return this._keybindingService.lookupKeybinding(c.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};_.ID="editor.contrib.contextmenu",_=S([r(1,d.a),r(2,d.b),r(3,m.b),r(4,D.a),r(5,v.a)],_);class b extends F.b{constructor(){super({id:"editor.action.showContextMenu",label:L.a("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:I.a.textInputFocus,primary:1024|68,weight:100}})}run(h,c){let p=_.get(c);p.showContextMenu()}}Object(F.l)(_.ID,_),Object(F.j)(b)},fdyd:function(mt,M,t){"use strict";t.d(M,"a",function(){return N});var f=t("EffR"),B=t("Vhoy");const x=new RegExp(`(\\\\)?\\$\\((${B.a.iconNameExpression}(?:${B.a.iconModifierExpression})?)\\)`,"g");function N(F){const I=new Array;let L,v=0,m=0;for(;(L=x.exec(F))!==null;){m=L.index||0,I.push(F.substring(v,m)),v=(L.index||0)+L[0].length;const[,d,D]=L;I.push(d?`$(${D})`:A({id:D}))}return v<F.length&&I.push(F.substring(v)),I}function A(F){const I=f.a("span");return I.classList.add(...B.a.asClassNameArray(F)),I}},feEw:function(mt,M,t){"use strict";t.d(M,"a",function(){return k}),t.d(M,"b",function(){return oe});var f=t("D3Dy"),B=t("ZQ78"),x=t("EffR"),N=t("4y0V"),A=t("pg8w"),F=t("GJhM"),I=t("6OMU"),L=t("X+cX"),v=t("ZCR3"),m=t("MI8n"),d=t("pmY6"),D=t("qj0h"),S=t("nuFA"),r=t("QuOb");function _($,te){const ne=[];for(let Ee of te){if($.start>=Ee.range.end)continue;if($.end<Ee.range.start)break;const fe=S.a.intersect($,Ee.range);if(S.a.isEmpty(fe))continue;ne.push({range:fe,size:Ee.size})}return ne}function b({start:$,end:te},ne){return{start:$+ne,end:te+ne}}function h($){const te=[];let ne=null;for(let Ee of $){const fe=Ee.range.start,ee=Ee.range.end,ie=Ee.size;if(ne&&ie===ne.size){ne.range.end=ee;continue}ne={range:{start:fe,end:ee},size:ie},te.push(ne)}return te}function c(...$){return h($.reduce((te,ne)=>te.concat(ne),[]))}class p{constructor(){this.groups=[],this._size=0}splice($,te,ne=[]){const Ee=ne.length-te,fe=_({start:0,end:$},this.groups),ee=_({start:$+te,end:Number.POSITIVE_INFINITY},this.groups).map(U=>({range:b(U.range,Ee),size:U.size})),ie=ne.map((U,G)=>({range:{start:$+G,end:$+G+1},size:U.size}));this.groups=c(fe,ie,ee),this._size=this.groups.reduce((U,G)=>U+G.size*(G.range.end-G.range.start),0)}get count(){const $=this.groups.length;return $?this.groups[$-1].range.end:0}get size(){return this._size}indexAt($){if($<0)return-1;let te=0,ne=0;for(let Ee of this.groups){const fe=Ee.range.end-Ee.range.start,ee=ne+fe*Ee.size;if($<ee)return te+Math.floor(($-ne)/Ee.size);te+=fe,ne=ee}return te}indexAfter($){return Math.min(this.indexAt($)+1,this.count)}positionAt($){if($<0)return-1;let te=0,ne=0;for(let Ee of this.groups){const fe=Ee.range.end-Ee.range.start,ee=ne+fe;if($<ee)return te+($-ne)*Ee.size;te+=fe*Ee.size,ne=ee}return-1}}function E($){try{$.parentElement&&$.parentElement.removeChild($)}catch(te){}}class y{constructor($){this.renderers=$,this.cache=new Map}alloc($){let te=this.getTemplateCache($).pop();if(!te){const ne=Object(x.a)(".monaco-list-row"),Ee=this.getRenderer($),fe=Ee.renderTemplate(ne);te={domNode:ne,templateId:$,templateData:fe}}return te}release($){if(!$)return;this.releaseRow($)}releaseRow($){const{domNode:te,templateId:ne}=$;te&&(te.classList.remove("scrolling"),E(te));const Ee=this.getTemplateCache(ne);Ee.push($)}getTemplateCache($){let te=this.cache.get($);return te||(te=[],this.cache.set($,te)),te}dispose(){this.cache.forEach(($,te)=>{for(const ne of $){const Ee=this.getRenderer(te);Ee.disposeTemplate(ne.templateData),ne.templateData=null}}),this.cache.clear()}getRenderer($){const te=this.renderers.get($);if(!te)throw new Error(`No renderer found for ${$}`);return te}}var C=function($,te,ne,Ee){var fe=arguments.length,ee=fe<3?te:Ee===null?Ee=Object.getOwnPropertyDescriptor(te,ne):Ee,ie;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate($,te,ne,Ee);else for(var U=$.length-1;U>=0;U--)(ie=$[U])&&(ee=(fe<3?ie(ee):fe>3?ie(te,ne,ee):ie(te,ne))||ee);return fe>3&&ee&&Object.defineProperty(te,ne,ee),ee};const O={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements($){return[$]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class k{constructor($){this.elements=$}update(){}getData(){return this.elements}}class Y{constructor($){this.elements=$}update(){}getData(){return this.elements}}class Q{constructor(){this.types=[],this.files=[]}update($){if($.types&&this.types.splice(0,this.types.length,...$.types),$.files){this.files.splice(0,this.files.length);for(let te=0;te<$.files.length;te++){const ne=$.files.item(te);ne&&(ne.size||ne.type)&&this.files.push(ne)}}}getData(){return{types:this.types,files:this.files}}}function H($,te){return Array.isArray($)&&Array.isArray(te)?Object(I.g)($,te):$===te}class Z{constructor($){($==null?void 0:$.getSetSize)?this.getSetSize=$.getSetSize.bind($):this.getSetSize=(te,ne,Ee)=>Ee,($==null?void 0:$.getPosInSet)?this.getPosInSet=$.getPosInSet.bind($):this.getPosInSet=(te,ne)=>ne+1,($==null?void 0:$.getRole)?this.getRole=$.getRole.bind($):this.getRole=te=>"listitem",($==null?void 0:$.isChecked)?this.isChecked=$.isChecked.bind($):this.isChecked=te=>{}}}class oe{constructor($,te,ne,Ee=O){if(this.virtualDelegate=te,this.domId=`list_id_${++oe.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new L.a(50),this.splicing=!1,this.dragOverAnimationStopDisposable=d.a.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=d.a.None,this.onDragLeaveTimeout=d.a.None,this.disposables=new d.b,this._onDidChangeContentHeight=new m.b,this._horizontalScrolling=!1,Ee.horizontalScrolling&&Ee.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new p;for(const ee of ne)this.renderers.set(ee.templateId,ee);this.cache=this.disposables.add(new y(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",typeof Ee.mouseSupport=="boolean"?Ee.mouseSupport:!0),this._horizontalScrolling=Object(D.e)(Ee,ee=>ee.horizontalScrolling,O.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=typeof Ee.additionalScrollHeight=="undefined"?0:Ee.additionalScrollHeight,this.accessibilityProvider=new Z(Ee.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows";const fe=Object(D.e)(Ee,ee=>ee.transformOptimization,O.transformOptimization);fe&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(A.b.addTarget(this.rowsContainer)),this.scrollable=new r.a(Object(D.e)(Ee,ee=>ee.smoothScrolling,!1)?125:0,ee=>Object(x.V)(ee)),this.scrollableElement=this.disposables.add(new F.c(this.rowsContainer,{alwaysConsumeMouseWheel:Object(D.e)(Ee,ee=>ee.alwaysConsumeMouseWheel,O.alwaysConsumeMouseWheel),horizontal:1,vertical:Object(D.e)(Ee,ee=>ee.verticalScrollMode,O.verticalScrollMode),useShadows:Object(D.e)(Ee,ee=>ee.useShadows,O.useShadows),mouseWheelScrollSensitivity:Ee.mouseWheelScrollSensitivity,fastScrollSensitivity:Ee.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),$.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(Object(x.i)(this.rowsContainer,A.a.Change,ee=>this.onTouchChange(ee))),this.disposables.add(Object(x.i)(this.scrollableElement.getDomNode(),"scroll",ee=>ee.target.scrollTop=0)),this.disposables.add(Object(x.i)(this.domNode,"dragover",ee=>this.onDragOver(this.toDragEvent(ee)))),this.disposables.add(Object(x.i)(this.domNode,"drop",ee=>this.onDrop(this.toDragEvent(ee)))),this.disposables.add(Object(x.i)(this.domNode,"dragleave",ee=>this.onDragLeave(this.toDragEvent(ee)))),this.disposables.add(Object(x.i)(this.domNode,"dragend",ee=>this.onDragEnd(ee))),this.setRowLineHeight=Object(D.e)(Ee,ee=>ee.setRowLineHeight,O.setRowLineHeight),this.setRowHeight=Object(D.e)(Ee,ee=>ee.setRowHeight,O.setRowHeight),this.supportDynamicHeights=Object(D.e)(Ee,ee=>ee.supportDynamicHeights,O.supportDynamicHeights),this.dnd=Object(D.e)(Ee,ee=>ee.dnd,O.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling($){if($===this._horizontalScrolling)return;if($&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=$,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const te of this.items)this.measureItemWidth(te);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:Object(x.C)(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($){$.additionalScrollHeight!==void 0&&(this.additionalScrollHeight=$.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),$.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration($.smoothScrolling?125:0),$.horizontalScrolling!==void 0&&(this.horizontalScrolling=$.horizontalScrolling),$.mouseWheelScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:$.mouseWheelScrollSensitivity}),$.fastScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({fastScrollSensitivity:$.fastScrollSensitivity})}splice($,te,ne=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice($,te,ne)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice($,te,ne=[]){const Ee=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),fe={start:$,end:$+te},ee=S.a.intersect(Ee,fe),ie=new Map;for(let le=ee.start;le<ee.end;le++){const Ce=this.items[le];if(Ce.dragStartDisposable.dispose(),Ce.row){let ye=ie.get(Ce.templateId);ye||(ye=[],ie.set(Ce.templateId,ye));const ge=this.renderers.get(Ce.templateId);ge&&ge.disposeElement&&ge.disposeElement(Ce.element,le,Ce.row.templateData,Ce.size),ye.push(Ce.row)}Ce.row=null}const U={start:$+te,end:this.items.length},G=S.a.intersect(U,Ee),J=S.a.relativeComplement(U,Ee),he=ne.map(le=>({id:String(this.itemId++),element:le,templateId:this.virtualDelegate.getTemplateId(le),size:this.virtualDelegate.getHeight(le),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(le),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:d.a.None}));let xe;$===0&&te>=this.items.length?(this.rangeMap=new p,this.rangeMap.splice(0,0,he),xe=this.items,this.items=he):(this.rangeMap.splice($,te,he),xe=this.items.splice($,te,...he));const Ie=ne.length-te,Le=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),Te=b(G,Ie),ze=S.a.intersect(Le,Te);for(let le=ze.start;le<ze.end;le++)this.updateItemInDOM(this.items[le],le);const ue=S.a.relativeComplement(Te,Le);for(const le of ue)for(let Ce=le.start;Ce<le.end;Ce++)this.removeItemFromDOM(Ce);const je=J.map(le=>b(le,Ie)),Pe={start:$,end:$+ne.length},ve=[Pe,...je].map(le=>S.a.intersect(Le,le)),ce=this.getNextToLastElement(ve);for(const le of ve)for(let Ce=le.start;Ce<le.end;Ce++){const ye=this.items[Ce],ge=ie.get(ye.templateId),Me=ge==null?void 0:ge.pop();this.insertItemInDOM(Ce,ce,Me)}for(const le of ie.values())for(const Ce of le)this.cache.release(Ce);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),xe.map(le=>le.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=Object(x.V)(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let $=0;for(const te of this.items)typeof te.width!="undefined"&&($=Math.max($,te.width));this.scrollWidth=$,this.scrollableElement.setScrollDimensions({scrollWidth:$===0?0:$+10})}rerender(){if(!this.supportDynamicHeights)return;for(const $ of this.items)$.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}get length(){return this.items.length}get renderHeight(){const $=this.scrollableElement.getScrollDimensions();return $.height}element($){return this.items[$].element}domElement($){const te=this.items[$].row;return te&&te.domNode}elementHeight($){return this.items[$].size}elementTop($){return this.rangeMap.positionAt($)}indexAt($){return this.rangeMap.indexAt($)}indexAfter($){return this.rangeMap.indexAfter($)}layout($,te){let ne={height:typeof $=="number"?$:Object(x.B)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,ne.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(ne),typeof te!="undefined"&&(this.renderWidth=te,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof te=="number"?te:Object(x.C)(this.domNode)})}render($,te,ne,Ee,fe,ee=!1){const ie=this.getRenderRange(te,ne),U=S.a.relativeComplement(ie,$),G=S.a.relativeComplement($,ie),J=this.getNextToLastElement(U);if(ee){const he=S.a.intersect($,ie);for(let xe=he.start;xe<he.end;xe++)this.updateItemInDOM(this.items[xe],xe)}for(const he of U)for(let xe=he.start;xe<he.end;xe++)this.insertItemInDOM(xe,J);for(const he of G)for(let xe=he.start;xe<he.end;xe++)this.removeItemFromDOM(xe);Ee!==void 0&&(this.rowsContainer.style.left=`-${Ee}px`),this.rowsContainer.style.top=`-${te}px`,this.horizontalScrolling&&fe!==void 0&&(this.rowsContainer.style.width=`${Math.max(fe,this.renderWidth)}px`),this.lastRenderTop=te,this.lastRenderHeight=ne}insertItemInDOM($,te,ne){const Ee=this.items[$];Ee.row||(Ee.row=ne!=null?ne:this.cache.alloc(Ee.templateId));const fe=this.accessibilityProvider.getRole(Ee.element)||"listitem";Ee.row.domNode.setAttribute("role",fe);const ee=this.accessibilityProvider.isChecked(Ee.element);typeof ee!="undefined"&&Ee.row.domNode.setAttribute("aria-checked",String(!!ee)),Ee.row.domNode.parentElement||(te?this.rowsContainer.insertBefore(Ee.row.domNode,te):this.rowsContainer.appendChild(Ee.row.domNode)),this.updateItemInDOM(Ee,$);const ie=this.renderers.get(Ee.templateId);if(!ie)throw new Error(`No renderer found for template id ${Ee.templateId}`);ie&&ie.renderElement(Ee.element,$,Ee.row.templateData,Ee.size);const U=this.dnd.getDragURI(Ee.element);Ee.dragStartDisposable.dispose(),Ee.row.domNode.draggable=!!U,U&&(Ee.dragStartDisposable=Object(x.i)(Ee.row.domNode,"dragstart",G=>this.onDragStart(Ee.element,U,G))),this.horizontalScrolling&&(this.measureItemWidth(Ee),this.eventuallyUpdateScrollWidth())}measureItemWidth($){if(!$.row||!$.row.domNode)return;$.row.domNode.style.width=f.g?"-moz-fit-content":"fit-content",$.width=Object(x.C)($.row.domNode);const te=window.getComputedStyle($.row.domNode);te.paddingLeft&&($.width+=parseFloat(te.paddingLeft)),te.paddingRight&&($.width+=parseFloat(te.paddingRight)),$.row.domNode.style.width=""}updateItemInDOM($,te){$.row.domNode.style.top=`${this.elementTop(te)}px`,this.setRowHeight&&($.row.domNode.style.height=`${$.size}px`),this.setRowLineHeight&&($.row.domNode.style.lineHeight=`${$.size}px`),$.row.domNode.setAttribute("data-index",`${te}`),$.row.domNode.setAttribute("data-last-element",te===this.length-1?"true":"false"),$.row.domNode.setAttribute("data-parity",te%2===0?"even":"odd"),$.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize($.element,te,this.length))),$.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet($.element,te))),$.row.domNode.setAttribute("id",this.getElementDomId(te)),$.row.domNode.classList.toggle("drop-target",$.dropTarget)}removeItemFromDOM($){const te=this.items[$];if(te.dragStartDisposable.dispose(),te.row){const ne=this.renderers.get(te.templateId);ne&&ne.disposeElement&&ne.disposeElement(te.element,$,te.row.templateData,te.size),this.cache.release(te.row),te.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){const $=this.scrollableElement.getScrollPosition();return $.scrollTop}setScrollTop($,te){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:$,reuseAnimation:te})}get scrollTop(){return this.getScrollTop()}set scrollTop($){this.setScrollTop($)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return m.c.map(this.disposables.add(new N.a(this.domNode,"click")).event,$=>this.toMouseEvent($))}get onMouseDblClick(){return m.c.map(this.disposables.add(new N.a(this.domNode,"dblclick")).event,$=>this.toMouseEvent($))}get onMouseMiddleClick(){return m.c.filter(m.c.map(this.disposables.add(new N.a(this.domNode,"auxclick")).event,$=>this.toMouseEvent($)),$=>$.browserEvent.button===1)}get onMouseDown(){return m.c.map(this.disposables.add(new N.a(this.domNode,"mousedown")).event,$=>this.toMouseEvent($))}get onContextMenu(){return m.c.any(m.c.map(this.disposables.add(new N.a(this.domNode,"contextmenu")).event,$=>this.toMouseEvent($)),m.c.map(this.disposables.add(new N.a(this.domNode,A.a.Contextmenu)).event,$=>this.toGestureEvent($)))}get onTouchStart(){return m.c.map(this.disposables.add(new N.a(this.domNode,"touchstart")).event,$=>this.toTouchEvent($))}get onTap(){return m.c.map(this.disposables.add(new N.a(this.rowsContainer,A.a.Tap)).event,$=>this.toGestureEvent($))}toMouseEvent($){const te=this.getItemIndexFromEventTarget($.target||null),ne=typeof te=="undefined"?void 0:this.items[te],Ee=ne&&ne.element;return{browserEvent:$,index:te,element:Ee}}toTouchEvent($){const te=this.getItemIndexFromEventTarget($.target||null),ne=typeof te=="undefined"?void 0:this.items[te],Ee=ne&&ne.element;return{browserEvent:$,index:te,element:Ee}}toGestureEvent($){const te=this.getItemIndexFromEventTarget($.initialTarget||null),ne=typeof te=="undefined"?void 0:this.items[te],Ee=ne&&ne.element;return{browserEvent:$,index:te,element:Ee}}toDragEvent($){const te=this.getItemIndexFromEventTarget($.target||null),ne=typeof te=="undefined"?void 0:this.items[te],Ee=ne&&ne.element;return{browserEvent:$,index:te,element:Ee}}onScroll($){try{const te=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(te,$.scrollTop,$.height,$.scrollLeft,$.scrollWidth),this.supportDynamicHeights&&this._rerender($.scrollTop,$.height,$.inSmoothScrolling)}catch(te){throw console.error("Got bad scroll event:",$),te}}onTouchChange($){$.preventDefault(),$.stopPropagation(),this.scrollTop-=$.translationY}onDragStart($,te,ne){if(!ne.dataTransfer)return;const Ee=this.dnd.getDragElements($);if(ne.dataTransfer.effectAllowed="copyMove",ne.dataTransfer.setData(B.a.TEXT,te),ne.dataTransfer.setDragImage){let fe;this.dnd.getDragLabel&&(fe=this.dnd.getDragLabel(Ee,ne)),typeof fe=="undefined"&&(fe=String(Ee.length));const ee=Object(x.a)(".monaco-drag-image");ee.textContent=fe,document.body.appendChild(ee),ne.dataTransfer.setDragImage(ee,-10,-10),setTimeout(()=>document.body.removeChild(ee),0)}this.currentDragData=new k(Ee),B.c.CurrentDragAndDropData=new Y(Ee),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,ne)}onDragOver($){if($.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),B.c.CurrentDragAndDropData&&B.c.CurrentDragAndDropData.getData()==="vscode-ui")return!1;if(this.setupDragAndDropScrollTopAnimation($.browserEvent),!$.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(B.c.CurrentDragAndDropData)this.currentDragData=B.c.CurrentDragAndDropData;else{if(!$.browserEvent.dataTransfer.types)return!1;this.currentDragData=new Q}const te=this.dnd.onDragOver(this.currentDragData,$.element,$.index,$.browserEvent);if(this.canDrop=typeof te=="boolean"?te:te.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;$.browserEvent.dataTransfer.dropEffect=typeof te!="boolean"&&te.effect===0?"copy":"move";let ne;if(typeof te!="boolean"&&te.feedback?ne=te.feedback:typeof $.index=="undefined"?ne=[-1]:ne=[$.index],ne=Object(I.f)(ne).filter(Ee=>Ee>=-1&&Ee<this.length).sort((Ee,fe)=>Ee-fe),ne=ne[0]===-1?[-1]:ne,H(this.currentDragFeedback,ne))return!0;if(this.currentDragFeedback=ne,this.currentDragFeedbackDisposable.dispose(),ne[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=Object(d.i)(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const Ee of ne){const fe=this.items[Ee];fe.dropTarget=!0,fe.row&&fe.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=Object(d.i)(()=>{for(const Ee of ne){const fe=this.items[Ee];fe.dropTarget=!1,fe.row&&fe.row.domNode.classList.remove("drop-target")}})}return!0}onDragLeave($){var te,ne;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=Object(L.i)(()=>this.clearDragOverFeedback(),100),this.currentDragData&&((ne=(te=this.dnd).onDragLeave)===null||ne===void 0||ne.call(te,this.currentDragData,$.element,$.index,$.browserEvent))}onDrop($){if(!this.canDrop)return;const te=this.currentDragData;if(this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,B.c.CurrentDragAndDropData=void 0,!te||!$.browserEvent.dataTransfer)return;$.browserEvent.preventDefault(),te.update($.browserEvent.dataTransfer),this.dnd.drop(te,$.element,$.index,$.browserEvent)}onDragEnd($){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,B.c.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd($)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=d.a.None}setupDragAndDropScrollTopAnimation($){if(!this.dragOverAnimationDisposable){const te=Object(x.G)(this.domNode).top;this.dragOverAnimationDisposable=Object(x.p)(this.animateDragAndDropScrollTop.bind(this,te))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=Object(L.i)(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=$.pageY}animateDragAndDropScrollTop($){if(this.dragOverMouseY===void 0)return;const te=this.dragOverMouseY-$,ne=this.renderHeight-35;te<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(te-35))):te>ne&&(this.scrollTop+=Math.min(14,Math.floor(.3*(te-ne))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget($){const te=this.scrollableElement.getDomNode();let ne=$;for(;ne instanceof HTMLElement&&ne!==this.rowsContainer&&te.contains(ne);){const Ee=ne.getAttribute("data-index");if(Ee){const fe=Number(Ee);if(!isNaN(fe))return fe}ne=ne.parentElement}return}getRenderRange($,te){return{start:this.rangeMap.indexAt($),end:this.rangeMap.indexAfter($+te-1)}}_rerender($,te,ne){const Ee=this.getRenderRange($,te);let fe,ee;$===this.elementTop(Ee.start)?(fe=Ee.start,ee=0):Ee.end-Ee.start>1&&(fe=Ee.start+1,ee=this.elementTop(fe)-$);let ie=0;for(;;){const U=this.getRenderRange($,te);let G=!1;for(let J=U.start;J<U.end;J++){const he=this.probeDynamicHeight(J);he!==0&&this.rangeMap.splice(J,1,[this.items[J]]),ie+=he,G=G||he!==0}if(!G){ie!==0&&this.eventuallyUpdateScrollDimensions();const J=S.a.relativeComplement(Ee,U);for(const xe of J)for(let Ie=xe.start;Ie<xe.end;Ie++)this.items[Ie].row&&this.removeItemFromDOM(Ie);const he=S.a.relativeComplement(U,Ee);for(const xe of he)for(let Ie=xe.start;Ie<xe.end;Ie++){const Le=Ie+1,Te=Le<this.items.length?this.items[Le].row:null,ze=Te?Te.domNode:null;this.insertItemInDOM(Ie,ze)}for(let xe=U.start;xe<U.end;xe++)this.items[xe].row&&this.updateItemInDOM(this.items[xe],xe);if(typeof fe=="number"){const xe=this.scrollable.getFutureScrollPosition().scrollTop-$,Ie=this.elementTop(fe)-ee+xe;this.setScrollTop(Ie,ne)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight($){const te=this.items[$];if(this.virtualDelegate.getDynamicHeight){const ee=this.virtualDelegate.getDynamicHeight(te.element);if(ee!==null){const ie=te.size;return te.size=ee,te.lastDynamicHeightWidth=this.renderWidth,ee-ie}}if(!te.hasDynamicHeight||te.lastDynamicHeightWidth===this.renderWidth)return 0;if(!!this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(te.element))return 0;const ne=te.size;if(!this.setRowHeight&&te.row){let ee=te.row.domNode.offsetHeight;return te.size=ee,te.lastDynamicHeightWidth=this.renderWidth,ee-ne}const Ee=this.cache.alloc(te.templateId);Ee.domNode.style.height="",this.rowsContainer.appendChild(Ee.domNode);const fe=this.renderers.get(te.templateId);return fe&&(fe.renderElement(te.element,$,Ee.templateData,void 0),fe.disposeElement&&fe.disposeElement(te.element,$,Ee.templateData,void 0)),te.size=Ee.domNode.offsetHeight,this.virtualDelegate.setDynamicHeight&&this.virtualDelegate.setDynamicHeight(te.element,te.size),te.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(Ee.domNode),this.cache.release(Ee),te.size-ne}getNextToLastElement($){const te=$[$.length-1];if(!te)return null;const ne=this.items[te.end];return ne&&ne.row?ne.row.domNode:null}getElementDomId($){return`${this.domId}_${$}`}dispose(){if(this.items){for(const $ of this.items)if($.row){const te=this.renderers.get($.row.templateId);te&&(te.disposeElement&&te.disposeElement($.element,-1,$.row.templateData,void 0),te.disposeTemplate($.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),Object(d.f)(this.disposables)}}oe.InstanceCount=0,C([v.a],oe.prototype,"onMouseClick",null),C([v.a],oe.prototype,"onMouseDblClick",null),C([v.a],oe.prototype,"onMouseMiddleClick",null),C([v.a],oe.prototype,"onMouseDown",null),C([v.a],oe.prototype,"onContextMenu",null),C([v.a],oe.prototype,"onTouchStart",null),C([v.a],oe.prototype,"onTap",null)},fpMC:function(mt,M,t){"use strict";t.d(M,"j",function(){return x}),t.d(M,"h",function(){return N}),t.d(M,"f",function(){return F}),t.d(M,"i",function(){return Y}),t.d(M,"g",function(){return te}),t.d(M,"b",function(){return ne}),t.d(M,"c",function(){return Ee}),t.d(M,"a",function(){return ve}),t.d(M,"d",function(){return ce}),t.d(M,"e",function(){return ye});var f=t("QDVR"),B=t("N0LK");function x(...De){return function(we,Oe){for(let nt=0,Ke=De.length;nt<Ke;nt++){const et=De[nt](we,Oe);if(et)return et}return null}}const N=A.bind(void 0,!0);function A(De,we,Oe){if(!Oe||Oe.length<we.length)return null;let nt;return De?nt=B.R(Oe,we):nt=Oe.indexOf(we)===0,nt?we.length>0?[{start:0,end:we.length}]:[]:null}function F(De,we){const Oe=we.toLowerCase().indexOf(De.toLowerCase());return Oe===-1?null:[{start:Oe,end:Oe+De.length}]}function I(De,we){return L(De.toLowerCase(),we.toLowerCase(),0,0)}function L(De,we,Oe,nt){if(Oe===De.length)return[];if(nt===we.length)return null;if(De[Oe]===we[nt]){let Ke=null;return(Ke=L(De,we,Oe+1,nt+1))?h({start:nt,end:nt+1},Ke):null}return L(De,we,Oe,nt+1)}function v(De){return 97<=De&&De<=122}function m(De){return 65<=De&&De<=90}function d(De){return 48<=De&&De<=57}function D(De){return De===32||De===9||De===10||De===13}const S=new Set;"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach(De=>S.add(De.charCodeAt(0)));function r(De){return D(De)||S.has(De)}function _(De,we){return De===we||r(De)&&r(we)}function b(De){return v(De)||m(De)||d(De)}function h(De,we){return we.length===0?we=[De]:De.end===we[0].start?we[0].start=De.start:we.unshift(De),we}function c(De,we){for(let Oe=we;Oe<De.length;Oe++){const nt=De.charCodeAt(Oe);if(m(nt)||d(nt)||Oe>0&&!b(De.charCodeAt(Oe-1)))return Oe}return De.length}function p(De,we,Oe,nt){if(Oe===De.length)return[];if(nt===we.length)return null;if(De[Oe]!==we[nt].toLowerCase())return null;{let Ke=null,et=nt+1;for(Ke=p(De,we,Oe+1,nt+1);!Ke&&(et=c(we,et))<we.length;)Ke=p(De,we,Oe+1,et),et++;return Ke===null?null:h({start:nt,end:nt+1},Ke)}}function E(De){let we=0,Oe=0,nt=0,Ke=0,et=0;for(let it=0;it<De.length;it++)et=De.charCodeAt(it),m(et)&&we++,v(et)&&Oe++,b(et)&&nt++,d(et)&&Ke++;const bt=we/De.length,Tt=Oe/De.length,$t=nt/De.length,Xe=Ke/De.length;return{upperPercent:bt,lowerPercent:Tt,alphaPercent:$t,numericPercent:Xe}}function y(De){const{upperPercent:we,lowerPercent:Oe}=De;return Oe===0&&we>.6}function C(De){const{upperPercent:we,lowerPercent:Oe,alphaPercent:nt,numericPercent:Ke}=De;return Oe>.2&&we<.8&&nt>.6&&Ke<.2}function O(De){let we=0,Oe=0,nt=0,Ke=0;for(let et=0;et<De.length;et++)nt=De.charCodeAt(et),m(nt)&&we++,v(nt)&&Oe++,D(nt)&&Ke++;return(we===0||Oe===0)&&Ke===0?De.length<=30:we<=5}function k(De,we){if(!we)return null;if(we=we.trim(),we.length===0)return null;if(!O(De))return null;if(we.length>60)return null;const Oe=E(we);if(!C(Oe)){if(!y(Oe))return null;we=we.toLowerCase()}let nt=null,Ke=0;for(De=De.toLowerCase();Ke<we.length&&(nt=p(De,we,0,Ke))===null;)Ke=c(we,Ke+1);return nt}function Y(De,we,Oe=!1){if(!we||we.length===0)return null;let nt=null,Ke=0;for(De=De.toLowerCase(),we=we.toLowerCase();Ke<we.length&&(nt=Q(De,we,0,Ke,Oe))===null;)Ke=H(we,Ke+1);return nt}function Q(De,we,Oe,nt,Ke){if(Oe===De.length)return[];if(nt===we.length)return null;if(_(De.charCodeAt(Oe),we.charCodeAt(nt))){let et=null,bt=nt+1;if(et=Q(De,we,Oe+1,nt+1,Ke),!Ke)for(;!et&&(bt=H(we,bt))<we.length;)et=Q(De,we,Oe+1,bt,Ke),bt++;return et===null?null:h({start:nt,end:nt+1},et)}else return null}function H(De,we){for(let Oe=we;Oe<De.length;Oe++)if(r(De.charCodeAt(Oe))||Oe>0&&r(De.charCodeAt(Oe-1)))return Oe;return De.length}const Z=x(N,k,F),oe=x(N,k,I),$=new f.a(1e4);function te(De,we,Oe=!1){if(typeof De!="string"||typeof we!="string")return null;let nt=$.get(De);nt||(nt=new RegExp(B.p(De),"i"),$.set(De,nt));const Ke=nt.exec(we);return Ke?[{start:Ke.index,end:Ke.index+Ke[0].length}]:Oe?oe(De,we):Z(De,we)}function ne(De,we,Oe,nt,Ke,et){const bt=Math.min(13,De.length);for(;Oe<bt;Oe++){const Tt=ce(De,we,Oe,nt,Ke,et,!1);if(Tt)return Tt}return[0,et]}function Ee(De){if(typeof De=="undefined")return[];const we=[],Oe=De[1];for(let nt=De.length-1;nt>1;nt--){const Ke=De[nt]+Oe,et=we[we.length-1];et&&et.end===Ke?et.end=Ke+1:we.push({start:Ke,end:Ke+1})}return we}const fe=128;function ee(){const De=[],we=[];for(let Oe=0;Oe<=fe;Oe++)we[Oe]=0;for(let Oe=0;Oe<=fe;Oe++)De.push(we.slice(0));return De}function ie(De){const we=[];for(let Oe=0;Oe<=De;Oe++)we[Oe]=0;return we}const U=ie(2*fe),G=ie(2*fe),J=ee(),he=ee(),xe=ee(),Ie=!1;function Le(De,we,Oe,nt,Ke){function et(Tt,$t,Xe=" "){for(;Tt.length<$t;)Tt=Xe+Tt;return Tt}let bt=` | |${nt.split("").map(Tt=>et(Tt,3)).join("|")}
|
|
|
`;for(let Tt=0;Tt<=Oe;Tt++)Tt===0?bt+=" |":bt+=`${we[Tt-1]}|`,bt+=De[Tt].slice(0,Ke+1).map($t=>et($t.toString(),3)).join("|")+`
|
|
|
`;return bt}function Te(De,we,Oe,nt){De=De.substr(we),Oe=Oe.substr(nt),console.log(Le(he,De,De.length,Oe,Oe.length)),console.log(Le(xe,De,De.length,Oe,Oe.length)),console.log(Le(J,De,De.length,Oe,Oe.length))}function ze(De,we){if(we<0||we>=De.length)return!1;const Oe=De.codePointAt(we);switch(Oe){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!!B.B(Oe)}}function ue(De,we){if(we<0||we>=De.length)return!1;const Oe=De.charCodeAt(we);switch(Oe){case 32:case 9:return!0;default:return!1}}function je(De,we,Oe){return we[De]!==Oe[De]}function Pe(De,we,Oe,nt,Ke,et,bt=!1){for(;we<Oe&&Ke<et;)De[we]===nt[Ke]&&(bt&&(U[we]=Ke),we+=1),Ke+=1;return we===Oe}var ve;(function(De){De.Default=[-100,0];function we(Oe){return!Oe||Oe.length===2&&Oe[0]===-100&&Oe[1]===0}De.isDefault=we})(ve||(ve={}));function ce(De,we,Oe,nt,Ke,et,bt){const Tt=De.length>fe?fe:De.length,$t=nt.length>fe?fe:nt.length;if(Oe>=Tt||et>=$t||Tt-Oe>$t-et)return;if(!Pe(we,Oe,Tt,Ke,et,$t,!0))return;le(Tt,$t,Oe,et,we,Ke);let Xe=1,it=1,re=Oe,We=et;const tt=[!1];for(Xe=1,re=Oe;re<Tt;Xe++,re++){const Mo=U[re],xo=G[re],Do=re+1<Tt?G[re+1]:$t;for(it=Mo-et+1,We=Mo;We<Do;it++,We++){let Lo=Number.MIN_SAFE_INTEGER,To=!1;We<=xo&&(Lo=Ce(De,we,re,Oe,nt,Ke,We,$t,et,J[Xe-1][it-1]===0,tt));let Ht=0;Lo!==Number.MAX_SAFE_INTEGER&&(To=!0,Ht=Lo+he[Xe-1][it-1]);const Mt=We>Mo,Ue=Mt?he[Xe][it-1]+(J[Xe][it-1]>0?-5:0):0,dt=We>Mo+1&&J[Xe][it-1]>0,Ut=dt?he[Xe][it-2]+(J[Xe][it-2]>0?-5:0):0;if(dt&&(!Mt||Ut>=Ue)&&(!To||Ut>=Ht))he[Xe][it]=Ut,xe[Xe][it]=3,J[Xe][it]=0;else if(Mt&&(!To||Ue>=Ht))he[Xe][it]=Ue,xe[Xe][it]=2,J[Xe][it]=0;else if(To)he[Xe][it]=Ht,xe[Xe][it]=1,J[Xe][it]=J[Xe-1][it-1]+1;else throw new Error("not possible")}}if(Ie&&Te(De,Oe,nt,et),!tt[0]&&!bt)return;Xe--,it--;const Et=[he[Xe][it],et];let It=0,Rt=0;for(;Xe>=1;){let Mo=it;do{const xo=xe[Xe][Mo];if(xo===3)Mo=Mo-2;else if(xo===2)Mo=Mo-1;else break}while(Mo>=1);It>1&&we[Oe+Xe-1]===Ke[et+it-1]&&!je(Mo+et-1,nt,Ke)&&It+1>J[Xe][Mo]&&(Mo=it),Mo===it?It++:It=1,Rt||(Rt=Mo),Xe--,it=Mo-1,Et.push(it)}$t===Tt&&(Et[0]+=2);const vo=Rt-Tt;return Et[0]-=vo,Et}function le(De,we,Oe,nt,Ke,et){let bt=De-1,Tt=we-1;for(;bt>=Oe&&Tt>=nt;)Ke[bt]===et[Tt]&&(G[bt]=Tt,bt--),Tt--}function Ce(De,we,Oe,nt,Ke,et,bt,Tt,$t,Xe,it){if(we[Oe]!==et[bt])return Number.MIN_SAFE_INTEGER;let re=1,We=!1;return bt===Oe-nt?re=De[Oe]===Ke[bt]?7:5:je(bt,Ke,et)&&(bt===0||!je(bt-1,Ke,et))?(re=De[Oe]===Ke[bt]?7:5,We=!0):ze(et,bt)&&(bt===0||!ze(et,bt-1))?re=5:(ze(et,bt-1)||ue(et,bt-1))&&(re=5,We=!0),re>1&&Oe===nt&&(it[0]=!0),We||(We=je(bt,Ke,et)||ze(et,bt-1)||ue(et,bt-1)),Oe===nt?bt>$t&&(re-=We?3:5):Xe?re+=We?2:0:re+=We?0:1,bt+1===Tt&&(re-=We?3:5),re}function ye(De,we,Oe,nt,Ke,et,bt){return ge(De,we,Oe,nt,Ke,et,!0,bt)}function ge(De,we,Oe,nt,Ke,et,bt,Tt){let $t=ce(De,we,Oe,nt,Ke,et,Tt);if($t&&!bt)return $t;if(De.length>=3){const Xe=Math.min(7,De.length-1);for(let it=Oe+1;it<Xe;it++){const re=Me(De,it);if(re){const We=ce(re,re.toLowerCase(),Oe,nt,Ke,et,Tt);We&&(We[0]-=3,(!$t||We[0]>$t[0])&&($t=We))}}}return $t}function Me(De,we){if(we+1>=De.length)return;const Oe=De[we],nt=De[we+1];return Oe===nt?void 0:De.slice(0,we)+nt+Oe+De.slice(we+2)}},gCVg:function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var f=t("cGHE"),B=t("aokT");class x extends B.a{constructor(N,A,F,I){super(N,A,F,I);this.selectionStartLineNumber=N,this.selectionStartColumn=A,this.positionLineNumber=F,this.positionColumn=I}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(N){return x.selectionsEqual(this,N)}static selectionsEqual(N,A){return N.selectionStartLineNumber===A.selectionStartLineNumber&&N.selectionStartColumn===A.selectionStartColumn&&N.positionLineNumber===A.positionLineNumber&&N.positionColumn===A.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(N,A){return this.getDirection()===0?new x(this.startLineNumber,this.startColumn,N,A):new x(N,A,this.startLineNumber,this.startColumn)}getPosition(){return new f.a(this.positionLineNumber,this.positionColumn)}setStartPosition(N,A){return this.getDirection()===0?new x(N,A,this.endLineNumber,this.endColumn):new x(this.endLineNumber,this.endColumn,N,A)}static fromPositions(N,A=N){return new x(N.lineNumber,N.column,A.lineNumber,A.column)}static liftSelection(N){return new x(N.selectionStartLineNumber,N.selectionStartColumn,N.positionLineNumber,N.positionColumn)}static selectionsArrEqual(N,A){if(N&&!A||!N&&A)return!1;if(!N&&!A)return!0;if(N.length!==A.length)return!1;for(let F=0,I=N.length;F<I;F++)if(!this.selectionsEqual(N[F],A[F]))return!1;return!0}static isISelection(N){return N&&typeof N.selectionStartLineNumber=="number"&&typeof N.selectionStartColumn=="number"&&typeof N.positionLineNumber=="number"&&typeof N.positionColumn=="number"}static createWithDirection(N,A,F,I,L){return L===0?new x(N,A,F,I):new x(F,I,N,A)}}},gJAb:function(mt,M,t){"use strict";t.r(M);var f=t("EzsQ"),B=t.n(f),x=t("EffR"),N=t("zrhQ"),A=t("pmY6"),F=t("sswD"),I=t("twdY"),L=t("i/Ef"),v=t("WBhO"),m=t("scqD"),d=t("MD5Z"),D=t("t9D7"),S=t("A9l+"),r=t("nEHx"),_=function(C,O,k,Y){var Q=arguments.length,H=Q<3?O:Y===null?Y=Object.getOwnPropertyDescriptor(O,k):Y,Z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(C,O,k,Y);else for(var oe=C.length-1;oe>=0;oe--)(Z=C[oe])&&(H=(Q<3?Z(H):Q>3?Z(O,k,H):Z(O,k))||H);return Q>3&&H&&Object.defineProperty(O,k,H),H},b=function(C,O){return function(k,Y){O(k,Y,C)}};let h=class C extends A.a{constructor(O,k,Y){super();this._editor=O,this._modeService=Y,this._widget=null,this._register(this._editor.onDidChangeModel(Q=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(Q=>this.stop())),this._register(I.E.onDidChange(Q=>this.stop())),this._register(this._editor.onKeyUp(Q=>Q.keyCode===9&&this.stop()))}static get(O){return O.getContribution(C.ID)}dispose(){this.stop(),super.dispose()}launch(){if(this._widget)return;if(!this._editor.hasModel())return;this._widget=new y(this._editor,this._modeService)}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};h.ID="editor.contrib.inspectTokens",h=_([b(1,m.a),b(2,v.a)],h);class c extends F.b{constructor(){super({id:"editor.action.inspectTokens",label:S.c.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(C,O){let k=h.get(O);k&&k.launch()}}function p(C){let O="";for(let k=0,Y=C.length;k<Y;k++){let Q=C.charCodeAt(k);switch(Q){case 9:O+="\u2192";break;case 32:O+="\xB7";break;default:O+=String.fromCharCode(Q)}}return O}function E(C,O){const k=I.E.get(O);if(k)return k;const Y=C.encodeLanguageId(O);return{getInitialState:()=>L.b,tokenize:(Q,H,Z,oe)=>Object(L.c)(O,Q,Z,oe),tokenize2:(Q,H,Z,oe)=>Object(L.d)(Y,Q,Z,oe)}}class y extends A.a{constructor(C,O){super();this.allowEditorOverflow=!0,this._editor=C,this._modeService=O,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=E(this._modeService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(k=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return y._ID}_compute(C){let O=this._getTokensAtLine(C.lineNumber),k=0;for(let oe=O.tokens1.length-1;oe>=0;oe--){let $=O.tokens1[oe];if(C.column-1>=$.offset){k=oe;break}}let Y=0;for(let oe=O.tokens2.length>>>1;oe>=0;oe--)if(C.column-1>=O.tokens2[oe<<1]){Y=oe;break}let Q=this._model.getLineContent(C.lineNumber),H="";if(k<O.tokens1.length){let oe=O.tokens1[k].offset,$=k+1<O.tokens1.length?O.tokens1[k+1].offset:Q.length;H=Q.substring(oe,$)}Object(x.R)(this._domNode,Object(x.a)("h2.tm-token",void 0,p(H),Object(x.a)("span.tm-token-length",void 0,`${H.length} ${H.length===1?"char":"chars"}`))),Object(x.q)(this._domNode,Object(x.a)("hr.tokens-inspect-separator",{style:"clear:both"}));const Z=(Y<<1)+1<O.tokens2.length?this._decodeMetadata(O.tokens2[(Y<<1)+1]):null;Object(x.q)(this._domNode,Object(x.a)("table.tm-metadata-table",void 0,Object(x.a)("tbody",void 0,Object(x.a)("tr",void 0,Object(x.a)("td.tm-metadata-key",void 0,"language"),Object(x.a)("td.tm-metadata-value",void 0,`${Z?Z.languageId:"-?-"}`)),Object(x.a)("tr",void 0,Object(x.a)("td.tm-metadata-key",void 0,"token type"),Object(x.a)("td.tm-metadata-value",void 0,`${Z?this._tokenTypeToString(Z.tokenType):"-?-"}`)),Object(x.a)("tr",void 0,Object(x.a)("td.tm-metadata-key",void 0,"font style"),Object(x.a)("td.tm-metadata-value",void 0,`${Z?this._fontStyleToString(Z.fontStyle):"-?-"}`)),Object(x.a)("tr",void 0,Object(x.a)("td.tm-metadata-key",void 0,"foreground"),Object(x.a)("td.tm-metadata-value",void 0,`${Z?N.a.Format.CSS.formatHex(Z.foreground):"-?-"}`)),Object(x.a)("tr",void 0,Object(x.a)("td.tm-metadata-key",void 0,"background"),Object(x.a)("td.tm-metadata-value",void 0,`${Z?N.a.Format.CSS.formatHex(Z.background):"-?-"}`))))),Object(x.q)(this._domNode,Object(x.a)("hr.tokens-inspect-separator")),k<O.tokens1.length&&Object(x.q)(this._domNode,Object(x.a)("span.tm-token-type",void 0,O.tokens1[k].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(C){let O=I.E.getColorMap(),k=I.D.getLanguageId(C),Y=I.D.getTokenType(C),Q=I.D.getFontStyle(C),H=I.D.getForeground(C),Z=I.D.getBackground(C);return{languageId:this._modeService.languageIdCodec.decodeLanguageId(k),tokenType:Y,fontStyle:Q,foreground:O[H],background:O[Z]}}_tokenTypeToString(C){switch(C){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 4:return"RegEx";default:return"??"}}_fontStyleToString(C){let O="";return C&1&&(O+="italic "),C&2&&(O+="bold "),C&4&&(O+="underline "),O.length===0&&(O="---"),O}_getTokensAtLine(C){let O=this._getStateBeforeLine(C),k=this._tokenizationSupport.tokenize(this._model.getLineContent(C),!0,O,0),Y=this._tokenizationSupport.tokenize2(this._model.getLineContent(C),!0,O,0);return{startState:O,tokens1:k.tokens,tokens2:Y.tokens,endState:k.endState}}_getStateBeforeLine(C){let O=this._tokenizationSupport.getInitialState();for(let k=1;k<C;k++){let Y=this._tokenizationSupport.tokenize(this._model.getLineContent(k),!0,O,0);O=Y.endState}return O}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}y._ID="editor.contrib.inspectTokensWidget",Object(F.l)(h.ID,h),Object(F.j)(c),Object(D.f)((C,O)=>{const k=C.getColor(d.F);if(k){let H=C.type===r.a.HIGH_CONTRAST?2:1;O.addRule(`.monaco-editor .tokens-inspect-widget { border: ${H}px solid ${k}; }`),O.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${k}; }`)}const Y=C.getColor(d.E);Y&&O.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${Y}; }`);const Q=C.getColor(d.G);Q&&O.addRule(`.monaco-editor .tokens-inspect-widget { color: ${Q}; }`)})},gqHg:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:function(){return t.e(22).then(t.bind(null,"fhwZ"))}}),Object(f.a)({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:function(){return t.e(22).then(t.bind(null,"fhwZ"))}})},gslv:function(mt,M,t){"use strict";t.d(M,"i",function(){return F}),t.d(M,"e",function(){return L}),t.d(M,"f",function(){return v}),t.d(M,"c",function(){return m}),t.d(M,"b",function(){return d}),t.d(M,"d",function(){return D}),t.d(M,"g",function(){return S}),t.d(M,"h",function(){return r}),t.d(M,"j",function(){return _}),t.d(M,"a",function(){return b});var f=t("PTeM"),B=t("tYmi"),x=t("MrjW"),N=t("N0LK"),A=t("bY76");function F(h){return Object(A.b)(h,!0)}class I{constructor(h){this._ignorePathCasing=h}compare(h,c,p=!1){return h===c?0:Object(N.f)(this.getComparisonKey(h,p),this.getComparisonKey(c,p))}isEqual(h,c,p=!1){return h===c?!0:!h||!c?!1:this.getComparisonKey(h,p)===this.getComparisonKey(c,p)}getComparisonKey(h,c=!1){return h.with({path:this._ignorePathCasing(h)?h.path.toLowerCase():void 0,fragment:c?null:void 0}).toString()}joinPath(h,...c){return A.a.joinPath(h,...c)}basenameOrAuthority(h){return d(h)||h.authority}basename(h){return x.e.basename(h.path)}dirname(h){if(h.path.length===0)return h;let c;return h.scheme===B.c.file?c=A.a.file(x.b(F(h))).path:(c=x.e.dirname(h.path),h.authority&&c.length&&c.charCodeAt(0)!==47&&(console.error(`dirname("${h.toString})) resulted in a relative path`),c="/")),h.with({path:c})}normalizePath(h){if(!h.path.length)return h;let c;return h.scheme===B.c.file?c=A.a.file(x.d(F(h))).path:c=x.e.normalize(h.path),h.with({path:c})}resolvePath(h,c){if(h.scheme===B.c.file){const p=A.a.file(x.g(F(h),c));return h.with({authority:p.authority,path:p.path})}return c=f.d(c),h.with({path:x.e.resolve(h.path,c)})}}const L=new I(()=>!1),v=L.isEqual.bind(L),m=L.basenameOrAuthority.bind(L),d=L.basename.bind(L),D=L.dirname.bind(L),S=L.joinPath.bind(L),r=L.normalizePath.bind(L),_=L.resolvePath.bind(L);var b;(function(h){h.META_DATA_LABEL="label",h.META_DATA_DESCRIPTION="description",h.META_DATA_SIZE="size",h.META_DATA_MIME="mime";function c(p){const E=new Map,y=p.path.substring(p.path.indexOf(";")+1,p.path.lastIndexOf(";"));y.split(";").forEach(O=>{const[k,Y]=O.split(":");k&&Y&&E.set(k,Y)});const C=p.path.substring(0,p.path.indexOf(";"));return C&&E.set(h.META_DATA_MIME,C),E}h.parseMetaData=c})(b||(b={}))},hFIF:function(mt,M,t){"use strict";t.r(M),t.d(M,"StandaloneGotoSymbolQuickAccessProvider",function(){return ve}),t.d(M,"GotoLineAction",function(){return ce});var f=t("udvx"),B=t("28lO"),x=t("JQT/"),N=t("Vhoy"),A=t("fpMC"),F=t("MrjW"),I=t("MNsG"),L=t("N0LK");const v=[void 0,[]];function m(le,Ce,ye=0,ge=0){const Me=Ce;return Me.values&&Me.values.length>1?d(le,Me.values,ye,ge):D(le,Ce,ye,ge)}function d(le,Ce,ye,ge){let Me=0;const De=[];for(const we of Ce){const[Oe,nt]=D(le,we,ye,ge);if(typeof Oe!="number")return v;Me+=Oe,De.push(...nt)}return[Me,S(De)]}function D(le,Ce,ye,ge){const Me=Object(A.d)(Ce.original,Ce.originalLowercase,ye,le,le.toLowerCase(),ge,!0);return Me?[Me[0],Object(A.c)(Me)]:v}function S(le){const Ce=le.sort((Me,De)=>Me.start-De.start),ye=[];let ge;for(const Me of Ce)!ge||!r(ge,Me)?(ge=Me,ye.push(Me)):(ge.start=Math.min(ge.start,Me.start),ge.end=Math.max(ge.end,Me.end));return ye}function r(le,Ce){return le.end<Ce.start?!1:!(Ce.end<le.start)}function _(le){return le.startsWith('"')&&le.endsWith('"')}const b=" ";function h(le){typeof le!="string"&&(le="");const Ce=le.toLowerCase(),{pathNormalized:ye,normalized:ge,normalizedLowercase:Me}=c(le),De=ye.indexOf(F.h)>=0,we=_(le);let Oe;const nt=le.split(b);if(nt.length>1)for(const Ke of nt){const et=_(Ke),{pathNormalized:bt,normalized:Tt,normalizedLowercase:$t}=c(Ke);Tt&&(Oe||(Oe=[]),Oe.push({original:Ke,originalLowercase:Ke.toLowerCase(),pathNormalized:bt,normalized:Tt,normalizedLowercase:$t,expectContiguousMatch:et}))}return{original:le,originalLowercase:Ce,pathNormalized:ye,normalized:ge,normalizedLowercase:Me,values:Oe,containsPathSeparator:De,expectContiguousMatch:we}}function c(le){let Ce;I.i?Ce=le.replace(/\//g,F.h):Ce=le.replace(/\\/g,F.h);const ye=Object(L.T)(Ce).replace(/\s|"/g,"");return{pathNormalized:Ce,normalized:ye,normalizedLowercase:ye.toLowerCase()}}function p(le){return Array.isArray(le)?h(le.map(Ce=>Ce.original).join(b)):h(le.original)}var E=t("pmY6"),y=t("aokT"),C=t("twdY"),O=t("6OMU"),k=t("/cxE"),Y=t("JYp7"),Q=t("QDVR"),H=t("al33");class Z{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(le,Ce){let ye;typeof le=="string"?ye=`${Ce.id}/${le}`:(ye=`${Ce.id}/${le.name}`,Ce.children.get(ye)!==void 0&&(ye=`${Ce.id}/${le.name}_${le.range.startLineNumber}_${le.range.startColumn}`));let ge=ye;for(let Me=0;Ce.children.get(ge)!==void 0;Me++)ge=`${ye}_${Me}`;return ge}static empty(le){return le.children.size===0}}class oe extends Z{constructor(le,Ce,ye){super();this.id=le,this.parent=Ce,this.symbol=ye,this.children=new Map}}class $ extends Z{constructor(le,Ce,ye,ge){super();this.id=le,this.parent=Ce,this.label=ye,this.order=ge,this.children=new Map}}class te extends Z{constructor(le){super();this.uri=le,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}static create(le,Ce){let ye=this._keys.for(le,!0),ge=te._requests.get(ye);if(!ge){let Me=new x.b;ge={promiseCnt:0,source:Me,promise:te._create(le,Me.token),model:void 0},te._requests.set(ye,ge);const De=Date.now();ge.promise.then(()=>{this._requestDurations.update(le,Date.now()-De)})}return ge.model?Promise.resolve(ge.model):(ge.promiseCnt+=1,Ce.onCancellationRequested(()=>{--ge.promiseCnt===0&&(ge.source.cancel(),te._requests.delete(ye))}),new Promise((Me,De)=>{ge.promise.then(we=>{ge.model=we,Me(we)},we=>{te._requests.delete(ye),De(we)})}))}static _create(le,Ce){const ye=new x.b(Ce),ge=new te(le.uri),Me=C.m.ordered(le),De=Me.map((Oe,nt)=>{var Ke;let et=Z.findId(`provider_${nt}`,ge),bt=new $(et,ge,(Ke=Oe.displayName)!==null&&Ke!==void 0?Ke:"Unknown Outline Provider",nt);return Promise.resolve(Oe.provideDocumentSymbols(le,ye.token)).then(Tt=>{for(const $t of Tt||[])te._makeOutlineElement($t,bt);return bt},Tt=>(Object(k.g)(Tt),bt)).then(Tt=>{Z.empty(Tt)?Tt.remove():ge._groups.set(et,Tt)})}),we=C.m.onDidChange(()=>{const Oe=C.m.ordered(le);Object(O.g)(Oe,Me)||ye.cancel()});return Promise.all(De).then(()=>ye.token.isCancellationRequested&&!Ce.isCancellationRequested?te._create(le,Ce):ge._compact()).finally(()=>{we.dispose()})}static _makeOutlineElement(le,Ce){let ye=Z.findId(le,Ce),ge=new oe(ye,Ce,le);if(le.children)for(const Me of le.children)te._makeOutlineElement(Me,ge);Ce.children.set(ge.id,ge)}_compact(){let le=0;for(const[Ce,ye]of this._groups)ye.children.size===0?this._groups.delete(Ce):le+=1;if(le!==1)this.children=this._groups;else{let Ce=Y.a.first(this._groups.values());for(let[,ye]of Ce.children)ye.parent=this,this.children.set(ye.id,ye)}return this}getTopLevelSymbols(){const le=[];for(const Ce of this.children.values())Ce instanceof oe?le.push(Ce.symbol):le.push(...Y.a.map(Ce.children.values(),ye=>ye.symbol));return le.sort((Ce,ye)=>y.a.compareRangesUsingStarts(Ce.range,ye.range))}asListOfDocumentSymbols(){const le=this.getTopLevelSymbols(),Ce=[];return te._flattenDocumentSymbols(Ce,le,""),Ce.sort((ye,ge)=>y.a.compareRangesUsingStarts(ye.range,ge.range))}static _flattenDocumentSymbols(le,Ce,ye){for(const ge of Ce)le.push({kind:ge.kind,tags:ge.tags,name:ge.name,detail:ge.detail,containerName:ge.containerName||ye,range:ge.range,selectionRange:ge.selectionRange,children:void 0}),ge.children&&te._flattenDocumentSymbols(le,ge.children,ge.name)}}te._requestDurations=new H.b(C.m,350),te._requests=new Q.a(9,.75),te._keys=new class{constructor(){this._counter=1,this._data=new WeakMap}for(le,Ce){return`${le.id}/${Ce?le.getVersionId():""}/${this._hash(C.m.all(le))}`}_hash(le){let Ce="";for(const ye of le){let ge=this._data.get(ye);typeof ge=="undefined"&&(ge=this._counter++,this._data.set(ye,ge)),Ce+=ge}return Ce}};var ne=t("H+DO"),Ee=t("3/fG"),fe=function(le,Ce,ye,ge){function Me(De){return De instanceof ye?De:new ye(function(we){we(De)})}return new(ye||(ye=Promise))(function(De,we){function Oe(et){try{Ke(ge.next(et))}catch(bt){we(bt)}}function nt(et){try{Ke(ge.throw(et))}catch(bt){we(bt)}}function Ke(et){et.done?De(et.value):Me(et.value).then(Oe,nt)}Ke((ge=ge.apply(le,Ce||[])).next())})};class ee extends ne.a{constructor(le=Object.create(null)){super(le);this.options=le,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(le){return this.provideLabelPick(le,Object(Ee.a)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),E.a.None}provideWithTextEditor(le,Ce,ye){const ge=le.editor,Me=this.getModel(ge);return Me?C.m.has(Me)?this.doProvideWithEditorSymbols(le,Me,Ce,ye):this.doProvideWithoutEditorSymbols(le,Me,Ce,ye):E.a.None}doProvideWithoutEditorSymbols(le,Ce,ye,ge){const Me=new E.b;return this.provideLabelPick(ye,Object(Ee.a)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(()=>fe(this,void 0,void 0,function*(){const De=yield this.waitForLanguageSymbolRegistry(Ce,Me);if(!De||ge.isCancellationRequested)return;Me.add(this.doProvideWithEditorSymbols(le,Ce,ye,ge))}))(),Me}provideLabelPick(le,Ce){le.items=[{label:Ce,index:0,kind:14}],le.ariaLabel=Ce}waitForLanguageSymbolRegistry(le,Ce){return fe(this,void 0,void 0,function*(){if(C.m.has(le))return!0;let ye;const ge=new Promise(De=>ye=De),Me=Ce.add(C.m.onDidChange(()=>{C.m.has(le)&&(Me.dispose(),ye(!0))}));return Ce.add(Object(E.i)(()=>ye(!1))),ge})}doProvideWithEditorSymbols(le,Ce,ye,ge){const Me=le.editor,De=new E.b;De.add(ye.onDidAccept(et=>{const[bt]=ye.selectedItems;bt&&bt.range&&(this.gotoLocation(le,{range:bt.range.selection,keyMods:ye.keyMods,preserveFocus:et.inBackground}),et.inBackground||ye.hide())})),De.add(ye.onDidTriggerItemButton(({item:et})=>{et&&et.range&&(this.gotoLocation(le,{range:et.range.selection,keyMods:ye.keyMods,forceSideBySide:!0}),ye.hide())}));const we=this.getDocumentSymbols(Ce,ge);let Oe;const nt=()=>fe(this,void 0,void 0,function*(){Oe==null||Oe.dispose(!0),ye.busy=!1,Oe=new x.b(ge),ye.busy=!0;try{const et=h(ye.value.substr(ee.PREFIX.length).trim()),bt=yield this.doGetSymbolPicks(we,et,void 0,Oe.token);if(ge.isCancellationRequested)return;bt.length>0?ye.items=bt:et.original.length>0?this.provideLabelPick(ye,Object(Ee.a)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(ye,Object(Ee.a)("noSymbolResults","No editor symbols"))}finally{ge.isCancellationRequested||(ye.busy=!1)}});De.add(ye.onDidChangeValue(()=>nt())),nt();let Ke=!0;return De.add(ye.onDidChangeActive(()=>{const[et]=ye.activeItems;if(et&&et.range){if(Ke){Ke=!1;return}Me.revealRangeInCenter(et.range.selection,0),this.addDecorations(Me,et.range.decoration)}})),De}doGetSymbolPicks(le,Ce,ye,ge){return fe(this,void 0,void 0,function*(){const Me=yield le;if(ge.isCancellationRequested)return[];const De=Ce.original.indexOf(ee.SCOPE_PREFIX)===0,we=De?1:0;let Oe,nt;Ce.values&&Ce.values.length>1?(Oe=p(Ce.values[0]),nt=p(Ce.values.slice(1))):Oe=Ce;const Ke=[];for(let $t=0;$t<Me.length;$t++){const Xe=Me[$t],it=Object(L.U)(Xe.name),re=`$(symbol-${C.C.toString(Xe.kind)||"property"}) ${it}`,We=re.length-it.length;let tt=Xe.containerName;(ye==null?void 0:ye.extraContainerLabel)&&(tt?tt=`${ye.extraContainerLabel} \u2022 ${tt}`:tt=ye.extraContainerLabel);let Et,It,Rt,vo;if(Ce.original.length>we){let xo=!1;if(Oe!==Ce&&([Et,It]=m(re,Object.assign(Object.assign({},Ce),{values:void 0}),we,We),typeof Et=="number"&&(xo=!0)),typeof Et!="number"&&([Et,It]=m(re,Oe,we,We),typeof Et!="number"))continue;if(!xo&&nt){if(tt&&nt.original.length>0&&([Rt,vo]=m(tt,nt)),typeof Rt!="number")continue;typeof Et=="number"&&(Et+=Rt)}}const Mo=Xe.tags&&Xe.tags.indexOf(1)>=0;Ke.push({index:$t,kind:Xe.kind,score:Et,label:re,ariaLabel:it,description:tt,highlights:Mo?void 0:{label:It,description:vo},range:{selection:y.a.collapseToStart(Xe.selectionRange),decoration:Xe.range},strikethrough:Mo,buttons:(()=>{var xo,Do;const Lo=((xo=this.options)===null||xo===void 0?void 0:xo.openSideBySideDirection)?(Do=this.options)===null||Do===void 0?void 0:Do.openSideBySideDirection():void 0;return Lo?[{iconClass:Lo==="right"?N.b.splitHorizontal.classNames:N.b.splitVertical.classNames,tooltip:Lo==="right"?Object(Ee.a)("openToSide","Open to the Side"):Object(Ee.a)("openToBottom","Open to the Bottom")}]:void 0})()})}const et=Ke.sort(($t,Xe)=>De?this.compareByKindAndScore($t,Xe):this.compareByScore($t,Xe));let bt=[];if(De){let $t,Xe,it=0;function Tt(){Xe&&typeof $t=="number"&&it>0&&(Xe.label=Object(L.v)(U[$t]||ie,it))}for(const re of et)$t!==re.kind?(Tt(),$t=re.kind,it=1,Xe={type:"separator"},bt.push(Xe)):it++,bt.push(re);Tt()}else et.length>0&&(bt=[{label:Object(Ee.a)("symbols","symbols ({0})",Ke.length),type:"separator"},...et]);return bt})}compareByScore(le,Ce){if(typeof le.score!="number"&&typeof Ce.score=="number")return 1;if(typeof le.score=="number"&&typeof Ce.score!="number")return-1;if(typeof le.score=="number"&&typeof Ce.score=="number"){if(le.score>Ce.score)return-1;if(le.score<Ce.score)return 1}return le.index<Ce.index?-1:le.index>Ce.index?1:0}compareByKindAndScore(le,Ce){const ye=U[le.kind]||ie,ge=U[Ce.kind]||ie,Me=ye.localeCompare(ge);return Me===0?this.compareByScore(le,Ce):Me}getDocumentSymbols(le,Ce){return fe(this,void 0,void 0,function*(){const ye=yield te.create(le,Ce);return Ce.isCancellationRequested?[]:ye.asListOfDocumentSymbols()})}}ee.PREFIX="@",ee.SCOPE_PREFIX=":",ee.PREFIX_BY_CATEGORY=`${ee.PREFIX}${ee.SCOPE_PREFIX}`;const ie=Object(Ee.a)("property","properties ({0})"),U={[5]:Object(Ee.a)("method","methods ({0})"),[11]:Object(Ee.a)("function","functions ({0})"),[8]:Object(Ee.a)("_constructor","constructors ({0})"),[12]:Object(Ee.a)("variable","variables ({0})"),[4]:Object(Ee.a)("class","classes ({0})"),[22]:Object(Ee.a)("struct","structs ({0})"),[23]:Object(Ee.a)("event","events ({0})"),[24]:Object(Ee.a)("operator","operators ({0})"),[10]:Object(Ee.a)("interface","interfaces ({0})"),[2]:Object(Ee.a)("namespace","namespaces ({0})"),[3]:Object(Ee.a)("package","packages ({0})"),[25]:Object(Ee.a)("typeParameter","type parameters ({0})"),[1]:Object(Ee.a)("modules","modules ({0})"),[6]:Object(Ee.a)("property","properties ({0})"),[9]:Object(Ee.a)("enum","enumerations ({0})"),[21]:Object(Ee.a)("enumMember","enumeration members ({0})"),[14]:Object(Ee.a)("string","strings ({0})"),[0]:Object(Ee.a)("file","files ({0})"),[17]:Object(Ee.a)("array","arrays ({0})"),[15]:Object(Ee.a)("number","numbers ({0})"),[16]:Object(Ee.a)("boolean","booleans ({0})"),[18]:Object(Ee.a)("object","objects ({0})"),[19]:Object(Ee.a)("key","keys ({0})"),[7]:Object(Ee.a)("field","fields ({0})"),[13]:Object(Ee.a)("constant","constants ({0})")};var G=t("ic2d"),J=t("Lx4V"),he=t("Vxe3"),xe=t("746U"),Ie=t("A9l+"),Le=t("MI8n"),Te=t("sswD"),ze=t("wQH0"),ue=t("Zr1c"),je=function(le,Ce,ye,ge){var Me=arguments.length,De=Me<3?Ce:ge===null?ge=Object.getOwnPropertyDescriptor(Ce,ye):ge,we;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")De=Reflect.decorate(le,Ce,ye,ge);else for(var Oe=le.length-1;Oe>=0;Oe--)(we=le[Oe])&&(De=(Me<3?we(De):Me>3?we(Ce,ye,De):we(Ce,ye))||De);return Me>3&&De&&Object.defineProperty(Ce,ye,De),De},Pe=function(le,Ce){return function(ye,ge){Ce(ye,ge,le)}};let ve=class extends ee{constructor(Ce){super();this.editorService=Ce,this.onDidActiveTextEditorControlChange=Le.c.None}get activeTextEditorControl(){return Object(xe.p)(this.editorService.getFocusedCodeEditor())}};ve=je([Pe(0,he.a)],ve),G.a.as(J.b.Quickaccess).registerQuickAccessProvider({ctor:ve,prefix:ee.PREFIX,helpEntries:[{description:Ie.e.quickOutlineActionLabel,prefix:ee.PREFIX,needsEditor:!0},{description:Ie.e.quickOutlineByCategoryActionLabel,prefix:ee.PREFIX_BY_CATEGORY,needsEditor:!0}]});class ce extends Te.b{constructor(){super({id:"editor.action.quickOutline",label:Ie.e.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:ze.a.hasDocumentSymbolProvider,kbOpts:{kbExpr:ze.a.focus,primary:2048|1024|45,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(le){le.get(ue.a).quickAccess.show(ee.PREFIX)}}Object(Te.j)(ce)},hFdI:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({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:function(){return t.e(332).then(t.bind(null,"tpLM"))}})},hHjc:function(mt,M,t){},hJVp:function(mt,M,t){"use strict";t.d(M,"b",function(){return _}),t.d(M,"f",function(){return b}),t.d(M,"g",function(){return h}),t.d(M,"e",function(){return c}),t.d(M,"c",function(){return p}),t.d(M,"a",function(){return E}),t.d(M,"d",function(){return O});var f=t("6OMU"),B=t("JQT/"),x=t("/cxE"),N=t("pmY6"),A=t("bY76"),F=t("vATl"),I=t("aokT"),L=t("gCVg"),v=t("twdY"),m=t("G2kB"),d=t("nnTU"),D=t("tTk5"),S=t("nlbu"),r=function(Q,H,Z,oe){function $(te){return te instanceof Z?te:new Z(function(ne){ne(te)})}return new(Z||(Z=Promise))(function(te,ne){function Ee(ie){try{ee(oe.next(ie))}catch(U){ne(U)}}function fe(ie){try{ee(oe.throw(ie))}catch(U){ne(U)}}function ee(ie){ie.done?te(ie.value):$(ie.value).then(Ee,fe)}ee((oe=oe.apply(Q,H||[])).next())})};const _="editor.action.codeAction",b="editor.action.refactor",h="editor.action.sourceAction",c="editor.action.organizeImports",p="editor.action.fixAll";class E{constructor(Q,H){this.action=Q,this.provider=H}resolve(Q){var H;return r(this,void 0,void 0,function*(){if(((H=this.provider)===null||H===void 0?void 0:H.resolveCodeAction)&&!this.action.edit){let Z;try{Z=yield this.provider.resolveCodeAction(this.action,Q)}catch(oe){Object(x.g)(oe)}Z&&(this.action.edit=Z.edit)}return this})}}class y extends N.a{constructor(Q,H,Z){super();this.documentation=H,this._register(Z),this.allActions=[...Q].sort(y.codeActionsComparator),this.validActions=this.allActions.filter(({action:oe})=>!oe.disabled)}static codeActionsComparator({action:Q},{action:H}){return Q.isPreferred&&!H.isPreferred?-1:!Q.isPreferred&&H.isPreferred?1:Object(f.n)(Q.diagnostics)?Object(f.n)(H.diagnostics)?Q.diagnostics[0].message.localeCompare(H.diagnostics[0].message):-1:Object(f.n)(H.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:Q})=>!!Q.kind&&S.b.QuickFix.contains(new S.b(Q.kind))&&!!Q.isPreferred)}}const C={actions:[],documentation:void 0};function O(Q,H,Z,oe,$){var te;const ne=Z.filter||{},Ee={only:(te=ne.include)===null||te===void 0?void 0:te.value,trigger:Z.type},fe=new F.d(Q,$),ee=k(Q,ne),ie=new N.b,U=ee.map(J=>r(this,void 0,void 0,function*(){try{oe.report(J);const he=yield J.provideCodeActions(Q,H,Ee,fe.token);if(he&&ie.add(he),fe.token.isCancellationRequested)return C;const xe=((he==null?void 0:he.actions)||[]).filter(Le=>Le&&Object(S.c)(ne,Le)),Ie=Y(J,xe,ne.include);return{actions:xe.map(Le=>new E(Le,J)),documentation:Ie}}catch(he){if(Object(x.e)(he))throw he;return Object(x.g)(he),C}})),G=v.a.onDidChange(()=>{const J=v.a.all(Q);Object(f.g)(J,ee)||fe.cancel()});return Promise.all(U).then(J=>{const he=Object(f.k)(J.map(Ie=>Ie.actions)),xe=Object(f.e)(J.map(Ie=>Ie.documentation));return new y(he,xe,ie)}).finally(()=>{G.dispose(),fe.dispose()})}function k(Q,H){return v.a.all(Q).filter(Z=>Z.providedCodeActionKinds?Z.providedCodeActionKinds.some(oe=>Object(S.d)(H,new S.b(oe))):!0)}function Y(Q,H,Z){if(!Q.documentation)return;const oe=Q.documentation.map($=>({kind:new S.b($.kind),command:$.command}));if(Z){let $;for(const te of oe)te.kind.contains(Z)&&($?$.kind.contains(te.kind)&&($=te):$=te);if($)return $==null?void 0:$.command}for(const $ of H){if(!$.kind)continue;for(const te of oe)if(te.kind.contains(new S.b($.kind)))return te.command}return}d.a.registerCommand("_executeCodeActionProvider",function(Q,H,Z,oe,$){return r(this,void 0,void 0,function*(){if(!(H instanceof A.a))throw Object(x.c)();const te=Q.get(m.a).getModel(H);if(!te)throw Object(x.c)();const ne=L.a.isISelection(Z)?L.a.liftSelection(Z):I.a.isIRange(Z)?te.validateRange(Z):void 0;if(!ne)throw Object(x.c)();const Ee=typeof oe=="string"?new S.b(oe):void 0,fe=yield O(te,ne,{type:1,filter:{includeSourceActions:!0,include:Ee}},D.b.None,B.a.None),ee=[],ie=Math.min(fe.validActions.length,typeof $=="number"?$:0);for(let U=0;U<ie;U++)ee.push(fe.validActions[U].resolve(B.a.None));try{return yield Promise.all(ee),fe.validActions.map(U=>U.action)}finally{setTimeout(()=>fe.dispose(),100)}})})},hN88:function(mt,M,t){"use strict";t.d(M,"b",function(){return O}),t.d(M,"a",function(){return Y}),t.d(M,"c",function(){return Q}),t.d(M,"d",function(){return Z}),t.d(M,"e",function(){return ne});var f=t("OBOq"),B=t("6OMU"),x=t("JQT/"),N=t("/cxE"),A=t("JYp7"),F=t("24hK"),I=t("746U"),L=t("bY76"),v=t("vATl"),m=t("sFUC"),d=t("cGHE"),D=t("aokT"),S=t("gCVg"),r=t("twdY"),_=t("pAvP"),b=t("t49l"),h=t("Cduo"),c=t("3/fG"),p=t("nnTU");class E{constructor(Ee){this.value=Ee,this._lower=Ee.toLowerCase()}static toKey(Ee){return typeof Ee=="string"?Ee.toLowerCase():Ee._lower}}var y=t("Cg/j"),C=function(Ee,fe,ee,ie){function U(G){return G instanceof ee?G:new ee(function(J){J(G)})}return new(ee||(ee=Promise))(function(G,J){function he(Le){try{Ie(ie.next(Le))}catch(Te){J(Te)}}function xe(Le){try{Ie(ie.throw(Le))}catch(Te){J(Te)}}function Ie(Le){Le.done?G(Le.value):U(Le.value).then(he,xe)}Ie((ie=ie.apply(Ee,fe||[])).next())})};function O(Ee){if(Ee=Ee.filter(U=>U.range),!Ee.length)return;let{range:fe}=Ee[0];for(let U=1;U<Ee.length;U++)fe=D.a.plusRange(fe,Ee[U].range);const{startLineNumber:ee,endLineNumber:ie}=fe;ee===ie?Ee.length===1?Object(f.a)(c.a("hint11","Made 1 formatting edit on line {0}",ee)):Object(f.a)(c.a("hintn1","Made {0} formatting edits on line {1}",Ee.length,ee)):Ee.length===1?Object(f.a)(c.a("hint1n","Made 1 formatting edit between lines {0} and {1}",ee,ie)):Object(f.a)(c.a("hintnn","Made {0} formatting edits between lines {1} and {2}",Ee.length,ee,ie))}function k(Ee){const fe=[],ee=new Set,ie=r.g.ordered(Ee);for(const G of ie)fe.push(G),G.extensionId&&ee.add(E.toKey(G.extensionId));const U=r.j.ordered(Ee);for(const G of U){if(G.extensionId){if(ee.has(E.toKey(G.extensionId)))continue;ee.add(E.toKey(G.extensionId))}fe.push({displayName:G.displayName,extensionId:G.extensionId,provideDocumentFormattingEdits(J,he,xe){return G.provideDocumentRangeFormattingEdits(J,J.getFullModelRange(),he,xe)}})}return fe}class Y{static setFormatterSelector(Ee){const fe=Y._selectors.unshift(Ee);return{dispose:fe}}static select(Ee,fe,ee){return C(this,void 0,void 0,function*(){if(Ee.length===0)return;const ie=A.a.first(Y._selectors);return ie?yield ie(Ee,fe,ee):void 0})}}Y._selectors=new F.a;function Q(Ee,fe,ee,ie,U,G){return C(this,void 0,void 0,function*(){const J=Ee.get(y.a),he=Object(m.b)(fe)?fe.getModel():fe,xe=r.j.ordered(he),Ie=yield Y.select(xe,he,ie);Ie&&(U.report(Ie),yield J.invokeFunction(H,Ie,fe,ee,G))})}function H(Ee,fe,ee,ie,U){return C(this,void 0,void 0,function*(){const G=Ee.get(_.a);let J,he;Object(m.b)(ee)?(J=ee.getModel(),he=new v.b(ee,1|4,void 0,U)):(J=ee,he=new v.d(ee,U));let xe=[],Ie=0;for(let je of Object(B.c)(ie).sort(D.a.compareRangesUsingStarts))Ie>0&&D.a.areIntersectingOrTouching(xe[Ie-1],je)?xe[Ie-1]=D.a.fromPositions(xe[Ie-1].getStartPosition(),je.getEndPosition()):Ie=xe.push(je);const Le=je=>C(this,void 0,void 0,function*(){return(yield fe.provideDocumentRangeFormattingEdits(J,je,J.getFormattingOptions(),he.token))||[]}),Te=(je,Pe)=>{if(!je.length||!Pe.length)return!1;const ve=je.reduce((ce,le)=>D.a.plusRange(ce,le.range),je[0].range);if(!Pe.some(ce=>D.a.intersectRanges(ve,ce.range)))return!1;for(let ce of je)for(let le of Pe)if(D.a.intersectRanges(ce.range,le.range))return!0;return!1},ze=[],ue=[];try{for(let je of xe){if(he.token.isCancellationRequested)return!0;ue.push(yield Le(je))}for(let je=0;je<xe.length;++je)for(let Pe=je+1;Pe<xe.length;++Pe){if(he.token.isCancellationRequested)return!0;if(Te(ue[je],ue[Pe])){const ve=D.a.plusRange(xe[je],xe[Pe]),ce=yield Le(ve);xe.splice(Pe,1),xe.splice(je,1),xe.push(ve),ue.splice(Pe,1),ue.splice(je,1),ue.push(ce),je=0,Pe=0}}for(let je of ue){if(he.token.isCancellationRequested)return!0;const Pe=yield G.computeMoreMinimalEdits(J.uri,je);Pe&&ze.push(...Pe)}}finally{he.dispose()}if(ze.length===0)return!1;if(Object(m.b)(ee))h.a.execute(ee,ze,!0),O(ze),ee.revealPositionInCenterIfOutsideViewport(ee.getPosition(),1);else{const[{range:je}]=ze,Pe=new S.a(je.startLineNumber,je.startColumn,je.endLineNumber,je.endColumn);J.pushEditOperations([Pe],ze.map(ve=>({text:ve.text,range:D.a.lift(ve.range),forceMoveMarkers:!0})),ve=>{for(const{range:ce}of ve)if(D.a.areIntersectingOrTouching(ce,Pe))return[new S.a(ce.startLineNumber,ce.startColumn,ce.endLineNumber,ce.endColumn)];return null})}return!0})}function Z(Ee,fe,ee,ie,U){return C(this,void 0,void 0,function*(){const G=Ee.get(y.a),J=Object(m.b)(fe)?fe.getModel():fe,he=k(J),xe=yield Y.select(he,J,ee);xe&&(ie.report(xe),yield G.invokeFunction(oe,xe,fe,ee,U))})}function oe(Ee,fe,ee,ie,U){return C(this,void 0,void 0,function*(){const G=Ee.get(_.a);let J,he;Object(m.b)(ee)?(J=ee.getModel(),he=new v.b(ee,1|4,void 0,U)):(J=ee,he=new v.d(ee,U));let xe;try{const Ie=yield fe.provideDocumentFormattingEdits(J,J.getFormattingOptions(),he.token);if(xe=yield G.computeMoreMinimalEdits(J.uri,Ie),he.token.isCancellationRequested)return!0}finally{he.dispose()}if(!xe||xe.length===0)return!1;if(Object(m.b)(ee))h.a.execute(ee,xe,ie!==2),ie!==2&&(O(xe),ee.revealPositionInCenterIfOutsideViewport(ee.getPosition(),1));else{const[{range:Ie}]=xe,Le=new S.a(Ie.startLineNumber,Ie.startColumn,Ie.endLineNumber,Ie.endColumn);J.pushEditOperations([Le],xe.map(Te=>({text:Te.text,range:D.a.lift(Te.range),forceMoveMarkers:!0})),Te=>{for(const{range:ze}of Te)if(D.a.areIntersectingOrTouching(ze,Le))return[new S.a(ze.startLineNumber,ze.startColumn,ze.endLineNumber,ze.endColumn)];return null})}return!0})}function $(Ee,fe,ee,ie,U){return C(this,void 0,void 0,function*(){const G=r.j.ordered(fe);for(const J of G){let he=yield Promise.resolve(J.provideDocumentRangeFormattingEdits(fe,ee,ie,U)).catch(N.g);if(Object(B.n)(he))return yield Ee.computeMoreMinimalEdits(fe.uri,he)}return})}function te(Ee,fe,ee,ie){return C(this,void 0,void 0,function*(){const U=k(fe);for(const G of U){let J=yield Promise.resolve(G.provideDocumentFormattingEdits(fe,ee,ie)).catch(N.g);if(Object(B.n)(J))return yield Ee.computeMoreMinimalEdits(fe.uri,J)}return})}function ne(Ee,fe,ee,ie,U){const G=r.w.ordered(fe);return G.length===0||G[0].autoFormatTriggerCharacters.indexOf(ie)<0?Promise.resolve(void 0):Promise.resolve(G[0].provideOnTypeFormattingEdits(fe,ee,ie,U,x.a.None)).catch(N.g).then(J=>Ee.computeMoreMinimalEdits(fe.uri,J))}p.a.registerCommand("_executeFormatRangeProvider",function(Ee,...fe){return C(this,void 0,void 0,function*(){const[ee,ie,U]=fe;Object(I.c)(L.a.isUri(ee)),Object(I.c)(D.a.isIRange(ie));const G=Ee.get(b.a),J=Ee.get(_.a),he=yield G.createModelReference(ee);try{return $(J,he.object.textEditorModel,D.a.lift(ie),U,x.a.None)}finally{he.dispose()}})}),p.a.registerCommand("_executeFormatDocumentProvider",function(Ee,...fe){return C(this,void 0,void 0,function*(){const[ee,ie]=fe;Object(I.c)(L.a.isUri(ee));const U=Ee.get(b.a),G=Ee.get(_.a),J=yield U.createModelReference(ee);try{return te(G,J.object.textEditorModel,ie,x.a.None)}finally{J.dispose()}})}),p.a.registerCommand("_executeFormatOnTypeProvider",function(Ee,...fe){return C(this,void 0,void 0,function*(){const[ee,ie,U,G]=fe;Object(I.c)(L.a.isUri(ee)),Object(I.c)(d.a.isIPosition(ie)),Object(I.c)(typeof U=="string");const J=Ee.get(b.a),he=Ee.get(_.a),xe=yield J.createModelReference(ee);try{return ne(he,xe.object.textEditorModel,d.a.lift(ie),U,G)}finally{xe.dispose()}})})},"i/Ef":function(mt,M,t){"use strict";t.d(M,"b",function(){return x}),t.d(M,"a",function(){return N}),t.d(M,"c",function(){return A}),t.d(M,"d",function(){return F});var f=t("Tcc1");class B{clone(){return this}equals(I){return this===I}}const x=new B,N="vs.editor.nullMode";function A(I,L,v,m){return new f.b([new f.a(m,"",I)],v)}function F(I,L,v,m){let d=new Uint32Array(2);return d[0]=m,d[1]=(I<<0|0<<8|0<<11|1<<14|2<<23)>>>0,new f.c(d,v===null?x:v)}},"i/Rh":function(mt,M,t){},i04g:function(mt,M,t){"use strict";t.d(M,"c",function(){return x}),t.d(M,"a",function(){return N}),t.d(M,"b",function(){return A});var f=t("3/fG");class B{constructor(I,L,v=L){this.modifierLabels=[null],this.modifierLabels[2]=I,this.modifierLabels[1]=L,this.modifierLabels[3]=v}toLabel(I,L,v){if(L.length===0)return null;const m=[];for(let d=0,D=L.length;d<D;d++){const S=L[d],r=v(S);if(r===null)return null;m[d]=F(S,r,this.modifierLabels[I])}return m.join(" ")}}const x=new B({ctrlKey:"\u2303",shiftKey:"\u21E7",altKey:"\u2325",metaKey:"\u2318",separator:""},{ctrlKey:f.a({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:f.a({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:f.a({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:f.a({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:f.a({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:f.a({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:f.a({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:f.a({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),N=new B({ctrlKey:f.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:f.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:f.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:f.a({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:f.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:f.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:f.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:f.a({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:f.a({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:f.a({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:f.a({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:f.a({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"}),A=new B({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"});function F(I,L,v){if(L===null)return"";const m=[];return I.ctrlKey&&m.push(v.ctrlKey),I.shiftKey&&m.push(v.shiftKey),I.altKey&&m.push(v.altKey),I.metaKey&&m.push(v.metaKey),L!==""&&m.push(L),m.join(v.separator)}},iDAx:function(mt,M,t){"use strict";t.d(M,"b",function(){return D}),t.d(M,"a",function(){return p}),t.d(M,"d",function(){return Q}),t.d(M,"c",function(){return H});var f=t("3/fG"),B=t("MI8n"),x=t("pmY6"),N=t("qj0h"),A=t("6OMU"),F=t("/UlZ"),I=t("Yr1X"),L=t("+3Gp"),v=t("CRAX"),m=t("ic2d"),d=t("vl9R");const D=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new B.b,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(Z){if(this._tabFocus===Z)return;this._tabFocus=Z,this._onDidChangeTabFocus.fire(this._tabFocus)}},S=Object.hasOwnProperty;class r{constructor(){this._values=[]}_read(Z){return this._values[Z]}get(Z){return this._values[Z]}_write(Z,oe){this._values[Z]=oe}}class _{constructor(){this._values=[]}_read(Z){return this._values[Z]}_write(Z,oe){this._values[Z]=oe}}class b{static readOptions(Z){const oe=Z,$=new _;for(const te of F.m){const ne=te.name==="_never_"?void 0:oe[te.name];$._write(te.id,ne)}return $}static validateOptions(Z){const oe=new F.j;for(const $ of F.m)oe._write($.id,$.validate(Z._read($.id)));return oe}static computeOptions(Z,oe){const $=new r;for(const te of F.m)$._write(te.id,te.compute(oe,$,Z._read(te.id)));return $}static _deepEquals(Z,oe){if(typeof Z!="object"||typeof oe!="object")return Z===oe;if(Array.isArray(Z)||Array.isArray(oe))return Array.isArray(Z)&&Array.isArray(oe)?A.g(Z,oe):!1;for(let $ in Z)if(!b._deepEquals(Z[$],oe[$]))return!1;return!0}static checkEquals(Z,oe){const $=[];let te=!1;for(const ne of F.m){const Ee=!b._deepEquals(Z._read(ne.id),oe._read(ne.id));$[ne.id]=Ee,Ee&&(te=!0)}return te?new F.b($):null}}function h(Z){const oe=Z.wordWrap;oe===!0?Z.wordWrap="on":oe===!1&&(Z.wordWrap="off");const $=Z.lineNumbers;$===!0?Z.lineNumbers="on":$===!1&&(Z.lineNumbers="off");const te=Z.autoClosingBrackets;te===!1&&(Z.autoClosingBrackets="never",Z.autoClosingQuotes="never",Z.autoSurround="never");const ne=Z.cursorBlinking;ne==="visible"&&(Z.cursorBlinking="solid");const Ee=Z.renderWhitespace;Ee===!0?Z.renderWhitespace="boundary":Ee===!1&&(Z.renderWhitespace="none");const fe=Z.renderLineHighlight;fe===!0?Z.renderLineHighlight="line":fe===!1&&(Z.renderLineHighlight="none");const ee=Z.acceptSuggestionOnEnter;ee===!0?Z.acceptSuggestionOnEnter="on":ee===!1&&(Z.acceptSuggestionOnEnter="off");const ie=Z.tabCompletion;ie===!1?Z.tabCompletion="off":ie===!0&&(Z.tabCompletion="onlySnippets");const U=Z.suggest;if(U&&typeof U.filteredTypes=="object"&&U.filteredTypes){const Te={};Te.method="showMethods",Te.function="showFunctions",Te.constructor="showConstructors",Te.deprecated="showDeprecated",Te.field="showFields",Te.variable="showVariables",Te.class="showClasses",Te.struct="showStructs",Te.interface="showInterfaces",Te.module="showModules",Te.property="showProperties",Te.event="showEvents",Te.operator="showOperators",Te.unit="showUnits",Te.value="showValues",Te.constant="showConstants",Te.enum="showEnums",Te.enumMember="showEnumMembers",Te.keyword="showKeywords",Te.text="showWords",Te.color="showColors",Te.file="showFiles",Te.reference="showReferences",Te.folder="showFolders",Te.typeParameter="showTypeParameters",Te.snippet="showSnippets",Object(d.b)(Te,ze=>{const ue=U.filteredTypes[ze.key];ue===!1&&(U[ze.value]=ue)})}const G=Z.hover;G===!0?Z.hover={enabled:!0}:G===!1&&(Z.hover={enabled:!1});const J=Z.parameterHints;J===!0?Z.parameterHints={enabled:!0}:J===!1&&(Z.parameterHints={enabled:!1});const he=Z.autoIndent;he===!0?Z.autoIndent="full":he===!1&&(Z.autoIndent="advanced");const xe=Z.matchBrackets;xe===!0?Z.matchBrackets="always":xe===!1&&(Z.matchBrackets="never");const{renderIndentGuides:Ie,highlightActiveIndentGuide:Le}=Z;Z.guides||(Z.guides={}),Ie!==void 0&&(Z.guides.indentation=!!Ie),Le!==void 0&&(Z.guides.highlightActiveIndentation=!!Le)}function c(Z){const oe=N.b(Z);return h(oe),oe}class p extends x.a{constructor(Z,oe){super();this._onDidChange=this._register(new B.b),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new B.b),this.onDidChangeFast=this._onDidChangeFast.event,this.isSimpleWidget=Z,this._isDominatedByLongLines=!1,this._computeOptionsMemory=new F.a,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._rawOptions=c(oe),this._readOptions=b.readOptions(this._rawOptions),this._validatedOptions=b.validateOptions(this._readOptions),this._register(I.a.onDidChangeZoomLevel($=>this._recomputeOptions())),this._register(D.onDidChangeTabFocus($=>this._recomputeOptions()))}observeReferenceElement(Z){}updatePixelRatio(){}_recomputeOptions(){const Z=this.options,oe=this._computeInternalOptions();if(!Z)this.options=oe;else{const $=b.checkEquals(Z,oe);if($===null)return;this.options=oe,this._onDidChangeFast.fire($),this._onDidChange.fire($)}}getRawOptions(){return this._rawOptions}_computeInternalOptions(){const Z=this._getEnvConfiguration(),oe=L.a.createFromValidatedSettings(this._validatedOptions,Z.zoomLevel,Z.pixelRatio,this.isSimpleWidget),$={memory:this._computeOptionsMemory,outerWidth:Z.outerWidth,outerHeight:Z.outerHeight,fontInfo:this.readConfiguration(oe),extraEditorClassName:Z.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:Z.emptySelectionClipboard,pixelRatio:Z.pixelRatio,tabFocusMode:D.getTabFocusMode(),accessibilitySupport:Z.accessibilitySupport};return b.computeOptions(this._validatedOptions,$)}static _subsetEquals(Z,oe){for(const $ in oe)if(S.call(oe,$)){const te=oe[$],ne=Z[$];if(ne===te)continue;if(Array.isArray(ne)&&Array.isArray(te)){if(!A.g(ne,te))return!1;continue}if(ne&&typeof ne=="object"&&te&&typeof te=="object"){if(!this._subsetEquals(ne,te))return!1;continue}return!1}return!0}updateOptions(Z){if(typeof Z=="undefined")return;const oe=c(Z);if(p._subsetEquals(this._rawOptions,oe))return;this._rawOptions=N.f(this._rawOptions,oe||{}),this._readOptions=b.readOptions(this._rawOptions),this._validatedOptions=b.validateOptions(this._readOptions),this._recomputeOptions()}setIsDominatedByLongLines(Z){this._isDominatedByLongLines=Z,this._recomputeOptions()}setMaxLineNumber(Z){const oe=p._digitCount(Z);if(this._lineNumbersDigitCount===oe)return;this._lineNumbersDigitCount=oe,this._recomputeOptions()}setViewLineCount(Z){if(this._viewLineCount===Z)return;this._viewLineCount=Z,this._recomputeOptions()}static _digitCount(Z){let oe=0;for(;Z;)Z=Math.floor(Z/10),oe++;return oe||1}}const E=Object.freeze({id:"editor",order:5,type:"object",title:f.a("editorConfigurationTitle","Editor"),scope:5}),y=m.a.as(v.a.Configuration),C=Object.assign(Object.assign({},E),{properties:{"editor.tabSize":{type:"number",default:F.d.tabSize,minimum:1,markdownDescription:f.a("tabSize","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:F.d.insertSpaces,markdownDescription:f.a("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:F.d.detectIndentation,markdownDescription:f.a("detectIndentation","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:F.d.trimAutoWhitespace,description:f.a("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:F.d.largeFileOptimizations,description:f.a("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:f.a("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[f.a("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),f.a("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),f.a("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:f.a("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[f.a("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),f.a("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),f.a("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:f.a("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:f.a("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:f.a("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"editor.language.brackets":{type:"array",default:!1,description:f.a("schema.brackets","Defines the bracket symbols that increase or decrease the indentation."),items:{type:"array",items:[{type:"string",description:f.a("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:f.a("schema.closeBracket","The closing bracket character or string sequence.")}]}},"editor.language.colorizedBracketPairs":{type:"array",default:!1,description:f.a("schema.colorizedBracketPairs","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled."),items:{type:"array",items:[{type:"string",description:f.a("schema.openBracket","The opening bracket character or string sequence.")},{type:"string",description:f.a("schema.closeBracket","The closing bracket character or string sequence.")}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:f.a("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:f.a("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:f.a("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:f.a("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:f.a("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:f.a("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[f.a("wordWrap.off","Lines will never wrap."),f.a("wordWrap.on","Lines will wrap at the viewport width."),f.a("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});function O(Z){return typeof Z.type!="undefined"||typeof Z.anyOf!="undefined"}for(const Z of F.m){const oe=Z.schema;if(typeof oe!="undefined")if(O(oe))C.properties[`editor.${Z.name}`]=oe;else for(let $ in oe)S.call(oe,$)&&(C.properties[$]=oe[$])}let k=null;function Y(){return k===null&&(k=Object.create(null),Object.keys(C.properties).forEach(Z=>{k[Z]=!0})),k}function Q(Z){const oe=Y();return oe[`editor.${Z}`]||!1}function H(Z){const oe=Y();return oe[`diffEditor.${Z}`]||!1}y.registerConfiguration(C)},iJk1:function(mt,M,t){},iLY9:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:function(){return t.e(352).then(t.bind(null,"8ahN"))}})},iNS8:function(mt,M,t){"use strict";t.d(M,"a",function(){return Ee}),t.d(M,"b",function(){return fe}),t.d(M,"d",function(){return ie}),t.d(M,"c",function(){return G}),t.d(M,"p",function(){return J}),t.d(M,"q",function(){return he}),t.d(M,"r",function(){return xe}),t.d(M,"e",function(){return Ie}),t.d(M,"j",function(){return Le}),t.d(M,"l",function(){return Te}),t.d(M,"k",function(){return ze}),t.d(M,"n",function(){return ue}),t.d(M,"o",function(){return je}),t.d(M,"f",function(){return Pe}),t.d(M,"g",function(){return ve}),t.d(M,"m",function(){return ce}),t.d(M,"h",function(){return le}),t.d(M,"i",function(){return Ce});var f=t("EffR"),B=t("WqXY"),x=t("8HAY"),N=t("Vhoy"),A=t("zrhQ"),F=t("MI8n"),I=t("qj0h"),L=t("e1ni"),v=t("sswD"),m=t("Vxe3"),d=t("03kh"),D=t("cMOf"),S=t("nD70"),r=t("pmY6"),_=t("uWgD"),b=t("aokT"),h=t("tX9W");const c=new A.a(new A.c(0,122,204)),p={showArrow:!0,showFrame:!0,className:"",frameColor:c,arrowColor:c,keepEditorSelection:!1},E="vs.editor.contrib.zoneWidget";class y{constructor(ye,ge,Me,De,we,Oe){this.id="",this.domNode=ye,this.afterLineNumber=ge,this.afterColumn=Me,this.heightInLines=De,this._onDomNodeTop=we,this._onComputedHeight=Oe}onDomNodeTop(ye){this._onDomNodeTop(ye)}onComputedHeight(ye){this._onComputedHeight(ye)}}class C{constructor(ye,ge){this._id=ye,this._domNode=ge}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class O{constructor(ye){this._editor=ye,this._ruleName=O._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),f.Q(this._ruleName)}set color(ye){this._color!==ye&&(this._color=ye,this._updateStyle())}set height(ye){this._height!==ye&&(this._height=ye,this._updateStyle())}_updateStyle(){f.Q(this._ruleName),f.v(`.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(ye){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:b.a.fromPositions(ye),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}O._IdGenerator=new S.a(".arrow-decoration-");class k{constructor(ye,ge={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new r.b,this.container=null,this._isShowing=!1,this.editor=ye,this.options=I.b(ge),I.f(this.options,p,!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(Me=>{const De=this._getWidth(Me);this.domNode.style.width=De+"px",this.domNode.style.left=this._getLeft(Me)+"px",this._onWidth(De)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(ye=>{this._viewZone&&ye.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 O(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(ye){ye.frameColor&&(this.options.frameColor=ye.frameColor),ye.arrowColor&&(this.options.arrowColor=ye.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let ye=this.options.frameColor.toString();this.container.style.borderTopColor=ye,this.container.style.borderBottomColor=ye}if(this._arrow&&this.options.arrowColor){let ye=this.options.arrowColor.toString();this._arrow.color=ye}}_getWidth(ye){return ye.width-ye.minimap.minimapWidth-ye.verticalScrollbarWidth}_getLeft(ye){return ye.minimap.minimapWidth>0&&ye.minimap.minimapLeft===0?ye.minimap.minimapWidth:0}_onViewZoneTop(ye){this.domNode.style.top=ye+"px"}_onViewZoneHeight(ye){if(this.domNode.style.height=`${ye}px`,this.container){let ge=ye-this._decoratingElementsHeight();this.container.style.height=`${ge}px`;const Me=this.editor.getLayoutInfo();this._doLayout(ge,this._getWidth(Me))}this._resizeSash&&this._resizeSash.layout()}get position(){const[ye]=this._positionMarkerId;if(!ye)return;const ge=this.editor.getModel();if(!ge)return;const Me=ge.getDecorationRange(ye);return Me?Me.getStartPosition():void 0}show(ye,ge){const Me=b.a.isIRange(ye)?b.a.lift(ye):b.a.fromPositions(ye);this._isShowing=!0,this._showImpl(Me,ge),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:Me,options:h.b.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(ye=>{this._viewZone&&ye.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let ye=this.editor.getOption(58),ge=0;if(this.options.showArrow){let Me=Math.round(ye/3);ge+=2*Me}if(this.options.showFrame){let Me=Math.round(ye/9);ge+=2*Me}return ge}_showImpl(ye,ge){const Me=ye.getStartPosition(),De=this.editor.getLayoutInfo(),we=this._getWidth(De);this.domNode.style.width=`${we}px`,this.domNode.style.left=this._getLeft(De)+"px";const Oe=document.createElement("div");Oe.style.overflow="hidden";const nt=this.editor.getOption(58),Ke=Math.max(12,this.editor.getLayoutInfo().height/nt*.8);ge=Math.min(ge,Ke);let et=0,bt=0;if(this._arrow&&this.options.showArrow&&(et=Math.round(nt/3),this._arrow.height=et,this._arrow.show(Me)),this.options.showFrame&&(bt=Math.round(nt/9)),this.editor.changeViewZones(Xe=>{this._viewZone&&Xe.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new y(Oe,Me.lineNumber,Me.column,ge,it=>this._onViewZoneTop(it),it=>this._onViewZoneHeight(it)),this._viewZone.id=Xe.addZone(this._viewZone),this._overlayWidget=new C(E+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const Xe=this.options.frameWidth?this.options.frameWidth:bt;this.container.style.borderTopWidth=Xe+"px",this.container.style.borderBottomWidth=Xe+"px"}let Tt=ge*nt-this._decoratingElementsHeight();this.container&&(this.container.style.top=et+"px",this.container.style.height=Tt+"px",this.container.style.overflow="hidden"),this._doLayout(Tt,we),this.options.keepEditorSelection||this.editor.setSelection(ye);const $t=this.editor.getModel();if($t){const Xe=ye.endLineNumber+1;Xe<=$t.getLineCount()?this.revealLine(Xe,!1):this.revealLine($t.getLineCount(),!0)}}revealLine(ye,ge){ge?this.editor.revealLineInCenter(ye,0):this.editor.revealLine(ye,0)}setCssClass(ye,ge){if(!this.container)return;ge&&this.container.classList.remove(ge),this.container.classList.add(ye)}_onWidth(ye){}_doLayout(ye,ge){}_relayout(ye){this._viewZone&&this._viewZone.heightInLines!==ye&&this.editor.changeViewZones(ge=>{this._viewZone&&(this._viewZone.heightInLines=ye,ge.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new D.b(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=0);let ye;this._disposables.add(this._resizeSash.onDidStart(ge=>{this._viewZone&&(ye={startY:ge.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{ye=void 0})),this._disposables.add(this._resizeSash.onDidChange(ge=>{if(ye){let Me=(ge.currentY-ye.startY)/this.editor.getOption(58),De=Me<0?Math.ceil(Me):Math.floor(Me),we=ye.heightInLines+De;we>5&&we<35&&this._relayout(we)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const ye=this.editor.getLayoutInfo();return ye.width-ye.minimap.minimapWidth}}var Y=t("3/fG"),Q=t("eUTo"),H=t("T8No"),Z=t("9fML"),oe=t("Cg/j"),$=t("MD5Z"),te=function(ye,ge,Me,De){var we=arguments.length,Oe=we<3?ge:De===null?De=Object.getOwnPropertyDescriptor(ge,Me):De,nt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Oe=Reflect.decorate(ye,ge,Me,De);else for(var Ke=ye.length-1;Ke>=0;Ke--)(nt=ye[Ke])&&(Oe=(we<3?nt(Oe):we>3?nt(ge,Me,Oe):nt(ge,Me))||Oe);return we>3&&Oe&&Object.defineProperty(ge,Me,Oe),Oe},ne=function(ye,ge){return function(Me,De){ge(Me,De,ye)}};const Ee=Object(oe.c)("IPeekViewService");Object(Z.b)(Ee,class{constructor(){this._widgets=new Map}addExclusiveWidget(ye,ge){const Me=this._widgets.get(ye);Me&&(Me.listener.dispose(),Me.widget.dispose());const De=()=>{const we=this._widgets.get(ye);we&&we.widget===ge&&(we.listener.dispose(),this._widgets.delete(ye))};this._widgets.set(ye,{widget:ge,listener:ge.onDidClose(De)})}});var fe;(function(ye){ye.inPeekEditor=new H.c("inReferenceSearchEditor",!0,Y.a("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),ye.notInPeekEditor=ye.inPeekEditor.toNegated()})(fe||(fe={}));let ee=class{constructor(ge,Me){ge instanceof d.a&&fe.inPeekEditor.bindTo(Me)}dispose(){}};ee.ID="editor.contrib.referenceController",ee=te([ne(1,H.b)],ee),Object(v.l)(ee.ID,ee);function ie(ye){let ge=ye.get(m.a).getFocusedCodeEditor();return ge instanceof d.a?ge.getParentEditor():ge}const U={headerBackgroundColor:A.a.white,primaryHeadingColor:A.a.fromHex("#333333"),secondaryHeadingColor:A.a.fromHex("#6c6c6cb3")};let G=class extends k{constructor(ge,Me,De){super(ge,Me);this.instantiationService=De,this._onDidClose=new F.b,this.onDidClose=this._onDidClose.event,I.f(this.options,U,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(ge){let Me=this.options;ge.headerBackgroundColor&&(Me.headerBackgroundColor=ge.headerBackgroundColor),ge.primaryHeadingColor&&(Me.primaryHeadingColor=ge.primaryHeadingColor),ge.secondaryHeadingColor&&(Me.secondaryHeadingColor=ge.secondaryHeadingColor),super.style(ge)}_applyStyles(){super._applyStyles();let ge=this.options;this._headElement&&ge.headerBackgroundColor&&(this._headElement.style.backgroundColor=ge.headerBackgroundColor.toString()),this._primaryHeading&&ge.primaryHeadingColor&&(this._primaryHeading.style.color=ge.primaryHeadingColor.toString()),this._secondaryHeading&&ge.secondaryHeadingColor&&(this._secondaryHeading.style.color=ge.secondaryHeadingColor.toString()),this._bodyElement&&ge.frameColor&&(this._bodyElement.style.borderColor=ge.frameColor.toString())}_fillContainer(ge){this.setCssClass("peekview-widget"),this._headElement=f.a(".head"),this._bodyElement=f.a(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),ge.appendChild(this._headElement),ge.appendChild(this._bodyElement)}_fillHead(ge,Me){const De=f.a(".peekview-title");this.options.supportOnTitleClick&&(De.classList.add("clickable"),f.o(De,"click",nt=>this._onTitleClick(nt))),f.q(this._headElement,De),this._fillTitleIcon(De),this._primaryHeading=f.a("span.filename"),this._secondaryHeading=f.a("span.dirname"),this._metaHeading=f.a("span.meta"),f.q(De,this._primaryHeading,this._secondaryHeading,this._metaHeading);const we=f.a(".peekview-actions");f.q(this._headElement,we);const Oe=this._getActionBarOptions();this._actionbarWidget=new B.a(we,Oe),this._disposables.add(this._actionbarWidget),Me||this._actionbarWidget.push(new x.a("peekview.close",Y.a("label.close","Close"),N.b.close.classNames,!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(ge){}_getActionBarOptions(){return{actionViewItemProvider:Q.b.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(ge){}setTitle(ge,Me){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=ge,this._primaryHeading.setAttribute("title",ge),Me?this._secondaryHeading.innerText=Me:f.t(this._secondaryHeading))}setMetaTitle(ge){this._metaHeading&&(ge?(this._metaHeading.innerText=ge,f.W(this._metaHeading)):f.K(this._metaHeading))}_doLayout(ge,Me){if(!this._isShowing&&ge<0){this.dispose();return}const De=Math.ceil(this.editor.getOption(58)*1.2),we=Math.round(ge-(De+2));this._doLayoutHead(De,Me),this._doLayoutBody(we,Me)}_doLayoutHead(ge,Me){this._headElement&&(this._headElement.style.height=`${ge}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(ge,Me){this._bodyElement&&(this._bodyElement.style.height=`${ge}px`)}};G=te([ne(2,oe.a)],G);const J=Object($.wc)("peekViewTitle.background",{dark:Object($.Lc)($.M,.1),light:Object($.Lc)($.M,.1),hc:null},Y.a("peekViewTitleBackground","Background color of the peek view title area.")),he=Object($.wc)("peekViewTitleLabel.foreground",{dark:A.a.white,light:A.a.black,hc:A.a.white},Y.a("peekViewTitleForeground","Color of the peek view title.")),xe=Object($.wc)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hc:"#FFFFFF99"},Y.a("peekViewTitleInfoForeground","Color of the peek view title info.")),Ie=Object($.wc)("peekView.border",{dark:$.M,light:$.M,hc:$.h},Y.a("peekViewBorder","Color of the peek view borders and arrow.")),Le=Object($.wc)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:A.a.black},Y.a("peekViewResultsBackground","Background color of the peek view result list.")),Te=Object($.wc)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:A.a.white},Y.a("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),ze=Object($.wc)("peekViewResult.fileForeground",{dark:A.a.white,light:"#1E1E1E",hc:A.a.white},Y.a("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),ue=Object($.wc)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},Y.a("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),je=Object($.wc)("peekViewResult.selectionForeground",{dark:A.a.white,light:"#6C6C6C",hc:A.a.white},Y.a("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),Pe=Object($.wc)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:A.a.black},Y.a("peekViewEditorBackground","Background color of the peek view editor.")),ve=Object($.wc)("peekViewEditorGutter.background",{dark:Pe,light:Pe,hc:Pe},Y.a("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),ce=Object($.wc)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},Y.a("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),le=Object($.wc)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},Y.a("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),Ce=Object($.wc)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:$.b},Y.a("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))},"ij/i":function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:function(){return t.e(358).then(t.bind(null,"3MdH"))}})},iuje:function(mt,M,t){"use strict";t.d(M,"b",function(){return f}),t.d(M,"a",function(){return B});function f(x){return x&&typeof x.id=="string"}const B={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},j2o1:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:function(){return t.e(350).then(t.bind(null,"ppMK"))}})},"jAJ/":function(mt,M,t){"use strict";t.d(M,"a",function(){return I}),t.d(M,"d",function(){return m}),t.d(M,"c",function(){return D}),t.d(M,"e",function(){return _}),t.d(M,"b",function(){return b});var f=t("N0LK"),B=t("5v8Y"),x=t("cGHE"),N=t("aokT"),A=t("M1Kb");const F=999;class I{constructor(h,c,p,E){this.searchString=h,this.isRegex=c,this.matchCase=p,this.wordSeparators=E}parseSearchRequest(){if(this.searchString==="")return null;let h;this.isRegex?h=L(this.searchString):h=this.searchString.indexOf(`
|
|
|
`)>=0;let c=null;try{c=f.q(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:h,global:!0,unicode:!0})}catch(E){return null}if(!c)return null;let p=!this.isRegex&&!h;return p&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(p=this.matchCase),new v(c,this.wordSeparators?Object(B.a)(this.wordSeparators):null,p?this.searchString:null)}}function L(h){if(!h||h.length===0)return!1;for(let c=0,p=h.length;c<p;c++){const E=h.charCodeAt(c);if(E===92){if(c++,c>=p)break;const y=h.charCodeAt(c);if(y===110||y===114||y===87)return!0}}return!1}class v{constructor(h,c,p){this.regex=h,this.wordSeparators=c,this.simpleSearch=p}}function m(h,c,p){if(!p)return new A.b(h,null);let E=[];for(let y=0,C=c.length;y<C;y++)E[y]=c[y];return new A.b(h,E)}class d{constructor(h){let c=[],p=0;for(let E=0,y=h.length;E<y;E++)h.charCodeAt(E)===10&&(c[p++]=E);this._lineFeedsOffsets=c}findLineFeedCountBeforeOffset(h){const c=this._lineFeedsOffsets;let p=0,E=c.length-1;if(E===-1)return 0;if(h<=c[0])return 0;for(;p<E;){const y=p+((E-p)/2>>0);c[y]>=h?E=y-1:c[y+1]>=h?(p=y,E=y):p=y+1}return p+1}}class D{static findMatches(h,c,p,E,y){const C=c.parseSearchRequest();return C?C.regex.multiline?this._doFindMatchesMultiline(h,p,new b(C.wordSeparators,C.regex),E,y):this._doFindMatchesLineByLine(h,p,C,E,y):[]}static _getMultilineMatchRange(h,c,p,E,y,C){let O,k=0;E?(k=E.findLineFeedCountBeforeOffset(y),O=c+y+k):O=c+y;let Y;if(E){let Z=E.findLineFeedCountBeforeOffset(y+C.length),oe=Z-k;Y=O+C.length+oe}else Y=O+C.length;const Q=h.getPositionAt(O),H=h.getPositionAt(Y);return new N.a(Q.lineNumber,Q.column,H.lineNumber,H.column)}static _doFindMatchesMultiline(h,c,p,E,y){const C=h.getOffsetAt(c.getStartPosition()),O=h.getValueInRange(c,1),k=h.getEOL()===`\r
|
|
|
`?new d(O):null,Y=[];let Q=0,H;for(p.reset(0);H=p.next(O);)if(Y[Q++]=m(this._getMultilineMatchRange(h,C,O,k,H.index,H[0]),H,E),Q>=y)return Y;return Y}static _doFindMatchesLineByLine(h,c,p,E,y){const C=[];let O=0;if(c.startLineNumber===c.endLineNumber){const Y=h.getLineContent(c.startLineNumber).substring(c.startColumn-1,c.endColumn-1);return O=this._findMatchesInLine(p,Y,c.startLineNumber,c.startColumn-1,O,C,E,y),C}const k=h.getLineContent(c.startLineNumber).substring(c.startColumn-1);O=this._findMatchesInLine(p,k,c.startLineNumber,c.startColumn-1,O,C,E,y);for(let Y=c.startLineNumber+1;Y<c.endLineNumber&&O<y;Y++)O=this._findMatchesInLine(p,h.getLineContent(Y),Y,0,O,C,E,y);if(O<y){const Y=h.getLineContent(c.endLineNumber).substring(0,c.endColumn-1);O=this._findMatchesInLine(p,Y,c.endLineNumber,0,O,C,E,y)}return C}static _findMatchesInLine(h,c,p,E,y,C,O,k){const Y=h.wordSeparators;if(!O&&h.simpleSearch){const Z=h.simpleSearch,oe=Z.length,$=c.length;let te=-oe;for(;(te=c.indexOf(Z,te+oe))!==-1;)if((!Y||_(Y,c,$,te,oe))&&(C[y++]=new A.b(new N.a(p,te+1+E,p,te+1+oe+E),null),y>=k))return y;return y}const Q=new b(h.wordSeparators,h.regex);let H;Q.reset(0);do if(H=Q.next(c),H&&(C[y++]=m(new N.a(p,H.index+1+E,p,H.index+1+H[0].length+E),H,O),y>=k))return y;while(H);return y}static findNextMatch(h,c,p,E){const y=c.parseSearchRequest();if(!y)return null;const C=new b(y.wordSeparators,y.regex);return y.regex.multiline?this._doFindNextMatchMultiline(h,p,C,E):this._doFindNextMatchLineByLine(h,p,C,E)}static _doFindNextMatchMultiline(h,c,p,E){const y=new x.a(c.lineNumber,1),C=h.getOffsetAt(y),O=h.getLineCount(),k=h.getValueInRange(new N.a(y.lineNumber,y.column,O,h.getLineMaxColumn(O)),1),Y=h.getEOL()===`\r
|
|
|
`?new d(k):null;p.reset(c.column-1);let Q=p.next(k);return Q?m(this._getMultilineMatchRange(h,C,k,Y,Q.index,Q[0]),Q,E):c.lineNumber!==1||c.column!==1?this._doFindNextMatchMultiline(h,new x.a(1,1),p,E):null}static _doFindNextMatchLineByLine(h,c,p,E){const y=h.getLineCount(),C=c.lineNumber,O=h.getLineContent(C),k=this._findFirstMatchInLine(p,O,C,c.column,E);if(k)return k;for(let Y=1;Y<=y;Y++){const Q=(C+Y-1)%y,H=h.getLineContent(Q+1),Z=this._findFirstMatchInLine(p,H,Q+1,1,E);if(Z)return Z}return null}static _findFirstMatchInLine(h,c,p,E,y){h.reset(E-1);const C=h.next(c);return C?m(new N.a(p,C.index+1,p,C.index+1+C[0].length),C,y):null}static findPreviousMatch(h,c,p,E){const y=c.parseSearchRequest();if(!y)return null;const C=new b(y.wordSeparators,y.regex);return y.regex.multiline?this._doFindPreviousMatchMultiline(h,p,C,E):this._doFindPreviousMatchLineByLine(h,p,C,E)}static _doFindPreviousMatchMultiline(h,c,p,E){const y=this._doFindMatchesMultiline(h,new N.a(1,1,c.lineNumber,c.column),p,E,10*F);if(y.length>0)return y[y.length-1];const C=h.getLineCount();return c.lineNumber!==C||c.column!==h.getLineMaxColumn(C)?this._doFindPreviousMatchMultiline(h,new x.a(C,h.getLineMaxColumn(C)),p,E):null}static _doFindPreviousMatchLineByLine(h,c,p,E){const y=h.getLineCount(),C=c.lineNumber,O=h.getLineContent(C).substring(0,c.column-1),k=this._findLastMatchInLine(p,O,C,E);if(k)return k;for(let Y=1;Y<=y;Y++){const Q=(y+C-Y-1)%y,H=h.getLineContent(Q+1),Z=this._findLastMatchInLine(p,H,Q+1,E);if(Z)return Z}return null}static _findLastMatchInLine(h,c,p,E){let y=null,C;for(h.reset(0);C=h.next(c);)y=m(new N.a(p,C.index+1,p,C.index+1+C[0].length),C,E);return y}}function S(h,c,p,E,y){if(E===0)return!0;const C=c.charCodeAt(E-1);if(h.get(C)!==0)return!0;if(C===13||C===10)return!0;if(y>0){const O=c.charCodeAt(E);if(h.get(O)!==0)return!0}return!1}function r(h,c,p,E,y){if(E+y===p)return!0;const C=c.charCodeAt(E+y);if(h.get(C)!==0)return!0;if(C===13||C===10)return!0;if(y>0){const O=c.charCodeAt(E+y-1);if(h.get(O)!==0)return!0}return!1}function _(h,c,p,E,y){return S(h,c,p,E,y)&&r(h,c,p,E,y)}class b{constructor(h,c){this._wordSeparators=h,this._searchRegex=c,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(h){this._searchRegex.lastIndex=h,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(h){const c=h.length;let p;do{if(this._prevMatchStartIndex+this._prevMatchLength===c)return null;if(p=this._searchRegex.exec(h),!p)return null;const E=p.index,y=p[0].length;if(E===this._prevMatchStartIndex&&y===this._prevMatchLength){if(y===0){f.z(h,c,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=E,this._prevMatchLength=y,!this._wordSeparators||_(this._wordSeparators,h,c,E,y))return p}while(p);return null}}},jVwG:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:function(){return t.e(342).then(t.bind(null,"fYNN"))}})},jrbv:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:function(){return t.e(323).then(t.bind(null,"2ZXa"))}})},k7mE:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:function(){return t.e(334).then(t.bind(null,"BjZ/"))}})},k7pc:function(mt,M,t){"use strict";t.r(M),t.d(M,"ToggleTabFocusModeAction",function(){return A});var f=t("OBOq"),B=t("sswD"),x=t("iDAx"),N=t("3/fG");class A extends B.b{constructor(){super({id:A.ID,label:N.a({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2048|43,mac:{primary:256|1024|43},weight:100}})}run(F,I){const L=x.b.getTabFocusMode(),v=!L;x.b.setTabFocusMode(v),v?Object(f.a)(N.a("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):Object(f.a)(N.a("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}A.ID="editor.action.toggleTabFocusMode",Object(B.j)(A)},k9mg:function(mt,M,t){"use strict";t.d(M,"a",function(){return fo}),t.d(M,"b",function(){return ri}),t.d(M,"e",function(){return ki}),t.d(M,"d",function(){return $i}),t.d(M,"c",function(){return vt});var f=t("EffR"),B=t("6OMU"),x=t("JQT/"),N=t("MI8n"),A=t("pmY6"),F=t("4rho"),I=t("cqdO");class L{constructor(P,q){this.renderer=P,this.modelProvider=q}get templateId(){return this.renderer.templateId}renderTemplate(P){const q=this.renderer.renderTemplate(P);return{data:q,disposable:A.a.None}}renderElement(P,q,Ae,Ge){if(Ae.disposable&&Ae.disposable.dispose(),!Ae.data)return;const ft=this.modelProvider();if(ft.isResolved(P))return this.renderer.renderElement(ft.get(P),P,Ae.data,Ge);const Dt=new x.b,jt=ft.resolve(P,Dt.token);Ae.disposable={dispose:()=>Dt.cancel()},this.renderer.renderPlaceholder(P,Ae.data),jt.then(Xt=>this.renderer.renderElement(Xt,P,Ae.data,Ge))}disposeTemplate(P){P.disposable&&(P.disposable.dispose(),P.disposable=void 0),P.data&&(this.renderer.disposeTemplate(P.data),P.data=void 0)}}class v{constructor(P,q){this.modelProvider=P,this.accessibilityProvider=q}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(P){const q=this.modelProvider();return q.isResolved(P)?this.accessibilityProvider.getAriaLabel(q.get(P)):null}}function m(P,q){return Object.assign(Object.assign({},q),{accessibilityProvider:q.accessibilityProvider&&new v(P,q.accessibilityProvider)})}class d{constructor(P,q,Ae,Ge,ft={}){const Dt=()=>this.model,jt=Ge.map(Xt=>new L(Xt,Dt));this.list=new I.c(P,q,Ae,jt,m(Dt,ft))}updateOptions(P){this.list.updateOptions(P)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return N.c.map(this.list.onMouseDblClick,({element:P,index:q,browserEvent:Ae})=>({element:P===void 0?void 0:this._model.get(P),index:q,browserEvent:Ae}))}get onPointer(){return N.c.map(this.list.onPointer,({element:P,index:q,browserEvent:Ae})=>({element:P===void 0?void 0:this._model.get(P),index:q,browserEvent:Ae}))}get onDidChangeSelection(){return N.c.map(this.list.onDidChangeSelection,({elements:P,indexes:q,browserEvent:Ae})=>({elements:P.map(Ge=>this._model.get(Ge)),indexes:q,browserEvent:Ae}))}get model(){return this._model}set model(P){this._model=P,this.list.splice(0,this.list.length,Object(B.r)(P.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(P=>this.model.get(P))}style(P){this.list.style(P)}dispose(){this.list.dispose()}}var D=t("44XX"),S=t("7GBL");class r{constructor(P,q,Ae){this.columns=P,this.getColumnSize=Ae,this.templateId=r.TemplateId,this.renderedTemplates=new Set;const Ge=new Map(q.map(ft=>[ft.templateId,ft]));this.renderers=[];for(const ft of P){const Dt=Ge.get(ft.templateId);if(!Dt)throw new Error(`Table cell renderer for template id ${ft.templateId} not found.`);this.renderers.push(Dt)}}renderTemplate(P){const q=Object(f.q)(P,Object(f.a)(".monaco-table-tr")),Ae=[],Ge=[];for(let Dt=0;Dt<this.columns.length;Dt++){const jt=this.renderers[Dt],Xt=Object(f.q)(q,Object(f.a)(".monaco-table-td",{"data-col-index":Dt}));Xt.style.width=`${this.getColumnSize(Dt)}px`,Ae.push(Xt),Ge.push(jt.renderTemplate(Xt))}const ft={container:P,cellContainers:Ae,cellTemplateData:Ge};return this.renderedTemplates.add(ft),ft}renderElement(P,q,Ae,Ge){for(let ft=0;ft<this.columns.length;ft++){const Dt=this.columns[ft],jt=Dt.project(P),Xt=this.renderers[ft];Xt.renderElement(jt,q,Ae.cellTemplateData[ft],Ge)}}disposeElement(P,q,Ae,Ge){for(let ft=0;ft<this.columns.length;ft++){const Dt=this.renderers[ft];if(Dt.disposeElement){const jt=this.columns[ft],Xt=jt.project(P);Dt.disposeElement(Xt,q,Ae.cellTemplateData[ft],Ge)}}}disposeTemplate(P){for(let q=0;q<this.columns.length;q++){const Ae=this.renderers[q];Ae.disposeTemplate(P.cellTemplateData[q])}Object(f.t)(P.container),this.renderedTemplates.delete(P)}layoutColumn(P,q){for(const{cellContainers:Ae}of this.renderedTemplates)Ae[P].style.width=`${q}px`}}r.TemplateId="row";function _(P){return{getHeight(q){return P.getHeight(q)},getTemplateId(){return r.TemplateId}}}class b{constructor(P,q){this.column=P,this.index=q,this._onDidLayout=new N.b,this.onDidLayout=this._onDidLayout.event,this.element=Object(f.a)(".monaco-table-th",{"data-col-index":q,title:P.tooltip},P.label)}get minimumSize(){var P;return(P=this.column.minimumWidth)!==null&&P!==void 0?P:120}get maximumSize(){var P;return(P=this.column.maximumWidth)!==null&&P!==void 0?P:Number.POSITIVE_INFINITY}get onDidChange(){var P;return(P=this.column.onDidChangeWidthConstraints)!==null&&P!==void 0?P:N.c.None}layout(P){this._onDidLayout.fire([this.index,P])}}class h{constructor(P,q,Ae,Ge,ft,Dt){this.virtualDelegate=Ae,this.domId=`table_id_${++h.InstanceCount}`,this.cachedHeight=0,this.domNode=Object(f.q)(q,Object(f.a)(`.monaco-table.${this.domId}`));const jt=Ge.map((io,ho)=>new b(io,ho)),Xt={size:jt.reduce((io,ho)=>io+ho.column.weight,0),views:jt.map(io=>({size:io.column.weight,view:io}))};this.splitview=new D.b(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:Xt}),this.splitview.el.style.height=`${Ae.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${Ae.headerRowHeight}px`;const uo=new r(Ge,ft,io=>this.splitview.getViewSize(io));this.list=new I.c(P,this.domNode,_(Ae),[uo],Dt),this.columnLayoutDisposable=N.c.any(...jt.map(io=>io.onDidLayout))(([io,ho])=>uo.layoutColumn(io,ho)),this.styleElement=Object(f.w)(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(P){this.list.updateOptions(P)}splice(P,q,Ae=[]){this.list.splice(P,q,Ae)}getHTMLElement(){return this.domNode}style(P){const q=[];q.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {
|
|
|
top: ${this.virtualDelegate.headerRowHeight+1}px;
|
|
|
height: calc(100% - ${this.virtualDelegate.headerRowHeight}px);
|
|
|
}`),this.styleElement.textContent=q.join(`
|
|
|
`),this.list.style(P)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.splitview.dispose(),this.list.dispose(),this.columnLayoutDisposable.dispose()}}h.InstanceCount=0;var c=t("feEw"),p=t("ZQ78"),E=t("4y0V"),y=t("uDWl"),C;(function(P){P[P.Unknown=0]="Unknown",P[P.Twistie=1]="Twistie",P[P.Element=2]="Element"})(C||(C={}));class O extends Error{constructor(P,q){super(`TreeError [${P}] ${q}`)}}class k{constructor(P){this.fn=P,this._map=new WeakMap}map(P){let q=this._map.get(P);return q||(q=this.fn(P),this._map.set(P,q)),q}}var Y=t("Gw4z"),Q=t("JYp7");function H(P){return typeof P=="object"&&"visibility"in P&&"data"in P}function Z(P){switch(P){case!0:return 1;case!1:return 0;default:return P}}function oe(P){return typeof P.collapsible=="boolean"}class ${constructor(P,q,Ae,Ge={}){this.user=P,this.list=q,this.rootRef=[],this.eventBufferer=new N.d,this._onDidChangeCollapseState=new N.b,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new N.b,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new N.b,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault=typeof Ge.collapseByDefault=="undefined"?!1:Ge.collapseByDefault,this.filter=Ge.filter,this.autoExpandSingleChildren=typeof Ge.autoExpandSingleChildren=="undefined"?!1:Ge.autoExpandSingleChildren,this.root={parent:void 0,element:Ae,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(P,q,Ae=Q.a.empty(),Ge={}){if(P.length===0)throw new O(this.user,"Invalid tree location");Ge.diffIdentityProvider?this.spliceSmart(Ge.diffIdentityProvider,P,q,Ae,Ge):this.spliceSimple(P,q,Ae,Ge)}spliceSmart(P,q,Ae,Ge,ft,Dt){var jt;Ge===void 0&&(Ge=Q.a.empty()),Dt===void 0&&(Dt=(jt=ft.diffDepth)!==null&&jt!==void 0?jt:0);const{parentNode:Xt}=this.getParentNodeWithListIndex(q);if(!Xt.lastDiffIds)return this.spliceSimple(q,Ae,Ge,ft);const uo=[...Ge],io=q[q.length-1],ho=new Y.a({getElements:()=>Xt.lastDiffIds},{getElements:()=>[...Xt.children.slice(0,io),...uo,...Xt.children.slice(io+Ae)].map(Wo=>P.getId(Wo.element).toString())}).ComputeDiff(!1);if(ho.quitEarly)return Xt.lastDiffIds=void 0,this.spliceSimple(q,Ae,uo,ft);const mo=q.slice(0,-1),Io=(Wo,si,hi)=>{if(Dt>0)for(let Uo=0;Uo<hi;Uo++)Wo--,si--,this.spliceSmart(P,[...mo,Wo,0],Number.MAX_SAFE_INTEGER,uo[si].children,ft,Dt-1)};let Ao=Math.min(Xt.children.length,io+Ae),Oo=uo.length;for(const Wo of ho.changes.sort((si,hi)=>hi.originalStart-si.originalStart))Io(Ao,Oo,Ao-(Wo.originalStart+Wo.originalLength)),Ao=Wo.originalStart,Oo=Wo.modifiedStart-io,this.spliceSimple([...mo,Ao],Wo.originalLength,Q.a.slice(uo,Oo,Oo+Wo.modifiedLength),ft);Io(Ao,Oo,Ao)}spliceSimple(P,q,Ae=Q.a.empty(),{onDidCreateNode:Ge,onDidDeleteNode:ft,diffIdentityProvider:Dt}){const{parentNode:jt,listIndex:Xt,revealed:uo,visible:io}=this.getParentNodeWithListIndex(P),ho=[],mo=Q.a.map(Ae,pi=>this.createTreeNode(pi,jt,jt.visible?1:0,uo,ho,Ge)),Io=P[P.length-1],Ao=jt.children.length>0;let Oo=0;for(let pi=Io;pi>=0&&pi<jt.children.length;pi--){const Wi=jt.children[pi];if(Wi.visible){Oo=Wi.visibleChildIndex;break}}const Wo=[];let si=0,hi=0;for(const pi of mo)Wo.push(pi),hi+=pi.renderNodeCount,pi.visible&&(pi.visibleChildIndex=Oo+si++);const Uo=Object(B.s)(jt.children,Io,q,Wo);Dt?jt.lastDiffIds?Object(B.s)(jt.lastDiffIds,Io,q,Wo.map(pi=>Dt.getId(pi.element).toString())):jt.lastDiffIds=jt.children.map(pi=>Dt.getId(pi.element).toString()):jt.lastDiffIds=void 0;let mi=0;for(const pi of Uo)pi.visible&&mi++;if(mi!==0)for(let pi=Io+Wo.length;pi<jt.children.length;pi++){const Wi=jt.children[pi];Wi.visible&&(Wi.visibleChildIndex-=mi)}if(jt.visibleChildrenCount+=si-mi,uo&&io){const pi=Uo.reduce((Wi,fn)=>Wi+(fn.visible?fn.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(jt,hi-pi),this.list.splice(Xt,pi,ho)}if(Uo.length>0&&ft){const pi=Wi=>{ft(Wi),Wi.children.forEach(pi)};Uo.forEach(pi)}const Ri=jt.children.length>0;Ao!==Ri&&this.setCollapsible(P.slice(0,-1),Ri),this._onDidSplice.fire({insertedNodes:Wo,deletedNodes:Uo});let Di=jt;for(;Di;){if(Di.visibility===2){this.refilter();break}Di=Di.parent}}rerender(P){if(P.length===0)throw new O(this.user,"Invalid tree location");const{node:q,listIndex:Ae,revealed:Ge}=this.getTreeNodeWithListIndex(P);q.visible&&Ge&&this.list.splice(Ae,1,[q])}has(P){return this.hasTreeNode(P)}getListIndex(P){const{listIndex:q,visible:Ae,revealed:Ge}=this.getTreeNodeWithListIndex(P);return Ae&&Ge?q:-1}getListRenderCount(P){return this.getTreeNode(P).renderNodeCount}isCollapsible(P){return this.getTreeNode(P).collapsible}setCollapsible(P,q){const Ae=this.getTreeNode(P);typeof q=="undefined"&&(q=!Ae.collapsible);const Ge={collapsible:q};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(P,Ge))}isCollapsed(P){return this.getTreeNode(P).collapsed}setCollapsed(P,q,Ae){const Ge=this.getTreeNode(P);typeof q=="undefined"&&(q=!Ge.collapsed);const ft={collapsed:q,recursive:Ae||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(P,ft))}_setCollapseState(P,q){const{node:Ae,listIndex:Ge,revealed:ft}=this.getTreeNodeWithListIndex(P),Dt=this._setListNodeCollapseState(Ae,Ge,ft,q);if(Ae!==this.root&&this.autoExpandSingleChildren&&Dt&&!oe(q)&&Ae.collapsible&&!Ae.collapsed&&!q.recursive){let jt=-1;for(let Xt=0;Xt<Ae.children.length;Xt++){const uo=Ae.children[Xt];if(uo.visible)if(jt>-1){jt=-1;break}else jt=Xt}jt>-1&&this._setCollapseState([...P,jt],q)}return Dt}_setListNodeCollapseState(P,q,Ae,Ge){const ft=this._setNodeCollapseState(P,Ge,!1);if(!Ae||!P.visible||!ft)return ft;const Dt=P.renderNodeCount,jt=this.updateNodeAfterCollapseChange(P),Xt=Dt-(q===-1?0:1);return this.list.splice(q+1,Xt,jt.slice(1)),ft}_setNodeCollapseState(P,q,Ae){let Ge;if(P===this.root?Ge=!1:(oe(q)?(Ge=P.collapsible!==q.collapsible,P.collapsible=q.collapsible):P.collapsible?(Ge=P.collapsed!==q.collapsed,P.collapsed=q.collapsed):Ge=!1,Ge&&this._onDidChangeCollapseState.fire({node:P,deep:Ae})),!oe(q)&&q.recursive)for(const ft of P.children)Ge=this._setNodeCollapseState(ft,q,!0)||Ge;return Ge}expandTo(P){this.eventBufferer.bufferEvents(()=>{let q=this.getTreeNode(P);for(;q.parent;)q=q.parent,P=P.slice(0,P.length-1),q.collapsed&&this._setCollapseState(P,{collapsed:!1,recursive:!1})})}refilter(){const P=this.root.renderNodeCount,q=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,P,q)}createTreeNode(P,q,Ae,Ge,ft,Dt){const jt={parent:q,element:P.element,children:[],depth:q.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof P.collapsible=="boolean"?P.collapsible:typeof P.collapsed!="undefined",collapsed:typeof P.collapsed=="undefined"?this.collapseByDefault:P.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},Xt=this._filterNode(jt,Ae);jt.visibility=Xt,Ge&&ft.push(jt);const uo=P.children||Q.a.empty(),io=Ge&&Xt!==0&&!jt.collapsed,ho=Q.a.map(uo,Ao=>this.createTreeNode(Ao,jt,Xt,io,ft,Dt));let mo=0,Io=1;for(const Ao of ho)jt.children.push(Ao),Io+=Ao.renderNodeCount,Ao.visible&&(Ao.visibleChildIndex=mo++);return jt.collapsible=jt.collapsible||jt.children.length>0,jt.visibleChildrenCount=mo,jt.visible=Xt===2?mo>0:Xt===1,jt.visible?jt.collapsed||(jt.renderNodeCount=Io):(jt.renderNodeCount=0,Ge&&ft.pop()),Dt&&Dt(jt),jt}updateNodeAfterCollapseChange(P){const q=P.renderNodeCount,Ae=[];return this._updateNodeAfterCollapseChange(P,Ae),this._updateAncestorsRenderNodeCount(P.parent,Ae.length-q),Ae}_updateNodeAfterCollapseChange(P,q){if(P.visible===!1)return 0;if(q.push(P),P.renderNodeCount=1,!P.collapsed)for(const Ae of P.children)P.renderNodeCount+=this._updateNodeAfterCollapseChange(Ae,q);return this._onDidChangeRenderNodeCount.fire(P),P.renderNodeCount}updateNodeAfterFilterChange(P){const q=P.renderNodeCount,Ae=[];return this._updateNodeAfterFilterChange(P,P.visible?1:0,Ae),this._updateAncestorsRenderNodeCount(P.parent,Ae.length-q),Ae}_updateNodeAfterFilterChange(P,q,Ae,Ge=!0){let ft;if(P!==this.root){if(ft=this._filterNode(P,q),ft===0)return P.visible=!1,P.renderNodeCount=0,!1;Ge&&Ae.push(P)}const Dt=Ae.length;P.renderNodeCount=P===this.root?0:1;let jt=!1;if(!P.collapsed||ft!==0){let Xt=0;for(const uo of P.children)jt=this._updateNodeAfterFilterChange(uo,ft,Ae,Ge&&!P.collapsed)||jt,uo.visible&&(uo.visibleChildIndex=Xt++);P.visibleChildrenCount=Xt}else P.visibleChildrenCount=0;return P!==this.root&&(P.visible=ft===2?jt:ft===1,P.visibility=ft),P.visible?P.collapsed||(P.renderNodeCount+=Ae.length-Dt):(P.renderNodeCount=0,Ge&&Ae.pop()),this._onDidChangeRenderNodeCount.fire(P),P.visible}_updateAncestorsRenderNodeCount(P,q){if(q===0)return;for(;P;)P.renderNodeCount+=q,this._onDidChangeRenderNodeCount.fire(P),P=P.parent}_filterNode(P,q){const Ae=this.filter?this.filter.filter(P.element,q):1;return typeof Ae=="boolean"?(P.filterData=void 0,Ae?1:0):H(Ae)?(P.filterData=Ae.data,Z(Ae.visibility)):(P.filterData=void 0,Z(Ae))}hasTreeNode(P,q=this.root){if(!P||P.length===0)return!0;const[Ae,...Ge]=P;return Ae<0||Ae>q.children.length?!1:this.hasTreeNode(Ge,q.children[Ae])}getTreeNode(P,q=this.root){if(!P||P.length===0)return q;const[Ae,...Ge]=P;if(Ae<0||Ae>q.children.length)throw new O(this.user,"Invalid tree location");return this.getTreeNode(Ge,q.children[Ae])}getTreeNodeWithListIndex(P){if(P.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:q,listIndex:Ae,revealed:Ge,visible:ft}=this.getParentNodeWithListIndex(P),Dt=P[P.length-1];if(Dt<0||Dt>q.children.length)throw new O(this.user,"Invalid tree location");const jt=q.children[Dt];return{node:jt,listIndex:Ae,revealed:Ge,visible:ft&&jt.visible}}getParentNodeWithListIndex(P,q=this.root,Ae=0,Ge=!0,ft=!0){const[Dt,...jt]=P;if(Dt<0||Dt>q.children.length)throw new O(this.user,"Invalid tree location");for(let Xt=0;Xt<Dt;Xt++)Ae+=q.children[Xt].renderNodeCount;return Ge=Ge&&!q.collapsed,ft=ft&&q.visible,jt.length===0?{parentNode:q,listIndex:Ae,revealed:Ge,visible:ft}:this.getParentNodeWithListIndex(jt,q.children[Dt],Ae+1,Ge,ft)}getNode(P=[]){return this.getTreeNode(P)}getNodeLocation(P){const q=[];let Ae=P;for(;Ae.parent;)q.push(Ae.parent.children.indexOf(Ae)),Ae=Ae.parent;return q.reverse()}getParentNodeLocation(P){return P.length===0?void 0:P.length===1?[]:Object(B.u)(P)[0]}}var te=t("Vhoy");const ne=Object(te.e)("tree-item-expanded",te.b.chevronDown),Ee=Object(te.e)("tree-filter-on-type-on",te.b.listFilter),fe=Object(te.e)("tree-filter-on-type-off",te.b.listSelection),ee=Object(te.e)("tree-filter-clear",te.b.close),ie=Object(te.e)("tree-item-loading",te.b.loading);var U=t("X+cX"),G=t("vl9R"),J=t("fpMC"),he=t("Sdnv"),xe=t("MNsG"),Ie=t("2V9f"),Le=t("3/fG");class Te extends c.a{constructor(P){super(P.elements.map(q=>q.element));this.data=P}}function ze(P){return P instanceof c.a?new Te(P):P}class ue{constructor(P,q){this.modelProvider=P,this.dnd=q,this.autoExpandDisposable=A.a.None}getDragURI(P){return this.dnd.getDragURI(P.element)}getDragLabel(P,q){return this.dnd.getDragLabel?this.dnd.getDragLabel(P.map(Ae=>Ae.element),q):void 0}onDragStart(P,q){this.dnd.onDragStart&&this.dnd.onDragStart(ze(P),q)}onDragOver(P,q,Ae,Ge,ft=!0){const Dt=this.dnd.onDragOver(ze(P),q&&q.element,Ae,Ge),jt=this.autoExpandNode!==q;if(jt&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=q),typeof q=="undefined")return Dt;if(jt&&typeof Dt!="boolean"&&Dt.autoExpand&&(this.autoExpandDisposable=Object(U.i)(()=>{const mo=this.modelProvider(),Io=mo.getNodeLocation(q);mo.isCollapsed(Io)&&mo.setCollapsed(Io,!1),this.autoExpandNode=void 0},500)),typeof Dt=="boolean"||!Dt.accept||typeof Dt.bubble=="undefined"||Dt.feedback){if(!ft){const mo=typeof Dt=="boolean"?Dt:Dt.accept,Io=typeof Dt=="boolean"?void 0:Dt.effect;return{accept:mo,effect:Io,feedback:[Ae]}}return Dt}if(Dt.bubble===1){const mo=this.modelProvider(),Io=mo.getNodeLocation(q),Ao=mo.getParentNodeLocation(Io),Oo=mo.getNode(Ao),Wo=Ao&&mo.getListIndex(Ao);return this.onDragOver(P,Oo,Wo,Ge,!1)}const Xt=this.modelProvider(),uo=Xt.getNodeLocation(q),io=Xt.getListIndex(uo),ho=Xt.getListRenderCount(uo);return Object.assign(Object.assign({},Dt),{feedback:Object(B.r)(io,io+ho)})}drop(P,q,Ae,Ge){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(ze(P),q&&q.element,Ae,Ge)}onDragEnd(P){this.dnd.onDragEnd&&this.dnd.onDragEnd(P)}}function je(P,q){return q&&Object.assign(Object.assign({},q),{identityProvider:q.identityProvider&&{getId(Ae){return q.identityProvider.getId(Ae.element)}},dnd:q.dnd&&new ue(P,q.dnd),multipleSelectionController:q.multipleSelectionController&&{isSelectionSingleChangeEvent(Ae){return q.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},Ae),{element:Ae.element}))},isSelectionRangeChangeEvent(Ae){return q.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},Ae),{element:Ae.element}))}},accessibilityProvider:q.accessibilityProvider&&Object.assign(Object.assign({},q.accessibilityProvider),{getSetSize(Ae){const Ge=P(),ft=Ge.getNodeLocation(Ae),Dt=Ge.getParentNodeLocation(ft),jt=Ge.getNode(Dt);return jt.visibleChildrenCount},getPosInSet(Ae){return Ae.visibleChildIndex+1},isChecked:q.accessibilityProvider&&q.accessibilityProvider.isChecked?Ae=>q.accessibilityProvider.isChecked(Ae.element):void 0,getRole:q.accessibilityProvider&&q.accessibilityProvider.getRole?Ae=>q.accessibilityProvider.getRole(Ae.element):()=>"treeitem",getAriaLabel(Ae){return q.accessibilityProvider.getAriaLabel(Ae.element)},getWidgetAriaLabel(){return q.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:q.accessibilityProvider&&q.accessibilityProvider.getWidgetRole?()=>q.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:q.accessibilityProvider&&q.accessibilityProvider.getAriaLevel?Ae=>q.accessibilityProvider.getAriaLevel(Ae.element):Ae=>Ae.depth,getActiveDescendantId:q.accessibilityProvider.getActiveDescendantId&&(Ae=>q.accessibilityProvider.getActiveDescendantId(Ae.element))}),keyboardNavigationLabelProvider:q.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},q.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(Ae){return q.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(Ae.element)}}),enableKeyboardNavigation:q.simpleKeyboardNavigation})}class Pe{constructor(P){this.delegate=P}getHeight(P){return this.delegate.getHeight(P.element)}getTemplateId(P){return this.delegate.getTemplateId(P.element)}hasDynamicHeight(P){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(P.element)}setDynamicHeight(P,q){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(P.element,q)}}var ve;(function(P){P.None="none",P.OnHover="onHover",P.Always="always"})(ve||(ve={}));class ce{constructor(P,q=[]){this._elements=q,this.onDidChange=N.c.forEach(P,Ae=>this._elements=Ae)}get elements(){return this._elements}}class le{constructor(P,q,Ae,Ge,ft={}){this.renderer=P,this.modelProvider=q,this.activeNodes=Ge,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=le.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new G.a,this.activeIndentNodes=new Set,this.indentGuidesDisposable=A.a.None,this.disposables=new A.b,this.templateId=P.templateId,this.updateOptions(ft),N.c.map(Ae,Dt=>Dt.node)(this.onDidChangeNodeTwistieState,this,this.disposables),P.onDidChangeTwistieState&&P.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(P={}){if(typeof P.indent!="undefined"&&(this.indent=Object(he.b)(P.indent,0,40)),typeof P.renderIndentGuides!="undefined"){const q=P.renderIndentGuides!==ve.None;if(q!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=q,this.indentGuidesDisposable.dispose(),q)){const Ae=new A.b;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,Ae),this.indentGuidesDisposable=Ae,this._onDidChangeActiveNodes(this.activeNodes.elements)}}typeof P.hideTwistiesOfChildlessElements!="undefined"&&(this.hideTwistiesOfChildlessElements=P.hideTwistiesOfChildlessElements)}renderTemplate(P){const q=Object(f.q)(P,Object(f.a)(".monaco-tl-row")),Ae=Object(f.q)(q,Object(f.a)(".monaco-tl-indent")),Ge=Object(f.q)(q,Object(f.a)(".monaco-tl-twistie")),ft=Object(f.q)(q,Object(f.a)(".monaco-tl-contents")),Dt=this.renderer.renderTemplate(ft);return{container:P,indent:Ae,twistie:Ge,indentGuidesDisposable:A.a.None,templateData:Dt}}renderElement(P,q,Ae,Ge){typeof Ge=="number"&&(this.renderedNodes.set(P,{templateData:Ae,height:Ge}),this.renderedElements.set(P.element,P));const ft=le.DefaultIndent+(P.depth-1)*this.indent;Ae.twistie.style.paddingLeft=`${ft}px`,Ae.indent.style.width=`${ft+this.indent-16}px`,this.renderTwistie(P,Ae),typeof Ge=="number"&&this.renderIndentGuides(P,Ae),this.renderer.renderElement(P,q,Ae.templateData,Ge)}disposeElement(P,q,Ae,Ge){Ae.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(P,q,Ae.templateData,Ge),typeof Ge=="number"&&(this.renderedNodes.delete(P),this.renderedElements.delete(P.element))}disposeTemplate(P){this.renderer.disposeTemplate(P.templateData)}onDidChangeTwistieState(P){const q=this.renderedElements.get(P);if(!q)return;this.onDidChangeNodeTwistieState(q)}onDidChangeNodeTwistieState(P){const q=this.renderedNodes.get(P);if(!q)return;this.renderTwistie(P,q.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(P,q.templateData)}renderTwistie(P,q){q.twistie.classList.remove(...ne.classNamesArray);let Ae=!1;this.renderer.renderTwistie&&(Ae=this.renderer.renderTwistie(P.element,q.twistie)),P.collapsible&&(!this.hideTwistiesOfChildlessElements||P.visibleChildrenCount>0)?(Ae||q.twistie.classList.add(...ne.classNamesArray),q.twistie.classList.add("collapsible"),q.twistie.classList.toggle("collapsed",P.collapsed)):q.twistie.classList.remove("collapsible","collapsed"),P.collapsible?q.container.setAttribute("aria-expanded",String(!P.collapsed)):q.container.removeAttribute("aria-expanded")}renderIndentGuides(P,q){if(Object(f.t)(q.indent),q.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const Ae=new A.b,Ge=this.modelProvider();let ft=P;for(;;){const Dt=Ge.getNodeLocation(ft),jt=Ge.getParentNodeLocation(Dt);if(!jt)break;const Xt=Ge.getNode(jt),uo=Object(f.a)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(Xt)&&uo.classList.add("active"),q.indent.childElementCount===0?q.indent.appendChild(uo):q.indent.insertBefore(uo,q.indent.firstElementChild),this.renderedIndentGuides.add(Xt,uo),Ae.add(Object(A.i)(()=>this.renderedIndentGuides.delete(Xt,uo))),ft=Xt}q.indentGuidesDisposable=Ae}_onDidChangeActiveNodes(P){if(!this.shouldRenderIndentGuides)return;const q=new Set,Ae=this.modelProvider();P.forEach(Ge=>{const ft=Ae.getNodeLocation(Ge);try{const Dt=Ae.getParentNodeLocation(ft);Ge.collapsible&&Ge.children.length>0&&!Ge.collapsed?q.add(Ge):Dt&&q.add(Ae.getNode(Dt))}catch(Dt){}}),this.activeIndentNodes.forEach(Ge=>{q.has(Ge)||this.renderedIndentGuides.forEach(Ge,ft=>ft.classList.remove("active"))}),q.forEach(Ge=>{this.activeIndentNodes.has(Ge)||this.renderedIndentGuides.forEach(Ge,ft=>ft.classList.add("active"))}),this.activeIndentNodes=q}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Object(A.f)(this.disposables)}}le.DefaultIndent=8;class Ce{constructor(P,q,Ae){this.tree=P,this.keyboardNavigationLabelProvider=q,this._filter=Ae,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new A.b,P.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(P){this._pattern=P,this._lowercasePattern=P.toLowerCase()}filter(P,q){if(this._filter){const ft=this._filter.filter(P,q);if(this.tree.options.simpleKeyboardNavigation)return ft;let Dt;if(typeof ft=="boolean"?Dt=ft?1:0:H(ft)?Dt=Z(ft.visibility):Dt=ft,Dt===0)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:J.a.Default,visibility:!0};const Ae=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(P),Ge=Array.isArray(Ae)?Ae:[Ae];for(const ft of Ge){const Dt=ft&&ft.toString();if(typeof Dt=="undefined")return{data:J.a.Default,visibility:!0};const jt=Object(J.d)(this._pattern,this._lowercasePattern,0,Dt,Dt.toLowerCase(),0,!0);if(jt)return this._matchCount++,Ge.length===1?{data:jt,visibility:!0}:{data:{label:Dt,score:jt},visibility:!0}}return this.tree.options.filterOnType?2:{data:J.a.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){Object(A.f)(this.disposables)}}class ye{constructor(P,q,Ae,Ge,ft){this.tree=P,this.view=Ae,this.filter=Ge,this.keyboardNavigationDelegate=ft,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new N.b,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new N.b,this.enabledDisposables=new A.b,this.disposables=new A.b,this.domNode=Object(f.a)(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,this.disposables.add(Object(f.i)(this.domNode,"dragstart",()=>this.onDragStart())),this.messageDomNode=Object(f.q)(Ae.getHTMLElement(),Object(f.a)(".monaco-list-type-filter-message")),this.labelDomNode=Object(f.q)(this.domNode,Object(f.a)("span.label"));const Dt=Object(f.q)(this.domNode,Object(f.a)(".controls"));this._filterOnType=!!P.options.filterOnType,this.filterOnTypeDomNode=Object(f.q)(Dt,Object(f.a)("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add(Object(f.i)(this.filterOnTypeDomNode,"input",()=>this.onDidChangeFilterOnType())),this.clearDomNode=Object(f.q)(Dt,Object(f.a)("button.clear"+ee.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=Object(Le.a)("clear","Clear"),this.keyboardNavigationEventFilter=P.options.keyboardNavigationEventFilter,q.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(P.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(P){P.simpleKeyboardNavigation?this.disable():this.enable(),typeof P.filterOnType!="undefined"&&(this._filterOnType=!!P.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),typeof P.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=P.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const P=this.enabledDisposables.add(new E.a(this.view.getHTMLElement(),"keydown")),q=N.c.chain(P.event).filter(Ge=>!Object(I.e)(Ge.target)||Ge.target===this.filterOnTypeDomNode).filter(Ge=>Ge.key!=="Dead"&&!/^Media/.test(Ge.key)).map(Ge=>new y.a(Ge)).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter(()=>this.automaticKeyboardNavigation||this.triggered).filter(Ge=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(Ge)&&!(Ge.keyCode===18||Ge.keyCode===16||Ge.keyCode===15||Ge.keyCode===17)||(this.pattern.length>0||this.triggered)&&((Ge.keyCode===9||Ge.keyCode===1)&&!Ge.altKey&&!Ge.ctrlKey)&&!Ge.metaKey||Ge.keyCode===1&&(xe.f?Ge.altKey&&!Ge.metaKey:Ge.ctrlKey)&&!Ge.shiftKey).forEach(Ge=>{Ge.stopPropagation(),Ge.preventDefault()}).event,Ae=this.enabledDisposables.add(new E.a(this.clearDomNode,"click"));N.c.chain(N.c.any(q,Ae.event)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){if(!this._enabled)return;this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1}onEventOrInput(P){typeof P=="string"?this.onInput(P):P instanceof MouseEvent||P.keyCode===9||P.keyCode===1&&(xe.f?P.altKey:P.ctrlKey)?this.onInput(""):P.keyCode===1?this.onInput(this.pattern.length===0?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+P.browserEvent.key)}onInput(P){const q=this.view.getHTMLElement();P&&!this.domNode.parentElement?q.append(this.domNode):!P&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=P,this._onDidChangePattern.fire(P),this.filter.pattern=P,this.tree.refilter(),P&&this.tree.focusNext(0,!0,void 0,Ge=>!J.a.isDefault(Ge.filterData));const Ae=this.tree.getFocus();if(Ae.length>0){const Ge=Ae[0];this.tree.getRelativeTop(Ge)===null&&this.tree.reveal(Ge,.5)}this.render(),P||(this.triggered=!1)}onDragStart(){const P=this.view.getHTMLElement(),{left:q}=Object(f.D)(P),Ae=P.clientWidth,Ge=Ae/2,ft=this.domNode.clientWidth,Dt=new A.b;let jt=this.positionClassName;const Xt=()=>{switch(jt){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=`${Ae-ft-6}px`;break}},uo=ho=>{ho.preventDefault();const mo=ho.clientX-q;ho.dataTransfer&&(ho.dataTransfer.dropEffect="none"),mo<Ge?jt="nw":jt="ne",Xt()},io=()=>{this.positionClassName=jt,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",Object(A.f)(Dt)};Xt(),this.domNode.classList.remove(jt),this.domNode.classList.add("dragging"),Dt.add(Object(A.i)(()=>this.domNode.classList.remove("dragging"))),Dt.add(Object(f.i)(document,"dragover",ho=>uo(ho))),Dt.add(Object(f.i)(this.domNode,"dragend",()=>io())),p.c.CurrentDragAndDropData=new p.b("vscode-ui"),Dt.add(Object(A.i)(()=>p.c.CurrentDragAndDropData=void 0))}onDidSpliceModel(){if(!this._enabled||this.pattern.length===0)return;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(...fe.classNamesArray),this.filterOnTypeDomNode.classList.add(...Ee.classNamesArray),this.filterOnTypeDomNode.title=Object(Le.a)("disable filter on type","Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(...Ee.classNamesArray),this.filterOnTypeDomNode.classList.add(...fe.classNamesArray),this.filterOnTypeDomNode.title=Object(Le.a)("enable filter on type","Enable Filter on Type"))}render(){const P=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&this.tree.options.filterOnType&&P?(this.messageDomNode.textContent=Object(Le.a)("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",P),this.domNode.title=Object(Le.a)("found","Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"\u2026"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(P){return!this.enabled||!this.pattern||this.filterOnType||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!J.a.isDefault(P.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),Object(A.f)(this.disposables)}}function ge(P){let q=C.Unknown;return Object(f.J)(P.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?q=C.Twistie:Object(f.J)(P.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(q=C.Element),{browserEvent:P.browserEvent,element:P.element?P.element.element:null,target:q}}function Me(P,q){q(P),P.children.forEach(Ae=>Me(Ae,q))}class De{constructor(P,q){this.getFirstViewElementWithTrait=P,this.identityProvider=q,this.nodes=[],this._onDidChange=new N.b,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(P,q){var Ae;if(!((Ae=q)===null||Ae===void 0?void 0:Ae.__forceEvent)&&Object(B.g)(this.nodes,P))return;this._set(P,!1,q)}_set(P,q,Ae){if(this.nodes=[...P],this.elements=void 0,this._nodeSet=void 0,!q){const Ge=this;this._onDidChange.fire({get elements(){return Ge.get()},browserEvent:Ae})}}get(){return this.elements||(this.elements=this.nodes.map(P=>P.element)),[...this.elements]}getNodes(){return this.nodes}has(P){return this.nodeSet.has(P)}onDidModelSplice({insertedNodes:P,deletedNodes:q}){if(!this.identityProvider){const Xt=this.createNodeSet(),uo=io=>Xt.delete(io);q.forEach(io=>Me(io,uo)),this.set([...Xt.values()]);return}const Ae=new Set,Ge=Xt=>Ae.add(this.identityProvider.getId(Xt.element).toString());q.forEach(Xt=>Me(Xt,Ge));const ft=new Map,Dt=Xt=>ft.set(this.identityProvider.getId(Xt.element).toString(),Xt);P.forEach(Xt=>Me(Xt,Dt));const jt=[];for(const Xt of this.nodes){const uo=this.identityProvider.getId(Xt.element).toString(),io=Ae.has(uo);if(!io)jt.push(Xt);else{const ho=ft.get(uo);ho&&jt.push(ho)}}if(this.nodes.length>0&&jt.length===0){const Xt=this.getFirstViewElementWithTrait();Xt&&jt.push(Xt)}this._set(jt,!0)}createNodeSet(){const P=new Set;for(const q of this.nodes)P.add(q);return P}}class we extends I.d{constructor(P,q){super(P);this.tree=q}onViewPointer(P){if(Object(I.e)(P.browserEvent.target)||Object(I.f)(P.browserEvent.target))return;const q=P.element;if(!q)return super.onViewPointer(P);if(this.isSelectionRangeChangeEvent(P)||this.isSelectionSingleChangeEvent(P))return super.onViewPointer(P);const Ae=P.browserEvent.target,Ge=Ae.classList.contains("monaco-tl-twistie")||Ae.classList.contains("monaco-icon-label")&&Ae.classList.contains("folder-icon")&&P.browserEvent.offsetX<16;let ft=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?ft=this.tree.expandOnlyOnTwistieClick(q.element):ft=!!this.tree.expandOnlyOnTwistieClick,ft&&!Ge&&P.browserEvent.detail!==2)return super.onViewPointer(P);if(!this.tree.expandOnDoubleClick&&P.browserEvent.detail===2)return super.onViewPointer(P);if(q.collapsible){const Dt=this.tree.model,jt=Dt.getNodeLocation(q),Xt=P.browserEvent.altKey;if(this.tree.setFocus([jt]),Dt.setCollapsed(jt,void 0,Xt),ft&&Ge)return}super.onViewPointer(P)}onDoubleClick(P){const q=P.browserEvent.target.classList.contains("monaco-tl-twistie");if(q||!this.tree.expandOnDoubleClick)return;super.onDoubleClick(P)}}class Oe extends I.c{constructor(P,q,Ae,Ge,ft,Dt,jt,Xt){super(P,q,Ae,Ge,Xt);this.focusTrait=ft,this.selectionTrait=Dt,this.anchorTrait=jt}createMouseController(P){return new we(this,P.tree)}splice(P,q,Ae=[]){if(super.splice(P,q,Ae),Ae.length===0)return;const Ge=[],ft=[];let Dt;Ae.forEach((jt,Xt)=>{this.focusTrait.has(jt)&&Ge.push(P+Xt),this.selectionTrait.has(jt)&&ft.push(P+Xt),this.anchorTrait.has(jt)&&(Dt=P+Xt)}),Ge.length>0&&super.setFocus(Object(B.f)([...super.getFocus(),...Ge])),ft.length>0&&super.setSelection(Object(B.f)([...super.getSelection(),...ft])),typeof Dt=="number"&&super.setAnchor(Dt)}setFocus(P,q,Ae=!1){super.setFocus(P,q),Ae||this.focusTrait.set(P.map(Ge=>this.element(Ge)),q)}setSelection(P,q,Ae=!1){super.setSelection(P,q),Ae||this.selectionTrait.set(P.map(Ge=>this.element(Ge)),q)}setAnchor(P,q=!1){super.setAnchor(P),q||(typeof P=="undefined"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(P)]))}}class nt{constructor(P,q,Ae,Ge,ft={}){this._options=ft,this.eventBufferer=new N.d,this.disposables=new A.b,this._onWillRefilter=new N.b,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new N.b;const Dt=new Pe(Ae),jt=new N.f,Xt=new N.f,uo=new ce(Xt.event);this.renderers=Ge.map(mo=>new le(mo,()=>this.model,jt.event,uo,ft));for(let mo of this.renderers)this.disposables.add(mo);let io;ft.keyboardNavigationLabelProvider&&(io=new Ce(this,ft.keyboardNavigationLabelProvider,ft.filter),ft=Object.assign(Object.assign({},ft),{filter:io}),this.disposables.add(io)),this.focus=new De(()=>this.view.getFocusedElements()[0],ft.identityProvider),this.selection=new De(()=>this.view.getSelectedElements()[0],ft.identityProvider),this.anchor=new De(()=>this.view.getAnchorElement(),ft.identityProvider),this.view=new Oe(P,q,Dt,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},je(()=>this.model,ft)),{tree:this})),this.model=this.createModel(P,this.view,ft),jt.input=this.model.onDidChangeCollapseState;const ho=N.c.forEach(this.model.onDidSplice,mo=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(mo),this.selection.onDidModelSplice(mo)})});if(ho(()=>null,null,this.disposables),Xt.input=N.c.chain(N.c.any(ho,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const mo=new Set;for(const Io of this.focus.getNodes())mo.add(Io);for(const Io of this.selection.getNodes())mo.add(Io);return[...mo.values()]}).event,ft.keyboardSupport!==!1){const mo=N.c.chain(this.view.onKeyDown).filter(Io=>!Object(I.e)(Io.target)).map(Io=>new y.a(Io));mo.filter(Io=>Io.keyCode===15).on(this.onLeftArrow,this,this.disposables),mo.filter(Io=>Io.keyCode===17).on(this.onRightArrow,this,this.disposables),mo.filter(Io=>Io.keyCode===10).on(this.onSpace,this,this.disposables)}if(ft.keyboardNavigationLabelProvider){const mo=ft.keyboardNavigationDelegate||I.a;this.typeFilterController=new ye(this,this.model,this.view,io,mo),this.focusNavigationFilter=Io=>this.typeFilterController.shouldAllowFocus(Io),this.disposables.add(this.typeFilterController)}this.styleElement=Object(f.w)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===ve.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return N.c.map(this.view.onMouseDblClick,ge)}get onPointer(){return N.c.map(this.view.onPointer,ge)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick=="undefined"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick=="undefined"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(P={}){this._options=Object.assign(Object.assign({},this._options),P);for(const q of this.renderers)q.updateOptions(P);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===ve.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(P){this.view.scrollTop=P}domFocus(){this.view.domFocus()}layout(P,q){this.view.layout(P,q)}style(P){const q=`.${this.view.domId}`,Ae=[];P.treeIndentGuidesStroke&&(Ae.push(`.monaco-list${q}:hover .monaco-tl-indent > .indent-guide, .monaco-list${q}.always .monaco-tl-indent > .indent-guide { border-color: ${P.treeIndentGuidesStroke.transparent(.4)}; }`),Ae.push(`.monaco-list${q} .monaco-tl-indent > .indent-guide.active { border-color: ${P.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=Ae.join(`
|
|
|
`),this.view.style(P)}collapse(P,q=!1){return this.model.setCollapsed(P,!0,q)}expand(P,q=!1){return this.model.setCollapsed(P,!1,q)}isCollapsible(P){return this.model.isCollapsible(P)}setCollapsible(P,q){return this.model.setCollapsible(P,q)}isCollapsed(P){return this.model.isCollapsed(P)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(P,q){const Ae=P.map(ft=>this.model.getNode(ft));this.selection.set(Ae,q);const Ge=P.map(ft=>this.model.getListIndex(ft)).filter(ft=>ft>-1);this.view.setSelection(Ge,q,!0)}getSelection(){return this.selection.get()}setFocus(P,q){const Ae=P.map(ft=>this.model.getNode(ft));this.focus.set(Ae,q);const Ge=P.map(ft=>this.model.getListIndex(ft)).filter(ft=>ft>-1);this.view.setFocus(Ge,q,!0)}focusNext(P=1,q=!1,Ae,Ge=this.focusNavigationFilter){this.view.focusNext(P,q,Ae,Ge)}getFocus(){return this.focus.get()}reveal(P,q){this.model.expandTo(P);const Ae=this.model.getListIndex(P);if(Ae===-1)return;this.view.reveal(Ae,q)}getRelativeTop(P){const q=this.model.getListIndex(P);return q===-1?null:this.view.getRelativeTop(q)}onLeftArrow(P){P.preventDefault(),P.stopPropagation();const q=this.view.getFocusedElements();if(q.length===0)return;const Ae=q[0],Ge=this.model.getNodeLocation(Ae),ft=this.model.setCollapsed(Ge,!0);if(!ft){const Dt=this.model.getParentNodeLocation(Ge);if(!Dt)return;const jt=this.model.getListIndex(Dt);this.view.reveal(jt),this.view.setFocus([jt])}}onRightArrow(P){P.preventDefault(),P.stopPropagation();const q=this.view.getFocusedElements();if(q.length===0)return;const Ae=q[0],Ge=this.model.getNodeLocation(Ae),ft=this.model.setCollapsed(Ge,!1);if(!ft){if(!Ae.children.some(Xt=>Xt.visible))return;const[Dt]=this.view.getFocus(),jt=Dt+1;this.view.reveal(jt),this.view.setFocus([jt])}}onSpace(P){P.preventDefault(),P.stopPropagation();const q=this.view.getFocusedElements();if(q.length===0)return;const Ae=q[0],Ge=this.model.getNodeLocation(Ae),ft=P.browserEvent.altKey;this.model.setCollapsed(Ge,void 0,ft)}dispose(){Object(A.f)(this.disposables),this.view.dispose()}}class Ke{constructor(P,q,Ae={}){this.user=P,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new $(P,q,null,Ae),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,Ae.sorter&&(this.sorter={compare(Ge,ft){return Ae.sorter.compare(Ge.element,ft.element)}}),this.identityProvider=Ae.identityProvider}setChildren(P,q=Q.a.empty(),Ae={}){const Ge=this.getElementLocation(P);this._setChildren(Ge,this.preserveCollapseState(q),Ae)}_setChildren(P,q=Q.a.empty(),Ae){const Ge=new Set,ft=new Set,Dt=Xt=>{var uo;if(Xt.element===null)return;const io=Xt;if(Ge.add(io.element),this.nodes.set(io.element,io),this.identityProvider){const ho=this.identityProvider.getId(io.element).toString();ft.add(ho),this.nodesByIdentity.set(ho,io)}(uo=Ae.onDidCreateNode)===null||uo===void 0||uo.call(Ae,io)},jt=Xt=>{var uo;if(Xt.element===null)return;const io=Xt;if(Ge.has(io.element)||this.nodes.delete(io.element),this.identityProvider){const ho=this.identityProvider.getId(io.element).toString();ft.has(ho)||this.nodesByIdentity.delete(ho)}(uo=Ae.onDidDeleteNode)===null||uo===void 0||uo.call(Ae,io)};this.model.splice([...P,0],Number.MAX_VALUE,q,Object.assign(Object.assign({},Ae),{onDidCreateNode:Dt,onDidDeleteNode:jt}))}preserveCollapseState(P=Q.a.empty()){return this.sorter&&(P=[...P].sort(this.sorter.compare.bind(this.sorter))),Q.a.map(P,q=>{let Ae=this.nodes.get(q.element);if(!Ae&&this.identityProvider){const Dt=this.identityProvider.getId(q.element).toString();Ae=this.nodesByIdentity.get(Dt)}if(!Ae)return Object.assign(Object.assign({},q),{children:this.preserveCollapseState(q.children)});const Ge=typeof q.collapsible=="boolean"?q.collapsible:Ae.collapsible,ft=typeof q.collapsed!="undefined"?q.collapsed:Ae.collapsed;return Object.assign(Object.assign({},q),{collapsible:Ge,collapsed:ft,children:this.preserveCollapseState(q.children)})})}rerender(P){const q=this.getElementLocation(P);this.model.rerender(q)}has(P){return this.nodes.has(P)}getListIndex(P){const q=this.getElementLocation(P);return this.model.getListIndex(q)}getListRenderCount(P){const q=this.getElementLocation(P);return this.model.getListRenderCount(q)}isCollapsible(P){const q=this.getElementLocation(P);return this.model.isCollapsible(q)}setCollapsible(P,q){const Ae=this.getElementLocation(P);return this.model.setCollapsible(Ae,q)}isCollapsed(P){const q=this.getElementLocation(P);return this.model.isCollapsed(q)}setCollapsed(P,q,Ae){const Ge=this.getElementLocation(P);return this.model.setCollapsed(Ge,q,Ae)}expandTo(P){const q=this.getElementLocation(P);this.model.expandTo(q)}refilter(){this.model.refilter()}getNode(P=null){if(P===null)return this.model.getNode(this.model.rootRef);const q=this.nodes.get(P);if(!q)throw new O(this.user,`Tree element not found: ${P}`);return q}getNodeLocation(P){return P.element}getParentNodeLocation(P){if(P===null)throw new O(this.user,"Invalid getParentNodeLocation call");const q=this.nodes.get(P);if(!q)throw new O(this.user,`Tree element not found: ${P}`);const Ae=this.model.getNodeLocation(q),Ge=this.model.getParentNodeLocation(Ae),ft=this.model.getNode(Ge);return ft.element}getElementLocation(P){if(P===null)return[];const q=this.nodes.get(P);if(!q)throw new O(this.user,`Tree element not found: ${P}`);return this.model.getNodeLocation(q)}}function et(P){const q=[P.element],Ae=P.incompressible||!1;return{element:{elements:q,incompressible:Ae},children:Q.a.map(Q.a.from(P.children),et),collapsible:P.collapsible,collapsed:P.collapsed}}function bt(P){const q=[P.element],Ae=P.incompressible||!1;let Ge,ft;for(;!([ft,Ge]=Q.a.consume(Q.a.from(P.children),2),ft.length!==1);){if(ft[0].incompressible)break;P=ft[0],q.push(P.element)}return{element:{elements:q,incompressible:Ae},children:Q.a.map(Q.a.concat(ft,Ge),bt),collapsible:P.collapsible,collapsed:P.collapsed}}function Tt(P,q=0){let Ae;return q<P.element.elements.length-1?Ae=[Tt(P,q+1)]:Ae=Q.a.map(Q.a.from(P.children),Ge=>Tt(Ge,0)),q===0&&P.element.incompressible?{element:P.element.elements[q],children:Ae,incompressible:!0,collapsible:P.collapsible,collapsed:P.collapsed}:{element:P.element.elements[q],children:Ae,collapsible:P.collapsible,collapsed:P.collapsed}}function $t(P){return Tt(P,0)}function Xe(P,q,Ae){return P.element===q?Object.assign(Object.assign({},P),{children:Ae}):Object.assign(Object.assign({},P),{children:Q.a.map(Q.a.from(P.children),Ge=>Xe(Ge,q,Ae))})}const it=P=>({getId(q){return q.elements.map(Ae=>P.getId(Ae).toString()).join("\0")}});class re{constructor(P,q,Ae={}){this.user=P,this.rootRef=null,this.nodes=new Map,this.model=new Ke(P,q,Ae),this.enabled=typeof Ae.compressionEnabled=="undefined"?!0:Ae.compressionEnabled,this.identityProvider=Ae.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(P,q=Q.a.empty(),Ae){const Ge=Ae.diffIdentityProvider&&it(Ae.diffIdentityProvider);if(P===null){const Io=Q.a.map(q,this.enabled?bt:et);this._setChildren(null,Io,{diffIdentityProvider:Ge,diffDepth:Infinity});return}const ft=this.nodes.get(P);if(!ft)throw new Error("Unknown compressed tree node");const Dt=this.model.getNode(ft),jt=this.model.getParentNodeLocation(ft),Xt=this.model.getNode(jt),uo=$t(Dt),io=Xe(uo,P,q),ho=(this.enabled?bt:et)(io),mo=Xt.children.map(Io=>Io===Dt?ho:Io);this._setChildren(Xt.element,mo,{diffIdentityProvider:Ge,diffDepth:Dt.depth-Xt.depth})}setCompressionEnabled(P){if(P===this.enabled)return;this.enabled=P;const q=this.model.getNode(),Ae=q.children,Ge=Q.a.map(Ae,$t),ft=Q.a.map(Ge,P?bt:et);this._setChildren(null,ft,{diffIdentityProvider:this.identityProvider,diffDepth:Infinity})}_setChildren(P,q,Ae){const Ge=new Set,ft=jt=>{for(const Xt of jt.element.elements)Ge.add(Xt),this.nodes.set(Xt,jt.element)},Dt=jt=>{for(const Xt of jt.element.elements)Ge.has(Xt)||this.nodes.delete(Xt)};this.model.setChildren(P,q,Object.assign(Object.assign({},Ae),{onDidCreateNode:ft,onDidDeleteNode:Dt}))}has(P){return this.nodes.has(P)}getListIndex(P){const q=this.getCompressedNode(P);return this.model.getListIndex(q)}getListRenderCount(P){const q=this.getCompressedNode(P);return this.model.getListRenderCount(q)}getNode(P){if(typeof P=="undefined")return this.model.getNode();const q=this.getCompressedNode(P);return this.model.getNode(q)}getNodeLocation(P){const q=this.model.getNodeLocation(P);return q===null?null:q.elements[q.elements.length-1]}getParentNodeLocation(P){const q=this.getCompressedNode(P),Ae=this.model.getParentNodeLocation(q);return Ae===null?null:Ae.elements[Ae.elements.length-1]}isCollapsible(P){const q=this.getCompressedNode(P);return this.model.isCollapsible(q)}setCollapsible(P,q){const Ae=this.getCompressedNode(P);return this.model.setCollapsible(Ae,q)}isCollapsed(P){const q=this.getCompressedNode(P);return this.model.isCollapsed(q)}setCollapsed(P,q,Ae){const Ge=this.getCompressedNode(P);return this.model.setCollapsed(Ge,q,Ae)}expandTo(P){const q=this.getCompressedNode(P);this.model.expandTo(q)}rerender(P){const q=this.getCompressedNode(P);this.model.rerender(q)}refilter(){this.model.refilter()}getCompressedNode(P){if(P===null)return null;const q=this.nodes.get(P);if(!q)throw new O(this.user,`Tree element not found: ${P}`);return q}}const We=P=>P[P.length-1];class tt{constructor(P,q){this.unwrapper=P,this.node=q}get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(P=>new tt(this.unwrapper,P))}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}}function Et(P,q){return{splice(Ae,Ge,ft){q.splice(Ae,Ge,ft.map(Dt=>P.map(Dt)))},updateElementHeight(Ae,Ge){q.updateElementHeight(Ae,Ge)}}}function It(P,q){return Object.assign(Object.assign({},q),{identityProvider:q.identityProvider&&{getId(Ae){return q.identityProvider.getId(P(Ae))}},sorter:q.sorter&&{compare(Ae,Ge){return q.sorter.compare(Ae.elements[0],Ge.elements[0])}},filter:q.filter&&{filter(Ae,Ge){return q.filter.filter(P(Ae),Ge)}}})}class Rt{constructor(P,q,Ae={}){this.rootRef=null,this.elementMapper=Ae.elementMapper||We;const Ge=ft=>this.elementMapper(ft.elements);this.nodeMapper=new k(ft=>new tt(Ge,ft)),this.model=new re(P,Et(this.nodeMapper,q),It(Ge,Ae))}get onDidSplice(){return N.c.map(this.model.onDidSplice,({insertedNodes:P,deletedNodes:q})=>({insertedNodes:P.map(Ae=>this.nodeMapper.map(Ae)),deletedNodes:q.map(Ae=>this.nodeMapper.map(Ae))}))}get onDidChangeCollapseState(){return N.c.map(this.model.onDidChangeCollapseState,({node:P,deep:q})=>({node:this.nodeMapper.map(P),deep:q}))}get onDidChangeRenderNodeCount(){return N.c.map(this.model.onDidChangeRenderNodeCount,P=>this.nodeMapper.map(P))}setChildren(P,q=Q.a.empty(),Ae={}){this.model.setChildren(P,q,Ae)}setCompressionEnabled(P){this.model.setCompressionEnabled(P)}has(P){return this.model.has(P)}getListIndex(P){return this.model.getListIndex(P)}getListRenderCount(P){return this.model.getListRenderCount(P)}getNode(P){return this.nodeMapper.map(this.model.getNode(P))}getNodeLocation(P){return P.element}getParentNodeLocation(P){return this.model.getParentNodeLocation(P)}isCollapsible(P){return this.model.isCollapsible(P)}setCollapsible(P,q){return this.model.setCollapsible(P,q)}isCollapsed(P){return this.model.isCollapsed(P)}setCollapsed(P,q,Ae){return this.model.setCollapsed(P,q,Ae)}expandTo(P){return this.model.expandTo(P)}rerender(P){return this.model.rerender(P)}refilter(){return this.model.refilter()}getCompressedTreeNode(P=null){return this.model.getNode(P)}}var vo=t("ZCR3"),Mo=function(P,q,Ae,Ge){var ft=arguments.length,Dt=ft<3?q:Ge===null?Ge=Object.getOwnPropertyDescriptor(q,Ae):Ge,jt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Dt=Reflect.decorate(P,q,Ae,Ge);else for(var Xt=P.length-1;Xt>=0;Xt--)(jt=P[Xt])&&(Dt=(ft<3?jt(Dt):ft>3?jt(q,Ae,Dt):jt(q,Ae))||Dt);return ft>3&&Dt&&Object.defineProperty(q,Ae,Dt),Dt};class xo extends nt{constructor(P,q,Ae,Ge,ft={}){super(P,q,Ae,Ge,ft)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(P,q=Q.a.empty(),Ae){this.model.setChildren(P,q,Ae)}rerender(P){if(P===void 0){this.view.rerender();return}this.model.rerender(P)}hasElement(P){return this.model.has(P)}createModel(P,q,Ae){return new Ke(P,q,Ae)}}class Do{constructor(P,q){this._compressedTreeNodeProvider=P,this.renderer=q,this.templateId=q.templateId,q.onDidChangeTwistieState&&(this.onDidChangeTwistieState=q.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(P){const q=this.renderer.renderTemplate(P);return{compressedTreeNode:void 0,data:q}}renderElement(P,q,Ae,Ge){const ft=this.compressedTreeNodeProvider.getCompressedTreeNode(P.element);ft.element.elements.length===1?(Ae.compressedTreeNode=void 0,this.renderer.renderElement(P,q,Ae.data,Ge)):(Ae.compressedTreeNode=ft,this.renderer.renderCompressedElements(ft,q,Ae.data,Ge))}disposeElement(P,q,Ae,Ge){Ae.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(Ae.compressedTreeNode,q,Ae.data,Ge):this.renderer.disposeElement&&this.renderer.disposeElement(P,q,Ae.data,Ge)}disposeTemplate(P){this.renderer.disposeTemplate(P.data)}renderTwistie(P,q){return this.renderer.renderTwistie?this.renderer.renderTwistie(P,q):!1}}Mo([vo.a],Do.prototype,"compressedTreeNodeProvider",null);function Lo(P,q){return q&&Object.assign(Object.assign({},q),{keyboardNavigationLabelProvider:q.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(Ae){let Ge;try{Ge=P().getCompressedTreeNode(Ae)}catch(ft){return q.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(Ae)}return Ge.element.elements.length===1?q.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(Ae):q.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(Ge.element.elements)}}})}class To extends xo{constructor(P,q,Ae,Ge,ft={}){const Dt=()=>this,jt=Ge.map(Xt=>new Do(Dt,Xt));super(P,q,Ae,jt,Lo(Dt,ft))}setChildren(P,q=Q.a.empty(),Ae){this.model.setChildren(P,q,Ae)}createModel(P,q,Ae){return new Rt(P,q,Ae)}updateOptions(P={}){super.updateOptions(P),typeof P.compressionEnabled!="undefined"&&this.model.setCompressionEnabled(P.compressionEnabled)}getCompressedTreeNode(P=null){return this.model.getCompressedTreeNode(P)}}var Ht=t("/cxE"),Mt=function(P,q,Ae,Ge){function ft(Dt){return Dt instanceof Ae?Dt:new Ae(function(jt){jt(Dt)})}return new(Ae||(Ae=Promise))(function(Dt,jt){function Xt(ho){try{io(Ge.next(ho))}catch(mo){jt(mo)}}function uo(ho){try{io(Ge.throw(ho))}catch(mo){jt(mo)}}function io(ho){ho.done?Dt(ho.value):ft(ho.value).then(Xt,uo)}io((Ge=Ge.apply(P,q||[])).next())})};function Ue(P){return Object.assign(Object.assign({},P),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function dt(P,q){return q.parent?q.parent===P?!0:dt(P,q.parent):!1}function Ut(P,q){return P===q||dt(P,q)||dt(q,P)}class Ye{constructor(P){this.node=P}get element(){return this.node.element.element}get children(){return this.node.children.map(P=>new Ye(P))}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 qe{constructor(P,q,Ae){this.renderer=P,this.nodeMapper=q,this.onDidChangeTwistieState=Ae,this.renderedNodes=new Map,this.templateId=P.templateId}renderTemplate(P){const q=this.renderer.renderTemplate(P);return{templateData:q}}renderElement(P,q,Ae,Ge){this.renderer.renderElement(this.nodeMapper.map(P),q,Ae.templateData,Ge)}renderTwistie(P,q){return P.slow?(q.classList.add(...ie.classNamesArray),!0):(q.classList.remove(...ie.classNamesArray),!1)}disposeElement(P,q,Ae,Ge){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(P),q,Ae.templateData,Ge)}disposeTemplate(P){this.renderer.disposeTemplate(P.templateData)}dispose(){this.renderedNodes.clear()}}function ct(P){return{browserEvent:P.browserEvent,elements:P.elements.map(q=>q.element)}}function _t(P){return{browserEvent:P.browserEvent,element:P.element&&P.element.element,target:P.target}}class Pt extends c.a{constructor(P){super(P.elements.map(q=>q.element));this.data=P}}function Wt(P){return P instanceof c.a?new Pt(P):P}class Vt{constructor(P){this.dnd=P}getDragURI(P){return this.dnd.getDragURI(P.element)}getDragLabel(P,q){return this.dnd.getDragLabel?this.dnd.getDragLabel(P.map(Ae=>Ae.element),q):void 0}onDragStart(P,q){this.dnd.onDragStart&&this.dnd.onDragStart(Wt(P),q)}onDragOver(P,q,Ae,Ge,ft=!0){return this.dnd.onDragOver(Wt(P),q&&q.element,Ae,Ge)}drop(P,q,Ae,Ge){this.dnd.drop(Wt(P),q&&q.element,Ae,Ge)}onDragEnd(P){this.dnd.onDragEnd&&this.dnd.onDragEnd(P)}}function so(P){return P&&Object.assign(Object.assign({},P),{collapseByDefault:!0,identityProvider:P.identityProvider&&{getId(q){return P.identityProvider.getId(q.element)}},dnd:P.dnd&&new Vt(P.dnd),multipleSelectionController:P.multipleSelectionController&&{isSelectionSingleChangeEvent(q){return P.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},q),{element:q.element}))},isSelectionRangeChangeEvent(q){return P.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},q),{element:q.element}))}},accessibilityProvider:P.accessibilityProvider&&Object.assign(Object.assign({},P.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:P.accessibilityProvider.getRole?q=>P.accessibilityProvider.getRole(q.element):()=>"treeitem",isChecked:P.accessibilityProvider.isChecked?q=>{var Ae;return!!((Ae=P.accessibilityProvider)===null||Ae===void 0?void 0:Ae.isChecked(q.element))}:void 0,getAriaLabel(q){return P.accessibilityProvider.getAriaLabel(q.element)},getWidgetAriaLabel(){return P.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:P.accessibilityProvider.getWidgetRole?()=>P.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:P.accessibilityProvider.getAriaLevel&&(q=>P.accessibilityProvider.getAriaLevel(q.element)),getActiveDescendantId:P.accessibilityProvider.getActiveDescendantId&&(q=>P.accessibilityProvider.getActiveDescendantId(q.element))}),filter:P.filter&&{filter(q,Ae){return P.filter.filter(q.element,Ae)}},keyboardNavigationLabelProvider:P.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},P.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(q){return P.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(q.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof P.expandOnlyOnTwistieClick=="undefined"?void 0:typeof P.expandOnlyOnTwistieClick!="function"?P.expandOnlyOnTwistieClick:q=>P.expandOnlyOnTwistieClick(q.element),additionalScrollHeight:P.additionalScrollHeight})}function wo(P,q){q(P),P.children.forEach(Ae=>wo(Ae,q))}class No{constructor(P,q,Ae,Ge,ft,Dt={}){this.user=P,this.dataSource=ft,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new N.b,this._onDidChangeNodeSlowState=new N.b,this.nodeMapper=new k(jt=>new Ye(jt)),this.disposables=new A.b,this.identityProvider=Dt.identityProvider,this.autoExpandSingleChildren=typeof Dt.autoExpandSingleChildren=="undefined"?!1:Dt.autoExpandSingleChildren,this.sorter=Dt.sorter,this.collapseByDefault=Dt.collapseByDefault,this.tree=this.createTree(P,q,Ae,Ge,Dt),this.root=Ue({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 N.c.map(this.tree.onDidChangeFocus,ct)}get onDidChangeSelection(){return N.c.map(this.tree.onDidChangeSelection,ct)}get onMouseDblClick(){return N.c.map(this.tree.onMouseDblClick,_t)}get onPointer(){return N.c.map(this.tree.onPointer,_t)}get onDidFocus(){return this.tree.onDidFocus}get onDidDispose(){return this.tree.onDidDispose}createTree(P,q,Ae,Ge,ft){const Dt=new Pe(Ae),jt=Ge.map(uo=>new qe(uo,this.nodeMapper,this._onDidChangeNodeSlowState.event)),Xt=so(ft)||{};return new xo(P,q,Dt,jt,Xt)}updateOptions(P={}){this.tree.updateOptions(P)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(P){this.tree.scrollTop=P}domFocus(){this.tree.domFocus()}layout(P,q){this.tree.layout(P,q)}style(P){this.tree.style(P)}getInput(){return this.root.element}setInput(P,q){return Mt(this,void 0,void 0,function*(){this.refreshPromises.forEach(Ge=>Ge.cancel()),this.refreshPromises.clear(),this.root.element=P;const Ae=q&&{viewState:q,focus:[],selection:[]};yield this._updateChildren(P,!0,!1,Ae),Ae&&(this.tree.setFocus(Ae.focus),this.tree.setSelection(Ae.selection)),q&&typeof q.scrollTop=="number"&&(this.scrollTop=q.scrollTop)})}_updateChildren(P=this.root.element,q=!0,Ae=!1,Ge,ft){return Mt(this,void 0,void 0,function*(){if(typeof this.root.element=="undefined")throw new O(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield N.c.toPromise(this._onDidRender.event));const Dt=this.getDataNode(P);if(yield this.refreshAndRenderNode(Dt,q,Ge,ft),Ae)try{this.tree.rerender(Dt)}catch(jt){}})}rerender(P){if(P===void 0||P===this.root.element){this.tree.rerender();return}const q=this.getDataNode(P);this.tree.rerender(q)}collapse(P,q=!1){const Ae=this.getDataNode(P);return this.tree.collapse(Ae===this.root?null:Ae,q)}expand(P,q=!1){return Mt(this,void 0,void 0,function*(){if(typeof this.root.element=="undefined")throw new O(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield N.c.toPromise(this._onDidRender.event));const Ae=this.getDataNode(P);if(this.tree.hasElement(Ae)&&!this.tree.isCollapsible(Ae))return!1;if(Ae.refreshPromise&&(yield this.root.refreshPromise,yield N.c.toPromise(this._onDidRender.event)),Ae!==this.root&&!Ae.refreshPromise&&!this.tree.isCollapsed(Ae))return!1;const Ge=this.tree.expand(Ae===this.root?null:Ae,q);return Ae.refreshPromise&&(yield this.root.refreshPromise,yield N.c.toPromise(this._onDidRender.event)),Ge})}setSelection(P,q){const Ae=P.map(Ge=>this.getDataNode(Ge));this.tree.setSelection(Ae,q)}getSelection(){const P=this.tree.getSelection();return P.map(q=>q.element)}setFocus(P,q){const Ae=P.map(Ge=>this.getDataNode(Ge));this.tree.setFocus(Ae,q)}getFocus(){const P=this.tree.getFocus();return P.map(q=>q.element)}reveal(P,q){this.tree.reveal(this.getDataNode(P),q)}getDataNode(P){const q=this.nodes.get(P===this.root.element?null:P);if(!q)throw new O(this.user,`Data tree node not found: ${P}`);return q}refreshAndRenderNode(P,q,Ae,Ge){return Mt(this,void 0,void 0,function*(){yield this.refreshNode(P,q,Ae),this.render(P,Ae,Ge)})}refreshNode(P,q,Ae){return Mt(this,void 0,void 0,function*(){let Ge;return this.subTreeRefreshPromises.forEach((ft,Dt)=>{!Ge&&Ut(Dt,P)&&(Ge=ft.then(()=>this.refreshNode(P,q,Ae)))}),Ge||this.doRefreshSubTree(P,q,Ae)})}doRefreshSubTree(P,q,Ae){return Mt(this,void 0,void 0,function*(){let Ge;P.refreshPromise=new Promise(ft=>Ge=ft),this.subTreeRefreshPromises.set(P,P.refreshPromise),P.refreshPromise.finally(()=>{P.refreshPromise=void 0,this.subTreeRefreshPromises.delete(P)});try{const ft=yield this.doRefreshNode(P,q,Ae);P.stale=!1,yield U.d.settled(ft.map(Dt=>this.doRefreshSubTree(Dt,q,Ae)))}finally{Ge()}})}doRefreshNode(P,q,Ae){return Mt(this,void 0,void 0,function*(){P.hasChildren=!!this.dataSource.hasChildren(P.element);let Ge;if(!P.hasChildren)Ge=Promise.resolve(Q.a.empty());else{const ft=Object(U.n)(800);ft.then(()=>{P.slow=!0,this._onDidChangeNodeSlowState.fire(P)},Dt=>null),Ge=this.doGetChildren(P).finally(()=>ft.cancel())}try{const ft=yield Ge;return this.setChildren(P,ft,q,Ae)}catch(ft){if(P!==this.root&&this.tree.hasElement(P)&&this.tree.collapse(P),Object(Ht.e)(ft))return[];throw ft}finally{P.slow&&(P.slow=!1,this._onDidChangeNodeSlowState.fire(P))}})}doGetChildren(P){let q=this.refreshPromises.get(P);return q||(q=Object(U.h)(()=>Mt(this,void 0,void 0,function*(){const Ae=yield this.dataSource.getChildren(P.element);return this.processChildren(Ae)})),this.refreshPromises.set(P,q),q.finally(()=>{this.refreshPromises.delete(P)}))}_onDidChangeCollapseState({node:P,deep:q}){if(P.element===null)return;!P.collapsed&&P.element.stale&&(q?this.collapse(P.element.element):this.refreshAndRenderNode(P.element,!1).catch(Ht.f))}setChildren(P,q,Ae,Ge){const ft=[...q];if(P.children.length===0&&ft.length===0)return[];const Dt=new Map,jt=new Map;for(const io of P.children)if(Dt.set(io.element,io),this.identityProvider){const ho=this.tree.isCollapsed(io);jt.set(io.id,{node:io,collapsed:ho})}const Xt=[],uo=ft.map(io=>{const ho=!!this.dataSource.hasChildren(io);if(!this.identityProvider){const Oo=Ue({element:io,parent:P,hasChildren:ho});return ho&&this.collapseByDefault&&!this.collapseByDefault(io)&&(Oo.collapsedByDefault=!1,Xt.push(Oo)),Oo}const mo=this.identityProvider.getId(io).toString(),Io=jt.get(mo);if(Io){const Oo=Io.node;return Dt.delete(Oo.element),this.nodes.delete(Oo.element),this.nodes.set(io,Oo),Oo.element=io,Oo.hasChildren=ho,Ae?Io.collapsed?(Oo.children.forEach(Wo=>wo(Wo,si=>this.nodes.delete(si.element))),Oo.children.splice(0,Oo.children.length),Oo.stale=!0):Xt.push(Oo):ho&&this.collapseByDefault&&!this.collapseByDefault(io)&&(Oo.collapsedByDefault=!1,Xt.push(Oo)),Oo}const Ao=Ue({element:io,parent:P,id:mo,hasChildren:ho});return Ge&&Ge.viewState.focus&&Ge.viewState.focus.indexOf(mo)>-1&&Ge.focus.push(Ao),Ge&&Ge.viewState.selection&&Ge.viewState.selection.indexOf(mo)>-1&&Ge.selection.push(Ao),Ge&&Ge.viewState.expanded&&Ge.viewState.expanded.indexOf(mo)>-1?Xt.push(Ao):ho&&this.collapseByDefault&&!this.collapseByDefault(io)&&(Ao.collapsedByDefault=!1,Xt.push(Ao)),Ao});for(const io of Dt.values())wo(io,ho=>this.nodes.delete(ho.element));for(const io of uo)this.nodes.set(io.element,io);return P.children.splice(0,P.children.length,...uo),P!==this.root&&this.autoExpandSingleChildren&&uo.length===1&&Xt.length===0&&(uo[0].collapsedByDefault=!1,Xt.push(uo[0])),Xt}render(P,q,Ae){const Ge=P.children.map(Dt=>this.asTreeElement(Dt,q)),ft=Ae&&Object.assign(Object.assign({},Ae),{diffIdentityProvider:Ae.diffIdentityProvider&&{getId(Dt){return Ae.diffIdentityProvider.getId(Dt.element)}}});this.tree.setChildren(P===this.root?null:P,Ge,ft),P!==this.root&&this.tree.setCollapsible(P,P.hasChildren),this._onDidRender.fire()}asTreeElement(P,q){if(P.stale)return{element:P,collapsible:P.hasChildren,collapsed:!0};let Ae;return q&&q.viewState.expanded&&P.id&&q.viewState.expanded.indexOf(P.id)>-1?Ae=!1:Ae=P.collapsedByDefault,P.collapsedByDefault=void 0,{element:P,children:P.hasChildren?Q.a.map(P.children,Ge=>this.asTreeElement(Ge,q)):[],collapsible:P.hasChildren,collapsed:Ae}}processChildren(P){return this.sorter&&(P=[...P].sort(this.sorter.compare.bind(this.sorter))),P}dispose(){this.disposables.dispose()}}class di{constructor(P){this.node=P}get element(){return{elements:this.node.element.elements.map(P=>P.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(P=>new di(P))}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 _o{constructor(P,q,Ae,Ge){this.renderer=P,this.nodeMapper=q,this.compressibleNodeMapperProvider=Ae,this.onDidChangeTwistieState=Ge,this.renderedNodes=new Map,this.disposables=[],this.templateId=P.templateId}renderTemplate(P){const q=this.renderer.renderTemplate(P);return{templateData:q}}renderElement(P,q,Ae,Ge){this.renderer.renderElement(this.nodeMapper.map(P),q,Ae.templateData,Ge)}renderCompressedElements(P,q,Ae,Ge){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(P),q,Ae.templateData,Ge)}renderTwistie(P,q){return P.slow?(q.classList.add(...ie.classNamesArray),!0):(q.classList.remove(...ie.classNamesArray),!1)}disposeElement(P,q,Ae,Ge){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(P),q,Ae.templateData,Ge)}disposeCompressedElements(P,q,Ae,Ge){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(P),q,Ae.templateData,Ge)}disposeTemplate(P){this.renderer.disposeTemplate(P.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=Object(A.f)(this.disposables)}}function no(P){const q=P&&so(P);return q&&Object.assign(Object.assign({},q),{keyboardNavigationLabelProvider:q.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},q.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(Ae){return P.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(Ae.map(Ge=>Ge.element))}})})}class Lt extends No{constructor(P,q,Ae,Ge,ft,Dt,jt={}){super(P,q,Ae,ft,Dt,jt);this.compressionDelegate=Ge,this.compressibleNodeMapper=new k(Xt=>new di(Xt)),this.filter=jt.filter}createTree(P,q,Ae,Ge,ft){const Dt=new Pe(Ae),jt=Ge.map(uo=>new _o(uo,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),Xt=no(ft)||{};return new To(P,q,Dt,jt,Xt)}asTreeElement(P,q){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(P.element)},super.asTreeElement(P,q))}updateOptions(P={}){this.tree.updateOptions(P)}render(P,q){if(!this.identityProvider)return super.render(P,q);const Ae=mo=>this.identityProvider.getId(mo).toString(),Ge=mo=>{const Io=new Set;for(const Ao of mo){const Oo=this.tree.getCompressedTreeNode(Ao===this.root?null:Ao);if(!Oo.element)continue;for(const Wo of Oo.element.elements)Io.add(Ae(Wo.element))}return Io},ft=Ge(this.tree.getSelection()),Dt=Ge(this.tree.getFocus());super.render(P,q);const jt=this.getSelection();let Xt=!1;const uo=this.getFocus();let io=!1;const ho=mo=>{const Io=mo.element;if(Io)for(let Ao=0;Ao<Io.elements.length;Ao++){const Oo=Ae(Io.elements[Ao].element),Wo=Io.elements[Io.elements.length-1].element;ft.has(Oo)&&jt.indexOf(Wo)===-1&&(jt.push(Wo),Xt=!0),Dt.has(Oo)&&uo.indexOf(Wo)===-1&&(uo.push(Wo),io=!0)}mo.children.forEach(ho)};ho(this.tree.getCompressedTreeNode(P===this.root?null:P)),Xt&&this.setSelection(jt),io&&this.setFocus(uo)}processChildren(P){return this.filter&&(P=Q.a.filter(P,q=>{const Ae=this.filter.filter(q,1),Ge=xt(Ae);if(Ge===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return Ge===1})),super.processChildren(P)}}function xt(P){return typeof P=="boolean"?P?1:0:H(P)?Z(P.visibility):Z(P)}class Nt extends nt{constructor(P,q,Ae,Ge,ft,Dt={}){super(P,q,Ae,Ge,Dt);this.user=P,this.dataSource=ft,this.identityProvider=Dt.identityProvider}createModel(P,q,Ae){return new Ke(P,q,Ae)}}var rt=t("R3nR"),lt=t("+7oY"),pt=t("CRAX"),St=t("T8No"),Qt=t("FmXZ"),bo=t("Cg/j"),qt=t("bexQ"),Eo=t("ic2d"),Ro=t("ptcw"),zo=t("t9D7"),Bo=function(P,q,Ae,Ge){var ft=arguments.length,Dt=ft<3?q:Ge===null?Ge=Object.getOwnPropertyDescriptor(q,Ae):Ge,jt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Dt=Reflect.decorate(P,q,Ae,Ge);else for(var Xt=P.length-1;Xt>=0;Xt--)(jt=P[Xt])&&(Dt=(ft<3?jt(Dt):ft>3?jt(q,Ae,Dt):jt(q,Ae))||Dt);return ft>3&&Dt&&Object.defineProperty(q,Ae,Dt),Dt},Jt=function(P,q){return function(Ae,Ge){q(Ae,Ge,P)}};const fo=Object(bo.c)("listService");let ri=class{constructor(q){this._themeService=q,this.disposables=new A.b,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}register(q,Ae){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const ft=new I.b(Object(f.w)(),"");this.disposables.add(Object(Ro.b)(ft,this._themeService))}if(this.lists.some(ft=>ft.widget===q))throw new Error("Cannot register the same widget multiple times");const Ge={widget:q,extraContextKeys:Ae};return this.lists.push(Ge),q.getHTMLElement()===document.activeElement&&(this._lastFocusedWidget=q),Object(A.e)(q.onDidFocus(()=>this._lastFocusedWidget=q),Object(A.i)(()=>this.lists.splice(this.lists.indexOf(Ge),1)),q.onDidDispose(()=>{this.lists=this.lists.filter(ft=>ft!==Ge),this._lastFocusedWidget===q&&(this._lastFocusedWidget=void 0)}))}dispose(){this.disposables.dispose()}};ri=Bo([Jt(0,zo.b)],ri);const Zo=new St.c("listFocus",!0),ci=new St.c("listSupportsMultiselect",!0),ki=St.a.and(Zo,St.a.not(Qt.a)),wi=new St.c("listHasSelectionOrFocus",!1),Zi=new St.c("listDoubleSelection",!1),Vi=new St.c("listMultiSelection",!1),vi=new St.c("listSelectionNavigation",!1),sn="listAutomaticKeyboardNavigation";function en(P,q){const Ae=P.createScoped(q.getHTMLElement());return Zo.bindTo(Ae),Ae}const on="workbench.list.multiSelectModifier",cn="workbench.list.openMode",Bi="workbench.list.horizontalScrolling",zi="workbench.list.keyboardNavigation",Ji="workbench.list.automaticKeyboardNavigation",ui="workbench.tree.indent",pn="workbench.tree.renderIndentGuides",Hi="workbench.list.smoothScrolling",Oi="workbench.list.mouseWheelScrollSensitivity",Ii="workbench.list.fastScrollSensitivity",Qi="workbench.tree.expandMode";function Li(P){return P.getValue(on)==="alt"}class Ui extends A.a{constructor(P){super();this.configurationService=P,this.useAltAsMultipleSelectionModifier=Li(P),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(P=>{P.affectsConfiguration(on)&&(this.useAltAsMultipleSelectionModifier=Li(this.configurationService))}))}isSelectionSingleChangeEvent(P){return this.useAltAsMultipleSelectionModifier?P.browserEvent.altKey:Object(I.h)(P)}isSelectionRangeChangeEvent(P){return Object(I.g)(P)}}function fi(P,q,Ae){var Ge;const ft=new A.b,Dt=Object.assign(Object.assign({},P),{keyboardNavigationDelegate:{mightProducePrintableCharacter(jt){return Ae.mightProducePrintableCharacter(jt)}},smoothScrolling:Boolean(q.getValue(Hi)),mouseWheelScrollSensitivity:q.getValue(Oi),fastScrollSensitivity:q.getValue(Ii),multipleSelectionController:(Ge=P.multipleSelectionController)!==null&&Ge!==void 0?Ge:ft.add(new Ui(q))});return[Dt,ft]}let $i=class extends I.c{constructor(q,Ae,Ge,ft,Dt,jt,Xt,uo,io,ho){const mo=typeof Dt.horizontalScrolling!="undefined"?Dt.horizontalScrolling:Boolean(io.getValue(Bi)),[Io,Ao]=fi(Dt,io,ho);super(q,Ae,Ge,ft,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Object(Ro.d)(uo.getColorTheme(),Ro.e)),Io),{horizontalScrolling:mo}));this.disposables.add(Ao),this.contextKeyService=en(jt,this),this.themeService=uo,this.listSupportsMultiSelect=ci.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Dt.multipleSelectionSupport!==!1);const Oo=vi.bindTo(this.contextKeyService);Oo.set(Boolean(Dt.selectionNavigation)),this.listHasSelectionOrFocus=wi.bindTo(this.contextKeyService),this.listDoubleSelection=Zi.bindTo(this.contextKeyService),this.listMultiSelection=Vi.bindTo(this.contextKeyService),this.horizontalScrolling=Dt.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Li(io),this.disposables.add(this.contextKeyService),this.disposables.add(Xt.register(this)),Dt.overrideStyles&&this.updateStyles(Dt.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const Wo=this.getSelection(),si=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(Wo.length>0||si.length>0),this.listMultiSelection.set(Wo.length>1),this.listDoubleSelection.set(Wo.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const Wo=this.getSelection(),si=this.getFocus();this.listHasSelectionOrFocus.set(Wo.length>0||si.length>0)})),this.disposables.add(io.onDidChangeConfiguration(Wo=>{Wo.affectsConfiguration(on)&&(this._useAltAsMultipleSelectionModifier=Li(io));let si={};if(Wo.affectsConfiguration(Bi)&&this.horizontalScrolling===void 0){const hi=Boolean(io.getValue(Bi));si=Object.assign(Object.assign({},si),{horizontalScrolling:hi})}if(Wo.affectsConfiguration(Hi)){const hi=Boolean(io.getValue(Hi));si=Object.assign(Object.assign({},si),{smoothScrolling:hi})}if(Wo.affectsConfiguration(Oi)){const hi=io.getValue(Oi);si=Object.assign(Object.assign({},si),{mouseWheelScrollSensitivity:hi})}if(Wo.affectsConfiguration(Ii)){const hi=io.getValue(Ii);si=Object.assign(Object.assign({},si),{fastScrollSensitivity:hi})}Object.keys(si).length>0&&this.updateOptions(si)})),this.navigator=new ht(this,Object.assign({configurationService:io},Dt)),this.disposables.add(this.navigator)}updateOptions(q){super.updateOptions(q),q.overrideStyles&&this.updateStyles(q.overrideStyles),q.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!q.multipleSelectionSupport)}updateStyles(q){var Ae;(Ae=this._styler)===null||Ae===void 0||Ae.dispose(),this._styler=Object(Ro.b)(this,this.themeService,q)}dispose(){var q;(q=this._styler)===null||q===void 0||q.dispose(),super.dispose()}};$i=Bo([Jt(5,St.b),Jt(6,fo),Jt(7,zo.b),Jt(8,lt.a),Jt(9,qt.a)],$i);let rn=class extends d{constructor(q,Ae,Ge,ft,Dt,jt,Xt,uo,io,ho){const mo=typeof Dt.horizontalScrolling!="undefined"?Dt.horizontalScrolling:Boolean(io.getValue(Bi)),[Io,Ao]=fi(Dt,io,ho);super(q,Ae,Ge,ft,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Object(Ro.d)(uo.getColorTheme(),Ro.e)),Io),{horizontalScrolling:mo}));this.disposables=new A.b,this.disposables.add(Ao),this.contextKeyService=en(jt,this),this.themeService=uo,this.horizontalScrolling=Dt.horizontalScrolling,this.listSupportsMultiSelect=ci.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Dt.multipleSelectionSupport!==!1);const Oo=vi.bindTo(this.contextKeyService);Oo.set(Boolean(Dt.selectionNavigation)),this._useAltAsMultipleSelectionModifier=Li(io),this.disposables.add(this.contextKeyService),this.disposables.add(Xt.register(this)),Dt.overrideStyles&&this.updateStyles(Dt.overrideStyles),Dt.overrideStyles&&this.disposables.add(Object(Ro.b)(this,uo,Dt.overrideStyles)),this.disposables.add(io.onDidChangeConfiguration(Wo=>{Wo.affectsConfiguration(on)&&(this._useAltAsMultipleSelectionModifier=Li(io));let si={};if(Wo.affectsConfiguration(Bi)&&this.horizontalScrolling===void 0){const hi=Boolean(io.getValue(Bi));si=Object.assign(Object.assign({},si),{horizontalScrolling:hi})}if(Wo.affectsConfiguration(Hi)){const hi=Boolean(io.getValue(Hi));si=Object.assign(Object.assign({},si),{smoothScrolling:hi})}if(Wo.affectsConfiguration(Oi)){const hi=io.getValue(Oi);si=Object.assign(Object.assign({},si),{mouseWheelScrollSensitivity:hi})}if(Wo.affectsConfiguration(Ii)){const hi=io.getValue(Ii);si=Object.assign(Object.assign({},si),{fastScrollSensitivity:hi})}Object.keys(si).length>0&&this.updateOptions(si)})),this.navigator=new ht(this,Object.assign({configurationService:io},Dt)),this.disposables.add(this.navigator)}updateOptions(q){super.updateOptions(q),q.overrideStyles&&this.updateStyles(q.overrideStyles),q.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!q.multipleSelectionSupport)}updateStyles(q){var Ae;(Ae=this._styler)===null||Ae===void 0||Ae.dispose(),this._styler=Object(Ro.b)(this,this.themeService,q)}dispose(){var q;(q=this._styler)===null||q===void 0||q.dispose(),this.disposables.dispose(),super.dispose()}};rn=Bo([Jt(5,St.b),Jt(6,fo),Jt(7,zo.b),Jt(8,lt.a),Jt(9,qt.a)],rn);let _i=class extends h{constructor(q,Ae,Ge,ft,Dt,jt,Xt,uo,io,ho,mo){const Io=typeof jt.horizontalScrolling!="undefined"?jt.horizontalScrolling:Boolean(ho.getValue(Bi)),[Ao,Oo]=fi(jt,ho,mo);super(q,Ae,Ge,ft,Dt,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Object(Ro.d)(io.getColorTheme(),Ro.e)),Ao),{horizontalScrolling:Io}));this.disposables=new A.b,this.disposables.add(Oo),this.contextKeyService=en(Xt,this),this.themeService=io,this.listSupportsMultiSelect=ci.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(jt.multipleSelectionSupport!==!1);const Wo=vi.bindTo(this.contextKeyService);Wo.set(Boolean(jt.selectionNavigation)),this.listHasSelectionOrFocus=wi.bindTo(this.contextKeyService),this.listDoubleSelection=Zi.bindTo(this.contextKeyService),this.listMultiSelection=Vi.bindTo(this.contextKeyService),this.horizontalScrolling=jt.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Li(ho),this.disposables.add(this.contextKeyService),this.disposables.add(uo.register(this)),jt.overrideStyles&&this.updateStyles(jt.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const si=this.getSelection(),hi=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(si.length>0||hi.length>0),this.listMultiSelection.set(si.length>1),this.listDoubleSelection.set(si.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const si=this.getSelection(),hi=this.getFocus();this.listHasSelectionOrFocus.set(si.length>0||hi.length>0)})),this.disposables.add(ho.onDidChangeConfiguration(si=>{si.affectsConfiguration(on)&&(this._useAltAsMultipleSelectionModifier=Li(ho));let hi={};if(si.affectsConfiguration(Bi)&&this.horizontalScrolling===void 0){const Uo=Boolean(ho.getValue(Bi));hi=Object.assign(Object.assign({},hi),{horizontalScrolling:Uo})}if(si.affectsConfiguration(Hi)){const Uo=Boolean(ho.getValue(Hi));hi=Object.assign(Object.assign({},hi),{smoothScrolling:Uo})}if(si.affectsConfiguration(Oi)){const Uo=ho.getValue(Oi);hi=Object.assign(Object.assign({},hi),{mouseWheelScrollSensitivity:Uo})}if(si.affectsConfiguration(Ii)){const Uo=ho.getValue(Ii);hi=Object.assign(Object.assign({},hi),{fastScrollSensitivity:Uo})}Object.keys(hi).length>0&&this.updateOptions(hi)})),this.navigator=new Ve(this,Object.assign({configurationService:ho},jt)),this.disposables.add(this.navigator)}updateOptions(q){super.updateOptions(q),q.overrideStyles&&this.updateStyles(q.overrideStyles),q.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!q.multipleSelectionSupport)}updateStyles(q){var Ae;(Ae=this._styler)===null||Ae===void 0||Ae.dispose(),this._styler=Object(Ro.b)(this,this.themeService,q)}dispose(){var q;(q=this._styler)===null||q===void 0||q.dispose(),this.disposables.dispose(),super.dispose()}};_i=Bo([Jt(6,St.b),Jt(7,fo),Jt(8,zo.b),Jt(9,lt.a),Jt(10,qt.a)],_i);class Pi extends A.a{constructor(P,q){var Ae;super();this.widget=P,this._onDidOpen=this._register(new N.b),this.onDidOpen=this._onDidOpen.event,this._register(N.c.filter(this.widget.onDidChangeSelection,Ge=>Ge.browserEvent instanceof KeyboardEvent)(Ge=>this.onSelectionFromKeyboard(Ge))),this._register(this.widget.onPointer(Ge=>this.onPointer(Ge.element,Ge.browserEvent))),this._register(this.widget.onMouseDblClick(Ge=>this.onMouseDblClick(Ge.element,Ge.browserEvent))),typeof(q==null?void 0:q.openOnSingleClick)!="boolean"&&(q==null?void 0:q.configurationService)?(this.openOnSingleClick=(q==null?void 0:q.configurationService.getValue(cn))!=="doubleClick",this._register(q==null?void 0:q.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=(q==null?void 0:q.configurationService.getValue(cn))!=="doubleClick"}))):this.openOnSingleClick=(Ae=q==null?void 0:q.openOnSingleClick)!==null&&Ae!==void 0?Ae:!0}onSelectionFromKeyboard(P){if(P.elements.length!==1)return;const q=P.browserEvent,Ae=typeof q.preserveFocus=="boolean"?q.preserveFocus:!0,Ge=typeof q.pinned=="boolean"?q.pinned:!Ae,ft=!1;this._open(this.getSelectedElement(),Ae,Ge,ft,P.browserEvent)}onPointer(P,q){if(!this.openOnSingleClick)return;const Ae=q.detail===2;if(Ae)return;const Ge=q.button===1,ft=!0,Dt=Ge,jt=q.ctrlKey||q.metaKey||q.altKey;this._open(P,ft,Dt,jt,q)}onMouseDblClick(P,q){if(!q)return;const Ae=q.target,Ge=Ae.classList.contains("monaco-tl-twistie")||Ae.classList.contains("monaco-icon-label")&&Ae.classList.contains("folder-icon")&&q.offsetX<16;if(Ge)return;const ft=!1,Dt=!0,jt=q.ctrlKey||q.metaKey||q.altKey;this._open(P,ft,Dt,jt,q)}_open(P,q,Ae,Ge,ft){if(!P)return;this._onDidOpen.fire({editorOptions:{preserveFocus:q,pinned:Ae,revealIfVisible:!0},sideBySide:Ge,element:P,browserEvent:ft})}}class ht extends Pi{constructor(P,q){super(P,q);this.widget=P}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Ve extends Pi{constructor(P,q){super(P,q)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class K extends Pi{constructor(P,q){super(P,q)}getSelectedElement(){var P;return(P=this.widget.getSelection()[0])!==null&&P!==void 0?P:void 0}}function be(P,q){let Ae=!1;return Ge=>{if(Ae)return Ae=!1,!1;const ft=q.softDispatch(Ge,P);return ft&&ft.enterChord?(Ae=!0,!1):(Ae=!1,!0)}}let Re=class extends xo{constructor(q,Ae,Ge,ft,Dt,jt,Xt,uo,io,ho,mo){const{options:Io,getAutomaticKeyboardNavigation:Ao,disposable:Oo}=Bt(Ae,Dt,jt,io,ho,mo);super(q,Ae,Ge,ft,Io);this.disposables.add(Oo),this.internals=new zt(this,Dt,Ao,Dt.overrideStyles,jt,Xt,uo,io,mo),this.disposables.add(this.internals)}updateOptions(q){super.updateOptions(q),this.internals.updateOptions(q)}};Re=Bo([Jt(5,St.b),Jt(6,fo),Jt(7,zo.b),Jt(8,lt.a),Jt(9,qt.a),Jt(10,rt.b)],Re);let Be=class extends To{constructor(q,Ae,Ge,ft,Dt,jt,Xt,uo,io,ho,mo){const{options:Io,getAutomaticKeyboardNavigation:Ao,disposable:Oo}=Bt(Ae,Dt,jt,io,ho,mo);super(q,Ae,Ge,ft,Io);this.disposables.add(Oo),this.internals=new zt(this,Dt,Ao,Dt.overrideStyles,jt,Xt,uo,io,mo),this.disposables.add(this.internals)}updateOptions(q={}){super.updateOptions(q),q.overrideStyles&&this.internals.updateStyleOverrides(q.overrideStyles),this.internals.updateOptions(q)}};Be=Bo([Jt(5,St.b),Jt(6,fo),Jt(7,zo.b),Jt(8,lt.a),Jt(9,qt.a),Jt(10,rt.b)],Be);let at=class extends Nt{constructor(q,Ae,Ge,ft,Dt,jt,Xt,uo,io,ho,mo,Io){const{options:Ao,getAutomaticKeyboardNavigation:Oo,disposable:Wo}=Bt(Ae,jt,Xt,ho,mo,Io);super(q,Ae,Ge,ft,Dt,Ao);this.disposables.add(Wo),this.internals=new zt(this,jt,Oo,jt.overrideStyles,Xt,uo,io,ho,Io),this.disposables.add(this.internals)}updateOptions(q={}){super.updateOptions(q),q.overrideStyles&&this.internals.updateStyleOverrides(q.overrideStyles),this.internals.updateOptions(q)}};at=Bo([Jt(6,St.b),Jt(7,fo),Jt(8,zo.b),Jt(9,lt.a),Jt(10,qt.a),Jt(11,rt.b)],at);let vt=class extends No{constructor(q,Ae,Ge,ft,Dt,jt,Xt,uo,io,ho,mo,Io){const{options:Ao,getAutomaticKeyboardNavigation:Oo,disposable:Wo}=Bt(Ae,jt,Xt,ho,mo,Io);super(q,Ae,Ge,ft,Dt,Ao);this.disposables.add(Wo),this.internals=new zt(this,jt,Oo,jt.overrideStyles,Xt,uo,io,ho,Io),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(q={}){super.updateOptions(q),q.overrideStyles&&this.internals.updateStyleOverrides(q.overrideStyles),this.internals.updateOptions(q)}};vt=Bo([Jt(6,St.b),Jt(7,fo),Jt(8,zo.b),Jt(9,lt.a),Jt(10,qt.a),Jt(11,rt.b)],vt);let Gt=class extends Lt{constructor(q,Ae,Ge,ft,Dt,jt,Xt,uo,io,ho,mo,Io,Ao){const{options:Oo,getAutomaticKeyboardNavigation:Wo,disposable:si}=Bt(Ae,Xt,uo,mo,Io,Ao);super(q,Ae,Ge,ft,Dt,jt,Oo);this.disposables.add(si),this.internals=new zt(this,Xt,Wo,Xt.overrideStyles,uo,io,ho,mo,Ao),this.disposables.add(this.internals)}updateOptions(q){super.updateOptions(q),this.internals.updateOptions(q)}};Gt=Bo([Jt(7,St.b),Jt(8,fo),Jt(9,zo.b),Jt(10,lt.a),Jt(11,qt.a),Jt(12,rt.b)],Gt);function Bt(P,q,Ae,Ge,ft,Dt){var jt;const Xt=()=>{let Oo=Boolean(Ae.getContextKeyValue(sn));return Oo&&(Oo=Boolean(Ge.getValue(Ji))),Oo},uo=Dt.isScreenReaderOptimized(),io=q.simpleKeyboardNavigation||uo?"simple":Ge.getValue(zi),ho=q.horizontalScrolling!==void 0?q.horizontalScrolling:Boolean(Ge.getValue(Bi)),[mo,Io]=fi(q,Ge,ft),Ao=q.additionalScrollHeight;return{getAutomaticKeyboardNavigation:Xt,disposable:Io,options:Object.assign(Object.assign({keyboardSupport:!1},mo),{indent:typeof Ge.getValue(ui)=="number"?Ge.getValue(ui):void 0,renderIndentGuides:Ge.getValue(pn),smoothScrolling:Boolean(Ge.getValue(Hi)),automaticKeyboardNavigation:Xt(),simpleKeyboardNavigation:io==="simple",filterOnType:io==="filter",horizontalScrolling:ho,keyboardNavigationEventFilter:be(P,ft),additionalScrollHeight:Ao,hideTwistiesOfChildlessElements:q.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(jt=q.expandOnlyOnTwistieClick)!==null&&jt!==void 0?jt:Ge.getValue(Qi)==="doubleClick"})}}let zt=class{constructor(q,Ae,Ge,ft,Dt,jt,Xt,uo,io){this.tree=q,this.themeService=Xt,this.disposables=[],this.contextKeyService=en(Dt,q),this.listSupportsMultiSelect=ci.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Ae.multipleSelectionSupport!==!1);const ho=vi.bindTo(this.contextKeyService);ho.set(Boolean(Ae.selectionNavigation)),this.hasSelectionOrFocus=wi.bindTo(this.contextKeyService),this.hasDoubleSelection=Zi.bindTo(this.contextKeyService),this.hasMultiSelection=Vi.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=Li(uo);const mo=new Set;mo.add(sn);const Io=()=>{const Ao=io.isScreenReaderOptimized(),Oo=Ao?"simple":uo.getValue(zi);q.updateOptions({simpleKeyboardNavigation:Oo==="simple",filterOnType:Oo==="filter"})};this.updateStyleOverrides(ft),this.disposables.push(this.contextKeyService,jt.register(q),q.onDidChangeSelection(()=>{const Ao=q.getSelection(),Oo=q.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(Ao.length>0||Oo.length>0),this.hasMultiSelection.set(Ao.length>1),this.hasDoubleSelection.set(Ao.length===2)})}),q.onDidChangeFocus(()=>{const Ao=q.getSelection(),Oo=q.getFocus();this.hasSelectionOrFocus.set(Ao.length>0||Oo.length>0)}),uo.onDidChangeConfiguration(Ao=>{let Oo={};if(Ao.affectsConfiguration(on)&&(this._useAltAsMultipleSelectionModifier=Li(uo)),Ao.affectsConfiguration(ui)){const Wo=uo.getValue(ui);Oo=Object.assign(Object.assign({},Oo),{indent:Wo})}if(Ao.affectsConfiguration(pn)){const Wo=uo.getValue(pn);Oo=Object.assign(Object.assign({},Oo),{renderIndentGuides:Wo})}if(Ao.affectsConfiguration(Hi)){const Wo=Boolean(uo.getValue(Hi));Oo=Object.assign(Object.assign({},Oo),{smoothScrolling:Wo})}if(Ao.affectsConfiguration(zi)&&Io(),Ao.affectsConfiguration(Ji)&&(Oo=Object.assign(Object.assign({},Oo),{automaticKeyboardNavigation:Ge()})),Ao.affectsConfiguration(Bi)&&Ae.horizontalScrolling===void 0){const Wo=Boolean(uo.getValue(Bi));Oo=Object.assign(Object.assign({},Oo),{horizontalScrolling:Wo})}if(Ao.affectsConfiguration(Qi)&&Ae.expandOnlyOnTwistieClick===void 0&&(Oo=Object.assign(Object.assign({},Oo),{expandOnlyOnTwistieClick:uo.getValue(Qi)==="doubleClick"})),Ao.affectsConfiguration(Oi)){const Wo=uo.getValue(Oi);Oo=Object.assign(Object.assign({},Oo),{mouseWheelScrollSensitivity:Wo})}if(Ao.affectsConfiguration(Ii)){const Wo=uo.getValue(Ii);Oo=Object.assign(Object.assign({},Oo),{fastScrollSensitivity:Wo})}Object.keys(Oo).length>0&&q.updateOptions(Oo)}),this.contextKeyService.onDidChangeContext(Ao=>{Ao.affectsSome(mo)&&q.updateOptions({automaticKeyboardNavigation:Ge()})}),io.onDidChangeScreenReaderOptimized(()=>Io())),this.navigator=new K(q,Object.assign({configurationService:uo},Ae)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(q){q.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!q.multipleSelectionSupport)}updateStyleOverrides(q){Object(A.f)(this.styler),this.styler=q?Object(Ro.b)(this.tree,this.themeService,q):A.a.None}dispose(){this.disposables=Object(A.f)(this.disposables),Object(A.f)(this.styler),this.styler=void 0}};zt=Bo([Jt(4,St.b),Jt(5,fo),Jt(6,zo.b),Jt(7,lt.a),Jt(8,rt.b)],zt);const ro=Eo.a.as(pt.a.Configuration);ro.registerConfiguration({id:"workbench",order:7,title:Object(Le.a)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[on]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[Object(Le.a)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),Object(Le.a)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:Object(Le.a)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add 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.")},[cn]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:Object(Le.a)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"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.")},[Bi]:{type:"boolean",default:!1,description:Object(Le.a)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[ui]:{type:"number",default:8,minimum:0,maximum:40,description:Object(Le.a)("tree indent setting","Controls tree indentation in pixels.")},[pn]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:Object(Le.a)("render tree indent guides","Controls whether the tree should render indent guides.")},[Hi]:{type:"boolean",default:!1,description:Object(Le.a)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[Oi]:{type:"number",default:1,description:Object(Le.a)("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[Ii]:{type:"number",default:5,description:Object(Le.a)("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[zi]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[Object(Le.a)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),Object(Le.a)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),Object(Le.a)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:Object(Le.a)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[Ji]:{type:"boolean",default:!0,markdownDescription:Object(Le.a)("automatic keyboard navigation setting","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.")},[Qi]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:Object(Le.a)("expand mode","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.")}}})},kYye:function(mt,M,t){"use strict";t.d(M,"B",function(){return A}),t.d(M,"C",function(){return F}),t.d(M,"z",function(){return d}),t.d(M,"y",function(){return D}),t.d(M,"A",function(){return r}),t.d(M,"a",function(){return _}),t.d(M,"D",function(){return b}),t.d(M,"b",function(){return c}),t.d(M,"G",function(){return p}),t.d(M,"x",function(){return E}),t.d(M,"j",function(){return y}),t.d(M,"k",function(){return C}),t.d(M,"F",function(){return O}),t.d(M,"E",function(){return k}),t.d(M,"H",function(){return Q}),t.d(M,"I",function(){return H}),t.d(M,"J",function(){return Z}),t.d(M,"K",function(){return oe}),t.d(M,"N",function(){return te}),t.d(M,"L",function(){return ne}),t.d(M,"O",function(){return Ee}),t.d(M,"M",function(){return fe}),t.d(M,"c",function(){return ee}),t.d(M,"d",function(){return ie}),t.d(M,"e",function(){return U}),t.d(M,"f",function(){return G}),t.d(M,"g",function(){return J}),t.d(M,"h",function(){return he}),t.d(M,"i",function(){return xe}),t.d(M,"r",function(){return Ie}),t.d(M,"s",function(){return Le}),t.d(M,"t",function(){return Te}),t.d(M,"u",function(){return ze}),t.d(M,"v",function(){return ue}),t.d(M,"w",function(){return je}),t.d(M,"l",function(){return Pe}),t.d(M,"m",function(){return ve}),t.d(M,"n",function(){return ce}),t.d(M,"o",function(){return le}),t.d(M,"p",function(){return Ce}),t.d(M,"q",function(){return ye});var f=t("3/fG"),B=t("zrhQ"),x=t("MD5Z"),N=t("t9D7");const A=Object(x.wc)("editor.lineHighlightBackground",{dark:null,light:null,hc:null},f.a("lineHighlight","Background color for the highlight of line at the cursor position.")),F=Object(x.wc)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},f.a("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),I=Object(x.wc)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},f.a("rangeHighlight","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),L=Object(x.wc)("editor.rangeHighlightBorder",{dark:null,light:null,hc:x.b},f.a("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),v=Object(x.wc)("editor.symbolHighlightBackground",{dark:x.x,light:x.x,hc:null},f.a("symbolHighlight","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),m=Object(x.wc)("editor.symbolHighlightBorder",{dark:null,light:null,hc:x.b},f.a("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),d=Object(x.wc)("editorCursor.foreground",{dark:"#AEAFAD",light:B.a.black,hc:B.a.white},f.a("caret","Color of the editor cursor.")),D=Object(x.wc)("editorCursor.background",null,f.a("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),S=Object(x.wc)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},f.a("editorWhitespaces","Color of whitespace characters in the editor.")),r=Object(x.wc)("editorIndentGuide.background",{dark:S,light:S,hc:S},f.a("editorIndentGuides","Color of the editor indentation guides.")),_=Object(x.wc)("editorIndentGuide.activeBackground",{dark:S,light:S,hc:S},f.a("editorActiveIndentGuide","Color of the active editor indentation guides.")),b=Object(x.wc)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:B.a.white},f.a("editorLineNumbers","Color of editor line numbers.")),h=Object(x.wc)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:x.b},f.a("editorActiveLineNumber","Color of editor active line number"),!1,f.a("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),c=Object(x.wc)("editorLineNumber.activeForeground",{dark:h,light:h,hc:h},f.a("editorActiveLineNumber","Color of editor active line number")),p=Object(x.wc)("editorRuler.foreground",{dark:"#5A5A5A",light:B.a.lightgrey,hc:B.a.white},f.a("editorRuler","Color of the editor rulers.")),E=Object(x.wc)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},f.a("editorCodeLensForeground","Foreground color of editor CodeLens")),y=Object(x.wc)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},f.a("editorBracketMatchBackground","Background color behind matching brackets")),C=Object(x.wc)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:x.h},f.a("editorBracketMatchBorder","Color for matching brackets boxes")),O=Object(x.wc)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},f.a("editorOverviewRulerBorder","Color of the overview ruler border.")),k=Object(x.wc)("editorOverviewRuler.background",null,f.a("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),Y=Object(x.wc)("editorGutter.background",{dark:x.r,light:x.r,hc:x.r},f.a("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),Q=Object(x.wc)("editorUnnecessaryCode.border",{dark:null,light:null,hc:B.a.fromHex("#fff").transparent(.8)},f.a("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),H=Object(x.wc)("editorUnnecessaryCode.opacity",{dark:B.a.fromHex("#000a"),light:B.a.fromHex("#0007"),hc:null},f.a("unnecessaryCodeOpacity",`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.`)),Z=Object(x.wc)("editorGhostText.border",{dark:null,light:null,hc:B.a.fromHex("#fff").transparent(.8)},f.a("editorGhostTextBorder","Border color of ghost text in the editor.")),oe=Object(x.wc)("editorGhostText.foreground",{dark:B.a.fromHex("#ffffff56"),light:B.a.fromHex("#0007"),hc:null},f.a("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),$=new B.a(new B.c(0,122,204,.6)),te=Object(x.wc)("editorOverviewRuler.rangeHighlightForeground",{dark:$,light:$,hc:$},f.a("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),ne=Object(x.wc)("editorOverviewRuler.errorForeground",{dark:new B.a(new B.c(255,18,18,.7)),light:new B.a(new B.c(255,18,18,.7)),hc:new B.a(new B.c(255,50,50,1))},f.a("overviewRuleError","Overview ruler marker color for errors.")),Ee=Object(x.wc)("editorOverviewRuler.warningForeground",{dark:x.V,light:x.V,hc:x.U},f.a("overviewRuleWarning","Overview ruler marker color for warnings.")),fe=Object(x.wc)("editorOverviewRuler.infoForeground",{dark:x.M,light:x.M,hc:x.L},f.a("overviewRuleInfo","Overview ruler marker color for infos.")),ee=Object(x.wc)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hc:"#FFD700"},f.a("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),ie=Object(x.wc)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hc:"#DA70D6"},f.a("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),U=Object(x.wc)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hc:"#87CEFA"},f.a("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),G=Object(x.wc)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},f.a("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),J=Object(x.wc)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},f.a("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),he=Object(x.wc)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},f.a("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),xe=Object(x.wc)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new B.a(new B.c(255,18,18,.8)),light:new B.a(new B.c(255,18,18,.8)),hc:new B.a(new B.c(255,50,50,1))},f.a("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),Ie=Object(x.wc)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},f.a("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),Le=Object(x.wc)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},f.a("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),Te=Object(x.wc)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},f.a("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),ze=Object(x.wc)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},f.a("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),ue=Object(x.wc)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},f.a("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),je=Object(x.wc)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},f.a("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),Pe=Object(x.wc)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},f.a("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),ve=Object(x.wc)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},f.a("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),ce=Object(x.wc)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},f.a("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),le=Object(x.wc)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},f.a("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),Ce=Object(x.wc)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},f.a("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),ye=Object(x.wc)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},f.a("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));Object(N.f)((ge,Me)=>{const De=ge.getColor(x.r);De&&Me.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${De}; }`);const we=ge.getColor(x.B);we&&Me.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${we}; }`);const Oe=ge.getColor(Y);Oe&&Me.addRule(`.monaco-editor .margin { background-color: ${Oe}; }`);const nt=ge.getColor(I);nt&&Me.addRule(`.monaco-editor .rangeHighlight { background-color: ${nt}; }`);const Ke=ge.getColor(L);Ke&&Me.addRule(`.monaco-editor .rangeHighlight { border: 1px ${ge.type==="hc"?"dotted":"solid"} ${Ke}; }`);const et=ge.getColor(v);et&&Me.addRule(`.monaco-editor .symbolHighlight { background-color: ${et}; }`);const bt=ge.getColor(m);bt&&Me.addRule(`.monaco-editor .symbolHighlight { border: 1px ${ge.type==="hc"?"dotted":"solid"} ${bt}; }`);const Tt=ge.getColor(S);Tt&&(Me.addRule(`.monaco-editor .mtkw { color: ${Tt} !important; }`),Me.addRule(`.monaco-editor .mtkz { color: ${Tt} !important; }`))})},kdPm:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:function(){return t.e(321).then(t.bind(null,"3VBA"))}})},"kw+w":function(mt,M,t){},l2gE:function(mt,M,t){"use strict";t.d(M,"a",function(){return $}),t.d(M,"b",function(){return te});var f=t("X+cX"),B=t("PTeM"),x=t("QDVR"),N=t("MrjW"),A=t("N0LK");const F="**",I="/",L="[/\\\\]",v="[^/\\\\]",m=/\//g;function d(ie){switch(ie){case 0:return"";case 1:return`${v}*?`;default:return`(?:${L}|${v}+${L}|${L}${v}+)*?`}}function D(ie,U){if(!ie)return[];const G=[];let J=!1,he=!1,xe="";for(const Ie of ie){switch(Ie){case U:if(!J&&!he){G.push(xe),xe="";continue}break;case"{":J=!0;break;case"}":J=!1;break;case"[":he=!0;break;case"]":he=!1;break}xe+=Ie}return xe&&G.push(xe),G}function S(ie){if(!ie)return"";let U="";const G=D(ie,I);if(G.every(J=>J===F))U=".*";else{let J=!1;G.forEach((he,xe)=>{if(he===F){J||(U+=d(2),J=!0);return}let Ie=!1,Le="",Te=!1,ze="";for(const ue of he){if(ue!=="}"&&Ie){Le+=ue;continue}if(Te&&(ue!=="]"||!ze)){let je;ue==="-"?je=ue:(ue==="^"||ue==="!")&&!ze?je="^":ue===I?je="":je=A.t(ue),ze+=je;continue}switch(ue){case"{":Ie=!0;continue;case"[":Te=!0;continue;case"}":const je=D(Le,","),Pe=`(?:${je.map(ve=>S(ve)).join("|")})`;U+=Pe,Ie=!1,Le="";break;case"]":U+="["+ze+"]",Te=!1,ze="";break;case"?":U+=v;continue;case"*":U+=d(1);continue;default:U+=A.t(ue)}}xe<G.length-1&&(G[xe+1]!==F||xe+2<G.length)&&(U+=L),J=!1})}return U}const r=/^\*\*\/\*\.[\w\.-]+$/,_=/^\*\*\/([\w\.-]+)\/?$/,b=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,h=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,c=/^\*\*((\/[\w\.-]+)+)\/?$/,p=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,E=new x.a(1e4),y=function(){return!1},C=function(){return null};function O(ie,U){if(!ie)return C;let G;typeof ie!="string"?G=ie.pattern:G=ie,G=G.trim();const J=`${G}_${!!U.trimForExclusions}`;let he=E.get(J);if(he)return k(he,ie);let xe;if(r.test(G)){const Ie=G.substr(4);he=function(Le,Te){return typeof Le=="string"&&Le.endsWith(Ie)?G:null}}else(xe=_.exec(Y(G,U)))?he=Q(xe[1],G):(U.trimForExclusions?h:b).test(G)?he=H(G,U):(xe=c.exec(Y(G,U)))?he=Z(xe[1].substr(1),G,!0):(xe=p.exec(Y(G,U)))?he=Z(xe[1],G,!1):he=oe(G);return E.set(J,he),k(he,ie)}function k(ie,U){return typeof U=="string"?ie:function(G,J){return B.b(G,U.base)?ie(N.f(U.base,G),J):null}}function Y(ie,U){return U.trimForExclusions&&ie.endsWith("/**")?ie.substr(0,ie.length-2):ie}function Q(ie,U){const G=`/${ie}`,J=`\\${ie}`,he=function(Ie,Le){return typeof Ie!="string"?null:Le?Le===ie?U:null:Ie===ie||Ie.endsWith(G)||Ie.endsWith(J)?U:null},xe=[ie];return he.basenames=xe,he.patterns=[U],he.allBasenames=xe,he}function H(ie,U){const G=ee(ie.slice(1,-1).split(",").map(Le=>O(Le,U)).filter(Le=>Le!==C),ie),J=G.length;if(!J)return C;if(J===1)return G[0];const he=function(Le,Te){for(let ze=0,ue=G.length;ze<ue;ze++)if(G[ze](Le,Te))return ie;return null},xe=G.find(Le=>!!Le.allBasenames);xe&&(he.allBasenames=xe.allBasenames);const Ie=G.reduce((Le,Te)=>Te.allPaths?Le.concat(Te.allPaths):Le,[]);return Ie.length&&(he.allPaths=Ie),he}function Z(ie,U,G){const J=N.h===N.e.sep,he=J?ie:ie.replace(m,N.h),xe=N.h+he,Ie=N.e.sep+ie,Le=G?function(Te,ze){return typeof Te=="string"&&(Te===he||Te.endsWith(xe)||!J&&(Te===ie||Te.endsWith(Ie)))?U:null}:function(Te,ze){return typeof Te=="string"&&(Te===he||!J&&Te===ie)?U:null};return Le.allPaths=[(G?"*/":"./")+ie],Le}function oe(ie){try{const U=new RegExp(`^${S(ie)}$`);return function(G){return U.lastIndex=0,typeof G=="string"&&U.test(G)?ie:null}}catch(U){return C}}function $(ie,U,G){return!ie||typeof U!="string"?!1:te(ie)(U,void 0,G)}function te(ie,U={}){if(!ie)return y;if(typeof ie=="string"||ne(ie)){const G=O(ie,U);if(G===C)return y;const J=function(he,xe){return!!G(he,xe)};return G.allBasenames&&(J.allBasenames=G.allBasenames),G.allPaths&&(J.allPaths=G.allPaths),J}return Ee(ie,U)}function ne(ie){const U=ie;return U&&typeof U.base=="string"&&typeof U.pattern=="string"}function Ee(ie,U){const G=ee(Object.getOwnPropertyNames(ie).map(Le=>fe(Le,ie[Le],U)).filter(Le=>Le!==C)),J=G.length;if(!J)return C;if(!G.some(Le=>!!Le.requiresSiblings)){if(J===1)return G[0];const Le=function(ue,je){for(let Pe=0,ve=G.length;Pe<ve;Pe++){const ce=G[Pe](ue,je);if(ce)return ce}return null},Te=G.find(ue=>!!ue.allBasenames);Te&&(Le.allBasenames=Te.allBasenames);const ze=G.reduce((ue,je)=>je.allPaths?ue.concat(je.allPaths):ue,[]);return ze.length&&(Le.allPaths=ze),Le}const he=function(Le,Te,ze){let ue;for(let je=0,Pe=G.length;je<Pe;je++){const ve=G[je];ve.requiresSiblings&&ze&&(Te||(Te=N.a(Le)),ue||(ue=Te.substr(0,Te.length-N.c(Le).length)));const ce=ve(Le,Te,ue,ze);if(ce)return ce}return null},xe=G.find(Le=>!!Le.allBasenames);xe&&(he.allBasenames=xe.allBasenames);const Ie=G.reduce((Le,Te)=>Te.allPaths?Le.concat(Te.allPaths):Le,[]);return Ie.length&&(he.allPaths=Ie),he}function fe(ie,U,G){if(U===!1)return C;const J=O(ie,G);if(J===C)return C;if(typeof U=="boolean")return J;if(U){const he=U.when;if(typeof he=="string"){const xe=(Ie,Le,Te,ze)=>{if(!ze||!J(Ie,Le))return null;const ue=he.replace("$(basename)",Te),je=ze(ue);return Object(f.k)(je)?je.then(Pe=>Pe?ie:null):je?ie:null};return xe.requiresSiblings=!0,xe}}return J}function ee(ie,U){const G=ie.filter(Le=>!!Le.basenames);if(G.length<2)return ie;const J=G.reduce((Le,Te)=>{const ze=Te.basenames;return ze?Le.concat(ze):Le},[]);let he;if(U){he=[];for(let Le=0,Te=J.length;Le<Te;Le++)he.push(U)}else he=G.reduce((Le,Te)=>{const ze=Te.patterns;return ze?Le.concat(ze):Le},[]);const xe=function(Le,Te){if(typeof Le!="string")return null;if(!Te){let ue;for(ue=Le.length;ue>0;ue--){const je=Le.charCodeAt(ue-1);if(je===47||je===92)break}Te=Le.substr(ue)}const ze=J.indexOf(Te);return ze!==-1?he[ze]:null};xe.basenames=J,xe.patterns=he,xe.allBasenames=J;const Ie=ie.filter(Le=>!Le.basenames);return Ie.push(xe),Ie}},lKfe:function(mt,M,t){},"lY/7":function(mt,M,t){"use strict";t.r(M),t.d(M,"MarkerController",function(){return we}),t.d(M,"NextMarkerAction",function(){return nt});var f=t("Vhoy"),B=t("pmY6"),x=t("sswD"),N=t("Vxe3"),A=t("cGHE"),F=t("aokT"),I=t("wQH0"),L=t("6OMU"),v=t("MI8n"),m=t("24hK"),d=t("N0LK"),D=t("bY76"),S=t("9fML"),r=t("Cg/j"),_=t("tADe"),b=function(Xe,it,re,We){var tt=arguments.length,Et=tt<3?it:We===null?We=Object.getOwnPropertyDescriptor(it,re):We,It;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Et=Reflect.decorate(Xe,it,re,We);else for(var Rt=Xe.length-1;Rt>=0;Rt--)(It=Xe[Rt])&&(Et=(tt<3?It(Et):tt>3?It(it,re,Et):It(it,re))||Et);return tt>3&&Et&&Object.defineProperty(it,re,Et),Et},h=function(Xe,it){return function(re,We){it(re,We,Xe)}};class c{constructor(Xe,it,re){this.marker=Xe,this.index=it,this.total=re}}let p=class Xe{constructor(it,re){this._markerService=re,this._onDidChange=new v.b,this.onDidChange=this._onDidChange.event,this._dispoables=new B.b,this._markers=[],this._nextIdx=-1,D.a.isUri(it)?this._resourceFilter=tt=>tt.toString()===it.toString():it&&(this._resourceFilter=it);const We=()=>{this._markers=this._markerService.read({resource:D.a.isUri(it)?it:void 0,severities:_.c.Error|_.c.Warning|_.c.Info}),typeof it=="function"&&(this._markers=this._markers.filter(tt=>this._resourceFilter(tt.resource))),this._markers.sort(Xe._compareMarker)};We(),this._dispoables.add(re.onMarkerChanged(tt=>{(!this._resourceFilter||tt.some(Et=>this._resourceFilter(Et)))&&(We(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(it){return!this._resourceFilter&&!it?!0:!this._resourceFilter||!it?!1:this._resourceFilter(it)}get selected(){const it=this._markers[this._nextIdx];return it&&new c(it,this._nextIdx+1,this._markers.length)}_initIdx(it,re,We){let tt=!1,Et=this._markers.findIndex(It=>It.resource.toString()===it.uri.toString());Et<0&&(Et=Object(L.d)(this._markers,{resource:it.uri},(It,Rt)=>Object(d.f)(It.resource.toString(),Rt.resource.toString())),Et<0&&(Et=~Et));for(let It=Et;It<this._markers.length;It++){let Rt=F.a.lift(this._markers[It]);if(Rt.isEmpty()){const vo=it.getWordAtPosition(Rt.getStartPosition());vo&&(Rt=new F.a(Rt.startLineNumber,vo.startColumn,Rt.startLineNumber,vo.endColumn))}if(re&&(Rt.containsPosition(re)||re.isBeforeOrEqual(Rt.getStartPosition()))){this._nextIdx=It,tt=!0;break}if(this._markers[It].resource.toString()!==it.uri.toString())break}tt||(this._nextIdx=We?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(it,re,We){if(this._markers.length===0)return!1;let tt=this._nextIdx;return this._nextIdx===-1?this._initIdx(re,We,it):it?this._nextIdx=(this._nextIdx+1)%this._markers.length:it||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),tt!==this._nextIdx}find(it,re){let We=this._markers.findIndex(tt=>tt.resource.toString()===it.toString());if(We<0)return;for(;We<this._markers.length;We++)if(F.a.containsPosition(this._markers[We],re))return new c(this._markers[We],We+1,this._markers.length);return}static _compareMarker(it,re){let We=Object(d.f)(it.resource.toString(),re.resource.toString());return We===0&&(We=_.c.compare(it.severity,re.severity)),We===0&&(We=F.a.compareRangesUsingStarts(it,re)),We}};p=b([h(1,_.b)],p);const E=Object(r.c)("IMarkerNavigationService");let y=class{constructor(it){this._markerService=it,this._provider=new m.a}getMarkerList(it){for(let re of this._provider){const We=re.getMarkerList(it);if(We)return We}return new p(it,this._markerService)}};y=b([h(0,_.b)],y),Object(S.b)(E,y,!0);var C=t("3/fG"),O=t("fjLI"),k=t("T8No"),Y=t("v1vZ"),Q=t("EffR"),H=t("GJhM"),Z=t("zrhQ"),oe=t("3rx1"),$=t("gslv"),te=t("/oaI"),ne=t("iNS8"),Ee=t("eUTo"),fe=t("R8sh"),ee=t("W9cx"),ie=t("S3by"),U=t("MD5Z"),G=t("t9D7"),J;(function(Xe){function it(re){switch(re){case ie.a.Ignore:return"severity-ignore "+f.b.info.classNames;case ie.a.Info:return f.b.info.classNames;case ie.a.Warning:return f.b.warning.classNames;case ie.a.Error:return f.b.error.classNames;default:return""}}Xe.className=it})(J||(J={})),Object(G.f)((Xe,it)=>{const re=Xe.getColor(U.mc);if(re){const Et=f.b.error.cssSelector;it.addRule(`
|
|
|
.monaco-editor .zone-widget ${Et},
|
|
|
.markers-panel .marker-icon${Et},
|
|
|
.text-search-provider-messages .providerMessage ${Et},
|
|
|
.extensions-viewlet > .extensions ${Et} {
|
|
|
color: ${re};
|
|
|
}
|
|
|
`)}const We=Xe.getColor(U.oc);if(We){const Et=f.b.warning.cssSelector;it.addRule(`
|
|
|
.monaco-editor .zone-widget ${Et},
|
|
|
.markers-panel .marker-icon${Et},
|
|
|
.extensions-viewlet > .extensions ${Et},
|
|
|
.extension-editor ${Et},
|
|
|
.text-search-provider-messages .providerMessage ${Et},
|
|
|
.preferences-editor ${Et} {
|
|
|
color: ${We};
|
|
|
}
|
|
|
`)}const tt=Xe.getColor(U.nc);if(tt){const Et=f.b.info.cssSelector;it.addRule(`
|
|
|
.monaco-editor .zone-widget ${Et},
|
|
|
.markers-panel .marker-icon${Et},
|
|
|
.extensions-viewlet > .extensions ${Et},
|
|
|
.text-search-provider-messages .providerMessage ${Et},
|
|
|
.extension-editor ${Et} {
|
|
|
color: ${tt};
|
|
|
}
|
|
|
`)}});var he=function(Xe,it,re,We){var tt=arguments.length,Et=tt<3?it:We===null?We=Object.getOwnPropertyDescriptor(it,re):We,It;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Et=Reflect.decorate(Xe,it,re,We);else for(var Rt=Xe.length-1;Rt>=0;Rt--)(It=Xe[Rt])&&(Et=(tt<3?It(Et):tt>3?It(it,re,Et):It(it,re))||Et);return tt>3&&Et&&Object.defineProperty(it,re,Et),Et},xe=function(Xe,it){return function(re,We){it(re,We,Xe)}};class Ie{constructor(Xe,it,re,We,tt){this._openerService=We,this._labelService=tt,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new B.b,this._editor=it;const Et=document.createElement("div");Et.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),Et.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),Et.appendChild(this._relatedBlock),this._disposables.add(Q.o(this._relatedBlock,"click",It=>{It.preventDefault();const Rt=this._relatedDiagnostics.get(It.target);Rt&&re(Rt)})),this._scrollable=new H.b(Et,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),Xe.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(It=>{Et.style.left=`-${It.scrollLeft}px`,Et.style.top=`-${It.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){Object(B.f)(this._disposables)}update(Xe){const{source:it,message:re,relatedInformation:We,code:tt}=Xe;let Et=((it==null?void 0:it.length)||0)+"()".length;tt&&(typeof tt=="string"?Et+=tt.length:Et+=tt.value.length);const It=Object(d.Q)(re);this._lines=It.length,this._longestLineLength=0;for(const Do of It)this._longestLineLength=Math.max(Do.length+Et,this._longestLineLength);Q.t(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(Xe)),this._editor.applyFontInfo(this._messageBlock);let Rt=this._messageBlock;for(const Do of It)Rt=document.createElement("div"),Rt.innerText=Do,Do===""&&(Rt.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(Rt);if(it||tt){const Do=document.createElement("span");if(Do.classList.add("details"),Rt.appendChild(Do),it){const Lo=document.createElement("span");Lo.innerText=it,Lo.classList.add("source"),Do.appendChild(Lo)}if(tt)if(typeof tt=="string"){const Lo=document.createElement("span");Lo.innerText=`(${tt})`,Lo.classList.add("code"),Do.appendChild(Lo)}else{this._codeLink=Q.a("a.code-link"),this._codeLink.setAttribute("href",`${tt.target.toString()}`),this._codeLink.onclick=To=>{this._openerService.open(tt.target,{allowCommands:!0}),To.preventDefault(),To.stopPropagation()};const Lo=Q.q(this._codeLink,Q.a("span"));Lo.innerText=tt.value,Do.appendChild(this._codeLink)}}if(Q.t(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),Object(L.n)(We)){const Do=this._relatedBlock.appendChild(document.createElement("div"));Do.style.paddingTop=`${Math.floor(this._editor.getOption(58)*.66)}px`,this._lines+=1;for(const Lo of We){let To=document.createElement("div"),Ht=document.createElement("a");Ht.classList.add("filename"),Ht.innerText=`${Object(oe.a)(Lo.resource)}(${Lo.startLineNumber}, ${Lo.startColumn}): `,Ht.title=this._labelService.getUriLabel(Lo.resource),this._relatedDiagnostics.set(Ht,Lo);let Mt=document.createElement("span");Mt.innerText=Lo.message,To.appendChild(Ht),To.appendChild(Mt),this._lines+=1,Do.appendChild(To)}}const vo=this._editor.getOption(43),Mo=Math.ceil(vo.typicalFullwidthCharacterWidth*this._longestLineLength*.75),xo=vo.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:Mo,scrollHeight:xo})}layout(Xe,it){this._scrollable.getDomNode().style.height=`${Xe}px`,this._scrollable.getDomNode().style.width=`${it}px`,this._scrollable.setScrollDimensions({width:it,height:Xe})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(Xe){let it="";switch(Xe.severity){case _.c.Error:it=C.a("Error","Error");break;case _.c.Warning:it=C.a("Warning","Warning");break;case _.c.Info:it=C.a("Info","Info");break;case _.c.Hint:it=C.a("Hint","Hint");break}let re=C.a("marker aria","{0} at {1}. ",it,Xe.startLineNumber+":"+Xe.startColumn);const We=this._editor.getModel();if(We&&Xe.startLineNumber<=We.getLineCount()&&Xe.startLineNumber>=1){const tt=We.getLineContent(Xe.startLineNumber);re=`${tt}, ${re}`}return re}}let Le=class Xe extends ne.c{constructor(it,re,We,tt,Et,It,Rt){super(it,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},Et);this._themeService=re,this._openerService=We,this._menuService=tt,this._contextKeyService=It,this._labelService=Rt,this._callOnDispose=new B.b,this._onDidSelectRelatedInformation=new v.b,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=_.c.Warning,this._backgroundColor=Z.a.white,this._applyTheme(re.getColorTheme()),this._callOnDispose.add(re.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(it){this._backgroundColor=it.getColor(ye);let re=je,We=Pe;this._severity===_.c.Warning?(re=ve,We=ce):this._severity===_.c.Info&&(re=le,We=Ce);const tt=it.getColor(re),Et=it.getColor(We);this.style({arrowColor:tt,frameColor:tt,headerBackgroundColor:Et,primaryHeadingColor:it.getColor(ne.q),secondaryHeadingColor:it.getColor(ne.r)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(it){super._fillHead(it),this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun(tt=>this.editor.focus()));const re=[],We=this._menuService.createMenu(Xe.TitleMenu,this._contextKeyService);Object(Ee.c)(We,void 0,re),this._actionbarWidget.push(re,{label:!1,icon:!0,index:0}),We.dispose()}_fillTitleIcon(it){this._icon=Q.q(it,Q.a(""))}_fillBody(it){this._parentContainer=it,it.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),it.appendChild(this._container),this._message=new Ie(this._container,this.editor,re=>this._onDidSelectRelatedInformation.fire(re),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(it,re,We){this._container.classList.remove("stale"),this._message.update(it),this._severity=it.severity,this._applyTheme(this._themeService.getColorTheme());let tt=F.a.lift(it);const Et=this.editor.getPosition();let It=Et&&tt.containsPosition(Et)?Et:tt.getStartPosition();super.show(It,this.computeRequiredHeight());const Rt=this.editor.getModel();if(Rt){const vo=We>1?C.a("problems","{0} of {1} problems",re,We):C.a("change","{0} of {1} problem",re,We);this.setTitle(Object($.b)(Rt.uri),vo)}this._icon.className=`codicon ${J.className(_.c.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(It,0),this.editor.focus()}updateMarker(it){this._container.classList.remove("stale"),this._message.update(it)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(it,re){super._doLayoutBody(it,re),this._heightInPixel=it,this._message.layout(it,re),this._container.style.height=`${it}px`}_onWidth(it){this._message.layout(this._heightInPixel,it)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};Le.TitleMenu=new O.b("gotoErrorTitleMenu"),Le=he([xe(1,G.b),xe(2,ee.a),xe(3,O.a),xe(4,r.a),xe(5,k.b),xe(6,fe.a)],Le);let Te=Object(U.hc)(U.u,U.t),ze=Object(U.hc)(U.V,U.U),ue=Object(U.hc)(U.M,U.L);const je=Object(U.wc)("editorMarkerNavigationError.background",{dark:Te,light:Te,hc:U.h},C.a("editorMarkerNavigationError","Editor marker navigation widget error color.")),Pe=Object(U.wc)("editorMarkerNavigationError.headerBackground",{dark:Object(U.Lc)(je,.1),light:Object(U.Lc)(je,.1),hc:null},C.a("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),ve=Object(U.wc)("editorMarkerNavigationWarning.background",{dark:ze,light:ze,hc:U.h},C.a("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),ce=Object(U.wc)("editorMarkerNavigationWarning.headerBackground",{dark:Object(U.Lc)(ve,.1),light:Object(U.Lc)(ve,.1),hc:"#0C141F"},C.a("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),le=Object(U.wc)("editorMarkerNavigationInfo.background",{dark:ue,light:ue,hc:U.h},C.a("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Ce=Object(U.wc)("editorMarkerNavigationInfo.headerBackground",{dark:Object(U.Lc)(le,.1),light:Object(U.Lc)(le,.1),hc:null},C.a("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),ye=Object(U.wc)("editorMarkerNavigation.background",{dark:U.r,light:U.r,hc:U.r},C.a("editorMarkerNavigationBackground","Editor marker navigation widget background."));Object(G.f)((Xe,it)=>{const re=Xe.getColor(U.Jc);re&&it.addRule(`.monaco-editor .marker-widget a.code-link span { color: ${re}; }`);const We=Xe.getColor(U.Ic);We&&it.addRule(`.monaco-editor .marker-widget a.code-link span:hover { color: ${We}; }`)});var ge=function(Xe,it,re,We){var tt=arguments.length,Et=tt<3?it:We===null?We=Object.getOwnPropertyDescriptor(it,re):We,It;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Et=Reflect.decorate(Xe,it,re,We);else for(var Rt=Xe.length-1;Rt>=0;Rt--)(It=Xe[Rt])&&(Et=(tt<3?It(Et):tt>3?It(it,re,Et):It(it,re))||Et);return tt>3&&Et&&Object.defineProperty(it,re,Et),Et},Me=function(Xe,it){return function(re,We){it(re,We,Xe)}},De=function(Xe,it,re,We){function tt(Et){return Et instanceof re?Et:new re(function(It){It(Et)})}return new(re||(re=Promise))(function(Et,It){function Rt(xo){try{Mo(We.next(xo))}catch(Do){It(Do)}}function vo(xo){try{Mo(We.throw(xo))}catch(Do){It(Do)}}function Mo(xo){xo.done?Et(xo.value):tt(xo.value).then(Rt,vo)}Mo((We=We.apply(Xe,it||[])).next())})};let we=class Xe{constructor(it,re,We,tt,Et){this._markerNavigationService=re,this._contextKeyService=We,this._editorService=tt,this._instantiationService=Et,this._sessionDispoables=new B.b,this._editor=it,this._widgetVisible=Tt.bindTo(this._contextKeyService)}static get(it){return it.getContribution(Xe.ID)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(it){if(this._model&&this._model.matches(it))return this._model;let re=!1;return this._model&&(re=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(it),re&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(Le,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(We=>{var tt,Et,It;(!((tt=this._model)===null||tt===void 0?void 0:tt.selected)||!F.a.containsPosition((Et=this._model)===null||Et===void 0?void 0:Et.selected.marker,We.position))&&((It=this._model)===null||It===void 0||It.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const We=this._model.find(this._editor.getModel().uri,this._widget.position);We?this._widget.updateMarker(We.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(We=>{this._editorService.openCodeEditor({resource:We.resource,options:{pinned:!0,revealIfOpened:!0,selection:F.a.lift(We).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(it=!0){this._cleanUp(),it&&this._editor.focus()}showAtMarker(it){if(this._editor.hasModel()){const re=this._getOrCreateModel(this._editor.getModel().uri);re.resetIndex(),re.move(!0,this._editor.getModel(),new A.a(it.startLineNumber,it.startColumn)),re.selected&&this._widget.showAtMarker(re.selected.marker,re.selected.index,re.selected.total)}}nagivate(it,re){return De(this,void 0,void 0,function*(){if(this._editor.hasModel()){const We=this._getOrCreateModel(re?void 0:this._editor.getModel().uri);if(We.move(it,this._editor.getModel(),this._editor.getPosition()),!We.selected)return;if(We.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const tt=yield this._editorService.openCodeEditor({resource:We.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:We.selected.marker}},this._editor);tt&&(Xe.get(tt).close(),Xe.get(tt).nagivate(it,re))}else this._widget.showAtMarker(We.selected.marker,We.selected.index,We.selected.total)}})}};we.ID="editor.contrib.markerController",we=ge([Me(1,E),Me(2,k.b),Me(3,N.a),Me(4,r.a)],we);class Oe extends x.b{constructor(Xe,it,re){super(re);this._next=Xe,this._multiFile=it}run(Xe,it){return De(this,void 0,void 0,function*(){it.hasModel()&&we.get(it).nagivate(this._next,this._multiFile)})}}class nt extends Oe{constructor(){super(!0,!1,{id:nt.ID,label:nt.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.a.focus,primary:512|66,weight:100},menuOpts:{menuId:Le.TitleMenu,title:nt.LABEL,icon:Object(Y.b)("marker-navigation-next",f.b.arrowDown,C.a("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}nt.ID="editor.action.marker.next",nt.LABEL=C.a("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class Ke extends Oe{constructor(){super(!1,!1,{id:Ke.ID,label:Ke.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.a.focus,primary:1024|512|66,weight:100},menuOpts:{menuId:Le.TitleMenu,title:nt.LABEL,icon:Object(Y.b)("marker-navigation-previous",f.b.arrowUp,C.a("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}Ke.ID="editor.action.marker.prev",Ke.LABEL=C.a("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class et extends Oe{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:C.a("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.a.focus,primary:66,weight:100},menuOpts:{menuId:O.b.MenubarGoMenu,title:C.a({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class bt extends Oe{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:C.a("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.a.focus,primary:1024|66,weight:100},menuOpts:{menuId:O.b.MenubarGoMenu,title:C.a({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}Object(x.l)(we.ID,we),Object(x.j)(nt),Object(x.j)(Ke),Object(x.j)(et),Object(x.j)(bt);const Tt=new k.c("markersNavigationVisible",!1),$t=x.c.bindToContribution(we.get);Object(x.k)(new $t({id:"closeMarkersNavigation",precondition:Tt,handler:Xe=>Xe.close(),kbOpts:{weight:100+50,kbExpr:I.a.focus,primary:9,secondary:[1024|9]}}))},li8W:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:function(){return t.e(320).then(t.bind(null,"7s2V"))}})},lrmC:function(mt,M,t){},n01l:function(mt,M,t){"use strict";t.r(M);var f=t("/kV6"),B=t("sswD"),x=t("aokT"),N=t("wQH0"),A=t("0/Sa"),F=t("cGHE"),I=t("gCVg"),L=t("cMvZ");class v{constructor(p,E){this._selection=p,this._insertSpace=E,this._usedEndToken=null}static _haystackHasNeedleAtOffset(p,E,y){if(y<0)return!1;const C=E.length,O=p.length;if(y+C>O)return!1;for(let k=0;k<C;k++){const Y=p.charCodeAt(y+k),Q=E.charCodeAt(k);if(Y===Q)continue;if(Y>=65&&Y<=90&&Y+32===Q)continue;if(Q>=65&&Q<=90&&Q+32===Y)continue;return!1}return!0}_createOperationsForBlockComment(p,E,y,C,O,k){const Y=p.startLineNumber,Q=p.startColumn,H=p.endLineNumber,Z=p.endColumn,oe=O.getLineContent(Y),$=O.getLineContent(H);let te=oe.lastIndexOf(E,Q-1+E.length),ne=$.indexOf(y,Z-1-y.length);if(te!==-1&&ne!==-1)if(Y===H){const fe=oe.substring(te+E.length,ne);fe.indexOf(y)>=0&&(te=-1,ne=-1)}else{const fe=oe.substring(te+E.length),ee=$.substring(0,ne);(fe.indexOf(y)>=0||ee.indexOf(y)>=0)&&(te=-1,ne=-1)}let Ee;te!==-1&&ne!==-1?(C&&te+E.length<oe.length&&oe.charCodeAt(te+E.length)===32&&(E=E+" "),C&&ne>0&&$.charCodeAt(ne-1)===32&&(y=" "+y,ne-=1),Ee=v._createRemoveBlockCommentOperations(new x.a(Y,te+E.length+1,H,ne+1),E,y)):(Ee=v._createAddBlockCommentOperations(p,E,y,this._insertSpace),this._usedEndToken=Ee.length===1?y:null);for(const fe of Ee)k.addTrackedEditOperation(fe.range,fe.text)}static _createRemoveBlockCommentOperations(p,E,y){let C=[];return x.a.isEmpty(p)?C.push(A.a.delete(new x.a(p.startLineNumber,p.startColumn-E.length,p.endLineNumber,p.endColumn+y.length))):(C.push(A.a.delete(new x.a(p.startLineNumber,p.startColumn-E.length,p.startLineNumber,p.startColumn))),C.push(A.a.delete(new x.a(p.endLineNumber,p.endColumn,p.endLineNumber,p.endColumn+y.length)))),C}static _createAddBlockCommentOperations(p,E,y,C){let O=[];return x.a.isEmpty(p)?O.push(A.a.replace(new x.a(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn),E+" "+y)):(O.push(A.a.insert(new F.a(p.startLineNumber,p.startColumn),E+(C?" ":""))),O.push(A.a.insert(new F.a(p.endLineNumber,p.endColumn),(C?" ":"")+y))),O}getEditOperations(p,E){const y=this._selection.startLineNumber,C=this._selection.startColumn;p.tokenizeIfCheap(y);const O=p.getLanguageIdAtPosition(y,C),k=L.b.getComments(O);if(!k||!k.blockCommentStartToken||!k.blockCommentEndToken)return;this._createOperationsForBlockComment(this._selection,k.blockCommentStartToken,k.blockCommentEndToken,this._insertSpace,p,E)}computeCursorState(p,E){const y=E.getInverseEditOperations();if(y.length===2){const C=y[0],O=y[1];return new I.a(C.range.endLineNumber,C.range.endColumn,O.range.startLineNumber,O.range.startColumn)}else{const C=y[0].range,O=this._usedEndToken?-this._usedEndToken.length-1:0;return new I.a(C.endLineNumber,C.endColumn+O,C.endLineNumber,C.endColumn+O)}}}var m=t("N0LK");class d{constructor(p,E,y,C,O,k){this._selection=p,this._tabSize=E,this._type=y,this._insertSpace=C,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=O,this._ignoreFirstLine=k||!1}static _gatherPreflightCommentStrings(p,E,y){p.tokenizeIfCheap(E);const C=p.getLanguageIdAtPosition(E,1),O=L.b.getComments(C),k=O?O.lineCommentToken:null;if(!k)return null;let Y=[];for(let Q=0,H=y-E+1;Q<H;Q++)Y[Q]={ignore:!1,commentStr:k,commentStrOffset:0,commentStrLength:k.length};return Y}static _analyzeLines(p,E,y,C,O,k,Y){let Q=!0,H;p===0?H=!0:p===1?H=!1:H=!0;for(let Z=0,oe=C.length;Z<oe;Z++){const $=C[Z],te=O+Z;if(te===O&&Y){$.ignore=!0;continue}const ne=y.getLineContent(te),Ee=m.u(ne);if(Ee===-1){$.ignore=k,$.commentStrOffset=ne.length;continue}if(Q=!1,$.ignore=!1,$.commentStrOffset=Ee,H&&!v._haystackHasNeedleAtOffset(ne,$.commentStr,Ee)&&(p===0?H=!1:p===1||($.ignore=!0)),H&&E){const fe=Ee+$.commentStrLength;fe<ne.length&&ne.charCodeAt(fe)===32&&($.commentStrLength+=1)}}if(p===0&&Q){H=!1;for(let Z=0,oe=C.length;Z<oe;Z++)C[Z].ignore=!1}return{supported:!0,shouldRemoveComments:H,lines:C}}static _gatherPreflightData(p,E,y,C,O,k,Y){const Q=d._gatherPreflightCommentStrings(y,C,O);return Q===null?{supported:!1}:d._analyzeLines(p,E,y,Q,C,k,Y)}_executeLineComments(p,E,y,C){let O;y.shouldRemoveComments?O=d._createRemoveLineCommentsOperations(y.lines,C.startLineNumber):(d._normalizeInsertionPoint(p,y.lines,C.startLineNumber,this._tabSize),O=this._createAddLineCommentsOperations(y.lines,C.startLineNumber));const k=new F.a(C.positionLineNumber,C.positionColumn);for(let Y=0,Q=O.length;Y<Q;Y++)if(E.addEditOperation(O[Y].range,O[Y].text),x.a.isEmpty(O[Y].range)&&x.a.getStartPosition(O[Y].range).equals(k)){const H=p.getLineContent(k.lineNumber);H.length+1===k.column&&(this._deltaColumn=(O[Y].text||"").length)}this._selectionId=E.trackSelection(C)}_attemptRemoveBlockComment(p,E,y,C){let O=E.startLineNumber,k=E.endLineNumber,Y=C.length+Math.max(p.getLineFirstNonWhitespaceColumn(E.startLineNumber),E.startColumn),Q=p.getLineContent(O).lastIndexOf(y,Y-1),H=p.getLineContent(k).indexOf(C,E.endColumn-1-y.length);return Q!==-1&&H===-1&&(H=p.getLineContent(O).indexOf(C,Q+y.length),k=O),Q===-1&&H!==-1&&(Q=p.getLineContent(k).lastIndexOf(y,H),O=k),E.isEmpty()&&(Q===-1||H===-1)&&(Q=p.getLineContent(O).indexOf(y),Q!==-1&&(H=p.getLineContent(O).indexOf(C,Q+y.length))),Q!==-1&&p.getLineContent(O).charCodeAt(Q+y.length)===32&&(y+=" "),H!==-1&&p.getLineContent(k).charCodeAt(H-1)===32&&(C=" "+C,H-=1),Q!==-1&&H!==-1?v._createRemoveBlockCommentOperations(new x.a(O,Q+y.length+1,k,H+1),y,C):null}_executeBlockComment(p,E,y){p.tokenizeIfCheap(y.startLineNumber);let C=p.getLanguageIdAtPosition(y.startLineNumber,1),O=L.b.getComments(C);if(!O||!O.blockCommentStartToken||!O.blockCommentEndToken)return;const k=O.blockCommentStartToken,Y=O.blockCommentEndToken;let Q=this._attemptRemoveBlockComment(p,y,k,Y);if(!Q){if(y.isEmpty()){const H=p.getLineContent(y.startLineNumber);let Z=m.u(H);Z===-1&&(Z=H.length),Q=v._createAddBlockCommentOperations(new x.a(y.startLineNumber,Z+1,y.startLineNumber,H.length+1),k,Y,this._insertSpace)}else Q=v._createAddBlockCommentOperations(new x.a(y.startLineNumber,p.getLineFirstNonWhitespaceColumn(y.startLineNumber),y.endLineNumber,p.getLineMaxColumn(y.endLineNumber)),k,Y,this._insertSpace);Q.length===1&&(this._deltaColumn=k.length+1)}this._selectionId=E.trackSelection(y);for(const H of Q)E.addEditOperation(H.range,H.text)}getEditOperations(p,E){let y=this._selection;if(this._moveEndPositionDown=!1,y.startLineNumber===y.endLineNumber&&this._ignoreFirstLine){E.addEditOperation(new x.a(y.startLineNumber,p.getLineMaxColumn(y.startLineNumber),y.startLineNumber+1,1),y.startLineNumber===p.getLineCount()?"":`
|
|
|
`),this._selectionId=E.trackSelection(y);return}y.startLineNumber<y.endLineNumber&&y.endColumn===1&&(this._moveEndPositionDown=!0,y=y.setEndPosition(y.endLineNumber-1,p.getLineMaxColumn(y.endLineNumber-1)));const C=d._gatherPreflightData(this._type,this._insertSpace,p,y.startLineNumber,y.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine);return C.supported?this._executeLineComments(p,E,C,y):this._executeBlockComment(p,E,y)}computeCursorState(p,E){let y=E.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(y=y.setEndPosition(y.endLineNumber+1,1)),new I.a(y.selectionStartLineNumber,y.selectionStartColumn+this._deltaColumn,y.positionLineNumber,y.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(p,E){let y=[];for(let C=0,O=p.length;C<O;C++){const k=p[C];if(k.ignore)continue;y.push(A.a.delete(new x.a(E+C,k.commentStrOffset+1,E+C,k.commentStrOffset+k.commentStrLength+1)))}return y}_createAddLineCommentsOperations(p,E){let y=[];const C=this._insertSpace?" ":"";for(let O=0,k=p.length;O<k;O++){const Y=p[O];if(Y.ignore)continue;y.push(A.a.insert(new F.a(E+O,Y.commentStrOffset+1),Y.commentStr+C))}return y}static nextVisibleColumn(p,E,y,C){return y?p+(E-p%E):p+C}static _normalizeInsertionPoint(p,E,y,C){let O=1073741824,k,Y;for(let Q=0,H=E.length;Q<H;Q++){if(E[Q].ignore)continue;const Z=p.getLineContent(y+Q);let oe=0;for(let $=0,te=E[Q].commentStrOffset;oe<O&&$<te;$++)oe=d.nextVisibleColumn(oe,C,Z.charCodeAt($)===9,1);oe<O&&(O=oe)}O=Math.floor(O/C)*C;for(let Q=0,H=E.length;Q<H;Q++){if(E[Q].ignore)continue;const Z=p.getLineContent(y+Q);let oe=0;for(k=0,Y=E[Q].commentStrOffset;oe<O&&k<Y;k++)oe=d.nextVisibleColumn(oe,C,Z.charCodeAt(k)===9,1);oe>O?E[Q].commentStrOffset=k-1:E[Q].commentStrOffset=k}}}var D=t("3/fG"),S=t("fjLI");class r extends B.b{constructor(p,E){super(E);this._type=p}run(p,E){if(!E.hasModel())return;const y=E.getModel(),C=[],O=y.getOptions(),k=E.getOption(19),Y=E.getSelections().map((H,Z)=>({selection:H,index:Z,ignoreFirstLine:!1}));Y.sort((H,Z)=>x.a.compareRangesUsingStarts(H.selection,Z.selection));let Q=Y[0];for(let H=1;H<Y.length;H++){const Z=Y[H];Q.selection.endLineNumber===Z.selection.startLineNumber&&(Q.index<Z.index?Z.ignoreFirstLine=!0:(Q.ignoreFirstLine=!0,Q=Z))}for(const H of Y)C.push(new d(H.selection,O.tabSize,this._type,k.insertSpace,k.ignoreEmptyLines,H.ignoreFirstLine));E.pushUndoStop(),E.executeCommands(this.id,C),E.pushUndoStop()}}class _ extends r{constructor(){super(0,{id:"editor.action.commentLine",label:D.a("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:N.a.writable,kbOpts:{kbExpr:N.a.editorTextFocus,primary:2048|85,weight:100},menuOpts:{menuId:S.b.MenubarEditMenu,group:"5_insert",title:D.a({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}}class b extends r{constructor(){super(1,{id:"editor.action.addCommentLine",label:D.a("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:N.a.writable,kbOpts:{kbExpr:N.a.editorTextFocus,primary:Object(f.c)(2048|41,2048|33),weight:100}})}}class h extends r{constructor(){super(2,{id:"editor.action.removeCommentLine",label:D.a("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:N.a.writable,kbOpts:{kbExpr:N.a.editorTextFocus,primary:Object(f.c)(2048|41,2048|51),weight:100}})}}class c extends B.b{constructor(){super({id:"editor.action.blockComment",label:D.a("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:N.a.writable,kbOpts:{kbExpr:N.a.editorTextFocus,primary:1024|512|31,linux:{primary:2048|1024|31},weight:100},menuOpts:{menuId:S.b.MenubarEditMenu,group:"5_insert",title:D.a({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(p,E){if(!E.hasModel())return;const y=E.getOption(19),C=[],O=E.getSelections();for(const k of O)C.push(new v(k,y.insertSpace));E.pushUndoStop(),E.executeCommands(this.id,C),E.pushUndoStop()}}Object(B.j)(_),Object(B.j)(b),Object(B.j)(h),Object(B.j)(c)},n18v:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:function(){return t.e(370).then(t.bind(null,"nNVF"))}})},nB0o:function(mt,M,t){"use strict";t.d(M,"a",function(){return Vs});var f=t("79sc"),B=t("sswD"),x=function(o,n,a,T){var R=arguments.length,X=R<3?n:T===null?T=Object.getOwnPropertyDescriptor(n,a):T,me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")X=Reflect.decorate(o,n,a,T);else for(var _e=o.length-1;_e>=0;_e--)(me=o[_e])&&(X=(R<3?me(X):R>3?me(n,a,X):me(n,a))||X);return R>3&&X&&Object.defineProperty(n,a,X),X},N=function(o,n){return function(a,T){n(a,T,o)}};let A=class{constructor(n,a){}dispose(){}};A.ID="editor.contrib.markerDecorations",A=x([N(1,f.a)],A),Object(B.l)(A.ID,A);var F=t("lrmC"),I=t("3/fG"),L=t("EffR"),v=t("/cxE"),m=t("MI8n"),d=t("pmY6"),D=t("tYmi"),S=t("HdwC"),r=t("Vxe3"),_=t("D3Dy"),b=t("gCVg"),h=t("ZlPH"),c=t("MNsG"),p=t("pg8w"),E=t("XSiN"),y=t("X+cX"),C=t("AKMP");class O{constructor(o,n){this.x=o,this.y=n,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new k(this.x-L.f.scrollX,this.y-L.f.scrollY)}}class k{constructor(o,n){this.clientX=o,this.clientY=n,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new O(this.clientX+L.f.scrollX,this.clientY+L.f.scrollY)}}class Y{constructor(o,n,a,T){this.x=o,this.y=n,this.width=a,this.height=T,this._editorPagePositionBrand=void 0}}function Q(o){const n=L.D(o);return new Y(n.left,n.top,n.width,n.height)}class H extends E.a{constructor(o,n){super(o);this._editorMouseEventBrand=void 0,this.pos=new O(this.posx,this.posy),this.editorPos=Q(n)}}class Z{constructor(o){this._editorViewDomNode=o}_create(o){return new H(o,this._editorViewDomNode)}onContextMenu(o,n){return L.i(o,"contextmenu",a=>{n(this._create(a))})}onMouseUp(o,n){return L.i(o,"mouseup",a=>{n(this._create(a))})}onMouseDown(o,n){return L.i(o,"mousedown",a=>{n(this._create(a))})}onMouseLeave(o,n){return L.j(o,a=>{n(this._create(a))})}onMouseMoveThrottled(o,n,a,T){const R=(X,me)=>a(X,this._create(me));return L.l(o,"mousemove",n,R,T)}}class oe{constructor(o){this._editorViewDomNode=o}_create(o){return new H(o,this._editorViewDomNode)}onPointerUp(o,n){return L.i(o,"pointerup",a=>{n(this._create(a))})}onPointerDown(o,n){return L.i(o,"pointerdown",a=>{n(this._create(a))})}onPointerLeave(o,n){return L.k(o,a=>{n(this._create(a))})}onPointerMoveThrottled(o,n,a,T){const R=(X,me)=>a(X,this._create(me));return L.l(o,"pointermove",n,R,T)}}class $ extends d.a{constructor(o){super();this._editorViewDomNode=o,this._globalMouseMoveMonitor=this._register(new C.a),this._keydownListener=null}startMonitoring(o,n,a,T,R){this._keydownListener=L.o(document,"keydown",me=>{const _e=me.toKeybinding();if(_e.isModifierKey())return;this._globalMouseMoveMonitor.stopMonitoring(!0,me.browserEvent)},!0);const X=(me,_e)=>a(me,new H(_e,this._editorViewDomNode));this._globalMouseMoveMonitor.startMonitoring(o,n,X,T,me=>{this._keydownListener.dispose(),R(me)})}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class te extends d.a{constructor(){super();this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(o){return!1}onCompositionEnd(o){return!1}onConfigurationChanged(o){return!1}onCursorStateChanged(o){return!1}onDecorationsChanged(o){return!1}onFlushed(o){return!1}onFocusChanged(o){return!1}onLanguageConfigurationChanged(o){return!1}onLineMappingChanged(o){return!1}onLinesChanged(o){return!1}onLinesDeleted(o){return!1}onLinesInserted(o){return!1}onRevealRangeRequest(o){return!1}onScrollChanged(o){return!1}onThemeChanged(o){return!1}onTokensChanged(o){return!1}onTokensColorsChanged(o){return!1}onZonesChanged(o){return!1}handleEvents(o){let n=!1;for(let a=0,T=o.length;a<T;a++){let R=o[a];switch(R.type){case 0:this.onCompositionStart(R)&&(n=!0);break;case 1:this.onCompositionEnd(R)&&(n=!0);break;case 2:this.onConfigurationChanged(R)&&(n=!0);break;case 3:this.onCursorStateChanged(R)&&(n=!0);break;case 4:this.onDecorationsChanged(R)&&(n=!0);break;case 5:this.onFlushed(R)&&(n=!0);break;case 6:this.onFocusChanged(R)&&(n=!0);break;case 7:this.onLanguageConfigurationChanged(R)&&(n=!0);break;case 8:this.onLineMappingChanged(R)&&(n=!0);break;case 9:this.onLinesChanged(R)&&(n=!0);break;case 10:this.onLinesDeleted(R)&&(n=!0);break;case 11:this.onLinesInserted(R)&&(n=!0);break;case 12:this.onRevealRangeRequest(R)&&(n=!0);break;case 13:this.onScrollChanged(R)&&(n=!0);break;case 15:this.onTokensChanged(R)&&(n=!0);break;case 14:this.onThemeChanged(R)&&(n=!0);break;case 16:this.onTokensColorsChanged(R)&&(n=!0);break;case 17:this.onZonesChanged(R)&&(n=!0);break;default:console.info("View received unknown event: "),console.info(R)}}n&&(this._shouldRender=!0)}}class ne extends te{constructor(o){super();this._context=o,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class Ee{static write(o,n){o instanceof h.a,o.setAttribute("data-mprt",String(n))}static read(o){const n=o.getAttribute("data-mprt");return n===null?0:parseInt(n,10)}static collect(o,n){let a=[],T=0;for(;o&&o!==document.body&&!(o===n);)o.nodeType===o.ELEMENT_NODE&&(a[T++]=this.read(o)),o=o.parentElement;const R=new Uint8Array(T);for(let X=0;X<T;X++)R[X]=a[T-X-1];return R}}class fe{constructor(o,n){this._restrictedRenderingContextBrand=void 0,this._viewLayout=o,this.viewportData=n,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const a=this._viewLayout.getCurrentViewport();this.scrollTop=a.top,this.scrollLeft=a.left,this.viewportWidth=a.width,this.viewportHeight=a.height}getScrolledTopFromAbsoluteTop(o){return o-this.scrollTop}getVerticalOffsetForLineNumber(o){return this._viewLayout.getVerticalOffsetForLineNumber(o)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class ee extends fe{constructor(o,n,a){super(o,n);this._renderingContextBrand=void 0,this._viewLines=a}linesVisibleRangesForRange(o,n){return this._viewLines.linesVisibleRangesForRange(o,n)}visibleRangeForPosition(o){return this._viewLines.visibleRangeForPosition(o)}}class ie{constructor(o,n,a){this.outsideRenderedLine=o,this.lineNumber=n,this.ranges=a}}class U{constructor(o,n){this._horizontalRangeBrand=void 0,this.left=Math.round(o),this.width=Math.round(n)}static from(o){const n=new Array(o.length);for(let a=0,T=o.length;a<T;a++){const R=o[a];n[a]=new U(R.left,R.width)}return n}toString(){return`[${this.left},${this.width}]`}}class G{constructor(o,n){this._floatHorizontalRangeBrand=void 0,this.left=o,this.width=n}toString(){return`[${this.left},${this.width}]`}static compare(o,n){return o.left-n.left}}class J{constructor(o,n){this.outsideRenderedLine=o,this.originalLeft=n,this.left=Math.round(this.originalLeft)}}class he{constructor(o,n){this.outsideRenderedLine=o,this.ranges=n}}class xe{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(o,n){o.selectNodeContents(n)}static _readClientRects(o,n,a,T,R){const X=this._createRange();try{return X.setStart(o,n),X.setEnd(a,T),X.getClientRects()}catch(me){return null}finally{this._detachRange(X,R)}}static _mergeAdjacentRanges(o){if(o.length===1)return o;o.sort(G.compare);let n=[],a=0,T=o[0];for(let R=1,X=o.length;R<X;R++){const me=o[R];T.left+T.width+.9>=me.left?T.width=Math.max(T.width,me.left+me.width-T.left):(n[a++]=T,T=me)}return n[a++]=T,n}static _createHorizontalRangesFromClientRects(o,n){if(!o||o.length===0)return null;const a=[];for(let T=0,R=o.length;T<R;T++){const X=o[T];a[T]=new G(Math.max(0,X.left-n),X.width)}return this._mergeAdjacentRanges(a)}static readHorizontalRanges(o,n,a,T,R,X,me){const _e=0,He=o.children.length-1;if(_e>He)return null;if(n=Math.min(He,Math.max(_e,n)),T=Math.min(He,Math.max(_e,T)),n===T&&a===R&&a===0&&!o.children[n].firstChild){const gt=o.children[n].getClientRects();return this._createHorizontalRangesFromClientRects(gt,X)}n!==T&&(T>0&&R===0&&(T--,R=1073741824));let $e=o.children[n].firstChild,ot=o.children[T].firstChild;if((!$e||!ot)&&(!$e&&a===0&&n>0&&($e=o.children[n-1].firstChild,a=1073741824),!ot&&R===0&&T>0&&(ot=o.children[T-1].firstChild,R=1073741824)),!$e||!ot)return null;a=Math.min($e.textContent.length,Math.max(0,a)),R=Math.min(ot.textContent.length,Math.max(0,R));const Ot=this._readClientRects($e,a,ot,R,me);return this._createHorizontalRangesFromClientRects(Ot,X)}}var Ie=t("dBaI"),Le=t("baJR"),Te=t("nEHx"),ze=t("/UlZ");const ue=function(){return c.g?!0:!(c.d||_.g||_.h)}();let je=!0;class Pe{constructor(o,n){this._domNode=o,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=n}get clientRectDeltaLeft(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}class ve{constructor(o,n){this.themeType=n;const a=o.options,T=a.get(43);this.renderWhitespace=a.get(87),this.renderControlCharacters=a.get(82),this.spaceWidth=T.spaceWidth,this.middotWidth=T.middotWidth,this.wsmiddotWidth=T.wsmiddotWidth,this.useMonospaceOptimizations=T.isMonospace&&!a.get(29),this.canUseHalfwidthRightwardsArrow=T.canUseHalfwidthRightwardsArrow,this.lineHeight=a.get(58),this.stopRenderingLineAfter=a.get(104),this.fontLigatures=a.get(44)}equals(o){return this.themeType===o.themeType&&this.renderWhitespace===o.renderWhitespace&&this.renderControlCharacters===o.renderControlCharacters&&this.spaceWidth===o.spaceWidth&&this.middotWidth===o.middotWidth&&this.wsmiddotWidth===o.wsmiddotWidth&&this.useMonospaceOptimizations===o.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===o.canUseHalfwidthRightwardsArrow&&this.lineHeight===o.lineHeight&&this.stopRenderingLineAfter===o.stopRenderingLineAfter&&this.fontLigatures===o.fontLigatures}}class ce{constructor(o){this._options=o,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(o){if(this._renderedViewLine)this._renderedViewLine.domNode=Object(h.b)(o);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(o){this._isMaybeInvalid=!0,this._options=o}onSelectionChanged(){return this._options.themeType===Te.a.HIGH_CONTRAST||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(o,n,a,T){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const R=a.getViewLineRenderingData(o),X=this._options,me=Ie.a.filter(R.inlineDecorations,o,R.minColumn,R.maxColumn);let _e=null;if(X.themeType===Te.a.HIGH_CONTRAST||this._options.renderWhitespace==="selection"){const Ot=a.selections;for(const gt of Ot){if(gt.endLineNumber<o||gt.startLineNumber>o)continue;const kt=gt.startLineNumber===o?gt.startColumn:R.minColumn,Kt=gt.endLineNumber===o?gt.endColumn:R.maxColumn;kt<Kt&&(X.themeType===Te.a.HIGH_CONTRAST||this._options.renderWhitespace!=="selection"?me.push(new Ie.a(kt,Kt,"inline-selected-text",0)):(_e||(_e=[]),_e.push(new Le.b(kt-1,Kt-1))))}}const He=new Le.c(X.useMonospaceOptimizations,X.canUseHalfwidthRightwardsArrow,R.content,R.continuesWithWrappedLine,R.isBasicASCII,R.containsRTL,R.minColumn-1,R.tokens,me,R.tabSize,R.startVisibleColumn,X.spaceWidth,X.middotWidth,X.wsmiddotWidth,X.stopRenderingLineAfter,X.renderWhitespace,X.renderControlCharacters,X.fontLigatures!==ze.e.OFF,_e);if(this._renderedViewLine&&this._renderedViewLine.input.equals(He))return!1;T.appendASCIIString('<div style="top:'),T.appendASCIIString(String(n)),T.appendASCIIString("px;height:"),T.appendASCIIString(String(this._options.lineHeight)),T.appendASCIIString('px;" class="'),T.appendASCIIString(ce.CLASS_NAME),T.appendASCIIString('">');const $e=Object(Le.d)(He,T);T.appendASCIIString("</div>");let ot=null;return je&&ue&&R.isBasicASCII&&X.useMonospaceOptimizations&&$e.containsForeignElements===0&&(R.content.length<300&&He.lineTokens.getCount()<100&&(ot=new le(this._renderedViewLine?this._renderedViewLine.domNode:null,He,$e.characterMapping))),ot||(ot=ge(this._renderedViewLine?this._renderedViewLine.domNode:null,He,$e.characterMapping,$e.containsRTL,$e.containsForeignElements)),this._renderedViewLine=ot,!0}layoutLine(o,n){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(n),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof le:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof le?this._renderedViewLine.monospaceAssumptionsAreValid():je}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof le&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(o,n,a,T){if(!this._renderedViewLine)return null;n=n|0,a=a|0,n=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,n)),a=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,a));const R=this._renderedViewLine.input.stopRenderingLineAfter|0;let X=!1;R!==-1&&n>R+1&&a>R+1&&(X=!0),R!==-1&&n>R+1&&(n=R+1),R!==-1&&a>R+1&&(a=R+1);const me=this._renderedViewLine.getVisibleRangesForRange(o,n,a,T);return me&&me.length>0?new he(X,me):null}getColumnOfNodeOffset(o,n,a){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(o,n,a):1}}ce.CLASS_NAME="view-line";class le{constructor(o,n,a){this.domNode=o,this.input=n,this._characterMapping=a,this._charWidth=n.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return je;const o=this.getWidth(),n=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(o-n)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),je=!1),je}toSlowRenderedLine(){return ge(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(o,n,a,T){const R=this._getCharPosition(n),X=this._getCharPosition(a);return[new G(R,X-R)]}_getCharPosition(o){const n=this._characterMapping.getAbsoluteOffset(o);return this._charWidth*n}getColumnOfNodeOffset(o,n,a){const T=n.textContent.length;let R=-1;for(;n;)n=n.previousSibling,R++;return this._characterMapping.getColumn(new Le.a(R,a),T)}}class Ce{constructor(o,n,a,T,R){if(this.domNode=o,this.input=n,this._characterMapping=a,this._isWhitespaceOnly=/^\s*$/.test(n.lineContent),this._containsForeignElements=R,this._cachedWidth=-1,this._pixelOffsetCache=null,!T||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let X=0,me=this._characterMapping.length;X<=me;X++)this._pixelOffsetCache[X]=-1}}_getReadingTarget(o){return o.domNode.firstChild}getWidth(){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return!(this._cachedWidth===-1)}getVisibleRangesForRange(o,n,a,T){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const R=this._readPixelOffset(this.domNode,o,n,T);if(R===-1)return null;const X=this._readPixelOffset(this.domNode,o,a,T);return X===-1?null:[new G(R,X-R)]}return this._readVisibleRangesForRange(this.domNode,o,n,a,T)}_readVisibleRangesForRange(o,n,a,T,R){if(a===T){const X=this._readPixelOffset(o,n,a,R);return X===-1?null:[new G(X,0)]}else return this._readRawVisibleRangesForRange(o,a,T,R)}_readPixelOffset(o,n,a,T){if(this._characterMapping.length===0){if(this._containsForeignElements===0)return 0;if(this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth();const R=this._getReadingTarget(o);return R.firstChild?R.firstChild.offsetWidth:0}if(this._pixelOffsetCache!==null){const R=this._pixelOffsetCache[a];if(R!==-1)return R;const X=this._actualReadPixelOffset(o,n,a,T);return this._pixelOffsetCache[a]=X,X}return this._actualReadPixelOffset(o,n,a,T)}_actualReadPixelOffset(o,n,a,T){if(this._characterMapping.length===0){const _e=xe.readHorizontalRanges(this._getReadingTarget(o),0,0,0,0,T.clientRectDeltaLeft,T.endNode);return!_e||_e.length===0?-1:_e[0].left}if(a===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth();const R=this._characterMapping.getDomPosition(a),X=xe.readHorizontalRanges(this._getReadingTarget(o),R.partIndex,R.charIndex,R.partIndex,R.charIndex,T.clientRectDeltaLeft,T.endNode);if(!X||X.length===0)return-1;const me=X[0].left;if(this.input.isBasicASCII){const _e=this._characterMapping.getAbsoluteOffset(a),He=Math.round(this.input.spaceWidth*_e);if(Math.abs(He-me)<=1)return He}return me}_readRawVisibleRangesForRange(o,n,a,T){if(n===1&&a===this._characterMapping.length)return[new G(0,this.getWidth())];const R=this._characterMapping.getDomPosition(n),X=this._characterMapping.getDomPosition(a);return xe.readHorizontalRanges(this._getReadingTarget(o),R.partIndex,R.charIndex,X.partIndex,X.charIndex,T.clientRectDeltaLeft,T.endNode)}getColumnOfNodeOffset(o,n,a){const T=n.textContent.length;let R=-1;for(;n;)n=n.previousSibling,R++;return this._characterMapping.getColumn(new Le.a(R,a),T)}}class ye extends Ce{_readVisibleRangesForRange(o,n,a,T,R){const X=super._readVisibleRangesForRange(o,n,a,T,R);if(!X||X.length===0||a===T||a===1&&T===this._characterMapping.length)return X;if(!this.input.containsRTL){const me=this._readPixelOffset(o,n,T,R);if(me!==-1){const _e=X[X.length-1];_e.left<me&&(_e.width=me-_e.left)}}return X}}const ge=function(){return _.j?Me:De}();function Me(o,n,a,T,R){return new ye(o,n,a,T,R)}function De(o,n,a,T,R){return new Ce(o,n,a,T,R)}var we=t("cGHE"),Oe=t("aokT"),nt=t("Ll0s"),Ke=t("cIqD");class et{constructor(o=null){this.hitTarget=o,this.type=0}}class bt{constructor(o,n,a){this.position=o,this.spanNode=n,this.injectedText=a,this.type=1}}var Tt;(function(o){function n(a,T,R){const X=a.getPositionFromDOMInfo(T,R);return X?new bt(X,T,null):new et(T)}o.createFromDOMInfo=n})(Tt||(Tt={}));class $t{constructor(o,n){this.lastViewCursorsRenderData=o,this.lastTextareaPosition=n}}class Xe{constructor(o,n,a=0,T=null,R=null,X=null){this.element=o,this.type=n,this.mouseColumn=a,this.position=T,!R&&T&&(R=new Oe.a(T.lineNumber,T.column,T.lineNumber,T.column)),this.range=R,this.detail=X}static _typeToString(o){return o===1?"TEXTAREA":o===2?"GUTTER_GLYPH_MARGIN":o===3?"GUTTER_LINE_NUMBERS":o===4?"GUTTER_LINE_DECORATIONS":o===5?"GUTTER_VIEW_ZONE":o===6?"CONTENT_TEXT":o===7?"CONTENT_EMPTY":o===8?"CONTENT_VIEW_ZONE":o===9?"CONTENT_WIDGET":o===10?"OVERVIEW_RULER":o===11?"SCROLLBAR":o===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(o){return this._typeToString(o.type)+": "+o.position+" - "+o.range+" - "+o.detail}toString(){return Xe.toString(this)}}class it{static isTextArea(o){return o.length===2&&o[0]===3&&o[1]===6}static isChildOfViewLines(o){return o.length>=4&&o[0]===3&&o[3]===7}static isStrictChildOfViewLines(o){return o.length>4&&o[0]===3&&o[3]===7}static isChildOfScrollableElement(o){return o.length>=2&&o[0]===3&&o[1]===5}static isChildOfMinimap(o){return o.length>=2&&o[0]===3&&o[1]===8}static isChildOfContentWidgets(o){return o.length>=4&&o[0]===3&&o[3]===1}static isChildOfOverflowingContentWidgets(o){return o.length>=1&&o[0]===2}static isChildOfOverlayWidgets(o){return o.length>=2&&o[0]===3&&o[1]===4}}class re{constructor(o,n,a){this.model=o.model;const T=o.configuration.options;this.layoutInfo=T.get(129),this.viewDomNode=n.viewDomNode,this.lineHeight=T.get(58),this.stickyTabStops=T.get(103),this.typicalHalfwidthCharacterWidth=T.get(43).typicalHalfwidthCharacterWidth,this.lastRenderData=a,this._context=o,this._viewHelper=n}getZoneAtCoord(o){return re.getZoneAtCoord(this._context,o)}static getZoneAtCoord(o,n){const a=o.viewLayout.getWhitespaceAtVerticalOffset(n);if(a){const T=a.verticalOffset+a.height/2,R=o.model.getLineCount();let X=null,me,_e=null;return a.afterLineNumber!==R&&(_e=new we.a(a.afterLineNumber+1,1)),a.afterLineNumber>0&&(X=new we.a(a.afterLineNumber,o.model.getLineMaxColumn(a.afterLineNumber))),_e===null?me=X:X===null?me=_e:n<T?me=X:me=_e,{viewZoneId:a.id,afterLineNumber:a.afterLineNumber,positionBefore:X,positionAfter:_e,position:me}}return null}getFullLineRangeAtCoord(o){if(this._context.viewLayout.isAfterLines(o)){const T=this._context.model.getLineCount(),R=this._context.model.getLineMaxColumn(T);return{range:new Oe.a(T,R,T,R),isAfterLines:!0}}const n=this._context.viewLayout.getLineNumberAtVerticalOffset(o),a=this._context.model.getLineMaxColumn(n);return{range:new Oe.a(n,1,n,a),isAfterLines:!1}}getLineNumberAtVerticalOffset(o){return this._context.viewLayout.getLineNumberAtVerticalOffset(o)}isAfterLines(o){return this._context.viewLayout.isAfterLines(o)}isInTopPadding(o){return this._context.viewLayout.isInTopPadding(o)}isInBottomPadding(o){return this._context.viewLayout.isInBottomPadding(o)}getVerticalOffsetForLineNumber(o){return this._context.viewLayout.getVerticalOffsetForLineNumber(o)}findAttribute(o,n){return re._findAttribute(o,n,this._viewHelper.viewDomNode)}static _findAttribute(o,n,a){for(;o&&o!==document.body;){if(o.hasAttribute&&o.hasAttribute(n))return o.getAttribute(n);if(o===a)return null;o=o.parentNode}return null}getLineWidth(o){return this._viewHelper.getLineWidth(o)}visibleRangeForPosition(o,n){return this._viewHelper.visibleRangeForPosition(o,n)}getPositionFromDOMInfo(o,n){return this._viewHelper.getPositionFromDOMInfo(o,n)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class We{constructor(o,n,a){this.editorPos=n,this.pos=a,this.mouseVerticalOffset=Math.max(0,o.getCurrentScrollTop()+a.y-n.y),this.mouseContentHorizontalOffset=o.getCurrentScrollLeft()+a.x-n.x-o.layoutInfo.contentLeft,this.isInMarginArea=a.x-n.x<o.layoutInfo.contentLeft&&a.x-n.x>=o.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Rt._getMouseColumn(this.mouseContentHorizontalOffset,o.typicalHalfwidthCharacterWidth))}}class tt extends We{constructor(o,n,a,T){super(o,n,a);this._ctx=o,T?(this.target=T,this.targetPath=Ee.collect(T,o.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}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}
|
|
|
target: ${this.target?this.target.outerHTML:null}`}fulfill(o,n=null,a=null,T=null){let R=this.mouseColumn;return n&&n.column<this._ctx.model.getLineMaxColumn(n.lineNumber)&&(R=nt.a.visibleColumnFromColumn(this._ctx.model.getLineContent(n.lineNumber),n.column,this._ctx.model.getTextModelOptions().tabSize)+1),new Xe(this.target,o,R,n,a,T)}withTarget(o){return new tt(this._ctx,this.editorPos,this.pos,o)}}const Et={isAfterLines:!0};function It(o){return{isAfterLines:!1,horizontalDistanceToText:o}}class Rt{constructor(o,n){this._context=o,this._viewHelper=n}mouseTargetIsWidget(o){const n=o.target,a=Ee.collect(n,this._viewHelper.viewDomNode);return it.isChildOfContentWidgets(a)||it.isChildOfOverflowingContentWidgets(a)?!0:!!it.isChildOfOverlayWidgets(a)}createMouseTarget(o,n,a,T){const R=new re(this._context,this._viewHelper,o),X=new tt(R,n,a,T);try{const me=Rt._createMouseTarget(R,X,!1);return me}catch(me){return X.fulfill(0)}}static _createMouseTarget(o,n,a){if(n.target===null){if(a)return n.fulfill(0);const X=Rt._doHitTest(o,n);return X.type===1?Rt.createMouseTargetFromHitTestPosition(o,n,X.spanNode,X.position,X.injectedText):this._createMouseTarget(o,n.withTarget(X.hitTarget),!0)}const T=n;let R=null;return R=R||Rt._hitTestContentWidget(o,T),R=R||Rt._hitTestOverlayWidget(o,T),R=R||Rt._hitTestMinimap(o,T),R=R||Rt._hitTestScrollbarSlider(o,T),R=R||Rt._hitTestViewZone(o,T),R=R||Rt._hitTestMargin(o,T),R=R||Rt._hitTestViewCursor(o,T),R=R||Rt._hitTestTextArea(o,T),R=R||Rt._hitTestViewLines(o,T,a),R=R||Rt._hitTestScrollbar(o,T),R||n.fulfill(0)}static _hitTestContentWidget(o,n){if(it.isChildOfContentWidgets(n.targetPath)||it.isChildOfOverflowingContentWidgets(n.targetPath)){const a=o.findAttribute(n.target,"widgetId");return a?n.fulfill(9,null,null,a):n.fulfill(0)}return null}static _hitTestOverlayWidget(o,n){if(it.isChildOfOverlayWidgets(n.targetPath)){const a=o.findAttribute(n.target,"widgetId");return a?n.fulfill(12,null,null,a):n.fulfill(0)}return null}static _hitTestViewCursor(o,n){if(n.target){const a=o.lastRenderData.lastViewCursorsRenderData;for(const T of a)if(n.target===T.domNode)return n.fulfill(6,T.position,null,{mightBeForeignElement:!1})}if(n.isInContentArea){const a=o.lastRenderData.lastViewCursorsRenderData,T=n.mouseContentHorizontalOffset,R=n.mouseVerticalOffset;for(const X of a){if(T<X.contentLeft)continue;if(T>X.contentLeft+X.width)continue;const me=o.getVerticalOffsetForLineNumber(X.position.lineNumber);if(me<=R&&R<=me+X.height)return n.fulfill(6,X.position,null,{mightBeForeignElement:!1})}}return null}static _hitTestViewZone(o,n){const a=o.getZoneAtCoord(n.mouseVerticalOffset);if(a){const T=n.isInContentArea?8:5;return n.fulfill(T,a.position,null,a)}return null}static _hitTestTextArea(o,n){return it.isTextArea(n.targetPath)?o.lastRenderData.lastTextareaPosition?n.fulfill(6,o.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1}):n.fulfill(1,o.lastRenderData.lastTextareaPosition):null}static _hitTestMargin(o,n){if(n.isInMarginArea){const a=o.getFullLineRangeAtCoord(n.mouseVerticalOffset),T=a.range.getStartPosition();let R=Math.abs(n.pos.x-n.editorPos.x);const X={isAfterLines:a.isAfterLines,glyphMarginLeft:o.layoutInfo.glyphMarginLeft,glyphMarginWidth:o.layoutInfo.glyphMarginWidth,lineNumbersWidth:o.layoutInfo.lineNumbersWidth,offsetX:R};return R-=o.layoutInfo.glyphMarginLeft,R<=o.layoutInfo.glyphMarginWidth?n.fulfill(2,T,a.range,X):(R-=o.layoutInfo.glyphMarginWidth,R<=o.layoutInfo.lineNumbersWidth?n.fulfill(3,T,a.range,X):(R-=o.layoutInfo.lineNumbersWidth,n.fulfill(4,T,a.range,X)))}return null}static _hitTestViewLines(o,n,a){if(!it.isChildOfViewLines(n.targetPath))return null;if(o.isInTopPadding(n.mouseVerticalOffset))return n.fulfill(7,new we.a(1,1),null,Et);if(o.isAfterLines(n.mouseVerticalOffset)||o.isInBottomPadding(n.mouseVerticalOffset)){const R=o.model.getLineCount(),X=o.model.getLineMaxColumn(R);return n.fulfill(7,new we.a(R,X),null,Et)}if(a){if(it.isStrictChildOfViewLines(n.targetPath)){const R=o.getLineNumberAtVerticalOffset(n.mouseVerticalOffset);if(o.model.getLineLength(R)===0){const me=o.getLineWidth(R),_e=It(n.mouseContentHorizontalOffset-me);return n.fulfill(7,new we.a(R,1),null,_e)}const X=o.getLineWidth(R);if(n.mouseContentHorizontalOffset>=X){const me=It(n.mouseContentHorizontalOffset-X),_e=new we.a(R,o.model.getLineMaxColumn(R));return n.fulfill(7,_e,null,me)}}return n.fulfill(0)}const T=Rt._doHitTest(o,n);return T.type===1?Rt.createMouseTargetFromHitTestPosition(o,n,T.spanNode,T.position,T.injectedText):this._createMouseTarget(o,n.withTarget(T.hitTarget),!0)}static _hitTestMinimap(o,n){if(it.isChildOfMinimap(n.targetPath)){const a=o.getLineNumberAtVerticalOffset(n.mouseVerticalOffset),T=o.model.getLineMaxColumn(a);return n.fulfill(11,new we.a(a,T))}return null}static _hitTestScrollbarSlider(o,n){if(it.isChildOfScrollableElement(n.targetPath)&&(n.target&&n.target.nodeType===1)){const a=n.target.className;if(a&&/\b(slider|scrollbar)\b/.test(a)){const T=o.getLineNumberAtVerticalOffset(n.mouseVerticalOffset),R=o.model.getLineMaxColumn(T);return n.fulfill(11,new we.a(T,R))}}return null}static _hitTestScrollbar(o,n){if(it.isChildOfScrollableElement(n.targetPath)){const a=o.getLineNumberAtVerticalOffset(n.mouseVerticalOffset),T=o.model.getLineMaxColumn(a);return n.fulfill(11,new we.a(a,T))}return null}getMouseColumn(o,n){const a=this._context.configuration.options,T=a.get(129),R=this._context.viewLayout.getCurrentScrollLeft()+n.x-o.x-T.contentLeft;return Rt._getMouseColumn(R,a.get(43).typicalHalfwidthCharacterWidth)}static _getMouseColumn(o,n){if(o<0)return 1;const a=Math.round(o/n);return a+1}static createMouseTargetFromHitTestPosition(o,n,a,T,R){const X=T.lineNumber,me=T.column,_e=o.getLineWidth(X);if(n.mouseContentHorizontalOffset>_e){const eo=It(n.mouseContentHorizontalOffset-_e);return n.fulfill(7,T,null,eo)}const He=o.visibleRangeForPosition(X,me);if(!He)return n.fulfill(0,T);const $e=He.left;if(n.mouseContentHorizontalOffset===$e)return n.fulfill(6,T,null,{mightBeForeignElement:!!R});const ot=[];if(ot.push({offset:He.left,column:me}),me>1){const eo=o.visibleRangeForPosition(X,me-1);eo&&ot.push({offset:eo.left,column:me-1})}const Ot=o.model.getLineMaxColumn(X);if(me<Ot){const eo=o.visibleRangeForPosition(X,me+1);eo&&ot.push({offset:eo.left,column:me+1})}ot.sort((eo,co)=>eo.offset-co.offset);const gt=n.pos.toClientCoordinates(),kt=a.getBoundingClientRect(),Kt=kt.left<=gt.clientX&>.clientX<=kt.right;for(let eo=1;eo<ot.length;eo++){const co=ot[eo-1],go=ot[eo];if(co.offset<=n.mouseContentHorizontalOffset&&n.mouseContentHorizontalOffset<=go.offset){const yo=new Oe.a(X,co.column,X,go.column);return n.fulfill(6,T,yo,{mightBeForeignElement:!Kt||!!R})}}return n.fulfill(6,T,null,{mightBeForeignElement:!Kt||!!R})}static _doHitTestWithCaretRangeFromPoint(o,n){const a=o.getLineNumberAtVerticalOffset(n.mouseVerticalOffset),T=o.getVerticalOffsetForLineNumber(a),R=T+Math.floor(o.lineHeight/2);let X=n.pos.y+(R-n.mouseVerticalOffset);X<=n.editorPos.y&&(X=n.editorPos.y+1),X>=n.editorPos.y+o.layoutInfo.height&&(X=n.editorPos.y+o.layoutInfo.height-1);const me=new O(n.pos.x,X),_e=this._actualDoHitTestWithCaretRangeFromPoint(o,me.toClientCoordinates());return _e.type===1?_e:this._actualDoHitTestWithCaretRangeFromPoint(o,n.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(o,n){const a=L.F(o.viewDomNode);let T;if(a?typeof a.caretRangeFromPoint=="undefined"?T=vo(a,n.clientX,n.clientY):T=a.caretRangeFromPoint(n.clientX,n.clientY):T=document.caretRangeFromPoint(n.clientX,n.clientY),!T||!T.startContainer)return new et;const R=T.startContainer;if(R.nodeType===R.TEXT_NODE){const X=R.parentNode,me=X?X.parentNode:null,_e=me?me.parentNode:null,He=_e&&_e.nodeType===_e.ELEMENT_NODE?_e.className:null;return He===ce.CLASS_NAME?Tt.createFromDOMInfo(o,X,T.startOffset):new et(R.parentNode)}else if(R.nodeType===R.ELEMENT_NODE){const X=R.parentNode,me=X?X.parentNode:null,_e=me&&me.nodeType===me.ELEMENT_NODE?me.className:null;return _e===ce.CLASS_NAME?Tt.createFromDOMInfo(o,R,R.textContent.length):new et(R)}return new et}static _doHitTestWithCaretPositionFromPoint(o,n){const a=document.caretPositionFromPoint(n.clientX,n.clientY);if(a.offsetNode.nodeType===a.offsetNode.TEXT_NODE){const T=a.offsetNode.parentNode,R=T?T.parentNode:null,X=R?R.parentNode:null,me=X&&X.nodeType===X.ELEMENT_NODE?X.className:null;return me===ce.CLASS_NAME?Tt.createFromDOMInfo(o,a.offsetNode.parentNode,a.offset):new et(a.offsetNode.parentNode)}if(a.offsetNode.nodeType===a.offsetNode.ELEMENT_NODE){const T=a.offsetNode.parentNode,R=T&&T.nodeType===T.ELEMENT_NODE?T.className:null,X=T?T.parentNode:null,me=X&&X.nodeType===X.ELEMENT_NODE?X.className:null;if(R===ce.CLASS_NAME){const _e=a.offsetNode.childNodes[Math.min(a.offset,a.offsetNode.childNodes.length-1)];if(_e)return Tt.createFromDOMInfo(o,_e,0)}else if(me===ce.CLASS_NAME)return Tt.createFromDOMInfo(o,a.offsetNode,0)}return new et(a.offsetNode)}static _snapToSoftTabBoundary(o,n){const a=n.getLineContent(o.lineNumber),{tabSize:T}=n.getTextModelOptions(),R=Ke.a.atomicPosition(a,o.column-1,T,2);return R!==-1?new we.a(o.lineNumber,R+1):o}static _doHitTest(o,n){let a=new et;if(typeof document.caretRangeFromPoint=="function"?a=this._doHitTestWithCaretRangeFromPoint(o,n):document.caretPositionFromPoint&&(a=this._doHitTestWithCaretPositionFromPoint(o,n.pos.toClientCoordinates())),a.type===1){const T=o.model.getInjectedTextAt(a.position),R=o.model.normalizePosition(a.position,2);(T||!R.equals(a.position))&&(a=new bt(R,a.spanNode,T))}return a.type===1&&o.stickyTabStops&&(a=new bt(this._snapToSoftTabBoundary(a.position,o.model),a.spanNode,a.injectedText)),a}}function vo(o,n,a){const T=document.createRange();let R=o.elementFromPoint(n,a);if(R!==null){for(;R&&R.firstChild&&R.firstChild.nodeType!==R.firstChild.TEXT_NODE&&R.lastChild&&R.lastChild.firstChild;)R=R.lastChild;const X=R.getBoundingClientRect(),me=window.getComputedStyle(R,null).getPropertyValue("font"),_e=R.innerText;let He=X.left,$e=0,ot;if(n>X.left+X.width)$e=_e.length;else{const Ot=Mo.getInstance();for(let gt=0;gt<_e.length+1;gt++){if(ot=Ot.getCharWidth(_e.charAt(gt),me)/2,He+=ot,n<He){$e=gt;break}He+=ot}}T.setStart(R.firstChild,$e),T.setEnd(R.firstChild,$e)}return T}class Mo{constructor(){this._cache={},this._canvas=document.createElement("canvas")}static getInstance(){return Mo._INSTANCE||(Mo._INSTANCE=new Mo),Mo._INSTANCE}getCharWidth(o,n){const a=o+n;if(this._cache[a])return this._cache[a];const T=this._canvas.getContext("2d");T.font=n;const R=T.measureText(o),X=R.width;return this._cache[a]=X,X}}Mo._INSTANCE=null;var xo=t("Yr1X");function Do(o){return function(n,a){let T=!1;return o&&(T=o.mouseTargetIsWidget(a)),T||a.preventDefault(),a}}class Lo extends te{constructor(o,n,a){super();this._context=o,this.viewController=n,this.viewHelper=a,this.mouseTargetFactory=new Rt(this._context,a),this._mouseDownOperation=this._register(new To(this._context,this.viewController,this.viewHelper,(X,me)=>this._createMouseTarget(X,me),X=>this._getMouseColumn(X))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(129).height;const T=new Z(this.viewHelper.viewDomNode);this._register(T.onContextMenu(this.viewHelper.viewDomNode,X=>this._onContextMenu(X,!0))),this._register(T.onMouseMoveThrottled(this.viewHelper.viewDomNode,X=>this._onMouseMove(X),Do(this.mouseTargetFactory),Lo.MOUSE_MOVE_MINIMUM_TIME)),this._register(T.onMouseUp(this.viewHelper.viewDomNode,X=>this._onMouseUp(X))),this._register(T.onMouseLeave(this.viewHelper.viewDomNode,X=>this._onMouseLeave(X))),this._register(T.onMouseDown(this.viewHelper.viewDomNode,X=>this._onMouseDown(X)));const R=X=>{if(this.viewController.emitMouseWheel(X),!this._context.configuration.options.get(67))return;const me=new E.b(X),_e=c.f?(X.metaKey||X.ctrlKey)&&!X.shiftKey&&!X.altKey:X.ctrlKey&&!X.metaKey&&!X.shiftKey&&!X.altKey;if(_e){const He=xo.a.getZoomLevel(),$e=me.deltaY>0?1:-1;xo.a.setZoomLevel(He+$e),me.preventDefault(),me.stopPropagation()}};this._register(L.i(this.viewHelper.viewDomNode,L.d.MOUSE_WHEEL,R,{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(o){if(o.hasChanged(129)){const n=this._context.configuration.options.get(129).height;this._height!==n&&(this._height=n,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(o){return this._mouseDownOperation.onCursorStateChanged(o),!1}onFocusChanged(o){return!1}onScrollChanged(o){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(o,n){const a=new k(o,n),T=a.toPageCoordinates(),R=Q(this.viewHelper.viewDomNode);return T.y<R.y||T.y>R.y+R.height||T.x<R.x||T.x>R.x+R.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),R,T,null)}_createMouseTarget(o,n){let a=o.target;if(!this.viewHelper.viewDomNode.contains(a)){const T=L.F(this.viewHelper.viewDomNode);T&&(a=T.elementsFromPoint(o.posx,o.posy).find(R=>this.viewHelper.viewDomNode.contains(R)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),o.editorPos,o.pos,n?a:null)}_getMouseColumn(o){return this.mouseTargetFactory.getMouseColumn(o.editorPos,o.pos)}_onContextMenu(o,n){this.viewController.emitContextMenu({event:o,target:this._createMouseTarget(o,n)})}_onMouseMove(o){if(this._mouseDownOperation.isActive())return;const n=o.timestamp;if(n<this.lastMouseLeaveTime)return;this.viewController.emitMouseMove({event:o,target:this._createMouseTarget(o,!0)})}_onMouseLeave(o){this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:o,target:null})}_onMouseUp(o){this.viewController.emitMouseUp({event:o,target:this._createMouseTarget(o,!0)})}_onMouseDown(o){const n=this._createMouseTarget(o,!0),a=n.type===6||n.type===7,T=n.type===2||n.type===3||n.type===4,R=n.type===3,X=this._context.configuration.options.get(97),me=n.type===8||n.type===5,_e=n.type===9;let He=o.leftButton||o.middleButton;c.f&&o.leftButton&&o.ctrlKey&&(He=!1);const $e=()=>{o.preventDefault(),this.viewHelper.focusTextArea()};if(He&&(a||R&&X))$e(),this._mouseDownOperation.start(n.type,o);else if(T)o.preventDefault();else if(me){const ot=n.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(ot.viewZoneId)&&($e(),this._mouseDownOperation.start(n.type,o),o.preventDefault())}else _e&&this.viewHelper.shouldSuppressMouseDownOnWidget(n.detail)&&($e(),o.preventDefault());this.viewController.emitMouseDown({event:o,target:n})}}Lo.MOUSE_MOVE_MINIMUM_TIME=100;class To extends d.a{constructor(o,n,a,T,R){super();this._context=o,this._viewController=n,this._viewHelper=a,this._createMouseTarget=T,this._getMouseColumn=R,this._mouseMoveMonitor=this._register(new $(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new y.g),this._mouseState=new Ht,this._currentSelection=new b.a(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(o){this._lastMouseEvent=o,this._mouseState.setModifiers(o);const n=this._findMousePosition(o,!0);if(!n)return;this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:o,target:n}):this._dispatchMouse(n,!0)}start(o,n){this._lastMouseEvent=n,this._mouseState.setStartedOnLineNumbers(o===3),this._mouseState.setStartButtons(n),this._mouseState.setModifiers(n);const a=this._findMousePosition(n,!0);if(!a||!a.position)return;this._mouseState.trySetCount(n.detail,a.position),n.detail=this._mouseState.count;const T=this._context.configuration.options;if(!T.get(80)&&T.get(31)&&!T.get(18)&&!this._mouseState.altKey&&n.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&a.type===6&&a.position&&this._currentSelection.containsPosition(a.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(n.target,n.buttons,Do(null),R=>this._onMouseDownThenMove(R),R=>{const X=this._findMousePosition(this._lastMouseEvent,!0);R&&R instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:X?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(a,n.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(n.target,n.buttons,Do(null),R=>this._onMouseDownThenMove(R),()=>this._stop()))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){if(!this._isActive)return;this._onScrollTimeout.setIfNotSet(()=>{if(!this._lastMouseEvent)return;const o=this._findMousePosition(this._lastMouseEvent,!1);if(!o)return;if(this._mouseState.isDragAndDrop)return;this._dispatchMouse(o,!0)},10)}onCursorStateChanged(o){this._currentSelection=o.selections[0]}_getPositionOutsideEditor(o){const n=o.editorPos,a=this._context.model,T=this._context.viewLayout,R=this._getMouseColumn(o);if(o.posy<n.y){const me=Math.max(T.getCurrentScrollTop()-(n.y-o.posy),0),_e=re.getZoneAtCoord(this._context,me);if(_e){const $e=this._helpPositionJumpOverViewZone(_e);if($e)return new Xe(null,13,R,$e)}const He=T.getLineNumberAtVerticalOffset(me);return new Xe(null,13,R,new we.a(He,1))}if(o.posy>n.y+n.height){const me=T.getCurrentScrollTop()+(o.posy-n.y),_e=re.getZoneAtCoord(this._context,me);if(_e){const $e=this._helpPositionJumpOverViewZone(_e);if($e)return new Xe(null,13,R,$e)}const He=T.getLineNumberAtVerticalOffset(me);return new Xe(null,13,R,new we.a(He,a.getLineMaxColumn(He)))}const X=T.getLineNumberAtVerticalOffset(T.getCurrentScrollTop()+(o.posy-n.y));return o.posx<n.x?new Xe(null,13,R,new we.a(X,1)):o.posx>n.x+n.width?new Xe(null,13,R,new we.a(X,a.getLineMaxColumn(X))):null}_findMousePosition(o,n){const a=this._getPositionOutsideEditor(o);if(a)return a;const T=this._createMouseTarget(o,n),R=T.position;if(!R)return null;if(T.type===8||T.type===5){const X=this._helpPositionJumpOverViewZone(T.detail);if(X)return new Xe(T.element,T.type,T.mouseColumn,X,null,T.detail)}return T}_helpPositionJumpOverViewZone(o){const n=new we.a(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),a=o.positionBefore,T=o.positionAfter;return a&&T?a.isBefore(n)?a:T:null}_dispatchMouse(o,n){if(!o.position)return;this._viewController.dispatchMouse({position:o.position,mouseColumn:o.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:n,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 Ht{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(o){this._altKey=o.altKey,this._ctrlKey=o.ctrlKey,this._metaKey=o.metaKey,this._shiftKey=o.shiftKey}setStartButtons(o){this._leftButton=o.leftButton,this._middleButton=o.middleButton}setStartedOnLineNumbers(o){this._startedOnLineNumbers=o}trySetCount(o,n){const a=new Date().getTime();a-this._lastSetMouseDownCountTime>Ht.CLEAR_MOUSE_DOWN_COUNT_TIME&&(o=1),this._lastSetMouseDownCountTime=a,o>this._lastMouseDownCount+1&&(o=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(n)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=n,this._lastMouseDownCount=Math.min(o,this._lastMouseDownPositionEqualCount)}}Ht.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var Mt=t("CjF5"),Ue=t("5TxY");class dt extends Lo{constructor(o,n,a){super(o,n,a);this._register(p.b.addTarget(this.viewHelper.linesContentDomNode)),this._register(L.i(this.viewHelper.linesContentDomNode,p.a.Tap,R=>this.onTap(R))),this._register(L.i(this.viewHelper.linesContentDomNode,p.a.Change,R=>this.onChange(R))),this._register(L.i(this.viewHelper.linesContentDomNode,p.a.Contextmenu,R=>this._onContextMenu(new H(R,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(L.i(this.viewHelper.linesContentDomNode,"pointerdown",R=>{const X=R.pointerType;if(X==="mouse"){this._lastPointerType="mouse";return}else X==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const T=new oe(this.viewHelper.viewDomNode);this._register(T.onPointerMoveThrottled(this.viewHelper.viewDomNode,R=>this._onMouseMove(R),Do(this.mouseTargetFactory),Lo.MOUSE_MOVE_MINIMUM_TIME)),this._register(T.onPointerUp(this.viewHelper.viewDomNode,R=>this._onMouseUp(R))),this._register(T.onPointerLeave(this.viewHelper.viewDomNode,R=>this._onMouseLeave(R))),this._register(T.onPointerDown(this.viewHelper.viewDomNode,R=>this._onMouseDown(R)))}onTap(o){if(!o.initialTarget||!this.viewHelper.linesContentDomNode.contains(o.initialTarget))return;o.preventDefault(),this.viewHelper.focusTextArea();const n=this._createMouseTarget(new H(o,this.viewHelper.viewDomNode),!1);n.position&&this.viewController.dispatchMouse({position:n.position,mouseColumn:n.position.column,startedOnLineNumbers:!1,mouseDownCount:o.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(o){this._lastPointerType==="touch"&&this._context.model.deltaScrollNow(-o.translationX,-o.translationY)}_onMouseDown(o){if(o.browserEvent.pointerType==="touch")return;super._onMouseDown(o)}}class Ut extends Lo{constructor(o,n,a){super(o,n,a);this._register(p.b.addTarget(this.viewHelper.linesContentDomNode)),this._register(L.i(this.viewHelper.linesContentDomNode,p.a.Tap,T=>this.onTap(T))),this._register(L.i(this.viewHelper.linesContentDomNode,p.a.Change,T=>this.onChange(T))),this._register(L.i(this.viewHelper.linesContentDomNode,p.a.Contextmenu,T=>this._onContextMenu(new H(T,this.viewHelper.viewDomNode),!1)))}onTap(o){o.preventDefault(),this.viewHelper.focusTextArea();const n=this._createMouseTarget(new H(o,this.viewHelper.viewDomNode),!1);if(n.position){const a=document.createEvent("CustomEvent");a.initEvent(Ue.d.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(a),this.viewController.moveTo(n.position)}}onChange(o){this._context.model.deltaScrollNow(-o.translationX,-o.translationY)}}class Ye extends d.a{constructor(o,n,a){super();c.c&&Mt.a.pointerEvents?this.handler=this._register(new dt(o,n,a)):window.TouchEvent?this.handler=this._register(new Ut(o,n,a)):this.handler=this._register(new Lo(o,n,a))}getTargetAtClientPoint(o,n){return this.handler.getTargetAtClientPoint(o,n)}}var qe=t("VvMK"),ct=t("N0LK"),_t=t("Comh"),Pt=t("Krc3");class Wt extends te{}var Vt=t("kYye"),so=t("t9D7");class wo extends Wt{constructor(o){super();this._context=o,this._readConfig(),this._lastCursorModelPosition=new we.a(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const o=this._context.configuration.options;this._lineHeight=o.get(58);const n=o.get(59);this._renderLineNumbers=n.renderType,this._renderCustomLineNumbers=n.renderFn,this._renderFinalNewline=o.get(83);const a=o.get(129);this._lineNumbersLeft=a.lineNumbersLeft,this._lineNumbersWidth=a.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(o){return this._readConfig(),!0}onCursorStateChanged(o){const n=o.selections[0].getPosition();this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(n);let a=!1;return this._activeLineNumber!==n.lineNumber&&(this._activeLineNumber=n.lineNumber,a=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(a=!0),a}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollTopChanged}onZonesChanged(o){return!0}_getLineRenderLineNumber(o){const n=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new we.a(o,1));if(n.column!==1)return"";const a=n.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(a);if(this._renderLineNumbers===2){const T=Math.abs(this._lastCursorModelPosition.lineNumber-a);return T===0?'<span class="relative-current-line-number">'+a+"</span>":String(T)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===a||a%10===0?String(a):"":String(a)}prepareRender(o){if(this._renderLineNumbers===0){this._renderResult=null;return}const n=c.d?this._lineHeight%2===0?" lh-even":" lh-odd":"",a=o.visibleRange.startLineNumber,T=o.visibleRange.endLineNumber,R='<div class="'+wo.CLASS_NAME+n+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">',X=this._context.model.getLineCount(),me=[];for(let _e=a;_e<=T;_e++){const He=_e-a;if(!this._renderFinalNewline&&(_e===X&&this._context.model.getLineLength(_e)===0)){me[He]="";continue}const $e=this._getLineRenderLineNumber(_e);$e?_e===this._activeLineNumber?me[He]='<div class="active-line-number '+wo.CLASS_NAME+n+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">'+$e+"</div>":me[He]=R+$e+"</div>":me[He]=""}this._renderResult=me}render(o,n){if(!this._renderResult)return"";const a=n-o;return a<0||a>=this._renderResult.length?"":this._renderResult[a]}}wo.CLASS_NAME="line-numbers",Object(so.f)((o,n)=>{const a=o.getColor(Vt.D);a&&n.addRule(`.monaco-editor .line-numbers { color: ${a}; }`);const T=o.getColor(Vt.b);T&&n.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${T}; }`)});class No extends ne{constructor(o){super(o);const n=this._context.configuration.options,a=n.get(129);this._canUseLayerHinting=!n.get(28),this._contentLeft=a.contentLeft,this._glyphMarginLeft=a.glyphMarginLeft,this._glyphMarginWidth=a.glyphMarginWidth,this._domNode=Object(h.b)(document.createElement("div")),this._domNode.setClassName(No.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=Object(h.b)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(No.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._canUseLayerHinting=!n.get(28),this._contentLeft=a.contentLeft,this._glyphMarginLeft=a.glyphMarginLeft,this._glyphMarginWidth=a.glyphMarginWidth,!0}onScrollChanged(o){return super.onScrollChanged(o)||o.scrollTopChanged}prepareRender(o){}render(o){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const n=o.scrollTop-o.bigNumbersDelta;this._domNode.setTop(-n);const a=Math.min(o.scrollHeight,1e6);this._domNode.setHeight(a),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(a)}}No.CLASS_NAME="glyph-margin",No.OUTER_CLASS_NAME="margin";var di=t("5v8Y"),_o=t("51su");class no{constructor(o,n,a){this._visibleTextAreaBrand=void 0,this.top=o,this.left=n,this.width=a}setWidth(o){return new no(this.top,this.left,o)}}const Lt=_.g;class xt extends ne{constructor(o,n,a){super(o);this._primaryCursorPosition=new we.a(1,1),this._primaryCursorVisibleRange=null,this._viewController=n,this._viewHelper=a,this._scrollLeft=0,this._scrollTop=0;const T=this._context.configuration.options,R=T.get(129);this._setAccessibilityOptions(T),this._contentLeft=R.contentLeft,this._contentWidth=R.contentWidth,this._contentHeight=R.height,this._fontInfo=T.get(43),this._lineHeight=T.get(58),this._emptySelectionClipboard=T.get(32),this._copyWithSyntaxHighlighting=T.get(21),this._visibleTextArea=null,this._selections=[new b.a(1,1,1,1)],this._modelSelections=[new b.a(1,1,1,1)],this._lastRenderPosition=null,this.textArea=Object(h.b)(document.createElement("textarea")),Ee.write(this.textArea,6),this.textArea.setClassName(`inputarea ${_o.a}`),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(T)),this.textArea.setAttribute("tabindex",String(T.get(111))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",I.a("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),T.get(30)&&T.get(80)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=Object(h.b)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const X={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:_e=>this._context.model.getLineMaxColumn(_e),getValueInRange:(_e,He)=>this._context.model.getValueInRange(_e,He)},me={getDataToCopy:_e=>{const He=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,c.i),$e=this._context.model.getEOL(),ot=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),Ot=Array.isArray(He)?He:null,gt=Array.isArray(He)?He.join($e):He;let kt,Kt=null;if(_e&&(Ue.a.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&>.length<65536)){const eo=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);eo&&(kt=eo.html,Kt=eo.mode)}return{isFromEmptySelection:ot,multicursorText:Ot,text:gt,html:kt,mode:Kt}},getScreenReaderContent:_e=>{if(this._accessibilitySupport===1){if(c.f){const He=this._selections[0];if(He.isEmpty()){const $e=He.getStartPosition();let ot=this._getWordBeforePosition($e);if(ot.length===0&&(ot=this._getCharacterBeforePosition($e)),ot.length>0)return new _t.b(ot,ot.length,ot.length,$e,$e)}}return _t.b.EMPTY}if(_.e){const He=this._selections[0];if(He.isEmpty()){const $e=He.getStartPosition(),[ot,Ot]=this._getAndroidWordAtPosition($e);if(ot.length>0)return new _t.b(ot,Ot,Ot,$e,$e)}return _t.b.EMPTY}return _t.a.fromEditorSelection(_e,X,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(_e,He,$e)=>this._context.model.deduceModelPositionRelativeToViewPosition(_e,He,$e)};this._textAreaInput=this._register(new Ue.c(me,this.textArea)),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 He=!1,$e=null,ot=null;_e.metadata&&(He=this._emptySelectionClipboard&&!!_e.metadata.isFromEmptySelection,$e=typeof _e.metadata.multicursorText!="undefined"?_e.metadata.multicursorText:null,ot=_e.metadata.mode),this._viewController.paste(_e.text,He,$e,ot)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(_e=>{_e.replacePrevCharCnt||_e.replaceNextCharCnt||_e.positionDelta?(_t.c&&console.log(` => compositionType: <<${_e.text}>>, ${_e.replacePrevCharCnt}, ${_e.replaceNextCharCnt}, ${_e.positionDelta}`),this._viewController.compositionType(_e.text,_e.replacePrevCharCnt,_e.replaceNextCharCnt,_e.positionDelta)):(_t.c&&console.log(` => type: <<${_e.text}>>`),this._viewController.type(_e.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(_e=>{this._viewController.setSelection(_e)})),this._register(this._textAreaInput.onCompositionStart(_e=>{const He=this._selections[0].startLineNumber,$e=this._selections[0].startColumn+_e.revealDeltaColumns;this._context.model.revealRange("keyboard",!0,new Oe.a(He,$e,He,$e),0,1);const ot=this._viewHelper.visibleRangeForPositionRelativeToEditor(He,$e);ot&&(this._visibleTextArea=new no(this._context.viewLayout.getVerticalOffsetForLineNumber(He),ot.left,Lt?0:1),this._render()),this.textArea.setClassName(`inputarea ${_o.a} ime-input`),this._viewController.compositionStart(),this._context.model.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(_e=>{if(!this._visibleTextArea)return;this._visibleTextArea=this._visibleTextArea.setWidth(Nt(_e.data,this._fontInfo)),this._render()})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${_o.a}`),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(o){const n='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',a=this._context.model.getLineContent(o.lineNumber),T=Object(di.a)(n);let R=!0,X=o.column,me=!0,_e=o.column,He=0;for(;He<50&&(R||me);){if(R&&X<=1&&(R=!1),R){const $e=a.charCodeAt(X-2),ot=T.get($e);ot!==0?R=!1:X--}if(me&&_e>a.length&&(me=!1),me){const $e=a.charCodeAt(_e-1),ot=T.get($e);ot!==0?me=!1:_e++}He++}return[a.substring(X-1,_e-1),o.column-X]}_getWordBeforePosition(o){const n=this._context.model.getLineContent(o.lineNumber),a=Object(di.a)(this._context.configuration.options.get(115));let T=o.column,R=0;for(;T>1;){const X=n.charCodeAt(T-2),me=a.get(X);if(me!==0||R>50)return n.substring(T-1,o.column-1);R++,T--}return n.substring(0,o.column-1)}_getCharacterBeforePosition(o){if(o.column>1){const n=this._context.model.getLineContent(o.lineNumber),a=n.charAt(o.column-2);if(!ct.E(a.charCodeAt(0)))return a}return""}_getAriaLabel(o){const n=o.get(2);return n===1?I.a("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",c.d?"Shift+Alt+F1":"Alt+F1"):o.get(4)}_setAccessibilityOptions(o){this._accessibilitySupport=o.get(2);const n=o.get(3);this._accessibilitySupport===2&&n===ze.g.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=n}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._setAccessibilityOptions(n),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._contentHeight=a.height,this._fontInfo=n.get(43),this._lineHeight=n.get(58),this._emptySelectionClipboard=n.get(32),this._copyWithSyntaxHighlighting=n.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(n)),this.textArea.setAttribute("tabindex",String(n.get(111))),(o.hasChanged(30)||o.hasChanged(80))&&(n.get(30)&&n.get(80)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),o.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(o){return this._selections=o.selections.slice(0),this._modelSelections=o.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return this._scrollLeft=o.scrollLeft,this._scrollTop=o.scrollTop,!0}onZonesChanged(o){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(o){o.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",o.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),o.role&&this.textArea.setAttribute("role",o.role)}prepareRender(o){this._primaryCursorPosition=new we.a(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=o.visibleRangeForPosition(this._primaryCursorPosition)}render(o){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const o=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(o<this._contentLeft||o>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const n=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(n<0||n>this._contentHeight){this._renderAtTopLeft();return}if(c.f){this._renderInsideEditor(this._primaryCursorPosition,n,o,Lt?0:1,this._lineHeight);return}this._renderInsideEditor(this._primaryCursorPosition,n,o,Lt?0:1,Lt?0:1)}_renderInsideEditor(o,n,a,T,R){this._lastRenderPosition=o;const X=this.textArea,me=this.textAreaCover;S.a.applyFontInfo(X,this._fontInfo),X.setTop(n),X.setLeft(a),X.setWidth(T),X.setHeight(R),me.setTop(0),me.setLeft(0),me.setWidth(0),me.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const o=this.textArea,n=this.textAreaCover;if(S.a.applyFontInfo(o,this._fontInfo),o.setTop(0),o.setLeft(0),n.setTop(0),n.setLeft(0),Lt){o.setWidth(0),o.setHeight(0),n.setWidth(0),n.setHeight(0);return}o.setWidth(1),o.setHeight(1),n.setWidth(1),n.setHeight(1);const a=this._context.configuration.options;a.get(49)?n.setClassName("monaco-editor-background textAreaCover "+No.OUTER_CLASS_NAME):a.get(59).renderType!==0?n.setClassName("monaco-editor-background textAreaCover "+wo.CLASS_NAME):n.setClassName("monaco-editor-background textAreaCover")}}function Nt(o,n){const a=document.createElement("canvas"),T=a.getContext("2d");T.font=rt(n);const R=T.measureText(o);return _.g?R.width+2:R.width}function rt(o){return lt("normal",o.fontWeight,o.fontSize,o.lineHeight,o.fontFamily)}function lt(o,n,a,T,R){return`${o} normal ${n} ${a}px / ${T}px ${R}`}var pt=t("1YUG");class St{constructor(o,n,a,T){this.configuration=o,this.viewModel=n,this.userInputEvents=a,this.commandDelegate=T}paste(o,n,a,T){this.commandDelegate.paste(o,n,a,T)}type(o){this.commandDelegate.type(o)}compositionType(o,n,a,T){this.commandDelegate.compositionType(o,n,a,T)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(o){pt.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:o})}_validateViewColumn(o){const n=this.viewModel.getLineMinColumn(o.lineNumber);return o.column<n?new we.a(o.lineNumber,n):o}_hasMulticursorModifier(o){switch(this.configuration.options.get(69)){case"altKey":return o.altKey;case"ctrlKey":return o.ctrlKey;case"metaKey":return o.metaKey;default:return!1}}_hasNonMulticursorModifier(o){switch(this.configuration.options.get(69)){case"altKey":return o.ctrlKey||o.metaKey;case"ctrlKey":return o.altKey||o.metaKey;case"metaKey":return o.ctrlKey||o.altKey;default:return!1}}dispatchMouse(o){const n=this.configuration.options,a=c.d&&n.get(95),T=n.get(18);o.middleButton&&!a?this._columnSelect(o.position,o.mouseColumn,o.inSelectionMode):o.startedOnLineNumbers?this._hasMulticursorModifier(o)?o.inSelectionMode?this._lastCursorLineSelect(o.position):this._createCursor(o.position,!0):o.inSelectionMode?this._lineSelectDrag(o.position):this._lineSelect(o.position):o.mouseDownCount>=4?this._selectAll():o.mouseDownCount===3?this._hasMulticursorModifier(o)?o.inSelectionMode?this._lastCursorLineSelectDrag(o.position):this._lastCursorLineSelect(o.position):o.inSelectionMode?this._lineSelectDrag(o.position):this._lineSelect(o.position):o.mouseDownCount===2?this._hasMulticursorModifier(o)?this._lastCursorWordSelect(o.position):o.inSelectionMode?this._wordSelectDrag(o.position):this._wordSelect(o.position):this._hasMulticursorModifier(o)?this._hasNonMulticursorModifier(o)||(o.shiftKey?this._columnSelect(o.position,o.mouseColumn,!0):o.inSelectionMode?this._lastCursorMoveToSelect(o.position):this._createCursor(o.position,!1)):o.inSelectionMode?o.altKey?this._columnSelect(o.position,o.mouseColumn,!0):T?this._columnSelect(o.position,o.mouseColumn,!0):this._moveToSelect(o.position):this.moveTo(o.position)}_usualArgs(o){return o=this._validateViewColumn(o),{source:"mouse",position:this._convertViewToModelPosition(o),viewPosition:o}}moveTo(o){pt.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_moveToSelect(o){pt.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_columnSelect(o,n,a){o=this._validateViewColumn(o),pt.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(o),viewPosition:o,mouseColumn:n,doColumnSelect:a})}_createCursor(o,n){o=this._validateViewColumn(o),pt.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(o),viewPosition:o,wholeLine:n})}_lastCursorMoveToSelect(o){pt.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_wordSelect(o){pt.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_wordSelectDrag(o){pt.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_lastCursorWordSelect(o){pt.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_lineSelect(o){pt.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_lineSelectDrag(o){pt.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_lastCursorLineSelect(o){pt.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_lastCursorLineSelectDrag(o){pt.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(o))}_selectAll(){pt.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(o){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(o)}emitKeyDown(o){this.userInputEvents.emitKeyDown(o)}emitKeyUp(o){this.userInputEvents.emitKeyUp(o)}emitContextMenu(o){this.userInputEvents.emitContextMenu(o)}emitMouseMove(o){this.userInputEvents.emitMouseMove(o)}emitMouseLeave(o){this.userInputEvents.emitMouseLeave(o)}emitMouseUp(o){this.userInputEvents.emitMouseUp(o)}emitMouseDown(o){this.userInputEvents.emitMouseDown(o)}emitMouseDrag(o){this.userInputEvents.emitMouseDrag(o)}emitMouseDrop(o){this.userInputEvents.emitMouseDrop(o)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(o){this.userInputEvents.emitMouseWheel(o)}}class Qt{constructor(o){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=o}emitKeyDown(o){this.onKeyDown&&this.onKeyDown(o)}emitKeyUp(o){this.onKeyUp&&this.onKeyUp(o)}emitContextMenu(o){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(o))}emitMouseMove(o){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(o))}emitMouseLeave(o){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(o))}emitMouseDown(o){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(o))}emitMouseUp(o){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(o))}emitMouseDrag(o){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(o))}emitMouseDrop(o){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(o))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(o){this.onMouseWheel&&this.onMouseWheel(o)}_convertViewToModelMouseEvent(o){return o.target?{event:o.event,target:this._convertViewToModelMouseTarget(o.target)}:o}_convertViewToModelMouseTarget(o){return Qt.convertViewToModelMouseTarget(o,this._coordinatesConverter)}static convertViewToModelMouseTarget(o,n){return new bo(o.element,o.type,o.mouseColumn,o.position?n.convertViewPositionToModelPosition(o.position):null,o.range?n.convertViewRangeToModelRange(o.range):null,o.detail)}}class bo{constructor(o,n,a,T,R,X){this.element=o,this.type=n,this.mouseColumn=a,this.position=T,this.range=R,this.detail=X}toString(){return Xe.toString(this)}}var qt=t("erNZ"),Eo;class Ro{constructor(o){this._createLine=o,this._set(1,[])}flush(){this._set(1,[])}_set(o,n){this._lines=n,this._rendLineNumberStart=o}_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(o){const n=o-this._rendLineNumberStart;if(n<0||n>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[n]}onLinesDeleted(o,n){if(this.getCount()===0)return null;const a=this.getStartLineNumber(),T=this.getEndLineNumber();if(n<a){const _e=n-o+1;return this._rendLineNumberStart-=_e,null}if(o>T)return null;let R=0,X=0;for(let _e=a;_e<=T;_e++){const He=_e-this._rendLineNumberStart;o<=_e&&_e<=n&&(X===0?(R=He,X=1):X++)}if(o<a){let _e=0;n<a?_e=n-o+1:_e=a-o,this._rendLineNumberStart-=_e}const me=this._lines.splice(R,X);return me}onLinesChanged(o,n){if(this.getCount()===0)return!1;const a=this.getStartLineNumber(),T=this.getEndLineNumber();let R=!1;for(let X=o;X<=n;X++)X>=a&&X<=T&&(this._lines[X-this._rendLineNumberStart].onContentChanged(),R=!0);return R}onLinesInserted(o,n){if(this.getCount()===0)return null;const a=n-o+1,T=this.getStartLineNumber(),R=this.getEndLineNumber();if(o<=T)return this._rendLineNumberStart+=a,null;if(o>R)return null;if(a+o>R){const ot=this._lines.splice(o-this._rendLineNumberStart,R-o+1);return ot}const X=[];for(let ot=0;ot<a;ot++)X[ot]=this._createLine();const me=o-this._rendLineNumberStart,_e=this._lines.slice(0,me),He=this._lines.slice(me,this._lines.length-a),$e=this._lines.slice(this._lines.length-a,this._lines.length);return this._lines=_e.concat(X).concat(He),$e}onTokensChanged(o){if(this.getCount()===0)return!1;const n=this.getStartLineNumber(),a=this.getEndLineNumber();let T=!1;for(let R=0,X=o.length;R<X;R++){const me=o[R];if(me.toLineNumber<n||me.fromLineNumber>a)continue;const _e=Math.max(n,me.fromLineNumber),He=Math.min(a,me.toLineNumber);for(let $e=_e;$e<=He;$e++){const ot=$e-this._rendLineNumberStart;this._lines[ot].onTokensChanged(),T=!0}}return T}}class zo{constructor(o){this._host=o,this.domNode=this._createDomNode(),this._linesCollection=new Ro(()=>this._host.createVisibleLine())}_createDomNode(){const o=Object(h.b)(document.createElement("div"));return o.setClassName("view-layer"),o.setPosition("absolute"),o.domNode.setAttribute("role","presentation"),o.domNode.setAttribute("aria-hidden","true"),o}onConfigurationChanged(o){return!!o.hasChanged(129)}onFlushed(o){return this._linesCollection.flush(),!0}onLinesChanged(o){return this._linesCollection.onLinesChanged(o.fromLineNumber,o.toLineNumber)}onLinesDeleted(o){const n=this._linesCollection.onLinesDeleted(o.fromLineNumber,o.toLineNumber);if(n)for(let a=0,T=n.length;a<T;a++){const R=n[a].getDomNode();R&&this.domNode.domNode.removeChild(R)}return!0}onLinesInserted(o){const n=this._linesCollection.onLinesInserted(o.fromLineNumber,o.toLineNumber);if(n)for(let a=0,T=n.length;a<T;a++){const R=n[a].getDomNode();R&&this.domNode.domNode.removeChild(R)}return!0}onScrollChanged(o){return o.scrollTopChanged}onTokensChanged(o){return this._linesCollection.onTokensChanged(o.ranges)}onZonesChanged(o){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(o){return this._linesCollection.getLine(o)}renderLines(o){const n=this._linesCollection._get(),a=new Bo(this.domNode.domNode,this._host,o),T={rendLineNumberStart:n.rendLineNumberStart,lines:n.lines,linesLength:n.lines.length},R=a.render(T,o.startLineNumber,o.endLineNumber,o.relativeVerticalOffset);this._linesCollection._set(R.rendLineNumberStart,R.lines)}}class Bo{constructor(o,n,a){this.domNode=o,this.host=n,this.viewportData=a}render(o,n,a,T){const R={rendLineNumberStart:o.rendLineNumberStart,lines:o.lines.slice(0),linesLength:o.linesLength};if(R.rendLineNumberStart+R.linesLength-1<n||a<R.rendLineNumberStart){R.rendLineNumberStart=n,R.linesLength=a-n+1,R.lines=[];for(let X=n;X<=a;X++)R.lines[X-n]=this.host.createVisibleLine();return this._finishRendering(R,!0,T),R}if(this._renderUntouchedLines(R,Math.max(n-R.rendLineNumberStart,0),Math.min(a-R.rendLineNumberStart,R.linesLength-1),T,n),R.rendLineNumberStart>n){const X=n,me=Math.min(a,R.rendLineNumberStart-1);X<=me&&(this._insertLinesBefore(R,X,me,T,n),R.linesLength+=me-X+1)}else if(R.rendLineNumberStart<n){const X=Math.min(R.linesLength,n-R.rendLineNumberStart);X>0&&(this._removeLinesBefore(R,X),R.linesLength-=X)}if(R.rendLineNumberStart=n,R.rendLineNumberStart+R.linesLength-1<a){const X=R.rendLineNumberStart+R.linesLength,me=a;X<=me&&(this._insertLinesAfter(R,X,me,T,n),R.linesLength+=me-X+1)}else if(R.rendLineNumberStart+R.linesLength-1>a){const X=Math.max(0,a-R.rendLineNumberStart+1),me=R.linesLength-1,_e=me-X+1;_e>0&&(this._removeLinesAfter(R,_e),R.linesLength-=_e)}return this._finishRendering(R,!1,T),R}_renderUntouchedLines(o,n,a,T,R){const X=o.rendLineNumberStart,me=o.lines;for(let _e=n;_e<=a;_e++){const He=X+_e;me[_e].layoutLine(He,T[He-R])}}_insertLinesBefore(o,n,a,T,R){const X=[];let me=0;for(let _e=n;_e<=a;_e++)X[me++]=this.host.createVisibleLine();o.lines=X.concat(o.lines)}_removeLinesBefore(o,n){for(let a=0;a<n;a++){const T=o.lines[a].getDomNode();T&&this.domNode.removeChild(T)}o.lines.splice(0,n)}_insertLinesAfter(o,n,a,T,R){const X=[];let me=0;for(let _e=n;_e<=a;_e++)X[me++]=this.host.createVisibleLine();o.lines=o.lines.concat(X)}_removeLinesAfter(o,n){const a=o.linesLength-n;for(let T=0;T<n;T++){const R=o.lines[a+T].getDomNode();R&&this.domNode.removeChild(R)}o.lines.splice(a,n)}_finishRenderingNewLines(o,n,a,T){Bo._ttPolicy&&(a=Bo._ttPolicy.createHTML(a));const R=this.domNode.lastChild;n||!R?this.domNode.innerHTML=a:R.insertAdjacentHTML("afterend",a);let X=this.domNode.lastChild;for(let me=o.linesLength-1;me>=0;me--){const _e=o.lines[me];T[me]&&(_e.setDomNode(X),X=X.previousSibling)}}_finishRenderingInvalidLines(o,n,a){const T=document.createElement("div");Bo._ttPolicy&&(n=Bo._ttPolicy.createHTML(n)),T.innerHTML=n;for(let R=0;R<o.linesLength;R++){const X=o.lines[R];if(a[R]){const me=T.firstChild,_e=X.getDomNode();_e.parentNode.replaceChild(me,_e),X.setDomNode(me)}}}_finishRendering(o,n,a){const T=Bo._sb,R=o.linesLength,X=o.lines,me=o.rendLineNumberStart,_e=[];{T.reset();let He=!1;for(let $e=0;$e<R;$e++){const ot=X[$e];_e[$e]=!1;const Ot=ot.getDomNode();if(Ot)continue;const gt=ot.renderLine($e+me,a[$e],this.viewportData,T);if(!gt)continue;_e[$e]=!0,He=!0}He&&this._finishRenderingNewLines(o,n,T.build(),_e)}{T.reset();let He=!1;const $e=[];for(let ot=0;ot<R;ot++){const Ot=X[ot];if($e[ot]=!1,_e[ot])continue;const gt=Ot.renderLine(ot+me,a[ot],this.viewportData,T);if(!gt)continue;$e[ot]=!0,He=!0}He&&this._finishRenderingInvalidLines(o,T.build(),$e)}}}Bo._ttPolicy=(Eo=window.trustedTypes)===null||Eo===void 0?void 0:Eo.createPolicy("editorViewLayer",{createHTML:o=>o}),Bo._sb=Object(qt.a)(1e5);class Jt extends ne{constructor(o){super(o);this._visibleLines=new zo(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let o=0,n=this._dynamicOverlays.length;o<n;o++){const a=this._dynamicOverlays[o];if(a.shouldRender())return!0}return!1}dispose(){super.dispose();for(let o=0,n=this._dynamicOverlays.length;o<n;o++){const a=this._dynamicOverlays[o];a.dispose()}this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new fo(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(o){this._dynamicOverlays.push(o)}onConfigurationChanged(o){this._visibleLines.onConfigurationChanged(o);const n=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();for(let T=n;T<=a;T++){const R=this._visibleLines.getVisibleLine(T);R.onConfigurationChanged(o)}return!0}onFlushed(o){return this._visibleLines.onFlushed(o)}onFocusChanged(o){return this._isFocused=o.isFocused,!0}onLinesChanged(o){return this._visibleLines.onLinesChanged(o)}onLinesDeleted(o){return this._visibleLines.onLinesDeleted(o)}onLinesInserted(o){return this._visibleLines.onLinesInserted(o)}onScrollChanged(o){return this._visibleLines.onScrollChanged(o)||!0}onTokensChanged(o){return this._visibleLines.onTokensChanged(o)}onZonesChanged(o){return this._visibleLines.onZonesChanged(o)}prepareRender(o){const n=this._dynamicOverlays.filter(a=>a.shouldRender());for(let a=0,T=n.length;a<T;a++){const R=n[a];R.prepareRender(o),R.onDidRender()}}render(o){this._viewOverlaysRender(o),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(o){this._visibleLines.renderLines(o.viewportData)}}class fo{constructor(o,n){this._configuration=o,this._lineHeight=this._configuration.options.get(58),this._dynamicOverlays=n,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(o){this._domNode=Object(h.b)(o)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(o){this._lineHeight=this._configuration.options.get(58)}renderLine(o,n,a,T){let R="";for(let X=0,me=this._dynamicOverlays.length;X<me;X++){const _e=this._dynamicOverlays[X];R+=_e.render(a.startLineNumber,o)}return this._renderedContent===R?!1:(this._renderedContent=R,T.appendASCIIString('<div style="position:absolute;top:'),T.appendASCIIString(String(n)),T.appendASCIIString("px;width:100%;height:"),T.appendASCIIString(String(this._lineHeight)),T.appendASCIIString('px;">'),T.appendASCIIString(R),T.appendASCIIString("</div>"),!0)}layoutLine(o,n){this._domNode&&(this._domNode.setTop(n),this._domNode.setHeight(this._lineHeight))}}class ri extends Jt{constructor(o){super(o);const n=this._context.configuration.options,a=n.get(129);this._contentWidth=a.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._contentWidth=a.contentWidth,super.onConfigurationChanged(o)||!0}onScrollChanged(o){return super.onScrollChanged(o)||o.scrollWidthChanged}_viewOverlaysRender(o){super._viewOverlaysRender(o),this.domNode.setWidth(Math.max(o.scrollWidth,this._contentWidth))}}class Zo extends Jt{constructor(o){super(o);const n=this._context.configuration.options,a=n.get(129);this._contentLeft=a.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),S.a.applyFontInfo(this.domNode,n.get(43))}onConfigurationChanged(o){const n=this._context.configuration.options;S.a.applyFontInfo(this.domNode,n.get(43));const a=n.get(129);return this._contentLeft=a.contentLeft,super.onConfigurationChanged(o)||!0}onScrollChanged(o){return super.onScrollChanged(o)||o.scrollHeightChanged}_viewOverlaysRender(o){super._viewOverlaysRender(o);const n=Math.min(o.scrollHeight,1e6);this.domNode.setHeight(n),this.domNode.setWidth(this._contentLeft)}}class ci{constructor(o,n){this._coordinateBrand=void 0,this.top=o,this.left=n}}class ki extends ne{constructor(o,n){super(o);this._viewDomNode=n,this._widgets={},this.domNode=Object(h.b)(document.createElement("div")),Ee.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=Object(h.b)(document.createElement("div")),Ee.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(o){const n=Object.keys(this._widgets);for(const a of n)this._widgets[a].onConfigurationChanged(o);return!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLineMappingChanged(o){const n=Object.keys(this._widgets);for(const a of n)this._widgets[a].onLineMappingChanged(o);return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return!0}onZonesChanged(o){return!0}addWidget(o){const n=new wi(this._context,this._viewDomNode,o);this._widgets[n.id]=n,n.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(n.domNode):this.domNode.appendChild(n.domNode),this.setShouldRender()}setWidgetPosition(o,n,a){const T=this._widgets[o.getId()];T.setPosition(n,a),this.setShouldRender()}removeWidget(o){const n=o.getId();if(this._widgets.hasOwnProperty(n)){const a=this._widgets[n];delete this._widgets[n];const T=a.domNode.domNode;T.parentNode.removeChild(T),T.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(o){return this._widgets.hasOwnProperty(o)?this._widgets[o].suppressMouseDown:!1}onBeforeRender(o){const n=Object.keys(this._widgets);for(const a of n)this._widgets[a].onBeforeRender(o)}prepareRender(o){const n=Object.keys(this._widgets);for(const a of n)this._widgets[a].prepareRender(o)}render(o){const n=Object.keys(this._widgets);for(const a of n)this._widgets[a].render(o)}}class wi{constructor(o,n,a){this._context=o,this._viewDomNode=n,this._actual=a,this.domNode=Object(h.b)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const T=this._context.configuration.options,R=T.get(129);this._fixedOverflowWidgets=T.get(36),this._contentWidth=R.contentWidth,this._contentLeft=R.contentLeft,this._lineHeight=T.get(58),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(o){const n=this._context.configuration.options;if(this._lineHeight=n.get(58),o.hasChanged(129)){const a=n.get(129);this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(o){this._setPosition(this._range)}_setPosition(o){if(this._range=o,this._viewRange=null,this._range){const n=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(n.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(n.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(n))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth}setPosition(o,n){this._setPosition(o),this._preference=n,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1}_layoutBoxInViewport(o,n,a,T,R){const X=o.top,me=X,_e=n.top+this._lineHeight,He=R.viewportHeight-_e,$e=X-T,ot=me>=T,Ot=_e,gt=He>=T;let kt=o.left,Kt=n.left;return kt+a>R.scrollLeft+R.viewportWidth&&(kt=R.scrollLeft+R.viewportWidth-a),Kt+a>R.scrollLeft+R.viewportWidth&&(Kt=R.scrollLeft+R.viewportWidth-a),kt<R.scrollLeft&&(kt=R.scrollLeft),Kt<R.scrollLeft&&(Kt=R.scrollLeft),{fitsAbove:ot,aboveTop:$e,aboveLeft:kt,fitsBelow:gt,belowTop:Ot,belowLeft:Kt}}_layoutHorizontalSegmentInPage(o,n,a,T){const R=Math.max(0,n.left-T),X=Math.min(n.left+n.width+T,o.width);let me=n.left+a-L.f.scrollX;if(me+T>X){const _e=me-(X-T);me-=_e,a-=_e}if(me<R){const _e=me-R;me-=_e,a-=_e}return[a,me]}_layoutBoxInPage(o,n,a,T,R){const X=o.top-T,me=n.top+this._lineHeight,_e=L.D(this._viewDomNode.domNode),He=_e.top+X-L.f.scrollY,$e=_e.top+me-L.f.scrollY,ot=L.z(document.body),[Ot,gt]=this._layoutHorizontalSegmentInPage(ot,_e,o.left-R.scrollLeft+this._contentLeft,a),[kt,Kt]=this._layoutHorizontalSegmentInPage(ot,_e,n.left-R.scrollLeft+this._contentLeft,a),eo=22,co=22,go=He>=eo,yo=$e+T<=ot.height-co;return this._fixedOverflowWidgets?{fitsAbove:go,aboveTop:Math.max(He,eo),aboveLeft:gt,fitsBelow:yo,belowTop:$e,belowLeft:Kt}:{fitsAbove:go,aboveTop:X,aboveLeft:Ot,fitsBelow:yo,belowTop:me,belowLeft:kt}}_prepareRenderWidgetAtExactPositionOverflowing(o){return new ci(o.top,o.left+this._contentLeft)}_getTopAndBottomLeft(o){if(!this._viewRange)return[null,null];const n=o.linesVisibleRangesForRange(this._viewRange,!1);if(!n||n.length===0)return[null,null];let a=n[0],T=n[0];for(const ot of n)ot.lineNumber<a.lineNumber&&(a=ot),ot.lineNumber>T.lineNumber&&(T=ot);let R=1073741824;for(const ot of a.ranges)ot.left<R&&(R=ot.left);let X=1073741824;for(const ot of T.ranges)ot.left<X&&(X=ot.left);const me=o.getVerticalOffsetForLineNumber(a.lineNumber)-o.scrollTop,_e=new ci(me,R),He=o.getVerticalOffsetForLineNumber(T.lineNumber)-o.scrollTop,$e=new ci(He,X);return[_e,$e]}_prepareRenderWidget(o){const[n,a]=this._getTopAndBottomLeft(o);if(!n||!a)return null;if(this._cachedDomNodeClientWidth===-1||this._cachedDomNodeClientHeight===-1){let R=null;if(typeof this._actual.beforeRender=="function"&&(R=Zi(this._actual.beforeRender,this._actual)),R)this._cachedDomNodeClientWidth=R.width,this._cachedDomNodeClientHeight=R.height;else{const X=this.domNode.domNode;this._cachedDomNodeClientWidth=X.clientWidth,this._cachedDomNodeClientHeight=X.clientHeight}}let T;if(this.allowEditorOverflow?T=this._layoutBoxInPage(n,a,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,o):T=this._layoutBoxInViewport(n,a,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,o),this._preference)for(let R=1;R<=2;R++)for(const X of this._preference)if(X===1){if(!T)return null;if(R===2||T.fitsAbove)return{coordinate:new ci(T.aboveTop,T.aboveLeft),position:1}}else if(X===2){if(!T)return null;if(R===2||T.fitsBelow)return{coordinate:new ci(T.belowTop,T.belowLeft),position:2}}else return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(n),position:0}:{coordinate:n,position:0};return null}onBeforeRender(o){if(!this._viewRange||!this._preference)return;if(this._viewRange.endLineNumber<o.startLineNumber||this._viewRange.startLineNumber>o.endLineNumber)return;this.domNode.setMaxWidth(this._maxWidth)}prepareRender(o){this._renderData=this._prepareRenderWidget(o)}render(o){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&Zi(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+o.scrollTop-o.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),typeof this._actual.afterRender=="function"&&Zi(this._actual.afterRender,this._actual,this._renderData.position)}}function Zi(o,n,...a){try{return o.call(n,...a)}catch(T){return null}}var Vi=t("kw+w"),vi=t("6OMU");let sn=!0;class en extends Wt{constructor(o){super();this._context=o;const n=this._context.configuration.options,a=n.get(129);this._lineHeight=n.get(58),this._renderLineHighlight=n.get(84),this._renderLineHighlightOnlyWhenFocus=n.get(85),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new b.a(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let o=!1;const n=sn?this._selections.slice(0,1):this._selections,a=n.map(R=>R.positionLineNumber);a.sort((R,X)=>R-X),vi.g(this._cursorLineNumbers,a)||(this._cursorLineNumbers=a,o=!0);const T=n.every(R=>R.isEmpty());return this._selectionIsEmpty!==T&&(this._selectionIsEmpty=T,o=!0),o}onThemeChanged(o){return this._readFromSelections()}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._lineHeight=n.get(58),this._renderLineHighlight=n.get(84),this._renderLineHighlightOnlyWhenFocus=n.get(85),this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,!0}onCursorStateChanged(o){return this._selections=o.selections,this._readFromSelections()}onFlushed(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollWidthChanged||o.scrollTopChanged}onZonesChanged(o){return!0}onFocusChanged(o){return this._renderLineHighlightOnlyWhenFocus?(this._focused=o.isFocused,!0):!1}prepareRender(o){if(!this._shouldRenderThis()){this._renderData=null;return}const n=this._renderOne(o),a=o.visibleRange.startLineNumber,T=o.visibleRange.endLineNumber,R=this._cursorLineNumbers.length;let X=0;const me=[];for(let _e=a;_e<=T;_e++){const He=_e-a;for(;X<R&&this._cursorLineNumbers[X]<_e;)X++;X<R&&this._cursorLineNumbers[X]===_e?me[He]=n:me[He]=""}this._renderData=me}render(o,n){if(!this._renderData)return"";const a=n-o;return a>=this._renderData.length?"":this._renderData[a]}}class on extends en{_renderOne(o){const n="current-line"+(this._shouldRenderOther()?" current-line-both":"");return`<div class="${n}" style="width:${Math.max(o.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class cn extends en{_renderOne(o){const n="current-line"+(this._shouldRenderMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"");return`<div class="${n}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderThis(){return!0}_shouldRenderOther(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}Object(so.f)((o,n)=>{sn=!1;const a=o.getColor(Vt.B);if(a&&(n.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${a}; }`),n.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${a}; border: none; }`)),!a||a.isTransparent()||o.defines(Vt.C)){const T=o.getColor(Vt.C);T&&(sn=!0,n.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${T}; }`),n.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${T}; }`),o.type==="hc"&&(n.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),n.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});var Bi=t("Vtyv");class zi extends Wt{constructor(o){super();this._context=o;const n=this._context.configuration.options;this._lineHeight=n.get(58),this._typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(o){const n=this._context.configuration.options;return this._lineHeight=n.get(58),this._typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollTopChanged||o.scrollWidthChanged}onZonesChanged(o){return!0}prepareRender(o){const n=o.getDecorationsInViewport();let a=[],T=0;for(let _e=0,He=n.length;_e<He;_e++){const $e=n[_e];$e.options.className&&(a[T++]=$e)}a=a.sort((_e,He)=>{if(_e.options.zIndex<He.options.zIndex)return-1;if(_e.options.zIndex>He.options.zIndex)return 1;const $e=_e.options.className,ot=He.options.className;return $e<ot?-1:$e>ot?1:Oe.a.compareRangesUsingStarts(_e.range,He.range)});const R=o.visibleRange.startLineNumber,X=o.visibleRange.endLineNumber,me=[];for(let _e=R;_e<=X;_e++){const He=_e-R;me[He]=""}this._renderWholeLineDecorations(o,a,me),this._renderNormalDecorations(o,a,me),this._renderResult=me}_renderWholeLineDecorations(o,n,a){const T=String(this._lineHeight),R=o.visibleRange.startLineNumber,X=o.visibleRange.endLineNumber;for(let me=0,_e=n.length;me<_e;me++){const He=n[me];if(!He.options.isWholeLine)continue;const $e='<div class="cdr '+He.options.className+'" style="left:0;width:100%;height:'+T+'px;"></div>',ot=Math.max(He.range.startLineNumber,R),Ot=Math.min(He.range.endLineNumber,X);for(let gt=ot;gt<=Ot;gt++){const kt=gt-R;a[kt]+=$e}}}_renderNormalDecorations(o,n,a){const T=String(this._lineHeight),R=o.visibleRange.startLineNumber;let X=null,me=!1,_e=null;for(let He=0,$e=n.length;He<$e;He++){const ot=n[He];if(ot.options.isWholeLine)continue;const Ot=ot.options.className,gt=Boolean(ot.options.showIfCollapsed);let kt=ot.range;if(gt&&kt.endColumn===1&&kt.endLineNumber!==kt.startLineNumber&&(kt=new Oe.a(kt.startLineNumber,kt.startColumn,kt.endLineNumber-1,this._context.model.getLineMaxColumn(kt.endLineNumber-1))),X===Ot&&me===gt&&Oe.a.areIntersectingOrTouching(_e,kt)){_e=Oe.a.plusRange(_e,kt);continue}X!==null&&this._renderNormalDecoration(o,_e,X,me,T,R,a),X=Ot,me=gt,_e=kt}X!==null&&this._renderNormalDecoration(o,_e,X,me,T,R,a)}_renderNormalDecoration(o,n,a,T,R,X,me){const _e=o.linesVisibleRangesForRange(n,a==="findMatch");if(!_e)return;for(let He=0,$e=_e.length;He<$e;He++){const ot=_e[He];if(ot.outsideRenderedLine)continue;const Ot=ot.lineNumber-X;if(T&&ot.ranges.length===1){const gt=ot.ranges[0];gt.width===0&&(ot.ranges[0]=new U(gt.left,this._typicalHalfwidthCharacterWidth))}for(let gt=0,kt=ot.ranges.length;gt<kt;gt++){const Kt=ot.ranges[gt],eo='<div class="cdr '+a+'" style="left:'+String(Kt.left)+"px;width:"+String(Kt.width)+"px;height:"+R+'px;"></div>';me[Ot]+=eo}}}render(o,n){if(!this._renderResult)return"";const a=n-o;return a<0||a>=this._renderResult.length?"":this._renderResult[a]}}var Ji=t("GJhM"),ui=t("MD5Z");class pn extends ne{constructor(o,n,a,T){super(o);const R=this._context.configuration.options,X=R.get(91),me=R.get(66),_e=R.get(34),He=R.get(94),$e={listenOnDomNode:a.domNode,className:"editor-scrollable "+Object(so.e)(o.theme.type),useShadows:!1,lazyRender:!0,vertical:X.vertical,horizontal:X.horizontal,verticalHasArrows:X.verticalHasArrows,horizontalHasArrows:X.horizontalHasArrows,verticalScrollbarSize:X.verticalScrollbarSize,verticalSliderSize:X.verticalSliderSize,horizontalScrollbarSize:X.horizontalScrollbarSize,horizontalSliderSize:X.horizontalSliderSize,handleMouseWheel:X.handleMouseWheel,alwaysConsumeMouseWheel:X.alwaysConsumeMouseWheel,arrowSize:X.arrowSize,mouseWheelScrollSensitivity:me,fastScrollSensitivity:_e,scrollPredominantAxis:He,scrollByPage:X.scrollByPage};this.scrollbar=this._register(new Ji.c(n.domNode,$e,this._context.viewLayout.getScrollable())),Ee.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=Object(h.b)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const ot=(Ot,gt,kt)=>{const Kt={};if(gt){const eo=Ot.scrollTop;eo&&(Kt.scrollTop=this._context.viewLayout.getCurrentScrollTop()+eo,Ot.scrollTop=0)}if(kt){const eo=Ot.scrollLeft;eo&&(Kt.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+eo,Ot.scrollLeft=0)}this._context.model.setScrollPosition(Kt,1)};this._register(L.i(a.domNode,"scroll",Ot=>ot(a.domNode,!0,!0))),this._register(L.i(n.domNode,"scroll",Ot=>ot(n.domNode,!0,!1))),this._register(L.i(T.domNode,"scroll",Ot=>ot(T.domNode,!0,!1))),this._register(L.i(this.scrollbarDomNode.domNode,"scroll",Ot=>ot(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const o=this._context.configuration.options,n=o.get(129);this.scrollbarDomNode.setLeft(n.contentLeft);const a=o.get(64),T=a.side;T==="right"?this.scrollbarDomNode.setWidth(n.contentWidth+n.minimap.minimapWidth):this.scrollbarDomNode.setWidth(n.contentWidth),this.scrollbarDomNode.setHeight(n.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(o){this.scrollbar.delegateVerticalScrollbarMouseDown(o)}onConfigurationChanged(o){if(o.hasChanged(91)||o.hasChanged(66)||o.hasChanged(34)){const n=this._context.configuration.options,a=n.get(91),T=n.get(66),R=n.get(34),X=n.get(94),me={vertical:a.vertical,horizontal:a.horizontal,verticalScrollbarSize:a.verticalScrollbarSize,horizontalScrollbarSize:a.horizontalScrollbarSize,scrollByPage:a.scrollByPage,handleMouseWheel:a.handleMouseWheel,mouseWheelScrollSensitivity:T,fastScrollSensitivity:R,scrollPredominantAxis:X};this.scrollbar.updateOptions(me)}return o.hasChanged(129)&&this._setLayout(),!0}onScrollChanged(o){return!0}onThemeChanged(o){return this.scrollbar.updateClassName("editor-scrollable "+Object(so.e)(this._context.theme.type)),!0}prepareRender(o){}render(o){this.scrollbar.renderNow()}}Object(so.f)((o,n)=>{const a=o.getColor(ui.yc);a&&n.addRule(`
|
|
|
.monaco-scrollable-element > .shadow.top {
|
|
|
box-shadow: ${a} 0 6px 6px -6px inset;
|
|
|
}
|
|
|
|
|
|
.monaco-scrollable-element > .shadow.left {
|
|
|
box-shadow: ${a} 6px 0 6px -6px inset;
|
|
|
}
|
|
|
|
|
|
.monaco-scrollable-element > .shadow.top.left {
|
|
|
box-shadow: ${a} 6px 6px 6px -6px inset;
|
|
|
}
|
|
|
`);const T=o.getColor(ui.Ac);T&&n.addRule(`
|
|
|
.monaco-scrollable-element > .scrollbar > .slider {
|
|
|
background: ${T};
|
|
|
}
|
|
|
`);const R=o.getColor(ui.Bc);R&&n.addRule(`
|
|
|
.monaco-scrollable-element > .scrollbar > .slider:hover {
|
|
|
background: ${R};
|
|
|
}
|
|
|
`);const X=o.getColor(ui.zc);X&&n.addRule(`
|
|
|
.monaco-scrollable-element > .scrollbar > .slider.active {
|
|
|
background: ${X};
|
|
|
}
|
|
|
`)});var Hi=t("hHjc");class Oi{constructor(o,n,a){this._decorationToRenderBrand=void 0,this.startLineNumber=+o,this.endLineNumber=+n,this.className=String(a)}}class Ii extends Wt{_render(o,n,a){const T=[];for(let me=o;me<=n;me++){const _e=me-o;T[_e]=[]}if(a.length===0)return T;a.sort((me,_e)=>me.className===_e.className?me.startLineNumber===_e.startLineNumber?me.endLineNumber-_e.endLineNumber:me.startLineNumber-_e.startLineNumber:me.className<_e.className?-1:1);let R=null,X=0;for(let me=0,_e=a.length;me<_e;me++){const He=a[me],$e=He.className;let ot=Math.max(He.startLineNumber,o)-o;const Ot=Math.min(He.endLineNumber,n)-o;R===$e?(ot=Math.max(X+1,ot),X=Math.max(X,Ot)):(R=$e,X=Ot);for(let gt=ot;gt<=X;gt++)T[gt].push(R)}return T}}class Qi extends Ii{constructor(o){super();this._context=o;const n=this._context.configuration.options,a=n.get(129);this._lineHeight=n.get(58),this._glyphMargin=n.get(49),this._glyphMarginLeft=a.glyphMarginLeft,this._glyphMarginWidth=a.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._lineHeight=n.get(58),this._glyphMargin=n.get(49),this._glyphMarginLeft=a.glyphMarginLeft,this._glyphMarginWidth=a.glyphMarginWidth,!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollTopChanged}onZonesChanged(o){return!0}_getDecorations(o){const n=o.getDecorationsInViewport();let a=[],T=0;for(let R=0,X=n.length;R<X;R++){const me=n[R],_e=me.options.glyphMarginClassName;_e&&(a[T++]=new Oi(me.range.startLineNumber,me.range.endLineNumber,_e))}return a}prepareRender(o){if(!this._glyphMargin){this._renderResult=null;return}const n=o.visibleRange.startLineNumber,a=o.visibleRange.endLineNumber,T=this._render(n,a,this._getDecorations(o)),R=this._lineHeight.toString(),X=this._glyphMarginLeft.toString(),me=this._glyphMarginWidth.toString(),_e='" style="left:'+X+"px;width:"+me+"px;height:"+R+'px;"></div>',He=[];for(let $e=n;$e<=a;$e++){const ot=$e-n,Ot=T[ot];Ot.length===0?He[ot]="":He[ot]='<div class="cgmr codicon '+Ot.join(" ")+_e}this._renderResult=He}render(o,n){if(!this._renderResult)return"";const a=n-o;return a<0||a>=this._renderResult.length?"":this._renderResult[a]}}var Li=t("C6rC"),Ui=t("M1Kb"),fi=t("tX9W"),$i=t("746U");class rn extends Wt{constructor(o){super();this._context=o,this._primaryPosition=null;const n=this._context.configuration.options,a=n.get(130),T=n.get(43);this._lineHeight=n.get(58),this._spaceWidth=T.spaceWidth,this._maxIndentLeft=a.wrappingColumn===-1?-1:a.wrappingColumn*T.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=n.get(13),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(130),T=n.get(43);return this._lineHeight=n.get(58),this._spaceWidth=T.spaceWidth,this._maxIndentLeft=a.wrappingColumn===-1?-1:a.wrappingColumn*T.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=n.get(13),!0}onCursorStateChanged(o){var n;const a=o.selections[0],T=a.getPosition();return((n=this._primaryPosition)===null||n===void 0?void 0:n.equals(T))?!1:(this._primaryPosition=T,!0)}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollTopChanged}onZonesChanged(o){return!0}onLanguageConfigurationChanged(o){return!0}prepareRender(o){var n,a,T,R;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const X=o.visibleRange.startLineNumber,me=o.visibleRange.endLineNumber,_e=o.scrollWidth,He=this._lineHeight,$e=this._primaryPosition,ot=this.getGuidesByLine(X,me,$e),Ot=[];for(let gt=X;gt<=me;gt++){const kt=gt-X,Kt=ot[kt];let eo="";const co=(a=(n=o.visibleRangeForPosition(new we.a(gt,1)))===null||n===void 0?void 0:n.left)!==null&&a!==void 0?a:0;for(const go of Kt){const yo=co+(go.visibleColumn-1)*this._spaceWidth;if(yo>_e||this._maxIndentLeft>0&&yo>this._maxIndentLeft)break;const jo=go.horizontalLine?go.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",Po=go.horizontalLine?((R=(T=o.visibleRangeForPosition(new we.a(gt,go.horizontalLine.endColumn)))===null||T===void 0?void 0:T.left)!==null&&R!==void 0?R:yo+this._spaceWidth)-yo:this._spaceWidth;eo+=`<div class="core-guide ${go.className} ${jo}" style="left:${yo}px;height:${He}px;width:${Po}px"></div>`}Ot[kt]=eo}this._renderResult=Ot}getGuidesByLine(o,n,a){const T=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.model.getBracketGuidesInRangeByLine(o,n,a,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?Ui.c.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?Ui.c.EnabledForActive:Ui.c.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,R=this._bracketPairGuideOptions.indentation?this._context.model.getLinesIndentGuides(o,n):null;let X=0,me=0,_e=0;if(this._bracketPairGuideOptions.highlightActiveIndentation&&a){const ot=this._context.model.getActiveIndentGuide(a.lineNumber,o,n);X=ot.startLineNumber,me=ot.endLineNumber,_e=ot.indent}const{indentSize:He}=this._context.model.getTextModelOptions(),$e=[];for(let ot=o;ot<=n;ot++){const Ot=new Array;$e.push(Ot);const gt=T?T[ot-o]:[],kt=new vi.a(gt),Kt=R?R[ot-o]:[];for(let eo=1;eo<=Kt;eo++){const co=(eo-1)*He+1,go=gt.length===0&&X<=ot&&ot<=me&&eo===_e;Ot.push(...kt.takeWhile(jo=>jo.visibleColumn<co)||[]);const yo=kt.peek();(!yo||yo.visibleColumn!==co||yo.horizontalLine)&&Ot.push(new Ui.d(co,go?"core-guide-indent-active":"core-guide-indent",null))}Ot.push(...kt.takeWhile(eo=>!0)||[])}return $e}render(o,n){if(!this._renderResult)return"";const a=n-o;return a<0||a>=this._renderResult.length?"":this._renderResult[a]}}function _i(o){return o&&o.isTransparent()?void 0:o}Object(so.f)((o,n)=>{const a=o.getColor(Vt.A);a&&n.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${a} inset; }`);const T=o.getColor(Vt.a)||a;T&&n.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${T} inset; }`);const R=[{bracketColor:Vt.c,guideColor:Vt.r,guideColorActive:Vt.l},{bracketColor:Vt.d,guideColor:Vt.s,guideColorActive:Vt.m},{bracketColor:Vt.e,guideColor:Vt.t,guideColorActive:Vt.n},{bracketColor:Vt.f,guideColor:Vt.u,guideColorActive:Vt.o},{bracketColor:Vt.g,guideColor:Vt.v,guideColorActive:Vt.p},{bracketColor:Vt.h,guideColor:Vt.w,guideColorActive:Vt.q}],X=new fi.a;let me=R.map(_e=>{var He,$e;const ot=o.getColor(_e.bracketColor),Ot=o.getColor(_e.guideColor),gt=o.getColor(_e.guideColorActive),kt=_i((He=_i(Ot))!==null&&He!==void 0?He:ot==null?void 0:ot.transparent(.3)),Kt=_i(($e=_i(gt))!==null&&$e!==void 0?$e:ot);return!kt||!Kt?void 0:{guideColor:kt,guideColorActive:Kt}}).filter($i.h);if(me.length>0){for(let _e=0;_e<30;_e++){const He=me[_e%me.length];n.addRule(`.monaco-editor .${X.getInlineClassNameOfLevel(_e).replace(/ /g,".")} { --guide-color: ${He.guideColor}; --guide-color-active: ${He.guideColorActive}; }`)}n.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),n.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),n.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),n.addRule(`.monaco-editor .vertical.${X.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),n.addRule(`.monaco-editor .horizontal-top.${X.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),n.addRule(`.monaco-editor .horizontal-bottom.${X.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}});var Pi=t("OKK6");class ht{constructor(){this._currentVisibleRange=new Oe.a(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(o){this._currentVisibleRange=o}}class Ve{constructor(o,n,a,T,R,X){this.lineNumber=o,this.startColumn=n,this.endColumn=a,this.startScrollTop=T,this.stopScrollTop=R,this.scrollType=X,this.type="range",this.minLineNumber=o,this.maxLineNumber=o}}class K{constructor(o,n,a,T){this.selections=o,this.startScrollTop=n,this.stopScrollTop=a,this.scrollType=T,this.type="selections";let R=o[0].startLineNumber,X=o[0].endLineNumber;for(let me=1,_e=o.length;me<_e;me++){const He=o[me];R=Math.min(R,He.startLineNumber),X=Math.max(X,He.endLineNumber)}this.minLineNumber=R,this.maxLineNumber=X}}class be extends ne{constructor(o,n){super(o);this._linesContent=n,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new zo(this),this.domNode=this._visibleLines.domNode;const a=this._context.configuration,T=this._context.configuration.options,R=T.get(43),X=T.get(130);this._lineHeight=T.get(58),this._typicalHalfwidthCharacterWidth=R.typicalHalfwidthCharacterWidth,this._isViewportWrapping=X.isViewportWrapping,this._revealHorizontalRightPadding=T.get(88),this._cursorSurroundingLines=T.get(25),this._cursorSurroundingLinesStyle=T.get(26),this._canUseLayerHinting=!T.get(28),this._viewLineOptions=new ve(a,this._context.theme.type),Ee.write(this.domNode,7),this.domNode.setClassName(`view-lines ${_o.a}`),S.a.applyFontInfo(this.domNode,R),this._maxLineWidth=0,this._asyncUpdateLineWidths=new y.e(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new y.e(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new ht,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new ce(this._viewLineOptions)}onConfigurationChanged(o){this._visibleLines.onConfigurationChanged(o),o.hasChanged(130)&&(this._maxLineWidth=0);const n=this._context.configuration.options,a=n.get(43),T=n.get(130);return this._lineHeight=n.get(58),this._typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this._isViewportWrapping=T.isViewportWrapping,this._revealHorizontalRightPadding=n.get(88),this._cursorSurroundingLines=n.get(25),this._cursorSurroundingLinesStyle=n.get(26),this._canUseLayerHinting=!n.get(28),S.a.applyFontInfo(this.domNode,a),this._onOptionsMaybeChanged(),o.hasChanged(129)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const o=this._context.configuration,n=new ve(o,this._context.theme.type);if(!this._viewLineOptions.equals(n)){this._viewLineOptions=n;const a=this._visibleLines.getStartLineNumber(),T=this._visibleLines.getEndLineNumber();for(let R=a;R<=T;R++){const X=this._visibleLines.getVisibleLine(R);X.onOptionsChanged(this._viewLineOptions)}return!0}return!1}onCursorStateChanged(o){const n=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();let T=!1;for(let R=n;R<=a;R++)T=this._visibleLines.getVisibleLine(R).onSelectionChanged()||T;return T}onDecorationsChanged(o){{const n=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();for(let T=n;T<=a;T++)this._visibleLines.getVisibleLine(T).onDecorationsChanged()}return!0}onFlushed(o){const n=this._visibleLines.onFlushed(o);return this._maxLineWidth=0,n}onLinesChanged(o){return this._visibleLines.onLinesChanged(o)}onLinesDeleted(o){return this._visibleLines.onLinesDeleted(o)}onLinesInserted(o){return this._visibleLines.onLinesInserted(o)}onRevealRangeRequest(o){const n=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),o.source,o.range,o.selections,o.verticalType);if(n===-1)return!1;let a=this._context.viewLayout.validateScrollPosition({scrollTop:n});o.revealHorizontal?o.range&&o.range.startLineNumber!==o.range.endLineNumber?a={scrollTop:a.scrollTop,scrollLeft:0}:o.range?this._horizontalRevealRequest=new Ve(o.range.startLineNumber,o.range.startColumn,o.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),a.scrollTop,o.scrollType):o.selections&&o.selections.length>0&&(this._horizontalRevealRequest=new K(o.selections,this._context.viewLayout.getCurrentScrollTop(),a.scrollTop,o.scrollType)):this._horizontalRevealRequest=null;const T=Math.abs(this._context.viewLayout.getCurrentScrollTop()-a.scrollTop),R=T<=this._lineHeight?1:o.scrollType;return this._context.model.setScrollPosition(a,R),!0}onScrollChanged(o){if(this._horizontalRevealRequest&&o.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&o.scrollTopChanged){const n=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),a=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(o.scrollTop<n||o.scrollTop>a)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(o.scrollWidth),this._visibleLines.onScrollChanged(o)||!0}onTokensChanged(o){return this._visibleLines.onTokensChanged(o)}onZonesChanged(o){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(o)}onThemeChanged(o){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(o,n){const a=this._getViewLineDomNode(o);if(a===null)return null;const T=this._getLineNumberFor(a);if(T===-1)return null;if(T<1||T>this._context.model.getLineCount())return null;if(this._context.model.getLineMaxColumn(T)===1)return new we.a(T,1);const R=this._visibleLines.getStartLineNumber(),X=this._visibleLines.getEndLineNumber();if(T<R||T>X)return null;let me=this._visibleLines.getVisibleLine(T).getColumnOfNodeOffset(T,o,n);const _e=this._context.model.getLineMinColumn(T);return me<_e&&(me=_e),new we.a(T,me)}_getViewLineDomNode(o){for(;o&&o.nodeType===1;){if(o.className===ce.CLASS_NAME)return o;o=o.parentElement}return null}_getLineNumberFor(o){const n=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();for(let T=n;T<=a;T++){const R=this._visibleLines.getVisibleLine(T);if(o===R.getDomNode())return T}return-1}getLineWidth(o){const n=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();return o<n||o>a?-1:this._visibleLines.getVisibleLine(o).getWidth()}linesVisibleRangesForRange(o,n){if(this.shouldRender())return null;const a=o.endLineNumber,T=Oe.a.intersectRanges(o,this._lastRenderedData.getCurrentVisibleRange());if(!T)return null;let R=[],X=0;const me=new Pe(this.domNode.domNode,this._textRangeRestingSpot);let _e=0;n&&(_e=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new we.a(T.startLineNumber,1)).lineNumber);const He=this._visibleLines.getStartLineNumber(),$e=this._visibleLines.getEndLineNumber();for(let ot=T.startLineNumber;ot<=T.endLineNumber;ot++){if(ot<He||ot>$e)continue;const Ot=ot===T.startLineNumber?T.startColumn:1,gt=ot===T.endLineNumber?T.endColumn:this._context.model.getLineMaxColumn(ot),kt=this._visibleLines.getVisibleLine(ot).getVisibleRangesForRange(ot,Ot,gt,me);if(!kt)continue;if(n&&ot<a){const Kt=_e;_e=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new we.a(ot+1,1)).lineNumber,Kt!==_e&&(kt.ranges[kt.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}R[X++]=new ie(kt.outsideRenderedLine,ot,U.from(kt.ranges))}return X===0?null:R}_visibleRangesForLineRange(o,n,a){return this.shouldRender()||(o<this._visibleLines.getStartLineNumber()||o>this._visibleLines.getEndLineNumber())?null:this._visibleLines.getVisibleLine(o).getVisibleRangesForRange(o,n,a,new Pe(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(o){const n=this._visibleRangesForLineRange(o.lineNumber,o.column,o.column);return n?new J(n.outsideRenderedLine,n.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(o){const n=this._visibleLines.getStartLineNumber(),a=this._visibleLines.getEndLineNumber();let T=1,R=!0;for(let X=n;X<=a;X++){const me=this._visibleLines.getVisibleLine(X);if(o&&!me.getWidthIsFast()){R=!1;continue}T=Math.max(T,me.getWidth())}return R&&n===1&&a===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(T),R}_checkMonospaceFontAssumptions(){let o=-1,n=-1;const a=this._visibleLines.getStartLineNumber(),T=this._visibleLines.getEndLineNumber();for(let R=a;R<=T;R++){const X=this._visibleLines.getVisibleLine(R);if(X.needsMonospaceFontCheck()){const me=X.getWidth();me>n&&(n=me,o=R)}}if(o===-1)return;if(!this._visibleLines.getVisibleLine(o).monospaceAssumptionsAreValid())for(let R=a;R<=T;R++){const X=this._visibleLines.getVisibleLine(R);X.onMonospaceAssumptionsInvalidated()}}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(o){if(this._visibleLines.renderLines(o),this._lastRenderedData.setCurrentVisibleRange(o.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const a=this._horizontalRevealRequest;if(o.startLineNumber<=a.minLineNumber&&a.maxLineNumber<=o.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const T=this._computeScrollLeftToReveal(a);T&&(this._isViewportWrapping||this._ensureMaxLineWidth(T.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:T.scrollLeft},a.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),c.d&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const a=this._visibleLines.getStartLineNumber(),T=this._visibleLines.getEndLineNumber();for(let R=a;R<=T;R++){const X=this._visibleLines.getVisibleLine(R);if(X.needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const n=this._context.viewLayout.getCurrentScrollTop()-o.bigNumbersDelta;this._linesContent.setTop(-n),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(o){const n=Math.ceil(o);this._maxLineWidth<n&&(this._maxLineWidth=n,this._context.model.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(o,n,a,T,R){const X=o.top,me=o.height,_e=X+me;let He,$e,ot;if(T&&T.length>0){let kt=T[0].startLineNumber,Kt=T[0].endLineNumber;for(let eo=1,co=T.length;eo<co;eo++){const go=T[eo];kt=Math.min(kt,go.startLineNumber),Kt=Math.max(Kt,go.endLineNumber)}He=!1,$e=this._context.viewLayout.getVerticalOffsetForLineNumber(kt),ot=this._context.viewLayout.getVerticalOffsetForLineNumber(Kt)+this._lineHeight}else if(a)He=!0,$e=this._context.viewLayout.getVerticalOffsetForLineNumber(a.startLineNumber),ot=this._context.viewLayout.getVerticalOffsetForLineNumber(a.endLineNumber)+this._lineHeight;else return-1;const Ot=n==="mouse"&&this._cursorSurroundingLinesStyle==="default";if(!Ot){const kt=Math.min(me/this._lineHeight/2,this._cursorSurroundingLines);$e-=kt*this._lineHeight,ot+=Math.max(0,kt-1)*this._lineHeight}(R===0||R===4)&&(ot+=this._lineHeight);let gt;if(ot-$e>me){if(!He)return-1;gt=$e}else if(R===5||R===6)if(R===6&&X<=$e&&ot<=_e)gt=X;else{const kt=Math.max(5*this._lineHeight,me*.2),Kt=$e-kt,eo=ot-me;gt=Math.max(eo,Kt)}else if(R===1||R===2)if(R===2&&X<=$e&&ot<=_e)gt=X;else{const kt=($e+ot)/2;gt=Math.max(0,kt-me/2)}else gt=this._computeMinimumScrolling(X,_e,$e,ot,R===3,R===4);return gt}_computeScrollLeftToReveal(o){const n=this._context.viewLayout.getCurrentViewport(),a=n.left,T=a+n.width;let R=1073741824,X=0;if(o.type==="range"){const _e=this._visibleRangesForLineRange(o.lineNumber,o.startColumn,o.endColumn);if(!_e)return null;for(const He of _e.ranges)R=Math.min(R,Math.round(He.left)),X=Math.max(X,Math.round(He.left+He.width))}else for(const _e of o.selections){if(_e.startLineNumber!==_e.endLineNumber)return null;const He=this._visibleRangesForLineRange(_e.startLineNumber,_e.startColumn,_e.endColumn);if(!He)return null;for(const $e of He.ranges)R=Math.min(R,Math.round($e.left)),X=Math.max(X,Math.round($e.left+$e.width))}if(R=Math.max(0,R-be.HORIZONTAL_EXTRA_PX),X+=this._revealHorizontalRightPadding,o.type==="selections"&&X-R>n.width)return null;const me=this._computeMinimumScrolling(a,T,R,X);return{scrollLeft:me,maxHorizontalOffset:X}}_computeMinimumScrolling(o,n,a,T,R,X){o=o|0,n=n|0,a=a|0,T=T|0,R=!!R,X=!!X;const me=n-o,_e=T-a;if(_e<me){if(R)return a;if(X)return Math.max(0,T-me);if(a<o)return a;if(T>n)return Math.max(0,T-me)}else return a;return o}}be.HORIZONTAL_EXTRA_PX=30;var Re=t("J+ZK");class Be extends Ii{constructor(o){super();this._context=o;const n=this._context.configuration.options,a=n.get(129);this._decorationsLeft=a.decorationsLeft,this._decorationsWidth=a.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._decorationsLeft=a.decorationsLeft,this._decorationsWidth=a.decorationsWidth,!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollTopChanged}onZonesChanged(o){return!0}_getDecorations(o){const n=o.getDecorationsInViewport();let a=[],T=0;for(let R=0,X=n.length;R<X;R++){const me=n[R],_e=me.options.linesDecorationsClassName;_e&&(a[T++]=new Oi(me.range.startLineNumber,me.range.endLineNumber,_e));const He=me.options.firstLineDecorationClassName;He&&(a[T++]=new Oi(me.range.startLineNumber,me.range.startLineNumber,He))}return a}prepareRender(o){const n=o.visibleRange.startLineNumber,a=o.visibleRange.endLineNumber,T=this._render(n,a,this._getDecorations(o)),R=this._decorationsLeft.toString(),X=this._decorationsWidth.toString(),me='" style="left:'+R+"px;width:"+X+'px;"></div>',_e=[];for(let He=n;He<=a;He++){const $e=He-n,ot=T[$e];let Ot="";for(let gt=0,kt=ot.length;gt<kt;gt++)Ot+='<div class="cldr '+ot[gt]+me;_e[$e]=Ot}this._renderResult=_e}render(o,n){return this._renderResult?this._renderResult[n-o]:""}}var at=t("XXBq");class vt extends Ii{constructor(o){super();this._context=o,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(o){return!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollTopChanged}onZonesChanged(o){return!0}_getDecorations(o){const n=o.getDecorationsInViewport();let a=[],T=0;for(let R=0,X=n.length;R<X;R++){const me=n[R],_e=me.options.marginClassName;_e&&(a[T++]=new Oi(me.range.startLineNumber,me.range.endLineNumber,_e))}return a}prepareRender(o){const n=o.visibleRange.startLineNumber,a=o.visibleRange.endLineNumber,T=this._render(n,a,this._getDecorations(o)),R=[];for(let X=n;X<=a;X++){const me=X-n,_e=T[me];let He="";for(let $e=0,ot=_e.length;$e<ot;$e++)He+='<div class="cmdr '+_e[$e]+'" style=""></div>';R[me]=He}this._renderResult=R}render(o,n){return this._renderResult?this._renderResult[n-o]:""}}var Gt=t("8gvo");class Bt{constructor(o,n,a,T){this._rgba8Brand=void 0,this.r=Bt._clamp(o),this.g=Bt._clamp(n),this.b=Bt._clamp(a),this.a=Bt._clamp(T)}equals(o){return this.r===o.r&&this.g===o.g&&this.b===o.b&&this.a===o.a}static _clamp(o){return o<0?0:o>255?255:o|0}}Bt.Empty=new Bt(0,0,0,0);var zt=t("twdY");class ro extends d.a{constructor(){super();this._onDidChange=new m.b,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(zt.E.onDidChange(o=>{o.changedColorMap&&this._updateColorMap()}))}static getInstance(){return this._INSTANCE||(this._INSTANCE=Object(d.h)(new ro)),this._INSTANCE}_updateColorMap(){const o=zt.E.getColorMap();if(!o){this._colors=[Bt.Empty],this._backgroundIsLight=!0;return}this._colors=[Bt.Empty];for(let a=1;a<o.length;a++){const T=o[a].rgba;this._colors[a]=new Bt(T.r,T.g,T.b,Math.round(T.a*255))}let n=o[2].getRelativeLuminance();this._backgroundIsLight=n>=.5,this._onDidChange.fire(void 0)}getColor(o){return(o<1||o>=this._colors.length)&&(o=2),this._colors[o]}backgroundIsLight(){return this._backgroundIsLight}}ro._INSTANCE=null;var P=t("qNAo");const q=(()=>{const o=[];for(let n=32;n<=126;n++)o.push(n);return o.push(65533),o})(),Ae=(o,n)=>(o-=32,o<0||o>96?n<=2?(o+96)%96:96-1:o);var Ge=t("CZ1j");class ft{constructor(o,n){this.scale=n,this._minimapCharRendererBrand=void 0,this.charDataNormal=ft.soften(o,12/15),this.charDataLight=ft.soften(o,50/60)}static soften(o,n){let a=new Uint8ClampedArray(o.length);for(let T=0,R=o.length;T<R;T++)a[T]=Object(Ge.b)(o[T]*n);return a}renderChar(o,n,a,T,R,X,me,_e,He,$e,ot){const Ot=1*this.scale,gt=2*this.scale,kt=ot?1:gt;if(n+Ot>o.width||a+kt>o.height){console.warn("bad render request outside image data");return}const Kt=$e?this.charDataLight:this.charDataNormal,eo=Ae(T,He),co=o.width*4,go=me.r,yo=me.g,jo=me.b,Po=R.r-go,ti=R.g-yo,oi=R.b-jo,$o=Math.max(X,_e),Yo=o.data;let Ei=eo*Ot*gt,Ci=a*co+n*4;for(let bi=0;bi<kt;bi++){let ji=Ci;for(let ln=0;ln<Ot;ln++){const Xi=Kt[Ei++]/255*(X/255);Yo[ji++]=go+Po*Xi,Yo[ji++]=yo+ti*Xi,Yo[ji++]=jo+oi*Xi,Yo[ji++]=$o}Ci+=co}}blockRenderChar(o,n,a,T,R,X,me,_e){const He=1*this.scale,$e=2*this.scale,ot=_e?1:$e;if(n+He>o.width||a+ot>o.height){console.warn("bad render request outside image data");return}const Ot=o.width*4,gt=.5*(R/255),kt=X.r,Kt=X.g,eo=X.b,co=T.r-kt,go=T.g-Kt,yo=T.b-eo,jo=kt+co*gt,Po=Kt+go*gt,ti=eo+yo*gt,oi=Math.max(R,me),$o=o.data;let Yo=a*Ot+n*4;for(let Ei=0;Ei<ot;Ei++){let Ci=Yo;for(let bi=0;bi<He;bi++)$o[Ci++]=jo,$o[Ci++]=Po,$o[Ci++]=ti,$o[Ci++]=oi;Yo+=Ot}}}var Dt=t("C/vA");const jt={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,A:10,B:11,C:12,D:13,E:14,F:15},Xt=o=>{const n=new Uint8ClampedArray(o.length/2);for(let a=0;a<o.length;a+=2)n[a>>1]=jt[o[a]]<<4|jt[o[a+1]]&15;return n},uo={1:Object(Dt.a)(()=>Xt("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:Object(Dt.a)(()=>Xt("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class io{static create(o,n){if(this.lastCreated&&o===this.lastCreated.scale&&n===this.lastFontFamily)return this.lastCreated;let a;return uo[o]?a=new ft(uo[o](),o):a=io.createFromSampleData(io.createSampleData(n).data,o),this.lastFontFamily=n,this.lastCreated=a,a}static createSampleData(o){const n=document.createElement("canvas"),a=n.getContext("2d");n.style.height=`${16}px`,n.height=16,n.width=96*10,n.style.width=96*10+"px",a.fillStyle="#ffffff",a.font=`bold ${16}px ${o}`,a.textBaseline="middle";let T=0;for(const R of q)a.fillText(String.fromCharCode(R),T,16/2),T+=10;return a.getImageData(0,0,96*10,16)}static createFromSampleData(o,n){const a=16*10*4*96;if(o.length!==a)throw new Error("Unexpected source in MinimapCharRenderer");let T=io._downsample(o,n);return new ft(T,n)}static _downsampleChar(o,n,a,T,R){const X=1*R,me=2*R;let _e=T,He=0;for(let $e=0;$e<me;$e++){const ot=$e/me*16,Ot=($e+1)/me*16;for(let gt=0;gt<X;gt++){const kt=gt/X*10,Kt=(gt+1)/X*10;let eo=0,co=0;for(let yo=ot;yo<Ot;yo++){const jo=n+Math.floor(yo)*3840,Po=1-(yo-Math.floor(yo));for(let ti=kt;ti<Kt;ti++){const oi=1-(ti-Math.floor(ti)),$o=jo+Math.floor(ti)*4,Yo=oi*Po;co+=Yo,eo+=o[$o]*o[$o+3]/255*Yo}}const go=eo/co;He=Math.max(He,go),a[_e++]=Object(Ge.b)(go)}}return He}static _downsample(o,n){const a=2*n*1*n,T=a*96,R=new Uint8ClampedArray(T);let X=0,me=0,_e=0;for(let He=0;He<96;He++)_e=Math.max(_e,this._downsampleChar(o,me,R,X,n)),X+=a,me+=10*4;if(_e>0){const He=255/_e;for(let $e=0;$e<T;$e++)R[$e]*=He}return R}}const ho=140,mo=2;class Io{constructor(o,n,a){const T=o.options,R=T.get(127),X=T.get(129),me=X.minimap,_e=T.get(43),He=T.get(64);this.renderMinimap=me.renderMinimap,this.size=He.size,this.minimapHeightIsEditorHeight=me.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=T.get(93),this.showSlider=He.showSlider,this.pixelRatio=R,this.typicalHalfwidthCharacterWidth=_e.typicalHalfwidthCharacterWidth,this.lineHeight=T.get(58),this.minimapLeft=me.minimapLeft,this.minimapWidth=me.minimapWidth,this.minimapHeight=X.height,this.canvasInnerWidth=me.minimapCanvasInnerWidth,this.canvasInnerHeight=me.minimapCanvasInnerHeight,this.canvasOuterWidth=me.minimapCanvasOuterWidth,this.canvasOuterHeight=me.minimapCanvasOuterHeight,this.isSampling=me.minimapIsSampling,this.editorHeight=X.height,this.fontScale=me.minimapScale,this.minimapLineHeight=me.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=Object(Dt.a)(()=>io.create(this.fontScale,_e.fontFamily)),this.defaultBackgroundColor=a.getColor(2),this.backgroundColor=Io._getMinimapBackground(n,this.defaultBackgroundColor),this.foregroundAlpha=Io._getMinimapForegroundOpacity(n)}static _getMinimapBackground(o,n){const a=o.getColor(ui.Xb);return a?new Bt(a.rgba.r,a.rgba.g,a.rgba.b,Math.round(255*a.rgba.a)):n}static _getMinimapForegroundOpacity(o){const n=o.getColor(ui.ac);return n?Bt._clamp(Math.round(255*n.rgba.a)):255}equals(o){return this.renderMinimap===o.renderMinimap&&this.size===o.size&&this.minimapHeightIsEditorHeight===o.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===o.scrollBeyondLastLine&&this.showSlider===o.showSlider&&this.pixelRatio===o.pixelRatio&&this.typicalHalfwidthCharacterWidth===o.typicalHalfwidthCharacterWidth&&this.lineHeight===o.lineHeight&&this.minimapLeft===o.minimapLeft&&this.minimapWidth===o.minimapWidth&&this.minimapHeight===o.minimapHeight&&this.canvasInnerWidth===o.canvasInnerWidth&&this.canvasInnerHeight===o.canvasInnerHeight&&this.canvasOuterWidth===o.canvasOuterWidth&&this.canvasOuterHeight===o.canvasOuterHeight&&this.isSampling===o.isSampling&&this.editorHeight===o.editorHeight&&this.fontScale===o.fontScale&&this.minimapLineHeight===o.minimapLineHeight&&this.minimapCharWidth===o.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(o.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(o.backgroundColor)&&this.foregroundAlpha===o.foregroundAlpha}}class Ao{constructor(o,n,a,T,R,X,me,_e){this.scrollTop=o,this.scrollHeight=n,this.sliderNeeded=a,this._computedSliderRatio=T,this.sliderTop=R,this.sliderHeight=X,this.startLineNumber=me,this.endLineNumber=_e}getDesiredScrollTopFromDelta(o){return Math.round(this.scrollTop+o/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(o){return Math.round((o-this.sliderHeight/2)/this._computedSliderRatio)}static create(o,n,a,T,R,X,me,_e,He,$e,ot){const Ot=o.pixelRatio,gt=o.minimapLineHeight,kt=Math.floor(o.canvasInnerHeight/gt),Kt=o.lineHeight;if(o.minimapHeightIsEditorHeight){const Po=_e*o.lineHeight+(o.scrollBeyondLastLine?R-o.lineHeight:0),ti=Math.max(1,Math.floor(R*R/Po)),oi=Math.max(0,o.minimapHeight-ti),$o=oi/($e-R),Yo=He*$o,Ei=oi>0,Ci=Math.floor(o.canvasInnerHeight/o.minimapLineHeight);return new Ao(He,$e,Ei,$o,Yo,ti,1,Math.min(me,Ci))}let eo;if(X&&a!==me){const Po=a-n+1;eo=Math.floor(Po*gt/Ot)}else{const Po=R/Kt;eo=Math.floor(Po*gt/Ot)}let co;o.scrollBeyondLastLine?co=(me-1)*gt/Ot:co=Math.max(0,me*gt/Ot-eo),co=Math.min(o.minimapHeight-eo,co);const go=co/($e-R),yo=He*go;let jo=0;if(o.scrollBeyondLastLine){const Po=R/Kt;jo=Po-1}if(kt>=me+jo){const Po=1,ti=me,oi=co>0;return new Ao(He,$e,oi,go,yo,eo,Po,ti)}else{let Po=Math.max(1,Math.floor(n-yo*Ot/gt));ot&&ot.scrollHeight===$e&&(ot.scrollTop>He&&(Po=Math.min(Po,ot.startLineNumber)),ot.scrollTop<He&&(Po=Math.max(Po,ot.startLineNumber)));const ti=Math.min(me,Po+kt-1),oi=(He-T)/Kt,$o=(n-Po+oi)*gt/Ot;return new Ao(He,$e,!0,go,$o,eo,Po,ti)}}}class Oo{constructor(o){this.dy=o}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}Oo.INVALID=new Oo(-1);class Wo{constructor(o,n,a){this.renderedLayout=o,this._imageData=n,this._renderedLines=new Ro(()=>Oo.INVALID),this._renderedLines._set(o.startLineNumber,a)}linesEquals(o){if(!this.scrollEquals(o))return!1;const n=this._renderedLines._get(),a=n.lines;for(let T=0,R=a.length;T<R;T++)if(a[T].dy===-1)return!1;return!0}scrollEquals(o){return this.renderedLayout.startLineNumber===o.startLineNumber&&this.renderedLayout.endLineNumber===o.endLineNumber}_get(){const o=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:o.rendLineNumberStart,lines:o.lines}}onLinesChanged(o,n){return this._renderedLines.onLinesChanged(o,n)}onLinesDeleted(o,n){this._renderedLines.onLinesDeleted(o,n)}onLinesInserted(o,n){this._renderedLines.onLinesInserted(o,n)}onTokensChanged(o){return this._renderedLines.onTokensChanged(o)}}class si{constructor(o,n,a,T){this._backgroundFillData=si._createBackgroundFillData(n,a,T),this._buffers=[o.createImageData(n,a),o.createImageData(n,a)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const o=this._buffers[this._lastUsedBuffer];return o.data.set(this._backgroundFillData),o}static _createBackgroundFillData(o,n,a){const T=a.r,R=a.g,X=a.b,me=a.a,_e=new Uint8ClampedArray(o*n*4);let He=0;for(let $e=0;$e<n;$e++)for(let ot=0;ot<o;ot++)_e[He]=T,_e[He+1]=R,_e[He+2]=X,_e[He+3]=me,He+=4;return _e}}class hi{constructor(o,n){this.samplingRatio=o,this.minimapLines=n}static compute(o,n,a){if(o.renderMinimap===0||!o.isSampling)return[null,[]];const T=o.pixelRatio,R=o.lineHeight,X=o.scrollBeyondLastLine,{minimapLineCount:me}=ze.f.computeContainedMinimapLineCount({viewLineCount:n,scrollBeyondLastLine:X,height:o.editorHeight,lineHeight:R,pixelRatio:T}),_e=n/me,He=_e/2;if(!a||a.minimapLines.length===0){let yo=[];if(yo[0]=1,me>1){for(let jo=0,Po=me-1;jo<Po;jo++)yo[jo]=Math.round(jo*_e+He);yo[me-1]=n}return[new hi(_e,yo),[]]}const $e=a.minimapLines,ot=$e.length;let Ot=[],gt=0,kt=0,Kt=1;const eo=10;let co=[],go=null;for(let yo=0;yo<me;yo++){const jo=Math.max(Kt,Math.round(yo*_e)),Po=Math.max(jo,Math.round((yo+1)*_e));for(;gt<ot&&$e[gt]<jo;){if(co.length<eo){const oi=gt+1+kt;go&&go.type==="deleted"&&go._oldIndex===gt-1?go.deleteToLineNumber++:(go={type:"deleted",_oldIndex:gt,deleteFromLineNumber:oi,deleteToLineNumber:oi},co.push(go)),kt--}gt++}let ti;if(gt<ot&&$e[gt]<=Po)ti=$e[gt],gt++;else if(yo===0?ti=1:yo+1===me?ti=n:ti=Math.round(yo*_e+He),co.length<eo){const oi=gt+1+kt;go&&go.type==="inserted"&&go._i===yo-1?go.insertToLineNumber++:(go={type:"inserted",_i:yo,insertFromLineNumber:oi,insertToLineNumber:oi},co.push(go)),kt++}Ot[yo]=ti,Kt=ti}if(co.length<eo)for(;gt<ot;){const yo=gt+1+kt;go&&go.type==="deleted"&&go._oldIndex===gt-1?go.deleteToLineNumber++:(go={type:"deleted",_oldIndex:gt,deleteFromLineNumber:yo,deleteToLineNumber:yo},co.push(go)),kt--,gt++}else co=[{type:"flush"}];return[new hi(_e,Ot),co]}modelLineToMinimapLine(o){return Math.min(this.minimapLines.length,Math.max(1,Math.round(o/this.samplingRatio)))}modelLineRangeToMinimapLineRange(o,n){let a=this.modelLineToMinimapLine(o)-1;for(;a>0&&this.minimapLines[a-1]>=o;)a--;let T=this.modelLineToMinimapLine(n)-1;for(;T+1<this.minimapLines.length&&this.minimapLines[T+1]<=n;)T++;if(a===T){const R=this.minimapLines[a];if(R<o||R>n)return null}return[a+1,T+1]}decorationLineRangeToMinimapLineRange(o,n){let a=this.modelLineToMinimapLine(o),T=this.modelLineToMinimapLine(n);return o!==n&&T===a&&(T===this.minimapLines.length?a>1&&a--:T++),[a,T]}onLinesDeleted(o){const n=o.toLineNumber-o.fromLineNumber+1;let a=this.minimapLines.length,T=0;for(let R=this.minimapLines.length-1;R>=0&&!(this.minimapLines[R]<o.fromLineNumber);R--)this.minimapLines[R]<=o.toLineNumber?(this.minimapLines[R]=Math.max(1,o.fromLineNumber-1),a=Math.min(a,R),T=Math.max(T,R)):this.minimapLines[R]-=n;return[a,T]}onLinesInserted(o){const n=o.toLineNumber-o.fromLineNumber+1;for(let a=this.minimapLines.length-1;a>=0&&!(this.minimapLines[a]<o.fromLineNumber);a--)this.minimapLines[a]+=n}}class Uo extends ne{constructor(o){super(o);this.tokensColorTracker=ro.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new Io(this._context.configuration,this._context.theme,this.tokensColorTracker);const[n]=hi.compute(this.options,this._context.model.getLineCount(),null);this._samplingState=n,this._shouldCheckSampling=!1,this._actual=new mi(o.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const o=new Io(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(o)?!1:(this.options=o,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(o){return this._onOptionsMaybeChanged()}onCursorStateChanged(o){return this._selections=o.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(o){return o.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(o){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(o){if(this._samplingState){const n=this._samplingState.modelLineRangeToMinimapLineRange(o.fromLineNumber,o.toLineNumber);return n?this._actual.onLinesChanged(n[0],n[1]):!1}else return this._actual.onLinesChanged(o.fromLineNumber,o.toLineNumber)}onLinesDeleted(o){if(this._samplingState){const[n,a]=this._samplingState.onLinesDeleted(o);return n<=a&&this._actual.onLinesChanged(n+1,a+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(o.fromLineNumber,o.toLineNumber)}onLinesInserted(o){return this._samplingState?(this._samplingState.onLinesInserted(o),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(o.fromLineNumber,o.toLineNumber)}onScrollChanged(o){return this._actual.onScrollChanged()}onThemeChanged(o){return this._context.model.invalidateMinimapColorCache(),this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(o){if(this._samplingState){let n=[];for(const a of o.ranges){const T=this._samplingState.modelLineRangeToMinimapLineRange(a.fromLineNumber,a.toLineNumber);T&&n.push({fromLineNumber:T[0],toLineNumber:T[1]})}return n.length?this._actual.onTokensChanged(n):!1}else return this._actual.onTokensChanged(o.ranges)}onTokensColorsChanged(o){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(o){return this._actual.onZonesChanged()}prepareRender(o){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(o){let n=o.visibleRange.startLineNumber,a=o.visibleRange.endLineNumber;this._samplingState&&(n=this._samplingState.modelLineToMinimapLine(n),a=this._samplingState.modelLineToMinimapLine(a));const T={viewportContainsWhitespaceGaps:o.viewportData.whitespaceViewportData.length>0,scrollWidth:o.scrollWidth,scrollHeight:o.scrollHeight,viewportStartLineNumber:n,viewportEndLineNumber:a,viewportStartLineNumberVerticalOffset:o.getVerticalOffsetForLineNumber(n),scrollTop:o.scrollTop,scrollLeft:o.scrollLeft,viewportWidth:o.viewportWidth,viewportHeight:o.viewportHeight};this._actual.render(T)}_recreateLineSampling(){this._minimapSelections=null;const o=Boolean(this._samplingState),[n,a]=hi.compute(this.options,this._context.model.getLineCount(),this._samplingState);if(this._samplingState=n,o&&this._samplingState)for(const T of a)switch(T.type){case"deleted":this._actual.onLinesDeleted(T.deleteFromLineNumber,T.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(T.insertFromLineNumber,T.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(o){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[o-1]):this._context.model.getLineContent(o)}getLineMaxColumn(o){return this._samplingState?this._context.model.getLineMaxColumn(this._samplingState.minimapLines[o-1]):this._context.model.getLineMaxColumn(o)}getMinimapLinesRenderingData(o,n,a){if(this._samplingState){let T=[];for(let R=0,X=n-o+1;R<X;R++)a[R]?T[R]=this._context.model.getViewLineData(this._samplingState.minimapLines[o+R-1]):T[R]=null;return T}return this._context.model.getMinimapLinesRenderingData(o,n,a).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const o of this._selections){const[n,a]=this._samplingState.decorationLineRangeToMinimapLineRange(o.startLineNumber,o.endLineNumber);this._minimapSelections.push(new b.a(n,o.startColumn,a,o.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(o,n){let a;if(this._samplingState){const R=this._samplingState.minimapLines[o-1],X=this._samplingState.minimapLines[n-1];a=new Oe.a(R,1,X,this._context.model.getLineMaxColumn(X))}else a=new Oe.a(o,1,n,this._context.model.getLineMaxColumn(n));const T=this._context.model.getDecorationsInViewport(a);if(this._samplingState){let R=[];for(const X of T){if(!X.options.minimap)continue;const me=X.range,_e=this._samplingState.modelLineToMinimapLine(me.startLineNumber),He=this._samplingState.modelLineToMinimapLine(me.endLineNumber);R.push(new P.h(new Oe.a(_e,me.startColumn,He,me.endColumn),X.options))}return R}return T}getOptions(){return this._context.model.getTextModelOptions()}revealLineNumber(o){this._samplingState&&(o=this._samplingState.minimapLines[o-1]),this._context.model.revealRange("mouse",!1,new Oe.a(o,1,o,1),1,0)}setScrollTop(o){this._context.model.setScrollPosition({scrollTop:o},1)}}class mi extends d.a{constructor(o,n){super();this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=o,this._model=n,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(ui.bc),this._domNode=Object(h.b)(document.createElement("div")),Ee.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=Object(h.b)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=Object(h.b)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=Object(h.b)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=Object(h.b)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=Object(h.b)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._mouseDownListener=L.o(this._domNode.domNode,"mousedown",a=>{a.preventDefault();const T=this._model.options.renderMinimap;if(T===0)return;if(!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(a.leftButton&&this._lastRenderData){const He=L.D(this._slider.domNode),$e=He.top+He.height/2;this._startSliderDragging(a.buttons,a.posx,$e,a.posy,this._lastRenderData.renderedLayout)}return}const R=this._model.options.minimapLineHeight,X=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*a.browserEvent.offsetY,me=Math.floor(X/R);let _e=me+this._lastRenderData.renderedLayout.startLineNumber;_e=Math.min(_e,this._model.getLineCount()),this._model.revealLineNumber(_e)}),this._sliderMouseMoveMonitor=new C.a,this._sliderMouseDownListener=L.o(this._slider.domNode,"mousedown",a=>{a.preventDefault(),a.stopPropagation(),a.leftButton&&this._lastRenderData&&this._startSliderDragging(a.buttons,a.posx,a.posy,a.posy,this._lastRenderData.renderedLayout)}),this._gestureDisposable=p.b.addTarget(this._domNode.domNode),this._sliderTouchStartListener=L.i(this._domNode.domNode,p.a.Start,a=>{a.preventDefault(),a.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(a))},{passive:!1}),this._sliderTouchMoveListener=L.i(this._domNode.domNode,p.a.Change,a=>{a.preventDefault(),a.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(a)},{passive:!1}),this._sliderTouchEndListener=L.o(this._domNode.domNode,p.a.End,a=>{a.preventDefault(),a.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(o,n,a,T,R){this._slider.toggleClassName("active",!0);const X=(me,_e)=>{const He=Math.abs(_e-n);if(c.i&&He>ho){this._model.setScrollTop(R.scrollTop);return}const $e=me-a;this._model.setScrollTop(R.getDesiredScrollTopFromDelta($e))};T!==a&&X(T,n),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,o,C.b,me=>X(me.posy,me.posx),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(o){const n=this._domNode.domNode.getBoundingClientRect().top,a=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(o.pageY-n);this._model.setScrollTop(a)}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 this._model.options.showSlider==="always"?"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 si(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(o,n){return this._lastRenderData?this._lastRenderData.onLinesChanged(o,n):!1}onLinesDeleted(o,n){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(o,n),!0}onLinesInserted(o,n){return this._lastRenderData&&this._lastRenderData.onLinesInserted(o,n),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(ui.bc),this._renderDecorations=!0,!0}onTokensChanged(o){return this._lastRenderData?this._lastRenderData.onTokensChanged(o):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(o){const n=this._model.options.renderMinimap;if(n===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}o.scrollLeft+o.viewportWidth>=o.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const a=Ao.create(this._model.options,o.viewportStartLineNumber,o.viewportEndLineNumber,o.viewportStartLineNumberVerticalOffset,o.viewportHeight,o.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),o.scrollTop,o.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(a.sliderNeeded?"block":"none"),this._slider.setTop(a.sliderTop),this._slider.setHeight(a.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(a.sliderHeight),this.renderDecorations(a),this._lastRenderData=this.renderLines(a)}renderDecorations(o){if(this._renderDecorations){this._renderDecorations=!1;const n=this._model.getSelections();n.sort(Oe.a.compareRangesUsingStarts);const a=this._model.getMinimapDecorationsInViewport(o.startLineNumber,o.endLineNumber);a.sort((Ot,gt)=>(Ot.options.zIndex||0)-(gt.options.zIndex||0));const{canvasInnerWidth:T,canvasInnerHeight:R}=this._model.options,X=this._model.options.minimapLineHeight,me=this._model.options.minimapCharWidth,_e=this._model.getOptions().tabSize,He=this._decorationsCanvas.domNode.getContext("2d");He.clearRect(0,0,T,R);const $e=new Ri(o.startLineNumber,o.endLineNumber,!1);this._renderSelectionLineHighlights(He,n,$e,o,X),this._renderDecorationsLineHighlights(He,a,$e,o,X);const ot=new Ri(o.startLineNumber,o.endLineNumber,null);this._renderSelectionsHighlights(He,n,ot,o,X,_e,me,T),this._renderDecorationsHighlights(He,a,ot,o,X,_e,me,T)}}_renderSelectionLineHighlights(o,n,a,T,R){if(!this._selectionColor||this._selectionColor.isTransparent())return;o.fillStyle=this._selectionColor.transparent(.5).toString();let X=0,me=0;for(const _e of n){const He=Math.max(T.startLineNumber,_e.startLineNumber),$e=Math.min(T.endLineNumber,_e.endLineNumber);if(He>$e)continue;for(let gt=He;gt<=$e;gt++)a.set(gt,!0);const ot=(He-T.startLineNumber)*R,Ot=($e-T.startLineNumber)*R+R;me>=ot||(me>X&&o.fillRect(ze.h,X,o.canvas.width,me-X),X=ot),me=Ot}me>X&&o.fillRect(ze.h,X,o.canvas.width,me-X)}_renderDecorationsLineHighlights(o,n,a,T,R){const X=new Map;for(let me=n.length-1;me>=0;me--){const _e=n[me],He=_e.options.minimap;if(!He||He.position!==Ui.f.Inline)continue;const $e=Math.max(T.startLineNumber,_e.range.startLineNumber),ot=Math.min(T.endLineNumber,_e.range.endLineNumber);if($e>ot)continue;const Ot=He.getColor(this._theme);if(!Ot||Ot.isTransparent())continue;let gt=X.get(Ot.toString());gt||(gt=Ot.transparent(.5).toString(),X.set(Ot.toString(),gt)),o.fillStyle=gt;for(let kt=$e;kt<=ot;kt++){if(a.has(kt))continue;a.set(kt,!0);const Kt=($e-T.startLineNumber)*R;o.fillRect(ze.h,Kt,o.canvas.width,R)}}}_renderSelectionsHighlights(o,n,a,T,R,X,me,_e){if(!this._selectionColor||this._selectionColor.isTransparent())return;for(const He of n){const $e=Math.max(T.startLineNumber,He.startLineNumber),ot=Math.min(T.endLineNumber,He.endLineNumber);if($e>ot)continue;for(let Ot=$e;Ot<=ot;Ot++)this.renderDecorationOnLine(o,a,He,this._selectionColor,T,Ot,R,R,X,me,_e)}}_renderDecorationsHighlights(o,n,a,T,R,X,me,_e){for(const He of n){const $e=He.options.minimap;if(!$e)continue;const ot=Math.max(T.startLineNumber,He.range.startLineNumber),Ot=Math.min(T.endLineNumber,He.range.endLineNumber);if(ot>Ot)continue;const gt=$e.getColor(this._theme);if(!gt||gt.isTransparent())continue;for(let kt=ot;kt<=Ot;kt++)switch($e.position){case Ui.f.Inline:this.renderDecorationOnLine(o,a,He.range,gt,T,kt,R,R,X,me,_e);continue;case Ui.f.Gutter:const Kt=(kt-T.startLineNumber)*R,eo=2;this.renderDecoration(o,gt,eo,Kt,mo,R);continue}}}renderDecorationOnLine(o,n,a,T,R,X,me,_e,He,$e,ot){const Ot=(X-R.startLineNumber)*_e;if(Ot+me<0||Ot>this._model.options.canvasInnerHeight)return;const{startLineNumber:gt,endLineNumber:kt}=a,Kt=gt===X?a.startColumn:1,eo=kt===X?a.endColumn:this._model.getLineMaxColumn(X),co=this.getXOffsetForPosition(n,X,Kt,He,$e,ot),go=this.getXOffsetForPosition(n,X,eo,He,$e,ot);this.renderDecoration(o,T,co,Ot,go-co,me)}getXOffsetForPosition(o,n,a,T,R,X){if(a===1)return ze.h;const me=(a-1)*R;if(me>=X)return X;let _e=o.get(n);if(!_e){const He=this._model.getLineContent(n);_e=[ze.h];let $e=ze.h;for(let ot=1;ot<He.length+1;ot++){const Ot=He.charCodeAt(ot-1),gt=Ot===9?T*R:ct.D(Ot)?2*R:R,kt=$e+gt;if(kt>=X){_e[ot]=X;break}_e[ot]=kt,$e=kt}o.set(n,_e)}return a-1<_e.length?_e[a-1]:X}renderDecoration(o,n,a,T,R,X){o.fillStyle=n&&n.toString()||"",o.fillRect(a,T,R,X)}renderLines(o){const n=o.startLineNumber,a=o.endLineNumber,T=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(o)){const Xi=this._lastRenderData._get();return new Wo(o,Xi.imageData,Xi.lines)}const R=this._getBuffer();if(!R)return null;let[X,me,_e]=mi._renderUntouchedLines(R,n,a,T,this._lastRenderData);const He=this._model.getMinimapLinesRenderingData(n,a,_e),$e=this._model.getOptions().tabSize,ot=this._model.options.defaultBackgroundColor,Ot=this._model.options.backgroundColor,gt=this._model.options.foregroundAlpha,kt=this._model.tokensColorTracker,Kt=kt.backgroundIsLight(),eo=this._model.options.renderMinimap,co=this._model.options.charRenderer(),go=this._model.options.fontScale,yo=this._model.options.minimapCharWidth,jo=eo===1?2:2+1,Po=jo*go,ti=T>Po?Math.floor((T-Po)/2):0,oi=Ot.a/255,$o=new Bt(Math.round((Ot.r-ot.r)*oi+ot.r),Math.round((Ot.g-ot.g)*oi+ot.g),Math.round((Ot.b-ot.b)*oi+ot.b),255);let Yo=0;const Ei=[];for(let Xi=0,dn=a-n+1;Xi<dn;Xi++)_e[Xi]&&mi._renderLine(R,$o,Ot.a,Kt,eo,yo,kt,gt,co,Yo,ti,$e,He[Xi],go,T),Ei[Xi]=new Oo(Yo),Yo+=T;const Ci=X===-1?0:X,bi=me===-1?R.height:me,ji=bi-Ci,ln=this._canvas.domNode.getContext("2d");return ln.putImageData(R,0,0,0,Ci,R.width,ji),new Wo(o,R,Ei)}static _renderUntouchedLines(o,n,a,T,R){const X=[];if(!R){for(let $o=0,Yo=a-n+1;$o<Yo;$o++)X[$o]=!0;return[-1,-1,X]}const me=R._get(),_e=me.imageData.data,He=me.rendLineNumberStart,$e=me.lines,ot=$e.length,Ot=o.width,gt=o.data,kt=(a-n+1)*T*Ot*4;let Kt=-1,eo=-1,co=-1,go=-1,yo=-1,jo=-1,Po=0;for(let $o=n;$o<=a;$o++){const Yo=$o-n,Ei=$o-He,Ci=Ei>=0&&Ei<ot?$e[Ei].dy:-1;if(Ci===-1){X[Yo]=!0,Po+=T;continue}const bi=Ci*Ot*4,ji=(Ci+T)*Ot*4,ln=Po*Ot*4,Xi=(Po+T)*Ot*4;go===bi&&jo===ln?(go=ji,jo=Xi):(co!==-1&&(gt.set(_e.subarray(co,go),yo),Kt===-1&&co===0&&co===yo&&(Kt=go),eo===-1&&go===kt&&co===yo&&(eo=co)),co=bi,go=ji,yo=ln,jo=Xi),X[Yo]=!1,Po+=T}co!==-1&&(gt.set(_e.subarray(co,go),yo),Kt===-1&&co===0&&co===yo&&(Kt=go),eo===-1&&go===kt&&co===yo&&(eo=co));const ti=Kt===-1?-1:Kt/(Ot*4),oi=eo===-1?-1:eo/(Ot*4);return[ti,oi,X]}static _renderLine(o,n,a,T,R,X,me,_e,He,$e,ot,Ot,gt,kt,Kt){const eo=gt.content,co=gt.tokens,go=o.width-X,yo=Kt===1;let jo=ze.h,Po=0,ti=0;for(let oi=0,$o=co.getCount();oi<$o;oi++){const Yo=co.getEndOffset(oi),Ei=co.getForeground(oi),Ci=me.getColor(Ei);for(;Po<Yo;Po++){if(jo>go)return;const bi=eo.charCodeAt(Po);if(bi===9){const ji=Ot-(Po+ti)%Ot;ti+=ji-1,jo+=ji*X}else if(bi===32)jo+=X;else{const ji=ct.D(bi)?2:1;for(let ln=0;ln<ji;ln++)if(R===2?He.blockRenderChar(o,jo,$e+ot,Ci,_e,n,a,yo):He.renderChar(o,jo,$e+ot,bi,Ci,_e,n,a,kt,T,yo),jo+=X,jo>go)return}}}}}class Ri{constructor(o,n,a){this._startLineNumber=o,this._endLineNumber=n,this._defaultValue=a,this._values=[];for(let T=0,R=this._endLineNumber-this._startLineNumber+1;T<R;T++)this._values[T]=a}has(o){return this.get(o)!==this._defaultValue}set(o,n){if(o<this._startLineNumber||o>this._endLineNumber)return;this._values[o-this._startLineNumber]=n}get(o){return o<this._startLineNumber||o>this._endLineNumber?this._defaultValue:this._values[o-this._startLineNumber]}}Object(so.f)((o,n)=>{const a=o.getColor(ui.ec);a&&n.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${a}; }`);const T=o.getColor(ui.fc);T&&n.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${T}; }`);const R=o.getColor(ui.dc);R&&n.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${R}; }`);const X=o.getColor(ui.yc);X&&n.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${X} -6px 0 6px -6px inset; }`)});var Di=t("cl4r");class pi extends ne{constructor(o){super(o);const n=this._context.configuration.options,a=n.get(129);this._widgets={},this._verticalScrollbarWidth=a.verticalScrollbarWidth,this._minimapWidth=a.minimap.minimapWidth,this._horizontalScrollbarHeight=a.horizontalScrollbarHeight,this._editorHeight=a.height,this._editorWidth=a.width,this._domNode=Object(h.b)(document.createElement("div")),Ee.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._verticalScrollbarWidth=a.verticalScrollbarWidth,this._minimapWidth=a.minimap.minimapWidth,this._horizontalScrollbarHeight=a.horizontalScrollbarHeight,this._editorHeight=a.height,this._editorWidth=a.width,!0}addWidget(o){const n=Object(h.b)(o.getDomNode());this._widgets[o.getId()]={widget:o,preference:null,domNode:n},n.setPosition("absolute"),n.setAttribute("widgetId",o.getId()),this._domNode.appendChild(n),this.setShouldRender()}setWidgetPosition(o,n){const a=this._widgets[o.getId()];return a.preference===n?!1:(a.preference=n,this.setShouldRender(),!0)}removeWidget(o){const n=o.getId();if(this._widgets.hasOwnProperty(n)){const a=this._widgets[n],T=a.domNode.domNode;delete this._widgets[n],T.parentNode.removeChild(T),this.setShouldRender()}}_renderWidget(o){const n=o.domNode;if(o.preference===null){n.unsetTop();return}if(o.preference===0)n.setTop(0),n.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(o.preference===1){const a=n.domNode.clientHeight;n.setTop(this._editorHeight-a-2*this._horizontalScrollbarHeight),n.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else o.preference===2&&(n.setTop(0),n.domNode.style.right="50%")}prepareRender(o){}render(o){this._domNode.setWidth(this._editorWidth);const n=Object.keys(this._widgets);for(let a=0,T=n.length;a<T;a++){const R=n[a];this._renderWidget(this._widgets[R])}}}var Wi=t("zrhQ");class fn{constructor(o,n){const a=o.options;this.lineHeight=a.get(58),this.pixelRatio=a.get(127),this.overviewRulerLanes=a.get(73),this.renderBorder=a.get(72);const T=n.getColor(Vt.F);this.borderColor=T?T.toString():null,this.hideCursor=a.get(51);const R=n.getColor(Vt.z);this.cursorColor=R?R.transparent(.7).toString():null,this.themeType=n.type;const X=a.get(64),me=X.enabled,_e=X.side,He=me?n.getColor(Vt.E)||zt.E.getDefaultBackground():null;He===null||_e==="left"?this.backgroundColor=null:this.backgroundColor=Wi.a.Format.CSS.formatHex(He);const $e=a.get(129),ot=$e.overviewRuler;this.top=ot.top,this.right=ot.right,this.domWidth=ot.width,this.domHeight=ot.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[Ot,gt]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=Ot,this.w=gt}_initLanes(o,n,a){const T=n-o;if(a>=3){const R=Math.floor(T/3),X=Math.floor(T/3),me=T-R-X,_e=o,He=_e+R,$e=_e+R+me;return[[0,_e,He,_e,$e,_e,He,_e],[0,R,me,R+me,X,R+me+X,me+X,R+me+X]]}else if(a===2){const R=Math.floor(T/2),X=T-R,me=o,_e=me+R;return[[0,me,me,me,_e,me,me,me],[0,R,R,R,X,R+X,R+X,R+X]]}else{const R=o,X=T;return[[0,R,R,R,R,R,R,R],[0,X,X,X,X,X,X,X]]}}equals(o){return this.lineHeight===o.lineHeight&&this.pixelRatio===o.pixelRatio&&this.overviewRulerLanes===o.overviewRulerLanes&&this.renderBorder===o.renderBorder&&this.borderColor===o.borderColor&&this.hideCursor===o.hideCursor&&this.cursorColor===o.cursorColor&&this.themeType===o.themeType&&this.backgroundColor===o.backgroundColor&&this.top===o.top&&this.right===o.right&&this.domWidth===o.domWidth&&this.domHeight===o.domHeight&&this.canvasWidth===o.canvasWidth&&this.canvasHeight===o.canvasHeight}}class In extends ne{constructor(o){super(o);this._domNode=Object(h.b)(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=zt.E.onDidChange(n=>{n.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(o){const n=new fn(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(n)?!1:(this._settings=n,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,o&&this._render(),!0)}onConfigurationChanged(o){return this._updateSettings(!1)}onCursorStateChanged(o){this._cursorPositions=[];for(let n=0,a=o.selections.length;n<a;n++)this._cursorPositions[n]=o.selections[n].getPosition();return this._cursorPositions.sort(we.a.compare),!0}onDecorationsChanged(o){return!!o.affectsOverviewRuler}onFlushed(o){return!0}onScrollChanged(o){return o.scrollHeightChanged}onZonesChanged(o){return!0}onThemeChanged(o){return this._context.model.invalidateOverviewRulerColorCache(),this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(o){}render(o){this._render()}_render(){if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"");return}const o=this._settings.canvasWidth,n=this._settings.canvasHeight,a=this._settings.lineHeight,T=this._context.viewLayout,R=this._context.viewLayout.getScrollHeight(),X=n/R,me=this._context.model.getAllOverviewRulerDecorations(this._context.theme),_e=6*this._settings.pixelRatio|0,He=_e/2|0,$e=this._domNode.domNode.getContext("2d");this._settings.backgroundColor===null?$e.clearRect(0,0,o,n):($e.fillStyle=this._settings.backgroundColor,$e.fillRect(0,0,o,n));const ot=this._settings.x,Ot=this._settings.w;me.sort(P.d.cmp);for(const gt of me){const kt=gt.color,Kt=gt.data;$e.fillStyle=kt;let eo=0,co=0,go=0;for(let yo=0,jo=Kt.length/3;yo<jo;yo++){const Po=Kt[3*yo],ti=Kt[3*yo+1],oi=Kt[3*yo+2];let $o=T.getVerticalOffsetForLineNumber(ti)*X|0,Yo=(T.getVerticalOffsetForLineNumber(oi)+a)*X|0;const Ei=Yo-$o;if(Ei<_e){let Ci=($o+Yo)/2|0;Ci<He?Ci=He:Ci+He>n&&(Ci=n-He),$o=Ci-He,Yo=Ci+He}$o>go+1||Po!==eo?(yo!==0&&$e.fillRect(ot[eo],co,Ot[eo],go-co),eo=Po,co=$o,go=Yo):Yo>go&&(go=Yo)}$e.fillRect(ot[eo],co,Ot[eo],go-co)}if(!this._settings.hideCursor&&this._settings.cursorColor){const gt=2*this._settings.pixelRatio|0,kt=gt/2|0,Kt=this._settings.x[7],eo=this._settings.w[7];$e.fillStyle=this._settings.cursorColor;let co=-100,go=-100;for(let yo=0,jo=this._cursorPositions.length;yo<jo;yo++){const Po=this._cursorPositions[yo];let ti=T.getVerticalOffsetForLineNumber(Po.lineNumber)*X|0;ti<kt?ti=kt:ti+kt>n&&(ti=n-kt);const oi=ti-kt,$o=oi+gt;oi>go+1?(yo!==0&&$e.fillRect(Kt,co,eo,go-co),co=oi,go=$o):$o>go&&(go=$o)}$e.fillRect(Kt,co,eo,go-co)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&($e.beginPath(),$e.lineWidth=1,$e.strokeStyle=this._settings.borderColor,$e.moveTo(0,0),$e.lineTo(0,n),$e.stroke(),$e.moveTo(0,0),$e.lineTo(o,0),$e.stroke())}}var an=t("MvK1");class bn extends te{constructor(o,n){super();this._context=o;const a=this._context.configuration.options;this._domNode=Object(h.b)(document.createElement("canvas")),this._domNode.setClassName(n),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new an.b(T=>this._context.viewLayout.getVerticalOffsetForLineNumber(T)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(a.get(58)),this._zoneManager.setPixelRatio(a.get(127)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(o){const n=this._context.configuration.options;return o.hasChanged(58)&&(this._zoneManager.setLineHeight(n.get(58)),this._render()),o.hasChanged(127)&&(this._zoneManager.setPixelRatio(n.get(127)),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(o){return this._render(),!0}onScrollChanged(o){return o.scrollHeightChanged&&(this._zoneManager.setOuterHeight(o.scrollHeight),this._render()),!0}onZonesChanged(o){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(o){this._domNode.setTop(o.top),this._domNode.setRight(o.right);let n=!1;n=this._zoneManager.setDOMWidth(o.width)||n,n=this._zoneManager.setDOMHeight(o.height)||n,n&&(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(o){this._zoneManager.setZones(o),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const o=this._zoneManager.getCanvasWidth(),n=this._zoneManager.getCanvasHeight(),a=this._zoneManager.resolveColorZones(),T=this._zoneManager.getId2Color(),R=this._domNode.domNode.getContext("2d");return R.clearRect(0,0,o,n),a.length>0&&this._renderOneLane(R,a,T,o),!0}_renderOneLane(o,n,a,T){let R=0,X=0,me=0;for(const _e of n){const He=_e.colorId,$e=_e.from,ot=_e.to;He!==R?(o.fillRect(0,X,T,me-X),R=He,o.fillStyle=a[R],X=$e,me=ot):me>=$e?me=Math.max(me,ot):(o.fillRect(0,X,T,me-X),X=$e,me=ot)}o.fillRect(0,X,T,me-X)}}var Wn=t("7zd4");class gn extends ne{constructor(o){super(o);this.domNode=Object(h.b)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const n=this._context.configuration.options;this._rulers=n.get(90),this._typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(o){const n=this._context.configuration.options;return this._rulers=n.get(90),this._typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth,!0}onScrollChanged(o){return o.scrollHeightChanged}prepareRender(o){}_ensureRulersCount(){const o=this._renderedRulers.length,n=this._rulers.length;if(o===n)return;if(o<n){const{tabSize:T}=this._context.model.getTextModelOptions(),R=T;let X=n-o;for(;X>0;){const me=Object(h.b)(document.createElement("div"));me.setClassName("view-ruler"),me.setWidth(R),this.domNode.appendChild(me),this._renderedRulers.push(me),X--}return}let a=o-n;for(;a>0;){const T=this._renderedRulers.pop();this.domNode.removeChild(T),a--}}render(o){this._ensureRulersCount();for(let n=0,a=this._rulers.length;n<a;n++){const T=this._renderedRulers[n],R=this._rulers[n];T.setBoxShadow(R.color?`1px 0 0 0 ${R.color} inset`:""),T.setHeight(Math.min(o.scrollHeight,1e6)),T.setLeft(R.column*this._typicalHalfwidthCharacterWidth)}}}Object(so.f)((o,n)=>{const a=o.getColor(Vt.G);a&&n.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${a} inset; }`)});var $n=t("2MPD");class Un extends ne{constructor(o){super(o);this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const n=this._context.configuration.options,a=n.get(91);this._useShadows=a.useShadows,this._domNode=Object(h.b)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const o=this._useShadows&&this._scrollTop>0;return this._shouldShow!==o?(this._shouldShow=o,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const o=this._context.configuration.options,n=o.get(129);n.minimap.renderMinimap===0||n.minimap.minimapWidth>0&&n.minimap.minimapLeft===0?this._width=n.width:this._width=n.width-n.minimap.minimapWidth-n.verticalScrollbarWidth}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(91);return this._useShadows=a.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(o){return this._scrollTop=o.scrollTop,this._updateShouldShow()}prepareRender(o){}render(o){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}Object(so.f)((o,n)=>{const a=o.getColor(ui.yc);a&&n.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${a} 0 6px 6px -6px inset; }`)});var qo=t("eC1c");class oo{constructor(o){this.left=o.left,this.width=o.width,this.startStyle=null,this.endStyle=null}}class So{constructor(o,n){this.lineNumber=o,this.ranges=n}}function Ne(o){return new oo(o)}function ae(o){return new So(o.lineNumber,o.ranges.map(Ne))}class ke extends Wt{constructor(o){super();this._previousFrameVisibleRangesWithStyle=[],this._context=o;const n=this._context.configuration.options;this._lineHeight=n.get(58),this._roundedSelection=n.get(89),this._typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(o){const n=this._context.configuration.options;return this._lineHeight=n.get(58),this._roundedSelection=n.get(89),this._typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(o){return this._selections=o.selections.slice(0),!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return o.scrollTopChanged}onZonesChanged(o){return!0}_visibleRangesHaveGaps(o){for(let n=0,a=o.length;n<a;n++){const T=o[n];if(T.ranges.length>1)return!0}return!1}_enrichVisibleRangesWithStyle(o,n,a){const T=this._typicalHalfwidthCharacterWidth/4;let R=null,X=null;if(a&&a.length>0&&n.length>0){const me=n[0].lineNumber;if(me===o.startLineNumber)for(let He=0;!R&&He<a.length;He++)a[He].lineNumber===me&&(R=a[He].ranges[0]);const _e=n[n.length-1].lineNumber;if(_e===o.endLineNumber)for(let He=a.length-1;!X&&He>=0;He--)a[He].lineNumber===_e&&(X=a[He].ranges[0]);R&&!R.startStyle&&(R=null),X&&!X.startStyle&&(X=null)}for(let me=0,_e=n.length;me<_e;me++){const He=n[me].ranges[0],$e=He.left,ot=He.left+He.width,Ot={top:0,bottom:0},gt={top:0,bottom:0};if(me>0){const kt=n[me-1].ranges[0].left,Kt=n[me-1].ranges[0].left+n[me-1].ranges[0].width;Je($e-kt)<T?Ot.top=2:$e>kt&&(Ot.top=1),Je(ot-Kt)<T?gt.top=2:kt<ot&&ot<Kt&&(gt.top=1)}else R&&(Ot.top=R.startStyle.top,gt.top=R.endStyle.top);if(me+1<_e){const kt=n[me+1].ranges[0].left,Kt=n[me+1].ranges[0].left+n[me+1].ranges[0].width;Je($e-kt)<T?Ot.bottom=2:kt<$e&&$e<Kt&&(Ot.bottom=1),Je(ot-Kt)<T?gt.bottom=2:ot<Kt&&(gt.bottom=1)}else X&&(Ot.bottom=X.startStyle.bottom,gt.bottom=X.endStyle.bottom);He.startStyle=Ot,He.endStyle=gt}}_getVisibleRangesWithStyle(o,n,a){const T=n.linesVisibleRangesForRange(o,!0)||[],R=T.map(ae),X=this._visibleRangesHaveGaps(R);return!X&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(n.visibleRange,R,a),R}_createSelectionPiece(o,n,a,T,R){return'<div class="cslr '+a+'" style="top:'+o.toString()+"px;left:"+T.toString()+"px;width:"+R.toString()+"px;height:"+n+'px;"></div>'}_actualRenderOneSelection(o,n,a,T){if(T.length===0)return;const R=!!T[0].ranges[0].startStyle,X=this._lineHeight.toString(),me=(this._lineHeight-1).toString(),_e=T[0].lineNumber,He=T[T.length-1].lineNumber;for(let $e=0,ot=T.length;$e<ot;$e++){const Ot=T[$e],gt=Ot.lineNumber,kt=gt-n,Kt=a&&(gt===He||gt===_e)?me:X,eo=a&>===_e?1:0;let co="",go="";for(let yo=0,jo=Ot.ranges.length;yo<jo;yo++){const Po=Ot.ranges[yo];if(R){const oi=Po.startStyle,$o=Po.endStyle;if(oi.top===1||oi.bottom===1){co+=this._createSelectionPiece(eo,Kt,ke.SELECTION_CLASS_NAME,Po.left-ke.ROUNDED_PIECE_WIDTH,ke.ROUNDED_PIECE_WIDTH);let Yo=ke.EDITOR_BACKGROUND_CLASS_NAME;oi.top===1&&(Yo+=" "+ke.SELECTION_TOP_RIGHT),oi.bottom===1&&(Yo+=" "+ke.SELECTION_BOTTOM_RIGHT),co+=this._createSelectionPiece(eo,Kt,Yo,Po.left-ke.ROUNDED_PIECE_WIDTH,ke.ROUNDED_PIECE_WIDTH)}if($o.top===1||$o.bottom===1){co+=this._createSelectionPiece(eo,Kt,ke.SELECTION_CLASS_NAME,Po.left+Po.width,ke.ROUNDED_PIECE_WIDTH);let Yo=ke.EDITOR_BACKGROUND_CLASS_NAME;$o.top===1&&(Yo+=" "+ke.SELECTION_TOP_LEFT),$o.bottom===1&&(Yo+=" "+ke.SELECTION_BOTTOM_LEFT),co+=this._createSelectionPiece(eo,Kt,Yo,Po.left+Po.width,ke.ROUNDED_PIECE_WIDTH)}}let ti=ke.SELECTION_CLASS_NAME;if(R){const oi=Po.startStyle,$o=Po.endStyle;oi.top===0&&(ti+=" "+ke.SELECTION_TOP_LEFT),oi.bottom===0&&(ti+=" "+ke.SELECTION_BOTTOM_LEFT),$o.top===0&&(ti+=" "+ke.SELECTION_TOP_RIGHT),$o.bottom===0&&(ti+=" "+ke.SELECTION_BOTTOM_RIGHT)}go+=this._createSelectionPiece(eo,Kt,ti,Po.left,Po.width)}o[kt][0]+=co,o[kt][1]+=go}}prepareRender(o){const n=[],a=o.visibleRange.startLineNumber,T=o.visibleRange.endLineNumber;for(let X=a;X<=T;X++){const me=X-a;n[me]=["",""]}const R=[];for(let X=0,me=this._selections.length;X<me;X++){const _e=this._selections[X];if(_e.isEmpty()){R[X]=null;continue}const He=this._getVisibleRangesWithStyle(_e,o,this._previousFrameVisibleRangesWithStyle[X]);R[X]=He,this._actualRenderOneSelection(n,a,this._selections.length>1,He)}this._previousFrameVisibleRangesWithStyle=R,this._renderResult=n.map(([X,me])=>X+me)}render(o,n){if(!this._renderResult)return"";const a=n-o;return a<0||a>=this._renderResult.length?"":this._renderResult[a]}}ke.SELECTION_CLASS_NAME="selected-text",ke.SELECTION_TOP_LEFT="top-left-radius",ke.SELECTION_BOTTOM_LEFT="bottom-left-radius",ke.SELECTION_TOP_RIGHT="top-right-radius",ke.SELECTION_BOTTOM_RIGHT="bottom-right-radius",ke.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",ke.ROUNDED_PIECE_WIDTH=10,Object(so.f)((o,n)=>{const a=o.getColor(ui.P);a&&n.addRule(`.monaco-editor .focused .selected-text { background-color: ${a}; }`);const T=o.getColor(ui.J);T&&n.addRule(`.monaco-editor .selected-text { background-color: ${T}; }`);const R=o.getColor(ui.Q);R&&!R.isTransparent()&&n.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${R}; }`)});function Je(o){return o<0?-o:o}var g=t("2Tsy");class u{constructor(o,n,a,T,R,X){this.top=o,this.left=n,this.width=a,this.height=T,this.textContent=R,this.textContentClassName=X}}class w{constructor(o){this._context=o;const n=this._context.configuration.options,a=n.get(43);this._cursorStyle=n.get(24),this._lineHeight=n.get(58),this._typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(n.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Object(h.b)(document.createElement("div")),this._domNode.setClassName(`cursor ${_o.a}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),S.a.applyFontInfo(this._domNode,a),this._domNode.setDisplay("none"),this._position=new we.a(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(o){const n=this._context.configuration.options,a=n.get(43);return this._cursorStyle=n.get(24),this._lineHeight=n.get(58),this._typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(n.get(27),this._typicalHalfwidthCharacterWidth),S.a.applyFontInfo(this._domNode,a),!0}onCursorPositionChanged(o){return this._position=o,!0}_prepareRender(o){let n="";if(this._cursorStyle===ze.i.Line||this._cursorStyle===ze.i.LineThin){const Ot=o.visibleRangeForPosition(this._position);if(!Ot||Ot.outsideRenderedLine)return null;let gt;if(this._cursorStyle===ze.i.Line){if(gt=L.u(this._lineCursorWidth>0?this._lineCursorWidth:2),gt>2){const eo=this._context.model.getLineContent(this._position.lineNumber),co=ct.K(eo,this._position.column-1);n=eo.substr(this._position.column-1,co)}}else gt=L.u(1);let kt=Ot.left;gt>=2&&kt>=1&&(kt-=1);const Kt=o.getVerticalOffsetForLineNumber(this._position.lineNumber)-o.bigNumbersDelta;return new u(Kt,kt,gt,this._lineHeight,n,"")}const a=this._context.model.getLineContent(this._position.lineNumber),T=ct.K(a,this._position.column-1),R=o.linesVisibleRangesForRange(new Oe.a(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+T),!1);if(!R||R.length===0)return null;const X=R[0];if(X.outsideRenderedLine||X.ranges.length===0)return null;const me=X.ranges[0],_e=me.width<1?this._typicalHalfwidthCharacterWidth:me.width;let He="";if(this._cursorStyle===ze.i.Block){const Ot=this._context.model.getViewLineData(this._position.lineNumber);n=a.substr(this._position.column-1,T);const gt=Ot.tokens.findTokenIndexAtOffset(this._position.column-1);He=Ot.tokens.getClassName(gt)}let $e=o.getVerticalOffsetForLineNumber(this._position.lineNumber)-o.bigNumbersDelta,ot=this._lineHeight;return(this._cursorStyle===ze.i.Underline||this._cursorStyle===ze.i.UnderlineThin)&&($e+=this._lineHeight-2,ot=2),new u($e,me.left,_e,ot,n,He)}prepareRender(o){this._renderData=this._prepareRender(o)}render(o){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${_o.a} ${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 V extends ne{constructor(o){super(o);const n=this._context.configuration.options;this._readOnly=n.get(80),this._cursorBlinking=n.get(22),this._cursorStyle=n.get(24),this._cursorSmoothCaretAnimation=n.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new w(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=Object(h.b)(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 y.g,this._cursorFlatBlinkInterval=new y.c,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(o){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(o){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(o){const n=this._context.configuration.options;this._readOnly=n.get(80),this._cursorBlinking=n.get(22),this._cursorStyle=n.get(24),this._cursorSmoothCaretAnimation=n.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(o);for(let a=0,T=this._secondaryCursors.length;a<T;a++)this._secondaryCursors[a].onConfigurationChanged(o);return!0}_onCursorPositionChanged(o,n){if(this._primaryCursor.onCursorPositionChanged(o),this._updateBlinking(),this._secondaryCursors.length<n.length){const a=n.length-this._secondaryCursors.length;for(let T=0;T<a;T++){const R=new w(this._context);this._domNode.domNode.insertBefore(R.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(R)}}else if(this._secondaryCursors.length>n.length){const a=this._secondaryCursors.length-n.length;for(let T=0;T<a;T++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let a=0;a<n.length;a++)this._secondaryCursors[a].onCursorPositionChanged(n[a])}onCursorStateChanged(o){const n=[];for(let T=0,R=o.selections.length;T<R;T++)n[T]=o.selections[T].getPosition();this._onCursorPositionChanged(n[0],n.slice(1));const a=o.selections[0].isEmpty();return this._selectionIsEmpty!==a&&(this._selectionIsEmpty=a,this._updateDomClassName()),!0}onDecorationsChanged(o){return!0}onFlushed(o){return!0}onFocusChanged(o){return this._editorHasFocus=o.isFocused,this._updateBlinking(),!1}onLinesChanged(o){return!0}onLinesDeleted(o){return!0}onLinesInserted(o){return!0}onScrollChanged(o){return!0}onTokensChanged(o){const n=a=>{for(let T=0,R=o.ranges.length;T<R;T++)if(o.ranges[T].fromLineNumber<=a.lineNumber&&a.lineNumber<=o.ranges[T].toLineNumber)return!0;return!1};if(n(this._primaryCursor.getPosition()))return!0;for(const a of this._secondaryCursors)if(n(a.getPosition()))return!0;return!1}onZonesChanged(o){return!0}_getCursorBlinking(){return this._isComposingInput?0:this._editorHasFocus?this._readOnly?5:this._cursorBlinking:0}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const o=this._getCursorBlinking(),n=o===0,a=o===5;n?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!n&&!a&&(o===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},V.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},V.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let o="cursors-layer";this._selectionIsEmpty||(o+=" has-selection");switch(this._cursorStyle){case ze.i.Line:o+=" cursor-line-style";break;case ze.i.Block:o+=" cursor-block-style";break;case ze.i.Underline:o+=" cursor-underline-style";break;case ze.i.LineThin:o+=" cursor-line-thin-style";break;case ze.i.BlockOutline:o+=" cursor-block-outline-style";break;case ze.i.UnderlineThin:o+=" cursor-underline-thin-style";break;default:o+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:o+=" cursor-blink";break;case 2:o+=" cursor-smooth";break;case 3:o+=" cursor-phase";break;case 4:o+=" cursor-expand";break;case 5:o+=" cursor-solid";break;default:o+=" cursor-solid"}else o+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(o+=" cursor-smooth-caret-animation"),o}_show(){this._primaryCursor.show();for(let o=0,n=this._secondaryCursors.length;o<n;o++)this._secondaryCursors[o].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let o=0,n=this._secondaryCursors.length;o<n;o++)this._secondaryCursors[o].hide();this._isVisible=!1}prepareRender(o){this._primaryCursor.prepareRender(o);for(let n=0,a=this._secondaryCursors.length;n<a;n++)this._secondaryCursors[n].prepareRender(o)}render(o){let n=[],a=0;const T=this._primaryCursor.render(o);T&&(n[a++]=T);for(let R=0,X=this._secondaryCursors.length;R<X;R++){const me=this._secondaryCursors[R].render(o);me&&(n[a++]=me)}this._renderData=n}getLastRenderData(){return this._renderData}}V.BLINK_INTERVAL=500,Object(so.f)((o,n)=>{const a=o.getColor(Vt.z);if(a){let T=o.getColor(Vt.y);T||(T=a.opposite()),n.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${a}; border-color: ${a}; color: ${T}; }`),o.type==="hc"&&n.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${T}; border-right: 1px solid ${T}; }`)}});const se=()=>{throw new Error("Invalid change accessor")};class pe extends ne{constructor(o){super(o);const n=this._context.configuration.options,a=n.get(129);this._lineHeight=n.get(58),this._contentWidth=a.contentWidth,this._contentLeft=a.contentLeft,this.domNode=Object(h.b)(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=Object(h.b)(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 o=this._context.viewLayout.getWhitespaces(),n=new Map;for(const T of o)n.set(T.id,T);let a=!1;return this._context.model.changeWhitespace(T=>{const R=Object.keys(this._zones);for(let X=0,me=R.length;X<me;X++){const _e=R[X],He=this._zones[_e],$e=this._computeWhitespaceProps(He.delegate);He.isInHiddenArea=$e.isInHiddenArea;const ot=n.get(_e);ot&&(ot.afterLineNumber!==$e.afterViewLineNumber||ot.height!==$e.heightInPx)&&(T.changeOneWhitespace(_e,$e.afterViewLineNumber,$e.heightInPx),this._safeCallOnComputedHeight(He.delegate,$e.heightInPx),a=!0)}}),a}onConfigurationChanged(o){const n=this._context.configuration.options,a=n.get(129);return this._lineHeight=n.get(58),this._contentWidth=a.contentWidth,this._contentLeft=a.contentLeft,o.hasChanged(58)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(o){return this._recomputeWhitespacesProps()}onLinesDeleted(o){return!0}onScrollChanged(o){return o.scrollTopChanged||o.scrollWidthChanged}onZonesChanged(o){return!0}onLinesInserted(o){return!0}_getZoneOrdinal(o){return typeof o.afterColumn!="undefined"?o.afterColumn:1e4}_computeWhitespaceProps(o){if(o.afterLineNumber===0)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(o),minWidthInPx:this._minWidthInPixels(o)};let n;if(typeof o.afterColumn!="undefined")n=this._context.model.validateModelPosition({lineNumber:o.afterLineNumber,column:o.afterColumn});else{const X=this._context.model.validateModelPosition({lineNumber:o.afterLineNumber,column:1}).lineNumber;n=new we.a(X,this._context.model.getModelLineMaxColumn(X))}let a;n.column===this._context.model.getModelLineMaxColumn(n.lineNumber)?a=this._context.model.validateModelPosition({lineNumber:n.lineNumber+1,column:1}):a=this._context.model.validateModelPosition({lineNumber:n.lineNumber,column:n.column+1});const T=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(n),R=this._context.model.coordinatesConverter.modelPositionIsVisible(a);return{isInHiddenArea:!R,afterViewLineNumber:T.lineNumber,heightInPx:R?this._heightInPixels(o):0,minWidthInPx:this._minWidthInPixels(o)}}changeViewZones(o){let n=!1;return this._context.model.changeWhitespace(a=>{const T={addZone:R=>(n=!0,this._addZone(a,R)),removeZone:R=>{if(!R)return;n=this._removeZone(a,R)||n},layoutZone:R=>{if(!R)return;n=this._layoutZone(a,R)||n}};Se(o,T),T.addZone=se,T.removeZone=se,T.layoutZone=se}),n}_addZone(o,n){const a=this._computeWhitespaceProps(n),T=o.insertWhitespace(a.afterViewLineNumber,this._getZoneOrdinal(n),a.heightInPx,a.minWidthInPx),R={whitespaceId:T,delegate:n,isInHiddenArea:a.isInHiddenArea,isVisible:!1,domNode:Object(h.b)(n.domNode),marginDomNode:n.marginDomNode?Object(h.b)(n.marginDomNode):null};return this._safeCallOnComputedHeight(R.delegate,a.heightInPx),R.domNode.setPosition("absolute"),R.domNode.domNode.style.width="100%",R.domNode.setDisplay("none"),R.domNode.setAttribute("monaco-view-zone",R.whitespaceId),this.domNode.appendChild(R.domNode),R.marginDomNode&&(R.marginDomNode.setPosition("absolute"),R.marginDomNode.domNode.style.width="100%",R.marginDomNode.setDisplay("none"),R.marginDomNode.setAttribute("monaco-view-zone",R.whitespaceId),this.marginDomNode.appendChild(R.marginDomNode)),this._zones[R.whitespaceId]=R,this.setShouldRender(),R.whitespaceId}_removeZone(o,n){if(this._zones.hasOwnProperty(n)){const a=this._zones[n];return delete this._zones[n],o.removeWhitespace(a.whitespaceId),a.domNode.removeAttribute("monaco-visible-view-zone"),a.domNode.removeAttribute("monaco-view-zone"),a.domNode.domNode.parentNode.removeChild(a.domNode.domNode),a.marginDomNode&&(a.marginDomNode.removeAttribute("monaco-visible-view-zone"),a.marginDomNode.removeAttribute("monaco-view-zone"),a.marginDomNode.domNode.parentNode.removeChild(a.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(o,n){if(this._zones.hasOwnProperty(n)){const a=this._zones[n],T=this._computeWhitespaceProps(a.delegate);return a.isInHiddenArea=T.isInHiddenArea,o.changeOneWhitespace(a.whitespaceId,T.afterViewLineNumber,T.heightInPx),this._safeCallOnComputedHeight(a.delegate,T.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(o){if(this._zones.hasOwnProperty(o)){const n=this._zones[o];return Boolean(n.delegate.suppressMouseDown)}return!1}_heightInPixels(o){return typeof o.heightInPx=="number"?o.heightInPx:typeof o.heightInLines=="number"?this._lineHeight*o.heightInLines:this._lineHeight}_minWidthInPixels(o){return typeof o.minWidthInPx=="number"?o.minWidthInPx:0}_safeCallOnComputedHeight(o,n){if(typeof o.onComputedHeight=="function")try{o.onComputedHeight(n)}catch(a){Object(v.f)(a)}}_safeCallOnDomNodeTop(o,n){if(typeof o.onDomNodeTop=="function")try{o.onDomNodeTop(n)}catch(a){Object(v.f)(a)}}prepareRender(o){}render(o){const n=o.viewportData.whitespaceViewportData,a={};let T=!1;for(const X of n){if(this._zones[X.id].isInHiddenArea)continue;a[X.id]=X,T=!0}const R=Object.keys(this._zones);for(let X=0,me=R.length;X<me;X++){const _e=R[X],He=this._zones[_e];let $e=0,ot=0,Ot="none";a.hasOwnProperty(_e)?($e=a[_e].verticalOffset-o.bigNumbersDelta,ot=a[_e].height,Ot="block",He.isVisible||(He.domNode.setAttribute("monaco-visible-view-zone","true"),He.isVisible=!0),this._safeCallOnDomNodeTop(He.delegate,o.getScrolledTopFromAbsoluteTop(a[_e].verticalOffset))):(He.isVisible&&(He.domNode.removeAttribute("monaco-visible-view-zone"),He.isVisible=!1),this._safeCallOnDomNodeTop(He.delegate,o.getScrolledTopFromAbsoluteTop(-1e6))),He.domNode.setTop($e),He.domNode.setHeight(ot),He.domNode.setDisplay(Ot),He.marginDomNode&&(He.marginDomNode.setTop($e),He.marginDomNode.setHeight(ot),He.marginDomNode.setDisplay(Ot))}T&&(this.domNode.setWidth(Math.max(o.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}function Se(o,n){try{return o(n)}catch(a){Object(v.f)(a)}}class Qe{constructor(o){this._theme=o}get type(){return this._theme.type}update(o){this._theme=o}getColor(o){return this._theme.getColor(o)}}class ut{constructor(o,n,a){this.configuration=o,this.theme=new Qe(n),this.model=a,this.viewLayout=a.viewLayout}addEventHandler(o){this.model.addViewEventHandler(o)}removeEventHandler(o){this.model.removeViewEventHandler(o)}}class yt{constructor(o,n,a,T){this.selections=o,this.startLineNumber=n.startLineNumber|0,this.endLineNumber=n.endLineNumber|0,this.relativeVerticalOffset=n.relativeVerticalOffset,this.bigNumbersDelta=n.bigNumbersDelta|0,this.whitespaceViewportData=a,this._model=T,this.visibleRange=new Oe.a(n.startLineNumber,this._model.getLineMinColumn(n.startLineNumber),n.endLineNumber,this._model.getLineMaxColumn(n.endLineNumber))}getViewLineRenderingData(o){return this._model.getViewLineRenderingData(this.visibleRange,o)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class Ct extends te{constructor(o,n,a,T,R,X){super();this._selections=[new b.a(1,1,1,1)],this._renderAnimationFrame=null;const me=new St(n,T,R,o);this._context=new ut(n,a.getColorTheme(),T),this._configPixelRatio=this._context.configuration.options.get(127),this._context.addEventHandler(this),this._register(a.onDidColorThemeChange(Kt=>{this._context.theme.update(Kt),this._context.model.onDidColorThemeChange(),this.render(!0,!1)})),this._viewParts=[],this._textAreaHandler=new xt(this._context,me,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=Object(h.b)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=Object(h.b)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=Object(h.b)(document.createElement("div")),Ee.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new pn(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new be(this._context,this._linesContent),this._viewZones=new pe(this._context),this._viewParts.push(this._viewZones);const _e=new In(this._context);this._viewParts.push(_e);const He=new Un(this._context);this._viewParts.push(He);const $e=new ri(this._context);this._viewParts.push($e),$e.addDynamicOverlay(new on(this._context)),$e.addDynamicOverlay(new ke(this._context)),$e.addDynamicOverlay(new rn(this._context)),$e.addDynamicOverlay(new zi(this._context));const ot=new Zo(this._context);this._viewParts.push(ot),ot.addDynamicOverlay(new cn(this._context)),ot.addDynamicOverlay(new Qi(this._context)),ot.addDynamicOverlay(new vt(this._context)),ot.addDynamicOverlay(new Be(this._context)),ot.addDynamicOverlay(new wo(this._context));const Ot=new No(this._context);Ot.getDomNode().appendChild(this._viewZones.marginDomNode),Ot.getDomNode().appendChild(ot.getDomNode()),this._viewParts.push(Ot),this._contentWidgets=new ki(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new V(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new pi(this._context),this._viewParts.push(this._overlayWidgets);const gt=new gn(this._context);this._viewParts.push(gt);const kt=new Uo(this._context);if(this._viewParts.push(kt),_e){const Kt=this._scrollbar.getOverviewRulerLayoutInfo();Kt.parent.insertBefore(_e.getDomNode(),Kt.insertBefore)}this._linesContent.appendChild($e.getDomNode()),this._linesContent.appendChild(gt.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(Ot.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(He.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(kt.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),X?X.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new Ye(this._context,me,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:o=>{this._textAreaHandler.textArea.domNode.dispatchEvent(o)},getLastRenderData:()=>{const o=this._viewCursors.getLastRenderData()||[],n=this._textAreaHandler.getLastRenderData();return new $t(o,n)},shouldSuppressMouseDownOnViewZone:o=>this._viewZones.shouldSuppressMouseDownOnViewZone(o),shouldSuppressMouseDownOnWidget:o=>this._contentWidgets.shouldSuppressMouseDownOnWidget(o),getPositionFromDOMInfo:(o,n)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(o,n)),visibleRangeForPosition:(o,n)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new we.a(o,n))),getLineWidth:o=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(o))}}_createTextAreaHandlerHelper(){return{visibleRangeForPositionRelativeToEditor:(o,n)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new we.a(o,n)))}}_applyLayout(){const o=this._context.configuration.options,n=o.get(129);this.domNode.setWidth(n.width),this.domNode.setHeight(n.height),this._overflowGuardContainer.setWidth(n.width),this._overflowGuardContainer.setHeight(n.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const o=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(126)+" "+Object(so.e)(this._context.theme.type)+o}handleEvents(o){super.handleEvents(o),this._scheduleRender()}onConfigurationChanged(o){return this._configPixelRatio=this._context.configuration.options.get(127),this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(o){return this._selections=o.selections,!1}onFocusChanged(o){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(o){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const o of this._viewParts)o.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=L.T(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){At(()=>this._actualRender())}_getViewPartsToRender(){let o=[],n=0;for(const a of this._viewParts)a.shouldRender()&&(o[n++]=a);return o}_actualRender(){if(!L.N(this.domNode.domNode))return;let o=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&o.length===0)return;const n=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(n.startLineNumber,n.endLineNumber,n.centeredLineNumber);const a=new yt(this._selections,n,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(a),this._viewLines.shouldRender()&&(this._viewLines.renderText(a),this._viewLines.onDidRender(),o=this._getViewPartsToRender());const T=new ee(this._context.viewLayout,a,this._viewLines);for(const R of o)R.prepareRender(T);for(const R of o)R.render(T),R.onDidRender();Math.abs(_.a()-this._configPixelRatio)>.001&&this._context.configuration.updatePixelRatio()}delegateVerticalScrollbarMouseDown(o){this._scrollbar.delegateVerticalScrollbarMouseDown(o)}restoreState(o){this._context.model.setScrollPosition({scrollTop:o.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:o.scrollLeft},1)}getOffsetForColumn(o,n){const a=this._context.model.validateModelPosition({lineNumber:o,column:n}),T=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(a);this._flushAccumulatedAndRenderNow();const R=this._viewLines.visibleRangeForPosition(new we.a(T.lineNumber,T.column));return R?R.left:-1}getTargetAtClientPoint(o,n){const a=this._pointerHandler.getTargetAtClientPoint(o,n);return a?Qt.convertViewToModelMouseTarget(a,this._context.model.coordinatesConverter):null}createOverviewRuler(o){return new bn(this._context,o)}change(o){this._viewZones.changeViewZones(o),this._scheduleRender()}render(o,n){if(n){this._viewLines.forceShouldRender();for(const a of this._viewParts)a.forceShouldRender()}o?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(o){this._textAreaHandler.setAriaOptions(o)}addContentWidget(o){this._contentWidgets.addWidget(o.widget),this.layoutContentWidget(o),this._scheduleRender()}layoutContentWidget(o){let n=o.position&&o.position.range||null;if(n===null){const T=o.position?o.position.position:null;T!==null&&(n=new Oe.a(T.lineNumber,T.column,T.lineNumber,T.column))}const a=o.position?o.position.preference:null;this._contentWidgets.setWidgetPosition(o.widget,n,a),this._scheduleRender()}removeContentWidget(o){this._contentWidgets.removeWidget(o.widget),this._scheduleRender()}addOverlayWidget(o){this._overlayWidgets.addWidget(o.widget),this.layoutOverlayWidget(o),this._scheduleRender()}layoutOverlayWidget(o){const n=o.position?o.position.preference:null,a=this._overlayWidgets.setWidgetPosition(o.widget,n);a&&this._scheduleRender()}removeOverlayWidget(o){this._overlayWidgets.removeWidget(o.widget),this._scheduleRender()}}function At(o){try{return o()}catch(n){Object(v.f)(n)}}class Ft{constructor(o){this._selTrackedRange=null,this._trackSelection=!0,this._setState(o,new nt.f(new Oe.a(1,1,1,1),0,new we.a(1,1),0),new nt.f(new Oe.a(1,1,1,1),0,new we.a(1,1),0))}dispose(o){this._removeTrackedRange(o)}startTrackingSelection(o){this._trackSelection=!0,this._updateTrackedRange(o)}stopTrackingSelection(o){this._trackSelection=!1,this._removeTrackedRange(o)}_updateTrackedRange(o){if(!this._trackSelection)return;this._selTrackedRange=o.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0)}_removeTrackedRange(o){this._selTrackedRange=o.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new nt.d(this.modelState,this.viewState)}readSelectionFromMarkers(o){const n=o.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.getDirection()===0?new b.a(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new b.a(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}ensureValidState(o){this._setState(o,this.modelState,this.viewState)}setState(o,n,a){this._setState(o,n,a)}static _validatePositionWithCache(o,n,a,T){return n.equals(a)?T:o.normalizePosition(n,2)}static _validateViewState(o,n){const a=n.position,T=n.selectionStart.getStartPosition(),R=n.selectionStart.getEndPosition(),X=o.normalizePosition(a,2),me=this._validatePositionWithCache(o,T,a,X),_e=this._validatePositionWithCache(o,R,T,me);return a.equals(X)&&T.equals(me)&&R.equals(_e)?n:new nt.f(Oe.a.fromPositions(me,_e),n.selectionStartLeftoverVisibleColumns+T.column-me.column,X,n.leftoverVisibleColumns+a.column-X.column)}_setState(o,n,a){if(a&&(a=Ft._validateViewState(o.viewModel,a)),n){const T=o.model.validateRange(n.selectionStart),R=n.selectionStart.equalsRange(T)?n.selectionStartLeftoverVisibleColumns:0,X=o.model.validatePosition(n.position),me=n.position.equals(X)?n.leftoverVisibleColumns:0;n=new nt.f(T,R,X,me)}else{if(!a)return;const T=o.model.validateRange(o.coordinatesConverter.convertViewRangeToModelRange(a.selectionStart)),R=o.model.validatePosition(o.coordinatesConverter.convertViewPositionToModelPosition(a.position));n=new nt.f(T,a.selectionStartLeftoverVisibleColumns,R,a.leftoverVisibleColumns)}if(a){const T=o.coordinatesConverter.validateViewRange(a.selectionStart,n.selectionStart),R=o.coordinatesConverter.validateViewPosition(a.position,n.position);a=new nt.f(T,n.selectionStartLeftoverVisibleColumns,R,n.leftoverVisibleColumns)}else{const T=o.coordinatesConverter.convertModelPositionToViewPosition(new we.a(n.selectionStart.startLineNumber,n.selectionStart.startColumn)),R=o.coordinatesConverter.convertModelPositionToViewPosition(new we.a(n.selectionStart.endLineNumber,n.selectionStart.endColumn)),X=new Oe.a(T.lineNumber,T.column,R.lineNumber,R.column),me=o.coordinatesConverter.convertModelPositionToViewPosition(n.position);a=new nt.f(X,n.selectionStartLeftoverVisibleColumns,me,n.leftoverVisibleColumns)}this.modelState=n,this.viewState=a,this._updateTrackedRange(o)}}class Zt{constructor(o){this.context=o,this.primaryCursor=new Ft(o),this.secondaryCursors=[],this.lastAddedCursorIndex=0}dispose(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()}startTrackingSelections(){this.primaryCursor.startTrackingSelection(this.context);for(let o=0,n=this.secondaryCursors.length;o<n;o++)this.secondaryCursors[o].startTrackingSelection(this.context)}stopTrackingSelections(){this.primaryCursor.stopTrackingSelection(this.context);for(let o=0,n=this.secondaryCursors.length;o<n;o++)this.secondaryCursors[o].stopTrackingSelection(this.context)}updateContext(o){this.context=o}ensureValidState(){this.primaryCursor.ensureValidState(this.context);for(let o=0,n=this.secondaryCursors.length;o<n;o++)this.secondaryCursors[o].ensureValidState(this.context)}readSelectionFromMarkers(){let o=[];o[0]=this.primaryCursor.readSelectionFromMarkers(this.context);for(let n=0,a=this.secondaryCursors.length;n<a;n++)o[n+1]=this.secondaryCursors[n].readSelectionFromMarkers(this.context);return o}getAll(){let o=[];o[0]=this.primaryCursor.asCursorState();for(let n=0,a=this.secondaryCursors.length;n<a;n++)o[n+1]=this.secondaryCursors[n].asCursorState();return o}getViewPositions(){let o=[];o[0]=this.primaryCursor.viewState.position;for(let n=0,a=this.secondaryCursors.length;n<a;n++)o[n+1]=this.secondaryCursors[n].viewState.position;return o}getTopMostViewPosition(){let o=this.primaryCursor.viewState.position;for(let n=0,a=this.secondaryCursors.length;n<a;n++){const T=this.secondaryCursors[n].viewState.position;T.isBefore(o)&&(o=T)}return o}getBottomMostViewPosition(){let o=this.primaryCursor.viewState.position;for(let n=0,a=this.secondaryCursors.length;n<a;n++){const T=this.secondaryCursors[n].viewState.position;o.isBeforeOrEqual(T)&&(o=T)}return o}getSelections(){let o=[];o[0]=this.primaryCursor.modelState.selection;for(let n=0,a=this.secondaryCursors.length;n<a;n++)o[n+1]=this.secondaryCursors[n].modelState.selection;return o}getViewSelections(){let o=[];o[0]=this.primaryCursor.viewState.selection;for(let n=0,a=this.secondaryCursors.length;n<a;n++)o[n+1]=this.secondaryCursors[n].viewState.selection;return o}setSelections(o){this.setStates(nt.d.fromModelSelections(o))}getPrimaryCursor(){return this.primaryCursor.asCursorState()}setStates(o){if(o===null)return;this.primaryCursor.setState(this.context,o[0].modelState,o[0].viewState),this._setSecondaryStates(o.slice(1))}_setSecondaryStates(o){const n=this.secondaryCursors.length,a=o.length;if(n<a){let T=a-n;for(let R=0;R<T;R++)this._addSecondaryCursor()}else if(n>a){let T=n-a;for(let R=0;R<T;R++)this._removeSecondaryCursor(this.secondaryCursors.length-1)}for(let T=0;T<a;T++)this.secondaryCursors[T].setState(this.context,o[T].modelState,o[T].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.secondaryCursors.push(new Ft(this.context)),this.lastAddedCursorIndex=this.secondaryCursors.length}getLastAddedCursorIndex(){return this.secondaryCursors.length===0||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(o){this.lastAddedCursorIndex>=o+1&&this.lastAddedCursorIndex--,this.secondaryCursors[o].dispose(this.context),this.secondaryCursors.splice(o,1)}_getAll(){let o=[];o[0]=this.primaryCursor;for(let n=0,a=this.secondaryCursors.length;n<a;n++)o[n+1]=this.secondaryCursors[n];return o}normalize(){if(this.secondaryCursors.length===0)return;let o=this._getAll(),n=[];for(let a=0,T=o.length;a<T;a++)n.push({index:a,selection:o[a].modelState.selection});n.sort((a,T)=>a.selection.startLineNumber===T.selection.startLineNumber?a.selection.startColumn-T.selection.startColumn:a.selection.startLineNumber-T.selection.startLineNumber);for(let a=0;a<n.length-1;a++){const T=n[a],R=n[a+1],X=T.selection,me=R.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let _e;if(me.isEmpty()||X.isEmpty()?_e=me.getStartPosition().isBeforeOrEqual(X.getEndPosition()):_e=me.getStartPosition().isBefore(X.getEndPosition()),_e){const He=T.index<R.index?a:a+1,$e=T.index<R.index?a+1:a,ot=n[$e].index,Ot=n[He].index,gt=n[$e].selection,kt=n[He].selection;if(!gt.equalsSelection(kt)){const Kt=gt.plusRange(kt),eo=gt.selectionStartLineNumber===gt.startLineNumber&>.selectionStartColumn===gt.startColumn,co=kt.selectionStartLineNumber===kt.startLineNumber&&kt.selectionStartColumn===kt.startColumn;let go;ot===this.lastAddedCursorIndex?(go=eo,this.lastAddedCursorIndex=Ot):go=co;let yo;go?yo=new b.a(Kt.startLineNumber,Kt.startColumn,Kt.endLineNumber,Kt.endColumn):yo=new b.a(Kt.endLineNumber,Kt.endColumn,Kt.startLineNumber,Kt.startColumn),n[He].selection=yo;const jo=nt.d.fromModelSelection(yo);o[Ot].setState(this.context,jo.modelState,jo.viewState)}for(const Kt of n)Kt.index>ot&&Kt.index--;o.splice(ot,1),n.splice($e,1),this._removeSecondaryCursor(ot-1),a--}}}}var Yt=t("snIX"),ao=t("GR/f"),Co=t("M46C");class ko{constructor(){this.type=0}}class Qo{constructor(){this.type=1}}class yi{constructor(o){this.type=2,this._source=o}hasChanged(o){return this._source.hasChanged(o)}}class Ko{constructor(o,n){this.type=3,this.selections=o,this.modelSelections=n}}class li{constructor(o){this.type=4,o?(this.affectsMinimap=o.affectsMinimap,this.affectsOverviewRuler=o.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class Ki{constructor(){this.type=5}}class xi{constructor(o){this.type=6,this.isFocused=o}}class Ni{constructor(){this.type=7}}class Ti{constructor(){this.type=8}}class wn{constructor(o,n){this.type=9,this.fromLineNumber=o,this.toLineNumber=n}}class yn{constructor(o,n){this.type=10,this.fromLineNumber=o,this.toLineNumber=n}}class En{constructor(o,n){this.type=11,this.fromLineNumber=o,this.toLineNumber=n}}class Mn{constructor(o,n,a,T,R,X){this.type=12,this.source=o,this.range=n,this.selections=a,this.verticalType=T,this.revealHorizontal=R,this.scrollType=X}}class Os{constructor(o){this.type=13,this.scrollWidth=o.scrollWidth,this.scrollLeft=o.scrollLeft,this.scrollHeight=o.scrollHeight,this.scrollTop=o.scrollTop,this.scrollWidthChanged=o.scrollWidthChanged,this.scrollLeftChanged=o.scrollLeftChanged,this.scrollHeightChanged=o.scrollHeightChanged,this.scrollTopChanged=o.scrollTopChanged}}class Yn{constructor(){this.type=14}}class vs{constructor(o){this.type=15,this.ranges=o}}class ns{constructor(){this.type=16}}class pr{constructor(){this.type=17}}class br extends d.a{constructor(){super();this._onEvent=this._register(new m.b),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(o){this._addOutgoingEvent(o),this._emitOutgoingEvents()}_addOutgoingEvent(o){for(let n=0,a=this._outgoingEvents.length;n<a;n++)if(this._outgoingEvents[n].kind===o.kind){this._outgoingEvents[n]=this._outgoingEvents[n].merge(o);return}this._outgoingEvents.push(o)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const o=this._outgoingEvents.shift();if(o.isNoOp())continue;this._onEvent.fire(o)}}addViewEventHandler(o){for(let n=0,a=this._eventHandlers.length;n<a;n++)this._eventHandlers[n]===o&&console.warn("Detected duplicate listener in ViewEventDispatcher",o);this._eventHandlers.push(o)}removeViewEventHandler(o){for(let n=0;n<this._eventHandlers.length;n++)if(this._eventHandlers[n]===o){this._eventHandlers.splice(n,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new zr),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const o=this._collector.outgoingEvents,n=this._collector.viewEvents;this._collector=null;for(const a of o)this._addOutgoingEvent(a);n.length>0&&this._emitMany(n)}this._emitOutgoingEvents()}emitSingleViewEvent(o){try{const n=this.beginEmitViewEvents();n.emitViewEvent(o)}finally{this.endEmitViewEvents()}}_emitMany(o){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(o):this._viewEventQueue=o,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const o=this._viewEventQueue;this._viewEventQueue=null;const n=this._eventHandlers.slice(0);for(const a of n)a.handleEvents(o)}}}class zr{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(o){this.viewEvents.push(o)}emitOutgoingEvent(o){this.outgoingEvents.push(o)}}class Is{constructor(o,n,a,T){this.kind=0,this._oldContentWidth=o,this._oldContentHeight=n,this.contentWidth=a,this.contentHeight=T,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(o){return o.kind!==0?this:new Is(this._oldContentWidth,this._oldContentHeight,o.contentWidth,o.contentHeight)}}class vr{constructor(o,n){this.kind=1,this.oldHasFocus=o,this.hasFocus=n}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(o){return o.kind!==1?this:new vr(this.oldHasFocus,o.hasFocus)}}class As{constructor(o,n,a,T,R,X,me,_e){this.kind=2,this._oldScrollWidth=o,this._oldScrollLeft=n,this._oldScrollHeight=a,this._oldScrollTop=T,this.scrollWidth=R,this.scrollLeft=X,this.scrollHeight=me,this.scrollTop=_e,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(o){return o.kind!==2?this:new As(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,o.scrollWidth,o.scrollLeft,o.scrollHeight,o.scrollTop)}}class Cs{constructor(){this.kind=3}isNoOp(){return!1}merge(o){return this}}class $a{constructor(){this.kind=4}isNoOp(){return!1}merge(o){return this}}class er{constructor(o,n,a,T,R,X,me){this.kind=6,this.oldSelections=o,this.selections=n,this.oldModelVersionId=a,this.modelVersionId=T,this.source=R,this.reason=X,this.reachedMaxCursorCount=me}static _selectionsAreEqual(o,n){if(!o&&!n)return!0;if(!o||!n)return!1;const a=o.length,T=n.length;if(a!==T)return!1;for(let R=0;R<a;R++)if(!o[R].equalsSelection(n[R]))return!1;return!0}isNoOp(){return er._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}merge(o){return o.kind!==6?this:new er(this.oldSelections,o.selections,this.oldModelVersionId,o.modelVersionId,o.source,o.reason,this.reachedMaxCursorCount||o.reachedMaxCursorCount)}}class Kr{constructor(){this.kind=5}isNoOp(){return!1}merge(o){return this}}class tr{constructor(o,n){this.modelVersionId=o.getVersionId(),this.cursorState=n.getCursorStates()}equals(o){if(!o)return!1;if(this.modelVersionId!==o.modelVersionId)return!1;if(this.cursorState.length!==o.cursorState.length)return!1;for(let n=0,a=this.cursorState.length;n<a;n++)if(!this.cursorState[n].equals(o.cursorState[n]))return!1;return!0}}class or{constructor(o,n,a){this._model=o,this._autoClosedCharactersDecorations=n,this._autoClosedEnclosingDecorations=a}static getAllAutoClosedCharacters(o){let n=[];for(const a of o)n=n.concat(a.getAutoClosedCharactersRanges());return n}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){let o=[];for(let n=0;n<this._autoClosedCharactersDecorations.length;n++){const a=this._model.getDecorationRange(this._autoClosedCharactersDecorations[n]);a&&o.push(a)}return o}isValid(o){let n=[];for(let a=0;a<this._autoClosedEnclosingDecorations.length;a++){const T=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[a]);if(T&&(n.push(T),T.startLineNumber!==T.endLineNumber))return!1}n.sort(Oe.a.compareRangesUsingStarts),o.sort(Oe.a.compareRangesUsingStarts);for(let a=0;a<o.length;a++){if(a>=n.length)return!1;if(!n[a].strictContainsRange(o[a]))return!1}return!0}}class Rs extends d.a{constructor(o,n,a,T){super();this._model=o,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=n,this._coordinatesConverter=a,this.context=new nt.c(this._model,this._viewModel,this._coordinatesConverter,T),this._cursors=new Zt(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=Object(d.f)(this._autoClosedActions),super.dispose()}updateConfiguration(o){this.context=new nt.c(this._model,this._viewModel,this._coordinatesConverter,o),this._cursors.updateContext(this.context)}onLineMappingChanged(o){if(this._knownModelVersionId!==this._model.getVersionId())return;this.setStates(o,"viewModel",0,this.getCursorStates())}setHasFocus(o){this._hasFocus=o}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let o=this._cursors.getSelections();for(let n=0;n<this._autoClosedActions.length;n++){const a=this._autoClosedActions[n];a.isValid(o)||(a.dispose(),this._autoClosedActions.splice(n,1),n--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(o,n,a,T){let R=!1;T!==null&&T.length>Rs.MAX_CURSOR_COUNT&&(T=T.slice(0,Rs.MAX_CURSOR_COUNT),R=!0);const X=new tr(this._model,this);return this._cursors.setStates(T),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(o,n,a,X,R)}setCursorColumnSelectData(o){this._columnSelectData=o}revealPrimary(o,n,a,T){const R=this._cursors.getViewPositions();if(R.length>1){this._emitCursorRevealRange(o,n,null,this._cursors.getViewSelections(),0,a,T);return}else{const X=R[0],me=new Oe.a(X.lineNumber,X.column,X.lineNumber,X.column);this._emitCursorRevealRange(o,n,me,null,0,a,T)}}_revealPrimaryCursor(o,n,a,T,R){const X=this._cursors.getViewPositions();if(X.length>1)this._emitCursorRevealRange(o,n,null,this._cursors.getViewSelections(),a,T,R);else{const me=X[0],_e=new Oe.a(me.lineNumber,me.column,me.lineNumber,me.column);this._emitCursorRevealRange(o,n,_e,null,a,T,R)}}_emitCursorRevealRange(o,n,a,T,R,X,me){o.emitViewEvent(new Mn(n,a,T,R,X,me))}saveState(){let o=[];const n=this._cursors.getSelections();for(let a=0,T=n.length;a<T;a++){const R=n[a];o.push({inSelectionMode:!R.isEmpty(),selectionStart:{lineNumber:R.selectionStartLineNumber,column:R.selectionStartColumn},position:{lineNumber:R.positionLineNumber,column:R.positionColumn}})}return o}restoreState(o,n){let a=[];for(let T=0,R=n.length;T<R;T++){const X=n[T];let me=1,_e=1;X.position&&X.position.lineNumber&&(me=X.position.lineNumber),X.position&&X.position.column&&(_e=X.position.column);let He=me,$e=_e;X.selectionStart&&X.selectionStart.lineNumber&&(He=X.selectionStart.lineNumber),X.selectionStart&&X.selectionStart.column&&($e=X.selectionStart.column),a.push({selectionStartLineNumber:He,selectionStartColumn:$e,positionLineNumber:me,positionColumn:_e})}this.setStates(o,"restoreState",0,nt.d.fromModelSelections(a)),this.revealPrimary(o,"restoreState",!0,1)}onModelContentChanged(o,n){if(n instanceof Co.c){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(o,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{if(this._knownModelVersionId=n.versionId,this._isHandling)return;const a=n.containsEvent(1);if(this._prevEditOperationType=0,a)this._cursors.dispose(),this._cursors=new Zt(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(o,"model",1,null,!1);else if(this._hasFocus&&n.resultingSelection&&n.resultingSelection.length>0){const T=nt.d.fromModelSelections(n.resultingSelection);this.setStates(o,"modelChange",n.isUndoing?5:n.isRedoing?6:2,T)&&this._revealPrimaryCursor(o,"modelChange",0,!0,0)}else{const T=this._cursors.readSelectionFromMarkers();this.setStates(o,"modelChange",2,nt.d.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 o=this._cursors.getPrimaryCursor(),n=o.viewState.selectionStart.getStartPosition(),a=o.viewState.position;return{isReal:!1,fromViewLineNumber:n.lineNumber,fromViewVisualColumn:nt.a.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,n),toViewLineNumber:a.lineNumber,toViewVisualColumn:nt.a.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,a)}}getSelections(){return this._cursors.getSelections()}setSelections(o,n,a,T){this.setStates(o,n,T,nt.d.fromModelSelections(a))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(o){this._prevEditOperationType=o}_pushAutoClosedAction(o,n){let a=[],T=[];for(let me=0,_e=o.length;me<_e;me++)a.push({range:o[me],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),T.push({range:n[me],options:{description:"auto-closed-enclosing",stickiness:1}});const R=this._model.deltaDecorations([],a),X=this._model.deltaDecorations([],T);this._autoClosedActions.push(new or(this._model,R,X))}_executeEditOperation(o){if(!o)return;o.shouldPushStackElementBefore&&this._model.pushStackElement();const n=ys.executeCommands(this._model,this._cursors.getSelections(),o.commands);if(n){this._interpretCommandResult(n);let a=[],T=[];for(let R=0;R<o.commands.length;R++){const X=o.commands[R];X instanceof ao.b&&X.enclosingRange&&X.closeCharacterRange&&(a.push(X.closeCharacterRange),T.push(X.enclosingRange))}a.length>0&&this._pushAutoClosedAction(a,T),this._prevEditOperationType=o.type}o.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(o){(!o||o.length===0)&&(o=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(o),this._cursors.normalize()}_emitStateChangedIfNecessary(o,n,a,T,R){const X=new tr(this._model,this);if(X.equals(T))return!1;const me=this._cursors.getSelections(),_e=this._cursors.getViewSelections();if(o.emitViewEvent(new Ko(_e,me)),!T||T.cursorState.length!==X.cursorState.length||X.cursorState.some((He,$e)=>!He.modelState.equals(T.cursorState[$e].modelState))){const He=T?T.cursorState.map(ot=>ot.modelState.selection):null,$e=T?T.modelVersionId:0;o.emitOutgoingEvent(new er(He,me,$e,X.modelVersionId,n||"keyboard",a,R))}return!0}_findAutoClosingPairs(o){if(!o.length)return null;let n=[];for(let a=0,T=o.length;a<T;a++){const R=o[a];if(!R.text||R.text.indexOf(`
|
|
|
`)>=0)return null;const X=R.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!X)return null;const me=X[1],_e=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(me);if(!_e||_e.length!==1)return null;const He=_e[0].open,$e=R.text.length-X[2].length-1,ot=R.text.lastIndexOf(He,$e-1);if(ot===-1)return null;n.push([ot,$e])}return n}executeEdits(o,n,a,T){let R=null;n==="snippet"&&(R=this._findAutoClosingPairs(a)),R&&(a[0]._isTracked=!0);let X=[],me=[];const _e=this._model.pushEditOperations(this.getSelections(),a,He=>{if(R)for(let ot=0,Ot=R.length;ot<Ot;ot++){const[gt,kt]=R[ot],Kt=He[ot],eo=Kt.range.startLineNumber,co=Kt.range.startColumn-1+gt,go=Kt.range.startColumn-1+kt;X.push(new Oe.a(eo,go+1,eo,go+2)),me.push(new Oe.a(eo,co+1,eo,go+2))}const $e=T(He);return $e&&(this._isHandling=!0),$e});_e&&(this._isHandling=!1,this.setSelections(o,n,_e,0)),X.length>0&&this._pushAutoClosedAction(X,me)}_executeEdit(o,n,a,T=0){if(this.context.cursorConfig.readOnly)return;const R=new tr(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),o()}catch(X){Object(v.f)(X)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(n,a,T,R,!1)&&this._revealPrimaryCursor(n,a,0,!0,0)}setIsDoingComposition(o){this._isDoingComposition=o}getAutoClosedCharacters(){return or.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(o){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(o,n){this._executeEdit(()=>{n==="keyboard"&&(this._executeEditOperation(ao.a.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)},o,n)}type(o,n,a){this._executeEdit(()=>{if(a==="keyboard"){const T=n.length;let R=0;for(;R<T;){const X=ct.K(n,R),me=n.substr(R,X);this._executeEditOperation(ao.a.typeWithInterceptors(this._isDoingComposition,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),me)),R+=X}}else this._executeEditOperation(ao.a.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),n))},o,a)}compositionType(o,n,a,T,R,X){if(n.length===0&&a===0&&T===0){if(R!==0){const me=this.getSelections().map(_e=>{const He=_e.getPosition();return new b.a(He.lineNumber,He.column+R,He.lineNumber,He.column+R)});this.setSelections(o,X,me,0)}return}this._executeEdit(()=>{this._executeEditOperation(ao.a.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),n,a,T,R))},o,X)}paste(o,n,a,T,R){this._executeEdit(()=>{this._executeEditOperation(ao.a.paste(this.context.cursorConfig,this._model,this.getSelections(),n,a,T||[]))},o,R,4)}cut(o,n){this._executeEdit(()=>{this._executeEditOperation(Yt.a.cut(this.context.cursorConfig,this._model,this.getSelections()))},o,n)}executeCommand(o,n,a){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new nt.e(0,[n],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},o,a)}executeCommands(o,n,a){this._executeEdit(()=>{this._executeEditOperation(new nt.e(0,n,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},o,a)}}Rs.MAX_CURSOR_COUNT=1e4;class ys{static executeCommands(o,n,a){const T={model:o,selectionsBefore:n,trackedRanges:[],trackedRangesDirection:[]},R=this._innerExecuteCommands(T,a);for(let X=0,me=T.trackedRanges.length;X<me;X++)T.model._setTrackedRange(T.trackedRanges[X],null,0);return R}static _innerExecuteCommands(o,n){if(this._arrayIsEmpty(n))return null;const a=this._getEditOperations(o,n);if(a.operations.length===0)return null;const T=a.operations,R=this._getLoserCursorMap(T);if(R.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;let X=[];for(let He=0,$e=T.length;He<$e;He++)R.hasOwnProperty(T[He].identifier.major.toString())||X.push(T[He]);a.hadTrackedEditOperation&&X.length>0&&(X[0]._isTracked=!0);let me=o.model.pushEditOperations(o.selectionsBefore,X,He=>{let $e=[];for(let gt=0;gt<o.selectionsBefore.length;gt++)$e[gt]=[];for(const gt of He){if(!gt.identifier)continue;$e[gt.identifier.major].push(gt)}const ot=(gt,kt)=>gt.identifier.minor-kt.identifier.minor;let Ot=[];for(let gt=0;gt<o.selectionsBefore.length;gt++)$e[gt].length>0?($e[gt].sort(ot),Ot[gt]=n[gt].computeCursorState(o.model,{getInverseEditOperations:()=>$e[gt],getTrackedSelection:kt=>{const Kt=parseInt(kt,10),eo=o.model._getTrackedRange(o.trackedRanges[Kt]);return o.trackedRangesDirection[Kt]===0?new b.a(eo.startLineNumber,eo.startColumn,eo.endLineNumber,eo.endColumn):new b.a(eo.endLineNumber,eo.endColumn,eo.startLineNumber,eo.startColumn)}})):Ot[gt]=o.selectionsBefore[gt];return Ot});me||(me=o.selectionsBefore);let _e=[];for(let He in R)R.hasOwnProperty(He)&&_e.push(parseInt(He,10));_e.sort((He,$e)=>$e-He);for(const He of _e)me.splice(He,1);return me}static _arrayIsEmpty(o){for(let n=0,a=o.length;n<a;n++)if(o[n])return!1;return!0}static _getEditOperations(o,n){let a=[],T=!1;for(let R=0,X=n.length;R<X;R++){const me=n[R];if(me){const _e=this._getEditOperationsFromCommand(o,R,me);a=a.concat(_e.operations),T=T||_e.hadTrackedEditOperation}}return{operations:a,hadTrackedEditOperation:T}}static _getEditOperationsFromCommand(o,n,a){let T=[],R=0;const X=(ot,Ot,gt=!1)=>{if(Oe.a.isEmpty(ot)&&Ot==="")return;T.push({identifier:{major:n,minor:R++},range:ot,text:Ot,forceMoveMarkers:gt,isAutoWhitespaceEdit:a.insertsAutoWhitespace})};let me=!1;const _e=(ot,Ot,gt)=>{me=!0,X(ot,Ot,gt)},He=(ot,Ot)=>{const gt=b.a.liftSelection(ot);let kt;if(gt.isEmpty())if(typeof Ot=="boolean")Ot?kt=2:kt=3;else{const co=o.model.getLineMaxColumn(gt.startLineNumber);gt.startColumn===co?kt=2:kt=3}else kt=1;const Kt=o.trackedRanges.length,eo=o.model._setTrackedRange(null,gt,kt);return o.trackedRanges[Kt]=eo,o.trackedRangesDirection[Kt]=gt.getDirection(),Kt.toString()},$e={addEditOperation:X,addTrackedEditOperation:_e,trackSelection:He};try{a.getEditOperations(o.model,$e)}catch(ot){return Object(v.f)(ot),{operations:[],hadTrackedEditOperation:!1}}return{operations:T,hadTrackedEditOperation:me}}static _getLoserCursorMap(o){o=o.slice(0),o.sort((a,T)=>-Oe.a.compareRangesUsingEnds(a.range,T.range));let n={};for(let a=1;a<o.length;a++){const T=o[a-1],R=o[a];if(Oe.a.getStartPosition(T.range).isBefore(Oe.a.getEndPosition(R.range))){let X;T.identifier.major>R.identifier.major?X=T.identifier.major:X=R.identifier.major,n[X.toString()]=!0;for(let me=0;me<o.length;me++)o[me].identifier.major===X&&(o.splice(me,1),me<a&&a--,me--);a>0&&a--}}return n}}var Gr=t("9Y+e"),Ns=t("iuje"),Gi=t("wQH0"),Ya=t("TQUy"),Es=t("QuOb");class Cr{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(o){this._hasPending=!0,this._inserts.push(o)}change(o){this._hasPending=!0,this._changes.push(o)}remove(o){this._hasPending=!0,this._removes.push(o)}mustCommit(){return this._hasPending}commit(o){if(!this._hasPending)return;const n=this._inserts,a=this._changes,T=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],o._commitPendingChanges(n,a,T)}}class An{constructor(o,n,a,T,R){this.id=o,this.afterLineNumber=n,this.ordinal=a,this.height=T,this.minWidth=R,this.prefixSum=0}}class Zn{constructor(o,n,a,T){this._instanceId=ct.P(++Zn.INSTANCE_COUNT),this._pendingChanges=new Cr,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=o,this._lineHeight=n,this._paddingTop=a,this._paddingBottom=T}static findInsertionIndex(o,n,a){let T=0,R=o.length;for(;T<R;){const X=T+R>>>1;n===o[X].afterLineNumber?a<o[X].ordinal?R=X:T=X+1:n<o[X].afterLineNumber?R=X:T=X+1}return T}setLineHeight(o){this._checkPendingChanges(),this._lineHeight=o}setPadding(o,n){this._paddingTop=o,this._paddingBottom=n}onFlushed(o){this._checkPendingChanges(),this._lineCount=o}changeWhitespace(o){let n=!1;try{const a={insertWhitespace:(T,R,X,me)=>{n=!0,T=T|0,R=R|0,X=X|0,me=me|0;const _e=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new An(_e,T,R,X,me)),_e},changeOneWhitespace:(T,R,X)=>{n=!0,R=R|0,X=X|0,this._pendingChanges.change({id:T,newAfterLineNumber:R,newHeight:X})},removeWhitespace:T=>{n=!0,this._pendingChanges.remove({id:T})}};o(a)}finally{this._pendingChanges.commit(this)}return n}_commitPendingChanges(o,n,a){if((o.length>0||a.length>0)&&(this._minWidth=-1),o.length+n.length+a.length<=1){for(const _e of o)this._insertWhitespace(_e);for(const _e of n)this._changeOneWhitespace(_e.id,_e.newAfterLineNumber,_e.newHeight);for(const _e of a){const He=this._findWhitespaceIndex(_e.id);if(He===-1)continue;this._removeWhitespace(He)}return}const T=new Set;for(const _e of a)T.add(_e.id);const R=new Map;for(const _e of n)R.set(_e.id,_e);const X=_e=>{let He=[];for(const $e of _e){if(T.has($e.id))continue;if(R.has($e.id)){const ot=R.get($e.id);$e.afterLineNumber=ot.newAfterLineNumber,$e.height=ot.newHeight}He.push($e)}return He},me=X(this._arr).concat(X(o));me.sort((_e,He)=>_e.afterLineNumber===He.afterLineNumber?_e.ordinal-He.ordinal:_e.afterLineNumber-He.afterLineNumber),this._arr=me,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(o){const n=Zn.findInsertionIndex(this._arr,o.afterLineNumber,o.ordinal);this._arr.splice(n,0,o),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)}_findWhitespaceIndex(o){const n=this._arr;for(let a=0,T=n.length;a<T;a++)if(n[a].id===o)return a;return-1}_changeOneWhitespace(o,n,a){const T=this._findWhitespaceIndex(o);if(T===-1)return;if(this._arr[T].height!==a&&(this._arr[T].height=a,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,T-1)),this._arr[T].afterLineNumber!==n){const R=this._arr[T];this._removeWhitespace(T),R.afterLineNumber=n,this._insertWhitespace(R)}}_removeWhitespace(o){this._arr.splice(o,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,o-1)}onLinesDeleted(o,n){this._checkPendingChanges(),o=o|0,n=n|0,this._lineCount-=n-o+1;for(let a=0,T=this._arr.length;a<T;a++){const R=this._arr[a].afterLineNumber;o<=R&&R<=n?this._arr[a].afterLineNumber=o-1:R>n&&(this._arr[a].afterLineNumber-=n-o+1)}}onLinesInserted(o,n){this._checkPendingChanges(),o=o|0,n=n|0,this._lineCount+=n-o+1;for(let a=0,T=this._arr.length;a<T;a++){const R=this._arr[a].afterLineNumber;o<=R&&(this._arr[a].afterLineNumber+=n-o+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(o){this._checkPendingChanges(),o=o|0;let n=Math.max(0,this._prefixSumValidIndex+1);n===0&&(this._arr[0].prefixSum=this._arr[0].height,n++);for(let a=n;a<=o;a++)this._arr[a].prefixSum=this._arr[a-1].prefixSum+this._arr[a].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,o),this._arr[o].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const o=this._lineHeight*this._lineCount,n=this.getWhitespacesTotalHeight();return o+n+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(o){this._checkPendingChanges(),o=o|0;const n=this._findLastWhitespaceBeforeLineNumber(o);return n===-1?0:this.getWhitespacesAccumulatedHeight(n)}_findLastWhitespaceBeforeLineNumber(o){o=o|0;const n=this._arr;let a=0,T=n.length-1;for(;a<=T;){const R=T-a|0,X=R/2|0,me=a+X|0;if(n[me].afterLineNumber<o){if(me+1>=n.length||n[me+1].afterLineNumber>=o)return me;a=me+1|0}else T=me-1|0}return-1}_findFirstWhitespaceAfterLineNumber(o){o=o|0;const n=this._findLastWhitespaceBeforeLineNumber(o),a=n+1;return a<this._arr.length?a:-1}getFirstWhitespaceIndexAfterLineNumber(o){return this._checkPendingChanges(),o=o|0,this._findFirstWhitespaceAfterLineNumber(o)}getVerticalOffsetForLineNumber(o){this._checkPendingChanges(),o=o|0;let n;o>1?n=this._lineHeight*(o-1):n=0;const a=this.getWhitespaceAccumulatedHeightBeforeLineNumber(o);return n+a+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let o=0;for(let n=0,a=this._arr.length;n<a;n++)o=Math.max(o,this._arr[n].minWidth);this._minWidth=o}return this._minWidth}isAfterLines(o){this._checkPendingChanges();const n=this.getLinesTotalHeight();return o>n}isInTopPadding(o){return this._paddingTop===0?!1:(this._checkPendingChanges(),o<this._paddingTop)}isInBottomPadding(o){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const n=this.getLinesTotalHeight();return o>=n-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(o){if(this._checkPendingChanges(),o=o|0,o<0)return 1;const n=this._lineCount|0,a=this._lineHeight;let T=1,R=n;for(;T<R;){const X=(T+R)/2|0,me=this.getVerticalOffsetForLineNumber(X)|0;if(o>=me+a)T=X+1;else{if(o>=me)return X;R=X}}return T>n?n:T}getLinesViewportData(o,n){this._checkPendingChanges(),o=o|0,n=n|0;const a=this._lineHeight,T=this.getLineNumberAtOrAfterVerticalOffset(o)|0,R=this.getVerticalOffsetForLineNumber(T)|0;let X=this._lineCount|0,me=this.getFirstWhitespaceIndexAfterLineNumber(T)|0;const _e=this.getWhitespacesCount()|0;let He,$e;me===-1?(me=_e,$e=X+1,He=0):($e=this.getAfterLineNumberForWhitespaceIndex(me)|0,He=this.getHeightForWhitespaceIndex(me)|0);let ot=R,Ot=ot;const gt=5e5;let kt=0;R>=gt&&(kt=Math.floor(R/gt)*gt,kt=Math.floor(kt/a)*a,Ot-=kt);const Kt=[],eo=o+(n-o)/2;let co=-1;for(let Po=T;Po<=X;Po++){if(co===-1){const ti=ot,oi=ot+a;(ti<=eo&&eo<oi||ti>eo)&&(co=Po)}for(ot+=a,Kt[Po-T]=Ot,Ot+=a;$e===Po;)Ot+=He,ot+=He,me++,me>=_e?$e=X+1:($e=this.getAfterLineNumberForWhitespaceIndex(me)|0,He=this.getHeightForWhitespaceIndex(me)|0);if(ot>=n){X=Po;break}}co===-1&&(co=X);const go=this.getVerticalOffsetForLineNumber(X)|0;let yo=T,jo=X;return yo<jo&&(R<o&&yo++),yo<jo&&(go+a>n&&jo--),{bigNumbersDelta:kt,startLineNumber:T,endLineNumber:X,relativeVerticalOffset:Kt,centeredLineNumber:co,completelyVisibleStartLineNumber:yo,completelyVisibleEndLineNumber:jo}}getVerticalOffsetForWhitespaceIndex(o){this._checkPendingChanges(),o=o|0;const n=this.getAfterLineNumberForWhitespaceIndex(o);let a;n>=1?a=this._lineHeight*n:a=0;let T;return o>0?T=this.getWhitespacesAccumulatedHeight(o-1):T=0,a+T+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(o){this._checkPendingChanges(),o=o|0;let n=0,a=this.getWhitespacesCount()-1;if(a<0)return-1;const T=this.getVerticalOffsetForWhitespaceIndex(a),R=this.getHeightForWhitespaceIndex(a);if(o>=T+R)return-1;for(;n<a;){const X=Math.floor((n+a)/2),me=this.getVerticalOffsetForWhitespaceIndex(X),_e=this.getHeightForWhitespaceIndex(X);if(o>=me+_e)n=X+1;else{if(o>=me)return X;a=X}}return n}getWhitespaceAtVerticalOffset(o){this._checkPendingChanges(),o=o|0;const n=this.getWhitespaceIndexAtOrAfterVerticallOffset(o);if(n<0)return null;if(n>=this.getWhitespacesCount())return null;const a=this.getVerticalOffsetForWhitespaceIndex(n);if(a>o)return null;const T=this.getHeightForWhitespaceIndex(n),R=this.getIdForWhitespaceIndex(n),X=this.getAfterLineNumberForWhitespaceIndex(n);return{id:R,afterLineNumber:X,verticalOffset:a,height:T}}getWhitespaceViewportData(o,n){this._checkPendingChanges(),o=o|0,n=n|0;const a=this.getWhitespaceIndexAtOrAfterVerticallOffset(o),T=this.getWhitespacesCount()-1;if(a<0)return[];let R=[];for(let X=a;X<=T;X++){const me=this.getVerticalOffsetForWhitespaceIndex(X),_e=this.getHeightForWhitespaceIndex(X);if(me>=n)break;R.push({id:this.getIdForWhitespaceIndex(X),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(X),verticalOffset:me,height:_e})}return R}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(o){return this._checkPendingChanges(),o=o|0,this._arr[o].id}getAfterLineNumberForWhitespaceIndex(o){return this._checkPendingChanges(),o=o|0,this._arr[o].afterLineNumber}getHeightForWhitespaceIndex(o){return this._checkPendingChanges(),o=o|0,this._arr[o].height}}Zn.INSTANCE_COUNT=0;const Hn=125;class ni{constructor(o,n,a,T){o=o|0,n=n|0,a=a|0,T=T|0,o<0&&(o=0),n<0&&(n=0),a<0&&(a=0),T<0&&(T=0),this.width=o,this.contentWidth=n,this.scrollWidth=Math.max(o,n),this.height=a,this.contentHeight=T,this.scrollHeight=Math.max(a,T)}equals(o){return this.width===o.width&&this.contentWidth===o.contentWidth&&this.height===o.height&&this.contentHeight===o.contentHeight}}class nn extends d.a{constructor(o,n){super();this._onDidContentSizeChange=this._register(new m.b),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new ni(0,0,0,0),this._scrollable=this._register(new Es.a(o,n)),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(o){this._scrollable.setSmoothScrollDuration(o)}validateScrollPosition(o){return this._scrollable.validateScrollPosition(o)}getScrollDimensions(){return this._dimensions}setScrollDimensions(o){if(this._dimensions.equals(o))return;const n=this._dimensions;this._dimensions=o,this._scrollable.setScrollDimensions({width:o.width,scrollWidth:o.scrollWidth,height:o.height,scrollHeight:o.scrollHeight},!0);const a=n.contentWidth!==o.contentWidth,T=n.contentHeight!==o.contentHeight;(a||T)&&this._onDidContentSizeChange.fire(new Is(n.contentWidth,n.contentHeight,o.contentWidth,o.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(o){this._scrollable.setScrollPositionNow(o)}setScrollPositionSmooth(o){this._scrollable.setScrollPositionSmooth(o)}}class xn extends d.a{constructor(o,n,a){super();this._configuration=o;const T=this._configuration.options,R=T.get(129),X=T.get(74);this._linesLayout=new Zn(n,T.get(58),X.top,X.bottom),this._scrollable=this._register(new nn(0,a)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new ni(R.contentWidth,0,R.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(102)?Hn:0)}onConfigurationChanged(o){const n=this._configuration.options;if(o.hasChanged(58)&&this._linesLayout.setLineHeight(n.get(58)),o.hasChanged(74)){const a=n.get(74);this._linesLayout.setPadding(a.top,a.bottom)}if(o.hasChanged(129)){const a=n.get(129),T=a.contentWidth,R=a.height,X=this._scrollable.getScrollDimensions(),me=X.contentWidth;this._scrollable.setScrollDimensions(new ni(T,X.contentWidth,R,this._getContentHeight(T,R,me)))}else this._updateHeight();o.hasChanged(102)&&this._configureSmoothScrollDuration()}onFlushed(o){this._linesLayout.onFlushed(o)}onLinesDeleted(o,n){this._linesLayout.onLinesDeleted(o,n)}onLinesInserted(o,n){this._linesLayout.onLinesInserted(o,n)}_getHorizontalScrollbarHeight(o,n){const a=this._configuration.options,T=a.get(91);return T.horizontal===2||o>=n?0:T.horizontalScrollbarSize}_getContentHeight(o,n,a){const T=this._configuration.options;let R=this._linesLayout.getLinesTotalHeight();return T.get(93)?R+=Math.max(0,n-T.get(58)-T.get(74).bottom):R+=this._getHorizontalScrollbarHeight(o,a),R}_updateHeight(){const o=this._scrollable.getScrollDimensions(),n=o.width,a=o.height,T=o.contentWidth;this._scrollable.setScrollDimensions(new ni(n,o.contentWidth,a,this._getContentHeight(n,a,T)))}getCurrentViewport(){const o=this._scrollable.getScrollDimensions(),n=this._scrollable.getCurrentScrollPosition();return new P.i(n.scrollTop,n.scrollLeft,o.width,o.height)}getFutureViewport(){const o=this._scrollable.getScrollDimensions(),n=this._scrollable.getFutureScrollPosition();return new P.i(n.scrollTop,n.scrollLeft,o.width,o.height)}_computeContentWidth(o){const n=this._configuration.options,a=n.get(130),T=n.get(43);if(a.isViewportWrapping){const R=n.get(129),X=n.get(64);return o>R.contentWidth+T.typicalHalfwidthCharacterWidth&&(X.enabled&&X.side==="right")?o+R.verticalScrollbarWidth:o}else{const R=n.get(92)*T.typicalHalfwidthCharacterWidth,X=this._linesLayout.getWhitespaceMinWidth();return Math.max(o+R,X)}}setMaxLineWidth(o){const n=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new ni(n.width,this._computeContentWidth(o),n.height,n.contentHeight)),this._updateHeight()}saveState(){const o=this._scrollable.getFutureScrollPosition();let n=o.scrollTop,a=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(n),T=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(a);return{scrollTop:n,scrollTopWithoutViewZones:n-T,scrollLeft:o.scrollLeft}}changeWhitespace(o){const n=this._linesLayout.changeWhitespace(o);return n&&this.onHeightMaybeChanged(),n}getVerticalOffsetForLineNumber(o){return this._linesLayout.getVerticalOffsetForLineNumber(o)}isAfterLines(o){return this._linesLayout.isAfterLines(o)}isInTopPadding(o){return this._linesLayout.isInTopPadding(o)}isInBottomPadding(o){return this._linesLayout.isInBottomPadding(o)}getLineNumberAtVerticalOffset(o){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(o)}getWhitespaceAtVerticalOffset(o){return this._linesLayout.getWhitespaceAtVerticalOffset(o)}getLinesViewportData(){const o=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(o.top,o.top+o.height)}getLinesViewportDataAtScrollTop(o){const n=this._scrollable.getScrollDimensions();return o+n.height>n.scrollHeight&&(o=n.scrollHeight-n.height),o<0&&(o=0),this._linesLayout.getLinesViewportData(o,o+n.height)}getWhitespaceViewportData(){const o=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(o.top,o.top+o.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){const o=this._scrollable.getScrollDimensions();return o.contentWidth}getScrollWidth(){const o=this._scrollable.getScrollDimensions();return o.scrollWidth}getContentHeight(){const o=this._scrollable.getScrollDimensions();return o.contentHeight}getScrollHeight(){const o=this._scrollable.getScrollDimensions();return o.scrollHeight}getCurrentScrollLeft(){const o=this._scrollable.getCurrentScrollPosition();return o.scrollLeft}getCurrentScrollTop(){const o=this._scrollable.getCurrentScrollPosition();return o.scrollTop}validateScrollPosition(o){return this._scrollable.validateScrollPosition(o)}setScrollPosition(o,n){n===1?this._scrollable.setScrollPositionNow(o):this._scrollable.setScrollPositionSmooth(o)}deltaScrollNow(o,n){const a=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:a.scrollLeft+o,scrollTop:a.scrollTop+n})}}var ss=t("4bUh"),Xr=t("LeU+");class $r{constructor(o){this._lines=o}convertViewPositionToModelPosition(o){return this._lines.convertViewPositionToModelPosition(o.lineNumber,o.column)}convertViewRangeToModelRange(o){return this._lines.convertViewRangeToModelRange(o)}validateViewPosition(o,n){return this._lines.validateViewPosition(o.lineNumber,o.column,n)}validateViewRange(o,n){return this._lines.validateViewRange(o,n)}convertModelPositionToViewPosition(o,n){return this._lines.convertModelPositionToViewPosition(o.lineNumber,o.column,n)}convertModelRangeToViewRange(o,n){return this._lines.convertModelRangeToViewRange(o,n)}modelPositionIsVisible(o){return this._lines.modelPositionIsVisible(o.lineNumber,o.column)}getModelLineViewLineCount(o){return this._lines.getModelLineViewLineCount(o)}getViewLineNumberOfModelPosition(o,n){return this._lines.getViewLineNumberOfModelPosition(o,n)}}class Yr{constructor(o){this._counts=o,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}_invalidate(o){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,o-1)}_ensureValid(){if(this._isValid)return;for(let o=this._validEndIndex+1,n=this._counts.length;o<n;o++){const a=this._counts[o],T=o>0?this._modelToView[o-1]:0;this._modelToView[o]=T+a;for(let R=0;R<a;R++)this._viewToModel[T+R]=o}this._modelToView.length=this._counts.length,this._viewToModel.length=this._modelToView[this._modelToView.length-1],this._isValid=!0,this._validEndIndex=this._counts.length-1}changeValue(o,n){if(this._counts[o]===n)return;this._counts[o]=n,this._invalidate(o)}removeValues(o,n){this._counts.splice(o,n),this._invalidate(o)}insertValues(o,n){this._counts=vi.b(this._counts,o,n),this._invalidate(o)}getTotalValue(){return this._ensureValid(),this._viewToModel.length}getAccumulatedValue(o){return this._ensureValid(),this._modelToView[o]}getIndexOf(o){this._ensureValid();const n=this._viewToModel[o],a=n>0?this._modelToView[n-1]:0;return new Xr.b(n,o-a)}}class ir{constructor(o,n,a,T,R,X,me,_e,He){this._editorId=o,this.model=n,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=a,this._monospaceLineBreaksComputerFactory=T,this.fontInfo=R,this.tabSize=X,this.wrappingStrategy=me,this.wrappingColumn=_e,this.wrappingIndent=He,this._constructLines(!0,null)}dispose(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}createCoordinatesConverter(){return new $r(this)}_constructLines(o,n){this.lines=[],o&&(this.hiddenAreasIds=[]);const a=this.model.getLinesContent(),T=this.model.getInjectedTextDecorations(this._editorId),R=a.length,X=this.createLineBreaksComputer(),me=new vi.a(Co.b.fromDecorations(T));for(let Kt=0;Kt<R;Kt++){const eo=me.takeWhile(co=>co.lineNumber===Kt+1);X.addRequest(a[Kt],eo,n?n[Kt]:null)}const _e=X.finalize();let He=[],$e=this.hiddenAreasIds.map(Kt=>this.model.getDecorationRange(Kt)).sort(Oe.a.compareRangesUsingStarts),ot=1,Ot=0,gt=-1,kt=gt+1<$e.length?Ot+1:R+2;for(let Kt=0;Kt<R;Kt++){let eo=Kt+1;eo===kt&&(gt++,ot=$e[gt].startLineNumber,Ot=$e[gt].endLineNumber,kt=gt+1<$e.length?Ot+1:R+2);let co=eo>=ot&&eo<=Ot,go=sr(_e[Kt],!co);He[Kt]=go.getViewLineCount(),this.lines[Kt]=go}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new Yr(He)}getHiddenAreas(){return this.hiddenAreasIds.map(o=>this.model.getDecorationRange(o))}_reduceRanges(o){if(o.length===0)return[];let n=o.map(X=>this.model.validateRange(X)).sort(Oe.a.compareRangesUsingStarts),a=[],T=n[0].startLineNumber,R=n[0].endLineNumber;for(let X=1,me=n.length;X<me;X++){let _e=n[X];_e.startLineNumber>R+1?(a.push(new Oe.a(T,1,R,1)),T=_e.startLineNumber,R=_e.endLineNumber):_e.endLineNumber>R&&(R=_e.endLineNumber)}return a.push(new Oe.a(T,1,R,1)),a}setHiddenAreas(o){let n=this._reduceRanges(o),a=this.hiddenAreasIds.map(ot=>this.model.getDecorationRange(ot)).sort(Oe.a.compareRangesUsingStarts);if(n.length===a.length){let ot=!1;for(let Ot=0;Ot<n.length;Ot++)if(!n[Ot].equalsRange(a[Ot])){ot=!0;break}if(!ot)return!1}let T=[];for(const ot of n)T.push({range:ot,options:fi.b.EMPTY});this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,T);let R=n,X=1,me=0,_e=-1,He=_e+1<R.length?me+1:this.lines.length+2,$e=!1;for(let ot=0;ot<this.lines.length;ot++){let Ot=ot+1;Ot===He&&(_e++,X=R[_e].startLineNumber,me=R[_e].endLineNumber,He=_e+1<R.length?me+1:this.lines.length+2);let gt=!1;if(Ot>=X&&Ot<=me?this.lines[ot].isVisible()&&(this.lines[ot]=this.lines[ot].setVisible(!1),gt=!0):($e=!0,this.lines[ot].isVisible()||(this.lines[ot]=this.lines[ot].setVisible(!0),gt=!0)),gt){let kt=this.lines[ot].getViewLineCount();this.prefixSumComputer.changeValue(ot,kt)}}return $e||this.setHiddenAreas([]),!0}modelPositionIsVisible(o,n){return o<1||o>this.lines.length?!1:this.lines[o-1].isVisible()}getModelLineViewLineCount(o){return o<1||o>this.lines.length?1:this.lines[o-1].getViewLineCount()}setTabSize(o){return this.tabSize===o?!1:(this.tabSize=o,this._constructLines(!1,null),!0)}setWrappingSettings(o,n,a,T){const R=this.fontInfo.equals(o),X=this.wrappingStrategy===n,me=this.wrappingColumn===a,_e=this.wrappingIndent===T;if(R&&X&&me&&_e)return!1;const He=R&&X&&!me&&_e;this.fontInfo=o,this.wrappingStrategy=n,this.wrappingColumn=a,this.wrappingIndent=T;let $e=null;if(He){$e=[];for(let ot=0,Ot=this.lines.length;ot<Ot;ot++)$e[ot]=this.lines[ot].getLineBreakData()}return this._constructLines(!1,$e),!0}createLineBreaksComputer(){const o=this.wrappingStrategy==="advanced"?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory;return o.createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(o,n,a){if(!o||o<=this._validModelVersionId)return null;let T=n===1?1:this.prefixSumComputer.getAccumulatedValue(n-2)+1,R=this.prefixSumComputer.getAccumulatedValue(a-1);return this.lines.splice(n-1,a-n+1),this.prefixSumComputer.removeValues(n-1,a-n+1),new yn(T,R)}onModelLinesInserted(o,n,a,T){if(!o||o<=this._validModelVersionId)return null;const R=n>2&&!this.lines[n-2].isVisible();let X=n===1?1:this.prefixSumComputer.getAccumulatedValue(n-2)+1,me=0,_e=[],He=[];for(let $e=0,ot=T.length;$e<ot;$e++){let Ot=sr(T[$e],!R);_e.push(Ot);let gt=Ot.getViewLineCount();me+=gt,He[$e]=gt}return this.lines=this.lines.slice(0,n-1).concat(_e).concat(this.lines.slice(n-1)),this.prefixSumComputer.insertValues(n-1,He),new En(X,X+me-1)}onModelLineChanged(o,n,a){if(o!==null&&o<=this._validModelVersionId)return[!1,null,null,null];let T=n-1,R=this.lines[T].getViewLineCount(),X=this.lines[T].isVisible(),me=sr(a,X);this.lines[T]=me;let _e=this.lines[T].getViewLineCount(),He=!1,$e=0,ot=-1,Ot=0,gt=-1,kt=0,Kt=-1;R>_e?($e=n===1?1:this.prefixSumComputer.getAccumulatedValue(n-2)+1,ot=$e+_e-1,kt=ot+1,Kt=kt+(R-_e)-1,He=!0):R<_e?($e=n===1?1:this.prefixSumComputer.getAccumulatedValue(n-2)+1,ot=$e+R-1,Ot=ot+1,gt=Ot+(_e-R)-1,He=!0):($e=n===1?1:this.prefixSumComputer.getAccumulatedValue(n-2)+1,ot=$e+_e-1),this.prefixSumComputer.changeValue(T,_e);const eo=$e<=ot?new wn($e,ot):null,co=Ot<=gt?new En(Ot,gt):null,go=kt<=Kt?new yn(kt,Kt):null;return[He,eo,co,go]}acceptVersionId(o){this._validModelVersionId=o,this.lines.length===1&&!this.lines[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.prefixSumComputer.getTotalValue()}_toValidViewLineNumber(o){if(o<1)return 1;const n=this.getViewLineCount();return o>n?n:o|0}getActiveIndentGuide(o,n,a){o=this._toValidViewLineNumber(o),n=this._toValidViewLineNumber(n),a=this._toValidViewLineNumber(a);const T=this.convertViewPositionToModelPosition(o,this.getViewLineMinColumn(o)),R=this.convertViewPositionToModelPosition(n,this.getViewLineMinColumn(n)),X=this.convertViewPositionToModelPosition(a,this.getViewLineMinColumn(a)),me=this.model.getActiveIndentGuide(T.lineNumber,R.lineNumber,X.lineNumber),_e=this.convertModelPositionToViewPosition(me.startLineNumber,1),He=this.convertModelPositionToViewPosition(me.endLineNumber,this.model.getLineMaxColumn(me.endLineNumber));return{startLineNumber:_e.lineNumber,endLineNumber:He.lineNumber,indent:me.indent}}getViewLineInfo(o){o=this._toValidViewLineNumber(o);let n=this.prefixSumComputer.getIndexOf(o-1),a=n.index,T=n.remainder;return new Ss(a+1,T)}getMinColumnOfViewLine(o){return this.lines[o.modelLineNumber-1].getViewLineMinColumn(this.model,o.modelLineNumber,o.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(o){const n=this.lines[o.modelLineNumber-1],a=n.getViewLineMinColumn(this.model,o.modelLineNumber,o.modelLineWrappedLineIdx),T=n.getModelColumnOfViewPosition(o.modelLineWrappedLineIdx,a);return new we.a(o.modelLineNumber,T)}getModelEndPositionOfViewLine(o){const n=this.lines[o.modelLineNumber-1],a=n.getViewLineMaxColumn(this.model,o.modelLineNumber,o.modelLineWrappedLineIdx),T=n.getModelColumnOfViewPosition(o.modelLineWrappedLineIdx,a);return new we.a(o.modelLineNumber,T)}getViewLineInfosGroupedByModelRanges(o,n){const a=this.getViewLineInfo(o),T=this.getViewLineInfo(n),R=new Array;let X=this.getModelStartPositionOfViewLine(a),me=new Array;for(let _e=a.modelLineNumber;_e<=T.modelLineNumber;_e++){const He=this.lines[_e-1];if(He.isVisible()){let $e=_e===a.modelLineNumber?a.modelLineWrappedLineIdx:0,ot=_e===T.modelLineNumber?T.modelLineWrappedLineIdx+1:He.getViewLineCount();for(let Ot=$e;Ot<ot;Ot++)me.push(new Ss(_e,Ot))}if(!He.isVisible()&&X){const $e=new we.a(_e-1,this.model.getLineMaxColumn(_e-1)+1),ot=Oe.a.fromPositions(X,$e);R.push(new rs(ot,me)),me=[],X=null}else He.isVisible()&&!X&&(X=new we.a(_e,1))}if(X){const _e=Oe.a.fromPositions(X,this.getModelEndPositionOfViewLine(T));R.push(new rs(_e,me))}return R}getViewLinesBracketGuides(o,n,a,T){const R=a?this.convertViewPositionToModelPosition(a.lineNumber,a.column):null,X=[];for(const me of this.getViewLineInfosGroupedByModelRanges(o,n)){const _e=me.modelRange.startLineNumber,He=this.model.getLinesBracketGuides(_e,me.modelRange.endLineNumber,R,T);for(const $e of me.viewLines)if($e.isWrappedLineContinuation&&this.getMinColumnOfViewLine($e)===1)X.push([]);else{let ot=He[$e.modelLineNumber-_e];ot=ot.map(Ot=>Ot.horizontalLine?new Ui.d(Ot.visibleColumn,Ot.className,new Ui.e(Ot.horizontalLine.top,this.convertModelPositionToViewPosition($e.modelLineNumber,Ot.horizontalLine.endColumn).column)):Ot),X.push(ot)}}return X}getViewLinesIndentGuides(o,n){o=this._toValidViewLineNumber(o),n=this._toValidViewLineNumber(n);const a=this.convertViewPositionToModelPosition(o,this.getViewLineMinColumn(o)),T=this.convertViewPositionToModelPosition(n,this.getViewLineMaxColumn(n));let R=[],X=[],me=[];const _e=a.lineNumber-1,He=T.lineNumber-1;let $e=null;for(let kt=_e;kt<=He;kt++){const Kt=this.lines[kt];if(Kt.isVisible()){let eo=Kt.getViewLineNumberOfModelPosition(0,kt===_e?a.column:1),co=Kt.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(kt+1)),go=co-eo+1,yo=0;go>1&&Kt.getViewLineMinColumn(this.model,kt+1,co)===1&&(yo=eo===0?1:2),X.push(go),me.push(yo),$e===null&&($e=new we.a(kt+1,0))}else $e!==null&&(R=R.concat(this.model.getLinesIndentGuides($e.lineNumber,kt)),$e=null)}$e!==null&&(R=R.concat(this.model.getLinesIndentGuides($e.lineNumber,T.lineNumber)),$e=null);const ot=n-o+1;let Ot=new Array(ot),gt=0;for(let kt=0,Kt=R.length;kt<Kt;kt++){let eo=R[kt],co=Math.min(ot-gt,X[kt]),go=me[kt],yo;go===2?yo=0:go===1?yo=1:yo=co;for(let jo=0;jo<co;jo++)jo===yo&&(eo=0),Ot[gt++]=eo}return Ot}getViewLineContent(o){o=this._toValidViewLineNumber(o);let n=this.prefixSumComputer.getIndexOf(o-1),a=n.index,T=n.remainder;return this.lines[a].getViewLineContent(this.model,a+1,T)}getViewLineLength(o){o=this._toValidViewLineNumber(o);let n=this.prefixSumComputer.getIndexOf(o-1),a=n.index,T=n.remainder;return this.lines[a].getViewLineLength(this.model,a+1,T)}getViewLineMinColumn(o){o=this._toValidViewLineNumber(o);let n=this.prefixSumComputer.getIndexOf(o-1),a=n.index,T=n.remainder;return this.lines[a].getViewLineMinColumn(this.model,a+1,T)}getViewLineMaxColumn(o){o=this._toValidViewLineNumber(o);let n=this.prefixSumComputer.getIndexOf(o-1),a=n.index,T=n.remainder;return this.lines[a].getViewLineMaxColumn(this.model,a+1,T)}getViewLineData(o){o=this._toValidViewLineNumber(o);let n=this.prefixSumComputer.getIndexOf(o-1),a=n.index,T=n.remainder;return this.lines[a].getViewLineData(this.model,a+1,T)}getViewLinesData(o,n,a){o=this._toValidViewLineNumber(o),n=this._toValidViewLineNumber(n);let T=this.prefixSumComputer.getIndexOf(o-1),R=o,X=T.index,me=T.remainder,_e=[];for(let He=X,$e=this.model.getLineCount();He<$e;He++){let ot=this.lines[He];if(!ot.isVisible())continue;let Ot=He===X?me:0,gt=ot.getViewLineCount()-Ot,kt=!1;R+gt>n&&(kt=!0,gt=n-R+1);let Kt=Ot+gt;if(ot.getViewLinesData(this.model,He+1,Ot,Kt,R-o,a,_e),R+=gt,kt)break}return _e}validateViewPosition(o,n,a){o=this._toValidViewLineNumber(o);let T=this.prefixSumComputer.getIndexOf(o-1),R=T.index,X=T.remainder,me=this.lines[R],_e=me.getViewLineMinColumn(this.model,R+1,X),He=me.getViewLineMaxColumn(this.model,R+1,X);n<_e&&(n=_e),n>He&&(n=He);let $e=me.getModelColumnOfViewPosition(X,n),ot=this.model.validatePosition(new we.a(R+1,$e));return ot.equals(a)?new we.a(o,n):this.convertModelPositionToViewPosition(a.lineNumber,a.column)}validateViewRange(o,n){const a=this.validateViewPosition(o.startLineNumber,o.startColumn,n.getStartPosition()),T=this.validateViewPosition(o.endLineNumber,o.endColumn,n.getEndPosition());return new Oe.a(a.lineNumber,a.column,T.lineNumber,T.column)}convertViewPositionToModelPosition(o,n){o=this._toValidViewLineNumber(o);let a=this.prefixSumComputer.getIndexOf(o-1),T=a.index,R=a.remainder,X=this.lines[T].getModelColumnOfViewPosition(R,n);return this.model.validatePosition(new we.a(T+1,X))}convertViewRangeToModelRange(o){const n=this.convertViewPositionToModelPosition(o.startLineNumber,o.startColumn),a=this.convertViewPositionToModelPosition(o.endLineNumber,o.endColumn);return new Oe.a(n.lineNumber,n.column,a.lineNumber,a.column)}convertModelPositionToViewPosition(o,n,a=2){const T=this.model.validatePosition(new we.a(o,n)),R=T.lineNumber,X=T.column;let me=R-1,_e=!1;for(;me>0&&!this.lines[me].isVisible();)me--,_e=!0;if(me===0&&!this.lines[me].isVisible())return new we.a(1,1);const He=1+(me===0?0:this.prefixSumComputer.getAccumulatedValue(me-1));let $e;return _e?$e=this.lines[me].getViewPositionOfModelPosition(He,this.model.getLineMaxColumn(me+1),a):$e=this.lines[R-1].getViewPositionOfModelPosition(He,X,a),$e}convertModelRangeToViewRange(o,n=0){if(o.isEmpty()){const a=this.convertModelPositionToViewPosition(o.startLineNumber,o.startColumn,n);return Oe.a.fromPositions(a)}else{const a=this.convertModelPositionToViewPosition(o.startLineNumber,o.startColumn,1),T=this.convertModelPositionToViewPosition(o.endLineNumber,o.endColumn,0);return new Oe.a(a.lineNumber,a.column,T.lineNumber,T.column)}}getViewLineNumberOfModelPosition(o,n){let a=o-1;if(this.lines[a].isVisible()){const R=1+(a===0?0:this.prefixSumComputer.getAccumulatedValue(a-1));return this.lines[a].getViewLineNumberOfModelPosition(R,n)}for(;a>0&&!this.lines[a].isVisible();)a--;if(a===0&&!this.lines[a].isVisible())return 1;const T=1+(a===0?0:this.prefixSumComputer.getAccumulatedValue(a-1));return this.lines[a].getViewLineNumberOfModelPosition(T,this.model.getLineMaxColumn(a+1))}getDecorationsInRange(o,n,a){const T=this.convertViewPositionToModelPosition(o.startLineNumber,o.startColumn),R=this.convertViewPositionToModelPosition(o.endLineNumber,o.endColumn);if(R.lineNumber-T.lineNumber<=o.endLineNumber-o.startLineNumber)return this.model.getDecorationsInRange(new Oe.a(T.lineNumber,1,R.lineNumber,R.column),n,a);let X=[];const me=T.lineNumber-1,_e=R.lineNumber-1;let He=null;for(let gt=me;gt<=_e;gt++){const kt=this.lines[gt];if(kt.isVisible())He===null&&(He=new we.a(gt+1,gt===me?T.column:1));else if(He!==null){const Kt=this.model.getLineMaxColumn(gt);X=X.concat(this.model.getDecorationsInRange(new Oe.a(He.lineNumber,He.column,gt,Kt),n,a)),He=null}}He!==null&&(X=X.concat(this.model.getDecorationsInRange(new Oe.a(He.lineNumber,He.column,R.lineNumber,R.column),n,a)),He=null),X.sort((gt,kt)=>{const Kt=Oe.a.compareRangesUsingStarts(gt.range,kt.range);return Kt===0?gt.id<kt.id?-1:gt.id>kt.id?1:0:Kt});let $e=[],ot=0,Ot=null;for(const gt of X){const kt=gt.id;if(Ot===kt)continue;Ot=kt,$e[ot++]=gt}return $e}getInjectedTextAt(o){const n=this._toValidViewLineNumber(o.lineNumber),a=this.prefixSumComputer.getIndexOf(n-1),T=a.index,R=a.remainder;return this.lines[T].getInjectedTextAt(R,o.column)}normalizePosition(o,n){const a=this._toValidViewLineNumber(o.lineNumber),T=this.prefixSumComputer.getIndexOf(a-1),R=T.index,X=T.remainder;return this.lines[R].normalizePosition(this.model,R+1,X,o,n)}getLineIndentColumn(o){const n=this._toValidViewLineNumber(o),a=this.prefixSumComputer.getIndexOf(n-1),T=a.index,R=a.remainder;return R===0?this.model.getLineIndentColumn(T+1):0}}class Ss{constructor(o,n){this.modelLineNumber=o,this.modelLineWrappedLineIdx=n}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}}class rs{constructor(o,n){this.modelRange=o,this.viewLines=n}}class as{constructor(){}isVisible(){return!0}setVisible(o){return o?this:ks.INSTANCE}getLineBreakData(){return null}getViewLineCount(){return 1}getViewLineContent(o,n,a){return o.getLineContent(n)}getViewLineLength(o,n,a){return o.getLineLength(n)}getViewLineMinColumn(o,n,a){return o.getLineMinColumn(n)}getViewLineMaxColumn(o,n,a){return o.getLineMaxColumn(n)}getViewLineData(o,n,a){let T=o.getLineTokens(n),R=T.getLineContent();return new P.f(R,!1,1,R.length+1,0,T.inflate(),null)}getViewLinesData(o,n,a,T,R,X,me){if(!X[R]){me[R]=null;return}me[R]=this.getViewLineData(o,n,0)}getModelColumnOfViewPosition(o,n){return n}getViewPositionOfModelPosition(o,n){return new we.a(o,n)}getViewLineNumberOfModelPosition(o,n){return o}normalizePosition(o,n,a,T,R){return T}getInjectedTextAt(o,n){return null}}as.INSTANCE=new as;class ks{constructor(){}isVisible(){return!1}setVisible(o){return o?as.INSTANCE:this}getLineBreakData(){return null}getViewLineCount(){return 0}getViewLineContent(o,n,a){throw new Error("Not supported")}getViewLineLength(o,n,a){throw new Error("Not supported")}getViewLineMinColumn(o,n,a){throw new Error("Not supported")}getViewLineMaxColumn(o,n,a){throw new Error("Not supported")}getViewLineData(o,n,a){throw new Error("Not supported")}getViewLinesData(o,n,a,T,R,X,me){throw new Error("Not supported")}getModelColumnOfViewPosition(o,n){throw new Error("Not supported")}getViewPositionOfModelPosition(o,n){throw new Error("Not supported")}getViewLineNumberOfModelPosition(o,n){throw new Error("Not supported")}normalizePosition(o,n,a,T,R){throw new Error("Not supported")}getInjectedTextAt(o,n){throw new Error("Not supported")}}ks.INSTANCE=new ks;class Zr{constructor(o,n){this._lineBreakData=o,this._isVisible=n}isVisible(){return this._isVisible}setVisible(o){return this._isVisible=o,this}getLineBreakData(){return this._lineBreakData}getViewLineCount(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}getInputStartOffsetOfOutputLineIndex(o){return this._lineBreakData.getInputOffsetOfOutputPosition(o,0)}getInputEndOffsetOfOutputLineIndex(o,n,a){return a+1===this._lineBreakData.breakOffsets.length?o.getLineMaxColumn(n)-1:this._lineBreakData.getInputOffsetOfOutputPosition(a+1,0)}getViewLineContent(o,n,a){if(!this._isVisible)throw new Error("Not supported");const T=a>0?this._lineBreakData.breakOffsets[a-1]:0,R=a<this._lineBreakData.breakOffsets.length?this._lineBreakData.breakOffsets[a]:this._lineBreakData.breakOffsets[this._lineBreakData.breakOffsets.length-1];let X;if(this._lineBreakData.injectionOffsets!==null){const me=this._lineBreakData.injectionOffsets.map((_e,He)=>new Co.b(0,0,_e+1,this._lineBreakData.injectionOptions[He],0));X=Co.b.applyInjectedText(o.getLineContent(n),me).substring(T,R)}else X=o.getValueInRange({startLineNumber:n,startColumn:T+1,endLineNumber:n,endColumn:R+1});return a>0&&(X=ws(this._lineBreakData.wrappedTextIndentLength)+X),X}getViewLineLength(o,n,a){if(!this._isVisible)throw new Error("Not supported");const T=a>0?this._lineBreakData.breakOffsets[a-1]:0,R=a<this._lineBreakData.breakOffsets.length?this._lineBreakData.breakOffsets[a]:this._lineBreakData.breakOffsets[this._lineBreakData.breakOffsets.length-1];let X=R-T;return a>0&&(X=this._lineBreakData.wrappedTextIndentLength+X),X}getViewLineMinColumn(o,n,a){if(!this._isVisible)throw new Error("Not supported");return this._getViewLineMinColumn(a)}_getViewLineMinColumn(o){return o>0?this._lineBreakData.wrappedTextIndentLength+1:1}getViewLineMaxColumn(o,n,a){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineLength(o,n,a)+1}getViewLineData(o,n,a){if(!this._isVisible)throw new Error("Not supported");const T=this._lineBreakData,R=a>0?T.wrappedTextIndentLength:0,X=T.injectionOffsets,me=T.injectionOptions;let _e,He,$e;if(X){const Kt=o.getLineTokens(n).withInserted(X.map((yo,jo)=>({offset:yo,text:me[jo].content,tokenMetadata:ss.a.defaultTokenMetadata}))),eo=a>0?T.breakOffsets[a-1]:0,co=T.breakOffsets[a];_e=Kt.getLineContent().substring(eo,co),He=Kt.sliceAndInflate(eo,co,R),$e=new Array;let go=0;for(let yo=0;yo<X.length;yo++){const jo=me[yo].content.length,Po=X[yo]+go,ti=X[yo]+go+jo;if(Po>co)break;if(eo<ti){const oi=me[yo];if(oi.inlineClassName){const $o=a>0?T.wrappedTextIndentLength:0,Yo=$o+Math.max(Po-eo,0),Ei=$o+Math.min(ti-eo,co);Yo!==Ei&&$e.push(new P.e(Yo,Ei,oi.inlineClassName,oi.inlineClassNameAffectsLetterSpacing))}}go+=jo}}else{const Kt=this.getInputStartOffsetOfOutputLineIndex(a),eo=this.getInputEndOffsetOfOutputLineIndex(o,n,a),co=o.getLineTokens(n);_e=o.getValueInRange({startLineNumber:n,startColumn:Kt+1,endLineNumber:n,endColumn:eo+1}),He=co.sliceAndInflate(Kt,eo,R),$e=null}a>0&&(_e=ws(T.wrappedTextIndentLength)+_e);const ot=a>0?T.wrappedTextIndentLength+1:1,Ot=_e.length+1,gt=a+1<this.getViewLineCount(),kt=a===0?0:T.breakOffsetsVisibleColumn[a-1];return new P.f(_e,gt,ot,Ot,kt,He,$e)}getViewLinesData(o,n,a,T,R,X,me){if(!this._isVisible)throw new Error("Not supported");for(let _e=a;_e<T;_e++){let He=R+_e-a;if(!X[He]){me[He]=null;continue}me[He]=this.getViewLineData(o,n,_e)}}getModelColumnOfViewPosition(o,n){if(!this._isVisible)throw new Error("Not supported");let a=n-1;return o>0&&(a<this._lineBreakData.wrappedTextIndentLength?a=0:a-=this._lineBreakData.wrappedTextIndentLength),this._lineBreakData.getInputOffsetOfOutputPosition(o,a)+1}getViewPositionOfModelPosition(o,n,a=2){if(!this._isVisible)throw new Error("Not supported");let T=this._lineBreakData.getOutputPositionOfInputOffset(n-1,a),R=T.outputLineIndex,X=T.outputOffset+1;return R>0&&(X+=this._lineBreakData.wrappedTextIndentLength),new we.a(o+R,X)}getViewLineNumberOfModelPosition(o,n){if(!this._isVisible)throw new Error("Not supported");const a=this._lineBreakData.getOutputPositionOfInputOffset(n-1);return o+a.outputLineIndex}normalizePosition(o,n,a,T,R){if(this._lineBreakData.injectionOffsets!==null){const X=T.lineNumber-a,me=this._lineBreakData.outputPositionToOffsetInUnwrappedLine(a,T.column-1),_e=this._lineBreakData.normalizeOffsetAroundInjections(me,R);if(_e!==me)return this._lineBreakData.getOutputPositionOfOffsetInUnwrappedLine(_e,R).toPosition(X,this._lineBreakData.wrappedTextIndentLength)}if(R===0){if(a>0&&T.column===this._getViewLineMinColumn(a))return new we.a(T.lineNumber-1,this.getViewLineMaxColumn(o,n,a-1))}else if(R===1){const X=this.getViewLineCount()-1;if(a<X&&T.column===this.getViewLineMaxColumn(o,n,a))return new we.a(T.lineNumber+1,this._getViewLineMinColumn(a+1))}return T}getInjectedTextAt(o,n){return this._lineBreakData.getInjectedText(o,n-1)}}let nr=[""];function ws(o){if(o>=nr.length)for(let n=1;n<=o;n++)nr[n]=Qr(n);return nr[o]}function Qr(o){return new Array(o+1).join(" ")}function sr(o,n){return o===null?n?as.INSTANCE:ks.INSTANCE:new Zr(o,n)}class yr{constructor(o){this._lines=o}_validPosition(o){return this._lines.model.validatePosition(o)}_validRange(o){return this._lines.model.validateRange(o)}convertViewPositionToModelPosition(o){return this._validPosition(o)}convertViewRangeToModelRange(o){return this._validRange(o)}validateViewPosition(o,n){return this._validPosition(n)}validateViewRange(o,n){return this._validRange(n)}convertModelPositionToViewPosition(o){return this._validPosition(o)}convertModelRangeToViewRange(o){return this._validRange(o)}modelPositionIsVisible(o){const n=this._lines.model.getLineCount();return!(o.lineNumber<1||o.lineNumber>n)}getModelLineViewLineCount(o){return 1}getViewLineNumberOfModelPosition(o,n){return o}}class Jr{constructor(o){this.model=o}dispose(){}createCoordinatesConverter(){return new yr(this)}getHiddenAreas(){return[]}setHiddenAreas(o){return!1}setTabSize(o){return!1}setWrappingSettings(o,n,a,T){return!1}createLineBreaksComputer(){let o=[];return{addRequest:(n,a,T)=>{o.push(null)},finalize:()=>o}}onModelFlushed(){}onModelLinesDeleted(o,n,a){return new yn(n,a)}onModelLinesInserted(o,n,a,T){return new En(n,a)}onModelLineChanged(o,n,a){return[!1,new wn(n,n),null,null]}acceptVersionId(o){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(o,n,a){return{startLineNumber:o,endLineNumber:o,indent:0}}getViewLinesBracketGuides(o,n,a){return new Array(n-o+1).fill([])}getViewLinesIndentGuides(o,n){const a=n-o+1;let T=new Array(a);for(let R=0;R<a;R++)T[R]=0;return T}getViewLineContent(o){return this.model.getLineContent(o)}getViewLineLength(o){return this.model.getLineLength(o)}getViewLineMinColumn(o){return this.model.getLineMinColumn(o)}getViewLineMaxColumn(o){return this.model.getLineMaxColumn(o)}getViewLineData(o){let n=this.model.getLineTokens(o),a=n.getLineContent();return new P.f(a,!1,1,a.length+1,0,n.inflate(),null)}getViewLinesData(o,n,a){const T=this.model.getLineCount();o=Math.min(Math.max(1,o),T),n=Math.min(Math.max(1,n),T);let R=[];for(let X=o;X<=n;X++){let me=X-o;a[me]||(R[me]=null),R[me]=this.getViewLineData(X)}return R}getDecorationsInRange(o,n,a){return this.model.getDecorationsInRange(o,n,a)}normalizePosition(o,n){return this.model.normalizePosition(o,n)}getLineIndentColumn(o){return this.model.getLineIndentColumn(o)}getInjectedTextAt(o){return null}}class Vn{constructor(o,n,a,T,R){this.editorId=o,this.model=n,this.configuration=a,this._linesCollection=T,this._coordinatesConverter=R,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(o){const n=o.id;let a=this._decorationsCache[n];if(!a){const T=o.range,R=o.options;let X;if(R.isWholeLine){const me=this._coordinatesConverter.convertModelPositionToViewPosition(new we.a(T.startLineNumber,1),0),_e=this._coordinatesConverter.convertModelPositionToViewPosition(new we.a(T.endLineNumber,this.model.getLineMaxColumn(T.endLineNumber)),1);X=new Oe.a(me.lineNumber,me.column,_e.lineNumber,_e.column)}else X=this._coordinatesConverter.convertModelRangeToViewRange(T,1);a=new P.h(X,R),this._decorationsCache[n]=a}return a}getDecorationsViewportData(o){let n=this._cachedModelDecorationsResolver!==null;return n=n&&o.equalsRange(this._cachedModelDecorationsResolverViewRange),n||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(o),this._cachedModelDecorationsResolverViewRange=o),this._cachedModelDecorationsResolver}_getDecorationsViewportData(o){const n=this._linesCollection.getDecorationsInRange(o,this.editorId,Object(ze.n)(this.configuration.options)),a=o.startLineNumber,T=o.endLineNumber;let R=[],X=0,me=[];for(let _e=a;_e<=T;_e++)me[_e-a]=[];for(let _e=0,He=n.length;_e<He;_e++){let $e=n[_e],ot=$e.options,Ot=this._getOrCreateViewModelDecoration($e),gt=Ot.range;if(R[X++]=Ot,ot.inlineClassName){let kt=new P.a(gt,ot.inlineClassName,ot.inlineClassNameAffectsLetterSpacing?3:0),Kt=Math.max(a,gt.startLineNumber),eo=Math.min(T,gt.endLineNumber);for(let co=Kt;co<=eo;co++)me[co-a].push(kt)}if(ot.beforeContentClassName&&(a<=gt.startLineNumber&>.startLineNumber<=T)){let kt=new P.a(new Oe.a(gt.startLineNumber,gt.startColumn,gt.startLineNumber,gt.startColumn),ot.beforeContentClassName,1);me[gt.startLineNumber-a].push(kt)}if(ot.afterContentClassName&&(a<=gt.endLineNumber&>.endLineNumber<=T)){let kt=new P.a(new Oe.a(gt.endLineNumber,gt.endColumn,gt.endLineNumber,gt.endColumn),ot.afterContentClassName,2);me[gt.endLineNumber-a].push(kt)}}return{decorations:R,inlineDecorations:me}}}var js=t("MqQJ");const Er=!0;class vn extends d.a{constructor(o,n,a,T,R,X){super();if(this._editorId=o,this._configuration=n,this.model=a,this._eventDispatcher=new br,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new nt.b(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._tokenizeViewportSoon=this._register(new y.e(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new y.e(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,Er&&this.model.isTooLargeForTokenization())this._lines=new Jr(this.model);else{const me=this._configuration.options,_e=me.get(43),He=me.get(123),$e=me.get(130),ot=me.get(122);this._lines=new ir(this._editorId,this.model,T,R,_e,this.model.getOptions().tabSize,He,$e.wrappingColumn,ot)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new Rs(a,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new xn(this._configuration,this.getLineCount(),X)),this._register(this.viewLayout.onDidScroll(me=>{me.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new Os(me)),this._eventDispatcher.emitOutgoingEvent(new As(me.oldScrollWidth,me.oldScrollLeft,me.oldScrollHeight,me.oldScrollTop,me.scrollWidth,me.scrollLeft,me.scrollHeight,me.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(me=>{this._eventDispatcher.emitOutgoingEvent(me)})),this._decorations=new Vn(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(me=>{try{const _e=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(_e,me)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(ro.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new ns)})),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(o){this._eventDispatcher.addViewEventHandler(o)}removeViewEventHandler(o){this._eventDispatcher.removeViewEventHandler(o)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const o=this.viewLayout.getLinesViewportData(),n=new Oe.a(o.startLineNumber,this.getLineMinColumn(o.startLineNumber),o.endLineNumber,this.getLineMaxColumn(o.endLineNumber)),a=this._toModelVisibleRanges(n);for(const T of a)this.model.tokenizeViewport(T.startLineNumber,T.endLineNumber)}setHasFocus(o){this._hasFocus=o,this._cursor.setHasFocus(o),this._eventDispatcher.emitSingleViewEvent(new xi(o)),this._eventDispatcher.emitOutgoingEvent(new vr(!o,o))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new ko)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new Qo)}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new Yn)}_onConfigurationChanged(o,n){let a=null;if(this._viewportStartLine!==-1){let $e=new we.a(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));a=this.coordinatesConverter.convertViewPositionToModelPosition($e)}let T=!1;const R=this._configuration.options,X=R.get(43),me=R.get(123),_e=R.get(130),He=R.get(122);if(this._lines.setWrappingSettings(X,me,_e.wrappingColumn,He)&&(o.emitViewEvent(new Ki),o.emitViewEvent(new Ti),o.emitViewEvent(new li(null)),this._cursor.onLineMappingChanged(o),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.getCurrentScrollTop()!==0&&(T=!0),this._updateConfigurationViewLineCount.schedule()),n.hasChanged(80)&&(this._decorations.reset(),o.emitViewEvent(new li(null))),o.emitViewEvent(new yi(n)),this.viewLayout.onConfigurationChanged(n),T&&a){const $e=this.coordinatesConverter.convertModelPositionToViewPosition(a),ot=this.viewLayout.getVerticalOffsetForLineNumber($e.lineNumber);this.viewLayout.setScrollPosition({scrollTop:ot+this._viewportStartLineDelta},1)}nt.b.shouldRecreate(n)&&(this.cursorConfig=new nt.b(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(o=>{try{const n=this._eventDispatcher.beginEmitViewEvents();let a=!1,T=!1;const R=o.changes,X=o instanceof Co.d?o.versionId:null,me=this._lines.createLineBreaksComputer();for(const $e of R)switch($e.changeType){case 4:{for(let ot=0;ot<$e.detail.length;ot++){const Ot=$e.detail[ot];let gt=$e.injectedTexts[ot];gt&&(gt=gt.filter(kt=>!kt.ownerId||kt.ownerId===this._editorId)),me.addRequest(Ot,gt,null)}break}case 2:{let ot=null;$e.injectedText&&(ot=$e.injectedText.filter(Ot=>!Ot.ownerId||Ot.ownerId===this._editorId)),me.addRequest($e.detail,ot,null);break}}const _e=me.finalize();let He=0;for(const $e of R)switch($e.changeType){case 1:{this._lines.onModelFlushed(),n.emitViewEvent(new Ki),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),a=!0;break}case 3:{const ot=this._lines.onModelLinesDeleted(X,$e.fromLineNumber,$e.toLineNumber);ot!==null&&(n.emitViewEvent(ot),this.viewLayout.onLinesDeleted(ot.fromLineNumber,ot.toLineNumber)),a=!0;break}case 4:{const ot=_e.slice(He,He+$e.detail.length);He+=$e.detail.length;const Ot=this._lines.onModelLinesInserted(X,$e.fromLineNumber,$e.toLineNumber,ot);Ot!==null&&(n.emitViewEvent(Ot),this.viewLayout.onLinesInserted(Ot.fromLineNumber,Ot.toLineNumber)),a=!0;break}case 2:{const ot=_e[He];He++;const[Ot,gt,kt,Kt]=this._lines.onModelLineChanged(X,$e.lineNumber,ot);T=Ot,gt&&n.emitViewEvent(gt),kt&&(n.emitViewEvent(kt),this.viewLayout.onLinesInserted(kt.fromLineNumber,kt.toLineNumber)),Kt&&(n.emitViewEvent(Kt),this.viewLayout.onLinesDeleted(Kt.fromLineNumber,Kt.toLineNumber));break}case 5:break}X!==null&&this._lines.acceptVersionId(X),this.viewLayout.onHeightMaybeChanged(),!a&&T&&(n.emitViewEvent(new Ti),n.emitViewEvent(new li(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setMaxLineNumber(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const n=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(n){const a=this.coordinatesConverter.convertModelPositionToViewPosition(n.getStartPosition()),T=this.viewLayout.getVerticalOffsetForLineNumber(a.lineNumber);this.viewLayout.setScrollPosition({scrollTop:T+this._viewportStartLineDelta},1)}}try{const n=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(n,o)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(this.model.onDidChangeTokens(o=>{let n=[];for(let a=0,T=o.ranges.length;a<T;a++){const R=o.ranges[a],X=this.coordinatesConverter.convertModelPositionToViewPosition(new we.a(R.fromLineNumber,1)).lineNumber,me=this.coordinatesConverter.convertModelPositionToViewPosition(new we.a(R.toLineNumber,this.model.getLineMaxColumn(R.toLineNumber))).lineNumber;n[a]={fromLineNumber:X,toLineNumber:me}}this._eventDispatcher.emitSingleViewEvent(new vs(n)),o.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeLanguageConfiguration(o=>{this._eventDispatcher.emitSingleViewEvent(new Ni),this.cursorConfig=new nt.b(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeLanguage(o=>{this.cursorConfig=new nt.b(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeOptions(o=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const n=this._eventDispatcher.beginEmitViewEvents();n.emitViewEvent(new Ki),n.emitViewEvent(new Ti),n.emitViewEvent(new li(null)),this._cursor.onLineMappingChanged(n),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new nt.b(this.model.getLanguageId(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeDecorations(o=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new li(o))}))}setHiddenAreas(o){let n=!1;try{const a=this._eventDispatcher.beginEmitViewEvents();n=this._lines.setHiddenAreas(o),n&&(a.emitViewEvent(new Ki),a.emitViewEvent(new Ti),a.emitViewEvent(new li(null)),this._cursor.onLineMappingChanged(a),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),n&&this._eventDispatcher.emitOutgoingEvent(new Cs)}getVisibleRangesPlusViewportAboveBelow(){const o=this._configuration.options.get(129),n=this._configuration.options.get(58),a=Math.max(20,Math.round(o.height/n)),T=this.viewLayout.getLinesViewportData(),R=Math.max(1,T.completelyVisibleStartLineNumber-a),X=Math.min(this.getLineCount(),T.completelyVisibleEndLineNumber+a);return this._toModelVisibleRanges(new Oe.a(R,this.getLineMinColumn(R),X,this.getLineMaxColumn(X)))}getVisibleRanges(){const o=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(o)}_toModelVisibleRanges(o){const n=this.coordinatesConverter.convertViewRangeToModelRange(o),a=this._lines.getHiddenAreas();if(a.length===0)return[n];let T=[],R=0,X=n.startLineNumber,me=n.startColumn,_e=n.endLineNumber,He=n.endColumn;for(let $e=0,ot=a.length;$e<ot;$e++){const Ot=a[$e].startLineNumber,gt=a[$e].endLineNumber;if(gt<X)continue;if(Ot>_e)continue;X<Ot&&(T[R++]=new Oe.a(X,me,Ot-1,this.model.getLineMaxColumn(Ot-1))),X=gt+1,me=1}return(X<_e||X===_e&&me<He)&&(T[R++]=new Oe.a(X,me,_e,He)),T}getCompletelyVisibleViewRange(){const o=this.viewLayout.getLinesViewportData(),n=o.completelyVisibleStartLineNumber,a=o.completelyVisibleEndLineNumber;return new Oe.a(n,this.getLineMinColumn(n),a,this.getLineMaxColumn(a))}getCompletelyVisibleViewRangeAtScrollTop(o){const n=this.viewLayout.getLinesViewportDataAtScrollTop(o),a=n.completelyVisibleStartLineNumber,T=n.completelyVisibleEndLineNumber;return new Oe.a(a,this.getLineMinColumn(a),T,this.getLineMaxColumn(T))}saveState(){const o=this.viewLayout.saveState(),n=o.scrollTop,a=this.viewLayout.getLineNumberAtVerticalOffset(n),T=this.coordinatesConverter.convertViewPositionToModelPosition(new we.a(a,this.getLineMinColumn(a))),R=this.viewLayout.getVerticalOffsetForLineNumber(a)-n;return{scrollLeft:o.scrollLeft,firstPosition:T,firstPositionDeltaTop:R}}reduceRestoreState(o){if(typeof o.firstPosition=="undefined")return this._reduceRestoreStateCompatibility(o);const n=this.model.validatePosition(o.firstPosition),a=this.coordinatesConverter.convertModelPositionToViewPosition(n),T=this.viewLayout.getVerticalOffsetForLineNumber(a.lineNumber)-o.firstPositionDeltaTop;return{scrollLeft:o.scrollLeft,scrollTop:T}}_reduceRestoreStateCompatibility(o){return{scrollLeft:o.scrollLeft,scrollTop:o.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getTextModelOptions(){return this.model.getOptions()}getLineCount(){return this._lines.getViewLineCount()}setViewport(o,n,a){this._viewportStartLine=o;let T=this.coordinatesConverter.convertViewPositionToModelPosition(new we.a(o,this.getLineMinColumn(o)));this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,new Oe.a(T.lineNumber,T.column,T.lineNumber,T.column),1);const R=this.viewLayout.getVerticalOffsetForLineNumber(o),X=this.viewLayout.getCurrentScrollTop();this._viewportStartLineDelta=X-R}getActiveIndentGuide(o,n,a){return this._lines.getActiveIndentGuide(o,n,a)}getLinesIndentGuides(o,n){return this._lines.getViewLinesIndentGuides(o,n)}getBracketGuidesInRangeByLine(o,n,a,T){return this._lines.getViewLinesBracketGuides(o,n,a,T)}getLineContent(o){return this._lines.getViewLineContent(o)}getLineLength(o){return this._lines.getViewLineLength(o)}getLineMinColumn(o){return this._lines.getViewLineMinColumn(o)}getLineMaxColumn(o){return this._lines.getViewLineMaxColumn(o)}getLineFirstNonWhitespaceColumn(o){const n=ct.u(this.getLineContent(o));return n===-1?0:n+1}getLineLastNonWhitespaceColumn(o){const n=ct.I(this.getLineContent(o));return n===-1?0:n+2}getDecorationsInViewport(o){return this._decorations.getDecorationsViewportData(o).decorations}getInjectedTextAt(o){return this._lines.getInjectedTextAt(o)}getViewLineRenderingData(o,n){let a=this.model.mightContainRTL(),T=this.model.mightContainNonBasicASCII(),R=this.getTabSize(),X=this._lines.getViewLineData(n),me=this._decorations.getDecorationsViewportData(o).inlineDecorations,_e=me[n-o.startLineNumber];return X.inlineDecorations&&(_e=[..._e,...X.inlineDecorations.map(He=>He.toInlineDecoration(n))]),new P.g(X.minColumn,X.maxColumn,X.content,X.continuesWithWrappedLine,a,T,X.tokens,_e,R,X.startVisibleColumn)}getViewLineData(o){return this._lines.getViewLineData(o)}getMinimapLinesRenderingData(o,n,a){let T=this._lines.getViewLinesData(o,n,a);return new P.c(this.getTabSize(),T)}getAllOverviewRulerDecorations(o){const n=this.model.getOverviewRulerDecorations(this._editorId,Object(ze.n)(this._configuration.options)),a=new Ps;for(const T of n){const R=T.options,X=R.overviewRuler;if(!X)continue;const me=X.position;if(me===0)continue;const _e=X.getColor(o),He=this.coordinatesConverter.getViewLineNumberOfModelPosition(T.range.startLineNumber,T.range.startColumn),$e=this.coordinatesConverter.getViewLineNumberOfModelPosition(T.range.endLineNumber,T.range.endColumn);a.accept(_e,R.zIndex,He,$e,me)}return a.asArray}invalidateOverviewRulerColorCache(){const o=this.model.getOverviewRulerDecorations();for(const n of o){const a=n.options.overviewRuler;a&&a.invalidateCachedColor()}}invalidateMinimapColorCache(){const o=this.model.getAllDecorations();for(const n of o){const a=n.options.minimap;a&&a.invalidateCachedColor()}}getValueInRange(o,n){const a=this.coordinatesConverter.convertViewRangeToModelRange(o);return this.model.getValueInRange(a,n)}getModelLineMaxColumn(o){return this.model.getLineMaxColumn(o)}validateModelPosition(o){return this.model.validatePosition(o)}validateModelRange(o){return this.model.validateRange(o)}deduceModelPositionRelativeToViewPosition(o,n,a){const T=this.coordinatesConverter.convertViewPositionToModelPosition(o);this.model.getEOL().length===2&&(n<0?n-=a:n+=a);const R=this.model.getOffsetAt(T),X=R+n;return this.model.getPositionAt(X)}getEOL(){return this.model.getEOL()}getPlainTextToCopy(o,n,a){const T=a?`\r
|
|
|
`:this.model.getEOL();o=o.slice(0),o.sort(Oe.a.compareRangesUsingStarts);let R=!1,X=!1;for(const _e of o)_e.isEmpty()?R=!0:X=!0;if(!X){if(!n)return"";const _e=o.map($e=>$e.startLineNumber);let He="";for(let $e=0;$e<_e.length;$e++){if($e>0&&_e[$e-1]===_e[$e])continue;He+=this.model.getLineContent(_e[$e])+T}return He}if(R&&n){let _e=[],He=0;for(const $e of o){const ot=$e.startLineNumber;$e.isEmpty()?ot!==He&&_e.push(this.model.getLineContent(ot)):_e.push(this.model.getValueInRange($e,a?2:0)),He=ot}return _e.length===1?_e[0]:_e}let me=[];for(const _e of o)_e.isEmpty()||me.push(this.model.getValueInRange(_e,a?2:0));return me.length===1?me[0]:me}getRichTextToCopy(o,n){const a=this.model.getLanguageId();if(a===js.b)return null;if(o.length!==1)return null;let T=o[0];if(T.isEmpty()){if(!n)return null;const $e=T.startLineNumber;T=new Oe.a($e,this.model.getLineMinColumn($e),$e,this.model.getLineMaxColumn($e))}const R=this._configuration.options.get(43),X=this._getColorMap(),me=/[:;\\\/<>]/.test(R.fontFamily),_e=me||R.fontFamily===ze.c.fontFamily;let He;if(_e)He=ze.c.fontFamily;else{He=R.fontFamily,He=He.replace(/"/g,"'");const $e=/[,']/.test(He);if(!$e){const ot=/[+ ]/.test(He);ot&&(He=`'${He}'`)}He=`${He}, ${ze.c.fontFamily}`}return{mode:a,html:`<div style="color: ${X[1]};background-color: ${X[2]};font-family: ${He};font-weight: ${R.fontWeight};font-size: ${R.fontSize}px;line-height: ${R.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(T,X)+"</div>"}}_getHTMLToCopy(o,n){const a=o.startLineNumber,T=o.startColumn,R=o.endLineNumber,X=o.endColumn,me=this.getTabSize();let _e="";for(let He=a;He<=R;He++){const $e=this.model.getLineTokens(He),ot=$e.getLineContent(),Ot=He===a?T-1:0,gt=He===R?X-1:ot.length;ot===""?_e+="<br>":_e+=Object(Ya.a)(ot,$e.inflate(),n,Ot,gt,me,c.i)}return _e}_getColorMap(){let o=zt.E.getColorMap(),n=["#000000"];if(o)for(let a=1,T=o.length;a<T;a++)n[a]=Wi.a.Format.CSS.formatHex(o[a]);return n}pushStackElement(){this.model.pushStackElement()}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(o,n,a){this._withViewEventsCollector(T=>this._cursor.setStates(T,o,n,a))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(o){this._cursor.setCursorColumnSelectData(o)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(o){this._cursor.setPrevEditOperationType(o)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(o,n,a=0){this._withViewEventsCollector(T=>this._cursor.setSelections(T,o,n,a))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(o){this._withViewEventsCollector(n=>this._cursor.restoreState(n,o))}_executeCursorEdit(o){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new Kr);return}this._withViewEventsCollector(o)}executeEdits(o,n,a){this._executeCursorEdit(T=>this._cursor.executeEdits(T,o,n,a))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit(o=>this._cursor.startComposition(o))}endComposition(o){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit(n=>this._cursor.endComposition(n,o))}type(o,n){this._executeCursorEdit(a=>this._cursor.type(a,o,n))}compositionType(o,n,a,T,R){this._executeCursorEdit(X=>this._cursor.compositionType(X,o,n,a,T,R))}paste(o,n,a,T){this._executeCursorEdit(R=>this._cursor.paste(R,o,n,a,T))}cut(o){this._executeCursorEdit(n=>this._cursor.cut(n,o))}executeCommand(o,n){this._executeCursorEdit(a=>this._cursor.executeCommand(a,o,n))}executeCommands(o,n){this._executeCursorEdit(a=>this._cursor.executeCommands(a,o,n))}revealPrimaryCursor(o,n){this._withViewEventsCollector(a=>this._cursor.revealPrimary(a,o,n,0))}revealTopMostCursor(o){const n=this._cursor.getTopMostViewPosition(),a=new Oe.a(n.lineNumber,n.column,n.lineNumber,n.column);this._withViewEventsCollector(T=>T.emitViewEvent(new Mn(o,a,null,0,!0,0)))}revealBottomMostCursor(o){const n=this._cursor.getBottomMostViewPosition(),a=new Oe.a(n.lineNumber,n.column,n.lineNumber,n.column);this._withViewEventsCollector(T=>T.emitViewEvent(new Mn(o,a,null,0,!0,0)))}revealRange(o,n,a,T,R){this._withViewEventsCollector(X=>X.emitViewEvent(new Mn(o,a,null,T,n,R)))}getVerticalOffsetForLineNumber(o){return this.viewLayout.getVerticalOffsetForLineNumber(o)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(o,n){this.viewLayout.setScrollPosition({scrollTop:o},n)}setScrollPosition(o,n){this.viewLayout.setScrollPosition(o,n)}deltaScrollNow(o,n){this.viewLayout.deltaScrollNow(o,n)}changeWhitespace(o){const n=this.viewLayout.changeWhitespace(o);n&&(this._eventDispatcher.emitSingleViewEvent(new pr),this._eventDispatcher.emitOutgoingEvent(new Cs))}setMaxLineWidth(o){this.viewLayout.setMaxLineWidth(o)}_withViewEventsCollector(o){try{const n=this._eventDispatcher.beginEmitViewEvents();o(n)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(o,n){return this._lines.normalizePosition(o,n)}getLineIndentColumn(o){return this._lines.getLineIndentColumn(o)}}class Ps{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(o,n,a,T,R){const X=this._asMap[o];if(X){const me=X.data,_e=me[me.length-3],He=me[me.length-1];if(_e===R&&He+1>=a){T>He&&(me[me.length-1]=T);return}me.push(R,a,T)}else{const me=new P.d(o,n,[R,a,T]);this._asMap[o]=me,this.asArray.push(me)}}}var zn=t("nnTU"),Fs=t("T8No"),qr=t("Cg/j"),Bs=t("8HsV"),Ws=t("sM1p"),ea=t("R3nR"),ta=t("MXAL");class oa extends ta.a{constructor(o,n){super(0);for(let a=0;a<o.length;a++)this.set(o.charCodeAt(a),1);for(let a=0;a<n.length;a++)this.set(n.charCodeAt(a),2)}get(o){return o>=0&&o<256?this._asciiMap[o]:o>=12352&&o<=12543||o>=13312&&o<=19903||o>=19968&&o<=40959?3:this._map.get(o)||this._defaultValue}}let Fn=[],Ls=[];class rr{constructor(o,n){this.classifier=new oa(o,n)}static create(o){return new rr(o.get(118),o.get(117))}createLineBreaksComputer(o,n,a,T){n=n|0,a=+a;const R=[],X=[],me=[];return{addRequest:(_e,He,$e)=>{R.push(_e),X.push(He),me.push($e)},finalize:()=>{const _e=o.typicalFullwidthCharacterWidth/o.typicalHalfwidthCharacterWidth;let He=[];for(let $e=0,ot=R.length;$e<ot;$e++){const Ot=X[$e],gt=me[$e];gt&&!gt.injectionOptions&&!Ot?He[$e]=ia(this.classifier,gt,R[$e],n,a,_e,T):He[$e]=na(this.classifier,R[$e],Ot,n,a,_e,T)}return Fn.length=0,Ls.length=0,He}}}}function ia(o,n,a,T,R,X,me){if(R===-1)return null;const _e=a.length;if(_e<=1)return null;const He=n.breakOffsets,$e=n.breakOffsetsVisibleColumn,ot=lr(a,T,R,X,me),Ot=R-ot;let gt=Fn,kt=Ls,Kt=0,eo=0,co=0,go=R;const yo=He.length;let jo=0;if(jo>=0){let Po=Math.abs($e[jo]-go);for(;jo+1<yo;){const ti=Math.abs($e[jo+1]-go);if(ti>=Po)break;Po=ti,jo++}}for(;jo<yo;){let Po=jo<0?0:He[jo],ti=jo<0?0:$e[jo];eo>Po&&(Po=eo,ti=co);let oi=0,$o=0,Yo=0,Ei=0;if(ti<=go){let bi=ti,ji=Po===0?0:a.charCodeAt(Po-1),ln=Po===0?0:o.get(ji),Xi=!0;for(let dn=Po;dn<_e;dn++){const Cn=dn,un=a.charCodeAt(dn);let hn,Nn;if(ct.E(un)?(dn++,hn=0,Nn=2):(hn=o.get(un),Nn=ls(un,bi,T,X)),Cn>eo&&Kn(ji,ln,un,hn)&&(oi=Cn,$o=bi),bi+=Nn,bi>go){Cn>eo?(Yo=Cn,Ei=bi-Nn):(Yo=dn+1,Ei=bi),bi-$o>Ot&&(oi=0),Xi=!1;break}ji=un,ln=hn}if(Xi){Kt>0&&(gt[Kt]=He[He.length-1],kt[Kt]=$e[He.length-1],Kt++);break}}if(oi===0){let bi=ti,ji=a.charCodeAt(Po),ln=o.get(ji),Xi=!1;for(let dn=Po-1;dn>=eo;dn--){const Cn=dn+1,un=a.charCodeAt(dn);if(un===9){Xi=!0;break}let hn,Nn;if(ct.F(un)?(dn--,hn=0,Nn=2):(hn=o.get(un),Nn=ct.D(un)?X:1),bi<=go){if(Yo===0&&(Yo=Cn,Ei=bi),bi<=go-Ot)break;if(Kn(un,hn,ji,ln)){oi=Cn,$o=bi;break}}bi-=Nn,ji=un,ln=hn}if(oi!==0){const dn=Ot-(Ei-$o);if(dn<=T){const Cn=a.charCodeAt(Yo);let un;ct.E(Cn)?un=2:un=ls(Cn,Ei,T,X),dn-un<0&&(oi=0)}}if(Xi){jo--;continue}}if(oi===0&&(oi=Yo,$o=Ei),oi<=eo){const bi=a.charCodeAt(eo);ct.E(bi)?(oi=eo+2,$o=co+2):(oi=eo+1,$o=co+ls(bi,co,T,X))}for(eo=oi,gt[Kt]=oi,co=$o,kt[Kt]=$o,Kt++,go=$o+Ot;jo<0||jo<yo&&$e[jo]<$o;)jo++;let Ci=Math.abs($e[jo]-go);for(;jo+1<yo;){const bi=Math.abs($e[jo+1]-go);if(bi>=Ci)break;Ci=bi,jo++}}return Kt===0?null:(gt.length=Kt,kt.length=Kt,Fn=n.breakOffsets,Ls=n.breakOffsetsVisibleColumn,n.breakOffsets=gt,n.breakOffsetsVisibleColumn=kt,n.wrappedTextIndentLength=ot,n)}function na(o,n,a,T,R,X,me){const _e=Co.b.applyInjectedText(n,a);let He,$e;if(a&&a.length>0?(He=a.map($o=>$o.options),$e=a.map($o=>$o.column-1)):(He=null,$e=null),R===-1)return He?new P.b([_e.length],[],0,$e,He):null;const ot=_e.length;if(ot<=1)return He?new P.b([_e.length],[],0,$e,He):null;const Ot=lr(_e,T,R,X,me),gt=R-Ot;let kt=[],Kt=[],eo=0,co=0,go=0,yo=R,jo=_e.charCodeAt(0),Po=o.get(jo),ti=ls(jo,0,T,X),oi=1;ct.E(jo)&&(ti+=1,jo=_e.charCodeAt(1),Po=o.get(jo),oi++);for(let $o=oi;$o<ot;$o++){const Yo=$o,Ei=_e.charCodeAt($o);let Ci,bi;ct.E(Ei)?($o++,Ci=0,bi=2):(Ci=o.get(Ei),bi=ls(Ei,ti,T,X)),Kn(jo,Po,Ei,Ci)&&(co=Yo,go=ti),ti+=bi,ti>yo&&((co===0||ti-go>gt)&&(co=Yo,go=ti-bi),kt[eo]=co,Kt[eo]=go,eo++,yo=go+gt,co=0),jo=Ei,Po=Ci}return eo===0&&(!a||a.length===0)?null:(kt[eo]=ot,Kt[eo]=ti,new P.b(kt,Kt,Ot,$e,He))}function ls(o,n,a,T){return o===9?a-n%a:ct.D(o)||o<32?T:1}function ar(o,n){return n-o%n}function Kn(o,n,a,T){return a!==32&&(n===2||n===3&&T!==2||T===1||T===3&&n!==1)}function lr(o,n,a,T,R){let X=0;if(R!==0){const me=ct.u(o);if(me!==-1){for(let He=0;He<me;He++){const $e=o.charCodeAt(He)===9?ar(X,n):1;X+=$e}const _e=R===3?2:R===2?1:0;for(let He=0;He<_e;He++){const $e=ar(X,n);X+=$e}X+T>a&&(X=0)}}return X}var Us;const Qn=(Us=window.trustedTypes)===null||Us===void 0?void 0:Us.createPolicy("domLineBreaksComputer",{createHTML:o=>o});class Gn{static create(){return new Gn}constructor(){}createLineBreaksComputer(o,n,a,T){n=n|0,a=+a;let R=[],X=[];return{addRequest:(me,_e,He)=>{R.push(me),X.push(_e)},finalize:()=>Sn(R,o,n,a,T,X)}}}function Sn(o,n,a,T,R,X){var me;function _e(Yo){const Ei=X[Yo];if(Ei){const Ci=Co.b.applyInjectedText(o[Yo],Ei),bi=Ei.map(ln=>ln.options),ji=Ei.map(ln=>ln.column-1);return new P.b([Ci.length],[],0,ji,bi)}else return null}if(T===-1){const Yo=[];for(let Ei=0,Ci=o.length;Ei<Ci;Ei++)Yo[Ei]=_e(Ei);return Yo}const He=Math.round(T*n.typicalHalfwidthCharacterWidth),$e=R===3?2:R===2?1:0,ot=Math.round(a*$e),Ot=Math.ceil(n.spaceWidth*ot),gt=document.createElement("div");S.a.applyFontInfoSlow(gt,n);const kt=Object(qt.a)(1e4),Kt=[],eo=[],co=[],go=[],yo=[];for(let Yo=0;Yo<o.length;Yo++){const Ei=Co.b.applyInjectedText(o[Yo],X[Yo]);let Ci=0,bi=0,ji=He;if(R!==0)if(Ci=ct.u(Ei),Ci===-1)Ci=0;else{for(let Cn=0;Cn<Ci;Cn++){const un=Ei.charCodeAt(Cn)===9?a-bi%a:1;bi+=un}const dn=Math.ceil(n.spaceWidth*bi);dn+n.typicalFullwidthCharacterWidth>He?(Ci=0,bi=0):ji=He-dn}const ln=Ei.substr(Ci),Xi=Jn(ln,bi,a,ji,kt,Ot);Kt[Yo]=Ci,eo[Yo]=bi,co[Yo]=ln,go[Yo]=Xi[0],yo[Yo]=Xi[1]}const jo=kt.build(),Po=(me=Qn==null?void 0:Qn.createHTML(jo))!==null&&me!==void 0?me:jo;gt.innerHTML=Po,gt.style.position="absolute",gt.style.top="10000",gt.style.wordWrap="break-word",document.body.appendChild(gt);let ti=document.createRange();const oi=Array.prototype.slice.call(gt.children,0);let $o=[];for(let Yo=0;Yo<o.length;Yo++){const Ei=oi[Yo],Ci=sa(ti,Ei,co[Yo],go[Yo]);if(Ci===null){$o[Yo]=_e(Yo);continue}const bi=Kt[Yo],ji=eo[Yo]+ot,ln=yo[Yo],Xi=[];for(let hn=0,Nn=Ci.length;hn<Nn;hn++)Xi[hn]=ln[Ci[hn]];if(bi!==0)for(let hn=0,Nn=Ci.length;hn<Nn;hn++)Ci[hn]+=bi;let dn,Cn;const un=X[Yo];un?(dn=un.map(hn=>hn.options),Cn=un.map(hn=>hn.column-1)):(dn=null,Cn=null),$o[Yo]=new P.b(Ci,Xi,ji,Cn,dn)}return document.body.removeChild(gt),$o}function Jn(o,n,a,T,R,X){if(X!==0){let gt=String(X);R.appendASCIIString('<div style="text-indent: -'),R.appendASCIIString(gt),R.appendASCIIString("px; padding-left: "),R.appendASCIIString(gt),R.appendASCIIString("px; box-sizing: border-box; width:")}else R.appendASCIIString('<div style="width:');R.appendASCIIString(String(T)),R.appendASCIIString('px;">');const me=o.length;let _e=n,He=0,$e=[],ot=[],Ot=0<me?o.charCodeAt(0):0;R.appendASCIIString("<span>");for(let gt=0;gt<me;gt++){gt!==0&>%16384===0&&R.appendASCIIString("</span><span>"),$e[gt]=He,ot[gt]=_e;const kt=Ot;Ot=gt+1<me?o.charCodeAt(gt+1):0;let Kt=1,eo=1;switch(kt){case 9:Kt=a-_e%a,eo=Kt;for(let co=1;co<=Kt;co++)co<Kt?R.write1(160):R.appendASCII(32);break;case 32:Ot===32?R.write1(160):R.appendASCII(32);break;case 60:R.appendASCIIString("<");break;case 62:R.appendASCIIString(">");break;case 38:R.appendASCIIString("&");break;case 0:R.appendASCIIString("�");break;case 65279:case 8232:case 8233:case 133:R.write1(65533);break;default:ct.D(kt)&&eo++,kt<32?R.write1(9216+kt):R.write1(kt)}He+=Kt,_e+=eo}return R.appendASCIIString("</span>"),$e[o.length]=He,ot[o.length]=_e,R.appendASCIIString("</div>"),[$e,ot]}function sa(o,n,a,T){if(a.length<=1)return null;const R=Array.prototype.slice.call(n.children,0),X=[];try{Hs(o,R,T,0,null,a.length-1,null,X)}catch(me){return console.log(me),null}return X.length===0?null:(X.push(a.length),X)}function Hs(o,n,a,T,R,X,me,_e){if(T===X)return;if(R=R||dr(o,n,a[T],a[T+1]),me=me||dr(o,n,a[X],a[X+1]),Math.abs(R[0].top-me[0].top)<=.1)return;if(T+1===X){_e.push(X);return}const He=T+(X-T)/2|0,$e=dr(o,n,a[He],a[He+1]);Hs(o,n,a,T,R,He,$e,_e),Hs(o,n,a,He,$e,X,me,_e)}function dr(o,n,a,T){return o.setStart(n[a/16384|0].firstChild,a%16384),o.setEnd(n[T/16384|0].firstChild,T%16384),o.getClientRects()}var ra=t("1I1M"),ds=function(o,n,a,T){var R=arguments.length,X=R<3?n:T===null?T=Object.getOwnPropertyDescriptor(n,a):T,me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")X=Reflect.decorate(o,n,a,T);else for(var _e=o.length-1;_e>=0;_e--)(me=o[_e])&&(X=(R<3?me(X):R>3?me(n,a,X):me(n,a))||X);return R>3&&X&&Object.defineProperty(n,a,X),X},Rn=function(o,n){return function(a,T){n(a,T,o)}};let Sr=0;class _s{constructor(o,n,a,T,R){this.model=o,this.viewModel=n,this.view=a,this.hasRealView=T,this.listenersToRemove=R}dispose(){Object(d.f)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let Vs=class o extends d.a{constructor(n,a,T,R,X,me,_e,He,$e,ot){super();this._onDidDispose=this._register(new m.b),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new m.b),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new m.b),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new m.b),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new m.b),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new m.b),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new m.b),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new m.b),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new m.b),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new m.b),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new m.b),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new m.b),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new wr),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new wr),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new m.b),this.onWillType=this._onWillType.event,this._onDidType=this._register(new m.b),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new m.b),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new m.b),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new m.b),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new m.b),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new m.b),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new m.b),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new m.b),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new m.b),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new m.b),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new m.b),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new m.b),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new m.b),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new m.b),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new m.b),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new m.b),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new m.b),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new m.b),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new m.b),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event;const Ot=Object.assign({},a);this._domElement=n,this._overflowWidgetsDomNode=Ot.overflowWidgetsDomNode,delete Ot.overflowWidgetsDomNode,this._id=++Sr,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this.isSimpleWidget=T.isSimpleWidget||!1,this._telemetryData=T.telemetryData,this._configuration=this._register(this._createConfiguration(Ot,ot)),this._register(this._configuration.onDidChange(kt=>{this._onDidChangeConfiguration.fire(kt);const Kt=this._configuration.options;if(kt.hasChanged(129)){const eo=Kt.get(129);this._onDidLayoutChange.fire(eo)}})),this._contextKeyService=this._register(_e.createScoped(this._domElement)),this._notificationService=$e,this._codeEditorService=X,this._commandService=me,this._themeService=He,this._register(new aa(this,this._contextKeyService)),this._register(new Ds(this,this._contextKeyService)),this._instantiationService=R.createChild(new Bs.a([Fs.b,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new Tn(n),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={};let gt;Array.isArray(T.contributions)?gt=T.contributions:gt=B.d.getEditorContributions();for(const kt of gt){if(this._contributions[kt.id]){Object(v.f)(new Error(`Cannot have two contributions with the same id ${kt.id}`));continue}try{const Kt=this._instantiationService.createInstance(kt.ctor,this);this._contributions[kt.id]=Kt}catch(Kt){Object(v.f)(Kt)}}B.d.getEditorActions().forEach(kt=>{if(this._actions[kt.id]){Object(v.f)(new Error(`Cannot have two actions with the same id ${kt.id}`));return}const Kt=new Gr.a(kt.id,kt.label,kt.alias,Object($i.p)(kt.precondition),()=>this._instantiationService.invokeFunction(eo=>Promise.resolve(kt.runEditorCommand(eo,this,null))),this._contextKeyService);this._actions[Kt.id]=Kt}),this._codeEditorService.addCodeEditor(this)}_createConfiguration(n,a){return new S.a(this.isSimpleWidget,n,this._domElement,a)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Ns.a.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const n=Object.keys(this._contributions);for(let a=0,T=n.length;a<T;a++){const R=n[a];this._contributions[R].dispose()}this._contributions={},this._actions={},this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(n){return this._instantiationService.invokeFunction(n)}updateOptions(n){this._configuration.updateOptions(n)}getOptions(){return this._configuration.options}getOption(n){return this._configuration.options.get(n)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(n){return this._modelData?ra.a.getWordAtPosition(this._modelData.model,this._configuration.options.get(115),n):null}getValue(n=null){if(!this._modelData)return"";const a=!!(n&&n.preserveBOM);let T=0;return n&&n.lineEnding&&n.lineEnding===`
|
|
|
`?T=1:n&&n.lineEnding&&n.lineEnding===`\r
|
|
|
`&&(T=2),this._modelData.model.getValue(T,a)}setValue(n){if(!this._modelData)return;this._modelData.model.setValue(n)}getModel(){return this._modelData?this._modelData.model:null}setModel(n=null){const a=n;if(this._modelData===null&&a===null)return;if(this._modelData&&this._modelData.model===a)return;const T=this.hasTextFocus(),R=this._detachModel();this._attachModel(a),T&&this.hasModel()&&this.focus();const X={oldModelUrl:R?R.uri:null,newModelUrl:a?a.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(X),this._postDetachModelCleanup(R)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let n in this._decorationTypeSubtypes){const a=this._decorationTypeSubtypes[n];for(let T in a)this._removeDecorationType(n+"-"+T)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetForPosition(n,a,T){const R=n.model.validatePosition({lineNumber:a,column:T}),X=n.viewModel.coordinatesConverter.convertModelPositionToViewPosition(R);return n.viewModel.viewLayout.getVerticalOffsetForLineNumber(X.lineNumber)}getTopForLineNumber(n){return this._modelData?o._getVerticalOffsetForPosition(this._modelData,n,1):-1}getTopForPosition(n,a){return this._modelData?o._getVerticalOffsetForPosition(this._modelData,n,a):-1}setHiddenAreas(n){this._modelData&&this._modelData.viewModel.setHiddenAreas(n.map(a=>Oe.a.lift(a)))}getVisibleColumnFromPosition(n){if(!this._modelData)return n.column;const a=this._modelData.model.validatePosition(n),T=this._modelData.model.getOptions().tabSize;return nt.a.visibleColumnFromColumn(this._modelData.model.getLineContent(a.lineNumber),a.column,T)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(n){if(!this._modelData)return;if(!we.a.isIPosition(n))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:n.lineNumber,selectionStartColumn:n.column,positionLineNumber:n.lineNumber,positionColumn:n.column}])}_sendRevealRange(n,a,T,R){if(!this._modelData)return;if(!Oe.a.isIRange(n))throw new Error("Invalid arguments");const X=this._modelData.model.validateRange(n),me=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(X);this._modelData.viewModel.revealRange("api",T,me,a,R)}revealLine(n,a=0){this._revealLine(n,0,a)}revealLineInCenter(n,a=0){this._revealLine(n,1,a)}revealLineInCenterIfOutsideViewport(n,a=0){this._revealLine(n,2,a)}revealLineNearTop(n,a=0){this._revealLine(n,5,a)}_revealLine(n,a,T){if(typeof n!="number")throw new Error("Invalid arguments");this._sendRevealRange(new Oe.a(n,1,n,1),a,!1,T)}revealPosition(n,a=0){this._revealPosition(n,0,!0,a)}revealPositionInCenter(n,a=0){this._revealPosition(n,1,!0,a)}revealPositionInCenterIfOutsideViewport(n,a=0){this._revealPosition(n,2,!0,a)}revealPositionNearTop(n,a=0){this._revealPosition(n,5,!0,a)}_revealPosition(n,a,T,R){if(!we.a.isIPosition(n))throw new Error("Invalid arguments");this._sendRevealRange(new Oe.a(n.lineNumber,n.column,n.lineNumber,n.column),a,T,R)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(n){const a=b.a.isISelection(n),T=Oe.a.isIRange(n);if(!a&&!T)throw new Error("Invalid arguments");if(a)this._setSelectionImpl(n);else if(T){const R={selectionStartLineNumber:n.startLineNumber,selectionStartColumn:n.startColumn,positionLineNumber:n.endLineNumber,positionColumn:n.endColumn};this._setSelectionImpl(R)}}_setSelectionImpl(n){if(!this._modelData)return;const a=new b.a(n.selectionStartLineNumber,n.selectionStartColumn,n.positionLineNumber,n.positionColumn);this._modelData.viewModel.setSelections("api",[a])}revealLines(n,a,T=0){this._revealLines(n,a,0,T)}revealLinesInCenter(n,a,T=0){this._revealLines(n,a,1,T)}revealLinesInCenterIfOutsideViewport(n,a,T=0){this._revealLines(n,a,2,T)}revealLinesNearTop(n,a,T=0){this._revealLines(n,a,5,T)}_revealLines(n,a,T,R){if(typeof n!="number"||typeof a!="number")throw new Error("Invalid arguments");this._sendRevealRange(new Oe.a(n,1,a,1),T,!1,R)}revealRange(n,a=0,T=!1,R=!0){this._revealRange(n,T?1:0,R,a)}revealRangeInCenter(n,a=0){this._revealRange(n,1,!0,a)}revealRangeInCenterIfOutsideViewport(n,a=0){this._revealRange(n,2,!0,a)}revealRangeNearTop(n,a=0){this._revealRange(n,5,!0,a)}revealRangeNearTopIfOutsideViewport(n,a=0){this._revealRange(n,6,!0,a)}revealRangeAtTop(n,a=0){this._revealRange(n,3,!0,a)}_revealRange(n,a,T,R){if(!Oe.a.isIRange(n))throw new Error("Invalid arguments");this._sendRevealRange(Oe.a.lift(n),a,T,R)}setSelections(n,a="api",T=0){if(!this._modelData)return;if(!n||n.length===0)throw new Error("Invalid arguments");for(let R=0,X=n.length;R<X;R++)if(!b.a.isISelection(n[R]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(a,n,T)}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(n,a=1){if(!this._modelData)return;if(typeof n!="number")throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollLeft:n},a)}setScrollTop(n,a=1){if(!this._modelData)return;if(typeof n!="number")throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollTop:n},a)}setScrollPosition(n,a=1){if(!this._modelData)return;this._modelData.viewModel.setScrollPosition(n,a)}saveViewState(){if(!this._modelData)return null;const n={},a=Object.keys(this._contributions);for(const X of a){const me=this._contributions[X];typeof me.saveViewState=="function"&&(n[X]=me.saveViewState())}const T=this._modelData.viewModel.saveCursorState(),R=this._modelData.viewModel.saveState();return{cursorState:T,viewState:R,contributionsState:n}}restoreViewState(n){if(!this._modelData||!this._modelData.hasRealView)return;const a=n;if(a&&a.cursorState&&a.viewState){const T=a.cursorState;Array.isArray(T)?this._modelData.viewModel.restoreCursorState(T):this._modelData.viewModel.restoreCursorState([T]);const R=a.contributionsState||{},X=Object.keys(this._contributions);for(let _e=0,He=X.length;_e<He;_e++){const $e=X[_e],ot=this._contributions[$e];typeof ot.restoreViewState=="function"&&ot.restoreViewState(R[$e])}const me=this._modelData.viewModel.reduceRestoreState(a.viewState);this._modelData.view.restoreState(me)}}getContribution(n){return this._contributions[n]||null}getActions(){const n=[],a=Object.keys(this._actions);for(let T=0,R=a.length;T<R;T++){const X=a[T];n.push(this._actions[X])}return n}getSupportedActions(){let n=this.getActions();return n=n.filter(a=>a.isSupported()),n}getAction(n){return this._actions[n]||null}trigger(n,a,T){T=T||{};switch(a){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(n);return;case"type":{const X=T;this._type(n,X.text||"");return}case"replacePreviousChar":{const X=T;this._compositionType(n,X.text||"",X.replaceCharCnt||0,0,0);return}case"compositionType":{const X=T;this._compositionType(n,X.text||"",X.replacePrevCharCnt||0,X.replaceNextCharCnt||0,X.positionDelta||0);return}case"paste":{const X=T;this._paste(n,X.text||"",X.pasteOnNewLine||!1,X.multicursorText||null,X.mode||null);return}case"cut":this._cut(n);return}const R=this.getAction(a);if(R){Promise.resolve(R.run()).then(void 0,v.f);return}if(!this._modelData)return;if(this._triggerEditorCommand(n,a,T))return;this._triggerCommand(a,T)}_triggerCommand(n,a){this._commandService.executeCommand(n,a)}_startComposition(){if(!this._modelData)return;this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire()}_endComposition(n){if(!this._modelData)return;this._modelData.viewModel.endComposition(n),this._onDidCompositionEnd.fire()}_type(n,a){if(!this._modelData||a.length===0)return;n==="keyboard"&&this._onWillType.fire(a),this._modelData.viewModel.type(a,n),n==="keyboard"&&this._onDidType.fire(a)}_compositionType(n,a,T,R,X){if(!this._modelData)return;this._modelData.viewModel.compositionType(a,T,R,X,n)}_paste(n,a,T,R,X){if(!this._modelData||a.length===0)return;const me=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(a,T,R,n);const _e=this._modelData.viewModel.getSelection().getStartPosition();n==="keyboard"&&this._onDidPaste.fire({range:new Oe.a(me.lineNumber,me.column,_e.lineNumber,_e.column),languageId:X})}_cut(n){if(!this._modelData)return;this._modelData.viewModel.cut(n)}_triggerEditorCommand(n,a,T){const R=B.d.getEditorCommand(a);return R?(T=T||{},T.source=n,this._instantiationService.invokeFunction(X=>{Promise.resolve(R.runEditorCommand(X,this,T)).then(void 0,v.f)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return this._modelData?this._configuration.options.get(80)?!1:(this._modelData.model.pushStackElement(),!0):!1}popUndoStop(){return this._modelData?this._configuration.options.get(80)?!1:(this._modelData.model.popStackElement(),!0):!1}executeEdits(n,a,T){if(!this._modelData)return!1;if(this._configuration.options.get(80))return!1;let R;return T?Array.isArray(T)?R=()=>T:R=T:R=()=>null,this._modelData.viewModel.executeEdits(n,a,R),!0}executeCommand(n,a){if(!this._modelData)return;this._modelData.viewModel.executeCommand(a,n)}executeCommands(n,a){if(!this._modelData)return;this._modelData.viewModel.executeCommands(a,n)}changeDecorations(n){return this._modelData?this._modelData.model.changeDecorations(n,this._id):null}getLineDecorations(n){return this._modelData?this._modelData.model.getLineDecorations(n,this._id,Object(ze.n)(this._configuration.options)):null}deltaDecorations(n,a){return this._modelData?n.length===0&&a.length===0?n:this._modelData.model.deltaDecorations(n,a,this._id):[]}removeDecorations(n){const a=this._decorationTypeKeysToIds[n];a&&this.deltaDecorations(a,[]),this._decorationTypeKeysToIds.hasOwnProperty(n)&&delete this._decorationTypeKeysToIds[n],this._decorationTypeSubtypes.hasOwnProperty(n)&&delete this._decorationTypeSubtypes[n]}getLayoutInfo(){const n=this._configuration.options,a=n.get(129);return a}createOverviewRuler(n){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(n)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarMouseDown(n){if(!this._modelData||!this._modelData.hasRealView)return;this._modelData.view.delegateVerticalScrollbarMouseDown(n)}layout(n){this._configuration.observeReferenceElement(n),this.render()}focus(){if(!this._modelData||!this._modelData.hasRealView)return;this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(n){const a={widget:n,position:n.getPosition()};this._contentWidgets.hasOwnProperty(n.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[n.getId()]=a,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(a)}layoutContentWidget(n){const a=n.getId();if(this._contentWidgets.hasOwnProperty(a)){const T=this._contentWidgets[a];T.position=n.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(T)}}removeContentWidget(n){const a=n.getId();if(this._contentWidgets.hasOwnProperty(a)){const T=this._contentWidgets[a];delete this._contentWidgets[a],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(T)}}addOverlayWidget(n){const a={widget:n,position:n.getPosition()};this._overlayWidgets.hasOwnProperty(n.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[n.getId()]=a,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(a)}layoutOverlayWidget(n){const a=n.getId();if(this._overlayWidgets.hasOwnProperty(a)){const T=this._overlayWidgets[a];T.position=n.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(T)}}removeOverlayWidget(n){const a=n.getId();if(this._overlayWidgets.hasOwnProperty(a)){const T=this._overlayWidgets[a];delete this._overlayWidgets[a],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(T)}}changeViewZones(n){if(!this._modelData||!this._modelData.hasRealView)return;this._modelData.view.change(n)}getTargetAtClientPoint(n,a){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(n,a)}getScrolledVisiblePosition(n){if(!this._modelData||!this._modelData.hasRealView)return null;const a=this._modelData.model.validatePosition(n),T=this._configuration.options,R=T.get(129),X=o._getVerticalOffsetForPosition(this._modelData,a.lineNumber,a.column)-this.getScrollTop(),me=this._modelData.view.getOffsetForColumn(a.lineNumber,a.column)+R.glyphMarginWidth+R.lineNumbersWidth+R.decorationsWidth-this.getScrollLeft();return{top:X,left:me,height:T.get(58)}}getOffsetForColumn(n,a){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(n,a)}render(n=!1){if(!this._modelData||!this._modelData.hasRealView)return;this._modelData.view.render(!0,n)}setAriaOptions(n){if(!this._modelData||!this._modelData.hasRealView)return;this._modelData.view.setAriaOptions(n)}applyFontInfo(n){S.a.applyFontInfoSlow(n,this._configuration.options.get(43))}_attachModel(n){if(!n){this._modelData=null;return}const a=[];this._domElement.setAttribute("data-mode-id",n.getLanguageId()),this._configuration.setIsDominatedByLongLines(n.isDominatedByLongLines()),this._configuration.setMaxLineNumber(n.getLineCount()),n.onBeforeAttached();const T=new vn(this._id,this._configuration,n,Gn.create(),rr.create(this._configuration.options),me=>L.V(me));a.push(n.onDidChangeDecorations(me=>this._onDidChangeModelDecorations.fire(me))),a.push(n.onDidChangeLanguage(me=>{this._domElement.setAttribute("data-mode-id",n.getLanguageId()),this._onDidChangeModelLanguage.fire(me)})),a.push(n.onDidChangeLanguageConfiguration(me=>this._onDidChangeModelLanguageConfiguration.fire(me))),a.push(n.onDidChangeContent(me=>this._onDidChangeModelContent.fire(me))),a.push(n.onDidChangeOptions(me=>this._onDidChangeModelOptions.fire(me))),a.push(n.onWillDispose(()=>this.setModel(null))),a.push(T.onEvent(me=>{switch(me.kind){case 0:this._onDidContentSizeChange.fire(me);break;case 1:this._editorTextFocus.setValue(me.hasFocus);break;case 2:this._onDidScrollChange.fire(me);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{me.reachedMaxCursorCount&&this._notificationService.warn(I.a("cursors.maximum","The number of cursors has been limited to {0}.",Rs.MAX_CURSOR_COUNT));const _e=[];for(let ot=0,Ot=me.selections.length;ot<Ot;ot++)_e[ot]=me.selections[ot].getPosition();const He={position:_e[0],secondaryPositions:_e.slice(1),reason:me.reason,source:me.source};this._onDidChangeCursorPosition.fire(He);const $e={selection:me.selections[0],secondarySelections:me.selections.slice(1),modelVersionId:me.modelVersionId,oldSelections:me.oldSelections,oldModelVersionId:me.oldModelVersionId,source:me.source,reason:me.reason};this._onDidChangeCursorSelection.fire($e);break}}}));const[R,X]=this._createView(T);if(X){this._domElement.appendChild(R.domNode.domNode);let me=Object.keys(this._contentWidgets);for(let _e=0,He=me.length;_e<He;_e++){const $e=me[_e];R.addContentWidget(this._contentWidgets[$e])}me=Object.keys(this._overlayWidgets);for(let _e=0,He=me.length;_e<He;_e++){const $e=me[_e];R.addOverlayWidget(this._overlayWidgets[$e])}R.render(!1,!0),R.domNode.domNode.setAttribute("data-uri",n.uri.toString())}this._modelData=new _s(n,T,R,X,a)}_createView(n){let a;this.isSimpleWidget?a={paste:(X,me,_e,He)=>{this._paste("keyboard",X,me,_e,He)},type:X=>{this._type("keyboard",X)},compositionType:(X,me,_e,He)=>{this._compositionType("keyboard",X,me,_e,He)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:a={paste:(X,me,_e,He)=>{const $e={text:X,pasteOnNewLine:me,multicursorText:_e,mode:He};this._commandService.executeCommand("paste",$e)},type:X=>{const me={text:X};this._commandService.executeCommand("type",me)},compositionType:(X,me,_e,He)=>{if(_e||He){const $e={text:X,replacePrevCharCnt:me,replaceNextCharCnt:_e,positionDelta:He};this._commandService.executeCommand("compositionType",$e)}else{const $e={text:X,replaceCharCnt:me};this._commandService.executeCommand("replacePreviousChar",$e)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const T=new Qt(n.coordinatesConverter);T.onKeyDown=X=>this._onKeyDown.fire(X),T.onKeyUp=X=>this._onKeyUp.fire(X),T.onContextMenu=X=>this._onContextMenu.fire(X),T.onMouseMove=X=>this._onMouseMove.fire(X),T.onMouseLeave=X=>this._onMouseLeave.fire(X),T.onMouseDown=X=>this._onMouseDown.fire(X),T.onMouseUp=X=>this._onMouseUp.fire(X),T.onMouseDrag=X=>this._onMouseDrag.fire(X),T.onMouseDrop=X=>this._onMouseDrop.fire(X),T.onMouseDropCanceled=X=>this._onMouseDropCanceled.fire(X),T.onMouseWheel=X=>this._onMouseWheel.fire(X);const R=new Ct(a,this._configuration,this._themeService,n,T,this._overflowWidgetsDomNode);return[R,!0]}_postDetachModelCleanup(n){n&&n.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const n=this._modelData.model,a=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),a&&this._domElement.contains(a)&&this._domElement.removeChild(a),n}_removeDecorationType(n){this._codeEditorService.removeDecorationType(n)}hasModel(){return this._modelData!==null}};Vs=ds([Rn(3,qr.a),Rn(4,r.a),Rn(5,zn.b),Rn(6,Fs.b),Rn(7,so.b),Rn(8,Ws.a),Rn(9,ea.b)],Vs);class wr extends d.a{constructor(){super();this._onDidChangeToTrue=this._register(new m.b),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new m.b),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(o){const n=o?2:1;if(this._value===n)return;this._value=n,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire()}}class aa extends d.a{constructor(o,n){super();this._editor=o,n.createKey("editorId",o.getId()),this._editorSimpleInput=Gi.a.editorSimpleInput.bindTo(n),this._editorFocus=Gi.a.focus.bindTo(n),this._textInputFocus=Gi.a.textInputFocus.bindTo(n),this._editorTextFocus=Gi.a.editorTextFocus.bindTo(n),this._editorTabMovesFocus=Gi.a.tabMovesFocus.bindTo(n),this._editorReadonly=Gi.a.readOnly.bindTo(n),this._inDiffEditor=Gi.a.inDiffEditor.bindTo(n),this._editorColumnSelection=Gi.a.columnSelection.bindTo(n),this._hasMultipleSelections=Gi.a.hasMultipleSelections.bindTo(n),this._hasNonEmptySelection=Gi.a.hasNonEmptySelection.bindTo(n),this._canUndo=Gi.a.canUndo.bindTo(n),this._canRedo=Gi.a.canRedo.bindTo(n),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 o=this._editor.getOptions();this._editorTabMovesFocus.set(o.get(128)),this._editorReadonly.set(o.get(80)),this._inDiffEditor.set(o.get(53)),this._editorColumnSelection.set(o.get(18))}_updateFromSelection(){const o=this._editor.getSelections();o?(this._hasMultipleSelections.set(o.length>1),this._hasNonEmptySelection.set(o.some(n=>!n.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 o=this._editor.getModel();this._canUndo.set(Boolean(o&&o.canUndo())),this._canRedo.set(Boolean(o&&o.canRedo()))}}class Ds extends d.a{constructor(o,n){super();this._editor=o,this._contextKeyService=n,this._langId=Gi.a.languageId.bindTo(n),this._hasCompletionItemProvider=Gi.a.hasCompletionItemProvider.bindTo(n),this._hasCodeActionsProvider=Gi.a.hasCodeActionsProvider.bindTo(n),this._hasCodeLensProvider=Gi.a.hasCodeLensProvider.bindTo(n),this._hasDefinitionProvider=Gi.a.hasDefinitionProvider.bindTo(n),this._hasDeclarationProvider=Gi.a.hasDeclarationProvider.bindTo(n),this._hasImplementationProvider=Gi.a.hasImplementationProvider.bindTo(n),this._hasTypeDefinitionProvider=Gi.a.hasTypeDefinitionProvider.bindTo(n),this._hasHoverProvider=Gi.a.hasHoverProvider.bindTo(n),this._hasDocumentHighlightProvider=Gi.a.hasDocumentHighlightProvider.bindTo(n),this._hasDocumentSymbolProvider=Gi.a.hasDocumentSymbolProvider.bindTo(n),this._hasReferenceProvider=Gi.a.hasReferenceProvider.bindTo(n),this._hasRenameProvider=Gi.a.hasRenameProvider.bindTo(n),this._hasSignatureHelpProvider=Gi.a.hasSignatureHelpProvider.bindTo(n),this._hasInlayHintsProvider=Gi.a.hasInlayHintsProvider.bindTo(n),this._hasDocumentFormattingProvider=Gi.a.hasDocumentFormattingProvider.bindTo(n),this._hasDocumentSelectionFormattingProvider=Gi.a.hasDocumentSelectionFormattingProvider.bindTo(n),this._hasMultipleDocumentFormattingProvider=Gi.a.hasMultipleDocumentFormattingProvider.bindTo(n),this._hasMultipleDocumentSelectionFormattingProvider=Gi.a.hasMultipleDocumentSelectionFormattingProvider.bindTo(n),this._isInWalkThrough=Gi.a.isInWalkThroughSnippet.bindTo(n);const a=()=>this._update();this._register(o.onDidChangeModel(a)),this._register(o.onDidChangeModelLanguage(a)),this._register(zt.d.onDidChange(a)),this._register(zt.a.onDidChange(a)),this._register(zt.b.onDidChange(a)),this._register(zt.f.onDidChange(a)),this._register(zt.e.onDidChange(a)),this._register(zt.q.onDidChange(a)),this._register(zt.F.onDidChange(a)),this._register(zt.p.onDidChange(a)),this._register(zt.i.onDidChange(a)),this._register(zt.m.onDidChange(a)),this._register(zt.x.onDidChange(a)),this._register(zt.y.onDidChange(a)),this._register(zt.g.onDidChange(a)),this._register(zt.j.onDidChange(a)),this._register(zt.A.onDidChange(a)),this._register(zt.r.onDidChange(a)),a()}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 o=this._editor.getModel();if(!o){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(o.getLanguageId()),this._hasCompletionItemProvider.set(zt.d.has(o)),this._hasCodeActionsProvider.set(zt.a.has(o)),this._hasCodeLensProvider.set(zt.b.has(o)),this._hasDefinitionProvider.set(zt.f.has(o)),this._hasDeclarationProvider.set(zt.e.has(o)),this._hasImplementationProvider.set(zt.q.has(o)),this._hasTypeDefinitionProvider.set(zt.F.has(o)),this._hasHoverProvider.set(zt.p.has(o)),this._hasDocumentHighlightProvider.set(zt.i.has(o)),this._hasDocumentSymbolProvider.set(zt.m.has(o)),this._hasReferenceProvider.set(zt.x.has(o)),this._hasRenameProvider.set(zt.y.has(o)),this._hasSignatureHelpProvider.set(zt.A.has(o)),this._hasInlayHintsProvider.set(zt.r.has(o)),this._hasDocumentFormattingProvider.set(zt.g.has(o)||zt.j.has(o)),this._hasDocumentSelectionFormattingProvider.set(zt.j.has(o)),this._hasMultipleDocumentFormattingProvider.set(zt.g.all(o).length+zt.j.all(o).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(zt.j.all(o).length>1),this._isInWalkThrough.set(o.uri.scheme===D.c.walkThroughSnippet)})}}class Tn extends d.a{constructor(o){super();this._onChange=this._register(new m.b),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(L.Y(o)),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 ts=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),os=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function cr(o){return ts+encodeURIComponent(o.toString())+os}const la=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),da=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function ca(o){return la+encodeURIComponent(o.toString())+da}Object(so.f)((o,n)=>{const a=o.getColor(ui.t);a&&n.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${a}; }`);const T=o.getColor(ui.u);T&&n.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${cr(T)}") repeat-x bottom left; }`);const R=o.getColor(ui.s);R&&n.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${R}; }`);const X=o.getColor(ui.U);X&&n.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${X}; }`);const me=o.getColor(ui.V);me&&n.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${cr(me)}") repeat-x bottom left; }`);const _e=o.getColor(ui.T);_e&&n.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${_e}; }`);const He=o.getColor(ui.L);He&&n.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${He}; }`);const $e=o.getColor(ui.M);$e&&n.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${cr($e)}") repeat-x bottom left; }`);const ot=o.getColor(ui.K);ot&&n.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${ot}; }`);const Ot=o.getColor(ui.C);Ot&&n.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${Ot}; }`);const gt=o.getColor(ui.D);gt&&n.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${ca(gt)}") no-repeat bottom left; }`);const kt=o.getColor(Vt.I);kt&&n.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${kt.rgba.a}; }`);const Kt=o.getColor(Vt.H);Kt&&n.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${Kt}; }`);const eo=o.getColor(ui.B)||"inherit";n.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${eo}}`)})},nD70:function(mt,M,t){"use strict";t.d(M,"a",function(){return f}),t.d(M,"b",function(){return B});class f{constructor(x){this._prefix=x,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const B=new f("id#")},nlbu:function(mt,M,t){"use strict";t.d(M,"b",function(){return f}),t.d(M,"d",function(){return B}),t.d(M,"c",function(){return x}),t.d(M,"a",function(){return A});class f{constructor(F){this.value=F}equals(F){return this.value===F.value}contains(F){return this.equals(F)||this.value===""||F.value.startsWith(this.value+f.sep)}intersects(F){return this.contains(F)||F.contains(this)}append(F){return new f(this.value+f.sep+F)}}f.sep=".",f.None=new f("@@none@@"),f.Empty=new f(""),f.QuickFix=new f("quickfix"),f.Refactor=new f("refactor"),f.Source=new f("source"),f.SourceOrganizeImports=f.Source.append("organizeImports"),f.SourceFixAll=f.Source.append("fixAll");function B(F,I){return F.include&&!F.include.intersects(I)||F.excludes&&F.excludes.some(L=>N(I,L,F.include))?!1:!(!F.includeSourceActions&&f.Source.contains(I))}function x(F,I){const L=I.kind?new f(I.kind):void 0;return F.include&&(!L||!F.include.contains(L))||(F.excludes&&(L&&F.excludes.some(v=>N(L,v,F.include)))||!F.includeSourceActions&&(L&&f.Source.contains(L)))?!1:!(F.onlyIncludePreferredActions&&!I.isPreferred)}function N(F,I,L){return I.contains(F)?!(L&&I.contains(L)):!1}class A{constructor(F,I,L){this.kind=F,this.apply=I,this.preferred=L}static fromUser(F,I){return!F||typeof F!="object"?new A(I.kind,I.apply,!1):new A(A.getKindFromUser(F,I.kind),A.getApplyFromUser(F,I.apply),A.getPreferredUser(F))}static getApplyFromUser(F,I){switch(typeof F.apply=="string"?F.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return I}}static getKindFromUser(F,I){return typeof F.kind=="string"?new f(F.kind):I}static getPreferredUser(F){return typeof F.preferred=="boolean"?F.preferred:!1}}},nrBJ:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:function(){return t.e(372).then(t.bind(null,"eXtt"))}})},nrhi:function(mt,M,t){"use strict";t.d(M,"a",function(){return F});var f=t("Szf2"),B=t("MNsG"),x=t("nnTU"),N=t("ic2d");class A{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(v){if(B.a===1){if(v&&v.win)return v.win}else if(B.a===2){if(v&&v.mac)return v.mac}else if(v&&v.linux)return v.linux;return v}registerKeybindingRule(v){const m=A.bindToCurrentPlatform(v);if(m&&m.primary){const d=Object(f.e)(m.primary,B.a);d&&this._registerDefaultKeybinding(d,v.id,v.args,v.weight,0,v.when)}if(m&&Array.isArray(m.secondary))for(let d=0,D=m.secondary.length;d<D;d++){const S=m.secondary[d],r=Object(f.e)(S,B.a);r&&this._registerDefaultKeybinding(r,v.id,v.args,v.weight,-d-1,v.when)}}registerCommandAndKeybindingRule(v){this.registerKeybindingRule(v),x.a.registerCommand(v)}static _mightProduceChar(v){return v>=21&&v<=30||v>=31&&v<=56?!0:v===80||v===81||v===82||v===83||v===84||v===85||v===86||v===110||v===111||v===87||v===88||v===89||v===90||v===91||v===92}_assertNoCtrlAlt(v,m){v.ctrlKey&&v.altKey&&!v.metaKey&&(A._mightProduceChar(v.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",v," for ",m))}_registerDefaultKeybinding(v,m,d,D,S,r){B.a===1&&this._assertNoCtrlAlt(v.parts[0],m),this._coreKeybindings.push({keybinding:v.parts,command:m,commandArgs:d,when:r,weight1:D,weight2:S,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(L)),this._cachedMergedKeybindings.slice(0)}}const F=new A,I={EditorModes:"platform.keybindingsRegistry"};N.a.add(I.EditorModes,F);function L(v,m){return v.weight1!==m.weight1?v.weight1-m.weight1:v.command<m.command?-1:v.command>m.command?1:v.weight2-m.weight2}},nuFA:function(mt,M,t){"use strict";t.d(M,"a",function(){return f});var f;(function(B){function x(I,L){if(I.start>=L.end||L.start>=I.end)return{start:0,end:0};const v=Math.max(I.start,L.start),m=Math.min(I.end,L.end);return m-v<=0?{start:0,end:0}:{start:v,end:m}}B.intersect=x;function N(I){return I.end-I.start<=0}B.isEmpty=N;function A(I,L){return!N(x(I,L))}B.intersects=A;function F(I,L){const v=[],m={start:I.start,end:Math.min(L.start,I.end)},d={start:Math.max(L.end,I.start),end:I.end};return N(m)||v.push(m),N(d)||v.push(d),v}B.relativeComplement=F})(f||(f={}))},o39E:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("pmY6");class B extends f.a{constructor(x,N,A){super();this.referenceDomElement=x,this.changeCallback=A,this.width=-1,this.height=-1,this.resizeObserver=null,this.measureReferenceDomElementToken=-1,this.measureReferenceDomElement(!1,N)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this.width}getHeight(){return this.height}startObserving(){typeof ResizeObserver!="undefined"?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver(x=>{x&&x[0]&&x[0].contentRect?this.observe({width:x[0].contentRect.width,height:x[0].contentRect.height}):this.observe()}),this.resizeObserver.observe(this.referenceDomElement)):this.measureReferenceDomElementToken===-1&&(this.measureReferenceDomElementToken=setInterval(()=>this.observe(),100))}stopObserving(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.measureReferenceDomElementToken!==-1&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}observe(x){this.measureReferenceDomElement(!0,x)}measureReferenceDomElement(x,N){let A=0,F=0;N?(A=N.width,F=N.height):this.referenceDomElement&&(A=this.referenceDomElement.clientWidth,F=this.referenceDomElement.clientHeight),A=Math.max(5,A),F=Math.max(5,F),(this.width!==A||this.height!==F)&&(this.width=A,this.height=F,x&&this.changeCallback())}}},oAeH:function(mt,M,t){"use strict";t.d(M,"b",function(){return I}),t.d(M,"a",function(){return L});var f=t("746U"),B=t("Ll0s"),x=t("+Fos"),N=t("1I1M"),A=t("cGHE"),F=t("aokT");class I{static addCursorDown(v,m,d){let D=[],S=0;for(let r=0,_=m.length;r<_;r++){const b=m[r];D[S++]=new B.d(b.modelState,b.viewState),d?D[S++]=B.d.fromModelState(x.a.translateDown(v.cursorConfig,v.model,b.modelState)):D[S++]=B.d.fromViewState(x.a.translateDown(v.cursorConfig,v,b.viewState))}return D}static addCursorUp(v,m,d){let D=[],S=0;for(let r=0,_=m.length;r<_;r++){const b=m[r];D[S++]=new B.d(b.modelState,b.viewState),d?D[S++]=B.d.fromModelState(x.a.translateUp(v.cursorConfig,v.model,b.modelState)):D[S++]=B.d.fromViewState(x.a.translateUp(v.cursorConfig,v,b.viewState))}return D}static moveToBeginningOfLine(v,m,d){let D=[];for(let S=0,r=m.length;S<r;S++){const _=m[S];D[S]=this._moveToLineStart(v,_,d)}return D}static _moveToLineStart(v,m,d){const D=m.viewState.position.column,S=m.modelState.position.column,r=D===S,_=m.viewState.position.lineNumber,b=v.getLineFirstNonWhitespaceColumn(_),h=D===b;return!r&&!h?this._moveToLineStartByView(v,m,d):this._moveToLineStartByModel(v,m,d)}static _moveToLineStartByView(v,m,d){return B.d.fromViewState(x.a.moveToBeginningOfLine(v.cursorConfig,v,m.viewState,d))}static _moveToLineStartByModel(v,m,d){return B.d.fromModelState(x.a.moveToBeginningOfLine(v.cursorConfig,v.model,m.modelState,d))}static moveToEndOfLine(v,m,d,D){let S=[];for(let r=0,_=m.length;r<_;r++){const b=m[r];S[r]=this._moveToLineEnd(v,b,d,D)}return S}static _moveToLineEnd(v,m,d,D){const S=m.viewState.position,r=v.getLineMaxColumn(S.lineNumber),_=S.column===r,b=m.modelState.position,h=v.model.getLineMaxColumn(b.lineNumber),c=r-S.column===h-b.column;return _||c?this._moveToLineEndByModel(v,m,d,D):this._moveToLineEndByView(v,m,d,D)}static _moveToLineEndByView(v,m,d,D){return B.d.fromViewState(x.a.moveToEndOfLine(v.cursorConfig,v,m.viewState,d,D))}static _moveToLineEndByModel(v,m,d,D){return B.d.fromModelState(x.a.moveToEndOfLine(v.cursorConfig,v.model,m.modelState,d,D))}static expandLineSelection(v,m){let d=[];for(let D=0,S=m.length;D<S;D++){const r=m[D],_=r.modelState.selection.startLineNumber,b=v.model.getLineCount();let h=r.modelState.selection.endLineNumber,c;h===b?c=v.model.getLineMaxColumn(b):(h++,c=1),d[D]=B.d.fromModelState(new B.f(new F.a(_,1,_,1),0,new A.a(h,c),0))}return d}static moveToBeginningOfBuffer(v,m,d){let D=[];for(let S=0,r=m.length;S<r;S++){const _=m[S];D[S]=B.d.fromModelState(x.a.moveToBeginningOfBuffer(v.cursorConfig,v.model,_.modelState,d))}return D}static moveToEndOfBuffer(v,m,d){let D=[];for(let S=0,r=m.length;S<r;S++){const _=m[S];D[S]=B.d.fromModelState(x.a.moveToEndOfBuffer(v.cursorConfig,v.model,_.modelState,d))}return D}static selectAll(v,m){const d=v.model.getLineCount(),D=v.model.getLineMaxColumn(d);return B.d.fromModelState(new B.f(new F.a(1,1,1,1),0,new A.a(d,D),0))}static line(v,m,d,D,S){const r=v.model.validatePosition(D),_=S?v.coordinatesConverter.validateViewPosition(new A.a(S.lineNumber,S.column),r):v.coordinatesConverter.convertModelPositionToViewPosition(r);if(!d||!m.modelState.hasSelection()){const h=v.model.getLineCount();let c=r.lineNumber+1,p=1;return c>h&&(c=h,p=v.model.getLineMaxColumn(c)),B.d.fromModelState(new B.f(new F.a(r.lineNumber,1,c,p),0,new A.a(c,p),0))}const b=m.modelState.selectionStart.getStartPosition().lineNumber;if(r.lineNumber<b)return B.d.fromViewState(m.viewState.move(m.modelState.hasSelection(),_.lineNumber,1,0));if(r.lineNumber>b){const h=v.getLineCount();let c=_.lineNumber+1,p=1;return c>h&&(c=h,p=v.getLineMaxColumn(c)),B.d.fromViewState(m.viewState.move(m.modelState.hasSelection(),c,p,0))}else{const h=m.modelState.selectionStart.getEndPosition();return B.d.fromModelState(m.modelState.move(m.modelState.hasSelection(),h.lineNumber,h.column,0))}}static word(v,m,d,D){const S=v.model.validatePosition(D);return B.d.fromModelState(N.a.word(v.cursorConfig,v.model,m.modelState,d,S))}static cancelSelection(v,m){if(!m.modelState.hasSelection())return new B.d(m.modelState,m.viewState);const d=m.viewState.position.lineNumber,D=m.viewState.position.column;return B.d.fromViewState(new B.f(new F.a(d,D,d,D),0,new A.a(d,D),0))}static moveTo(v,m,d,D,S){const r=v.model.validatePosition(D),_=S?v.coordinatesConverter.validateViewPosition(new A.a(S.lineNumber,S.column),r):v.coordinatesConverter.convertModelPositionToViewPosition(r);return B.d.fromViewState(m.viewState.move(d,_.lineNumber,_.column,0))}static simpleMove(v,m,d,D,S,r){switch(d){case 0:return r===4?this._moveHalfLineLeft(v,m,D):this._moveLeft(v,m,D,S);case 1:return r===4?this._moveHalfLineRight(v,m,D):this._moveRight(v,m,D,S);case 2:return r===2?this._moveUpByViewLines(v,m,D,S):this._moveUpByModelLines(v,m,D,S);case 3:return r===2?this._moveDownByViewLines(v,m,D,S):this._moveDownByModelLines(v,m,D,S);case 4:return r===2?m.map(_=>B.d.fromViewState(x.a.moveToPrevBlankLine(v.cursorConfig,v,_.viewState,D))):m.map(_=>B.d.fromModelState(x.a.moveToPrevBlankLine(v.cursorConfig,v.model,_.modelState,D)));case 5:return r===2?m.map(_=>B.d.fromViewState(x.a.moveToNextBlankLine(v.cursorConfig,v,_.viewState,D))):m.map(_=>B.d.fromModelState(x.a.moveToNextBlankLine(v.cursorConfig,v.model,_.modelState,D)));case 6:return this._moveToViewMinColumn(v,m,D);case 7:return this._moveToViewFirstNonWhitespaceColumn(v,m,D);case 8:return this._moveToViewCenterColumn(v,m,D);case 9:return this._moveToViewMaxColumn(v,m,D);case 10:return this._moveToViewLastNonWhitespaceColumn(v,m,D);default:return null}}static viewportMove(v,m,d,D,S){const r=v.getCompletelyVisibleViewRange(),_=v.coordinatesConverter.convertViewRangeToModelRange(r);switch(d){case 11:{const b=this._firstLineNumberInRange(v.model,_,S),h=v.model.getLineFirstNonWhitespaceColumn(b);return[this._moveToModelPosition(v,m[0],D,b,h)]}case 13:{const b=this._lastLineNumberInRange(v.model,_,S),h=v.model.getLineFirstNonWhitespaceColumn(b);return[this._moveToModelPosition(v,m[0],D,b,h)]}case 12:{const b=Math.round((_.startLineNumber+_.endLineNumber)/2),h=v.model.getLineFirstNonWhitespaceColumn(b);return[this._moveToModelPosition(v,m[0],D,b,h)]}case 14:{let b=[];for(let h=0,c=m.length;h<c;h++){const p=m[h];b[h]=this.findPositionInViewportIfOutside(v,p,r,D)}return b}default:return null}}static findPositionInViewportIfOutside(v,m,d,D){let S=m.viewState.position.lineNumber;if(d.startLineNumber<=S&&S<=d.endLineNumber-1)return new B.d(m.modelState,m.viewState);{let r;S>d.endLineNumber-1?r=d.endLineNumber-1:S<d.startLineNumber?r=d.startLineNumber:r=S;const _=x.a.vertical(v.cursorConfig,v,S,m.viewState.position.column,m.viewState.leftoverVisibleColumns,r,!1);return B.d.fromViewState(m.viewState.move(D,_.lineNumber,_.column,_.leftoverVisibleColumns))}}static _firstLineNumberInRange(v,m,d){let D=m.startLineNumber;return m.startColumn!==v.getLineMinColumn(D)&&D++,Math.min(m.endLineNumber,D+d-1)}static _lastLineNumberInRange(v,m,d){let D=m.startLineNumber;return m.startColumn!==v.getLineMinColumn(D)&&D++,Math.max(D,m.endLineNumber-d+1)}static _moveLeft(v,m,d,D){return m.map(S=>B.d.fromViewState(x.a.moveLeft(v.cursorConfig,v,S.viewState,d,D)))}static _moveHalfLineLeft(v,m,d){let D=[];for(let S=0,r=m.length;S<r;S++){const _=m[S],b=_.viewState.position.lineNumber,h=Math.round(v.getLineContent(b).length/2);D[S]=B.d.fromViewState(x.a.moveLeft(v.cursorConfig,v,_.viewState,d,h))}return D}static _moveRight(v,m,d,D){return m.map(S=>B.d.fromViewState(x.a.moveRight(v.cursorConfig,v,S.viewState,d,D)))}static _moveHalfLineRight(v,m,d){let D=[];for(let S=0,r=m.length;S<r;S++){const _=m[S],b=_.viewState.position.lineNumber,h=Math.round(v.getLineContent(b).length/2);D[S]=B.d.fromViewState(x.a.moveRight(v.cursorConfig,v,_.viewState,d,h))}return D}static _moveDownByViewLines(v,m,d,D){let S=[];for(let r=0,_=m.length;r<_;r++){const b=m[r];S[r]=B.d.fromViewState(x.a.moveDown(v.cursorConfig,v,b.viewState,d,D))}return S}static _moveDownByModelLines(v,m,d,D){let S=[];for(let r=0,_=m.length;r<_;r++){const b=m[r];S[r]=B.d.fromModelState(x.a.moveDown(v.cursorConfig,v.model,b.modelState,d,D))}return S}static _moveUpByViewLines(v,m,d,D){let S=[];for(let r=0,_=m.length;r<_;r++){const b=m[r];S[r]=B.d.fromViewState(x.a.moveUp(v.cursorConfig,v,b.viewState,d,D))}return S}static _moveUpByModelLines(v,m,d,D){let S=[];for(let r=0,_=m.length;r<_;r++){const b=m[r];S[r]=B.d.fromModelState(x.a.moveUp(v.cursorConfig,v.model,b.modelState,d,D))}return S}static _moveToViewPosition(v,m,d,D,S){return B.d.fromViewState(m.viewState.move(d,D,S,0))}static _moveToModelPosition(v,m,d,D,S){return B.d.fromModelState(m.modelState.move(d,D,S,0))}static _moveToViewMinColumn(v,m,d){let D=[];for(let S=0,r=m.length;S<r;S++){const _=m[S],b=_.viewState.position.lineNumber,h=v.getLineMinColumn(b);D[S]=this._moveToViewPosition(v,_,d,b,h)}return D}static _moveToViewFirstNonWhitespaceColumn(v,m,d){let D=[];for(let S=0,r=m.length;S<r;S++){const _=m[S],b=_.viewState.position.lineNumber,h=v.getLineFirstNonWhitespaceColumn(b);D[S]=this._moveToViewPosition(v,_,d,b,h)}return D}static _moveToViewCenterColumn(v,m,d){let D=[];for(let S=0,r=m.length;S<r;S++){const _=m[S],b=_.viewState.position.lineNumber,h=Math.round((v.getLineMaxColumn(b)+v.getLineMinColumn(b))/2);D[S]=this._moveToViewPosition(v,_,d,b,h)}return D}static _moveToViewMaxColumn(v,m,d){let D=[];for(let S=0,r=m.length;S<r;S++){const _=m[S],b=_.viewState.position.lineNumber,h=v.getLineMaxColumn(b);D[S]=this._moveToViewPosition(v,_,d,b,h)}return D}static _moveToViewLastNonWhitespaceColumn(v,m,d){let D=[];for(let S=0,r=m.length;S<r;S++){const _=m[S],b=_.viewState.position.lineNumber,h=v.getLineLastNonWhitespaceColumn(b);D[S]=this._moveToViewPosition(v,_,d,b,h)}return D}}var L;(function(v){const m=function(D){if(!f.k(D))return!1;let S=D;return f.l(S.to)?!f.m(S.select)&&!f.g(S.select)||!f.m(S.by)&&!f.l(S.by)?!1:!(!f.m(S.value)&&!f.j(S.value)):!1};v.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:`Property-value pairs that can be passed through this argument:
|
|
|
* 'to': A mandatory logical position value providing where to move the cursor.
|
|
|
\`\`\`
|
|
|
'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',
|
|
|
'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'
|
|
|
'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'
|
|
|
'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'
|
|
|
\`\`\`
|
|
|
* 'by': Unit to move. Default is computed based on 'to' value.
|
|
|
\`\`\`
|
|
|
'line', 'wrappedLine', 'character', 'halfLine'
|
|
|
\`\`\`
|
|
|
* 'value': Number of units to move. Default is '1'.
|
|
|
* 'select': If 'true' makes the selection. Default is 'false'.
|
|
|
`,constraint:m,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},v.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},v.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function d(D){if(!D.to)return null;let S;switch(D.to){case v.RawDirection.Left:S=0;break;case v.RawDirection.Right:S=1;break;case v.RawDirection.Up:S=2;break;case v.RawDirection.Down:S=3;break;case v.RawDirection.PrevBlankLine:S=4;break;case v.RawDirection.NextBlankLine:S=5;break;case v.RawDirection.WrappedLineStart:S=6;break;case v.RawDirection.WrappedLineFirstNonWhitespaceCharacter:S=7;break;case v.RawDirection.WrappedLineColumnCenter:S=8;break;case v.RawDirection.WrappedLineEnd:S=9;break;case v.RawDirection.WrappedLineLastNonWhitespaceCharacter:S=10;break;case v.RawDirection.ViewPortTop:S=11;break;case v.RawDirection.ViewPortBottom:S=13;break;case v.RawDirection.ViewPortCenter:S=12;break;case v.RawDirection.ViewPortIfOutside:S=14;break;default:return null}let r=0;switch(D.by){case v.RawUnit.Line:r=1;break;case v.RawUnit.WrappedLine:r=2;break;case v.RawUnit.Character:r=3;break;case v.RawUnit.HalfLine:r=4;break}return{direction:S,unit:r,select:!!D.select,value:D.value||1}}v.parse=d})(L||(L={}))},oFSf:function(mt,M,t){"use strict";t.d(M,"b",function(){return S}),t.d(M,"a",function(){return r});var f=t("3/fG"),B=t("/cxE"),x=t("gCVg"),N=t("bY76"),A=t("5nk5"),F=t("HpOR"),I=t("gslv");function L(_){return _.toString()}class v{constructor(_,b,h,c,p,E,y){this.beforeVersionId=_,this.afterVersionId=b,this.beforeEOL=h,this.afterEOL=c,this.beforeCursorState=p,this.afterCursorState=E,this.changes=y}static create(_,b){const h=_.getAlternativeVersionId(),c=D(_);return new v(h,h,c,c,b,b,[])}append(_,b,h,c,p){b.length>0&&(this.changes=Object(A.b)(this.changes,b)),this.afterEOL=h,this.afterVersionId=c,this.afterCursorState=p}static _writeSelectionsSize(_){return 4+4*4*(_?_.length:0)}static _writeSelections(_,b,h){if(F.f(_,b?b.length:0,h),h+=4,b)for(const c of b)F.f(_,c.selectionStartLineNumber,h),h+=4,F.f(_,c.selectionStartColumn,h),h+=4,F.f(_,c.positionLineNumber,h),h+=4,F.f(_,c.positionColumn,h),h+=4;return h}static _readSelections(_,b,h){const c=F.c(_,b);b+=4;for(let p=0;p<c;p++){const E=F.c(_,b);b+=4;const y=F.c(_,b);b+=4;const C=F.c(_,b);b+=4;const O=F.c(_,b);b+=4,h.push(new x.a(E,y,C,O))}return b}serialize(){let _=4+4+1+1+v._writeSelectionsSize(this.beforeCursorState)+v._writeSelectionsSize(this.afterCursorState)+4;for(const c of this.changes)_+=c.writeSize();const b=new Uint8Array(_);let h=0;F.f(b,this.beforeVersionId,h),h+=4,F.f(b,this.afterVersionId,h),h+=4,F.g(b,this.beforeEOL,h),h+=1,F.g(b,this.afterEOL,h),h+=1,h=v._writeSelections(b,this.beforeCursorState,h),h=v._writeSelections(b,this.afterCursorState,h),F.f(b,this.changes.length,h),h+=4;for(const c of this.changes)h=c.write(b,h);return b.buffer}static deserialize(_){const b=new Uint8Array(_);let h=0;const c=F.c(b,h);h+=4;const p=F.c(b,h);h+=4;const E=F.d(b,h);h+=1;const y=F.d(b,h);h+=1;const C=[];h=v._readSelections(b,h,C);const O=[];h=v._readSelections(b,h,O);const k=F.c(b,h);h+=4;const Y=[];for(let Q=0;Q<k;Q++)h=A.a.read(b,h,Y);return new v(c,p,E,y,C,O,Y)}}class m{constructor(_,b){this.model=_,this._data=v.create(_,b)}get type(){return 0}get resource(){return N.a.isUri(this.model)?this.model:this.model.uri}get label(){return f.a("edit","Typing")}toString(){const _=this._data instanceof v?this._data:v.deserialize(this._data);return _.changes.map(b=>b.toString()).join(", ")}matchesResource(_){const b=N.a.isUri(this.model)?this.model:this.model.uri;return b.toString()===_.toString()}setModel(_){this.model=_}canAppend(_){return this.model===_&&this._data instanceof v}append(_,b,h,c,p){this._data instanceof v&&this._data.append(_,b,h,c,p)}close(){this._data instanceof v&&(this._data=this._data.serialize())}open(){this._data instanceof v||(this._data=v.deserialize(this._data))}undo(){if(N.a.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof v&&(this._data=this._data.serialize());const _=v.deserialize(this._data);this.model._applyUndo(_.changes,_.beforeEOL,_.beforeVersionId,_.beforeCursorState)}redo(){if(N.a.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof v&&(this._data=this._data.serialize());const _=v.deserialize(this._data);this.model._applyRedo(_.changes,_.afterEOL,_.afterVersionId,_.afterCursorState)}heapSize(){return this._data instanceof v&&(this._data=this._data.serialize()),this._data.byteLength+168}}class d{constructor(_,b){this.type=1,this.label=_,this._isOpen=!0,this._editStackElementsArr=b.slice(0),this._editStackElementsMap=new Map;for(const h of this._editStackElementsArr){const c=L(h.resource);this._editStackElementsMap.set(c,h)}this._delegate=null}get resources(){return this._editStackElementsArr.map(_=>_.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(_){const b=L(_);return this._editStackElementsMap.has(b)}setModel(_){const b=L(N.a.isUri(_)?_:_.uri);this._editStackElementsMap.has(b)&&this._editStackElementsMap.get(b).setModel(_)}canAppend(_){if(!this._isOpen)return!1;const b=L(_.uri);if(this._editStackElementsMap.has(b)){const h=this._editStackElementsMap.get(b);return h.canAppend(_)}return!1}append(_,b,h,c,p){const E=L(_.uri),y=this._editStackElementsMap.get(E);y.append(_,b,h,c,p)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const _ of this._editStackElementsArr)_.undo()}redo(){for(const _ of this._editStackElementsArr)_.redo()}heapSize(_){const b=L(_);if(this._editStackElementsMap.has(b)){const h=this._editStackElementsMap.get(b);return h.heapSize()}return 0}split(){return this._editStackElementsArr}toString(){let _=[];for(const b of this._editStackElementsArr)_.push(`${Object(I.b)(b.resource)}: ${b}`);return`{${_.join(", ")}}`}}function D(_){const b=_.getEOL();return b===`
|
|
|
`?0:1}function S(_){return _?_ instanceof m||_ instanceof d:!1}class r{constructor(_,b){this._model=_,this._undoRedoService=b}pushStackElement(){const _=this._undoRedoService.getLastElement(this._model.uri);S(_)&&_.close()}popStackElement(){const _=this._undoRedoService.getLastElement(this._model.uri);S(_)&&_.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(_){const b=this._undoRedoService.getLastElement(this._model.uri);if(S(b)&&b.canAppend(this._model))return b;const h=new m(this._model,_);return this._undoRedoService.pushElement(h),h}pushEOL(_){const b=this._getOrCreateEditStackElement(null);this._model.setEOL(_),b.append(this._model,[],D(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(_,b,h){const c=this._getOrCreateEditStackElement(_),p=this._model.applyEdits(b,!0),E=r._computeCursorState(h,p),y=p.map((C,O)=>({index:O,textChange:C.textChange}));return y.sort((C,O)=>C.textChange.oldPosition===O.textChange.oldPosition?C.index-O.index:C.textChange.oldPosition-O.textChange.oldPosition),c.append(this._model,y.map(C=>C.textChange),D(this._model),this._model.getAlternativeVersionId(),E),E}static _computeCursorState(_,b){try{return _?_(b):null}catch(h){return Object(B.f)(h),null}}}},oKJv:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:function(){return t.e(346).then(t.bind(null,"HGU1"))}})},oQaD:function(mt,M,t){"use strict";t.r(M),t.d(M,"getSelectionSearchString",function(){return Hi}),t.d(M,"CommonFindController",function(){return Oi}),t.d(M,"FindController",function(){return Ii}),t.d(M,"StartFindAction",function(){return Qi}),t.d(M,"StartFindWithSelectionAction",function(){return Li}),t.d(M,"MatchFindAction",function(){return Ui}),t.d(M,"NextMatchFindAction",function(){return fi}),t.d(M,"PreviousMatchFindAction",function(){return $i}),t.d(M,"SelectionMatchFindAction",function(){return rn}),t.d(M,"NextSelectionMatchFindAction",function(){return _i}),t.d(M,"PreviousSelectionMatchFindAction",function(){return Pi}),t.d(M,"StartFindReplaceAction",function(){return ht});var f=t("X+cX"),B=t("pmY6"),x=t("N0LK"),N=t("sswD"),A=t("wQH0"),F=t("6OMU"),I=t("LCkn"),L=t("cGHE"),v=t("aokT"),m=t("gCVg"),d=t("jAJ/"),D=t("M1Kb"),S=t("tX9W"),r=t("MD5Z"),_=t("t9D7");class b{constructor(K){this._editor=K,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const K=this._findScopeDecorationIds.map(be=>this._editor.getModel().getDecorationRange(be)).filter(be=>!!be);if(K.length)return K}return null}getStartPosition(){return this._startPosition}setStartPosition(K){this._startPosition=K,this.setCurrentFindMatch(null)}_getDecorationIndex(K){const be=this._decorations.indexOf(K);return be>=0?be+1:1}getCurrentMatchesPosition(K){let be=this._editor.getModel().getDecorationsInRange(K);for(const Re of be){const Be=Re.options;if(Be===b._FIND_MATCH_DECORATION||Be===b._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(Re.id)}return 0}setCurrentFindMatch(K){let be=null,Re=0;if(K)for(let Be=0,at=this._decorations.length;Be<at;Be++){let vt=this._editor.getModel().getDecorationRange(this._decorations[Be]);if(K.equalsRange(vt)){be=this._decorations[Be],Re=Be+1;break}}return(this._highlightedDecorationId!==null||be!==null)&&this._editor.changeDecorations(Be=>{if(this._highlightedDecorationId!==null&&(Be.changeDecorationOptions(this._highlightedDecorationId,b._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),be!==null&&(this._highlightedDecorationId=be,Be.changeDecorationOptions(this._highlightedDecorationId,b._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(Be.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),be!==null){let at=this._editor.getModel().getDecorationRange(be);if(at.startLineNumber!==at.endLineNumber&&at.endColumn===1){let vt=at.endLineNumber-1,Gt=this._editor.getModel().getLineMaxColumn(vt);at=new v.a(at.startLineNumber,at.startColumn,vt,Gt)}this._rangeHighlightDecorationId=Be.addDecoration(at,b._RANGE_HIGHLIGHT_DECORATION)}}),Re}set(K,be){this._editor.changeDecorations(Re=>{let Be=b._FIND_MATCH_DECORATION,at=[];if(K.length>1e3){Be=b._FIND_MATCH_NO_OVERVIEW_DECORATION;const Gt=this._editor.getModel().getLineCount(),Bt=this._editor.getLayoutInfo().height,zt=Bt/Gt,ro=Math.max(2,Math.ceil(3/zt));let P=K[0].range.startLineNumber,q=K[0].range.endLineNumber;for(let Ae=1,Ge=K.length;Ae<Ge;Ae++){const ft=K[Ae].range;q+ro>=ft.startLineNumber?ft.endLineNumber>q&&(q=ft.endLineNumber):(at.push({range:new v.a(P,1,q,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),P=ft.startLineNumber,q=ft.endLineNumber)}at.push({range:new v.a(P,1,q,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let vt=new Array(K.length);for(let Gt=0,Bt=K.length;Gt<Bt;Gt++)vt[Gt]={range:K[Gt].range,options:Be};this._decorations=Re.deltaDecorations(this._decorations,vt),this._overviewRulerApproximateDecorations=Re.deltaDecorations(this._overviewRulerApproximateDecorations,at),this._rangeHighlightDecorationId&&(Re.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(Gt=>Re.removeDecoration(Gt)),this._findScopeDecorationIds=[]),(be==null?void 0:be.length)&&(this._findScopeDecorationIds=be.map(Gt=>Re.addDecoration(Gt,b._FIND_SCOPE_DECORATION)))})}matchBeforePosition(K){if(this._decorations.length===0)return null;for(let be=this._decorations.length-1;be>=0;be--){let Re=this._decorations[be],Be=this._editor.getModel().getDecorationRange(Re);if(!Be||Be.endLineNumber>K.lineNumber)continue;if(Be.endLineNumber<K.lineNumber)return Be;if(Be.endColumn>K.column)continue;return Be}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(K){if(this._decorations.length===0)return null;for(let be=0,Re=this._decorations.length;be<Re;be++){let Be=this._decorations[be],at=this._editor.getModel().getDecorationRange(Be);if(!at||at.startLineNumber<K.lineNumber)continue;if(at.startLineNumber>K.lineNumber)return at;if(at.startColumn<K.column)continue;return at}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let K=[];return K=K.concat(this._decorations),K=K.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&K.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&K.push(this._rangeHighlightDecorationId),K}}b._CURRENT_FIND_MATCH_DECORATION=S.b.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:Object(_.g)(r.ic),position:D.g.Center},minimap:{color:Object(_.g)(r.Zb),position:D.f.Inline}}),b._FIND_MATCH_DECORATION=S.b.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:Object(_.g)(r.ic),position:D.g.Center},minimap:{color:Object(_.g)(r.Zb),position:D.f.Inline}}),b._FIND_MATCH_NO_OVERVIEW_DECORATION=S.b.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),b._FIND_MATCH_ONLY_OVERVIEW_DECORATION=S.b.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:Object(_.g)(r.ic),position:D.g.Center}}),b._RANGE_HIGHLIGHT_DECORATION=S.b.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),b._FIND_SCOPE_DECORATION=S.b.register({description:"find-scope",className:"findScope",isWholeLine:!0});class h{constructor(K,be,Re){this._editorSelection=K,this._ranges=be,this._replaceStrings=Re,this._trackedEditorSelectionId=null}getEditOperations(K,be){if(this._ranges.length>0){let Re=[];for(let vt=0;vt<this._ranges.length;vt++)Re.push({range:this._ranges[vt],text:this._replaceStrings[vt]});Re.sort((vt,Gt)=>v.a.compareRangesUsingStarts(vt.range,Gt.range));let Be=[],at=Re[0];for(let vt=1;vt<Re.length;vt++)at.range.endLineNumber===Re[vt].range.startLineNumber&&at.range.endColumn===Re[vt].range.startColumn?(at.range=at.range.plusRange(Re[vt].range),at.text=at.text+Re[vt].text):(Be.push(at),at=Re[vt]);Be.push(at);for(const vt of Be)be.addEditOperation(vt.range,vt.text)}this._trackedEditorSelectionId=be.trackSelection(this._editorSelection)}computeCursorState(K,be){return be.getTrackedSelection(this._trackedEditorSelectionId)}}function c(K,be){if(K&&K[0]!==""){const Re=p(K,be,"-"),Be=p(K,be,"_");return Re&&!Be?E(K,be,"-"):!Re&&Be?E(K,be,"_"):K[0].toUpperCase()===K[0]?be.toUpperCase():K[0].toLowerCase()===K[0]?be.toLowerCase():x.o(K[0][0])&&be.length>0?be[0].toUpperCase()+be.substr(1):K[0][0].toUpperCase()!==K[0][0]&&be.length>0?be[0].toLowerCase()+be.substr(1):be}else return be}function p(K,be,Re){const Be=K[0].indexOf(Re)!==-1&&be.indexOf(Re)!==-1;return Be&&K[0].split(Re).length===be.split(Re).length}function E(K,be,Re){const Be=be.split(Re),at=K[0].split(Re);let vt="";return Be.forEach((Gt,Bt)=>{vt+=c([at[Bt]],Gt)+Re}),vt.slice(0,-1)}class y{constructor(K){this.staticValue=K,this.kind=0}}class C{constructor(K){this.pieces=K,this.kind=1}}class O{constructor(K){!K||K.length===0?this._state=new y(""):K.length===1&&K[0].staticValue!==null?this._state=new y(K[0].staticValue):this._state=new C(K)}static fromStaticValue(K){return new O([k.staticValue(K)])}get hasReplacementPatterns(){return this._state.kind===1}buildReplaceString(K,be){if(this._state.kind===0)return be?c(K,this._state.staticValue):this._state.staticValue;let Re="";for(let Be=0,at=this._state.pieces.length;Be<at;Be++){let vt=this._state.pieces[Be];if(vt.staticValue!==null){Re+=vt.staticValue;continue}let Gt=O._substitute(vt.matchIndex,K);if(vt.caseOps!==null&&vt.caseOps.length>0){let Bt=[],zt=vt.caseOps.length,ro=0;for(let P=0,q=Gt.length;P<q;P++){if(ro>=zt){Bt.push(Gt.slice(P));break}switch(vt.caseOps[ro]){case"U":Bt.push(Gt[P].toUpperCase());break;case"u":Bt.push(Gt[P].toUpperCase()),ro++;break;case"L":Bt.push(Gt[P].toLowerCase());break;case"l":Bt.push(Gt[P].toLowerCase()),ro++;break;default:Bt.push(Gt[P])}}Gt=Bt.join("")}Re+=Gt}return Re}static _substitute(K,be){if(be===null)return"";if(K===0)return be[0];let Re="";for(;K>0;){if(K<be.length){let Be=be[K]||"";return Be+Re}Re=String(K%10)+Re,K=Math.floor(K/10)}return"$"+Re}}class k{constructor(K,be,Re){this.staticValue=K,this.matchIndex=be,!Re||Re.length===0?this.caseOps=null:this.caseOps=Re.slice(0)}static staticValue(K){return new k(K,-1,null)}static caseOps(K,be){return new k(null,K,be)}}class Y{constructor(K){this._source=K,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(K){this._emitStatic(this._source.substring(this._lastCharIndex,K)),this._lastCharIndex=K}emitStatic(K,be){this._emitStatic(K),this._lastCharIndex=be}_emitStatic(K){if(K.length===0)return;this._currentStaticPiece+=K}emitMatchIndex(K,be,Re){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=k.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=k.caseOps(K,Re),this._lastCharIndex=be}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=k.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new O(this._result)}}function Q(K){if(!K||K.length===0)return new O(null);let be=[],Re=new Y(K);for(let Be=0,at=K.length;Be<at;Be++){let vt=K.charCodeAt(Be);if(vt===92){if(Be++,Be>=at)break;let Gt=K.charCodeAt(Be);switch(Gt){case 92:Re.emitUnchanged(Be-1),Re.emitStatic("\\",Be+1);break;case 110:Re.emitUnchanged(Be-1),Re.emitStatic(`
|
|
|
`,Be+1);break;case 116:Re.emitUnchanged(Be-1),Re.emitStatic(" ",Be+1);break;case 117:case 85:case 108:case 76:Re.emitUnchanged(Be-1),Re.emitStatic("",Be+1),be.push(String.fromCharCode(Gt));break}continue}if(vt===36){if(Be++,Be>=at)break;let Gt=K.charCodeAt(Be);if(Gt===36){Re.emitUnchanged(Be-1),Re.emitStatic("$",Be+1);continue}if(Gt===48||Gt===38){Re.emitUnchanged(Be-1),Re.emitMatchIndex(0,Be+1,be),be.length=0;continue}if(49<=Gt&&Gt<=57){let Bt=Gt-48;if(Be+1<at){let zt=K.charCodeAt(Be+1);if(48<=zt&&zt<=57){Be++,Bt=Bt*10+(zt-48),Re.emitUnchanged(Be-2),Re.emitMatchIndex(Bt,Be+1,be),be.length=0;continue}}Re.emitUnchanged(Be-1),Re.emitMatchIndex(Bt,Be+1,be),be.length=0;continue}}}return Re.finalize()}var H=t("T8No");const Z=new H.c("findWidgetVisible",!1),oe=new H.c("findInputFocussed",!1),$=new H.c("replaceInputFocussed",!1),te={primary:512|33,mac:{primary:2048|512|33}},ne={primary:512|53,mac:{primary:2048|512|53}},Ee={primary:512|48,mac:{primary:2048|512|48}},fe={primary:512|42,mac:{primary:2048|512|42}},ee={primary:512|46,mac:{primary:2048|512|46}},ie={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},U=19999,G=240;class J{constructor(K,be){this._toDispose=new B.b,this._editor=K,this._state=be,this._isDisposed=!1,this._startSearchingTimer=new f.g,this._decorations=new b(K),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new f.e(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(Re=>{(Re.reason===3||Re.reason===5||Re.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(Re=>{if(this._ignoreModelContentChanged)return;Re.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule()})),this._toDispose.add(this._state.onFindReplaceStateChange(Re=>this._onStateChanged(Re))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,Object(B.f)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(K){if(this._isDisposed)return;if(!this._editor.hasModel())return;if(K.searchString||K.isReplaceRevealed||K.isRegex||K.wholeWord||K.matchCase||K.searchScope){let be=this._editor.getModel();be.isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{K.searchScope?this.research(K.moveCursor,this._state.searchScope):this.research(K.moveCursor)},G)):K.searchScope?this.research(K.moveCursor,this._state.searchScope):this.research(K.moveCursor)}}static _getSearchRange(K,be){return be||K.getFullModelRange()}research(K,be){let Re=null;typeof be!="undefined"?be!==null&&(Array.isArray(be)?Re=be:Re=[be]):Re=this._decorations.getFindScopes(),Re!==null&&(Re=Re.map(Gt=>{if(Gt.startLineNumber!==Gt.endLineNumber){let Bt=Gt.endLineNumber;return Gt.endColumn===1&&(Bt=Bt-1),new v.a(Gt.startLineNumber,1,Bt,this._editor.getModel().getLineMaxColumn(Bt))}return Gt}));let Be=this._findMatches(Re,!1,U);this._decorations.set(Be,Re);const at=this._editor.getSelection();let vt=this._decorations.getCurrentMatchesPosition(at);if(vt===0&&Be.length>0){const Gt=Object(F.h)(Be.map(Bt=>Bt.range),Bt=>v.a.compareRangesUsingStarts(Bt,at)>=0);vt=Gt>0?Gt-1+1:vt}this._state.changeMatchInfo(vt,this._decorations.getCount(),void 0),K&&this._editor.getOption(35).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let K=this._decorations.getFindScope();return K&&this._editor.revealRangeInCenterIfOutsideViewport(K,0),!0}return!1}_setCurrentFindMatch(K){let be=this._decorations.setCurrentFindMatch(K);this._state.changeMatchInfo(be,this._decorations.getCount(),K),this._editor.setSelection(K),this._editor.revealRangeInCenterIfOutsideViewport(K,0)}_prevSearchPosition(K){let be=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:Re,column:Be}=K,at=this._editor.getModel();return be||Be===1?(Re===1?Re=at.getLineCount():Re--,Be=at.getLineMaxColumn(Re)):Be--,new L.a(Re,Be)}_moveToPrevMatch(K,be=!1){if(!this._state.canNavigateBack()){const ro=this._decorations.matchAfterPosition(K);ro&&this._setCurrentFindMatch(ro);return}if(this._decorations.getCount()<U){let ro=this._decorations.matchBeforePosition(K);ro&&ro.isEmpty()&&ro.getStartPosition().equals(K)&&(K=this._prevSearchPosition(K),ro=this._decorations.matchBeforePosition(K)),ro&&this._setCurrentFindMatch(ro);return}if(this._cannotFind())return;let Re=this._decorations.getFindScope(),Be=J._getSearchRange(this._editor.getModel(),Re);Be.getEndPosition().isBefore(K)&&(K=Be.getEndPosition()),K.isBefore(Be.getStartPosition())&&(K=Be.getEndPosition());let{lineNumber:at,column:vt}=K,Gt=this._editor.getModel(),Bt=new L.a(at,vt),zt=Gt.findPreviousMatch(this._state.searchString,Bt,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,!1);if(zt&&zt.range.isEmpty()&&zt.range.getStartPosition().equals(Bt)&&(Bt=this._prevSearchPosition(Bt),zt=Gt.findPreviousMatch(this._state.searchString,Bt,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,!1)),!zt)return;if(!be&&!Be.containsRange(zt.range))return this._moveToPrevMatch(zt.range.getStartPosition(),!0);this._setCurrentFindMatch(zt.range)}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(K){let be=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:Re,column:Be}=K,at=this._editor.getModel();return be||Be===at.getLineMaxColumn(Re)?(Re===at.getLineCount()?Re=1:Re++,Be=1):Be++,new L.a(Re,Be)}_moveToNextMatch(K){if(!this._state.canNavigateForward()){const Re=this._decorations.matchBeforePosition(K);Re&&this._setCurrentFindMatch(Re);return}if(this._decorations.getCount()<U){let Re=this._decorations.matchAfterPosition(K);Re&&Re.isEmpty()&&Re.getStartPosition().equals(K)&&(K=this._nextSearchPosition(K),Re=this._decorations.matchAfterPosition(K)),Re&&this._setCurrentFindMatch(Re);return}let be=this._getNextMatch(K,!1,!0);be&&this._setCurrentFindMatch(be.range)}_getNextMatch(K,be,Re,Be=!1){if(this._cannotFind())return null;let at=this._decorations.getFindScope(),vt=J._getSearchRange(this._editor.getModel(),at);vt.getEndPosition().isBefore(K)&&(K=vt.getStartPosition()),K.isBefore(vt.getStartPosition())&&(K=vt.getStartPosition());let{lineNumber:Gt,column:Bt}=K,zt=this._editor.getModel(),ro=new L.a(Gt,Bt),P=zt.findNextMatch(this._state.searchString,ro,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,be);return Re&&P&&P.range.isEmpty()&&P.range.getStartPosition().equals(ro)&&(ro=this._nextSearchPosition(ro),P=zt.findNextMatch(this._state.searchString,ro,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,be)),P?!Be&&!vt.containsRange(P.range)?this._getNextMatch(P.range.getEndPosition(),be,Re,!0):P:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_getReplacePattern(){return this._state.isRegex?Q(this._state.replaceString):O.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let K=this._getReplacePattern(),be=this._editor.getSelection(),Re=this._getNextMatch(be.getStartPosition(),!0,!1);if(Re)if(be.equalsRange(Re.range)){let Be=K.buildReplaceString(Re.matches,this._state.preserveCase),at=new I.a(be,Be);this._executeEditorCommand("replace",at),this._decorations.setStartPosition(new L.a(be.startLineNumber,be.startColumn+Be.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(Re.range)}_findMatches(K,be,Re){const Be=(K||[null]).map(at=>J._getSearchRange(this._editor.getModel(),at));return this._editor.getModel().findMatches(this._state.searchString,Be,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,be,Re)}replaceAll(){if(!this._hasMatches())return;const K=this._decorations.getFindScopes();K===null&&this._state.matchesCount>=U?this._largeReplaceAll():this._regularReplaceAll(K),this.research(!1)}_largeReplaceAll(){const K=new d.a(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null),be=K.parseSearchRequest();if(!be)return;let Re=be.regex;if(!Re.multiline){let P="mu";Re.ignoreCase&&(P+="i"),Re.global&&(P+="g"),Re=new RegExp(Re.source,P)}const Be=this._editor.getModel(),at=Be.getValue(1),vt=Be.getFullModelRange(),Gt=this._getReplacePattern();let Bt;const zt=this._state.preserveCase;Gt.hasReplacementPatterns||zt?Bt=at.replace(Re,function(){return Gt.buildReplaceString(arguments,zt)}):Bt=at.replace(Re,Gt.buildReplaceString(null,zt));let ro=new I.b(vt,Bt,this._editor.getSelection());this._executeEditorCommand("replaceAll",ro)}_regularReplaceAll(K){const be=this._getReplacePattern();let Re=this._findMatches(K,be.hasReplacementPatterns||this._state.preserveCase,1073741824),Be=[];for(let vt=0,Gt=Re.length;vt<Gt;vt++)Be[vt]=be.buildReplaceString(Re[vt].matches,this._state.preserveCase);let at=new h(this._editor.getSelection(),Re.map(vt=>vt.range),Be);this._executeEditorCommand("replaceAll",at)}selectAllMatches(){if(!this._hasMatches())return;let K=this._decorations.getFindScopes(),be=this._findMatches(K,!1,1073741824),Re=be.map(at=>new m.a(at.range.startLineNumber,at.range.startColumn,at.range.endLineNumber,at.range.endColumn)),Be=this._editor.getSelection();for(let at=0,vt=Re.length;at<vt;at++){let Gt=Re[at];if(Gt.equalsRange(Be)){Re=[Be].concat(Re.slice(0,at)).concat(Re.slice(at+1));break}}this._editor.setSelections(Re)}_executeEditorCommand(K,be){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(K,be),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}var he=t("EffR"),xe=t("G300"),Ie=t("Vhoy"),Le=t("zrhQ"),Te=t("MI8n"),ze=t("iJk1");const ue={inputActiveOptionBorder:Le.a.fromHex("#007ACC00"),inputActiveOptionForeground:Le.a.fromHex("#FFFFFF"),inputActiveOptionBackground:Le.a.fromHex("#0E639C50")};class je extends xe.a{constructor(K){super();this._onChange=this._register(new Te.b),this.onChange=this._onChange.event,this._onKeyDown=this._register(new Te.b),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},ue),K),this._checked=this._opts.isChecked;const be=["monaco-custom-checkbox"];this._opts.icon&&be.push(...Ie.a.asClassNameArray(this._opts.icon)),this._opts.actionClassName&&be.push(...this._opts.actionClassName.split(" ")),this._checked&&be.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...be),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,Re=>{this.checked=!this._checked,this._onChange.fire(!1),Re.preventDefault()}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,Re=>{if(Re.keyCode===10||Re.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),Re.preventDefault();return}this._onKeyDown.fire(Re)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(K){this._checked=K,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}style(K){K.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=K.inputActiveOptionBorder),K.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=K.inputActiveOptionForeground),K.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=K.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"transparent")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}var Pe=t("3/fG");const ve=Pe.a("caseDescription","Match Case"),ce=Pe.a("wordsDescription","Match Whole Word"),le=Pe.a("regexDescription","Use Regular Expression");class Ce extends je{constructor(K){super({icon:Ie.b.caseSensitive,title:ve+K.appendTitle,isChecked:K.isChecked,inputActiveOptionBorder:K.inputActiveOptionBorder,inputActiveOptionForeground:K.inputActiveOptionForeground,inputActiveOptionBackground:K.inputActiveOptionBackground})}}class ye extends je{constructor(K){super({icon:Ie.b.wholeWord,title:ce+K.appendTitle,isChecked:K.isChecked,inputActiveOptionBorder:K.inputActiveOptionBorder,inputActiveOptionForeground:K.inputActiveOptionForeground,inputActiveOptionBackground:K.inputActiveOptionBackground})}}class ge extends je{constructor(K){super({icon:Ie.b.regex,title:le+K.appendTitle,isChecked:K.isChecked,inputActiveOptionBorder:K.inputActiveOptionBorder,inputActiveOptionForeground:K.inputActiveOptionForeground,inputActiveOptionBackground:K.inputActiveOptionBackground})}}class Me extends xe.a{constructor(K,be,Re,Be){super();this._hideSoon=this._register(new f.e(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=K,this._state=be,this._keybindingService=Re,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const at=Be.getColorTheme().getColor(r.fb),vt=Be.getColorTheme().getColor(r.gb),Gt=Be.getColorTheme().getColor(r.eb);this.caseSensitive=this._register(new Ce({appendTitle:this._keybindingLabelFor(ie.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:at,inputActiveOptionForeground:vt,inputActiveOptionBackground:Gt})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new ye({appendTitle:this._keybindingLabelFor(ie.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:at,inputActiveOptionForeground:vt,inputActiveOptionBackground:Gt})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new ge({appendTitle:this._keybindingLabelFor(ie.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:at,inputActiveOptionForeground:vt,inputActiveOptionBackground:Gt})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(Bt=>{let zt=!1;Bt.isRegex&&(this.regex.checked=this._state.isRegex,zt=!0),Bt.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,zt=!0),Bt.matchCase&&(this.caseSensitive.checked=this._state.matchCase,zt=!0),!this._state.isRevealed&&zt&&this._revealTemporarily()})),this._register(he.j(this._domNode,Bt=>this._onMouseOut())),this._register(he.i(this._domNode,"mouseover",Bt=>this._onMouseOver())),this._applyTheme(Be.getColorTheme()),this._register(Be.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(K){let be=this._keybindingService.lookupKeybinding(K);return be?` (${be.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Me.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){if(this._isVisible)return;this._isVisible=!0,this._domNode.style.display="block"}_hide(){if(!this._isVisible)return;this._isVisible=!1,this._domNode.style.display="none"}_applyTheme(K){let be={inputActiveOptionBorder:K.getColor(r.fb),inputActiveOptionForeground:K.getColor(r.gb),inputActiveOptionBackground:K.getColor(r.eb)};this.caseSensitive.style(be),this.wholeWords.style(be),this.regex.style(be)}}Me.ID="editor.contrib.findOptionsWidget",Object(_.f)((K,be)=>{const Re=K.getColor(r.W);Re&&be.addRule(`.monaco-editor .findOptionsWidget { background-color: ${Re}; }`);const Be=K.getColor(r.Y);Be&&be.addRule(`.monaco-editor .findOptionsWidget { color: ${Be}; }`);const at=K.getColor(r.Nc);at&&be.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${at}; }`);const vt=K.getColor(r.h);vt&&be.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${vt}; }`)});function De(K,be){return K===1?!0:K===2?!1:be}class we extends B.a{constructor(){super();this._onFindReplaceStateChange=this._register(new Te.b),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return De(this._isRegexOverride,this._isRegex)}get wholeWord(){return De(this._wholeWordOverride,this._wholeWord)}get matchCase(){return De(this._matchCaseOverride,this._matchCase)}get preserveCase(){return De(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}changeMatchInfo(K,be,Re){let Be={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},at=!1;be===0&&(K=0),K>be&&(K=be),this._matchesPosition!==K&&(this._matchesPosition=K,Be.matchesPosition=!0,at=!0),this._matchesCount!==be&&(this._matchesCount=be,Be.matchesCount=!0,at=!0),typeof Re!="undefined"&&(v.a.equalsRange(this._currentMatch,Re)||(this._currentMatch=Re,Be.currentMatch=!0,at=!0)),at&&this._onFindReplaceStateChange.fire(Be)}change(K,be,Re=!0){var Be;let at={moveCursor:be,updateHistory:Re,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},vt=!1;const Gt=this.isRegex,Bt=this.wholeWord,zt=this.matchCase,ro=this.preserveCase;typeof K.searchString!="undefined"&&(this._searchString!==K.searchString&&(this._searchString=K.searchString,at.searchString=!0,vt=!0)),typeof K.replaceString!="undefined"&&(this._replaceString!==K.replaceString&&(this._replaceString=K.replaceString,at.replaceString=!0,vt=!0)),typeof K.isRevealed!="undefined"&&(this._isRevealed!==K.isRevealed&&(this._isRevealed=K.isRevealed,at.isRevealed=!0,vt=!0)),typeof K.isReplaceRevealed!="undefined"&&(this._isReplaceRevealed!==K.isReplaceRevealed&&(this._isReplaceRevealed=K.isReplaceRevealed,at.isReplaceRevealed=!0,vt=!0)),typeof K.isRegex!="undefined"&&(this._isRegex=K.isRegex),typeof K.wholeWord!="undefined"&&(this._wholeWord=K.wholeWord),typeof K.matchCase!="undefined"&&(this._matchCase=K.matchCase),typeof K.preserveCase!="undefined"&&(this._preserveCase=K.preserveCase),typeof K.searchScope!="undefined"&&(((Be=K.searchScope)===null||Be===void 0?void 0:Be.every(P=>{var q;return(q=this._searchScope)===null||q===void 0?void 0:q.some(Ae=>!v.a.equalsRange(Ae,P))}))||(this._searchScope=K.searchScope,at.searchScope=!0,vt=!0)),typeof K.loop!="undefined"&&(this._loop!==K.loop&&(this._loop=K.loop,at.loop=!0,vt=!0)),this._isRegexOverride=typeof K.isRegexOverride!="undefined"?K.isRegexOverride:0,this._wholeWordOverride=typeof K.wholeWordOverride!="undefined"?K.wholeWordOverride:0,this._matchCaseOverride=typeof K.matchCaseOverride!="undefined"?K.matchCaseOverride:0,this._preserveCaseOverride=typeof K.preserveCaseOverride!="undefined"?K.preserveCaseOverride:0,Gt!==this.isRegex&&(vt=!0,at.isRegex=!0),Bt!==this.wholeWord&&(vt=!0,at.wholeWord=!0),zt!==this.matchCase&&(vt=!0,at.matchCase=!0),ro!==this.preserveCase&&(vt=!0,at.preserveCase=!0),vt&&this._onFindReplaceStateChange.fire(at)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=U}}var Oe=t("OBOq"),nt=t("cMOf"),Ke=t("/cxE"),et=t("MNsG"),bt=t("AbCa"),Tt=t("0+8E"),$t=t("yqFB");const Xe=Pe.a("defaultLabel","input");class it extends xe.a{constructor(K,be,Re,Be){super();this._showOptionButtons=Re,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this._onDidOptionChange=this._register(new Te.b),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Te.b),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Te.b),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new Te.b),this._onKeyUp=this._register(new Te.b),this._onCaseSensitiveKeyDown=this._register(new Te.b),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new Te.b),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=be,this.placeholder=Be.placeholder||"",this.validation=Be.validation,this.label=Be.label||Xe,this.inputActiveOptionBorder=Be.inputActiveOptionBorder,this.inputActiveOptionForeground=Be.inputActiveOptionForeground,this.inputActiveOptionBackground=Be.inputActiveOptionBackground,this.inputBackground=Be.inputBackground,this.inputForeground=Be.inputForeground,this.inputBorder=Be.inputBorder,this.inputValidationInfoBorder=Be.inputValidationInfoBorder,this.inputValidationInfoBackground=Be.inputValidationInfoBackground,this.inputValidationInfoForeground=Be.inputValidationInfoForeground,this.inputValidationWarningBorder=Be.inputValidationWarningBorder,this.inputValidationWarningBackground=Be.inputValidationWarningBackground,this.inputValidationWarningForeground=Be.inputValidationWarningForeground,this.inputValidationErrorBorder=Be.inputValidationErrorBorder,this.inputValidationErrorBackground=Be.inputValidationErrorBackground,this.inputValidationErrorForeground=Be.inputValidationErrorForeground;const at=Be.appendCaseSensitiveLabel||"",vt=Be.appendWholeWordsLabel||"",Gt=Be.appendRegexLabel||"",Bt=Be.history||[],zt=!!Be.flexibleHeight,ro=!!Be.flexibleWidth,P=Be.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new Tt.a(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:Bt,showHistoryHint:Be.showHistoryHint,flexibleHeight:zt,flexibleWidth:ro,flexibleMaxHeight:P})),this.regex=this._register(new ge({appendTitle:Gt,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(Ge=>{this._onDidOptionChange.fire(Ge),!Ge&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(Ge=>{this._onRegexKeyDown.fire(Ge)})),this.wholeWords=this._register(new ye({appendTitle:vt,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(Ge=>{this._onDidOptionChange.fire(Ge),!Ge&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new Ce({appendTitle:at,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(Ge=>{this._onDidOptionChange.fire(Ge),!Ge&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(Ge=>{this._onCaseSensitiveKeyDown.fire(Ge)})),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let q=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,Ge=>{if(Ge.equals(15)||Ge.equals(17)||Ge.equals(9)){let ft=q.indexOf(document.activeElement);if(ft>=0){let Dt=-1;Ge.equals(17)?Dt=(ft+1)%q.length:Ge.equals(15)&&(ft===0?Dt=q.length-1:Dt=ft-1),Ge.equals(9)?(q[ft].blur(),this.inputBox.focus()):Dt>=0&&q[Dt].focus(),he.c.stop(Ge,!0)}}});let Ae=document.createElement("div");Ae.className="controls",Ae.style.display=this._showOptionButtons?"block":"none",Ae.appendChild(this.caseSensitive.domNode),Ae.appendChild(this.wholeWords.domNode),Ae.appendChild(this.regex.domNode),this.domNode.appendChild(Ae),K&&K.appendChild(this.domNode),this._register(he.i(this.inputBox.inputElement,"compositionstart",Ge=>{this.imeSessionInProgress=!0})),this._register(he.i(this.inputBox.inputElement,"compositionend",Ge=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,Ge=>this._onKeyDown.fire(Ge)),this.onkeyup(this.inputBox.inputElement,Ge=>this._onKeyUp.fire(Ge)),this.oninput(this.inputBox.inputElement,Ge=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,Ge=>this._onMouseDown.fire(Ge))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(K){this.fixFocusOnOptionClickEnabled=K}setEnabled(K){K?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(K){this.inputBox.value!==K&&(this.inputBox.value=K)}style(K){this.inputActiveOptionBorder=K.inputActiveOptionBorder,this.inputActiveOptionForeground=K.inputActiveOptionForeground,this.inputActiveOptionBackground=K.inputActiveOptionBackground,this.inputBackground=K.inputBackground,this.inputForeground=K.inputForeground,this.inputBorder=K.inputBorder,this.inputValidationInfoBackground=K.inputValidationInfoBackground,this.inputValidationInfoForeground=K.inputValidationInfoForeground,this.inputValidationInfoBorder=K.inputValidationInfoBorder,this.inputValidationWarningBackground=K.inputValidationWarningBackground,this.inputValidationWarningForeground=K.inputValidationWarningForeground,this.inputValidationWarningBorder=K.inputValidationWarningBorder,this.inputValidationErrorBackground=K.inputValidationErrorBackground,this.inputValidationErrorForeground=K.inputValidationErrorForeground,this.inputValidationErrorBorder=K.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const K={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(K),this.wholeWords.style(K),this.caseSensitive.style(K);const be={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(be)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(K){this.caseSensitive.checked=K}getWholeWords(){return this.wholeWords.checked}setWholeWords(K){this.wholeWords.checked=K}getRegex(){return this.regex.checked}setRegex(K){this.regex.checked=K,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}clearMessage(){this.inputBox.hideMessage()}}const re=Pe.a("defaultLabel","input"),We=Pe.a("label.preserveCaseCheckbox","Preserve Case");class tt extends je{constructor(K){super({icon:Ie.b.preserveCase,title:We+K.appendTitle,isChecked:K.isChecked,inputActiveOptionBorder:K.inputActiveOptionBorder,inputActiveOptionForeground:K.inputActiveOptionForeground,inputActiveOptionBackground:K.inputActiveOptionBackground})}}class Et extends xe.a{constructor(K,be,Re,Be){super();this._showOptionButtons=Re,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new Te.b),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new Te.b),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new Te.b),this._onInput=this._register(new Te.b),this._onKeyUp=this._register(new Te.b),this._onPreserveCaseKeyDown=this._register(new Te.b),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=be,this.placeholder=Be.placeholder||"",this.validation=Be.validation,this.label=Be.label||re,this.inputActiveOptionBorder=Be.inputActiveOptionBorder,this.inputActiveOptionForeground=Be.inputActiveOptionForeground,this.inputActiveOptionBackground=Be.inputActiveOptionBackground,this.inputBackground=Be.inputBackground,this.inputForeground=Be.inputForeground,this.inputBorder=Be.inputBorder,this.inputValidationInfoBorder=Be.inputValidationInfoBorder,this.inputValidationInfoBackground=Be.inputValidationInfoBackground,this.inputValidationInfoForeground=Be.inputValidationInfoForeground,this.inputValidationWarningBorder=Be.inputValidationWarningBorder,this.inputValidationWarningBackground=Be.inputValidationWarningBackground,this.inputValidationWarningForeground=Be.inputValidationWarningForeground,this.inputValidationErrorBorder=Be.inputValidationErrorBorder,this.inputValidationErrorBackground=Be.inputValidationErrorBackground,this.inputValidationErrorForeground=Be.inputValidationErrorForeground;const at=Be.appendPreserveCaseLabel||"",vt=Be.history||[],Gt=!!Be.flexibleHeight,Bt=!!Be.flexibleWidth,zt=Be.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new Tt.a(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:vt,showHistoryHint:Be.showHistoryHint,flexibleHeight:Gt,flexibleWidth:Bt,flexibleMaxHeight:zt})),this.preserveCase=this._register(new tt({appendTitle:at,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(q=>{this._onDidOptionChange.fire(q),!q&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(q=>{this._onPreserveCaseKeyDown.fire(q)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let ro=[this.preserveCase.domNode];this.onkeydown(this.domNode,q=>{if(q.equals(15)||q.equals(17)||q.equals(9)){let Ae=ro.indexOf(document.activeElement);if(Ae>=0){let Ge=-1;q.equals(17)?Ge=(Ae+1)%ro.length:q.equals(15)&&(Ae===0?Ge=ro.length-1:Ge=Ae-1),q.equals(9)?(ro[Ae].blur(),this.inputBox.focus()):Ge>=0&&ro[Ge].focus(),he.c.stop(q,!0)}}});let P=document.createElement("div");P.className="controls",P.style.display=this._showOptionButtons?"block":"none",P.appendChild(this.preserveCase.domNode),this.domNode.appendChild(P),K&&K.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,q=>this._onKeyDown.fire(q)),this.onkeyup(this.inputBox.inputElement,q=>this._onKeyUp.fire(q)),this.oninput(this.inputBox.inputElement,q=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,q=>this._onMouseDown.fire(q))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(K){K?this.enable():this.disable()}style(K){this.inputActiveOptionBorder=K.inputActiveOptionBorder,this.inputActiveOptionForeground=K.inputActiveOptionForeground,this.inputActiveOptionBackground=K.inputActiveOptionBackground,this.inputBackground=K.inputBackground,this.inputForeground=K.inputForeground,this.inputBorder=K.inputBorder,this.inputValidationInfoBackground=K.inputValidationInfoBackground,this.inputValidationInfoForeground=K.inputValidationInfoForeground,this.inputValidationInfoBorder=K.inputValidationInfoBorder,this.inputValidationWarningBackground=K.inputValidationWarningBackground,this.inputValidationWarningForeground=K.inputValidationWarningForeground,this.inputValidationWarningBorder=K.inputValidationWarningBorder,this.inputValidationErrorBackground=K.inputValidationErrorBackground,this.inputValidationErrorForeground=K.inputValidationErrorForeground,this.inputValidationErrorBorder=K.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const K={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(K);const be={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(be)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(K){this.preserveCase.checked=K}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(K){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=K,this.domNode.style.width=K+"px"}dispose(){super.dispose()}}var It=t("nrhi"),Rt=t("QVNv"),vo=function(K,be,Re,Be){var at=arguments.length,vt=at<3?be:Be===null?Be=Object.getOwnPropertyDescriptor(be,Re):Be,Gt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")vt=Reflect.decorate(K,be,Re,Be);else for(var Bt=K.length-1;Bt>=0;Bt--)(Gt=K[Bt])&&(vt=(at<3?Gt(vt):at>3?Gt(be,Re,vt):Gt(be,Re))||vt);return at>3&&vt&&Object.defineProperty(be,Re,vt),vt},Mo=function(K,be){return function(Re,Be){be(Re,Be,K)}};const xo="historyNavigationWidget",Do="historyNavigationForwardsEnabled",Lo="historyNavigationBackwardsEnabled";function To(K,be,Re){new H.c(Re,be).bindTo(K)}function Ht(K,be){return K.createScoped(be.target)}function Mt(K,be){return K.getContext(document.activeElement).getValue(be)}function Ue(K,be){const Re=Ht(K,be);To(Re,be,xo);const Be=new H.c(Do,!0).bindTo(Re),at=new H.c(Lo,!0).bindTo(Re);return{scopedContextKeyService:Re,historyNavigationForwardsEnablement:Be,historyNavigationBackwardsEnablement:at}}let dt=class extends it{constructor(be,Re,Be,at,vt=!1){super(be,Re,vt,Be);this._register(Ue(at,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};dt=vo([Mo(3,H.b)],dt);let Ut=class extends Et{constructor(be,Re,Be,at,vt=!1){super(be,Re,vt,Be);this._register(Ue(at,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};Ut=vo([Mo(3,H.b)],Ut),It.a.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:H.a.and(H.a.has(xo),H.a.equals(Lo,!0),Rt.b.Visible.isEqualTo(!1)),primary:16,secondary:[512|16],handler:K=>{const be=Mt(K.get(H.b),xo);if(be){const Re=be.historyNavigator;Re.showPreviousValue()}}}),It.a.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:H.a.and(H.a.has(xo),H.a.equals(Do,!0),Rt.b.Visible.isEqualTo(!1)),primary:18,secondary:[512|18],handler:K=>{const be=Mt(K.get(H.b),xo);if(be){const Re=be.historyNavigator;Re.showNextValue()}}});function Ye(K){var be,Re;return((be=K.lookupKeybinding("history.showPrevious"))===null||be===void 0?void 0:be.getElectronAccelerator())==="Up"&&((Re=K.lookupKeybinding("history.showNext"))===null||Re===void 0?void 0:Re.getElectronAccelerator())==="Down"}var qe=t("v1vZ"),ct=function(K,be,Re,Be){function at(vt){return vt instanceof Re?vt:new Re(function(Gt){Gt(vt)})}return new(Re||(Re=Promise))(function(vt,Gt){function Bt(P){try{ro(Be.next(P))}catch(q){Gt(q)}}function zt(P){try{ro(Be.throw(P))}catch(q){Gt(q)}}function ro(P){P.done?vt(P.value):at(P.value).then(Bt,zt)}ro((Be=Be.apply(K,be||[])).next())})};const _t=Object(qe.b)("find-selection",Ie.b.selection,Pe.a("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),Pt=Object(qe.b)("find-collapsed",Ie.b.chevronRight,Pe.a("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),Wt=Object(qe.b)("find-expanded",Ie.b.chevronDown,Pe.a("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Vt=Object(qe.b)("find-replace",Ie.b.replace,Pe.a("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),so=Object(qe.b)("find-replace-all",Ie.b.replaceAll,Pe.a("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),wo=Object(qe.b)("find-previous-match",Ie.b.arrowUp,Pe.a("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),No=Object(qe.b)("find-next-match",Ie.b.arrowDown,Pe.a("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),di=Pe.a("label.find","Find"),_o=Pe.a("placeholder.find","Find"),no=Pe.a("label.previousMatchButton","Previous Match"),Lt=Pe.a("label.nextMatchButton","Next Match"),xt=Pe.a("label.toggleSelectionFind","Find in Selection"),Nt=Pe.a("label.closeButton","Close"),rt=Pe.a("label.replace","Replace"),lt=Pe.a("placeholder.replace","Replace"),pt=Pe.a("label.replaceButton","Replace"),St=Pe.a("label.replaceAllButton","Replace All"),Qt=Pe.a("label.toggleReplaceButton","Toggle Replace"),bo=Pe.a("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",U),qt=Pe.a("label.matchesLocation","{0} of {1}"),Eo=Pe.a("label.noResults","No results"),Ro=419,zo=275,Bo=zo-54;let Jt=69;const fo=33,ri="ctrlEnterReplaceAll.windows.donotask",Zo=et.f?256:2048;class ci{constructor(K){this.afterLineNumber=K,this.heightInPx=fo,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function ki(K,be,Re){const Be=!!be.match(/\n/);if(Re&&Be&&Re.selectionStart>0){K.stopPropagation();return}}function wi(K,be,Re){const Be=!!be.match(/\n/);if(Re&&Be&&Re.selectionEnd<Re.value.length){K.stopPropagation();return}}class Zi extends xe.a{constructor(K,be,Re,Be,at,vt,Gt,Bt,zt){super();this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=K,this._controller=be,this._state=Re,this._contextViewProvider=Be,this._keybindingService=at,this._contextKeyService=vt,this._storageService=Bt,this._notificationService=zt,this._ctrlEnterReplaceAllWarningPrompted=!!Bt.getBoolean(ri,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new f.a(500),this._register(Object(B.i)(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(ro=>this._onStateChanged(ro))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(ro=>{if(ro.hasChanged(80)&&(this._codeEditor.getOption(80)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),ro.hasChanged(129)&&this._tryUpdateWidgetWidth(),ro.hasChanged(2)&&this.updateAccessibilitySupport(),ro.hasChanged(35)){const P=this._codeEditor.getOption(35).addExtraSpaceOnTop;P&&!this._viewZone&&(this._viewZone=new ci(0),this._showViewZone()),!P&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>ct(this,void 0,void 0,function*(){if(this._isVisible){let ro=yield this._controller.getGlobalBufferTerm();ro&&ro!==this._state.searchString&&(this._state.change({searchString:ro},!1),this._findInput.select())}}))),this._findInputFocused=oe.bindTo(vt),this._findFocusTracker=this._register(he.Y(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=$.bindTo(vt),this._replaceFocusTracker=this._register(he.Y(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(35).addExtraSpaceOnTop&&(this._viewZone=new ci(0)),this._applyTheme(Gt.getColorTheme()),this._register(Gt.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel(()=>{if(!this._isVisible)return;this._viewZoneId=void 0})),this._register(this._codeEditor.onDidScrollChange(ro=>{if(ro.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return Zi.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(K){if(K.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(K.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),K.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),K.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(80)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=he.I(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(K.isRevealed||K.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&(this._tryUpdateHeight()&&this._showViewZone()),K.isRegex&&this._findInput.setRegex(this._state.isRegex),K.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),K.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),K.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),K.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),K.searchString||K.matchesCount||K.matchesPosition){let be=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",be),this._updateMatchesCount(),this._updateButtons()}(K.searchString||K.currentMatch)&&this._layoutViewZone(),K.updateHistory&&this._delayedUpdateHistory(),K.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,Ke.f)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=Jt+"px",this._state.matchesCount>=U?this._matchesCount.title=bo:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let K;if(this._state.matchesCount>0){let be=String(this._state.matchesCount);this._state.matchesCount>=U&&(be+="+");let Re=String(this._state.matchesPosition);Re==="0"&&(Re="?"),K=x.v(qt,Re,be)}else K=Eo;this._matchesCount.appendChild(document.createTextNode(K)),Object(Oe.a)(this._getAriaLabel(K,this._state.currentMatch,this._state.searchString)),Jt=Math.max(Jt,this._matchesCount.clientWidth)}_getAriaLabel(K,be,Re){if(K===Eo)return Re===""?Pe.a("ariaSearchNoResultEmpty","{0} found",K):Pe.a("ariaSearchNoResult","{0} found for '{1}'",K,Re);if(be){const Be=Pe.a("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",K,Re,be.startLineNumber+":"+be.startColumn),at=this._codeEditor.getModel();if(at&&be.startLineNumber<=at.getLineCount()&&be.startLineNumber>=1){const vt=at.getLineContent(be.startLineNumber);return`${vt}, ${Be}`}return Be}return Pe.a("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",K,Re)}_updateToggleSelectionFindButton(){let K=this._codeEditor.getSelection(),be=K?K.startLineNumber!==K.endLineNumber||K.startColumn!==K.endColumn:!1,Re=this._toggleSelectionFind.checked;this._isVisible&&(Re||be)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let K=this._state.searchString.length>0,be=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&K&&be&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&K&&be&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&K),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&K),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let Re=!this._codeEditor.getOption(80);this._toggleReplaceBtn.setEnabled(this._isVisible&&Re)}_reveal(){if(this._revealTimeouts.forEach(K=>{clearTimeout(K)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const K=this._codeEditor.getSelection();switch(this._codeEditor.getOption(35).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":const Re=!!K&&K.startLineNumber!==K.endLineNumber;this._toggleSelectionFind.checked=Re;break;default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let be=!0;if(this._codeEditor.getOption(35).seedSearchStringFromSelection&&K){const Re=this._codeEditor.getDomNode();if(Re){const Be=he.D(Re),at=this._codeEditor.getScrolledVisiblePosition(K.getStartPosition()),vt=Be.left+(at?at.left:0),Gt=at?at.top:0;if(this._viewZone&&Gt<this._viewZone.heightInPx){K.endLineNumber>K.startLineNumber&&(be=!1);const Bt=he.G(this._domNode).left;vt>Bt&&(be=!1);const zt=this._codeEditor.getScrolledVisiblePosition(K.getEndPosition()),ro=Be.left+(zt?zt.left:0);ro>Bt&&(be=!1)}}}this._showViewZone(be)}}_hide(K){this._revealTimeouts.forEach(be=>{clearTimeout(be)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),K&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(K){const be=this._codeEditor.getOption(35).addExtraSpaceOnTop;if(!be){this._removeViewZone();return}if(!this._isVisible)return;const Re=this._viewZone;if(this._viewZoneId!==void 0||!Re)return;this._codeEditor.changeViewZones(Be=>{Re.heightInPx=this._getHeight(),this._viewZoneId=Be.addZone(Re),this._codeEditor.setScrollTop(K||this._codeEditor.getScrollTop()+Re.heightInPx)})}_showViewZone(K=!0){if(!this._isVisible)return;const be=this._codeEditor.getOption(35).addExtraSpaceOnTop;if(!be)return;this._viewZone===void 0&&(this._viewZone=new ci(0));const Re=this._viewZone;this._codeEditor.changeViewZones(Be=>{if(this._viewZoneId!==void 0){const at=this._getHeight();if(at===Re.heightInPx)return;let vt=at-Re.heightInPx;Re.heightInPx=at,Be.layoutZone(this._viewZoneId),K&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+vt);return}else{let at=this._getHeight();if(at-=this._codeEditor.getOption(74).top,at<=0)return;Re.heightInPx=at,this._viewZoneId=Be.addZone(Re),K&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+at)}})}_removeViewZone(){this._codeEditor.changeViewZones(K=>{this._viewZoneId!==void 0&&(K.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_applyTheme(K){let be={inputActiveOptionBorder:K.getColor(r.fb),inputActiveOptionBackground:K.getColor(r.eb),inputActiveOptionForeground:K.getColor(r.gb),inputBackground:K.getColor(r.hb),inputForeground:K.getColor(r.jb),inputBorder:K.getColor(r.ib),inputValidationInfoBackground:K.getColor(r.nb),inputValidationInfoForeground:K.getColor(r.pb),inputValidationInfoBorder:K.getColor(r.ob),inputValidationWarningBackground:K.getColor(r.qb),inputValidationWarningForeground:K.getColor(r.sb),inputValidationWarningBorder:K.getColor(r.rb),inputValidationErrorBackground:K.getColor(r.kb),inputValidationErrorForeground:K.getColor(r.mb),inputValidationErrorBorder:K.getColor(r.lb)};this._findInput.style(be),this._replaceInput.style(be),this._toggleSelectionFind.style(be)}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!he.N(this._domNode))return;const K=this._codeEditor.getLayoutInfo(),be=K.contentWidth;if(be<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const Re=K.width,Be=K.minimap.minimapWidth;let at=!1,vt=!1,Gt=!1;if(this._resized){let Bt=he.I(this._domNode);if(Bt>Ro){this._domNode.style.maxWidth=`${Re-28-Be-15}px`,this._replaceInput.width=he.I(this._findInput.domNode);return}}if(Ro+28+Be>=Re&&(vt=!0),Ro+28+Be-Jt>=Re&&(Gt=!0),Ro+28+Be-Jt>=Re+50&&(at=!0),this._domNode.classList.toggle("collapsed-find-widget",at),this._domNode.classList.toggle("narrow-find-widget",Gt),this._domNode.classList.toggle("reduced-find-widget",vt),!Gt&&!at&&(this._domNode.style.maxWidth=`${Re-28-Be-15}px`),this._resized){this._findInput.inputBox.layout();let Bt=this._findInput.inputBox.element.clientWidth;Bt>0&&(this._replaceInput.width=Bt)}else this._isReplaceVisible&&(this._replaceInput.width=he.I(this._findInput.domNode))}_getHeight(){let K=0;return K+=4,K+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(K+=4,K+=this._replaceInput.inputBox.height+2),K+=4,K}_tryUpdateHeight(){const K=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===K?!1:(this._cachedHeight=K,this._domNode.style.height=`${K}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(!this._codeEditor.hasModel())return;if(this._toggleSelectionFind.checked){let K=this._codeEditor.getSelections();K.map(be=>{be.endColumn===1&&be.endLineNumber>be.startLineNumber&&(be=be.setEndPosition(be.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(be.endLineNumber-1)));const Re=this._state.currentMatch;return be.startLineNumber!==be.endLineNumber&&!v.a.equalsRange(be,Re)?be:null}).filter(be=>!!be),K.length&&this._state.change({searchScope:K},!0)}}_onFindInputMouseDown(K){K.middleButton&&K.stopPropagation()}_onFindInputKeyDown(K){if(K.equals(Zo|3))if(this._keybindingService.dispatchEvent(K,K.target)){K.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(`
|
|
|
`),K.preventDefault();return}if(K.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),K.preventDefault();return}if(K.equals(2048|18)){this._codeEditor.focus(),K.preventDefault();return}if(K.equals(16))return ki(K,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(K.equals(18))return wi(K,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(K){if(K.equals(Zo|3))if(this._keybindingService.dispatchEvent(K,K.target)){K.preventDefault();return}else{et.i&&et.g&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(Pe.a("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(ri,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(`
|
|
|
`),K.preventDefault();return}if(K.equals(2)){this._findInput.focusOnCaseSensitive(),K.preventDefault();return}if(K.equals(1024|2)){this._findInput.focus(),K.preventDefault();return}if(K.equals(2048|18)){this._codeEditor.focus(),K.preventDefault();return}if(K.equals(16))return ki(K,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(K.equals(18))return wi(K,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(K){return 0}_keybindingLabelFor(K){let be=this._keybindingService.lookupKeybinding(K);return be?` (${be.getLabel()})`:""}_buildDomNode(){const K=!0,be=!0;this._findInput=this._register(new dt(null,this._contextViewProvider,{width:Bo,label:di,placeholder:_o,appendCaseSensitiveLabel:this._keybindingLabelFor(ie.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(ie.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(ie.ToggleRegexCommand),validation:Bt=>{if(Bt.length===0||!this._findInput.getRegex())return null;try{return new RegExp(Bt,"gu"),null}catch(zt){return{content:zt.message}}},flexibleHeight:K,flexibleWidth:be,flexibleMaxHeight:118,showHistoryHint:()=>Ye(this._keybindingService)},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(Bt=>this._onFindInputKeyDown(Bt))),this._register(this._findInput.inputBox.onDidChange(()=>{if(this._ignoreChangeEvent)return;this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(Bt=>{Bt.equals(1024|2)&&(this._isReplaceVisible&&(this._replaceInput.focus(),Bt.preventDefault()))})),this._register(this._findInput.onRegexKeyDown(Bt=>{Bt.equals(2)&&(this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),Bt.preventDefault()))})),this._register(this._findInput.inputBox.onDidHeightChange(Bt=>{this._tryUpdateHeight()&&this._showViewZone()})),et.d&&this._register(this._findInput.onMouseDown(Bt=>this._onFindInputMouseDown(Bt))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new Vi({label:no+this._keybindingLabelFor(ie.PreviousMatchFindAction),icon:wo,onTrigger:()=>{this._codeEditor.getAction(ie.PreviousMatchFindAction).run().then(void 0,Ke.f)}})),this._nextBtn=this._register(new Vi({label:Lt+this._keybindingLabelFor(ie.NextMatchFindAction),icon:No,onTrigger:()=>{this._codeEditor.getAction(ie.NextMatchFindAction).run().then(void 0,Ke.f)}}));let Re=document.createElement("div");Re.className="find-part",Re.appendChild(this._findInput.domNode);const Be=document.createElement("div");Be.className="find-actions",Re.appendChild(Be),Be.appendChild(this._matchesCount),Be.appendChild(this._prevBtn.domNode),Be.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new je({icon:_t,title:xt+this._keybindingLabelFor(ie.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let Bt=this._codeEditor.getSelections();Bt.map(zt=>(zt.endColumn===1&&zt.endLineNumber>zt.startLineNumber&&(zt=zt.setEndPosition(zt.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(zt.endLineNumber-1))),zt.isEmpty()?null:zt)).filter(zt=>!!zt),Bt.length&&this._state.change({searchScope:Bt},!0)}}else this._state.change({searchScope:null},!0)})),Be.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new Vi({label:Nt+this._keybindingLabelFor(ie.CloseFindWidgetCommand),icon:qe.c,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:Bt=>{Bt.equals(2)&&(this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),Bt.preventDefault()))}})),Be.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new Ut(null,void 0,{label:rt,placeholder:lt,appendPreserveCaseLabel:this._keybindingLabelFor(ie.TogglePreserveCaseCommand),history:[],flexibleHeight:K,flexibleWidth:be,flexibleMaxHeight:118,showHistoryHint:()=>Ye(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(Bt=>this._onReplaceInputKeyDown(Bt))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(Bt=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(Bt=>{Bt.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),Bt.preventDefault())})),this._replaceBtn=this._register(new Vi({label:pt+this._keybindingLabelFor(ie.ReplaceOneAction),icon:Vt,onTrigger:()=>{this._controller.replace()},onKeyDown:Bt=>{Bt.equals(1024|2)&&(this._closeBtn.focus(),Bt.preventDefault())}})),this._replaceAllBtn=this._register(new Vi({label:St+this._keybindingLabelFor(ie.ReplaceAllAction),icon:so,onTrigger:()=>{this._controller.replaceAll()}}));let at=document.createElement("div");at.className="replace-part",at.appendChild(this._replaceInput.domNode);const vt=document.createElement("div");vt.className="replace-actions",at.appendChild(vt),vt.appendChild(this._replaceBtn.domNode),vt.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new Vi({label:Qt,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=he.I(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width=`${Ro}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(Re),this._domNode.appendChild(at),this._resizeSash=new nt.b(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let Gt=Ro;this._register(this._resizeSash.onDidStart(()=>{Gt=he.I(this._domNode)})),this._register(this._resizeSash.onDidChange(Bt=>{this._resized=!0;let zt=Gt+Bt.startX-Bt.currentX;if(zt<Ro)return;const ro=parseFloat(he.A(this._domNode).maxWidth)||0;if(zt>ro)return;this._domNode.style.width=`${zt}px`,this._isReplaceVisible&&(this._replaceInput.width=he.I(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight()})),this._register(this._resizeSash.onDidReset(()=>{const Bt=he.I(this._domNode);if(Bt<Ro)return;let zt=Ro;if(!this._resized||Bt===Ro){const ro=this._codeEditor.getLayoutInfo();zt=ro.width-28-ro.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${zt}px`,this._isReplaceVisible&&(this._replaceInput.width=he.I(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const K=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(K!==2)}}Zi.ID="editor.contrib.findWidget";class Vi extends xe.a{constructor(K){super();this._opts=K;let be="button";this._opts.className&&(be=be+" "+this._opts.className),this._opts.icon&&(be=be+" "+_.d.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=be,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,Re=>{this._opts.onTrigger(),Re.preventDefault()}),this.onkeydown(this._domNode,Re=>{if(Re.equals(10)||Re.equals(3)){this._opts.onTrigger(),Re.preventDefault();return}this._opts.onKeyDown&&this._opts.onKeyDown(Re)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(K){this._domNode.classList.toggle("disabled",!K),this._domNode.setAttribute("aria-disabled",String(!K)),this._domNode.tabIndex=K?0:-1}setExpanded(K){this._domNode.setAttribute("aria-expanded",String(!!K)),K?(this._domNode.classList.remove(..._.d.asClassNameArray(Pt)),this._domNode.classList.add(..._.d.asClassNameArray(Wt))):(this._domNode.classList.remove(..._.d.asClassNameArray(Wt)),this._domNode.classList.add(..._.d.asClassNameArray(Pt)))}}Object(_.f)((K,be)=>{const Re=(ft,Dt)=>{Dt&&be.addRule(`.monaco-editor ${ft} { background-color: ${Dt}; }`)};Re(".findMatch",K.getColor(r.x)),Re(".currentFindMatch",K.getColor(r.v)),Re(".findScope",K.getColor(r.z));const Be=K.getColor(r.W);Re(".find-widget",Be);const at=K.getColor(r.Nc);at&&be.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${at}; }`);const vt=K.getColor(r.y);vt&&be.addRule(`.monaco-editor .findMatch { border: 1px ${K.type==="hc"?"dotted":"solid"} ${vt}; box-sizing: border-box; }`);const Gt=K.getColor(r.w);Gt&&be.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${Gt}; padding: 1px; box-sizing: border-box; }`);const Bt=K.getColor(r.A);Bt&&be.addRule(`.monaco-editor .findScope { border: 1px ${K.type==="hc"?"dashed":"solid"} ${Bt}; }`);const zt=K.getColor(r.h);zt&&be.addRule(`.monaco-editor .find-widget { border: 1px solid ${zt}; }`);const ro=K.getColor(r.Y);ro&&be.addRule(`.monaco-editor .find-widget { color: ${ro}; }`);const P=K.getColor(r.ab);P&&be.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${P}; }`);const q=K.getColor(r.Z);if(q)be.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${q}; }`);else{const ft=K.getColor(r.X);ft&&be.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${ft}; }`)}const Ae=K.getColor(r.Kc);Ae&&be.addRule(`
|
|
|
.monaco-editor .find-widget .button:not(.disabled):hover,
|
|
|
.monaco-editor .find-widget .codicon-find-selection:hover {
|
|
|
background-color: ${Ae} !important;
|
|
|
}
|
|
|
`);const Ge=K.getColor(r.bb);Ge&&be.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${Ge}; }`)});var vi=t("fjLI"),sn=t("9XeP"),en=t("Uzvx"),on=t("bexQ"),cn=t("sM1p"),Bi=t("A+jI"),zi=function(K,be,Re,Be){var at=arguments.length,vt=at<3?be:Be===null?Be=Object.getOwnPropertyDescriptor(be,Re):Be,Gt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")vt=Reflect.decorate(K,be,Re,Be);else for(var Bt=K.length-1;Bt>=0;Bt--)(Gt=K[Bt])&&(vt=(at<3?Gt(vt):at>3?Gt(be,Re,vt):Gt(be,Re))||vt);return at>3&&vt&&Object.defineProperty(be,Re,vt),vt},Ji=function(K,be){return function(Re,Be){be(Re,Be,K)}},ui=function(K,be,Re,Be){function at(vt){return vt instanceof Re?vt:new Re(function(Gt){Gt(vt)})}return new(Re||(Re=Promise))(function(vt,Gt){function Bt(P){try{ro(Be.next(P))}catch(q){Gt(q)}}function zt(P){try{ro(Be.throw(P))}catch(q){Gt(q)}}function ro(P){P.done?vt(P.value):at(P.value).then(Bt,zt)}ro((Be=Be.apply(K,be||[])).next())})};const pn=524288;function Hi(K,be="single",Re=!1){if(!K.hasModel())return null;const Be=K.getSelection();if(be==="single"&&Be.startLineNumber===Be.endLineNumber||be==="multiple"){if(Be.isEmpty()){const at=K.getConfiguredWordAtPosition(Be.getStartPosition());if(at&&Re===!1)return at.word}else if(K.getModel().getValueLengthInRange(Be)<pn)return K.getModel().getValueInRange(Be)}return null}let Oi=class K extends B.a{constructor(be,Re,Be,at){super();this._editor=be,this._findWidgetVisible=Z.bindTo(Re),this._contextKeyService=Re,this._storageService=Be,this._clipboardService=at,this._updateHistoryDelayer=new f.a(500),this._state=this._register(new we),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(vt=>this._onStateChanged(vt))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let vt=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),vt&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(35).loop})}))}get editor(){return this._editor}static get(be){return be.getContribution(K.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(be){this.saveQueryState(be),be.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),be.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(be){be.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),be.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),be.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),be.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!oe.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let be=this._editor.getSelections();be.map(Re=>(Re.endColumn===1&&Re.endLineNumber>Re.startLineNumber&&(Re=Re.setEndPosition(Re.endLineNumber-1,this._editor.getModel().getLineMaxColumn(Re.endLineNumber-1))),Re.isEmpty()?null:Re)).filter(Re=>!!Re),be.length&&this._state.change({searchScope:be},!0)}}setSearchString(be){this._state.isRegex&&(be=x.t(be)),this._state.change({searchString:be},!1)}highlightFindOptions(be=!1){}_start(be){return ui(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;let Re={isRevealed:!0};if(be.seedSearchStringFromSelection==="single"){let Be=Hi(this._editor,be.seedSearchStringFromSelection,be.seedSearchStringFromNonEmptySelection);Be&&(this._state.isRegex?Re.searchString=x.t(Be):Re.searchString=Be)}else if(be.seedSearchStringFromSelection==="multiple"&&!be.updateSearchScope){let Be=Hi(this._editor,be.seedSearchStringFromSelection);Be&&(Re.searchString=Be)}if(!Re.searchString&&be.seedSearchStringFromGlobalClipboard){let Be=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;Be&&(Re.searchString=Be)}if(be.forceRevealReplace?Re.isReplaceRevealed=!0:this._findWidgetVisible.get()||(Re.isReplaceRevealed=!1),be.updateSearchScope){let Be=this._editor.getSelections();Be.some(at=>!at.isEmpty())&&(Re.searchScope=Be)}Re.loop=be.loop,this._state.change(Re,!1),this._model||(this._model=new J(this._editor,this._state))})}start(be){return this._start(be)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return ui(this,void 0,void 0,function*(){return this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(be){this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(be)}};Oi.ID="editor.contrib.findController",Oi=zi([Ji(1,H.b),Ji(2,Bi.a),Ji(3,sn.a)],Oi);let Ii=class extends Oi{constructor(be,Re,Be,at,vt,Gt,Bt,zt){super(be,Be,Bt,zt);this._contextViewService=Re,this._keybindingService=at,this._themeService=vt,this._notificationService=Gt,this._widget=null,this._findOptionsWidget=null}_start(be){const Re=Object.create(null,{_start:{get:()=>super._start}});return ui(this,void 0,void 0,function*(){this._widget||this._createFindWidget();const Be=this._editor.getSelection();let at=!1;switch(this._editor.getOption(35).autoFindInSelection){case"always":at=!0;break;case"never":at=!1;break;case"multiline":const vt=!!Be&&Be.startLineNumber!==Be.endLineNumber;at=vt;break;default:break}be.updateSearchScope=at,yield Re._start.call(this,be),this._widget&&(be.shouldFocus===2?this._widget.focusReplaceInput():be.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(be=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!be?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new Zi(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new Me(this._editor,this._state,this._keybindingService,this._themeService))}};Ii=zi([Ji(1,en.b),Ji(2,H.b),Ji(3,on.a),Ji(4,_.b),Ji(5,cn.a),Ji(6,Bi.a),Ji(7,sn.a)],Ii);const Qi=Object(N.p)(new N.f({id:ie.StartFindAction,label:Pe.a("startFindAction","Find"),alias:"Find",precondition:H.a.or(A.a.focus,H.a.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2048|36,weight:100},menuOpts:{menuId:vi.b.MenubarEditMenu,group:"3_find",title:Pe.a({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));Qi.addImplementation(0,(K,be,Re)=>{const Be=Oi.get(be);return Be?Be.start({forceRevealReplace:!1,seedSearchStringFromSelection:be.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:be.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:be.getOption(35).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:be.getOption(35).loop}):!1});class Li extends N.b{constructor(){super({id:ie.StartFindWithSelection,label:Pe.a("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2048|35},weight:100}})}run(K,be){return ui(this,void 0,void 0,function*(){let Re=Oi.get(be);Re&&(yield Re.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:be.getOption(35).loop}),Re.setGlobalBufferTerm(Re.getState().searchString))})}}class Ui extends N.b{run(K,be){return ui(this,void 0,void 0,function*(){let Re=Oi.get(be);Re&&!this._run(Re)&&(yield Re.start({forceRevealReplace:!1,seedSearchStringFromSelection:Re.getState().searchString.length===0&&be.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:be.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:be.getOption(35).loop}),this._run(Re))})}}class fi extends Ui{constructor(){super({id:ie.NextMatchFindAction,label:Pe.a("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:A.a.focus,primary:61,mac:{primary:2048|37,secondary:[61]},weight:100},{kbExpr:H.a.and(A.a.focus,oe),primary:3,weight:100}]})}_run(K){const be=K.moveToNextMatch();return be?(K.editor.pushUndoStop(),!0):!1}}class $i extends Ui{constructor(){super({id:ie.PreviousMatchFindAction,label:Pe.a("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:A.a.focus,primary:1024|61,mac:{primary:2048|1024|37,secondary:[1024|61]},weight:100},{kbExpr:H.a.and(A.a.focus,oe),primary:1024|3,weight:100}]})}_run(K){return K.moveToPrevMatch()}}class rn extends N.b{run(K,be){return ui(this,void 0,void 0,function*(){let Re=Oi.get(be);if(!Re)return;const Be=be.getOption(35).seedSearchStringFromSelection==="selection";let at=null;be.getOption(35).seedSearchStringFromSelection!=="never"&&(at=Hi(be,"single",Be)),at&&Re.setSearchString(at),this._run(Re)||(yield Re.start({forceRevealReplace:!1,seedSearchStringFromSelection:be.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:Be,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:be.getOption(35).loop}),this._run(Re))})}}class _i extends rn{constructor(){super({id:ie.NextSelectionMatchFindAction,label:Pe.a("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:A.a.focus,primary:2048|61,weight:100}})}_run(K){return K.moveToNextMatch()}}class Pi extends rn{constructor(){super({id:ie.PreviousSelectionMatchFindAction,label:Pe.a("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:A.a.focus,primary:2048|1024|61,weight:100}})}_run(K){return K.moveToPrevMatch()}}const ht=Object(N.p)(new N.f({id:ie.StartFindReplaceAction,label:Pe.a("startReplace","Replace"),alias:"Replace",precondition:H.a.or(A.a.focus,H.a.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2048|38,mac:{primary:2048|512|36},weight:100},menuOpts:{menuId:vi.b.MenubarEditMenu,group:"3_find",title:Pe.a({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));ht.addImplementation(0,(K,be,Re)=>{if(!be.hasModel()||be.getOption(80))return!1;const Be=Oi.get(be);if(!Be)return!1;const at=be.getSelection(),vt=Be.isFindInputFocused(),Gt=!at.isEmpty()&&at.startLineNumber===at.endLineNumber&&be.getOption(35).seedSearchStringFromSelection!=="never"&&!vt,Bt=vt||Gt?2:1;return Be.start({forceRevealReplace:!0,seedSearchStringFromSelection:Gt?"single":"none",seedSearchStringFromNonEmptySelection:be.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:be.getOption(35).seedSearchStringFromSelection!=="never",shouldFocus:Bt,shouldAnimate:!0,updateSearchScope:!1,loop:be.getOption(35).loop})}),Object(N.l)(Oi.ID,Ii),Object(N.j)(Li),Object(N.j)(fi),Object(N.j)($i),Object(N.j)(_i),Object(N.j)(Pi);const Ve=N.c.bindToContribution(Oi.get);Object(N.k)(new Ve({id:ie.CloseFindWidgetCommand,precondition:Z,handler:K=>K.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:H.a.and(A.a.focus,H.a.not("isComposing")),primary:9,secondary:[1024|9]}})),Object(N.k)(new Ve({id:ie.ToggleCaseSensitiveCommand,precondition:void 0,handler:K=>K.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:te.primary,mac:te.mac,win:te.win,linux:te.linux}})),Object(N.k)(new Ve({id:ie.ToggleWholeWordCommand,precondition:void 0,handler:K=>K.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:ne.primary,mac:ne.mac,win:ne.win,linux:ne.linux}})),Object(N.k)(new Ve({id:ie.ToggleRegexCommand,precondition:void 0,handler:K=>K.toggleRegex(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:Ee.primary,mac:Ee.mac,win:Ee.win,linux:Ee.linux}})),Object(N.k)(new Ve({id:ie.ToggleSearchScopeCommand,precondition:void 0,handler:K=>K.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:fe.primary,mac:fe.mac,win:fe.win,linux:fe.linux}})),Object(N.k)(new Ve({id:ie.TogglePreserveCaseCommand,precondition:void 0,handler:K=>K.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:ee.primary,mac:ee.mac,win:ee.win,linux:ee.linux}})),Object(N.k)(new Ve({id:ie.ReplaceOneAction,precondition:Z,handler:K=>K.replace(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:2048|1024|22}})),Object(N.k)(new Ve({id:ie.ReplaceOneAction,precondition:Z,handler:K=>K.replace(),kbOpts:{weight:100+5,kbExpr:H.a.and(A.a.focus,$),primary:3}})),Object(N.k)(new Ve({id:ie.ReplaceAllAction,precondition:Z,handler:K=>K.replaceAll(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:2048|512|3}})),Object(N.k)(new Ve({id:ie.ReplaceAllAction,precondition:Z,handler:K=>K.replaceAll(),kbOpts:{weight:100+5,kbExpr:H.a.and(A.a.focus,$),primary:void 0,mac:{primary:2048|3}}})),Object(N.k)(new Ve({id:ie.SelectAllMatchesAction,precondition:Z,handler:K=>K.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:A.a.focus,primary:512|3}}))},oiKk:function(mt,M,t){"use strict";t.r(M),t.d(M,"IPadShowKeyboard",function(){return I});var f=t("ci+S"),B=t.n(f),x=t("EffR"),N=t("pmY6"),A=t("sswD"),F=t("MNsG");class I extends N.a{constructor(v){super();this.editor=v,this.widget=null,F.c&&(this._register(v.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const v=!this.editor.getOption(80);!this.widget&&v?this.widget=new L(this.editor):this.widget&&!v&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}I.ID="editor.contrib.iPadShowKeyboard";class L extends N.a{constructor(v){super();this.editor=v,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(x.i(this._domNode,"touchstart",m=>{this.editor.focus()})),this._register(x.i(this._domNode,"focus",m=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return L.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}L.ID="editor.contrib.ShowKeyboardWidget",Object(A.l)(I.ID,I)},p3Ex:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:function(){return t.e(324).then(t.bind(null,"/Om3"))}})},p5tG:function(mt,M,t){"use strict";t.r(M),t.d(M,"jsonDefaults",function(){return I});var f=t("M/lh"),B=t.n(f),x=t("CriS"),N=function(){function v(m,d,D){this._onDidChange=new x.Emitter,this._languageId=m,this.setDiagnosticsOptions(d),this.setModeConfiguration(D)}return Object.defineProperty(v.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!1,configurable:!0}),v.prototype.setDiagnosticsOptions=function(m){this._diagnosticsOptions=m||Object.create(null),this._onDidChange.fire(this)},v.prototype.setModeConfiguration=function(m){this._modeConfiguration=m||Object.create(null),this._onDidChange.fire(this)},v}(),A={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},F={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},I=new N("json",A,F);x.languages.json={jsonDefaults:I};function L(){return t.e(316).then(t.bind(null,"R7lK"))}x.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),x.languages.onLanguage("json",function(){L().then(function(v){return v.setupMode(I)})})},pAvP:function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var f=t("Cg/j");const B="editorWorkerService",x=Object(f.c)(B)},pI2L:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:function(){return t.e(356).then(t.bind(null,"KpXS"))}})},pg8w:function(mt,M,t){"use strict";t.d(M,"a",function(){return F}),t.d(M,"b",function(){return I});var f=t("EffR"),B=t("6OMU"),x=t("ZCR3"),N=t("pmY6"),A=function(L,v,m,d){var D=arguments.length,S=D<3?v:d===null?d=Object.getOwnPropertyDescriptor(v,m):d,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(L,v,m,d);else for(var _=L.length-1;_>=0;_--)(r=L[_])&&(S=(D<3?r(S):D>3?r(v,m,S):r(v,m))||S);return D>3&&S&&Object.defineProperty(v,m,S),S},F;(function(L){L.Tap="-monaco-gesturetap",L.Change="-monaco-gesturechange",L.Start="-monaco-gesturestart",L.End="-monaco-gesturesend",L.Contextmenu="-monaco-gesturecontextmenu"})(F||(F={}));class I extends N.a{constructor(){super();this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(f.i(document,"touchstart",L=>this.onTouchStart(L),{passive:!1})),this._register(f.i(document,"touchend",L=>this.onTouchEnd(L))),this._register(f.i(document,"touchmove",L=>this.onTouchMove(L),{passive:!1}))}static addTarget(L){return I.isTouchDevice()?(I.INSTANCE||(I.INSTANCE=new I),I.INSTANCE.targets.push(L),{dispose:()=>{I.INSTANCE.targets=I.INSTANCE.targets.filter(v=>v!==L)}}):N.a.None}static ignoreTarget(L){return I.isTouchDevice()?(I.INSTANCE||(I.INSTANCE=new I),I.INSTANCE.ignoreTargets.push(L),{dispose:()=>{I.INSTANCE.ignoreTargets=I.INSTANCE.ignoreTargets.filter(v=>v!==L)}}):N.a.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(L){let v=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let m=0,d=L.targetTouches.length;m<d;m++){let D=L.targetTouches.item(m);this.activeTouches[D.identifier]={id:D.identifier,initialTarget:D.target,initialTimeStamp:v,initialPageX:D.pageX,initialPageY:D.pageY,rollingTimestamps:[v],rollingPageX:[D.pageX],rollingPageY:[D.pageY]};let S=this.newGestureEvent(F.Start,D.target);S.pageX=D.pageX,S.pageY=D.pageY,this.dispatchEvent(S)}this.dispatched&&(L.preventDefault(),L.stopPropagation(),this.dispatched=!1)}onTouchEnd(L){let v=Date.now(),m=Object.keys(this.activeTouches).length;for(let d=0,D=L.changedTouches.length;d<D;d++){let S=L.changedTouches.item(d);if(!this.activeTouches.hasOwnProperty(String(S.identifier))){console.warn("move of an UNKNOWN touch",S);continue}let r=this.activeTouches[S.identifier],_=Date.now()-r.initialTimeStamp;if(_<I.HOLD_DELAY&&Math.abs(r.initialPageX-B.t(r.rollingPageX))<30&&Math.abs(r.initialPageY-B.t(r.rollingPageY))<30){let b=this.newGestureEvent(F.Tap,r.initialTarget);b.pageX=B.t(r.rollingPageX),b.pageY=B.t(r.rollingPageY),this.dispatchEvent(b)}else if(_>=I.HOLD_DELAY&&Math.abs(r.initialPageX-B.t(r.rollingPageX))<30&&Math.abs(r.initialPageY-B.t(r.rollingPageY))<30){let b=this.newGestureEvent(F.Contextmenu,r.initialTarget);b.pageX=B.t(r.rollingPageX),b.pageY=B.t(r.rollingPageY),this.dispatchEvent(b)}else if(m===1){let b=B.t(r.rollingPageX),h=B.t(r.rollingPageY),c=B.t(r.rollingTimestamps)-r.rollingTimestamps[0],p=b-r.rollingPageX[0],E=h-r.rollingPageY[0];const y=this.targets.filter(C=>r.initialTarget instanceof Node&&C.contains(r.initialTarget));this.inertia(y,v,Math.abs(p)/c,p>0?1:-1,b,Math.abs(E)/c,E>0?1:-1,h)}this.dispatchEvent(this.newGestureEvent(F.End,r.initialTarget)),delete this.activeTouches[S.identifier]}this.dispatched&&(L.preventDefault(),L.stopPropagation(),this.dispatched=!1)}newGestureEvent(L,v){let m=document.createEvent("CustomEvent");return m.initEvent(L,!1,!0),m.initialTarget=v,m.tapCount=0,m}dispatchEvent(L){if(L.type===F.Tap){const v=new Date().getTime();let m=0;v-this._lastSetTapCountTime>I.CLEAR_TAP_COUNT_TIME?m=1:m=2,this._lastSetTapCountTime=v,L.tapCount=m}else(L.type===F.Change||L.type===F.Contextmenu)&&(this._lastSetTapCountTime=0);for(let v=0;v<this.ignoreTargets.length;v++)if(L.initialTarget instanceof Node&&this.ignoreTargets[v].contains(L.initialTarget))return;this.targets.forEach(v=>{L.initialTarget instanceof Node&&v.contains(L.initialTarget)&&(v.dispatchEvent(L),this.dispatched=!0)})}inertia(L,v,m,d,D,S,r,_){this.handle=f.V(()=>{let b=Date.now(),h=b-v,c=0,p=0,E=!0;m+=I.SCROLL_FRICTION*h,S+=I.SCROLL_FRICTION*h,m>0&&(E=!1,c=d*m*h),S>0&&(E=!1,p=r*S*h);let y=this.newGestureEvent(F.Change);y.translationX=c,y.translationY=p,L.forEach(C=>C.dispatchEvent(y)),E||this.inertia(L,b,m,d,D+c,S,r,_+p)})}onTouchMove(L){let v=Date.now();for(let m=0,d=L.changedTouches.length;m<d;m++){let D=L.changedTouches.item(m);if(!this.activeTouches.hasOwnProperty(String(D.identifier))){console.warn("end of an UNKNOWN touch",D);continue}let S=this.activeTouches[D.identifier],r=this.newGestureEvent(F.Change,S.initialTarget);r.translationX=D.pageX-B.t(S.rollingPageX),r.translationY=D.pageY-B.t(S.rollingPageY),r.pageX=D.pageX,r.pageY=D.pageY,this.dispatchEvent(r),S.rollingPageX.length>3&&(S.rollingPageX.shift(),S.rollingPageY.shift(),S.rollingTimestamps.shift()),S.rollingPageX.push(D.pageX),S.rollingPageY.push(D.pageY),S.rollingTimestamps.push(v)}this.dispatched&&(L.preventDefault(),L.stopPropagation(),this.dispatched=!1)}}I.SCROLL_FRICTION=-.005,I.HOLD_DELAY=700,I.CLEAR_TAP_COUNT_TIME=400,A([x.a],I,"isTouchDevice",null)},ptcw:function(mt,M,t){"use strict";t.d(M,"d",function(){return B}),t.d(M,"a",function(){return N}),t.d(M,"b",function(){return A}),t.d(M,"e",function(){return F}),t.d(M,"c",function(){return L});var f=t("MD5Z");function B(v,m){const d=Object.create(null);for(let D in m){const S=m[D];S&&(d[D]=Object(f.xc)(S,v))}return d}function x(v,m,d){function D(){const S=B(v.getColorTheme(),m);typeof d=="function"?d(S):d.style(S)}return D(),v.onDidColorThemeChange(D)}function N(v,m,d){return x(m,{badgeBackground:(d==null?void 0:d.badgeBackground)||f.c,badgeForeground:(d==null?void 0:d.badgeForeground)||f.d,badgeBorder:f.h},v)}function A(v,m,d){return x(m,Object.assign(Object.assign({},F),d||{}),v)}const F={listFocusBackground:f.Eb,listFocusForeground:f.Fb,listFocusOutline:f.Hb,listActiveSelectionBackground:f.xb,listActiveSelectionForeground:f.yb,listActiveSelectionIconForeground:f.zb,listFocusAndSelectionBackground:f.xb,listFocusAndSelectionForeground:f.yb,listInactiveSelectionBackground:f.Nb,listInactiveSelectionIconForeground:f.Pb,listInactiveSelectionForeground:f.Ob,listInactiveFocusBackground:f.Lb,listInactiveFocusOutline:f.Mb,listHoverBackground:f.Jb,listHoverForeground:f.Kb,listDropBackground:f.Ab,listSelectionOutline:f.b,listHoverOutline:f.b,listFilterWidgetBackground:f.Bb,listFilterWidgetOutline:f.Db,listFilterWidgetNoMatchesOutline:f.Cb,listMatchesShadow:f.Nc,treeIndentGuidesStroke:f.Mc,tableColumnsBorder:f.Gc},I={shadowColor:f.Nc,borderColor:f.Rb,foregroundColor:f.Sb,backgroundColor:f.Qb,selectionForegroundColor:f.Vb,selectionBackgroundColor:f.Tb,selectionBorderColor:f.Ub,separatorColor:f.Wb};function L(v,m,d){return x(m,Object.assign(Object.assign({},I),d),v)}},"q/I2":function(mt,M,t){},q8qy:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:function(){return t.e(344).then(t.bind(null,"ywQP"))}})},qNAo:function(mt,M,t){"use strict";t.d(M,"i",function(){return N}),t.d(M,"b",function(){return F}),t.d(M,"c",function(){return L}),t.d(M,"f",function(){return v}),t.d(M,"g",function(){return m}),t.d(M,"a",function(){return d}),t.d(M,"e",function(){return D}),t.d(M,"h",function(){return S}),t.d(M,"d",function(){return r});var f=t("N0LK"),B=t("cGHE"),x=t("aokT");class N{constructor(_,b,h,c){this._viewportBrand=void 0,this.top=_|0,this.left=b|0,this.width=h|0,this.height=c|0}}class A{constructor(_,b){this.outputLineIndex=_,this.outputOffset=b}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(_,b){const h=this.outputLineIndex>0?b:0;return new B.a(_+this.outputLineIndex,h+this.outputOffset+1)}}class F{constructor(_,b,h,c,p){this.breakOffsets=_,this.breakOffsetsVisibleColumn=b,this.wrappedTextIndentLength=h,this.injectionOffsets=c,this.injectionOptions=p}getInputOffsetOfOutputPosition(_,b){let h=0;if(_===0?h=b:h=this.breakOffsets[_-1]+b,this.injectionOffsets!==null)for(let c=0;c<this.injectionOffsets.length&&h>this.injectionOffsets[c];c++)h<this.injectionOffsets[c]+this.injectionOptions[c].content.length?h=this.injectionOffsets[c]:h-=this.injectionOptions[c].content.length;return h}getOutputPositionOfInputOffset(_,b=2){let h=0;if(this.injectionOffsets!==null)for(let c=0;c<this.injectionOffsets.length&&!(_<this.injectionOffsets[c]);c++){if(b!==1&&_===this.injectionOffsets[c])break;h+=this.injectionOptions[c].content.length}return _+=h,this.getOutputPositionOfOffsetInUnwrappedLine(_,b)}getOutputPositionOfOffsetInUnwrappedLine(_,b=2){let h=0,c=this.breakOffsets.length-1,p=0,E=0;for(;h<=c;){p=h+(c-h)/2|0;const y=this.breakOffsets[p];if(E=p>0?this.breakOffsets[p-1]:0,b===0)if(_<=E)c=p-1;else if(_>y)h=p+1;else break;else if(_<E)c=p-1;else if(_>=y)h=p+1;else break}return new A(p,_-E)}outputPositionToOffsetInUnwrappedLine(_,b){let h=(_>0?this.breakOffsets[_-1]:0)+b;return _>0&&(h-=this.wrappedTextIndentLength),h}normalizeOffsetAroundInjections(_,b){const h=this.getInjectedTextAtOffset(_);if(!h)return _;if(b===2)return _===h.offsetInUnwrappedLine+h.length?h.offsetInUnwrappedLine+h.length:h.offsetInUnwrappedLine;if(b===1){let E=h.offsetInUnwrappedLine+h.length,y=h.injectedTextIndex;for(;y+1<this.injectionOffsets.length&&this.injectionOffsets[y+1]===this.injectionOffsets[y];)E+=this.injectionOptions[y+1].content.length,y++;return E}let c=h.offsetInUnwrappedLine,p=h.injectedTextIndex;for(;p-1>=0&&this.injectionOffsets[p-1]===this.injectionOffsets[p];)c-=this.injectionOptions[p-1].content.length,p++;return c}getInjectedText(_,b){const h=this.outputPositionToOffsetInUnwrappedLine(_,b),c=this.getInjectedTextAtOffset(h);return c?{options:this.injectionOptions[c.injectedTextIndex]}:null}getInjectedTextAtOffset(_){const b=this.injectionOffsets,h=this.injectionOptions;if(b!==null){let c=0;for(let p=0;p<b.length;p++){const E=h[p].content.length,y=b[p]+c,C=b[p]+c+E;if(y>_)break;if(_<=C)return{injectedTextIndex:p,offsetInUnwrappedLine:y,length:E};c+=E}}return}}class I{constructor(_){this.options=_}}class L{constructor(_,b){this.tabSize=_,this.data=b}}class v{constructor(_,b,h,c,p,E,y){this._viewLineDataBrand=void 0,this.content=_,this.continuesWithWrappedLine=b,this.minColumn=h,this.maxColumn=c,this.startVisibleColumn=p,this.tokens=E,this.inlineDecorations=y}}class m{constructor(_,b,h,c,p,E,y,C,O,k){this.minColumn=_,this.maxColumn=b,this.content=h,this.continuesWithWrappedLine=c,this.isBasicASCII=m.isBasicASCII(h,E),this.containsRTL=m.containsRTL(h,this.isBasicASCII,p),this.tokens=y,this.inlineDecorations=C,this.tabSize=O,this.startVisibleColumn=k}static isBasicASCII(_,b){return b?f.A(_):!0}static containsRTL(_,b,h){return!b&&h?f.m(_):!1}}class d{constructor(_,b,h){this.range=_,this.inlineClassName=b,this.type=h}}class D{constructor(_,b,h,c){this.startOffset=_,this.endOffset=b,this.inlineClassName=h,this.inlineClassNameAffectsLetterSpacing=c}toInlineDecoration(_){return new d(new x.a(_,this.startOffset+1,_,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class S{constructor(_,b){this._viewModelDecorationBrand=void 0,this.range=_,this.options=b}}class r{constructor(_,b,h){this.color=_,this.zIndex=b,this.data=h}static cmp(_,b){return _.zIndex===b.zIndex?_.color<b.color?-1:_.color>b.color?1:0:_.zIndex-b.zIndex}}},qj0h:function(mt,M,t){"use strict";t.d(M,"b",function(){return B}),t.d(M,"c",function(){return x}),t.d(M,"a",function(){return A}),t.d(M,"f",function(){return I}),t.d(M,"d",function(){return L}),t.d(M,"e",function(){return v});var f=t("746U");function B(m){if(!m||typeof m!="object")return m;if(m instanceof RegExp)return m;const d=Array.isArray(m)?[]:{};return Object.keys(m).forEach(D=>{m[D]&&typeof m[D]=="object"?d[D]=B(m[D]):d[D]=m[D]}),d}function x(m){if(!m||typeof m!="object")return m;const d=[m];for(;d.length>0;){const D=d.shift();Object.freeze(D);for(const S in D)if(N.call(D,S)){const r=D[S];typeof r=="object"&&!Object.isFrozen(r)&&d.push(r)}}return m}const N=Object.prototype.hasOwnProperty;function A(m,d){return F(m,d,new Set)}function F(m,d,D){if(Object(f.n)(m))return m;const S=d(m);if(typeof S!="undefined")return S;if(Object(f.f)(m)){const r=[];for(const _ of m)r.push(F(_,d,D));return r}if(Object(f.k)(m)){if(D.has(m))throw new Error("Cannot clone recursive data-structure");D.add(m);const r={};for(let _ in m)N.call(m,_)&&(r[_]=F(m[_],d,D));return D.delete(m),r}return m}function I(m,d,D=!0){return Object(f.k)(m)?(Object(f.k)(d)&&Object.keys(d).forEach(S=>{S in m?D&&(Object(f.k)(m[S])&&Object(f.k)(d[S])?I(m[S],d[S],D):m[S]=d[S]):m[S]=d[S]}),m):d}function L(m,d){if(m===d)return!0;if(m==null||d===null||d===void 0)return!1;if(typeof m!==typeof d)return!1;if(typeof m!="object")return!1;if(Array.isArray(m)!==Array.isArray(d))return!1;let D,S;if(Array.isArray(m)){if(m.length!==d.length)return!1;for(D=0;D<m.length;D++)if(!L(m[D],d[D]))return!1}else{const r=[];for(S in m)r.push(S);r.sort();const _=[];for(S in d)_.push(S);if(_.sort(),!L(r,_))return!1;for(D=0;D<r.length;D++)if(!L(m[r[D]],d[r[D]]))return!1}return!0}function v(m,d,D){const S=d(m);return typeof S=="undefined"?D:S}},qoAC:function(mt,M,t){},r0BQ:function(mt,M,t){"use strict";t.d(M,"a",function(){return f});class f{constructor(B,x=[],N=!1){this.ctor=B,this.staticArguments=x,this.supportsDelayedInstantiation=N}}},r6Ki:function(mt,M,t){},rugR:function(mt,M,t){"use strict";t.r(M),t.d(M,"ModesHoverController",function(){return qo});var f=t("/kV6"),B=t("pmY6"),x=t("sswD"),N=t("aokT"),A=t("wQH0"),F=t("WBhO"),I=t("H4T2"),L=t("EffR"),v=t("GJhM"),m=t("vAKA");const d=L.a;class D extends B.a{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 v.a(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this._scrollbar.getDomNode())}onContentsChanged(){this._scrollbar.scanDomNode()}}class S extends B.a{constructor(Ne,ae,ke){super();this.actionContainer=L.q(Ne,d("div.action-container")),this.action=L.q(this.actionContainer,d("a.action")),this.action.setAttribute("href","#"),this.action.setAttribute("role","button"),ae.iconClass&&L.q(this.action,d(`span.icon.${ae.iconClass}`));const Je=L.q(this.action,d("span"));Je.textContent=ke?`${ae.label} (${ke})`:ae.label,this._register(L.i(this.actionContainer,L.d.MOUSE_DOWN,g=>{g.stopPropagation(),g.preventDefault(),ae.run(this.actionContainer)})),this.setEnabled(!0)}static render(Ne,ae,ke){return new S(Ne,ae,ke)}setEnabled(Ne){Ne?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var r=t("G300"),_=t("6OMU"),b=t("cGHE"),h=t("tX9W"),c=t("twdY"),p=t("JQT/"),E=t("zrhQ"),y=t("/cxE"),C=t("bY76"),O=t("G2kB"),k=t("nnTU");function Y(Ne,ae){const ke=[],Je=c.c.ordered(Ne).reverse(),g=Je.map(u=>Promise.resolve(u.provideDocumentColors(Ne,ae)).then(w=>{if(Array.isArray(w))for(let V of w)ke.push({colorInfo:V,provider:u})}));return Promise.all(g).then(()=>ke)}function Q(Ne,ae,ke,Je){return Promise.resolve(ke.provideColorPresentations(Ne,ae,Je))}k.a.registerCommand("_executeDocumentColorProvider",function(Ne,...ae){const[ke]=ae;if(!(ke instanceof C.a))throw Object(y.c)();const Je=Ne.get(O.a).getModel(ke);if(!Je)throw Object(y.c)();const g=[],u=c.c.ordered(Je).reverse(),w=u.map(V=>Promise.resolve(V.provideDocumentColors(Je,p.a.None)).then(se=>{if(Array.isArray(se))for(let pe of se)g.push({range:pe.range,color:[pe.color.red,pe.color.green,pe.color.blue,pe.color.alpha]})}));return Promise.all(w).then(()=>g)}),k.a.registerCommand("_executeColorPresentationProvider",function(Ne,...ae){const[ke,Je]=ae,{uri:g,range:u}=Je;if(!(g instanceof C.a)||!Array.isArray(ke)||ke.length!==4||!N.a.isIRange(u))throw Object(y.c)();const[w,V,se,pe]=ke,Se=Ne.get(O.a).getModel(g);if(!Se)throw Object(y.c)();const Qe={range:u,color:{red:w,green:V,blue:se,alpha:pe}},ut=[],yt=c.c.ordered(Se).reverse(),Ct=yt.map(At=>Promise.resolve(At.provideColorPresentations(Se,Qe,p.a.None)).then(Ft=>{Array.isArray(Ft)&&ut.push(...Ft)}));return Promise.all(Ct).then(()=>ut)});var H=t("X+cX"),Z=t("7afs"),oe=t("Vxe3"),$=t("+7oY"),te=function(Ne,ae,ke,Je){var g=arguments.length,u=g<3?ae:Je===null?Je=Object.getOwnPropertyDescriptor(ae,ke):Je,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(Ne,ae,ke,Je);else for(var V=Ne.length-1;V>=0;V--)(w=Ne[V])&&(u=(g<3?w(u):g>3?w(ae,ke,u):w(ae,ke))||u);return g>3&&u&&Object.defineProperty(ae,ke,u),u},ne=function(Ne,ae){return function(ke,Je){ae(ke,Je,Ne)}};const Ee=500;let fe=class Ne extends B.a{constructor(ae,ke,Je){super();this._editor=ae,this._codeEditorService=ke,this._configurationService=Je,this._localToDispose=this._register(new B.b),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes=new Set,this._register(ae.onDidChangeModel(()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(ae.onDidChangeModelLanguage(()=>this.onModelChanged())),this._register(c.c.onDidChange(()=>this.onModelChanged())),this._register(ae.onDidChangeConfiguration(()=>{let g=this._isEnabled;this._isEnabled=this.isEnabled(),g!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const ae=this._editor.getModel();if(!ae)return!1;const ke=ae.getLanguageId(),Je=this._configurationService.getValue(ke);if(Je&&typeof Je=="object"){const g=Je.colorDecorators;if(g&&g.enable!==void 0&&!g.enable)return g.enable}return this._editor.getOption(17)}static get(ae){return ae.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const ae=this._editor.getModel();if(!ae||!c.c.has(ae))return;this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new H.g,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},Ne.RECOMPUTE_TIME))})),this.beginCompute()}beginCompute(){this._computePromise=Object(H.h)(ae=>{const ke=this._editor.getModel();return ke?Y(ke,ae):Promise.resolve([])}),this._computePromise.then(ae=>{this.updateDecorations(ae),this.updateColorDecorators(ae),this._computePromise=null},y.f)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(ae){const ke=ae.map(Je=>({range:{startLineNumber:Je.colorInfo.range.startLineNumber,startColumn:Je.colorInfo.range.startColumn,endLineNumber:Je.colorInfo.range.endLineNumber,endColumn:Je.colorInfo.range.endColumn},options:h.b.EMPTY}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,ke),this._colorDatas=new Map,this._decorationsIds.forEach((Je,g)=>this._colorDatas.set(Je,ae[g]))}updateColorDecorators(ae){let ke=[],Je={};for(let g=0;g<ae.length&&ke.length<Ee;g++){const{red:u,green:w,blue:V,alpha:se}=ae[g].colorInfo.color,pe=new E.c(Math.round(u*255),Math.round(w*255),Math.round(V*255),se);let Se=Object(Z.c)(`rgba(${pe.r},${pe.g},${pe.b},${pe.a})`).toString(16),Qe=`rgba(${pe.r}, ${pe.g}, ${pe.b}, ${pe.a})`,ut="colorBox-"+Se;!this._decorationsTypes.has(ut)&&!Je[ut]&&this._codeEditorService.registerDecorationType("color-detector-color",ut,{before:{contentText:" ",border:"solid 0.1em #000",margin:"0.1em 0.2em 0 0.2em",width:"0.8em",height:"0.8em",backgroundColor:Qe},dark:{before:{border:"solid 0.1em #eee"}}},void 0,this._editor),Je[ut]=!0,ke.push({range:{startLineNumber:ae[g].colorInfo.range.startLineNumber,startColumn:ae[g].colorInfo.range.startColumn,endLineNumber:ae[g].colorInfo.range.endLineNumber,endColumn:ae[g].colorInfo.range.endColumn},options:this._codeEditorService.resolveDecorationOptions(ut,!0)})}this._decorationsTypes.forEach(g=>{Je[g]||this._codeEditorService.removeDecorationType(g)}),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,ke)}removeAllDecorations(){this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,[]),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,[]),this._decorationsTypes.forEach(ae=>{this._codeEditorService.removeDecorationType(ae)})}getColorData(ae){const ke=this._editor.getModel();if(!ke)return null;const Je=ke.getDecorationsInRange(N.a.fromPositions(ae,ae)).filter(g=>this._colorDatas.has(g.id));return Je.length===0?null:this._colorDatas.get(Je[0].id)}};fe.ID="editor.contrib.colorDetector",fe.RECOMPUTE_TIME=1e3,fe=te([ne(1,oe.a),ne(2,$.a)],fe),Object(x.l)(fe.ID,fe);var ee=t("MI8n");class ie{constructor(Ne,ae,ke){this.presentationIndex=ke,this._onColorFlushed=new ee.b,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new ee.b,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new ee.b,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=Ne,this._color=Ne,this._colorPresentations=ae}get color(){return this._color}set color(Ne){if(this._color.equals(Ne))return;this._color=Ne,this._onDidChangeColor.fire(Ne)}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(Ne){this._colorPresentations=Ne,this.presentationIndex>Ne.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(Ne,ae){for(let ke=0;ke<this.colorPresentations.length;ke++)if(ae.toLowerCase()===this.colorPresentations[ke].label){this.presentationIndex=ke,this._onDidChangePresentation.fire(this.presentation);break}}flushColor(){this._onColorFlushed.fire(this._color)}}var U=t("D3Dy"),G=t("AKMP"),J=t("EPS+"),he=t("3/fG"),xe=t("MD5Z"),Ie=t("t9D7");const Le=L.a;class Te extends B.a{constructor(Ne,ae,ke){super();this.model=ae,this.domNode=Le(".colorpicker-header"),L.q(Ne,this.domNode),this.pickedColorNode=L.q(this.domNode,Le(".picked-color"));const Je=Object(he.a)("clickToToggleColorOptions","Click to toggle color options (rgb/hsl/hex)");this.pickedColorNode.setAttribute("title",Je);const g=L.q(this.domNode,Le(".original-color"));g.style.backgroundColor=E.a.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=ke.getColorTheme().getColor(xe.E)||E.a.white,this._register(Object(Ie.f)((u,w)=>{this.backgroundColor=u.getColor(xe.E)||E.a.white})),this._register(L.i(this.pickedColorNode,L.d.CLICK,()=>this.model.selectNextColorPresentation())),this._register(L.i(g,L.d.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(ae.onDidChangeColor(this.onDidChangeColor,this)),this._register(ae.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=E.a.Format.CSS.format(ae.color)||"",this.pickedColorNode.classList.toggle("light",ae.color.rgba.a<.5?this.backgroundColor.isLighter():ae.color.isLighter())}onDidChangeColor(Ne){this.pickedColorNode.style.backgroundColor=E.a.Format.CSS.format(Ne)||"",this.pickedColorNode.classList.toggle("light",Ne.rgba.a<.5?this.backgroundColor.isLighter():Ne.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(Le(".codicon.codicon-color-mode"))}}class ze extends B.a{constructor(Ne,ae,ke){super();this.model=ae,this.pixelRatio=ke,this.domNode=Le(".colorpicker-body"),L.q(Ne,this.domNode),this.saturationBox=new ue(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 Pe(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 ve(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:Ne,v:ae}){const ke=this.model.color.hsva;this.model.color=new E.a(new E.b(ke.h,Ne,ae,ke.a))}onDidOpacityChange(Ne){const ae=this.model.color.hsva;this.model.color=new E.a(new E.b(ae.h,ae.s,ae.v,Ne))}onDidHueChange(Ne){const ae=this.model.color.hsva,ke=(1-Ne)*360;this.model.color=new E.a(new E.b(ke===360?0:ke,ae.s,ae.v,ae.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class ue extends B.a{constructor(Ne,ae,ke){super();this.model=ae,this.pixelRatio=ke,this._onDidChange=new ee.b,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new ee.b,this.onColorFlushed=this._onColorFlushed.event,this.domNode=Le(".saturation-wrap"),L.q(Ne,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",L.q(this.domNode,this.canvas),this.selection=Le(".saturation-selection"),L.q(this.domNode,this.selection),this.layout(),this._register(L.g(this.domNode,Je=>this.onMouseDown(Je))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(Ne){this.monitor=this._register(new G.a);const ae=L.D(this.domNode);Ne.target!==this.selection&&this.onDidChangePosition(Ne.offsetX,Ne.offsetY),this.monitor.startMonitoring(Ne.target,Ne.buttons,G.b,Je=>this.onDidChangePosition(Je.posx-ae.left,Je.posy-ae.top),()=>null);const ke=L.h(document,()=>{this._onColorFlushed.fire(),ke.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(Ne,ae){const ke=Math.max(0,Math.min(1,Ne/this.width)),Je=Math.max(0,Math.min(1,1-ae/this.height));this.paintSelection(ke,Je),this._onDidChange.fire({s:ke,v:Je})}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 Ne=this.model.color.hsva;this.paintSelection(Ne.s,Ne.v)}paint(){const Ne=this.model.color.hsva,ae=new E.a(new E.b(Ne.h,1,1,1)),ke=this.canvas.getContext("2d"),Je=ke.createLinearGradient(0,0,this.canvas.width,0);Je.addColorStop(0,"rgba(255, 255, 255, 1)"),Je.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),Je.addColorStop(1,"rgba(255, 255, 255, 0)");const g=ke.createLinearGradient(0,0,0,this.canvas.height);g.addColorStop(0,"rgba(0, 0, 0, 0)"),g.addColorStop(1,"rgba(0, 0, 0, 1)"),ke.rect(0,0,this.canvas.width,this.canvas.height),ke.fillStyle=E.a.Format.CSS.format(ae),ke.fill(),ke.fillStyle=Je,ke.fill(),ke.fillStyle=g,ke.fill()}paintSelection(Ne,ae){this.selection.style.left=`${Ne*this.width}px`,this.selection.style.top=`${this.height-ae*this.height}px`}onDidChangeColor(){if(this.monitor&&this.monitor.isMonitoring())return;this.paint()}}class je extends B.a{constructor(Ne,ae){super();this.model=ae,this._onDidChange=new ee.b,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new ee.b,this.onColorFlushed=this._onColorFlushed.event,this.domNode=L.q(Ne,Le(".strip")),this.overlay=L.q(this.domNode,Le(".overlay")),this.slider=L.q(this.domNode,Le(".slider")),this.slider.style.top="0px",this._register(L.g(this.domNode,ke=>this.onMouseDown(ke))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const Ne=this.getValue(this.model.color);this.updateSliderPosition(Ne)}onMouseDown(Ne){const ae=this._register(new G.a),ke=L.D(this.domNode);this.domNode.classList.add("grabbing"),Ne.target!==this.slider&&this.onDidChangeTop(Ne.offsetY),ae.startMonitoring(Ne.target,Ne.buttons,G.b,g=>this.onDidChangeTop(g.posy-ke.top),()=>null);const Je=L.h(document,()=>{this._onColorFlushed.fire(),Je.dispose(),ae.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(Ne){const ae=Math.max(0,Math.min(1,1-Ne/this.height));this.updateSliderPosition(ae),this._onDidChange.fire(ae)}updateSliderPosition(Ne){this.slider.style.top=`${(1-Ne)*this.height}px`}}class Pe extends je{constructor(Ne,ae){super(Ne,ae);this.domNode.classList.add("opacity-strip"),this._register(ae.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(Ne){const{r:ae,g:ke,b:Je}=Ne.rgba,g=new E.a(new E.c(ae,ke,Je,1)),u=new E.a(new E.c(ae,ke,Je,0));this.overlay.style.background=`linear-gradient(to bottom, ${g} 0%, ${u} 100%)`}getValue(Ne){return Ne.hsva.a}}class ve extends je{constructor(Ne,ae){super(Ne,ae);this.domNode.classList.add("hue-strip")}getValue(Ne){return 1-Ne.hsva.h/360}}class ce extends r.a{constructor(Ne,ae,ke,Je){super();this.model=ae,this.pixelRatio=ke,this._register(Object(U.l)(()=>this.layout()));const g=Le(".colorpicker-widget");Ne.appendChild(g);const u=new Te(g,this.model,Je);this.body=new ze(g,this.model,this.pixelRatio),this._register(u),this._register(this.body)}layout(){this.body.layout()}}var le=function(Ne,ae,ke,Je){var g=arguments.length,u=g<3?ae:Je===null?Je=Object.getOwnPropertyDescriptor(ae,ke):Je,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(Ne,ae,ke,Je);else for(var V=Ne.length-1;V>=0;V--)(w=Ne[V])&&(u=(g<3?w(u):g>3?w(ae,ke,u):w(ae,ke))||u);return g>3&&u&&Object.defineProperty(ae,ke,u),u},Ce=function(Ne,ae){return function(ke,Je){ae(ke,Je,Ne)}},ye=function(Ne,ae,ke,Je){function g(u){return u instanceof ke?u:new ke(function(w){w(u)})}return new(ke||(ke=Promise))(function(u,w){function V(Se){try{pe(Je.next(Se))}catch(Qe){w(Qe)}}function se(Se){try{pe(Je.throw(Se))}catch(Qe){w(Qe)}}function pe(Se){Se.done?u(Se.value):g(Se.value).then(V,se)}pe((Je=Je.apply(Ne,ae||[])).next())})};class ge{constructor(Ne,ae,ke,Je){this.owner=Ne,this.range=ae,this.model=ke,this.provider=Je,this.forceShowAtRange=!0}isValidForHoverAnchor(Ne){return Ne.type===1&&this.range.startColumn<=Ne.range.startColumn&&this.range.endColumn>=Ne.range.endColumn}}let Me=class{constructor(ae,ke,Je){this._editor=ae,this._hover=ke,this._themeService=Je}computeSync(ae,ke){return[]}computeAsync(ae,ke,Je){return ye(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const g=fe.get(this._editor);for(const u of ke){if(u.options.description!=="color-detector-color")continue;const w=g.getColorData(u.range.getStartPosition());if(w){const V=yield this._createColorHover(this._editor.getModel(),w.colorInfo,w.provider);return[V]}}return[]})}_createColorHover(ae,ke,Je){return ye(this,void 0,void 0,function*(){const g=ae.getValueInRange(ke.range),{red:u,green:w,blue:V,alpha:se}=ke.color,pe=new E.c(Math.round(u*255),Math.round(w*255),Math.round(V*255),se),Se=new E.a(pe),Qe=yield Q(ae,ke,Je,p.a.None),ut=new ie(Se,[],0);return ut.colorPresentations=Qe||[],ut.guessColorPresentation(Se,g),new ge(this,N.a.lift(ke.range),ut,Je)})}renderHoverParts(ae,ke,Je){if(ae.length===0||!this._editor.hasModel())return B.a.None;const g=new B.b,u=ae[0],w=this._editor.getModel(),V=u.model,se=g.add(new ce(ke,V,this._editor.getOption(127),this._themeService));let pe=new N.a(u.range.startLineNumber,u.range.startColumn,u.range.endLineNumber,u.range.endColumn);const Se=()=>{let ut,yt;if(V.presentation.textEdit){ut=[V.presentation.textEdit],yt=new N.a(V.presentation.textEdit.range.startLineNumber,V.presentation.textEdit.range.startColumn,V.presentation.textEdit.range.endLineNumber,V.presentation.textEdit.range.endColumn);const Ct=this._editor.getModel()._setTrackedRange(null,yt,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",ut),yt=this._editor.getModel()._getTrackedRange(Ct)||yt}else ut=[{identifier:null,range:pe,text:V.presentation.label,forceMoveMarkers:!1}],yt=pe.setEndPosition(pe.endLineNumber,pe.startColumn+V.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",ut);V.presentation.additionalTextEdits&&(ut=[...V.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",ut),this._hover.hide()),this._editor.pushUndoStop(),pe=yt},Qe=ut=>Q(w,{range:pe,color:{red:ut.rgba.r/255,green:ut.rgba.g/255,blue:ut.rgba.b/255,alpha:ut.rgba.a}},u.provider,p.a.None).then(yt=>{V.colorPresentations=yt||[]});return g.add(V.onColorFlushed(ut=>{Qe(ut).then(Se)})),g.add(V.onDidChangeColor(Qe)),this._hover.setColorPicker(se),g}};Me=le([Ce(2,Ie.b)],Me);class De{constructor(Ne,ae,ke,Je,g){this._computer=Ne,this._state=0,this._hoverTime=g,this._firstWaitScheduler=new H.e(()=>this._triggerAsyncComputation(),0),this._secondWaitScheduler=new H.e(()=>this._triggerSyncComputation(),0),this._loadingMessageScheduler=new H.e(()=>this._showLoadingMessage(),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=ae,this._errorCallback=ke,this._progressCallback=Je}setHoverTime(Ne){this._hoverTime=Ne}_firstWaitTime(){return this._hoverTime/2}_secondWaitTime(){return this._hoverTime/2}_loadingMessageTime(){return 3*this._hoverTime}_triggerAsyncComputation(){this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=Object(H.h)(Ne=>this._computer.computeAsync(Ne)),this._asyncComputationPromise.then(Ne=>{this._asyncComputationPromiseDone=!0,this._withAsyncResult(Ne)},Ne=>this._onError(Ne))):this._asyncComputationPromiseDone=!0}_triggerSyncComputation(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))}_showLoadingMessage(){this._state===3&&this._onProgress(this._computer.getResultWithLoadingMessage())}_withAsyncResult(Ne){Ne&&this._computer.onResult(Ne,!1),this._state===3&&(this._state=0,this._onComplete(this._computer.getResult()))}_onComplete(Ne){this._completeCallback(Ne)}_onError(Ne){this._errorCallback?this._errorCallback(Ne):Object(y.f)(Ne)}_onProgress(Ne){this._progressCallback(Ne)}start(Ne){if(Ne===0)this._state===0&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break}}cancel(){this._loadingMessageScheduler.cancel(),this._state===1&&this._firstWaitScheduler.cancel(),this._state===2&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),this._state===3&&(this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),this._state=0}}class we{constructor(Ne,ae){this.priority=Ne,this.range=ae,this.type=1}equals(Ne){return Ne.type===1&&this.range.equalsRange(Ne.range)}canAdoptVisibleHover(Ne,ae){return Ne.type===1&&ae.lineNumber===this.range.startLineNumber}}class Oe{constructor(Ne,ae,ke){this.priority=Ne,this.owner=ae,this.range=ke,this.type=2}equals(Ne){return Ne.type===2&&this.owner===Ne.owner}canAdoptVisibleHover(Ne,ae){return Ne.type===2&&this.owner===Ne.owner}}var nt=t("eLzo"),Ke=t("v6HE");function et(Ne,ae,ke){const Je=c.p.ordered(Ne),g=Je.map(u=>Promise.resolve(u.provideHover(Ne,ae,ke)).then(w=>w&&bt(w)?w:void 0,w=>{Object(y.g)(w);return}));return Promise.all(g).then(_.e)}Object(x.n)("_executeHoverProvider",(Ne,ae)=>et(Ne,ae,p.a.None));function bt(Ne){const ae=typeof Ne.range!="undefined",ke=typeof Ne.contents!="undefined"&&Ne.contents&&Ne.contents.length>0;return ae&&ke}var Tt=t("W9cx"),$t=function(Ne,ae,ke,Je){var g=arguments.length,u=g<3?ae:Je===null?Je=Object.getOwnPropertyDescriptor(ae,ke):Je,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(Ne,ae,ke,Je);else for(var V=Ne.length-1;V>=0;V--)(w=Ne[V])&&(u=(g<3?w(u):g>3?w(ae,ke,u):w(ae,ke))||u);return g>3&&u&&Object.defineProperty(ae,ke,u),u},Xe=function(Ne,ae){return function(ke,Je){ae(ke,Je,Ne)}},it=function(Ne,ae,ke,Je){function g(u){return u instanceof ke?u:new ke(function(w){w(u)})}return new(ke||(ke=Promise))(function(u,w){function V(Se){try{pe(Je.next(Se))}catch(Qe){w(Qe)}}function se(Se){try{pe(Je.throw(Se))}catch(Qe){w(Qe)}}function pe(Se){Se.done?u(Se.value):g(Se.value).then(V,se)}pe((Je=Je.apply(Ne,ae||[])).next())})};const re=L.a;class We{constructor(Ne,ae,ke){this.owner=Ne,this.range=ae,this.contents=ke}isValidForHoverAnchor(Ne){return Ne.type===1&&this.range.startColumn<=Ne.range.startColumn&&this.range.endColumn>=Ne.range.endColumn}}let tt=class{constructor(ae,ke,Je,g,u){this._editor=ae,this._hover=ke,this._modeService=Je,this._openerService=g,this._configurationService=u}createLoadingMessage(ae){return new We(this,ae.range,[new nt.a().appendText(he.a("modesContentHover.loading","Loading..."))])}computeSync(ae,ke){if(!this._editor.hasModel()||ae.type!==1)return[];const Je=this._editor.getModel(),g=ae.range.startLineNumber,u=Je.getLineMaxColumn(g),w=[];for(const Se of ke){const Qe=Se.range.startLineNumber===g?Se.range.startColumn:1,ut=Se.range.endLineNumber===g?Se.range.endColumn:u,yt=Se.options.hoverMessage;if(!yt||Object(nt.b)(yt))continue;const Ct=new N.a(ae.range.startLineNumber,Qe,ae.range.startLineNumber,ut);w.push(new We(this,Ct,Object(_.c)(yt)))}const V=Je.getLineLength(g),se=Je.getLanguageIdAtPosition(ae.range.startLineNumber,ae.range.startColumn),pe=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:se});return typeof pe=="number"&&V>=pe&&w.push(new We(this,ae.range,[{value:he.a("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}])),w}computeAsync(ae,ke,Je){return it(this,void 0,void 0,function*(){if(!this._editor.hasModel()||ae.type!==1)return Promise.resolve([]);const g=this._editor.getModel();if(!c.p.has(g))return Promise.resolve([]);const u=yield et(g,new b.a(ae.range.startLineNumber,ae.range.startColumn),Je),w=[];for(const V of u){if(Object(nt.b)(V.contents))continue;const se=V.range?N.a.lift(V.range):ae.range;w.push(new We(this,se,V.contents))}return w})}renderHoverParts(ae,ke,Je){const g=new B.b;for(const u of ae)for(const w of u.contents){if(Object(nt.b)(w))continue;const V=re("div.hover-row.markdown-hover"),se=L.q(V,re("div.hover-contents")),pe=g.add(new Ke.a({editor:this._editor},this._modeService,this._openerService));g.add(pe.onDidRenderAsync(()=>{se.className="hover-contents code-hover-contents",this._hover.onContentsChanged()}));const Se=g.add(pe.render(w));se.appendChild(Se.element),ke.appendChild(V)}return g}};tt=$t([Xe(2,F.a),Xe(3,Tt.a),Xe(4,$.a)],tt);var Et=t("gslv"),It=t("79sc"),Rt=t("hJVp"),vo=t("C1Q+"),Mo=t("nlbu"),xo=t("lY/7"),Do=t("tADe"),Lo=t("tTk5"),To=function(Ne,ae,ke,Je){var g=arguments.length,u=g<3?ae:Je===null?Je=Object.getOwnPropertyDescriptor(ae,ke):Je,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(Ne,ae,ke,Je);else for(var V=Ne.length-1;V>=0;V--)(w=Ne[V])&&(u=(g<3?w(u):g>3?w(ae,ke,u):w(ae,ke))||u);return g>3&&u&&Object.defineProperty(ae,ke,u),u},Ht=function(Ne,ae){return function(ke,Je){ae(ke,Je,Ne)}};const Mt=L.a;class Ue{constructor(Ne,ae,ke){this.owner=Ne,this.range=ae,this.marker=ke}isValidForHoverAnchor(Ne){return Ne.type===1&&this.range.startColumn<=Ne.range.startColumn&&this.range.endColumn>=Ne.range.endColumn}}const dt={type:1,filter:{include:Mo.b.QuickFix}};let Ut=class{constructor(ae,ke,Je,g){this._editor=ae,this._hover=ke,this._markerDecorationsService=Je,this._openerService=g,this.recentMarkerCodeActionsInfo=void 0}computeSync(ae,ke){if(!this._editor.hasModel()||ae.type!==1)return[];const Je=this._editor.getModel(),g=ae.range.startLineNumber,u=Je.getLineMaxColumn(g),w=[];for(const V of ke){const se=V.range.startLineNumber===g?V.range.startColumn:1,pe=V.range.endLineNumber===g?V.range.endColumn:u,Se=this._markerDecorationsService.getMarker(Je.uri,V);if(!Se)continue;const Qe=new N.a(ae.range.startLineNumber,se,ae.range.startLineNumber,pe);w.push(new Ue(this,Qe,Se))}return w}renderHoverParts(ae,ke,Je){if(!ae.length)return B.a.None;const g=new B.b;ae.forEach(w=>ke.appendChild(this.renderMarkerHover(w,g)));const u=ae.length===1?ae[0]:ae.sort((w,V)=>Do.c.compare(w.marker.severity,V.marker.severity))[0];return this.renderMarkerStatusbar(u,Je,g),g}renderMarkerHover(ae,ke){const Je=Mt("div.hover-row"),g=L.q(Je,Mt("div.marker.hover-contents")),{source:u,message:w,code:V,relatedInformation:se}=ae.marker;this._editor.applyFontInfo(g);const pe=L.q(g,Mt("span"));if(pe.style.whiteSpace="pre-wrap",pe.innerText=w,u||V)if(V&&typeof V!="string"){const Se=Mt("span");if(u){const Ct=L.q(Se,Mt("span"));Ct.innerText=u}const Qe=L.q(Se,Mt("a.code-link"));Qe.setAttribute("href",V.target.toString()),ke.add(L.i(Qe,"click",Ct=>{this._openerService.open(V.target,{allowCommands:!0}),Ct.preventDefault(),Ct.stopPropagation()}));const ut=L.q(Qe,Mt("span"));ut.innerText=V.value;const yt=L.q(g,Se);yt.style.opacity="0.6",yt.style.paddingLeft="6px"}else{const Se=L.q(g,Mt("span"));Se.style.opacity="0.6",Se.style.paddingLeft="6px",Se.innerText=u&&V?`${u}(${V})`:u||`(${V})`}if(Object(_.n)(se))for(const{message:Se,resource:Qe,startLineNumber:ut,startColumn:yt}of se){const Ct=L.q(g,Mt("div"));Ct.style.marginTop="8px";const At=L.q(Ct,Mt("a"));At.innerText=`${Object(Et.b)(Qe)}(${ut}, ${yt}): `,At.style.cursor="pointer",ke.add(L.i(At,"click",Zt=>{Zt.stopPropagation(),Zt.preventDefault(),this._openerService&&this._openerService.open(Qe,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:ut,startColumn:yt}}}).catch(y.f)}));const Ft=L.q(Ct,Mt("span"));Ft.innerText=Se,this._editor.applyFontInfo(Ft)}return Je}renderMarkerStatusbar(ae,ke,Je){if((ae.marker.severity===Do.c.Error||ae.marker.severity===Do.c.Warning||ae.marker.severity===Do.c.Info)&&ke.addAction({label:he.a("view problem","View Problem"),commandId:xo.NextMarkerAction.ID,run:()=>{this._hover.hide(),xo.MarkerController.get(this._editor).showAtMarker(ae.marker),this._editor.focus()}}),!this._editor.getOption(80)){const g=ke.append(Mt("div"));this.recentMarkerCodeActionsInfo&&(Do.a.makeKey(this.recentMarkerCodeActionsInfo.marker)===Do.a.makeKey(ae.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(g.textContent=he.a("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const u=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?B.a.None:Je.add(Object(H.i)(()=>g.textContent=he.a("checkingForQuickFixes","Checking for quick fixes..."),200));g.textContent||(g.textContent=String.fromCharCode(160));const w=this.getCodeActions(ae.marker);Je.add(Object(B.i)(()=>w.cancel())),w.then(V=>{if(u.dispose(),this.recentMarkerCodeActionsInfo={marker:ae.marker,hasCodeActions:V.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){V.dispose(),g.textContent=he.a("noQuickFixes","No quick fixes available");return}g.style.display="none";let se=!1;Je.add(Object(B.i)(()=>{se||V.dispose()})),ke.addAction({label:he.a("quick fixes","Quick Fix..."),commandId:vo.e.Id,run:pe=>{se=!0;const Se=vo.f.get(this._editor),Qe=L.D(pe);this._hover.hide(),Se.showCodeActions(dt,V,{x:Qe.left+6,y:Qe.top+Qe.height+6})}})},y.f)}}getCodeActions(ae){return Object(H.h)(ke=>Object(Rt.d)(this._editor.getModel(),new N.a(ae.startLineNumber,ae.startColumn,ae.endLineNumber,ae.endColumn),dt,Lo.b.None,ke))}};Ut=To([Ht(2,It.a),Ht(3,Tt.a)],Ut),Object(Ie.f)((Ne,ae)=>{const ke=Ne.getColor(xe.Jc);ke&&ae.addRule(`.monaco-hover .hover-contents a.code-link span { color: ${ke}; }`);const Je=Ne.getColor(xe.Ic);Je&&ae.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${Je}; }`)});var Ye=t("N0LK"),qe=t("Apug");const ct="editor.action.inlineSuggest.commit";var _t=t("1YUG"),Pt=t("0/Sa");class Wt{constructor(Ne,ae,ke=0){this.lineNumber=Ne,this.parts=ae,this.additionalReservedLineCount=ke}renderForScreenReader(Ne){if(this.parts.length===0)return"";const ae=this.parts[this.parts.length-1],ke=Ne.substr(0,ae.column-1),Je=so(ke,this.parts.map(g=>({range:{startLineNumber:1,endLineNumber:1,startColumn:g.column,endColumn:g.column},text:g.lines.join(`
|
|
|
`)})));return Je.substring(this.parts[0].column-1)}}class Vt{constructor(Ne){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let ae=0;ae<Ne.length;ae++)Ne.charAt(ae)===`
|
|
|
`&&this.lineStartOffsetByLineIdx.push(ae+1)}getOffset(Ne){return this.lineStartOffsetByLineIdx[Ne.lineNumber-1]+Ne.column-1}}function so(Ne,ae){const ke=new Vt(Ne),Je=ae.map(g=>{const u=N.a.lift(g.range);return{startOffset:ke.getOffset(u.getStartPosition()),endOffset:ke.getOffset(u.getEndPosition()),text:g.text}});Je.sort((g,u)=>u.startOffset-g.startOffset);for(const g of Je)Ne=Ne.substring(0,g.startOffset)+g.text+Ne.substring(g.endOffset);return Ne}class wo{constructor(Ne,ae,ke){this.column=Ne,this.lines=ae,this.preview=ke}}class No extends B.a{constructor(Ne){super();this.editor=Ne,this._expanded=void 0,this.onDidChangeEmitter=new ee.b,this.onDidChange=this.onDidChangeEmitter.event,this._register(Ne.onDidChangeConfiguration(ae=>{ae.hasChanged(105)&&this._expanded===void 0&&this.onDidChangeEmitter.fire()}))}setExpanded(Ne){this._expanded=!0,this.onDidChangeEmitter.fire()}}var di=t("Gw4z");function _o(Ne,ae){return Ne===ae?!0:!Ne||!ae?!1:Ne.range.equalsRange(ae.range)&&Ne.text===ae.text&&Ne.command===ae.command}function no(Ne,ae,ke,Je,g=0){if(Ne.range.startLineNumber!==Ne.range.endLineNumber)return;const u=ae.getLineContent(Ne.range.startLineNumber),w=Ye.x(u).length,V=Ne.range.startColumn-1<=w;if(V){const yt=Ye.x(Ne.text).length,Ct=u.substring(Ne.range.startColumn-1,w),At=N.a.fromPositions(Ne.range.getStartPosition().delta(0,Ct.length),Ne.range.getEndPosition()),Ft=Ne.text.startsWith(Ct)?Ne.text.substring(Ct.length):Ne.text.substring(yt);Ne={range:At,text:Ft,command:Ne.command}}const se=ae.getValueInRange(Ne.range),pe=xt(se,Ne.text);if(!pe)return;const Se=Ne.range.startLineNumber,Qe=new Array;if(ke==="prefix"){const yt=pe.filter(Ct=>Ct.originalLength===0);if(yt.length>1||yt.length===1&&yt[0].originalStart!==se.length)return}const ut=Ne.text.length-g;for(const yt of pe){const Ct=Ne.range.startColumn+yt.originalStart+yt.originalLength;if(ke==="subwordSmart"&&Je&&Je.lineNumber===Ne.range.startLineNumber&&Ct<Je.column)return;if(yt.originalLength>0)return;if(yt.modifiedLength===0)continue;const At=yt.modifiedStart+yt.modifiedLength,Ft=Math.max(yt.modifiedStart,Math.min(At,ut)),Zt=Ne.text.substring(yt.modifiedStart,Ft),Yt=Ne.text.substring(Ft,Math.max(yt.modifiedStart,At));if(Zt.length>0){const ao=Ye.Q(Zt);Qe.push(new wo(Ct,ao,!1))}if(Yt.length>0){const ao=Ye.Q(Yt);Qe.push(new wo(Ct,ao,!0))}}return new Wt(Se,Qe,0)}let Lt;function xt(Ne,ae){if((Lt==null?void 0:Lt.originalValue)===Ne&&(Lt==null?void 0:Lt.newValue)===ae)return Lt==null?void 0:Lt.changes;{const ke=Nt(Ne,ae);return Lt={originalValue:Ne,newValue:ae,changes:ke},ke}}function Nt(Ne,ae){if(Ne.length>5e3||ae.length>5e3)return;function ke(se){let pe=0;for(let Se=0,Qe=se.length;Se<Qe;Se++){const ut=se.charCodeAt(Se);ut>pe&&(pe=ut)}return pe}const Je=Math.max(ke(Ne),ke(ae));function g(se){if(se<0)throw new Error("unexpected");return Je+se+1}function u(se){let pe=0,Se=0;const Qe=new Int32Array(se.length);for(let ut=0,yt=se.length;ut<yt;ut++){const Ct=Se*100+pe;se[ut]==="("?(Qe[ut]=g(2*Ct),pe++):se[ut]===")"?(Qe[ut]=g(2*Ct+1),pe===1&&Se++,pe=Math.max(pe-1,0)):Qe[ut]=se.charCodeAt(ut)}return Qe}const w=u(Ne),V=u(ae);return new di.a({getElements:()=>w},{getElements:()=>V}).ComputeDiff(!1).changes}var rt=function(Ne,ae,ke,Je){var g=arguments.length,u=g<3?ae:Je===null?Je=Object.getOwnPropertyDescriptor(ae,ke):Je,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(Ne,ae,ke,Je);else for(var V=Ne.length-1;V>=0;V--)(w=Ne[V])&&(u=(g<3?w(u):g>3?w(ae,ke,u):w(ae,ke))||u);return g>3&&u&&Object.defineProperty(ae,ke,u),u},lt=function(Ne,ae){return function(ke,Je){ae(ke,Je,Ne)}},pt=function(Ne,ae,ke,Je){function g(u){return u instanceof ke?u:new ke(function(w){w(u)})}return new(ke||(ke=Promise))(function(u,w){function V(Se){try{pe(Je.next(Se))}catch(Qe){w(Qe)}}function se(Se){try{pe(Je.throw(Se))}catch(Qe){w(Qe)}}function pe(Se){Se.done?u(Se.value):g(Se.value).then(V,se)}pe((Je=Je.apply(Ne,ae||[])).next())})};let St=class extends B.a{constructor(ae,ke,Je){super();this.editor=ae,this.cache=ke,this.commandService=Je,this.onDidChangeEmitter=new ee.b,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new B.d),this.active=!1,this.disposed=!1,this._register(Je.onDidExecuteCommand(g=>{const u=new Set([x.i.id,x.g.id,_t.CoreEditingCommands.Tab.id,_t.CoreEditingCommands.DeleteLeft.id,_t.CoreEditingCommands.DeleteRight.id,ct,"acceptSelectedSuggestion"]);u.has(g.commandId)&&ae.hasTextFocus()&&this.handleUserInput()})),this._register(this.editor.onDidType(g=>{this.handleUserInput()})),this._register(this.editor.onDidChangeCursorPosition(g=>{this.session&&!this.session.isValid&&this.hide()})),this._register(Object(B.i)(()=>{this.disposed=!0})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.hide()}))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout(()=>{if(this.disposed)return;this.startSessionIfTriggered()},0)}get session(){return this.completionSession.value}get ghostText(){var ae;return(ae=this.session)===null||ae===void 0?void 0:ae.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}setExpanded(ae){var ke;(ke=this.session)===null||ke===void 0||ke.setExpanded(ae)}setActive(ae){var ke;this.active=ae,ae&&((ke=this.session)===null||ke===void 0||ke.scheduleAutomaticUpdate())}startSessionIfTriggered(){const ae=this.editor.getOption(54);if(!ae.enabled)return;if(this.session&&this.session.isValid)return;this.trigger(c.s.Automatic)}trigger(ae){if(this.completionSession.value){ae===c.s.Explicit&&void this.completionSession.value.ensureUpdateWithExplicitContext();return}this.completionSession.value=new Qt(this.editor,this.editor.getPosition(),()=>this.active,this.commandService,this.cache,ae),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange(()=>{this.onDidChangeEmitter.fire()}))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var ae;(ae=this.session)===null||ae===void 0||ae.commitCurrentCompletion()}showNext(){var ae;(ae=this.session)===null||ae===void 0||ae.showNextInlineCompletion()}showPrevious(){var ae;(ae=this.session)===null||ae===void 0||ae.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var ae;return pt(this,void 0,void 0,function*(){const ke=yield(ae=this.session)===null||ae===void 0?void 0:ae.hasMultipleInlineCompletions();return ke!==void 0?ke:!1})}};St=rt([lt(2,k.b)],St);class Qt extends No{constructor(Ne,ae,ke,Je,g,u){super(Ne);this.triggerPosition=ae,this.shouldUpdate=ke,this.commandService=Je,this.cache=g,this.initialTriggerKind=u,this.minReservedLineCount=0,this.updateOperation=this._register(new B.d),this.updateSoon=this._register(new H.e(()=>{let V=this.initialTriggerKind;return this.initialTriggerKind=c.s.Automatic,this.update(V)},50)),this.currentlySelectedCompletionId=void 0;let w;this._register(this.onDidChange(()=>{const V=this.currentCompletion;if(V&&V.sourceInlineCompletion!==w){w=V.sourceInlineCompletion;const se=V.sourceProvider;se.handleItemDidShow&&se.handleItemDidShow(V.sourceInlineCompletions,w)}})),this._register(Object(B.i)(()=>{this.cache.clear()})),this._register(this.editor.onDidChangeCursorPosition(V=>{this.cache.value&&this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeModelContent(V=>{this.scheduleAutomaticUpdate()})),this._register(c.t.onDidChange(()=>{this.updateSoon.schedule()})),this.scheduleAutomaticUpdate()}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value)return 0;if(this.cache.value.completions.length===0)return 0;const Ne=this.cache.value.completions.findIndex(ae=>ae.semanticId===this.currentlySelectedCompletionId);return Ne===-1?(this.currentlySelectedCompletionId=void 0,0):Ne}get currentCachedCompletion(){return this.cache.value?this.cache.value.completions[this.fixAndGetIndexOfCurrentSelection()]:void 0}showNextInlineCompletion(){var Ne;return pt(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const ae=((Ne=this.cache.value)===null||Ne===void 0?void 0:Ne.completions)||[];if(ae.length>0){const ke=(this.fixAndGetIndexOfCurrentSelection()+1)%ae.length;this.currentlySelectedCompletionId=ae[ke].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}showPreviousInlineCompletion(){var Ne;return pt(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const ae=((Ne=this.cache.value)===null||Ne===void 0?void 0:Ne.completions)||[];if(ae.length>0){const ke=(this.fixAndGetIndexOfCurrentSelection()+ae.length-1)%ae.length;this.currentlySelectedCompletionId=ae[ke].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}ensureUpdateWithExplicitContext(){var Ne;return pt(this,void 0,void 0,function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===c.s.Explicit?yield this.updateOperation.value.promise:yield this.update(c.s.Explicit):((Ne=this.cache.value)===null||Ne===void 0?void 0:Ne.triggerKind)!==c.s.Explicit&&(yield this.update(c.s.Explicit))})}hasMultipleInlineCompletions(){var Ne;return pt(this,void 0,void 0,function*(){return yield this.ensureUpdateWithExplicitContext(),(((Ne=this.cache.value)===null||Ne===void 0?void 0:Ne.completions.length)||0)>1})}get ghostText(){const Ne=this.currentCompletion,ae=this.editor.getOptions().get(54).mode;return Ne?no(Ne,this.editor.getModel(),ae,this.editor.getPosition()):void 0}get currentCompletion(){const Ne=this.currentCachedCompletion;return Ne?Ne.toLiveInlineCompletion():void 0}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule()}update(Ne){return pt(this,void 0,void 0,function*(){if(!this.shouldUpdate())return;const ae=this.editor.getPosition(),ke=Object(H.h)(g=>pt(this,void 0,void 0,function*(){let u;try{u=yield zo(ae,this.editor.getModel(),{triggerKind:Ne,selectedSuggestionInfo:void 0},g)}catch(w){Object(y.f)(w);return}if(g.isCancellationRequested)return;this.cache.setValue(this.editor,u,Ne),this.onDidChangeEmitter.fire()})),Je=new bo(ke,Ne);this.updateOperation.value=Je,yield ke,this.updateOperation.value===Je&&this.updateOperation.clear()})}takeOwnership(Ne){this._register(Ne)}commitCurrentCompletion(){if(!this.ghostText)return;const Ne=this.currentCompletion;Ne&&this.commit(Ne)}commit(Ne){const ae=this.cache.clearAndLeak();this.editor.executeEdits("inlineSuggestion.accept",[Pt.a.replaceMove(Ne.range,Ne.text)]),Ne.command?this.commandService.executeCommand(Ne.command.id,...Ne.command.arguments||[]).finally(()=>{ae==null||ae.dispose()}).then(void 0,y.g):ae==null||ae.dispose(),this.onDidChangeEmitter.fire()}}class bo{constructor(Ne,ae){this.promise=Ne,this.triggerKind=ae}dispose(){this.promise.cancel()}}class qt extends B.a{constructor(Ne,ae,ke,Je){super();this.triggerKind=Je;const g=Ne.deltaDecorations([],ae.items.map(u=>({range:u.range,options:{description:"inline-completion-tracking-range"}})));this._register(Object(B.i)(()=>{Ne.deltaDecorations(g,[])})),this.completions=ae.items.map((u,w)=>new Eo(u,g[w])),this._register(Ne.onDidChangeModelContent(()=>{let u=!1;const w=Ne.getModel();for(const V of this.completions){const se=w.getDecorationRange(V.decorationId);if(!se){Object(y.f)(new Error("Decoration has no range"));continue}V.synchronizedRange.equalsRange(se)||(u=!0,V.synchronizedRange=se)}u&&ke()})),this._register(ae)}}class Eo{constructor(Ne,ae){this.inlineCompletion=Ne,this.decorationId=ae,this.semanticId=JSON.stringify({text:this.inlineCompletion.text,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=Ne.range}toLiveInlineCompletion(){return{text:this.inlineCompletion.text,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion}}}function Ro(Ne,ae){const ke=ae.getWordAtPosition(Ne),Je=ae.getLineMaxColumn(Ne.lineNumber);return ke?new N.a(Ne.lineNumber,ke.startColumn,Ne.lineNumber,Je):N.a.fromPositions(Ne,Ne.with(void 0,Je))}function zo(Ne,ae,ke,Je=p.a.None){return pt(this,void 0,void 0,function*(){const g=Ro(Ne,ae),u=c.t.all(ae),w=yield Promise.all(u.map(se=>pt(this,void 0,void 0,function*(){const pe=yield se.provideInlineCompletions(ae,Ne,ke,Je);return{completions:pe,provider:se,dispose:()=>{pe&&se.freeInlineCompletions(pe)}}}))),V=new Map;for(const se of w){const pe=se.completions;if(pe)for(const Se of pe.items.map(Qe=>({text:Qe.text,range:Qe.range?N.a.lift(Qe.range):g,command:Qe.command,sourceProvider:se.provider,sourceInlineCompletions:pe,sourceInlineCompletion:Qe}))){if(Se.range.startLineNumber!==Se.range.endLineNumber)continue;V.set(JSON.stringify({text:Se.text,range:Se.range}),Se)}}return{items:[...V.values()],dispose:()=>{for(const se of w)se.dispose()}}})}function Bo(Ne,ae){if(!ae)return ae;const ke=Ne.getValueInRange(ae.range),Je=Object(Ye.d)(ke,ae.text),g=Ne.getOffsetAt(ae.range.getStartPosition())+Je,u=Ne.getPositionAt(g),w=ke.substr(Je),V=Object(Ye.e)(w,ae.text),se=Ne.getPositionAt(Math.max(g,Ne.getOffsetAt(ae.range.getEndPosition())-V));return{range:N.a.fromPositions(u,se),text:ae.text.substr(Je,ae.text.length-Je-V)}}var Jt=t("uACm"),fo=t("WaSP"),ri=t("ep4t");function Zo(Ne,ae){return{object:Ne,dispose:()=>ae==null?void 0:ae.dispose()}}function ci(Ne,ae){return(ke,Je)=>ae(Ne(ke),Ne(Je))}function ki(){return(Ne,ae)=>Ne-ae}function wi(Ne,ae){let ke;for(const Je of Ne)(ke===void 0||ae(Je,ke)>0)&&(ke=Je);return ke}class Zi extends B.a{constructor(Ne,ae){super();this.editor=Ne,this.suggestControllerPreselector=ae,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentInlineCompletion=void 0,this.onDidChangeEmitter=new ee.b,this.onDidChange=this.onDidChangeEmitter.event,this.setInactiveDelayed=this._register(new H.e(()=>{this.isSuggestWidgetVisible||this._isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())},100)),this._register(Ne.onKeyDown(Je=>{Je.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(Ne.onKeyUp(Je=>{Je.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const ke=ri.SuggestController.get(this.editor);if(ke){this._register(ke.registerSelector({priority:100,select:(u,w,V)=>{const se=this.editor.getModel(),pe=Bo(se,this.suggestControllerPreselector());if(!pe)return-1;const Se=b.a.lift(w),Qe=V.map((yt,Ct)=>{const At=vi(ke,Se,yt,this.isShiftKeyPressed),Ft=Bo(se,At);if(!Ft)return;const Zt=Vi(pe.range,Ft.range)&&pe.text.startsWith(Ft.text);return{index:Ct,valid:Zt,prefixLength:Ft.text.length,suggestItem:yt}}).filter(yt=>yt&&yt.valid),ut=wi(Qe,ci(yt=>yt.prefixLength,ki()));return ut?ut.index:-1}}));let Je=!1;const g=()=>{if(Je)return;Je=!0,this._register(ke.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(ke.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.update(this._isActive)})),this._register(ke.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))};this._register(ee.c.once(ke.model.onDidTrigger)(u=>{g()}))}this.update(this._isActive)}get state(){return this._isActive?{selectedItemAsInlineCompletion:this._currentInlineCompletion}:void 0}update(Ne){const ae=this.getInlineCompletion();let ke=!1;_o(this._currentInlineCompletion,ae)||(this._currentInlineCompletion=ae,ke=!0),this._isActive!==Ne&&(this._isActive=Ne,ke=!0),ke&&this.onDidChangeEmitter.fire()}getInlineCompletion(){const Ne=ri.SuggestController.get(this.editor);if(!Ne)return;if(!this.isSuggestWidgetVisible)return;const ae=Ne.widget.value.getFocusedItem();return ae?vi(Ne,this.editor.getPosition(),ae.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const Ne=ri.SuggestController.get(this.editor);Ne&&Ne.stopForceRenderingAbove()}forceRenderingAbove(){const Ne=ri.SuggestController.get(this.editor);Ne&&Ne.forceRenderingAbove()}}function Vi(Ne,ae){return Ne.startLineNumber===ae.startLineNumber&&Ne.startColumn===ae.startColumn&&(Ne.endLineNumber<ae.endLineNumber||Ne.endLineNumber===ae.endLineNumber&&Ne.endColumn<=ae.endColumn)}function vi(Ne,ae,ke,Je){if(Array.isArray(ke.completion.additionalTextEdits)&&ke.completion.additionalTextEdits.length>0)return{text:"",range:N.a.fromPositions(ae,ae)};let{insertText:g}=ke.completion;if(ke.completion.insertTextRules&4){const w=new Jt.c().parse(g),V=Ne.editor.getModel();if(w.children.length>100)return;fo.a.adjustWhitespace(V,ae,w,!0,!0),g=w.toString()}const u=Ne.getOverwriteInfo(ke,Je);return{text:g,range:N.a.fromPositions(ae.delta(0,-u.overwriteBefore),ae.delta(0,Math.max(u.overwriteAfter,0)))}}var sn=function(Ne,ae,ke,Je){function g(u){return u instanceof ke?u:new ke(function(w){w(u)})}return new(ke||(ke=Promise))(function(u,w){function V(Se){try{pe(Je.next(Se))}catch(Qe){w(Qe)}}function se(Se){try{pe(Je.throw(Se))}catch(Qe){w(Qe)}}function pe(Se){Se.done?u(Se.value):g(Se.value).then(V,se)}pe((Je=Je.apply(Ne,ae||[])).next())})};class en extends No{constructor(Ne,ae){super(Ne);this.cache=ae,this.suggestionInlineCompletionSource=this._register(new Zi(this.editor,()=>{var ke,Je;return(Je=(ke=this.cache.value)===null||ke===void 0?void 0:ke.completions[0])===null||Je===void 0?void 0:Je.toLiveInlineCompletion()})),this.updateOperation=this._register(new B.d),this.updateCacheSoon=this._register(new H.e(()=>this.updateCache(),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange(()=>{this.updateCacheSoon.schedule();const ke=this.suggestionInlineCompletionSource.state;ke||(this.minReservedLineCount=0);const Je=this.ghostText;Je&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,on(Je.parts.map(g=>g.lines.length-1)))),this.minReservedLineCount>=1&&this.isSuggestionPreviewEnabled()?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()})),this._register(this.cache.onDidChange(()=>{this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeCursorPosition(ke=>{this.isSuggestionPreviewEnabled()&&(this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire())})),this._register(Object(B.i)(()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove()))}get isActive(){return this.suggestionInlineCompletionSource.state!==void 0}isSuggestionPreviewEnabled(){const Ne=this.editor.getOption(105);return Ne.preview}updateCache(){return sn(this,void 0,void 0,function*(){const Ne=this.suggestionInlineCompletionSource.state;if(!Ne||!Ne.selectedItemAsInlineCompletion)return;const ae={text:Ne.selectedItemAsInlineCompletion.text,range:Ne.selectedItemAsInlineCompletion.range},ke=this.editor.getPosition(),Je=Object(H.h)(u=>sn(this,void 0,void 0,function*(){let w;try{w=yield zo(ke,this.editor.getModel(),{triggerKind:c.s.Automatic,selectedSuggestionInfo:ae},u)}catch(V){Object(y.f)(V);return}if(u.isCancellationRequested)return;this.cache.setValue(this.editor,w,c.s.Automatic),this.onDidChangeEmitter.fire()})),g=new bo(Je,c.s.Automatic);this.updateOperation.value=g,yield Je,this.updateOperation.value===g&&this.updateOperation.clear()})}get ghostText(){var Ne,ae;if(!this.isSuggestionPreviewEnabled())return;const ke=this.suggestionInlineCompletionSource.state,Je=Bo(this.editor.getModel(),ke==null?void 0:ke.selectedItemAsInlineCompletion),g=Bo(this.editor.getModel(),(ae=(Ne=this.cache.value)===null||Ne===void 0?void 0:Ne.completions[0])===null||ae===void 0?void 0:ae.toLiveInlineCompletion()),u=g&&Je&&g.text.startsWith(Je.text)&&g.range.equalsRange(Je.range)?g:Je||g,w=Je?((u==null?void 0:u.text.length)||0)-Je.text.length:0,V=pe=>{const Se=this.editor.getOptions().get(105).previewMode;return pe?no(pe,this.editor.getModel(),Se,this.editor.getPosition(),w)||new Wt(pe.range.endLineNumber,[],this.minReservedLineCount):void 0},se=V(u);return se}}function on(Ne){return Ne.reduce((ae,ke)=>ae+ke,0)}var cn=function(Ne,ae,ke,Je){var g=arguments.length,u=g<3?ae:Je===null?Je=Object.getOwnPropertyDescriptor(ae,ke):Je,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(Ne,ae,ke,Je);else for(var V=Ne.length-1;V>=0;V--)(w=Ne[V])&&(u=(g<3?w(u):g>3?w(ae,ke,u):w(ae,ke))||u);return g>3&&u&&Object.defineProperty(ae,ke,u),u},Bi=function(Ne,ae){return function(ke,Je){ae(ke,Je,Ne)}},zi=function(Ne,ae,ke,Je){function g(u){return u instanceof ke?u:new ke(function(w){w(u)})}return new(ke||(ke=Promise))(function(u,w){function V(Se){try{pe(Je.next(Se))}catch(Qe){w(Qe)}}function se(Se){try{pe(Je.throw(Se))}catch(Qe){w(Qe)}}function pe(Se){Se.done?u(Se.value):g(Se.value).then(V,se)}pe((Je=Je.apply(Ne,ae||[])).next())})};class Ji extends B.a{constructor(){super(...arguments);this.onDidChangeEmitter=new ee.b,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new B.d)}get targetModel(){var Ne;return(Ne=this.currentModelRef.value)===null||Ne===void 0?void 0:Ne.object}setTargetModel(Ne){var ae;if(((ae=this.currentModelRef.value)===null||ae===void 0?void 0:ae.object)===Ne)return;this.currentModelRef.clear(),this.currentModelRef.value=Ne?Zo(Ne,Ne.onDidChange(()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()}get ghostText(){var Ne,ae;return this.hasCachedGhostText||(this.cachedGhostText=(ae=(Ne=this.currentModelRef.value)===null||Ne===void 0?void 0:Ne.object)===null||ae===void 0?void 0:ae.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(Ne){var ae;(ae=this.targetModel)===null||ae===void 0||ae.setExpanded(Ne)}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}let ui=class extends Ji{constructor(ae,ke){super();this.editor=ae,this.commandService=ke,this.sharedCache=this._register(new pn),this.suggestWidgetAdapterModel=this._register(new en(this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(new St(this.editor,this.sharedCache,this.commandService)),this._register(this.suggestWidgetAdapterModel.onDidChange(()=>{this.updateModel()})),this.updateModel()}get activeInlineCompletionsModel(){return this.targetModel===this.inlineCompletionsModel?this.inlineCompletionsModel:void 0}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(ae){var ke;const Je=(ke=this.activeInlineCompletionsModel)===null||ke===void 0?void 0:ke.ghostText;return Je?Je.parts.some(g=>ae.containsPosition(new b.a(Je.lineNumber,g.column))):!1}triggerInlineCompletion(){var ae;(ae=this.activeInlineCompletionsModel)===null||ae===void 0||ae.trigger(c.s.Explicit)}commitInlineCompletion(){var ae;(ae=this.activeInlineCompletionsModel)===null||ae===void 0||ae.commitCurrentSuggestion()}hideInlineCompletion(){var ae;(ae=this.activeInlineCompletionsModel)===null||ae===void 0||ae.hide()}showNextInlineCompletion(){var ae;(ae=this.activeInlineCompletionsModel)===null||ae===void 0||ae.showNext()}showPreviousInlineCompletion(){var ae;(ae=this.activeInlineCompletionsModel)===null||ae===void 0||ae.showPrevious()}hasMultipleInlineCompletions(){var ae;return zi(this,void 0,void 0,function*(){const ke=yield(ae=this.activeInlineCompletionsModel)===null||ae===void 0?void 0:ae.hasMultipleInlineCompletions();return ke!==void 0?ke:!1})}};ui=cn([Bi(1,k.b)],ui);class pn extends B.a{constructor(){super(...arguments);this.onDidChangeEmitter=new ee.b,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new B.d)}get value(){return this.cache.value}setValue(Ne,ae,ke){this.cache.value=new qt(Ne,ae,()=>this.onDidChangeEmitter.fire(),ke)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}var Hi=t("qoAC"),Oi=t("HdwC"),Ii=t("/UlZ"),Qi=t("Ll0s"),Li=t("4bUh"),Ui=t("erNZ"),fi=t("kYye"),$i=t("dBaI"),rn=t("baJR"),_i=t("T8No"),Pi=t("Cg/j"),ht=function(Ne,ae,ke,Je){var g=arguments.length,u=g<3?ae:Je===null?Je=Object.getOwnPropertyDescriptor(ae,ke):Je,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(Ne,ae,ke,Je);else for(var V=Ne.length-1;V>=0;V--)(w=Ne[V])&&(u=(g<3?w(u):g>3?w(ae,ke,u):w(ae,ke))||u);return g>3&&u&&Object.defineProperty(ae,ke,u),u},Ve=function(Ne,ae){return function(ke,Je){ae(ke,Je,Ne)}},K;const be=(K=window.trustedTypes)===null||K===void 0?void 0:K.createPolicy("editorGhostText",{createHTML:Ne=>Ne});let Re=class extends B.a{constructor(ae,ke,Je,g){super();this.editor=ae,this.model=ke,this.instantiationService=Je,this.modeService=g,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(Be,this.editor)),this.additionalLinesWidget=this._register(new vt(this.editor,this.modeService.languageIdCodec)),this.viewMoreContentWidget=void 0,this._register(this.editor.onDidChangeConfiguration(u=>{(u.hasChanged(29)||u.hasChanged(104)||u.hasChanged(87)||u.hasChanged(82)||u.hasChanged(44)||u.hasChanged(43)||u.hasChanged(58))&&this.update()})),this._register(Object(B.i)(()=>{var u;this.disposed=!0,this.update(),(u=this.viewMoreContentWidget)===null||u===void 0||u.dispose(),this.viewMoreContentWidget=void 0})),this._register(ke.onDidChange(()=>{this.update()})),this.update()}shouldShowHoverAtViewZone(ae){return this.additionalLinesWidget.viewZoneId===ae}update(){var ae;const ke=this.model.ghostText;if(!this.editor.hasModel()||!ke||this.disposed){this.partsWidget.clear(),this.additionalLinesWidget.clear();return}const Je=new Array,g=new Array;function u(pe,Se){if(g.length>0){const Qe=g[g.length-1];Se&&Qe.decorations.push(new $i.a(Qe.content.length+1,Qe.content.length+1+pe[0].length,Se,0)),Qe.content+=pe[0],pe=pe.slice(1)}for(const Qe of pe)g.push({content:Qe,decorations:Se?[new $i.a(1,Qe.length+1,Se,0)]:[]})}const w=this.editor.getModel().getLineContent(ke.lineNumber);this.editor.getModel().getLineTokens(ke.lineNumber);let V,se=0;for(const pe of ke.parts){let Se=pe.lines;V===void 0?(Je.push({column:pe.column,text:Se[0],preview:pe.preview}),Se=Se.slice(1)):u([w.substring(se,pe.column-1)],void 0),Se.length>0&&(u(Se,"ghost-text"),V===void 0&&pe.column<=w.length&&(V=pe.column)),se=pe.column-1}V!==void 0&&u([w.substring(se)],void 0),this.partsWidget.setParts(ke.lineNumber,Je,V!==void 0?{column:V,length:w.length+1-V}:void 0),this.additionalLinesWidget.updateLines(ke.lineNumber,g,ke.additionalReservedLineCount),ke.parts.some(pe=>pe.lines.length<0)?this.viewMoreContentWidget=this.renderViewMoreLines(new b.a(ke.lineNumber,this.editor.getModel().getLineMaxColumn(ke.lineNumber)),"",0):((ae=this.viewMoreContentWidget)===null||ae===void 0||ae.dispose(),this.viewMoreContentWidget=void 0)}renderViewMoreLines(ae,ke,Je){const g=this.editor.getOption(43),u=document.createElement("div");u.className="suggest-preview-additional-widget",Oi.a.applyFontInfoSlow(u,g);const w=document.createElement("span");w.className="content-spacer",w.append(ke),u.append(w);const V=document.createElement("span");V.className="content-newline suggest-preview-text",V.append("\u23CE "),u.append(V);const se=new B.b,pe=document.createElement("div");return pe.className="button suggest-preview-text",pe.append(`+${Je} lines\u2026`),se.add(L.o(pe,"mousedown",Se=>{var Qe;(Qe=this.model)===null||Qe===void 0||Qe.setExpanded(!0),Se.preventDefault(),this.editor.focus()})),u.append(pe),new ro(this.editor,ae,u,se)}};Re=ht([Ve(2,Pi.a),Ve(3,F.a)],Re);let Be=class{constructor(ae,ke,Je,g){this.editor=ae,this.codeEditorService=ke,this.themeService=Je,this.contextKeyService=g,this.decorationIds=[],this.disposableStore=new B.b}dispose(){this.clear(),this.disposableStore.dispose()}clear(){this.editor.deltaDecorations(this.decorationIds,[]),this.disposableStore.clear()}setParts(ae,ke,Je){this.disposableStore.clear();const g=this.themeService.getColorTheme(),u=g.getColor(fi.K);let w,V;u&&(w=String(u.rgba.a),V=E.a.Format.CSS.format(at(u)));const se=g.getColor(fi.J);let pe;se&&(pe=`2px dashed ${se}`);const Se=this.editor.getModel();if(!Se)return;const{tabSize:Qe}=Se.getOptions(),ut=Se.getLineContent(ae)||"";let yt=0,Ct="";const At=new Array;Je&&At.push({range:N.a.fromPositions(new b.a(ae,Je.column),new b.a(ae,Je.column+Je.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});const Ft=this.contextKeyService.getContextKeyValue("config.editor.useInjectedText"),Zt=Ft===void 0?!0:!!Ft;this.decorationIds=this.editor.deltaDecorations(this.decorationIds,ke.map(Yt=>{Ct+=ut.substring(yt,Yt.column-1),yt=Yt.column-1;const ao=Zt?Yt.text:this.renderSingleLineText(Yt.text,Ct,Qe,!1),Co=this.disposableStore.add(zt(this.codeEditorService,"ghost-text","0-ghost-text-",{after:{contentText:ao,opacity:w,color:V,border:pe,fontWeight:Yt.preview?"bold":"normal"}}));return{range:N.a.fromPositions(new b.a(ae,Yt.column)),options:Zt?{description:"ghost-text",after:{content:ao,inlineClassName:Yt.preview?"ghost-text-decoration-preview":"ghost-text-decoration"},showIfCollapsed:!0}:Object.assign({},Co.resolve())}}).concat(At))}renderSingleLineText(ae,ke,Je,g){const u=ke+ae,w=Qi.a.visibleColumnsByColumns(u,Je);let V="",se=ke.length+1;for(const pe of ae){if(pe===" "){const Se=w[se+1]-w[se];if(g){V+="\u2192";for(let Qe=1;Qe<Se;Qe++)V+="\xA0"}else for(let Qe=0;Qe<Se;Qe++)V+="\xA0"}else pe===" "?g?V+="\xB7":V+="\xA0":V+=pe;se+=1}return V}};Be=ht([Ve(1,oe.a),Ve(2,Ie.b),Ve(3,_i.b)],Be);function at(Ne){const{r:ae,b:ke,g:Je}=Ne.rgba;return new E.a(new E.c(ae,Je,ke,255))}class vt{constructor(Ne,ae){this.editor=Ne,this.languageIdCodec=ae,this._viewZoneId=void 0}get viewZoneId(){return this._viewZoneId}dispose(){this.clear()}clear(){this.editor.changeViewZones(Ne=>{this._viewZoneId&&(Ne.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(Ne,ae,ke){const Je=this.editor.getModel();if(!Je)return;const{tabSize:g}=Je.getOptions();this.editor.changeViewZones(u=>{this._viewZoneId&&(u.removeZone(this._viewZoneId),this._viewZoneId=void 0);const w=Math.max(ae.length,ke);if(w>0){const V=document.createElement("div");Gt(V,g,ae,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=u.addZone({afterLineNumber:Ne,heightInLines:w,domNode:V})}})}}function Gt(Ne,ae,ke,Je,g){const u=Je.get(29),w=Je.get(104),V="none",se=Je.get(82),pe=Je.get(44),Se=Je.get(43),Qe=Je.get(58),ut=Object(Ui.a)(1e4);ut.appendASCIIString('<div class="suggest-preview-text">');for(let At=0,Ft=ke.length;At<Ft;At++){const Zt=ke[At],Yt=Zt.content;ut.appendASCIIString('<div class="view-line'),ut.appendASCIIString('" style="top:'),ut.appendASCIIString(String(At*Qe)),ut.appendASCIIString('px;width:1000000px;">');const ao=Ye.A(Yt),Co=Ye.m(Yt),ko=Li.a.createEmpty(Yt,g);Object(rn.d)(new rn.c(Se.isMonospace&&!u,Se.canUseHalfwidthRightwardsArrow,Yt,!1,ao,Co,0,ko,Zt.decorations,ae,0,Se.spaceWidth,Se.middotWidth,Se.wsmiddotWidth,w,V,se,pe!==Ii.e.OFF,null),ut),ut.appendASCIIString("</div>")}ut.appendASCIIString("</div>"),Oi.a.applyFontInfoSlow(Ne,Se);const yt=ut.build(),Ct=be?be.createHTML(yt):yt;Ne.innerHTML=Ct}let Bt=0;function zt(Ne,ae,ke,Je){const g=ke+Bt++;return Ne.registerDecorationType(ae,g,Je),{dispose(){Ne.removeDecorationType(g)},resolve(){return Ne.resolveDecorationOptions(g,!0)}}}class ro extends B.a{constructor(Ne,ae,ke,Je){super();this.editor=Ne,this.position=ae,this.domNode=ke,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(Je),this._register(Object(B.i)(()=>{this.editor.removeContentWidget(this)})),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}Object(Ie.f)((Ne,ae)=>{const ke=Ne.getColor(fi.K);if(ke){const g=String(ke.rgba.a),u=E.a.Format.CSS.format(at(ke));ae.addRule(`.monaco-editor .ghost-text-decoration { opacity: ${g} !important; color: ${u} !important; }`),ae.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${ke.toString()} !important; }`),ae.addRule(`.monaco-editor .suggest-preview-text .ghost-text { opacity: ${g} !important; color: ${u} !important; }`)}const Je=Ne.getColor(fi.J);Je&&(ae.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 1px solid ${Je}; }`),ae.addRule(`.monaco-editor .ghost-text-decoration { border: 1px solid ${Je}; }`),ae.addRule(`.monaco-editor .ghost-text-decoration-preview { border: 1px solid ${Je}; }`))});var P=t("nrhi"),q=function(Ne,ae,ke,Je){var g=arguments.length,u=g<3?ae:Je===null?Je=Object.getOwnPropertyDescriptor(ae,ke):Je,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(Ne,ae,ke,Je);else for(var V=Ne.length-1;V>=0;V--)(w=Ne[V])&&(u=(g<3?w(u):g>3?w(ae,ke,u):w(ae,ke))||u);return g>3&&u&&Object.defineProperty(ae,ke,u),u},Ae=function(Ne,ae){return function(ke,Je){ae(ke,Je,Ne)}},Ge=function(Ne,ae,ke,Je){function g(u){return u instanceof ke?u:new ke(function(w){w(u)})}return new(ke||(ke=Promise))(function(u,w){function V(Se){try{pe(Je.next(Se))}catch(Qe){w(Qe)}}function se(Se){try{pe(Je.throw(Se))}catch(Qe){w(Qe)}}function pe(Se){Se.done?u(Se.value):g(Se.value).then(V,se)}pe((Je=Je.apply(Ne,ae||[])).next())})};let ft=class Ne extends B.a{constructor(ae,ke){super();this.editor=ae,this.instantiationService=ke,this.triggeredExplicitly=!1,this.activeController=this._register(new B.d),this._register(this.editor.onDidChangeModel(()=>{this.updateModelController()})),this._register(this.editor.onDidChangeConfiguration(Je=>{Je.hasChanged(105)&&this.updateModelController(),Je.hasChanged(54)&&this.updateModelController()})),this.updateModelController()}static get(ae){return ae.getContribution(Ne.ID)}get activeModel(){var ae;return(ae=this.activeController.value)===null||ae===void 0?void 0:ae.model}updateModelController(){const ae=this.editor.getOption(105),ke=this.editor.getOption(54);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(ae.preview||ke.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(jt,this.editor):void 0}shouldShowHoverAt(ae){var ke;return((ke=this.activeModel)===null||ke===void 0?void 0:ke.shouldShowHoverAt(ae))||!1}shouldShowHoverAtViewZone(ae){var ke,Je;return((Je=(ke=this.activeController.value)===null||ke===void 0?void 0:ke.widget)===null||Je===void 0?void 0:Je.shouldShowHoverAtViewZone(ae))||!1}trigger(){var ae;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),(ae=this.activeModel)===null||ae===void 0||ae.triggerInlineCompletion()}commit(){var ae;(ae=this.activeModel)===null||ae===void 0||ae.commitInlineCompletion()}hide(){var ae;(ae=this.activeModel)===null||ae===void 0||ae.hideInlineCompletion()}showNextInlineCompletion(){var ae;(ae=this.activeModel)===null||ae===void 0||ae.showNextInlineCompletion()}showPreviousInlineCompletion(){var ae;(ae=this.activeModel)===null||ae===void 0||ae.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var ae;return Ge(this,void 0,void 0,function*(){const ke=yield(ae=this.activeModel)===null||ae===void 0?void 0:ae.hasMultipleInlineCompletions();return ke!==void 0?ke:!1})}};ft.inlineSuggestionVisible=new _i.c("inlineSuggestionVisible",!1,he.a("inlineSuggestionVisible","Whether an inline suggestion is visible")),ft.inlineSuggestionHasIndentation=new _i.c("inlineSuggestionHasIndentation",!1,he.a("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace")),ft.inlineSuggestionHasIndentationLessThanTabSize=new _i.c("inlineSuggestionHasIndentationLessThanTabSize",!0,he.a("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")),ft.ID="editor.contrib.ghostTextController",ft=q([Ae(1,Pi.a)],ft);class Dt{constructor(Ne){this.contextKeyService=Ne,this.inlineCompletionVisible=ft.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=ft.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=ft.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService)}}let jt=class extends B.a{constructor(ae,ke,Je){super();this.editor=ae,this.instantiationService=ke,this.contextKeyService=Je,this.contextKeys=new Dt(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(ui,this.editor)),this.widget=this._register(this.instantiationService.createInstance(Re,this.editor,this.model)),this._register(Object(B.i)(()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(!0)})),this._register(this.model.onDidChange(()=>{this.updateContextKeys()})),this.updateContextKeys()}updateContextKeys(){var ae;this.contextKeys.inlineCompletionVisible.set(((ae=this.model.activeInlineCompletionsModel)===null||ae===void 0?void 0:ae.ghostText)!==void 0);let ke=!1,Je=!0;const g=this.model.inlineCompletionsModel.ghostText;if(!!this.model.activeInlineCompletionsModel&&g&&g.parts.length>0){const{column:u,lines:w}=g.parts[0],V=w[0],se=this.editor.getModel().getLineIndentColumn(g.lineNumber),pe=u<=se;if(pe){let Se=Object(Ye.u)(V);Se===-1&&(Se=V.length-1),ke=Se>0;const Qe=this.editor.getModel().getOptions().tabSize,ut=qe.a.visibleColumnFromColumn(V,Se+1,Qe);Je=ut<Qe}}this.contextKeys.inlineCompletionSuggestsIndentation.set(ke),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(Je)}};jt=q([Ae(1,Pi.a),Ae(2,_i.b)],jt);const Xt=x.c.bindToContribution(ft.get),uo=new Xt({id:ct,precondition:ft.inlineSuggestionVisible,handler(Ne){Ne.commit(),Ne.editor.focus()}});Object(x.k)(uo),P.a.registerKeybindingRule({primary:2,weight:200,id:uo.id,when:_i.a.and(uo.precondition,A.a.tabMovesFocus.toNegated(),ft.inlineSuggestionHasIndentationLessThanTabSize)}),Object(x.k)(new Xt({id:"editor.action.inlineSuggest.hide",precondition:ft.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(Ne){Ne.hide()}}));class io extends x.b{constructor(){super({id:io.ID,label:he.a("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:_i.a.and(A.a.writable,ft.inlineSuggestionVisible),kbOpts:{weight:100,primary:512|89}})}run(Ne,ae){return Ge(this,void 0,void 0,function*(){const ke=ft.get(ae);ke&&(ke.showNextInlineCompletion(),ae.focus())})}}io.ID="editor.action.inlineSuggest.showNext";class ho extends x.b{constructor(){super({id:ho.ID,label:he.a("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:_i.a.and(A.a.writable,ft.inlineSuggestionVisible),kbOpts:{weight:100,primary:512|87}})}run(Ne,ae){return Ge(this,void 0,void 0,function*(){const ke=ft.get(ae);ke&&(ke.showPreviousInlineCompletion(),ae.focus())})}}ho.ID="editor.action.inlineSuggest.showPrevious";class mo extends x.b{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:he.a("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:A.a.writable})}run(Ne,ae){return Ge(this,void 0,void 0,function*(){const ke=ft.get(ae);ke&&ke.trigger()})}}Object(x.l)(ft.ID,ft),Object(x.j)(mo),Object(x.j)(io),Object(x.j)(ho);var Io=t("R3nR"),Ao=t("fjLI"),Oo=function(Ne,ae,ke,Je){var g=arguments.length,u=g<3?ae:Je===null?Je=Object.getOwnPropertyDescriptor(ae,ke):Je,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(Ne,ae,ke,Je);else for(var V=Ne.length-1;V>=0;V--)(w=Ne[V])&&(u=(g<3?w(u):g>3?w(ae,ke,u):w(ae,ke))||u);return g>3&&u&&Object.defineProperty(ae,ke,u),u},Wo=function(Ne,ae){return function(ke,Je){ae(ke,Je,Ne)}};class si{constructor(Ne,ae,ke){this.owner=Ne,this.range=ae,this.controller=ke}isValidForHoverAnchor(Ne){return Ne.type===1&&this.range.startColumn<=Ne.range.startColumn&&this.range.endColumn>=Ne.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}}let hi=class{constructor(ae,ke,Je,g,u,w,V,se){this._editor=ae,this._hover=ke,this._commandService=Je,this._menuService=g,this._contextKeyService=u,this._modeService=w,this._openerService=V,this.accessibilityService=se}suggestHoverAnchor(ae){const ke=ft.get(this._editor);if(!ke)return null;if(ae.target.type===8){const Je=ae.target.detail;if(ke.shouldShowHoverAtViewZone(Je.viewZoneId))return new Oe(1e3,this,N.a.fromPositions(Je.positionBefore||Je.position,Je.positionBefore||Je.position))}if(ae.target.type===7&&ae.target.range&&ke.shouldShowHoverAt(ae.target.range))return new Oe(1e3,this,ae.target.range);if(ae.target.type===6&&ae.target.range&&ae.target.detail){const Je=ae.target.detail.mightBeForeignElement;if(Je&&ke.shouldShowHoverAt(ae.target.range))return new Oe(1e3,this,ae.target.range)}return null}computeSync(ae,ke){const Je=ft.get(this._editor);return Je&&Je.shouldShowHoverAt(ae.range)?[new si(this,ae.range,Je)]:[]}renderHoverParts(ae,ke,Je){const g=new B.b,u=ae[0];this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(u,ke,g);const w=g.add(this._menuService.createMenu(Ao.b.InlineCompletionsActions,this._contextKeyService)),V=Je.addAction({label:he.a("showNextInlineSuggestion","Next"),commandId:io.ID,run:()=>this._commandService.executeCommand(io.ID)}),se=Je.addAction({label:he.a("showPreviousInlineSuggestion","Previous"),commandId:ho.ID,run:()=>this._commandService.executeCommand(ho.ID)});Je.addAction({label:he.a("acceptInlineSuggestion","Accept"),commandId:uo.id,run:()=>this._commandService.executeCommand(uo.id)});const pe=[V,se];for(const Se of pe)Se.setEnabled(!1);u.hasMultipleSuggestions().then(Se=>{for(const Qe of pe)Qe.setEnabled(Se)});for(const[Se,Qe]of w.getActions())for(const ut of Qe)ut instanceof Ao.c&&Je.addAction({label:ut.label,commandId:ut.item.id,run:()=>this._commandService.executeCommand(ut.item.id)});return g}renderScreenReaderText(ae,ke,Je){var g,u;const w=L.a,V=w("div.hover-row.markdown-hover"),se=L.q(V,w("div.hover-contents")),pe=Je.add(new Ke.a({editor:this._editor},this._modeService,this._openerService)),Se=ut=>{Je.add(pe.onDidRenderAsync(()=>{se.className="hover-contents code-hover-contents",this._hover.onContentsChanged()}));const yt=he.a("inlineSuggestionFollows","Suggestion:"),Ct=Je.add(pe.render(new nt.a().appendText(yt).appendCodeblock("text",ut)));se.replaceChildren(Ct.element)},Qe=(u=(g=ae.controller.activeModel)===null||g===void 0?void 0:g.inlineCompletionsModel)===null||u===void 0?void 0:u.ghostText;if(Qe){const ut=this._editor.getModel().getLineContent(Qe.lineNumber);Se(Qe.renderForScreenReader(ut))}ke.appendChild(V)}};hi=Oo([Wo(2,k.b),Wo(3,Ao.a),Wo(4,_i.b),Wo(5,F.a),Wo(6,Tt.a),Wo(7,Io.b)],hi);var Uo=t("bexQ"),mi=t("QVNv"),Ri=function(Ne,ae,ke,Je){var g=arguments.length,u=g<3?ae:Je===null?Je=Object.getOwnPropertyDescriptor(ae,ke):Je,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(Ne,ae,ke,Je);else for(var V=Ne.length-1;V>=0;V--)(w=Ne[V])&&(u=(g<3?w(u):g>3?w(ae,ke,u):w(ae,ke))||u);return g>3&&u&&Object.defineProperty(ae,ke,u),u},Di=function(Ne,ae){return function(ke,Je){ae(ke,Je,Ne)}},pi=function(Ne,ae,ke,Je){function g(u){return u instanceof ke?u:new ke(function(w){w(u)})}return new(ke||(ke=Promise))(function(u,w){function V(Se){try{pe(Je.next(Se))}catch(Qe){w(Qe)}}function se(Se){try{pe(Je.throw(Se))}catch(Qe){w(Qe)}}function pe(Se){Se.done?u(Se.value):g(Se.value).then(V,se)}pe((Je=Je.apply(Ne,ae||[])).next())})};const Wi=L.a;let fn=class extends B.a{constructor(ae){super();this._keybindingService=ae,this._hasContent=!1,this.hoverElement=Wi("div.hover-row.status-bar"),this.actionsElement=L.q(this.hoverElement,Wi("div.actions"))}get hasContent(){return this._hasContent}addAction(ae){const ke=this._keybindingService.lookupKeybinding(ae.commandId),Je=ke?ke.getLabel():null;return this._hasContent=!0,this._register(S.render(this.actionsElement,ae,Je))}append(ae){const ke=L.q(this.actionsElement,ae);return this._hasContent=!0,ke}};fn=Ri([Di(0,Uo.a)],fn);class In{constructor(Ne,ae){this._participants=ae,this._editor=Ne,this._result=[],this._anchor=null}setAnchor(Ne){this._anchor=Ne,this._result=[]}clearResult(){this._result=[]}static _getLineDecorations(Ne,ae){if(ae.type!==1)return[];const ke=Ne.getModel(),Je=ae.range.startLineNumber,g=ke.getLineMaxColumn(Je);return Ne.getLineDecorations(Je).filter(u=>{if(u.options.isWholeLine)return!0;const w=u.range.startLineNumber===Je?u.range.startColumn:1,V=u.range.endLineNumber===Je?u.range.endColumn:g;return!(w>ae.range.startColumn||ae.range.endColumn>V)})}computeAsync(Ne){return pi(this,void 0,void 0,function*(){const ae=this._anchor;if(!this._editor.hasModel()||!ae)return Promise.resolve([]);const ke=In._getLineDecorations(this._editor,ae),Je=yield Promise.all(this._participants.map(g=>this._computeAsync(g,ke,ae,Ne)));return Object(_.k)(Je)})}_computeAsync(Ne,ae,ke,Je){return pi(this,void 0,void 0,function*(){return Ne.computeAsync?Ne.computeAsync(ke,ae,Je):[]})}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const Ne=In._getLineDecorations(this._editor,this._anchor);let ae=[];for(const ke of this._participants)ae=ae.concat(ke.computeSync(this._anchor,Ne));return Object(_.e)(ae)}onResult(Ne,ae){ae?this._result=Ne.concat(this._result):this._result=this._result.concat(Ne)}getResult(){return this._result.slice(0)}getResultWithLoadingMessage(){if(this._anchor){for(const Ne of this._participants)if(Ne.createLoadingMessage){const ae=Ne.createLoadingMessage(this._anchor);if(ae)return this._result.slice(0).concat([ae])}}return this._result.slice(0)}}let an=class Ne extends r.a{constructor(ae,ke,Je,g,u){super();this._hoverVisibleKey=ke,this._keybindingService=g,this._contextKeyService=u,this.allowEditorOverflow=!0,this._participants=[Je.createInstance(Me,ae,this),Je.createInstance(tt,ae,this),Je.createInstance(hi,ae,this),Je.createInstance(Ut,ae,this)],this._editor=ae,this._isVisible=!1,this._stoleFocus=!1,this._renderDisposable=null,this._hover=this._register(new D),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this.onkeydown(this._hover.containerDomNode,w=>{w.equals(9)&&this.hide()}),this._register(this._editor.onDidChangeConfiguration(w=>{w.hasChanged(43)&&this._updateFont()})),this._editor.onDidLayoutChange(()=>this.layout()),this.layout(),this._editor.addContentWidget(this),this._showAtPosition=null,this._showAtRange=null,this._stoleFocus=!1,this._messages=[],this._lastAnchor=null,this._computer=new In(this._editor,this._participants),this._highlightDecorations=[],this._isChangingDecorations=!1,this._shouldFocus=!1,this._colorPicker=null,this._preferAbove=this._editor.getOption(52).above,this._hoverOperation=new De(this._computer,w=>this._withResult(w,!0),null,w=>this._withResult(w,!1),this._editor.getOption(52).delay),this._register(L.o(this.getDomNode(),L.d.FOCUS,()=>{this._colorPicker&&this.getDomNode().classList.add("colorpicker-hover")})),this._register(L.o(this.getDomNode(),L.d.BLUR,()=>{this.getDomNode().classList.remove("colorpicker-hover")})),this._register(ae.onDidChangeConfiguration(()=>{this._hoverOperation.setHoverTime(this._editor.getOption(52).delay),this._preferAbove=this._editor.getOption(52).above})),this._register(c.E.onDidChange(()=>{this._isVisible&&this._lastAnchor&&this._messages.length>0&&(this._hover.contentsDomNode.textContent="",this._renderMessages(this._lastAnchor,this._messages))}))}dispose(){this._hoverOperation.cancel(),this._editor.removeContentWidget(this),super.dispose()}getId(){return Ne.ID}getDomNode(){return this._hover.containerDomNode}_shouldShowAt(ae){const ke=ae.target.type;if(ke===6)return!0;if(ke===7){const Je=this._editor.getOption(43).typicalHalfwidthCharacterWidth/2,g=ae.target.detail;if(g&&!g.isAfterLines&&typeof g.horizontalDistanceToText=="number"&&g.horizontalDistanceToText<Je)return!0}return!1}maybeShowAt(ae){var ke;const Je=[];for(const g of this._participants)if(typeof g.suggestHoverAnchor=="function"){const u=g.suggestHoverAnchor(ae);u&&Je.push(u)}if(this._shouldShowAt(ae)&&ae.target.range){const g=[...((ke=ae.target.element)===null||ke===void 0?void 0:ke.classList.values())||[]].find(w=>w.startsWith("ced-colorBox"))&&ae.target.range.endColumn-ae.target.range.startColumn===1,u=g?new N.a(ae.target.range.startLineNumber,ae.target.range.startColumn+1,ae.target.range.endLineNumber,ae.target.range.endColumn+1):ae.target.range;Je.push(new we(0,u))}return Je.length===0?!1:(Je.sort((g,u)=>u.priority-g.priority),this._startShowingAt(Je[0],0,!1),!0)}_showAt(ae,ke,Je){this._showAtPosition=ae,this._showAtRange=ke,this._hoverVisibleKey.set(!0),this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=Je,Je&&this._hover.containerDomNode.focus()}getPosition(){if(this._isVisible){let ae=this._preferAbove;return!ae&&this._contextKeyService.getContextKeyValue(mi.b.Visible.key)&&(ae=!0),{position:this._showAtPosition,range:this._showAtRange,preference:ae?[1,2]:[2,1]}}return null}_updateFont(){const ae=Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code"));ae.forEach(ke=>this._editor.applyFontInfo(ke))}_updateContents(ae){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(ae),this._updateFont(),this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}layout(){const ae=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:ke,lineHeight:Je}=this._editor.getOption(43);this._hover.contentsDomNode.style.fontSize=`${ke}px`,this._hover.contentsDomNode.style.lineHeight=`${Je/ke}`,this._hover.contentsDomNode.style.maxHeight=`${ae}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}onModelDecorationsChanged(){if(this._isChangingDecorations)return;this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))}startShowingAtRange(ae,ke,Je){this._startShowingAt(new we(0,ae),ke,Je)}_startShowingAt(ae,ke,Je){if(this._lastAnchor&&this._lastAnchor.equals(ae))return;if(this._hoverOperation.cancel(),this._isVisible)if(!this._showAtPosition||!this._lastAnchor||!ae.canAdoptVisibleHover(this._lastAnchor,this._showAtPosition))this.hide();else{const g=this._messages.filter(u=>u.isValidForHoverAnchor(ae));if(g.length===0)this.hide();else{if(g.length===this._messages.length)return;this._renderMessages(ae,g)}}this._lastAnchor=ae,this._computer.setAnchor(ae),this._shouldFocus=Je,this._hoverOperation.start(ke)}hide(){this._lastAnchor=null,this._hoverOperation.cancel(),this._isVisible&&(setTimeout(()=>{this._isVisible||this._hoverVisibleKey.set(!1)},0),this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus()),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[]),this._isChangingDecorations=!1,this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null}isColorPickerVisible(){return!!this._colorPicker}setColorPicker(ae){this._colorPicker=ae}onContentsChanged(){this._hover.onContentsChanged()}_withResult(ae,ke){this._messages=ae,this._lastAnchor&&this._messages.length>0?this._renderMessages(this._lastAnchor,this._messages):ke&&this.hide()}_renderMessages(ae,ke){this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null;let Je=1073741824,g=ke[0].range,u=null,w=document.createDocumentFragment();const V=new B.b,se=new Map;for(const Se of ke){Je=Math.min(Je,Se.range.startColumn),g=N.a.plusRange(g,Se.range),Se.forceShowAtRange&&(u=Se.range),se.has(Se.owner)||se.set(Se.owner,[]);const Qe=se.get(Se.owner);Qe.push(Se)}const pe=V.add(new fn(this._keybindingService));for(const[Se,Qe]of se)V.add(Se.renderHoverParts(Qe,w,pe));pe.hasContent&&w.appendChild(pe.hoverElement),this._renderDisposable=V,w.hasChildNodes()&&(u?this._showAt(u.getStartPosition(),u,this._shouldFocus):this._showAt(new b.a(ae.range.startLineNumber,Je),g,this._shouldFocus),this._updateContents(w)),this._colorPicker&&this._colorPicker.layout(),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,g?[{range:g,options:Ne._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1}};an.ID="editor.contrib.modesContentHoverWidget",an._DECORATION_OPTIONS=h.b.register({description:"content-hover-highlight",className:"hoverHighlight"}),an=Ri([Di(2,Pi.a),Di(3,Uo.a),Di(4,_i.b)],an);const bn=L.a;class Wn{constructor(Ne){this._editor=Ne,this._lineNumber=-1,this._result=[]}setLineNumber(Ne){this._lineNumber=Ne,this._result=[]}clearResult(){this._result=[]}computeSync(){const Ne=Je=>({value:Je}),ae=this._editor.getLineDecorations(this._lineNumber),ke=[];if(!ae)return ke;for(const Je of ae){if(!Je.options.glyphMarginClassName)continue;const g=Je.options.glyphMarginHoverMessage;if(!g||Object(nt.b)(g))continue;ke.push(...Object(_.c)(g).map(Ne))}return ke}onResult(Ne,ae){this._result=this._result.concat(Ne)}getResult(){return this._result}getResultWithLoadingMessage(){return this.getResult()}}class gn extends r.a{constructor(Ne,ae,ke=Tt.b){super();this._renderDisposeables=this._register(new B.b),this._editor=Ne,this._isVisible=!1,this._messages=[],this._lastLineNumber=-1,this._hover=this._register(new D),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new Ke.a({editor:this._editor},ae,ke)),this._computer=new Wn(this._editor),this._hoverOperation=new De(this._computer,Je=>this._withResult(Je),void 0,Je=>this._withResult(Je),300),this._register(this._editor.onDidChangeConfiguration(Je=>{Je.hasChanged(43)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._hoverOperation.cancel(),this._editor.removeOverlayWidget(this),super.dispose()}getId(){return gn.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_showAt(Ne){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const ae=this._editor.getLayoutInfo(),ke=this._editor.getTopForLineNumber(Ne),Je=this._editor.getScrollTop(),g=this._editor.getOption(58),u=this._hover.containerDomNode.clientHeight,w=ke-Je-(u-g)/2;this._hover.containerDomNode.style.left=`${ae.glyphMarginLeft+ae.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(w),0)}px`}_updateFont(){const Ne=Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code"));Ne.forEach(ae=>this._editor.applyFontInfo(ae))}_updateContents(Ne){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(Ne),this._updateFont()}onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start(0))}startShowingAt(Ne){if(this._lastLineNumber===Ne)return;this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=Ne,this._computer.setLineNumber(Ne),this._hoverOperation.start(0)}hide(){if(this._lastLineNumber=-1,this._hoverOperation.cancel(),!this._isVisible)return;this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible)}_withResult(Ne){this._messages=Ne,this._messages.length>0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()}_renderMessages(Ne,ae){this._renderDisposeables.clear();const ke=document.createDocumentFragment();for(const Je of ae){const g=bn("div.hover-row.markdown-hover"),u=L.q(g,bn("div.hover-contents")),w=this._renderDisposeables.add(this._markdownRenderer.render(Je.value));u.appendChild(w.element),ke.appendChild(g)}this._updateContents(ke),this._showAt(Ne)}}gn.ID="editor.contrib.modesGlyphHoverWidget";var $n=function(Ne,ae,ke,Je){var g=arguments.length,u=g<3?ae:Je===null?Je=Object.getOwnPropertyDescriptor(ae,ke):Je,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")u=Reflect.decorate(Ne,ae,ke,Je);else for(var V=Ne.length-1;V>=0;V--)(w=Ne[V])&&(u=(g<3?w(u):g>3?w(ae,ke,u):w(ae,ke))||u);return g>3&&u&&Object.defineProperty(ae,ke,u),u},Un=function(Ne,ae){return function(ke,Je){ae(ke,Je,Ne)}};let qo=class Ne{constructor(ae,ke,Je,g,u){this._editor=ae,this._instantiationService=ke,this._openerService=Je,this._modeService=g,this._toUnhook=new B.b,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(w=>{w.hasChanged(52)&&(this._unhookEvents(),this._hookEvents())}),this._hoverVisibleKey=A.a.hoverVisible.bindTo(u)}static get(ae){return ae.getContribution(Ne.ID)}_hookEvents(){const ae=()=>this._hideWidgets(),ke=this._editor.getOption(52);this._isHoverEnabled=ke.enabled,this._isHoverSticky=ke.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(Je=>this._onEditorMouseDown(Je))),this._toUnhook.add(this._editor.onMouseUp(Je=>this._onEditorMouseUp(Je))),this._toUnhook.add(this._editor.onMouseMove(Je=>this._onEditorMouseMove(Je))),this._toUnhook.add(this._editor.onKeyDown(Je=>this._onKeyDown(Je))),this._toUnhook.add(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged()))):(this._toUnhook.add(this._editor.onMouseMove(Je=>this._onEditorMouseMove(Je))),this._toUnhook.add(this._editor.onKeyDown(Je=>this._onKeyDown(Je)))),this._toUnhook.add(this._editor.onMouseLeave(ae)),this._toUnhook.add(this._editor.onDidChangeModel(ae)),this._toUnhook.add(this._editor.onDidScrollChange(Je=>this._onEditorScrollChanged(Je)))}_unhookEvents(){this._toUnhook.clear()}_onModelDecorationsChanged(){var ae,ke;(ae=this._contentWidget)===null||ae===void 0||ae.onModelDecorationsChanged(),(ke=this._glyphWidget)===null||ke===void 0||ke.onModelDecorationsChanged()}_onEditorScrollChanged(ae){(ae.scrollTopChanged||ae.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(ae){this._isMouseDown=!0;const ke=ae.target.type;if(ke===9&&ae.target.detail===an.ID){this._hoverClicked=!0;return}if(ke===12&&ae.target.detail===gn.ID)return;ke!==12&&ae.target.detail!==gn.ID&&(this._hoverClicked=!1),this._hideWidgets()}_onEditorMouseUp(ae){this._isMouseDown=!1}_onEditorMouseMove(ae){var ke,Je,g,u,w;let V=ae.target.type;if(this._isMouseDown&&this._hoverClicked)return;if(this._isHoverSticky&&V===9&&ae.target.detail===an.ID)return;if(this._isHoverSticky&&!((Je=(ke=ae.event.browserEvent.view)===null||ke===void 0?void 0:ke.getSelection())===null||Je===void 0?void 0:Je.isCollapsed))return;if(!this._isHoverSticky&&V===9&&ae.target.detail===an.ID&&((g=this._contentWidget)===null||g===void 0?void 0:g.isColorPickerVisible()))return;if(this._isHoverSticky&&V===12&&ae.target.detail===gn.ID)return;if(!this._isHoverEnabled){this._hideWidgets();return}const se=this._getOrCreateContentWidget();if(se.maybeShowAt(ae)){(u=this._glyphWidget)===null||u===void 0||u.hide();return}if(V===2&&ae.target.position){(w=this._contentWidget)===null||w===void 0||w.hide(),this._glyphWidget||(this._glyphWidget=new gn(this._editor,this._modeService,this._openerService)),this._glyphWidget.startShowingAt(ae.target.position.lineNumber);return}this._hideWidgets()}_onKeyDown(ae){ae.keyCode!==5&&ae.keyCode!==6&&ae.keyCode!==57&&ae.keyCode!==4&&this._hideWidgets()}_hideWidgets(){var ae,ke,Je;if(this._isMouseDown&&this._hoverClicked&&((ae=this._contentWidget)===null||ae===void 0?void 0:ae.isColorPickerVisible()))return;this._hoverClicked=!1,(ke=this._glyphWidget)===null||ke===void 0||ke.hide(),(Je=this._contentWidget)===null||Je===void 0||Je.hide()}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(an,this._editor,this._hoverVisibleKey)),this._contentWidget}isColorPickerVisible(){var ae;return((ae=this._contentWidget)===null||ae===void 0?void 0:ae.isColorPickerVisible())||!1}showContentHover(ae,ke,Je){this._getOrCreateContentWidget().startShowingAtRange(ae,ke,Je)}dispose(){var ae,ke;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(ae=this._glyphWidget)===null||ae===void 0||ae.dispose(),(ke=this._contentWidget)===null||ke===void 0||ke.dispose()}};qo.ID="editor.contrib.hover",qo=$n([Un(1,Pi.a),Un(2,Tt.a),Un(3,F.a),Un(4,_i.b)],qo);class oo extends x.b{constructor(){super({id:"editor.action.showHover",label:he.a({key:"showHover",comment:["Label for action that will trigger the showing of a hover in the editor.","This allows for users to show the hover without using the mouse."]},"Show Hover"),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:A.a.editorTextFocus,primary:Object(f.c)(2048|41,2048|39),weight:100}})}run(Ne,ae){if(!ae.hasModel())return;let ke=qo.get(ae);if(!ke)return;const Je=ae.getPosition(),g=new N.a(Je.lineNumber,Je.column,Je.lineNumber,Je.column),u=ae.getOption(2)===2;ke.showContentHover(g,1,u)}}class So extends x.b{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:he.a({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(Ne,ae){let ke=qo.get(ae);if(!ke)return;const Je=ae.getPosition();if(!Je)return;const g=new N.a(Je.lineNumber,Je.column,Je.lineNumber,Je.column),u=I.GotoDefinitionAtPositionEditorContribution.get(ae),w=u.startFindDefinitionFromCursor(Je);w.then(()=>{ke.showContentHover(g,1,!0)})}}Object(x.l)(qo.ID,qo),Object(x.j)(oo),Object(x.j)(So),Object(Ie.f)((Ne,ae)=>{const ke=Ne.getColor(xe.H);ke&&ae.addRule(`.monaco-editor .hoverHighlight { background-color: ${ke}; }`);const Je=Ne.getColor(xe.E);Je&&ae.addRule(`.monaco-editor .monaco-hover { background-color: ${Je}; }`);const g=Ne.getColor(xe.F);g&&(ae.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${g}; }`),ae.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${g.transparent(.5)}; }`),ae.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${g.transparent(.5)}; }`),ae.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${g.transparent(.5)}; }`));const u=Ne.getColor(xe.Jc);u&&ae.addRule(`.monaco-editor .monaco-hover a { color: ${u}; }`);const w=Ne.getColor(xe.Ic);w&&ae.addRule(`.monaco-editor .monaco-hover a:hover { color: ${w}; }`);const V=Ne.getColor(xe.G);V&&ae.addRule(`.monaco-editor .monaco-hover { color: ${V}; }`);const se=Ne.getColor(xe.I);se&&ae.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${se}; }`);const pe=Ne.getColor(xe.Hc);pe&&ae.addRule(`.monaco-editor .monaco-hover code { background-color: ${pe}; }`)})},s7Km:function(mt,M,t){"use strict";t.r(M),t.d(M,"MoveWordCommand",function(){return b}),t.d(M,"WordLeftCommand",function(){return h}),t.d(M,"WordRightCommand",function(){return c}),t.d(M,"CursorWordStartLeft",function(){return p}),t.d(M,"CursorWordEndLeft",function(){return E}),t.d(M,"CursorWordLeft",function(){return y}),t.d(M,"CursorWordStartLeftSelect",function(){return C}),t.d(M,"CursorWordEndLeftSelect",function(){return O}),t.d(M,"CursorWordLeftSelect",function(){return k}),t.d(M,"CursorWordAccessibilityLeft",function(){return Y}),t.d(M,"CursorWordAccessibilityLeftSelect",function(){return Q}),t.d(M,"CursorWordStartRight",function(){return H}),t.d(M,"CursorWordEndRight",function(){return Z}),t.d(M,"CursorWordRight",function(){return oe}),t.d(M,"CursorWordStartRightSelect",function(){return $}),t.d(M,"CursorWordEndRightSelect",function(){return te}),t.d(M,"CursorWordRightSelect",function(){return ne}),t.d(M,"CursorWordAccessibilityRight",function(){return Ee}),t.d(M,"CursorWordAccessibilityRightSelect",function(){return fe}),t.d(M,"DeleteWordCommand",function(){return ee}),t.d(M,"DeleteWordLeftCommand",function(){return ie}),t.d(M,"DeleteWordRightCommand",function(){return U}),t.d(M,"DeleteWordStartLeft",function(){return G}),t.d(M,"DeleteWordEndLeft",function(){return J}),t.d(M,"DeleteWordLeft",function(){return he}),t.d(M,"DeleteWordStartRight",function(){return xe}),t.d(M,"DeleteWordEndRight",function(){return Ie}),t.d(M,"DeleteWordRight",function(){return Le}),t.d(M,"DeleteInsideWord",function(){return Te});var f=t("sswD"),B=t("LCkn"),x=t("/UlZ"),N=t("Ll0s"),A=t("1I1M"),F=t("5v8Y"),I=t("cGHE"),L=t("aokT"),v=t("gCVg"),m=t("wQH0"),d=t("cMvZ"),D=t("3/fG"),S=t("R3nR"),r=t("T8No"),_=t("FmXZ");class b extends f.c{constructor(ze){super(ze);this._inSelectionMode=ze.inSelectionMode,this._wordNavigationType=ze.wordNavigationType}runEditorCommand(ze,ue,je){if(!ue.hasModel())return;const Pe=Object(F.a)(ue.getOption(115)),ve=ue.getModel(),ce=ue.getSelections(),le=ce.map(Ce=>{const ye=new I.a(Ce.positionLineNumber,Ce.positionColumn),ge=this._move(Pe,ve,ye,this._wordNavigationType);return this._moveTo(Ce,ge,this._inSelectionMode)});if(ve.pushStackElement(),ue._getViewModel().setCursorStates("moveWordCommand",3,le.map(Ce=>N.d.fromModelSelection(Ce))),le.length===1){const Ce=new I.a(le[0].positionLineNumber,le[0].positionColumn);ue.revealPosition(Ce,0)}}_moveTo(ze,ue,je){return je?new v.a(ze.selectionStartLineNumber,ze.selectionStartColumn,ue.lineNumber,ue.column):new v.a(ue.lineNumber,ue.column,ue.lineNumber,ue.column)}}class h extends b{_move(ze,ue,je,Pe){return A.a.moveWordLeft(ze,ue,je,Pe)}}class c extends b{_move(ze,ue,je,Pe){return A.a.moveWordRight(ze,ue,je,Pe)}}class p extends h{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class E extends h{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class y extends h{constructor(){var ze;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:r.a.and(m.a.textInputFocus,(ze=r.a.and(S.a,_.b))===null||ze===void 0?void 0:ze.negate()),primary:2048|15,mac:{primary:512|15},weight:100}})}}class C extends h{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class O extends h{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class k extends h{constructor(){var ze;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:r.a.and(m.a.textInputFocus,(ze=r.a.and(S.a,_.b))===null||ze===void 0?void 0:ze.negate()),primary:2048|1024|15,mac:{primary:512|1024|15},weight:100}})}}class Y extends h{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(ze,ue,je,Pe){return super._move(Object(F.a)(x.g.wordSeparators.defaultValue),ue,je,Pe)}}class Q extends h{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(ze,ue,je,Pe){return super._move(Object(F.a)(x.g.wordSeparators.defaultValue),ue,je,Pe)}}class H extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class Z extends c{constructor(){var ze;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:r.a.and(m.a.textInputFocus,(ze=r.a.and(S.a,_.b))===null||ze===void 0?void 0:ze.negate()),primary:2048|17,mac:{primary:512|17},weight:100}})}}class oe extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class $ extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class te extends c{constructor(){var ze;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:r.a.and(m.a.textInputFocus,(ze=r.a.and(S.a,_.b))===null||ze===void 0?void 0:ze.negate()),primary:2048|1024|17,mac:{primary:512|1024|17},weight:100}})}}class ne extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class Ee extends c{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(ze,ue,je,Pe){return super._move(Object(F.a)(x.g.wordSeparators.defaultValue),ue,je,Pe)}}class fe extends c{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(ze,ue,je,Pe){return super._move(Object(F.a)(x.g.wordSeparators.defaultValue),ue,je,Pe)}}class ee extends f.c{constructor(ze){super(ze);this._whitespaceHeuristics=ze.whitespaceHeuristics,this._wordNavigationType=ze.wordNavigationType}runEditorCommand(ze,ue,je){if(!ue.hasModel())return;const Pe=Object(F.a)(ue.getOption(115)),ve=ue.getModel(),ce=ue.getSelections(),le=ue.getOption(5),Ce=ue.getOption(8),ye=d.b.getAutoClosingPairs(ve.getLanguageId()),ge=ue._getViewModel(),Me=ce.map(De=>{const we=this._delete({wordSeparators:Pe,model:ve,selection:De,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:ue.getOption(6),autoClosingBrackets:le,autoClosingQuotes:Ce,autoClosingPairs:ye,autoClosedCharacters:ge.getCursorAutoClosedCharacters()},this._wordNavigationType);return new B.a(we,"")});ue.pushUndoStop(),ue.executeCommands(this.id,Me),ue.pushUndoStop()}}class ie extends ee{_delete(ze,ue){let je=A.a.deleteWordLeft(ze,ue);return je||new L.a(1,1,1,1)}}class U extends ee{_delete(ze,ue){let je=A.a.deleteWordRight(ze,ue);if(je)return je;const Pe=ze.model.getLineCount(),ve=ze.model.getLineMaxColumn(Pe);return new L.a(Pe,ve,Pe,ve)}}class G extends ie{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:m.a.writable})}}class J extends ie{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:m.a.writable})}}class he extends ie{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:m.a.writable,kbOpts:{kbExpr:m.a.textInputFocus,primary:2048|1,mac:{primary:512|1},weight:100}})}}class xe extends U{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:m.a.writable})}}class Ie extends U{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:m.a.writable})}}class Le extends U{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:m.a.writable,kbOpts:{kbExpr:m.a.textInputFocus,primary:2048|20,mac:{primary:512|20},weight:100}})}}class Te extends f.b{constructor(){super({id:"deleteInsideWord",precondition:m.a.writable,label:D.a("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(ze,ue,je){if(!ue.hasModel())return;const Pe=Object(F.a)(ue.getOption(115)),ve=ue.getModel(),ce=ue.getSelections(),le=ce.map(Ce=>{const ye=A.a.deleteInsideWord(Pe,ve,Ce);return new B.a(ye,"")});ue.pushUndoStop(),ue.executeCommands(this.id,le),ue.pushUndoStop()}}Object(f.k)(new p),Object(f.k)(new E),Object(f.k)(new y),Object(f.k)(new C),Object(f.k)(new O),Object(f.k)(new k),Object(f.k)(new H),Object(f.k)(new Z),Object(f.k)(new oe),Object(f.k)(new $),Object(f.k)(new te),Object(f.k)(new ne),Object(f.k)(new Y),Object(f.k)(new Q),Object(f.k)(new Ee),Object(f.k)(new fe),Object(f.k)(new G),Object(f.k)(new J),Object(f.k)(new he),Object(f.k)(new xe),Object(f.k)(new Ie),Object(f.k)(new Le),Object(f.j)(Te)},sFUC:function(mt,M,t){"use strict";t.d(M,"b",function(){return B}),t.d(M,"c",function(){return x}),t.d(M,"a",function(){return N});var f=t("iuje");function B(A){return A&&typeof A.getEditorType=="function"?A.getEditorType()===f.a.ICodeEditor:!1}function x(A){return A&&typeof A.getEditorType=="function"?A.getEditorType()===f.a.IDiffEditor:!1}function N(A){return B(A)?A:x(A)?A.getModifiedEditor():null}},sM1p:function(mt,M,t){"use strict";t.d(M,"a",function(){return N}),t.d(M,"b",function(){return A});var f=t("S3by"),B=t("Cg/j"),x=f.a;const N=Object(B.c)("notificationService");class A{}},sStQ:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:function(){return t.e(345).then(t.bind(null,"QKwv"))}})},scqD:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("Cg/j");const B=Object(f.c)("themeService")},siPX:function(mt,M,t){},snIX:function(mt,M,t){"use strict";t.d(M,"a",function(){return I});var f=t("N0LK"),B=t("LCkn"),x=t("Ll0s"),N=t("+Fos"),A=t("aokT"),F=t("cGHE");class I{static deleteRight(L,v,m,d){let D=[],S=L!==3;for(let r=0,_=d.length;r<_;r++){const b=d[r];let h=b;if(h.isEmpty()){let c=b.getPosition(),p=N.a.right(v,m,c);h=new A.a(p.lineNumber,p.column,c.lineNumber,c.column)}if(h.isEmpty()){D[r]=null;continue}h.startLineNumber!==h.endLineNumber&&(S=!0),D[r]=new B.a(h,"")}return[S,D]}static isAutoClosingPairDelete(L,v,m,d,D,S,r){if(v==="never"&&m==="never")return!1;if(L==="never")return!1;for(let _=0,b=S.length;_<b;_++){const h=S[_],c=h.getPosition();if(!h.isEmpty())return!1;const p=D.getLineContent(c.lineNumber);if(c.column<2||c.column>=p.length+1)return!1;const E=p.charAt(c.column-2),y=d.get(E);if(!y)return!1;if(Object(x.g)(E)){if(m==="never")return!1}else if(v==="never")return!1;const C=p.charAt(c.column-1);let O=!1;for(const k of y)k.open===E&&k.close===C&&(O=!0);if(!O)return!1;if(L==="auto"){let k=!1;for(let Y=0,Q=r.length;Y<Q;Y++){const H=r[Y];if(c.lineNumber===H.startLineNumber&&c.column===H.startColumn){k=!0;break}}if(!k)return!1}}return!0}static _runAutoClosingPairDelete(L,v,m){let d=[];for(let D=0,S=m.length;D<S;D++){const r=m[D].getPosition(),_=new A.a(r.lineNumber,r.column-1,r.lineNumber,r.column+1);d[D]=new B.a(_,"")}return[!0,d]}static deleteLeft(L,v,m,d,D){if(this.isAutoClosingPairDelete(v.autoClosingDelete,v.autoClosingBrackets,v.autoClosingQuotes,v.autoClosingPairs.autoClosingPairsOpenByEnd,m,d,D))return this._runAutoClosingPairDelete(v,m,d);const S=[];let r=L!==2;for(let _=0,b=d.length;_<b;_++){let h=I.getDeleteRange(d[_],m,v);if(h.isEmpty()){S[_]=null;continue}h.startLineNumber!==h.endLineNumber&&(r=!0),S[_]=new B.a(h,"")}return[r,S]}static getDeleteRange(L,v,m){if(!L.isEmpty())return L;const d=L.getPosition();if(m.useTabStops&&d.column>1){const D=v.getLineContent(d.lineNumber),S=f.u(D),r=S===-1?D.length+1:S+1;if(d.column<=r){const _=x.a.visibleColumnFromColumn2(m,v,d),b=x.a.prevIndentTabStop(_,m.indentSize),h=x.a.columnFromVisibleColumn2(m,v,d.lineNumber,b);return new A.a(d.lineNumber,h,d.lineNumber,d.column)}}return A.a.fromPositions(I.getPositionAfterDeleteLeft(d,v),d)}static getPositionAfterDeleteLeft(L,v){if(L.column>1){const m=f.y(L.column-1,v.getLineContent(L.lineNumber));return L.with(void 0,m+1)}else if(L.lineNumber>1){const m=L.lineNumber-1;return new F.a(m,v.getLineMaxColumn(m))}else return L}static cut(L,v,m){let d=[],D=null;m.sort((S,r)=>F.a.compare(S.getStartPosition(),r.getEndPosition()));for(let S=0,r=m.length;S<r;S++){const _=m[S];if(_.isEmpty())if(L.emptySelectionClipboard){let b=_.getPosition(),h,c,p,E;b.lineNumber<v.getLineCount()?(h=b.lineNumber,c=1,p=b.lineNumber+1,E=1):b.lineNumber>1&&(D==null?void 0:D.endLineNumber)!==b.lineNumber?(h=b.lineNumber-1,c=v.getLineMaxColumn(b.lineNumber-1),p=b.lineNumber,E=v.getLineMaxColumn(b.lineNumber)):(h=b.lineNumber,c=1,p=b.lineNumber,E=v.getLineMaxColumn(b.lineNumber));let y=new A.a(h,c,p,E);D=y,y.isEmpty()?d[S]=null:d[S]=new B.a(y,"")}else d[S]=null;else d[S]=new B.a(_,"")}return new x.e(0,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},sswD:function(mt,M,t){"use strict";t.d(M,"a",function(){return _}),t.d(M,"e",function(){return b}),t.d(M,"c",function(){return c}),t.d(M,"b",function(){return p}),t.d(M,"f",function(){return E}),t.d(M,"n",function(){return y}),t.d(M,"o",function(){return C}),t.d(M,"k",function(){return O}),t.d(M,"j",function(){return k}),t.d(M,"p",function(){return Y}),t.d(M,"m",function(){return Q}),t.d(M,"l",function(){return H}),t.d(M,"d",function(){return Z}),t.d(M,"i",function(){return ne}),t.d(M,"g",function(){return Ee}),t.d(M,"h",function(){return fe});var f=t("3/fG"),B=t("bY76"),x=t("Vxe3"),N=t("cGHE"),A=t("G2kB"),F=t("t49l"),I=t("fjLI"),L=t("nnTU"),v=t("T8No"),m=t("nrhi"),d=t("ic2d"),D=t("XXUj"),S=t("746U"),r=t("09fa");class _{constructor(ee){this.id=ee.id,this.precondition=ee.precondition,this._kbOpts=ee.kbOpts,this._menuOpts=ee.menuOpts,this._description=ee.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const ee=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const ie of ee){let U=ie.kbExpr;this.precondition&&(U?U=v.a.and(U,this.precondition):U=this.precondition);const G={id:this.id,weight:ie.weight,args:ie.args,when:U,primary:ie.primary,secondary:ie.secondary,win:ie.win,linux:ie.linux,mac:ie.mac};m.a.registerKeybindingRule(G)}}L.a.registerCommand({id:this.id,handler:(ee,ie)=>this.runCommand(ee,ie),description:this._description})}_registerMenuItem(ee){I.d.appendMenuItem(ee.menuId,{group:ee.group,command:{id:this.id,title:ee.title,icon:ee.icon,precondition:this.precondition},when:ee.when,order:ee.order})}}class b extends _{constructor(){super(...arguments);this._implementations=[]}addImplementation(ee,ie,U){return this._implementations.push({priority:ee,name:ie,implementation:U}),this._implementations.sort((G,J)=>J.priority-G.priority),{dispose:()=>{for(let G=0;G<this._implementations.length;G++)if(this._implementations[G].implementation===U){this._implementations.splice(G,1);return}}}}runCommand(ee,ie){const U=ee.get(r.b);U.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const G of this._implementations){const J=G.implementation(ee,ie);if(J)return U.trace(`Command '${this.id}' was handled by '${G.name}'.`),typeof J=="boolean"?void 0:J}U.trace(`The Command '${this.id}' was not handled by any implementation.`)}}class h extends _{constructor(ee,ie){super(ie);this.command=ee}runCommand(ee,ie){return this.command.runCommand(ee,ie)}}class c extends _{static bindToContribution(ee){return class extends c{constructor(U){super(U);this._callback=U.handler}runEditorCommand(U,G,J){const he=ee(G);he&&this._callback(ee(G),J)}}}runCommand(ee,ie){const U=ee.get(x.a),G=U.getFocusedCodeEditor()||U.getActiveCodeEditor();return G?G.invokeWithinContext(J=>{const he=J.get(v.b);return he.contextMatchesRules(Object(S.p)(this.precondition))?this.runEditorCommand(J,G,ie):void 0}):void 0}}class p extends c{constructor(ee){super(p.convertOptions(ee));this.label=ee.label,this.alias=ee.alias}static convertOptions(ee){let ie;Array.isArray(ee.menuOpts)?ie=ee.menuOpts:ee.menuOpts?ie=[ee.menuOpts]:ie=[];function U(G){return G.menuId||(G.menuId=I.b.EditorContext),G.title||(G.title=ee.label),G.when=v.a.and(ee.precondition,G.when),G}return Array.isArray(ee.contextMenuOpts)?ie.push(...ee.contextMenuOpts.map(U)):ee.contextMenuOpts&&ie.push(U(ee.contextMenuOpts)),ee.menuOpts=ie,ee}runEditorCommand(ee,ie,U){return this.reportTelemetry(ee,ie),this.run(ee,ie,U||{})}reportTelemetry(ee,ie){ee.get(D.a).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class E extends p{constructor(){super(...arguments);this._implementations=[]}addImplementation(ee,ie){return this._implementations.push([ee,ie]),this._implementations.sort((U,G)=>G[0]-U[0]),{dispose:()=>{for(let U=0;U<this._implementations.length;U++)if(this._implementations[U][1]===ie){this._implementations.splice(U,1);return}}}}run(ee,ie,U){for(const G of this._implementations){const J=G[1](ee,ie,U);if(J)return typeof J=="boolean"?void 0:J}}}function y(ee,ie){L.a.registerCommand(ee,function(U,...G){const[J,he]=G;Object(S.c)(B.a.isUri(J)),Object(S.c)(N.a.isIPosition(he));const xe=U.get(A.a).getModel(J);if(xe){const Ie=N.a.lift(he);return ie(xe,Ie,...G.slice(2))}return U.get(F.a).createModelReference(J).then(Ie=>new Promise((Le,Te)=>{try{const ze=ie(Ie.object.textEditorModel,N.a.lift(he),G.slice(2));Le(ze)}catch(ze){Te(ze)}}).finally(()=>{Ie.dispose()}))})}function C(ee,ie){L.a.registerCommand(ee,function(U,...G){const[J]=G;Object(S.c)(B.a.isUri(J));const he=U.get(A.a).getModel(J);return he?ie(he,...G.slice(1)):U.get(F.a).createModelReference(J).then(xe=>new Promise((Ie,Le)=>{try{const Te=ie(xe.object.textEditorModel,G.slice(1));Ie(Te)}catch(Te){Le(Te)}}).finally(()=>{xe.dispose()}))})}function O(ee){return $.INSTANCE.registerEditorCommand(ee),ee}function k(ee){const ie=new ee;return $.INSTANCE.registerEditorAction(ie),ie}function Y(ee){return $.INSTANCE.registerEditorAction(ee),ee}function Q(ee){$.INSTANCE.registerEditorAction(ee)}function H(ee,ie){$.INSTANCE.registerEditorContribution(ee,ie)}var Z;(function(ee){function ie(xe){return $.INSTANCE.getEditorCommand(xe)}ee.getEditorCommand=ie;function U(){return $.INSTANCE.getEditorActions()}ee.getEditorActions=U;function G(){return $.INSTANCE.getEditorContributions()}ee.getEditorContributions=G;function J(xe){return $.INSTANCE.getEditorContributions().filter(Ie=>xe.indexOf(Ie.id)>=0)}ee.getSomeEditorContributions=J;function he(){return $.INSTANCE.getDiffEditorContributions()}ee.getDiffEditorContributions=he})(Z||(Z={}));const oe={EditorCommonContributions:"editor.contributions"};class ${constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(ee,ie){this.editorContributions.push({id:ee,ctor:ie})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(ee){ee.register(),this.editorActions.push(ee)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(ee){ee.register(),this.editorCommands[ee.id]=ee}getEditorCommand(ee){return this.editorCommands[ee]||null}}$.INSTANCE=new $,d.a.add(oe.EditorCommonContributions,$.INSTANCE);function te(ee){return ee.register(),ee}const ne=te(new b({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2048|56},menuOpts:[{menuId:I.b.MenubarEditMenu,group:"1_do",title:f.a({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:I.b.CommandPalette,group:"",title:f.a("undo","Undo"),order:1}]}));te(new h(ne,{id:"default:undo",precondition:void 0}));const Ee=te(new b({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2048|55,secondary:[2048|1024|56],mac:{primary:2048|1024|56}},menuOpts:[{menuId:I.b.MenubarEditMenu,group:"1_do",title:f.a({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:I.b.CommandPalette,group:"",title:f.a("redo","Redo"),order:1}]}));te(new h(Ee,{id:"default:redo",precondition:void 0}));const fe=te(new b({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2048|31},menuOpts:[{menuId:I.b.MenubarSelectionMenu,group:"1_basic",title:f.a({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:I.b.CommandPalette,group:"",title:f.a("selectAll","Select All"),order:1}]}))},synD:function(mt,M,t){},t49l:function(mt,M,t){"use strict";t.d(M,"a",function(){return B});var f=t("Cg/j");const B=Object(f.c)("textModelService")},tADe:function(mt,M,t){"use strict";t.d(M,"c",function(){return N}),t.d(M,"a",function(){return A}),t.d(M,"b",function(){return F});var f=t("S3by"),B=t("3/fG"),x=t("Cg/j"),N;(function(I){I[I.Hint=1]="Hint",I[I.Info=2]="Info",I[I.Warning=4]="Warning",I[I.Error=8]="Error"})(N||(N={})),function(I){function L(S,r){return r-S}I.compare=L;const v=Object.create(null);v[I.Error]=Object(B.a)("sev.error","Error"),v[I.Warning]=Object(B.a)("sev.warning","Warning"),v[I.Info]=Object(B.a)("sev.info","Info");function m(S){return v[S]||""}I.toString=m;function d(S){switch(S){case f.a.Error:return I.Error;case f.a.Warning:return I.Warning;case f.a.Info:return I.Info;case f.a.Ignore:return I.Hint}}I.fromSeverity=d;function D(S){switch(S){case I.Error:return f.a.Error;case I.Warning:return f.a.Warning;case I.Info:return f.a.Info;case I.Hint:return f.a.Ignore}}I.toSeverity=D}(N||(N={}));var A;(function(I){const L="";function v(d){return m(d,!0)}I.makeKey=v;function m(d,D){let S=[L];return d.source?S.push(d.source.replace("\xA6","\\\xA6")):S.push(L),d.code?typeof d.code=="string"?S.push(d.code.replace("\xA6","\\\xA6")):S.push(d.code.value.replace("\xA6","\\\xA6")):S.push(L),d.severity!==void 0&&d.severity!==null?S.push(N.toString(d.severity)):S.push(L),d.message&&D?S.push(d.message.replace("\xA6","\\\xA6")):S.push(L),d.startLineNumber!==void 0&&d.startLineNumber!==null?S.push(d.startLineNumber.toString()):S.push(L),d.startColumn!==void 0&&d.startColumn!==null?S.push(d.startColumn.toString()):S.push(L),d.endLineNumber!==void 0&&d.endLineNumber!==null?S.push(d.endLineNumber.toString()):S.push(L),d.endColumn!==void 0&&d.endColumn!==null?S.push(d.endColumn.toString()):S.push(L),S.push(L),S.join("\xA6")}I.makeKeyOptionalMessage=m})(A||(A={}));const F=Object(x.c)("markerService")},tTk5:function(mt,M,t){"use strict";t.d(M,"b",function(){return B}),t.d(M,"a",function(){return x});var f=t("Cg/j");class B{constructor(N){this.callback=N}report(N){this._value=N,this.callback(this._value)}}B.None=Object.freeze({report(){}});const x=Object(f.c)("editorProgressService")},tX9W:function(mt,M,t){"use strict";t.d(M,"c",function(){return Wi}),t.d(M,"a",function(){return In}),t.d(M,"b",function(){return So});var f=t("/cxE"),B=t("MI8n"),x=t("pmY6"),N=t("N0LK"),A=t("bY76"),F=t("/UlZ"),I=t("cGHE"),L=t("aokT"),v=t("gCVg"),m=t("M1Kb"),d=t("oFSf");class D{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function S(g,u,w,V,se){se.spacesDiff=0,se.looksLikeAlignment=!1;let pe;for(pe=0;pe<u&&pe<V;pe++){let Ft=g.charCodeAt(pe),Zt=w.charCodeAt(pe);if(Ft!==Zt)break}let Se=0,Qe=0;for(let Ft=pe;Ft<u;Ft++){let Zt=g.charCodeAt(Ft);Zt===32?Se++:Qe++}let ut=0,yt=0;for(let Ft=pe;Ft<V;Ft++){let Zt=w.charCodeAt(Ft);Zt===32?ut++:yt++}if(Se>0&&Qe>0)return;if(ut>0&&yt>0)return;let Ct=Math.abs(Qe-yt),At=Math.abs(Se-ut);if(Ct===0){se.spacesDiff=At,At>0&&0<=ut-1&&ut-1<g.length&&ut<w.length&&(w.charCodeAt(ut)!==32&&g.charCodeAt(ut-1)===32&&(g.charCodeAt(g.length-1)===44&&(se.looksLikeAlignment=!0)));return}if(At%Ct===0){se.spacesDiff=At/Ct;return}}function r(g,u,w){const V=Math.min(g.getLineCount(),1e4);let se=0,pe=0,Se="",Qe=0;const ut=[2,4,6,8,3,5,7],yt=8;let Ct=[0,0,0,0,0,0,0,0,0],At=new D;for(let Yt=1;Yt<=V;Yt++){let ao=g.getLineLength(Yt),Co=g.getLineContent(Yt);const ko=ao<=65536;let Qo=!1,yi=0,Ko=0,li=0;for(let xi=0,Ni=ao;xi<Ni;xi++){let Ti=ko?Co.charCodeAt(xi):g.getLineCharCode(Yt,xi);if(Ti===9)li++;else if(Ti===32)Ko++;else{Qo=!0,yi=xi;break}}if(!Qo)continue;if(li>0?se++:Ko>1&&pe++,S(Se,Qe,Co,yi,At),At.looksLikeAlignment&&!(w&&u===At.spacesDiff))continue;let Ki=At.spacesDiff;Ki<=yt&&Ct[Ki]++,Se=Co,Qe=yi}let Ft=w;se!==pe&&(Ft=se<pe);let Zt=u;if(Ft){let Yt=Ft?0:.1*V;ut.forEach(ao=>{let Co=Ct[ao];Co>Yt&&(Yt=Co,Zt=ao)}),Zt===4&&Ct[4]>0&&Ct[2]>0&&Ct[2]>=Ct[4]/2&&(Zt=2)}return{insertSpaces:Ft,tabSize:Zt}}function _(g){return(g.metadata&1)>>>0}function b(g,u){g.metadata=g.metadata&254|u<<0}function h(g){return(g.metadata&2)>>>1===1}function c(g,u){g.metadata=g.metadata&253|(u?1:0)<<1}function p(g){return(g.metadata&4)>>>2===1}function E(g,u){g.metadata=g.metadata&251|(u?1:0)<<2}function y(g){return(g.metadata&24)>>>3}function C(g,u){g.metadata=g.metadata&231|u<<3}function O(g){return(g.metadata&32)>>>5===1}function k(g,u){g.metadata=g.metadata&223|(u?1:0)<<5}class Y{constructor(g,u,w){this.metadata=0,this.parent=this,this.left=this,this.right=this,b(this,1),this.start=u,this.end=w,this.delta=0,this.maxEnd=w,this.id=g,this.ownerId=0,this.options=null,E(this,!1),C(this,1),k(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=u,this.cachedAbsoluteEnd=w,this.range=null,c(this,!1)}reset(g,u,w,V){this.start=u,this.end=w,this.maxEnd=w,this.cachedVersionId=g,this.cachedAbsoluteStart=u,this.cachedAbsoluteEnd=w,this.range=V}setOptions(g){this.options=g;let u=this.options.className;E(this,u==="squiggly-error"||u==="squiggly-warning"||u==="squiggly-info"),C(this,this.options.stickiness),k(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(g,u,w){this.cachedVersionId!==w&&(this.range=null),this.cachedVersionId=w,this.cachedAbsoluteStart=g,this.cachedAbsoluteEnd=u}detach(){this.parent=null,this.left=null,this.right=null}}const Q=new Y(null,0,0);Q.parent=Q,Q.left=Q,Q.right=Q,b(Q,0);class H{constructor(){this.root=Q,this.requestNormalizeDelta=!1}intervalSearch(g,u,w,V,se){return this.root===Q?[]:ie(this,g,u,w,V,se)}search(g,u,w){return this.root===Q?[]:ee(this,g,u,w)}collectNodesFromOwner(g){return Ee(this,g)}collectNodesPostOrder(){return fe(this)}insert(g){U(this,g),this._normalizeDeltaIfNecessary()}delete(g){J(this,g),this._normalizeDeltaIfNecessary()}resolveNode(g,u){const w=g;let V=0;for(;g!==this.root;)g===g.parent.right&&(V+=g.parent.delta),g=g.parent;const se=w.start+V,pe=w.end+V;w.setCachedOffsets(se,pe,u)}acceptReplace(g,u,w,V){const se=te(this,g,g+u);for(let pe=0,Se=se.length;pe<Se;pe++){const Qe=se[pe];J(this,Qe)}this._normalizeDeltaIfNecessary(),ne(this,g,g+u,w),this._normalizeDeltaIfNecessary();for(let pe=0,Se=se.length;pe<Se;pe++){const Qe=se[pe];Qe.start=Qe.cachedAbsoluteStart,Qe.end=Qe.cachedAbsoluteEnd,$(Qe,g,g+u,w,V),Qe.maxEnd=Qe.end,U(this,Qe)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){if(!this.requestNormalizeDelta)return;this.requestNormalizeDelta=!1,Z(this)}}function Z(g){let u=g.root,w=0;for(;u!==Q;){if(u.left!==Q&&!h(u.left)){u=u.left;continue}if(u.right!==Q&&!h(u.right)){w+=u.delta,u=u.right;continue}u.start=w+u.start,u.end=w+u.end,u.delta=0,ze(u),c(u,!0),c(u.left,!1),c(u.right,!1),u===u.parent.right&&(w-=u.parent.delta),u=u.parent}c(g.root,!1)}function oe(g,u,w,V){return g<w?!0:g>w||V===1?!1:V===2?!0:u}function $(g,u,w,V,se){const pe=y(g),Se=pe===0||pe===2,Qe=pe===1||pe===2,ut=w-u,yt=V,Ct=Math.min(ut,yt),At=g.start;let Ft=!1;const Zt=g.end;let Yt=!1;u<=At&&Zt<=w&&O(g)&&(g.start=u,Ft=!0,g.end=u,Yt=!0);{const Co=se?1:ut>0?2:0;!Ft&&oe(At,Se,u,Co)&&(Ft=!0),!Yt&&oe(Zt,Qe,u,Co)&&(Yt=!0)}if(Ct>0&&!se){const Co=ut>yt?2:0;!Ft&&oe(At,Se,u+Ct,Co)&&(Ft=!0),!Yt&&oe(Zt,Qe,u+Ct,Co)&&(Yt=!0)}{const Co=se?1:0;!Ft&&oe(At,Se,w,Co)&&(g.start=u+yt,Ft=!0),!Yt&&oe(Zt,Qe,w,Co)&&(g.end=u+yt,Yt=!0)}const ao=yt-ut;Ft||(g.start=Math.max(0,At+ao)),Yt||(g.end=Math.max(0,Zt+ao)),g.start>g.end&&(g.end=g.start)}function te(g,u,w){let V=g.root,se=0,pe=0,Se=0,Qe=0,ut=[],yt=0;for(;V!==Q;){if(h(V)){c(V.left,!1),c(V.right,!1),V===V.parent.right&&(se-=V.parent.delta),V=V.parent;continue}if(!h(V.left)){if(pe=se+V.maxEnd,pe<u){c(V,!0);continue}if(V.left!==Q){V=V.left;continue}}if(Se=se+V.start,Se>w){c(V,!0);continue}if(Qe=se+V.end,Qe>=u&&(V.setCachedOffsets(Se,Qe,0),ut[yt++]=V),c(V,!0),V.right!==Q&&!h(V.right)){se+=V.delta,V=V.right;continue}}return c(g.root,!1),ut}function ne(g,u,w,V){let se=g.root,pe=0,Se=0,Qe=0;const ut=V-(w-u);for(;se!==Q;){if(h(se)){c(se.left,!1),c(se.right,!1),se===se.parent.right&&(pe-=se.parent.delta),ze(se),se=se.parent;continue}if(!h(se.left)){if(Se=pe+se.maxEnd,Se<u){c(se,!0);continue}if(se.left!==Q){se=se.left;continue}}if(Qe=pe+se.start,Qe>w){se.start+=ut,se.end+=ut,se.delta+=ut,(se.delta<-1073741824||se.delta>1073741824)&&(g.requestNormalizeDelta=!0),c(se,!0);continue}if(c(se,!0),se.right!==Q&&!h(se.right)){pe+=se.delta,se=se.right;continue}}c(g.root,!1)}function Ee(g,u){let w=g.root,V=[],se=0;for(;w!==Q;){if(h(w)){c(w.left,!1),c(w.right,!1),w=w.parent;continue}if(w.left!==Q&&!h(w.left)){w=w.left;continue}if(w.ownerId===u&&(V[se++]=w),c(w,!0),w.right!==Q&&!h(w.right)){w=w.right;continue}}return c(g.root,!1),V}function fe(g){let u=g.root,w=[],V=0;for(;u!==Q;){if(h(u)){c(u.left,!1),c(u.right,!1),u=u.parent;continue}if(u.left!==Q&&!h(u.left)){u=u.left;continue}if(u.right!==Q&&!h(u.right)){u=u.right;continue}w[V++]=u,c(u,!0)}return c(g.root,!1),w}function ee(g,u,w,V){let se=g.root,pe=0,Se=0,Qe=0,ut=[],yt=0;for(;se!==Q;){if(h(se)){c(se.left,!1),c(se.right,!1),se===se.parent.right&&(pe-=se.parent.delta),se=se.parent;continue}if(se.left!==Q&&!h(se.left)){se=se.left;continue}Se=pe+se.start,Qe=pe+se.end,se.setCachedOffsets(Se,Qe,V);let Ct=!0;if(u&&se.ownerId&&se.ownerId!==u&&(Ct=!1),w&&p(se)&&(Ct=!1),Ct&&(ut[yt++]=se),c(se,!0),se.right!==Q&&!h(se.right)){pe+=se.delta,se=se.right;continue}}return c(g.root,!1),ut}function ie(g,u,w,V,se,pe){let Se=g.root,Qe=0,ut=0,yt=0,Ct=0,At=[],Ft=0;for(;Se!==Q;){if(h(Se)){c(Se.left,!1),c(Se.right,!1),Se===Se.parent.right&&(Qe-=Se.parent.delta),Se=Se.parent;continue}if(!h(Se.left)){if(ut=Qe+Se.maxEnd,ut<u){c(Se,!0);continue}if(Se.left!==Q){Se=Se.left;continue}}if(yt=Qe+Se.start,yt>w){c(Se,!0);continue}if(Ct=Qe+Se.end,Ct>=u){Se.setCachedOffsets(yt,Ct,pe);let Zt=!0;V&&Se.ownerId&&Se.ownerId!==V&&(Zt=!1),se&&p(Se)&&(Zt=!1),Zt&&(At[Ft++]=Se)}if(c(Se,!0),Se.right!==Q&&!h(Se.right)){Qe+=Se.delta,Se=Se.right;continue}}return c(g.root,!1),At}function U(g,u){if(g.root===Q)return u.parent=Q,u.left=Q,u.right=Q,b(u,0),g.root=u,g.root;G(g,u),ue(u.parent);let w=u;for(;w!==g.root&&_(w.parent)===1;)if(w.parent===w.parent.parent.left){const V=w.parent.parent.right;_(V)===1?(b(w.parent,0),b(V,0),b(w.parent.parent,1),w=w.parent.parent):(w===w.parent.right&&(w=w.parent,Ie(g,w)),b(w.parent,0),b(w.parent.parent,1),Le(g,w.parent.parent))}else{const V=w.parent.parent.left;_(V)===1?(b(w.parent,0),b(V,0),b(w.parent.parent,1),w=w.parent.parent):(w===w.parent.left&&(w=w.parent,Le(g,w)),b(w.parent,0),b(w.parent.parent,1),Ie(g,w.parent.parent))}return b(g.root,0),u}function G(g,u){let w=0,V=g.root;const se=u.start,pe=u.end;for(;;){const Se=je(se,pe,V.start+w,V.end+w);if(Se<0)if(V.left===Q){u.start-=w,u.end-=w,u.maxEnd-=w,V.left=u;break}else V=V.left;else if(V.right===Q){u.start-=w+V.delta,u.end-=w+V.delta,u.maxEnd-=w+V.delta,V.right=u;break}else w+=V.delta,V=V.right}u.parent=V,u.left=Q,u.right=Q,b(u,1)}function J(g,u){let w,V;if(u.left===Q?(w=u.right,V=u,w.delta+=u.delta,(w.delta<-1073741824||w.delta>1073741824)&&(g.requestNormalizeDelta=!0),w.start+=u.delta,w.end+=u.delta):u.right===Q?(w=u.left,V=u):(V=he(u.right),w=V.right,w.start+=V.delta,w.end+=V.delta,w.delta+=V.delta,(w.delta<-1073741824||w.delta>1073741824)&&(g.requestNormalizeDelta=!0),V.start+=u.delta,V.end+=u.delta,V.delta=u.delta,(V.delta<-1073741824||V.delta>1073741824)&&(g.requestNormalizeDelta=!0)),V===g.root){g.root=w,b(w,0),u.detach(),xe(),ze(w),g.root.parent=Q;return}let se=_(V)===1;if(V===V.parent.left?V.parent.left=w:V.parent.right=w,V===u?w.parent=V.parent:(V.parent===u?w.parent=V:w.parent=V.parent,V.left=u.left,V.right=u.right,V.parent=u.parent,b(V,_(u)),u===g.root?g.root=V:u===u.parent.left?u.parent.left=V:u.parent.right=V,V.left!==Q&&(V.left.parent=V),V.right!==Q&&(V.right.parent=V)),u.detach(),se){ue(w.parent),V!==u&&(ue(V),ue(V.parent)),xe();return}ue(w),ue(w.parent),V!==u&&(ue(V),ue(V.parent));let pe;for(;w!==g.root&&_(w)===0;)w===w.parent.left?(pe=w.parent.right,_(pe)===1&&(b(pe,0),b(w.parent,1),Ie(g,w.parent),pe=w.parent.right),_(pe.left)===0&&_(pe.right)===0?(b(pe,1),w=w.parent):(_(pe.right)===0&&(b(pe.left,0),b(pe,1),Le(g,pe),pe=w.parent.right),b(pe,_(w.parent)),b(w.parent,0),b(pe.right,0),Ie(g,w.parent),w=g.root)):(pe=w.parent.left,_(pe)===1&&(b(pe,0),b(w.parent,1),Le(g,w.parent),pe=w.parent.left),_(pe.left)===0&&_(pe.right)===0?(b(pe,1),w=w.parent):(_(pe.left)===0&&(b(pe.right,0),b(pe,1),Ie(g,pe),pe=w.parent.left),b(pe,_(w.parent)),b(w.parent,0),b(pe.left,0),Le(g,w.parent),w=g.root));b(w,0),xe()}function he(g){for(;g.left!==Q;)g=g.left;return g}function xe(){Q.parent=Q,Q.delta=0,Q.start=0,Q.end=0}function Ie(g,u){const w=u.right;w.delta+=u.delta,(w.delta<-1073741824||w.delta>1073741824)&&(g.requestNormalizeDelta=!0),w.start+=u.delta,w.end+=u.delta,u.right=w.left,w.left!==Q&&(w.left.parent=u),w.parent=u.parent,u.parent===Q?g.root=w:u===u.parent.left?u.parent.left=w:u.parent.right=w,w.left=u,u.parent=w,ze(u),ze(w)}function Le(g,u){const w=u.left;u.delta-=w.delta,(u.delta<-1073741824||u.delta>1073741824)&&(g.requestNormalizeDelta=!0),u.start-=w.delta,u.end-=w.delta,u.left=w.right,w.right!==Q&&(w.right.parent=u),w.parent=u.parent,u.parent===Q?g.root=w:u===u.parent.right?u.parent.right=w:u.parent.left=w,w.right=u,u.parent=w,ze(u),ze(w)}function Te(g){let u=g.end;if(g.left!==Q){const w=g.left.maxEnd;w>u&&(u=w)}if(g.right!==Q){const w=g.right.maxEnd+g.delta;w>u&&(u=w)}return u}function ze(g){g.maxEnd=Te(g)}function ue(g){for(;g!==Q;){const u=Te(g);if(g.maxEnd===u)return;g.maxEnd=u,g=g.parent}}function je(g,u,w,V){return g===w?u-V:g-w}class Pe{constructor(g,u){this.piece=g,this.color=u,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==ve)return ce(this.right);let g=this;for(;g.parent!==ve&&!(g.parent.left===g);)g=g.parent;return g.parent===ve?ve:g.parent}prev(){if(this.left!==ve)return le(this.left);let g=this;for(;g.parent!==ve&&!(g.parent.right===g);)g=g.parent;return g.parent===ve?ve:g.parent}detach(){this.parent=null,this.left=null,this.right=null}}const ve=new Pe(null,0);ve.parent=ve,ve.left=ve,ve.right=ve,ve.color=0;function ce(g){for(;g.left!==ve;)g=g.left;return g}function le(g){for(;g.right!==ve;)g=g.right;return g}function Ce(g){return g===ve?0:g.size_left+g.piece.length+Ce(g.right)}function ye(g){return g===ve?0:g.lf_left+g.piece.lineFeedCnt+ye(g.right)}function ge(){ve.parent=ve}function Me(g,u){let w=u.right;w.size_left+=u.size_left+(u.piece?u.piece.length:0),w.lf_left+=u.lf_left+(u.piece?u.piece.lineFeedCnt:0),u.right=w.left,w.left!==ve&&(w.left.parent=u),w.parent=u.parent,u.parent===ve?g.root=w:u.parent.left===u?u.parent.left=w:u.parent.right=w,w.left=u,u.parent=w}function De(g,u){let w=u.left;u.left=w.right,w.right!==ve&&(w.right.parent=u),w.parent=u.parent,u.size_left-=w.size_left+(w.piece?w.piece.length:0),u.lf_left-=w.lf_left+(w.piece?w.piece.lineFeedCnt:0),u.parent===ve?g.root=w:u===u.parent.right?u.parent.right=w:u.parent.left=w,w.right=u,u.parent=w}function we(g,u){let w,V;if(u.left===ve?(V=u,w=V.right):u.right===ve?(V=u,w=V.left):(V=ce(u.right),w=V.right),V===g.root){g.root=w,w.color=0,u.detach(),ge(),g.root.parent=ve;return}let se=V.color===1;if(V===V.parent.left?V.parent.left=w:V.parent.right=w,V===u?(w.parent=V.parent,Ke(g,w)):(V.parent===u?w.parent=V:w.parent=V.parent,Ke(g,w),V.left=u.left,V.right=u.right,V.parent=u.parent,V.color=u.color,u===g.root?g.root=V:u===u.parent.left?u.parent.left=V:u.parent.right=V,V.left!==ve&&(V.left.parent=V),V.right!==ve&&(V.right.parent=V),V.size_left=u.size_left,V.lf_left=u.lf_left,Ke(g,V)),u.detach(),w.parent.left===w){let Se=Ce(w),Qe=ye(w);if(Se!==w.parent.size_left||Qe!==w.parent.lf_left){let ut=Se-w.parent.size_left,yt=Qe-w.parent.lf_left;w.parent.size_left=Se,w.parent.lf_left=Qe,nt(g,w.parent,ut,yt)}}if(Ke(g,w.parent),se){ge();return}let pe;for(;w!==g.root&&w.color===0;)w===w.parent.left?(pe=w.parent.right,pe.color===1&&(pe.color=0,w.parent.color=1,Me(g,w.parent),pe=w.parent.right),pe.left.color===0&&pe.right.color===0?(pe.color=1,w=w.parent):(pe.right.color===0&&(pe.left.color=0,pe.color=1,De(g,pe),pe=w.parent.right),pe.color=w.parent.color,w.parent.color=0,pe.right.color=0,Me(g,w.parent),w=g.root)):(pe=w.parent.left,pe.color===1&&(pe.color=0,w.parent.color=1,De(g,w.parent),pe=w.parent.left),pe.left.color===0&&pe.right.color===0?(pe.color=1,w=w.parent):(pe.left.color===0&&(pe.right.color=0,pe.color=1,Me(g,pe),pe=w.parent.left),pe.color=w.parent.color,w.parent.color=0,pe.left.color=0,De(g,w.parent),w=g.root));w.color=0,ge()}function Oe(g,u){for(Ke(g,u);u!==g.root&&u.parent.color===1;)if(u.parent===u.parent.parent.left){const w=u.parent.parent.right;w.color===1?(u.parent.color=0,w.color=0,u.parent.parent.color=1,u=u.parent.parent):(u===u.parent.right&&(u=u.parent,Me(g,u)),u.parent.color=0,u.parent.parent.color=1,De(g,u.parent.parent))}else{const w=u.parent.parent.left;w.color===1?(u.parent.color=0,w.color=0,u.parent.parent.color=1,u=u.parent.parent):(u===u.parent.left&&(u=u.parent,De(g,u)),u.parent.color=0,u.parent.parent.color=1,Me(g,u.parent.parent))}g.root.color=0}function nt(g,u,w,V){for(;u!==g.root&&u!==ve;)u.parent.left===u&&(u.parent.size_left+=w,u.parent.lf_left+=V),u=u.parent}function Ke(g,u){let w=0,V=0;if(u===g.root)return;for(;u!==g.root&&u===u.parent.right;)u=u.parent;if(u===g.root)return;for(u=u.parent,w=Ce(u.left)-u.size_left,V=ye(u.left)-u.lf_left,u.size_left+=w,u.lf_left+=V;u!==g.root&&(w!==0||V!==0);)u.parent.left===u&&(u.parent.size_left+=w,u.parent.lf_left+=V),u=u.parent}var et=t("jAJ/");const bt=65535;function Tt(g){let u;return g[g.length-1]<65536?u=new Uint16Array(g.length):u=new Uint32Array(g.length),u.set(g,0),u}class $t{constructor(g,u,w,V,se){this.lineStarts=g,this.cr=u,this.lf=w,this.crlf=V,this.isBasicASCII=se}}function Xe(g,u=!0){let w=[0],V=1;for(let se=0,pe=g.length;se<pe;se++){const Se=g.charCodeAt(se);Se===13?se+1<pe&&g.charCodeAt(se+1)===10?(w[V++]=se+2,se++):w[V++]=se+1:Se===10&&(w[V++]=se+1)}return u?Tt(w):w}function it(g,u){g.length=0,g[0]=0;let w=1,V=0,se=0,pe=0,Se=!0;for(let ut=0,yt=u.length;ut<yt;ut++){const Ct=u.charCodeAt(ut);Ct===13?ut+1<yt&&u.charCodeAt(ut+1)===10?(pe++,g[w++]=ut+2,ut++):(V++,g[w++]=ut+1):Ct===10?(se++,g[w++]=ut+1):Se&&(Ct!==9&&(Ct<32||Ct>126)&&(Se=!1))}const Qe=new $t(Tt(g),V,se,pe,Se);return g.length=0,Qe}class re{constructor(g,u,w,V,se){this.bufferIndex=g,this.start=u,this.end=w,this.lineFeedCnt=V,this.length=se}}class We{constructor(g,u){this.buffer=g,this.lineStarts=u}}class tt{constructor(g,u){this._pieces=[],this._tree=g,this._BOM=u,this._index=0,g.root!==ve&&g.iterate(g.root,w=>(w!==ve&&this._pieces.push(w.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class Et{constructor(g){this._limit=g,this._cache=[]}get(g){for(let u=this._cache.length-1;u>=0;u--){let w=this._cache[u];if(w.nodeStartOffset<=g&&w.nodeStartOffset+w.node.piece.length>=g)return w}return null}get2(g){for(let u=this._cache.length-1;u>=0;u--){let w=this._cache[u];if(w.nodeStartLineNumber&&w.nodeStartLineNumber<g&&w.nodeStartLineNumber+w.node.piece.lineFeedCnt>=g)return w}return null}set(g){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(g)}validate(g){let u=!1,w=this._cache;for(let V=0;V<w.length;V++){let se=w[V];if(se.node.parent===null||se.nodeStartOffset>=g){w[V]=null,u=!0;continue}}if(u){let V=[];for(const se of w)se!==null&&V.push(se);this._cache=V}}}class It{constructor(g,u,w){this.create(g,u,w)}create(g,u,w){this._buffers=[new We("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=ve,this._lineCnt=1,this._length=0,this._EOL=u,this._EOLLength=u.length,this._EOLNormalized=w;let V=null;for(let se=0,pe=g.length;se<pe;se++)if(g[se].buffer.length>0){g[se].lineStarts||(g[se].lineStarts=Xe(g[se].buffer));let Se=new re(se+1,{line:0,column:0},{line:g[se].lineStarts.length-1,column:g[se].buffer.length-g[se].lineStarts[g[se].lineStarts.length-1]},g[se].lineStarts.length-1,g[se].buffer.length);this._buffers.push(g[se]),V=this.rbInsertRight(V,Se)}this._searchCache=new Et(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(g){let u=bt,w=u-Math.floor(u/3),V=w*2,se="",pe=0,Se=[];if(this.iterate(this.root,Qe=>{let ut=this.getNodeContent(Qe),yt=ut.length;if(pe<=w||pe+yt<V)return se+=ut,pe+=yt,!0;let Ct=se.replace(/\r\n|\r|\n/g,g);return Se.push(new We(Ct,Xe(Ct))),se=ut,pe=yt,!0}),pe>0){let Qe=se.replace(/\r\n|\r|\n/g,g);Se.push(new We(Qe,Xe(Qe)))}this.create(Se,g,!0)}getEOL(){return this._EOL}setEOL(g){this._EOL=g,this._EOLLength=this._EOL.length,this.normalizeEOL(g)}createSnapshot(g){return new tt(this,g)}getOffsetAt(g,u){let w=0,V=this.root;for(;V!==ve;)if(V.left!==ve&&V.lf_left+1>=g)V=V.left;else if(V.lf_left+V.piece.lineFeedCnt+1>=g){w+=V.size_left;let se=this.getAccumulatedValue(V,g-V.lf_left-2);return w+=se+u-1}else g-=V.lf_left+V.piece.lineFeedCnt,w+=V.size_left+V.piece.length,V=V.right;return w}getPositionAt(g){g=Math.floor(g),g=Math.max(0,g);let u=this.root,w=0,V=g;for(;u!==ve;)if(u.size_left!==0&&u.size_left>=g)u=u.left;else if(u.size_left+u.piece.length>=g){let se=this.getIndexOf(u,g-u.size_left);if(w+=u.lf_left+se.index,se.index===0){let pe=this.getOffsetAt(w+1,1),Se=V-pe;return new I.a(w+1,Se+1)}return new I.a(w+1,se.remainder+1)}else if(g-=u.size_left+u.piece.length,w+=u.lf_left+u.piece.lineFeedCnt,u.right===ve){let se=this.getOffsetAt(w+1,1),pe=V-g-se;return new I.a(w+1,pe+1)}else u=u.right;return new I.a(1,1)}getValueInRange(g,u){if(g.startLineNumber===g.endLineNumber&&g.startColumn===g.endColumn)return"";let w=this.nodeAt2(g.startLineNumber,g.startColumn),V=this.nodeAt2(g.endLineNumber,g.endColumn),se=this.getValueInRange2(w,V);return u?u!==this._EOL||!this._EOLNormalized?se.replace(/\r\n|\r|\n/g,u):u===this.getEOL()&&this._EOLNormalized?(u===`\r
|
|
|
`,se):se.replace(/\r\n|\r|\n/g,u):se}getValueInRange2(g,u){if(g.node===u.node){let Se=g.node,Qe=this._buffers[Se.piece.bufferIndex].buffer,ut=this.offsetInBuffer(Se.piece.bufferIndex,Se.piece.start);return Qe.substring(ut+g.remainder,ut+u.remainder)}let w=g.node,V=this._buffers[w.piece.bufferIndex].buffer,se=this.offsetInBuffer(w.piece.bufferIndex,w.piece.start),pe=V.substring(se+g.remainder,se+w.piece.length);for(w=w.next();w!==ve;){let Se=this._buffers[w.piece.bufferIndex].buffer,Qe=this.offsetInBuffer(w.piece.bufferIndex,w.piece.start);if(w===u.node){pe+=Se.substring(Qe,Qe+u.remainder);break}else pe+=Se.substr(Qe,w.piece.length);w=w.next()}return pe}getLinesContent(){let g=[],u=0,w="",V=!1;return this.iterate(this.root,se=>{if(se===ve)return!0;const pe=se.piece;let Se=pe.length;if(Se===0)return!0;const Qe=this._buffers[pe.bufferIndex].buffer,ut=this._buffers[pe.bufferIndex].lineStarts,yt=pe.start.line,Ct=pe.end.line;let At=ut[yt]+pe.start.column;if(V&&(Qe.charCodeAt(At)===10&&(At++,Se--),g[u++]=w,w="",V=!1,Se===0))return!0;if(yt===Ct)return!this._EOLNormalized&&Qe.charCodeAt(At+Se-1)===13?(V=!0,w+=Qe.substr(At,Se-1)):w+=Qe.substr(At,Se),!0;w+=this._EOLNormalized?Qe.substring(At,Math.max(At,ut[yt+1]-this._EOLLength)):Qe.substring(At,ut[yt+1]).replace(/(\r\n|\r|\n)$/,""),g[u++]=w;for(let Ft=yt+1;Ft<Ct;Ft++)w=this._EOLNormalized?Qe.substring(ut[Ft],ut[Ft+1]-this._EOLLength):Qe.substring(ut[Ft],ut[Ft+1]).replace(/(\r\n|\r|\n)$/,""),g[u++]=w;return!this._EOLNormalized&&Qe.charCodeAt(ut[Ct]+pe.end.column-1)===13?(V=!0,pe.end.column===0?u--:w=Qe.substr(ut[Ct],pe.end.column-1)):w=Qe.substr(ut[Ct],pe.end.column),!0}),V&&(g[u++]=w,w=""),g[u++]=w,g}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(g){return this._lastVisitedLine.lineNumber===g?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=g,g===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(g):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(g,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(g).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(g){if(g.remainder===g.node.piece.length){let u=g.node.next();if(!u)return 0;let w=this._buffers[u.piece.bufferIndex],V=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start);return w.buffer.charCodeAt(V)}else{let u=this._buffers[g.node.piece.bufferIndex],w=this.offsetInBuffer(g.node.piece.bufferIndex,g.node.piece.start),V=w+g.remainder;return u.buffer.charCodeAt(V)}}getLineCharCode(g,u){let w=this.nodeAt2(g,u+1);return this._getCharCode(w)}getLineLength(g){if(g===this.getLineCount()){let u=this.getOffsetAt(g,1);return this.getLength()-u}return this.getOffsetAt(g+1,1)-this.getOffsetAt(g,1)-this._EOLLength}findMatchesInNode(g,u,w,V,se,pe,Se,Qe,ut,yt,Ct){let At=this._buffers[g.piece.bufferIndex],Ft=this.offsetInBuffer(g.piece.bufferIndex,g.piece.start),Zt=this.offsetInBuffer(g.piece.bufferIndex,se),Yt=this.offsetInBuffer(g.piece.bufferIndex,pe),ao,Co={line:0,column:0},ko,Qo;u._wordSeparators?(ko=At.buffer.substring(Zt,Yt),Qo=yi=>yi+Zt,u.reset(0)):(ko=At.buffer,Qo=yi=>yi,u.reset(Zt));do if(ao=u.next(ko),ao){if(Qo(ao.index)>=Yt)return yt;this.positionInBuffer(g,Qo(ao.index)-Ft,Co);let yi=this.getLineFeedCnt(g.piece.bufferIndex,se,Co),Ko=Co.line===se.line?Co.column-se.column+V:Co.column+1,li=Ko+ao[0].length;if(Ct[yt++]=Object(et.d)(new L.a(w+yi,Ko,w+yi,li),ao,Qe),Qo(ao.index)+ao[0].length>=Yt)return yt;if(yt>=ut)return yt}while(ao);return yt}findMatchesLineByLine(g,u,w,V){const se=[];let pe=0;const Se=new et.b(u.wordSeparators,u.regex);let Qe=this.nodeAt2(g.startLineNumber,g.startColumn);if(Qe===null)return[];let ut=this.nodeAt2(g.endLineNumber,g.endColumn);if(ut===null)return[];let yt=this.positionInBuffer(Qe.node,Qe.remainder),Ct=this.positionInBuffer(ut.node,ut.remainder);if(Qe.node===ut.node)return this.findMatchesInNode(Qe.node,Se,g.startLineNumber,g.startColumn,yt,Ct,u,w,V,pe,se),se;let At=g.startLineNumber,Ft=Qe.node;for(;Ft!==ut.node;){let Yt=this.getLineFeedCnt(Ft.piece.bufferIndex,yt,Ft.piece.end);if(Yt>=1){let Co=this._buffers[Ft.piece.bufferIndex].lineStarts,ko=this.offsetInBuffer(Ft.piece.bufferIndex,Ft.piece.start),Qo=Co[yt.line+Yt],yi=At===g.startLineNumber?g.startColumn:1;if(pe=this.findMatchesInNode(Ft,Se,At,yi,yt,this.positionInBuffer(Ft,Qo-ko),u,w,V,pe,se),pe>=V)return se;At+=Yt}let ao=At===g.startLineNumber?g.startColumn-1:0;if(At===g.endLineNumber){const Co=this.getLineContent(At).substring(ao,g.endColumn-1);return pe=this._findMatchesInLine(u,Se,Co,g.endLineNumber,ao,pe,se,w,V),se}if(pe=this._findMatchesInLine(u,Se,this.getLineContent(At).substr(ao),At,ao,pe,se,w,V),pe>=V)return se;At++,Qe=this.nodeAt2(At,1),Ft=Qe.node,yt=this.positionInBuffer(Qe.node,Qe.remainder)}if(At===g.endLineNumber){let Yt=At===g.startLineNumber?g.startColumn-1:0;const ao=this.getLineContent(At).substring(Yt,g.endColumn-1);return pe=this._findMatchesInLine(u,Se,ao,g.endLineNumber,Yt,pe,se,w,V),se}let Zt=At===g.startLineNumber?g.startColumn:1;return pe=this.findMatchesInNode(ut.node,Se,At,Zt,yt,Ct,u,w,V,pe,se),se}_findMatchesInLine(g,u,w,V,se,pe,Se,Qe,ut){const yt=g.wordSeparators;if(!Qe&&g.simpleSearch){const At=g.simpleSearch,Ft=At.length,Zt=w.length;let Yt=-Ft;for(;(Yt=w.indexOf(At,Yt+Ft))!==-1;)if((!yt||Object(et.e)(yt,w,Zt,Yt,Ft))&&(Se[pe++]=new m.b(new L.a(V,Yt+1+se,V,Yt+1+Ft+se),null),pe>=ut))return pe;return pe}let Ct;u.reset(0);do if(Ct=u.next(w),Ct&&(Se[pe++]=Object(et.d)(new L.a(V,Ct.index+1+se,V,Ct.index+1+Ct[0].length+se),Ct,Qe),pe>=ut))return pe;while(Ct);return pe}insert(g,u,w=!1){if(this._EOLNormalized=this._EOLNormalized&&w,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==ve){let{node:V,remainder:se,nodeStartOffset:pe}=this.nodeAt(g),Se=V.piece,Qe=Se.bufferIndex,ut=this.positionInBuffer(V,se);if(V.piece.bufferIndex===0&&Se.end.line===this._lastChangeBufferPos.line&&Se.end.column===this._lastChangeBufferPos.column&&pe+Se.length===g&&u.length<bt){this.appendToNode(V,u),this.computeBufferMetadata();return}if(pe===g)this.insertContentToNodeLeft(u,V),this._searchCache.validate(g);else if(pe+V.piece.length>g){let yt=[],Ct=new re(Se.bufferIndex,ut,Se.end,this.getLineFeedCnt(Se.bufferIndex,ut,Se.end),this.offsetInBuffer(Qe,Se.end)-this.offsetInBuffer(Qe,ut));if(this.shouldCheckCRLF()&&this.endWithCR(u)){let Zt=this.nodeCharCodeAt(V,se);if(Zt===10){let Yt={line:Ct.start.line+1,column:0};Ct=new re(Ct.bufferIndex,Yt,Ct.end,this.getLineFeedCnt(Ct.bufferIndex,Yt,Ct.end),Ct.length-1),u+=`
|
|
|
`}}if(this.shouldCheckCRLF()&&this.startWithLF(u)){let Zt=this.nodeCharCodeAt(V,se-1);if(Zt===13){let Yt=this.positionInBuffer(V,se-1);this.deleteNodeTail(V,Yt),u="\r"+u,V.piece.length===0&&yt.push(V)}else this.deleteNodeTail(V,ut)}else this.deleteNodeTail(V,ut);let At=this.createNewPieces(u);Ct.length>0&&this.rbInsertRight(V,Ct);let Ft=V;for(let Zt=0;Zt<At.length;Zt++)Ft=this.rbInsertRight(Ft,At[Zt]);this.deleteNodes(yt)}else this.insertContentToNodeRight(u,V)}else{let V=this.createNewPieces(u),se=this.rbInsertLeft(null,V[0]);for(let pe=1;pe<V.length;pe++)se=this.rbInsertRight(se,V[pe])}this.computeBufferMetadata()}delete(g,u){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",u<=0||this.root===ve)return;let w=this.nodeAt(g),V=this.nodeAt(g+u),se=w.node,pe=V.node;if(se===pe){let At=this.positionInBuffer(se,w.remainder),Ft=this.positionInBuffer(se,V.remainder);if(w.nodeStartOffset===g){if(u===se.piece.length){let Zt=se.next();we(this,se),this.validateCRLFWithPrevNode(Zt),this.computeBufferMetadata();return}this.deleteNodeHead(se,Ft),this._searchCache.validate(g),this.validateCRLFWithPrevNode(se),this.computeBufferMetadata();return}if(w.nodeStartOffset+se.piece.length===g+u){this.deleteNodeTail(se,At),this.validateCRLFWithNextNode(se),this.computeBufferMetadata();return}this.shrinkNode(se,At,Ft),this.computeBufferMetadata();return}let Se=[],Qe=this.positionInBuffer(se,w.remainder);this.deleteNodeTail(se,Qe),this._searchCache.validate(g),se.piece.length===0&&Se.push(se);let ut=this.positionInBuffer(pe,V.remainder);this.deleteNodeHead(pe,ut),pe.piece.length===0&&Se.push(pe);let yt=se.next();for(let At=yt;At!==ve&&At!==pe;At=At.next())Se.push(At);let Ct=se.piece.length===0?se.prev():se;this.deleteNodes(Se),this.validateCRLFWithNextNode(Ct),this.computeBufferMetadata()}insertContentToNodeLeft(g,u){let w=[];if(this.shouldCheckCRLF()&&this.endWithCR(g)&&this.startWithLF(u)){let pe=u.piece,Se={line:pe.start.line+1,column:0},Qe=new re(pe.bufferIndex,Se,pe.end,this.getLineFeedCnt(pe.bufferIndex,Se,pe.end),pe.length-1);u.piece=Qe,g+=`
|
|
|
`,nt(this,u,-1,-1),u.piece.length===0&&w.push(u)}let V=this.createNewPieces(g),se=this.rbInsertLeft(u,V[V.length-1]);for(let pe=V.length-2;pe>=0;pe--)se=this.rbInsertLeft(se,V[pe]);this.validateCRLFWithPrevNode(se),this.deleteNodes(w)}insertContentToNodeRight(g,u){this.adjustCarriageReturnFromNext(g,u)&&(g+=`
|
|
|
`);let w=this.createNewPieces(g),V=this.rbInsertRight(u,w[0]),se=V;for(let pe=1;pe<w.length;pe++)se=this.rbInsertRight(se,w[pe]);this.validateCRLFWithPrevNode(V)}positionInBuffer(g,u,w){let V=g.piece,se=g.piece.bufferIndex,pe=this._buffers[se].lineStarts,Se=pe[V.start.line]+V.start.column,Qe=Se+u,ut=V.start.line,yt=V.end.line,Ct=0,At=0,Ft=0;for(;ut<=yt&&!(Ct=ut+(yt-ut)/2|0,Ft=pe[Ct],Ct===yt);)if(At=pe[Ct+1],Qe<Ft)yt=Ct-1;else if(Qe>=At)ut=Ct+1;else break;return w?(w.line=Ct,w.column=Qe-Ft,null):{line:Ct,column:Qe-Ft}}getLineFeedCnt(g,u,w){if(w.column===0)return w.line-u.line;let V=this._buffers[g].lineStarts;if(w.line===V.length-1)return w.line-u.line;let se=V[w.line+1],pe=V[w.line]+w.column;if(se>pe+1)return w.line-u.line;let Se=pe-1,Qe=this._buffers[g].buffer;return Qe.charCodeAt(Se)===13?w.line-u.line+1:w.line-u.line}offsetInBuffer(g,u){let w=this._buffers[g].lineStarts;return w[u.line]+u.column}deleteNodes(g){for(let u=0;u<g.length;u++)we(this,g[u])}createNewPieces(g){if(g.length>bt){let yt=[];for(;g.length>bt;){const At=g.charCodeAt(bt-1);let Ft;At===13||At>=55296&&At<=56319?(Ft=g.substring(0,bt-1),g=g.substring(bt-1)):(Ft=g.substring(0,bt),g=g.substring(bt));let Zt=Xe(Ft);yt.push(new re(this._buffers.length,{line:0,column:0},{line:Zt.length-1,column:Ft.length-Zt[Zt.length-1]},Zt.length-1,Ft.length)),this._buffers.push(new We(Ft,Zt))}let Ct=Xe(g);return yt.push(new re(this._buffers.length,{line:0,column:0},{line:Ct.length-1,column:g.length-Ct[Ct.length-1]},Ct.length-1,g.length)),this._buffers.push(new We(g,Ct)),yt}let u=this._buffers[0].buffer.length;const w=Xe(g,!1);let V=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===u&&u!==0&&this.startWithLF(g)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},V=this._lastChangeBufferPos;for(let yt=0;yt<w.length;yt++)w[yt]+=u+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(w.slice(1)),this._buffers[0].buffer+="_"+g,u+=1}else{if(u!==0)for(let yt=0;yt<w.length;yt++)w[yt]+=u;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(w.slice(1)),this._buffers[0].buffer+=g}const se=this._buffers[0].buffer.length;let pe=this._buffers[0].lineStarts.length-1,Se=se-this._buffers[0].lineStarts[pe],Qe={line:pe,column:Se},ut=new re(0,V,Qe,this.getLineFeedCnt(0,V,Qe),se-u);return this._lastChangeBufferPos=Qe,[ut]}getLineRawContent(g,u=0){let w=this.root,V="",se=this._searchCache.get2(g);if(se){w=se.node;let pe=this.getAccumulatedValue(w,g-se.nodeStartLineNumber-1),Se=this._buffers[w.piece.bufferIndex].buffer,Qe=this.offsetInBuffer(w.piece.bufferIndex,w.piece.start);if(se.nodeStartLineNumber+w.piece.lineFeedCnt===g)V=Se.substring(Qe+pe,Qe+w.piece.length);else{let ut=this.getAccumulatedValue(w,g-se.nodeStartLineNumber);return Se.substring(Qe+pe,Qe+ut-u)}}else{let pe=0;const Se=g;for(;w!==ve;)if(w.left!==ve&&w.lf_left>=g-1)w=w.left;else if(w.lf_left+w.piece.lineFeedCnt>g-1){let Qe=this.getAccumulatedValue(w,g-w.lf_left-2),ut=this.getAccumulatedValue(w,g-w.lf_left-1),yt=this._buffers[w.piece.bufferIndex].buffer,Ct=this.offsetInBuffer(w.piece.bufferIndex,w.piece.start);return pe+=w.size_left,this._searchCache.set({node:w,nodeStartOffset:pe,nodeStartLineNumber:Se-(g-1-w.lf_left)}),yt.substring(Ct+Qe,Ct+ut-u)}else if(w.lf_left+w.piece.lineFeedCnt===g-1){let Qe=this.getAccumulatedValue(w,g-w.lf_left-2),ut=this._buffers[w.piece.bufferIndex].buffer,yt=this.offsetInBuffer(w.piece.bufferIndex,w.piece.start);V=ut.substring(yt+Qe,yt+w.piece.length);break}else g-=w.lf_left+w.piece.lineFeedCnt,pe+=w.size_left+w.piece.length,w=w.right}for(w=w.next();w!==ve;){let pe=this._buffers[w.piece.bufferIndex].buffer;if(w.piece.lineFeedCnt>0){let Se=this.getAccumulatedValue(w,0),Qe=this.offsetInBuffer(w.piece.bufferIndex,w.piece.start);return V+=pe.substring(Qe,Qe+Se-u),V}else{let Se=this.offsetInBuffer(w.piece.bufferIndex,w.piece.start);V+=pe.substr(Se,w.piece.length)}w=w.next()}return V}computeBufferMetadata(){let g=this.root,u=1,w=0;for(;g!==ve;)u+=g.lf_left+g.piece.lineFeedCnt,w+=g.size_left+g.piece.length,g=g.right;this._lineCnt=u,this._length=w,this._searchCache.validate(this._length)}getIndexOf(g,u){let w=g.piece,V=this.positionInBuffer(g,u),se=V.line-w.start.line;if(this.offsetInBuffer(w.bufferIndex,w.end)-this.offsetInBuffer(w.bufferIndex,w.start)===u){let pe=this.getLineFeedCnt(g.piece.bufferIndex,w.start,V);if(pe!==se)return{index:pe,remainder:0}}return{index:se,remainder:V.column}}getAccumulatedValue(g,u){if(u<0)return 0;let w=g.piece,V=this._buffers[w.bufferIndex].lineStarts,se=w.start.line+u+1;return se>w.end.line?V[w.end.line]+w.end.column-V[w.start.line]-w.start.column:V[se]-V[w.start.line]-w.start.column}deleteNodeTail(g,u){const w=g.piece,V=w.lineFeedCnt,se=this.offsetInBuffer(w.bufferIndex,w.end),pe=u,Se=this.offsetInBuffer(w.bufferIndex,pe),Qe=this.getLineFeedCnt(w.bufferIndex,w.start,pe),ut=Qe-V,yt=Se-se,Ct=w.length+yt;g.piece=new re(w.bufferIndex,w.start,pe,Qe,Ct),nt(this,g,yt,ut)}deleteNodeHead(g,u){const w=g.piece,V=w.lineFeedCnt,se=this.offsetInBuffer(w.bufferIndex,w.start),pe=u,Se=this.getLineFeedCnt(w.bufferIndex,pe,w.end),Qe=this.offsetInBuffer(w.bufferIndex,pe),ut=Se-V,yt=se-Qe,Ct=w.length+yt;g.piece=new re(w.bufferIndex,pe,w.end,Se,Ct),nt(this,g,yt,ut)}shrinkNode(g,u,w){const V=g.piece,se=V.start,pe=V.end,Se=V.length,Qe=V.lineFeedCnt,ut=u,yt=this.getLineFeedCnt(V.bufferIndex,V.start,ut),Ct=this.offsetInBuffer(V.bufferIndex,u)-this.offsetInBuffer(V.bufferIndex,se);g.piece=new re(V.bufferIndex,V.start,ut,yt,Ct),nt(this,g,Ct-Se,yt-Qe);let At=new re(V.bufferIndex,w,pe,this.getLineFeedCnt(V.bufferIndex,w,pe),this.offsetInBuffer(V.bufferIndex,pe)-this.offsetInBuffer(V.bufferIndex,w)),Ft=this.rbInsertRight(g,At);this.validateCRLFWithPrevNode(Ft)}appendToNode(g,u){this.adjustCarriageReturnFromNext(u,g)&&(u+=`
|
|
|
`);const w=this.shouldCheckCRLF()&&this.startWithLF(u)&&this.endWithCR(g),V=this._buffers[0].buffer.length;this._buffers[0].buffer+=u;const se=Xe(u,!1);for(let Ft=0;Ft<se.length;Ft++)se[Ft]+=V;if(w){let Ft=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:V-Ft}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(se.slice(1));const pe=this._buffers[0].lineStarts.length-1,Se=this._buffers[0].buffer.length-this._buffers[0].lineStarts[pe],Qe={line:pe,column:Se},ut=g.piece.length+u.length,yt=g.piece.lineFeedCnt,Ct=this.getLineFeedCnt(0,g.piece.start,Qe),At=Ct-yt;g.piece=new re(g.piece.bufferIndex,g.piece.start,Qe,Ct,ut),this._lastChangeBufferPos=Qe,nt(this,g,u.length,At)}nodeAt(g){let u=this.root,w=this._searchCache.get(g);if(w)return{node:w.node,nodeStartOffset:w.nodeStartOffset,remainder:g-w.nodeStartOffset};let V=0;for(;u!==ve;)if(u.size_left>g)u=u.left;else if(u.size_left+u.piece.length>=g){V+=u.size_left;let se={node:u,remainder:g-u.size_left,nodeStartOffset:V};return this._searchCache.set(se),se}else g-=u.size_left+u.piece.length,V+=u.size_left+u.piece.length,u=u.right;return null}nodeAt2(g,u){let w=this.root,V=0;for(;w!==ve;)if(w.left!==ve&&w.lf_left>=g-1)w=w.left;else if(w.lf_left+w.piece.lineFeedCnt>g-1){let se=this.getAccumulatedValue(w,g-w.lf_left-2),pe=this.getAccumulatedValue(w,g-w.lf_left-1);return V+=w.size_left,{node:w,remainder:Math.min(se+u-1,pe),nodeStartOffset:V}}else if(w.lf_left+w.piece.lineFeedCnt===g-1){let se=this.getAccumulatedValue(w,g-w.lf_left-2);if(se+u-1<=w.piece.length)return{node:w,remainder:se+u-1,nodeStartOffset:V};u-=w.piece.length-se;break}else g-=w.lf_left+w.piece.lineFeedCnt,V+=w.size_left+w.piece.length,w=w.right;for(w=w.next();w!==ve;){if(w.piece.lineFeedCnt>0){let se=this.getAccumulatedValue(w,0),pe=this.offsetOfNode(w);return{node:w,remainder:Math.min(u-1,se),nodeStartOffset:pe}}else if(w.piece.length>=u-1){let se=this.offsetOfNode(w);return{node:w,remainder:u-1,nodeStartOffset:se}}else u-=w.piece.length;w=w.next()}return null}nodeCharCodeAt(g,u){if(g.piece.lineFeedCnt<1)return-1;let w=this._buffers[g.piece.bufferIndex],V=this.offsetInBuffer(g.piece.bufferIndex,g.piece.start)+u;return w.buffer.charCodeAt(V)}offsetOfNode(g){if(!g)return 0;let u=g.size_left;for(;g!==this.root;)g.parent.right===g&&(u+=g.parent.size_left+g.parent.piece.length),g=g.parent;return u}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===`
|
|
|
`)}startWithLF(g){if(typeof g=="string")return g.charCodeAt(0)===10;if(g===ve||g.piece.lineFeedCnt===0)return!1;let u=g.piece,w=this._buffers[u.bufferIndex].lineStarts,V=u.start.line,se=w[V]+u.start.column;if(V===w.length-1)return!1;let pe=w[V+1];return pe>se+1?!1:this._buffers[u.bufferIndex].buffer.charCodeAt(se)===10}endWithCR(g){return typeof g=="string"?g.charCodeAt(g.length-1)===13:g===ve||g.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(g,g.piece.length-1)===13}validateCRLFWithPrevNode(g){if(this.shouldCheckCRLF()&&this.startWithLF(g)){let u=g.prev();this.endWithCR(u)&&this.fixCRLF(u,g)}}validateCRLFWithNextNode(g){if(this.shouldCheckCRLF()&&this.endWithCR(g)){let u=g.next();this.startWithLF(u)&&this.fixCRLF(g,u)}}fixCRLF(g,u){let w=[],V=this._buffers[g.piece.bufferIndex].lineStarts,se;g.piece.end.column===0?se={line:g.piece.end.line-1,column:V[g.piece.end.line]-V[g.piece.end.line-1]-1}:se={line:g.piece.end.line,column:g.piece.end.column-1};const pe=g.piece.length-1,Se=g.piece.lineFeedCnt-1;g.piece=new re(g.piece.bufferIndex,g.piece.start,se,Se,pe),nt(this,g,-1,-1),g.piece.length===0&&w.push(g);let Qe={line:u.piece.start.line+1,column:0};const ut=u.piece.length-1,yt=this.getLineFeedCnt(u.piece.bufferIndex,Qe,u.piece.end);u.piece=new re(u.piece.bufferIndex,Qe,u.piece.end,yt,ut),nt(this,u,-1,-1),u.piece.length===0&&w.push(u);let Ct=this.createNewPieces(`\r
|
|
|
`);this.rbInsertRight(g,Ct[0]);for(let At=0;At<w.length;At++)we(this,w[At])}adjustCarriageReturnFromNext(g,u){if(this.shouldCheckCRLF()&&this.endWithCR(g)){let w=u.next();if(this.startWithLF(w)){if(g+=`
|
|
|
`,w.piece.length===1)we(this,w);else{const V=w.piece,se={line:V.start.line+1,column:0},pe=V.length-1,Se=this.getLineFeedCnt(V.bufferIndex,se,V.end);w.piece=new re(V.bufferIndex,se,V.end,Se,pe),nt(this,w,-1,-1)}return!0}}return!1}iterate(g,u){if(g===ve)return u(ve);let w=this.iterate(g.left,u);return w&&(u(g)&&this.iterate(g.right,u))}getNodeContent(g){if(g===ve)return"";let u=this._buffers[g.piece.bufferIndex],w,V=g.piece,se=this.offsetInBuffer(V.bufferIndex,V.start),pe=this.offsetInBuffer(V.bufferIndex,V.end);return w=u.buffer.substring(se,pe),w}getPieceContent(g){let u=this._buffers[g.bufferIndex],w=this.offsetInBuffer(g.bufferIndex,g.start),V=this.offsetInBuffer(g.bufferIndex,g.end),se=u.buffer.substring(w,V);return se}rbInsertRight(g,u){let w=new Pe(u,1);w.left=ve,w.right=ve,w.parent=ve,w.size_left=0,w.lf_left=0;let V=this.root;if(V===ve)this.root=w,w.color=0;else if(g.right===ve)g.right=w,w.parent=g;else{let se=ce(g.right);se.left=w,w.parent=se}return Oe(this,w),w}rbInsertLeft(g,u){let w=new Pe(u,1);if(w.left=ve,w.right=ve,w.parent=ve,w.size_left=0,w.lf_left=0,this.root===ve)this.root=w,w.color=0;else if(g.left===ve)g.left=w,w.parent=g;else{let V=le(g.left);V.right=w,w.parent=V}return Oe(this,w),w}}var Rt=t("QRHv"),vo=t("5nk5");class Mo extends x.a{constructor(g,u,w,V,se,pe,Se){super();this._onDidChangeContent=this._register(new B.b),this._BOM=u,this._mightContainNonBasicASCII=!pe,this._mightContainRTL=V,this._mightContainUnusualLineTerminators=se,this._pieceTree=new It(g,w,Se)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(g){return this._pieceTree.createSnapshot(g?this._BOM:"")}getOffsetAt(g,u){return this._pieceTree.getOffsetAt(g,u)}getPositionAt(g){return this._pieceTree.getPositionAt(g)}getRangeAt(g,u){let w=g+u;const V=this.getPositionAt(g),se=this.getPositionAt(w);return new L.a(V.lineNumber,V.column,se.lineNumber,se.column)}getValueInRange(g,u=0){if(g.isEmpty())return"";const w=this._getEndOfLine(u);return this._pieceTree.getValueInRange(g,w)}getValueLengthInRange(g,u=0){if(g.isEmpty())return 0;if(g.startLineNumber===g.endLineNumber)return g.endColumn-g.startColumn;let w=this.getOffsetAt(g.startLineNumber,g.startColumn),V=this.getOffsetAt(g.endLineNumber,g.endColumn);return V-w}getCharacterCountInRange(g,u=0){if(this._mightContainNonBasicASCII){let w=0;const V=g.startLineNumber,se=g.endLineNumber;for(let pe=V;pe<=se;pe++){const Se=this.getLineContent(pe),Qe=pe===V?g.startColumn-1:0,ut=pe===se?g.endColumn-1:Se.length;for(let yt=Qe;yt<ut;yt++)N.E(Se.charCodeAt(yt))?(w=w+1,yt=yt+1):w=w+1}return w+=this._getEndOfLine(u).length*(se-V),w}return this.getValueLengthInRange(g,u)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(g){return this._pieceTree.getLineContent(g)}getLineCharCode(g,u){return this._pieceTree.getLineCharCode(g,u)}getLineLength(g){return this._pieceTree.getLineLength(g)}getLineFirstNonWhitespaceColumn(g){const u=N.u(this.getLineContent(g));return u===-1?0:u+1}getLineLastNonWhitespaceColumn(g){const u=N.I(this.getLineContent(g));return u===-1?0:u+2}_getEndOfLine(g){switch(g){case 1:return`
|
|
|
`;case 2:return`\r
|
|
|
`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(g){this._pieceTree.setEOL(g)}applyEdits(g,u,w){let V=this._mightContainRTL,se=this._mightContainUnusualLineTerminators,pe=this._mightContainNonBasicASCII,Se=!0,Qe=[];for(let Yt=0;Yt<g.length;Yt++){let ao=g[Yt];Se&&ao._isTracked&&(Se=!1);let Co=ao.range;if(ao.text){let li=!0;pe||(li=!N.A(ao.text),pe=li),!V&&li&&(V=N.m(ao.text)),!se&&li&&(se=N.n(ao.text))}let ko="",Qo=0,yi=0,Ko=0;if(ao.text){let li;[Qo,yi,Ko,li]=Object(Rt.f)(ao.text);const Ki=this.getEOL(),xi=Ki===`\r
|
|
|
`?2:1;li===0||li===xi?ko=ao.text:ko=ao.text.replace(/\r\n|\r|\n/g,Ki)}Qe[Yt]={sortIndex:Yt,identifier:ao.identifier||null,range:Co,rangeOffset:this.getOffsetAt(Co.startLineNumber,Co.startColumn),rangeLength:this.getValueLengthInRange(Co),text:ko,eolCount:Qo,firstLineLength:yi,lastLineLength:Ko,forceMoveMarkers:Boolean(ao.forceMoveMarkers),isAutoWhitespaceEdit:ao.isAutoWhitespaceEdit||!1}}Qe.sort(Mo._sortOpsAscending);let ut=!1;for(let Yt=0,ao=Qe.length-1;Yt<ao;Yt++){let Co=Qe[Yt].range.getEndPosition(),ko=Qe[Yt+1].range.getStartPosition();if(ko.isBeforeOrEqual(Co)){if(ko.isBefore(Co))throw new Error("Overlapping ranges are not allowed!");ut=!0}}Se&&(Qe=this._reduceOperations(Qe));let yt=w||u?Mo._getInverseEditRanges(Qe):[],Ct=[];if(u)for(let Yt=0;Yt<Qe.length;Yt++){let ao=Qe[Yt],Co=yt[Yt];if(ao.isAutoWhitespaceEdit&&ao.range.isEmpty())for(let ko=Co.startLineNumber;ko<=Co.endLineNumber;ko++){let Qo="";if(ko===Co.startLineNumber&&(Qo=this.getLineContent(ao.range.startLineNumber),N.u(Qo)!==-1))continue;Ct.push({lineNumber:ko,oldContent:Qo})}}let At=null;if(w){let Yt=0;At=[];for(let ao=0;ao<Qe.length;ao++){const Co=Qe[ao],ko=yt[ao],Qo=this.getValueInRange(Co.range),yi=Co.rangeOffset+Yt;Yt+=Co.text.length-Qo.length,At[ao]={sortIndex:Co.sortIndex,identifier:Co.identifier,range:ko,text:Qo,textChange:new vo.a(Co.rangeOffset,Qo,yi,Co.text)}}ut||At.sort((ao,Co)=>ao.sortIndex-Co.sortIndex)}this._mightContainRTL=V,this._mightContainUnusualLineTerminators=se,this._mightContainNonBasicASCII=pe;const Ft=this._doApplyEdits(Qe);let Zt=null;if(u&&Ct.length>0){Ct.sort((Yt,ao)=>ao.lineNumber-Yt.lineNumber),Zt=[];for(let Yt=0,ao=Ct.length;Yt<ao;Yt++){let Co=Ct[Yt].lineNumber;if(Yt>0&&Ct[Yt-1].lineNumber===Co)continue;let ko=Ct[Yt].oldContent,Qo=this.getLineContent(Co);if(Qo.length===0||Qo===ko||N.u(Qo)!==-1)continue;Zt.push(Co)}}return this._onDidChangeContent.fire(),new m.a(At,Ft,Zt)}_reduceOperations(g){return g.length<1e3?g:[this._toSingleEditOperation(g)]}_toSingleEditOperation(g){let u=!1;const w=g[0].range,V=g[g.length-1].range,se=new L.a(w.startLineNumber,w.startColumn,V.endLineNumber,V.endColumn);let pe=w.startLineNumber,Se=w.startColumn;const Qe=[];for(let Ft=0,Zt=g.length;Ft<Zt;Ft++){const Yt=g[Ft],ao=Yt.range;u=u||Yt.forceMoveMarkers,Qe.push(this.getValueInRange(new L.a(pe,Se,ao.startLineNumber,ao.startColumn))),Yt.text.length>0&&Qe.push(Yt.text),pe=ao.endLineNumber,Se=ao.endColumn}const ut=Qe.join(""),[yt,Ct,At]=Object(Rt.f)(ut);return{sortIndex:0,identifier:g[0].identifier,range:se,rangeOffset:this.getOffsetAt(se.startLineNumber,se.startColumn),rangeLength:this.getValueLengthInRange(se,0),text:ut,eolCount:yt,firstLineLength:Ct,lastLineLength:At,forceMoveMarkers:u,isAutoWhitespaceEdit:!1}}_doApplyEdits(g){g.sort(Mo._sortOpsDescending);let u=[];for(let w=0;w<g.length;w++){let V=g[w];const se=V.range.startLineNumber,pe=V.range.startColumn,Se=V.range.endLineNumber,Qe=V.range.endColumn;if(se===Se&&pe===Qe&&V.text.length===0)continue;V.text?(this._pieceTree.delete(V.rangeOffset,V.rangeLength),this._pieceTree.insert(V.rangeOffset,V.text,!0)):this._pieceTree.delete(V.rangeOffset,V.rangeLength);const ut=new L.a(se,pe,Se,Qe);u.push({range:ut,rangeLength:V.rangeLength,text:V.text,rangeOffset:V.rangeOffset,forceMoveMarkers:V.forceMoveMarkers})}return u}findMatchesLineByLine(g,u,w,V){return this._pieceTree.findMatchesLineByLine(g,u,w,V)}static _getInverseEditRanges(g){let u=[],w=0,V=0,se=null;for(let pe=0,Se=g.length;pe<Se;pe++){let Qe=g[pe],ut,yt;se?se.range.endLineNumber===Qe.range.startLineNumber?(ut=w,yt=V+(Qe.range.startColumn-se.range.endColumn)):(ut=w+(Qe.range.startLineNumber-se.range.endLineNumber),yt=Qe.range.startColumn):(ut=Qe.range.startLineNumber,yt=Qe.range.startColumn);let Ct;if(Qe.text.length>0){const At=Qe.eolCount+1;At===1?Ct=new L.a(ut,yt,ut,yt+Qe.firstLineLength):Ct=new L.a(ut,yt,ut+At-1,Qe.lastLineLength+1)}else Ct=new L.a(ut,yt,ut,yt);w=Ct.endLineNumber,V=Ct.endColumn,u.push(Ct),se=Qe}return u}static _sortOpsAscending(g,u){let w=L.a.compareRangesUsingEnds(g.range,u.range);return w===0?g.sortIndex-u.sortIndex:w}static _sortOpsDescending(g,u){let w=L.a.compareRangesUsingEnds(g.range,u.range);return w===0?u.sortIndex-g.sortIndex:-w}}class xo{constructor(g,u,w,V,se,pe,Se,Qe,ut){this._chunks=g,this._bom=u,this._cr=w,this._lf=V,this._crlf=se,this._containsRTL=pe,this._containsUnusualLineTerminators=Se,this._isBasicASCII=Qe,this._normalizeEOL=ut}_getEOL(g){const u=this._cr+this._lf+this._crlf,w=this._cr+this._crlf;return u===0?g===1?`
|
|
|
`:`\r
|
|
|
`:w>u/2?`\r
|
|
|
`:`
|
|
|
`}create(g){const u=this._getEOL(g);let w=this._chunks;if(this._normalizeEOL&&(u===`\r
|
|
|
`&&(this._cr>0||this._lf>0)||u===`
|
|
|
`&&(this._cr>0||this._crlf>0)))for(let se=0,pe=w.length;se<pe;se++){let Se=w[se].buffer.replace(/\r\n|\r|\n/g,u),Qe=Xe(Se);w[se]=new We(Se,Qe)}const V=new Mo(w,this._bom,u,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:V,disposable:V}}}class Do{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(g){if(g.length===0)return;this.chunks.length===0&&(N.S(g)&&(this.BOM=N.b,g=g.substr(1)));const u=g.charCodeAt(g.length-1);u===13||u>=55296&&u<=56319?(this._acceptChunk1(g.substr(0,g.length-1),!1),this._hasPreviousChar=!0,this._previousChar=u):(this._acceptChunk1(g,!1),this._hasPreviousChar=!1,this._previousChar=u)}_acceptChunk1(g,u){if(!u&&g.length===0)return;this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+g):this._acceptChunk2(g)}_acceptChunk2(g){const u=it(this._tmpLineStarts,g);this.chunks.push(new We(g,u.lineStarts)),this.cr+=u.cr,this.lf+=u.lf,this.crlf+=u.crlf,this.isBasicASCII&&(this.isBasicASCII=u.isBasicASCII),!this.isBasicASCII&&!this.containsRTL&&(this.containsRTL=N.m(g)),!this.isBasicASCII&&!this.containsUnusualLineTerminators&&(this.containsUnusualLineTerminators=N.n(g))}finish(g=!0){return this._finish(),new xo(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,g)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let g=this.chunks[this.chunks.length-1];g.buffer+=String.fromCharCode(this._previousChar);let u=Xe(g.buffer);g.lineStarts=u,this._previousChar===13&&this.cr++}}}var Lo=t("M46C"),To=t("6OMU"),Ht=t("4bUh"),Mt=t("twdY"),Ue=t("i/Ef"),dt=t("5Y4S"),Ut=t("MNsG");class Ye{constructor(){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0}_reset(g){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0,g&&this._setBeginState(0,g)}flush(g){this._reset(g)}get invalidLineStartIndex(){return this._invalidLineStartIndex}_invalidateLine(g){g<this._len&&(this._valid[g]=!1),g<this._invalidLineStartIndex&&(this._invalidLineStartIndex=g)}_isValid(g){return g<this._len?this._valid[g]:!1}getBeginState(g){return g<this._len?this._beginState[g]:null}_ensureLine(g){for(;g>=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}_deleteLines(g,u){if(u===0)return;g+u>this._len&&(u=this._len-g),this._beginState.splice(g,u),this._valid.splice(g,u),this._len-=u}_insertLines(g,u){if(u===0)return;const w=[],V=[];for(let se=0;se<u;se++)w[se]=null,V[se]=!1;this._beginState=To.b(this._beginState,g,w),this._valid=To.b(this._valid,g,V),this._len+=u}_setValid(g,u){this._ensureLine(g),this._valid[g]=u}_setBeginState(g,u){this._ensureLine(g),this._beginState[g]=u}setEndState(g,u,w){if(this._setValid(u,!0),this._invalidLineStartIndex=u+1,u===g-1)return;const V=this.getBeginState(u+1);if(V===null||!w.equals(V)){this._setBeginState(u+1,w),this._invalidateLine(u+1);return}let se=u+1;for(;se<g&&this._isValid(se);)se++;this._invalidLineStartIndex=se}setFakeTokens(g){this._setValid(g,!1)}applyEdits(g,u){const w=g.endLineNumber-g.startLineNumber,V=u,se=Math.min(w,V);for(let pe=se;pe>=0;pe--)this._invalidateLine(g.startLineNumber+pe-1);this._acceptDeleteRange(g),this._acceptInsertText(new I.a(g.startLineNumber,g.startColumn),u)}_acceptDeleteRange(g){const u=g.startLineNumber-1;if(u>=this._len)return;this._deleteLines(g.startLineNumber,g.endLineNumber-g.startLineNumber)}_acceptInsertText(g,u){const w=g.lineNumber-1;if(w>=this._len)return;this._insertLines(g.lineNumber,u)}}class qe extends x.a{constructor(g,u){super();this._textModel=g,this._languageIdCodec=u,this._isDisposed=!1,this._tokenizationStateStore=new Ye,this._tokenizationSupport=null,this._register(Mt.E.onDidChange(w=>{const V=this._textModel.getLanguageId();if(w.changedLanguages.indexOf(V)===-1)return;this._resetTokenizationState(),this._textModel.clearTokens()})),this._register(this._textModel.onDidChangeContentFast(w=>{if(w.isFlush){this._resetTokenizationState();return}for(let V=0,se=w.changes.length;V<se;V++){const pe=w.changes[V],[Se]=Object(Rt.f)(pe.text);this._tokenizationStateStore.applyEdits(pe.range,Se)}this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeAttached(()=>{this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeLanguage(()=>{this._resetTokenizationState(),this._textModel.clearTokens()})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[g,u]=ct(this._textModel);this._tokenizationSupport=g,this._tokenizationStateStore.flush(u),this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&Ut.j(()=>{if(this._isDisposed)return;this._revalidateTokensNow()})}_revalidateTokensNow(){const g=this._textModel.getLineCount(),u=1,w=new Rt.b,V=dt.a.create(!1);let se=-1;for(;this._hasLinesToTokenize()&&!(V.elapsed()>u);)if(se=this._tokenizeOneInvalidLine(w),se>=g)break;this._beginBackgroundTokenization(),this._textModel.setTokens(w.tokens,!this._hasLinesToTokenize())}tokenizeViewport(g,u){const w=new Rt.b;this._tokenizeViewport(w,g,u),this._textModel.setTokens(w.tokens,!this._hasLinesToTokenize())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(g){const u=new Rt.b;this._updateTokensUntilLine(u,g),this._textModel.setTokens(u.tokens,!this._hasLinesToTokenize())}isCheapToTokenize(g){if(!this._tokenizationSupport)return!0;const u=this._tokenizationStateStore.invalidLineStartIndex+1;return g>u?!1:g<u?!0:this._textModel.getLineLength(g)<2048}_hasLinesToTokenize(){return this._tokenizationSupport?this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount():!1}_tokenizeOneInvalidLine(g){if(!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const u=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(g,u),u}_updateTokensUntilLine(g,u){if(!this._tokenizationSupport)return;const w=this._textModel.getLanguageId(),V=this._textModel.getLineCount(),se=u-1;for(let pe=this._tokenizationStateStore.invalidLineStartIndex;pe<=se;pe++){const Se=this._textModel.getLineContent(pe+1),Qe=this._tokenizationStateStore.getBeginState(pe),ut=_t(this._languageIdCodec,w,this._tokenizationSupport,Se,!0,Qe);g.add(pe+1,ut.tokens),this._tokenizationStateStore.setEndState(V,pe,ut.endState),pe=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(g,u,w){if(!this._tokenizationSupport)return;if(w<=this._tokenizationStateStore.invalidLineStartIndex)return;if(u<=this._tokenizationStateStore.invalidLineStartIndex){this._updateTokensUntilLine(g,w);return}let V=this._textModel.getLineFirstNonWhitespaceColumn(u);const se=[];let pe=null;for(let ut=u-1;V>1&&ut>=1;ut--){const yt=this._textModel.getLineFirstNonWhitespaceColumn(ut);if(yt===0)continue;if(yt<V){if(pe=this._tokenizationStateStore.getBeginState(ut-1),pe)break;se.push(this._textModel.getLineContent(ut)),V=yt}}pe||(pe=this._tokenizationSupport.getInitialState());const Se=this._textModel.getLanguageId();let Qe=pe;for(let ut=se.length-1;ut>=0;ut--){const yt=_t(this._languageIdCodec,Se,this._tokenizationSupport,se[ut],!1,Qe);Qe=yt.endState}for(let ut=u;ut<=w;ut++){const yt=this._textModel.getLineContent(ut),Ct=_t(this._languageIdCodec,Se,this._tokenizationSupport,yt,!0,Qe);g.add(ut,Ct.tokens),this._tokenizationStateStore.setFakeTokens(ut-1),Qe=Ct.endState}}}function ct(g){const u=g.getLanguageId();let w=g.isTooLargeForTokenization()?null:Mt.E.get(u),V=null;if(w)try{V=w.getInitialState()}catch(se){Object(f.f)(se),w=null}return[w,V]}function _t(g,u,w,V,se,pe){let Se=null;if(w)try{Se=w.tokenize2(V,se,pe.clone(),0)}catch(Qe){Object(f.f)(Qe)}return Se||(Se=Object(Ue.d)(g.encodeLanguageId(u),V,pe,0)),Ht.a.convertToEndOffset(Se.tokens,V.length),Se}var Pt=t("0JNc"),Wt=t("cMvZ"),Vt=t("BFtn"),so=t("EIAu"),wo=t("zrhQ"),No=t("OAO6");class di{constructor(g,u,w){this.range=g,this.nestingLevel=u,this.isInvalid=w}}class _o{constructor(g,u,w,V){this.range=g,this.openingBracketRange=u,this.closingBracketRange=w,this.nestingLevel=V}}class no extends _o{constructor(g,u,w,V,se){super(g,u,w,V);this.minVisibleColumnIndentation=se}}class Lt{constructor(g,u){this.lineCount=g,this.columnCount=u}toString(){return`${this.lineCount},${this.columnCount}`}}function xt(g,u,w,V){return g!==w?pt(w-g,V):pt(0,V-u)}const Nt=0;function rt(g){return g===0}const lt=Math.pow(2,26);function pt(g,u){return g*lt+u}function St(g){const u=g,w=Math.floor(u/lt),V=u-w*lt;return new Lt(w,V)}function Qt(g){return Math.floor(g/lt)}function bo(g){return g}function qt(g,u){return u<lt?g+u:g-g%lt+u}function Eo(g,u){const w=g,V=u,se=V-w;if(se<=0)return Nt;const pe=Math.floor(w/lt),Se=Math.floor(V/lt),Qe=V-Se*lt;if(pe===Se){const ut=w-pe*lt;return pt(0,Qe-ut)}else return pt(Se-pe,Qe)}function Ro(g,u){return g<u}function zo(g,u){return g<=u}function Bo(g,u){return g>=u}function Jt(g){return pt(g.lineNumber-1,g.column-1)}function fo(g,u){const w=g,V=Math.floor(w/lt),se=w-V*lt,pe=u,Se=Math.floor(pe/lt),Qe=pe-Se*lt;return new L.a(V+1,se+1,Se+1,Qe+1)}function ri(g){const u=Object(N.Q)(g);return pt(u.length-1,u[u.length-1].length)}function Zo(g){return g}class ci{constructor(g,u,w){this.startOffset=g,this.endOffset=u,this.newLength=w}}class ki{constructor(g,u){this.documentLength=u,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=g.map(w=>wi.from(w))}getOffsetBeforeChange(g){return this.adjustNextEdit(g),this.translateCurToOld(g)}getDistanceToNextChange(g){this.adjustNextEdit(g);const u=this.edits[this.nextEditIdx],w=u?this.translateOldToCur(u.offsetObj):this.documentLength;return Eo(g,w)}translateOldToCur(g){return g.lineCount===this.deltaLineIdxInOld?pt(g.lineCount+this.deltaOldToNewLineCount,g.columnCount+this.deltaOldToNewColumnCount):pt(g.lineCount+this.deltaOldToNewLineCount,g.columnCount)}translateCurToOld(g){const u=St(g);return u.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?pt(u.lineCount-this.deltaOldToNewLineCount,u.columnCount-this.deltaOldToNewColumnCount):pt(u.lineCount-this.deltaOldToNewLineCount,u.columnCount)}adjustNextEdit(g){for(;this.nextEditIdx<this.edits.length;){const u=this.edits[this.nextEditIdx],w=this.translateOldToCur(u.endOffsetAfterObj);if(zo(w,g)){this.nextEditIdx++;const V=St(w),se=St(this.translateOldToCur(u.endOffsetBeforeObj)),pe=V.lineCount-se.lineCount;this.deltaOldToNewLineCount+=pe;const Se=this.deltaLineIdxInOld===u.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,Qe=V.columnCount-se.columnCount;this.deltaOldToNewColumnCount=Se+Qe,this.deltaLineIdxInOld=u.endOffsetBeforeObj.lineCount}else break}}}class wi{constructor(g,u,w){this.endOffsetBeforeObj=St(u),this.endOffsetAfterObj=St(qt(g,w)),this.offsetObj=St(g)}static from(g){return new wi(g.startOffset,g.endOffset,g.newLength)}}var Zi=t("Apug");const Vi=new Array;class vi{constructor(g,u){this.items=g,this.additionalItems=u}static create(g,u){if(g<=128&&u.length===0){let w=vi.cache[g];return w||(w=new vi(g,u),vi.cache[g]=w),w}return new vi(g,u)}static getEmpty(){return this.empty}add(g,u){const w=u.getKey(g);let V=w>>5;if(V===0){const pe=1<<w|this.items;return pe===this.items?this:vi.create(pe,this.additionalItems)}V--;const se=this.additionalItems.slice(0);for(;se.length<V;)se.push(0);return se[V]|=1<<(w&31),vi.create(this.items,se)}merge(g){const u=this.items|g.items;if(this.additionalItems===Vi&&g.additionalItems===Vi)return u===this.items?this:u===g.items?g:vi.create(u,Vi);const w=new Array;for(let V=0;V<Math.max(this.additionalItems.length,g.additionalItems.length);V++){const se=this.additionalItems[V]||0,pe=g.additionalItems[V]||0;w.push(se|pe)}return vi.create(u,w)}intersects(g){if((this.items&g.items)!==0)return!0;for(let u=0;u<Math.min(this.additionalItems.length,g.additionalItems.length);u++)if((this.additionalItems[u]&g.additionalItems[u])!==0)return!0;return!1}}vi.cache=new Array(129),vi.empty=vi.create(0,Vi);const sn={getKey(g){return g}};class en{constructor(){this.items=new Map}getKey(g){let u=this.items.get(g);return u===void 0&&(u=this.items.size,this.items.set(g,u)),u}}class on{constructor(g){this._length=g}get length(){return this._length}}class cn extends on{constructor(g,u,w,V,se){super(g);this.openingBracket=u,this.child=w,this.closingBracket=V,this.missingOpeningBracketIds=se}static create(g,u,w){let V=g.length;return u&&(V=qt(V,u.length)),w&&(V=qt(V,w.length)),new cn(V,g,u,w,u?u.missingOpeningBracketIds:vi.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(g){switch(g){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const g=new Array;return g.push(this.openingBracket),this.child&&g.push(this.child),this.closingBracket&&g.push(this.closingBracket),g}canBeReused(g){return this.closingBracket===null?!1:!g.intersects(this.missingOpeningBracketIds)}deepClone(){return new cn(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(g,u){return this.child?this.child.computeMinIndentation(qt(g,this.openingBracket.length),u):Number.MAX_SAFE_INTEGER}}class Bi extends on{constructor(g,u,w){super(g);this.listHeight=u,this._missingOpeningBracketIds=w,this.cachedMinIndentation=-1}static create23(g,u,w,V=!1){let se=g.length,pe=g.missingOpeningBracketIds;if(g.listHeight!==u.listHeight)throw new Error("Invalid list heights");if(se=qt(se,u.length),pe=pe.merge(u.missingOpeningBracketIds),w){if(g.listHeight!==w.listHeight)throw new Error("Invalid list heights");se=qt(se,w.length),pe=pe.merge(w.missingOpeningBracketIds)}return V?new Ji(se,g.listHeight+1,g,u,w,pe):new zi(se,g.listHeight+1,g,u,w,pe)}static getEmpty(){return new pn(Nt,0,[],vi.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const g=this.childrenLength;if(g===0)return;const u=this.getChild(g-1),w=u.kind===4?u.toMutable():u;return u!==w&&this.setChild(g-1,w),w}makeFirstElementMutable(){this.throwIfImmutable();const g=this.childrenLength;if(g===0)return;const u=this.getChild(0),w=u.kind===4?u.toMutable():u;return u!==w&&this.setChild(0,w),w}canBeReused(g){if(g.intersects(this.missingOpeningBracketIds))return!1;let u=this,w;for(;u.kind===4&&(w=u.childrenLength)>0;)u=u.getChild(w-1);return u.canBeReused(g)}handleChildrenChanged(){this.throwIfImmutable();const g=this.childrenLength;let u=this.getChild(0).length,w=this.getChild(0).missingOpeningBracketIds;for(let V=1;V<g;V++){const se=this.getChild(V);u=qt(u,se.length),w=w.merge(se.missingOpeningBracketIds)}this._length=u,this._missingOpeningBracketIds=w,this.cachedMinIndentation=-1}computeMinIndentation(g,u){if(this.cachedMinIndentation!==-1)return this.cachedMinIndentation;let w=Number.MAX_SAFE_INTEGER,V=g;for(let se=0;se<this.childrenLength;se++){const pe=this.getChild(se);pe&&(w=Math.min(w,pe.computeMinIndentation(V,u)),V=qt(V,pe.length))}return this.cachedMinIndentation=w,w}}class zi extends Bi{constructor(g,u,w,V,se,pe){super(g,u,pe);this._item1=w,this._item2=V,this._item3=se}get childrenLength(){return this._item3!==null?3:2}getChild(g){switch(g){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(g,u){switch(g){case 0:this._item1=u;return;case 1:this._item2=u;return;case 2:this._item3=u;return}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}deepClone(){return new zi(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(g){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=g,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const g=this._item3;return this._item3=null,this.handleChildrenChanged(),g}prependChildOfSameHeight(g){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=g,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const g=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),g}toMutable(){return this}}class Ji extends zi{toMutable(){return new zi(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class ui extends Bi{constructor(g,u,w,V){super(g,u,V);this._children=w}get childrenLength(){return this._children.length}getChild(g){return this._children[g]}setChild(g,u){this._children[g]=u}get children(){return this._children}deepClone(){const g=new Array(this._children.length);for(let u=0;u<this._children.length;u++)g[u]=this._children[u].deepClone();return new ui(this.length,this.listHeight,g,this.missingOpeningBracketIds)}appendChildOfSameHeight(g){this.throwIfImmutable(),this._children.push(g),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const g=this._children.pop();return this.handleChildrenChanged(),g}prependChildOfSameHeight(g){this.throwIfImmutable(),this._children.unshift(g),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const g=this._children.shift();return this.handleChildrenChanged(),g}toMutable(){return this}}class pn extends ui{toMutable(){return new ui(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const Hi=[];class Oi extends on{get listHeight(){return 0}get childrenLength(){return 0}getChild(g){return null}get children(){return Hi}deepClone(){return this}}class Ii extends Oi{get kind(){return 0}get missingOpeningBracketIds(){return vi.getEmpty()}canBeReused(g){return!0}computeMinIndentation(g,u){const w=St(g),V=(w.columnCount===0?w.lineCount:w.lineCount+1)+1,se=Qt(qt(g,this.length))+1;let pe=Number.MAX_SAFE_INTEGER;for(let Se=V;Se<=se;Se++){const Qe=u.getLineFirstNonWhitespaceColumn(Se),ut=u.getLineContent(Se);if(Qe===0)continue;const yt=Zi.a.visibleColumnFromColumn(ut,Qe,u.getOptions().tabSize);pe=Math.min(pe,yt)}return pe}}class Qi extends Oi{constructor(g){super(g)}static create(g){const u=Zo(g),w=Qi.cacheByLength.get(u);if(w)return w;const V=new Qi(g);return Qi.cacheByLength.set(u,V),V}get kind(){return 1}get missingOpeningBracketIds(){return vi.getEmpty()}canBeReused(g){return!1}computeMinIndentation(g,u){return Number.MAX_SAFE_INTEGER}}Qi.cacheByLength=new Map;class Li extends Oi{constructor(g,u){super(u);this.missingOpeningBracketIds=g}get kind(){return 3}canBeReused(g){return!g.intersects(this.missingOpeningBracketIds)}computeMinIndentation(g,u){return Number.MAX_SAFE_INTEGER}}class Ui{constructor(g,u,w,V,se){this.length=g,this.kind=u,this.bracketId=w,this.bracketIds=V,this.astNode=se}}class fi{constructor(g,u){this.textModel=g,this.bracketTokens=u,this.reader=new $i(this.textModel,this.bracketTokens),this._offset=Nt,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=g.getLineCount(),this.textBufferLastLineLength=g.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return pt(this.textBufferLineCount,this.textBufferLastLineLength)}skip(g){this.didPeek=!1,this._offset=qt(this._offset,g);const u=St(this._offset);this.reader.setPosition(u.lineCount,u.columnCount)}read(){let g;return this.peeked?(this.didPeek=!1,g=this.peeked):g=this.reader.read(),g&&(this._offset=qt(this._offset,g.length)),g}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class $i{constructor(g,u){this.textModel=g,this.bracketTokens=u,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=g.getLineCount(),this.textBufferLastLineLength=g.getLineLength(this.textBufferLineCount)}setPosition(g,u){g===this.lineIdx?(this.lineCharOffset=u,this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=g,this.lineCharOffset=u,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const se=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=bo(se.length),se}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const g=this.lineIdx,u=this.lineCharOffset;let w=0;for(;;){const se=this.lineTokens,pe=se.getCount();let Se=null;if(this.lineTokenOffset<pe){const Qe=se.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<pe&&Qe===se.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const ut=Mt.D.getTokenType(Qe)===0,yt=se.getEndOffset(this.lineTokenOffset);if(ut&&yt!==this.lineCharOffset){const Ct=se.getLanguageId(this.lineTokenOffset),At=this.line.substring(this.lineCharOffset,yt),Ft=this.bracketTokens.getSingleLanguageBracketTokens(Ct),Zt=Ft.regExpGlobal;if(Zt){Zt.lastIndex=0;const Yt=Zt.exec(At);Yt&&(Se=Ft.getToken(Yt[0]),Se&&(this.lineCharOffset+=Yt.index))}}if(w+=yt-this.lineCharOffset,Se)if(g!==this.lineIdx||u!==this.lineCharOffset){this.peekedToken=Se;break}else return this.lineCharOffset+=bo(Se.length),Se;else this.lineTokenOffset++,this.lineCharOffset=yt}else{if(this.lineIdx===this.textBufferLineCount-1)break;if(this.lineIdx++,this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,w+=33,w>1e3)break}if(w>1500)break}const V=xt(g,u,this.lineIdx,this.lineCharOffset);return new Ui(V,0,-1,vi.getEmpty(),new Ii(V))}}class rn{constructor(g,u){this.text=g,this._offset=Nt,this.idx=0;const w=u.getRegExpStr(),V=w?new RegExp(u.getRegExpStr()+`|
|
|
|
`,"g"):null,se=[];let pe,Se=0,Qe=0,ut=0,yt=0;const Ct=new Array;for(let Zt=0;Zt<60;Zt++)Ct.push(new Ui(pt(0,Zt),0,-1,vi.getEmpty(),new Ii(pt(0,Zt))));const At=new Array;for(let Zt=0;Zt<60;Zt++)At.push(new Ui(pt(1,Zt),0,-1,vi.getEmpty(),new Ii(pt(1,Zt))));if(V)for(V.lastIndex=0;(pe=V.exec(g))!==null;){const Zt=pe.index,Yt=pe[0];if(Yt===`
|
|
|
`)Se++,Qe=Zt+1;else{if(ut!==Zt){let ao;if(yt===Se){const Co=Zt-ut;if(Co<Ct.length)ao=Ct[Co];else{const ko=pt(0,Co);ao=new Ui(ko,0,-1,vi.getEmpty(),new Ii(ko))}}else{const Co=Se-yt,ko=Zt-Qe;if(Co===1&&ko<At.length)ao=At[ko];else{const Qo=pt(Co,ko);ao=new Ui(Qo,0,-1,vi.getEmpty(),new Ii(Qo))}}se.push(ao)}se.push(u.getToken(Yt)),ut=Zt+Yt.length,yt=Se}}const Ft=g.length;if(ut!==Ft){const Zt=yt===Se?pt(0,Ft-ut):pt(Se-yt,Ft-Qe);se.push(new Ui(Zt,0,-1,vi.getEmpty(),new Ii(Zt)))}this.length=pt(Se,Ft-Qe),this.tokens=se}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(g){throw new f.a}}class _i{constructor(g){this.map=g,this.hasRegExp=!1,this._regExpGlobal=null}static createFromLanguage(g,u){function w(Qe,ut){return u.getKey(`${Qe}:::${ut}`)}const V=g.characterPair.getColorizedBrackets(),se=new Map,pe=new Set;for(const[Qe,ut]of V){pe.add(Qe);let yt=se.get(ut);const Ct=w(g.languageId,Qe);yt||(yt={openingBrackets:vi.getEmpty(),first:Ct},se.set(ut,yt)),yt.openingBrackets=yt.openingBrackets.add(Ct,sn)}const Se=new Map;for(const[Qe,ut]of se){const yt=pt(0,Qe.length);Se.set(Qe,new Ui(yt,2,ut.first,ut.openingBrackets,Qi.create(yt)))}for(const Qe of pe){const ut=pt(0,Qe.length),yt=w(g.languageId,Qe);Se.set(Qe,new Ui(ut,1,yt,vi.getEmpty().add(yt,sn),Qi.create(ut)))}return new _i(Se)}getRegExpStr(){if(this.isEmpty)return null;{const g=[...this.map.keys()];return g.sort(),g.reverse(),g.map(u=>Pi(u)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const g=this.getRegExpStr();this._regExpGlobal=g?new RegExp(g,"g"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(g){return this.map.get(g)}get isEmpty(){return this.map.size===0}}function Pi(g){const u=Object(N.t)(g),w=/^[\w ]+$/.test(g);return w?`\\b${u}\\b`:u}class ht{constructor(g,u){this.denseKeyProvider=g,this.getLanguageConfiguration=u,this.languageIdToBracketTokens=new Map}didLanguageChange(g){const u=this.languageIdToBracketTokens.get(g);if(!u)return!1;const w=_i.createFromLanguage(this.getLanguageConfiguration(g),this.denseKeyProvider).getRegExpStr();return u.getRegExpStr()!==w}getSingleLanguageBracketTokens(g){let u=this.languageIdToBracketTokens.get(g);return u||(u=_i.createFromLanguage(this.getLanguageConfiguration(g),this.denseKeyProvider),this.languageIdToBracketTokens.set(g,u)),u}}function Ve(g){if(g.length===0)return null;if(g.length===1)return g[0];let u=0;function w(){if(u>=g.length)return null;const Se=u,Qe=g[Se].listHeight;for(u++;u<g.length&&g[u].listHeight===Qe;)u++;return u-Se>=2?K(Se===0&&u===g.length?g:g.slice(Se,u),!1):g[Se]}let V=w(),se=w();if(!se)return V;for(let Se=w();Se;Se=w())be(V,se)<=be(se,Se)?(V=Re(V,se),se=Se):se=Re(se,Se);const pe=Re(V,se);return pe}function K(g,u=!1){if(g.length===0)return null;if(g.length===1)return g[0];let w=g.length;for(;w>3;){const V=w>>1;for(let se=0;se<V;se++){const pe=se<<1;g[se]=Bi.create23(g[pe],g[pe+1],pe+3===w?g[pe+2]:null,u)}w=V}return Bi.create23(g[0],g[1],w>=3?g[2]:null,u)}function be(g,u){return Math.abs(g.listHeight-u.listHeight)}function Re(g,u){return g.listHeight===u.listHeight?Bi.create23(g,u,null,!1):g.listHeight>u.listHeight?Be(g,u):at(u,g)}function Be(g,u){g=g.toMutable();let w=g;const V=new Array;let se;for(;;){if(u.listHeight===w.listHeight){se=u;break}if(w.kind!==4)throw new Error("unexpected");V.push(w),w=w.makeLastElementMutable()}for(let pe=V.length-1;pe>=0;pe--){const Se=V[pe];se?Se.childrenLength>=3?se=Bi.create23(Se.unappendChild(),se,null,!1):(Se.appendChildOfSameHeight(se),se=void 0):Se.handleChildrenChanged()}return se?Bi.create23(g,se,null,!1):g}function at(g,u){g=g.toMutable();let w=g;const V=new Array;for(;u.listHeight!==w.listHeight;){if(w.kind!==4)throw new Error("unexpected");V.push(w),w=w.makeFirstElementMutable()}let se=u;for(let pe=V.length-1;pe>=0;pe--){const Se=V[pe];se?Se.childrenLength>=3?se=Bi.create23(se,Se.unprependChild(),null,!1):(Se.prependChildOfSameHeight(se),se=void 0):Se.handleChildrenChanged()}return se?Bi.create23(se,g,null,!1):g}class vt{constructor(g){this.lastOffset=Nt,this.nextNodes=[g],this.offsets=[Nt],this.idxs=[]}readLongestNodeAt(g,u){if(Ro(g,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=g;;){const w=Bt(this.nextNodes);if(!w)return;const V=Bt(this.offsets);if(Ro(g,V))return;if(Ro(V,g))if(qt(V,w.length)<=g)this.nextNodeAfterCurrent();else{const se=Gt(w);se!==-1?(this.nextNodes.push(w.getChild(se)),this.offsets.push(V),this.idxs.push(se)):this.nextNodeAfterCurrent()}else{if(u(w))return this.nextNodeAfterCurrent(),w;{const se=Gt(w);if(se===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(w.getChild(se)),this.offsets.push(V),this.idxs.push(se)}}}}nextNodeAfterCurrent(){for(;;){const g=Bt(this.offsets),u=Bt(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const w=Bt(this.nextNodes),V=Gt(w,this.idxs[this.idxs.length-1]);if(V!==-1){this.nextNodes.push(w.getChild(V)),this.offsets.push(qt(g,u.length)),this.idxs[this.idxs.length-1]=V;break}else this.idxs.pop()}}}function Gt(g,u=-1){for(;;){if(u++,u>=g.childrenLength)return-1;if(g.getChild(u))return u}}function Bt(g){return g.length>0?g[g.length-1]:void 0}function zt(g,u,w,V){const se=new ro(g,u,w,V);return se.parseDocument()}class ro{constructor(g,u,w,V){if(this.tokenizer=g,this.createImmutableLists=V,this._itemsConstructed=0,this._itemsFromCache=0,w&&V)throw new Error("Not supported");this.oldNodeReader=w?new vt(w):void 0,this.positionMapper=new ki(u,g.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let g=this.parseList(vi.getEmpty());return g||(g=Bi.getEmpty()),g}parseList(g){const u=new Array;for(;;){const V=this.tokenizer.peek();if(!V||V.kind===2&&V.bracketIds.intersects(g))break;const se=this.parseChild(g);if(se.kind===4&&se.childrenLength===0)continue;u.push(se)}const w=this.oldNodeReader?Ve(u):K(u,this.createImmutableLists);return w}parseChild(g){if(this.oldNodeReader){const w=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!rt(w)){const V=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),se=>{if(!Ro(se.length,w))return!1;const pe=se.canBeReused(g);return pe});if(V)return this._itemsFromCache++,this.tokenizer.skip(V.length),V}}this._itemsConstructed++;const u=this.tokenizer.read();switch(u.kind){case 2:return new Li(u.bracketIds,u.length);case 0:return u.astNode;case 1:const w=g.merge(u.bracketIds),V=this.parseList(w),se=this.tokenizer.peek();return se&&se.kind===2&&(se.bracketId===u.bracketId||se.bracketIds.intersects(u.bracketIds))?(this.tokenizer.read(),cn.create(u.astNode,V,se.astNode)):cn.create(u.astNode,V,null);default:throw new Error("unexpected")}}}class P extends x.a{constructor(g,u){super();this.textModel=g,this.languageConfigurationService=u,this.cache=this._register(new x.d),this.onDidChangeEmitter=new B.b,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(g.onDidChangeOptions(w=>{this.cache.clear(),this.updateCache()})),this._register(g.onDidChangeLanguage(w=>{this.cache.clear(),this.updateCache()})),this._register(this.languageConfigurationService.onDidChange(w=>{var V;(!w.languageId||((V=this.cache.value)===null||V===void 0?void 0:V.object.didLanguageChange(w.languageId)))&&(this.cache.clear(),this.updateCache())}))}get isDocumentSupported(){const g=5e4*100;return this.textModel.getValueLength()<=g}updateCache(){if(this.bracketsRequested&&this.isDocumentSupported){if(!this.cache.value){const g=new x.b;this.cache.value=q(g.add(new Ae(this.textModel,u=>this.languageConfigurationService.getLanguageConfiguration(u))),g),g.add(this.cache.value.object.onDidChange(u=>this.onDidChangeEmitter.fire(u))),this.onDidChangeEmitter.fire()}}else this.cache.clear(),this.onDidChangeEmitter.fire()}handleContentChanged(g){var u;(u=this.cache.value)===null||u===void 0||u.object.handleContentChanged(g)}getBracketPairsInRange(g){var u;return this.bracketsRequested=!0,this.updateCache(),((u=this.cache.value)===null||u===void 0?void 0:u.object.getBracketPairsInRange(g,!1))||[]}getBracketPairsInRangeWithMinIndentation(g){var u;return this.bracketsRequested=!0,this.updateCache(),((u=this.cache.value)===null||u===void 0?void 0:u.object.getBracketPairsInRange(g,!0))||[]}getBracketsInRange(g){var u;return this.bracketsRequested=!0,this.updateCache(),((u=this.cache.value)===null||u===void 0?void 0:u.object.getBracketsInRange(g))||[]}}function q(g,u){return{object:g,dispose:()=>u==null?void 0:u.dispose()}}class Ae extends x.a{constructor(g,u){super();if(this.textModel=g,this.getLanguageConfiguration=u,this.didChangeEmitter=new B.b,this.denseKeyProvider=new en,this.brackets=new ht(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this._register(g.onBackgroundTokenizationStateChanged(()=>{if(g.backgroundTokenizationState===2){const w=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,w||this.didChangeEmitter.fire()}})),this._register(g.onDidChangeTokens(({ranges:w})=>{const V=w.map(se=>new ci(pt(se.fromLineNumber-1,0),pt(se.toLineNumber,0),pt(se.toLineNumber-se.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(V,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()})),g.backgroundTokenizationState===0){const w=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),V=new rn(this.textModel.getValue(),w);this.initialAstWithoutTokens=zt(V,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else g.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):g.backgroundTokenizationState===1&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(g){return this.brackets.didLanguageChange(g)}handleContentChanged(g){const u=g.changes.map(w=>{const V=L.a.lift(w.range);return new ci(Jt(V.getStartPosition()),Jt(V.getEndPosition()),ri(w.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(u,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(u,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(g,u,w){const V=!1,se=V?u==null?void 0:u.deepClone():u,pe=new fi(this.textModel,this.brackets),Se=zt(pe,g,se,w);return Se}getBracketsInRange(g){const u=pt(g.startLineNumber-1,g.startColumn-1),w=pt(g.endLineNumber-1,g.endColumn-1),V=new Array,se=this.initialAstWithoutTokens||this.astWithTokens;return Ge(se,Nt,se.length,u,w,V),V}getBracketPairsInRange(g,u){const w=new Array,V=Jt(g.getStartPosition()),se=Jt(g.getEndPosition()),pe=this.initialAstWithoutTokens||this.astWithTokens,Se=new ft(w,u,this.textModel);return Dt(pe,Nt,pe.length,V,se,Se),w}}function Ge(g,u,w,V,se,pe,Se=0){if(g.kind===1){const Qe=fo(u,w);pe.push(new di(Qe,Se-1,!1))}else if(g.kind===3){const Qe=fo(u,w);pe.push(new di(Qe,Se-1,!0))}else if(g.kind===4)for(const Qe of g.children)w=qt(u,Qe.length),zo(u,se)&&Bo(w,V)&&Ge(Qe,u,w,V,se,pe,Se),u=w;else if(g.kind===2){Se++;{const Qe=g.openingBracket;w=qt(u,Qe.length),zo(u,se)&&Bo(w,V)&&Ge(Qe,u,w,V,se,pe,Se),u=w}if(g.child){const Qe=g.child;w=qt(u,Qe.length),zo(u,se)&&Bo(w,V)&&Ge(Qe,u,w,V,se,pe,Se),u=w}if(g.closingBracket){const Qe=g.closingBracket;w=qt(u,Qe.length),zo(u,se)&&Bo(w,V)&&Ge(Qe,u,w,V,se,pe,Se),u=w}}}class ft{constructor(g,u,w){this.result=g,this.includeMinIndentation=u,this.textModel=w}}function Dt(g,u,w,V,se,pe,Se=0){var Qe;if(g.kind===2){const yt=qt(u,g.openingBracket.length);let Ct=-1;pe.includeMinIndentation&&(Ct=g.computeMinIndentation(u,pe.textModel)),pe.result.push(new no(fo(u,w),fo(u,yt),g.closingBracket?fo(qt(yt,((Qe=g.child)===null||Qe===void 0?void 0:Qe.length)||Nt),w):void 0,Se,Ct)),Se++}let ut=u;for(const yt of g.children){const Ct=ut;ut=qt(ut,yt.length),zo(Ct,se)&&zo(V,ut)&&Dt(yt,Ct,ut,V,se,pe,Se)}}var jt=t("kYye"),Xt=t("t9D7");class uo extends x.a{constructor(g){super();this.textModel=g,this.colorProvider=new io,this.onDidChangeEmitter=new B.b,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=g.getOptions().bracketPairColorizationOptions,this._register(g.onDidChangeOptions(u=>{this.colorizationOptions=g.getOptions().bracketPairColorizationOptions})),this._register(g.bracketPairs.onDidChange(u=>{this.onDidChangeEmitter.fire()}))}getDecorationsInRange(g,u,w){if(u===void 0)return[];if(!this.colorizationOptions.enabled)return[];const V=new Array,se=this.textModel.bracketPairs.getBracketsInRange(g);for(const pe of se)V.push({id:`bracket${pe.range.toString()}-${pe.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(pe)},ownerId:0,range:pe.range});return V}getAllDecorations(g,u){return g===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new L.a(1,1,this.textModel.getLineCount(),1),g,u):[]}}class io{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(g){return g.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(g.nestingLevel)}getInlineClassNameOfLevel(g){return`bracket-highlighting-${g%30}`}}Object(Xt.f)((g,u)=>{const w=[jt.c,jt.d,jt.e,jt.f,jt.g,jt.h],V=new io;u.addRule(`.monaco-editor .${V.unexpectedClosingBracketClassName} { color: ${g.getColor(jt.i)}; }`);let se=w.map(pe=>g.getColor(pe)).filter(pe=>!!pe).filter(pe=>!pe.isTransparent());for(let pe=0;pe<30;pe++){const Se=se[pe%se.length];u.addRule(`.monaco-editor .${V.getInlineClassNameOfLevel(pe)} { color: ${Se}; }`)}});var ho=t("WBhO"),mo=function(g,u,w,V){var se=arguments.length,pe=se<3?u:V===null?V=Object.getOwnPropertyDescriptor(u,w):V,Se;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")pe=Reflect.decorate(g,u,w,V);else for(var Qe=g.length-1;Qe>=0;Qe--)(Se=g[Qe])&&(pe=(se<3?Se(pe):se>3?Se(u,w,pe):Se(u,w))||pe);return se>3&&pe&&Object.defineProperty(u,w,pe),pe},Io=function(g,u){return function(w,V){u(w,V,g)}};function Ao(){return new Do}function Oo(g){const u=Ao();return u.acceptChunk(g),u.finish()}function Wo(g,u){const w=typeof g=="string"?Oo(g):g;return w.create(u)}let si=0;const hi=999,Uo=1e4;class mi{constructor(g){this._source=g,this._eos=!1}read(){if(this._eos)return null;let g=[],u=0,w=0;do{let V=this._source.read();if(V===null)return this._eos=!0,u===0?null:g.join("");if(V.length>0&&(g[u++]=V,w+=V.length),w>=64*1024)return g.join("")}while(!0)}}const Ri=()=>{throw new Error("Invalid change accessor")};class Di{constructor(){this._searchCanceledBrand=void 0}}Di.INSTANCE=new Di;function pi(g){return g instanceof Di?null:g}let Wi=class g extends x.a{constructor(u,w,V,se=null,pe,Se,Qe){super();this._undoRedoService=pe,this._modeService=Se,this._languageConfigurationService=Qe,this._onWillDispose=this._register(new B.b),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new ke(Ft=>this.handleBeforeFireDecorationsChangedEvent(Ft))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new B.b),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new B.b),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new B.b),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new B.b),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new B.b),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeContentOrInjectedText=this._register(new B.b),this.onDidChangeContentOrInjectedText=this._onDidChangeContentOrInjectedText.event,this._eventEmitter=this._register(new Je),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new B.b),this.onBackgroundTokenizationStateChanged=this._onBackgroundTokenizationStateChanged.event,this._register(this._eventEmitter.fastEvent(Ft=>{this._onDidChangeContentOrInjectedText.fire(Ft.rawContentChangedEvent)})),si++,this.id="$model"+si,this.isForSimpleWidget=w.isForSimpleWidget,typeof se=="undefined"||se===null?this._associatedResource=A.a.parse("inmemory://model/"+si):this._associatedResource=se,this._attachedEditorCount=0;const{textBuffer:ut,disposable:yt}=Wo(u,w.defaultEOL);this._buffer=ut,this._bufferDisposable=yt,this._options=g.resolveOptions(this._buffer,w);const Ct=this._buffer.getLineCount(),At=this._buffer.getValueLengthInRange(new L.a(1,1,Ct,this._buffer.getLineLength(Ct)+1),0);w.largeFileOptimizations?this._isTooLargeForTokenization=At>g.LARGE_FILE_SIZE_THRESHOLD||Ct>g.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=At>g.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageId=V||Ue.a,this._languageRegistryListener=this._languageConfigurationService.onDidChange(Ft=>{Ft.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})}),this._instanceId=N.P(si),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new Wn,this._commandManager=new d.a(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new Rt.d(this._modeService.languageIdCodec),this._tokens2=new Rt.e(this._modeService.languageIdCodec),this._tokenization=new qe(this,this._modeService.languageIdCodec),this._bracketPairColorizer=this._register(new P(this,this._languageConfigurationService)),this._decorationProvider=this._register(new uo(this)),this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))}static resolveOptions(u,w){if(w.detectIndentation){const V=r(u,w.tabSize,w.insertSpaces);return new m.h({tabSize:V.tabSize,indentSize:V.tabSize,insertSpaces:V.insertSpaces,trimAutoWhitespace:w.trimAutoWhitespace,defaultEOL:w.defaultEOL,bracketPairColorizationOptions:w.bracketPairColorizationOptions})}return new m.h({tabSize:w.tabSize,indentSize:w.indentSize,insertSpaces:w.insertSpaces,trimAutoWhitespace:w.trimAutoWhitespace,defaultEOL:w.defaultEOL,bracketPairColorizationOptions:w.bracketPairColorizationOptions})}onDidChangeContentFast(u){return this._eventEmitter.fastEvent(w=>u(w.contentChangedEvent))}onDidChangeContent(u){return this._eventEmitter.slowEvent(w=>u(w.contentChangedEvent))}get bracketPairs(){return this._bracketPairColorizer}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(u){if(this._backgroundTokenizationState===2)return;const w=u?2:1;this._backgroundTokenizationState!==w&&(this._backgroundTokenizationState=w,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 u=new Mo([],"",`
|
|
|
`,!1,!1,!0,!0);u.dispose(),this._buffer=u}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(u,w){if(this._bracketPairColorizer.handleContentChanged(w),this._isDisposing)return;this._eventEmitter.fire(new Lo.a(u,w))}setValue(u){if(this._assertNotDisposed(),u===null)return;const{textBuffer:w,disposable:V}=Wo(u,this._options.defaultEOL);this._setValueFromTextBuffer(w,V)}_createContentChanged2(u,w,V,se,pe,Se,Qe){return{changes:[{range:u,rangeOffset:w,rangeLength:V,text:se}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:pe,isRedoing:Se,isFlush:Qe}}_setValueFromTextBuffer(u,w){this._assertNotDisposed();const V=this.getFullModelRange(),se=this.getValueLengthInRange(V),pe=this.getLineCount(),Se=this.getLineMaxColumn(pe);this._buffer=u,this._bufferDisposable.dispose(),this._bufferDisposable=w,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new Wn,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Lo.d([new Lo.f],this._versionId,!1,!1),this._createContentChanged2(new L.a(1,1,pe,Se),0,se,this.getValue(),!1,!1,!0))}setEOL(u){this._assertNotDisposed();const w=u===1?`\r
|
|
|
`:`
|
|
|
`;if(this._buffer.getEOL()===w)return;const V=this.getFullModelRange(),se=this.getValueLengthInRange(V),pe=this.getLineCount(),Se=this.getLineMaxColumn(pe);this._onBeforeEOLChange(),this._buffer.setEOL(w),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Lo.d([new Lo.e],this._versionId,!1,!1),this._createContentChanged2(new L.a(1,1,pe,Se),0,se,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const u=this.getVersionId(),w=this._decorationsTree.collectNodesPostOrder();for(let V=0,se=w.length;V<se;V++){const pe=w[V],Se=pe.range,Qe=pe.cachedAbsoluteStart-pe.start,ut=this._buffer.getOffsetAt(Se.startLineNumber,Se.startColumn),yt=this._buffer.getOffsetAt(Se.endLineNumber,Se.endColumn);pe.cachedAbsoluteStart=ut,pe.cachedAbsoluteEnd=yt,pe.cachedVersionId=u,pe.start=ut-Qe,pe.end=yt-Qe,ze(pe)}}onBeforeAttached(){this._attachedEditorCount++,this._attachedEditorCount===1&&this._onDidChangeAttached.fire(void 0)}onBeforeDetached(){this._attachedEditorCount--,this._attachedEditorCount===0&&this._onDidChangeAttached.fire(void 0)}isAttachedToEditor(){return this._attachedEditorCount>0}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 u=0,w=0;const V=this._buffer.getLineCount();for(let se=1;se<=V;se++){const pe=this._buffer.getLineLength(se);pe>=Uo?w+=pe:u+=pe}return w>u}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(u){this._assertNotDisposed();let w=typeof u.tabSize!="undefined"?u.tabSize:this._options.tabSize,V=typeof u.indentSize!="undefined"?u.indentSize:this._options.indentSize,se=typeof u.insertSpaces!="undefined"?u.insertSpaces:this._options.insertSpaces,pe=typeof u.trimAutoWhitespace!="undefined"?u.trimAutoWhitespace:this._options.trimAutoWhitespace,Se=typeof u.bracketColorizationOptions!="undefined"?u.bracketColorizationOptions:this._options.bracketPairColorizationOptions,Qe=new m.h({tabSize:w,indentSize:V,insertSpaces:se,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:pe,bracketPairColorizationOptions:Se});if(this._options.equals(Qe))return;let ut=this._options.createChangeEvent(Qe);this._options=Qe,this._onDidChangeOptions.fire(ut)}detectIndentation(u,w){this._assertNotDisposed();let V=r(this._buffer,w,u);this.updateOptions({insertSpaces:V.insertSpaces,tabSize:V.tabSize,indentSize:V.tabSize})}static _normalizeIndentationFromWhitespace(u,w,V){let se=0;for(let Se=0;Se<u.length;Se++)u.charAt(Se)===" "?se+=w:se++;let pe="";if(!V){let Se=Math.floor(se/w);se=se%w;for(let Qe=0;Qe<Se;Qe++)pe+=" "}for(let Se=0;Se<se;Se++)pe+=" ";return pe}static normalizeIndentation(u,w,V){let se=N.u(u);return se===-1&&(se=u.length),g._normalizeIndentationFromWhitespace(u.substring(0,se),w,V)+u.substring(se)}normalizeIndentation(u){return this._assertNotDisposed(),g.normalizeIndentation(u,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(u=null){const w=this.findMatches(N.a.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(u,w.map(V=>({range:V.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(u){this._assertNotDisposed();let w=this._validatePosition(u.lineNumber,u.column,0);return this._buffer.getOffsetAt(w.lineNumber,w.column)}getPositionAt(u){this._assertNotDisposed();let w=Math.min(this._buffer.getLength(),Math.max(0,u));return this._buffer.getPositionAt(w)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(u){this._versionId=u}_overwriteAlternativeVersionId(u){this._alternativeVersionId=u}_overwriteInitialUndoRedoSnapshot(u){this._initialUndoRedoSnapshot=u}getValue(u,w=!1){this._assertNotDisposed();const V=this.getFullModelRange(),se=this.getValueInRange(V,u);return w?this._buffer.getBOM()+se:se}createSnapshot(u=!1){return new mi(this._buffer.createSnapshot(u))}getValueLength(u,w=!1){this._assertNotDisposed();const V=this.getFullModelRange(),se=this.getValueLengthInRange(V,u);return w?this._buffer.getBOM().length+se:se}getValueInRange(u,w=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(u),w)}getValueLengthInRange(u,w=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(u),w)}getCharacterCountInRange(u,w=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(u),w)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(u){if(this._assertNotDisposed(),u<1||u>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(u)}getLineLength(u){if(this._assertNotDisposed(),u<1||u>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(u)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===`
|
|
|
`?0:1}getLineMinColumn(u){return this._assertNotDisposed(),1}getLineMaxColumn(u){if(this._assertNotDisposed(),u<1||u>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(u)+1}getLineFirstNonWhitespaceColumn(u){if(this._assertNotDisposed(),u<1||u>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(u)}getLineLastNonWhitespaceColumn(u){if(this._assertNotDisposed(),u<1||u>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(u)}_validateRangeRelaxedNoAllocations(u){const w=this._buffer.getLineCount(),V=u.startLineNumber,se=u.startColumn;let pe=Math.floor(typeof V=="number"&&!isNaN(V)?V:1),Se=Math.floor(typeof se=="number"&&!isNaN(se)?se:1);if(pe<1)pe=1,Se=1;else if(pe>w)pe=w,Se=this.getLineMaxColumn(pe);else if(Se<=1)Se=1;else{const At=this.getLineMaxColumn(pe);Se>=At&&(Se=At)}const Qe=u.endLineNumber,ut=u.endColumn;let yt=Math.floor(typeof Qe=="number"&&!isNaN(Qe)?Qe:1),Ct=Math.floor(typeof ut=="number"&&!isNaN(ut)?ut:1);if(yt<1)yt=1,Ct=1;else if(yt>w)yt=w,Ct=this.getLineMaxColumn(yt);else if(Ct<=1)Ct=1;else{const At=this.getLineMaxColumn(yt);Ct>=At&&(Ct=At)}return V===pe&&se===Se&&Qe===yt&&ut===Ct&&u instanceof L.a&&!(u instanceof v.a)?u:new L.a(pe,Se,yt,Ct)}_isValidPosition(u,w,V){if(typeof u!="number"||typeof w!="number")return!1;if(isNaN(u)||isNaN(w))return!1;if(u<1||w<1)return!1;if((u|0)!==u||(w|0)!==w)return!1;const se=this._buffer.getLineCount();if(u>se)return!1;if(w===1)return!0;const pe=this.getLineMaxColumn(u);if(w>pe)return!1;if(V===1){const Se=this._buffer.getLineCharCode(u,w-2);if(N.E(Se))return!1}return!0}_validatePosition(u,w,V){const se=Math.floor(typeof u=="number"&&!isNaN(u)?u:1),pe=Math.floor(typeof w=="number"&&!isNaN(w)?w:1),Se=this._buffer.getLineCount();if(se<1)return new I.a(1,1);if(se>Se)return new I.a(Se,this.getLineMaxColumn(Se));if(pe<=1)return new I.a(se,1);const Qe=this.getLineMaxColumn(se);if(pe>=Qe)return new I.a(se,Qe);if(V===1){const ut=this._buffer.getLineCharCode(se,pe-2);if(N.E(ut))return new I.a(se,pe-1)}return new I.a(se,pe)}validatePosition(u){const w=1;return this._assertNotDisposed(),u instanceof I.a&&this._isValidPosition(u.lineNumber,u.column,w)?u:this._validatePosition(u.lineNumber,u.column,w)}_isValidRange(u,w){const V=u.startLineNumber,se=u.startColumn,pe=u.endLineNumber,Se=u.endColumn;if(!this._isValidPosition(V,se,0))return!1;if(!this._isValidPosition(pe,Se,0))return!1;if(w===1){const Qe=se>1?this._buffer.getLineCharCode(V,se-2):0,ut=Se>1&&Se<=this._buffer.getLineLength(pe)?this._buffer.getLineCharCode(pe,Se-2):0,yt=N.E(Qe),Ct=N.E(ut);return!yt&&!Ct}return!0}validateRange(u){const w=1;if(this._assertNotDisposed(),u instanceof L.a&&!(u instanceof v.a)&&this._isValidRange(u,w))return u;const V=this._validatePosition(u.startLineNumber,u.startColumn,0),se=this._validatePosition(u.endLineNumber,u.endColumn,0),pe=V.lineNumber,Se=V.column,Qe=se.lineNumber,ut=se.column;if(w===1){const yt=Se>1?this._buffer.getLineCharCode(pe,Se-2):0,Ct=ut>1&&ut<=this._buffer.getLineLength(Qe)?this._buffer.getLineCharCode(Qe,ut-2):0,At=N.E(yt),Ft=N.E(Ct);return!At&&!Ft?new L.a(pe,Se,Qe,ut):pe===Qe&&Se===ut?new L.a(pe,Se-1,Qe,ut-1):At&&Ft?new L.a(pe,Se-1,Qe,ut+1):At?new L.a(pe,Se-1,Qe,ut):new L.a(pe,Se,Qe,ut+1)}return new L.a(pe,Se,Qe,ut)}modifyPosition(u,w){this._assertNotDisposed();let V=this.getOffsetAt(u)+w;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,V)))}getFullModelRange(){this._assertNotDisposed();const u=this.getLineCount();return new L.a(1,1,u,this.getLineMaxColumn(u))}findMatchesLineByLine(u,w,V,se){return this._buffer.findMatchesLineByLine(u,w,V,se)}findMatches(u,w,V,se,pe,Se,Qe=hi){this._assertNotDisposed();let ut=null;w!==null&&(Array.isArray(w)||(w=[w]),w.every(At=>L.a.isIRange(At))&&(ut=w.map(At=>this.validateRange(At)))),ut===null&&(ut=[this.getFullModelRange()]),ut=ut.sort((At,Ft)=>At.startLineNumber-Ft.startLineNumber||At.startColumn-Ft.startColumn);const yt=[];yt.push(ut.reduce((At,Ft)=>L.a.areIntersecting(At,Ft)?At.plusRange(Ft):(yt.push(At),Ft)));let Ct;if(!V&&u.indexOf(`
|
|
|
`)<0){const At=new et.a(u,V,se,pe),Ft=At.parseSearchRequest();if(!Ft)return[];Ct=Zt=>this.findMatchesLineByLine(Zt,Ft,Se,Qe)}else Ct=At=>et.c.findMatches(this,new et.a(u,V,se,pe),At,Se,Qe);return yt.map(Ct).reduce((At,Ft)=>At.concat(Ft),[])}findNextMatch(u,w,V,se,pe,Se){this._assertNotDisposed();const Qe=this.validatePosition(w);if(!V&&u.indexOf(`
|
|
|
`)<0){const ut=new et.a(u,V,se,pe),yt=ut.parseSearchRequest();if(!yt)return null;const Ct=this.getLineCount();let At=new L.a(Qe.lineNumber,Qe.column,Ct,this.getLineMaxColumn(Ct)),Ft=this.findMatchesLineByLine(At,yt,Se,1);return et.c.findNextMatch(this,new et.a(u,V,se,pe),Qe,Se),Ft.length>0?Ft[0]:(At=new L.a(1,1,Qe.lineNumber,this.getLineMaxColumn(Qe.lineNumber)),Ft=this.findMatchesLineByLine(At,yt,Se,1),Ft.length>0?Ft[0]:null)}return et.c.findNextMatch(this,new et.a(u,V,se,pe),Qe,Se)}findPreviousMatch(u,w,V,se,pe,Se){this._assertNotDisposed();const Qe=this.validatePosition(w);return et.c.findPreviousMatch(this,new et.a(u,V,se,pe),Qe,Se)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(u){const w=this.getEOL()===`
|
|
|
`?0:1;if(w===u)return;try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(u)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(u){return u instanceof m.i?u:new m.i(u.identifier||null,this.validateRange(u.range),u.text,u.forceMoveMarkers||!1,u.isAutoWhitespaceEdit||!1,u._isTracked||!1)}_validateEditOperations(u){const w=[];for(let V=0,se=u.length;V<se;V++)w[V]=this._validateEditOperation(u[V]);return w}pushEditOperations(u,w,V){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(u,this._validateEditOperations(w),V)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(u,w,V){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){let se=w.map(Se=>({range:this.validateRange(Se.range),text:Se.text})),pe=!0;if(u)for(let Se=0,Qe=u.length;Se<Qe;Se++){let ut=u[Se],yt=!1;for(let Ct=0,At=se.length;Ct<At;Ct++){let Ft=se[Ct].range,Zt=Ft.startLineNumber>ut.endLineNumber,Yt=ut.startLineNumber>Ft.endLineNumber;if(!Zt&&!Yt){yt=!0;break}}if(!yt){pe=!1;break}}if(pe)for(let Se=0,Qe=this._trimAutoWhitespaceLines.length;Se<Qe;Se++){let ut=this._trimAutoWhitespaceLines[Se],yt=this.getLineMaxColumn(ut),Ct=!0;for(let At=0,Ft=se.length;At<Ft;At++){let Zt=se[At].range,Yt=se[At].text;if(ut<Zt.startLineNumber||ut>Zt.endLineNumber)continue;if(ut===Zt.startLineNumber&&Zt.startColumn===yt&&Zt.isEmpty()&&Yt&&Yt.length>0&&Yt.charAt(0)===`
|
|
|
`)continue;if(ut===Zt.startLineNumber&&Zt.startColumn===1&&Zt.isEmpty()&&Yt&&Yt.length>0&&Yt.charAt(Yt.length-1)===`
|
|
|
`)continue;Ct=!1;break}if(Ct){const At=new L.a(ut,1,ut,yt);w.push(new m.i(null,At,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(u,w,V)}_applyUndo(u,w,V,se){const pe=u.map(Se=>{const Qe=this.getPositionAt(Se.newPosition),ut=this.getPositionAt(Se.newEnd);return{range:new L.a(Qe.lineNumber,Qe.column,ut.lineNumber,ut.column),text:Se.oldText}});this._applyUndoRedoEdits(pe,w,!0,!1,V,se)}_applyRedo(u,w,V,se){const pe=u.map(Se=>{const Qe=this.getPositionAt(Se.oldPosition),ut=this.getPositionAt(Se.oldEnd);return{range:new L.a(Qe.lineNumber,Qe.column,ut.lineNumber,ut.column),text:Se.newText}});this._applyUndoRedoEdits(pe,w,!1,!0,V,se)}_applyUndoRedoEdits(u,w,V,se,pe,Se){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=V,this._isRedoing=se,this.applyEdits(u,!1),this.setEOL(w),this._overwriteAlternativeVersionId(pe)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(Se),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(u,w=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const V=this._validateEditOperations(u);return this._doApplyEdits(V,w)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(u,w){const V=this._buffer.getLineCount(),se=this._buffer.applyEdits(u,this._options.trimAutoWhitespace,w),pe=this._buffer.getLineCount(),Se=se.changes;if(this._trimAutoWhitespaceLines=se.trimAutoWhitespaceLineNumbers,Se.length!==0){for(let yt=0,Ct=Se.length;yt<Ct;yt++){const At=Se[yt],[Ft,Zt,Yt]=Object(Rt.f)(At.text);this._tokens.acceptEdit(At.range,Ft,Zt),this._tokens2.acceptEdit(At.range,Ft,Zt,Yt,At.text.length>0?At.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(At.rangeOffset,At.rangeLength,At.text.length,At.forceMoveMarkers)}let Qe=[];this._increaseVersionId();let ut=V;for(let yt=0,Ct=Se.length;yt<Ct;yt++){const At=Se[yt],[Ft]=Object(Rt.f)(At.text);this._onDidChangeDecorations.fire();const Zt=At.range.startLineNumber,Yt=At.range.endLineNumber,ao=Yt-Zt,Co=Ft,ko=Math.min(ao,Co),Qo=Co-ao,yi=pe-ut-Qo+Zt,Ko=yi,li=yi+Co,Ki=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new I.a(Ko,1)),this.getOffsetAt(new I.a(li,this.getLineMaxColumn(li))),0),xi=Lo.b.fromDecorations(Ki),Ni=new To.a(xi);for(let Ti=ko;Ti>=0;Ti--){const wn=Zt+Ti,yn=yi+Ti;Ni.takeFromEndWhile(Mn=>Mn.lineNumber>yn);const En=Ni.takeFromEndWhile(Mn=>Mn.lineNumber===yn);Qe.push(new Lo.g(wn,this.getLineContent(yn),En))}if(ko<ao){const Ti=Zt+ko;Qe.push(new Lo.h(Ti+1,Yt))}if(ko<Co){const Ti=new To.a(xi),wn=Zt+ko,yn=Co-ko,En=pe-ut-yn+wn+1;let Mn=[],Os=[];for(let Yn=0;Yn<yn;Yn++){let vs=En+Yn;Os[Yn]=this.getLineContent(vs),Ti.takeWhile(ns=>ns.lineNumber<vs),Mn[Yn]=Ti.takeWhile(ns=>ns.lineNumber===vs)}Qe.push(new Lo.i(wn+1,Zt+Co,Os,Mn))}ut+=Qo}this._emitContentChangedEvent(new Lo.d(Qe,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:Se,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return se.reverseEdits===null?void 0:se.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(u){if(u===null||u.size===0)return;const w=[...u],V=w.map(se=>new Lo.g(se,this.getLineContent(se),this._getInjectedTextInLine(se)));this._onDidChangeContentOrInjectedText.fire(new Lo.c(V))}changeDecorations(u,w=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(w,u)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(u,w){let V={addDecoration:(pe,Se)=>this._deltaDecorationsImpl(u,[],[{range:pe,options:Se}])[0],changeDecoration:(pe,Se)=>{this._changeDecorationImpl(pe,Se)},changeDecorationOptions:(pe,Se)=>{this._changeDecorationOptionsImpl(pe,ae(Se))},removeDecoration:pe=>{this._deltaDecorationsImpl(u,[pe],[])},deltaDecorations:(pe,Se)=>pe.length===0&&Se.length===0?[]:this._deltaDecorationsImpl(u,pe,Se)},se=null;try{se=w(V)}catch(pe){Object(f.f)(pe)}return V.addDecoration=Ri,V.changeDecoration=Ri,V.changeDecorationOptions=Ri,V.removeDecoration=Ri,V.deltaDecorations=Ri,se}deltaDecorations(u,w,V=0){if(this._assertNotDisposed(),u||(u=[]),u.length===0&&w.length===0)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(V,u,w)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(u){return this.getDecorationRange(u)}_setTrackedRange(u,w,V){const se=u?this._decorations[u]:null;if(!se)return w?this._deltaDecorationsImpl(0,[],[{range:w,options:Ne[V]}])[0]:null;if(!w)return this._decorationsTree.delete(se),delete this._decorations[se.id],null;const pe=this._validateRangeRelaxedNoAllocations(w),Se=this._buffer.getOffsetAt(pe.startLineNumber,pe.startColumn),Qe=this._buffer.getOffsetAt(pe.endLineNumber,pe.endColumn);return this._decorationsTree.delete(se),se.reset(this.getVersionId(),Se,Qe,pe),se.setOptions(Ne[V]),this._decorationsTree.insert(se),se.id}removeAllDecorationsWithOwnerId(u){if(this._isDisposed)return;const w=this._decorationsTree.collectNodesFromOwner(u);for(let V=0,se=w.length;V<se;V++){const pe=w[V];this._decorationsTree.delete(pe),delete this._decorations[pe.id]}}getDecorationOptions(u){const w=this._decorations[u];return w?w.options:null}getDecorationRange(u){const w=this._decorations[u];return w?this._decorationsTree.getNodeRange(this,w):null}getLineDecorations(u,w=0,V=!1){return u<1||u>this.getLineCount()?[]:this.getLinesDecorations(u,u,w,V)}getLinesDecorations(u,w,V=0,se=!1){let pe=this.getLineCount(),Se=Math.min(pe,Math.max(1,u)),Qe=Math.min(pe,Math.max(1,w)),ut=this.getLineMaxColumn(Qe);const yt=new L.a(Se,1,Qe,ut),Ct=this._getDecorationsInRange(yt,V,se);return Ct.push(...this._decorationProvider.getDecorationsInRange(yt,V,se)),Ct}getDecorationsInRange(u,w=0,V=!1){let se=this.validateRange(u);const pe=this._getDecorationsInRange(se,w,V);return pe.push(...this._decorationProvider.getDecorationsInRange(se,w,V)),pe}getOverviewRulerDecorations(u=0,w=!1){return this._decorationsTree.getAll(this,u,w,!0)}getInjectedTextDecorations(u=0){return this._decorationsTree.getAllInjectedText(this,u)}_getInjectedTextInLine(u){const w=this._buffer.getOffsetAt(u,1),V=w+this._buffer.getLineLength(u),se=this._decorationsTree.getInjectedTextInInterval(this,w,V,0);return Lo.b.fromDecorations(se).filter(pe=>pe.lineNumber===u)}getAllDecorations(u=0,w=!1){let V=this._decorationsTree.getAll(this,u,w,!1);return V=V.concat(this._decorationProvider.getAllDecorations(u,w)),V}_getDecorationsInRange(u,w,V){const se=this._buffer.getOffsetAt(u.startLineNumber,u.startColumn),pe=this._buffer.getOffsetAt(u.endLineNumber,u.endColumn);return this._decorationsTree.getAllInInterval(this,se,pe,w,V)}getRangeAt(u,w){return this._buffer.getRangeAt(u,w-u)}_changeDecorationImpl(u,w){const V=this._decorations[u];if(!V)return;if(V.options.after){const Qe=this.getDecorationRange(u);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Qe.endLineNumber)}if(V.options.before){const Qe=this.getDecorationRange(u);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Qe.startLineNumber)}const se=this._validateRangeRelaxedNoAllocations(w),pe=this._buffer.getOffsetAt(se.startLineNumber,se.startColumn),Se=this._buffer.getOffsetAt(se.endLineNumber,se.endColumn);this._decorationsTree.delete(V),V.reset(this.getVersionId(),pe,Se,se),this._decorationsTree.insert(V),this._onDidChangeDecorations.checkAffectedAndFire(V.options),V.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(se.endLineNumber),V.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(se.startLineNumber)}_changeDecorationOptionsImpl(u,w){const V=this._decorations[u];if(!V)return;const se=!!(V.options.overviewRuler&&V.options.overviewRuler.color),pe=!!(w.overviewRuler&&w.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(V.options),this._onDidChangeDecorations.checkAffectedAndFire(w),V.options.after||w.after){const Se=this._decorationsTree.getNodeRange(this,V);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Se.endLineNumber)}if(V.options.before||w.before){const Se=this._decorationsTree.getNodeRange(this,V);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Se.startLineNumber)}se!==pe?(this._decorationsTree.delete(V),V.setOptions(w),this._decorationsTree.insert(V)):V.setOptions(w)}_deltaDecorationsImpl(u,w,V){const se=this.getVersionId(),pe=w.length;let Se=0;const Qe=V.length;let ut=0,yt=new Array(Qe);for(;Se<pe||ut<Qe;){let Ct=null;if(Se<pe){do Ct=this._decorations[w[Se++]];while(!Ct&&Se<pe);if(Ct){if(Ct.options.after){const At=this._decorationsTree.getNodeRange(this,Ct);this._onDidChangeDecorations.recordLineAffectedByInjectedText(At.endLineNumber)}if(Ct.options.before){const At=this._decorationsTree.getNodeRange(this,Ct);this._onDidChangeDecorations.recordLineAffectedByInjectedText(At.startLineNumber)}this._decorationsTree.delete(Ct),this._onDidChangeDecorations.checkAffectedAndFire(Ct.options)}}if(ut<Qe){if(!Ct){const Co=++this._lastDecorationId,ko=`${this._instanceId};${Co}`;Ct=new Y(ko,0,0),this._decorations[ko]=Ct}const At=V[ut],Ft=this._validateRangeRelaxedNoAllocations(At.range),Zt=ae(At.options),Yt=this._buffer.getOffsetAt(Ft.startLineNumber,Ft.startColumn),ao=this._buffer.getOffsetAt(Ft.endLineNumber,Ft.endColumn);Ct.ownerId=u,Ct.reset(se,Yt,ao,Ft),Ct.setOptions(Zt),Ct.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ft.endLineNumber),Ct.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ft.startLineNumber),this._onDidChangeDecorations.checkAffectedAndFire(Zt),this._decorationsTree.insert(Ct),yt[ut]=Ct.id,ut++}else Ct&&delete this._decorations[Ct.id]}return yt}setTokens(u,w=!1){if(u.length!==0){let V=[];for(let se=0,pe=u.length;se<pe;se++){const Se=u[se];let Qe=0,ut=0,yt=!1;for(let Ct=0,At=Se.tokens.length;Ct<At;Ct++){const Ft=Se.startLineNumber+Ct;if(yt)this._tokens.setTokens(this._languageId,Ft-1,this._buffer.getLineLength(Ft),Se.tokens[Ct],!1),ut=Ft;else{const Zt=this._tokens.setTokens(this._languageId,Ft-1,this._buffer.getLineLength(Ft),Se.tokens[Ct],!0);Zt&&(yt=!0,Qe=Ft,ut=Ft)}}yt&&V.push({fromLineNumber:Qe,toLineNumber:ut})}V.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:V})}this.handleTokenizationProgress(w)}setSemanticTokens(u,w){this._tokens2.set(u,w),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:u!==null,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._tokens2.isComplete()}hasSomeSemanticTokens(){return!this._tokens2.isEmpty()}setPartialSemanticTokens(u,w){if(this.hasCompleteSemanticTokens())return;const V=this._tokens2.setPartial(u,w);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:V.startLineNumber,toLineNumber:V.endLineNumber}]})}tokenizeViewport(u,w){u=Math.max(1,u),w=Math.min(this._buffer.getLineCount(),w),this._tokenization.tokenizeViewport(u,w)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(u){this._isDisposing||this._onDidChangeTokens.fire(u)}resetTokenization(){this._tokenization.reset()}forceTokenization(u){if(u<1||u>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(u)}isCheapToTokenize(u){return this._tokenization.isCheapToTokenize(u)}tokenizeIfCheap(u){this.isCheapToTokenize(u)&&this.forceTokenization(u)}getLineTokens(u){if(u<1||u>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(u)}_getLineTokens(u){const w=this.getLineContent(u),V=this._tokens.getTokens(this._languageId,u-1,w);return this._tokens2.addSemanticTokens(u,V)}getLanguageId(){return this._languageId}setMode(u){if(this._languageId===u)return;let w={oldLanguage:this._languageId,newLanguage:u};this._languageId=u,this._onDidChangeLanguage.fire(w),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(u,w){const V=this.validatePosition(new I.a(u,w)),se=this.getLineTokens(V.lineNumber);return se.getLanguageId(se.findTokenIndexAtOffset(V.column-1))}getLanguageConfiguration(u){return this._languageConfigurationService.getLanguageConfiguration(u)}getWordAtPosition(u){this._assertNotDisposed();const w=this.validatePosition(u),V=this.getLineContent(w.lineNumber),se=this._getLineTokens(w.lineNumber),pe=se.findTokenIndexAtOffset(w.column-1),[Se,Qe]=g._findLanguageBoundaries(se,pe),ut=Object(Pt.d)(w.column,this.getLanguageConfiguration(se.getLanguageId(pe)).getWordDefinition(),V.substring(Se,Qe),Se);if(ut&&ut.startColumn<=u.column&&u.column<=ut.endColumn)return ut;if(pe>0&&Se===w.column-1){const[yt,Ct]=g._findLanguageBoundaries(se,pe-1),At=Object(Pt.d)(w.column,this.getLanguageConfiguration(se.getLanguageId(pe-1)).getWordDefinition(),V.substring(yt,Ct),yt);if(At&&At.startColumn<=u.column&&u.column<=At.endColumn)return At}return null}static _findLanguageBoundaries(u,w){const V=u.getLanguageId(w);let se=0;for(let Se=w;Se>=0&&u.getLanguageId(Se)===V;Se--)se=u.getStartOffset(Se);let pe=u.getLineContent().length;for(let Se=w,Qe=u.getCount();Se<Qe&&u.getLanguageId(Se)===V;Se++)pe=u.getEndOffset(Se);return[se,pe]}getWordUntilPosition(u){const w=this.getWordAtPosition(u);return w?{word:w.word.substr(0,u.column-w.startColumn),startColumn:w.startColumn,endColumn:u.column}:{word:"",startColumn:u.column,endColumn:u.column}}findMatchingBracketUp(u,w){let V=u.toLowerCase(),se=this.validatePosition(w),pe=this._getLineTokens(se.lineNumber),Se=pe.getLanguageId(pe.findTokenIndexAtOffset(se.column-1)),Qe=this.getLanguageConfiguration(Se).brackets;if(!Qe)return null;let ut=Qe.textIsBracket[V];return ut?pi(this._findMatchingBracketUp(ut,se,null)):null}matchBracket(u){return this._matchBracket(this.validatePosition(u))}_establishBracketSearchOffsets(u,w,V,se){const pe=w.getCount(),Se=w.getLanguageId(se);let Qe=Math.max(0,u.column-1-V.maxBracketLength);for(let yt=se-1;yt>=0;yt--){const Ct=w.getEndOffset(yt);if(Ct<=Qe)break;if(Object(Vt.b)(w.getStandardTokenType(yt))||w.getLanguageId(yt)!==Se){Qe=Ct;break}}let ut=Math.min(w.getLineContent().length,u.column-1+V.maxBracketLength);for(let yt=se+1;yt<pe;yt++){const Ct=w.getStartOffset(yt);if(Ct>=ut)break;if(Object(Vt.b)(w.getStandardTokenType(yt))||w.getLanguageId(yt)!==Se){ut=Ct;break}}return{searchStartOffset:Qe,searchEndOffset:ut}}_matchBracket(u){const w=u.lineNumber,V=this._getLineTokens(w),se=this._buffer.getLineContent(w),pe=V.findTokenIndexAtOffset(u.column-1);if(pe<0)return null;const Se=this.getLanguageConfiguration(V.getLanguageId(pe)).brackets;if(Se&&!Object(Vt.b)(V.getStandardTokenType(pe))){let{searchStartOffset:Qe,searchEndOffset:ut}=this._establishBracketSearchOffsets(u,V,Se,pe),yt=null;for(;;){const Ct=so.a.findNextBracketInRange(Se.forwardRegex,w,se,Qe,ut);if(!Ct)break;if(Ct.startColumn<=u.column&&u.column<=Ct.endColumn){const At=se.substring(Ct.startColumn-1,Ct.endColumn-1).toLowerCase(),Ft=this._matchFoundBracket(Ct,Se.textIsBracket[At],Se.textIsOpenBracket[At],null);if(Ft){if(Ft instanceof Di)return null;yt=Ft}}Qe=Ct.endColumn-1}if(yt)return yt}if(pe>0&&V.getStartOffset(pe)===u.column-1){const Qe=pe-1,ut=this.getLanguageConfiguration(V.getLanguageId(Qe)).brackets;if(ut&&!Object(Vt.b)(V.getStandardTokenType(Qe))){let{searchStartOffset:yt,searchEndOffset:Ct}=this._establishBracketSearchOffsets(u,V,ut,Qe);const At=so.a.findPrevBracketInRange(ut.reversedRegex,w,se,yt,Ct);if(At&&At.startColumn<=u.column&&u.column<=At.endColumn){const Ft=se.substring(At.startColumn-1,At.endColumn-1).toLowerCase(),Zt=this._matchFoundBracket(At,ut.textIsBracket[Ft],ut.textIsOpenBracket[Ft],null);if(Zt)return Zt instanceof Di?null:Zt}}}return null}_matchFoundBracket(u,w,V,se){if(!w)return null;const pe=V?this._findMatchingBracketDown(w,u.getEndPosition(),se):this._findMatchingBracketUp(w,u.getStartPosition(),se);return pe?pe instanceof Di?pe:[u,pe]:null}_findMatchingBracketUp(u,w,V){const se=u.languageId,pe=u.reversedRegex;let Se=-1,Qe=0;const ut=(yt,Ct,At,Ft)=>{for(;;){if(V&&++Qe%100===0&&!V())return Di.INSTANCE;const Zt=so.a.findPrevBracketInRange(pe,yt,Ct,At,Ft);if(!Zt)break;const Yt=Ct.substring(Zt.startColumn-1,Zt.endColumn-1).toLowerCase();if(u.isOpen(Yt)?Se++:u.isClose(Yt)&&Se--,Se===0)return Zt;Ft=Zt.startColumn-1}return null};for(let yt=w.lineNumber;yt>=1;yt--){const Ct=this._getLineTokens(yt),At=Ct.getCount(),Ft=this._buffer.getLineContent(yt);let Zt=At-1,Yt=Ft.length,ao=Ft.length;yt===w.lineNumber&&(Zt=Ct.findTokenIndexAtOffset(w.column-1),Yt=w.column-1,ao=w.column-1);let Co=!0;for(;Zt>=0;Zt--){const ko=Ct.getLanguageId(Zt)===se&&!Object(Vt.b)(Ct.getStandardTokenType(Zt));if(ko)Co?Yt=Ct.getStartOffset(Zt):(Yt=Ct.getStartOffset(Zt),ao=Ct.getEndOffset(Zt));else if(Co&&Yt!==ao){const Qo=ut(yt,Ft,Yt,ao);if(Qo)return Qo}Co=ko}if(Co&&Yt!==ao){const ko=ut(yt,Ft,Yt,ao);if(ko)return ko}}return null}_findMatchingBracketDown(u,w,V){const se=u.languageId,pe=u.forwardRegex;let Se=1,Qe=0;const ut=(Ct,At,Ft,Zt)=>{for(;;){if(V&&++Qe%100===0&&!V())return Di.INSTANCE;const Yt=so.a.findNextBracketInRange(pe,Ct,At,Ft,Zt);if(!Yt)break;const ao=At.substring(Yt.startColumn-1,Yt.endColumn-1).toLowerCase();if(u.isOpen(ao)?Se++:u.isClose(ao)&&Se--,Se===0)return Yt;Ft=Yt.endColumn-1}return null},yt=this.getLineCount();for(let Ct=w.lineNumber;Ct<=yt;Ct++){const At=this._getLineTokens(Ct),Ft=At.getCount(),Zt=this._buffer.getLineContent(Ct);let Yt=0,ao=0,Co=0;Ct===w.lineNumber&&(Yt=At.findTokenIndexAtOffset(w.column-1),ao=w.column-1,Co=w.column-1);let ko=!0;for(;Yt<Ft;Yt++){const Qo=At.getLanguageId(Yt)===se&&!Object(Vt.b)(At.getStandardTokenType(Yt));if(Qo)ko||(ao=At.getStartOffset(Yt)),Co=At.getEndOffset(Yt);else if(ko&&ao!==Co){const yi=ut(Ct,Zt,ao,Co);if(yi)return yi}ko=Qo}if(ko&&ao!==Co){const Qo=ut(Ct,Zt,ao,Co);if(Qo)return Qo}}return null}findPrevBracket(u){const w=this.validatePosition(u);let V=null,se=null;for(let pe=w.lineNumber;pe>=1;pe--){const Se=this._getLineTokens(pe),Qe=Se.getCount(),ut=this._buffer.getLineContent(pe);let yt=Qe-1,Ct=ut.length,At=ut.length;if(pe===w.lineNumber){yt=Se.findTokenIndexAtOffset(w.column-1),Ct=w.column-1,At=w.column-1;const Zt=Se.getLanguageId(yt);V!==Zt&&(V=Zt,se=this.getLanguageConfiguration(V).brackets)}let Ft=!0;for(;yt>=0;yt--){const Zt=Se.getLanguageId(yt);if(V!==Zt){if(se&&Ft&&Ct!==At){const ao=so.a.findPrevBracketInRange(se.reversedRegex,pe,ut,Ct,At);if(ao)return this._toFoundBracket(se,ao);Ft=!1}V=Zt,se=this.getLanguageConfiguration(V).brackets}const Yt=!!se&&!Object(Vt.b)(Se.getStandardTokenType(yt));if(Yt)Ft?Ct=Se.getStartOffset(yt):(Ct=Se.getStartOffset(yt),At=Se.getEndOffset(yt));else if(se&&Ft&&Ct!==At){const ao=so.a.findPrevBracketInRange(se.reversedRegex,pe,ut,Ct,At);if(ao)return this._toFoundBracket(se,ao)}Ft=Yt}if(se&&Ft&&Ct!==At){const Zt=so.a.findPrevBracketInRange(se.reversedRegex,pe,ut,Ct,At);if(Zt)return this._toFoundBracket(se,Zt)}}return null}findNextBracket(u){const w=this.validatePosition(u),V=this.getLineCount();let se=null,pe=null;for(let Se=w.lineNumber;Se<=V;Se++){const Qe=this._getLineTokens(Se),ut=Qe.getCount(),yt=this._buffer.getLineContent(Se);let Ct=0,At=0,Ft=0;if(Se===w.lineNumber){Ct=Qe.findTokenIndexAtOffset(w.column-1),At=w.column-1,Ft=w.column-1;const Yt=Qe.getLanguageId(Ct);se!==Yt&&(se=Yt,pe=this.getLanguageConfiguration(se).brackets)}let Zt=!0;for(;Ct<ut;Ct++){const Yt=Qe.getLanguageId(Ct);if(se!==Yt){if(pe&&Zt&&At!==Ft){const Co=so.a.findNextBracketInRange(pe.forwardRegex,Se,yt,At,Ft);if(Co)return this._toFoundBracket(pe,Co);Zt=!1}se=Yt,pe=this.getLanguageConfiguration(se).brackets}const ao=!!pe&&!Object(Vt.b)(Qe.getStandardTokenType(Ct));if(ao)Zt||(At=Qe.getStartOffset(Ct)),Ft=Qe.getEndOffset(Ct);else if(pe&&Zt&&At!==Ft){const Co=so.a.findNextBracketInRange(pe.forwardRegex,Se,yt,At,Ft);if(Co)return this._toFoundBracket(pe,Co)}Zt=ao}if(pe&&Zt&&At!==Ft){const Yt=so.a.findNextBracketInRange(pe.forwardRegex,Se,yt,At,Ft);if(Yt)return this._toFoundBracket(pe,Yt)}}return null}findEnclosingBrackets(u,w){let V;if(typeof w=="undefined")V=null;else{const Zt=Date.now();V=()=>Date.now()-Zt<=w}const se=this.validatePosition(u),pe=this.getLineCount(),Se=new Map;let Qe=[];const ut=(Zt,Yt)=>{if(!Se.has(Zt)){let ao=[];for(let Co=0,ko=Yt?Yt.brackets.length:0;Co<ko;Co++)ao[Co]=0;Se.set(Zt,ao)}Qe=Se.get(Zt)};let yt=0;const Ct=(Zt,Yt,ao,Co,ko)=>{for(;;){if(V&&++yt%100===0&&!V())return Di.INSTANCE;const Qo=so.a.findNextBracketInRange(Zt.forwardRegex,Yt,ao,Co,ko);if(!Qo)break;const yi=ao.substring(Qo.startColumn-1,Qo.endColumn-1).toLowerCase(),Ko=Zt.textIsBracket[yi];if(Ko&&(Ko.isOpen(yi)?Qe[Ko.index]++:Ko.isClose(yi)&&Qe[Ko.index]--,Qe[Ko.index]===-1))return this._matchFoundBracket(Qo,Ko,!1,V);Co=Qo.endColumn-1}return null};let At=null,Ft=null;for(let Zt=se.lineNumber;Zt<=pe;Zt++){const Yt=this._getLineTokens(Zt),ao=Yt.getCount(),Co=this._buffer.getLineContent(Zt);let ko=0,Qo=0,yi=0;if(Zt===se.lineNumber){ko=Yt.findTokenIndexAtOffset(se.column-1),Qo=se.column-1,yi=se.column-1;const li=Yt.getLanguageId(ko);At!==li&&(At=li,Ft=this.getLanguageConfiguration(At).brackets,ut(At,Ft))}let Ko=!0;for(;ko<ao;ko++){const li=Yt.getLanguageId(ko);if(At!==li){if(Ft&&Ko&&Qo!==yi){const xi=Ct(Ft,Zt,Co,Qo,yi);if(xi)return pi(xi);Ko=!1}At=li,Ft=this.getLanguageConfiguration(At).brackets,ut(At,Ft)}const Ki=!!Ft&&!Object(Vt.b)(Yt.getStandardTokenType(ko));if(Ki)Ko||(Qo=Yt.getStartOffset(ko)),yi=Yt.getEndOffset(ko);else if(Ft&&Ko&&Qo!==yi){const xi=Ct(Ft,Zt,Co,Qo,yi);if(xi)return pi(xi)}Ko=Ki}if(Ft&&Ko&&Qo!==yi){const li=Ct(Ft,Zt,Co,Qo,yi);if(li)return pi(li)}}return null}_toFoundBracket(u,w){if(!w)return null;let V=this.getValueInRange(w);V=V.toLowerCase();let se=u.textIsBracket[V];return se?{range:w,open:se.open,close:se.close,isOpen:u.textIsOpenBracket[V]}:null}static computeIndentLevel(u,w){let V=0,se=0,pe=u.length;for(;se<pe;){let Se=u.charCodeAt(se);if(Se===32)V++;else if(Se===9)V=V-V%w+w;else break;se++}return se===pe?-1:V}_computeIndentLevel(u){return g.computeIndentLevel(this._buffer.getLineContent(u+1),this._options.tabSize)}getActiveIndentGuide(u,w,V){this._assertNotDisposed();const se=this.getLineCount();if(u<1||u>se)throw new Error("Illegal value for lineNumber");const pe=this.getLanguageConfiguration(this._languageId).foldingRules,Se=Boolean(pe&&pe.offSide);let Qe=-2,ut=-1,yt=-2,Ct=-1;const At=xi=>{if(Qe!==-1&&(Qe===-2||Qe>xi-1)){Qe=-1,ut=-1;for(let Ni=xi-2;Ni>=0;Ni--){let Ti=this._computeIndentLevel(Ni);if(Ti>=0){Qe=Ni,ut=Ti;break}}}if(yt===-2){yt=-1,Ct=-1;for(let Ni=xi;Ni<se;Ni++){let Ti=this._computeIndentLevel(Ni);if(Ti>=0){yt=Ni,Ct=Ti;break}}}};let Ft=-2,Zt=-1,Yt=-2,ao=-1;const Co=xi=>{if(Ft===-2){Ft=-1,Zt=-1;for(let Ni=xi-2;Ni>=0;Ni--){let Ti=this._computeIndentLevel(Ni);if(Ti>=0){Ft=Ni,Zt=Ti;break}}}if(Yt!==-1&&(Yt===-2||Yt<xi-1)){Yt=-1,ao=-1;for(let Ni=xi;Ni<se;Ni++){let Ti=this._computeIndentLevel(Ni);if(Ti>=0){Yt=Ni,ao=Ti;break}}}};let ko=0,Qo=!0,yi=0,Ko=!0,li=0,Ki=0;for(let xi=0;Qo||Ko;xi++){const Ni=u-xi,Ti=u+xi;xi>1&&(Ni<1||Ni<w)&&(Qo=!1),xi>1&&(Ti>se||Ti>V)&&(Ko=!1),xi>5e4&&(Qo=!1,Ko=!1);let wn=-1;if(Qo){const En=this._computeIndentLevel(Ni-1);En>=0?(yt=Ni-1,Ct=En,wn=Math.ceil(En/this._options.indentSize)):(At(Ni),wn=this._getIndentLevelForWhitespaceLine(Se,ut,Ct))}let yn=-1;if(Ko){const En=this._computeIndentLevel(Ti-1);En>=0?(Ft=Ti-1,Zt=En,yn=Math.ceil(En/this._options.indentSize)):(Co(Ti),yn=this._getIndentLevelForWhitespaceLine(Se,Zt,ao))}if(xi===0){Ki=wn;continue}if(xi===1){if(Ti<=se&&yn>=0&&Ki+1===yn){Qo=!1,ko=Ti,yi=Ti,li=yn;continue}if(Ni>=1&&wn>=0&&wn-1===Ki){Ko=!1,ko=Ni,yi=Ni,li=wn;continue}if(ko=u,yi=u,li=Ki,li===0)return{startLineNumber:ko,endLineNumber:yi,indent:li}}Qo&&(wn>=li?ko=Ni:Qo=!1),Ko&&(yn>=li?yi=Ti:Ko=!1)}return{startLineNumber:ko,endLineNumber:yi,indent:li}}getLinesBracketGuides(u,w,V,se){var pe,Se,Qe,ut,yt;const Ct=[],At=this._bracketPairColorizer.getBracketPairsInRangeWithMinIndentation(new L.a(u,1,w,this.getLineMaxColumn(w)));let Ft;if(V&&At.length>0){const ko=u<=V.lineNumber&&V.lineNumber<=w?At.filter(Qo=>Qo.range.containsPosition(V)):this._bracketPairColorizer.getBracketPairsInRange(L.a.fromPositions(V));Ft=(pe=Object(To.i)(ko,Qo=>Qo.range.startLineNumber!==Qo.range.endLineNumber))===null||pe===void 0?void 0:pe.range}const Zt=new To.a(At),Yt=new Array,ao=new Array,Co=new In;for(let ko=u;ko<=w;ko++){let Qo=new Array;ao.length>0&&(Qo=Qo.concat(ao),ao.length=0),Ct.push(Qo);for(const Ko of Zt.takeWhile(li=>li.openingBracketRange.startLineNumber<=ko)||[]){if(Ko.range.startLineNumber===Ko.range.endLineNumber)continue;const li=Math.min(this.getVisibleColumnFromPosition(Ko.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition((Qe=(Se=Ko.closingBracketRange)===null||Se===void 0?void 0:Se.getStartPosition())!==null&&Qe!==void 0?Qe:Ko.range.getEndPosition()),Ko.minVisibleColumnIndentation+1);let Ki=!1;if(Ko.closingBracketRange){const Ti=N.u(this.getLineContent(Ko.closingBracketRange.startLineNumber));Ti<Ko.closingBracketRange.startColumn-1&&(Ki=!0)}const xi=Ko.openingBracketRange.getStartPosition(),Ni=(yt=(ut=Ko.closingBracketRange)===null||ut===void 0?void 0:ut.getStartPosition())!==null&&yt!==void 0?yt:Ko.range.getEndPosition();Ko.closingBracketRange===void 0?Yt[Ko.nestingLevel]=null:Yt[Ko.nestingLevel]={nestingLevel:Ko.nestingLevel,guideVisibleColumn:li,start:xi,visibleStartColumn:this.getVisibleColumnFromPosition(xi),end:Ni,visibleEndColumn:this.getVisibleColumnFromPosition(Ni),bracketPair:Ko,renderHorizontalEndLineAtTheBottom:Ki}}for(const Ko of Yt){if(!Ko)continue;const li=Ft&&Ko.bracketPair.range.equalsRange(Ft),Ki=Co.getInlineClassNameOfLevel(Ko.nestingLevel)+(se.highlightActive&&li?" "+Co.activeClassName:"");(li&&se.horizontalGuides!==m.c.Disabled||se.includeInactive&&se.horizontalGuides===m.c.Enabled)&&(Ko.start.lineNumber===ko&&(Ko.guideVisibleColumn<Ko.visibleStartColumn&&Qo.push(new m.d(Ko.guideVisibleColumn,Ki,new m.e(!1,Ko.start.column)))),Ko.end.lineNumber===ko+1&&(Ko.guideVisibleColumn<Ko.visibleEndColumn&&ao.push(new m.d(Ko.guideVisibleColumn,Ki,new m.e(!Ko.renderHorizontalEndLineAtTheBottom,Ko.end.column)))))}let yi=Number.MAX_SAFE_INTEGER;for(let Ko=Yt.length-1;Ko>=0;Ko--){const li=Yt[Ko];if(!li)continue;const Ki=se.highlightActive&&Ft&&li.bracketPair.range.equalsRange(Ft),xi=Co.getInlineClassNameOfLevel(li.nestingLevel)+(Ki?" "+Co.activeClassName:"");if((Ki||se.includeInactive)&&(li.renderHorizontalEndLineAtTheBottom&&li.end.lineNumber===ko+1&&ao.push(new m.d(li.guideVisibleColumn,xi,null))),li.end.lineNumber<=ko||li.start.lineNumber>=ko)continue;if(li.guideVisibleColumn>=yi&&!Ki)continue;yi=li.guideVisibleColumn,(Ki||se.includeInactive)&&Qo.push(new m.d(li.guideVisibleColumn,xi,null))}Qo.sort((Ko,li)=>Ko.visibleColumn-li.visibleColumn)}return Ct}getVisibleColumnFromPosition(u){return Zi.a.visibleColumnFromColumn(this.getLineContent(u.lineNumber),u.column,this._options.tabSize)+1}getLinesIndentGuides(u,w){this._assertNotDisposed();const V=this.getLineCount();if(u<1||u>V)throw new Error("Illegal value for startLineNumber");if(w<1||w>V)throw new Error("Illegal value for endLineNumber");const se=this.getLanguageConfiguration(this._languageId).foldingRules,pe=Boolean(se&&se.offSide);let Se=new Array(w-u+1),Qe=-2,ut=-1,yt=-2,Ct=-1;for(let At=u;At<=w;At++){let Ft=At-u;const Zt=this._computeIndentLevel(At-1);if(Zt>=0){Qe=At-1,ut=Zt,Se[Ft]=Math.ceil(Zt/this._options.indentSize);continue}if(Qe===-2){Qe=-1,ut=-1;for(let Yt=At-2;Yt>=0;Yt--){let ao=this._computeIndentLevel(Yt);if(ao>=0){Qe=Yt,ut=ao;break}}}if(yt!==-1&&(yt===-2||yt<At-1)){yt=-1,Ct=-1;for(let Yt=At;Yt<V;Yt++){let ao=this._computeIndentLevel(Yt);if(ao>=0){yt=Yt,Ct=ao;break}}}Se[Ft]=this._getIndentLevelForWhitespaceLine(pe,ut,Ct)}return Se}_getIndentLevelForWhitespaceLine(u,w,V){return w===-1||V===-1?0:w<V?1+Math.floor(w/this._options.indentSize):w===V?Math.ceil(V/this._options.indentSize):u?Math.ceil(V/this._options.indentSize):1+Math.floor(V/this._options.indentSize)}normalizePosition(u,w){return u}getLineIndentColumn(u){return fn(this.getLineContent(u))+1}};Wi.MODEL_SYNC_LIMIT=50*1024*1024,Wi.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,Wi.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,Wi.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:F.d.tabSize,indentSize:F.d.indentSize,insertSpaces:F.d.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:F.d.trimAutoWhitespace,largeFileOptimizations:F.d.largeFileOptimizations,bracketPairColorizationOptions:F.d.bracketPairColorizationOptions},Wi=mo([Io(4,No.a),Io(5,ho.a),Io(6,Wt.a)],Wi);function fn(g){let u=0;for(const w of g)if(w===" "||w===" ")u++;else break;return u}class In{constructor(){this.activeClassName="indent-active"}getInlineClassNameOfLevel(g){return`bracket-indent-guide lvl-${g%30}`}}function an(g){return!!(g.options.overviewRuler&&g.options.overviewRuler.color)}function bn(g){return!!g.options.after||!!g.options.before}class Wn{constructor(){this._decorationsTree0=new H,this._decorationsTree1=new H,this._injectedTextDecorationsTree=new H}ensureAllNodesHaveRanges(g){this.getAll(g,0,!1,!1)}_ensureNodesHaveRanges(g,u){for(const w of u)w.range===null&&(w.range=g.getRangeAt(w.cachedAbsoluteStart,w.cachedAbsoluteEnd));return u}getAllInInterval(g,u,w,V,se){const pe=g.getVersionId(),Se=this._intervalSearch(u,w,V,se,pe);return this._ensureNodesHaveRanges(g,Se)}_intervalSearch(g,u,w,V,se){const pe=this._decorationsTree0.intervalSearch(g,u,w,V,se),Se=this._decorationsTree1.intervalSearch(g,u,w,V,se),Qe=this._injectedTextDecorationsTree.intervalSearch(g,u,w,V,se);return pe.concat(Se).concat(Qe)}getInjectedTextInInterval(g,u,w,V){const se=g.getVersionId(),pe=this._injectedTextDecorationsTree.intervalSearch(u,w,V,!1,se);return this._ensureNodesHaveRanges(g,pe).filter(Se=>Se.options.showIfCollapsed||!Se.range.isEmpty())}getAllInjectedText(g,u){const w=g.getVersionId(),V=this._injectedTextDecorationsTree.search(u,!1,w);return this._ensureNodesHaveRanges(g,V).filter(se=>se.options.showIfCollapsed||!se.range.isEmpty())}getAll(g,u,w,V){const se=g.getVersionId(),pe=this._search(u,w,V,se);return this._ensureNodesHaveRanges(g,pe)}_search(g,u,w,V){if(w)return this._decorationsTree1.search(g,u,V);{const se=this._decorationsTree0.search(g,u,V),pe=this._decorationsTree1.search(g,u,V),Se=this._injectedTextDecorationsTree.search(g,u,V);return se.concat(pe).concat(Se)}}collectNodesFromOwner(g){const u=this._decorationsTree0.collectNodesFromOwner(g),w=this._decorationsTree1.collectNodesFromOwner(g),V=this._injectedTextDecorationsTree.collectNodesFromOwner(g);return u.concat(w).concat(V)}collectNodesPostOrder(){const g=this._decorationsTree0.collectNodesPostOrder(),u=this._decorationsTree1.collectNodesPostOrder(),w=this._injectedTextDecorationsTree.collectNodesPostOrder();return g.concat(u).concat(w)}insert(g){bn(g)?this._injectedTextDecorationsTree.insert(g):an(g)?this._decorationsTree1.insert(g):this._decorationsTree0.insert(g)}delete(g){bn(g)?this._injectedTextDecorationsTree.delete(g):an(g)?this._decorationsTree1.delete(g):this._decorationsTree0.delete(g)}getNodeRange(g,u){const w=g.getVersionId();return u.cachedVersionId!==w&&this._resolveNode(u,w),u.range===null&&(u.range=g.getRangeAt(u.cachedAbsoluteStart,u.cachedAbsoluteEnd)),u.range}_resolveNode(g,u){bn(g)?this._injectedTextDecorationsTree.resolveNode(g,u):an(g)?this._decorationsTree1.resolveNode(g,u):this._decorationsTree0.resolveNode(g,u)}acceptReplace(g,u,w,V){this._decorationsTree0.acceptReplace(g,u,w,V),this._decorationsTree1.acceptReplace(g,u,w,V),this._injectedTextDecorationsTree.acceptReplace(g,u,w,V)}}function gn(g){return g.replace(/[^a-z0-9\-_]/gi," ")}class $n{constructor(g){this.color=g.color||"",this.darkColor=g.darkColor||""}}class Un extends $n{constructor(g){super(g);this._resolvedColor=null,this.position=typeof g.position=="number"?g.position:m.g.Center}getColor(g){return this._resolvedColor||(g.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,g):this._resolvedColor=this._resolveColor(this.color,g)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(g,u){if(typeof g=="string")return g;let w=g?u.getColor(g.id):null;return w?w.toString():""}}class qo extends $n{constructor(g){super(g);this.position=g.position}getColor(g){return this._resolvedColor||(g.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,g):this._resolvedColor=this._resolveColor(this.color,g)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(g,u){return typeof g=="string"?wo.a.fromHex(g):u.getColor(g.id)}}class oo{constructor(g){this.content=g.content||"",this.inlineClassName=g.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=g.inlineClassNameAffectsLetterSpacing||!1}static from(g){return g instanceof oo?g:new oo(g)}}class So{constructor(g){this.description=g.description,this.stickiness=g.stickiness||0,this.zIndex=g.zIndex||0,this.className=g.className?gn(g.className):null,this.hoverMessage=g.hoverMessage||null,this.glyphMarginHoverMessage=g.glyphMarginHoverMessage||null,this.isWholeLine=g.isWholeLine||!1,this.showIfCollapsed=g.showIfCollapsed||!1,this.collapseOnReplaceEdit=g.collapseOnReplaceEdit||!1,this.overviewRuler=g.overviewRuler?new Un(g.overviewRuler):null,this.minimap=g.minimap?new qo(g.minimap):null,this.glyphMarginClassName=g.glyphMarginClassName?gn(g.glyphMarginClassName):null,this.linesDecorationsClassName=g.linesDecorationsClassName?gn(g.linesDecorationsClassName):null,this.firstLineDecorationClassName=g.firstLineDecorationClassName?gn(g.firstLineDecorationClassName):null,this.marginClassName=g.marginClassName?gn(g.marginClassName):null,this.inlineClassName=g.inlineClassName?gn(g.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=g.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=g.beforeContentClassName?gn(g.beforeContentClassName):null,this.afterContentClassName=g.afterContentClassName?gn(g.afterContentClassName):null,this.after=g.after?oo.from(g.after):null,this.before=g.before?oo.from(g.before):null}static register(g){return new So(g)}static createDynamic(g){return new So(g)}}So.EMPTY=So.register({description:"empty"});const Ne=[So.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),So.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),So.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),So.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function ae(g){return g instanceof So?g:So.createDynamic(g)}class ke extends x.a{constructor(g){super();this.handleBeforeFire=g,this._actual=this._register(new B.b),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 g;if(this._deferredCnt--,this._deferredCnt===0){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const u={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(u)}(g=this._affectedInjectedTextLines)===null||g===void 0||g.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(g){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(g)}checkAffectedAndFire(g){this._affectsMinimap||(this._affectsMinimap=!!(g.minimap&&g.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(g.overviewRuler&&g.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class Je extends x.a{constructor(){super();this._fastEmitter=this._register(new B.b),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new B.b),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(g=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=g;const u=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(u),this._slowEmitter.fire(u)}}fire(g){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(g):this._deferredEvent=g;return}this._fastEmitter.fire(g),this._slowEmitter.fire(g)}}},tXSY:function(mt,M,t){"use strict";t.r(M),t.d(M,"SnippetController2",function(){return r});var f=t("pmY6"),B=t("sswD"),x=t("aokT"),N=t("gCVg"),A=t("wQH0"),F=t("QVNv"),I=t("3/fG"),L=t("T8No"),v=t("09fa"),m=t("WaSP"),d=function(b,h,c,p){var E=arguments.length,y=E<3?h:p===null?p=Object.getOwnPropertyDescriptor(h,c):p,C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(b,h,c,p);else for(var O=b.length-1;O>=0;O--)(C=b[O])&&(y=(E<3?C(y):E>3?C(h,c,y):C(h,c))||y);return E>3&&y&&Object.defineProperty(h,c,y),y},D=function(b,h){return function(c,p){h(c,p,b)}};const S={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let r=class b{constructor(h,c,p){this._editor=h,this._logService=c,this._snippetListener=new f.b,this._modelVersionId=-1,this._inSnippet=b.InSnippetMode.bindTo(p),this._hasNextTabstop=b.HasNextTabstop.bindTo(p),this._hasPrevTabstop=b.HasPrevTabstop.bindTo(p)}static get(h){return h.getContribution(b.ID)}dispose(){var h;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(h=this._session)===null||h===void 0||h.dispose(),this._snippetListener.dispose()}insert(h,c){try{this._doInsert(h,typeof c=="undefined"?S:Object.assign(Object.assign({},S),c))}catch(p){this.cancel(),this._logService.error(p),this._logService.error("snippet_error"),this._logService.error("insert_template=",h),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(h,c){if(!this._editor.hasModel())return;this._snippetListener.clear(),c.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(h,c):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new m.a(this._editor,h,c),this._session.insert()),c.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(p=>p.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}_updateState(){if(!this._session||!this._editor.hasModel())return;if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{choice:h}=this._session;if(!h){this._currentChoice=void 0;return}if(this._currentChoice!==h){this._currentChoice=h,this._editor.setSelections(this._editor.getSelections().map(p=>N.a.fromPositions(p.getStartPosition())));const[c]=h.options;Object(F.f)(this._editor,h.options.map((p,E)=>({kind:13,label:p.value,insertText:p.value,sortText:"a".repeat(E+1),range:x.a.fromPositions(this._editor.getPosition(),this._editor.getPosition().delta(0,c.value.length))})))}}finish(){for(;this._inSnippet.get();)this.next()}cancel(h=!1){var c;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),(c=this._session)===null||c===void 0||c.dispose(),this._session=void 0,this._modelVersionId=-1,h&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};r.ID="snippetController2",r.InSnippetMode=new L.c("inSnippetMode",!1,Object(I.a)("inSnippetMode","Whether the editor in current in snippet mode")),r.HasNextTabstop=new L.c("hasNextTabstop",!1,Object(I.a)("hasNextTabstop","Whether there is a next tab stop when in snippet mode")),r.HasPrevTabstop=new L.c("hasPrevTabstop",!1,Object(I.a)("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode")),r=d([D(1,v.b),D(2,L.b)],r),Object(B.l)(r.ID,r);const _=B.c.bindToContribution(r.get);Object(B.k)(new _({id:"jumpToNextSnippetPlaceholder",precondition:L.a.and(r.InSnippetMode,r.HasNextTabstop),handler:b=>b.next(),kbOpts:{weight:100+30,kbExpr:A.a.editorTextFocus,primary:2}})),Object(B.k)(new _({id:"jumpToPrevSnippetPlaceholder",precondition:L.a.and(r.InSnippetMode,r.HasPrevTabstop),handler:b=>b.prev(),kbOpts:{weight:100+30,kbExpr:A.a.editorTextFocus,primary:1024|2}})),Object(B.k)(new _({id:"leaveSnippet",precondition:r.InSnippetMode,handler:b=>b.cancel(!0),kbOpts:{weight:100+30,kbExpr:A.a.editorTextFocus,primary:9,secondary:[1024|9]}})),Object(B.k)(new _({id:"acceptSnippet",precondition:r.InSnippetMode,handler:b=>b.finish()}))},tYmi:function(mt,M,t){"use strict";t.d(M,"c",function(){return x}),t.d(M,"b",function(){return A}),t.d(M,"a",function(){return I});var f=t("MNsG"),B=t("bY76"),x;(function(L){L.inMemory="inmemory",L.vscode="vscode",L.internal="private",L.walkThrough="walkThrough",L.walkThroughSnippet="walkThroughSnippet",L.http="http",L.https="https",L.file="file",L.mailto="mailto",L.untitled="untitled",L.data="data",L.command="command",L.vscodeRemote="vscode-remote",L.vscodeRemoteResource="vscode-remote-resource",L.userData="vscode-userdata",L.vscodeCustomEditor="vscode-custom-editor",L.vscodeNotebook="vscode-notebook",L.vscodeNotebookCell="vscode-notebook-cell",L.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",L.vscodeNotebookCellOutput="vscode-notebook-cell-output",L.vscodeInteractive="vscode-interactive",L.vscodeInteractiveInput="vscode-interactive-input",L.vscodeSettings="vscode-settings",L.vscodeWorkspaceTrust="vscode-workspace-trust",L.vscodeTerminal="vscode-terminal",L.webviewPanel="webview-panel",L.vscodeWebview="vscode-webview",L.extension="extension",L.vscodeFileResource="vscode-file",L.tmp="tmp"})(x||(x={}));class N{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(L){this._preferredWebSchema=L}rewrite(L){if(this._delegate)return this._delegate(L);const v=L.authority;let m=this._hosts[v];m&&m.indexOf(":")!==-1&&(m=`[${m}]`);const d=this._ports[v],D=this._connectionTokens[v];let S=`path=${encodeURIComponent(L.path)}`;return typeof D=="string"&&(S+=`&tkn=${encodeURIComponent(D)}`),B.a.from({scheme:f.h?this._preferredWebSchema:x.vscodeRemoteResource,authority:`${m}:${d}`,path:"/vscode-remote-resource",query:S})}}const A=new N;class F{asBrowserUri(L,v){const m=this.toUri(L,v);return m.scheme===x.vscodeRemote?A.rewrite(m):m.scheme===x.file&&(f.g||typeof f.b.importScripts=="function"&&f.b.origin===`${x.vscodeFileResource}://${F.FALLBACK_AUTHORITY}`)?m.with({scheme:x.vscodeFileResource,authority:m.authority||F.FALLBACK_AUTHORITY,query:null,fragment:null}):m}toUri(L,v){return B.a.isUri(L)?L:B.a.parse(v.toUrl(L))}}F.FALLBACK_AUTHORITY="vscode-app";const I=new F},twdY:function(mt,M,t){"use strict";t.d(M,"D",function(){return L}),t.d(M,"H",function(){return v}),t.d(M,"G",function(){return m}),t.d(M,"s",function(){return d}),t.d(M,"B",function(){return D}),t.d(M,"h",function(){return S}),t.d(M,"I",function(){return r}),t.d(M,"C",function(){return _}),t.d(M,"n",function(){return b}),t.d(M,"x",function(){return c}),t.d(M,"y",function(){return p}),t.d(M,"d",function(){return E}),t.d(M,"t",function(){return y}),t.d(M,"A",function(){return C}),t.d(M,"p",function(){return O}),t.d(M,"m",function(){return k}),t.d(M,"i",function(){return Y}),t.d(M,"v",function(){return Q}),t.d(M,"f",function(){return H}),t.d(M,"e",function(){return Z}),t.d(M,"q",function(){return oe}),t.d(M,"F",function(){return $}),t.d(M,"b",function(){return te}),t.d(M,"r",function(){return ne}),t.d(M,"a",function(){return Ee}),t.d(M,"g",function(){return fe}),t.d(M,"j",function(){return ee}),t.d(M,"w",function(){return ie}),t.d(M,"u",function(){return U}),t.d(M,"c",function(){return G}),t.d(M,"z",function(){return J}),t.d(M,"o",function(){return he}),t.d(M,"l",function(){return xe}),t.d(M,"k",function(){return Ie}),t.d(M,"E",function(){return Le});var f=t("bY76"),B=t("aokT"),x=t("al33"),N=t("MI8n"),A=t("pmY6");class F{constructor(){this._map=new Map,this._promises=new Map,this._onDidChange=new N.b,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(Te){this._onDidChange.fire({changedLanguages:Te,changedColorMap:!1})}register(Te,ze){return this._map.set(Te,ze),this.fire([Te]),Object(A.i)(()=>{if(this._map.get(Te)!==ze)return;this._map.delete(Te),this.fire([Te])})}registerPromise(Te,ze){let ue=null,je=!1;return this._promises.set(Te,ze.then(Pe=>{if(this._promises.delete(Te),je||!Pe)return;ue=this.register(Te,Pe)})),Object(A.i)(()=>{je=!0,ue&&ue.dispose()})}getPromise(Te){const ze=this.get(Te);if(ze)return Promise.resolve(ze);const ue=this._promises.get(Te);return ue?ue.then(je=>this.get(Te)):null}get(Te){return this._map.get(Te)||null}setColorMap(Te){this._colorMap=Te,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 I=t("Vhoy");class L{static getLanguageId(Te){return(Te&255)>>>0}static getTokenType(Te){return(Te&1792)>>>8}static getFontStyle(Te){return(Te&14336)>>>11}static getForeground(Te){return(Te&8372224)>>>14}static getBackground(Te){return(Te&4286578688)>>>23}static getClassNameFromMetadata(Te){let ze=this.getForeground(Te),ue="mtk"+ze,je=this.getFontStyle(Te);return je&1&&(ue+=" mtki"),je&2&&(ue+=" mtkb"),je&4&&(ue+=" mtku"),ue}static getInlineStyleFromMetadata(Te,ze){const ue=this.getForeground(Te),je=this.getFontStyle(Te);let Pe=`color: ${ze[ue]};`;return je&1&&(Pe+="font-style: italic;"),je&2&&(Pe+="font-weight: bold;"),je&4&&(Pe+="text-decoration: underline;"),Pe}}const v=function(){let Te=Object.create(null);return Te[0]="symbol-method",Te[1]="symbol-function",Te[2]="symbol-constructor",Te[3]="symbol-field",Te[4]="symbol-variable",Te[5]="symbol-class",Te[6]="symbol-struct",Te[7]="symbol-interface",Te[8]="symbol-module",Te[9]="symbol-property",Te[10]="symbol-event",Te[11]="symbol-operator",Te[12]="symbol-unit",Te[13]="symbol-value",Te[14]="symbol-constant",Te[15]="symbol-enum",Te[16]="symbol-enum-member",Te[17]="symbol-keyword",Te[27]="symbol-snippet",Te[18]="symbol-text",Te[19]="symbol-color",Te[20]="symbol-file",Te[21]="symbol-reference",Te[22]="symbol-customcolor",Te[23]="symbol-folder",Te[24]="symbol-type-parameter",Te[25]="account",Te[26]="issues",function(ze){const ue=Te[ze];let je=ue&&I.d.get(ue);return je||(console.info("No codicon found for CompletionItemKind "+ze),je=I.b.symbolProperty),je.classNames}}();let m=function(){let Te=Object.create(null);return Te.method=0,Te.function=1,Te.constructor=2,Te.field=3,Te.variable=4,Te.class=5,Te.struct=6,Te.interface=7,Te.module=8,Te.property=9,Te.event=10,Te.operator=11,Te.unit=12,Te.value=13,Te.constant=14,Te.enum=15,Te["enum-member"]=16,Te.enumMember=16,Te.keyword=17,Te.snippet=27,Te.text=18,Te.color=19,Te.file=20,Te.reference=21,Te.customcolor=22,Te.folder=23,Te["type-parameter"]=24,Te.typeParameter=24,Te.account=25,Te.issue=26,function(ze,ue){let je=Te[ze];return typeof je=="undefined"&&!ue&&(je=9),je}}();var d;(function(Te){Te[Te.Automatic=0]="Automatic",Te[Te.Explicit=1]="Explicit"})(d||(d={}));var D;(function(Te){Te[Te.Invoke=1]="Invoke",Te[Te.TriggerCharacter=2]="TriggerCharacter",Te[Te.ContentChange=3]="ContentChange"})(D||(D={}));var S;(function(Te){Te[Te.Text=0]="Text",Te[Te.Read=1]="Read",Te[Te.Write=2]="Write"})(S||(S={}));function r(Te){return Te&&f.a.isUri(Te.uri)&&B.a.isIRange(Te.range)&&(B.a.isIRange(Te.originSelectionRange)||B.a.isIRange(Te.targetSelectionRange))}var _;(function(Te){const ze=new Map;ze.set("file",0),ze.set("module",1),ze.set("namespace",2),ze.set("package",3),ze.set("class",4),ze.set("method",5),ze.set("property",6),ze.set("field",7),ze.set("constructor",8),ze.set("enum",9),ze.set("interface",10),ze.set("function",11),ze.set("variable",12),ze.set("constant",13),ze.set("string",14),ze.set("number",15),ze.set("boolean",16),ze.set("array",17),ze.set("object",18),ze.set("key",19),ze.set("null",20),ze.set("enum-member",21),ze.set("struct",22),ze.set("event",23),ze.set("operator",24),ze.set("type-parameter",25);const ue=new Map;ue.set(0,"file"),ue.set(1,"module"),ue.set(2,"namespace"),ue.set(3,"package"),ue.set(4,"class"),ue.set(5,"method"),ue.set(6,"property"),ue.set(7,"field"),ue.set(8,"constructor"),ue.set(9,"enum"),ue.set(10,"interface"),ue.set(11,"function"),ue.set(12,"variable"),ue.set(13,"constant"),ue.set(14,"string"),ue.set(15,"number"),ue.set(16,"boolean"),ue.set(17,"array"),ue.set(18,"object"),ue.set(19,"key"),ue.set(20,"null"),ue.set(21,"enum-member"),ue.set(22,"struct"),ue.set(23,"event"),ue.set(24,"operator"),ue.set(25,"type-parameter");function je(ce){return ze.get(ce)}Te.fromString=je;function Pe(ce){return ue.get(ce)}Te.toString=Pe;function ve(ce,le){const Ce=ue.get(ce);let ye=Ce&&I.d.get("symbol-"+Ce);return ye||(console.info("No codicon found for SymbolKind "+ce),ye=I.b.symbolProperty),`${le?"inline":"block"} ${ye.classNames}`}Te.toCssClassName=ve})(_||(_={}));class b{constructor(Te){this.value=Te}}b.Comment=new b("comment"),b.Imports=new b("imports"),b.Region=new b("region");var h;(function(Te){Te[Te.Other=0]="Other",Te[Te.Type=1]="Type",Te[Te.Parameter=2]="Parameter"})(h||(h={}));const c=new x.a,p=new x.a,E=new x.a,y=new x.a,C=new x.a,O=new x.a,k=new x.a,Y=new x.a,Q=new x.a,H=new x.a,Z=new x.a,oe=new x.a,$=new x.a,te=new x.a,ne=new x.a,Ee=new x.a,fe=new x.a,ee=new x.a,ie=new x.a,U=new x.a,G=new x.a,J=new x.a,he=new x.a,xe=new x.a,Ie=new x.a,Le=new F},uACm:function(mt,M,t){"use strict";t.d(M,"d",function(){return x}),t.d(M,"b",function(){return A}),t.d(M,"a",function(){return F}),t.d(M,"c",function(){return D});class f{constructor(){this.value="",this.pos=0}static isDigitCharacter(S){return S>=48&&S<=57}static isVariableCharacter(S){return S===95||S>=97&&S<=122||S>=65&&S<=90}text(S){this.value=S,this.pos=0}tokenText(S){return this.value.substr(S.pos,S.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let S=this.pos,r=0,_=this.value.charCodeAt(S),b;if(b=f._table[_],typeof b=="number")return this.pos+=1,{type:b,pos:S,len:1};if(f.isDigitCharacter(_)){b=8;do r+=1,_=this.value.charCodeAt(S+r);while(f.isDigitCharacter(_));return this.pos+=r,{type:b,pos:S,len:r}}if(f.isVariableCharacter(_)){b=9;do _=this.value.charCodeAt(S+ ++r);while(f.isVariableCharacter(_)||f.isDigitCharacter(_));return this.pos+=r,{type:b,pos:S,len:r}}b=10;do r+=1,_=this.value.charCodeAt(S+r);while(!isNaN(_)&&typeof f._table[_]=="undefined"&&!f.isDigitCharacter(_)&&!f.isVariableCharacter(_));return this.pos+=r,{type:b,pos:S,len:r}}}f._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class B{constructor(){this._children=[]}appendChild(S){return S instanceof x&&this._children[this._children.length-1]instanceof x?this._children[this._children.length-1].value+=S.value:(S.parent=this,this._children.push(S)),this}replace(S,r){const{parent:_}=S,b=_.children.indexOf(S),h=_.children.slice(0);h.splice(b,1,...r),_._children=h,function c(p,E){for(const y of p)y.parent=E,c(y.children,y)}(r,_)}get children(){return this._children}get snippet(){let S=this;for(;;){if(!S)return;if(S instanceof d)return S;S=S.parent}}toString(){return this.children.reduce((S,r)=>S+r.toString(),"")}len(){return 0}}class x extends B{constructor(S){super();this.value=S}toString(){return this.value}len(){return this.value.length}clone(){return new x(this.value)}}class N extends B{}class A extends N{constructor(S){super();this.index=S}static compareByIndex(S,r){return S.index===r.index?0:S.isFinalTabstop?1:r.isFinalTabstop||S.index<r.index?-1:S.index>r.index?1:0}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof F?this._children[0]:void 0}clone(){let S=new A(this.index);return this.transform&&(S.transform=this.transform.clone()),S._children=this.children.map(r=>r.clone()),S}}class F extends B{constructor(){super(...arguments);this.options=[]}appendChild(S){return S instanceof x&&(S.parent=this,this.options.push(S)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let S=new F;return this.options.forEach(S.appendChild,S),S}}class I extends B{constructor(){super(...arguments);this.regexp=new RegExp("")}resolve(S){const r=this;let _=!1,b=S.replace(this.regexp,function(){return _=!0,r._replace(Array.prototype.slice.call(arguments,0,-2))});return!_&&this._children.some(h=>h instanceof L&&Boolean(h.elseValue))&&(b=this._replace([])),b}_replace(S){let r="";for(const _ of this._children)if(_ instanceof L){let b=S[_.index]||"";b=_.resolve(b),r+=b}else r+=_.toString();return r}toString(){return""}clone(){let S=new I;return S.regexp=new RegExp(this.regexp.source,""+(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),S._children=this.children.map(r=>r.clone()),S}}class L extends B{constructor(S,r,_,b){super();this.index=S,this.shorthandName=r,this.ifValue=_,this.elseValue=b}resolve(S){return this.shorthandName==="upcase"?S?S.toLocaleUpperCase():"":this.shorthandName==="downcase"?S?S.toLocaleLowerCase():"":this.shorthandName==="capitalize"?S?S[0].toLocaleUpperCase()+S.substr(1):"":this.shorthandName==="pascalcase"?S?this._toPascalCase(S):"":this.shorthandName==="camelcase"?S?this._toCamelCase(S):"":Boolean(S)&&typeof this.ifValue=="string"?this.ifValue:!Boolean(S)&&typeof this.elseValue=="string"?this.elseValue:S||""}_toPascalCase(S){const r=S.match(/[a-z0-9]+/gi);return r?r.map(_=>_.charAt(0).toUpperCase()+_.substr(1).toLowerCase()).join(""):S}_toCamelCase(S){const r=S.match(/[a-z0-9]+/gi);return r?r.map((_,b)=>b===0?_.toLowerCase():_.charAt(0).toUpperCase()+_.substr(1).toLowerCase()).join(""):S}clone(){let S=new L(this.index,this.shorthandName,this.ifValue,this.elseValue);return S}}class v extends N{constructor(S){super();this.name=S}resolve(S){let r=S.resolve(this);return this.transform&&(r=this.transform.resolve(r||"")),r!==void 0?(this._children=[new x(r)],!0):!1}clone(){const S=new v(this.name);return this.transform&&(S.transform=this.transform.clone()),S._children=this.children.map(r=>r.clone()),S}}function m(S,r){const _=[...S];for(;_.length>0;){const b=_.shift(),h=r(b);if(!h)break;_.unshift(...b.children)}}class d extends B{get placeholderInfo(){if(!this._placeholders){let S=[],r;this.walk(function(_){return _ instanceof A&&(S.push(_),r=!r||r.index<_.index?_:r),!0}),this._placeholders={all:S,last:r}}return this._placeholders}get placeholders(){const{all:S}=this.placeholderInfo;return S}offset(S){let r=0,_=!1;return this.walk(b=>b===S?(_=!0,!1):(r+=b.len(),!0)),_?r:-1}fullLen(S){let r=0;return m([S],_=>(r+=_.len(),!0)),r}enclosingPlaceholders(S){let r=[],{parent:_}=S;for(;_;)_ instanceof A&&r.push(_),_=_.parent;return r}resolveVariables(S){return this.walk(r=>(r instanceof v&&(r.resolve(S)&&(this._placeholders=void 0)),!0)),this}appendChild(S){return this._placeholders=void 0,super.appendChild(S)}replace(S,r){return this._placeholders=void 0,super.replace(S,r)}clone(){let S=new d;return this._children=this.children.map(r=>r.clone()),S}walk(S){m(this.children,S)}}class D{constructor(){this._scanner=new f,this._token={type:14,pos:0,len:0}}static escape(S){return S.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(S){return/\${?CLIPBOARD/.test(S)}parse(S,r,_){this._scanner.text(S),this._token=this._scanner.next();const b=new d;for(;this._parse(b););const h=new Map,c=[];let p=0;b.walk(E=>(E instanceof A&&(p+=1,E.isFinalTabstop?h.set(0,void 0):!h.has(E.index)&&E.children.length>0?h.set(E.index,E.children):c.push(E)),!0));for(const E of c){const y=h.get(E.index);if(y){const C=new A(E.index);C.transform=E.transform;for(const O of y)C.appendChild(O.clone());b.replace(E,[C])}}return _||(_=p>0&&r),!h.has(0)&&_&&b.appendChild(new A(0)),b}_accept(S,r){if(S===void 0||this._token.type===S){let _=r?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),_}return!1}_backTo(S){return this._scanner.pos=S.pos+S.len,this._token=S,!1}_until(S){const r=this._token;for(;this._token.type!==S;){if(this._token.type===14)return!1;if(this._token.type===5){const b=this._scanner.next();if(b.type!==0&&b.type!==4&&b.type!==5)return!1}this._token=this._scanner.next()}const _=this._scanner.value.substring(r.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),_}_parse(S){return this._parseEscaped(S)||this._parseTabstopOrVariableName(S)||this._parseComplexPlaceholder(S)||this._parseComplexVariable(S)||this._parseAnything(S)}_parseEscaped(S){let r;return(r=this._accept(5,!0))?(r=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||r,S.appendChild(new x(r)),!0):!1}_parseTabstopOrVariableName(S){let r;const _=this._token,b=this._accept(0)&&(r=this._accept(9,!0)||this._accept(8,!0));return b?(S.appendChild(/^\d+$/.test(r)?new A(Number(r)):new v(r)),!0):this._backTo(_)}_parseComplexPlaceholder(S){let r;const _=this._token,b=this._accept(0)&&this._accept(3)&&(r=this._accept(8,!0));if(!b)return this._backTo(_);const h=new A(Number(r));if(this._accept(1))for(;;){if(this._accept(4))return S.appendChild(h),!0;if(this._parse(h))continue;return S.appendChild(new x("${"+r+":")),h.children.forEach(S.appendChild,S),!0}else if(h.index>0&&this._accept(7)){const c=new F;for(;;){if(this._parseChoiceElement(c)){if(this._accept(2))continue;if(this._accept(7)&&(h.appendChild(c),this._accept(4)))return S.appendChild(h),!0}return this._backTo(_),!1}}else return this._accept(6)?this._parseTransform(h)?(S.appendChild(h),!0):(this._backTo(_),!1):this._accept(4)?(S.appendChild(h),!0):this._backTo(_)}_parseChoiceElement(S){const r=this._token,_=[];for(;!(this._token.type===2||this._token.type===7);){let b;if((b=this._accept(5,!0))?b=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||b:b=this._accept(void 0,!0),!b)return this._backTo(r),!1;_.push(b)}return _.length===0?(this._backTo(r),!1):(S.appendChild(new x(_.join(""))),!0)}_parseComplexVariable(S){let r;const _=this._token,b=this._accept(0)&&this._accept(3)&&(r=this._accept(9,!0));if(!b)return this._backTo(_);const h=new v(r);if(this._accept(1))for(;;){if(this._accept(4))return S.appendChild(h),!0;if(this._parse(h))continue;return S.appendChild(new x("${"+r+":")),h.children.forEach(S.appendChild,S),!0}else return this._accept(6)?this._parseTransform(h)?(S.appendChild(h),!0):(this._backTo(_),!1):this._accept(4)?(S.appendChild(h),!0):this._backTo(_)}_parseTransform(S){let r=new I,_="",b="";for(;!this._accept(6);){let h;if(h=this._accept(5,!0)){h=this._accept(6,!0)||h,_+=h;continue}if(this._token.type!==14){_+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let h;if(h=this._accept(5,!0)){h=this._accept(5,!0)||this._accept(6,!0)||h,r.appendChild(new x(h));continue}if(this._parseFormatString(r)||this._parseAnything(r))continue;return!1}for(;!this._accept(4);){if(this._token.type!==14){b+=this._accept(void 0,!0);continue}return!1}try{r.regexp=new RegExp(_,b)}catch(h){return!1}return S.transform=r,!0}_parseFormatString(S){const r=this._token;if(!this._accept(0))return!1;let _=!1;this._accept(3)&&(_=!0);let b=this._accept(8,!0);if(b)if(_){if(this._accept(4))return S.appendChild(new L(Number(b))),!0;if(!this._accept(1))return this._backTo(r),!1}else return S.appendChild(new L(Number(b))),!0;else return this._backTo(r),!1;if(this._accept(6)){let h=this._accept(9,!0);return!h||!this._accept(4)?(this._backTo(r),!1):(S.appendChild(new L(Number(b),h)),!0)}else if(this._accept(11)){let h=this._until(4);if(h)return S.appendChild(new L(Number(b),void 0,h,void 0)),!0}else if(this._accept(12)){let h=this._until(4);if(h)return S.appendChild(new L(Number(b),void 0,void 0,h)),!0}else if(this._accept(13)){let h=this._until(1);if(h){let c=this._until(4);if(c)return S.appendChild(new L(Number(b),void 0,h,c)),!0}}else{let h=this._until(4);if(h)return S.appendChild(new L(Number(b),void 0,void 0,h)),!0}return this._backTo(r),!1}_parseAnything(S){return this._token.type!==14?(S.appendChild(new x(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}},uDWl:function(mt,M,t){"use strict";t.d(M,"a",function(){return m});var f=t("D3Dy"),B=t("/kV6"),x=t("Szf2"),N=t("MNsG");function A(d){if(d.charCode){let S=String.fromCharCode(d.charCode).toUpperCase();return B.d.fromString(S)}const D=d.keyCode;if(D===3)return 7;if(f.g){if(D===59)return 80;if(D===107)return 81;if(D===109)return 83;if(N.f&&D===224)return 57}else if(f.j){if(D===91)return 57;if(N.f&&D===93)return 57;if(!N.f&&D===92)return 57}return B.a[D]||0}const F=N.f?256:2048,I=512,L=1024,v=N.f?2048:256;class m{constructor(d){this._standardKeyboardEventBrand=!0;let D=d;this.browserEvent=D,this.target=D.target,this.ctrlKey=D.ctrlKey,this.shiftKey=D.shiftKey,this.altKey=D.altKey,this.metaKey=D.metaKey,this.keyCode=A(D),this.code=D.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,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(d){return this._asKeybinding===d}_computeKeybinding(){let d=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(d=this.keyCode);let D=0;return this.ctrlKey&&(D|=F),this.altKey&&(D|=I),this.shiftKey&&(D|=L),this.metaKey&&(D|=v),D|=d,D}_computeRuntimeKeybinding(){let d=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(d=this.keyCode),new x.d(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,d)}}},uWgD:function(mt,M,t){},ubTv:function(mt,M,t){"use strict";t.d(M,"a",function(){return F}),t.d(M,"d",function(){return m}),t.d(M,"b",function(){return D}),t.d(M,"c",function(){return S});var f=t("l2gE"),B=t("tYmi"),x=t("MrjW"),N=t("gslv"),A=t("N0LK"),F;(function(b){b.text="text/plain",b.binary="application/octet-stream",b.unknown="application/unknown",b.markdown="text/markdown",b.latex="text/latex"})(F||(F={}));let I=[],L=[],v=[];function m(b,h=!1){const c=d(b);I.push(c),c.userConfigured?v.push(c):L.push(c),h&&!c.userConfigured&&I.forEach(p=>{if(p.mime===c.mime||p.userConfigured)return;c.extension&&p.extension===c.extension&&console.warn(`Overwriting extension <<${c.extension}>> to now point to mime <<${c.mime}>>`),c.filename&&p.filename===c.filename&&console.warn(`Overwriting filename <<${c.filename}>> to now point to mime <<${c.mime}>>`),c.filepattern&&p.filepattern===c.filepattern&&console.warn(`Overwriting filepattern <<${c.filepattern}>> to now point to mime <<${c.mime}>>`),c.firstline&&p.firstline===c.firstline&&console.warn(`Overwriting firstline <<${c.firstline}>> to now point to mime <<${c.mime}>>`)})}function d(b){return{id:b.id,mime:b.mime,filename:b.filename,extension:b.extension,filepattern:b.filepattern,firstline:b.firstline,userConfigured:b.userConfigured,filenameLowercase:b.filename?b.filename.toLowerCase():void 0,extensionLowercase:b.extension?b.extension.toLowerCase():void 0,filepatternLowercase:b.filepattern?Object(f.b)(b.filepattern.toLowerCase()):void 0,filepatternOnPath:b.filepattern?b.filepattern.indexOf(x.e.sep)>=0:!1}}function D(b){b?(I=I.filter(h=>!h.userConfigured),v=[]):(I=[],L=[],v=[])}function S(b,h){let c;if(b)switch(b.scheme){case B.c.file:c=b.fsPath;break;case B.c.data:const C=N.a.parseMetaData(b);c=C.get(N.a.META_DATA_LABEL);break;default:c=b.path}if(!c)return[F.unknown];c=c.toLowerCase();const p=Object(x.a)(c),E=r(c,p,v);if(E)return[E,F.text];const y=r(c,p,L);if(y)return[y,F.text];if(h){const C=_(h);if(C)return[C,F.text]}return[F.unknown]}function r(b,h,c){var p;let E=null,y=null,C=null;for(let O=c.length-1;O>=0;O--){const k=c[O];if(h===k.filenameLowercase){E=k;break}if(k.filepattern&&(!y||k.filepattern.length>y.filepattern.length)){const Y=k.filepatternOnPath?b:h;((p=k.filepatternLowercase)===null||p===void 0?void 0:p.call(k,Y))&&(y=k)}k.extension&&((!C||k.extension.length>C.extension.length)&&(h.endsWith(k.extensionLowercase)&&(C=k)))}return E?E.mime:y?y.mime:C?C.mime:null}function _(b){if(Object(A.S)(b)&&(b=b.substr(1)),b.length>0)for(let h=I.length-1;h>=0;h--){const c=I[h];if(!c.firstline)continue;const p=b.match(c.firstline);if(p&&p.length>0)return c.mime}return null}},udvx:function(mt,M,t){"use strict";t.d(M,"a",function(){return F});var f=t("Vhoy"),B=t("HgMQ"),x=t.n(B),N=t("8tI9"),A=t.n(N);function F(I){let L=I.definition;for(;L instanceof f.b;)L=L.definition;return`.codicon-${I.id}:before { content: '${L.fontCharacter}'; }`}},ufhN:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:function(){return t.e(367).then(t.bind(null,"rMIR"))}})},undH:function(mt,M,t){},v0SU:function(mt,M,t){"use strict";var f=t("M/lh"),B=t.n(f);t.o(f,"Emitter")&&t.d(M,"Emitter",function(){return f.Emitter}),t.o(f,"MarkerSeverity")&&t.d(M,"MarkerSeverity",function(){return f.MarkerSeverity}),t.o(f,"MarkerTag")&&t.d(M,"MarkerTag",function(){return f.MarkerTag}),t.o(f,"Range")&&t.d(M,"Range",function(){return f.Range}),t.o(f,"Uri")&&t.d(M,"Uri",function(){return f.Uri}),t.o(f,"editor")&&t.d(M,"editor",function(){return f.editor}),t.o(f,"languages")&&t.d(M,"languages",function(){return f.languages})},v1vZ:function(mt,M,t){"use strict";t.d(M,"b",function(){return d}),t.d(M,"a",function(){return D}),t.d(M,"c",function(){return h});var f=t("X+cX"),B=t("Vhoy"),x=t("MI8n"),N=t("3/fG"),A=t("3Rsk"),F=t("ic2d"),I=t("t9D7");const L={IconContribution:"base.contributions.icons"};class v{constructor(){this._onDidChange=new x.b,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:Object(N.a)("iconDefintion.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:Object(N.a)("iconDefintion.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${B.a.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(c,p,E,y){const C=this.iconsById[c];if(C){if(E&&!C.description){C.description=E,this.iconSchema.properties[c].markdownDescription=`${E} $(${c})`;const Y=this.iconReferenceSchema.enum.indexOf(c);Y!==-1&&(this.iconReferenceSchema.enumDescriptions[Y]=E),this._onDidChange.fire()}return C}let O={id:c,description:E,defaults:p,deprecationMessage:y};this.iconsById[c]=O;let k={$ref:"#/definitions/icons"};return y&&(k.deprecationMessage=y),E&&(k.markdownDescription=`${E}: $(${c})`),this.iconSchema.properties[c]=k,this.iconReferenceSchema.enum.push(c),this.iconReferenceSchema.enumDescriptions.push(E||""),this._onDidChange.fire(),{id:c}}getIcons(){return Object.keys(this.iconsById).map(c=>this.iconsById[c])}getIcon(c){return this.iconsById[c]}getIconSchema(){return this.iconSchema}getIconFont(c){return this.iconFontsById[c]}toString(){const c=(C,O)=>C.id.localeCompare(O.id),p=C=>{for(;I.d.isThemeIcon(C.defaults);)C=this.iconsById[C.defaults.id];return`codicon codicon-${C?C.id:""}`};let E=[];E.push("| preview | identifier | default codicon ID | description"),E.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const y=Object.keys(this.iconsById).map(C=>this.iconsById[C]);for(const C of y.filter(O=>!!O.description).sort(c))E.push(`|<i class="${p(C)}"></i>|${C.id}|${I.d.isThemeIcon(C.defaults)?C.defaults.id:C.id}|${C.description||""}|`);E.push("| preview | identifier "),E.push("| ----------- | --------------------------------- |");for(const C of y.filter(O=>!I.d.isThemeIcon(O.defaults)).sort(c))E.push(`|<i class="${p(C)}"></i>|${C.id}|`);return E.join(`
|
|
|
`)}}const m=new v;F.a.add(L.IconContribution,m);function d(c,p,E,y){return m.registerIcon(c,p,E,y)}function D(){return m}function S(){for(const c of B.d.all)m.registerIcon(c.id,c.definition,c.description);B.d.onDidRegister(c=>m.registerIcon(c.id,c.definition,c.description))}S();const r="vscode://schemas/icons";let _=F.a.as(A.a.JSONContribution);_.registerSchema(r,m.getIconSchema());const b=new f.e(()=>_.notifySchemaChanged(r),200);m.onDidChange(()=>{b.isScheduled()||b.schedule()});const h=d("widget-close",B.b.close,Object(N.a)("widgetClose","Icon for the close action in widgets."))},v6HE:function(mt,M,t){"use strict";t.d(M,"a",function(){return _o});var f=t("EffR");/*! @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 */function B(no){if(Array.isArray(no)){for(var Lt=0,xt=Array(no.length);Lt<no.length;Lt++)xt[Lt]=no[Lt];return xt}else return Array.from(no)}var x=Object.hasOwnProperty,N=Object.setPrototypeOf,A=Object.isFrozen,F=Object.getPrototypeOf,I=Object.getOwnPropertyDescriptor,L=Object.freeze,v=Object.seal,m=Object.create,d=typeof Reflect!="undefined"&&Reflect,D=d.apply,S=d.construct;D||(D=function(Lt,xt,Nt){return Lt.apply(xt,Nt)}),L||(L=function(Lt){return Lt}),v||(v=function(Lt){return Lt}),S||(S=function(Lt,xt){return new(Function.prototype.bind.apply(Lt,[null].concat(B(xt))))});var r=k(Array.prototype.forEach),_=k(Array.prototype.pop),b=k(Array.prototype.push),h=k(String.prototype.toLowerCase),c=k(String.prototype.match),p=k(String.prototype.replace),E=k(String.prototype.indexOf),y=k(String.prototype.trim),C=k(RegExp.prototype.test),O=Y(TypeError);function k(no){return function(Lt){for(var xt=arguments.length,Nt=Array(xt>1?xt-1:0),rt=1;rt<xt;rt++)Nt[rt-1]=arguments[rt];return D(no,Lt,Nt)}}function Y(no){return function(){for(var Lt=arguments.length,xt=Array(Lt),Nt=0;Nt<Lt;Nt++)xt[Nt]=arguments[Nt];return S(no,xt)}}function Q(no,Lt){N&&N(no,null);for(var xt=Lt.length;xt--;){var Nt=Lt[xt];if(typeof Nt=="string"){var rt=h(Nt);rt!==Nt&&(A(Lt)||(Lt[xt]=rt),Nt=rt)}no[Nt]=!0}return no}function H(no){var Lt=m(null),xt=void 0;for(xt in no)D(x,no,[xt])&&(Lt[xt]=no[xt]);return Lt}function Z(no,Lt){for(;no!==null;){var xt=I(no,Lt);if(xt){if(xt.get)return k(xt.get);if(typeof xt.value=="function")return k(xt.value)}no=F(no)}function Nt(rt){return console.warn("fallback value for",rt),null}return Nt}var oe=L(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),$=L(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),te=L(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ne=L(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ee=L(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),fe=L(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ee=L(["#text"]),ie=L(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),U=L(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),G=L(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),J=L(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),he=v(/\{\{[\s\S]*|[\s\S]*\}\}/gm),xe=v(/<%[\s\S]*|[\s\S]*%>/gm),Ie=v(/^data-[\-\w.\u00B7-\uFFFF]/),Le=v(/^aria-[\-\w]+$/),Te=v(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ze=v(/^(?:\w+script|data):/i),ue=v(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(no){return typeof no}:function(no){return no&&typeof Symbol=="function"&&no.constructor===Symbol&&no!==Symbol.prototype?"symbol":typeof no};function Pe(no){if(Array.isArray(no)){for(var Lt=0,xt=Array(no.length);Lt<no.length;Lt++)xt[Lt]=no[Lt];return xt}else return Array.from(no)}var ve=function(){return typeof window=="undefined"?null:window},ce=function(Lt,xt){if((typeof Lt=="undefined"?"undefined":je(Lt))!=="object"||typeof Lt.createPolicy!="function")return null;var Nt=null,rt="data-tt-policy-suffix";xt.currentScript&&xt.currentScript.hasAttribute(rt)&&(Nt=xt.currentScript.getAttribute(rt));var lt="dompurify"+(Nt?"#"+Nt:"");try{return Lt.createPolicy(lt,{createHTML:function(St){return St}})}catch(pt){return console.warn("TrustedTypes policy "+lt+" could not be created."),null}};function le(){var no=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ve(),Lt=function(oo){return le(oo)};if(Lt.version="2.3.1",Lt.removed=[],!no||!no.document||no.document.nodeType!==9)return Lt.isSupported=!1,Lt;var xt=no.document,Nt=no.document,rt=no.DocumentFragment,lt=no.HTMLTemplateElement,pt=no.Node,St=no.Element,Qt=no.NodeFilter,bo=no.NamedNodeMap,qt=bo===void 0?no.NamedNodeMap||no.MozNamedAttrMap:bo,Eo=no.Text,Ro=no.Comment,zo=no.DOMParser,Bo=no.trustedTypes,Jt=St.prototype,fo=Z(Jt,"cloneNode"),ri=Z(Jt,"nextSibling"),Zo=Z(Jt,"childNodes"),ci=Z(Jt,"parentNode");if(typeof lt=="function"){var ki=Nt.createElement("template");ki.content&&ki.content.ownerDocument&&(Nt=ki.content.ownerDocument)}var wi=ce(Bo,xt),Zi=wi&&Bt?wi.createHTML(""):"",Vi=Nt,vi=Vi.implementation,sn=Vi.createNodeIterator,en=Vi.createDocumentFragment,on=Vi.getElementsByTagName,cn=xt.importNode,Bi={};try{Bi=H(Nt).documentMode?Nt.documentMode:{}}catch(qo){}var zi={};Lt.isSupported=typeof ci=="function"&&vi&&typeof vi.createHTMLDocument!="undefined"&&Bi!==9;var Ji=he,ui=xe,pn=Ie,Hi=Le,Oi=ze,Ii=ue,Qi=Te,Li=null,Ui=Q({},[].concat(Pe(oe),Pe($),Pe(te),Pe(Ee),Pe(ee))),fi=null,$i=Q({},[].concat(Pe(ie),Pe(U),Pe(G),Pe(J))),rn=null,_i=null,Pi=!0,ht=!0,Ve=!1,K=!1,be=!1,Re=!1,Be=!1,at=!1,vt=!1,Gt=!0,Bt=!1,zt=!0,ro=!0,P=!1,q={},Ae=null,Ge=Q({},["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"]),ft=null,Dt=Q({},["audio","video","img","source","image","track"]),jt=null,Xt=Q({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),uo="http://www.w3.org/1998/Math/MathML",io="http://www.w3.org/2000/svg",ho="http://www.w3.org/1999/xhtml",mo=ho,Io=!1,Ao=null,Oo=Nt.createElement("form"),Wo=function(oo){if(Ao&&Ao===oo)return;(!oo||(typeof oo=="undefined"?"undefined":je(oo))!=="object")&&(oo={}),oo=H(oo),Li="ALLOWED_TAGS"in oo?Q({},oo.ALLOWED_TAGS):Ui,fi="ALLOWED_ATTR"in oo?Q({},oo.ALLOWED_ATTR):$i,jt="ADD_URI_SAFE_ATTR"in oo?Q(H(Xt),oo.ADD_URI_SAFE_ATTR):Xt,ft="ADD_DATA_URI_TAGS"in oo?Q(H(Dt),oo.ADD_DATA_URI_TAGS):Dt,Ae="FORBID_CONTENTS"in oo?Q({},oo.FORBID_CONTENTS):Ge,rn="FORBID_TAGS"in oo?Q({},oo.FORBID_TAGS):{},_i="FORBID_ATTR"in oo?Q({},oo.FORBID_ATTR):{},q="USE_PROFILES"in oo?oo.USE_PROFILES:!1,Pi=oo.ALLOW_ARIA_ATTR!==!1,ht=oo.ALLOW_DATA_ATTR!==!1,Ve=oo.ALLOW_UNKNOWN_PROTOCOLS||!1,K=oo.SAFE_FOR_TEMPLATES||!1,be=oo.WHOLE_DOCUMENT||!1,at=oo.RETURN_DOM||!1,vt=oo.RETURN_DOM_FRAGMENT||!1,Gt=oo.RETURN_DOM_IMPORT!==!1,Bt=oo.RETURN_TRUSTED_TYPE||!1,Be=oo.FORCE_BODY||!1,zt=oo.SANITIZE_DOM!==!1,ro=oo.KEEP_CONTENT!==!1,P=oo.IN_PLACE||!1,Qi=oo.ALLOWED_URI_REGEXP||Qi,mo=oo.NAMESPACE||ho,K&&(ht=!1),vt&&(at=!0),q&&(Li=Q({},[].concat(Pe(ee))),fi=[],q.html===!0&&(Q(Li,oe),Q(fi,ie)),q.svg===!0&&(Q(Li,$),Q(fi,U),Q(fi,J)),q.svgFilters===!0&&(Q(Li,te),Q(fi,U),Q(fi,J)),q.mathMl===!0&&(Q(Li,Ee),Q(fi,G),Q(fi,J))),oo.ADD_TAGS&&(Li===Ui&&(Li=H(Li)),Q(Li,oo.ADD_TAGS)),oo.ADD_ATTR&&(fi===$i&&(fi=H(fi)),Q(fi,oo.ADD_ATTR)),oo.ADD_URI_SAFE_ATTR&&Q(jt,oo.ADD_URI_SAFE_ATTR),oo.FORBID_CONTENTS&&(Ae===Ge&&(Ae=H(Ae)),Q(Ae,oo.FORBID_CONTENTS)),ro&&(Li["#text"]=!0),be&&Q(Li,["html","head","body"]),Li.table&&(Q(Li,["tbody"]),delete rn.tbody),L&&L(oo),Ao=oo},si=Q({},["mi","mo","mn","ms","mtext"]),hi=Q({},["foreignobject","desc","title","annotation-xml"]),Uo=Q({},$);Q(Uo,te),Q(Uo,ne);var mi=Q({},Ee);Q(mi,fe);var Ri=function(oo){var So=ci(oo);(!So||!So.tagName)&&(So={namespaceURI:ho,tagName:"template"});var Ne=h(oo.tagName),ae=h(So.tagName);if(oo.namespaceURI===io)return So.namespaceURI===ho?Ne==="svg":So.namespaceURI===uo?Ne==="svg"&&(ae==="annotation-xml"||si[ae]):Boolean(Uo[Ne]);if(oo.namespaceURI===uo)return So.namespaceURI===ho?Ne==="math":So.namespaceURI===io?Ne==="math"&&hi[ae]:Boolean(mi[Ne]);if(oo.namespaceURI===ho){if(So.namespaceURI===io&&!hi[ae])return!1;if(So.namespaceURI===uo&&!si[ae])return!1;var ke=Q({},["title","style","font","a","script"]);return!mi[Ne]&&(ke[Ne]||!Uo[Ne])}return!1},Di=function(oo){b(Lt.removed,{element:oo});try{oo.parentNode.removeChild(oo)}catch(So){try{oo.outerHTML=Zi}catch(Ne){oo.remove()}}},pi=function(oo,So){try{b(Lt.removed,{attribute:So.getAttributeNode(oo),from:So})}catch(Ne){b(Lt.removed,{attribute:null,from:So})}if(So.removeAttribute(oo),oo==="is"&&!fi[oo])if(at||vt)try{Di(So)}catch(Ne){}else try{So.setAttribute(oo,"")}catch(Ne){}},Wi=function(oo){var So=void 0,Ne=void 0;if(Be)oo="<remove></remove>"+oo;else{var ae=c(oo,/^[\r\n\t ]+/);Ne=ae&&ae[0]}var ke=wi?wi.createHTML(oo):oo;if(mo===ho)try{So=new zo().parseFromString(ke,"text/html")}catch(g){}if(!So||!So.documentElement){So=vi.createDocument(mo,"template",null);try{So.documentElement.innerHTML=Io?"":ke}catch(g){}}var Je=So.body||So.documentElement;return oo&&Ne&&Je.insertBefore(Nt.createTextNode(Ne),Je.childNodes[0]||null),mo===ho?on.call(So,be?"html":"body")[0]:be?So.documentElement:Je},fn=function(oo){return sn.call(oo.ownerDocument||oo,oo,Qt.SHOW_ELEMENT|Qt.SHOW_COMMENT|Qt.SHOW_TEXT,null,!1)},In=function(oo){return oo instanceof Eo||oo instanceof Ro?!1:typeof oo.nodeName!="string"||typeof oo.textContent!="string"||typeof oo.removeChild!="function"||!(oo.attributes instanceof qt)||typeof oo.removeAttribute!="function"||typeof oo.setAttribute!="function"||typeof oo.namespaceURI!="string"||typeof oo.insertBefore!="function"},an=function(oo){return(typeof pt=="undefined"?"undefined":je(pt))==="object"?oo instanceof pt:oo&&(typeof oo=="undefined"?"undefined":je(oo))==="object"&&typeof oo.nodeType=="number"&&typeof oo.nodeName=="string"},bn=function(oo,So,Ne){if(!zi[oo])return;r(zi[oo],function(ae){ae.call(Lt,So,Ne,Ao)})},Wn=function(oo){var So=void 0;if(bn("beforeSanitizeElements",oo,null),In(oo))return Di(oo),!0;if(c(oo.nodeName,/[\u0080-\uFFFF]/))return Di(oo),!0;var Ne=h(oo.nodeName);if(bn("uponSanitizeElement",oo,{tagName:Ne,allowedTags:Li}),!an(oo.firstElementChild)&&(!an(oo.content)||!an(oo.content.firstElementChild))&&C(/<[/\w]/g,oo.innerHTML)&&C(/<[/\w]/g,oo.textContent))return Di(oo),!0;if(Ne==="select"&&C(/<template/i,oo.innerHTML))return Di(oo),!0;if(!Li[Ne]||rn[Ne]){if(ro&&!Ae[Ne]){var ae=ci(oo)||oo.parentNode,ke=Zo(oo)||oo.childNodes;if(ke&&ae)for(var Je=ke.length,g=Je-1;g>=0;--g)ae.insertBefore(fo(ke[g],!0),ri(oo))}return Di(oo),!0}return oo instanceof St&&!Ri(oo)||(Ne==="noscript"||Ne==="noembed")&&C(/<\/no(script|embed)/i,oo.innerHTML)?(Di(oo),!0):(K&&oo.nodeType===3&&(So=oo.textContent,So=p(So,Ji," "),So=p(So,ui," "),oo.textContent!==So&&(b(Lt.removed,{element:oo.cloneNode()}),oo.textContent=So)),bn("afterSanitizeElements",oo,null),!1)},gn=function(oo,So,Ne){if(zt&&(So==="id"||So==="name")&&(Ne in Nt||Ne in Oo))return!1;if(!(ht&&!_i[So]&&C(pn,So))){if(!(Pi&&C(Hi,So))){if(!fi[So]||_i[So])return!1;if(!jt[So]){if(!C(Qi,p(Ne,Ii,""))){if(!((So==="src"||So==="xlink:href"||So==="href")&&oo!=="script"&&E(Ne,"data:")===0&&ft[oo])){if(!(Ve&&!C(Oi,p(Ne,Ii,"")))){if(Ne)return!1}}}}}}return!0},$n=function(oo){var So=void 0,Ne=void 0,ae=void 0,ke=void 0;bn("beforeSanitizeAttributes",oo,null);var Je=oo.attributes;if(!Je)return;var g={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:fi};for(ke=Je.length;ke--;){So=Je[ke];var u=So,w=u.name,V=u.namespaceURI;if(Ne=y(So.value),ae=h(w),g.attrName=ae,g.attrValue=Ne,g.keepAttr=!0,g.forceKeepAttr=void 0,bn("uponSanitizeAttribute",oo,g),Ne=g.attrValue,g.forceKeepAttr)continue;if(pi(w,oo),!g.keepAttr)continue;if(C(/\/>/i,Ne)){pi(w,oo);continue}K&&(Ne=p(Ne,Ji," "),Ne=p(Ne,ui," "));var se=oo.nodeName.toLowerCase();if(!gn(se,ae,Ne))continue;try{V?oo.setAttributeNS(V,w,Ne):oo.setAttribute(w,Ne),_(Lt.removed)}catch(pe){}}bn("afterSanitizeAttributes",oo,null)},Un=function qo(oo){var So=void 0,Ne=fn(oo);for(bn("beforeSanitizeShadowDOM",oo,null);So=Ne.nextNode();){if(bn("uponSanitizeShadowNode",So,null),Wn(So))continue;So.content instanceof rt&&qo(So.content),$n(So)}bn("afterSanitizeShadowDOM",oo,null)};return Lt.sanitize=function(qo,oo){var So=void 0,Ne=void 0,ae=void 0,ke=void 0,Je=void 0;if(Io=!qo,Io&&(qo="<!-->"),typeof qo!="string"&&!an(qo)){if(typeof qo.toString!="function")throw O("toString is not a function");if(qo=qo.toString(),typeof qo!="string")throw O("dirty is not a string, aborting")}if(!Lt.isSupported){if(je(no.toStaticHTML)==="object"||typeof no.toStaticHTML=="function"){if(typeof qo=="string")return no.toStaticHTML(qo);if(an(qo))return no.toStaticHTML(qo.outerHTML)}return qo}if(Re||Wo(oo),Lt.removed=[],typeof qo=="string"&&(P=!1),!P)if(qo instanceof pt)So=Wi("<!---->"),Ne=So.ownerDocument.importNode(qo,!0),Ne.nodeType===1&&Ne.nodeName==="BODY"||Ne.nodeName==="HTML"?So=Ne:So.appendChild(Ne);else{if(!at&&!K&&!be&&qo.indexOf("<")===-1)return wi&&Bt?wi.createHTML(qo):qo;if(So=Wi(qo),!So)return at?null:Zi}So&&Be&&Di(So.firstChild);for(var g=fn(P?qo:So);ae=g.nextNode();){if(ae.nodeType===3&&ae===ke)continue;if(Wn(ae))continue;ae.content instanceof rt&&Un(ae.content),$n(ae),ke=ae}if(ke=null,P)return qo;if(at){if(vt)for(Je=en.call(So.ownerDocument);So.firstChild;)Je.appendChild(So.firstChild);else Je=So;return Gt&&(Je=cn.call(xt,Je,!0)),Je}var u=be?So.outerHTML:So.innerHTML;return K&&(u=p(u,Ji," "),u=p(u,ui," ")),wi&&Bt?wi.createHTML(u):u},Lt.setConfig=function(qo){Wo(qo),Re=!0},Lt.clearConfig=function(){Ao=null,Re=!1},Lt.isValidAttribute=function(qo,oo,So){Ao||Wo({});var Ne=h(qo),ae=h(oo);return gn(Ne,ae,So)},Lt.addHook=function(qo,oo){if(typeof oo!="function")return;zi[qo]=zi[qo]||[],b(zi[qo],oo)},Lt.removeHook=function(qo){zi[qo]&&_(zi[qo])},Lt.removeHooks=function(qo){zi[qo]&&(zi[qo]=[])},Lt.removeAllHooks=function(){zi={}},Lt}var Ce=le(),ye=Ce;const ge=Ce.version,Me=Ce.isSupported,De=Ce.sanitize,we=Ce.setConfig,Oe=Ce.clearConfig,nt=Ce.isValidAttribute,Ke=Ce.addHook,et=Ce.removeHook,bt=Ce.removeHooks,Tt=Ce.removeAllHooks;var $t=t("4y0V"),Xe=t("Md8J"),it=t("XSiN"),re=t("fdyd"),We=t("X+cX"),tt=t("JQT/"),Et=t("/cxE"),It=t("MI8n"),Rt=t("eLzo"),vo=t("EJc0"),Mo=t("nD70"),xo=t("pmY6"),Do=t("Ssw4"),Lo=t("Q4rV"),To=t("tYmi"),Ht=t("qj0h"),Mt=t("gslv"),Ue=t("N0LK"),dt=t("bY76");function Ut(no,Lt={},xt={}){var Nt;const rt=new xo.b;let lt=!1;const pt=rt.add(new tt.b),St=Object(Xe.a)(Lt),Qt=function(Jt){let fo;try{fo=Object(Lo.a)(decodeURIComponent(Jt))}catch(ri){}return fo?(fo=Object(Ht.a)(fo,ri=>no.uris&&no.uris[ri]?dt.a.revive(no.uris[ri]):void 0),encodeURIComponent(JSON.stringify(fo))):Jt},bo=function(Jt,fo){const ri=no.uris&&no.uris[Jt];if(!ri)return Jt;let Zo=dt.a.revive(ri);return fo?Jt.startsWith(To.c.data+":")?Jt:To.a.asBrowserUri(Zo).toString(!0):dt.a.parse(Jt).toString()===Zo.toString()?Jt:(Zo.query&&(Zo=Zo.with({query:Qt(Zo.query)})),Zo.toString())};let qt;const Eo=new Promise(Jt=>qt=Jt),Ro=new Do.a;if(Ro.image=(Jt,fo,ri)=>{let Zo=[],ci=[];if(Jt){({href:Jt,dimensions:Zo}=Object(Rt.d)(Jt)),Jt=bo(Jt,!0);try{const ki=dt.a.parse(Jt);Lt.baseUrl&&ki.scheme===To.c.file&&(Jt=Object(Mt.j)(Lt.baseUrl,Jt).toString())}catch(ki){}ci.push(`src="${Jt}"`)}return ri&&ci.push(`alt="${ri}"`),fo&&ci.push(`title="${fo}"`),Zo.length&&(ci=ci.concat(Zo)),"<img "+ci.join(" ")+">"},Ro.link=(Jt,fo,ri)=>{if(Jt===ri&&(ri=Object(Rt.e)(ri)),Jt=bo(Jt,!1),Lt.baseUrl){const Zo=/^\w[\w\d+.-]*:/.test(Jt);Zo||(Jt=Object(Mt.j)(Lt.baseUrl,Jt).toString())}return fo=Object(Rt.e)(fo),Jt=Object(Rt.e)(Jt),!Jt||Jt.match(/^data:|javascript:/i)||Jt.match(/^command:/i)&&!no.isTrusted||Jt.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?ri:(Jt=Jt.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),`<a href="#" data-href="${Jt}" title="${fo||Jt}">${ri}</a>`)},Ro.paragraph=Jt=>`<p>${Jt}</p>`,Lt.codeBlockRenderer&&(Ro.code=(Jt,fo)=>{const ri=Lt.codeBlockRenderer(fo,Jt),Zo=Mo.b.nextId();return Object(We.l)(Promise.all([ri,Eo]),pt.token).then(ci=>{var ki;if(!lt&&ci){const wi=St.querySelector(`div[data-code="${Zo}"]`);wi&&f.R(wi,ci[0]),(ki=Lt.asyncRenderCallback)===null||ki===void 0||ki.call(Lt)}}).catch(()=>{}),`<div class="code" data-code="${Zo}">${Object(Ue.s)(Jt)}</div>`}),Lt.actionHandler){const Jt=Lt.actionHandler.disposables.add(new $t.a(St,"click")),fo=Lt.actionHandler.disposables.add(new $t.a(St,"auxclick"));Lt.actionHandler.disposables.add(It.c.any(Jt.event,fo.event)(ri=>{const Zo=new it.a(ri);if(!Zo.leftButton&&!Zo.middleButton)return;let ci=Zo.target;if(ci.tagName!=="A"&&(ci=ci.parentElement,!ci||ci.tagName!=="A"))return;try{const ki=ci.dataset.href;ki&&Lt.actionHandler.callback(ki,Zo)}catch(ki){Object(Et.f)(ki)}finally{Zo.preventDefault()}}))}no.supportHtml||(xt.sanitizer=Jt=>{const fo=no.isTrusted?Jt.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0;return fo?Jt:""},xt.sanitize=!0,xt.silent=!0),xt.renderer=Ro;let zo=(Nt=no.value)!==null&&Nt!==void 0?Nt:"";zo.length>1e5&&(zo=`${zo.substr(0,1e5)}\u2026`),no.supportThemeIcons&&(zo=Object(vo.b)(zo));let Bo=Do.b(zo,xt);if(no.supportThemeIcons){const Jt=Object(re.a)(Bo);Bo=Jt.map(fo=>typeof fo=="string"?fo:fo.outerHTML).join("")}if(St.innerHTML=Ye(no,Bo),qt(),Lt.asyncRenderCallback)for(const Jt of St.getElementsByTagName("img")){const fo=rt.add(f.i(Jt,"load",()=>{fo.dispose(),Lt.asyncRenderCallback()}))}return{element:St,dispose:()=>{lt=!0,pt.cancel(),rt.dispose()}}}function Ye(no,Lt){const{config:xt,allowedSchemes:Nt}=qe(no);Ke("uponSanitizeAttribute",(lt,pt)=>{if(pt.attrName==="style"||pt.attrName==="class"){if(lt.tagName==="SPAN"){if(pt.attrName==="style"){pt.keepAttr=/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(pt.attrValue);return}else if(pt.attrName==="class"){pt.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(pt.attrValue);return}}pt.keepAttr=!1;return}});const rt=document.createElement("a");Ke("afterSanitizeAttributes",lt=>{for(const pt of["href","src"])lt.hasAttribute(pt)&&(rt.href=lt.getAttribute(pt),Nt.includes(rt.protocol.replace(/:$/,""))||lt.removeAttribute(pt))});try{return De(Lt,Object.assign(Object.assign({},xt),{RETURN_TRUSTED_TYPE:!0}))}finally{et("uponSanitizeAttribute"),et("afterSanitizeAttributes")}}function qe(no){const Lt=[To.c.http,To.c.https,To.c.mailto,To.c.data,To.c.file,To.c.vscodeFileResource,To.c.vscodeRemote,To.c.vscodeRemoteResource];return no.isTrusted&&Lt.push(To.c.command),{config:{ALLOWED_TAGS:["ul","li","p","b","i","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],ALLOWED_ATTR:["href","data-href","target","title","src","alt","class","style","data-code","width","height","align"],ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:Lt}}var ct=t("W9cx"),_t=t("WBhO"),Pt=t("TQUy"),Wt=t("twdY"),Vt=t("HdwC"),so=function(no,Lt,xt,Nt){var rt=arguments.length,lt=rt<3?Lt:Nt===null?Nt=Object.getOwnPropertyDescriptor(Lt,xt):Nt,pt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")lt=Reflect.decorate(no,Lt,xt,Nt);else for(var St=no.length-1;St>=0;St--)(pt=no[St])&&(lt=(rt<3?pt(lt):rt>3?pt(Lt,xt,lt):pt(Lt,xt))||lt);return rt>3&<&&Object.defineProperty(Lt,xt,lt),lt},wo=function(no,Lt){return function(xt,Nt){Lt(xt,Nt,no)}},No=function(no,Lt,xt,Nt){function rt(lt){return lt instanceof xt?lt:new xt(function(pt){pt(lt)})}return new(xt||(xt=Promise))(function(lt,pt){function St(qt){try{bo(Nt.next(qt))}catch(Eo){pt(Eo)}}function Qt(qt){try{bo(Nt.throw(qt))}catch(Eo){pt(Eo)}}function bo(qt){qt.done?lt(qt.value):rt(qt.value).then(St,Qt)}bo((Nt=Nt.apply(no,Lt||[])).next())})},di;let _o=class no{constructor(Lt,xt,Nt){this._options=Lt,this._modeService=xt,this._openerService=Nt,this._onDidRenderAsync=new It.b,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(Lt,xt,Nt){if(!Lt){const pt=document.createElement("span");return{element:pt,dispose:()=>{}}}const rt=new xo.b,lt=rt.add(Ut(Lt,Object.assign(Object.assign({},this._getRenderOptions(Lt,rt)),xt),Nt));return{element:lt.element,dispose:()=>rt.dispose()}}_getRenderOptions(Lt,xt){return{baseUrl:this._options.baseUrl,codeBlockRenderer:(Nt,rt)=>No(this,void 0,void 0,function*(){var lt,pt,St,Qt;let bo;Nt?bo=this._modeService.getModeIdForLanguageName(Nt):this._options.editor&&(bo=(lt=this._options.editor.getModel())===null||lt===void 0?void 0:lt.getLanguageId()),bo||(bo="plaintext"),this._modeService.triggerMode(bo);const qt=(pt=yield Wt.E.getPromise(bo))!==null&&pt!==void 0?pt:void 0,Eo=document.createElement("span");if(Eo.innerHTML=(Qt=(St=no._ttpTokenizer)===null||St===void 0?void 0:St.createHTML(rt,this._modeService.languageIdCodec,qt))!==null&&Qt!==void 0?Qt:Object(Pt.b)(rt,this._modeService.languageIdCodec,qt),this._options.editor){const Ro=this._options.editor.getOption(43);Vt.a.applyFontInfoSlow(Eo,Ro)}else this._options.codeBlockFontFamily&&(Eo.style.fontFamily=this._options.codeBlockFontFamily);return Eo}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:Nt=>this._openerService.open(Nt,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:Lt.isTrusted}).catch(Et.f),disposables:xt}}}};_o._ttpTokenizer=(di=window.trustedTypes)===null||di===void 0?void 0:di.createPolicy("tokenizeToString",{createHTML(no,Lt,xt){return Object(Pt.b)(no,Lt,xt)}}),_o=so([wo(1,_t.a),wo(2,ct.a)],_o)},vAKA:function(mt,M,t){},vATl:function(mt,M,t){"use strict";t.d(M,"a",function(){return r}),t.d(M,"b",function(){return _}),t.d(M,"d",function(){return b}),t.d(M,"c",function(){return h});var f=t("N0LK"),B=t("aokT"),x=t("JQT/"),N=t("pmY6"),A=t("sswD"),F=t("T8No"),I=t("24hK"),L=t("Cg/j"),v=t("9fML"),m=t("3/fG");const d=Object(L.c)("IEditorCancelService"),D=new F.c("cancellableOperation",!1,Object(m.a)("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));Object(v.b)(d,class{constructor(){this._tokens=new WeakMap}add(c,p){let E=this._tokens.get(c);E||(E=c.invokeWithinContext(C=>{const O=D.bindTo(C.get(F.b)),k=new I.a;return{key:O,tokens:k}}),this._tokens.set(c,E));let y;return E.key.set(!0),y=E.tokens.push(p),()=>{y&&(y(),E.key.set(!E.tokens.isEmpty()),y=void 0)}}cancel(c){const p=this._tokens.get(c);if(!p)return;const E=p.tokens.pop();E&&(E.cancel(),p.key.set(!p.tokens.isEmpty()))}},!0);class S extends x.b{constructor(c,p){super(p);this.editor=c,this._unregister=c.invokeWithinContext(E=>E.get(d).add(c,this))}dispose(){this._unregister(),super.dispose()}}Object(A.k)(new class extends A.c{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:D})}runEditorCommand(c,p){c.get(d).cancel(p)}});class r{constructor(c,p){if(this.flags=p,(this.flags&1)!==0){const E=c.getModel();this.modelVersionId=E?f.v("{0}#{1}",E.uri.toString(),E.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!==0?this.position=c.getPosition():this.position=null,(this.flags&2)!==0?this.selection=c.getSelection():this.selection=null,(this.flags&8)!==0?(this.scrollLeft=c.getScrollLeft(),this.scrollTop=c.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(c){if(!(c instanceof r))return!1;const p=c;return this.modelVersionId!==p.modelVersionId||(this.scrollLeft!==p.scrollLeft||this.scrollTop!==p.scrollTop||(!this.position&&p.position||this.position&&!p.position||this.position&&p.position&&!this.position.equals(p.position)))?!1:!(!this.selection&&p.selection||this.selection&&!p.selection||this.selection&&p.selection&&!this.selection.equalsRange(p.selection))}validate(c){return this._equals(new r(c,this.flags))}}class _ extends S{constructor(c,p,E,y){super(c,y);this._listener=new N.b,p&4&&this._listener.add(c.onDidChangeCursorPosition(C=>{(!E||!B.a.containsPosition(E,C.position))&&this.cancel()})),p&2&&this._listener.add(c.onDidChangeCursorSelection(C=>{(!E||!B.a.containsRange(E,C.selection))&&this.cancel()})),p&8&&this._listener.add(c.onDidScrollChange(C=>this.cancel())),p&1&&(this._listener.add(c.onDidChangeModel(C=>this.cancel())),this._listener.add(c.onDidChangeModelContent(C=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class b extends x.b{constructor(c,p){super(p);this._listener=c.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}class h{constructor(c,p,E){this._visiblePosition=c,this._visiblePositionScrollDelta=p,this._cursorPosition=E}static capture(c){let p=null,E=0;if(c.getScrollTop()!==0){const y=c.getVisibleRanges();if(y.length>0){p=y[0].getStartPosition();const C=c.getTopForPosition(p.lineNumber,p.column);E=c.getScrollTop()-C}}return new h(p,E,c.getPosition())}restore(c){if(this._visiblePosition){const p=c.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);c.setScrollTop(p+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(c){const p=c.getPosition();if(!this._cursorPosition||!p)return;const E=c.getTopForLineNumber(p.lineNumber)-c.getTopForLineNumber(this._cursorPosition.lineNumber);c.setScrollTop(c.getScrollTop()+E)}}},vRMv:function(mt,M,t){"use strict";t.d(M,"b",function(){return L}),t.d(M,"a",function(){return v}),t.d(M,"c",function(){return m}),t.d(M,"e",function(){return d}),t.d(M,"d",function(){return D});var f=t("JQT/"),B=t("/cxE"),x=t("sswD"),N=t("twdY"),A=t("9o5J"),F=function(r,_,b,h){function c(p){return p instanceof b?p:new b(function(E){E(p)})}return new(b||(b=Promise))(function(p,E){function y(k){try{O(h.next(k))}catch(Y){E(Y)}}function C(k){try{O(h.throw(k))}catch(Y){E(Y)}}function O(k){k.done?p(k.value):c(k.value).then(y,C)}O((h=h.apply(r,_||[])).next())})};function I(r,_,b,h){const c=b.ordered(r),p=c.map(E=>Promise.resolve(h(E,r,_)).then(void 0,y=>{Object(B.g)(y);return}));return Promise.all(p).then(E=>{const y=[];for(let C of E)Array.isArray(C)?y.push(...C):C&&y.push(C);return y})}function L(r,_,b){return I(r,_,N.f,(h,c,p)=>h.provideDefinition(c,p,b))}function v(r,_,b){return I(r,_,N.e,(h,c,p)=>h.provideDeclaration(c,p,b))}function m(r,_,b){return I(r,_,N.q,(h,c,p)=>h.provideImplementation(c,p,b))}function d(r,_,b){return I(r,_,N.F,(h,c,p)=>h.provideTypeDefinition(c,p,b))}function D(r,_,b,h){return I(r,_,N.x,(c,p,E)=>F(this,void 0,void 0,function*(){const y=yield c.provideReferences(p,E,{includeDeclaration:!0},h);if(!b||!y||y.length!==2)return y;const C=yield c.provideReferences(p,E,{includeDeclaration:!1},h);return C&&C.length===1?C:y}))}function S(r){return F(this,void 0,void 0,function*(){const _=yield r(),b=new A.c(_,""),h=b.references.map(c=>c.link);return b.dispose(),h})}Object(x.n)("_executeDefinitionProvider",(r,_)=>S(()=>L(r,_,f.a.None))),Object(x.n)("_executeDeclarationProvider",(r,_)=>S(()=>v(r,_,f.a.None))),Object(x.n)("_executeImplementationProvider",(r,_)=>S(()=>m(r,_,f.a.None))),Object(x.n)("_executeTypeDefinitionProvider",(r,_)=>S(()=>d(r,_,f.a.None))),Object(x.n)("_executeReferenceProvider",(r,_)=>S(()=>D(r,_,!1,f.a.None)))},vVA1:function(mt,M,t){"use strict";t.r(M);var f=t("sswD"),B=t("scqD"),x=t("A9l+");class N extends f.b{constructor(){super({id:"editor.action.toggleHighContrast",label:x.h.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0});this._originalThemeName=null}run(A,F){const I=A.get(B.a);this._originalThemeName?(I.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=I.getColorTheme().themeName,I.setTheme("hc-black"))}}Object(f.j)(N)},vl9R:function(mt,M,t){"use strict";t.d(M,"b",function(){return B}),t.d(M,"a",function(){return x});const f=Object.prototype.hasOwnProperty;function B(N,A){for(let F in N)if(f.call(N,F)){const I=A({key:F,value:N[F]},function(){delete N[F]});if(I===!1)return}}class x{constructor(){this.map=new Map}add(N,A){let F=this.map.get(N);F||(F=new Set,this.map.set(N,F)),F.add(A)}delete(N,A){const F=this.map.get(N);if(!F)return;F.delete(A),F.size===0&&this.map.delete(N)}forEach(N,A){const F=this.map.get(N);if(!F)return;F.forEach(A)}}},"w29/":function(mt,M,t){"use strict";t.r(M),t.d(M,"CutAction",function(){return b}),t.d(M,"CopyAction",function(){return h}),t.d(M,"PasteAction",function(){return c});var f=t("D3Dy"),B=t("MNsG"),x=t("5TxY"),N=t("sswD"),A=t("Vxe3"),F=t("wQH0"),I=t("3/fG"),L=t("fjLI"),v=t("9XeP"),m=function(y,C,O,k){function Y(Q){return Q instanceof O?Q:new O(function(H){H(Q)})}return new(O||(O=Promise))(function(Q,H){function Z(te){try{$(k.next(te))}catch(ne){H(ne)}}function oe(te){try{$(k.throw(te))}catch(ne){H(ne)}}function $(te){te.done?Q(te.value):Y(te.value).then(Z,oe)}$((k=k.apply(y,C||[])).next())})};const d="9_cutcopypaste",D=B.g||document.queryCommandSupported("cut"),S=B.g||document.queryCommandSupported("copy"),r=typeof navigator.clipboard=="undefined"||f.g?document.queryCommandSupported("paste"):!0;function _(y){return y.register(),y}const b=D?_(new N.e({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:B.g?{primary:2048|54,win:{primary:2048|54,secondary:[1024|20]},weight:100}:void 0,menuOpts:[{menuId:L.b.MenubarEditMenu,group:"2_ccp",title:I.a({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:L.b.EditorContext,group:d,title:I.a("actions.clipboard.cutLabel","Cut"),when:F.a.writable,order:1},{menuId:L.b.CommandPalette,group:"",title:I.a("actions.clipboard.cutLabel","Cut"),order:1},{menuId:L.b.SimpleEditorContext,group:d,title:I.a("actions.clipboard.cutLabel","Cut"),when:F.a.writable,order:1}]})):void 0,h=S?_(new N.e({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:B.g?{primary:2048|33,win:{primary:2048|33,secondary:[2048|19]},weight:100}:void 0,menuOpts:[{menuId:L.b.MenubarEditMenu,group:"2_ccp",title:I.a({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:L.b.EditorContext,group:d,title:I.a("actions.clipboard.copyLabel","Copy"),order:2},{menuId:L.b.CommandPalette,group:"",title:I.a("actions.clipboard.copyLabel","Copy"),order:1},{menuId:L.b.SimpleEditorContext,group:d,title:I.a("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;L.d.appendMenuItem(L.b.MenubarEditMenu,{submenu:L.b.MenubarCopy,title:{value:I.a("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3}),L.d.appendMenuItem(L.b.EditorContext,{submenu:L.b.EditorContextCopy,title:{value:I.a("copy as","Copy As"),original:"Copy As"},group:d,order:3});const c=r?_(new N.e({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:B.g?{primary:2048|52,win:{primary:2048|52,secondary:[1024|19]},linux:{primary:2048|52,secondary:[1024|19]},weight:100}:void 0,menuOpts:[{menuId:L.b.MenubarEditMenu,group:"2_ccp",title:I.a({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:L.b.EditorContext,group:d,title:I.a("actions.clipboard.pasteLabel","Paste"),when:F.a.writable,order:4},{menuId:L.b.CommandPalette,group:"",title:I.a("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:L.b.SimpleEditorContext,group:d,title:I.a("actions.clipboard.pasteLabel","Paste"),when:F.a.writable,order:4}]})):void 0;class p extends N.b{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:I.a("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:F.a.textInputFocus,primary:0,weight:100}})}run(y,C){if(!C.hasModel())return;const O=C.getOption(32);if(!O&&C.getSelection().isEmpty())return;x.a.forceCopyWithSyntaxHighlighting=!0,C.focus(),document.execCommand("copy"),x.a.forceCopyWithSyntaxHighlighting=!1}}function E(y,C){if(!y)return;y.addImplementation(1e4,"code-editor",(O,k)=>{const Y=O.get(A.a).getFocusedCodeEditor();if(Y&&Y.hasTextFocus()){const Q=Y.getOption(32),H=Y.getSelection();return H&&H.isEmpty()&&!Q||document.execCommand(C),!0}return!1}),y.addImplementation(0,"generic-dom",(O,k)=>(document.execCommand(C),!0))}E(b,"cut"),E(h,"copy"),c&&(c.addImplementation(1e4,"code-editor",(y,C)=>{const O=y.get(A.a),k=y.get(v.a),Y=O.getFocusedCodeEditor();if(Y&&Y.hasTextFocus()){const Q=document.execCommand("paste");return!Q&&B.h?(()=>m(void 0,void 0,void 0,function*(){const H=yield k.readText();if(H!==""){const Z=x.b.INSTANCE.get(H);let oe=!1,$=null,te=null;Z&&(oe=Y.getOption(32)&&!!Z.isFromEmptySelection,$=typeof Z.multicursorText!="undefined"?Z.multicursorText:null,te=Z.mode),Y.trigger("keyboard","paste",{text:H,pasteOnNewLine:oe,multicursorText:$,mode:te})}}))():!0}return!1}),c.addImplementation(0,"generic-dom",(y,C)=>(document.execCommand("paste"),!0))),S&&Object(N.j)(p)},w9QG:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:function(){return t.e(366).then(t.bind(null,"Czvm"))}})},wQH0:function(mt,M,t){"use strict";t.d(M,"a",function(){return x});var f=t("3/fG"),B=t("T8No"),x;(function(N){N.editorSimpleInput=new B.c("editorSimpleInput",!1,!0),N.editorTextFocus=new B.c("editorTextFocus",!1,f.a("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),N.focus=new B.c("editorFocus",!1,f.a("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),N.textInputFocus=new B.c("textInputFocus",!1,f.a("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),N.readOnly=new B.c("editorReadonly",!1,f.a("editorReadonly","Whether the editor is read only")),N.inDiffEditor=new B.c("inDiffEditor",!1,f.a("inDiffEditor","Whether the context is a diff editor")),N.columnSelection=new B.c("editorColumnSelection",!1,f.a("editorColumnSelection","Whether `editor.columnSelection` is enabled")),N.writable=N.readOnly.toNegated(),N.hasNonEmptySelection=new B.c("editorHasSelection",!1,f.a("editorHasSelection","Whether the editor has text selected")),N.hasOnlyEmptySelection=N.hasNonEmptySelection.toNegated(),N.hasMultipleSelections=new B.c("editorHasMultipleSelections",!1,f.a("editorHasMultipleSelections","Whether the editor has multiple selections")),N.hasSingleSelection=N.hasMultipleSelections.toNegated(),N.tabMovesFocus=new B.c("editorTabMovesFocus",!1,f.a("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),N.tabDoesNotMoveFocus=N.tabMovesFocus.toNegated(),N.isInWalkThroughSnippet=new B.c("isInEmbeddedEditor",!1,!0),N.canUndo=new B.c("canUndo",!1,!0),N.canRedo=new B.c("canRedo",!1,!0),N.hoverVisible=new B.c("editorHoverVisible",!1,f.a("editorHoverVisible","Whether the editor hover is visible")),N.inCompositeEditor=new B.c("inCompositeEditor",void 0,f.a("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),N.notInCompositeEditor=N.inCompositeEditor.toNegated(),N.languageId=new B.c("editorLangId","",f.a("editorLangId","The language identifier of the editor")),N.hasCompletionItemProvider=new B.c("editorHasCompletionItemProvider",!1,f.a("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),N.hasCodeActionsProvider=new B.c("editorHasCodeActionsProvider",!1,f.a("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),N.hasCodeLensProvider=new B.c("editorHasCodeLensProvider",!1,f.a("editorHasCodeLensProvider","Whether the editor has a code lens provider")),N.hasDefinitionProvider=new B.c("editorHasDefinitionProvider",!1,f.a("editorHasDefinitionProvider","Whether the editor has a definition provider")),N.hasDeclarationProvider=new B.c("editorHasDeclarationProvider",!1,f.a("editorHasDeclarationProvider","Whether the editor has a declaration provider")),N.hasImplementationProvider=new B.c("editorHasImplementationProvider",!1,f.a("editorHasImplementationProvider","Whether the editor has an implementation provider")),N.hasTypeDefinitionProvider=new B.c("editorHasTypeDefinitionProvider",!1,f.a("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),N.hasHoverProvider=new B.c("editorHasHoverProvider",!1,f.a("editorHasHoverProvider","Whether the editor has a hover provider")),N.hasDocumentHighlightProvider=new B.c("editorHasDocumentHighlightProvider",!1,f.a("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),N.hasDocumentSymbolProvider=new B.c("editorHasDocumentSymbolProvider",!1,f.a("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),N.hasReferenceProvider=new B.c("editorHasReferenceProvider",!1,f.a("editorHasReferenceProvider","Whether the editor has a reference provider")),N.hasRenameProvider=new B.c("editorHasRenameProvider",!1,f.a("editorHasRenameProvider","Whether the editor has a rename provider")),N.hasSignatureHelpProvider=new B.c("editorHasSignatureHelpProvider",!1,f.a("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),N.hasInlayHintsProvider=new B.c("editorHasInlayHintsProvider",!1,f.a("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),N.hasDocumentFormattingProvider=new B.c("editorHasDocumentFormattingProvider",!1,f.a("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),N.hasDocumentSelectionFormattingProvider=new B.c("editorHasDocumentSelectionFormattingProvider",!1,f.a("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),N.hasMultipleDocumentFormattingProvider=new B.c("editorHasMultipleDocumentFormattingProvider",!1,f.a("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),N.hasMultipleDocumentSelectionFormattingProvider=new B.c("editorHasMultipleDocumentSelectionFormattingProvider",!1,f.a("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(x||(x={}))},woZy:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:function(){return t.e(351).then(t.bind(null,"I+Au"))}})},wxcJ:function(mt,M,t){"use strict";(function(f){t.d(M,"a",function(){return N}),t.d(M,"b",function(){return A}),t.d(M,"c",function(){return F});var B=t("MNsG");let x;if(typeof B.b.vscode!="undefined"&&typeof B.b.vscode.process!="undefined"){const I=B.b.vscode.process;x={get platform(){return I.platform},get arch(){return I.arch},get env(){return I.env},cwd(){return I.cwd()},nextTick(L){return Object(B.j)(L)}}}else typeof f!="undefined"?x={get platform(){return f.platform},get arch(){return f.arch},get env(){return Object({NODE_ENV:"production"})},cwd(){return Object({NODE_ENV:"production"}).VSCODE_CWD||f.cwd()},nextTick(I){return f.nextTick(I)}}:x={get platform(){return B.i?"win32":B.f?"darwin":"linux"},get arch(){return},nextTick(I){return Object(B.j)(I)},get env(){return{}},cwd(){return"/"}};const N=x.cwd,A=x.env,F=x.platform}).call(this,t("Q2Ig"))},"x/UI":function(mt,M,t){"use strict";t.d(M,"a",function(){return N}),t.d(M,"b",function(){return I}),t.d(M,"c",function(){return L});var f=t("Cg/j"),B=t("bY76"),x=t("746U");const N=Object(f.c)("IWorkspaceEditService");function A(m){return Object(x.k)(m)&&(Boolean(m.newUri)||Boolean(m.oldUri))}function F(m){return Object(x.k)(m)&&B.a.isUri(m.resource)&&Object(x.k)(m.edit)}class I{constructor(m){this.metadata=m}static convert(m){return m.edits.map(d=>{if(F(d))return new L(d.resource,d.edit,d.modelVersionId,d.metadata);if(A(d))return new v(d.oldUri,d.newUri,d.options,d.metadata);throw new Error("Unsupported edit")})}}class L extends I{constructor(m,d,D,S){super(S);this.resource=m,this.textEdit=d,this.versionId=D}}class v extends I{constructor(m,d,D,S){super(S);this.oldResource=m,this.newResource=d,this.options=D}}},xONI:function(mt,M,t){"use strict";t.d(M,"a",function(){return h});var f=t("EffR"),B=t("7lZ/"),x=t("X+cX"),N=t("JQT/"),A=t("eLzo"),F=t("pmY6"),I=t("746U"),L=t("3/fG"),v=function(y,C,O,k){function Y(Q){return Q instanceof O?Q:new O(function(H){H(Q)})}return new(O||(O=Promise))(function(Q,H){function Z(te){try{$(k.next(te))}catch(ne){H(ne)}}function oe(te){try{$(k.throw(te))}catch(ne){H(ne)}}function $(te){te.done?Q(te.value):Y(te.value).then(Z,oe)}$((k=k.apply(y,C||[])).next())})};function m(y,C){Object(I.l)(C)?y.title=C:(C==null?void 0:C.markdownNotSupportedFallback)?y.title=C.markdownNotSupportedFallback:y.removeAttribute("title")}class d{constructor(y,C,O){this.hoverDelegate=y,this.target=C,this.fadeInAnimation=O}update(y,C){var O;return v(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let k;if(y===void 0||Object(I.l)(y)||y instanceof HTMLElement)k=y;else if(!Object(I.i)(y.markdown))k=(O=y.markdown)!==null&&O!==void 0?O:y.markdownNotSupportedFallback;else{this._hoverWidget||this.show(Object(L.a)("iconLabel.loading","Loading..."),C),this._cancellationTokenSource=new N.b;const Y=this._cancellationTokenSource.token;if(k=yield y.markdown(Y),this.isDisposed||Y.isCancellationRequested)return}this.show(k,C)})}show(y,C){const O=this._hoverWidget;if(this.hasContent(y)){const k={content:y,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!O};this._hoverWidget=this.hoverDelegate.showHover(k,C)}O==null||O.dispose()}hasContent(y){return y?Object(A.c)(y)?!!y.value:!0:!1}get isDisposed(){var y;return(y=this._hoverWidget)===null||y===void 0?void 0:y.isDisposed}dispose(){var y,C;(y=this._hoverWidget)===null||y===void 0||y.dispose(),(C=this._cancellationTokenSource)===null||C===void 0||C.dispose(!0),this._cancellationTokenSource=void 0}}function D(y,C,O){let k,Y;const Q=(te,ne)=>{var Ee;te&&(Y==null||Y.dispose(),Y=void 0),ne&&(k==null||k.dispose(),k=void 0),(Ee=y.onDidHideHover)===null||Ee===void 0||Ee.call(y)},H=(te,ne,Ee)=>new x.g(()=>v(this,void 0,void 0,function*(){(!Y||Y.isDisposed)&&(Y=new d(y,Ee||C,te>0),yield Y.update(O,ne))}),te),Z=()=>{if(k)return;const te=new F.b,ne=ee=>Q(!1,ee.fromElement===C);te.add(f.i(C,f.d.MOUSE_LEAVE,ne,!0));const Ee=()=>Q(!0,!0);te.add(f.i(C,f.d.MOUSE_DOWN,Ee,!0));const fe={targetElements:[C],dispose:()=>{}};if(y.placement===void 0||y.placement==="mouse"){const ee=ie=>fe.x=ie.x+10;te.add(f.i(C,f.d.MOUSE_MOVE,ee,!0))}te.add(H(y.delay,!1,fe)),k=te},oe=f.i(C,f.d.MOUSE_OVER,Z,!0),$={show:te=>{Q(!1,!0),H(0,te)},hide:()=>{Q(!0,!0)},update:te=>v(this,void 0,void 0,function*(){O=te,yield Y==null?void 0:Y.update(O)}),dispose:()=>{oe.dispose(),Q(!0,!0)}};return $}var S=t("qj0h"),r=t("nuFA"),_=t("KgQ1");class b{constructor(y){this._element=y}get element(){return this._element}set textContent(y){if(this.disposed||y===this._textContent)return;this._textContent=y,this._element.textContent=y}set className(y){if(this.disposed||y===this._className)return;this._className=y,this._element.className=y}set empty(y){if(this.disposed||y===this._empty)return;this._empty=y,this._element.style.marginLeft=y?"0":""}dispose(){this.disposed=!0}}class h extends F.a{constructor(y,C){super();this.customHovers=new Map,this.domNode=this._register(new b(f.q(y,f.a(".monaco-icon-label")))),this.labelContainer=f.q(this.domNode.element,f.a(".monaco-icon-label-container"));const O=f.q(this.labelContainer,f.a("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new b(f.q(this.labelContainer,f.a("span.monaco-icon-description-container")))),(C==null?void 0:C.supportHighlights)||(C==null?void 0:C.supportIcons)?this.nameNode=new E(O,!!C.supportIcons):this.nameNode=new c(O),(C==null?void 0:C.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new B.a(f.q(this.descriptionContainer.element,f.a("span.label-description")),!!C.supportIcons):this.descriptionNodeFactory=()=>this._register(new b(f.q(this.descriptionContainer.element,f.a("span.label-description")))),this.hoverDelegate=C==null?void 0:C.hoverDelegate}get element(){return this.domNode.element}setLabel(y,C,O){const k=["monaco-icon-label"];O&&(O.extraClasses&&k.push(...O.extraClasses),O.italic&&k.push("italic"),O.strikethrough&&k.push("strikethrough")),this.domNode.className=k.join(" "),this.setupHover((O==null?void 0:O.descriptionTitle)?this.labelContainer:this.element,O==null?void 0:O.title),this.nameNode.setLabel(y,O),(C||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof B.a?(this.descriptionNode.set(C||"",O?O.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,O==null?void 0:O.descriptionTitle)):(this.descriptionNode.textContent=C||"",this.setupHover(this.descriptionNode.element,(O==null?void 0:O.descriptionTitle)||""),this.descriptionNode.empty=!C))}setupHover(y,C){const O=this.customHovers.get(y);if(O&&(O.dispose(),this.customHovers.delete(y)),!C){y.removeAttribute("title");return}if(!this.hoverDelegate)m(y,C);else{const k=D(this.hoverDelegate,y,C);k&&this.customHovers.set(y,k)}}dispose(){super.dispose();for(const y of this.customHovers.values())y.dispose();this.customHovers.clear()}}class c{constructor(y){this.container=y,this.label=void 0,this.singleLabel=void 0}setLabel(y,C){if(this.label===y&&Object(S.d)(this.options,C))return;if(this.label=y,this.options=C,typeof y=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=f.q(this.container,f.a("a.label-name",{id:C==null?void 0:C.domId}))),this.singleLabel.textContent=y;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let O=0;O<y.length;O++){const k=y[O],Y=(C==null?void 0:C.domId)&&`${C==null?void 0:C.domId}_${O}`;f.q(this.container,f.a("a.label-name",{id:Y,"data-icon-label-count":y.length,"data-icon-label-index":O,role:"treeitem"},k)),O<y.length-1&&f.q(this.container,f.a("span.label-separator",void 0,(C==null?void 0:C.separator)||"/"))}}}}function p(y,C,O){if(!O)return;let k=0;return y.map(Y=>{const Q={start:k,end:k+Y.length},H=O.map(Z=>r.a.intersect(Q,Z)).filter(Z=>!r.a.isEmpty(Z)).map(({start:Z,end:oe})=>({start:Z-k,end:oe-k}));return k=Q.end+C.length,H})}class E{constructor(y,C){this.container=y,this.supportIcons=C,this.label=void 0,this.singleLabel=void 0}setLabel(y,C){if(this.label===y&&Object(S.d)(this.options,C))return;if(this.label=y,this.options=C,typeof y=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new B.a(f.q(this.container,f.a("a.label-name",{id:C==null?void 0:C.domId})),this.supportIcons)),this.singleLabel.set(y,C==null?void 0:C.matches,void 0,C==null?void 0:C.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const O=(C==null?void 0:C.separator)||"/",k=p(y,O,C==null?void 0:C.matches);for(let Y=0;Y<y.length;Y++){const Q=y[Y],H=k?k[Y]:void 0,Z=(C==null?void 0:C.domId)&&`${C==null?void 0:C.domId}_${Y}`,oe=f.a("a.label-name",{id:Z,"data-icon-label-count":y.length,"data-icon-label-index":Y,role:"treeitem"}),$=new B.a(f.q(this.container,oe),this.supportIcons);$.set(Q,H,void 0,C==null?void 0:C.labelEscapeNewLines),Y<y.length-1&&f.q(oe,f.a("span.label-separator",void 0,O))}}}}},xYNL:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:function(){return t.e(341).then(t.bind(null,"tGOS"))}})},xmOD:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:function(){return t.e(361).then(t.bind(null,"fB/Z"))}})},y3CF:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:function(){return t.e(348).then(t.bind(null,"YdqL"))}})},yEoX:function(mt,M,t){},yKqg:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:function(){return t.e(357).then(t.bind(null,"LdT9"))}})},yqFB:function(mt,M,t){},yrU1:function(mt,M,t){},z3hU:function(mt,M,t){"use strict";t.r(M),t.d(M,"ModuleKind",function(){return N}),t.d(M,"JsxEmit",function(){return A}),t.d(M,"NewLineKind",function(){return F}),t.d(M,"ScriptTarget",function(){return I}),t.d(M,"ModuleResolutionKind",function(){return L}),t.d(M,"typescriptVersion",function(){return m}),t.d(M,"typescriptDefaults",function(){return d}),t.d(M,"javascriptDefaults",function(){return D}),t.d(M,"getTypeScriptWorker",function(){return S}),t.d(M,"getJavaScriptWorker",function(){return r});var f=t("M/lh"),B="4.4.4",x=t("v0SU");"use strict";var N;(function(b){b[b.None=0]="None",b[b.CommonJS=1]="CommonJS",b[b.AMD=2]="AMD",b[b.UMD=3]="UMD",b[b.System=4]="System",b[b.ES2015=5]="ES2015",b[b.ESNext=99]="ESNext"})(N||(N={}));var A;(function(b){b[b.None=0]="None",b[b.Preserve=1]="Preserve",b[b.React=2]="React",b[b.ReactNative=3]="ReactNative",b[b.ReactJSX=4]="ReactJSX",b[b.ReactJSXDev=5]="ReactJSXDev"})(A||(A={}));var F;(function(b){b[b.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",b[b.LineFeed=1]="LineFeed"})(F||(F={}));var I;(function(b){b[b.ES3=0]="ES3",b[b.ES5=1]="ES5",b[b.ES2015=2]="ES2015",b[b.ES2016=3]="ES2016",b[b.ES2017=4]="ES2017",b[b.ES2018=5]="ES2018",b[b.ES2019=6]="ES2019",b[b.ES2020=7]="ES2020",b[b.ESNext=99]="ESNext",b[b.JSON=100]="JSON",b[b.Latest=99]="Latest"})(I||(I={}));var L;(function(b){b[b.Classic=1]="Classic",b[b.NodeJs=2]="NodeJs"})(L||(L={}));var v=function(){function b(h,c,p,E){this._onDidChange=new x.Emitter,this._onDidExtraLibsChange=new x.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(h),this.setDiagnosticsOptions(c),this.setWorkerOptions(p),this.setInlayHintsOptions(E),this._onDidExtraLibsChangeTimeout=-1}return Object.defineProperty(b.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onDidExtraLibsChange",{get:function(){return this._onDidExtraLibsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"workerOptions",{get:function(){return this._workerOptions},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"inlayHintsOptions",{get:function(){return this._inlayHintsOptions},enumerable:!1,configurable:!0}),b.prototype.getExtraLibs=function(){return this._extraLibs},b.prototype.addExtraLib=function(h,c){var p=this,E;if(typeof c=="undefined"?E="ts:extralib-"+Math.random().toString(36).substring(2,15):E=c,this._extraLibs[E]&&this._extraLibs[E].content===h)return{dispose:function(){}};var y=1;return this._removedExtraLibs[E]&&(y=this._removedExtraLibs[E]+1),this._extraLibs[E]&&(y=this._extraLibs[E].version+1),this._extraLibs[E]={content:h,version:y},this._fireOnDidExtraLibsChangeSoon(),{dispose:function(){var C=p._extraLibs[E];if(!C)return;if(C.version!==y)return;delete p._extraLibs[E],p._removedExtraLibs[E]=y,p._fireOnDidExtraLibsChangeSoon()}}},b.prototype.setExtraLibs=function(h){for(var c in this._extraLibs)this._removedExtraLibs[c]=this._extraLibs[c].version;if(this._extraLibs=Object.create(null),h&&h.length>0)for(var p=0,E=h;p<E.length;p++){var y=E[p],c=y.filePath||"ts:extralib-"+Math.random().toString(36).substring(2,15),C=y.content,O=1;this._removedExtraLibs[c]&&(O=this._removedExtraLibs[c]+1),this._extraLibs[c]={content:C,version:O}}this._fireOnDidExtraLibsChangeSoon()},b.prototype._fireOnDidExtraLibsChangeSoon=function(){var h=this;if(this._onDidExtraLibsChangeTimeout!==-1)return;this._onDidExtraLibsChangeTimeout=setTimeout(function(){h._onDidExtraLibsChangeTimeout=-1,h._onDidExtraLibsChange.fire(void 0)},0)},b.prototype.getCompilerOptions=function(){return this._compilerOptions},b.prototype.setCompilerOptions=function(h){this._compilerOptions=h||Object.create(null),this._onDidChange.fire(void 0)},b.prototype.getDiagnosticsOptions=function(){return this._diagnosticsOptions},b.prototype.setDiagnosticsOptions=function(h){this._diagnosticsOptions=h||Object.create(null),this._onDidChange.fire(void 0)},b.prototype.setWorkerOptions=function(h){this._workerOptions=h||Object.create(null),this._onDidChange.fire(void 0)},b.prototype.setInlayHintsOptions=function(h){this._inlayHintsOptions=h||Object.create(null),this._onDidChange.fire(void 0)},b.prototype.setMaximumWorkerIdleTime=function(h){},b.prototype.setEagerModelSync=function(h){this._eagerModelSync=h},b.prototype.getEagerModelSync=function(){return this._eagerModelSync},b}(),m=B,d=new v({allowNonTsExtensions:!0,target:I.Latest},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{}),D=new v({allowNonTsExtensions:!0,allowJs:!0,target:I.Latest},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{}),S=function(){return _().then(function(b){return b.getTypeScriptWorker()})},r=function(){return _().then(function(b){return b.getJavaScriptWorker()})};x.languages.typescript={ModuleKind:N,JsxEmit:A,NewLineKind:F,ScriptTarget:I,ModuleResolutionKind:L,typescriptVersion:m,typescriptDefaults:d,javascriptDefaults:D,getTypeScriptWorker:S,getJavaScriptWorker:r};function _(){return t.e(375).then(t.bind(null,"4yiN"))}x.languages.onLanguage("typescript",function(){return _().then(function(b){return b.setupTypeScript(d)})}),x.languages.onLanguage("javascript",function(){return _().then(function(b){return b.setupJavaScript(D)})})},zN7H:function(mt,M,t){"use strict";t.d(M,"a",function(){return L});var f=t("N0LK"),B=t("Ll0s"),x=t("aokT"),N=t("gCVg"),A=t("cMvZ");const F=Object.create(null);function I(v,m){if(m<=0)return"";F[v]||(F[v]=["",v]);const d=F[v];for(let D=d.length;D<=m;D++)d[D]=d[D-1]+v;return d[m]}class L{constructor(v,m){this._opts=m,this._selection=v,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(v,m,d,D,S){const r=B.a.visibleColumnFromColumn(v,m,d);if(S){const _=I(" ",D),b=B.a.prevIndentTabStop(r,D),h=b/D;return I(_,h)}else{const _=" ",b=B.a.prevRenderTabStop(r,d),h=b/d;return I(_,h)}}static shiftIndent(v,m,d,D,S){const r=B.a.visibleColumnFromColumn(v,m,d);if(S){const _=I(" ",D),b=B.a.nextIndentTabStop(r,D),h=b/D;return I(_,h)}else{const _=" ",b=B.a.nextRenderTabStop(r,d),h=b/d;return I(_,h)}}_addEditOperation(v,m,d){this._useLastEditRangeForCursorEndPosition?v.addTrackedEditOperation(m,d):v.addEditOperation(m,d)}getEditOperations(v,m){const d=this._selection.startLineNumber;let D=this._selection.endLineNumber;this._selection.endColumn===1&&d!==D&&(D=D-1);const{tabSize:S,indentSize:r,insertSpaces:_}=this._opts,b=d===D;if(this._opts.useTabStops){this._selection.isEmpty()&&(/^\s*$/.test(v.getLineContent(d))&&(this._useLastEditRangeForCursorEndPosition=!0));let h=0,c=0;for(let p=d;p<=D;p++,h=c){c=0;let E=v.getLineContent(p),y=f.u(E);if(this._opts.isUnshift&&(E.length===0||y===0))continue;if(!b&&!this._opts.isUnshift&&E.length===0)continue;if(y===-1&&(y=E.length),p>1){let O=B.a.visibleColumnFromColumn(E,y+1,S);if(O%r!==0&&v.isCheapToTokenize(p-1)){let k=A.b.getEnterAction(this._opts.autoIndent,v,new x.a(p-1,v.getLineMaxColumn(p-1),p-1,v.getLineMaxColumn(p-1)));if(k){if(c=h,k.appendText)for(let Y=0,Q=k.appendText.length;Y<Q&&c<r&&k.appendText.charCodeAt(Y)===32;Y++)c++;k.removeText&&(c=Math.max(0,c-k.removeText));for(let Y=0;Y<c&&!(y===0||E.charCodeAt(y-1)!==32);Y++)y--}}}if(this._opts.isUnshift&&y===0)continue;let C;this._opts.isUnshift?C=L.unshiftIndent(E,y+1,S,r,_):C=L.shiftIndent(E,y+1,S,r,_),this._addEditOperation(m,new x.a(p,1,p,y+1),C),p===d&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=y+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&v.getLineLength(d)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const h=_?I(" ",r):" ";for(let c=d;c<=D;c++){const p=v.getLineContent(c);let E=f.u(p);if(this._opts.isUnshift&&(p.length===0||E===0))continue;if(!b&&!this._opts.isUnshift&&p.length===0)continue;if(E===-1&&(E=p.length),this._opts.isUnshift&&E===0)continue;if(this._opts.isUnshift){E=Math.min(E,r);for(let y=0;y<E;y++){const C=p.charCodeAt(y);if(C===9){E=y+1;break}}this._addEditOperation(m,new x.a(c,1,c,E+1),"")}else this._addEditOperation(m,new x.a(c,1,c,1),h),c===d&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=m.trackSelection(this._selection)}computeCursorState(v,m){if(this._useLastEditRangeForCursorEndPosition){let D=m.getInverseEditOperations()[0];return new N.a(D.range.endLineNumber,D.range.endColumn,D.range.endLineNumber,D.range.endColumn)}const d=m.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){let D=this._selection.startColumn,S=d.startColumn;return S<=D?d:d.getDirection()===0?new N.a(d.startLineNumber,D,d.endLineNumber,d.endColumn):new N.a(d.endLineNumber,d.endColumn,d.startLineNumber,D)}return d}}},zQEy:function(mt,M,t){"use strict";t.r(M);var f=t("+hIS");Object(f.a)({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:function(){return t.e(333).then(t.bind(null,"On+f"))}})},zdb4:function(mt,M,t){"use strict";t.d(M,"b",function(){return f}),t.d(M,"c",function(){return B}),t.d(M,"a",function(){return x});const f={ctrlCmd:!1,alt:!1};var B;(function(N){N[N.Blur=1]="Blur",N[N.Gesture=2]="Gesture",N[N.Other=3]="Other"})(B||(B={}));var x;(function(N){N[N.NONE=0]="NONE",N[N.FIRST=1]="FIRST",N[N.SECOND=2]="SECOND",N[N.LAST=3]="LAST"})(x||(x={}))},zrhQ:function(mt,M,t){"use strict";t.d(M,"c",function(){return B}),t.d(M,"b",function(){return N}),t.d(M,"a",function(){return A});function f(F,I){const L=Math.pow(10,I);return Math.round(F*L)/L}class B{constructor(F,I,L,v=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,F))|0,this.g=Math.min(255,Math.max(0,I))|0,this.b=Math.min(255,Math.max(0,L))|0,this.a=f(Math.max(Math.min(1,v),0),3)}static equals(F,I){return F.r===I.r&&F.g===I.g&&F.b===I.b&&F.a===I.a}}class x{constructor(F,I,L,v){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,F),0)|0,this.s=f(Math.max(Math.min(1,I),0),3),this.l=f(Math.max(Math.min(1,L),0),3),this.a=f(Math.max(Math.min(1,v),0),3)}static equals(F,I){return F.h===I.h&&F.s===I.s&&F.l===I.l&&F.a===I.a}static fromRGBA(F){const I=F.r/255,L=F.g/255,v=F.b/255,m=F.a,d=Math.max(I,L,v),D=Math.min(I,L,v);let S=0,r=0;const _=(D+d)/2,b=d-D;if(b>0){r=Math.min(_<=.5?b/(2*_):b/(2-2*_),1);switch(d){case I:S=(L-v)/b+(L<v?6:0);break;case L:S=(v-I)/b+2;break;case v:S=(I-L)/b+4;break}S*=60,S=Math.round(S)}return new x(S,r,_,m)}static _hue2rgb(F,I,L){return L<0&&(L+=1),L>1&&(L-=1),L<1/6?F+(I-F)*6*L:L<1/2?I:L<2/3?F+(I-F)*(2/3-L)*6:F}static toRGBA(F){const I=F.h/360,{s:L,l:v,a:m}=F;let d,D,S;if(L===0)d=D=S=v;else{const r=v<.5?v*(1+L):v+L-v*L,_=2*v-r;d=x._hue2rgb(_,r,I+1/3),D=x._hue2rgb(_,r,I),S=x._hue2rgb(_,r,I-1/3)}return new B(Math.round(d*255),Math.round(D*255),Math.round(S*255),m)}}class N{constructor(F,I,L,v){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,F),0)|0,this.s=f(Math.max(Math.min(1,I),0),3),this.v=f(Math.max(Math.min(1,L),0),3),this.a=f(Math.max(Math.min(1,v),0),3)}static equals(F,I){return F.h===I.h&&F.s===I.s&&F.v===I.v&&F.a===I.a}static fromRGBA(F){const I=F.r/255,L=F.g/255,v=F.b/255,m=Math.max(I,L,v),d=Math.min(I,L,v),D=m-d,S=m===0?0:D/m;let r;return D===0?r=0:m===I?r=((L-v)/D%6+6)%6:m===L?r=(v-I)/D+2:r=(I-L)/D+4,new N(Math.round(r*60),S,m,F.a)}static toRGBA(F){const{h:I,s:L,v,a:m}=F,d=v*L,D=d*(1-Math.abs(I/60%2-1)),S=v-d;let[r,_,b]=[0,0,0];return I<60?(r=d,_=D):I<120?(r=D,_=d):I<180?(_=d,b=D):I<240?(_=D,b=d):I<300?(r=D,b=d):I<=360&&(r=d,b=D),r=Math.round((r+S)*255),_=Math.round((_+S)*255),b=Math.round((b+S)*255),new B(r,_,b,m)}}class A{constructor(F){if(F)if(F instanceof B)this.rgba=F;else if(F instanceof x)this._hsla=F,this.rgba=x.toRGBA(F);else if(F instanceof N)this._hsva=F,this.rgba=N.toRGBA(F);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}static fromHex(F){return A.Format.CSS.parseHex(F)||A.red}get hsla(){return this._hsla?this._hsla:x.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:N.fromRGBA(this.rgba)}equals(F){return!!F&&B.equals(this.rgba,F.rgba)&&x.equals(this.hsla,F.hsla)&&N.equals(this.hsva,F.hsva)}getRelativeLuminance(){const F=A._relativeLuminanceForComponent(this.rgba.r),I=A._relativeLuminanceForComponent(this.rgba.g),L=A._relativeLuminanceForComponent(this.rgba.b),v=.2126*F+.7152*I+.0722*L;return f(v,4)}static _relativeLuminanceForComponent(F){const I=F/255;return I<=.03928?I/12.92:Math.pow((I+.055)/1.055,2.4)}isLighter(){const F=(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3;return F>=128}isLighterThan(F){const I=this.getRelativeLuminance(),L=F.getRelativeLuminance();return I>L}isDarkerThan(F){const I=this.getRelativeLuminance(),L=F.getRelativeLuminance();return I<L}lighten(F){return new A(new x(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*F,this.hsla.a))}darken(F){return new A(new x(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*F,this.hsla.a))}transparent(F){const{r:I,g:L,b:v,a:m}=this.rgba;return new A(new B(I,L,v,m*F))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new A(new B(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}toString(){return this._toString||(this._toString=A.Format.CSS.format(this)),this._toString}static getLighterColor(F,I,L){if(F.isLighterThan(I))return F;L=L||.5;const v=F.getRelativeLuminance(),m=I.getRelativeLuminance();return L=L*(m-v)/m,F.lighten(L)}static getDarkerColor(F,I,L){if(F.isDarkerThan(I))return F;L=L||.5;const v=F.getRelativeLuminance(),m=I.getRelativeLuminance();return L=L*(v-m)/v,F.darken(L)}}A.white=new A(new B(255,255,255,1)),A.black=new A(new B(0,0,0,1)),A.red=new A(new B(255,0,0,1)),A.blue=new A(new B(0,0,255,1)),A.cyan=new A(new B(0,255,255,1)),A.lightgrey=new A(new B(211,211,211,1)),A.transparent=new A(new B(0,0,0,0)),function(F){let I;(function(L){let v;(function(m){function d(y){return y.rgba.a===1?`rgb(${y.rgba.r}, ${y.rgba.g}, ${y.rgba.b})`:F.Format.CSS.formatRGBA(y)}m.formatRGB=d;function D(y){return`rgba(${y.rgba.r}, ${y.rgba.g}, ${y.rgba.b}, ${+y.rgba.a.toFixed(2)})`}m.formatRGBA=D;function S(y){return y.hsla.a===1?`hsl(${y.hsla.h}, ${(y.hsla.s*100).toFixed(2)}%, ${(y.hsla.l*100).toFixed(2)}%)`:F.Format.CSS.formatHSLA(y)}m.formatHSL=S;function r(y){return`hsla(${y.hsla.h}, ${(y.hsla.s*100).toFixed(2)}%, ${(y.hsla.l*100).toFixed(2)}%, ${y.hsla.a.toFixed(2)})`}m.formatHSLA=r;function _(y){const C=y.toString(16);return C.length!==2?"0"+C:C}function b(y){return`#${_(y.rgba.r)}${_(y.rgba.g)}${_(y.rgba.b)}`}m.formatHex=b;function h(y,C=!1){return C&&y.rgba.a===1?F.Format.CSS.formatHex(y):`#${_(y.rgba.r)}${_(y.rgba.g)}${_(y.rgba.b)}${_(Math.round(y.rgba.a*255))}`}m.formatHexA=h;function c(y){return y.isOpaque()?F.Format.CSS.formatHex(y):F.Format.CSS.formatRGBA(y)}m.format=c;function p(y){const C=y.length;if(C===0)return null;if(y.charCodeAt(0)!==35)return null;if(C===7){const O=16*E(y.charCodeAt(1))+E(y.charCodeAt(2)),k=16*E(y.charCodeAt(3))+E(y.charCodeAt(4)),Y=16*E(y.charCodeAt(5))+E(y.charCodeAt(6));return new F(new B(O,k,Y,1))}if(C===9){const O=16*E(y.charCodeAt(1))+E(y.charCodeAt(2)),k=16*E(y.charCodeAt(3))+E(y.charCodeAt(4)),Y=16*E(y.charCodeAt(5))+E(y.charCodeAt(6)),Q=16*E(y.charCodeAt(7))+E(y.charCodeAt(8));return new F(new B(O,k,Y,Q/255))}if(C===4){const O=E(y.charCodeAt(1)),k=E(y.charCodeAt(2)),Y=E(y.charCodeAt(3));return new F(new B(16*O+O,16*k+k,16*Y+Y))}if(C===5){const O=E(y.charCodeAt(1)),k=E(y.charCodeAt(2)),Y=E(y.charCodeAt(3)),Q=E(y.charCodeAt(4));return new F(new B(16*O+O,16*k+k,16*Y+Y,(16*Q+Q)/255))}return null}m.parseHex=p;function E(y){switch(y){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(v=L.CSS||(L.CSS={}))})(I=F.Format||(F.Format={}))}(A||(A={}))}}]);
|