({model:y,index:m},_)
| 624 | | KEY '=~' REGEX |
| 625 | | KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){const K=this._peek();switch(K.type){case 17:case 18:return this._advance(),K.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(K){return K.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(K){return this._check(K)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(K,R){if(this._check(K))return this._advance();throw this._errExpectedButGot(R,this._peek())}_errExpectedButGot(K,R,J){const ie=(0,y.localize)(1522,`Expected: {0} |
| 626 | Received: '{1}'.`,K,I.Scanner.getLexeme(R)),ue=R.offset,he=I.Scanner.getLexeme(R);return this._parsingErrors.push({message:ie,offset:ue,lexeme:he,additionalInfo:J}),l._parseError}_check(K){return this._peek().type===K}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}}e.Parser=l;class a{static false(){return C.INSTANCE}static true(){return f.INSTANCE}static has(K){return h.create(K)}static equals(K,R){return v.create(K,R)}static notEquals(K,R){return L.create(K,R)}static regex(K,R){return O.create(K,R)}static in(K,R){return w.create(K,R)}static notIn(K,R){return S.create(K,R)}static not(K){return D.create(K)}static and(...K){return W.create(K,null,!0)}static or(...K){return V.create(K,null,!0)}static{this._parser=new l({regexParsingWithErrorRecovery:!1})}static deserialize(K){return K==null?void 0:this._parser.parse(K)}}e.ContextKeyExpr=a;function r(G,K){const R=G?G.substituteConstants():void 0,J=K?K.substituteConstants():void 0;return!R&&!J?!0:!R||!J?!1:R.equals(J)}function u(G,K){return G.cmp(K)}class C{static{this.INSTANCE=new C}constructor(){this.type=0}cmp(K){return this.type-K.type}equals(K){return K.type===this.type}substituteConstants(){return this}evaluate(K){return!1}serialize(){return"false"}keys(){return[]}negate(){return f.INSTANCE}}e.ContextKeyFalseExpr=C;class f{static{this.INSTANCE=new f}constructor(){this.type=1}cmp(K){return this.type-K.type}equals(K){return K.type===this.type}substituteConstants(){return this}evaluate(K){return!0}serialize(){return"true"}keys(){return[]}negate(){return C.INSTANCE}}e.ContextKeyTrueExpr=f;class h{static create(K,R=null){const J=m.get(K);return typeof J=="boolean"?J?f.INSTANCE:C.INSTANCE:new h(K,R)}constructor(K,R){this.key=K,this.negated=R,this.type=2}cmp(K){return K.type!==this.type?this.type-K.type:H(this.key,K.key)}equals(K){return K.type===this.type?this.key===K.key:!1}substituteConstants(){const K=m.get(this.key);return typeof K=="boolean"?K?f.INSTANCE:C.INSTANCE:this}evaluate(K){return!!K.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=D.create(this.key,this)),this.negated}}e.ContextKeyDefinedExpr=h;class v{static create(K,R,J=null){if(typeof R=="boolean")return R?h.create(K,J):D.create(K,J);const ie=m.get(K);return typeof ie=="boolean"?R===(ie?"true":"false")?f.INSTANCE:C.INSTANCE:new v(K,R,J)}constructor(K,R,J){this.key=K,this.value=R,this.negated=J,this.type=4}cmp(K){return K.type!==this.type?this.type-K.type:z(this.key,this.value,K.key,K.value)}equals(K){return K.type===this.type?this.key===K.key&&this.value===K.value:!1}substituteConstants(){const K=m.get(this.key);if(typeof K=="boolean"){const R=K?"true":"false";return this.value===R?f.INSTANCE:C.INSTANCE}return this}evaluate(K){return K.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=L.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=v;class w{static create(K,R){return new w(K,R)}constructor(K,R){this.key=K,this.valueKey=R,this.type=10,this.negated=null}cmp(K){return K.type!==this.type?this.type-K.type:z(this.key,this.valueKey,K.key,K.valueKey)}equals(K){return K.type===this.type?this.key===K.key&&this.valueKey===K.valueKey:!1}substituteConstants(){return this}evaluate(K){const R=K.getValue(this.valueKey),J=K.getValue(this.key);return Array.isArray(R)?R.includes(J):typeof J=="string"&&typeof R=="object"&&R!==null?_.call(R,J):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=S.create(this.key,this.valueKey)),this.negated}}e.ContextKeyInExpr=w;class S{static create(K,R){return new S(K,R)}constructor(K,R){this.key=K,this.valueKey=R,this.type=11,this._negated=w.create(K,R)}cmp(K){return K.type!==this.type?this.type-K.type:this._negated.cmp(K._negated)}equals(K){return K.type===this.type?this._negated.equals(K._negated):!1}substituteConstants(){return this}evaluate(K){return!this._negated.evaluate(K)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}e.ContextKeyNotInExpr=S;class L{static create(K,R,J=null){if(typeof R=="boolean")return R?D.create(K,J):h.create(K,J);const ie=m.get(K);return typeof ie=="boolean"?R===(ie?"true":"false")?C.INSTANCE:f.INSTANCE:new L(K,R,J)}constructor(K,R,J){this.key=K,this.value=R,this.negated=J,this.type=5}cmp(K){return K.type!==this.type?this.type-K.type:z(this.key,this.value,K.key,K.value)}equals(K){return K.type===this.type?this.key===K.key&&this.value===K.value:!1}substituteConstants(){const K=m.get(this.key);if(typeof K=="boolean"){const R=K?"true":"false";return this.value===R?C.INSTANCE:f.INSTANCE}return this}evaluate(K){return K.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=L;class D{static create(K,R=null){const J=m.get(K);return typeof J=="boolean"?J?C.INSTANCE:f.INSTANCE:new D(K,R)}constructor(K,R){this.key=K,this.negated=R,this.type=3}cmp(K){return K.type!==this.type?this.type-K.type:H(this.key,K.key)}equals(K){return K.type===this.type?this.key===K.key:!1}substituteConstants(){const K=m.get(this.key);return typeof K=="boolean"?K?C.INSTANCE:f.INSTANCE:this}evaluate(K){return!K.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this)),this.negated}}e.ContextKeyNotExpr=D;function T(G,K){if(typeof G=="string"){const R=parseFloat(G);isNaN(R)||(G=R)}return typeof G=="string"||typeof G=="number"?K(G):C.INSTANCE}class M{static create(K,R,J=null){return T(R,ie=>new M(K,ie,J))}constructor(K,R,J){this.key=K,this.value=R,this.negated=J,this.type=12}cmp(K){return K.type!==this.type?this.type-K.type:z(this.key,this.value,K.key,K.value)}equals(K){return K.type===this.type?this.key===K.key&&this.value===K.value:!1}substituteConstants(){return this}evaluate(K){return typeof this.value=="string"?!1:parseFloat(K.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=N.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=M;class A{static create(K,R,J=null){return T(R,ie=>new A(K,ie,J))}constructor(K,R,J){this.key=K,this.value=R,this.negated=J,this.type=13}cmp(K){return K.type!==this.type?this.type-K.type:z(this.key,this.value,K.key,K.value)}equals(K){return K.type===this.type?this.key===K.key&&this.value===K.value:!1}substituteConstants(){return this}evaluate(K){return typeof this.value=="string"?!1:parseFloat(K.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=A;class P{static create(K,R,J=null){return T(R,ie=>new P(K,ie,J))}constructor(K,R,J){this.key=K,this.value=R,this.negated=J,this.type=14}cmp(K){return K.type!==this.type?this.type-K.type:z(this.key,this.value,K.key,K.value)}equals(K){return K.type===this.type?this.key===K.key&&this.value===K.value:!1}substituteConstants(){return this}evaluate(K){return typeof this.value=="string"?!1:parseFloat(K.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerExpr=P;class N{static create(K,R,J=null){return T(R,ie=>new N(K,ie,J))}constructor(K,R,J){this.key=K,this.value=R,this.negated=J,this.type=15}cmp(K){return K.type!==this.type?this.type-K.type:z(this.key,this.value,K.key,K.value)}equals(K){return K.type===this.type?this.key===K.key&&this.value===K.value:!1}substituteConstants(){return this}evaluate(K){return typeof this.value=="string"?!1:parseFloat(K.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=M.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerEqualsExpr=N;class O{static create(K,R){return new O(K,R)}constructor(K,R){this.key=K,this.regexp=R,this.type=7,this.negated=null}cmp(K){if(K.type!==this.type)return this.type-K.type;if(this.key<K.key)return-1;if(this.key>K.key)return 1;const R=this.regexp?this.regexp.source:"",J=K.regexp?K.regexp.source:"";return R<J?-1:R>J?1:0}equals(K){if(K.type===this.type){const R=this.regexp?this.regexp.source:"",J=K.regexp?K.regexp.source:"";return this.key===K.key&&R===J}return!1}substituteConstants(){return this}evaluate(K){const R=K.getValue(this.key);return this.regexp?this.regexp.test(R):!1}serialize(){const K=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${K}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=F.create(this)),this.negated}}e.ContextKeyRegexExpr=O;class F{static create(K){return new F(K)}constructor(K){this._actual=K,this.type=8}cmp(K){return K.type!==this.type?this.type-K.type:this._actual.cmp(K._actual)}equals(K){return K.type===this.type?this._actual.equals(K._actual):!1}substituteConstants(){return this}evaluate(K){return!this._actual.evaluate(K)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}e.ContextKeyNotRegexExpr=F;function x(G){let K=null;for(let R=0,J=G.length;R<J;R++){const ie=G[R].substituteConstants();if(G[R]!==ie&&K===null){K=[];for(let ue=0;ue<R;ue++)K[ue]=G[ue]}K!==null&&(K[R]=ie)}return K===null?G:K}class W{static create(K,R,J){return W._normalizeArr(K,R,J)}constructor(K,R){this.expr=K,this.negated=R,this.type=6}cmp(K){if(K.type!==this.type)return this.type-K.type;if(this.expr.length<K.expr.length)return-1;if(this.expr.length>K.expr.length)return 1;for(let R=0,J=this.expr.length;R<J;R++){const ie=u(this.expr[R],K.expr[R]);if(ie!==0)return ie}return 0}equals(K){if(K.type===this.type){if(this.expr.length!==K.expr.length)return!1;for(let R=0,J=this.expr.length;R<J;R++)if(!this.expr[R].equals(K.expr[R]))return!1;return!0}return!1}substituteConstants(){const K=x(this.expr);return K===this.expr?this:W.create(K,this.negated,!1)}evaluate(K){for(let R=0,J=this.expr.length;R<J;R++)if(!this.expr[R].evaluate(K))return!1;return!0}static _normalizeArr(K,R,J){const ie=[];let ue=!1;for(const he of K)if(he){if(he.type===1){ue=!0;continue}if(he.type===0)return C.INSTANCE;if(he.type===6){ie.push(...he.expr);continue}ie.push(he)}if(ie.length===0&&ue)return f.INSTANCE;if(ie.length!==0){if(ie.length===1)return ie[0];ie.sort(u);for(let he=1;he<ie.length;he++)ie[he-1].equals(ie[he])&&(ie.splice(he,1),he--);if(ie.length===1)return ie[0];for(;ie.length>1;){const he=ie[ie.length-1];if(he.type!==9)break;ie.pop();const pe=ie.pop(),ae=ie.length===0,ee=V.create(he.expr.map(de=>W.create([de,pe],null,J)),null,ae);ee&&(ie.push(ee),ie.sort(u))}if(ie.length===1)return ie[0];if(J){for(let he=0;he<ie.length;he++)for(let pe=he+1;pe<ie.length;pe++)if(ie[he].negate().equals(ie[pe]))return C.INSTANCE;if(ie.length===1)return ie[0]}return new W(ie,R)}}serialize(){return this.expr.map(K=>K.serialize()).join(" && ")}keys(){const K=[];for(const R of this.expr)K.push(...R.keys());return K}negate(){if(!this.negated){const K=[];for(const R of this.expr)K.push(R.negate());this.negated=V.create(K,this,!0)}return this.negated}}e.ContextKeyAndExpr=W;class V{static create(K,R,J){return V._normalizeArr(K,R,J)}constructor(K,R){this.expr=K,this.negated=R,this.type=9}cmp(K){if(K.type!==this.type)return this.type-K.type;if(this.expr.length<K.expr.length)return-1;if(this.expr.length>K.expr.length)return 1;for(let R=0,J=this.expr.length;R<J;R++){const ie=u(this.expr[R],K.expr[R]);if(ie!==0)return ie}return 0}equals(K){if(K.type===this.type){if(this.expr.length!==K.expr.length)return!1;for(let R=0,J=this.expr.length;R<J;R++)if(!this.expr[R].equals(K.expr[R]))return!1;return!0}return!1}substituteConstants(){const K=x(this.expr);return K===this.expr?this:V.create(K,this.negated,!1)}evaluate(K){for(let R=0,J=this.expr.length;R<J;R++)if(this.expr[R].evaluate(K))return!0;return!1}static _normalizeArr(K,R,J){let ie=[],ue=!1;if(K){for(let he=0,pe=K.length;he<pe;he++){const ae=K[he];if(ae){if(ae.type===0){ue=!0;continue}if(ae.type===1)return f.INSTANCE;if(ae.type===9){ie=ie.concat(ae.expr);continue}ie.push(ae)}}if(ie.length===0&&ue)return C.INSTANCE;ie.sort(u)}if(ie.length!==0){if(ie.length===1)return ie[0];for(let he=1;he<ie.length;he++)ie[he-1].equals(ie[he])&&(ie.splice(he,1),he--);if(ie.length===1)return ie[0];if(J){for(let he=0;he<ie.length;he++)for(let pe=he+1;pe<ie.length;pe++)if(ie[he].negate().equals(ie[pe]))return f.INSTANCE;if(ie.length===1)return ie[0]}return new V(ie,R)}}serialize(){return this.expr.map(K=>K.serialize()).join(" || ")}keys(){const K=[];for(const R of this.expr)K.push(...R.keys());return K}negate(){if(!this.negated){const K=[];for(const R of this.expr)K.push(R.negate());for(;K.length>1;){const R=K.shift(),J=K.shift(),ie=[];for(const ue of Y(R))for(const he of Y(J))ie.push(W.create([ue,he],null,!1));K.unshift(V.create(ie,null,!1))}this.negated=V.create(K,this,!0)}return this.negated}}e.ContextKeyOrExpr=V;class q extends h{static{this._info=[]}static all(){return q._info.values()}constructor(K,R,J){super(K,null),this._defaultValue=R,typeof J=="object"?q._info.push({...J,key:K}):J!==!0&&q._info.push({key:K,description:J,type:R!=null?typeof R:void 0})}bindTo(K){return K.createKey(this.key,this._defaultValue)}getValue(K){return K.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(K){return v.create(this.key,K)}}e.RawContextKey=q,e.IContextKeyService=(0,E.createDecorator)("contextKeyService");function H(G,K){return G<K?-1:G>K?1:0}function z(G,K,R,J){return G<R?-1:G>R?1:K<J?-1:K>J?1:0}function U(G,K){if(G.type===0||K.type===1)return!0;if(G.type===9)return K.type===9?j(G.expr,K.expr):!1;if(K.type===9){for(const R of K.expr)if(U(G,R))return!0;return!1}if(G.type===6){if(K.type===6)return j(K.expr,G.expr);for(const R of G.expr)if(U(R,K))return!0;return!1}return G.equals(K)}function j(G,K){let R=0,J=0;for(;R<G.length&&J<K.length;){const ie=G[R].cmp(K[J]);if(ie<0)return!1;ie===0&&R++,J++}return R===G.length}function Y(G){return G.type===9?G.expr:[G]}}),define(ne[20],se([1,0,3,12]),function(oe,e,d,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorContextKeys=void 0;var I;(function(E){E.editorSimpleInput=new k.RawContextKey("editorSimpleInput",!1,!0),E.editorTextFocus=new k.RawContextKey("editorTextFocus",!1,d.localize(622,"Whether the editor text has focus (cursor is blinking)")),E.focus=new k.RawContextKey("editorFocus",!1,d.localize(623,"Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),E.textInputFocus=new k.RawContextKey("textInputFocus",!1,d.localize(624,"Whether an editor or a rich text input has focus (cursor is blinking)")),E.readOnly=new k.RawContextKey("editorReadonly",!1,d.localize(625,"Whether the editor is read-only")),E.inDiffEditor=new k.RawContextKey("inDiffEditor",!1,d.localize(626,"Whether the context is a diff editor")),E.isEmbeddedDiffEditor=new k.RawContextKey("isEmbeddedDiffEditor",!1,d.localize(627,"Whether the context is an embedded diff editor")),E.inMultiDiffEditor=new k.RawContextKey("inMultiDiffEditor",!1,d.localize(628,"Whether the context is a multi diff editor")),E.multiDiffEditorAllCollapsed=new k.RawContextKey("multiDiffEditorAllCollapsed",void 0,d.localize(629,"Whether all files in multi diff editor are collapsed")),E.hasChanges=new k.RawContextKey("diffEditorHasChanges",!1,d.localize(630,"Whether the diff editor has changes")),E.comparingMovedCode=new k.RawContextKey("comparingMovedCode",!1,d.localize(631,"Whether a moved code block is selected for comparison")),E.accessibleDiffViewerVisible=new k.RawContextKey("accessibleDiffViewerVisible",!1,d.localize(632,"Whether the accessible diff viewer is visible")),E.diffEditorRenderSideBySideInlineBreakpointReached=new k.RawContextKey("diffEditorRenderSideBySideInlineBreakpointReached",!1,d.localize(633,"Whether the diff editor render side by side inline breakpoint is reached")),E.diffEditorInlineMode=new k.RawContextKey("diffEditorInlineMode",!1,d.localize(634,"Whether inline mode is active")),E.diffEditorOriginalWritable=new k.RawContextKey("diffEditorOriginalWritable",!1,d.localize(635,"Whether modified is writable in the diff editor")),E.diffEditorModifiedWritable=new k.RawContextKey("diffEditorModifiedWritable",!1,d.localize(636,"Whether modified is writable in the diff editor")),E.diffEditorOriginalUri=new k.RawContextKey("diffEditorOriginalUri","",d.localize(637,"The uri of the original document")),E.diffEditorModifiedUri=new k.RawContextKey("diffEditorModifiedUri","",d.localize(638,"The uri of the modified document")),E.columnSelection=new k.RawContextKey("editorColumnSelection",!1,d.localize(639,"Whether `editor.columnSelection` is enabled")),E.writable=E.readOnly.toNegated(),E.hasNonEmptySelection=new k.RawContextKey("editorHasSelection",!1,d.localize(640,"Whether the editor has text selected")),E.hasOnlyEmptySelection=E.hasNonEmptySelection.toNegated(),E.hasMultipleSelections=new k.RawContextKey("editorHasMultipleSelections",!1,d.localize(641,"Whether the editor has multiple selections")),E.hasSingleSelection=E.hasMultipleSelections.toNegated(),E.tabMovesFocus=new k.RawContextKey("editorTabMovesFocus",!1,d.localize(642,"Whether `Tab` will move focus out of the editor")),E.tabDoesNotMoveFocus=E.tabMovesFocus.toNegated(),E.isInEmbeddedEditor=new k.RawContextKey("isInEmbeddedEditor",!1,!0),E.canUndo=new k.RawContextKey("canUndo",!1,!0),E.canRedo=new k.RawContextKey("canRedo",!1,!0),E.hoverVisible=new k.RawContextKey("editorHoverVisible",!1,d.localize(643,"Whether the editor hover is visible")),E.hoverFocused=new k.RawContextKey("editorHoverFocused",!1,d.localize(644,"Whether the editor hover is focused")),E.stickyScrollFocused=new k.RawContextKey("stickyScrollFocused",!1,d.localize(645,"Whether the sticky scroll is focused")),E.stickyScrollVisible=new k.RawContextKey("stickyScrollVisible",!1,d.localize(646,"Whether the sticky scroll is visible")),E.standaloneColorPickerVisible=new k.RawContextKey("standaloneColorPickerVisible",!1,d.localize(647,"Whether the standalone color picker is visible")),E.standaloneColorPickerFocused=new k.RawContextKey("standaloneColorPickerFocused",!1,d.localize(648,"Whether the standalone color picker is focused")),E.inCompositeEditor=new k.RawContextKey("inCompositeEditor",void 0,d.localize(649,"Whether the editor is part of a larger editor (e.g. notebooks)")),E.notInCompositeEditor=E.inCompositeEditor.toNegated(),E.languageId=new k.RawContextKey("editorLangId","",d.localize(650,"The language identifier of the editor")),E.hasCompletionItemProvider=new k.RawContextKey("editorHasCompletionItemProvider",!1,d.localize(651,"Whether the editor has a completion item provider")),E.hasCodeActionsProvider=new k.RawContextKey("editorHasCodeActionsProvider",!1,d.localize(652,"Whether the editor has a code actions provider")),E.hasCodeLensProvider=new k.RawContextKey("editorHasCodeLensProvider",!1,d.localize(653,"Whether the editor has a code lens provider")),E.hasDefinitionProvider=new k.RawContextKey("editorHasDefinitionProvider",!1,d.localize(654,"Whether the editor has a definition provider")),E.hasDeclarationProvider=new k.RawContextKey("editorHasDeclarationProvider",!1,d.localize(655,"Whether the editor has a declaration provider")),E.hasImplementationProvider=new k.RawContextKey("editorHasImplementationProvider",!1,d.localize(656,"Whether the editor has an implementation provider")),E.hasTypeDefinitionProvider=new k.RawContextKey("editorHasTypeDefinitionProvider",!1,d.localize(657,"Whether the editor has a type definition provider")),E.hasHoverProvider=new k.RawContextKey("editorHasHoverProvider",!1,d.localize(658,"Whether the editor has a hover provider")),E.hasDocumentHighlightProvider=new k.RawContextKey("editorHasDocumentHighlightProvider",!1,d.localize(659,"Whether the editor has a document highlight provider")),E.hasDocumentSymbolProvider=new k.RawContextKey("editorHasDocumentSymbolProvider",!1,d.localize(660,"Whether the editor has a document symbol provider")),E.hasReferenceProvider=new k.RawContextKey("editorHasReferenceProvider",!1,d.localize(661,"Whether the editor has a reference provider")),E.hasRenameProvider=new k.RawContextKey("editorHasRenameProvider",!1,d.localize(662,"Whether the editor has a rename provider")),E.hasSignatureHelpProvider=new k.RawContextKey("editorHasSignatureHelpProvider",!1,d.localize(663,"Whether the editor has a signature help provider")),E.hasInlayHintsProvider=new k.RawContextKey("editorHasInlayHintsProvider",!1,d.localize(664,"Whether the editor has an inline hints provider")),E.hasDocumentFormattingProvider=new k.RawContextKey("editorHasDocumentFormattingProvider",!1,d.localize(665,"Whether the editor has a document formatting provider")),E.hasDocumentSelectionFormattingProvider=new k.RawContextKey("editorHasDocumentSelectionFormattingProvider",!1,d.localize(666,"Whether the editor has a document selection formatting provider")),E.hasMultipleDocumentFormattingProvider=new k.RawContextKey("editorHasMultipleDocumentFormattingProvider",!1,d.localize(667,"Whether the editor has multiple document formatting providers")),E.hasMultipleDocumentSelectionFormattingProvider=new k.RawContextKey("editorHasMultipleDocumentSelectionFormattingProvider",!1,d.localize(668,"Whether the editor has multiple document selection formatting providers"))})(I||(e.EditorContextKeys=I={}))}),define(ne[269],se([1,0,21,11,94,12,2,3]),function(oe,e,d,k,I,E,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionContextKeys=void 0;class _ extends y.Disposable{static{this.inlineSuggestionVisible=new E.RawContextKey("inlineSuggestionVisible",!1,(0,m.localize)(1084,"Whether an inline suggestion is visible"))}static{this.inlineSuggestionHasIndentation=new E.RawContextKey("inlineSuggestionHasIndentation",!1,(0,m.localize)(1085,"Whether the inline suggestion starts with whitespace"))}static{this.inlineSuggestionHasIndentationLessThanTabSize=new E.RawContextKey("inlineSuggestionHasIndentationLessThanTabSize",!0,(0,m.localize)(1086,"Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab"))}static{this.suppressSuggestions=new E.RawContextKey("inlineSuggestionSuppressSuggestions",void 0,(0,m.localize)(1087,"Whether suggestions should be suppressed for the current suggestion"))}constructor(p,n){super(),this.contextKeyService=p,this.model=n,this.inlineCompletionVisible=_.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=_.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=_.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService),this.suppressSuggestions=_.suppressSuggestions.bindTo(this.contextKeyService),this._register((0,d.autorun)(o=>{const i=this.model.read(o)?.state.read(o),s=!!i?.inlineCompletion&&i?.primaryGhostText!==void 0&&!i?.primaryGhostText.isEmpty();this.inlineCompletionVisible.set(s),i?.primaryGhostText&&i?.inlineCompletion&&this.suppressSuggestions.set(i.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register((0,d.autorun)(o=>{const t=this.model.read(o);let i=!1,s=!0;const g=t?.primaryGhostText.read(o);if(t?.selectedSuggestItem&&g&&g.parts.length>0){const{column:c,lines:l}=g.parts[0],a=l[0],r=t.textModel.getLineIndentColumn(g.lineNumber);if(c<=r){let C=(0,k.firstNonWhitespaceIndex)(a);C===-1&&(C=a.length-1),i=C>0;const f=t.textModel.getOptions().tabSize;s=I.CursorColumns.visibleColumnFromColumn(a,C+1,f)<f}}this.inlineCompletionSuggestsIndentation.set(i),this.inlineCompletionSuggestsIndentationLessThanTabSize.set(s)}))}}e.InlineCompletionContextKeys=_}),define(ne[390],se([1,0,3,12]),function(oe,e,d,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isPinnedContextKey=e.inlineEditVisible=e.showNextInlineEditActionId=e.showPreviousInlineEditActionId=e.inlineEditAcceptId=void 0,e.inlineEditAcceptId="editor.action.inlineEdits.accept",e.showPreviousInlineEditActionId="editor.action.inlineEdits.showPrevious",e.showNextInlineEditActionId="editor.action.inlineEdits.showNext",e.inlineEditVisible=new k.RawContextKey("inlineEditsVisible",!1,(0,d.localize)(1101,"Whether an inline edit is visible")),e.isPinnedContextKey=new k.RawContextKey("inlineEditsIsPinned",!1,(0,d.localize)(1102,"Whether an inline edit is visible"))}),define(ne[270],se([1,0,18,8,19,22,9,27,17,78,24,12]),function(oe,e,d,k,I,E,y,m,_,b,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Context=void 0,e.provideSignatureHelp=o,e.Context={Visible:new n.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new n.RawContextKey("parameterHintsMultipleSignatures",!1)};async function o(t,i,s,g,c){const l=t.ordered(i);for(const a of l)try{const r=await a.provideSignatureHelp(i,s,c,g);if(r)return r}catch(r){(0,k.onUnexpectedExternalError)(r)}}p.CommandsRegistry.registerCommand("_executeSignatureHelpProvider",async(t,...i)=>{const[s,g,c]=i;(0,I.assertType)(E.URI.isUri(s)),(0,I.assertType)(y.Position.isIPosition(g)),(0,I.assertType)(typeof c=="string"||!c);const l=t.get(_.ILanguageFeaturesService),a=await t.get(b.ITextModelService).createModelReference(s);try{const r=await o(l.signatureHelpProvider,a.object.textEditorModel,y.Position.lift(g),{triggerKind:m.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:c},d.CancellationToken.None);return r?(setTimeout(()=>r.dispose(),0),r.value):void 0}finally{a.dispose()}})}),define(ne[683],se([1,0,14,8,6,2,144,27,270]),function(oe,e,d,k,I,E,y,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsModel=void 0;var b;(function(o){o.Default={type:0};class t{constructor(g,c){this.request=g,this.previouslyActiveHints=c,this.type=2}}o.Pending=t;class i{constructor(g){this.hints=g,this.type=1}}o.Active=i})(b||(b={}));class p extends E.Disposable{static{this.DEFAULT_DELAY=120}constructor(t,i,s=p.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new I.Emitter),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=b.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new E.MutableDisposable),this.triggerChars=new y.CharacterSet,this.retriggerChars=new y.CharacterSet,this.triggerId=0,this.editor=t,this.providers=i,this.throttledDelayer=new d.Delayer(s),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(g=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(g=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(g=>this.onCursorChange(g))),this._register(this.editor.onDidChangeModelContent(g=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(g=>this.onDidType(g))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(t){this._state.type===2&&this._state.request.cancel(),this._state=t}cancel(t=!1){this.state=b.Default,this.throttledDelayer.cancel(),t||this._onChangedHints.fire(void 0)}trigger(t,i){const s=this.editor.getModel();if(!s||!this.providers.has(s))return;const g=++this.triggerId;this._pendingTriggers.push(t),this.throttledDelayer.trigger(()=>this.doTrigger(g),i).catch(k.onUnexpectedError)}next(){if(this.state.type!==1)return;const t=this.state.hints.signatures.length,i=this.state.hints.activeSignature,s=i%t===t-1,g=this.editor.getOption(86).cycle;if((t<2||s)&&!g){this.cancel();return}this.updateActiveSignature(s&&g?0:i+1)}previous(){if(this.state.type!==1)return;const t=this.state.hints.signatures.length,i=this.state.hints.activeSignature,s=i===0,g=this.editor.getOption(86).cycle;if((t<2||s)&&!g){this.cancel();return}this.updateActiveSignature(s&&g?t-1:i-1)}updateActiveSignature(t){this.state.type===1&&(this.state=new b.Active({...this.state.hints,activeSignature:t}),this._onChangedHints.fire(this.state.hints))}async doTrigger(t){const i=this.state.type===1||this.state.type===2,s=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const g=this._pendingTriggers.reduce(n);this._pendingTriggers=[];const c={triggerKind:g.triggerKind,triggerCharacter:g.triggerCharacter,isRetrigger:i,activeSignatureHelp:s};if(!this.editor.hasModel())return!1;const l=this.editor.getModel(),a=this.editor.getPosition();this.state=new b.Pending((0,d.createCancelablePromise)(r=>(0,_.provideSignatureHelp)(this.providers,l,a,c,r)),s);try{const r=await this.state.request;return t!==this.triggerId?(r?.dispose(),!1):!r||!r.value.signatures||r.value.signatures.length===0?(r?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new b.Active(r.value),this._lastSignatureHelpResult.value=r,this._onChangedHints.fire(this.state.hints),!0)}catch(r){return t===this.triggerId&&(this.state=b.Default),(0,k.onUnexpectedError)(r),!1}}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const t=this.editor.getModel();if(t)for(const i of this.providers.ordered(t)){for(const s of i.signatureHelpTriggerCharacters||[])if(s.length){const g=s.charCodeAt(0);this.triggerChars.add(g),this.retriggerChars.add(g)}for(const s of i.signatureHelpRetriggerCharacters||[])s.length&&this.retriggerChars.add(s.charCodeAt(0))}}onDidType(t){if(!this.triggerOnType)return;const i=t.length-1,s=t.charCodeAt(i);(this.triggerChars.has(s)||this.isTriggered&&this.retriggerChars.has(s))&&this.trigger({triggerKind:m.SignatureHelpTriggerKind.TriggerCharacter,triggerCharacter:t.charAt(i)})}onCursorChange(t){t.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:m.SignatureHelpTriggerKind.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:m.SignatureHelpTriggerKind.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(86).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}e.ParameterHintsModel=p;function n(o,t){switch(t.triggerKind){case m.SignatureHelpTriggerKind.Invoke:return t;case m.SignatureHelpTriggerKind.ContentChange:return o;case m.SignatureHelpTriggerKind.TriggerCharacter:default:return t}}}),define(ne[684],se([1,0,12]),function(oe,e,d){"use strict";var k;Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestAlternatives=void 0;let I=class{static{k=this}static{this.OtherSuggestions=new d.RawContextKey("hasOtherSuggestions",!1)}constructor(y,m){this._editor=y,this._index=0,this._ckOtherSuggestions=k.OtherSuggestions.bindTo(m)}dispose(){this.reset()}reset(){this._ckOtherSuggestions.reset(),this._listener?.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:y,index:m},_){if(y.items.length===0){this.reset();return}if(k._moveIndex(!0,y,m)===m){this.reset();return}this._acceptNext=_,this._model=y,this._index=m,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(y,m,_){let b=_;for(let p=m.items.length;p>0&&(b=(b+m.items.length+(y?1:-1))%m.items.length,!(b===_||!m.items[b].completion.additionalTextEdits));p--);return b}next(){this._move(!0)}prev(){this._move(!1)}_move(y){if(this._model)try{this._ignore=!0,this._index=k._moveIndex(y,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};e.SuggestAlternatives=I,e.SuggestAlternatives=I=k=ke([ce(1,d.IContextKeyService)],I)}),define(ne[685],se([1,0,12]),function(oe,e,d){"use strict";var k;Object.defineProperty(e,"__esModule",{value:!0}),e.WordContextKey=void 0;let I=class{static{k=this}static{this.AtEnd=new d.RawContextKey("atEndOfWord",!1)}constructor(y,m){this._editor=y,this._enabled=!1,this._ckAtEnd=k.AtEnd.bindTo(m),this._configListener=this._editor.onDidChangeConfiguration(_=>_.hasChanged(124)&&this._update()),this._update()}dispose(){this._configListener.dispose(),this._selectionListener?.dispose(),this._ckAtEnd.reset()}_update(){const y=this._editor.getOption(124)==="on";if(this._enabled!==y)if(this._enabled=y,this._enabled){const m=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const _=this._editor.getModel(),b=this._editor.getSelection(),p=_.getWordAtPosition(b.getStartPosition());if(!p){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(p.endColumn===b.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(m),m()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};e.WordContextKey=I,e.WordContextKey=I=k=ke([ce(1,d.IContextKeyService)],I)}),define(ne[61],se([1,0,12,7]),function(oe,e,d,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=e.IAccessibilityService=void 0,e.IAccessibilityService=(0,k.createDecorator)("accessibilityService"),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=new d.RawContextKey("accessibilityModeEnabled",!1)}),define(ne[686],se([1,0,64,13,6,2,60,16,362,366,546,229,37,165,261,61,5,253]),function(oe,e,d,k,I,E,y,m,_,b,p,n,o,t,i,s,g,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComputedEditorOptions=e.EditorConfiguration=void 0;let l=class extends E.Disposable{constructor(w,S,L,D,T){super(),this._accessibilityService=T,this._onDidChange=this._register(new I.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new I.Emitter),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new o.ComputeOptionsMemory,this.isSimpleWidget=w,this.contextMenuId=S,this._containerObserver=this._register(new _.ElementSizeObserver(D,L.dimension)),this._targetWindowId=(0,g.getWindow)(D).vscodeWindowId,this._rawOptions=h(L),this._validatedOptions=f.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(t.EditorZoom.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(n.TabFocus.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(b.FontMeasurements.onDidChange(()=>this._recomputeOptions())),this._register(c.PixelRatio.getInstance((0,g.getWindow)(D)).onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const w=this._computeOptions(),S=f.checkEquals(this.options,w);S!==null&&(this.options=w,this._onDidChangeFast.fire(S),this._onDidChange.fire(S))}_computeOptions(){const w=this._readEnvConfiguration(),S=i.BareFontInfo.createFromValidatedSettings(this._validatedOptions,w.pixelRatio,this.isSimpleWidget),L=this._readFontInfo(S),D={memory:this._computeOptionsMemory,outerWidth:w.outerWidth,outerHeight:w.outerHeight-this._reservedHeight,fontInfo:L,extraEditorClassName:w.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:w.emptySelectionClipboard,pixelRatio:w.pixelRatio,tabFocusMode:n.TabFocus.getTabFocusMode(),accessibilitySupport:w.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return f.computeOptions(this._validatedOptions,D)}_readEnvConfiguration(){return{extraEditorClassName:r(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:d.isWebKit||d.isFirefox,pixelRatio:c.PixelRatio.getInstance((0,g.getWindowById)(this._targetWindowId,!0).window).value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(w){return b.FontMeasurements.readFontInfo((0,g.getWindowById)(this._targetWindowId,!0).window,w)}getRawOptions(){return this._rawOptions}updateOptions(w){const S=h(w);f.applyUpdate(this._rawOptions,S)&&(this._validatedOptions=f.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(w){this._containerObserver.observe(w)}setIsDominatedByLongLines(w){this._isDominatedByLongLines!==w&&(this._isDominatedByLongLines=w,this._recomputeOptions())}setModelLineCount(w){const S=a(w);this._lineNumbersDigitCount!==S&&(this._lineNumbersDigitCount=S,this._recomputeOptions())}setViewLineCount(w){this._viewLineCount!==w&&(this._viewLineCount=w,this._recomputeOptions())}setReservedHeight(w){this._reservedHeight!==w&&(this._reservedHeight=w,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(w){this._glyphMarginDecorationLaneCount!==w&&(this._glyphMarginDecorationLaneCount=w,this._recomputeOptions())}};e.EditorConfiguration=l,e.EditorConfiguration=l=ke([ce(4,s.IAccessibilityService)],l);function a(v){let w=0;for(;v;)v=Math.floor(v/10),w++;return w||1}function r(){let v="";return!d.isSafari&&!d.isWebkitWebView&&(v+="no-user-select "),d.isSafari&&(v+="no-minimap-shadow ",v+="enable-user-select "),m.isMacintosh&&(v+="mac "),v}class u{constructor(){this._values=[]}_read(w){return this._values[w]}get(w){return this._values[w]}_write(w,S){this._values[w]=S}}class C{constructor(){this._values=[]}_read(w){if(w>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[w]}get(w){return this._read(w)}_write(w,S){this._values[w]=S}}e.ComputedEditorOptions=C;class f{static validateOptions(w){const S=new u;for(const L of o.editorOptionsRegistry){const D=L.name==="_never_"?void 0:w[L.name];S._write(L.id,L.validate(D))}return S}static computeOptions(w,S){const L=new C;for(const D of o.editorOptionsRegistry)L._write(D.id,D.compute(S,L,w._read(D.id)));return L}static _deepEquals(w,S){if(typeof w!="object"||typeof S!="object"||!w||!S)return w===S;if(Array.isArray(w)||Array.isArray(S))return Array.isArray(w)&&Array.isArray(S)?k.equals(w,S):!1;if(Object.keys(w).length!==Object.keys(S).length)return!1;for(const L in w)if(!f._deepEquals(w[L],S[L]))return!1;return!0}static checkEquals(w,S){const L=[];let D=!1;for(const T of o.editorOptionsRegistry){const M=!f._deepEquals(w._read(T.id),S._read(T.id));L[T.id]=M,M&&(D=!0)}return D?new o.ConfigurationChangedEvent(L):null}static applyUpdate(w,S){let L=!1;for(const D of o.editorOptionsRegistry)if(S.hasOwnProperty(D.name)){const T=D.applyUpdate(w[D.name],S[D.name]);w[D.name]=T.newValue,L=L||T.didChange}return L}}function h(v){const w=y.deepClone(v);return(0,p.migrateOptions)(w),w}}),define(ne[687],se([1,0,6,53,2,60,225,22,3,24,28,12]),function(oe,e,d,k,I,E,y,m,_,b,p,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextKeyService=e.AbstractContextKeyService=e.Context=void 0,e.setContext=v;const o="data-keybinding-context";class t{constructor(L,D){this._id=L,this._parent=D,this._value=Object.create(null),this._value._contextId=L}get value(){return{...this._value}}setValue(L,D){return this._value[L]!==D?(this._value[L]=D,!0):!1}removeValue(L){return L in this._value?(delete this._value[L],!0):!1}getValue(L){const D=this._value[L];return typeof D>"u"&&this._parent?this._parent.getValue(L):D}}e.Context=t;class i extends t{static{this.INSTANCE=new i}constructor(){super(-1,null)}setValue(L,D){return!1}removeValue(L){return!1}getValue(L){}}class s extends t{static{this._keyPrefix="config."}constructor(L,D,T){super(L,null),this._configurationService=D,this._values=y.TernarySearchTree.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(M=>{if(M.source===7){const A=Array.from(this._values,([P])=>P);this._values.clear(),T.fire(new l(A))}else{const A=[];for(const P of M.affectedKeys){const N=`config.${P}`,O=this._values.findSuperstr(N);O!==void 0&&(A.push(...k.Iterable.map(O,([F])=>F)),this._values.deleteSuperstr(N)),this._values.has(N)&&(A.push(N),this._values.delete(N))}T.fire(new l(A))}})}dispose(){this._listener.dispose()}getValue(L){if(L.indexOf(s._keyPrefix)!==0)return super.getValue(L);if(this._values.has(L))return this._values.get(L);const D=L.substr(s._keyPrefix.length),T=this._configurationService.getValue(D);let M;switch(typeof T){case"number":case"boolean":case"string":M=T;break;default:Array.isArray(T)?M=JSON.stringify(T):M=T}return this._values.set(L,M),M}setValue(L,D){return super.setValue(L,D)}removeValue(L){return super.removeValue(L)}}class g{constructor(L,D,T){this._service=L,this._key=D,this._defaultValue=T,this.reset()}set(L){this._service.setContext(this._key,L)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class c{constructor(L){this.key=L}affectsSome(L){return L.has(this.key)}allKeysContainedIn(L){return this.affectsSome(L)}}class l{constructor(L){this.keys=L}affectsSome(L){for(const D of this.keys)if(L.has(D))return!0;return!1}allKeysContainedIn(L){return this.keys.every(D=>L.has(D))}}class a{constructor(L){this.events=L}affectsSome(L){for(const D of this.events)if(D.affectsSome(L))return!0;return!1}allKeysContainedIn(L){return this.events.every(D=>D.allKeysContainedIn(L))}}function r(S,L){return S.allKeysContainedIn(new Set(Object.keys(L)))}class u extends I.Disposable{constructor(L){super(),this._onDidChangeContext=this._register(new d.PauseableEmitter({merge:D=>new a(D)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=L}createKey(L,D){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new g(this,L,D)}bufferChangeEvents(L){this._onDidChangeContext.pause();try{L()}finally{this._onDidChangeContext.resume()}}createScoped(L){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new f(this,L)}contextMatchesRules(L){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const D=this.getContextValuesContainer(this._myContextId);return L?L.evaluate(D):!0}getContextKeyValue(L){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(L)}setContext(L,D){if(this._isDisposed)return;const T=this.getContextValuesContainer(this._myContextId);T&&T.setValue(L,D)&&this._onDidChangeContext.fire(new c(L))}removeContext(L){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(L)&&this._onDidChangeContext.fire(new c(L))}getContext(L){return this._isDisposed?i.INSTANCE:this.getContextValuesContainer(h(L))}dispose(){super.dispose(),this._isDisposed=!0}}e.AbstractContextKeyService=u;let C=class extends u{constructor(L){super(0),this._contexts=new Map,this._lastContextId=0;const D=this._register(new s(this._myContextId,L,this._onDidChangeContext));this._contexts.set(this._myContextId,D)}getContextValuesContainer(L){return this._isDisposed?i.INSTANCE:this._contexts.get(L)||i.INSTANCE}createChildContext(L=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const D=++this._lastContextId;return this._contexts.set(D,new t(D,this.getContextValuesContainer(L))),D}disposeContext(L){this._isDisposed||this._contexts.delete(L)}};e.ContextKeyService=C,e.ContextKeyService=C=ke([ce(0,p.IConfigurationService)],C);class f extends u{constructor(L,D){if(super(L.createChildContext()),this._parentChangeListener=this._register(new I.MutableDisposable),this._parent=L,this._updateParentChangeListener(),this._domNode=D,this._domNode.hasAttribute(o)){let T="";this._domNode.classList&&(T=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${T?": "+T:""}`)}this._domNode.setAttribute(o,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(L=>{const T=this._parent.getContextValuesContainer(this._myContextId).value;r(L,T)||this._onDidChangeContext.fire(L)})}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(o),super.dispose())}getContextValuesContainer(L){return this._isDisposed?i.INSTANCE:this._parent.getContextValuesContainer(L)}createChildContext(L=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(L)}disposeContext(L){this._isDisposed||this._parent.disposeContext(L)}}function h(S){for(;S;){if(S.hasAttribute(o)){const L=S.getAttribute(o);return L?parseInt(L,10):NaN}S=S.parentElement}return 0}function v(S,L,D){S.get(n.IContextKeyService).createKey(String(L),w(D))}function w(S){return(0,E.cloneAndChange)(S,L=>{if(typeof L=="object"&&L.$mid===1)return m.URI.revive(L).toString();if(L instanceof m.URI)return L.toString()})}b.CommandsRegistry.registerCommand("_setContext",v),b.CommandsRegistry.registerCommand({id:"getContextKeyInfo",handler(){return[...n.RawContextKey.all()].sort((S,L)=>S.key.localeCompare(L.key))},metadata:{description:(0,_.localize)(1513,"A command that returns information about context keys"),args:[]}}),b.CommandsRegistry.registerCommand("_generateContextKeyInfo",function(){const S=[],L=new Set;for(const D of n.RawContextKey.all())L.has(D.key)||(L.add(D.key),S.push(D));S.sort((D,T)=>D.key.localeCompare(T.key)),console.log(JSON.stringify(S,void 0,2))})}),define(ne[179],se([1,0,16,3,12]),function(oe,e,d,k,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFocusedContext=e.InputFocusedContextKey=e.ProductQualityContext=e.IsDevelopmentContext=e.IsMobileContext=e.IsIOSContext=e.IsMacNativeContext=e.IsWebContext=e.IsWindowsContext=e.IsLinuxContext=e.IsMacContext=void 0,e.IsMacContext=new I.RawContextKey("isMac",d.isMacintosh,(0,k.localize)(1523,"Whether the operating system is macOS")),e.IsLinuxContext=new I.RawContextKey("isLinux",d.isLinux,(0,k.localize)(1524,"Whether the operating system is Linux")),e.IsWindowsContext=new I.RawContextKey("isWindows",d.isWindows,(0,k.localize)(1525,"Whether the operating system is Windows")),e.IsWebContext=new I.RawContextKey("isWeb",d.isWeb,(0,k.localize)(1526,"Whether the platform is a web browser")),e.IsMacNativeContext=new I.RawContextKey("isMacNative",d.isMacintosh&&!d.isWeb,(0,k.localize)(1527,"Whether the operating system is macOS on a non-browser platform")),e.IsIOSContext=new I.RawContextKey("isIOS",d.isIOS,(0,k.localize)(1528,"Whether the operating system is iOS")),e.IsMobileContext=new I.RawContextKey("isMobile",d.isMobile,(0,k.localize)(1529,"Whether the platform is a mobile web browser")),e.IsDevelopmentContext=new I.RawContextKey("isDevelopment",!1,!0),e.ProductQualityContext=new I.RawContextKey("productQualityType","",(0,k.localize)(1530,"Quality type of VS Code")),e.InputFocusedContextKey="inputFocus",e.InputFocusedContext=new I.RawContextKey(e.InputFocusedContextKey,!1,(0,k.localize)(1531,"Whether keyboard focus is inside an input box"))}),define(ne[58],se([1,0,7]),function(oe,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IContextMenuService=e.IContextViewService=void 0,e.IContextViewService=(0,d.createDecorator)("contextViewService"),e.IContextMenuService=(0,d.createDecorator)("contextMenuService")}),define(ne[180],se([1,0,7]),function(oe,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDialogService=void 0,e.IDialogService=(0,d.createDecorator)("dialogService")}),define(ne[271],se([1,0,7]),function(oe,e,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEnvironmentService=void 0,e.IEnvironmentService=(0,d.createDecorator)("environmentService")}),define(ne[118],se([1,0,7,2,28,5]),function(oe,e,d,k,I,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nativeHoverDelegate=e.WorkbenchHoverDelegate=e.IHoverService=void 0,e.IHoverService=(0,d.createDecorator)("hoverService");let y=class extends k.Disposable{get delay(){return this.isInstantlyHovering()?0:this._delay}constructor(_,b,p={},n,o){super(),this.placement=_,this.instantHover=b,this.overrideOptions=p,this.configurationService=n,this.hoverService=o,this.lastHoverHideTime=0,this.timeLimit=200,this.hoverDisposables=this._register(new k.DisposableStore),this._delay=this.configurationService.getValue("workbench.hover.delay"),this._register(this.configurationService.onDidChangeConfiguration(t=>{t.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))}))}showHover(_,b){const p=typeof this.overrideOptions=="function"?this.overrideOptions(_,b):this.overrideOptions;this.hoverDisposables.clear();const n=(0,E.isHTMLElement)(_.target)?[_.target]:_.target.targetElements;for(const t of n)this.hoverDisposables.add((0,E.addStandardDisposableListener)(t,"keydown",i=>{i.equals(9)&&this.hoverService.hideHover()}));const o=(0,E.isHTMLElement)(_.content)?void 0:_.content.toString();return this.hoverService.showHover({..._,...p,persistence:{hideOnKeyDown:!0,...p.persistence},id:o,appearance:{..._.appearance,compact:!0,skipFadeInAnimation:this.isInstantlyHovering(),...p.appearance}},b)}isInstantlyHovering(){return this.instantHover&&Date.now()-this.lastHoverHideTime<this.timeLimit}onDidHideHover(){this.hoverDisposables.clear(),this.instantHover&&(this.lastHoverHideTime=Date.now())}};e.WorkbenchHoverDelegate=y,e.WorkbenchHoverDelegate=y=ke([ce(3,I.IConfigurationService),ce(4,e.IHoverService)],y),e.nativeHoverDelegate={showHover:function(){throw new Error("Native hover function not implemented.")},delay:0,showNativeHover:!0}}),define(ne[154],se([1,0]),function(oe,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class d{constructor(...I){this._entries=new Map;for(const[E,y]of I)this.set(E,y)}set(I,E){const y=this._entries.get(I);return this._entries.set(I,E),y}get(I){return this._entries.get(I)}}e.ServiceCollection=d}),define(ne[688],se([1,0,14,8,2,265,676,7,154,73]),function(oe,e,d,k,I,E,y,m,_,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const p=!1;class n extends Error{constructor(s){super("cyclic dependency between services"),this.message=s.findCycleSlow()??`UNABLE to detect cycle, dumping graph: |
| 627 | ${s.toString()}`}}class o{constructor(s=new _.ServiceCollection,g=!1,c,l=p){this._services=s,this._strict=g,this._parent=c,this._enableTracing=l,this._isDisposed=!1,this._servicesToMaybeDispose=new Set,this._children=new Set,this._activeInstantiations=new Set,this._services.set(m.IInstantiationService,this),this._globalGraph=l?c?._globalGraph??new y.Graph(a=>a):void 0}dispose(){if(!this._isDisposed){this._isDisposed=!0,(0,I.dispose)(this._children),this._children.clear();for(const s of this._servicesToMaybeDispose)(0,I.isDisposable)(s)&&s.dispose();this._servicesToMaybeDispose.clear()}}_throwIfDisposed(){if(this._isDisposed)throw new Error("InstantiationService has been disposed")}createChild(s,g){this._throwIfDisposed();const c=this,l=new class extends o{dispose(){c._children.delete(l),super.dispose()}}(s,this._strict,this,this._enableTracing);return this._children.add(l),g?.add(l),l}invokeFunction(s,...g){this._throwIfDisposed();const c=t.traceInvocation(this._enableTracing,s);let l=!1;try{return s({get:r=>{if(l)throw(0,k.illegalState)("service accessor is only valid during the invocation of its target method");const u=this._getOrCreateServiceInstance(r,c);if(!u)throw new Error(`[invokeFunction] unknown service '${r}'`);return u}},...g)}finally{l=!0,c.stop()}}createInstance(s,...g){this._throwIfDisposed();let c,l;return s instanceof E.SyncDescriptor?(c=t.traceCreation(this._enableTracing,s.ctor),l=this._createInstance(s.ctor,s.staticArguments.concat(g),c)):(c=t.traceCreation(this._enableTracing,s),l=this._createInstance(s,g,c)),c.stop(),l}_createInstance(s,g=[],c){const l=m._util.getServiceDependencies(s).sort((u,C)=>u.index-C.index),a=[];for(const u of l){const C=this._getOrCreateServiceInstance(u.id,c);C||this._throwIfStrict(`[createInstance] ${s.name} depends on UNKNOWN service ${u.id}.`,!1),a.push(C)}const r=l.length>0?l[0].index:g.length;if(g.length!==r){console.trace(`[createInstance] First service dependency of ${s.name} at position ${r+1} conflicts with ${g.length} static arguments`);const u=r-g.length;u>0?g=g.concat(new Array(u)):g=g.slice(0,r)}return Reflect.construct(s,g.concat(a))}_setCreatedServiceInstance(s,g){if(this._services.get(s)instanceof E.SyncDescriptor)this._services.set(s,g);else if(this._parent)this._parent._setCreatedServiceInstance(s,g);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(s){const g=this._services.get(s);return!g&&this._parent?this._parent._getServiceInstanceOrDescriptor(s):g}_getOrCreateServiceInstance(s,g){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(s));const c=this._getServiceInstanceOrDescriptor(s);return c instanceof E.SyncDescriptor?this._safeCreateAndCacheServiceInstance(s,c,g.branch(s,!0)):(g.branch(s,!1),c)}_safeCreateAndCacheServiceInstance(s,g,c){if(this._activeInstantiations.has(s))throw new Error(`illegal state - RECURSIVELY instantiating service '${s}'`);this._activeInstantiations.add(s);try{return this._createAndCacheServiceInstance(s,g,c)}finally{this._activeInstantiations.delete(s)}}_createAndCacheServiceInstance(s,g,c){const l=new y.Graph(C=>C.id.toString());let a=0;const r=[{id:s,desc:g,_trace:c}],u=new Set;for(;r.length;){const C=r.pop();if(!u.has(String(C.id))){if(u.add(String(C.id)),l.lookupOrInsertNode(C),a++>1e3)throw new n(l);for(const f of m._util.getServiceDependencies(C.desc.ctor)){const h=this._getServiceInstanceOrDescriptor(f.id);if(h||this._throwIfStrict(`[createInstance] ${s} depends on ${f.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(C.id),String(f.id)),h instanceof E.SyncDescriptor){const v={id:f.id,desc:h,_trace:C._trace.branch(f.id,!0)};l.insertEdge(C,v),r.push(v)}}}}for(;;){const C=l.roots();if(C.length===0){if(!l.isEmpty())throw new n(l);break}for(const{data:f}of C){if(this._getServiceInstanceOrDescriptor(f.id)instanceof E.SyncDescriptor){const v=this._createServiceInstanceWithOwner(f.id,f.desc.ctor,f.desc.staticArguments,f.desc.supportsDelayedInstantiation,f._trace);this._setCreatedServiceInstance(f.id,v)}l.removeNode(f)}}return this._getServiceInstanceOrDescriptor(s)}_createServiceInstanceWithOwner(s,g,c=[],l,a){if(this._services.get(s)instanceof E.SyncDescriptor)return this._createServiceInstance(s,g,c,l,a,this._servicesToMaybeDispose);if(this._parent)return this._parent._createServiceInstanceWithOwner(s,g,c,l,a);throw new Error(`illegalState - creating UNKNOWN service instance ${g.name}`)}_createServiceInstance(s,g,c=[],l,a,r){if(l){const u=new o(void 0,this._strict,this,this._enableTracing);u._globalGraphImplicitDependency=String(s);const C=new Map,f=new d.GlobalIdleValue(()=>{const h=u._createInstance(g,c,a);for(const[v,w]of C){const S=h[v];if(typeof S=="function")for(const L of w)L.disposable=S.apply(h,L.listener)}return C.clear(),r.add(h),h});return new Proxy(Object.create(null),{get(h,v){if(!f.isInitialized&&typeof v=="string"&&(v.startsWith("onDid")||v.startsWith("onWill"))){let L=C.get(v);return L||(L=new b.LinkedList,C.set(v,L)),(T,M,A)=>{if(f.isInitialized)return f.value[v](T,M,A);{const P={listener:[T,M,A],disposable:void 0},N=L.push(P);return(0,I.toDisposable)(()=>{N(),P.disposable?.dispose()})}}}if(v in h)return h[v];const w=f.value;let S=w[v];return typeof S!="function"||(S=S.bind(w),h[v]=S),S},set(h,v,w){return f.value[v]=w,!0},getPrototypeOf(h){return g.prototype}})}else{const u=this._createInstance(g,c,a);return r.add(u),u}}_throwIfStrict(s,g){if(g&&console.warn(s),this._strict)throw new Error(s)}}e.InstantiationService=o;class t{static{this.all=new Set}static{this._None=new class extends t{constructor(){super(0,null)}stop(){}branch(){return this}}}static traceInvocation(s,g){return s?new t(2,g.name||new Error().stack.split(` |
| 628 | `).slice(3,4).join(` |
| 629 | `)):t._None}static traceCreation(s,g){return s?new t(1,g.name):t._None}static{this._totals=0}constructor(s,g){this.type=s,this.name=g,this._start=Date.now(),this._dep=[]}branch(s,g){const c=new t(3,s.toString());return this._dep.push([s,g,c]),c}stop(){const s=Date.now()-this._start;t._totals+=s;let g=!1;function c(a,r){const u=[],C=new Array(a+1).join(" ");for(const[f,h,v]of r._dep)if(h&&v){g=!0,u.push(`${C}CREATES -> ${f}`);const w=c(a+1,v);w&&u.push(w)}else u.push(`${C}uses -> ${f}`);return u.join(` |
no test coverage detected