You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/71448.async.js

1 line
41 KiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

(self.webpackChunk=self.webpackChunk||[]).push([[71448],{71448:function(e,t,n){var i;self.MonacoEnvironment=(i={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"},{globalAPI:!1,getWorkerUrl:function(e,t){var o=n.p,r=(o?o.replace(/\/$/,"")+"/":"")+i[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(r)){var s=String(window.location),a=s.substr(0,s.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(r.substring(0,a.length)!==a){/^(\/\/)/.test(r)&&(r=window.location.protocol+r);var c=new Blob(["/*"+t+'*/importScripts("'+r+'");'],{type:"application/javascript"});return URL.createObjectURL(c)}}return r}}),n(79271),n(9074),n(32838),n(84826),n(60066),n(63739),n(54807),n(88297),n(46343),n(4105),n(82599),n(98505),n(2035),n(34064),n(85628),n(43722),n(65586),n(17645),n(58703),n(51568),n(40166),n(63478),n(83754),n(26313),n(48467),n(51518),n(9034),n(63435),n(83861),n(34835),n(85969),n(71925),n(19257),n(13594),n(6181),n(6410),n(28630),n(29111),n(63618),n(48608),e.exports=n(19575),n(92973),n(72773),n(30219),n(10755),n(74121),n(77973),n(27246),n(82961),n(19959),n(23347),n(15569),n(24607),n(90130),n(72185),n(40882),n(14349),n(10715),n(88756),n(67748),n(30141),n(44115),n(65588),n(42716),n(83135),n(91067),n(63886),n(44865),n(41495),n(12076),n(38516),n(18504),n(28593),n(43069),n(50185),n(11745),n(96025),n(85713),n(98836),n(9626),n(25167),n(5512),n(59066),n(73363),n(5769),n(95630),n(12189),n(78605),n(17728),n(94503),n(66857),n(38341),n(61010),n(1099),n(49478),n(32985),n(72088),n(69746),n(94912),n(60032),n(24571),n(55670),n(77777),n(39393),n(81147),n(35550)},19575:function(e,t,n){"use strict";n.r(t),n.d(t,{CancellationTokenSource:function(){return i.CancellationTokenSource},Emitter:function(){return i.Emitter},KeyCode:function(){return i.KeyCode},KeyMod:function(){return i.KeyMod},MarkerSeverity:function(){return i.MarkerSeverity},MarkerTag:function(){return i.MarkerTag},Position:function(){return i.Position},Range:function(){return i.Range},Selection:function(){return i.Selection},SelectionDirection:function(){return i.SelectionDirection},Token:function(){return i.Token},Uri:function(){return i.Uri},__esModule:function(){return i.__esModule},editor:function(){return i.editor},languages:function(){return i.languages}});n(55670),n(24607),n(42716),n(67748);var i=n(2550),o=(n(92973),n(72773),n(30219),n(10755),n(98909));(0,o.H)({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:function(){return n.e(74014).then(n.bind(n,74014))}});n(74121),n(77973),n(27246),n(82961),n(19959),n(23347),n(15569);(0,o.H)({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:function(){return n.e(18963).then(n.bind(n,18963))}});n(90130);(0,o.H)({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:function(){return n.e(78302).then(n.bind(n,78302))}}),(0,o.H)({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:function(){return n.e(51646).then(n.bind(n,51646))}}),(0,o.H)({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:function(){return n.e(70981).then(n.bind(n,70981))}});n(72185),n(40882),n(14349),n(10715);(0,o.H)({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:function(){return n.e(15290).then(n.bind(n,15290))}});n(88756),n(30141),n(44115),n(65588);(0,o.H)({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:function(){return n.e(15631).then(n.bind(n,15631))}});n(83135),n(91067);(0,o.H)({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:function(){return n.e(80629).then(n.bind(n,80629))}});n(63886);(0,o.H)({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:function(){return n.e(86774).then(n.bind(n,61880))}}),(0,o.H)({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:function(){return n.e(30741).then(n.bind(n,30741))}});n(44865),n(41495),n(12076),n(38516),n(18504),n(28593),n(43069),n(50185),n(11745),n(96025);(0,o.H)({id:"pla",extensions:[".pla"],loader:function(){return n.e(12386).then(n.bind(n,12386))}});n(85713),n(98836),n(9626);(0,o.H)({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:function(){return n.e(36634).then(n.bind(n,36634))}});n(25167),n(5512);(0,o.H)({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:function(){return n.e(3133).then(n.bind(n,3133))}});n(59066),n(73363),n(5769),n(95630),n(12189),n(78605),n(17728),n(94503),n(35550),n(66857),n(38341),n(61010),n(1099),n(49478);(0,o.H)({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:function(){return n.e(95679).then(n.bind(n,95679))}});n(32985),n(72088),n(69746);(0,o.H)({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:function(){return n.e(39252).then(n.bind(n,33571))}}),(0,o.H)({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:function(){return n.e(39252).then(n.bind(n,33571))}});n(94912),n(60032),n(24571),n(77777),n(39393),n(81147),n(46343),n(4716),n(38162),n(46810);var r=n(21985),s=n(94186),a=n(52411),c=n(4514),d=n(17551),l=n(68987),u=n(13268),h=n(90689),g=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},p=function(e,t){return function(n,i){t(n,i,e)}},f=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{c(i.next(e))}catch(e){r(e)}}function a(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};const _=new h.uy("selectionAnchorSet",!1);let m=class e{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=_.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}static get(t){return t.getContribution(e.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],n=this.editor.deltaDecorations(t,[{range:d.Y.fromPositions(e,e),options:{description:"selection-anchor",stickiness:1,hoverMessage:(new s.W5).appendText((0,u.N)("selectionAnchor","Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=n[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,r.Z9)((0,u.N)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(d.Y.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};m.ID="editor.contrib.selectionAnchorController",m=g([p(1,h.i6)],m);class b extends c.R6{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,u.N)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:l.u.editorTextFocus,primary:(0,a.gx)(2089,2080),weight:100}})}run(e,t){return f(this,void 0,void 0,(function*(){m.get(t).setSelectionAnchor()}))}}class v extends c.R6{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,u.N)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:_})}run(e,t){return f(this,void 0,void 0,(function*(){m.get(t).goToSelectionAnchor()}))}}class S extends c.R6{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,u.N)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:_,kbOpts:{kbExpr:l.u.editorTextFocus,primary:(0,a.gx)(2089,2089),weight:100}})}run(e,t){return f(this,void 0,void 0,(function*(){m.get(t).selectFromAnchorToCursor()}))}}class C extends c.R6{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,u.N)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:_,kbOpts:{kbExpr:l.u.editorTextFocus,primary:9,weight:100}})}run(e,t){return f(this,void 0,void 0,(function*(){m.get(t).cancelSelectionAnchor()}))}}(0,c._K)(m.ID,m),(0,c.Qr)(b),(0,c.Qr)(v),(0,c.Qr)(S),(0,c.Qr)(C);n(9074),n(32838),n(28630),n(84826),n(60066),n(63739);var I=n(69323),y=n(17373),D=(n(99851),n(51568));class x extends I.JT{constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){var t;if(6!==e.target.type)return;if(![...(null===(t=e.target.element)||void 0===t?void 0:t.classList.values())||[]].find((e=>e.startsWith("ced-colorBox"))))return;if(!e.target.range)return;const n=this._editor.getContribution(D.ModesHoverController.ID);if(!n.isColorPickerVisible()){const t=new y.e(e.target.range.startLineNumber,e.target.range.startColumn+1,e.target.range.endLineNumber,e.target.range.endColumn+1);n.showContentHover(t,0,!1)}}}x.ID="editor.contrib.colorContribution",(0,c._K)(x.ID,x);n(54807),n(88297),n(4105),n(82599),n(98505),n(2035),n(34064),n(85628);var k=n(96283),w=n(72999),L=n(5472),P=n(12027),R=n(16862),T=n(16903),O=n(35884),M=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{c(i.next(e))}catch(e){r(e)}}function a(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};function A(e,t,n){return M(this,void 0,void 0,(function*(){const i=yield T.C3.create(e,n);return t?i.asListOfDocumentSymbols():i.getTopLevelSymbols()}))}O.P.registerCommand("_executeDocumentSymbolProvider",(function(e,...t){return M(this,void 0,void 0,(function*(){const[n]=t;(0,w.p_)(L.o.isUri(n));const i=e.get(P.q).getModel(n);if(i)return A(i,!1,k.T.None);const o=yield e.get(R.S).createModelReference(n);try{return yield A(o.object.textEditorModel,!1,k.T.None)}finally{o.dispose()}}))}));n(6544),n(17645),n(58703),n(43722);var N=n(82983),E=n(91167),z=n(44124),q=n(31276),j=n(73468),U=n(44765),V=n(96148);function H(e,t,n,i){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];const o=j.zu.getIndentationRules(e.getLanguageId());if(!o)return[];for(n=Math.min(n,e.getLineCount());t<=n&&o.unIndentedLinePattern;){let n=e.getLineContent(t);if(!o.unIndentedLinePattern.test(n))break;t++}if(t>n-1)return[];const{tabSize:r,indentSize:s,insertSpaces:a}=e.getOptions(),c=(e,t)=>(t=t||1,E.U.shiftIndent(e,e.length+t,r,s,a)),l=(e,t)=>(t=t||1,E.U.unshiftIndent(e,e.length+t,r,s,a));let u,h=[],g=e.getLineContent(t),p=g;if(null!=i){u=i;let e=N.V8(g);p=u+g.substring(e.length),o.decreaseIndentPattern&&o.decreaseIndentPattern.test(p)&&(u=l(u),p=u+g.substring(e.length)),g!==p&&h.push(z.h.replaceMove(new d.Y(t,1,t,e.length+1),q.yO.normalizeIndentation(u,s,a)))}else u=N.V8(g);let f=u;o.increaseIndentPattern&&o.increaseIndentPattern.test(p)?(f=c(f),u=c(u)):o.indentNextLinePattern&&o.indentNextLinePattern.test(p)&&(f=c(f));for(let i=++t;i<=n;i++){let t=e.getLineContent(i),n=N.V8(t),r=f+t.substring(n.length);o.decreaseIndentPattern&&o.decreaseIndentPattern.test(r)&&(f=l(f),u=l(u)),n!==f&&h.push(z.h.replaceMove(new d.Y(i,1,i,n.length+1),q.yO.normalizeIndentation(f,s,a))),o.unIndentedLinePattern&&o.unIndentedLinePattern.test(t)||(o.increaseIndentPattern&&o.increaseIndentPattern.test(r)?(u=c(u),f=u):f=o.indentNextLinePattern&&o.indentNextLinePattern.test(r)?c(f):u)}return h}class F extends c.R6{constructor(){super({id:F.ID,label:u.N("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:l.u.writable})}run(e,t){let n=t.getModel();if(!n)return;let i=n.getOptions(),o=t.getSelection();if(!o)return;const r=new ee(o,i.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),n.updateOptions({insertSpaces:!0})}}F.ID="editor.action.indentationToSpaces";class Q extends c.R6{constructor(){super({id:Q.ID,label:u.N("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:l.u.writable})}run(e,t){let n=t.getModel();if(!n)return;let i=n.getOptions(),o=t.getSelection();if(!o)return;const r=new te(o,i.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),n.updateOptions({insertSpaces:!1})}}Q.ID="editor.action.indentationToTabs";class K extends c.R6{constructor(e,t){super(t),this.insertSpaces=e}run(e,t){const n=e.get(V.eJ),i=e.get(P.q);let o=t.getModel();if(!o)return;const r=i.getCreationOptions(o.getLanguageId(),o.uri,o.isForSimpleWidget),s=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===r.tabSize?u.N("configuredTabSize","Configured Tab Size"):void 0}))),a=Math.min(o.getOptions().tabSize-1,7);setTimeout((()=>{n.pick(s,{placeHolder:u.N({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:s[a]}).then((e=>{e&&o&&!o.isDisposed()&&o.updateOptions({tabSize:parseInt(e.label,10),insertSpaces:this.insertSpaces})}))}),50)}}class W extends K{constructor(){super(!1,{id:W.ID,label:u.N("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}W.ID="editor.action.indentUsingTabs";class $ extends K{constructor(){super(!0,{id:$.ID,label:u.N("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}$.ID="editor.action.indentUsingSpaces";class B extends c.R6{constructor(){super({id:B.ID,label:u.N("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const n=e.get(P.q);let i=t.getModel();if(!i)return;const o=n.getCreationOptions(i.getLanguageId(),i.uri,i.isForSimpleWidget);i.detectIndentation(o.insertSpaces,o.tabSize)}}B.ID="editor.action.detectIndentation";class Y extends c.R6{constructor(){super({id:"editor.action.reindentlines",label:u.N("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:l.u.writable})}run(e,t){let n=t.getModel();if(!n)return;let i=H(n,1,n.getLineCount());i.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,i),t.pushUndoStop())}}class X extends c.R6{constructor(){super({id:"editor.action.reindentselectedlines",label:u.N("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:l.u.writable})}run(e,t){let n=t.getModel();if(!n)return;let i=t.getSelections();if(null===i)return;let o=[];for(let e of i){let t=e.startLineNumber,i=e.endLineNumber;if(t!==i&&1===e.endColumn&&i--,1===t){if(t===i)continue}else t--;let r=H(n,t,i);o.push(...r)}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class J{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let t of e)t.range&&"string"==typeof t.text&&this._edits.push(t)}getEditOperations(e,t){for(let e of this._edits)t.addEditOperation(y.e.lift(e.range),e.text);let n=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(n=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),n||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}class G{constructor(e){this.callOnDispose=new I.SL,this.callOnModel=new I.SL,this.editor=e,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModelLanguage((()=>this.update())))}update(){this.callOnModel.clear(),this.editor.getOption(9)<4||this.editor.getOption(47)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){let t=this.editor.getSelections();if(null===t||t.length>1)return;const n=this.editor.getModel();if(!n)return;if(!n.isCheapToTokenize(e.getStartPosition().lineNumber))return;const i=this.editor.getOption(9),{tabSize:o,indentSize:r,insertSpaces:s}=n.getOptions();let a=[],c={shiftIndent:e=>E.U.shiftIndent(e,e.length+1,o,r,s),unshiftIndent:e=>E.U.unshiftIndent(e,e.length+1,o,r,s)},d=e.startLineNumber;for(;d<=e.endLineNumber&&this.shouldIgnoreLine(n,d);)d++;if(d>e.endLineNumber)return;let l=n.getLineContent(d);if(!/\S/.test(l.substring(0,e.startColumn-1))){const e=j.zu.getGoodIndentForLine(i,n,n.getLanguageId(),d,c);if(null!==e){let t=N.V8(l),i=U.Y(e,o);if(i!==U.Y(t,o)){let e=U.J(i,o,s);a.push({range:new y.e(d,1,d,t.length+1),text:e}),l=e+l.substr(t.length)}else{let e=j.zu.getIndentMetadata(n,d);if(0===e||8===e)return}}}const u=d;for(;d<e.endLineNumber&&!/\S/.test(n.getLineContent(d+1));)d++;if(d!==e.endLineNumber){let t={getLineTokens:e=>n.getLineTokens(e),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(e,t)=>n.getLanguageIdAtPosition(e,t),getLineContent:e=>e===u?l:n.getLineContent(e)},r=j.zu.getGoodIndentForLine(i,t,n.getLanguageId(),d+1,c);if(null!==r){let t=U.Y(r,o),i=U.Y(N.V8(n.getLineContent(d+1)),o);if(t!==i){let r=t-i;for(let t=d+1;t<=e.endLineNumber;t++){let e=n.getLineContent(t),i=N.V8(e),c=U.Y(i,o)+r,d=U.J(c,o,s);d!==i&&a.push({range:new y.e(t,1,t,i.length+1),text:d})}}}}if(a.length>0){this.editor.pushUndoStop();let e=new J(a,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.forceTokenization(t);let n=e.getLineFirstNonWhitespaceColumn(t);if(0===n)return!0;let i=e.getLineTokens(t);if(i.getCount()>0){let e=i.findTokenIndexAtOffset(n);if(e>=0&&1===i.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}function Z(e,t,n,i){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let o="";for(let e=0;e<n;e++)o+=" ";let r=new RegExp(o,"gi");for(let n=1,s=e.getLineCount();n<=s;n++){let s=e.getLineFirstNonWhitespaceColumn(n);if(0===s&&(s=e.getLineMaxColumn(n)),1===s)continue;const a=new y.e(n,1,n,s),c=e.getValueInRange(a),d=i?c.replace(/\t/gi,o):c.replace(r,"\t");t.addEditOperation(a,d)}}G.ID="editor.contrib.autoIndentOnPaste";class ee{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),Z(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}class te{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),Z(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}(0,c._K)(G.ID,G),(0,c.Qr)(F),(0,c.Qr)(Q),(0,c.Qr)(W),(0,c.Qr)($),(0,c.Qr)(B),(0,c.Qr)(Y),(0,c.Qr)(X);var ne=n(50431),ie=n(79881),oe=n(44619),re=n(78421),se=n(70827),ae=n(25350),ce=n(72146),de=n(27347),le=n(73831),ue=n(44350),he=n(49055),ge=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},pe=function(e,t){return function(n,i){t(n,i,e)}},fe=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{c(i.next(e))}catch(e){r(e)}}function a(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};class _e{constructor(){this._data=new re.Y9}push(e,t){const n=this._data.get(e.uri);void 0===n?this._data.set(e.uri,new Set([t])):n.add(t)}pop(e,t){const n=this._data.get(e.uri);n&&(n.delete(t),0===n.size&&this._data.delete(e.uri))}has(e,t){var n;return Boolean(null===(n=this._data.get(e.uri))||void 0===n?void 0:n.has(t))}}function me(e,t,n,i){return fe(this,void 0,void 0,(function*(){const o=[],r=de.mX.ordered(e).reverse().map((r=>t.map((t=>fe(this,void 0,void 0,(function*(){try{n.push(e,r);const s=yield r.provideInlayHints(e,t,i);(null==s?void 0:s.length)&&o.push(s.filter((e=>t.containsPosition(e.position))))}catch(e){(0,ie.Cp)(e)}finally{n.pop(e,r)}}))))));return yield Promise.all(r.flat()),o.flat().sort(((e,t)=>ce.L.compare(e.position,t.position)))}))}class be{constructor(){this._entries=new re.z6(50)}get(e){const t=be._key(e);return this._entries.get(t)}set(e,t){const n=be._key(e);this._entries.set(n,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}let ve=class e{constructor(t,n){this._editor=t,this._codeEditorService=n,this._decorationOwnerId=++e._decorationOwnerIdPool,this._disposables=new I.SL,this._sessionDisposables=new I.SL,this._getInlayHintsDelays=new le.Y(de.mX,25,500),this._cache=new be,this._decorations=new Map,this._disposables.add(de.mX.onDidChange((()=>this._update()))),this._disposables.add(t.onDidChangeModel((()=>this._update()))),this._disposables.add(t.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(t.onDidChangeConfiguration((e=>{e.hasChanged(125)&&this._update()}))),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){if(this._sessionDisposables.clear(),this._removeAllDecorations(),!this._editor.getOption(125).enabled)return;const e=this._editor.getModel();if(!e||!de.mX.has(e))return;const t=this._cache.get(e);t&&this._updateHintsDecorators([e.getFullModelRange()],t);const n=new _e,i=new ne.pY((()=>fe(this,void 0,void 0,(function*(){const t=Date.now(),o=new k.A;this._sessionDisposables.add((0,I.OF)((()=>o.dispose(!0))));const r=this._getHintsRanges(),s=yield me(e,r,n,o.token);i.delay=this._getInlayHintsDelays.update(e,Date.now()-t),o.token.isCancellationRequested||(this._updateHintsDecorators(r,s),this._cache.set(e,Array.from(this._decorations.values()).map((e=>e.hint))))}))),this._getInlayHintsDelays.get(e));this._sessionDisposables.add(i),this._sessionDisposables.add(this._editor.onDidChangeModelContent((()=>i.schedule()))),this._disposables.add(this._editor.onDidScrollChange((()=>i.schedule()))),i.schedule();const o=new I.SL;this._sessionDisposables.add(o);for(const t of de.mX.all(e))"function"==typeof t.onDidChangeInlayHints&&o.add(t.onDidChangeInlayHints((()=>{n.has(e,t)||i.schedule()})))}_getHintsRanges(){const e=this._editor.getModel(),t=this._editor.getVisibleRangesPlusViewportAboveBelow(),n=[];for(const i of t.sort(y.e.compareRangesUsingStarts)){const t=e.validateRange(new y.e(i.startLineNumber-30,i.startColumn,i.endLineNumber+30,i.endColumn));0!==n.length&&y.e.areIntersectingOrTouching(n[n.length-1],t)?n[n.length-1]=y.e.plusRange(n[n.length-1],t):n.push(t)}return n}_updateHintsDecorators(e,t){const{fontSize:n,fontFamily:i}=this._getLayoutInfo(),o=this._editor.getModel(),r=[],s=[],a="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(a,i);for(const e of t){const{text:t,position:i,whitespaceBefore:c,whitespaceAfter:d}=e,l=c?n/3|0:0,u=d?n/3|0:0,h={contentText:Ce(t),fontSize:`${n}px`,margin:`0px ${u}px 0px ${l}px`,fontFamily:`var(${a}), ${ae.hL.fontFamily}`,padding:`1px ${0|Math.max(1,n/4)}px`,borderRadius:(n/4|0)+"px",verticalAlign:"middle",backgroundColor:(0,he.EN)(ue.Pp),color:(0,he.EN)(ue.VV)};e.kind===de.gl.Parameter?(h.backgroundColor=(0,he.EN)(ue.ph),h.color=(0,he.EN)(ue.HC)):e.kind===de.gl.Type&&(h.backgroundColor=(0,he.EN)(ue.bK),h.color=(0,he.EN)(ue.hX));let g={beforeInjectedText:Object.assign(Object.assign({},h),{affectsLetterSpacing:!0})},p=y.e.fromPositions(i),f=o.getWordAtPosition(i),_=!1;f&&(f.endColumn===i.column?(g.afterInjectedText=g.beforeInjectedText,g.beforeInjectedText=void 0,_=!0,p=Se(f,i.lineNumber)):f.startColumn===i.column&&(_=!0,p=Se(f,i.lineNumber)));const m="inlayHints-"+(0,oe.vp)(g).toString(16);this._codeEditorService.registerDecorationType("inlay-hints-controller",m,g,void 0,this._editor),r.push(m);if(s.push({range:p,options:Object.assign(Object.assign({},this._codeEditorService.resolveDecorationOptions(m,!0)),{showIfCollapsed:!_,stickiness:0})})>1500)break}const c=[];for(const t of e)for(const{id:e}of o.getDecorationsInRange(t,this._decorationOwnerId,!0)){const t=this._decorations.get(e);t&&(c.push(e),this._codeEditorService.removeDecorationType(t.decorationTypeId),this._decorations.delete(e))}const d=o.deltaDecorations(c,s,this._decorationOwnerId);for(let e=0;e<d.length;e++)this._decorations.set(d[e],{hint:t[e],decorationTypeId:r[e]})}_getLayoutInfo(){const e=this._editor.getOption(125),t=this._editor.getOption(45);let n=e.fontSize;(!n||n<5||n>t)&&(n=.9*t|0);return{fontSize:n,fontFamily:e.fontFamily||this._editor.getOption(42)}}_removeAllDecorations(){this._editor.deltaDecorations(Array.from(this._decorations.keys()),[]);for(let e of this._decorations.values())this._codeEditorService.removeDecorationType(e.decorationTypeId);this._decorations.clear()}};function Se(e,t){return new y.e(t,e.startColumn,t,e.endColumn)}function Ce(e){return e.replace(/[ \t]/g," ")}ve.ID="editor.contrib.InlayHints",ve._decorationOwnerIdPool=0,ve=ge([pe(1,se.$)],ve),(0,c._K)(ve.ID,ve),O.P.registerCommand("_executeInlayHintProvider",((e,...t)=>fe(void 0,void 0,void 0,(function*(){const[n,i]=t;(0,w.p_)(L.o.isUri(n)),(0,w.p_)(y.e.isIRange(i));const o=yield e.get(R.S).createModelReference(n);try{return yield me(o.object.textEditorModel,[y.e.lift(i)],new _e,k.T.None)}finally{o.dispose()}}))));n(63478),n(26313);var Ie=n(43506),ye=n(51737),De=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},xe=function(e,t){return function(n,i){t(n,i,e)}},ke=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{c(i.next(e))}catch(e){r(e)}}function a(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};const we=new h.uy("LinkedEditingInputVisible",!1),Le="linked-editing-decoration";let Pe=class e extends I.JT{constructor(e,t){super(),this._debounceDuration=200,this._localToDispose=this._register(new I.SL),this._editor=e,this._enabled=!1,this._visibleContextKey=we.bindTo(t),this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new I.SL),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel((()=>this.reinitialize(!0)))),this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(61)||e.hasChanged(81))&&this.reinitialize(!1)}))),this._register(de.id.onDidChange((()=>this.reinitialize(!1)))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize(!0)))),this.reinitialize(!0)}static get(t){return t.getContribution(e.ID)}reinitialize(e){const t=this._editor.getModel(),n=null!==t&&(this._editor.getOption(61)||this._editor.getOption(81))&&de.id.has(t);if(n===this._enabled&&!e)return;if(this._enabled=n,this.clearRanges(),this._localToDispose.clear(),!n||null===t)return;this._languageWordPattern=j.zu.getWordDefinition(t.getLanguageId()),this._localToDispose.add(t.onDidChangeLanguageConfiguration((()=>{this._languageWordPattern=j.zu.getWordDefinition(t.getLanguageId())})));const i=new ne.vp(this._debounceDuration),o=()=>{this._rangeUpdateTriggerPromise=i.trigger((()=>this.updateRanges()),this._debounceDuration)},r=new ne.vp(0),s=e=>{this._rangeSyncTriggerPromise=r.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{o()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const n=t.getDecorationRange(this._currentDecorations[0]);if(n&&e.changes.every((e=>n.intersectRanges(e.range))))return void s(this._currentDecorations)}o()}))),this._localToDispose.add({dispose:()=>{i.cancel(),r.cancel()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._currentDecorations||0===e.length)return;const t=this._editor.getModel(),n=t.getDecorationRange(e[0]);if(!n||n.startLineNumber!==n.endLineNumber)return this.clearRanges();const i=t.getValueInRange(n);if(this._currentWordPattern){const e=i.match(this._currentWordPattern);if((e?e[0].length:0)!==i.length)return this.clearRanges()}let o=[];for(let n=1,r=e.length;n<r;n++){const r=t.getDecorationRange(e[n]);if(r)if(r.startLineNumber!==r.endLineNumber)o.push({range:r,text:i});else{let e=t.getValueInRange(r),n=i,s=r.startColumn,a=r.endColumn;const c=N.Mh(e,n);s+=c,e=e.substr(c),n=n.substr(c);const d=N.P1(e,n);a-=d,e=e.substr(0,e.length-d),n=n.substr(0,n.length-d),s===a&&0===n.length||o.push({range:new y.e(r.startLineNumber,s,r.endLineNumber,a),text:n})}}if(0!==o.length)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const e=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",o),this._editor._getViewModel().setPrevEditOperationType(e)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,[]),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(t=!1){return ke(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return void this.clearRanges();const n=this._editor.getPosition();if(!this._enabled&&!t||this._editor.getSelections().length>1)return void this.clearRanges();const i=this._editor.getModel(),o=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===o){if(n.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){const e=i.getDecorationRange(this._currentDecorations[0]);if(e&&e.containsPosition(n))return}}this._currentRequestPosition=n,this._currentRequestModelVersion=o;const r=(0,ne.PG)((t=>ke(this,void 0,void 0,(function*(){try{const s=yield Oe(i,n,t);if(r!==this._currentRequest)return;if(this._currentRequest=null,o!==i.getVersionId())return;let a=[];(null==s?void 0:s.ranges)&&(a=s.ranges),this._currentWordPattern=(null==s?void 0:s.wordPattern)||this._languageWordPattern;let c=!1;for(let e=0,t=a.length;e<t;e++)if(y.e.containsPosition(a[e],n)){if(c=!0,0!==e){const t=a[e];a.splice(e,1),a.unshift(t)}break}if(!c)return void this.clearRanges();const d=a.map((t=>({range:t,options:e.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,d)}catch(e){(0,ie.VV)(e)||(0,ie.dL)(e),this._currentRequest!==r&&this._currentRequest||this.clearRanges()}}))));return this._currentRequest=r,r}))}};Pe.ID="editor.contrib.linkedEditing",Pe.DECORATION=q.qx.register({description:"linked-editing",stickiness:0,className:Le}),Pe=De([xe(1,h.i6)],Pe);class Re extends c.R6{constructor(){super({id:"editor.action.linkedEditing",label:u.N("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:h.Ao.and(l.u.writable,l.u.hasRenameProvider),kbOpts:{kbExpr:l.u.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const n=e.get(se.$),[i,o]=Array.isArray(t)&&t||[void 0,void 0];return L.o.isUri(i)&&ce.L.isIPosition(o)?n.openCodeEditor({resource:i},n.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),ie.dL):super.runCommand(e,t)}run(e,t){const n=Pe.get(t);return n?Promise.resolve(n.updateRanges(!0)):Promise.resolve()}}const Te=c._l.bindToContribution(Pe.get);function Oe(e,t,n){const i=de.id.ordered(e);return(0,ne.Ps)(i.map((i=>()=>ke(this,void 0,void 0,(function*(){try{return yield i.provideLinkedEditingRanges(e,t,n)}catch(e){return void(0,ie.Cp)(e)}})))),(e=>!!e&&Ie.Of(null==e?void 0:e.ranges)))}(0,c.fK)(new Te({id:"cancelLinkedEditingInput",precondition:we,handler:e=>e.clearRanges(),kbOpts:{kbExpr:l.u.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));const Me=(0,ue.P6)("editor.linkedEditingBackground",{dark:ye.Il.fromHex("#f00").transparent(.3),light:ye.Il.fromHex("#f00").transparent(.3),hc:ye.Il.fromHex("#f00").transparent(.3)},u.N("editorLinkedEditingBackground","Background color when the editor auto renames on type."));(0,he.Ic)(((e,t)=>{const n=e.getColor(Me);n&&t.addRule(`.monaco-editor .${Le} { background: ${n}; border-left-color: ${n}; }`)})),(0,c.sb)("_executeLinkedEditingProvider",((e,t)=>Oe(e,t,k.T.None))),(0,c._K)(Pe.ID,Pe),(0,c.Qr)(Re);n(48467),n(51518),n(9034),n(85969),n(71925),n(19257),n(13594);var Ae=n(95830);class Ne extends c.R6{constructor(){super({id:"editor.action.forceRetokenize",label:u.N("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const n=t.getModel();n.resetTokenization();const i=new Ae.G(!0);n.forceTokenization(n.getLineCount()),i.stop(),console.log(`tokenization took ${i.elapsed()}`)}}(0,c.Qr)(Ne);n(6410);var Ee=n(9365),ze=n(94726),qe=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},je=function(e,t){return function(n,i){t(n,i,e)}},Ue=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{c(i.next(e))}catch(e){r(e)}}function a(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))};const Ve="ignoreUnusualLineTerminators";let He=class extends I.JT{constructor(e,t,n){super(),this._editor=e,this._dialogService=t,this._codeEditorService=n,this._config=this._editor.getOption(112),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(112)&&(this._config=this._editor.getOption(112),this._checkForUnusualLineTerminators())}))),this._register(this._editor.onDidChangeModel((()=>{this._checkForUnusualLineTerminators()}))),this._register(this._editor.onDidChangeModelContent((e=>{e.isUndoing||this._checkForUnusualLineTerminators()})))}_checkForUnusualLineTerminators(){return Ue(this,void 0,void 0,(function*(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators())return;const t=function(e,t){return e.getModelProperty(t.uri,Ve)}(this._codeEditorService,e);if(!0===t)return;if(this._editor.getOption(80))return;if("auto"===this._config)return void e.removeUnusualLineTerminators(this._editor.getSelections());(yield this._dialogService.confirm({title:u.N("unusualLineTerminators.title","Unusual Line Terminators"),message:u.N("unusualLineTerminators.message","Detected unusual line terminators"),detail:u.N("unusualLineTerminators.detail","The file '{0}' contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`.",(0,Ee.EZ)(e.uri)),primaryButton:u.N("unusualLineTerminators.fix","Remove Unusual Line Terminators"),secondaryButton:u.N("unusualLineTerminators.ignore","Ignore")})).confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):function(e,t,n){e.setModelProperty(t.uri,Ve,n)}(this._codeEditorService,e,!0)}))}};He.ID="editor.contrib.unusualLineTerminatorsDetector",He=qe([je(1,ze.S),je(2,se.$)],He),(0,c._K)(He.ID,He);var Fe=n(26757),Qe=n(17539),Ke=n(32981),We=n(93965),$e=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},Be=function(e,t){return function(n,i){t(n,i,e)}};let Ye=class extends I.JT{constructor(e,t,n,i){super(),this._modelService=t,this._themeService=n,this._configurationService=i,this._editor=e,this._tokenizeViewport=new ne.pY((()=>this._tokenizeViewportNow()),100),this._outstandingRequests=[],this._register(this._editor.onDidScrollChange((()=>{this._tokenizeViewport.schedule()}))),this._register(this._editor.onDidChangeModel((()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))),this._register(this._editor.onDidChangeModelContent((e=>{this._cancelAll(),this._tokenizeViewport.schedule()}))),this._register(de.K7.onDidChange((()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(Qe.e3)&&(this._cancelAll(),this._tokenizeViewport.schedule())}))),this._register(this._themeService.onDidColorThemeChange((()=>{this._cancelAll(),this._tokenizeViewport.schedule()})))}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,n=this._outstandingRequests.length;t<n;t++)if(this._outstandingRequests[t]===e)return void this._outstandingRequests.splice(t,1)}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.hasCompleteSemanticTokens())return;if(!(0,Qe.tw)(e,this._themeService,this._configurationService))return void(e.hasSomeSemanticTokens()&&e.setSemanticTokens(null,!1));if(!(0,Fe.KO)(e))return void(e.hasSomeSemanticTokens()&&e.setSemanticTokens(null,!1));const t=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(t.map((t=>this._requestRange(e,t))))}_requestRange(e,t){const n=e.getVersionId(),i=(0,ne.PG)((n=>Promise.resolve((0,Fe.OG)(e,t,n))));return i.then((i=>{if(!i||!i.tokens||e.isDisposed()||e.getVersionId()!==n)return;const{provider:o,tokens:r}=i,s=this._modelService.getSemanticTokensProviderStyling(o);e.setPartialSemanticTokens(t,(0,Ke.h)(r,s,e.getLanguageId()))})).then((()=>this._removeOutstandingRequest(i)),(()=>this._removeOutstandingRequest(i))),i}};Ye.ID="editor.contrib.viewportSemanticTokens",Ye=$e([Be(1,P.q),Be(2,he.XE),Be(3,We.Ui)],Ye),(0,c._K)(Ye.ID,Ye);n(29111),n(63618),n(48608);var Xe=n(5530),Je=(n(14112),n(79271),n(40166),n(83754),n(44650)),Ge=n(82825),Ze=function(e,t,n,i){var o,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s},et=function(e,t){return function(n,i){t(n,i,e)}};let tt=class e{constructor(e){this.quickInputService=e,this.registry=Je.B.as(Ge.IP.Quickaccess)}provide(t){const n=new I.SL;n.add(t.onDidAccept((()=>{const[e]=t.selectedItems;e&&this.quickInputService.quickAccess.show(e.prefix,{preserveValue:!0})}))),n.add(t.onDidChangeValue((t=>{const n=this.registry.getQuickAccessProvider(t.substr(e.PREFIX.length));n&&n.prefix&&n.prefix!==e.PREFIX&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})));const{editorProviders:i,globalProviders:o}=this.getQuickAccessProviders();return t.items=0===i.length||0===o.length?[...0===i.length?o:i]:[{label:(0,u.N)("globalCommands","global commands"),type:"separator"},...o,{label:(0,u.N)("editorCommands","editor commands"),type:"separator"},...i],n}getQuickAccessProviders(){const t=[],n=[];for(const i of this.registry.getQuickAccessProviders().sort(((e,t)=>e.prefix.localeCompare(t.prefix))))if(i.prefix!==e.PREFIX)for(const e of i.helpEntries){const o=e.prefix||i.prefix,r=o||"…";(e.needsEditor?n:t).push({prefix:o,label:r,ariaLabel:(0,u.N)("helpPickAriaLabel","{0}, {1}",r,e.description),description:e.description})}return{editorProviders:n,globalProviders:t}}};tt.PREFIX="?",tt=Ze([et(0,V.eJ)],tt),Je.B.as(Ge.IP.Quickaccess).registerQuickAccessProvider({ctor:tt,prefix:"",helpEntries:[{description:Xe.ld.helpQuickAccessActionLabel,needsEditor:!0}]});n(65586),n(83861),n(63435),n(34835),n(6181)}}]);