=J)break;J=H,M++}}return T===0?null:(E.length=T,N.length=T,v=a.breakOffsets,u=a.breakOffsetsVisibleColumn,a.breakOffsets=E,a.breakOffsetsVisibleColumn=N,a.wrappedTextIndentLength=S,a)}function n(d,a,s,o,c,f,p){const _=k.LineInjectedText.applyInjectedText(a,s);let m,h;if(s&&s.length>0?(m=s.map(V=>V.options),h=s.map(V=>V.column-1)):(m=null,h=null),c===-1)return m?new I.ModelLineProjectionData(h,m,[_.length],[],0):null;const S=_.length;if(S<=1)return m?new I.ModelLineProjectionData(h,m,[_.length],[],0):null;const y=l(_,o,c,f,p),E=c-y,N=[],T=[];let R=0,F=0,O=0,D=c,M=_.charCodeAt(0),P=d.get(M),B=i(M,0,o,f),W=1;w.isHighSurrogate(M)&&(B+=1,M=_.charCodeAt(1),P=d.get(M),W++);for(let V=W;VD&&((F===0||B-O>E)&&(F=A,O=B-H),N[R]=F,T[R]=O,R++,D=O+E,F=0),M=Q,P=J}return R===0&&(!s||s.length===0)?null:(N[R]=S,T[R]=B,new I.ModelLineProjectionData(h,m,N,T,y))}function i(d,a,s,o){return d===9?s-a%s:w.isFullWidthCharacter(d)||d<32?o:1}function t(d,a){return a-d%a}function r(d,a,s,o){return s!==32&&(a===2&&o!==2||a!==1&&o===1||a===3&&o!==2||o===3&&a!==1)}function l(d,a,s,o,c){let f=0;if(c!==0){const p=w.firstNonWhitespaceIndex(d);if(p!==-1){for(let m=0;ms&&(f=0)}}return f}}),define(re[245],ae([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewZoneManager=e.OverviewRulerZone=e.ColorZone=void 0;class w{constructor(L,b,v){this._colorZoneBrand=void 0,this.from=L|0,this.to=b|0,this.colorId=v|0}static compare(L,b){return L.colorId===b.colorId?L.from===b.from?L.to-b.to:L.from-b.from:L.colorId-b.colorId}}e.ColorZone=w;class C{constructor(L,b,v,u){this._overviewRulerZoneBrand=void 0,this.startLineNumber=L,this.endLineNumber=b,this.heightInLines=v,this.color=u,this._colorZone=null}static compare(L,b){return L.color===b.color?L.startLineNumber===b.startLineNumber?L.heightInLines===b.heightInLines?L.endLineNumber-b.endLineNumber:L.heightInLines-b.heightInLines:L.startLineNumber-b.startLineNumber:L.colorv&&(c=v-f);const p=l.color;let _=this._color2Id[p];_||(_=++this._lastAssignedId,this._color2Id[p]=_,this._id2Color[_]=p);const m=new w(c-f,c+f,_);l.setColorZone(m),i.push(m)}return this._colorZonesInvalid=!1,i.sort(w.compare),i}}e.OverviewZoneManager=k}),define(re[446],ae([1,0,33,245,129]),function($,e,w,C,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRuler=void 0;class I extends k.ViewEventHandler{constructor(b,v){super();this._context=b;const u=this._context.configuration.options;this._domNode=(0,w.createFastDomNode)(document.createElement("canvas")),this._domNode.setClassName(v),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new C.OverviewZoneManager(g=>this._context.viewLayout.getVerticalOffsetForLineNumber(g)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(u.get(61)),this._zoneManager.setPixelRatio(u.get(131)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(b){const v=this._context.configuration.options;return b.hasChanged(61)&&(this._zoneManager.setLineHeight(v.get(61)),this._render()),b.hasChanged(131)&&(this._zoneManager.setPixelRatio(v.get(131)),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(b){return this._render(),!0}onScrollChanged(b){return b.scrollHeightChanged&&(this._zoneManager.setOuterHeight(b.scrollHeight),this._render()),!0}onZonesChanged(b){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(b){this._domNode.setTop(b.top),this._domNode.setRight(b.right);let v=!1;v=this._zoneManager.setDOMWidth(b.width)||v,v=this._zoneManager.setDOMHeight(b.height)||v,v&&(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(b){this._zoneManager.setZones(b),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const b=this._zoneManager.getCanvasWidth(),v=this._zoneManager.getCanvasHeight(),u=this._zoneManager.resolveColorZones(),g=this._zoneManager.getId2Color(),n=this._domNode.domNode.getContext("2d");return n.clearRect(0,0,b,v),u.length>0&&this._renderOneLane(n,u,g,b),!0}_renderOneLane(b,v,u,g){let n=0,i=0,t=0;for(const r of v){const l=r.colorId,d=r.from,a=r.to;l!==n?(b.fillRect(0,i,g,t-i),n=l,b.fillStyle=u[n],i=d,t=a):t>=d?t=Math.max(t,a):(b.fillRect(0,i,g,t-i),i=d,t=a)}b.fillRect(0,i,g,t-i)}}e.OverviewRuler=I}),define(re[447],ae([1,0,410]),function($,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=void 0;class C{constructor(I,L,b){this.configuration=I,this.theme=new w.EditorTheme(L),this.viewModel=b,this.viewLayout=b.viewLayout}addEventHandler(I){this.viewModel.addViewEventHandler(I)}removeEventHandler(I){this.viewModel.removeViewEventHandler(I)}}e.ViewContext=C}),define(re[448],ae([1,0,3,23]),function($,e,w,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveCaretCommand=void 0;class k{constructor(L,b){this._selection=L,this._isMovingLeft=b}getEditOperations(L,b){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const v=this._selection.startLineNumber,u=this._selection.startColumn,g=this._selection.endColumn;if(!(this._isMovingLeft&&u===1)&&!(!this._isMovingLeft&&g===L.getLineMaxColumn(v)))if(this._isMovingLeft){const n=new w.Range(v,u-1,v,u),i=L.getValueInRange(n);b.addEditOperation(n,null),b.addEditOperation(new w.Range(v,g,v,g),i)}else{const n=new w.Range(v,g,v,g+1),i=L.getValueInRange(n);b.addEditOperation(n,null),b.addEditOperation(new w.Range(v,u,v,u),i)}}computeCursorState(L,b){return this._isMovingLeft?new C.Selection(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new C.Selection(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}e.MoveCaretCommand=k}),define(re[131],ae([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionCommandArgs=e.filtersAction=e.mayIncludeActionsOfKind=e.CodeActionTriggerSource=e.CodeActionKind=void 0;class w{constructor(u){this.value=u}equals(u){return this.value===u.value}contains(u){return this.equals(u)||this.value===""||u.value.startsWith(this.value+w.sep)}intersects(u){return this.contains(u)||u.contains(this)}append(u){return new w(this.value+w.sep+u)}}e.CodeActionKind=w,w.sep=".",w.None=new w("@@none@@"),w.Empty=new w(""),w.QuickFix=new w("quickfix"),w.Refactor=new w("refactor"),w.Source=new w("source"),w.SourceOrganizeImports=w.Source.append("organizeImports"),w.SourceFixAll=w.Source.append("fixAll");var C;(function(v){v.Refactor="refactor",v.RefactorPreview="refactor preview",v.Lightbulb="lightbulb",v.Default="other (default)",v.SourceAction="source action",v.QuickFix="quick fix action",v.FixAll="fix all",v.OrganizeImports="organize imports",v.AutoFix="auto fix",v.QuickFixHover="quick fix hover window",v.OnSave="save participants",v.ProblemsView="problems view"})(C=e.CodeActionTriggerSource||(e.CodeActionTriggerSource={}));function k(v,u){return!(v.include&&!v.include.intersects(u)||v.excludes&&v.excludes.some(g=>L(u,g,v.include))||!v.includeSourceActions&&w.Source.contains(u))}e.mayIncludeActionsOfKind=k;function I(v,u){const g=u.kind?new w(u.kind):void 0;return!(v.include&&(!g||!v.include.contains(g))||v.excludes&&g&&v.excludes.some(n=>L(g,n,v.include))||!v.includeSourceActions&&g&&w.Source.contains(g)||v.onlyIncludePreferredActions&&!u.isPreferred)}e.filtersAction=I;function L(v,u,g){return!(!u.contains(v)||g&&u.contains(g))}class b{constructor(u,g,n){this.kind=u,this.apply=g,this.preferred=n}static fromUser(u,g){return!u||typeof u!="object"?new b(g.kind,g.apply,!1):new b(b.getKindFromUser(u,g.kind),b.getApplyFromUser(u,g.apply),b.getPreferredUser(u))}static getApplyFromUser(u,g){switch(typeof u.apply=="string"?u.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return g}}static getKindFromUser(u,g){return typeof u.kind=="string"?new w(u.kind):g}static getPreferredUser(u){return typeof u.preferred=="boolean"?u.preferred:!1}}e.CodeActionCommandArgs=b}),define(re[246],ae([1,0,60,11,3,23]),function($,e,w,C,k,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockCommentCommand=void 0;class L{constructor(v,u,g){this.languageConfigurationService=g,this._selection=v,this._insertSpace=u,this._usedEndToken=null}static _haystackHasNeedleAtOffset(v,u,g){if(g<0)return!1;const n=u.length,i=v.length;if(g+n>i)return!1;for(let t=0;t=65&&r<=90&&r+32===l)&&!(l>=65&&l<=90&&l+32===r))return!1}return!0}_createOperationsForBlockComment(v,u,g,n,i,t){const r=v.startLineNumber,l=v.startColumn,d=v.endLineNumber,a=v.endColumn,s=i.getLineContent(r),o=i.getLineContent(d);let c=s.lastIndexOf(u,l-1+u.length),f=o.indexOf(g,a-1-g.length);if(c!==-1&&f!==-1)if(r===d)s.substring(c+u.length,f).indexOf(g)>=0&&(c=-1,f=-1);else{const _=s.substring(c+u.length),m=o.substring(0,f);(_.indexOf(g)>=0||m.indexOf(g)>=0)&&(c=-1,f=-1)}let p;c!==-1&&f!==-1?(n&&c+u.length0&&o.charCodeAt(f-1)===32&&(g=" "+g,f-=1),p=L._createRemoveBlockCommentOperations(new k.Range(r,c+u.length+1,d,f+1),u,g)):(p=L._createAddBlockCommentOperations(v,u,g,this._insertSpace),this._usedEndToken=p.length===1?g:null);for(const _ of p)t.addTrackedEditOperation(_.range,_.text)}static _createRemoveBlockCommentOperations(v,u,g){const n=[];return k.Range.isEmpty(v)?n.push(w.EditOperation.delete(new k.Range(v.startLineNumber,v.startColumn-u.length,v.endLineNumber,v.endColumn+g.length))):(n.push(w.EditOperation.delete(new k.Range(v.startLineNumber,v.startColumn-u.length,v.startLineNumber,v.startColumn))),n.push(w.EditOperation.delete(new k.Range(v.endLineNumber,v.endColumn,v.endLineNumber,v.endColumn+g.length)))),n}static _createAddBlockCommentOperations(v,u,g,n){const i=[];return k.Range.isEmpty(v)?i.push(w.EditOperation.replace(new k.Range(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn),u+" "+g)):(i.push(w.EditOperation.insert(new C.Position(v.startLineNumber,v.startColumn),u+(n?" ":""))),i.push(w.EditOperation.insert(new C.Position(v.endLineNumber,v.endColumn),(n?" ":"")+g))),i}getEditOperations(v,u){const g=this._selection.startLineNumber,n=this._selection.startColumn;v.tokenization.tokenizeIfCheap(g);const i=v.getLanguageIdAtPosition(g,n),t=this.languageConfigurationService.getLanguageConfiguration(i).comments;!t||!t.blockCommentStartToken||!t.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,t.blockCommentStartToken,t.blockCommentEndToken,this._insertSpace,v,u)}computeCursorState(v,u){const g=u.getInverseEditOperations();if(g.length===2){const n=g[0],i=g[1];return new I.Selection(n.range.endLineNumber,n.range.endColumn,i.range.startLineNumber,i.range.startColumn)}else{const n=g[0].range,i=this._usedEndToken?-this._usedEndToken.length-1:0;return new I.Selection(n.endLineNumber,n.endColumn+i,n.endLineNumber,n.endColumn+i)}}}e.BlockCommentCommand=L}),define(re[449],ae([1,0,8,60,11,3,23,246]),function($,e,w,C,k,I,L,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineCommentCommand=void 0;class v{constructor(g,n,i,t,r,l,d){this.languageConfigurationService=g,this._selection=n,this._tabSize=i,this._type=t,this._insertSpace=r,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=l,this._ignoreFirstLine=d||!1}static _gatherPreflightCommentStrings(g,n,i,t){g.tokenization.tokenizeIfCheap(n);const r=g.getLanguageIdAtPosition(n,1),l=t.getLanguageConfiguration(r).comments,d=l?l.lineCommentToken:null;if(!d)return null;const a=[];for(let s=0,o=i-n+1;sr?n[a].commentStrOffset=l-1:n[a].commentStrOffset=l}}}e.LineCommentCommand=v}),define(re[450],ae([1,0,3,23]),function($,e,w,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropCommand=void 0;class k{constructor(L,b,v){this.selection=L,this.targetPosition=b,this.copy=v,this.targetSelection=null}getEditOperations(L,b){const v=L.getValueInRange(this.selection);if(this.copy||b.addEditOperation(this.selection,null),b.addEditOperation(new w.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),v),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 C.Selection(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 C.Selection(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.lineNumber0){const b=[];for(let g=0;gw.Range.compareRangesUsingStarts(g.range,n.range));const v=[];let u=b[0];for(let g=1;g0){const a=[],s=l.caseOps.length;let o=0;for(let c=0,f=d.length;c=s){a.push(d.slice(c));break}switch(l.caseOps[o]){case"U":a.push(d[c].toUpperCase());break;case"u":a.push(d[c].toUpperCase()),o++;break;case"L":a.push(d[c].toLowerCase());break;case"l":a.push(d[c].toLowerCase()),o++;break;default:a.push(d[c])}}d=a.join("")}i+=d}return i}static _substitute(g,n){if(n===null)return"";if(g===0)return n[0];let i="";for(;g>0;){if(g=t)break;const l=u.charCodeAt(i);switch(l){case 92:n.emitUnchanged(i-1),n.emitStatic("\\",i+1);break;case 110:n.emitUnchanged(i-1),n.emitStatic(`
+`,i+1);break;case 116:n.emitUnchanged(i-1),n.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:n.emitUnchanged(i-1),n.emitStatic("",i+1),g.push(String.fromCharCode(l));break}continue}if(r===36){if(i++,i>=t)break;const l=u.charCodeAt(i);if(l===36){n.emitUnchanged(i-1),n.emitStatic("$",i+1);continue}if(l===48||l===38){n.emitUnchanged(i-1),n.emitMatchIndex(0,i+1,g),g.length=0;continue}if(49<=l&&l<=57){let d=l-48;if(i+1e.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=b,this._endIndexes=v,this._collapseStates=new C(b.length),this._userDefinedStates=new C(b.length),this._recoveredStates=new C(b.length),this._types=u,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const b=[],v=(u,g)=>{const n=b[b.length-1];return this.getStartLineNumber(n)<=u&&this.getEndLineNumber(n)>=g};for(let u=0,g=this._startIndexes.length;ue.MAX_LINE_NUMBER||i>e.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+e.MAX_LINE_NUMBER);for(;b.length>0&&!v(n,i);)b.pop();const t=b.length>0?b[b.length-1]:-1;b.push(u),this._startIndexes[u]=n+((t&255)<<24),this._endIndexes[u]=i+((t&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(b){return this._startIndexes[b]&e.MAX_LINE_NUMBER}getEndLineNumber(b){return this._endIndexes[b]&e.MAX_LINE_NUMBER}getType(b){return this._types?this._types[b]:void 0}hasTypes(){return!!this._types}isCollapsed(b){return this._collapseStates.get(b)}setCollapsed(b,v){this._collapseStates.set(b,v)}isUserDefined(b){return this._userDefinedStates.get(b)}setUserDefined(b,v){return this._userDefinedStates.set(b,v)}isRecovered(b){return this._recoveredStates.get(b)}setRecovered(b,v){return this._recoveredStates.set(b,v)}getSource(b){return this.isUserDefined(b)?1:this.isRecovered(b)?2:0}setSource(b,v){v===1?(this.setUserDefined(b,!0),this.setRecovered(b,!1)):v===2?(this.setUserDefined(b,!1),this.setRecovered(b,!0)):(this.setUserDefined(b,!1),this.setRecovered(b,!1))}setCollapsedAllOfType(b,v){let u=!1;if(this._types)for(let g=0;g>>24)+((this._endIndexes[b]&w)>>>16);return v===e.MAX_FOLDING_REGIONS?-1:v}contains(b,v){return this.getStartLineNumber(b)<=v&&this.getEndLineNumber(b)>=v}findIndex(b){let v=0,u=this._startIndexes.length;if(u===0)return-1;for(;v=0){if(this.getEndLineNumber(v)>=b)return v;for(v=this.getParentIndex(v);v!==-1;){if(this.contains(v,b))return v;v=this.getParentIndex(v)}}return-1}toString(){const b=[];for(let v=0;vArray.isArray(f)?_=>__
=d.startLineNumber))l&&l.startLineNumber===d.startLineNumber?(d.source===1?f=d:(f=l,f.isCollapsed=d.isCollapsed&&l.endLineNumber===d.endLineNumber,f.source=0),l=n(++t)):(f=d,d.isCollapsed&&d.source===0&&(f.source=2)),d=i(++r);else{let p=r,_=d;for(;;){if(!_||_.startLineNumber>l.endLineNumber){f=l;break}if(_.source===1&&_.endLineNumber>l.endLineNumber)break;_=i(++p)}l=n(++t)}if(f){for(;s&&s.endLineNumberf.startLineNumber&&f.startLineNumber>o&&f.endLineNumber<=u&&(!s||s.endLineNumber>=f.endLineNumber)&&(c.push(f),o=f.startLineNumber,s&&a.push(s),s=f)}}return c}}e.FoldingRegions=k;class I{constructor(b,v){this.ranges=b,this.index=v}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(b){return b.startLineNumber<=this.startLineNumber&&b.endLineNumber>=this.endLineNumber}containsLine(b){return this.startLineNumber<=b&&b<=this.endLineNumber}}e.FoldingRegion=I}),define(re[453],ae([1,0,184,160]),function($,e,w,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeRanges=e.RangesCollector=e.IndentRangeProvider=e.ID_INDENT_PROVIDER=void 0;const k=5e3;e.ID_INDENT_PROVIDER="indent";class I{constructor(u,g,n){this.editorModel=u,this.languageConfigurationService=g,this.maxFoldingRegions=n,this.id=e.ID_INDENT_PROVIDER}dispose(){}compute(u,g){const n=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,i=n&&!!n.offSide,t=n&&n.markers;return Promise.resolve(b(this.editorModel,i,t,this.maxFoldingRegions,g))}}e.IndentRangeProvider=I;class L{constructor(u,g){this._notifyTooManyRegions=g,this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=u}insertFirst(u,g,n){if(u>C.MAX_LINE_NUMBER||g>C.MAX_LINE_NUMBER)return;const i=this._length;this._startIndexes[i]=u,this._endIndexes[i]=g,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(u){var g;if(this._length<=this._foldingRangesLimit){const n=new Uint32Array(this._length),i=new Uint32Array(this._length);for(let t=this._length-1,r=0;t>=0;t--,r++)n[r]=this._startIndexes[t],i[r]=this._endIndexes[t];return new C.FoldingRegions(n,i)}else{(g=this._notifyTooManyRegions)===null||g===void 0||g.call(this,this._foldingRangesLimit);let n=0,i=this._indentOccurrences.length;for(let d=0;dthis._foldingRangesLimit){i=d;break}n+=a}}const t=u.getOptions().tabSize,r=new Uint32Array(this._foldingRangesLimit),l=new Uint32Array(this._foldingRangesLimit);for(let d=this._length-1,a=0;d>=0;d--){const s=this._startIndexes[d],o=u.getLineContent(s),c=(0,w.computeIndentLevel)(o,t);(c0;s--){const o=v.getLineContent(s),c=(0,w.computeIndentLevel)(o,t);let f=d[d.length-1];if(c===-1){u&&(f.endAbove=s);continue}let p;if(l&&(p=o.match(l)))if(p[1]){let _=d.length-1;for(;_>0&&d[_].indent!==-2;)_--;if(_>0){d.length=_+1,f=d[_],r.insertFirst(s,f.line,c),f.line=s,f.indent=c,f.endAbove=s;continue}}else{d.push({indent:-2,endAbove:s,line:s});continue}if(f.indent>c){do d.pop(),f=d[d.length-1];while(f.indent>c);const _=f.endAbove-1;_-s>=1&&r.insertFirst(s,_,c)}f.indent===c?f.endAbove=s:d.push({indent:c,endAbove:s,line:s})}return r.toIndentRanges(v)}e.computeRanges=b}),define(re[454],ae([1,0,14,2,160]),function($,e,w,C,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeRanges=e.RangesCollector=e.SyntaxRangeProvider=e.ID_SYNTAX_PROVIDER=void 0;const I={};e.ID_SYNTAX_PROVIDER="syntax";class L{constructor(n,i,t,r){this.editorModel=n,this.providers=i,this.limit=r,this.id=e.ID_SYNTAX_PROVIDER;for(const l of i)typeof l.onDidChange=="function"&&(this.disposables||(this.disposables=new C.DisposableStore),this.disposables.add(l.onDidChange(t)))}compute(n,i){return b(this.providers,this.editorModel,n).then(t=>t?u(t,this.limit,i):null)}dispose(){var n;(n=this.disposables)===null||n===void 0||n.dispose()}}e.SyntaxRangeProvider=L;function b(g,n,i){let t=null;const r=g.map((l,d)=>Promise.resolve(l.provideFoldingRanges(n,I,i)).then(a=>{if(!i.isCancellationRequested&&Array.isArray(a)){Array.isArray(t)||(t=[]);const s=n.getLineCount();for(const o of a)o.start>0&&o.end>o.start&&o.end<=s&&t.push({start:o.start,end:o.end,rank:d,kind:o.kind})}},w.onUnexpectedExternalError));return Promise.all(r).then(l=>t)}class v{constructor(n,i){this._notifyTooManyRegions=i,this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=n}add(n,i,t,r){if(n>k.MAX_LINE_NUMBER||i>k.MAX_LINE_NUMBER)return;const l=this._length;this._startIndexes[l]=n,this._endIndexes[l]=i,this._nestingLevels[l]=r,this._types[l]=t,this._length++,r<30&&(this._nestingLevelCounts[r]=(this._nestingLevelCounts[r]||0)+1)}toIndentRanges(){var n;if(this._length<=this._foldingRangesLimit){const i=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let r=0;rthis._foldingRangesLimit){t=a;break}i+=s}}const r=new Uint32Array(this._foldingRangesLimit),l=new Uint32Array(this._foldingRangesLimit),d=[];for(let a=0,s=0;a{let o=a.start-s.start;return o===0&&(o=a.rank-s.rank),o}),r=new v(n,i);let l;const d=[];for(const a of t)if(!l)l=a,r.add(a.start,a.end,a.kind&&a.kind.value,d.length);else if(a.start>l.start)if(a.end<=l.end)d.push(l),l=a,r.add(a.start,a.end,a.kind&&a.kind.value,d.length);else{if(a.start>l.end){do l=d.pop();while(l&&a.start>l.end);l&&d.push(l),l=a}r.add(a.start,a.end,a.kind&&a.kind.value,d.length)}return r.toIndentRanges()}e.sanitizeRanges=u}),define(re[247],ae([1,0,60,3]),function($,e,w,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingEdit=void 0;class k{static _handleEolEdits(L,b){let v;const u=[];for(const g of b)typeof g.eol=="number"&&(v=g.eol),g.range&&typeof g.text=="string"&&u.push(g);return typeof v=="number"&&L.hasModel()&&L.getModel().pushEOL(v),u}static _isFullModelReplaceEdit(L,b){if(!L.hasModel())return!1;const v=L.getModel(),u=v.validateRange(b.range);return v.getFullModelRange().equalsRange(u)}static execute(L,b,v){v&&L.pushUndoStop();const u=k._handleEolEdits(L,b);u.length===1&&k._isFullModelReplaceEdit(L,u[0])?L.executeEdits("formatEditsCommand",u.map(g=>w.EditOperation.replace(C.Range.lift(g.range),g.text))):L.executeEdits("formatEditsCommand",u.map(g=>w.EditOperation.replaceMove(C.Range.lift(g.range),g.text))),v&&L.pushUndoStop()}}e.FormattingEdit=k}),define(re[88],ae([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverParticipantRegistry=e.HoverForeignElementAnchor=e.HoverRangeAnchor=void 0;class w{constructor(I,L){this.priority=I,this.range=L,this.type=1}equals(I){return I.type===1&&this.range.equalsRange(I.range)}canAdoptVisibleHover(I,L){return I.type===1&&L.lineNumber===this.range.startLineNumber}}e.HoverRangeAnchor=w;class C{constructor(I,L,b){this.priority=I,this.owner=L,this.range=b,this.type=2}equals(I){return I.type===2&&this.owner===I.owner}canAdoptVisibleHover(I,L){return I.type===2&&this.owner===I.owner}}e.HoverForeignElementAnchor=C,e.HoverParticipantRegistry=new class{constructor(){this._participants=[]}register(I){this._participants.push(I)}getAll(){return this._participants}}}),define(re[455],ae([1,0,23]),function($,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InPlaceReplaceCommand=void 0;class C{constructor(I,L,b){this._editRange=I,this._originalSelection=L,this._text=b}getEditOperations(I,L){L.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(I,L){const v=L.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new w.Selection(v.endLineNumber,Math.min(this._originalSelection.positionColumn,v.endColumn),v.endLineNumber,Math.min(this._originalSelection.positionColumn,v.endColumn)):new w.Selection(v.endLineNumber,v.endColumn-this._text.length,v.endLineNumber,v.endColumn)}}e.InPlaceReplaceCommand=C}),define(re[248],ae([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateIndent=e.getSpaceCnt=void 0;function w(k,I){let L=0;for(let b=0;bu==null?void 0:u.dispose()}}e.createDisposableRef=C;function k(v,u){const g=new I(v),n=u.map(i=>{const t=w.Range.lift(i.range);return{startOffset:g.getOffset(t.getStartPosition()),endOffset:g.getOffset(t.getEndPosition()),text:i.text}});n.sort((i,t)=>t.startOffset-i.startOffset);for(const i of n)v=v.substring(0,i.startOffset)+i.text+v.substring(i.endOffset);return v}e.applyEdits=k;class I{constructor(u){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let g=0;g=n)return null;const i=[];for(let r=g;r<=n;r++)i.push(b.getLineContent(r));let t=i.slice(0);return t.sort(k.getCollator().compare),u===!0&&(t=t.reverse()),{startLineNumber:g,endLineNumber:n,before:i,after:t}}function L(b,v,u){const g=I(b,v,u);return g?w.EditOperation.replace(new C.Range(g.startLineNumber,1,g.endLineNumber,b.getLineMaxColumn(g.endLineNumber)),g.after.join(`
+`)):null}}),define(re[249],ae([1,0,73,11,3]),function($,e,w,C,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketSelectionRangeProvider=void 0;class I{provideSelectionRanges(b,v){return Se(this,void 0,void 0,function*(){const u=[];for(const g of v){const n=[];u.push(n);const i=new Map;yield new Promise(t=>I._bracketsRightYield(t,0,b,g,i)),yield new Promise(t=>I._bracketsLeftYield(t,0,b,g,i,n))}return u})}static _bracketsRightYield(b,v,u,g,n){const i=new Map,t=Date.now();for(;;){if(v>=I._maxRounds){b();break}if(!g){b();break}const r=u.bracketPairs.findNextBracket(g);if(!r){b();break}if(Date.now()-t>I._maxDuration){setTimeout(()=>I._bracketsRightYield(b,v+1,u,g,n));break}if(r.bracketInfo.isOpeningBracket){const d=r.bracketInfo.bracketText,a=i.has(d)?i.get(d):0;i.set(d,a+1)}else{const d=r.bracketInfo.getClosedBrackets()[0].bracketText;let a=i.has(d)?i.get(d):0;if(a-=1,i.set(d,Math.max(0,a)),a<0){let s=n.get(d);s||(s=new w.LinkedList,n.set(d,s)),s.push(r.range)}}g=r.range.getEndPosition()}}static _bracketsLeftYield(b,v,u,g,n,i){const t=new Map,r=Date.now();for(;;){if(v>=I._maxRounds&&n.size===0){b();break}if(!g){b();break}const l=u.bracketPairs.findPrevBracket(g);if(!l){b();break}if(Date.now()-r>I._maxDuration){setTimeout(()=>I._bracketsLeftYield(b,v+1,u,g,n,i));break}if(l.bracketInfo.isOpeningBracket){const a=l.bracketInfo.bracketText;let s=t.has(a)?t.get(a):0;if(s-=1,t.set(a,Math.max(0,s)),s<0){const o=n.get(a);if(o){const c=o.shift();o.size===0&&n.delete(a);const f=k.Range.fromPositions(l.range.getEndPosition(),c.getStartPosition()),p=k.Range.fromPositions(l.range.getStartPosition(),c.getEndPosition());i.push({range:f}),i.push({range:p}),I._addBracketLeading(u,p,i)}}}else{const a=l.bracketInfo.getClosedBrackets()[0].bracketText,s=t.has(a)?t.get(a):0;t.set(a,s+1)}g=l.range.getStartPosition()}}static _addBracketLeading(b,v,u){if(v.startLineNumber===v.endLineNumber)return;const g=v.startLineNumber,n=b.getLineFirstNonWhitespaceColumn(g);n!==0&&n!==v.startColumn&&(u.push({range:k.Range.fromPositions(new C.Position(g,n),v.getEndPosition())}),u.push({range:k.Range.fromPositions(new C.Position(g,1),v.getEndPosition())}));const i=g-1;if(i>0){const t=b.getLineFirstNonWhitespaceColumn(i);t===v.startColumn&&t!==b.getLineLastNonWhitespaceColumn(i)&&(u.push({range:k.Range.fromPositions(new C.Position(i,t),v.getEndPosition())}),u.push({range:k.Range.fromPositions(new C.Position(i,1),v.getEndPosition())}))}}}e.BracketSelectionRangeProvider=I,I._maxDuration=30,I._maxRounds=2}),define(re[458],ae([1,0,8,3]),function($,e,w,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordSelectionRangeProvider=void 0;class k{provideSelectionRanges(L,b){const v=[];for(const u of b){const g=[];v.push(g),this._addInWordRanges(g,L,u),this._addWordRanges(g,L,u),this._addWhitespaceLine(g,L,u),g.push({range:L.getFullModelRange()})}return v}_addInWordRanges(L,b,v){const u=b.getWordAtPosition(v);if(!u)return;const{word:g,startColumn:n}=u,i=v.column-n;let t=i,r=i,l=0;for(;t>=0;t--){const d=g.charCodeAt(t);if(t!==i&&(d===95||d===45))break;if((0,w.isLowerAsciiLetter)(d)&&(0,w.isUpperAsciiLetter)(l))break;l=d}for(t+=1;r0&&b.getLineFirstNonWhitespaceColumn(v.lineNumber)===0&&b.getLineLastNonWhitespaceColumn(v.lineNumber)===0&&L.push({range:new C.Range(v.lineNumber,1,v.lineNumber,b.getLineMaxColumn(v.lineNumber))})}}e.WordSelectionRangeProvider=k}),define(re[89],ae([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetParser=e.TextmateSnippet=e.Variable=e.FormatString=e.Transform=e.Choice=e.Placeholder=e.TransformableMarker=e.Text=e.Marker=e.Scanner=void 0;class w{constructor(){this.value="",this.pos=0}static isDigitCharacter(l){return l>=48&&l<=57}static isVariableCharacter(l){return l===95||l>=97&&l<=122||l>=65&&l<=90}text(l){this.value=l,this.pos=0}tokenText(l){return this.value.substr(l.pos,l.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const l=this.pos;let d=0,a=this.value.charCodeAt(l),s;if(s=w._table[a],typeof s=="number")return this.pos+=1,{type:s,pos:l,len:1};if(w.isDigitCharacter(a)){s=8;do d+=1,a=this.value.charCodeAt(l+d);while(w.isDigitCharacter(a));return this.pos+=d,{type:s,pos:l,len:d}}if(w.isVariableCharacter(a)){s=9;do a=this.value.charCodeAt(l+ ++d);while(w.isVariableCharacter(a)||w.isDigitCharacter(a));return this.pos+=d,{type:s,pos:l,len:d}}s=10;do d+=1,a=this.value.charCodeAt(l+d);while(!isNaN(a)&&typeof w._table[a]=="undefined"&&!w.isDigitCharacter(a)&&!w.isVariableCharacter(a));return this.pos+=d,{type:s,pos:l,len:d}}}e.Scanner=w,w._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class C{constructor(){this._children=[]}appendChild(l){return l instanceof k&&this._children[this._children.length-1]instanceof k?this._children[this._children.length-1].value+=l.value:(l.parent=this,this._children.push(l)),this}replace(l,d){const{parent:a}=l,s=a.children.indexOf(l),o=a.children.slice(0);o.splice(s,1,...d),a._children=o,function c(f,p){for(const _ of f)_.parent=p,c(_.children,_)}(d,a)}get children(){return this._children}get snippet(){let l=this;for(;;){if(!l)return;if(l instanceof i)return l;l=l.parent}}toString(){return this.children.reduce((l,d)=>l+d.toString(),"")}len(){return 0}}e.Marker=C;class k extends C{constructor(l){super();this.value=l}toString(){return this.value}len(){return this.value.length}clone(){return new k(this.value)}}e.Text=k;class I extends C{}e.TransformableMarker=I;class L extends I{constructor(l){super();this.index=l}static compareByIndex(l,d){return l.index===d.index?0:l.isFinalTabstop?1:d.isFinalTabstop||l.indexd.index?1:0}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof b?this._children[0]:void 0}clone(){const l=new L(this.index);return this.transform&&(l.transform=this.transform.clone()),l._children=this.children.map(d=>d.clone()),l}}e.Placeholder=L;class b extends C{constructor(){super(...arguments);this.options=[]}appendChild(l){return l instanceof k&&(l.parent=this,this.options.push(l)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const l=new b;return this.options.forEach(l.appendChild,l),l}}e.Choice=b;class v extends C{constructor(){super(...arguments);this.regexp=new RegExp("")}resolve(l){const d=this;let a=!1,s=l.replace(this.regexp,function(){return a=!0,d._replace(Array.prototype.slice.call(arguments,0,-2))});return!a&&this._children.some(o=>o instanceof u&&Boolean(o.elseValue))&&(s=this._replace([])),s}_replace(l){let d="";for(const a of this._children)if(a instanceof u){let s=l[a.index]||"";s=a.resolve(s),d+=s}else d+=a.toString();return d}toString(){return""}clone(){const l=new v;return l.regexp=new RegExp(this.regexp.source,""+(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),l._children=this.children.map(d=>d.clone()),l}}e.Transform=v;class u extends C{constructor(l,d,a,s){super();this.index=l,this.shorthandName=d,this.ifValue=a,this.elseValue=s}resolve(l){return this.shorthandName==="upcase"?l?l.toLocaleUpperCase():"":this.shorthandName==="downcase"?l?l.toLocaleLowerCase():"":this.shorthandName==="capitalize"?l?l[0].toLocaleUpperCase()+l.substr(1):"":this.shorthandName==="pascalcase"?l?this._toPascalCase(l):"":this.shorthandName==="camelcase"?l?this._toCamelCase(l):"":Boolean(l)&&typeof this.ifValue=="string"?this.ifValue:!Boolean(l)&&typeof this.elseValue=="string"?this.elseValue:l||""}_toPascalCase(l){const d=l.match(/[a-z0-9]+/gi);return d?d.map(a=>a.charAt(0).toUpperCase()+a.substr(1)).join(""):l}_toCamelCase(l){const d=l.match(/[a-z0-9]+/gi);return d?d.map((a,s)=>s===0?a.charAt(0).toLowerCase()+a.substr(1):a.charAt(0).toUpperCase()+a.substr(1)).join(""):l}clone(){return new u(this.index,this.shorthandName,this.ifValue,this.elseValue)}}e.FormatString=u;class g extends I{constructor(l){super();this.name=l}resolve(l){let d=l.resolve(this);return this.transform&&(d=this.transform.resolve(d||"")),d!==void 0?(this._children=[new k(d)],!0):!1}clone(){const l=new g(this.name);return this.transform&&(l.transform=this.transform.clone()),l._children=this.children.map(d=>d.clone()),l}}e.Variable=g;function n(r,l){const d=[...r];for(;d.length>0;){const a=d.shift();if(!l(a))break;d.unshift(...a.children)}}class i extends C{get placeholderInfo(){if(!this._placeholders){const l=[];let d;this.walk(function(a){return a instanceof L&&(l.push(a),d=!d||d.indexs===l?(a=!0,!1):(d+=s.len(),!0)),a?d:-1}fullLen(l){let d=0;return n([l],a=>(d+=a.len(),!0)),d}enclosingPlaceholders(l){const d=[];let{parent:a}=l;for(;a;)a instanceof L&&d.push(a),a=a.parent;return d}resolveVariables(l){return this.walk(d=>(d instanceof g&&d.resolve(l)&&(this._placeholders=void 0),!0)),this}appendChild(l){return this._placeholders=void 0,super.appendChild(l)}replace(l,d){return this._placeholders=void 0,super.replace(l,d)}clone(){const l=new i;return this._children=this.children.map(d=>d.clone()),l}walk(l){n(this.children,l)}}e.TextmateSnippet=i;class t{constructor(){this._scanner=new w,this._token={type:14,pos:0,len:0}}static escape(l){return l.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(l){return/\${?CLIPBOARD/.test(l)}parse(l,d,a){const s=new i;return this.parseFragment(l,s),this.ensureFinalTabstop(s,a??!1,d??!1),s}parseFragment(l,d){const a=d.children.length;for(this._scanner.text(l),this._token=this._scanner.next();this._parse(d););const s=new Map,o=[];d.walk(c=>(c instanceof L&&(c.isFinalTabstop?s.set(0,void 0):!s.has(c.index)&&c.children.length>0?s.set(c.index,c.children):o.push(c)),!0));for(const c of o){const f=s.get(c.index);if(f){const p=new L(c.index);p.transform=c.transform;for(const _ of f)p.appendChild(_.clone());d.replace(c,[p])}}return d.children.slice(a)}ensureFinalTabstop(l,d,a){(d||a&&l.placeholders.length>0)&&(l.placeholders.find(o=>o.index===0)||l.appendChild(new L(0)))}_accept(l,d){if(l===void 0||this._token.type===l){const a=d?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),a}return!1}_backTo(l){return this._scanner.pos=l.pos+l.len,this._token=l,!1}_until(l){const d=this._token;for(;this._token.type!==l;){if(this._token.type===14)return!1;if(this._token.type===5){const s=this._scanner.next();if(s.type!==0&&s.type!==4&&s.type!==5)return!1}this._token=this._scanner.next()}const a=this._scanner.value.substring(d.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),a}_parse(l){return this._parseEscaped(l)||this._parseTabstopOrVariableName(l)||this._parseComplexPlaceholder(l)||this._parseComplexVariable(l)||this._parseAnything(l)}_parseEscaped(l){let d;return(d=this._accept(5,!0))?(d=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||d,l.appendChild(new k(d)),!0):!1}_parseTabstopOrVariableName(l){let d;const a=this._token;return this._accept(0)&&(d=this._accept(9,!0)||this._accept(8,!0))?(l.appendChild(/^\d+$/.test(d)?new L(Number(d)):new g(d)),!0):this._backTo(a)}_parseComplexPlaceholder(l){let d;const a=this._token;if(!(this._accept(0)&&this._accept(3)&&(d=this._accept(8,!0))))return this._backTo(a);const o=new L(Number(d));if(this._accept(1))for(;;){if(this._accept(4))return l.appendChild(o),!0;if(!this._parse(o))return l.appendChild(new k("${"+d+":")),o.children.forEach(l.appendChild,l),!0}else if(o.index>0&&this._accept(7)){const c=new b;for(;;){if(this._parseChoiceElement(c)){if(this._accept(2))continue;if(this._accept(7)&&(o.appendChild(c),this._accept(4)))return l.appendChild(o),!0}return this._backTo(a),!1}}else return this._accept(6)?this._parseTransform(o)?(l.appendChild(o),!0):(this._backTo(a),!1):this._accept(4)?(l.appendChild(o),!0):this._backTo(a)}_parseChoiceElement(l){const d=this._token,a=[];for(;!(this._token.type===2||this._token.type===7);){let s;if((s=this._accept(5,!0))?s=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||s:s=this._accept(void 0,!0),!s)return this._backTo(d),!1;a.push(s)}return a.length===0?(this._backTo(d),!1):(l.appendChild(new k(a.join(""))),!0)}_parseComplexVariable(l){let d;const a=this._token;if(!(this._accept(0)&&this._accept(3)&&(d=this._accept(9,!0))))return this._backTo(a);const o=new g(d);if(this._accept(1))for(;;){if(this._accept(4))return l.appendChild(o),!0;if(!this._parse(o))return l.appendChild(new k("${"+d+":")),o.children.forEach(l.appendChild,l),!0}else return this._accept(6)?this._parseTransform(o)?(l.appendChild(o),!0):(this._backTo(a),!1):this._accept(4)?(l.appendChild(o),!0):this._backTo(a)}_parseTransform(l){const d=new v;let a="",s="";for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(6,!0)||o,a+=o;continue}if(this._token.type!==14){a+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let o;if(o=this._accept(5,!0)){o=this._accept(5,!0)||this._accept(6,!0)||o,d.appendChild(new k(o));continue}if(!(this._parseFormatString(d)||this._parseAnything(d)))return!1}for(;!this._accept(4);){if(this._token.type!==14){s+=this._accept(void 0,!0);continue}return!1}try{d.regexp=new RegExp(a,s)}catch{return!1}return l.transform=d,!0}_parseFormatString(l){const d=this._token;if(!this._accept(0))return!1;let a=!1;this._accept(3)&&(a=!0);const s=this._accept(8,!0);if(s)if(a){if(this._accept(4))return l.appendChild(new u(Number(s))),!0;if(!this._accept(1))return this._backTo(d),!1}else return l.appendChild(new u(Number(s))),!0;else return this._backTo(d),!1;if(this._accept(6)){const o=this._accept(9,!0);return!o||!this._accept(4)?(this._backTo(d),!1):(l.appendChild(new u(Number(s),o)),!0)}else if(this._accept(11)){const o=this._until(4);if(o)return l.appendChild(new u(Number(s),void 0,o,void 0)),!0}else if(this._accept(12)){const o=this._until(4);if(o)return l.appendChild(new u(Number(s),void 0,void 0,o)),!0}else if(this._accept(13)){const o=this._until(1);if(o){const c=this._until(4);if(c)return l.appendChild(new u(Number(s),void 0,o,c)),!0}}else{const o=this._until(4);if(o)return l.appendChild(new u(Number(s),void 0,void 0,o)),!0}return this._backTo(d),!1}_parseAnything(l){return this._token.type!==14?(l.appendChild(new k(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}e.SnippetParser=t}),define(re[250],ae([1,0,18,63,8]),function($,e,w,C,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompletionModel=e.LineContext=void 0;class I{constructor(v,u){this.leadingLineContent=v,this.characterCountDelta=u}}e.LineContext=I;class L{constructor(v,u,g,n,i,t,r=C.FuzzyScoreOptions.default,l=void 0){this.clipboardText=l,this._snippetCompareFn=L._compareCompletionItems,this._items=v,this._column=u,this._wordDistance=n,this._options=i,this._refilterKind=1,this._lineContext=g,this._fuzzyScoreOptions=r,t==="top"?this._snippetCompareFn=L._compareCompletionItemsSnippetsUp:t==="bottom"&&(this._snippetCompareFn=L._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(v){(this._lineContext.leadingLineContent!==v.leadingLineContent||this._lineContext.characterCountDelta!==v.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta2e3?C.fuzzyScore:C.fuzzyScoreGracefulAggressive;for(let d=0;d=o)a.score=C.FuzzyScore.Default;else if(typeof a.completion.filterText=="string"){const f=l(n,i,c,a.completion.filterText,a.filterTextLow,0,this._fuzzyScoreOptions);if(!f)continue;(0,k.compareIgnoreCase)(a.completion.filterText,a.textLabel)===0?a.score=f:(a.score=(0,C.anyScore)(n,i,c,a.textLabel,a.labelLow,0),a.score[0]=f[0])}else{const f=l(n,i,c,a.textLabel,a.labelLow,0,this._fuzzyScoreOptions);if(!f)continue;a.score=f}}a.idx=d,a.distance=this._wordDistance.distance(a.position,a.completion),r.push(a),v.push(a.textLabel.length)}this._filteredItems=r.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:v.length?(0,w.quickSelect)(v.length-.85,v,(d,a)=>d-a):0}}static _compareCompletionItems(v,u){return v.score[0]>u.score[0]?-1:v.score[0]u.distance?1:v.idxu.idx?1:0}static _compareCompletionItemsSnippetsDown(v,u){if(v.completion.kind!==u.completion.kind){if(v.completion.kind===27)return 1;if(u.completion.kind===27)return-1}return L._compareCompletionItems(v,u)}static _compareCompletionItemsSnippetsUp(v,u){if(v.completion.kind!==u.completion.kind){if(v.completion.kind===27)return-1;if(u.completion.kind===27)return 1}return L._compareCompletionItems(v,u)}}e.CompletionModel=L}),define(re[459],ae([1,0,18,2,107]),function($,e,w,C,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommitCharacterController=void 0;class I{constructor(b,v,u){this._disposables=new C.DisposableStore,this._disposables.add(v.onDidShow(()=>this._onItem(v.getFocusedItem()))),this._disposables.add(v.onDidFocus(this._onItem,this)),this._disposables.add(v.onDidHide(this.reset,this)),this._disposables.add(b.onWillType(g=>{if(this._active&&!v.isFrozen()){const n=g.charCodeAt(g.length-1);this._active.acceptCharacters.has(n)&&b.getOption(0)&&u(this._active.item)}}))}_onItem(b){if(!b||!(0,w.isNonEmptyArray)(b.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===b.item)return;const v=new k.CharacterSet;for(const u of b.item.completion.commitCharacters)u.length>0&&v.add(u.charCodeAt(0));this._active={acceptCharacters:v,item:b}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}e.CommitCharacterController=I}),define(re[460],ae([1,0,2]),function($,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OvertypingCapturer=void 0;class C{constructor(I,L){this._disposables=new w.DisposableStore,this._lastOvertyped=[],this._empty=!0,this._disposables.add(I.onWillType(()=>{if(!this._empty||!I.hasModel())return;const b=I.getSelections(),v=b.length;let u=!1;for(let n=0;nC._maxSelectionLength)return;this._lastOvertyped[n]={value:g.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}this._empty=!1})),this._disposables.add(L.onDidCancel(b=>{!this._empty&&!b.retrigger&&(this._empty=!0)}))}getLastOvertypedInfo(I){if(!this._empty&&I>=0&&I=0?a[s]:a[Math.max(0,~s-1)];let c=n.length;for(const f of n){if(!C.Range.containsRange(f.range,o))break;c-=1}return c}}})}}e.WordDistance=I,I.None=new class extends I{distance(){return 0}}}),define(re[252],ae([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stateExists=e.findRules=e.substituteMatches=e.createError=e.log=e.sanitize=e.fixCase=e.empty=e.isIAction=e.isString=e.isFuzzyAction=e.isFuzzyActionArr=void 0;function w(r){return Array.isArray(r)}e.isFuzzyActionArr=w;function C(r){return!w(r)}e.isFuzzyAction=C;function k(r){return typeof r=="string"}e.isString=k;function I(r){return!k(r)}e.isIAction=I;function L(r){return!r}e.empty=L;function b(r,l){return r.ignoreCase&&l?l.toLowerCase():l}e.fixCase=b;function v(r){return r.replace(/[&<>'"_]/g,"-")}e.sanitize=v;function u(r,l){console.log(`${r.languageId}: ${l}`)}e.log=u;function g(r,l){return new Error(`${r.languageId}: ${l}`)}e.createError=g;function n(r,l,d,a,s){const o=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let c=null;return l.replace(o,function(f,p,_,m,h,S,y,E,N){return L(_)?L(m)?!L(h)&&h0;){const a=r.tokenizer[d];if(a)return a;const s=d.lastIndexOf(".");s<0?d=null:d=d.substr(0,s)}return null}e.findRules=i;function t(r,l){let d=l;for(;d&&d.length>0;){if(r.stateNames[d])return!0;const s=d.lastIndexOf(".");s<0?d=null:d=d.substr(0,s)}return!1}e.stateExists=t}),define(re[461],ae([1,0,252]),function($,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compile=void 0;function C(r,l){if(!l||!Array.isArray(l))return!1;for(const d of l)if(!r(d))return!1;return!0}function k(r,l){return typeof r=="boolean"?r:l}function I(r,l){return typeof r=="string"?r:l}function L(r){const l={};for(const d of r)l[d]=!0;return l}function b(r,l=!1){l&&(r=r.map(function(a){return a.toLowerCase()}));const d=L(r);return l?function(a){return d[a.toLowerCase()]!==void 0&&d.hasOwnProperty(a.toLowerCase())}:function(a){return d[a]!==void 0&&d.hasOwnProperty(a)}}function v(r,l){l=l.replace(/@@/g,"");let d=0,a;do a=!1,l=l.replace(/@(\w+)/g,function(o,c){a=!0;let f="";if(typeof r[c]=="string")f=r[c];else if(r[c]&&r[c]instanceof RegExp)f=r[c].source;else throw r[c]===void 0?w.createError(r,"language definition does not contain attribute '"+c+"', used at: "+l):w.createError(r,"attribute reference '"+c+"' must be a string, used at: "+l);return w.empty(f)?"":"(?:"+f+")"}),d++;while(a&&d<5);l=l.replace(/\x01/g,"@");const s=(r.ignoreCase?"i":"")+(r.unicode?"u":"");return new RegExp(l,s)}function u(r,l,d,a){if(a<0)return r;if(a=100){a=a-100;const s=d.split(".");if(s.unshift(d),a=0&&(a.tokenSubst=!0),typeof d.bracket=="string")if(d.bracket==="@open")a.bracket=1;else if(d.bracket==="@close")a.bracket=-1;else throw w.createError(r,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+l);if(d.next){if(typeof d.next!="string")throw w.createError(r,"the next state must be a string value in rule: "+l);{let s=d.next;if(!/^(@pop|@push|@popall)$/.test(s)&&(s[0]==="@"&&(s=s.substr(1)),s.indexOf("$")<0&&!w.stateExists(r,w.substituteMatches(r,s,"",[],""))))throw w.createError(r,"the next state '"+d.next+"' is not defined in rule: "+l);a.next=s}}return typeof d.goBack=="number"&&(a.goBack=d.goBack),typeof d.switchTo=="string"&&(a.switchTo=d.switchTo),typeof d.log=="string"&&(a.log=d.log),typeof d.nextEmbedded=="string"&&(a.nextEmbedded=d.nextEmbedded,r.usesEmbedded=!0),a}}else if(Array.isArray(d)){const a=[];for(let s=0,o=d.length;s0&&a[0]==="^",this.name=this.name+": "+a,this.regex=v(l,"^(?:"+(this.matchOnlyAtLineStart?a.substr(1):a)+")")}setAction(l,d){this.action=n(l,this.name,d)}}function t(r,l){if(!l||typeof l!="object")throw new Error("Monarch: expecting a language definition object");const d={};d.languageId=r,d.includeLF=k(l.includeLF,!1),d.noThrow=!1,d.maxStack=100,d.start=typeof l.start=="string"?l.start:null,d.ignoreCase=k(l.ignoreCase,!1),d.unicode=k(l.unicode,!1),d.tokenPostfix=I(l.tokenPostfix,"."+d.languageId),d.defaultToken=I(l.defaultToken,"source"),d.usesEmbedded=!1;const a=l;a.languageId=r,a.includeLF=d.includeLF,a.ignoreCase=d.ignoreCase,a.unicode=d.unicode,a.noThrow=d.noThrow,a.usesEmbedded=d.usesEmbedded,a.stateNames=l.tokenizer,a.defaultToken=d.defaultToken;function s(c,f,p){for(const _ of p){let m=_.include;if(m){if(typeof m!="string")throw w.createError(d,"an 'include' attribute must be a string at: "+c);if(m[0]==="@"&&(m=m.substr(1)),!l.tokenizer[m])throw w.createError(d,"include target '"+m+"' is not defined at: "+c);s(c+"."+m,f,l.tokenizer[m])}else{const h=new i(c);if(Array.isArray(_)&&_.length>=1&&_.length<=3)if(h.setRegex(a,_[0]),_.length>=3)if(typeof _[1]=="string")h.setAction(a,{token:_[1],next:_[2]});else if(typeof _[1]=="object"){const S=_[1];S.next=_[2],h.setAction(a,S)}else throw w.createError(d,"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: "+c);else h.setAction(a,_[1]);else{if(!_.regex)throw w.createError(d,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+c);_.name&&typeof _.name=="string"&&(h.name=_.name),_.matchOnlyAtStart&&(h.matchOnlyAtLineStart=k(_.matchOnlyAtLineStart,!1)),h.setRegex(a,_.regex),h.setAction(a,_.action)}f.push(h)}}}if(!l.tokenizer||typeof l.tokenizer!="object")throw w.createError(d,"a language definition must define the 'tokenizer' attribute as an object");d.tokenizer=[];for(const c in l.tokenizer)if(l.tokenizer.hasOwnProperty(c)){d.start||(d.start=c);const f=l.tokenizer[c];d.tokenizer[c]=new Array,s("tokenizer."+c,d.tokenizer[c],f)}if(d.usesEmbedded=a.usesEmbedded,l.brackets){if(!Array.isArray(l.brackets))throw w.createError(d,"the 'brackets' attribute must be defined as an array")}else l.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const o=[];for(const c of l.brackets){let f=c;if(f&&Array.isArray(f)&&f.length===3&&(f={token:f[2],open:f[0],close:f[1]}),f.open===f.close)throw w.createError(d,"open and close brackets in a 'brackets' attribute must be different: "+f.open+`
+ hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof f.open=="string"&&typeof f.token=="string"&&typeof f.close=="string")o.push({token:f.token+d.tokenPostfix,open:w.fixCase(d,f.open),close:w.fixCase(d,f.close)});else throw w.createError(d,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return d.brackets=o,d.noThrow=!0,d}e.compile=t}),define(re[462],ae([4,5]),function($,e){return $.create("vs/base/browser/ui/actionbar/actionViewItems",e)}),define(re[463],ae([4,5]),function($,e){return $.create("vs/base/browser/ui/findinput/findInput",e)}),define(re[464],ae([4,5]),function($,e){return $.create("vs/base/browser/ui/findinput/findInputToggles",e)}),define(re[465],ae([4,5]),function($,e){return $.create("vs/base/browser/ui/findinput/replaceInput",e)}),define(re[466],ae([4,5]),function($,e){return $.create("vs/base/browser/ui/iconLabel/iconLabelHover",e)}),define(re[467],ae([4,5]),function($,e){return $.create("vs/base/browser/ui/inputbox/inputBox",e)}),define(re[468],ae([4,5]),function($,e){return $.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",e)}),define(re[469],ae([4,5]),function($,e){return $.create("vs/base/browser/ui/tree/abstractTree",e)}),define(re[470],ae([4,5]),function($,e){return $.create("vs/base/common/actions",e)}),define(re[471],ae([4,5]),function($,e){return $.create("vs/base/common/errorMessage",e)}),define(re[472],ae([1,0,18,19,471]),function($,e,w,C,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toErrorMessage=void 0;function I(u,g){return g&&(u.stack||u.stacktrace)?k.localize(0,null,b(u),L(u.stack)||L(u.stacktrace)):b(u)}function L(u){return Array.isArray(u)?u.join(`
+`):u}function b(u){return typeof u.code=="string"&&typeof u.errno=="number"&&typeof u.syscall=="string"?k.localize(1,null,u.message):u.message||k.localize(2,null)}function v(u=null,g=!1){if(!u)return k.localize(3,null);if(Array.isArray(u)){const n=w.coalesce(u),i=v(n[0],g);return n.length>1?k.localize(4,null,i,n.length):i}if(C.isString(u))return u;if(u.detail){const n=u.detail;if(n.error)return I(n.error,g);if(n.exception)return I(n.exception,g)}return u.stack?I(u,g):u.message?u.message:k.localize(5,null)}e.toErrorMessage=v}),define(re[473],ae([4,5]),function($,e){return $.create("vs/base/common/keybindingLabels",e)}),define(re[190],ae([1,0,473]),function($,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserSettingsLabelProvider=e.ElectronAcceleratorLabelProvider=e.AriaLabelProvider=e.UILabelProvider=e.ModifierLabelProvider=void 0;class C{constructor(L,b,v=b){this.modifierLabels=[null],this.modifierLabels[2]=L,this.modifierLabels[1]=b,this.modifierLabels[3]=v}toLabel(L,b,v){if(b.length===0)return null;const u=[];for(let g=0,n=b.length;g=0,L=a.indexOf("Macintosh")>=0,i=(a.indexOf("Macintosh")>=0||a.indexOf("iPad")>=0||a.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,b=a.indexOf("Linux")>=0,g=!0,r=w.getConfiguredDefaultLocale(w.localize(0,null))||k,l=r;else if(typeof s=="object"){I=s.platform==="win32",L=s.platform==="darwin",b=s.platform==="linux",v=b&&!!s.env.SNAP&&!!s.env.SNAP_REVISION,n=o,t=!!s.env.CI||!!s.env.BUILD_ARTIFACTSTAGINGDIRECTORY,r=k,l=k;const h=s.env.VSCODE_NLS_CONFIG;if(h)try{const S=JSON.parse(h),y=S.availableLanguages["*"];r=S.locale,l=y||k,d=S._translationsConfigFile}catch{}u=!0}else console.error("Unable to resolve platform.");let f=0;L?f=1:I?f=3:b&&(f=2),e.isWindows=I,e.isMacintosh=L,e.isLinux=b,e.isNative=u,e.isWeb=g,e.isWebWorker=g&&typeof e.globals.importScripts=="function",e.isIOS=i,e.userAgent=a,e.language=l,e.setTimeout0IsFaster=typeof e.globals.postMessage=="function"&&!e.globals.importScripts,e.setTimeout0=(()=>{if(e.setTimeout0IsFaster){const h=[];e.globals.addEventListener("message",y=>{if(y.data&&y.data.vscodeScheduleAsyncWork)for(let E=0,N=h.length;E{const E=++S;h.push({id:E,callback:y}),e.globals.postMessage({vscodeScheduleAsyncWork:E},"*")}}return h=>setTimeout(h)})(),e.OS=L||i?2:I?1:3;let p=!0,_=!1;function m(){if(!_){_=!0;const h=new Uint8Array(2);h[0]=1,h[1]=2,p=new Uint16Array(h.buffer)[0]===(2<<8)+1}return p}e.isLittleEndian=m,e.isChrome=!!(e.userAgent&&e.userAgent.indexOf("Chrome")>=0),e.isFirefox=!!(e.userAgent&&e.userAgent.indexOf("Firefox")>=0),e.isSafari=!!(!e.isChrome&&e.userAgent&&e.userAgent.indexOf("Safari")>=0),e.isEdge=!!(e.userAgent&&e.userAgent.indexOf("Edg/")>=0),e.isAndroid=!!(e.userAgent&&e.userAgent.indexOf("Android")>=0)}),define(re[475],ae([1,0,17]),function($,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.platform=e.env=e.cwd=void 0;let C;if(typeof w.globals.vscode!="undefined"&&typeof w.globals.vscode.process!="undefined"){const k=w.globals.vscode.process;C={get platform(){return k.platform},get arch(){return k.arch},get env(){return k.env},cwd(){return k.cwd()}}}else typeof process!="undefined"?C={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:C={get platform(){return w.isWindows?"win32":w.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};e.cwd=C.cwd,e.env=C.env,e.platform=C.platform}),define(re[90],ae([1,0,475]),function($,e,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sep=e.extname=e.basename=e.dirname=e.relative=e.resolve=e.normalize=e.posix=e.win32=void 0;const C=65,k=97,I=90,L=122,b=46,v=47,u=92,g=58,n=63;class i extends Error{constructor(c,f,p){let _;typeof f=="string"&&f.indexOf("not ")===0?(_="must not be",f=f.replace(/^not /,"")):_="must be";const m=c.indexOf(".")!==-1?"property":"argument";let h=`The "${c}" ${m} ${_} of type ${f}`;h+=`. Received type ${typeof p}`;super(h);this.code="ERR_INVALID_ARG_TYPE"}}function t(o,c){if(typeof o!="string")throw new i(c,"string",o)}function r(o){return o===v||o===u}function l(o){return o===v}function d(o){return o>=C&&o<=I||o>=k&&o<=L}function a(o,c,f,p){let _="",m=0,h=-1,S=0,y=0;for(let E=0;E<=o.length;++E){if(E2){const N=_.lastIndexOf(f);N===-1?(_="",m=0):(_=_.slice(0,N),m=_.length-1-_.lastIndexOf(f)),h=E,S=0;continue}else if(_.length!==0){_="",m=0,h=E,S=0;continue}}c&&(_+=_.length>0?`${f}..`:"..",m=2)}else _.length>0?_+=`${f}${o.slice(h+1,E)}`:_=o.slice(h+1,E),m=E-h-1;h=E,S=0}else y===b&&S!==-1?++S:S=-1}return _}function s(o,c){if(c===null||typeof c!="object")throw new i("pathObject","Object",c);const f=c.dir||c.root,p=c.base||`${c.name||""}${c.ext||""}`;return f?f===c.root?`${f}${p}`:`${f}${o}${p}`:p}e.win32={resolve(...o){let c="",f="",p=!1;for(let _=o.length-1;_>=-1;_--){let m;if(_>=0){if(m=o[_],t(m,"path"),m.length===0)continue}else c.length===0?m=w.cwd():(m=w.env[`=${c}`]||w.cwd(),(m===void 0||m.slice(0,2).toLowerCase()!==c.toLowerCase()&&m.charCodeAt(2)===u)&&(m=`${c}\\`));const h=m.length;let S=0,y="",E=!1;const N=m.charCodeAt(0);if(h===1)r(N)&&(S=1,E=!0);else if(r(N))if(E=!0,r(m.charCodeAt(1))){let T=2,R=T;for(;T2&&r(m.charCodeAt(2))&&(E=!0,S=3));if(y.length>0)if(c.length>0){if(y.toLowerCase()!==c.toLowerCase())continue}else c=y;if(p){if(c.length>0)break}else if(f=`${m.slice(S)}\\${f}`,p=E,E&&c.length>0)break}return f=a(f,!p,"\\",r),p?`${c}\\${f}`:`${c}${f}`||"."},normalize(o){t(o,"path");const c=o.length;if(c===0)return".";let f=0,p,_=!1;const m=o.charCodeAt(0);if(c===1)return l(m)?"\\":o;if(r(m))if(_=!0,r(o.charCodeAt(1))){let S=2,y=S;for(;S2&&r(o.charCodeAt(2))&&(_=!0,f=3));let h=f0&&r(o.charCodeAt(c-1))&&(h+="\\"),p===void 0?_?`\\${h}`:h:_?`${p}\\${h}`:`${p}${h}`},isAbsolute(o){t(o,"path");const c=o.length;if(c===0)return!1;const f=o.charCodeAt(0);return r(f)||c>2&&d(f)&&o.charCodeAt(1)===g&&r(o.charCodeAt(2))},join(...o){if(o.length===0)return".";let c,f;for(let m=0;m