@deephaven/code-studio 0.16.1-vite.18 → 0.16.1-vite.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/assets/helpers.162e09a8.js +1 -0
- package/build/assets/index.5fe264e6.js +251 -0
- package/build/assets/{monaco.d72d91be.js → monaco.bc5092a3.js} +3 -3
- package/build/assets/{plotly.47ff3b23.js → plotly.e46f8c30.js} +1 -1
- package/build/assets/vendor.3dfc6121.js +1320 -0
- package/build/index.html +6 -5
- package/package.json +26 -26
- package/build/assets/index.8b7501ff.js +0 -266
- package/build/assets/vendor.8004d4dd.js +0 -1305
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var vP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xee(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Qee(s){var e=s.default;if(typeof e=="function"){var t=function(){return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(i){var n=Object.getOwnPropertyDescriptor(s,i);Object.defineProperty(t,i,n.get?n:{enumerable:!0,get:function(){return s[i]}})}),t}function wP(s,e){let t;return e.length===0?t=s:t=s.replace(/\{(\d+)\}/g,function(i,n){const o=n[0];return typeof e[o]<"u"?e[o]:i}),t}function m(s,e,...t){return wP(e,t)}var AC;const xm="en";let cp=!1,up=!1,Im=!1,AN=!1,ON=!1,Iy=!1,kg,OC=xm,SP,Ur;const Ut=typeof self=="object"?self:typeof global=="object"?global:{};let Kt;typeof Ut.vscode<"u"&&typeof Ut.vscode.process<"u"?Kt=Ut.vscode.process:typeof process<"u"&&(Kt=process);const PN=typeof((AC=Kt==null?void 0:Kt.versions)===null||AC===void 0?void 0:AC.electron)=="string"&&Kt.type==="renderer",yP=PN&&(Kt==null?void 0:Kt.sandboxed),LP=(()=>{if(yP)return"bypassHeatCheck";const s=Kt==null?void 0:Kt.env.VSCODE_BROWSER_CODE_LOADING;if(typeof s=="string")return s==="none"||s==="code"||s==="bypassHeatCheck"||s==="bypassHeatCheckAndEagerCompile"?s:"bypassHeatCheck"})(),DP=typeof LP=="string";if(typeof navigator=="object"&&!PN)Ur=navigator.userAgent,cp=Ur.indexOf("Windows")>=0,up=Ur.indexOf("Macintosh")>=0,Iy=(Ur.indexOf("Macintosh")>=0||Ur.indexOf("iPad")>=0||Ur.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Im=Ur.indexOf("Linux")>=0,ON=!0,kg=navigator.language,OC=kg;else if(typeof Kt=="object"){cp=Kt.platform==="win32",up=Kt.platform==="darwin",Im=Kt.platform==="linux",Im&&!!Kt.env.SNAP&&Kt.env.SNAP_REVISION,kg=xm,OC=xm;const s=Kt.env.VSCODE_NLS_CONFIG;if(s)try{const e=JSON.parse(s),t=e.availableLanguages["*"];kg=e.locale,OC=t||xm,SP=e._translationsConfigFile}catch{}AN=!0}else console.error("Unable to resolve platform.");const vi=cp,Me=up,en=Im,zs=AN,bc=ON,To=Iy,xP=Ur,fp=function(){if(Ut.setImmediate)return Ut.setImmediate.bind(Ut);if(typeof Ut.postMessage=="function"&&!Ut.importScripts){let t=[];Ut.addEventListener("message",n=>{if(n.data&&n.data.vscodeSetImmediateId)for(let o=0,r=t.length;o<r;o++){const a=t[o];if(a.id===n.data.vscodeSetImmediateId){t.splice(o,1),a.callback();return}}});let i=0;return n=>{const o=++i;t.push({id:o,callback:n}),Ut.postMessage({vscodeSetImmediateId:o},"*")}}if(typeof(Kt==null?void 0:Kt.nextTick)=="function")return Kt.nextTick.bind(Kt);const e=Promise.resolve();return t=>e.then(t)}(),cs=up||Iy?2:cp?1:3;let Mx=!0,Rx=!1;function FN(){if(!Rx){Rx=!0;const s=new Uint8Array(2);s[0]=1,s[1]=2,Mx=new Uint16Array(s.buffer)[0]===(2<<8)+1}return Mx}const BN="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function IP(s=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of BN)s.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const WN=IP();function Uw(s){let e=WN;if(s&&s instanceof RegExp)if(s.global)e=s;else{let t="g";s.ignoreCase&&(t+="i"),s.multiline&&(t+="m"),s.unicode&&(t+="u"),e=new RegExp(s.source,t)}return e.lastIndex=0,e}const kP={maxLen:1e3,windowSize:15,timeBudget:150};function gp(s,e,t,i,n=kP){if(t.length>n.maxLen){let d=s-n.maxLen/2;return d<0?d=0:i+=d,t=t.substring(d,s+n.maxLen/2),gp(s,e,t,i,n)}const o=Date.now(),r=s-1-i;let a=-1,l=null;for(let d=1;!(Date.now()-o>=n.timeBudget);d++){const h=r-n.windowSize*d;e.lastIndex=Math.max(0,h);const c=EP(e,t,r,a);if(!c&&l||(l=c,h<=0))break;a=h}if(l){let d={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,d}return null}function EP(s,e,t,i){let n;for(;n=s.exec(e);){const o=n.index||0;if(o<=t&&s.lastIndex>=t)return n;if(i>0&&o>i)return null}return null}const su=8;class VN{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class NP{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class HN{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class yi{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}compute(e,t,i){return i}}class Cc{constructor(e,t=null){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}validate(e){return this.defaultValue}}class md{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,i){return i}}function ge(s,e){return typeof s>"u"?e:s==="false"?!1:Boolean(s)}class Ne extends md{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return ge(e,this.defaultValue)}}class ft extends md{constructor(e,t,i,n,o,r=void 0){typeof r<"u"&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=o),super(e,t,i,r),this.minimum=n,this.maximum=o}static clampedInt(e,t,i,n){if(typeof e>"u")return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(i,o),o=Math.min(n,o),o|0)}validate(e){return ft.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class So extends md{constructor(e,t,i,n,o){typeof o<"u"&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}static clamp(e,t,i){return e<t?t:e>i?i:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(So.float(e,this.defaultValue))}}class hn extends md{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return hn.string(e,this.defaultValue)}}function Xi(s,e,t){return typeof s!="string"||t.indexOf(s)===-1?e:s}class jt extends md{constructor(e,t,i,n,o=void 0){typeof o<"u"&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return Xi(e,this.defaultValue,this._allowedValues)}}class Wc extends yi{constructor(e,t,i,n,o,r,a=void 0){typeof a<"u"&&(a.type="string",a.enum=o,a.default=n),super(e,t,i,a),this._allowedValues=o,this._convert=r}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function TP(s){switch(s){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class MP extends yi{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[m("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),m("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),m("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:m("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return i===0?e.accessibilitySupport:i}}class RP extends yi{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(17,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:m("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:m("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:ge(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:ge(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function AP(s){switch(s){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var li;(function(s){s[s.Line=1]="Line",s[s.Block=2]="Block",s[s.Underline=3]="Underline",s[s.LineThin=4]="LineThin",s[s.BlockOutline=5]="BlockOutline",s[s.UnderlineThin=6]="UnderlineThin"})(li||(li={}));function OP(s){switch(s){case"line":return li.Line;case"block":return li.Block;case"underline":return li.Underline;case"line-thin":return li.LineThin;case"block-outline":return li.BlockOutline;case"underline-thin":return li.UnderlineThin}}class PP extends Cc{constructor(){super(126,[64,31])}compute(e,t,i){const n=["monaco-editor"];return t.get(31)&&n.push(t.get(31)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(64)==="default"?n.push("mouse-default"):t.get(64)==="copy"&&n.push("mouse-copy"),t.get(99)&&n.push("showUnused"),t.get(124)&&n.push("showDeprecated"),n.join(" ")}}class FP extends Ne{constructor(){super(30,"emptySelectionClipboard",!0,{description:m("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class BP extends yi{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(33,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:m("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[m("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),m("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),m("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:m("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[m("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),m("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),m("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:m("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:m("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Me},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:m("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:m("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:ge(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Xi(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Xi(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:ge(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:ge(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:ge(t.loop,this.defaultValue.loop)}}}class xn extends yi{constructor(){super(42,"fontLigatures",xn.OFF,{anyOf:[{type:"boolean",description:m("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:m("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:m("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?xn.OFF:e==="true"?xn.ON:e:Boolean(e)?xn.ON:xn.OFF}}xn.OFF='"liga" off, "calt" off';xn.ON='"liga" on, "calt" on';class WP extends Cc{constructor(){super(41)}compute(e,t,i){return e.fontInfo}}class VP extends md{constructor(){super(43,"fontSize",bs.fontSize,{type:"number",minimum:6,maximum:100,default:bs.fontSize,description:m("fontSize","Controls the font size in pixels.")})}validate(e){let t=So.float(e,this.defaultValue);return t===0?bs.fontSize:So.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class _o extends yi{constructor(){super(44,"fontWeight",bs.fontWeight,{anyOf:[{type:"number",minimum:_o.MINIMUM_VALUE,maximum:_o.MAXIMUM_VALUE,errorMessage:m("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:_o.SUGGESTION_VALUES}],default:bs.fontWeight,description:m("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(ft.clampedInt(e,bs.fontWeight,_o.MINIMUM_VALUE,_o.MAXIMUM_VALUE))}}_o.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];_o.MINIMUM_VALUE=1;_o.MAXIMUM_VALUE=1e3;class HP extends yi{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[m("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),m("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),m("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(48,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:m("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:m("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:m("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:m("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:m("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:m("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:m("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:m("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:m("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:m("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:m("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,r;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:Xi(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:Xi(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=a.multipleTypeDefinitions)!==null&&i!==void 0?i:Xi(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=a.multipleDeclarations)!==null&&n!==void 0?n:Xi(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(o=a.multipleImplementations)!==null&&o!==void 0?o:Xi(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(r=a.multipleReferences)!==null&&r!==void 0?r:Xi(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:hn.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:hn.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:hn.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:hn.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:hn.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class zP extends yi{constructor(){const e={enabled:!0,delay:300,sticky:!0};super(51,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:m("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,description:m("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:m("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ge(t.enabled,this.defaultValue.enabled),delay:ft.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:ge(t.sticky,this.defaultValue.sticky)}}}class vh extends Cc{constructor(){super(129,[47,56,35,63,91,58,59,93,116,119,120,121,2])}compute(e,t,i){return vh.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height),o=Math.floor(e.viewLineCount/n);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:o}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,d=e.typicalHalfwidthCharacterWidth,h=e.scrollBeyondLastLine,c=e.minimap.renderCharacters;let u=o>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const f=e.minimap.maxColumn,g=e.minimap.size,p=e.minimap.side,b=e.verticalScrollbarWidth,C=e.viewLineCount,_=e.remainingWidth,v=e.isViewportWrapping,w=c?2:3;let S=Math.floor(o*n);const D=S/o;let L=!1,x=!1,E=w*u,O=u/o,R=1;if(g==="fill"||g==="fit"){const{typicalViewportLineCount:Se,extraLinesBeyondLastLine:ve,desiredRatio:it,minimapLineCount:gi}=vh.computeContainedMinimapLineCount({viewLineCount:C,scrollBeyondLastLine:h,height:n,lineHeight:l,pixelRatio:o});if(C/gi>1)L=!0,x=!0,u=1,E=1,O=u/o;else{let Ht=!1,xi=u+1;if(g==="fit"){const is=Math.ceil((C+ve)*E);v&&a&&_<=t.stableFitRemainingWidth?(Ht=!0,xi=t.stableFitMaxMinimapScale):Ht=is>S}if(g==="fill"||Ht){L=!0;const is=u;E=Math.min(l*o,Math.max(1,Math.floor(1/it))),v&&a&&_<=t.stableFitRemainingWidth&&(xi=t.stableFitMaxMinimapScale),u=Math.min(xi,Math.max(1,Math.floor(E/w))),u>is&&(R=Math.min(2,u/is)),O=u/o/R,S=Math.ceil(Math.max(Se,C+ve)*E),v?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=_,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const H=Math.floor(f*O),K=Math.min(H,Math.max(0,Math.floor((_-b-2)*O/(d+O)))+su);let de=Math.floor(o*K);const le=de/o;de=Math.floor(de*R);const _e=c?1:2,De=p==="left"?0:i-K-b;return{renderMinimap:_e,minimapLeft:De,minimapWidth:K,minimapHeightIsEditorHeight:L,minimapIsSampling:x,minimapScale:u,minimapLineHeight:E,minimapCanvasInnerWidth:de,minimapCanvasInnerHeight:S,minimapCanvasOuterWidth:le,minimapCanvasOuterHeight:D}}static computeLayout(e,t){const i=t.outerWidth|0,n=t.outerHeight|0,o=t.lineHeight|0,r=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,d=t.pixelRatio,h=t.viewLineCount,c=e.get(121),u=c==="inherit"?e.get(120):c,f=u==="inherit"?e.get(116):u,g=e.get(119),p=e.get(2),b=t.isDominatedByLongLines,C=e.get(47),_=e.get(58).renderType!==0,v=e.get(59),w=e.get(93),S=e.get(63),D=e.get(91),L=D.verticalScrollbarSize,x=D.verticalHasArrows,E=D.arrowSize,O=D.horizontalScrollbarSize,R=e.get(56),H=e.get(35);let K;if(typeof R=="string"&&/^\d+(\.\d+)?ch$/.test(R)){const Uo=parseFloat(R.substr(0,R.length-2));K=ft.clampedInt(Uo*a,0,0,1e3)}else K=ft.clampedInt(R,0,0,1e3);H&&(K+=16);let de=0;if(_){const Uo=Math.max(r,v);de=Math.round(Uo*l)}let le=0;C&&(le=o);let _e=0,De=_e+le,Se=De+de,ve=Se+K;const it=i-le-de-K;let gi=!1,Gi=!1,Ht=-1;p!==2&&(u==="inherit"&&b?(gi=!0,Gi=!0):f==="on"||f==="bounded"?Gi=!0:f==="wordWrapColumn"&&(Ht=g));const xi=vh._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:a,pixelRatio:d,scrollBeyondLastLine:w,minimap:S,verticalScrollbarWidth:L,viewLineCount:h,remainingWidth:it,isViewportWrapping:Gi},t.memory||new HN);xi.renderMinimap!==0&&xi.minimapLeft===0&&(_e+=xi.minimapWidth,De+=xi.minimapWidth,Se+=xi.minimapWidth,ve+=xi.minimapWidth);const is=it-xi.minimapWidth,Pd=Math.max(1,Math.floor((is-L-2)/a)),Fd=x?E:0;return Gi&&(Ht=Math.max(1,Pd),f==="bounded"&&(Ht=Math.min(Ht,g))),{width:i,height:n,glyphMarginLeft:_e,glyphMarginWidth:le,lineNumbersLeft:De,lineNumbersWidth:de,decorationsLeft:Se,decorationsWidth:K,contentLeft:ve,contentWidth:is,minimap:xi,viewportColumn:Pd,isWordWrapMinified:gi,isViewportWrapping:Gi,wrappingColumn:Ht,verticalScrollbarWidth:L,horizontalScrollbarHeight:O,overviewRuler:{top:Fd,width:L,height:n-2*Fd,right:0}}}}class UP extends yi{constructor(){const e={enabled:!0};super(55,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:m("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:ge(e.enabled,this.defaultValue.enabled)}}}class $P extends yi{constructor(){const e={enabled:!0,fontSize:0,fontFamily:""};super(125,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:m("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:m("inlayHints.fontSize","Controls font size of inlay hints in the editor. When set to `0`, the 90% of `#editor.fontSize#` is used.")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,description:m("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ge(t.enabled,this.defaultValue.enabled),fontSize:ft.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:hn.string(t.fontFamily,this.defaultValue.fontFamily)}}}class jP extends So{constructor(){super(57,"lineHeight",bs.lineHeight,e=>So.clamp(e,0,150),{markdownDescription:m("lineHeight",`Controls the line height.
|
|
1
|
+
import{c as vP}from"./helpers.162e09a8.js";function wP(s,e){let t;return e.length===0?t=s:t=s.replace(/\{(\d+)\}/g,function(i,n){const o=n[0];return typeof e[o]<"u"?e[o]:i}),t}function m(s,e,...t){return wP(e,t)}var AC;const xm="en";let cp=!1,up=!1,Im=!1,AN=!1,ON=!1,Iy=!1,kg,OC=xm,SP,Ur;const Ut=typeof self=="object"?self:typeof global=="object"?global:{};let Kt;typeof Ut.vscode<"u"&&typeof Ut.vscode.process<"u"?Kt=Ut.vscode.process:typeof process<"u"&&(Kt=process);const PN=typeof((AC=Kt==null?void 0:Kt.versions)===null||AC===void 0?void 0:AC.electron)=="string"&&Kt.type==="renderer",yP=PN&&(Kt==null?void 0:Kt.sandboxed),LP=(()=>{if(yP)return"bypassHeatCheck";const s=Kt==null?void 0:Kt.env.VSCODE_BROWSER_CODE_LOADING;if(typeof s=="string")return s==="none"||s==="code"||s==="bypassHeatCheck"||s==="bypassHeatCheckAndEagerCompile"?s:"bypassHeatCheck"})(),DP=typeof LP=="string";if(typeof navigator=="object"&&!PN)Ur=navigator.userAgent,cp=Ur.indexOf("Windows")>=0,up=Ur.indexOf("Macintosh")>=0,Iy=(Ur.indexOf("Macintosh")>=0||Ur.indexOf("iPad")>=0||Ur.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Im=Ur.indexOf("Linux")>=0,ON=!0,kg=navigator.language,OC=kg;else if(typeof Kt=="object"){cp=Kt.platform==="win32",up=Kt.platform==="darwin",Im=Kt.platform==="linux",Im&&!!Kt.env.SNAP&&Kt.env.SNAP_REVISION,kg=xm,OC=xm;const s=Kt.env.VSCODE_NLS_CONFIG;if(s)try{const e=JSON.parse(s),t=e.availableLanguages["*"];kg=e.locale,OC=t||xm,SP=e._translationsConfigFile}catch{}AN=!0}else console.error("Unable to resolve platform.");const vi=cp,Me=up,en=Im,zs=AN,bc=ON,To=Iy,xP=Ur,fp=function(){if(Ut.setImmediate)return Ut.setImmediate.bind(Ut);if(typeof Ut.postMessage=="function"&&!Ut.importScripts){let t=[];Ut.addEventListener("message",n=>{if(n.data&&n.data.vscodeSetImmediateId)for(let o=0,r=t.length;o<r;o++){const a=t[o];if(a.id===n.data.vscodeSetImmediateId){t.splice(o,1),a.callback();return}}});let i=0;return n=>{const o=++i;t.push({id:o,callback:n}),Ut.postMessage({vscodeSetImmediateId:o},"*")}}if(typeof(Kt==null?void 0:Kt.nextTick)=="function")return Kt.nextTick.bind(Kt);const e=Promise.resolve();return t=>e.then(t)}(),cs=up||Iy?2:cp?1:3;let Mx=!0,Rx=!1;function FN(){if(!Rx){Rx=!0;const s=new Uint8Array(2);s[0]=1,s[1]=2,Mx=new Uint16Array(s.buffer)[0]===(2<<8)+1}return Mx}const BN="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function IP(s=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of BN)s.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const WN=IP();function Uw(s){let e=WN;if(s&&s instanceof RegExp)if(s.global)e=s;else{let t="g";s.ignoreCase&&(t+="i"),s.multiline&&(t+="m"),s.unicode&&(t+="u"),e=new RegExp(s.source,t)}return e.lastIndex=0,e}const kP={maxLen:1e3,windowSize:15,timeBudget:150};function gp(s,e,t,i,n=kP){if(t.length>n.maxLen){let d=s-n.maxLen/2;return d<0?d=0:i+=d,t=t.substring(d,s+n.maxLen/2),gp(s,e,t,i,n)}const o=Date.now(),r=s-1-i;let a=-1,l=null;for(let d=1;!(Date.now()-o>=n.timeBudget);d++){const h=r-n.windowSize*d;e.lastIndex=Math.max(0,h);const c=EP(e,t,r,a);if(!c&&l||(l=c,h<=0))break;a=h}if(l){let d={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,d}return null}function EP(s,e,t,i){let n;for(;n=s.exec(e);){const o=n.index||0;if(o<=t&&s.lastIndex>=t)return n;if(i>0&&o>i)return null}return null}const su=8;class VN{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class NP{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class HN{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class yi{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}compute(e,t,i){return i}}class Cc{constructor(e,t=null){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}validate(e){return this.defaultValue}}class md{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}validate(e){return typeof e>"u"?this.defaultValue:e}compute(e,t,i){return i}}function ge(s,e){return typeof s>"u"?e:s==="false"?!1:Boolean(s)}class Ne extends md{constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return ge(e,this.defaultValue)}}class ft extends md{constructor(e,t,i,n,o,r=void 0){typeof r<"u"&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=o),super(e,t,i,r),this.minimum=n,this.maximum=o}static clampedInt(e,t,i,n){if(typeof e>"u")return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(i,o),o=Math.min(n,o),o|0)}validate(e){return ft.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class So extends md{constructor(e,t,i,n,o){typeof o<"u"&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}static clamp(e,t,i){return e<t?t:e>i?i:e}static float(e,t){if(typeof e=="number")return e;if(typeof e>"u")return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(So.float(e,this.defaultValue))}}class hn extends md{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n<"u"&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return hn.string(e,this.defaultValue)}}function Xi(s,e,t){return typeof s!="string"||t.indexOf(s)===-1?e:s}class jt extends md{constructor(e,t,i,n,o=void 0){typeof o<"u"&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return Xi(e,this.defaultValue,this._allowedValues)}}class Wc extends yi{constructor(e,t,i,n,o,r,a=void 0){typeof a<"u"&&(a.type="string",a.enum=o,a.default=n),super(e,t,i,a),this._allowedValues=o,this._convert=r}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function TP(s){switch(s){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class MP extends yi{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[m("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),m("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),m("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:m("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return i===0?e.accessibilitySupport:i}}class RP extends yi{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(17,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:m("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:m("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:ge(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:ge(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function AP(s){switch(s){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var li;(function(s){s[s.Line=1]="Line",s[s.Block=2]="Block",s[s.Underline=3]="Underline",s[s.LineThin=4]="LineThin",s[s.BlockOutline=5]="BlockOutline",s[s.UnderlineThin=6]="UnderlineThin"})(li||(li={}));function OP(s){switch(s){case"line":return li.Line;case"block":return li.Block;case"underline":return li.Underline;case"line-thin":return li.LineThin;case"block-outline":return li.BlockOutline;case"underline-thin":return li.UnderlineThin}}class PP extends Cc{constructor(){super(126,[64,31])}compute(e,t,i){const n=["monaco-editor"];return t.get(31)&&n.push(t.get(31)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(64)==="default"?n.push("mouse-default"):t.get(64)==="copy"&&n.push("mouse-copy"),t.get(99)&&n.push("showUnused"),t.get(124)&&n.push("showDeprecated"),n.join(" ")}}class FP extends Ne{constructor(){super(30,"emptySelectionClipboard",!0,{description:m("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class BP extends yi{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(33,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:m("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[m("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),m("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),m("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:m("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[m("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),m("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),m("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:m("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:m("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Me},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:m("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:m("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:ge(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Xi(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Xi(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:ge(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:ge(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:ge(t.loop,this.defaultValue.loop)}}}class xn extends yi{constructor(){super(42,"fontLigatures",xn.OFF,{anyOf:[{type:"boolean",description:m("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:m("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:m("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return typeof e>"u"?this.defaultValue:typeof e=="string"?e==="false"?xn.OFF:e==="true"?xn.ON:e:Boolean(e)?xn.ON:xn.OFF}}xn.OFF='"liga" off, "calt" off';xn.ON='"liga" on, "calt" on';class WP extends Cc{constructor(){super(41)}compute(e,t,i){return e.fontInfo}}class VP extends md{constructor(){super(43,"fontSize",bs.fontSize,{type:"number",minimum:6,maximum:100,default:bs.fontSize,description:m("fontSize","Controls the font size in pixels.")})}validate(e){let t=So.float(e,this.defaultValue);return t===0?bs.fontSize:So.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class _o extends yi{constructor(){super(44,"fontWeight",bs.fontWeight,{anyOf:[{type:"number",minimum:_o.MINIMUM_VALUE,maximum:_o.MAXIMUM_VALUE,errorMessage:m("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:_o.SUGGESTION_VALUES}],default:bs.fontWeight,description:m("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(ft.clampedInt(e,bs.fontWeight,_o.MINIMUM_VALUE,_o.MAXIMUM_VALUE))}}_o.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];_o.MINIMUM_VALUE=1;_o.MAXIMUM_VALUE=1e3;class HP extends yi{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[m("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),m("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),m("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(48,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:m("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:m("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:m("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:m("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:m("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:m("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:m("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:m("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:m("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:m("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:m("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,r;if(!e||typeof e!="object")return this.defaultValue;const a=e;return{multiple:Xi(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:Xi(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=a.multipleTypeDefinitions)!==null&&i!==void 0?i:Xi(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=a.multipleDeclarations)!==null&&n!==void 0?n:Xi(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(o=a.multipleImplementations)!==null&&o!==void 0?o:Xi(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(r=a.multipleReferences)!==null&&r!==void 0?r:Xi(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:hn.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:hn.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:hn.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:hn.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:hn.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class zP extends yi{constructor(){const e={enabled:!0,delay:300,sticky:!0};super(51,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:m("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,description:m("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:m("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ge(t.enabled,this.defaultValue.enabled),delay:ft.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:ge(t.sticky,this.defaultValue.sticky)}}}class vh extends Cc{constructor(){super(129,[47,56,35,63,91,58,59,93,116,119,120,121,2])}compute(e,t,i){return vh.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height),o=Math.floor(e.viewLineCount/n);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:o}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,d=e.typicalHalfwidthCharacterWidth,h=e.scrollBeyondLastLine,c=e.minimap.renderCharacters;let u=o>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const f=e.minimap.maxColumn,g=e.minimap.size,p=e.minimap.side,b=e.verticalScrollbarWidth,C=e.viewLineCount,_=e.remainingWidth,v=e.isViewportWrapping,w=c?2:3;let S=Math.floor(o*n);const D=S/o;let L=!1,x=!1,E=w*u,O=u/o,R=1;if(g==="fill"||g==="fit"){const{typicalViewportLineCount:Se,extraLinesBeyondLastLine:ve,desiredRatio:it,minimapLineCount:gi}=vh.computeContainedMinimapLineCount({viewLineCount:C,scrollBeyondLastLine:h,height:n,lineHeight:l,pixelRatio:o});if(C/gi>1)L=!0,x=!0,u=1,E=1,O=u/o;else{let Ht=!1,xi=u+1;if(g==="fit"){const is=Math.ceil((C+ve)*E);v&&a&&_<=t.stableFitRemainingWidth?(Ht=!0,xi=t.stableFitMaxMinimapScale):Ht=is>S}if(g==="fill"||Ht){L=!0;const is=u;E=Math.min(l*o,Math.max(1,Math.floor(1/it))),v&&a&&_<=t.stableFitRemainingWidth&&(xi=t.stableFitMaxMinimapScale),u=Math.min(xi,Math.max(1,Math.floor(E/w))),u>is&&(R=Math.min(2,u/is)),O=u/o/R,S=Math.ceil(Math.max(Se,C+ve)*E),v?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=_,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const H=Math.floor(f*O),K=Math.min(H,Math.max(0,Math.floor((_-b-2)*O/(d+O)))+su);let de=Math.floor(o*K);const le=de/o;de=Math.floor(de*R);const _e=c?1:2,De=p==="left"?0:i-K-b;return{renderMinimap:_e,minimapLeft:De,minimapWidth:K,minimapHeightIsEditorHeight:L,minimapIsSampling:x,minimapScale:u,minimapLineHeight:E,minimapCanvasInnerWidth:de,minimapCanvasInnerHeight:S,minimapCanvasOuterWidth:le,minimapCanvasOuterHeight:D}}static computeLayout(e,t){const i=t.outerWidth|0,n=t.outerHeight|0,o=t.lineHeight|0,r=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,d=t.pixelRatio,h=t.viewLineCount,c=e.get(121),u=c==="inherit"?e.get(120):c,f=u==="inherit"?e.get(116):u,g=e.get(119),p=e.get(2),b=t.isDominatedByLongLines,C=e.get(47),_=e.get(58).renderType!==0,v=e.get(59),w=e.get(93),S=e.get(63),D=e.get(91),L=D.verticalScrollbarSize,x=D.verticalHasArrows,E=D.arrowSize,O=D.horizontalScrollbarSize,R=e.get(56),H=e.get(35);let K;if(typeof R=="string"&&/^\d+(\.\d+)?ch$/.test(R)){const Uo=parseFloat(R.substr(0,R.length-2));K=ft.clampedInt(Uo*a,0,0,1e3)}else K=ft.clampedInt(R,0,0,1e3);H&&(K+=16);let de=0;if(_){const Uo=Math.max(r,v);de=Math.round(Uo*l)}let le=0;C&&(le=o);let _e=0,De=_e+le,Se=De+de,ve=Se+K;const it=i-le-de-K;let gi=!1,Gi=!1,Ht=-1;p!==2&&(u==="inherit"&&b?(gi=!0,Gi=!0):f==="on"||f==="bounded"?Gi=!0:f==="wordWrapColumn"&&(Ht=g));const xi=vh._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:a,pixelRatio:d,scrollBeyondLastLine:w,minimap:S,verticalScrollbarWidth:L,viewLineCount:h,remainingWidth:it,isViewportWrapping:Gi},t.memory||new HN);xi.renderMinimap!==0&&xi.minimapLeft===0&&(_e+=xi.minimapWidth,De+=xi.minimapWidth,Se+=xi.minimapWidth,ve+=xi.minimapWidth);const is=it-xi.minimapWidth,Pd=Math.max(1,Math.floor((is-L-2)/a)),Fd=x?E:0;return Gi&&(Ht=Math.max(1,Pd),f==="bounded"&&(Ht=Math.min(Ht,g))),{width:i,height:n,glyphMarginLeft:_e,glyphMarginWidth:le,lineNumbersLeft:De,lineNumbersWidth:de,decorationsLeft:Se,decorationsWidth:K,contentLeft:ve,contentWidth:is,minimap:xi,viewportColumn:Pd,isWordWrapMinified:gi,isViewportWrapping:Gi,wrappingColumn:Ht,verticalScrollbarWidth:L,horizontalScrollbarHeight:O,overviewRuler:{top:Fd,width:L,height:n-2*Fd,right:0}}}}class UP extends yi{constructor(){const e={enabled:!0};super(55,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:m("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:ge(e.enabled,this.defaultValue.enabled)}}}class $P extends yi{constructor(){const e={enabled:!0,fontSize:0,fontFamily:""};super(125,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:m("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:m("inlayHints.fontSize","Controls font size of inlay hints in the editor. When set to `0`, the 90% of `#editor.fontSize#` is used.")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,description:m("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ge(t.enabled,this.defaultValue.enabled),fontSize:ft.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:hn.string(t.fontFamily,this.defaultValue.fontFamily)}}}class jP extends So{constructor(){super(57,"lineHeight",bs.lineHeight,e=>So.clamp(e,0,150),{markdownDescription:m("lineHeight",`Controls the line height.
|
|
2
2
|
- Use 0 to automatically compute the line height from the font size.
|
|
3
3
|
- Values between 0 and 8 will be used as a multiplier with the font size.
|
|
4
4
|
- Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,i){return e.fontInfo.lineHeight}}class KP extends yi{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(63,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:m("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[m("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),m("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),m("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:m("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:m("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:m("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:m("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:m("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:m("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ge(t.enabled,this.defaultValue.enabled),size:Xi(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Xi(t.side,this.defaultValue.side,["right","left"]),showSlider:Xi(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:ge(t.renderCharacters,this.defaultValue.renderCharacters),scale:ft.clampedInt(t.scale,1,1,3),maxColumn:ft.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function qP(s){return s==="ctrlCmd"?Me?"metaKey":"ctrlKey":"altKey"}class GP extends yi{constructor(){super(73,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:m("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:m("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{top:ft.clampedInt(t.top,0,0,1e3),bottom:ft.clampedInt(t.bottom,0,0,1e3)}}}class ZP extends yi{constructor(){const e={enabled:!0,cycle:!1};super(74,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:m("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:m("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ge(t.enabled,this.defaultValue.enabled),cycle:ge(t.cycle,this.defaultValue.cycle)}}}class YP extends Cc{constructor(){super(127)}compute(e,t,i){return e.pixelRatio}}class XP extends yi{constructor(){const e={other:!0,comments:!1,strings:!1};super(77,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:m("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:m("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:m("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:e,description:m("quickSuggestions","Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=e}validate(e){if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const t=e,i={other:ge(t.other,this.defaultValue.other),comments:ge(t.comments,this.defaultValue.comments),strings:ge(t.strings,this.defaultValue.strings)};return i.other&&i.comments&&i.strings?!0:!i.other&&!i.comments&&!i.strings?!1:i}return this.defaultValue}}class QP extends yi{constructor(){super(58,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[m("lineNumbers.off","Line numbers are not rendered."),m("lineNumbers.on","Line numbers are rendered as absolute number."),m("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),m("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:m("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return typeof e<"u"&&(typeof e=="function"?(t=4,i=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:i}}}function ky(s){const e=s.get(86);return e==="editable"?s.get(79):e!=="on"}class JP extends yi{constructor(){const e=[],t={type:"number",description:m("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(90,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:m("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:m("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){let t=[];for(let i of e)if(typeof i=="number")t.push({column:ft.clampedInt(i,0,0,1e4),color:null});else if(i&&typeof i=="object"){const n=i;t.push({column:ft.clampedInt(n.column,0,0,1e4),color:n.color})}return t.sort((i,n)=>i.column-n.column),t}return this.defaultValue}}function Ax(s,e){if(typeof s!="string")return e;switch(s){case"hidden":return 2;case"visible":return 3;default:return 1}}class eF extends yi{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(91,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[m("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),m("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),m("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:m("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[m("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),m("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),m("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:m("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:m("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:m("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:m("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e,i=ft.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=ft.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:ft.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Ax(t.vertical,this.defaultValue.vertical),horizontal:Ax(t.horizontal,this.defaultValue.horizontal),useShadows:ge(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:ge(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:ge(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:ge(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:ge(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:ft.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:ft.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:ge(t.scrollByPage,this.defaultValue.scrollByPage)}}}class tF extends yi{constructor(){const e={enabled:!1,mode:"subwordSmart"};super(53,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:m("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")},"editor.inlineSuggest.mode":{type:"string",enum:["prefix","subword","subwordSmart"],enumDescriptions:[m("inlineSuggest.mode.prefix","Only render an inline suggestion if the replace text is a prefix of the insert text."),m("inlineSuggest.mode.subword","Only render an inline suggestion if the replace text is a subword of the insert text."),m("inlineSuggest.mode.subwordSmart","Only render an inline suggestion if the replace text is a subword of the insert text, but the subword must start after the cursor.")],default:e.mode,description:m("inlineSuggest.mode","Controls which mode to use for rendering inline suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:ge(t.enabled,this.defaultValue.enabled),mode:Xi(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class iF extends yi{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(105,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[m("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),m("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:m("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:m("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:m("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:m("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:m("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:m("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:m("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:m("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.previewMode":{type:"string",enum:["prefix","subword","subwordSmart"],enumDescriptions:[m("suggest.previewMode.prefix","Only render a preview if the replace text is a prefix of the insert text."),m("suggest.previewMode.subword","Only render a preview if the replace text is a subword of the insert text."),m("suggest.previewMode.subwordSmart","Render a preview if the replace text is a subword of the insert text, or if it is a prefix of the insert text.")],default:e.previewMode,description:m("suggest.previewMode","Controls which mode to use for rendering the suggest preview.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:m("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:m("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:m("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertMode:Xi(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:ge(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:ge(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:ge(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:ge(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:ge(t.showIcons,this.defaultValue.showIcons),showStatusBar:ge(t.showStatusBar,this.defaultValue.showStatusBar),preview:ge(t.preview,this.defaultValue.preview),previewMode:Xi(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:ge(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:ge(t.showMethods,this.defaultValue.showMethods),showFunctions:ge(t.showFunctions,this.defaultValue.showFunctions),showConstructors:ge(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:ge(t.showDeprecated,this.defaultValue.showDeprecated),showFields:ge(t.showFields,this.defaultValue.showFields),showVariables:ge(t.showVariables,this.defaultValue.showVariables),showClasses:ge(t.showClasses,this.defaultValue.showClasses),showStructs:ge(t.showStructs,this.defaultValue.showStructs),showInterfaces:ge(t.showInterfaces,this.defaultValue.showInterfaces),showModules:ge(t.showModules,this.defaultValue.showModules),showProperties:ge(t.showProperties,this.defaultValue.showProperties),showEvents:ge(t.showEvents,this.defaultValue.showEvents),showOperators:ge(t.showOperators,this.defaultValue.showOperators),showUnits:ge(t.showUnits,this.defaultValue.showUnits),showValues:ge(t.showValues,this.defaultValue.showValues),showConstants:ge(t.showConstants,this.defaultValue.showConstants),showEnums:ge(t.showEnums,this.defaultValue.showEnums),showEnumMembers:ge(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:ge(t.showKeywords,this.defaultValue.showKeywords),showWords:ge(t.showWords,this.defaultValue.showWords),showColors:ge(t.showColors,this.defaultValue.showColors),showFiles:ge(t.showFiles,this.defaultValue.showFiles),showReferences:ge(t.showReferences,this.defaultValue.showReferences),showFolders:ge(t.showFolders,this.defaultValue.showFolders),showTypeParameters:ge(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:ge(t.showSnippets,this.defaultValue.showSnippets),showUsers:ge(t.showUsers,this.defaultValue.showUsers),showIssues:ge(t.showIssues,this.defaultValue.showIssues)}}}class nF extends yi{constructor(){super(101,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:m("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:ge(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class sF extends Cc{constructor(){super(128,[79])}compute(e,t,i){return t.get(79)?!0:e.tabFocusMode}}function oF(s){switch(s){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class rF extends Cc{constructor(){super(130,[129])}compute(e,t,i){const n=t.get(129);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}const aF="Consolas, 'Courier New', monospace",lF="Menlo, Monaco, 'Courier New', monospace",dF="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",bs={fontFamily:Me?lF:en?dF:aF,fontWeight:"normal",fontSize:Me?12:14,lineHeight:0,letterSpacing:0},un={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},dh=[];function Z(s){return dh[s.id]=s,s}const Xs={acceptSuggestionOnCommitCharacter:Z(new Ne(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:m("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:Z(new jt(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",m("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:m("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:Z(new MP),accessibilityPageSize:Z(new ft(3,"accessibilityPageSize",10,1,1073741824,{description:m("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:Z(new hn(4,"ariaLabel",m("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:Z(new jt(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),m("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:m("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:Z(new jt(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",m("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:m("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:Z(new jt(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",m("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:m("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:Z(new jt(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),m("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:m("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:Z(new Wc(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],TP,{enumDescriptions:[m("editor.autoIndent.none","The editor will not insert indentation automatically."),m("editor.autoIndent.keep","The editor will keep the current line's indentation."),m("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),m("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),m("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:m("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:Z(new Ne(10,"automaticLayout",!1)),autoSurround:Z(new jt(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[m("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),m("editor.autoSurround.quotes","Surround with quotes but not brackets."),m("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:m("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),stickyTabStops:Z(new Ne(103,"stickyTabStops",!1,{description:m("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:Z(new Ne(12,"codeLens",!0,{description:m("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:Z(new hn(13,"codeLensFontFamily","",{description:m("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:Z(new ft(14,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:m("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used.")})),colorDecorators:Z(new Ne(15,"colorDecorators",!0,{description:m("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:Z(new Ne(16,"columnSelection",!1,{description:m("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:Z(new RP),contextmenu:Z(new Ne(18,"contextmenu",!0)),copyWithSyntaxHighlighting:Z(new Ne(19,"copyWithSyntaxHighlighting",!0,{description:m("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:Z(new Wc(20,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],AP,{description:m("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:Z(new Ne(21,"cursorSmoothCaretAnimation",!1,{description:m("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:Z(new Wc(22,"cursorStyle",li.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],OP,{description:m("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:Z(new ft(23,"cursorSurroundingLines",0,0,1073741824,{description:m("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:Z(new jt(24,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[m("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),m("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:m("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:Z(new ft(25,"cursorWidth",0,0,1073741824,{markdownDescription:m("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:Z(new Ne(26,"disableLayerHinting",!1)),disableMonospaceOptimizations:Z(new Ne(27,"disableMonospaceOptimizations",!1)),domReadOnly:Z(new Ne(28,"domReadOnly",!1)),dragAndDrop:Z(new Ne(29,"dragAndDrop",!0,{description:m("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:Z(new FP),extraEditorClassName:Z(new hn(31,"extraEditorClassName","")),fastScrollSensitivity:Z(new So(32,"fastScrollSensitivity",5,s=>s<=0?5:s,{markdownDescription:m("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:Z(new BP),fixedOverflowWidgets:Z(new Ne(34,"fixedOverflowWidgets",!1)),folding:Z(new Ne(35,"folding",!0,{description:m("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:Z(new jt(36,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[m("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),m("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:m("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:Z(new Ne(37,"foldingHighlight",!0,{description:m("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:Z(new Ne(38,"foldingImportsByDefault",!1,{description:m("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),unfoldOnClickAfterEndOfLine:Z(new Ne(39,"unfoldOnClickAfterEndOfLine",!1,{description:m("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:Z(new hn(40,"fontFamily",bs.fontFamily,{description:m("fontFamily","Controls the font family.")})),fontInfo:Z(new WP),fontLigatures2:Z(new xn),fontSize:Z(new VP),fontWeight:Z(new _o),formatOnPaste:Z(new Ne(45,"formatOnPaste",!1,{description:m("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:Z(new Ne(46,"formatOnType",!1,{description:m("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:Z(new Ne(47,"glyphMargin",!0,{description:m("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:Z(new HP),hideCursorInOverviewRuler:Z(new Ne(49,"hideCursorInOverviewRuler",!1,{description:m("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),highlightActiveIndentGuide:Z(new Ne(50,"highlightActiveIndentGuide",!0,{description:m("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")})),hover:Z(new zP),inDiffEditor:Z(new Ne(52,"inDiffEditor",!1)),letterSpacing:Z(new So(54,"letterSpacing",bs.letterSpacing,s=>So.clamp(s,-5,20),{description:m("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:Z(new UP),lineDecorationsWidth:Z(new md(56,"lineDecorationsWidth",10)),lineHeight:Z(new jP),lineNumbers:Z(new QP),lineNumbersMinChars:Z(new ft(59,"lineNumbersMinChars",5,1,300)),linkedEditing:Z(new Ne(60,"linkedEditing",!1,{description:m("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:Z(new Ne(61,"links",!0,{description:m("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:Z(new jt(62,"matchBrackets","always",["always","near","never"],{description:m("matchBrackets","Highlight matching brackets.")})),minimap:Z(new KP),mouseStyle:Z(new jt(64,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:Z(new So(65,"mouseWheelScrollSensitivity",1,s=>s===0?1:s,{markdownDescription:m("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:Z(new Ne(66,"mouseWheelZoom",!1,{markdownDescription:m("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:Z(new Ne(67,"multiCursorMergeOverlapping",!0,{description:m("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:Z(new Wc(68,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],qP,{markdownEnumDescriptions:[m("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),m("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:m({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:Z(new jt(69,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[m("multiCursorPaste.spread","Each cursor pastes a single line of the text."),m("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:m("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:Z(new Ne(70,"occurrencesHighlight",!0,{description:m("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:Z(new Ne(71,"overviewRulerBorder",!0,{description:m("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:Z(new ft(72,"overviewRulerLanes",3,0,3)),padding:Z(new GP),parameterHints:Z(new ZP),peekWidgetDefaultFocus:Z(new jt(75,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[m("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),m("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:m("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:Z(new Ne(76,"definitionLinkOpensInPeek",!1,{description:m("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:Z(new XP),quickSuggestionsDelay:Z(new ft(78,"quickSuggestionsDelay",10,0,1073741824,{description:m("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:Z(new Ne(79,"readOnly",!1)),renameOnType:Z(new Ne(80,"renameOnType",!1,{description:m("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:m("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:Z(new Ne(81,"renderControlCharacters",!1,{description:m("renderControlCharacters","Controls whether the editor should render control characters.")})),renderIndentGuides:Z(new Ne(82,"renderIndentGuides",!0,{description:m("renderIndentGuides","Controls whether the editor should render indent guides.")})),renderFinalNewline:Z(new Ne(83,"renderFinalNewline",!0,{description:m("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:Z(new jt(84,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",m("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:m("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:Z(new Ne(85,"renderLineHighlightOnlyWhenFocus",!1,{description:m("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:Z(new jt(86,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:Z(new jt(87,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",m("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),m("renderWhitespace.selection","Render whitespace characters only on selected text."),m("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:m("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:Z(new ft(88,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:Z(new Ne(89,"roundedSelection",!0,{description:m("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:Z(new JP),scrollbar:Z(new eF),scrollBeyondLastColumn:Z(new ft(92,"scrollBeyondLastColumn",5,0,1073741824,{description:m("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:Z(new Ne(93,"scrollBeyondLastLine",!0,{description:m("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:Z(new Ne(94,"scrollPredominantAxis",!0,{description:m("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:Z(new Ne(95,"selectionClipboard",!0,{description:m("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:en})),selectionHighlight:Z(new Ne(96,"selectionHighlight",!0,{description:m("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:Z(new Ne(97,"selectOnLineNumbers",!0)),showFoldingControls:Z(new jt(98,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[m("showFoldingControls.always","Always show the folding controls."),m("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:m("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:Z(new Ne(99,"showUnused",!0,{description:m("showUnused","Controls fading out of unused code.")})),showDeprecated:Z(new Ne(124,"showDeprecated",!0,{description:m("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:Z(new $P),snippetSuggestions:Z(new jt(100,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[m("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),m("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),m("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),m("snippetSuggestions.none","Do not show snippet suggestions.")],description:m("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:Z(new nF),smoothScrolling:Z(new Ne(102,"smoothScrolling",!1,{description:m("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:Z(new ft(104,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:Z(new iF),inlineSuggest:Z(new tF),suggestFontSize:Z(new ft(106,"suggestFontSize",0,0,1e3,{markdownDescription:m("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:Z(new ft(107,"suggestLineHeight",0,0,1e3,{markdownDescription:m("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:Z(new Ne(108,"suggestOnTriggerCharacters",!0,{description:m("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:Z(new jt(109,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[m("suggestSelection.first","Always select the first suggestion."),m("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),m("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:m("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:Z(new jt(110,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[m("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),m("tabCompletion.off","Disable tab completions."),m("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:m("tabCompletion","Enables tab completions.")})),tabIndex:Z(new ft(111,"tabIndex",0,-1,1073741824)),unusualLineTerminators:Z(new jt(112,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[m("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),m("unusualLineTerminators.off","Unusual line terminators are ignored."),m("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:m("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:Z(new Ne(113,"useShadowDOM",!0)),useTabStops:Z(new Ne(114,"useTabStops",!0,{description:m("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:Z(new hn(115,"wordSeparators",BN,{description:m("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:Z(new jt(116,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[m("wordWrap.off","Lines will never wrap."),m("wordWrap.on","Lines will wrap at the viewport width."),m({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),m({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:m({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:Z(new hn(117,"wordWrapBreakAfterCharacters"," })]?|/&.,;\xA2\xB0\u2032\u2033\u2030\u2103\u3001\u3002\uFF61\uFF64\uFFE0\uFF0C\uFF0E\uFF1A\uFF1B\uFF1F\uFF01\uFF05\u30FB\uFF65\u309D\u309E\u30FD\u30FE\u30FC\u30A1\u30A3\u30A5\u30A7\u30A9\u30C3\u30E3\u30E5\u30E7\u30EE\u30F5\u30F6\u3041\u3043\u3045\u3047\u3049\u3063\u3083\u3085\u3087\u308E\u3095\u3096\u31F0\u31F1\u31F2\u31F3\u31F4\u31F5\u31F6\u31F7\u31F8\u31F9\u31FA\u31FB\u31FC\u31FD\u31FE\u31FF\u3005\u303B\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF70\u201D\u3009\u300B\u300D\u300F\u3011\u3015\uFF09\uFF3D\uFF5D\uFF63")),wordWrapBreakBeforeCharacters:Z(new hn(118,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:Z(new ft(119,"wordWrapColumn",80,1,1073741824,{markdownDescription:m({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:Z(new jt(120,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:Z(new jt(121,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:Z(new Wc(122,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],oF,{enumDescriptions:[m("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),m("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),m("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),m("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:m("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:Z(new jt(123,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[m("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),m("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:m("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:Z(new PP),pixelRatio:Z(new YP),tabFocusMode:Z(new sF),layoutInfo:Z(new vh),wrappingInfo:Z(new rF)};class hF{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?new Error(e.message+`
|
|
@@ -582,7 +582,7 @@ ${e.toString()}`}}class I_{constructor(e=new _f,t=!1,i){this._activeInstantiatio
|
|
|
582
582
|
`?-1:0,r+=i;for(const a of t)a.end<=r||(a.start>=r&&(a.start+=n),a.end>=r&&(a.end+=n));return i+=n,"\u23CE"})}}var d1=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};function UU(s,e){Xn(e)?s.title=e:e!=null&&e.markdownNotSupportedFallback?s.title=e.markdownNotSupportedFallback:s.removeAttribute("title")}function $U(s,e,t){if(!t)return;const i=jU(t);let n,o;const r=l=>{if(n)return;const d=new tn,h=C=>{const _=C.type===ae.MOUSE_DOWN;_&&(o==null||o.dispose(),o=void 0),(_||C.fromElement===e)&&(n==null||n.dispose(),n=void 0)},c=q(e,ae.MOUSE_LEAVE,h,!0),u=q(e,ae.MOUSE_DOWN,h,!0),f={targetElements:[e],dispose:()=>{}};let g;if(s.placement===void 0||s.placement==="mouse"){const C=_=>f.x=_.x+10;g=q(e,ae.MOUSE_MOVE,C,!0)}const p=()=>d1(this,void 0,void 0,function*(){var C;if(n){const _={text:m("iconLabel.loading","Loading..."),target:f,hoverPosition:2};o==null||o.dispose(),o=s.showHover(_);const v=(C=yield i(d.token))!==null&&C!==void 0?C:Xn(t)?void 0:t.markdownNotSupportedFallback;if(o==null||o.dispose(),o=void 0,v&&n){const w={text:v,target:f,showPointer:s.placement==="element",hoverPosition:2};o=s.showHover(w)}}g==null||g.dispose()}),b=new pt(p,s.delay);b.schedule(),n=Re(()=>{b.dispose(),g==null||g.dispose(),u.dispose(),c.dispose(),d.dispose(!0)})},a=q(e,ae.MOUSE_OVER,r,!0);return Re(()=>{a.dispose(),n==null||n.dispose(),o==null||o.dispose()})}function jU(s){if(Xn(s))return()=>d1(this,void 0,void 0,function*(){return s});if(_u(s.markdown))return s.markdown;{const e=s.markdown;return()=>d1(this,void 0,void 0,function*(){return e})}}class Yv{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class FD extends U{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new Yv(j(e,G(".monaco-icon-label")))),this.labelContainer=j(this.domNode.element,G(".monaco-icon-label-container"));const i=j(this.labelContainer,G("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new Yv(j(this.labelContainer,G("span.monaco-icon-description-container")))),(t==null?void 0:t.supportHighlights)||(t==null?void 0:t.supportIcons)?this.nameNode=new GU(i,!!t.supportIcons):this.nameNode=new KU(i),t!=null&&t.supportDescriptionHighlights?this.descriptionNodeFactory=()=>new ka(j(this.descriptionContainer.element,G("span.label-description")),!!t.supportIcons):this.descriptionNodeFactory=()=>this._register(new Yv(j(this.descriptionContainer.element,G("span.label-description")))),this.hoverDelegate=t==null?void 0:t.hoverDelegate}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover(this.labelContainer,i==null?void 0:i.title),this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof ka?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,i==null?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(i==null?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(!this.hoverDelegate)UU(e,t);else{const n=$U(this.hoverDelegate,e,t);n&&this.customHovers.set(e,n)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class KU{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&br(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=j(this.container,G("a.label-name",{id:t==null?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i<e.length;i++){const n=e[i],o=(t==null?void 0:t.domId)&&`${t==null?void 0:t.domId}_${i}`;j(this.container,G("a.label-name",{id:o,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},n)),i<e.length-1&&j(this.container,G("span.label-separator",void 0,(t==null?void 0:t.separator)||"/"))}}}}function qU(s,e,t){if(!t)return;let i=0;return s.map(n=>{const o={start:i,end:i+n.length},r=t.map(a=>Ei.intersect(o,a)).filter(a=>!Ei.isEmpty(a)).map(({start:a,end:l})=>({start:a-i,end:l-i}));return i=o.end+e.length,r})}class GU{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&br(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new ka(j(this.container,G("a.label-name",{id:t==null?void 0:t.domId})),this.supportIcons)),this.singleLabel.set(e,t==null?void 0:t.matches,void 0,t==null?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(t==null?void 0:t.separator)||"/",n=qU(e,i,t==null?void 0:t.matches);for(let o=0;o<e.length;o++){const r=e[o],a=n?n[o]:void 0,l=(t==null?void 0:t.domId)&&`${t==null?void 0:t.domId}_${o}`,d=G("a.label-name",{id:l,"data-icon-label-count":e.length,"data-icon-label-index":o,role:"treeitem"});new ka(j(this.container,d),this.supportIcons).set(r,a,void 0,t==null?void 0:t.labelEscapeNewLines),o<e.length-1&&j(d,G("span.label-separator",void 0,i))}}}}class BD{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const vA=new BD("id#"),Xv={},ZU=new BD("quick-input-button-icon-");function h1(s){if(!s)return;let e;const t=s.dark.toString();return Xv[t]?e=Xv[t]:(e=ZU.nextId(),V0(`.${e}`,`background-image: ${kr(s.light||s.dark)}`),V0(`.vs-dark .${e}, .hc-black .${e}`,`background-image: ${kr(s.dark)}`),Xv[t]=e),e}const lm=G;class WD{constructor(e,t,i){this.os=t,this.keyElements=new Set,this.options=i||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow,this.domNode=j(e,lm(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&WD.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){let[e,t]=this.keybinding.getParts();e&&this.renderPart(this.domNode,e,this.matches?this.matches.firstPart:null),t&&(j(this.domNode,lm("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,t,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){ci(this.domNode),this.keyElements.clear()}renderPart(e,t,i){const n=pL.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,Boolean(i==null?void 0:i.ctrlKey),n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,Boolean(i==null?void 0:i.shiftKey),n.separator),t.altKey&&this.renderKey(e,n.altKey,Boolean(i==null?void 0:i.altKey),n.separator),t.metaKey&&this.renderKey(e,n.metaKey,Boolean(i==null?void 0:i.metaKey),n.separator);const o=t.keyLabel;o&&this.renderKey(e,o,Boolean(i==null?void 0:i.keyCode),"")}renderKey(e,t,i,n){j(e,this.createKeyElement(t,i?".highlight":"")),n&&j(e,lm("span.monaco-keybinding-key-separator",void 0,n))}renderUnbound(e){j(e,this.createKeyElement(m("unbound","Unbound")))}createKeyElement(e,t=""){const i=lm("span.monaco-keybinding-key"+t,void 0,e);return this.keyElements.add(i),i}style(e){this.labelBackground=e.keybindingLabelBackground,this.labelForeground=e.keybindingLabelForeground,this.labelBorder=e.keybindingLabelBorder,this.labelBottomBorder=e.keybindingLabelBottomBorder,this.labelShadow=e.keybindingLabelShadow,this.applyStyles()}applyStyles(){var e;if(this.element){for(const t of this.keyElements)this.labelBackground&&(t.style.backgroundColor=(e=this.labelBackground)===null||e===void 0?void 0:e.toString()),this.labelBorder&&(t.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(t.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(t.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(e,t){return e===t||!e&&!t?!0:!!e&&!!t&&br(e.firstPart,t.firstPart)&&br(e.chordPart,t.chordPart)}}var wA=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},YU=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};const ho=G;class XU{constructor(e){this.hidden=!1,this._onChecked=new T,this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class pg{get templateId(){return pg.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=j(e,ho(".quick-input-list-entry"));const i=j(t.entry,ho("label.quick-input-list-label"));t.toDisposeTemplate.push(qt(i,ae.CLICK,d=>{t.checkbox.offsetParent||d.preventDefault()})),t.checkbox=j(i,ho("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(qt(t.checkbox,ae.CHANGE,d=>{t.element.checked=t.checkbox.checked}));const n=j(i,ho(".quick-input-list-rows")),o=j(n,ho(".quick-input-list-row")),r=j(n,ho(".quick-input-list-row"));t.label=new FD(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const a=j(o,ho(".quick-input-list-entry-keybinding"));t.keybinding=new WD(a,cs);const l=j(r,ho(".quick-input-list-label-meta"));return t.detail=new ka(l,!0),t.separator=j(t.entry,ho(".quick-input-list-separator")),t.actionBar=new Rr(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){i.toDisposeElement=ze(i.toDisposeElement),i.element=e,i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked(d=>i.checkbox.checked=d));const{labelHighlights:n,descriptionHighlights:o,detailHighlights:r}=e,a=Object.create(null);a.matches=n||[],a.descriptionTitle=e.saneDescription,a.descriptionMatches=o||[],a.extraClasses=e.item.iconClasses,a.italic=e.item.italic,a.strikethrough=e.item.strikethrough,i.label.setLabel(e.saneLabel,e.saneDescription,a),i.keybinding.set(e.item.keybinding),i.detail.set(e.saneDetail,r),e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),i.actionBar.clear();const l=e.item.buttons;l&&l.length?(i.actionBar.push(l.map((d,h)=>{let c=d.iconClass||(d.iconPath?h1(d.iconPath):void 0);d.alwaysVisible&&(c=c?`${c} always-visible`:"always-visible");const u=new vs(`id-${h}`,"",c,!0,()=>YU(this,void 0,void 0,function*(){e.fireButtonTriggered({button:d,item:e.item})}));return u.tooltip=d.tooltip||"",u}),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=ze(i.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=ze(e.toDisposeElement),e.toDisposeTemplate=ze(e.toDisposeTemplate)}}pg.ID="listelement";class QU{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return pg.ID}}var Pt;(function(s){s[s.First=1]="First",s[s.Second=2]="Second",s[s.Last=3]="Last",s[s.Next=4]="Next",s[s.Previous=5]="Previous",s[s.NextPage=6]="NextPage",s[s.PreviousPage=7]="PreviousPage"})(Pt||(Pt={}));class VD{constructor(e,t,i){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new T,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new T,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new T,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new T,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new T,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new T,this.onKeyDown=this._onKeyDown.event,this._onLeave=new T,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=j(this.parent,ho(".quick-input-list"));const n=new QU,o=new e$;this.list=i.createList("QuickInput",this.container,n,[new pg],{identityProvider:{getId:r=>r.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:o}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(r=>{const a=new yt(r);switch(a.keyCode){case 10:this.toggleCheckbox();break;case 31:(Me?r.metaKey:r.ctrlKey)&&this.list.setFocus(Wi(this.list.length));break;case 16:const l=this.list.getFocus();l.length===1&&l[0]===0&&this._onLeave.fire();break;case 18:const d=this.list.getFocus();d.length===1&&d[0]===this.list.length-1&&this._onLeave.fire();break}this._onKeyDown.fire(a)})),this.disposables.push(this.list.onMouseDown(r=>{r.browserEvent.button!==2&&r.browserEvent.preventDefault()})),this.disposables.push(q(this.container,ae.CLICK,r=>{(r.x||r.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(r=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(r=>{typeof r.index=="number"&&(r.browserEvent.preventDefault(),this.list.setSelection([r.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return re.map(this.list.onDidChangeFocus,e=>e.elements.map(t=>t.item))}get onDidChangeSelection(){return re.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(t=>t.item),event:e.browserEvent}))}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i<n;i++){const o=e[i];if(!o.hidden)if(o.checked)t=!0;else return!1}return t}getCheckedCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].checked&&e++;return e}getVisibleCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].hidden||e++;return e}setAllVisibleChecked(e){try{this._fireCheckedEvents=!1,this.elements.forEach(t=>{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=ze(this.elementDisposables);const t=i=>this.fireButtonTriggered(i);this.inputElements=e,this.elements=e.reduce((i,n,o)=>{var r,a,l;if(n.type!=="separator"){const d=o&&e[o-1],h=n.label&&n.label.replace(/\r?\n/g," "),c=n.meta&&n.meta.replace(/\r?\n/g," "),u=n.description&&n.description.replace(/\r?\n/g," "),f=n.detail&&n.detail.replace(/\r?\n/g," "),g=n.ariaLabel||[h,u,f].map(p=>E5(p)).filter(p=>!!p).join(", ");i.push(new XU({index:o,item:n,saneLabel:h,saneMeta:c,saneAriaLabel:g,saneDescription:u,saneDetail:f,labelHighlights:(r=n.highlights)===null||r===void 0?void 0:r.label,descriptionHighlights:(a=n.highlights)===null||a===void 0?void 0:a.description,detailHighlights:(l=n.highlights)===null||l===void 0?void 0:l.detail,checked:!1,separator:d&&d.type==="separator"?d:void 0,fireButtonTriggered:t}))}return i},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(i=>i.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((i,n,o)=>(i.set(n.item,o),i),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t))),e.length>0){const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const i of this.elements)i.checked=t.has(i.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===Pt.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=Pt.First),e===Pt.Previous&&this.list.getFocus()[0]===0&&(e=Pt.Last),e===Pt.Second&&this.list.length<2&&(e=Pt.First),e){case Pt.First:this.list.focusFirst();break;case Pt.Second:this.list.focusNth(1);break;case Pt.Last:this.list.focusLast();break;case Pt.Next:this.list.focusNext();break;case Pt.Previous:this.list.focusPrevious();break;case Pt.NextPage:this.list.focusNextPage();break;case Pt.PreviousPage:this.list.focusPreviousPage();break}const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${Math.floor(e/44)*44}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(i=>{i.labelHighlights=void 0,i.descriptionHighlights=void 0,i.detailHighlights=void 0,i.hidden=!1;const n=i.index&&this.inputElements[i.index-1];i.separator=n&&n.type==="separator"?n:void 0});else{let i;this.elements.forEach(n=>{const o=this.matchOnLabel?Nn(tm(e,em(n.saneLabel))):void 0,r=this.matchOnDescription?Nn(tm(e,em(n.saneDescription||""))):void 0,a=this.matchOnDetail?Nn(tm(e,em(n.saneDetail||""))):void 0,l=this.matchOnMeta?Nn(tm(e,em(n.saneMeta||""))):void 0;if(o||r||a||l?(n.labelHighlights=o,n.descriptionHighlights=r,n.detailHighlights=a,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item.alwaysShow),n.separator=void 0,!this.sortByLabel){const d=n.index&&this.inputElements[n.index-1];i=d&&d.type==="separator"?d:i,i&&!n.hidden&&(n.separator=i,i=void 0)}})}const t=this.elements.filter(i=>!i.hidden);if(this.sortByLabel&&e){const i=e.toLowerCase();t.sort((n,o)=>JU(n,o,i))}return this.elementsToIndexes=t.reduce((i,n,o)=>(i.set(n.item,o),i),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=ze(this.elementDisposables),this.disposables=ze(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}wA([Zt],VD.prototype,"onDidChangeFocus",null);wA([Zt],VD.prototype,"onDidChangeSelection",null);function JU(s,e,t){const i=s.labelHighlights||[],n=e.labelHighlights||[];return i.length&&!n.length?-1:!i.length&&n.length?1:i.length===0&&n.length===0?0:WU(s.saneLabel,e.saneLabel,t)}class e${getWidgetAriaLabel(){return m("quickInput","Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}function t$(s,e={}){const t=HD(e);return t.textContent=s,t}function SA(s,e={}){const t=HD(e);return yA(t,n$(s,!!e.renderCodeSegements),e.actionHandler,e.renderCodeSegements),t}function HD(s){const e=s.inline?"span":"div",t=document.createElement(e);return s.className&&(t.className=s.className),t}class i${constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function yA(s,e,t,i){let n;if(e.type===2)n=document.createTextNode(e.content||"");else if(e.type===3)n=document.createElement("b");else if(e.type===4)n=document.createElement("i");else if(e.type===7&&i)n=document.createElement("code");else if(e.type===5&&t){const o=document.createElement("a");o.href="#",t.disposeables.add(qt(o,"click",r=>{t.callback(String(e.index),r)})),n=o}else e.type===8?n=document.createElement("br"):e.type===1&&(n=s);n&&s!==n&&s.appendChild(n),n&&Array.isArray(e.children)&&e.children.forEach(o=>{yA(n,o,t,i)})}function n$(s,e){const t={type:1,children:[]};let i=0,n=t;const o=[],r=new i$(s);for(;!r.eos();){let a=r.next();const l=a==="\\"&&c1(r.peek(),e)!==0;if(l&&(a=r.next()),!l&&s$(a,e)&&a===r.peek()){r.advance(),n.type===2&&(n=o.pop());const d=c1(a,e);if(n.type===d||n.type===5&&d===6)n=o.pop();else{const h={type:d,children:[]};d===5&&(h.index=i,i++),n.children.push(h),o.push(n),n=h}}else if(a===`
|
|
583
583
|
`)n.type===2&&(n=o.pop()),n.children.push({type:8});else if(n.type!==2){const d={type:2,content:a};n.children.push(d),o.push(n),n=d}else n.content+=a}return n.type===2&&(n=o.pop()),t}function s$(s,e){return c1(s,e)!==0}function c1(s,e){switch(s){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}class o${constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class r${constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new o$(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}}const Xc=G,a$={inputBackground:B.fromHex("#3C3C3C"),inputForeground:B.fromHex("#CCCCCC"),inputValidationInfoBorder:B.fromHex("#55AAFF"),inputValidationInfoBackground:B.fromHex("#063B49"),inputValidationWarningBorder:B.fromHex("#B89500"),inputValidationWarningBackground:B.fromHex("#352A05"),inputValidationErrorBorder:B.fromHex("#BE1100"),inputValidationErrorBackground:B.fromHex("#5A1D1D")};class LA extends Wn{constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new T),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new T),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),Qs(this.options,a$,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(n=this.options.tooltip)!==null&&n!==void 0?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=j(e,Xc(".monaco-inputbox.idle"));let o=this.options.flexibleHeight?"textarea":"input",r=j(this.element,Xc(".ibwrapper"));if(this.input=j(r,Xc(o+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=j(r,Xc("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new YL(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),j(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(d=>this.input.scrollTop=d.scrollTop));const a=this._register(new dt(document,"selectionchange")),l=re.filter(a.event,()=>{const d=document.getSelection();return(d==null?void 0:d.anchorNode)===r});this._register(l(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new Rr(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:W0(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return rs(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;if(this.mirror){const i=parseFloat(this.mirror.style.paddingLeft||"")||0,n=parseFloat(this.mirror.style.paddingRight||"")||0;t=i+n}this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${e}px)`:this.input.style.paddingRight=e+"px",this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=i.border?`1px solid ${i.border}`:"",(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),e==null?void 0:e.type}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t=()=>e.style.width=rs(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:n=>{if(!this.message)return null;e=j(n,Xc(".monaco-inputbox-container")),t();const o={inline:!0,className:"monaco-inputbox-message"},r=this.message.formatContent?SA(this.message.content,o):t$(this.message.content,o);r.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return r.style.backgroundColor=a.background?a.background.toString():"",r.style.color=a.foreground?a.foreground.toString():"",r.style.border=a.border?`1px solid ${a.border}`:"",j(e,r),null},onHide:()=>{this.state="closed"},layout:t});let i;this.message.type===3?i=m("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?i=m("alertWarningMessage","Warning: {0}",this.message.content):i=m("alertInfoMessage","Info: {0}",this.message.content),bi(i),this.state="open"}_hideMessage(){!this.contextViewProvider||(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,i=e.charCodeAt(e.length-1)===10?" ":"";(e+i).replace(/\u000c/g,"")?this.mirror.textContent=e+i:this.mirror.innerText="\xA0",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=W0(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,o=t.value;i!==null&&n!==null&&(this.value=o.substr(0,i)+e+o.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class DA extends LA{constructor(e,t,i){super(e,t,i),this.history=new r$(i.history,100)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,Yp(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,Yp(this.value))}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}const l$=G;class d$ extends U{constructor(e){super(),this.parent=e,this.onKeyDown=t=>q(this.inputBox.inputElement,ae.KEY_DOWN,i=>{t(new yt(i))}),this.onMouseDown=t=>q(this.inputBox.inputElement,ae.MOUSE_DOWN,i=>{t(new qn(i))}),this.onDidChange=t=>this.inputBox.onDidChange(t),this.container=j(this.parent,l$(".quick-input-box")),this.inputBox=this._register(new LA(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return this.inputBox.inputElement.type==="password"}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===kt.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===kt.Info?1:e===kt.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===kt.Info?1:e===kt.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}const h$={badgeBackground:B.fromHex("#4D4D4D"),badgeForeground:B.fromHex("#FFFFFF")};class u1{constructor(e,t){this.count=0,this.options=t||Object.create(null),Qs(this.options,h$,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=j(e,G(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=Ti(this.countFormat,this.count),this.element.title=Ti(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}}const wE="done",SE="active",Qv="infinite",yE="discrete",c$={progressBarBackground:B.fromHex("#0E70C0")};class u$ extends U{constructor(e,t){super(),this.options=t||Object.create(null),Qs(this.options,c$,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this._register(this.showDelayedScheduler=new pt(()=>In(this.element),0)),this.create(e)}create(e){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(SE,Qv,yE),this.workedVal=0,this.totalWork=void 0}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(wE),this.element.classList.contains(Qv)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(yE,wE),this.element.classList.add(SE,Qv),this}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}const f$={buttonBackground:B.fromHex("#0E639C"),buttonHoverBackground:B.fromHex("#006BB3"),buttonForeground:B.white};class LE extends U{constructor(e,t){super(),this._onDidClick=this._register(new T),this.options=t||Object.create(null),Qs(this.options,f$,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),e.appendChild(this._element),this._register(nt.addTarget(this._element)),[ae.CLICK,bt.Tap].forEach(i=>{this._register(q(this._element,i,n=>{if(!this.enabled){Qe.stop(n);return}this._onDidClick.fire(n)}))}),this._register(q(this._element,ae.KEY_DOWN,i=>{const n=new yt(i);let o=!1;this.enabled&&(n.equals(3)||n.equals(10))?(this._onDidClick.fire(i),o=!0):n.equals(9)&&(this._element.blur(),o=!0),o&&Qe.stop(n,!0)})),this._register(q(this._element,ae.MOUSE_OVER,i=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register(q(this._element,ae.MOUSE_OUT,i=>{this.applyStyles()})),this.focusTracker=this._register(Hh(this._element)),this._register(this.focusTracker.onDidFocus(()=>this.setHoverBackground())),this._register(this.focusTracker.onDidBlur(()=>this.applyStyles())),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;this.options.secondary?e=this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:e=this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const i=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=i?"1px":"",this._element.style.borderStyle=i?"solid":"",this._element.style.borderColor=i}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?ba(this._element,...Ml(e)):this._element.textContent=e,typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}var DE=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};const Sn=G,g$=Ds("quick-input-back",te.arrowLeft),f1={iconClass:g$.classNames,tooltip:m("quickInput.back","Back"),handle:-1};class qb extends U{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=qb.noPromptMessage,this._severity=kt.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new T),this.onDidHideEmitter=this._register(new T),this.onDisposeEmitter=this._register(new T),this.visibleDisposables=this._register(new X),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){const t=this._ignoreFocusOut!==e&&!To;this._ignoreFocusOut=e&&!To,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{this.buttons.indexOf(e)!==-1&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this.update())}hide(){!this.visible||this.ui.hide()}didHide(e=Ef.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0;");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new sn,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const n=this.buttons.filter(r=>r===f1);this.ui.leftActionBar.push(n.map((r,a)=>{const l=new vs(`id-${a}`,"",r.iconClass||h1(r.iconPath),!0,()=>DE(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(r)}));return l.tooltip=r.tooltip||"",l}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const o=this.buttons.filter(r=>r!==f1);this.ui.rightActionBar.push(o.map((r,a)=>{const l=new vs(`id-${a}`,"",r.iconClass||h1(r.iconPath),!0,()=>DE(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(r)}));return l.tooltip=r.tooltip||"",l}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,ba(this.ui.message,...Ml(i))),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?m("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==kt.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}qb.noPromptMessage=m("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class Nf extends qb{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new T),this.onWillAcceptEmitter=this._register(new T),this.onDidAcceptEmitter=this._register(new T),this.onDidCustomEmitter=this._register(new T),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._itemActivation=this.ui.isScreenReaderOptimized()?Ns.NONE:Ns.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new T),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new T),this.onDidTriggerItemButtonEmitter=this._register(new T),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e||"",this.update(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?FU:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(Pt.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{if(e===this.value)return;this._value=e,this.ui.list.filter(this.filterValue(this.ui.inputBox.value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(e)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(e=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus(Pt.Next),this.canSelectMany&&this.ui.list.domFocus(),Qe.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(Pt.Previous):this.ui.list.focus(Pt.Last),this.canSelectMany&&this.ui.list.domFocus(),Qe.stop(e,!0);break;case 12:this.ui.list.focus(Pt.NextPage),this.canSelectMany&&this.ui.list.domFocus(),Qe.stop(e,!0);break;case 11:this.ui.list.focus(Pt.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),Qe.stop(e,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(Pt.First),Qe.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(Pt.Last),Qe.stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{!this.canSelectMany&&this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Cs(e,this._activeItems,(t,i)=>t===i)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&Cs(e,this._selectedItems,(i,n)=>i===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{!this.canSelectMany||this.selectedItemsToConfirm!==this._selectedItems&&Cs(e,this._selectedItems,(t,i)=>t===i)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return q(this.ui.container,ae.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new yt(e),i=t.keyCode;this._quickNavigate.keybindings.some(r=>{const[a,l]=r.getParts();return l?!1:a.shiftKey&&i===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a.altKey&&i===6||a.ctrlKey&&i===5||a.metaKey&&i===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const e=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",e&&!this.description);const t={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!e,progressBar:!e,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(t),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");const i=this.ariaLabel||this.placeholder||Nf.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==i&&(this.ui.inputBox.ariaLabel=i),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case Ns.NONE:this._itemActivation=Ns.FIRST;break;case Ns.SECOND:this.ui.list.focus(Pt.Second),this._itemActivation=Ns.FIRST;break;case Ns.LAST:this.ui.list.focus(Pt.Last),this._itemActivation=Ns.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),t.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(Pt.First))}}Nf.DEFAULT_ARIA_LABEL=m("quickInputBox.ariaLabel","Type to narrow down results.");class Gb extends U{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new T),this.onDidCustomEmitter=this._register(new T),this.onDidTriggerButtonEmitter=this._register(new T),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new T),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new T),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=t=>{this.keyMods.ctrlCmd=t.ctrlKey||t.metaKey,this.keyMods.alt=t.altKey};this._register(q(window,ae.KEY_DOWN,e,!0)),this._register(q(window,ae.KEY_UP,e,!0)),this._register(q(window,ae.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=j(this.parentElement,Sn(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=An(e),i=j(e,Sn(".quick-input-titlebar")),n=this._register(new Rr(i));n.domNode.classList.add("quick-input-left-action-bar");const o=j(i,Sn(".quick-input-title")),r=this._register(new Rr(i));r.domNode.classList.add("quick-input-right-action-bar");const a=j(e,Sn(".quick-input-description")),l=j(e,Sn(".quick-input-header")),d=j(l,Sn("input.quick-input-check-all"));d.type="checkbox",this._register(qt(d,ae.CHANGE,O=>{const R=d.checked;L.setAllVisibleChecked(R)})),this._register(q(d,ae.CLICK,O=>{(O.x||O.y)&&f.setFocus()}));const h=j(l,Sn(".quick-input-description")),c=j(l,Sn(".quick-input-and-message")),u=j(c,Sn(".quick-input-filter")),f=this._register(new d$(u));f.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=j(u,Sn(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new u1(g,{countFormat:m({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),b=j(u,Sn(".quick-input-count"));b.setAttribute("aria-live","polite");const C=new u1(b,{countFormat:m({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),_=j(l,Sn(".quick-input-action")),v=new LE(_);v.label=m("ok","OK"),this._register(v.onDidClick(O=>{this.onDidAcceptEmitter.fire()}));const w=j(l,Sn(".quick-input-action")),S=new LE(w);S.label=m("custom","Custom"),this._register(S.onDidClick(O=>{this.onDidCustomEmitter.fire()}));const D=j(c,Sn(`#${this.idPrefix}message.quick-input-message`)),L=this._register(new VD(e,this.idPrefix+"list",this.options));this._register(L.onChangedAllVisibleChecked(O=>{d.checked=O})),this._register(L.onChangedVisibleCount(O=>{p.setCount(O)})),this._register(L.onChangedCheckedCount(O=>{C.setCount(O)})),this._register(L.onLeave(()=>{setTimeout(()=>{f.setFocus(),this.controller instanceof Nf&&this.controller.canSelectMany&&L.clearFocus()},0)})),this._register(L.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const x=new u$(e);x.getContainer().classList.add("quick-input-progress");const E=Hh(e);return this._register(E),this._register(q(e,ae.FOCUS,O=>{this.previousFocusElement=O.relatedTarget instanceof HTMLElement?O.relatedTarget:void 0},!0)),this._register(E.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(Ef.Blur),this.previousFocusElement=void 0})),this._register(q(e,ae.FOCUS,O=>{f.setFocus()})),this._register(q(e,ae.KEY_DOWN,O=>{const R=new yt(O);switch(R.keyCode){case 3:Qe.stop(O,!0),this.onDidAcceptEmitter.fire();break;case 9:Qe.stop(O,!0),this.hide(Ef.Gesture);break;case 2:if(!R.altKey&&!R.ctrlKey&&!R.metaKey){const H=[".action-label.codicon"];e.classList.contains("show-checkboxes")?H.push("input"):H.push("input[type=text]"),this.getUI().list.isDisplayed()&&H.push(".monaco-list");const K=e.querySelectorAll(H.join(", "));R.shiftKey&&R.target===K[0]?(Qe.stop(O,!0),K[K.length-1].focus()):!R.shiftKey&&R.target===K[K.length-1]&&(Qe.stop(O,!0),K[0].focus())}break}})),this.ui={container:e,styleSheet:t,leftActionBar:n,titleBar:i,title:o,description1:a,description2:h,rightActionBar:r,checkAll:d,filterContainer:u,inputBox:f,visibleCountContainer:g,visibleCount:p,countContainer:b,count:C,okContainer:_,ok:v,message:D,customButtonContainer:w,customButton:S,list:L,progressBar:x,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:O=>this.show(O),hide:()=>this.hide(),setVisibilities:O=>this.setVisibilities(O),setComboboxAccessibility:O=>this.setComboboxAccessibility(O),setEnabled:O=>this.setEnabled(O),setContextKey:O=>this.options.setContextKey(O)},this.updateStyles(),this.ui}pick(e,t={},i=Oe.None){return new Promise((n,o)=>{let r=h=>{r=n,t.onKeyMods&&t.onKeyMods(a.keyMods),n(h)};if(i.isCancellationRequested){r(void 0);return}const a=this.createQuickPick();let l;const d=[a,a.onDidAccept(()=>{if(a.canSelectMany)r(a.selectedItems.slice()),a.hide();else{const h=a.activeItems[0];h&&(r(h),a.hide())}}),a.onDidChangeActive(h=>{const c=h[0];c&&t.onDidFocus&&t.onDidFocus(c)}),a.onDidChangeSelection(h=>{if(!a.canSelectMany){const c=h[0];c&&(r(c),a.hide())}}),a.onDidTriggerItemButton(h=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},h),{removeItem:()=>{const c=a.items.indexOf(h.item);if(c!==-1){const u=a.items.slice(),f=u.splice(c,1),g=a.activeItems.filter(p=>p!==f[0]);a.items=u,g&&(a.activeItems=g)}}}))),a.onDidChangeValue(h=>{l&&!h&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),i.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{ze(d),r(void 0)})];a.title=t.title,a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.autoFocusOnList=t.autoFocusOnList===void 0||t.autoFocusOnList,a.quickNavigate=t.quickNavigate,a.contextKey=t.contextKey,a.busy=!0,Promise.all([e,t.activeItem]).then(([h,c])=>{l=c,a.busy=!1,a.items=h,a.canSelectMany&&(a.selectedItems=h.filter(u=>u.type!=="separator"&&u.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,h=>{o(h),a.hide()})})}createQuickPick(){const e=this.getUI();return new Nf(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,i&&i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(kt.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),ba(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const n=this.options.backKeybindingLabel();f1.tooltip=n?m("quickInput.backWithKeybinding","Back ({0})",n):m("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=e.description&&!(e.inputBox||e.checkAll)?"":"none",t.checkAll.style.display=e.checkAll?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t;const i=this.controller;if(i){const n=!(!((t=this.ui)===null||t===void 0)&&t.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",n||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),i.didHide(e)}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(this.dimension.width*.62,Gb.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,contrastBorder:n,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=i?i.toString():"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const r=[];this.styles.list.pickerGroupBorder&&r.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&r.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(r.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&r.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&r.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&r.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&r.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&r.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),r.push("}"));const a=r.join(`
|
|
584
584
|
`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}}Gb.MAX_WIDTH=600;const Ua=Ke("quickInputService");var g1;(function(s){s[s.PRESERVE=0]="PRESERVE",s[s.LAST=1]="LAST"})(g1||(g1={}));const Td={Quickaccess:"workbench.contributions.quickaccess"};class m${constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,i)=>i.prefix.length-t.prefix.length),Re(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return bd([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(i=>e.startsWith(i.prefix))||void 0||this.defaultProvider}}Vt.add(Td.Quickaccess,new m$);var p$=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},xE=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};let m1=class extends U{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Vt.as(Td.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[o,r]=this.getOrInstantiateProvider(e),a=this.visibleQuickAccess,l=a==null?void 0:a.descriptor;if(a&&r&&l===r){e!==r.prefix&&!(i!=null&&i.preserveValue)&&(a.picker.value=e),this.adjustValueSelection(a.picker,r,i);return}if(r&&!(i!=null&&i.preserveValue)){let g;if(a&&l&&l!==r){const p=a.value.substr(l.prefix.length);p&&(g=`${r.prefix}${p}`)}if(!g){const p=o==null?void 0:o.defaultFilterValue;p===g1.LAST?g=this.lastAcceptedPickerValues.get(r):typeof p=="string"&&(g=`${r.prefix}${p}`)}typeof g=="string"&&(e=g)}const d=new X,h=d.add(this.quickInputService.createQuickPick());h.value=e,this.adjustValueSelection(h,r,i),h.placeholder=r==null?void 0:r.placeholder,h.quickNavigate=i==null?void 0:i.quickNavigateConfiguration,h.hideInput=!!h.quickNavigate&&!a,(typeof(i==null?void 0:i.itemActivation)=="number"||(i==null?void 0:i.quickNavigateConfiguration))&&(h.itemActivation=(n=i==null?void 0:i.itemActivation)!==null&&n!==void 0?n:Ns.SECOND),h.contextKey=r==null?void 0:r.contextKey,h.filterValue=g=>g.substring(r?r.prefix.length:0),r!=null&&r.placeholder&&(h.ariaLabel=r==null?void 0:r.placeholder);let c,u;t&&(c=new Promise(g=>u=g),d.add(Lr(h.onWillAccept)(g=>{g.veto(),h.hide()}))),d.add(this.registerPickerListeners(h,o,r,e));const f=d.add(new tn);if(o&&d.add(o.provide(h,f.token)),Lr(h.onDidHide)(()=>{h.selectedItems.length===0&&f.cancel(),d.dispose(),u==null||u(h.selectedItems)}),h.show(),t)return c}adjustValueSelection(e,t,i){var n;let o;i!=null&&i.preserveValue?o=[e.value.length,e.value.length]:o=[(n=t==null?void 0:t.prefix.length)!==null&&n!==void 0?n:0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,i,n){const o=new X,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return o.add(Re(()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),o.add(e.onDidChangeValue(a=>{const[l]=this.getOrInstantiateProvider(a);l!==t?this.show(a,{preserveValue:!0}):r.value=a})),i&&o.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,e.value)})),o}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};m1=p$([xE(0,Ua),xE(1,Ue)],m1);var _$=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Qc=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};let p1=class extends j3{constructor(e,t,i,n,o){super(i),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=o,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(m1))),this._quickAccess}createController(e=this.layoutService,t){var i,n;const o={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:a=>this.setContextKey(a),returnFocus:()=>e.focus(),createList:(a,l,d,h,c)=>this.instantiationService.createInstance(n1,a,l,d,h,c),styles:this.computeStyles()},r=this._register(new Gb(Object.assign(Object.assign({},o),t)));return r.layout(e.dimension,(n=(i=e.offset)===null||i===void 0?void 0:i.top)!==null&&n!==void 0?n:0),this._register(e.onDidLayout(a=>{var l,d;return r.layout(a,(d=(l=e.offset)===null||l===void 0?void 0:l.top)!==null&&d!==void 0?d:0)})),this._register(r.onShow(()=>this.resetContextKeys())),this._register(r.onHide(()=>this.resetContextKeys())),r}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new oe(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},i=Oe.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},Ms(this.theme,{quickInputBackground:sk,quickInputForeground:FV,quickInputTitleBackground:BV,contrastBorder:Qt,widgetShadow:La})),inputBox:Ms(this.theme,{inputForeground:PL,inputBackground:OL,inputBorder:FL,inputValidationInfoBackground:BL,inputValidationInfoForeground:WL,inputValidationInfoBorder:VL,inputValidationWarningBackground:zM,inputValidationWarningForeground:UM,inputValidationWarningBorder:$M,inputValidationErrorBackground:jM,inputValidationErrorForeground:KM,inputValidationErrorBorder:qM}),countBadge:Ms(this.theme,{badgeBackground:Eu,badgeForeground:Nu,badgeBorder:Qt}),button:Ms(this.theme,{buttonForeground:kV,buttonBackground:yS,buttonHoverBackground:EV,buttonBorder:Qt}),progressBar:Ms(this.theme,{progressBarBackground:NV}),keybindingLabel:Ms(this.theme,{keybindingLabelBackground:HV,keybindingLabelForeground:zV,keybindingLabelBorder:UV,keybindingLabelBottomBorder:$V,keybindingLabelShadow:La}),list:Ms(this.theme,{listBackground:sk,listInactiveFocusForeground:Hm,listInactiveSelectionIconForeground:zm,listInactiveFocusBackground:Um,listFocusOutline:Fi,listInactiveFocusOutline:Fi,pickerGroupBorder:VV,pickerGroupForeground:WV})}}};p1=_$([Qc(0,Ue),Qc(1,pe),Qc(2,_t),Qc(3,Vn),Qc(4,Wb)],p1);var xA=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},hl=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};let _1=class extends p1{constructor(e,t,i,n,o,r){super(t,i,n,o,r),this.host=void 0;const a=ic.get(e);this.host={_serviceBrand:void 0,get container(){return a.widget.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}createController(){return super.createController(this.host)}};_1=xA([hl(1,Ue),hl(2,pe),hl(3,_t),hl(4,Vn),hl(5,Wb)],_1);let b1=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(_1,e);this.mapEditorToService.set(e,t),Lr(e.onDidDispose)(()=>{i.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},i=Oe.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}};b1=xA([hl(0,Ue),hl(1,Ge)],b1);class ic{constructor(e){this.editor=e,this.widget=new Zb(this.editor)}static get(e){return e.getContribution(ic.ID)}dispose(){this.widget.dispose()}}ic.ID="editor.controller.quickInput";class Zb{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return Zb.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}Zb.ID="editor.contrib.quickInputWidget";Ze(ic.ID,ic);var Ye;(function(s){const e=new _f;class t{constructor(l,d){this._serviceId=l,this._factory=d,this._value=null}get id(){return this._serviceId}get(l){if(!this._value){if(l&&(this._value=l[this._serviceId.toString()]),this._value||(this._value=this._factory(l)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");e.set(this._serviceId,this._value)}return this._value}}s.LazyStaticService=t;let i=[];function n(a,l){let d=new t(a,l);return i.push(d),d}function o(a){let l=new _f;for(const[h,c]of vH())l.set(h,c);for(let h in a)a.hasOwnProperty(h)&&l.set(Ke(h),a[h]);i.forEach(h=>l.set(h.id,h.get(a)));let d=new I_(l,!0);return l.set(Ue,d),[l,d]}s.init=o,s.instantiationService=n(Ue,()=>new I_(e,!0));const r=new pM;s.configurationService=n(Et,()=>r),s.resourceConfigurationService=n(rL,()=>new P3(r)),s.resourcePropertiesService=n(jT,()=>new uS(r)),s.contextService=n(cM,()=>new fb),s.labelService=n(cg,()=>new W3),s.telemetryService=n(Wa,()=>new F3),s.dialogService=n(hg,()=>new A3),s.notificationService=n(Gt,()=>new ub),s.markerService=n(mg,()=>new dl),s.modeService=n(Js,a=>new i6),s.standaloneThemeService=n(Id,()=>new M6),s.logService=n(Or,()=>new wB(new vB)),s.undoRedoService=n(Rb,a=>new P_(s.dialogService.get(a),s.notificationService.get(a))),s.modelService=n(Wt,a=>new y_(s.configurationService.get(a),s.resourcePropertiesService.get(a),s.standaloneThemeService.get(a),s.logService.get(a),s.undoRedoService.get(a))),s.markerDecorationsService=n(_L,a=>new a1(s.modelService.get(a),s.markerService.get(a))),s.contextKeyService=n(pe,a=>new HS(s.configurationService.get(a))),s.codeEditorService=n(Ge,a=>new w_(null,s.contextKeyService.get(a),s.standaloneThemeService.get(a))),s.editorProgressService=n(Fr,()=>new cb),s.storageService=n(zo,()=>new NU),s.editorWorkerService=n(xs,a=>new oS(s.modelService.get(a),s.resourceConfigurationService.get(a),s.logService.get(a)))})(Ye||(Ye={}));class b$ extends U{constructor(e,t){super();const[i,n]=Ye.init(t);this._serviceCollection=i,this._instantiationService=n;const o=this.get(Et),r=this.get(Gt),a=this.get(Wa),l=this.get(_t),d=this.get(Or),h=this.get(pe);let c=(b,C)=>{let _=null;return t&&(_=t[b.toString()]),_||(_=C()),this._serviceCollection.set(b,_),_};c(Vn,()=>new l1(h,o)),c(es,()=>new t1(l));let u=c(Bt,()=>new O3(this._instantiationService)),f=c(vt,()=>this._register(new mM(h,u,a,r,d,e))),g=c(Wb,()=>new V3(Ye.codeEditorService.get(Ge),e));c(Ua,()=>new b1(n,Ye.codeEditorService.get(Ge)));let p=c(Va,()=>this._register(new ZS(g)));c(za,()=>new AU),c(Ha,()=>{const b=new GS(a,r,p,f,l);return b.configure({blockMouse:!1}),this._register(b)}),c(Sd,()=>new o1(u)),c(fL,()=>new B3(Ye.modelService.get(Wt)))}get(e){let t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t}set(e,t){this._serviceCollection.set(e,t)}has(e){return this._serviceCollection.has(e)}}function IA(s,e,t){let i=new b$(s,e),n=null;i.has(Gs)||(n=new cS(Ye.modelService.get()),i.set(Gs,n)),i.has(Ro)||i.set(Ro,new q0(i.get(Ge),i.get(Bt)));let o=t(i);return n&&n.setEditor(o),o}function C$(s,e,t){return IA(s,t||{},i=>new FS(s,e,i,i.get(Ue),i.get(Ge),i.get(Bt),i.get(pe),i.get(vt),i.get(Va),i.get(Id),i.get(Gt),i.get(Et),i.get(Vn),i.get(Wt),i.get(Js)))}function v$(s){return Ye.codeEditorService.get().onCodeEditorAdd(e=>{s(e)})}function w$(s,e,t){return IA(s,t||{},i=>new BS(s,e,i,i.get(Ue),i.get(pe),i.get(vt),i.get(Va),i.get(xs),i.get(Ge),i.get(Id),i.get(Gt),i.get(Et),i.get(Ha),i.get(Fr),i.get(za)))}function S$(s,e){return new i5(s,e)}function y$(s,e,t){return NR(Ye.modelService.get(),Ye.modeService.get(),s,e,t)}function L$(s,e){Ye.modelService.get().setMode(s,Ye.modeService.get().create(e))}function D$(s,e,t){s&&Ye.markerService.get().changeOne(e,s.uri,t)}function x$(s){return Ye.markerService.get().read(s)}function I$(s){return Ye.markerService.get().onMarkerChanged(s)}function k$(s){return Ye.modelService.get().getModel(s)}function E$(){return Ye.modelService.get().getModels()}function N$(s){return Ye.modelService.get().onModelAdded(s)}function T$(s){return Ye.modelService.get().onModelRemoved(s)}function M$(s){return Ye.modelService.get().onModelModeChanged(e=>{s({model:e.model,oldLanguage:e.oldModeId})})}function R$(s){return xB(Ye.modelService.get(),s)}function A$(s,e){const t=Ye.standaloneThemeService.get();return t.registerEditorContainer(s),uL.colorizeElement(t,Ye.modeService.get(),s,e)}function O$(s,e,t){return Ye.standaloneThemeService.get().registerEditorContainer(document.body),uL.colorize(Ye.modeService.get(),s,e,t)}function P$(s,e,t=4){return Ye.standaloneThemeService.get().registerEditorContainer(document.body),uL.colorizeModelLine(s,e,t)}function F$(s){let e=wt.get(s);return e||{getInitialState:()=>tg,tokenize:(t,i,n,o)=>PT(s,t,n,o)}}function B$(s,e){Ye.modeService.get().triggerMode(e);let i=F$(e),n=Ba(s),o=[],r=i.getInitialState();for(let a=0,l=n.length;a<l;a++){let d=n[a],h=i.tokenize(d,!0,r,0);o[a]=h.tokens,r=h.endState}return o}function W$(s,e){Ye.standaloneThemeService.get().defineTheme(s,e)}function V$(s){Ye.standaloneThemeService.get().setTheme(s)}function H$(){eW()}function z$(s,e){return We.registerCommand({id:s,handler:e})}function U$(){return{create:C$,onDidCreateEditor:v$,createDiffEditor:w$,createDiffNavigator:S$,createModel:y$,setModelLanguage:L$,setModelMarkers:D$,getModelMarkers:x$,onDidChangeMarkers:I$,getModels:E$,getModel:k$,onDidCreateModel:N$,onWillDisposeModel:T$,onDidChangeModelLanguage:M$,createWebWorker:R$,colorizeElement:A$,colorize:O$,colorizeModelLine:P$,tokenize:B$,defineTheme:W$,setTheme:V$,remeasureFonts:H$,registerCommand:z$,AccessibilitySupport:Jw,ContentWidgetPositionPreference:s0,CursorChangeReason:o0,DefaultEndOfLine:r0,EditorAutoIndentStrategy:l0,EditorOption:d0,EndOfLinePreference:h0,EndOfLineSequence:c0,MinimapPosition:b0,MouseTargetType:C0,OverlayWidgetPositionPreference:v0,OverviewRulerLane:w0,RenderLineNumbersType:S0,RenderMinimap:y0,ScrollbarVisibility:D0,ScrollType:L0,TextEditorCursorBlinkingStyle:N0,TextEditorCursorStyle:T0,TrackedRangeStickiness:M0,WrappingIndent:R0,ConfigurationChangedEvent:VN,BareFontInfo:Uh,FontInfo:Z0,TextModelResolvedOptions:Mm,FindMatch:qu,EditorType:eg,EditorOptions:Xs}}function $$(s,e){if(!e||!Array.isArray(e))return!1;for(const t of e)if(!s(t))return!1;return!0}function dm(s,e){return typeof s=="boolean"?s:e}function IE(s,e){return typeof s=="string"?s:e}function j$(s){const e={};for(const t of s)e[t]=!0;return e}function kE(s,e=!1){e&&(s=s.map(function(i){return i.toLowerCase()}));const t=j$(s);return e?function(i){return t[i.toLowerCase()]!==void 0&&t.hasOwnProperty(i.toLowerCase())}:function(i){return t[i]!==void 0&&t.hasOwnProperty(i)}}function C1(s,e){e=e.replace(/@@/g,"");let t=0,i;do i=!1,e=e.replace(/@(\w+)/g,function(o,r){i=!0;let a="";if(typeof s[r]=="string")a=s[r];else if(s[r]&&s[r]instanceof RegExp)a=s[r].source;else throw s[r]===void 0?lt(s,"language definition does not contain attribute '"+r+"', used at: "+e):lt(s,"attribute reference '"+r+"' must be a string, used at: "+e);return oh(a)?"":"(?:"+a+")"}),t++;while(i&&t<5);e=e.replace(/\x01/g,"@");let n=(s.ignoreCase?"i":"")+(s.unicode?"u":"");return new RegExp(e,n)}function K$(s,e,t,i){if(i<0)return s;if(i<e.length)return e[i];if(i>=100){i=i-100;let n=t.split(".");if(n.unshift(t),i<n.length)return n[i]}return null}function q$(s,e,t,i){let n=-1,o=t,r=t.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);r&&(r[3]&&(n=parseInt(r[3]),r[2]&&(n=n+100)),o=r[4]);let a="~",l=o;!o||o.length===0?(a="!=",l=""):/^\w*$/.test(l)?a="==":(r=o.match(/^(@|!@|~|!~|==|!=)(.*)$/),r&&(a=r[1],l=r[2]));let d;if((a==="~"||a==="!~")&&/^(\w|\|)*$/.test(l)){let h=kE(l.split("|"),s.ignoreCase);d=function(c){return a==="~"?h(c):!h(c)}}else if(a==="@"||a==="!@"){let h=s[l];if(!h)throw lt(s,"the @ match target '"+l+"' is not defined, in rule: "+e);if(!$$(function(u){return typeof u=="string"},h))throw lt(s,"the @ match target '"+l+"' must be an array of strings, in rule: "+e);let c=kE(h,s.ignoreCase);d=function(u){return a==="@"?c(u):!c(u)}}else if(a==="~"||a==="!~")if(l.indexOf("$")<0){let h=C1(s,"^"+l+"$");d=function(c){return a==="~"?h.test(c):!h.test(c)}}else d=function(h,c,u,f){return C1(s,"^"+Xr(s,l,c,u,f)+"$").test(h)};else if(l.indexOf("$")<0){let h=la(s,l);d=function(c){return a==="=="?c===h:c!==h}}else{let h=la(s,l);d=function(c,u,f,g,p){let b=Xr(s,h,u,f,g);return a==="=="?c===b:c!==b}}return n===-1?{name:t,value:i,test:function(h,c,u,f){return d(h,h,c,u,f)}}:{name:t,value:i,test:function(h,c,u,f){let g=K$(h,c,u,n);return d(g||"",h,c,u,f)}}}function v1(s,e,t){if(t){if(typeof t=="string")return t;if(t.token||t.token===""){if(typeof t.token!="string")throw lt(s,"a 'token' attribute must be of type string, in rule: "+e);{let i={token:t.token};if(t.token.indexOf("$")>=0&&(i.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")i.bracket=1;else if(t.bracket==="@close")i.bracket=-1;else throw lt(s,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw lt(s,"the next state must be a string value in rule: "+e);{let n=t.next;if(!/^(@pop|@push|@popall)$/.test(n)&&(n[0]==="@"&&(n=n.substr(1)),n.indexOf("$")<0&&!$B(s,Xr(s,n,"",[],""))))throw lt(s,"the next state '"+t.next+"' is not defined in rule: "+e);i.next=n}}return typeof t.goBack=="number"&&(i.goBack=t.goBack),typeof t.switchTo=="string"&&(i.switchTo=t.switchTo),typeof t.log=="string"&&(i.log=t.log),typeof t.nextEmbedded=="string"&&(i.nextEmbedded=t.nextEmbedded,s.usesEmbedded=!0),i}}else if(Array.isArray(t)){let i=[];for(let n=0,o=t.length;n<o;n++)i[n]=v1(s,e,t[n]);return{group:i}}else if(t.cases){let i=[];for(let o in t.cases)if(t.cases.hasOwnProperty(o)){const r=v1(s,e,t.cases[o]);o==="@default"||o==="@"||o===""?i.push({test:void 0,value:r,name:o}):o==="@eos"?i.push({test:function(a,l,d,h){return h},value:r,name:o}):i.push(q$(s,e,o,r))}const n=s.defaultToken;return{test:function(o,r,a,l){for(const d of i)if(!d.test||d.test(o,r,a,l))return d.value;return n}}}else throw lt(s,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+e)}else return{token:""}}class G${constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let i;if(typeof t=="string")i=t;else if(t instanceof RegExp)i=t.source;else throw lt(e,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=i.length>0&&i[0]==="^",this.name=this.name+": "+i,this.regex=C1(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=v1(e,this.name,t)}}function Z$(s,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");let t={};t.languageId=s,t.includeLF=dm(e.includeLF,!1),t.noThrow=!1,t.maxStack=100,t.start=typeof e.start=="string"?e.start:null,t.ignoreCase=dm(e.ignoreCase,!1),t.unicode=dm(e.unicode,!1),t.tokenPostfix=IE(e.tokenPostfix,"."+t.languageId),t.defaultToken=IE(e.defaultToken,"source"),t.usesEmbedded=!1;let i=e;i.languageId=s,i.includeLF=t.includeLF,i.ignoreCase=t.ignoreCase,i.unicode=t.unicode,i.noThrow=t.noThrow,i.usesEmbedded=t.usesEmbedded,i.stateNames=e.tokenizer,i.defaultToken=t.defaultToken;function n(r,a,l){for(const d of l){let h=d.include;if(h){if(typeof h!="string")throw lt(t,"an 'include' attribute must be a string at: "+r);if(h[0]==="@"&&(h=h.substr(1)),!e.tokenizer[h])throw lt(t,"include target '"+h+"' is not defined at: "+r);n(r+"."+h,a,e.tokenizer[h])}else{const c=new G$(r);if(Array.isArray(d)&&d.length>=1&&d.length<=3)if(c.setRegex(i,d[0]),d.length>=3)if(typeof d[1]=="string")c.setAction(i,{token:d[1],next:d[2]});else if(typeof d[1]=="object"){const u=d[1];u.next=d[2],c.setAction(i,u)}else throw lt(t,"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: "+r);else c.setAction(i,d[1]);else{if(!d.regex)throw lt(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+r);d.name&&typeof d.name=="string"&&(c.name=d.name),d.matchOnlyAtStart&&(c.matchOnlyAtLineStart=dm(d.matchOnlyAtLineStart,!1)),c.setRegex(i,d.regex),c.setAction(i,d.action)}a.push(c)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw lt(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(let r in e.tokenizer)if(e.tokenizer.hasOwnProperty(r)){t.start||(t.start=r);const a=e.tokenizer[r];t.tokenizer[r]=new Array,n("tokenizer."+r,t.tokenizer[r],a)}if(t.usesEmbedded=i.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw lt(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let o=[];for(let r of e.brackets){let a=r;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw lt(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+`
|
|
585
|
-
hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")o.push({token:a.token+t.tokenPostfix,open:la(t,a.open),close:la(t,a.close)});else throw lt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=o,t.noThrow=!0,t}function Y$(s){Tl.registerLanguage(s)}function X$(){let s=[];return s=s.concat(Tl.getLanguages()),s}function Q$(s){let e=Ye.modeService.get().getLanguageIdentifier(s);return e?e.id:0}function J$(s,e){let t=Ye.modeService.get().onDidCreateMode(i=>{i.getId()===s&&(t.dispose(),e())});return t}function ej(s,e){let t=Ye.modeService.get().getLanguageIdentifier(s);if(!t)throw new Error(`Cannot set configuration for unknown language ${s}`);return ye.register(t,e,100)}class tj{constructor(e,t){this._languageIdentifier=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i,n){if(typeof this._actual.tokenize=="function")return Tf.adaptTokenize(this._languageIdentifier.language,this._actual,e,i,n);throw new Error("Not supported!")}tokenize2(e,t,i){let n=this._actual.tokenizeEncoded(e,i);return new q_(n.tokens,n.endState)}}class Tf{constructor(e,t,i){this._standaloneThemeService=e,this._languageIdentifier=t,this._actual=i}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t,i){let n=[],o=0;for(let r=0,a=e.length;r<a;r++){const l=e[r];let d=l.startIndex;r===0?d=0:d<o&&(d=o),n[r]=new K_(d+i,l.scopes,t),o=d}return n}static adaptTokenize(e,t,i,n,o){let r=t.tokenize(i,n),a=Tf._toClassicTokens(r.tokens,e,o),l;return r.endState.equals(n)?l=n:l=r.endState,new Ry(a,l)}tokenize(e,t,i,n){return Tf.adaptTokenize(this._languageIdentifier.language,this._actual,e,i,n)}_toBinaryTokens(e,t){const i=this._languageIdentifier.id,n=this._standaloneThemeService.getColorTheme().tokenTheme;let o=[],r=0,a=0;for(let d=0,h=e.length;d<h;d++){const c=e[d],u=n.match(i,c.scopes);if(r>0&&o[r-1]===u)continue;let f=c.startIndex;d===0?f=0:f<a&&(f=a),o[r++]=f+t,o[r++]=u,a=f}let l=new Uint32Array(r);for(let d=0;d<r;d++)l[d]=o[d];return l}tokenize2(e,t,i,n){let o=this._actual.tokenize(e,i),r=this._toBinaryTokens(o.tokens,n),a;return o.endState.equals(i)?a=i:a=o.endState,new q_(r,a)}}function ij(s){return"tokenizeEncoded"in s}function kA(s){return s&&typeof s.then=="function"}function nj(s){if(s){const e=[null];for(let t=1,i=s.length;t<i;t++)e[t]=B.fromHex(s[t]);Ye.standaloneThemeService.get().setColorMapOverride(e)}else Ye.standaloneThemeService.get().setColorMapOverride(null)}function sj(s,e){let t=Ye.modeService.get().getLanguageIdentifier(s);if(!t)throw new Error(`Cannot set tokens provider for unknown language ${s}`);const i=n=>ij(n)?new tj(t,n):new Tf(Ye.standaloneThemeService.get(),t,n);return kA(e)?wt.registerPromise(s,e.then(n=>i(n))):wt.register(s,i(e))}function oj(s,e){const t=i=>qB(Ye.modeService.get(),Ye.standaloneThemeService.get(),s,Z$(s,i));return kA(e)?wt.registerPromise(s,e.then(i=>t(i))):wt.register(s,t(e))}function rj(s,e){return Ip.register(s,e)}function aj(s,e){return kp.register(s,e)}function lj(s,e){return Ll.register(s,e)}function dj(s,e){return Zu.register(s,{provideHover:(t,i,n)=>{let o=t.getWordAtPosition(i);return Promise.resolve(e.provideHover(t,i,n)).then(r=>{if(!!r)return!r.range&&o&&(r.range=new y(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),r.range||(r.range=new y(i.lineNumber,i.column,i.lineNumber,i.column)),r})}})}function hj(s,e){return ps.register(s,e)}function cj(s,e){return $h.register(s,e)}function uj(s,e){return Ep.register(s,e)}function fj(s,e){return Yu.register(s,e)}function gj(s,e){return Tp.register(s,e)}function mj(s,e){return Mp.register(s,e)}function pj(s,e){return dr.register(s,e)}function _j(s,e){return ko.register(s,{provideCodeActions:(t,i,n,o)=>{let r=Ye.markerService.get().read({resource:t.uri}).filter(a=>y.areIntersectingOrTouching(a,i));return e.provideCodeActions(t,i,{markers:r,only:n.only},o)}})}function bj(s,e){return bu.register(s,e)}function Cj(s,e){return Bs.register(s,e)}function vj(s,e){return Rp.register(s,e)}function wj(s,e){return Xu.register(s,e)}function Sj(s,e){return Fs.register(s,e)}function yj(s,e){return jh.register(s,e)}function Lj(s,e){return X0.register(s,e)}function Dj(s,e){return Np.register(s,e)}function xj(s,e){return tb.register(s,e)}function Ij(s,e){return Ap.register(s,e)}function kj(s,e){return tL.register(s,e)}function Ej(s,e){return eL.register(s,e)}function Nj(s,e){return Jr.register(s,e)}function Tj(){return{register:Y$,getLanguages:X$,onLanguage:J$,getEncodedLanguageId:Q$,setLanguageConfiguration:ej,setColorMap:nj,setTokensProvider:sj,setMonarchTokensProvider:oj,registerReferenceProvider:rj,registerRenameProvider:aj,registerCompletionItemProvider:Sj,registerSignatureHelpProvider:lj,registerHoverProvider:dj,registerDocumentSymbolProvider:hj,registerDocumentHighlightProvider:cj,registerLinkedEditingRangeProvider:uj,registerDefinitionProvider:fj,registerImplementationProvider:gj,registerTypeDefinitionProvider:mj,registerCodeLensProvider:pj,registerCodeActionProvider:_j,registerDocumentFormattingEditProvider:bj,registerDocumentRangeFormattingEditProvider:Cj,registerOnTypeFormattingEditProvider:vj,registerLinkProvider:wj,registerColorProvider:yj,registerFoldingRangeProvider:Lj,registerDeclarationProvider:Dj,registerSelectionRangeProvider:xj,registerDocumentSemanticTokensProvider:Ij,registerDocumentRangeSemanticTokensProvider:kj,registerInlineCompletionsProvider:Ej,registerInlayHintsProvider:Nj,DocumentHighlightKind:a0,CompletionItemKind:t0,CompletionItemTag:i0,CompletionItemInsertTextRule:e0,SymbolKind:k0,SymbolTag:E0,IndentAction:u0,CompletionTriggerKind:n0,SignatureHelpTriggerKind:I0,InlayHintKind:f0,InlineCompletionTriggerKind:g0,FoldingRangeKind:qs}}class nc{static _handleEolEdits(e,t){let i,n=[];for(let o of t)typeof o.eol=="number"&&(i=o.eol),o.range&&typeof o.text=="string"&&n.push(o);return typeof i=="number"&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const n=nc._handleEolEdits(e,t);n.length===1&&nc._isFullModelReplaceEdit(e,n[0])?e.executeEdits("formatEditsCommand",n.map(o=>Mt.replace(y.lift(o.range),o.text))):e.executeEdits("formatEditsCommand",n.map(o=>Mt.replaceMove(y.lift(o.range),o.text))),i&&e.pushUndoStop()}}class Jv{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}var Ea=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};function zD(s){if(s=s.filter(n=>n.range),!s.length)return;let{range:e}=s[0];for(let n=1;n<s.length;n++)e=y.plusRange(e,s[n].range);const{startLineNumber:t,endLineNumber:i}=e;t===i?s.length===1?bi(m("hint11","Made 1 formatting edit on line {0}",t)):bi(m("hintn1","Made {0} formatting edits on line {1}",s.length,t)):s.length===1?bi(m("hint1n","Made 1 formatting edit between lines {0} and {1}",t,i)):bi(m("hintnn","Made {0} formatting edits between lines {1} and {2}",s.length,t,i))}function EA(s){const e=[],t=new Set,i=bu.ordered(s);for(const o of i)e.push(o),o.extensionId&&t.add(Jv.toKey(o.extensionId));const n=Bs.ordered(s);for(const o of n){if(o.extensionId){if(t.has(Jv.toKey(o.extensionId)))continue;t.add(Jv.toKey(o.extensionId))}e.push({displayName:o.displayName,extensionId:o.extensionId,provideDocumentFormattingEdits(r,a,l){return o.provideDocumentRangeFormattingEdits(r,r.getFullModelRange(),a,l)}})}return e}class Xl{static setFormatterSelector(e){return{dispose:Xl._selectors.unshift(e)}}static select(e,t,i){return Ea(this,void 0,void 0,function*(){if(e.length===0)return;const n=Pe.first(Xl._selectors);if(n)return yield n(e,t,i)})}}Xl._selectors=new En;function NA(s,e,t,i,n,o){return Ea(this,void 0,void 0,function*(){const r=s.get(Ue),a=Ao(e)?e.getModel():e,l=Bs.ordered(a),d=yield Xl.select(l,a,i);d&&(n.report(d),yield r.invokeFunction(Mj,d,e,t,o))})}function Mj(s,e,t,i,n){return Ea(this,void 0,void 0,function*(){const o=s.get(xs);let r,a;Ao(t)?(r=t.getModel(),a=new vf(t,5,void 0,n)):(r=t,a=new lD(t,n));let l=[],d=0;for(let g of lL(i).sort(y.compareRangesUsingStarts))d>0&&y.areIntersectingOrTouching(l[d-1],g)?l[d-1]=y.fromPositions(l[d-1].getStartPosition(),g.getEndPosition()):d=l.push(g);const h=g=>Ea(this,void 0,void 0,function*(){return(yield e.provideDocumentRangeFormattingEdits(r,g,r.getFormattingOptions(),a.token))||[]}),c=(g,p)=>{if(!g.length||!p.length)return!1;const b=g.reduce((C,_)=>y.plusRange(C,_.range),g[0].range);if(!p.some(C=>y.intersectRanges(b,C.range)))return!1;for(let C of g)for(let _ of p)if(y.intersectRanges(C.range,_.range))return!0;return!1},u=[],f=[];try{for(let g of l){if(a.token.isCancellationRequested)return!0;f.push(yield h(g))}for(let g=0;g<l.length;++g)for(let p=g+1;p<l.length;++p){if(a.token.isCancellationRequested)return!0;if(c(f[g],f[p])){const b=y.plusRange(l[g],l[p]),C=yield h(b);l.splice(p,1),l.splice(g,1),l.push(b),f.splice(p,1),f.splice(g,1),f.push(C),g=0,p=0}}for(let g of f){if(a.token.isCancellationRequested)return!0;const p=yield o.computeMoreMinimalEdits(r.uri,g);p&&u.push(...p)}}finally{a.dispose()}if(u.length===0)return!1;if(Ao(t))nc.execute(t,u,!0),zD(u),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{const[{range:g}]=u,p=new ee(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn);r.pushEditOperations([p],u.map(b=>({text:b.text,range:y.lift(b.range),forceMoveMarkers:!0})),b=>{for(const{range:C}of b)if(y.areIntersectingOrTouching(C,p))return[new ee(C.startLineNumber,C.startColumn,C.endLineNumber,C.endColumn)];return null})}return!0})}function Rj(s,e,t,i,n){return Ea(this,void 0,void 0,function*(){const o=s.get(Ue),r=Ao(e)?e.getModel():e,a=EA(r),l=yield Xl.select(a,r,t);l&&(i.report(l),yield o.invokeFunction(Aj,l,e,t,n))})}function Aj(s,e,t,i,n){return Ea(this,void 0,void 0,function*(){const o=s.get(xs);let r,a;Ao(t)?(r=t.getModel(),a=new vf(t,5,void 0,n)):(r=t,a=new lD(t,n));let l;try{const d=yield e.provideDocumentFormattingEdits(r,r.getFormattingOptions(),a.token);if(l=yield o.computeMoreMinimalEdits(r.uri,d),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||l.length===0)return!1;if(Ao(t))nc.execute(t,l,i!==2),i!==2&&(zD(l),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1));else{const[{range:d}]=l,h=new ee(d.startLineNumber,d.startColumn,d.endLineNumber,d.endColumn);r.pushEditOperations([h],l.map(c=>({text:c.text,range:y.lift(c.range),forceMoveMarkers:!0})),c=>{for(const{range:u}of c)if(y.areIntersectingOrTouching(u,h))return[new ee(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn)];return null})}return!0})}function Oj(s,e,t,i,n){return Ea(this,void 0,void 0,function*(){const o=Bs.ordered(e);for(const r of o){let a=yield Promise.resolve(r.provideDocumentRangeFormattingEdits(e,t,i,n)).catch(fi);if(pn(a))return yield s.computeMoreMinimalEdits(e.uri,a)}})}function Pj(s,e,t,i){return Ea(this,void 0,void 0,function*(){const n=EA(e);for(const o of n){let r=yield Promise.resolve(o.provideDocumentFormattingEdits(e,t,i)).catch(fi);if(pn(r))return yield s.computeMoreMinimalEdits(e.uri,r)}})}function TA(s,e,t,i,n){const o=Rp.ordered(e);return o.length===0||o[0].autoFormatTriggerCharacters.indexOf(i)<0?Promise.resolve(void 0):Promise.resolve(o[0].provideOnTypeFormattingEdits(e,t,i,n,Oe.None)).catch(fi).then(r=>s.computeMoreMinimalEdits(e.uri,r))}We.registerCommand("_executeFormatRangeProvider",function(s,...e){const[t,i,n]=e;tt(he.isUri(t)),tt(y.isIRange(i));const o=s.get(Wt).getModel(t);if(!o)throw Mn("resource");return Oj(s.get(xs),o,y.lift(i),n,Oe.None)});We.registerCommand("_executeFormatDocumentProvider",function(s,...e){const[t,i]=e;tt(he.isUri(t));const n=s.get(Wt).getModel(t);if(!n)throw Mn("resource");return Pj(s.get(xs),n,i,Oe.None)});We.registerCommand("_executeFormatOnTypeProvider",function(s,...e){const[t,i,n,o]=e;tt(he.isUri(t)),tt(P.isIPosition(i)),tt(typeof n=="string");const r=s.get(Wt).getModel(t);if(!r)throw Mn("resource");return TA(s.get(xs),r,P.lift(i),n,o)});var ew;Xs.wrappingIndent.defaultValue=0;Xs.glyphMargin.defaultValue=!1;Xs.autoIndent.defaultValue=3;Xs.overviewRulerLanes.defaultValue=2;Xl.setFormatterSelector((s,e,t)=>Promise.resolve(s[0]));const Ki=YN();Ki.editor=U$();Ki.languages=Tj();Ki.CancellationTokenSource;Ki.Emitter;const Rte=Ki.KeyCode,Ate=Ki.KeyMod;Ki.Position;Ki.Range;Ki.Selection;Ki.SelectionDirection;Ki.MarkerSeverity;Ki.MarkerTag;Ki.Uri;Ki.Token;const Ote=Ki.editor,ia=Ki.languages;(((ew=Ut.MonacoEnvironment)===null||ew===void 0?void 0:ew.globalAPI)||typeof define=="function"&&define.amd)&&(self.monaco=Ki);typeof self.require<"u"&&typeof self.require.config=="function"&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});class sc extends ne{constructor(){super({id:sc.ID,label:m({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})}run(e,t){const n=!Hp.getTabFocusMode();Hp.setTabFocusMode(n),bi(n?m("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):m("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}sc.ID="editor.action.toggleTabFocusMode";Q(sc);var MA=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},ep=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};const RA=new oe("accessibilityHelpWidgetVisible",!1);let Ql=class AA extends U{constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(oc,this._editor))}static get(e){return e.getContribution(AA.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};Ql.ID="editor.contrib.accessibilityHelpController";Ql=MA([ep(1,Ue)],Ql);function Fj(s,e){return!s||s.length===0?zt.noSelection:s.length===1?e?Ti(zt.singleSelectionRange,s[0].positionLineNumber,s[0].positionColumn,e):Ti(zt.singleSelection,s[0].positionLineNumber,s[0].positionColumn):e?Ti(zt.multiSelectionRange,s.length,e):s.length>0?Ti(zt.multiSelection,s.length):""}let oc=class tp extends Wn{constructor(e,t,i,n){super(),this._contextKeyService=t,this._keybindingService=i,this._openerService=n,this._editor=e,this._isVisibleKey=RA.bindTo(this._contextKeyService),this._domNode=He(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=He(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(qt(this._contentDomNode.domNode,"keydown",o=>{if(!!this._isVisible&&(o.equals(2083)&&(bi(zt.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),ci(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),o.preventDefault(),o.stopPropagation()),o.equals(2086))){bi(zt.openingDocs);let r=this._editor.getRawOptions().accessibilityHelpUrl;typeof r>"u"&&(r="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(he.parse(r)),o.preventDefault(),o.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return tp.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,i){let n=this._keybindingService.lookupKeybinding(e);return n?Ti(t,n.getAriaLabel()):Ti(i,e)}_buildContent(){const e=this._editor.getOptions(),t=this._editor.getSelections();let i=0;if(t){const a=this._editor.getModel();a&&t.forEach(l=>{i+=a.getValueLengthInRange(l)})}let n=Fj(t,i);e.get(52)?e.get(79)?n+=zt.readonlyDiffEditor:n+=zt.editableDiffEditor:e.get(79)?n+=zt.readonlyEditor:n+=zt.editableEditor;const o=Me?zt.changeConfigToOnMac:zt.changeConfigToOnWinLinux;switch(e.get(2)){case 0:n+=`
|
|
585
|
+
hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")o.push({token:a.token+t.tokenPostfix,open:la(t,a.open),close:la(t,a.close)});else throw lt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=o,t.noThrow=!0,t}function Y$(s){Tl.registerLanguage(s)}function X$(){let s=[];return s=s.concat(Tl.getLanguages()),s}function Q$(s){let e=Ye.modeService.get().getLanguageIdentifier(s);return e?e.id:0}function J$(s,e){let t=Ye.modeService.get().onDidCreateMode(i=>{i.getId()===s&&(t.dispose(),e())});return t}function ej(s,e){let t=Ye.modeService.get().getLanguageIdentifier(s);if(!t)throw new Error(`Cannot set configuration for unknown language ${s}`);return ye.register(t,e,100)}class tj{constructor(e,t){this._languageIdentifier=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i,n){if(typeof this._actual.tokenize=="function")return Tf.adaptTokenize(this._languageIdentifier.language,this._actual,e,i,n);throw new Error("Not supported!")}tokenize2(e,t,i){let n=this._actual.tokenizeEncoded(e,i);return new q_(n.tokens,n.endState)}}class Tf{constructor(e,t,i){this._standaloneThemeService=e,this._languageIdentifier=t,this._actual=i}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t,i){let n=[],o=0;for(let r=0,a=e.length;r<a;r++){const l=e[r];let d=l.startIndex;r===0?d=0:d<o&&(d=o),n[r]=new K_(d+i,l.scopes,t),o=d}return n}static adaptTokenize(e,t,i,n,o){let r=t.tokenize(i,n),a=Tf._toClassicTokens(r.tokens,e,o),l;return r.endState.equals(n)?l=n:l=r.endState,new Ry(a,l)}tokenize(e,t,i,n){return Tf.adaptTokenize(this._languageIdentifier.language,this._actual,e,i,n)}_toBinaryTokens(e,t){const i=this._languageIdentifier.id,n=this._standaloneThemeService.getColorTheme().tokenTheme;let o=[],r=0,a=0;for(let d=0,h=e.length;d<h;d++){const c=e[d],u=n.match(i,c.scopes);if(r>0&&o[r-1]===u)continue;let f=c.startIndex;d===0?f=0:f<a&&(f=a),o[r++]=f+t,o[r++]=u,a=f}let l=new Uint32Array(r);for(let d=0;d<r;d++)l[d]=o[d];return l}tokenize2(e,t,i,n){let o=this._actual.tokenize(e,i),r=this._toBinaryTokens(o.tokens,n),a;return o.endState.equals(i)?a=i:a=o.endState,new q_(r,a)}}function ij(s){return"tokenizeEncoded"in s}function kA(s){return s&&typeof s.then=="function"}function nj(s){if(s){const e=[null];for(let t=1,i=s.length;t<i;t++)e[t]=B.fromHex(s[t]);Ye.standaloneThemeService.get().setColorMapOverride(e)}else Ye.standaloneThemeService.get().setColorMapOverride(null)}function sj(s,e){let t=Ye.modeService.get().getLanguageIdentifier(s);if(!t)throw new Error(`Cannot set tokens provider for unknown language ${s}`);const i=n=>ij(n)?new tj(t,n):new Tf(Ye.standaloneThemeService.get(),t,n);return kA(e)?wt.registerPromise(s,e.then(n=>i(n))):wt.register(s,i(e))}function oj(s,e){const t=i=>qB(Ye.modeService.get(),Ye.standaloneThemeService.get(),s,Z$(s,i));return kA(e)?wt.registerPromise(s,e.then(i=>t(i))):wt.register(s,t(e))}function rj(s,e){return Ip.register(s,e)}function aj(s,e){return kp.register(s,e)}function lj(s,e){return Ll.register(s,e)}function dj(s,e){return Zu.register(s,{provideHover:(t,i,n)=>{let o=t.getWordAtPosition(i);return Promise.resolve(e.provideHover(t,i,n)).then(r=>{if(!!r)return!r.range&&o&&(r.range=new y(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),r.range||(r.range=new y(i.lineNumber,i.column,i.lineNumber,i.column)),r})}})}function hj(s,e){return ps.register(s,e)}function cj(s,e){return $h.register(s,e)}function uj(s,e){return Ep.register(s,e)}function fj(s,e){return Yu.register(s,e)}function gj(s,e){return Tp.register(s,e)}function mj(s,e){return Mp.register(s,e)}function pj(s,e){return dr.register(s,e)}function _j(s,e){return ko.register(s,{provideCodeActions:(t,i,n,o)=>{let r=Ye.markerService.get().read({resource:t.uri}).filter(a=>y.areIntersectingOrTouching(a,i));return e.provideCodeActions(t,i,{markers:r,only:n.only},o)}})}function bj(s,e){return bu.register(s,e)}function Cj(s,e){return Bs.register(s,e)}function vj(s,e){return Rp.register(s,e)}function wj(s,e){return Xu.register(s,e)}function Sj(s,e){return Fs.register(s,e)}function yj(s,e){return jh.register(s,e)}function Lj(s,e){return X0.register(s,e)}function Dj(s,e){return Np.register(s,e)}function xj(s,e){return tb.register(s,e)}function Ij(s,e){return Ap.register(s,e)}function kj(s,e){return tL.register(s,e)}function Ej(s,e){return eL.register(s,e)}function Nj(s,e){return Jr.register(s,e)}function Tj(){return{register:Y$,getLanguages:X$,onLanguage:J$,getEncodedLanguageId:Q$,setLanguageConfiguration:ej,setColorMap:nj,setTokensProvider:sj,setMonarchTokensProvider:oj,registerReferenceProvider:rj,registerRenameProvider:aj,registerCompletionItemProvider:Sj,registerSignatureHelpProvider:lj,registerHoverProvider:dj,registerDocumentSymbolProvider:hj,registerDocumentHighlightProvider:cj,registerLinkedEditingRangeProvider:uj,registerDefinitionProvider:fj,registerImplementationProvider:gj,registerTypeDefinitionProvider:mj,registerCodeLensProvider:pj,registerCodeActionProvider:_j,registerDocumentFormattingEditProvider:bj,registerDocumentRangeFormattingEditProvider:Cj,registerOnTypeFormattingEditProvider:vj,registerLinkProvider:wj,registerColorProvider:yj,registerFoldingRangeProvider:Lj,registerDeclarationProvider:Dj,registerSelectionRangeProvider:xj,registerDocumentSemanticTokensProvider:Ij,registerDocumentRangeSemanticTokensProvider:kj,registerInlineCompletionsProvider:Ej,registerInlayHintsProvider:Nj,DocumentHighlightKind:a0,CompletionItemKind:t0,CompletionItemTag:i0,CompletionItemInsertTextRule:e0,SymbolKind:k0,SymbolTag:E0,IndentAction:u0,CompletionTriggerKind:n0,SignatureHelpTriggerKind:I0,InlayHintKind:f0,InlineCompletionTriggerKind:g0,FoldingRangeKind:qs}}class nc{static _handleEolEdits(e,t){let i,n=[];for(let o of t)typeof o.eol=="number"&&(i=o.eol),o.range&&typeof o.text=="string"&&n.push(o);return typeof i=="number"&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const n=nc._handleEolEdits(e,t);n.length===1&&nc._isFullModelReplaceEdit(e,n[0])?e.executeEdits("formatEditsCommand",n.map(o=>Mt.replace(y.lift(o.range),o.text))):e.executeEdits("formatEditsCommand",n.map(o=>Mt.replaceMove(y.lift(o.range),o.text))),i&&e.pushUndoStop()}}class Jv{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}var Ea=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};function zD(s){if(s=s.filter(n=>n.range),!s.length)return;let{range:e}=s[0];for(let n=1;n<s.length;n++)e=y.plusRange(e,s[n].range);const{startLineNumber:t,endLineNumber:i}=e;t===i?s.length===1?bi(m("hint11","Made 1 formatting edit on line {0}",t)):bi(m("hintn1","Made {0} formatting edits on line {1}",s.length,t)):s.length===1?bi(m("hint1n","Made 1 formatting edit between lines {0} and {1}",t,i)):bi(m("hintnn","Made {0} formatting edits between lines {1} and {2}",s.length,t,i))}function EA(s){const e=[],t=new Set,i=bu.ordered(s);for(const o of i)e.push(o),o.extensionId&&t.add(Jv.toKey(o.extensionId));const n=Bs.ordered(s);for(const o of n){if(o.extensionId){if(t.has(Jv.toKey(o.extensionId)))continue;t.add(Jv.toKey(o.extensionId))}e.push({displayName:o.displayName,extensionId:o.extensionId,provideDocumentFormattingEdits(r,a,l){return o.provideDocumentRangeFormattingEdits(r,r.getFullModelRange(),a,l)}})}return e}class Xl{static setFormatterSelector(e){return{dispose:Xl._selectors.unshift(e)}}static select(e,t,i){return Ea(this,void 0,void 0,function*(){if(e.length===0)return;const n=Pe.first(Xl._selectors);if(n)return yield n(e,t,i)})}}Xl._selectors=new En;function NA(s,e,t,i,n,o){return Ea(this,void 0,void 0,function*(){const r=s.get(Ue),a=Ao(e)?e.getModel():e,l=Bs.ordered(a),d=yield Xl.select(l,a,i);d&&(n.report(d),yield r.invokeFunction(Mj,d,e,t,o))})}function Mj(s,e,t,i,n){return Ea(this,void 0,void 0,function*(){const o=s.get(xs);let r,a;Ao(t)?(r=t.getModel(),a=new vf(t,5,void 0,n)):(r=t,a=new lD(t,n));let l=[],d=0;for(let g of lL(i).sort(y.compareRangesUsingStarts))d>0&&y.areIntersectingOrTouching(l[d-1],g)?l[d-1]=y.fromPositions(l[d-1].getStartPosition(),g.getEndPosition()):d=l.push(g);const h=g=>Ea(this,void 0,void 0,function*(){return(yield e.provideDocumentRangeFormattingEdits(r,g,r.getFormattingOptions(),a.token))||[]}),c=(g,p)=>{if(!g.length||!p.length)return!1;const b=g.reduce((C,_)=>y.plusRange(C,_.range),g[0].range);if(!p.some(C=>y.intersectRanges(b,C.range)))return!1;for(let C of g)for(let _ of p)if(y.intersectRanges(C.range,_.range))return!0;return!1},u=[],f=[];try{for(let g of l){if(a.token.isCancellationRequested)return!0;f.push(yield h(g))}for(let g=0;g<l.length;++g)for(let p=g+1;p<l.length;++p){if(a.token.isCancellationRequested)return!0;if(c(f[g],f[p])){const b=y.plusRange(l[g],l[p]),C=yield h(b);l.splice(p,1),l.splice(g,1),l.push(b),f.splice(p,1),f.splice(g,1),f.push(C),g=0,p=0}}for(let g of f){if(a.token.isCancellationRequested)return!0;const p=yield o.computeMoreMinimalEdits(r.uri,g);p&&u.push(...p)}}finally{a.dispose()}if(u.length===0)return!1;if(Ao(t))nc.execute(t,u,!0),zD(u),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{const[{range:g}]=u,p=new ee(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn);r.pushEditOperations([p],u.map(b=>({text:b.text,range:y.lift(b.range),forceMoveMarkers:!0})),b=>{for(const{range:C}of b)if(y.areIntersectingOrTouching(C,p))return[new ee(C.startLineNumber,C.startColumn,C.endLineNumber,C.endColumn)];return null})}return!0})}function Rj(s,e,t,i,n){return Ea(this,void 0,void 0,function*(){const o=s.get(Ue),r=Ao(e)?e.getModel():e,a=EA(r),l=yield Xl.select(a,r,t);l&&(i.report(l),yield o.invokeFunction(Aj,l,e,t,n))})}function Aj(s,e,t,i,n){return Ea(this,void 0,void 0,function*(){const o=s.get(xs);let r,a;Ao(t)?(r=t.getModel(),a=new vf(t,5,void 0,n)):(r=t,a=new lD(t,n));let l;try{const d=yield e.provideDocumentFormattingEdits(r,r.getFormattingOptions(),a.token);if(l=yield o.computeMoreMinimalEdits(r.uri,d),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||l.length===0)return!1;if(Ao(t))nc.execute(t,l,i!==2),i!==2&&(zD(l),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1));else{const[{range:d}]=l,h=new ee(d.startLineNumber,d.startColumn,d.endLineNumber,d.endColumn);r.pushEditOperations([h],l.map(c=>({text:c.text,range:y.lift(c.range),forceMoveMarkers:!0})),c=>{for(const{range:u}of c)if(y.areIntersectingOrTouching(u,h))return[new ee(u.startLineNumber,u.startColumn,u.endLineNumber,u.endColumn)];return null})}return!0})}function Oj(s,e,t,i,n){return Ea(this,void 0,void 0,function*(){const o=Bs.ordered(e);for(const r of o){let a=yield Promise.resolve(r.provideDocumentRangeFormattingEdits(e,t,i,n)).catch(fi);if(pn(a))return yield s.computeMoreMinimalEdits(e.uri,a)}})}function Pj(s,e,t,i){return Ea(this,void 0,void 0,function*(){const n=EA(e);for(const o of n){let r=yield Promise.resolve(o.provideDocumentFormattingEdits(e,t,i)).catch(fi);if(pn(r))return yield s.computeMoreMinimalEdits(e.uri,r)}})}function TA(s,e,t,i,n){const o=Rp.ordered(e);return o.length===0||o[0].autoFormatTriggerCharacters.indexOf(i)<0?Promise.resolve(void 0):Promise.resolve(o[0].provideOnTypeFormattingEdits(e,t,i,n,Oe.None)).catch(fi).then(r=>s.computeMoreMinimalEdits(e.uri,r))}We.registerCommand("_executeFormatRangeProvider",function(s,...e){const[t,i,n]=e;tt(he.isUri(t)),tt(y.isIRange(i));const o=s.get(Wt).getModel(t);if(!o)throw Mn("resource");return Oj(s.get(xs),o,y.lift(i),n,Oe.None)});We.registerCommand("_executeFormatDocumentProvider",function(s,...e){const[t,i]=e;tt(he.isUri(t));const n=s.get(Wt).getModel(t);if(!n)throw Mn("resource");return Pj(s.get(xs),n,i,Oe.None)});We.registerCommand("_executeFormatOnTypeProvider",function(s,...e){const[t,i,n,o]=e;tt(he.isUri(t)),tt(P.isIPosition(i)),tt(typeof n=="string");const r=s.get(Wt).getModel(t);if(!r)throw Mn("resource");return TA(s.get(xs),r,P.lift(i),n,o)});var ew;Xs.wrappingIndent.defaultValue=0;Xs.glyphMargin.defaultValue=!1;Xs.autoIndent.defaultValue=3;Xs.overviewRulerLanes.defaultValue=2;Xl.setFormatterSelector((s,e,t)=>Promise.resolve(s[0]));const Ki=YN();Ki.editor=U$();Ki.languages=Tj();Ki.CancellationTokenSource;Ki.Emitter;const Mte=Ki.KeyCode,Rte=Ki.KeyMod;Ki.Position;Ki.Range;Ki.Selection;Ki.SelectionDirection;Ki.MarkerSeverity;Ki.MarkerTag;Ki.Uri;Ki.Token;const Ate=Ki.editor,ia=Ki.languages;(((ew=Ut.MonacoEnvironment)===null||ew===void 0?void 0:ew.globalAPI)||typeof define=="function"&&define.amd)&&(self.monaco=Ki);typeof self.require<"u"&&typeof self.require.config=="function"&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]});class sc extends ne{constructor(){super({id:sc.ID,label:m({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})}run(e,t){const n=!Hp.getTabFocusMode();Hp.setTabFocusMode(n),bi(n?m("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):m("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}sc.ID="editor.action.toggleTabFocusMode";Q(sc);var MA=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},ep=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};const RA=new oe("accessibilityHelpWidgetVisible",!1);let Ql=class AA extends U{constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(oc,this._editor))}static get(e){return e.getContribution(AA.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};Ql.ID="editor.contrib.accessibilityHelpController";Ql=MA([ep(1,Ue)],Ql);function Fj(s,e){return!s||s.length===0?zt.noSelection:s.length===1?e?Ti(zt.singleSelectionRange,s[0].positionLineNumber,s[0].positionColumn,e):Ti(zt.singleSelection,s[0].positionLineNumber,s[0].positionColumn):e?Ti(zt.multiSelectionRange,s.length,e):s.length>0?Ti(zt.multiSelection,s.length):""}let oc=class tp extends Wn{constructor(e,t,i,n){super(),this._contextKeyService=t,this._keybindingService=i,this._openerService=n,this._editor=e,this._isVisibleKey=RA.bindTo(this._contextKeyService),this._domNode=He(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=He(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(qt(this._contentDomNode.domNode,"keydown",o=>{if(!!this._isVisible&&(o.equals(2083)&&(bi(zt.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),ci(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),o.preventDefault(),o.stopPropagation()),o.equals(2086))){bi(zt.openingDocs);let r=this._editor.getRawOptions().accessibilityHelpUrl;typeof r>"u"&&(r="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(he.parse(r)),o.preventDefault(),o.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return tp.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,i){let n=this._keybindingService.lookupKeybinding(e);return n?Ti(t,n.getAriaLabel()):Ti(i,e)}_buildContent(){const e=this._editor.getOptions(),t=this._editor.getSelections();let i=0;if(t){const a=this._editor.getModel();a&&t.forEach(l=>{i+=a.getValueLengthInRange(l)})}let n=Fj(t,i);e.get(52)?e.get(79)?n+=zt.readonlyDiffEditor:n+=zt.editableDiffEditor:e.get(79)?n+=zt.readonlyEditor:n+=zt.editableEditor;const o=Me?zt.changeConfigToOnMac:zt.changeConfigToOnWinLinux;switch(e.get(2)){case 0:n+=`
|
|
586
586
|
|
|
587
587
|
- `+o;break;case 2:n+=`
|
|
588
588
|
|
|
@@ -716,4 +716,4 @@ Please report this to https://github.com/markedjs/marked.`,V.silent)return"<p>An
|
|
|
716
716
|
`):s}function kN(s){return typeof s.code=="string"&&typeof s.errno=="number"&&typeof s.syscall=="string"?m("nodeExceptionMessage","A system error occurred ({0})",s.message):s.message||m("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function G2(s=null,e=!1){if(!s)return m("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(s)){const t=bd(s),i=G2(t[0],e);return t.length>1?m("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(Xn(s))return s;if(s.detail){const t=s.detail;if(t.error)return Pw(t.error,e);if(t.exception)return Pw(t.exception,e)}return s.stack?Pw(s,e):s.message?s.message:m("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var Z2=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},fl=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}},EN=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};let qf=class dp extends IC{constructor(e,t,i,n,o,r){super(dp.PREFIX,e),this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=o,this.dialogService=r,this.commandsHistory=this._register(this.instantiationService.createInstance(ud)),this.options=e}_getPicks(e,t,i){return EN(this,void 0,void 0,function*(){const n=yield this.getCommandPicks(t,i);if(i.isCancellationRequested)return[];const o=[];for(const d of n){const h=Nn(dp.WORD_FILTER(e,d.label)),c=d.commandAlias?Nn(dp.WORD_FILTER(e,d.commandAlias)):void 0;h||c?(d.highlights={label:h,detail:this.options.showAlias?c:void 0},o.push(d)):e===d.commandId&&o.push(d)}const r=new Map;for(const d of o){const h=r.get(d.label);h?(d.description=d.commandId,h.description=h.commandId):r.set(d.label,d)}o.sort((d,h)=>{const c=this.commandsHistory.peek(d.commandId),u=this.commandsHistory.peek(h.commandId);return c&&u?c>u?-1:1:c?-1:u?1:d.label.localeCompare(h.label)});const a=[];let l=!1;for(let d=0;d<o.length;d++){const h=o[d],c=this.keybindingService.lookupKeybinding(h.commandId),u=c?m("commandPickAriaLabelWithKeybinding","{0}, {1}",h.label,c.getAriaLabel()):h.label;d===0&&this.commandsHistory.peek(h.commandId)&&(a.push({type:"separator",label:m("recentlyUsed","recently used")}),l=!0),d!==0&&l&&!this.commandsHistory.peek(h.commandId)&&(a.push({type:"separator",label:m("morecCommands","other commands")}),l=!1),a.push(Object.assign(Object.assign({},h),{ariaLabel:u,detail:this.options.showAlias&&h.commandAlias!==h.label?h.commandAlias:void 0,keybinding:c,accept:()=>EN(this,void 0,void 0,function*(){this.commandsHistory.push(h.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:h.commandId,from:"quick open"});try{yield this.commandService.executeCommand(h.commandId)}catch(f){Wo(f)||this.dialogService.show(kt.Error,m("canNotRun","Command '{0}' resulted in an error ({1})",h.label,G2(f)))}})}))}return a})}};qf.PREFIX=">";qf.WORD_FILTER=_D(Ob,q6,VR);qf=Z2([fl(1,Ue),fl(2,vt),fl(3,Bt),fl(4,Wa),fl(5,hg)],qf);let ud=class Jt extends U{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=Jt.getConfiguredCommandHistoryLength(this.configurationService),Jt.cache&&Jt.cache.limit!==this.configuredCommandsHistoryLength&&(Jt.cache.limit=this.configuredCommandsHistoryLength,Jt.saveState(this.storageService))}load(){const e=this.storageService.get(Jt.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch{}const i=Jt.cache=new _d(this.configuredCommandsHistoryLength,1);if(t){let n;t.usesLRU?n=t.entries:n=t.entries.sort((o,r)=>o.value-r.value),n.forEach(o=>i.set(o.key,o.value))}Jt.counter=this.storageService.getNumber(Jt.PREF_KEY_COUNTER,0,Jt.counter)}push(e){!Jt.cache||(Jt.cache.set(e,Jt.counter++),Jt.saveState(this.storageService))}peek(e){var t;return(t=Jt.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!Jt.cache)return;const t={usesLRU:!0,entries:[]};Jt.cache.forEach((i,n)=>t.entries.push({key:n,value:i})),e.store(Jt.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(Jt.PREF_KEY_COUNTER,Jt.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,i;const o=(i=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||i===void 0?void 0:i.history;return typeof o=="number"?o:Jt.DEFAULT_COMMANDS_HISTORY_LENGTH}};ud.DEFAULT_COMMANDS_HISTORY_LENGTH=50;ud.PREF_KEY_CACHE="commandPalette.mru.cache";ud.PREF_KEY_COUNTER="commandPalette.mru.counter";ud.counter=1;ud=Z2([fl(0,zo),fl(1,Et)],ud);class IJ extends qf{constructor(e,t,i,n,o,r){super(e,t,i,n,o,r)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:ZR(i.label)||i.id});return t}}var kJ=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},th=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}},EJ=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};let Gf=class extends IJ{constructor(e,t,i,n,o,r){super({showAlias:!1},e,i,n,o,r),this.codeEditorService=t}get activeTextEditorControl(){return Nn(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return EJ(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}};Gf=kJ([th(0,Ue),th(1,Ge),th(2,vt),th(3,Bt),th(4,Wa),th(5,hg)],Gf);Vt.as(Td.Quickaccess).registerQuickAccessProvider({ctor:Gf,prefix:Gf.PREFIX,helpEntries:[{description:qp.quickCommandHelp,needsEditor:!0}]});class NJ extends ne{constructor(){super({id:"editor.action.quickCommand",label:qp.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:k.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(Ua).quickAccess.show(Gf.PREFIX)}}Q(NJ);var TJ=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},MJ=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};let $_=class hp{constructor(e){this.quickInputService=e,this.registry=Vt.as(Td.Quickaccess)}provide(e){const t=new X;t.add(e.onDidAccept(()=>{const[o]=e.selectedItems;o&&this.quickInputService.quickAccess.show(o.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(o=>{const r=this.registry.getQuickAccessProvider(o.substr(hp.PREFIX.length));r&&r.prefix&&r.prefix!==hp.PREFIX&&this.quickInputService.quickAccess.show(r.prefix,{preserveValue:!0})}));const{editorProviders:i,globalProviders:n}=this.getQuickAccessProviders();return e.items=i.length===0||n.length===0?[...i.length===0?n:i]:[{label:m("globalCommands","global commands"),type:"separator"},...n,{label:m("editorCommands","editor commands"),type:"separator"},...i],t}getQuickAccessProviders(){const e=[],t=[];for(const i of this.registry.getQuickAccessProviders().sort((n,o)=>n.prefix.localeCompare(o.prefix)))if(i.prefix!==hp.PREFIX)for(const n of i.helpEntries){const o=n.prefix||i.prefix,r=o||"\u2026";(n.needsEditor?t:e).push({prefix:o,label:r,ariaLabel:m("helpPickAriaLabel","{0}, {1}",r,n.description),description:n.description})}return{editorProviders:t,globalProviders:e}}};$_.PREFIX="?";$_=TJ([MJ(0,Ua)],$_);Vt.as(Td.Quickaccess).registerQuickAccessProvider({ctor:$_,prefix:"",helpEntries:[{description:lS.helpQuickAccessActionLabel,needsEditor:!0}]});const Y2=[void 0,[]];function Fw(s,e,t=0,i=0){const n=e;return n.values&&n.values.length>1?RJ(s,n.values,t,i):X2(s,e,t,i)}function RJ(s,e,t,i){let n=0;const o=[];for(const r of e){const[a,l]=X2(s,r,t,i);if(typeof a!="number")return Y2;n+=a,o.push(...l)}return[n,AJ(o)]}function X2(s,e,t,i){const n=tc(e.original,e.originalLowercase,t,s,s.toLowerCase(),i,!0);return n?[n[0],Fb(n)]:Y2}function AJ(s){const e=s.sort((n,o)=>n.start-o.start),t=[];let i;for(const n of e)!i||!OJ(i,n)?(i=n,t.push(n)):(i.start=Math.min(i.start,n.start),i.end=Math.max(i.end,n.end));return t}function OJ(s,e){return!(s.end<e.start||e.end<s.start)}const Q2=" ";function yy(s){typeof s!="string"&&(s="");const e=s.toLowerCase(),{pathNormalized:t,normalized:i,normalizedLowercase:n}=NN(s),o=t.indexOf(Sl)>=0;let r;const a=s.split(Q2);if(a.length>1)for(const l of a){const{pathNormalized:d,normalized:h,normalizedLowercase:c}=NN(l);h&&(r||(r=[]),r.push({original:l,originalLowercase:l.toLowerCase(),pathNormalized:d,normalized:h,normalizedLowercase:c}))}return{original:s,originalLowercase:e,pathNormalized:t,normalized:i,normalizedLowercase:n,values:r,containsPathSeparator:o}}function NN(s){let e;vi?e=s.replace(/\//g,Sl):e=s.replace(/\\/g,Sl);const t=_4(e).replace(/\s/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function TN(s){return Array.isArray(s)?yy(s.map(e=>e.original).join(Q2)):yy(s.original)}var nu=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};class Yn extends D2{constructor(e=Object.create(null)){super(e),this.options=e,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,m("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),U.None}provideWithTextEditor(e,t,i){const n=e.editor,o=this.getModel(n);return o?ps.has(o)?this.doProvideWithEditorSymbols(e,o,t,i):this.doProvideWithoutEditorSymbols(e,o,t,i):U.None}doProvideWithoutEditorSymbols(e,t,i,n){const o=new X;return this.provideLabelPick(i,m("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),nu(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(t,o))||n.isCancellationRequested||o.add(this.doProvideWithEditorSymbols(e,t,i,n))}),o}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return nu(this,void 0,void 0,function*(){if(ps.has(e))return!0;let i;const n=new Promise(r=>i=r),o=t.add(ps.onDidChange(()=>{ps.has(e)&&(o.dispose(),i(!0))}));return t.add(Re(()=>i(!1))),n})}doProvideWithEditorSymbols(e,t,i,n){const o=e.editor,r=new X;r.add(i.onDidAccept(c=>{const[u]=i.selectedItems;u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:i.keyMods,preserveFocus:c.inBackground}),c.inBackground||i.hide())})),r.add(i.onDidTriggerItemButton(({item:c})=>{c&&c.range&&(this.gotoLocation(e,{range:c.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));const a=this.getDocumentSymbols(t,n);let l;const d=()=>nu(this,void 0,void 0,function*(){l==null||l.dispose(!0),i.busy=!1,l=new tn(n),i.busy=!0;try{const c=yy(i.value.substr(Yn.PREFIX.length).trim()),u=yield this.doGetSymbolPicks(a,c,void 0,l.token);if(n.isCancellationRequested)return;u.length>0?i.items=u:c.original.length>0?this.provideLabelPick(i,m("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,m("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}});r.add(i.onDidChangeValue(()=>d())),d();let h=!0;return r.add(i.onDidChangeActive(()=>{const[c]=i.activeItems;if(c&&c.range){if(h){h=!1;return}o.revealRangeInCenter(c.range.selection,0),this.addDecorations(o,c.range.decoration)}})),r}doGetSymbolPicks(e,t,i,n){return nu(this,void 0,void 0,function*(){const o=yield e;if(n.isCancellationRequested)return[];const r=t.original.indexOf(Yn.SCOPE_PREFIX)===0,a=r?1:0;let l,d;t.values&&t.values.length>1?(l=TN(t.values[0]),d=TN(t.values.slice(1))):l=t;const h=[];for(let f=0;f<o.length;f++){const g=o[f],p=m4(g.name),b=`$(symbol-${Y0.toString(g.kind)||"property"}) ${p}`,C=b.length-p.length;let _=g.containerName;i!=null&&i.extraContainerLabel&&(_?_=`${i.extraContainerLabel} \u2022 ${_}`:_=i.extraContainerLabel);let v,w,S,D;if(t.original.length>a){let x=!1;if(l!==t&&([v,w]=Fw(b,Object.assign(Object.assign({},t),{values:void 0}),a,C),typeof v=="number"&&(x=!0)),typeof v!="number"&&([v,w]=Fw(b,l,a,C),typeof v!="number"))continue;if(!x&&d){if(_&&d.original.length>0&&([S,D]=Fw(_,d)),typeof S!="number")continue;typeof v=="number"&&(v+=S)}}const L=g.tags&&g.tags.indexOf(1)>=0;h.push({index:f,kind:g.kind,score:v,label:b,ariaLabel:p,description:_,highlights:L?void 0:{label:w,description:D},range:{selection:y.collapseToStart(g.selectionRange),decoration:g.range},strikethrough:L,buttons:(()=>{var x,E;const O=!((x=this.options)===null||x===void 0)&&x.openSideBySideDirection?(E=this.options)===null||E===void 0?void 0:E.openSideBySideDirection():void 0;if(!!O)return[{iconClass:O==="right"?te.splitHorizontal.classNames:te.splitVertical.classNames,tooltip:O==="right"?m("openToSide","Open to the Side"):m("openToBottom","Open to the Bottom")}]})()})}const c=h.sort((f,g)=>r?this.compareByKindAndScore(f,g):this.compareByScore(f,g));let u=[];if(r){let b=function(){g&&typeof f=="number"&&p>0&&(g.label=Ti(Ww[f]||Bw,p))},f,g,p=0;for(const C of c)f!==C.kind?(b(),f=C.kind,p=1,g={type:"separator"},u.push(g)):p++,u.push(C);b()}else c.length>0&&(u=[{label:m("symbols","symbols ({0})",h.length),type:"separator"},...c]);return u})}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.score<t.score)return 1}return e.index<t.index?-1:e.index>t.index?1:0}compareByKindAndScore(e,t){const i=Ww[e.kind]||Bw,n=Ww[t.kind]||Bw,o=i.localeCompare(n);return o===0?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return nu(this,void 0,void 0,function*(){const i=yield Vi.create(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()})}}Yn.PREFIX="@";Yn.SCOPE_PREFIX=":";Yn.PREFIX_BY_CATEGORY=`${Yn.PREFIX}${Yn.SCOPE_PREFIX}`;const Bw=m("property","properties ({0})"),Ww={[5]:m("method","methods ({0})"),[11]:m("function","functions ({0})"),[8]:m("_constructor","constructors ({0})"),[12]:m("variable","variables ({0})"),[4]:m("class","classes ({0})"),[22]:m("struct","structs ({0})"),[23]:m("event","events ({0})"),[24]:m("operator","operators ({0})"),[10]:m("interface","interfaces ({0})"),[2]:m("namespace","namespaces ({0})"),[3]:m("package","packages ({0})"),[25]:m("typeParameter","type parameters ({0})"),[1]:m("modules","modules ({0})"),[6]:m("property","properties ({0})"),[9]:m("enum","enumerations ({0})"),[21]:m("enumMember","enumeration members ({0})"),[14]:m("string","strings ({0})"),[0]:m("file","files ({0})"),[17]:m("array","arrays ({0})"),[15]:m("number","numbers ({0})"),[16]:m("boolean","booleans ({0})"),[18]:m("object","objects ({0})"),[19]:m("key","keys ({0})"),[7]:m("field","fields ({0})"),[13]:m("constant","constants ({0})")};var PJ=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},FJ=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};let Ly=class extends Yn{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=re.None}get activeTextEditorControl(){return Nn(this.editorService.getFocusedCodeEditor())}};Ly=PJ([FJ(0,Ge)],Ly);Vt.as(Td.Quickaccess).registerQuickAccessProvider({ctor:Ly,prefix:Yn.PREFIX,helpEntries:[{description:nf.quickOutlineActionLabel,prefix:Yn.PREFIX,needsEditor:!0},{description:nf.quickOutlineByCategoryActionLabel,prefix:Yn.PREFIX_BY_CATEGORY,needsEditor:!0}]});class BJ extends ne{constructor(){super({id:"editor.action.quickOutline",label:nf.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:k.hasDocumentSymbolProvider,kbOpts:{kbExpr:k.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(Ua).quickAccess.show(Yn.PREFIX)}}Q(BJ);var WJ=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},ih=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};let Dy=class extends Aa{constructor(e,t,i,n,o,r,a){super(!0,e,t,i,n,o,r,a)}};Dy=WJ([ih(1,pe),ih(2,Ge),ih(3,Gt),ih(4,Ue),ih(5,zo),ih(6,Et)],Dy);Ze(Aa.ID,Dy);var VJ=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Vw=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};const kC=new oe("renameInputVisible",!1,m("renameInputVisible","Whether the rename input widget is visible"));let xy=class{constructor(e,t,i,n,o){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._disposables=new X,this.allowEditorOverflow=!0,this._visibleContextKey=kC.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(r=>{r.hasChanged(41)&&this._updateFont()})),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",m("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const e=()=>{var t,i;const[n,o]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(n),this._label.innerText=m({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(t=this._keybindingService.lookupKeybinding(n))===null||t===void 0?void 0:t.getLabel(),(i=this._keybindingService.lookupKeybinding(o))===null||i===void 0?void 0:i.getLabel())};e(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(e)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(e){var t,i,n,o;if(!this._input||!this._domNode)return;const r=e.getColor(La);this._domNode.style.backgroundColor=String((t=e.getColor(Rn))!==null&&t!==void 0?t:""),this._domNode.style.boxShadow=r?` 0 0 8px 2px ${r}`:"",this._domNode.style.color=String((i=e.getColor(PL))!==null&&i!==void 0?i:""),this._input.style.backgroundColor=String((n=e.getColor(OL))!==null&&n!==void 0?n:"");const a=e.getColor(FL);this._input.style.borderWidth=a?"1px":"0px",this._input.style.borderStyle=a?"solid":"none",this._input.style.borderColor=(o=a==null?void 0:a.toString())!==null&&o!==void 0?o:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(41);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=`${e.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){this._currentAcceptInput&&this._currentAcceptInput(e)}cancelInput(e){this._currentCancelInput&&this._currentCancelInput(e)}getInput(e,t,i,n,o,r){this._domNode.classList.toggle("preview",o),this._position=new P(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",n.toString()),this._input.size=Math.max((e.endColumn-e.startColumn)*1.1,20);const a=new X;return new Promise(l=>{this._currentCancelInput=d=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l(d),!0),this._currentAcceptInput=d=>{if(this._input.value.trim().length===0||this._input.value===t){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l({newName:this._input.value,wantsPreview:o&&d})},r.onCancellationRequested(()=>this.cancelInput(!0)),a.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!1))),this._show()}).finally(()=>{a.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};xy=VJ([Vw(2,_t),Vw(3,vt),Vw(4,pe)],xy);var HJ=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},nh=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}},Wh=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};class J2{constructor(e,t){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=kp.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return Wh(this,void 0,void 0,function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const n=this._providers[this._providerRenameIdx];if(!n.resolveRenameLocation)break;let o=yield n.resolveRenameLocation(this.model,this.position,e);if(!!o){if(o.rejectReason){t.push(o.rejectReason);continue}return o}}const i=this.model.getWordAtPosition(this.position);return i?{range:new y(this.position.lineNumber,i.startColumn,this.position.lineNumber,i.endColumn),text:i.word,rejectReason:t.length>0?t.join(`
|
|
717
717
|
`):void 0}:{range:y.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(`
|
|
718
718
|
`):void 0}})}provideRenameEdits(e,t){return Wh(this,void 0,void 0,function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)})}_provideRenameEdits(e,t,i,n){return Wh(this,void 0,void 0,function*(){const o=this._providers[t];if(!o)return{edits:[],rejectReason:i.join(`
|
|
719
|
-
`)};const r=yield o.provideRenameEdits(this.model,this.position,e,n);if(r){if(r.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(r.rejectReason),n)}else return this._provideRenameEdits(e,t+1,i.concat(m("no result","No result.")),n);return r})}}function zJ(s,e,t){return Wh(this,void 0,void 0,function*(){const i=new J2(s,e),n=yield i.resolveRenameLocation(Oe.None);return n!=null&&n.rejectReason?{edits:[],rejectReason:n.rejectReason}:i.provideRenameEdits(t,Oe.None)})}let fd=class eP{constructor(e,t,i,n,o,r,a){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=o,this._logService=r,this._configService=a,this._dispoableStore=new X,this._cts=new tn,this._renameInputField=this._dispoableStore.add(new yh(()=>this._dispoableStore.add(this._instaService.createInstance(xy,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(e){return e.getContribution(eP.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}run(){return Wh(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const e=this.editor.getPosition(),t=new J2(this.editor.getModel(),e);if(!t.hasProvider())return;this._cts=new vf(this.editor,5);let i;try{const h=t.resolveRenameLocation(this._cts.token);this._progressService.showWhile(h,250),i=yield h}catch(h){Fn.get(this.editor).showMessage(h||m("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),e);return}if(!i)return;if(i.rejectReason){Fn.get(this.editor).showMessage(i.rejectReason,e);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new vf(this.editor,5,i.range);let n=this.editor.getSelection(),o=0,r=i.text.length;!y.isEmpty(n)&&!y.spansMultipleLines(n)&&y.containsRange(i.range,n)&&(o=Math.max(0,n.startColumn-i.range.startColumn),r=Math.min(i.range.endColumn,n.endColumn)-i.range.startColumn);const a=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),l=yield this._renameInputField.value.getInput(i.range,i.text,o,r,a,this._cts.token);if(typeof l=="boolean"){l&&this.editor.focus();return}this.editor.focus();const d=tT(t.provideRenameEdits(l.newName,this._cts.token),this._cts.token).then(h=>Wh(this,void 0,void 0,function*(){if(!(!h||!this.editor.hasModel())){if(h.rejectReason){this._notificationService.info(h.rejectReason);return}this._bulkEditService.apply(lb.convert(h),{editor:this.editor,showPreview:l.wantsPreview,label:m("label","Renaming '{0}'",i==null?void 0:i.text),quotableLabel:m("quotableLabel","Renaming {0}",i==null?void 0:i.text)}).then(c=>{c.ariaSummary&&bi(m("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",i.text,l.newName,c.ariaSummary))}).catch(c=>{this._notificationService.error(m("rename.failedApply","Rename failed to apply edits")),this._logService.error(c)})}}),h=>{this._notificationService.error(m("rename.failed","Rename failed to compute edits")),this._logService.error(h)});return this._progressService.showWhile(d,250),d})}acceptRenameInput(e){this._renameInputField.value.acceptInput(e)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};fd.ID="editor.contrib.renameController";fd=HJ([nh(1,Ue),nh(2,Gt),nh(3,fL),nh(4,Fr),nh(5,Or),nh(6,rL)],fd);class UJ extends ne{constructor(){super({id:"editor.action.rename",label:m("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:J.and(k.writable,k.hasRenameProvider),kbOpts:{kbExpr:k.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(Ge),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return he.isUri(n)&&P.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(r=>{!r||(r.setPosition(o),r.invokeWithinContext(a=>(this.reportTelemetry(a,r),this.run(a,r))))},be):super.runCommand(e,t)}run(e,t){const i=fd.get(t);return i?i.run():Promise.resolve()}}Ze(fd.ID,fd);Q(UJ);const px=Li.bindToContribution(fd.get);Y(new px({id:"acceptRenameInput",precondition:kC,handler:s=>s.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:k.focus,primary:3}}));Y(new px({id:"acceptRenameInputWithPreview",precondition:J.and(kC,J.has("config.editor.rename.enablePreview")),handler:s=>s.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:k.focus,primary:1024+3}}));Y(new px({id:"cancelRenameInput",precondition:kC,handler:s=>s.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:k.focus,primary:9,secondary:[1033]}}));Pr("_executeDocumentRenameProvider",function(s,e,...t){const[i]=t;return tt(typeof i=="string"),zJ(s,e,i)});Vt.as(vd.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:m("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});class $J{provideSelectionRanges(e,t){const i=[];for(const n of t){const o=[];i.push(o),this._addInWordRanges(o,e,n),this._addWordRanges(o,e,n),this._addWhitespaceLine(o,e,n),o.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;let{word:o,startColumn:r}=n,a=i.column-r,l=a,d=a,h=0;for(;l>=0;l--){let c=o.charCodeAt(l);if(l!==a&&(c===95||c===45))break;if(fr(c)&&Os(h))break;h=c}for(l+=1;d<o.length;d++){let c=o.charCodeAt(d);if(Os(c)&&fr(h))break;if(c===95||c===45)break;h=c}l<d&&e.push({range:new y(i.lineNumber,r+l,i.lineNumber,r+d)})}_addWordRanges(e,t,i){const n=t.getWordAtPosition(i);n&&e.push({range:new y(i.lineNumber,n.startColumn,i.lineNumber,n.endColumn)})}_addWhitespaceLine(e,t,i){t.getLineLength(i.lineNumber)>0&&t.getLineFirstNonWhitespaceColumn(i.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(i.lineNumber)===0&&e.push({range:new y(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var _x=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};class bx{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new bx(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}class _c{constructor(e){this._editor=e,this._ignoreSelection=!1}static get(e){return e.getContribution(_c.ID)}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}run(e){return _x(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(!tb.has(i)||(this._state||(yield iP(i,t.map(o=>o.getPosition()),this._editor.getOption(101),Oe.None).then(o=>{var r;if(!(!pn(o)||o.length!==t.length)&&!(!this._editor.hasModel()||!Cs(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;a<o.length;a++)o[a]=o[a].filter(l=>l.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),o[a].unshift(t[a]);this._state=o.map(a=>new bx(0,a)),(r=this._selectionListener)===null||r===void 0||r.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)===null||a===void 0||a.dispose(),this._state=void 0)})}})),!this._state))return;this._state=this._state.map(o=>o.mov(e));const n=this._state.map(o=>ee.fromPositions(o.ranges[o.index].getStartPosition(),o.ranges[o.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}})}}_c.ID="editor.contrib.smartSelectController";class tP extends ne{constructor(e,t){super(t),this._forward=e}run(e,t){return _x(this,void 0,void 0,function*(){let i=_c.get(t);i&&(yield i.run(this._forward))})}}class jJ extends tP{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:m("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:k.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:se.MenubarSelectionMenu,group:"1_basic",title:m({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}We.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class KJ extends tP{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:m("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:k.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:se.MenubarSelectionMenu,group:"1_basic",title:m({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}Ze(_c.ID,_c);Q(jJ);Q(KJ);tb.register("*",new $J);function iP(s,e,t,i){return _x(this,void 0,void 0,function*(){const n=tb.all(s);n.length===1&&n.unshift(new Dn);let o=[],r=[];for(const a of n)o.push(Promise.resolve(a.provideSelectionRanges(s,e,i)).then(l=>{if(pn(l)&&l.length===e.length)for(let d=0;d<e.length;d++){r[d]||(r[d]=[]);for(const h of l[d])y.isIRange(h.range)&&y.containsPosition(h.range,e[d])&&r[d].push(y.lift(h.range))}},fi));return yield Promise.all(o),r.map(a=>{if(a.length===0)return[];a.sort((c,u)=>P.isBefore(c.getStartPosition(),u.getStartPosition())?1:P.isBefore(u.getStartPosition(),c.getStartPosition())||P.isBefore(c.getEndPosition(),u.getEndPosition())?-1:P.isBefore(u.getEndPosition(),c.getEndPosition())?1:0);let l=[],d;for(const c of a)(!d||y.containsRange(c,d)&&!y.equalsRange(c,d))&&(l.push(c),d=c);if(!t.selectLeadingAndTrailingWhitespace)return l;let h=[l[0]];for(let c=1;c<l.length;c++){const u=l[c-1],f=l[c];if(f.startLineNumber!==u.startLineNumber||f.endLineNumber!==u.endLineNumber){const g=new y(u.startLineNumber,s.getLineFirstNonWhitespaceColumn(u.startLineNumber),u.endLineNumber,s.getLineLastNonWhitespaceColumn(u.endLineNumber));g.containsRange(u)&&!g.equalsRange(u)&&f.containsRange(g)&&!f.equalsRange(g)&&h.push(g);const p=new y(u.startLineNumber,1,u.endLineNumber,s.getLineMaxColumn(u.endLineNumber));p.containsRange(u)&&!p.equalsRange(g)&&f.containsRange(p)&&!f.equalsRange(p)&&h.push(p)}h.push(f)}return h})})}q3("_executeSelectionRangeProvider",function(s,...e){const[t]=e;return iP(s,t,{selectLeadingAndTrailingWhitespace:!0},Oe.None)});class qJ extends ne{constructor(){super({id:"editor.action.toggleHighContrast",label:dS.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(Id);this._originalThemeName?(i.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=i.getColorTheme().themeName,i.setTheme("hc-black"))}}Q(qJ);class GJ extends ne{constructor(){super({id:"editor.action.transposeLetters",label:m("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:k.writable,kbOpts:{kbExpr:k.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],o=t.getSelections();for(let r of o){if(!r.isEmpty())continue;let a=r.startLineNumber,l=r.startColumn,d=i.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&d===2))continue;let h=l===d?r.getPosition():je.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),c=je.leftPosition(i,h),u=je.leftPosition(i,c),f=i.getValueInRange(y.fromPositions(u,c)),g=i.getValueInRange(y.fromPositions(c,h)),p=y.fromPositions(u,h);n.push(new mi(p,g+f))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}Q(GJ);var ZJ=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},MN=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}},YJ=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};const nP="ignoreUnusualLineTerminators";function XJ(s,e,t){s.setModelProperty(e.uri,nP,t)}function QJ(s,e){return s.getModelProperty(e.uri,nP)}let Zf=class extends U{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._config=this._editor.getOption(112),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(112)&&(this._config=this._editor.getOption(112),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(n=>{n.isUndoing||this._checkForUnusualLineTerminators()}))}_checkForUnusualLineTerminators(){return YJ(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||QJ(this._codeEditorService,e)===!0||this._editor.getOption(79))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(!(yield this._dialogService.confirm({title:m("unusualLineTerminators.title","Unusual Line Terminators"),message:m("unusualLineTerminators.message","Detected unusual line terminators"),detail:m("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`.",Ls(e.uri)),primaryButton:m("unusualLineTerminators.fix","Remove Unusual Line Terminators"),secondaryButton:m("unusualLineTerminators.ignore","Ignore")})).confirmed){XJ(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};Zf.ID="editor.contrib.unusualLineTerminatorsDetector";Zf=ZJ([MN(1,hg),MN(2,Ge)],Zf);Ze(Zf.ID,Zf);var JJ=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Hw=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};let Yf=class extends U{constructor(e,t,i,n){super(),this._modelService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._tokenizeViewport=new pt(()=>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(o=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(tL.onDidChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._configurationService.onDidChangeConfiguration(o=>{o.affectsConfiguration(fD)&&(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,i=this._outstandingRequests.length;t<i;t++)if(this._outstandingRequests[t]===e){this._outstandingRequests.splice(t,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.hasCompleteSemanticTokens())return;if(!WS(e,this._themeService,this._configurationService)){e.hasSomeSemanticTokens()&&e.setSemanticTokens(null,!1);return}const t=uD(e);if(!t){e.hasSomeSemanticTokens()&&e.setSemanticTokens(null,!1);return}const i=this._modelService.getSemanticTokensProviderStyling(t),n=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(n.map(o=>this._requestRange(e,o,t,i)))}_requestRange(e,t,i,n){const o=e.getVersionId(),r=ui(a=>Promise.resolve(i.provideDocumentRangeSemanticTokens(e,t,a)));return r.then(a=>{!a||e.isDisposed()||e.getVersionId()!==o||e.setPartialSemanticTokens(t,RR(a,n,e.getLanguageIdentifier()))}).then(()=>this._removeOutstandingRequest(r),()=>this._removeOutstandingRequest(r)),r}};Yf.ID="editor.contrib.viewportSemanticTokens";Yf=JJ([Hw(1,Wt),Hw(2,_t),Hw(3,Et)],Yf);Ze(Yf.ID,Yf);var eee=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},tee=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};const iee=M("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},m("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0),nee=M("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},m("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),see=M("editor.wordHighlightBorder",{light:null,dark:null,hc:Fi},m("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),oee=M("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:Fi},m("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),ree=M("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},m("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),aee=M("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},m("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),EC=new oe("hasWordHighlights",!1);function sP(s,e,t){const i=$h.ordered(s);return iT(i.map(n=>()=>Promise.resolve(n.provideDocumentHighlights(s,e,t)).then(void 0,fi)),pn)}class oP{constructor(e,t,i){this._wordRange=this._getCurrentWordRange(e,t),this.result=ui(n=>this._compute(e,t,i,n))}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new y(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,o=t.startColumn,r=t.endColumn,a=this._getCurrentWordRange(e,t);let l=Boolean(this._wordRange&&this._wordRange.equalsRange(a));for(let d=0,h=i.length;!l&&d<h;d++){let c=e.getDecorationRange(i[d]);c&&c.startLineNumber===n&&c.startColumn<=o&&c.endColumn>=r&&(l=!0)}return l}cancel(){this.result.cancel()}}class lee extends oP{_compute(e,t,i,n){return sP(e,t.getPosition(),n).then(o=>o||[])}}class dee extends oP{constructor(e,t,i){super(e,t,i),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,n){return _a(250,n).then(()=>{if(!t.isEmpty())return[];const o=e.getWordAtPosition(t.getPosition());return!o||o.word.length>1e3?[]:e.findMatches(o.word,!0,!1,!0,i,!1).map(a=>({range:a.range,kind:Gu.Text}))})}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty!==n?!1:super.isValid(e,t,i)}}function hee(s,e,t){return $h.has(s)?new lee(s,e,t):new dee(s,e,t)}Pr("_executeDocumentHighlights",(s,e)=>sP(s,e,Oe.None));class Ac{constructor(e,t){this.toUnhook=new X,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=EC.bindTo(t),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(70),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(i=>{this._ignorePositionChangeEvent||!this.occurrencesHighlight||this._onPositionChanged(i)})),this.toUnhook.add(e.onDidChangeModelContent(i=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(i=>{let n=this.editor.getOption(70);this.occurrencesHighlight!==n&&(this.occurrencesHighlight=n,this._stopAll())})),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){!this.occurrencesHighlight||this._run()}_getSortedHighlights(){return bd(this._decorationIds.map(e=>this.model.getDecorationRange(e)).sort(y.compareRangesUsingStarts))}moveNext(){let e=this._getSortedHighlights(),i=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const o=this._getWord();if(o){const r=this.editor.getModel().getLineContent(n.startLineNumber);bi(`${r}, ${i+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),i=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const o=this._getWord();if(o){const r=this.editor.getModel().getLineContent(n.startLineNumber);bi(`${r}, ${i+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(!this.occurrencesHighlight){this._stopAll();return}if(e.reason!==3){this._stopAll();return}this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}let t=e.startColumn,i=e.endColumn;const n=this._getWord();if(!n||n.startColumn>t||n.endColumn<i){this._stopAll();return}const o=this.workerRequest&&this.workerRequest.isValid(this.model,e,this._decorationIds);if(this.lastCursorPositionChangeTime=new Date().getTime(),o)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();let r=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=hee(this.model,this.editor.getSelection(),this.editor.getOption(115)),this.workerRequest.result.then(a=>{r===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},be)}}_beginRenderDecorations(){let e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;let e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:Ac._getDecorationOptions(t.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,e),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(e){return e===Gu.Write?this._WRITE_OPTIONS:e===Gu.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}Ac._WRITE_OPTIONS=Le.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Ui(aee),position:On.Center}});Ac._TEXT_OPTIONS=Le.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Ui(XM),position:On.Center}});Ac._REGULAR_OPTIONS=Le.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Ui(ree),position:On.Center}});let gd=class rP extends U{constructor(e,t){super(),this.wordHighlighter=null;const i=()=>{e.hasModel()&&(this.wordHighlighter=new Ac(e,t))};this._register(e.onDidChangeModel(n=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),i()})),i()}static get(e){return e.getContribution(rP.ID)}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};gd.ID="editor.contrib.wordHighlighter";gd=eee([tee(1,pe)],gd);class aP extends ne{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=gd.get(t);!i||(this._isNext?i.moveNext():i.moveBack())}}class cee extends aP{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:m("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:EC,kbOpts:{kbExpr:k.editorTextFocus,primary:65,weight:100}})}}class uee extends aP{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:m("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:EC,kbOpts:{kbExpr:k.editorTextFocus,primary:1089,weight:100}})}}class fee extends ne{constructor(){super({id:"editor.action.wordHighlight.trigger",label:m("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:EC.toNegated(),kbOpts:{kbExpr:k.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=gd.get(t);!n||n.restoreViewState(!0)}}Ze(gd.ID,gd);Q(cee);Q(uee);Q(fee);Je((s,e)=>{const t=s.getColor(UL);t&&(e.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${t}; }`),e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`));const i=s.getColor(iee);i&&e.addRule(`.monaco-editor .wordHighlight { background-color: ${i}; }`);const n=s.getColor(nee);n&&e.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${n}; }`);const o=s.getColor(KV);o&&e.addRule(`.monaco-editor .selectionHighlight { border: 1px ${s.type==="hc"?"dotted":"solid"} ${o}; box-sizing: border-box; }`);const r=s.getColor(see);r&&e.addRule(`.monaco-editor .wordHighlight { border: 1px ${s.type==="hc"?"dashed":"solid"} ${r}; box-sizing: border-box; }`);const a=s.getColor(oee);a&&e.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${s.type==="hc"?"dashed":"solid"} ${a}; box-sizing: border-box; }`)});class NC extends Li{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=Qn(t.getOption(115)),o=t.getModel(),a=t.getSelections().map(l=>{const d=new P(l.positionLineNumber,l.positionColumn),h=this._move(n,o,d,this._wordNavigationType);return this._moveTo(l,h,this._inSelectionMode)});if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>Ie.fromModelSelection(l))),a.length===1){const l=new P(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,i){return i?new ee(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new ee(t.lineNumber,t.column,t.lineNumber,t.column)}}class $a extends NC{_move(e,t,i,n){return Ve.moveWordLeft(e,t,i,n)}}class ja extends NC{_move(e,t,i,n){return Ve.moveWordRight(e,t,i,n)}}class gee extends $a{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class mee extends $a{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class pee extends $a{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:J.and(k.textInputFocus,(e=J.and(dg,Vb))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class _ee extends $a{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class bee extends $a{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class Cee extends $a{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:J.and(k.textInputFocus,(e=J.and(dg,Vb))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class vee extends $a{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move(Qn(Xs.wordSeparators.defaultValue),t,i,n)}}class wee extends $a{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move(Qn(Xs.wordSeparators.defaultValue),t,i,n)}}class See extends ja{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class yee extends ja{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:J.and(k.textInputFocus,(e=J.and(dg,Vb))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class Lee extends ja{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class Dee extends ja{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class xee extends ja{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:J.and(k.textInputFocus,(e=J.and(dg,Vb))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class Iee extends ja{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class kee extends ja{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move(Qn(Xs.wordSeparators.defaultValue),t,i,n)}}class Eee extends ja{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move(Qn(Xs.wordSeparators.defaultValue),t,i,n)}}class TC extends Li{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=Qn(t.getOption(115)),o=t.getModel(),r=t.getSelections(),a=t.getOption(5),l=t.getOption(8),d=ye.getAutoClosingPairs(o.getLanguageIdentifier().id),h=t._getViewModel(),c=r.map(u=>{const f=this._delete({wordSeparators:n,model:o,selection:u,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(6),autoClosingBrackets:a,autoClosingQuotes:l,autoClosingPairs:d,autoClosedCharacters:h.getCursorAutoClosedCharacters()},this._wordNavigationType);return new mi(f,"")});t.pushUndoStop(),t.executeCommands(this.id,c),t.pushUndoStop()}}class Cx extends TC{_delete(e,t){let i=Ve.deleteWordLeft(e,t);return i||new y(1,1,1,1)}}class vx extends TC{_delete(e,t){let i=Ve.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new y(n,o,n,o)}}class Nee extends Cx{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:k.writable})}}class Tee extends Cx{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:k.writable})}}class Mee extends Cx{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:k.writable,kbOpts:{kbExpr:k.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class Ree extends vx{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:k.writable})}}class Aee extends vx{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:k.writable})}}class Oee extends vx{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:k.writable,kbOpts:{kbExpr:k.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class Pee extends ne{constructor(){super({id:"deleteInsideWord",precondition:k.writable,label:m("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=Qn(t.getOption(115)),o=t.getModel(),a=t.getSelections().map(l=>{const d=Ve.deleteInsideWord(n,o,l);return new mi(d,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}Y(new gee);Y(new mee);Y(new pee);Y(new _ee);Y(new bee);Y(new Cee);Y(new See);Y(new yee);Y(new Lee);Y(new Dee);Y(new xee);Y(new Iee);Y(new vee);Y(new wee);Y(new kee);Y(new Eee);Y(new Nee);Y(new Tee);Y(new Mee);Y(new Ree);Y(new Aee);Y(new Oee);Q(Pee);class Fee extends TC{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:k.writable,kbOpts:{kbExpr:k.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let i=Eb.deleteWordPartLeft(e);return i||new y(1,1,1,1)}}class Bee extends TC{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:k.writable,kbOpts:{kbExpr:k.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let i=Eb.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new y(n,o,n,o)}}class lP extends NC{_move(e,t,i,n){return Eb.moveWordPartLeft(e,t,i)}}class Wee extends lP{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:k.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}We.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class Vee extends lP{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:k.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}We.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class dP extends NC{_move(e,t,i,n){return Eb.moveWordPartRight(e,t,i)}}class Hee extends dP{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:k.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class zee extends dP{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:k.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}Y(new Fee);Y(new Bee);Y(new Wee);Y(new Vee);Y(new Hee);Y(new zee);const Uee="modulepreload",$ee=function(s){return"/ide/"+s},RN={},jee=function(e,t,i){return!t||t.length===0?e():Promise.all(t.map(n=>{if(n=$ee(n),n in RN)return;RN[n]=!0;const o=n.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${r}`))return;const a=document.createElement("link");if(a.rel=o?"stylesheet":Uee,o||(a.as="script",a.crossOrigin=""),a.href=n,document.head.appendChild(a),o)return new Promise((l,d)=>{a.addEventListener("load",l),a.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>e())};var hP={},zw={},Kee=function(){function s(e){var t=this;this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(function(i,n){t._lazyLoadPromiseResolve=i,t._lazyLoadPromiseReject=n})}return s.getOrCreate=function(e){return zw[e]||(zw[e]=new s(e)),zw[e]},s.prototype.whenLoaded=function(){return this._lazyLoadPromise},s.prototype.load=function(){var e=this;return this._loadingTriggered||(this._loadingTriggered=!0,hP[this._languageId].loader().then(function(t){return e._lazyLoadPromiseResolve(t)},function(t){return e._lazyLoadPromiseReject(t)})),this._lazyLoadPromise},s}();function qee(s){var e=s.id;hP[e]=s,ia.register(s);var t=Kee.getOrCreate(e);ia.setMonarchTokensProvider(e,t.whenLoaded().then(function(i){return i.language})),ia.onLanguage(e,function(){t.load().then(function(i){ia.setLanguageConfiguration(e,i.conf)})})}qee({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:function(){return jee(()=>Promise.resolve().then(()=>Yee),void 0)}});function Eie(){return new Worker("/ide/assets/editor.worker.7a4cf0fa.js")}var Gee={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:ia.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:ia.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:ia.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:ia.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},Zee={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","package","private","protected","public","override","readonly","require","global","return","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};const Yee=Object.freeze(Object.defineProperty({__proto__:null,conf:Gee,language:Zee},Symbol.toStringTag,{value:"Module"}));export{Xf as K,Eie as W,jee as _,Qee as a,wh as b,vP as c,Rte as d,Ote as e,Ate as f,Xee as g,ia as l};
|
|
719
|
+
`)};const r=yield o.provideRenameEdits(this.model,this.position,e,n);if(r){if(r.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(r.rejectReason),n)}else return this._provideRenameEdits(e,t+1,i.concat(m("no result","No result.")),n);return r})}}function zJ(s,e,t){return Wh(this,void 0,void 0,function*(){const i=new J2(s,e),n=yield i.resolveRenameLocation(Oe.None);return n!=null&&n.rejectReason?{edits:[],rejectReason:n.rejectReason}:i.provideRenameEdits(t,Oe.None)})}let fd=class eP{constructor(e,t,i,n,o,r,a){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=o,this._logService=r,this._configService=a,this._dispoableStore=new X,this._cts=new tn,this._renameInputField=this._dispoableStore.add(new yh(()=>this._dispoableStore.add(this._instaService.createInstance(xy,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(e){return e.getContribution(eP.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}run(){return Wh(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const e=this.editor.getPosition(),t=new J2(this.editor.getModel(),e);if(!t.hasProvider())return;this._cts=new vf(this.editor,5);let i;try{const h=t.resolveRenameLocation(this._cts.token);this._progressService.showWhile(h,250),i=yield h}catch(h){Fn.get(this.editor).showMessage(h||m("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),e);return}if(!i)return;if(i.rejectReason){Fn.get(this.editor).showMessage(i.rejectReason,e);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new vf(this.editor,5,i.range);let n=this.editor.getSelection(),o=0,r=i.text.length;!y.isEmpty(n)&&!y.spansMultipleLines(n)&&y.containsRange(i.range,n)&&(o=Math.max(0,n.startColumn-i.range.startColumn),r=Math.min(i.range.endColumn,n.endColumn)-i.range.startColumn);const a=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),l=yield this._renameInputField.value.getInput(i.range,i.text,o,r,a,this._cts.token);if(typeof l=="boolean"){l&&this.editor.focus();return}this.editor.focus();const d=tT(t.provideRenameEdits(l.newName,this._cts.token),this._cts.token).then(h=>Wh(this,void 0,void 0,function*(){if(!(!h||!this.editor.hasModel())){if(h.rejectReason){this._notificationService.info(h.rejectReason);return}this._bulkEditService.apply(lb.convert(h),{editor:this.editor,showPreview:l.wantsPreview,label:m("label","Renaming '{0}'",i==null?void 0:i.text),quotableLabel:m("quotableLabel","Renaming {0}",i==null?void 0:i.text)}).then(c=>{c.ariaSummary&&bi(m("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",i.text,l.newName,c.ariaSummary))}).catch(c=>{this._notificationService.error(m("rename.failedApply","Rename failed to apply edits")),this._logService.error(c)})}}),h=>{this._notificationService.error(m("rename.failed","Rename failed to compute edits")),this._logService.error(h)});return this._progressService.showWhile(d,250),d})}acceptRenameInput(e){this._renameInputField.value.acceptInput(e)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};fd.ID="editor.contrib.renameController";fd=HJ([nh(1,Ue),nh(2,Gt),nh(3,fL),nh(4,Fr),nh(5,Or),nh(6,rL)],fd);class UJ extends ne{constructor(){super({id:"editor.action.rename",label:m("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:J.and(k.writable,k.hasRenameProvider),kbOpts:{kbExpr:k.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(Ge),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return he.isUri(n)&&P.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(r=>{!r||(r.setPosition(o),r.invokeWithinContext(a=>(this.reportTelemetry(a,r),this.run(a,r))))},be):super.runCommand(e,t)}run(e,t){const i=fd.get(t);return i?i.run():Promise.resolve()}}Ze(fd.ID,fd);Q(UJ);const px=Li.bindToContribution(fd.get);Y(new px({id:"acceptRenameInput",precondition:kC,handler:s=>s.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:k.focus,primary:3}}));Y(new px({id:"acceptRenameInputWithPreview",precondition:J.and(kC,J.has("config.editor.rename.enablePreview")),handler:s=>s.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:k.focus,primary:1024+3}}));Y(new px({id:"cancelRenameInput",precondition:kC,handler:s=>s.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:k.focus,primary:9,secondary:[1033]}}));Pr("_executeDocumentRenameProvider",function(s,e,...t){const[i]=t;return tt(typeof i=="string"),zJ(s,e,i)});Vt.as(vd.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:m("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});class $J{provideSelectionRanges(e,t){const i=[];for(const n of t){const o=[];i.push(o),this._addInWordRanges(o,e,n),this._addWordRanges(o,e,n),this._addWhitespaceLine(o,e,n),o.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;let{word:o,startColumn:r}=n,a=i.column-r,l=a,d=a,h=0;for(;l>=0;l--){let c=o.charCodeAt(l);if(l!==a&&(c===95||c===45))break;if(fr(c)&&Os(h))break;h=c}for(l+=1;d<o.length;d++){let c=o.charCodeAt(d);if(Os(c)&&fr(h))break;if(c===95||c===45)break;h=c}l<d&&e.push({range:new y(i.lineNumber,r+l,i.lineNumber,r+d)})}_addWordRanges(e,t,i){const n=t.getWordAtPosition(i);n&&e.push({range:new y(i.lineNumber,n.startColumn,i.lineNumber,n.endColumn)})}_addWhitespaceLine(e,t,i){t.getLineLength(i.lineNumber)>0&&t.getLineFirstNonWhitespaceColumn(i.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(i.lineNumber)===0&&e.push({range:new y(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var _x=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};class bx{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new bx(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}class _c{constructor(e){this._editor=e,this._ignoreSelection=!1}static get(e){return e.getContribution(_c.ID)}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}run(e){return _x(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(!tb.has(i)||(this._state||(yield iP(i,t.map(o=>o.getPosition()),this._editor.getOption(101),Oe.None).then(o=>{var r;if(!(!pn(o)||o.length!==t.length)&&!(!this._editor.hasModel()||!Cs(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;a<o.length;a++)o[a]=o[a].filter(l=>l.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),o[a].unshift(t[a]);this._state=o.map(a=>new bx(0,a)),(r=this._selectionListener)===null||r===void 0||r.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)===null||a===void 0||a.dispose(),this._state=void 0)})}})),!this._state))return;this._state=this._state.map(o=>o.mov(e));const n=this._state.map(o=>ee.fromPositions(o.ranges[o.index].getStartPosition(),o.ranges[o.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}})}}_c.ID="editor.contrib.smartSelectController";class tP extends ne{constructor(e,t){super(t),this._forward=e}run(e,t){return _x(this,void 0,void 0,function*(){let i=_c.get(t);i&&(yield i.run(this._forward))})}}class jJ extends tP{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:m("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:k.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:se.MenubarSelectionMenu,group:"1_basic",title:m({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}We.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class KJ extends tP{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:m("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:k.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:se.MenubarSelectionMenu,group:"1_basic",title:m({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}Ze(_c.ID,_c);Q(jJ);Q(KJ);tb.register("*",new $J);function iP(s,e,t,i){return _x(this,void 0,void 0,function*(){const n=tb.all(s);n.length===1&&n.unshift(new Dn);let o=[],r=[];for(const a of n)o.push(Promise.resolve(a.provideSelectionRanges(s,e,i)).then(l=>{if(pn(l)&&l.length===e.length)for(let d=0;d<e.length;d++){r[d]||(r[d]=[]);for(const h of l[d])y.isIRange(h.range)&&y.containsPosition(h.range,e[d])&&r[d].push(y.lift(h.range))}},fi));return yield Promise.all(o),r.map(a=>{if(a.length===0)return[];a.sort((c,u)=>P.isBefore(c.getStartPosition(),u.getStartPosition())?1:P.isBefore(u.getStartPosition(),c.getStartPosition())||P.isBefore(c.getEndPosition(),u.getEndPosition())?-1:P.isBefore(u.getEndPosition(),c.getEndPosition())?1:0);let l=[],d;for(const c of a)(!d||y.containsRange(c,d)&&!y.equalsRange(c,d))&&(l.push(c),d=c);if(!t.selectLeadingAndTrailingWhitespace)return l;let h=[l[0]];for(let c=1;c<l.length;c++){const u=l[c-1],f=l[c];if(f.startLineNumber!==u.startLineNumber||f.endLineNumber!==u.endLineNumber){const g=new y(u.startLineNumber,s.getLineFirstNonWhitespaceColumn(u.startLineNumber),u.endLineNumber,s.getLineLastNonWhitespaceColumn(u.endLineNumber));g.containsRange(u)&&!g.equalsRange(u)&&f.containsRange(g)&&!f.equalsRange(g)&&h.push(g);const p=new y(u.startLineNumber,1,u.endLineNumber,s.getLineMaxColumn(u.endLineNumber));p.containsRange(u)&&!p.equalsRange(g)&&f.containsRange(p)&&!f.equalsRange(p)&&h.push(p)}h.push(f)}return h})})}q3("_executeSelectionRangeProvider",function(s,...e){const[t]=e;return iP(s,t,{selectLeadingAndTrailingWhitespace:!0},Oe.None)});class qJ extends ne{constructor(){super({id:"editor.action.toggleHighContrast",label:dS.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(Id);this._originalThemeName?(i.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=i.getColorTheme().themeName,i.setTheme("hc-black"))}}Q(qJ);class GJ extends ne{constructor(){super({id:"editor.action.transposeLetters",label:m("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:k.writable,kbOpts:{kbExpr:k.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],o=t.getSelections();for(let r of o){if(!r.isEmpty())continue;let a=r.startLineNumber,l=r.startColumn,d=i.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&d===2))continue;let h=l===d?r.getPosition():je.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),c=je.leftPosition(i,h),u=je.leftPosition(i,c),f=i.getValueInRange(y.fromPositions(u,c)),g=i.getValueInRange(y.fromPositions(c,h)),p=y.fromPositions(u,h);n.push(new mi(p,g+f))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}Q(GJ);var ZJ=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},MN=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}},YJ=globalThis&&globalThis.__awaiter||function(s,e,t,i){function n(o){return o instanceof t?o:new t(function(r){r(o)})}return new(t||(t=Promise))(function(o,r){function a(h){try{d(i.next(h))}catch(c){r(c)}}function l(h){try{d(i.throw(h))}catch(c){r(c)}}function d(h){h.done?o(h.value):n(h.value).then(a,l)}d((i=i.apply(s,e||[])).next())})};const nP="ignoreUnusualLineTerminators";function XJ(s,e,t){s.setModelProperty(e.uri,nP,t)}function QJ(s,e){return s.getModelProperty(e.uri,nP)}let Zf=class extends U{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._config=this._editor.getOption(112),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(112)&&(this._config=this._editor.getOption(112),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(n=>{n.isUndoing||this._checkForUnusualLineTerminators()}))}_checkForUnusualLineTerminators(){return YJ(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||QJ(this._codeEditorService,e)===!0||this._editor.getOption(79))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(!(yield this._dialogService.confirm({title:m("unusualLineTerminators.title","Unusual Line Terminators"),message:m("unusualLineTerminators.message","Detected unusual line terminators"),detail:m("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`.",Ls(e.uri)),primaryButton:m("unusualLineTerminators.fix","Remove Unusual Line Terminators"),secondaryButton:m("unusualLineTerminators.ignore","Ignore")})).confirmed){XJ(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};Zf.ID="editor.contrib.unusualLineTerminatorsDetector";Zf=ZJ([MN(1,hg),MN(2,Ge)],Zf);Ze(Zf.ID,Zf);var JJ=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},Hw=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};let Yf=class extends U{constructor(e,t,i,n){super(),this._modelService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._tokenizeViewport=new pt(()=>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(o=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(tL.onDidChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._configurationService.onDidChangeConfiguration(o=>{o.affectsConfiguration(fD)&&(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,i=this._outstandingRequests.length;t<i;t++)if(this._outstandingRequests[t]===e){this._outstandingRequests.splice(t,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.hasCompleteSemanticTokens())return;if(!WS(e,this._themeService,this._configurationService)){e.hasSomeSemanticTokens()&&e.setSemanticTokens(null,!1);return}const t=uD(e);if(!t){e.hasSomeSemanticTokens()&&e.setSemanticTokens(null,!1);return}const i=this._modelService.getSemanticTokensProviderStyling(t),n=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(n.map(o=>this._requestRange(e,o,t,i)))}_requestRange(e,t,i,n){const o=e.getVersionId(),r=ui(a=>Promise.resolve(i.provideDocumentRangeSemanticTokens(e,t,a)));return r.then(a=>{!a||e.isDisposed()||e.getVersionId()!==o||e.setPartialSemanticTokens(t,RR(a,n,e.getLanguageIdentifier()))}).then(()=>this._removeOutstandingRequest(r),()=>this._removeOutstandingRequest(r)),r}};Yf.ID="editor.contrib.viewportSemanticTokens";Yf=JJ([Hw(1,Wt),Hw(2,_t),Hw(3,Et)],Yf);Ze(Yf.ID,Yf);var eee=globalThis&&globalThis.__decorate||function(s,e,t,i){var n=arguments.length,o=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(s,e,t,i);else for(var a=s.length-1;a>=0;a--)(r=s[a])&&(o=(n<3?r(o):n>3?r(e,t,o):r(e,t))||o);return n>3&&o&&Object.defineProperty(e,t,o),o},tee=globalThis&&globalThis.__param||function(s,e){return function(t,i){e(t,i,s)}};const iee=M("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},m("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0),nee=M("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},m("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),see=M("editor.wordHighlightBorder",{light:null,dark:null,hc:Fi},m("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),oee=M("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:Fi},m("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),ree=M("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},m("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),aee=M("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},m("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),EC=new oe("hasWordHighlights",!1);function sP(s,e,t){const i=$h.ordered(s);return iT(i.map(n=>()=>Promise.resolve(n.provideDocumentHighlights(s,e,t)).then(void 0,fi)),pn)}class oP{constructor(e,t,i){this._wordRange=this._getCurrentWordRange(e,t),this.result=ui(n=>this._compute(e,t,i,n))}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new y(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,o=t.startColumn,r=t.endColumn,a=this._getCurrentWordRange(e,t);let l=Boolean(this._wordRange&&this._wordRange.equalsRange(a));for(let d=0,h=i.length;!l&&d<h;d++){let c=e.getDecorationRange(i[d]);c&&c.startLineNumber===n&&c.startColumn<=o&&c.endColumn>=r&&(l=!0)}return l}cancel(){this.result.cancel()}}class lee extends oP{_compute(e,t,i,n){return sP(e,t.getPosition(),n).then(o=>o||[])}}class dee extends oP{constructor(e,t,i){super(e,t,i),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,n){return _a(250,n).then(()=>{if(!t.isEmpty())return[];const o=e.getWordAtPosition(t.getPosition());return!o||o.word.length>1e3?[]:e.findMatches(o.word,!0,!1,!0,i,!1).map(a=>({range:a.range,kind:Gu.Text}))})}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty!==n?!1:super.isValid(e,t,i)}}function hee(s,e,t){return $h.has(s)?new lee(s,e,t):new dee(s,e,t)}Pr("_executeDocumentHighlights",(s,e)=>sP(s,e,Oe.None));class Ac{constructor(e,t){this.toUnhook=new X,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=EC.bindTo(t),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(70),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(i=>{this._ignorePositionChangeEvent||!this.occurrencesHighlight||this._onPositionChanged(i)})),this.toUnhook.add(e.onDidChangeModelContent(i=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(i=>{let n=this.editor.getOption(70);this.occurrencesHighlight!==n&&(this.occurrencesHighlight=n,this._stopAll())})),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){!this.occurrencesHighlight||this._run()}_getSortedHighlights(){return bd(this._decorationIds.map(e=>this.model.getDecorationRange(e)).sort(y.compareRangesUsingStarts))}moveNext(){let e=this._getSortedHighlights(),i=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const o=this._getWord();if(o){const r=this.editor.getModel().getLineContent(n.startLineNumber);bi(`${r}, ${i+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),i=(e.findIndex(o=>o.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const o=this._getWord();if(o){const r=this.editor.getModel().getLineContent(n.startLineNumber);bi(`${r}, ${i+1} of ${e.length} for '${o.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(!this.occurrencesHighlight){this._stopAll();return}if(e.reason!==3){this._stopAll();return}this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}let t=e.startColumn,i=e.endColumn;const n=this._getWord();if(!n||n.startColumn>t||n.endColumn<i){this._stopAll();return}const o=this.workerRequest&&this.workerRequest.isValid(this.model,e,this._decorationIds);if(this.lastCursorPositionChangeTime=new Date().getTime(),o)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();let r=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=hee(this.model,this.editor.getSelection(),this.editor.getOption(115)),this.workerRequest.result.then(a=>{r===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},be)}}_beginRenderDecorations(){let e=new Date().getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},t-e)}renderDecorations(){this.renderDecorationsTimer=-1;let e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:Ac._getDecorationOptions(t.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,e),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(e){return e===Gu.Write?this._WRITE_OPTIONS:e===Gu.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}Ac._WRITE_OPTIONS=Le.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:Ui(aee),position:On.Center}});Ac._TEXT_OPTIONS=Le.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:Ui(XM),position:On.Center}});Ac._REGULAR_OPTIONS=Le.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:Ui(ree),position:On.Center}});let gd=class rP extends U{constructor(e,t){super(),this.wordHighlighter=null;const i=()=>{e.hasModel()&&(this.wordHighlighter=new Ac(e,t))};this._register(e.onDidChangeModel(n=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),i()})),i()}static get(e){return e.getContribution(rP.ID)}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};gd.ID="editor.contrib.wordHighlighter";gd=eee([tee(1,pe)],gd);class aP extends ne{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=gd.get(t);!i||(this._isNext?i.moveNext():i.moveBack())}}class cee extends aP{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:m("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:EC,kbOpts:{kbExpr:k.editorTextFocus,primary:65,weight:100}})}}class uee extends aP{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:m("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:EC,kbOpts:{kbExpr:k.editorTextFocus,primary:1089,weight:100}})}}class fee extends ne{constructor(){super({id:"editor.action.wordHighlight.trigger",label:m("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:EC.toNegated(),kbOpts:{kbExpr:k.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=gd.get(t);!n||n.restoreViewState(!0)}}Ze(gd.ID,gd);Q(cee);Q(uee);Q(fee);Je((s,e)=>{const t=s.getColor(UL);t&&(e.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${t}; }`),e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`));const i=s.getColor(iee);i&&e.addRule(`.monaco-editor .wordHighlight { background-color: ${i}; }`);const n=s.getColor(nee);n&&e.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${n}; }`);const o=s.getColor(KV);o&&e.addRule(`.monaco-editor .selectionHighlight { border: 1px ${s.type==="hc"?"dotted":"solid"} ${o}; box-sizing: border-box; }`);const r=s.getColor(see);r&&e.addRule(`.monaco-editor .wordHighlight { border: 1px ${s.type==="hc"?"dashed":"solid"} ${r}; box-sizing: border-box; }`);const a=s.getColor(oee);a&&e.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${s.type==="hc"?"dashed":"solid"} ${a}; box-sizing: border-box; }`)});class NC extends Li{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=Qn(t.getOption(115)),o=t.getModel(),a=t.getSelections().map(l=>{const d=new P(l.positionLineNumber,l.positionColumn),h=this._move(n,o,d,this._wordNavigationType);return this._moveTo(l,h,this._inSelectionMode)});if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>Ie.fromModelSelection(l))),a.length===1){const l=new P(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,i){return i?new ee(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new ee(t.lineNumber,t.column,t.lineNumber,t.column)}}class $a extends NC{_move(e,t,i,n){return Ve.moveWordLeft(e,t,i,n)}}class ja extends NC{_move(e,t,i,n){return Ve.moveWordRight(e,t,i,n)}}class gee extends $a{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class mee extends $a{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class pee extends $a{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:J.and(k.textInputFocus,(e=J.and(dg,Vb))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class _ee extends $a{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class bee extends $a{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class Cee extends $a{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:J.and(k.textInputFocus,(e=J.and(dg,Vb))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class vee extends $a{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move(Qn(Xs.wordSeparators.defaultValue),t,i,n)}}class wee extends $a{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move(Qn(Xs.wordSeparators.defaultValue),t,i,n)}}class See extends ja{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class yee extends ja{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:J.and(k.textInputFocus,(e=J.and(dg,Vb))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class Lee extends ja{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class Dee extends ja{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class xee extends ja{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:J.and(k.textInputFocus,(e=J.and(dg,Vb))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class Iee extends ja{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class kee extends ja{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move(Qn(Xs.wordSeparators.defaultValue),t,i,n)}}class Eee extends ja{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move(Qn(Xs.wordSeparators.defaultValue),t,i,n)}}class TC extends Li{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=Qn(t.getOption(115)),o=t.getModel(),r=t.getSelections(),a=t.getOption(5),l=t.getOption(8),d=ye.getAutoClosingPairs(o.getLanguageIdentifier().id),h=t._getViewModel(),c=r.map(u=>{const f=this._delete({wordSeparators:n,model:o,selection:u,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(6),autoClosingBrackets:a,autoClosingQuotes:l,autoClosingPairs:d,autoClosedCharacters:h.getCursorAutoClosedCharacters()},this._wordNavigationType);return new mi(f,"")});t.pushUndoStop(),t.executeCommands(this.id,c),t.pushUndoStop()}}class Cx extends TC{_delete(e,t){let i=Ve.deleteWordLeft(e,t);return i||new y(1,1,1,1)}}class vx extends TC{_delete(e,t){let i=Ve.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new y(n,o,n,o)}}class Nee extends Cx{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:k.writable})}}class Tee extends Cx{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:k.writable})}}class Mee extends Cx{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:k.writable,kbOpts:{kbExpr:k.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class Ree extends vx{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:k.writable})}}class Aee extends vx{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:k.writable})}}class Oee extends vx{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:k.writable,kbOpts:{kbExpr:k.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class Pee extends ne{constructor(){super({id:"deleteInsideWord",precondition:k.writable,label:m("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=Qn(t.getOption(115)),o=t.getModel(),a=t.getSelections().map(l=>{const d=Ve.deleteInsideWord(n,o,l);return new mi(d,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}Y(new gee);Y(new mee);Y(new pee);Y(new _ee);Y(new bee);Y(new Cee);Y(new See);Y(new yee);Y(new Lee);Y(new Dee);Y(new xee);Y(new Iee);Y(new vee);Y(new wee);Y(new kee);Y(new Eee);Y(new Nee);Y(new Tee);Y(new Mee);Y(new Ree);Y(new Aee);Y(new Oee);Q(Pee);class Fee extends TC{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:k.writable,kbOpts:{kbExpr:k.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let i=Eb.deleteWordPartLeft(e);return i||new y(1,1,1,1)}}class Bee extends TC{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:k.writable,kbOpts:{kbExpr:k.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let i=Eb.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new y(n,o,n,o)}}class lP extends NC{_move(e,t,i,n){return Eb.moveWordPartLeft(e,t,i)}}class Wee extends lP{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:k.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}We.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class Vee extends lP{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:k.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}We.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class dP extends NC{_move(e,t,i,n){return Eb.moveWordPartRight(e,t,i)}}class Hee extends dP{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:k.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class zee extends dP{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:k.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}Y(new Fee);Y(new Bee);Y(new Wee);Y(new Vee);Y(new Hee);Y(new zee);const Uee="modulepreload",$ee=function(s){return"/ide/"+s},RN={},jee=function(e,t,i){return!t||t.length===0?e():Promise.all(t.map(n=>{if(n=$ee(n),n in RN)return;RN[n]=!0;const o=n.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${r}`))return;const a=document.createElement("link");if(a.rel=o?"stylesheet":Uee,o||(a.as="script",a.crossOrigin=""),a.href=n,document.head.appendChild(a),o)return new Promise((l,d)=>{a.addEventListener("load",l),a.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>e())};var hP={},zw={},Kee=function(){function s(e){var t=this;this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(function(i,n){t._lazyLoadPromiseResolve=i,t._lazyLoadPromiseReject=n})}return s.getOrCreate=function(e){return zw[e]||(zw[e]=new s(e)),zw[e]},s.prototype.whenLoaded=function(){return this._lazyLoadPromise},s.prototype.load=function(){var e=this;return this._loadingTriggered||(this._loadingTriggered=!0,hP[this._languageId].loader().then(function(t){return e._lazyLoadPromiseResolve(t)},function(t){return e._lazyLoadPromiseReject(t)})),this._lazyLoadPromise},s}();function qee(s){var e=s.id;hP[e]=s,ia.register(s);var t=Kee.getOrCreate(e);ia.setMonarchTokensProvider(e,t.whenLoaded().then(function(i){return i.language})),ia.onLanguage(e,function(){t.load().then(function(i){ia.setLanguageConfiguration(e,i.conf)})})}qee({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:function(){return jee(()=>Promise.resolve().then(()=>Yee),void 0)}});function kie(){return new Worker("/ide/assets/editor.worker.7a4cf0fa.js")}var Gee={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:ia.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:ia.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:ia.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:ia.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},Zee={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","package","private","protected","public","override","readonly","require","global","return","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};const Yee=Object.freeze(Object.defineProperty({__proto__:null,conf:Gee,language:Zee},Symbol.toStringTag,{value:"Module"}));export{Xf as K,kie as W,jee as _,wh as a,Mte as b,Rte as c,Ate as e,ia as l};
|