MCPcopy Create free account
hub / github.com/DustinBrett/daedalOS / evaluate

Method evaluate

public/Program Files/MonacoEditor/vs/editor/editor.main.js:549–549  ·  view source on GitHub ↗
(T)

Source from the content-addressed store, hash-verified

547`);let v=this.matchEnterRuleMovingDown(t,o,c,l.startLineNumber,d,f);if(v!==null)v!==0&&this.getIndentEditsOfMovingBlock(t,i,l,c,s,v);else{a.getLineContent=_=>_===l.startLineNumber?f:_>=l.startLineNumber+1&&_<=l.endLineNumber+1?t.getLineContent(_-1):t.getLineContent(_);let C=b.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,a,t.getLanguageIdAtPosition(d,1),l.startLineNumber+1,o);if(C!==null){const _=y.getLeadingWhitespace(t.getLineContent(l.startLineNumber)),L=p.getSpaceCnt(C,c),E=p.getSpaceCnt(_,c);if(L!==E){const N=L-E;this.getIndentEditsOfMovingBlock(t,i,l,c,s,N)}}}}else i.addEditOperation(new D.Range(l.startLineNumber,1,l.startLineNumber,1),f+`
548`)}else if(d=l.startLineNumber-1,u=t.getLineContent(d),i.addEditOperation(new D.Range(d,1,d+1,1),null),i.addEditOperation(new D.Range(l.endLineNumber,t.getLineMaxColumn(l.endLineNumber),l.endLineNumber,t.getLineMaxColumn(l.endLineNumber)),`
549`+u),this.shouldAutoIndent(t,l)){a.getLineContent=S=>S===d?t.getLineContent(l.startLineNumber):t.getLineContent(S);let f=this.matchEnterRule(t,o,c,l.startLineNumber,l.startLineNumber-2);if(f!==null)f!==0&&this.getIndentEditsOfMovingBlock(t,i,l,c,s,f);else{let S=b.LanguageConfigurationRegistry.getGoodIndentForLine(this._autoIndent,a,t.getLanguageIdAtPosition(l.startLineNumber,1),d,o);if(S!==null){let v=y.getLeadingWhitespace(t.getLineContent(l.startLineNumber)),C=p.getSpaceCnt(S,c),_=p.getSpaceCnt(v,c);if(C!==_){let L=C-_;this.getIndentEditsOfMovingBlock(t,i,l,c,s,L)}}}}}this._selectionId=i.trackSelection(l)}buildIndentConverter(t,i,n){return{shiftIndent:l=>m.ShiftCommand.shiftIndent(l,l.length+1,t,i,n),unshiftIndent:l=>m.ShiftCommand.unshiftIndent(l,l.length+1,t,i,n)}}parseEnterResult(t,i,n,l,c){if(c){let r=c.indentation;c.indentAction===w.IndentAction.None||c.indentAction===w.IndentAction.Indent?r=c.indentation+c.appendText:c.indentAction===w.IndentAction.IndentOutdent?r=c.indentation:c.indentAction===w.IndentAction.Outdent&&(r=i.unshiftIndent(c.indentation)+c.appendText);let s=t.getLineContent(l);if(this.trimLeft(s).indexOf(this.trimLeft(r))>=0){let o=y.getLeadingWhitespace(t.getLineContent(l)),a=y.getLeadingWhitespace(r),d=b.LanguageConfigurationRegistry.getIndentMetadata(t,l);d!==null&&d&2&&(a=i.unshiftIndent(a));let u=p.getSpaceCnt(a,n),f=p.getSpaceCnt(o,n);return u-f}}return null}matchEnterRuleMovingDown(t,i,n,l,c,r){if(y.lastNonWhitespaceIndex(r)>=0){let s=t.getLineMaxColumn(c),o=b.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,t,new D.Range(c,s,c,s));return this.parseEnterResult(t,i,n,l,o)}else{let s=l-1;for(;s>=1;){let d=t.getLineContent(s);if(y.lastNonWhitespaceIndex(d)>=0)break;s--}if(s<1||l>t.getLineCount())return null;let o=t.getLineMaxColumn(s),a=b.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,t,new D.Range(s,o,s,o));return this.parseEnterResult(t,i,n,l,a)}}matchEnterRule(t,i,n,l,c,r){let s=c;for(;s>=1;){let d;if(s===c&&r!==void 0?d=r:d=t.getLineContent(s),y.lastNonWhitespaceIndex(d)>=0)break;s--}if(s<1||l>t.getLineCount())return null;let o=t.getLineMaxColumn(s),a=b.LanguageConfigurationRegistry.getEnterAction(this._autoIndent,t,new D.Range(s,o,s,o));return this.parseEnterResult(t,i,n,l,a)}trimLeft(t){return t.replace(/^\s+/,"")}shouldAutoIndent(t,i){if(this._autoIndent<4||!t.isCheapToTokenize(i.startLineNumber))return!1;let n=t.getLanguageIdAtPosition(i.startLineNumber,1),l=t.getLanguageIdAtPosition(i.endLineNumber,1);return!(n!==l||b.LanguageConfigurationRegistry.getIndentRulesSupport(n)===null)}getIndentEditsOfMovingBlock(t,i,n,l,c,r){for(let s=n.startLineNumber;s<=n.endLineNumber;s++){let o=t.getLineContent(s),a=y.getLeadingWhitespace(o),u=p.getSpaceCnt(a,l)+r,f=p.generateIndent(u,l,c);f!==a&&(i.addEditOperation(new D.Range(s,1,s,a.length+1),f),s===n.endLineNumber&&n.endColumn<=a.length+1&&f===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(t,i){let n=i.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(n=n.setEndPosition(n.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&n.startLineNumber<n.endLineNumber&&(n=n.setEndPosition(n.endLineNumber,2)),n}}e.MoveLinesCommand=h}),define(te[16],ie([1,0,17,8,9]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.implies=e.SET_CONTEXT_COMMAND_ID=e.IContextKeyService=e.RawContextKey=e.ContextKeyNotRegexExpr=e.ContextKeyRegexExpr=e.ContextKeySmallerEqualsExpr=e.ContextKeySmallerExpr=e.ContextKeyGreaterEqualsExpr=e.ContextKeyGreaterExpr=e.ContextKeyNotExpr=e.ContextKeyNotEqualsExpr=e.ContextKeyNotInExpr=e.ContextKeyInExpr=e.ContextKeyEqualsExpr=e.ContextKeyDefinedExpr=e.ContextKeyTrueExpr=e.ContextKeyFalseExpr=e.expressionsAreEqualWithConstantSubstitution=e.ContextKeyExpr=void 0;const I=new Map;I.set("false",!1),I.set("true",!0),I.set("isMac",y.isMacintosh),I.set("isLinux",y.isLinux),I.set("isWindows",y.isWindows),I.set("isWeb",y.isWeb),I.set("isMacNative",y.isMacintosh&&!y.isWeb),I.set("isEdge",y.isEdge),I.set("isFirefox",y.isFirefox),I.set("isChrome",y.isChrome),I.set("isSafari",y.isSafari);const w=Object.prototype.hasOwnProperty;class b{static has(T){return i.create(T)}static equals(T,R){return n.create(T,R)}static regex(T,R){return S.create(T,R)}static not(T){return s.create(T)}static and(...T){return _.create(T,null)}static or(...T){return L.create(T,null,!0)}static deserialize(T,R=!1){if(!!T)return this._deserializeOrExpression(T,R)}static _deserializeOrExpression(T,R){let P=T.split("||");return L.create(P.map(F=>this._deserializeAndExpression(F,R)),null,!0)}static _deserializeAndExpression(T,R){let P=T.split("&&");return _.create(P.map(F=>this._deserializeOne(F,R)),null)}static _deserializeOne(T,R){if(T=T.trim(),T.indexOf("!=")>=0){let P=T.split("!=");return r.create(P[0].trim(),this._deserializeValue(P[1],R))}if(T.indexOf("==")>=0){let P=T.split("==");return n.create(P[0].trim(),this._deserializeValue(P[1],R))}if(T.indexOf("=~")>=0){let P=T.split("=~");return S.create(P[0].trim(),this._deserializeRegexValue(P[1],R))}if(T.indexOf(" in ")>=0){let P=T.split(" in ");return l.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(T)){const P=T.split(">=");return d.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(T)){const P=T.split(">");return a.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(T)){const P=T.split("<=");return f.create(P[0].trim(),P[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(T)){const P=T.split("<");return u.create(P[0].trim(),P[1].trim())}return/^\!\s*/.test(T)?s.create(T.substr(1).trim()):i.create(T)}static _deserializeValue(T,R){if(T=T.trim(),T==="true")return!0;if(T==="false")return!1;let P=/^'([^']*)'$/.exec(T);return P?P[1].trim():T}static _deserializeRegexValue(T,R){if((0,m.isFalsyOrWhitespace)(T)){if(R)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let P=T.indexOf("/"),F=T.lastIndexOf("/");if(P===F||P<0){if(R)throw new Error(`bad regexp-value '${T}', missing /-enclosure`);return console.warn(`bad regexp-value '${T}', missing /-enclosure`),null}let W=T.slice(P+1,F),A=T[F+1]==="i"?"i":"";try{return new RegExp(W,A)}catch(H){if(R)throw new Error(`bad regexp-value '${T}', parse error: ${H}`);return console.warn(`bad regexp-value '${T}', parse error: ${H}`),null}}}e.ContextKeyExpr=b;function p(B,T){const R=B?B.substituteConstants():void 0,P=T?T.substituteConstants():void 0;return!R&&!P?!0:!R||!P?!1:R.equals(P)}e.expressionsAreEqualWithConstantSubstitution=p;function h(B,T){return B.cmp(T)}class g{constructor(){this.type=0}cmp(T){return this.type-T.type}equals(T){return T.type===this.type}substituteConstants(){return this}evaluate(T){return!1}serialize(){return"false"}keys(){return[]}negate(){return t.INSTANCE}}e.ContextKeyFalseExpr=g,g.INSTANCE=new g;class t{constructor(){this.type=1}cmp(T){return this.type-T.type}equals(T){return T.type===this.type}substituteConstants(){return this}evaluate(T){return!0}serialize(){return"true"}keys(){return[]}negate(){return g.INSTANCE}}e.ContextKeyTrueExpr=t,t.INSTANCE=new t;class i{constructor(T,R){this.key=T,this.negated=R,this.type=2}static create(T,R=null){const P=I.get(T);return typeof P=="boolean"?P?t.INSTANCE:g.INSTANCE:new i(T,R)}cmp(T){return T.type!==this.type?this.type-T.type:N(this.key,T.key)}equals(T){return T.type===this.type?this.key===T.key:!1}substituteConstants(){const T=I.get(this.key);return typeof T=="boolean"?T?t.INSTANCE:g.INSTANCE:this}evaluate(T){return!!T.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=s.create(this.key,this)),this.negated}}e.ContextKeyDefinedExpr=i;class n{constructor(T,R,P){this.key=T,this.value=R,this.negated=P,this.type=4}static create(T,R,P=null){if(typeof R=="boolean")return R?i.create(T,P):s.create(T,P);const F=I.get(T);return typeof F=="boolean"?R===(F?"true":"false")?t.INSTANCE:g.INSTANCE:new n(T,R,P)}cmp(T){return T.type!==this.type?this.type-T.type:k(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){const T=I.get(this.key);if(typeof T=="boolean"){const R=T?"true":"false";return this.value===R?t.INSTANCE:g.INSTANCE}return this}evaluate(T){return T.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=n;class l{constructor(T,R){this.key=T,this.valueKey=R,this.type=10,this.negated=null}static create(T,R){return new l(T,R)}cmp(T){return T.type!==this.type?this.type-T.type:k(this.key,this.valueKey,T.key,T.valueKey)}equals(T){return T.type===this.type?this.key===T.key&&this.valueKey===T.valueKey:!1}substituteConstants(){return this}evaluate(T){const R=T.getValue(this.valueKey),P=T.getValue(this.key);return Array.isArray(R)?R.indexOf(P)>=0:typeof P=="string"&&typeof R=="object"&&R!==null?w.call(R,P):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=c.create(this)),this.negated}}e.ContextKeyInExpr=l;class c{constructor(T){this._actual=T,this.type=11}static create(T){return new c(T)}cmp(T){return T.type!==this.type?this.type-T.type:this._actual.cmp(T._actual)}equals(T){return T.type===this.type?this._actual.equals(T._actual):!1}substituteConstants(){return this}evaluate(T){return!this._actual.evaluate(T)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}e.ContextKeyNotInExpr=c;class r{constructor(T,R,P){this.key=T,this.value=R,this.negated=P,this.type=5}static create(T,R,P=null){if(typeof R=="boolean")return R?s.create(T,P):i.create(T,P);const F=I.get(T);return typeof F=="boolean"?R===(F?"true":"false")?g.INSTANCE:t.INSTANCE:new r(T,R,P)}cmp(T){return T.type!==this.type?this.type-T.type:k(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){const T=I.get(this.key);if(typeof T=="boolean"){const R=T?"true":"false";return this.value===R?g.INSTANCE:t.INSTANCE}return this}evaluate(T){return T.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.ContextKeyNotEqualsExpr=r;class s{constructor(T,R){this.key=T,this.negated=R,this.type=3}static create(T,R=null){const P=I.get(T);return typeof P=="boolean"?P?g.INSTANCE:t.INSTANCE:new s(T,R)}cmp(T){return T.type!==this.type?this.type-T.type:N(this.key,T.key)}equals(T){return T.type===this.type?this.key===T.key:!1}substituteConstants(){const T=I.get(this.key);return typeof T=="boolean"?T?g.INSTANCE:t.INSTANCE:this}evaluate(T){return!T.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=i.create(this.key,this)),this.negated}}e.ContextKeyNotExpr=s;function o(B,T){if(typeof B=="string"){const R=parseFloat(B);isNaN(R)||(B=R)}return typeof B=="string"||typeof B=="number"?T(B):g.INSTANCE}class a{constructor(T,R,P){this.key=T,this.value=R,this.negated=P,this.type=12}static create(T,R,P=null){return o(R,F=>new a(T,F,P))}cmp(T){return T.type!==this.type?this.type-T.type:k(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=a;class d{constructor(T,R,P){this.key=T,this.value=R,this.negated=P,this.type=13}static create(T,R,P=null){return o(R,F=>new d(T,F,P))}cmp(T){return T.type!==this.type?this.type-T.type:k(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=d;class u{constructor(T,R,P){this.key=T,this.value=R,this.negated=P,this.type=14}static create(T,R,P=null){return o(R,F=>new u(T,F,P))}cmp(T){return T.type!==this.type?this.type-T.type:k(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=d.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerExpr=u;class f{constructor(T,R,P){this.key=T,this.value=R,this.negated=P,this.type=15}static create(T,R,P=null){return o(R,F=>new f(T,F,P))}cmp(T){return T.type!==this.type?this.type-T.type:k(this.key,this.value,T.key,T.value)}equals(T){return T.type===this.type?this.key===T.key&&this.value===T.value:!1}substituteConstants(){return this}evaluate(T){return typeof this.value=="string"?!1:parseFloat(T.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.ContextKeySmallerEqualsExpr=f;class S{constructor(T,R){this.key=T,this.regexp=R,this.type=7,this.negated=null}static create(T,R){return new S(T,R)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.key<T.key)return-1;if(this.key>T.key)return 1;const R=this.regexp?this.regexp.source:"",P=T.regexp?T.regexp.source:"";return R<P?-1:R>P?1:0}equals(T){if(T.type===this.type){const R=this.regexp?this.regexp.source:"",P=T.regexp?T.regexp.source:"";return this.key===T.key&&R===P}return!1}substituteConstants(){return this}evaluate(T){let R=T.getValue(this.key);return this.regexp?this.regexp.test(R):!1}serialize(){const T=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${T}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=v.create(this)),this.negated}}e.ContextKeyRegexExpr=S;class v{constructor(T){this._actual=T,this.type=8}static create(T){return new v(T)}cmp(T){return T.type!==this.type?this.type-T.type:this._actual.cmp(T._actual)}equals(T){return T.type===this.type?this._actual.equals(T._actual):!1}substituteConstants(){return this}evaluate(T){return!this._actual.evaluate(T)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}e.ContextKeyNotRegexExpr=v;function C(B){let T=null;for(let R=0,P=B.length;R<P;R++){const F=B[R].substituteConstants();if(B[R]!==F&&T===null){T=[];for(let W=0;W<R;W++)T[W]=B[W]}T!==null&&(T[R]=F)}return T===null?B:T}class _{constructor(T,R){this.expr=T,this.negated=R,this.type=6}static create(T,R){return _._normalizeArr(T,R)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.expr.length<T.expr.length)return-1;if(this.expr.length>T.expr.length)return 1;for(let R=0,P=this.expr.length;R<P;R++){const F=h(this.expr[R],T.expr[R]);if(F!==0)return F}return 0}equals(T){if(T.type===this.type){if(this.expr.length!==T.expr.length)return!1;for(let R=0,P=this.expr.length;R<P;R++)if(!this.expr[R].equals(T.expr[R]))return!1;return!0}return!1}substituteConstants(){const T=C(this.expr);return T===this.expr?this:_.create(T,this.negated)}evaluate(T){for(let R=0,P=this.expr.length;R<P;R++)if(!this.expr[R].evaluate(T))return!1;return!0}static _normalizeArr(T,R){const P=[];let F=!1;for(const W of T)if(!!W){if(W.type===1){F=!0;continue}if(W.type===0)return g.INSTANCE;if(W.type===6){P.push(...W.expr);continue}P.push(W)}if(P.length===0&&F)return t.INSTANCE;if(P.length!==0){if(P.length===1)return P[0];P.sort(h);for(let W=1;W<P.length;W++)P[W-1].equals(P[W])&&(P.splice(W,1),W--);if(P.length===1)return P[0];for(;P.length>1;){const W=P[P.length-1];if(W.type!==9)break;P.pop();const A=P.pop(),H=P.length===0,q=L.create(W.expr.map(X=>_.create([X,A],null)),null,H);q&&(P.push(q),P.sort(h))}return P.length===1?P[0]:new _(P,R)}}serialize(){return this.expr.map(T=>T.serialize()).join(" && ")}keys(){const T=[];for(let R of this.expr)T.push(...R.keys());return T}negate(){if(!this.negated){const T=[];for(let R of this.expr)T.push(R.negate());this.negated=L.create(T,this,!0)}return this.negated}}class L{constructor(T,R){this.expr=T,this.negated=R,this.type=9}static create(T,R,P){return L._normalizeArr(T,R,P)}cmp(T){if(T.type!==this.type)return this.type-T.type;if(this.expr.length<T.expr.length)return-1;if(this.expr.length>T.expr.length)return 1;for(let R=0,P=this.expr.length;R<P;R++){const F=h(this.expr[R],T.expr[R]);if(F!==0)return F}return 0}equals(T){if(T.type===this.type){if(this.expr.length!==T.expr.length)return!1;for(let R=0,P=this.expr.length;R<P;R++)if(!this.expr[R].equals(T.expr[R]))return!1;return!0}return!1}substituteConstants(){const T=C(this.expr);return T===this.expr?this:L.create(T,this.negated,!1)}evaluate(T){for(let R=0,P=this.expr.length;R<P;R++)if(this.expr[R].evaluate(T))return!0;return!1}static _normalizeArr(T,R,P){let F=[],W=!1;if(T){for(let A=0,H=T.length;A<H;A++){const q=T[A];if(!!q){if(q.type===0){W=!0;continue}if(q.type===1)return t.INSTANCE;if(q.type===9){F=F.concat(q.expr);continue}F.push(q)}}if(F.length===0&&W)return g.INSTANCE;F.sort(h)}if(F.length!==0){if(F.length===1)return F[0];for(let A=1;A<F.length;A++)F[A-1].equals(F[A])&&(F.splice(A,1),A--);if(F.length===1)return F[0];if(P){for(let A=0;A<F.length;A++)for(let H=A+1;H<F.length;H++)M(F[A],F[H])&&(F.splice(H,1),H--);if(F.length===1)return F[0]}return new L(F,R)}}serialize(){return this.expr.map(T=>T.serialize()).join(" || ")}keys(){const T=[];for(let R of this.expr)T.push(...R.keys());return T}negate(){if(!this.negated){let T=[];for(let R of this.expr)T.push(R.negate());for(;T.length>1;){const R=T.shift(),P=T.shift(),F=[];for(const A of O(R))for(const H of O(P))F.push(_.create([A,H],null));const W=T.length===0;T.unshift(L.create(F,null,W))}this.negated=T[0]}return this.negated}}class E extends i{constructor(T,R,P){super(T,null);this._defaultValue=R,typeof P=="object"?E._info.push(Object.assign(Object.assign({},P),{key:T})):P!==!0&&E._info.push({key:T,description:P,type:R!=null?typeof R:void 0})}static all(){return E._info.values()}bindTo(T){return T.createKey(this.key,this._defaultValue)}getValue(T){return T.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(T){return n.create(this.key,T)}}e.RawContextKey=E,E._info=[],e.IContextKeyService=(0,D.createDecorator)("contextKeyService"),e.SET_CONTEXT_COMMAND_ID="setContext";function N(B,T){return B<T?-1:B>T?1:0}function k(B,T,R,P){return B<R?-1:B>R?1:T<P?-1:T>P?1:0}function M(B,T){if(T.type===6&&B.type!==9&&B.type!==6){for(const F of T.expr)if(B.equals(F))return!0}const R=B.negate(),P=O(R).concat(O(T));P.sort(h);for(let F=0;F<P.length;F++){const A=P[F].negate();for(let H=F+1;H<P.length;H++){const q=P[H];if(A.equals(q))return!0}}return!1}e.implies=M;function O(B){return B.type===9?B.expr:[B]}}),define(te[24],ie([1,0,512,16]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorContextKeys=void 0;var D;(function(I){I.editorSimpleInput=new m.RawContextKey("editorSimpleInput",!1,!0),I.editorTextFocus=new m.RawContextKey("editorTextFocus",!1,y.localize(0,null)),I.focus=new m.RawContextKey("editorFocus",!1,y.localize(1,null)),I.textInputFocus=new m.RawContextKey("textInputFocus",!1,y.localize(2,null)),I.readOnly=new m.RawContextKey("editorReadonly",!1,y.localize(3,null)),I.inDiffEditor=new m.RawContextKey("inDiffEditor",!1,y.localize(4,null)),I.columnSelection=new m.RawContextKey("editorColumnSelection",!1,y.localize(5,null)),I.writable=I.readOnly.toNegated(),I.hasNonEmptySelection=new m.RawContextKey("editorHasSelection",!1,y.localize(6,null)),I.hasOnlyEmptySelection=I.hasNonEmptySelection.toNegated(),I.hasMultipleSelections=new m.RawContextKey("editorHasMultipleSelections",!1,y.localize(7,null)),I.hasSingleSelection=I.hasMultipleSelections.toNegated(),I.tabMovesFocus=new m.RawContextKey("editorTabMovesFocus",!1,y.localize(8,null)),I.tabDoesNotMoveFocus=I.tabMovesFocus.toNegated(),I.isInWalkThroughSnippet=new m.RawContextKey("isInEmbeddedEditor",!1,!0),I.canUndo=new m.RawContextKey("canUndo",!1,!0),I.canRedo=new m.RawContextKey("canRedo",!1,!0),I.hoverVisible=new m.RawContextKey("editorHoverVisible",!1,y.localize(9,null)),I.inCompositeEditor=new m.RawContextKey("inCompositeEditor",void 0,y.localize(10,null)),I.notInCompositeEditor=I.inCompositeEditor.toNegated(),I.languageId=new m.RawContextKey("editorLangId","",y.localize(11,null)),I.hasCompletionItemProvider=new m.RawContextKey("editorHasCompletionItemProvider",!1,y.localize(12,null)),I.hasCodeActionsProvider=new m.RawContextKey("editorHasCodeActionsProvider",!1,y.localize(13,null)),I.hasCodeLensProvider=new m.RawContextKey("editorHasCodeLensProvider",!1,y.localize(14,null)),I.hasDefinitionProvider=new m.RawContextKey("editorHasDefinitionProvider",!1,y.localize(15,null)),I.hasDeclarationProvider=new m.RawContextKey("editorHasDeclarationProvider",!1,y.localize(16,null)),I.hasImplementationProvider=new m.RawContextKey("editorHasImplementationProvider",!1,y.localize(17,null)),I.hasTypeDefinitionProvider=new m.RawContextKey("editorHasTypeDefinitionProvider",!1,y.localize(18,null)),I.hasHoverProvider=new m.RawContextKey("editorHasHoverProvider",!1,y.localize(19,null)),I.hasDocumentHighlightProvider=new m.RawContextKey("editorHasDocumentHighlightProvider",!1,y.localize(20,null)),I.hasDocumentSymbolProvider=new m.RawContextKey("editorHasDocumentSymbolProvider",!1,y.localize(21,null)),I.hasReferenceProvider=new m.RawContextKey("editorHasReferenceProvider",!1,y.localize(22,null)),I.hasRenameProvider=new m.RawContextKey("editorHasRenameProvider",!1,y.localize(23,null)),I.hasSignatureHelpProvider=new m.RawContextKey("editorHasSignatureHelpProvider",!1,y.localize(24,null)),I.hasInlayHintsProvider=new m.RawContextKey("editorHasInlayHintsProvider",!1,y.localize(25,null)),I.hasDocumentFormattingProvider=new m.RawContextKey("editorHasDocumentFormattingProvider",!1,y.localize(26,null)),I.hasDocumentSelectionFormattingProvider=new m.RawContextKey("editorHasDocumentSelectionFormattingProvider",!1,y.localize(27,null)),I.hasMultipleDocumentFormattingProvider=new m.RawContextKey("editorHasMultipleDocumentFormattingProvider",!1,y.localize(28,null)),I.hasMultipleDocumentSelectionFormattingProvider=new m.RawContextKey("editorHasMultipleDocumentSelectionFormattingProvider",!1,y.localize(29,null))})(D=e.EditorContextKeys||(e.EditorContextKeys={}))}),define(te[198],ie([1,0,21,13,20,25,11,18,58,26,16]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSignatureHelp=e.Context=void 0,e.Context={Visible:new g.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new g.RawContextKey("parameterHintsMultipleSignatures",!1)};function t(i,n,l,c){return ye(this,void 0,void 0,function*(){const r=b.SignatureHelpProviderRegistry.ordered(i);for(const s of r)try{const o=yield s.provideSignatureHelp(i,n,c,l);if(o)return o}catch(o){(0,m.onUnexpectedExternalError)(o)}})}e.provideSignatureHelp=t,h.CommandsRegistry.registerCommand("_executeSignatureHelpProvider",(i,...n)=>ye(void 0,void 0,void 0,function*(){const[l,c,r]=n;(0,D.assertType)(I.URI.isUri(l)),(0,D.assertType)(w.Position.isIPosition(c)),(0,D.assertType)(typeof r=="string"||!r);const s=yield i.get(p.ITextModelService).createModelReference(l);try{const o=yield t(s.object.textEditorModel,w.Position.lift(c),{triggerKind:b.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:r},y.CancellationToken.None);return o?(setTimeout(()=>o.dispose(),0),o.value):void 0}finally{s.dispose()}}))}),define(te[601],ie([1,0,10,13,4,2,97,18,198]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsModel=void 0;var h;(function(i){i.Default={type:0};class n{constructor(r,s){this.request=r,this.previouslyActiveHints=s,this.type=2}}i.Pending=n;class l{constructor(r){this.hints=r,this.type=1}}i.Active=l})(h||(h={}));class g extends I.Disposable{constructor(n,l=g.DEFAULT_DELAY){super();this._onChangedHints=this._register(new D.Emitter),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=h.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new I.MutableDisposable),this.triggerChars=new w.CharacterSet,this.retriggerChars=new w.CharacterSet,this.triggerId=0,this.editor=n,this.throttledDelayer=new y.Delayer(l),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(c=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(c=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(c=>this.onCursorChange(c))),this._register(this.editor.onDidChangeModelContent(c=>this.onModelContentChange())),this._register(b.SignatureHelpProviderRegistry.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(c=>this.onDidType(c))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(n){this._state.type===2&&this._state.request.cancel(),this._state=n}cancel(n=!1){this.state=h.Default,this.throttledDelayer.cancel(),n||this._onChangedHints.fire(void 0)}trigger(n,l){const c=this.editor.getModel();if(!c||!b.SignatureHelpProviderRegistry.has(c))return;const r=++this.triggerId;this._pendingTriggers.push(n),this.throttledDelayer.trigger(()=>this.doTrigger(r),l).catch(m.onUnexpectedError)}next(){if(this.state.type!==1)return;const n=this.state.hints.signatures.length,l=this.state.hints.activeSignature,c=l%n==n-1,r=this.editor.getOption(76).cycle;if((n<2||c)&&!r){this.cancel();return}this.updateActiveSignature(c&&r?0:l+1)}previous(){if(this.state.type!==1)return;const n=this.state.hints.signatures.length,l=this.state.hints.activeSignature,c=l===0,r=this.editor.getOption(76).cycle;if((n<2||c)&&!r){this.cancel();return}this.updateActiveSignature(c&&r?n-1:l-1)}updateActiveSignature(n){this.state.type===1&&(this.state=new h.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:n})),this._onChangedHints.fire(this.state.hints))}doTrigger(n){return ye(this,void 0,void 0,function*(){const l=this.state.type===1||this.state.type===2,c=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const r=this._pendingTriggers.reduce(t);this._pendingTriggers=[];const s={triggerKind:r.triggerKind,triggerCharacter:r.triggerCharacter,isRetrigger:l,activeSignatureHelp:c};if(!this.editor.hasModel())return!1;const o=this.editor.getModel(),a=this.editor.getPosition();this.state=new h.Pending((0,y.createCancelablePromise)(d=>(0,p.provideSignatureHelp)(o,a,s,d)),c);try{const d=yield this.state.request;return n!==this.triggerId?(d==null||d.dispose(),!1):!d||!d.value.signatures||d.value.signatures.length===0?(d==null||d.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new h.Active(d.value),this._lastSignatureHelpResult.value=d,this._onChangedHints.fire(this.state.hints),!0)}catch(d){return n===this.triggerId&&(this.state=h.Default),(0,m.onUnexpectedError)(d),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new w.CharacterSet,this.retriggerChars=new w.CharacterSet;const n=this.editor.getModel();if(!!n)for(const l of b.SignatureHelpProviderRegistry.ordered(n)){for(const c of l.signatureHelpTriggerCharacters||[])this.triggerChars.add(c.charCodeAt(0)),this.retriggerChars.add(c.charCodeAt(0));for(const c of l.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(c.charCodeAt(0))}}onDidType(n){if(!this.triggerOnType)return;const l=n.length-1,c=n.charCodeAt(l);(this.triggerChars.has(c)||this.isTriggered&&this.retriggerChars.has(c))&&this.trigger({triggerKind:b.SignatureHelpTriggerKind.TriggerCharacter,triggerCharacter:n.charAt(l)})}onCursorChange(n){n.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:b.SignatureHelpTriggerKind.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:b.SignatureHelpTriggerKind.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(76).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}e.ParameterHintsModel=g,g.DEFAULT_DELAY=120;function t(i,n){switch(n.triggerKind){case b.SignatureHelpTriggerKind.Invoke:return n;case b.SignatureHelpTriggerKind.ContentChange:return i;case b.SignatureHelpTriggerKind.TriggerCharacter:default:return n}}}),define(te[602],ie([1,0,16]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestAlternatives=void 0;let m=class Ot{constructor(I,w){this._editor=I,this._index=0,this._ckOtherSuggestions=Ot.OtherSuggestions.bindTo(w)}dispose(){this.reset()}reset(){var I;this._ckOtherSuggestions.reset(),(I=this._listener)===null||I===void 0||I.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:I,index:w},b){if(I.items.length===0){this.reset();return}if(Ot._moveIndex(!0,I,w)===w){this.reset();return}this._acceptNext=b,this._model=I,this._index=w,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(I,w,b){let p=b;for(;p=(p+w.items.length+(I?1:-1))%w.items.length,!(p===b||!w.items[p].completion.additionalTextEdits););return p}next(){this._move(!0)}prev(){this._move(!1)}_move(I){if(!!this._model)try{this._ignore=!0,this._index=Ot._moveIndex(I,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};m.OtherSuggestions=new y.RawContextKey("hasOtherSuggestions",!1),m=Ie([Ce(1,y.IContextKeyService)],m),e.SuggestAlternatives=m}),define(te[603],ie([1,0,16]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordContextKey=void 0;let m=class _i{constructor(I,w){this._editor=I,this._enabled=!1,this._ckAtEnd=_i.AtEnd.bindTo(w),this._configListener=this._editor.onDidChangeConfiguration(b=>b.hasChanged(111)&&this._update()),this._update()}dispose(){var I;this._configListener.dispose(),(I=this._selectionListener)===null||I===void 0||I.dispose(),this._ckAtEnd.reset()}_update(){const I=this._editor.getOption(111)==="on";if(this._enabled!==I)if(this._enabled=I,this._enabled){const w=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const b=this._editor.getModel(),p=this._editor.getSelection(),h=b.getWordAtPosition(p.getStartPosition());if(!h){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(h.endColumn===p.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(w),w()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};m.AtEnd=new y.RawContextKey("atEndOfWord",!1),m=Ie([Ce(1,y.IContextKeyService)],m),e.WordContextKey=m}),define(te[63],ie([1,0,16,9]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=e.IAccessibilityService=void 0,e.IAccessibilityService=(0,m.createDecorator)("accessibilityService"),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=new y.RawContextKey("accessibilityModeEnabled",!1)}),define(te[604],ie([1,0,34,19,4,2,39,17,230,266,397,231,31,144,174,63]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComputedEditorOptions=e.EditorConfiguration=void 0;let r=class extends I.Disposable{constructor(v,C,_,L){super();this._accessibilityService=L,this._onDidChange=this._register(new D.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new D.Emitter),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._computeOptionsMemory=new i.ComputeOptionsMemory,this.isSimpleWidget=v,this._containerObserver=this._register(new p.ElementSizeObserver(_,C.dimension)),this._rawOptions=f(C),this._validatedOptions=u.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(10)&&this._containerObserver.startObserving(),this._register(n.EditorZoom.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(t.TabFocus.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(h.FontMeasurements.onDidChange(()=>this._recomputeOptions())),this._register(y.PixelRatio.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const v=this._computeOptions(),C=u.checkEquals(this.options,v);C!==null&&(this.options=v,this._onDidChangeFast.fire(C),this._onDidChange.fire(C))}_computeOptions(){const v=this._readEnvConfiguration(),C=l.BareFontInfo.createFromValidatedSettings(this._validatedOptions,v.pixelRatio,this.isSimpleWidget),_=this._readFontInfo(C),L={memory:this._computeOptionsMemory,outerWidth:v.outerWidth,outerHeight:v.outerHeight-this._reservedHeight,fontInfo:_,extraEditorClassName:v.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:v.emptySelectionClipboard,pixelRatio:v.pixelRatio,tabFocusMode:t.TabFocus.getTabFocusMode(),accessibilitySupport:v.accessibilitySupport};return u.computeOptions(this._validatedOptions,L)}_readEnvConfiguration(){return{extraEditorClassName:o(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:y.isWebKit||y.isFirefox,pixelRatio:y.PixelRatio.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(v){return h.FontMeasurements.readFontInfo(v)}getRawOptions(){return this._rawOptions}updateOptions(v){const C=f(v);!u.applyUpdate(this._rawOptions,C)||(this._validatedOptions=u.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(v){this._containerObserver.observe(v)}setIsDominatedByLongLines(v){this._isDominatedByLongLines!==v&&(this._isDominatedByLongLines=v,this._recomputeOptions())}setModelLineCount(v){const C=s(v);this._lineNumbersDigitCount!==C&&(this._lineNumbersDigitCount=C,this._recomputeOptions())}setViewLineCount(v){this._viewLineCount!==v&&(this._viewLineCount=v,this._recomputeOptions())}setReservedHeight(v){this._reservedHeight!==v&&(this._reservedHeight=v,this._recomputeOptions())}};r=Ie([Ce(3,c.IAccessibilityService)],r),e.EditorConfiguration=r;function s(S){let v=0;for(;S;)S=Math.floor(S/10),v++;return v||1}function o(){let S="";return!y.isSafari&&!y.isWebkitWebView&&(S+="no-user-select "),y.isSafari&&(S+="no-minimap-shadow "),b.isMacintosh&&(S+="mac "),S}class a{constructor(){this._values=[]}_read(v){return this._values[v]}get(v){return this._values[v]}_write(v,C){this._values[v]=C}}class d{constructor(){this._values=[]}_read(v){if(v>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[v]}get(v){return this._read(v)}_write(v,C){this._values[v]=C}}e.ComputedEditorOptions=d;class u{static validateOptions(v){const C=new a;for(const _ of i.editorOptionsRegistry){const L=_.name==="_never_"?void 0:v[_.name];C._write(_.id,_.validate(L))}return C}static computeOptions(v,C){const _=new d;for(const L of i.editorOptionsRegistry)_._write(L.id,L.compute(C,_,v._read(L.id)));return _}static _deepEquals(v,C){if(typeof v!="object"||typeof C!="object"||!v||!C)return v===C;if(Array.isArray(v)||Array.isArray(C))return Array.isArray(v)&&Array.isArray(C)?m.equals(v,C):!1;if(Object.keys(v).length!==Object.keys(C).length)return!1;for(const _ in v)if(!u._deepEquals(v[_],C[_]))return!1;return!0}static checkEquals(v,C){const _=[];let L=!1;for(const E of i.editorOptionsRegistry){const N=!u._deepEquals(v._read(E.id),C._read(E.id));_[E.id]=N,N&&(L=!0)}return L?new i.ConfigurationChangedEvent(_):null}static applyUpdate(v,C){let _=!1;for(const L of i.editorOptionsRegistry)if(C.hasOwnProperty(L.name)){const E=L.applyUpdate(v[L.name],C[L.name]);v[L.name]=E.newValue,_=_||E.didChange}return _}}function f(S){const v=w.deepClone(S);return(0,g.migrateOptions)(v),v}}),define(te[605],ie([1,0,4,2,63,40,16]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityService=void 0;let b=class extends m.Disposable{constructor(h,g){super();this._contextKeyService=h,this._configurationService=g,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new y.Emitter,this._accessibilityModeEnabledContext=D.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService);const t=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(i=>{i.affectsConfiguration("editor.accessibilitySupport")&&(t(),this._onDidChangeScreenReaderOptimized.fire())})),t(),this.onDidChangeScreenReaderOptimized(()=>t())}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const h=this._configurationService.getValue("editor.accessibilitySupport");return h==="on"||h==="auto"&&this._accessibilitySupport===2}getAccessibilitySupport(){return this._accessibilitySupport}};b=Ie([Ce(0,w.IContextKeyService),Ce(1,I.IConfigurationService)],b),e.AccessibilityService=b}),define(te[606],ie([1,0,4,54,2,47,583,26,40,16]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextKeyService=e.AbstractContextKeyService=e.Context=void 0;const g="data-keybinding-context";class t{constructor(S,v){this._id=S,this._parent=v,this._value=Object.create(null),this._value._contextId=S}setValue(S,v){return this._value[S]!==v?(this._value[S]=v,!0):!1}removeValue(S){return S in this._value?(delete this._value[S],!0):!1}getValue(S){const v=this._value[S];return typeof v=="undefined"&&this._parent?this._parent.getValue(S):v}}e.Context=t;class i extends t{constructor(){super(-1,null)}setValue(S,v){return!1}removeValue(S){return!1}getValue(S){}}i.INSTANCE=new i;class n extends t{constructor(S,v,C){super(S,null);this._configurationService=v,this._values=I.TernarySearchTree.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(_=>{if(_.source===6){const L=Array.from(m.Iterable.map(this._values,([E])=>E));this._values.clear(),C.fire(new r(L))}else{const L=[];for(const E of _.affectedKeys){const N=`config.${E}`,k=this._values.findSuperstr(N);k!==void 0&&(L.push(...m.Iterable.map(k,([M])=>M)),this._values.deleteSuperstr(N)),this._values.has(N)&&(L.push(N),this._values.delete(N))}C.fire(new r(L))}})}dispose(){this._listener.dispose()}getValue(S){if(S.indexOf(n._keyPrefix)!==0)return super.getValue(S);if(this._values.has(S))return this._values.get(S);const v=S.substr(n._keyPrefix.length),C=this._configurationService.getValue(v);let _;switch(typeof C){case"number":case"boolean":case"string":_=C;break;default:Array.isArray(C)?_=JSON.stringify(C):_=C}return this._values.set(S,_),_}setValue(S,v){return super.setValue(S,v)}removeValue(S){return super.removeValue(S)}}n._keyPrefix="config.";class l{constructor(S,v,C){this._service=S,this._key=v,this._defaultValue=C,this.reset()}set(S){this._service.setContext(this._key,S)}reset(){typeof this._defaultValue=="undefined"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class c{constructor(S){this.key=S}affectsSome(S){return S.has(this.key)}}class r{constructor(S){this.keys=S}affectsSome(S){for(const v of this.keys)if(S.has(v))return!0;return!1}}class s{constructor(S){this.events=S}affectsSome(S){for(const v of this.events)if(v.affectsSome(S))return!0;return!1}}class o{constructor(S){this._onDidChangeContext=new y.PauseableEmitter({merge:v=>new s(v)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=S}createKey(S,v){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new l(this,S,v)}bufferChangeEvents(S){this._onDidChangeContext.pause();try{S()}finally{this._onDidChangeContext.resume()}}createScoped(S){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new d(this,S)}contextMatchesRules(S){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const v=this.getContextValuesContainer(this._myContextId);return S?S.evaluate(v):!0}getContextKeyValue(S){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(S)}setContext(S,v){if(this._isDisposed)return;const C=this.getContextValuesContainer(this._myContextId);!C||C.setValue(S,v)&&this._onDidChangeContext.fire(new c(S))}removeContext(S){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(S)&&this._onDidChangeContext.fire(new c(S))}getContext(S){return this._isDisposed?i.INSTANCE:this.getContextValuesContainer(u(S))}}e.AbstractContextKeyService=o;let a=class extends o{constructor(S){super(0);this._contexts=new Map,this._toDispose=new D.DisposableStore,this._lastContextId=0;const v=new n(this._myContextId,S,this._onDidChangeContext);this._contexts.set(this._myContextId,v),this._toDispose.add(v)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(S){return this._isDisposed?i.INSTANCE:this._contexts.get(S)||i.INSTANCE}createChildContext(S=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let v=++this._lastContextId;return this._contexts.set(v,new t(v,this.getContextValuesContainer(S))),v}disposeContext(S){this._isDisposed||this._contexts.delete(S)}};a=Ie([Ce(0,p.IConfigurationService)],a),e.ContextKeyService=a;class d extends o{constructor(S,v){super(S.createChildContext());if(this._parentChangeListener=new D.MutableDisposable,this._parent=S,this._updateParentChangeListener(),this._domNode=v,this._domNode.hasAttribute(g)){let C="";this._domNode.classList&&(C=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${C?": "+C:""}`)}this._domNode.setAttribute(g,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(g),this._isDisposed=!0)}getContextValuesContainer(S){return this._isDisposed?i.INSTANCE:this._parent.getContextValuesContainer(S)}createChildContext(S=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(S)}disposeContext(S){this._isDisposed||this._parent.disposeContext(S)}}function u(f){for(;f;){if(f.hasAttribute(g)){const S=f.getAttribute(g);return S?parseInt(S,10):NaN}f=f.parentElement}return 0}b.CommandsRegistry.registerCommand(h.SET_CONTEXT_COMMAND_ID,function(f,S,v){f.get(h.IContextKeyService).createKey(String(S),v)}),b.CommandsRegistry.registerCommand({id:"getContextKeyInfo",handler(){return[...h.RawContextKey.all()].sort((f,S)=>f.key.localeCompare(S.key))},description:{description:(0,w.localize)(0,null),args:[]}}),b.CommandsRegistry.registerCommand("_generateContextKeyInfo",function(){const f=[],S=new Set;for(let v of h.RawContextKey.all())S.has(v.key)||(S.add(v.key),f.push(v));f.sort((v,C)=>v.key.localeCompare(C.key)),console.log(JSON.stringify(f,void 0,2))})}),define(te[273],ie([1,0,17,584,16]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFocusedContext=e.InputFocusedContextKey=e.IsDevelopmentContext=e.IsIOSContext=e.IsMacNativeContext=e.IsWebContext=e.IsWindowsContext=e.IsLinuxContext=e.IsMacContext=void 0,e.IsMacContext=new D.RawContextKey("isMac",y.isMacintosh,(0,m.localize)(0,null)),e.IsLinuxContext=new D.RawContextKey("isLinux",y.isLinux,(0,m.localize)(1,null)),e.IsWindowsContext=new D.RawContextKey("isWindows",y.isWindows,(0,m.localize)(2,null)),e.IsWebContext=new D.RawContextKey("isWeb",y.isWeb,(0,m.localize)(3,null)),e.IsMacNativeContext=new D.RawContextKey("isMacNative",y.isMacintosh&&!y.isWeb,(0,m.localize)(4,null)),e.IsIOSContext=new D.RawContextKey("isIOS",y.isIOS,(0,m.localize)(5,null)),e.IsDevelopmentContext=new D.RawContextKey("isDevelopment",!1,!0),e.InputFocusedContextKey="inputFocus",e.InputFocusedContext=new D.RawContextKey(e.InputFocusedContextKey,!1,(0,m.localize)(6,null))}),define(te[76],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IContextMenuService=e.IContextViewService=void 0,e.IContextViewService=(0,y.createDecorator)("contextViewService"),e.IContextMenuService=(0,y.createDecorator)("contextMenuService")}),define(te[127],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDialogService=void 0,e.IDialogService=(0,y.createDecorator)("dialogService")}),define(te[154],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class y{constructor(...D){this._entries=new Map;for(let[I,w]of D)this.set(I,w)}set(D,I){const w=this._entries.get(D);return this._entries.set(D,I),w}get(D){return this._entries.get(D)}}e.ServiceCollection=y}),define(te[607],ie([1,0,10,13,194,597,9,154]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const p=!1;class h extends Error{constructor(n){var l;super("cyclic dependency between services");this.message=(l=n.findCycleSlow())!==null&&l!==void 0?l:`UNABLE to detect cycle, dumping graph:
550${n.toString()}`}}class g{constructor(n=new b.ServiceCollection,l=!1,c){this._activeInstantiations=new Set,this._services=n,this._strict=l,this._parent=c,this._services.set(w.IInstantiationService,this)}createChild(n){return new g(n,this._strict,this)}invokeFunction(n,...l){let c=t.traceInvocation(n),r=!1;try{return n({get:o=>{if(r)throw(0,m.illegalState)("service accessor is only valid during the invocation of its target method");const a=this._getOrCreateServiceInstance(o,c);if(!a)throw new Error(`[invokeFunction] unknown service '${o}'`);return a}},...l)}finally{r=!0,c.stop()}}createInstance(n,...l){let c,r;return n instanceof D.SyncDescriptor?(c=t.traceCreation(n.ctor),r=this._createInstance(n.ctor,n.staticArguments.concat(l),c)):(c=t.traceCreation(n),r=this._createInstance(n,l,c)),c.stop(),r}_createInstance(n,l=[],c){let r=w._util.getServiceDependencies(n).sort((a,d)=>a.index-d.index),s=[];for(const a of r){let d=this._getOrCreateServiceInstance(a.id,c);if(!d&&this._strict&&!a.optional)throw new Error(`[createInstance] ${n.name} depends on UNKNOWN service ${a.id}.`);s.push(d)}let o=r.length>0?r[0].index:l.length;if(l.length!==o){console.warn(`[createInstance] First service dependency of ${n.name} at position ${o+1} conflicts with ${l.length} static arguments`);let a=o-l.length;a>0?l=l.concat(new Array(a)):l=l.slice(0,o)}return new n(...[...l,...s])}_setServiceInstance(n,l){if(this._services.get(n)instanceof D.SyncDescriptor)this._services.set(n,l);else if(this._parent)this._parent._setServiceInstance(n,l);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(n){let l=this._services.get(n);return!l&&this._parent?this._parent._getServiceInstanceOrDescriptor(n):l}_getOrCreateServiceInstance(n,l){let c=this._getServiceInstanceOrDescriptor(n);return c instanceof D.SyncDescriptor?this._safeCreateAndCacheServiceInstance(n,c,l.branch(n,!0)):(l.branch(n,!1),c)}_safeCreateAndCacheServiceInstance(n,l,c){if(this._activeInstantiations.has(n))throw new Error(`illegal state - RECURSIVELY instantiating service '${n}'`);this._activeInstantiations.add(n);try{return this._createAndCacheServiceInstance(n,l,c)}finally{this._activeInstantiations.delete(n)}}_createAndCacheServiceInstance(n,l,c){const r=new I.Graph(a=>a.id.toString());let s=0;const o=[{id:n,desc:l,_trace:c}];for(;o.length;){const a=o.pop();if(r.lookupOrInsertNode(a),s++>1e3)throw new h(r);for(let d of w._util.getServiceDependencies(a.desc.ctor)){let u=this._getServiceInstanceOrDescriptor(d.id);if(!u&&!d.optional&&console.warn(`[createInstance] ${n} depends on ${d.id} which is NOT registered.`),u instanceof D.SyncDescriptor){const f={id:d.id,desc:u,_trace:a._trace.branch(d.id,!0)};r.insertEdge(a,f),o.push(f)}}}for(;;){const a=r.roots();if(a.length===0){if(!r.isEmpty())throw new h(r);break}for(const{data:d}of a){if(this._getServiceInstanceOrDescriptor(d.id)instanceof D.SyncDescriptor){const f=this._createServiceInstanceWithOwner(d.id,d.desc.ctor,d.desc.staticArguments,d.desc.supportsDelayedInstantiation,d._trace);this._setServiceInstance(d.id,f)}r.removeNode(d)}}return this._getServiceInstanceOrDescriptor(n)}_createServiceInstanceWithOwner(n,l,c=[],r,s){if(this._services.get(n)instanceof D.SyncDescriptor)return this._createServiceInstance(l,c,r,s);if(this._parent)return this._parent._createServiceInstanceWithOwner(n,l,c,r,s);throw new Error(`illegalState - creating UNKNOWN service instance ${l.name}`)}_createServiceInstance(n,l=[],c,r){if(c){const s=new y.IdleValue(()=>this._createInstance(n,l,r));return new Proxy(Object.create(null),{get(o,a){if(a in o)return o[a];let d=s.value,u=d[a];return typeof u!="function"||(u=u.bind(d),o[a]=u),u},set(o,a,d){return s.value[a]=d,!0}})}else return this._createInstance(n,l,r)}}e.InstantiationService=g;class t{constructor(n,l){this.type=n,this.name=l,this._start=Date.now(),this._dep=[]}static traceInvocation(n){return p?new t(1,n.name||n.toString().substring(0,42).replace(/\n/g,"")):t._None}static traceCreation(n){return p?new t(0,n.name):t._None}branch(n,l){let c=new t(2,n.toString());return this._dep.push([n,l,c]),c}stop(){let n=Date.now()-this._start;t._totals+=n;let l=!1;function c(s,o){let a=[],d=new Array(s+1).join(" ");for(const[u,f,S]of o._dep)if(f&&S){l=!0,a.push(`${d}CREATES -> ${u}`);let v=c(s+1,S);v&&a.push(v)}else a.push(`${d}uses -> ${u}`);return a.join(`
551`)}let r=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${c(1,this)}`,`DONE, took ${n.toFixed(2)}ms (grand total ${t._totals.toFixed(2)}ms)`];(n>2||l)&&console.log(r.join(`
552`))}}e.Trace=t,t._None=new class extends t{constructor(){super(-1,null)}stop(){}branch(){return this}},t._totals=0}),define(te[608],ie([1,0,10,4,2,585]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractKeybindingService=void 0;const w=/^(cursor|delete)/;class b extends D.Disposable{constructor(g,t,i,n,l){super();this._contextKeyService=g,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=l,this._onDidUpdateKeybindings=this._register(new m.Emitter),this._currentChord=null,this._currentChordChecker=new y.IntervalTimer,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=p.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new y.TimeoutTimer,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:m.Event.None}dispose(){super.dispose()}_log(g){this._logging&&this._logService.info(`[KeybindingService]: ${g}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(g,t){const i=this._getResolver().lookupPrimaryKeybinding(g,t||this._contextKeyService);if(!!i)return i.resolvedKeybinding}dispatchEvent(g,t){return this._dispatch(g,t)}softDispatch(g,t){const i=this.resolveKeyboardEvent(g);if(i.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[n]=i.getDispatchParts();if(n===null)return null;const l=this._contextKeyService.getContext(t),c=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(l,c,n)}_enterChordMode(g,t){this._currentChord={keypress:g,label:t},this._currentChordStatusMessage=this._notificationService.status(I.localize(0,null,t));const i=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-i>5e3&&this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(g,t){return this._doDispatch(this.resolveKeyboardEvent(g),t,!1)}_singleModifierDispatch(g,t){const i=this.resolveKeyboardEvent(g),[n]=i.getSingleModifierDispatchParts();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=p.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=p.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[l]=i.getParts();return this._ignoreSingleModifiers=new p(l),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(g,t,i=!1){let n=!1;if(g.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let l=null,c=null;if(i){const[a]=g.getSingleModifierDispatchParts();l=a,c=a}else[l]=g.getDispatchParts(),c=this._currentChord?this._currentChord.keypress:null;if(l===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const r=this._contextKeyService.getContext(t),s=g.getLabel(),o=this._getResolver().resolve(r,c,l);return this._logService.trace("KeybindingService#dispatch",s,o==null?void 0:o.commandId),o&&o.enterChord?(n=!0,this._enterChordMode(l,s),n):(this._currentChord&&(!o||!o.commandId)&&(this._notificationService.status(I.localize(1,null,this._currentChord.label,s),{hideAfter:10*1e3}),n=!0),this._leaveChordMode(),o&&o.commandId&&(o.bubble||(n=!0),typeof o.commandArgs=="undefined"?this._commandService.executeCommand(o.commandId).then(void 0,a=>this._notificationService.warn(a)):this._commandService.executeCommand(o.commandId,o.commandArgs).then(void 0,a=>this._notificationService.warn(a)),w.test(o.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:o.commandId,from:"keybinding"})),n)}mightProducePrintableCharacter(g){return g.ctrlKey||g.metaKey?!1:g.keyCode>=31&&g.keyCode<=56||g.keyCode>=21&&g.keyCode<=30}}e.AbstractKeybindingService=b;class p{constructor(g){this._ctrlKey=g?g.ctrlKey:!1,this._shiftKey=g?g.shiftKey:!1,this._altKey=g?g.altKey:!1,this._metaKey=g?g.metaKey:!1}has(g){switch(g){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}p.EMPTY=new p(null)}),define(te[609],ie([1,0,13,193,94]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseResolvedKeybinding=void 0;class I extends D.ResolvedKeybinding{constructor(b,p){super();if(p.length===0)throw(0,y.illegalArgument)("parts");this._os=b,this._parts=p}getLabel(){return m.UILabelProvider.toLabel(this._os,this._parts,b=>this._getLabel(b))}getAriaLabel(){return m.AriaLabelProvider.toLabel(this._os,this._parts,b=>this._getAriaLabel(b))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:m.ElectronAcceleratorLabelProvider.toLabel(this._os,this._parts,b=>this._getElectronAccelerator(b))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(b=>this._getPart(b))}_getPart(b){return new D.ResolvedKeybindingPart(b.ctrlKey,b.shiftKey,b.altKey,b.metaKey,this._getLabel(b),this._getAriaLabel(b))}getDispatchParts(){return this._parts.map(b=>this._getDispatchPart(b))}getSingleModifierDispatchParts(){return this._parts.map(b=>this._getSingleModifierDispatchPart(b))}}e.BaseResolvedKeybinding=I}),define(te[42],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IKeybindingService=void 0,e.IKeybindingService=(0,y.createDecorator)("keybindingService")}),define(te[610],ie([1,0,16]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingResolver=void 0;class m{constructor(b,p,h){this._log=h,this._defaultKeybindings=b,this._defaultBoundCommands=new Map;for(const g of b){const t=g.command;t&&t.charAt(0)!=="-"&&this._defaultBoundCommands.set(t,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=m.handleRemovals([].concat(b).concat(p));for(let g=0,t=this._keybindings.length;g<t;g++){let i=this._keybindings[g];i.keypressParts.length!==0&&(i.when&&i.when.type===0||this._addKeyPress(i.keypressParts[0],i))}}static _isTargetedForRemoval(b,p,h,g){return!(p&&b.keypressParts[0]!==p||h&&b.keypressParts[1]!==h||g&&(!b.when||!(0,y.expressionsAreEqualWithConstantSubstitution)(g,b.when)))}static handleRemovals(b){const p=new Map;for(let g=0,t=b.length;g<t;g++){const i=b[g];if(i.command&&i.command.charAt(0)==="-"){const n=i.command.substring(1);p.has(n)?p.get(n).push(i):p.set(n,[i])}}if(p.size===0)return b;const h=[];for(let g=0,t=b.length;g<t;g++){const i=b[g];if(!i.command||i.command.length===0){h.push(i);continue}if(i.command.charAt(0)==="-")continue;const n=p.get(i.command);if(!n||!i.isDefault){h.push(i);continue}let l=!1;for(const c of n){const r=c.keypressParts[0],s=c.keypressParts[1],o=c.when;if(this._isTargetedForRemoval(i,r,s,o)){l=!0;break}}if(!l){h.push(i);continue}}return h}_addKeyPress(b,p){const h=this._map.get(b);if(typeof h=="undefined"){this._map.set(b,[p]),this._addToLookupMap(p);return}for(let g=h.length-1;g>=0;g--){let t=h[g];if(t.command===p.command)continue;const i=t.keypressParts.length>1,n=p.keypressParts.length>1;i&&n&&t.keypressParts[1]!==p.keypressParts[1]||m.whenIsEntirelyIncluded(t.when,p.when)&&this._removeFromLookupMap(t)}h.push(p),this._addToLookupMap(p)}_addToLookupMap(b){if(!b.command)return;let p=this._lookupMap.get(b.command);typeof p=="undefined"?(p=[b],this._lookupMap.set(b.command,p)):p.push(b)}_removeFromLookupMap(b){if(!b.command)return;let p=this._lookupMap.get(b.command);if(typeof p!="undefined"){for(let h=0,g=p.length;h<g;h++)if(p[h]===b){p.splice(h,1);return}}}static whenIsEntirelyIncluded(b,p){return!p||p.type===1?!0:!b||b.type===1?!1:(0,y.implies)(b,p)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(b,p){const h=this._lookupMap.get(b);if(typeof h=="undefined"||h.length===0)return null;if(h.length===1)return h[0];for(let g=h.length-1;g>=0;g--){const t=h[g];if(p.contextMatchesRules(t.when))return t}return h[h.length-1]}resolve(b,p,h){this._log(`| Resolving ${h}${p?` chorded from ${p}`:""}`);let g=null;if(p!==null){const i=this._map.get(p);if(typeof i=="undefined")return this._log("\\ No keybinding entries."),null;g=[];for(let n=0,l=i.length;n<l;n++){let c=i[n];c.keypressParts[1]===h&&g.push(c)}}else{const i=this._map.get(h);if(typeof i=="undefined")return this._log("\\ No keybinding entries."),null;g=i}let t=this._findCommand(b,g);return t?p===null&&t.keypressParts.length>1&&t.keypressParts[1]!==null?(this._log(`\\ From ${g.length} keybinding entries, matched chord, when: ${D(t.when)}, source: ${I(t)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${g.length} keybinding entries, matched ${t.command}, when: ${D(t.when)}, source: ${I(t)}.`),{enterChord:!1,leaveChord:t.keypressParts.length>1,commandId:t.command,commandArgs:t.commandArgs,bubble:t.bubble}):(this._log(`\\ From ${g.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(b,p){for(let h=p.length-1;h>=0;h--){let g=p[h];if(!!m._contextMatchesRules(b,g.when))return g}return null}static _contextMatchesRules(b,p){return p?p.evaluate(b):!0}}e.KeybindingResolver=m;function D(w){return w?`${w.serialize()}`:"no when condition"}function I(w){return w.extensionId?w.isBuiltinExtension?`built-in extension ${w.extensionId}`:`user extension ${w.extensionId}`:w.isDefault?"built-in":"user"}}),define(te[274],ie([1,0]),function(j,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeElementsAfterNulls=e.ResolvedKeybindingItem=void 0;class y{constructor(I,w,b,p,h,g,t){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=I,this.keypressParts=I?m(I.getDispatchParts()):[],I&&this.keypressParts.length===0&&(this.keypressParts=m(I.getSingleModifierDispatchParts())),this.bubble=w?w.charCodeAt(0)===94:!1,this.command=this.bubble?w.substr(1):w,this.commandArgs=b,this.when=p,this.isDefault=h,this.extensionId=g,this.isBuiltinExtension=t}}e.ResolvedKeybindingItem=y;function m(D){let I=[];for(let w=0,b=D.length;w<b;w++){const p=D[w];if(!p)return I;I.push(p)}return I}e.removeElementsAfterNulls=m}),define(te[611],ie([1,0,55,94,609,274]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USLayoutResolvedKeybinding=void 0;class w extends D.BaseResolvedKeybinding{constructor(p,h){super(h,p.parts)}_keyCodeToUILabel(p){if(this._os===2)switch(p){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return y.KeyCodeUtils.toString(p)}_getLabel(p){return p.isDuplicateModifierCase()?"":this._keyCodeToUILabel(p.keyCode)}_getAriaLabel(p){return p.isDuplicateModifierCase()?"":y.KeyCodeUtils.toString(p.keyCode)}_getElectronAccelerator(p){return y.KeyCodeUtils.toElectronAccelerator(p.keyCode)}_getDispatchPart(p){return w.getDispatchStr(p)}static getDispatchStr(p){if(p.isModifierKey())return null;let h="";return p.ctrlKey&&(h+="ctrl+"),p.shiftKey&&(h+="shift+"),p.altKey&&(h+="alt+"),p.metaKey&&(h+="meta+"),h+=y.KeyCodeUtils.toString(p.keyCode),h}_getSingleModifierDispatchPart(p){return p.keyCode===5&&!p.shiftKey&&!p.altKey&&!p.metaKey?"ctrl":p.keyCode===4&&!p.ctrlKey&&!p.altKey&&!p.metaKey?"shift":p.keyCode===6&&!p.ctrlKey&&!p.shiftKey&&!p.metaKey?"alt":p.keyCode===57&&!p.ctrlKey&&!p.shiftKey&&!p.altKey?"meta":null}static _scanCodeToKeyCode(p){const h=y.IMMUTABLE_CODE_TO_KEY_CODE[p];if(h!==-1)return h;switch(p){case 10:return 31;case 11:return 32;case 12:return 33;case 13:return 34;case 14:return 35;case 15:return 36;case 16:return 37;case 17:return 38;case 18:return 39;case 19:return 40;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 45;case 25:return 46;case 26:return 47;case 27:return 48;case 28:return 49;case 29:return 50;case 30:return 51;case 31:return 52;case 32:return 53;case 33:return 54;case 34:return 55;case 35:return 56;case 36:return 22;case 37:return 23;case 38:return 24;case 39:return 25;case 40:return 26;case 41:return 27;case 42:return 28;case 43:return 29;case 44:return 30;case 45:return 21;case 51:return 83;case 52:return 81;case 53:return 87;case 54:return 89;case 55:return 88;case 56:return 0;case 57:return 80;case 58:return 90;case 59:return 86;case 60:return 82;case 61:return 84;case 62:return 85;case 106:return 92}return 0}static _resolveSimpleUserBinding(p){if(!p)return null;if(p instanceof m.SimpleKeybinding)return p;const h=this._scanCodeToKeyCode(p.scanCode);return h===0?null:new m.SimpleKeybinding(p.ctrlKey,p.shiftKey,p.altKey,p.metaKey,h)}static resolveUserBinding(p,h){const g=(0,I.removeElementsAfterNulls)(p.map(t=>this._resolveSimpleUserBinding(t)));return g.length>0?[new w(new m.ChordKeybinding(g),h)]:[]}}e.USLayoutResolvedKeybinding=w}),define(te[128],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILabelService=void 0,e.ILabelService=(0,y.createDecorator)("labelService")}),define(te[129],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILayoutService=void 0,e.ILayoutService=(0,y.createDecorator)("layoutService")}),define(te[275],ie([1,0,7,4,129,28,53]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScopedLayoutService=void 0;let b=class{constructor(g){this._codeEditorService=g,this.onDidLayout=m.Event.None}get dimension(){return this._dimension||(this._dimension=y.getClientArea(window.document.body)),this._dimension}get hasContainer(){return!1}get container(){throw new Error("ILayoutService.container is not available in the standalone editor!")}focus(){var g;(g=this._codeEditorService.getFocusedCodeEditor())===null||g===void 0||g.focus()}};b=Ie([Ce(0,I.ICodeEditorService)],b);let p=class extends b{constructor(g,t){super(t);this._container=g}get hasContainer(){return!1}get container(){return this._container}};p=Ie([Ce(1,I.ICodeEditorService)],p),e.EditorScopedLayoutService=p,(0,w.registerSingleton)(D.ILayoutService,b)}),define(te[612],ie([1,0,222,2,129]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextViewService=void 0;let I=class extends m.Disposable{constructor(b){super();this.layoutService=b,this.currentViewDisposable=m.Disposable.None,this.container=b.hasContainer?b.container:null,this.contextView=this._register(new y.ContextView(this.container,1)),this.layout(),this._register(b.onDidLayout(()=>this.layout()))}setContainer(b,p){this.contextView.setContainer(b,p||1)}showContextView(b,p,h){p?p!==this.container&&(this.container=p,this.setContainer(p,h?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(b);const g=(0,m.toDisposable)(()=>{this.currentViewDisposable===g&&this.hideContextView()});return this.currentViewDisposable=g,g}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(b){this.contextView.hide(b)}};I=Ie([Ce(0,D.ILayoutService)],I),e.ContextViewService=I}),define(te[64],ie([1,0,4,2,9]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogService=e.ConsoleLogger=e.AbstractLogger=e.DEFAULT_LOG_LEVEL=e.LogLevel=e.ILogService=void 0,e.ILogService=(0,D.createDecorator)("logService");var I;(function(h){h[h.Trace=0]="Trace",h[h.Debug=1]="Debug",h[h.Info=2]="Info",h[h.Warning=3]="Warning",h[h.Error=4]="Error",h[h.Critical=5]="Critical",h[h.Off=6]="Off"})(I=e.LogLevel||(e.LogLevel={})),e.DEFAULT_LOG_LEVEL=I.Info;class w extends m.Disposable{constructor(){super(...arguments);this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new y.Emitter)}setLevel(g){this.level!==g&&(this.level=g,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}e.AbstractLogger=w;class b extends w{constructor(g=e.DEFAULT_LOG_LEVEL){super();this.setLevel(g)}trace(g,...t){this.getLevel()<=I.Trace&&console.log("%cTRACE","color: #888",g,...t)}debug(g,...t){this.getLevel()<=I.Debug&&console.log("%cDEBUG","background: #eee; color: #888",g,...t)}info(g,...t){this.getLevel()<=I.Info&&console.log("%c INFO","color: #33f",g,...t)}error(g,...t){this.getLevel()<=I.Error&&console.log("%c ERR","color: #f33",g,...t)}dispose(){}}e.ConsoleLogger=b;class p extends m.Disposable{constructor(g){super();this.logger=g,this._register(g)}getLevel(){return this.logger.getLevel()}trace(g,...t){this.logger.trace(g,...t)}debug(g,...t){this.logger.debug(g,...t)}info(g,...t){this.logger.info(g,...t)}error(g,...t){this.logger.error(g,...t)}}e.LogService=p}),define(te[276],ie([1,0,10,2,219,326,3,18,32,429,45,153,8,19,64,65,13]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l,c,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorWorkerClient=e.EditorWorkerHost=e.EditorWorkerService=void 0;const s=60*1e3,o=5*60*1e3;function a(L,E){const N=L.getModel(E);return!(!N||N.isTooLargeForSyncing())}let d=class extends m.Disposable{constructor(E,N,k,M){super();this._modelService=E,this._workerManager=this._register(new f(this._modelService,M)),this._logService=k,this._register(b.LinkProviderRegistry.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(O,B)=>a(this._modelService,O.uri)?this._workerManager.withWorker().then(T=>T.computeLinks(O.uri)).then(T=>T&&{links:T}):Promise.resolve({links:[]})})),this._register(b.CompletionProviderRegistry.register("*",new u(this._workerManager,N,this._modelService,M)))}dispose(){super.dispose()}canComputeUnicodeHighlights(E){return a(this._modelService,E)}computedUnicodeHighlights(E,N,k){return this._workerManager.withWorker().then(M=>M.computedUnicodeHighlights(E,N,k))}computeDiff(E,N,k,M){return this._workerManager.withWorker().then(O=>O.computeDiff(E,N,k,M))}computeMoreMinimalEdits(E,N){if((0,n.isNonEmptyArray)(N)){if(!a(this._modelService,E))return Promise.resolve(N);const k=c.StopWatch.create(!0),M=this._workerManager.withWorker().then(O=>O.computeMoreMinimalEdits(E,N));return M.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",E.toString(!0),k.elapsed())),Promise.race([M,(0,y.timeout)(1e3).then(()=>N)])}else return Promise.resolve(void 0)}canNavigateValueSet(E){return a(this._modelService,E)}navigateValueSet(E,N,k){return this._workerManager.withWorker().then(M=>M.navigateValueSet(E,N,k))}canComputeWordRanges(E){return a(this._modelService,E)}computeWordRanges(E,N){return this._workerManager.withWorker().then(k=>k.computeWordRanges(E,N))}};d=Ie([Ce(0,g.IModelService),Ce(1,t.ITextResourceConfigurationService),Ce(2,l.ILogService),Ce(3,p.ILanguageConfigurationService)],d),e.EditorWorkerService=d;class u{constructor(E,N,k,M){this.languageConfigurationService=M,this._debugDisplayName="wordbasedCompletions",this._workerManager=E,this._configurationService=N,this._modelService=k}provideCompletionItems(E,N){return ye(this,void 0,void 0,function*(){const k=this._configurationService.getValue(E.uri,N,"editor");if(!k.wordBasedSuggestions)return;const M=[];if(k.wordBasedSuggestionsMode==="currentDocument")a(this._modelService,E.uri)&&M.push(E.uri);else for(const W of this._modelService.getModels())!a(this._modelService,W.uri)||(W===E?M.unshift(W.uri):(k.wordBasedSuggestionsMode==="allDocuments"||W.getLanguageId()===E.getLanguageId())&&M.push(W.uri));if(M.length===0)return;const O=this.languageConfigurationService.getLanguageConfiguration(E.getLanguageId()).getWordDefinition(),B=E.getWordAtPosition(N),T=B?new w.Range(N.lineNumber,B.startColumn,N.lineNumber,B.endColumn):w.Range.fromPositions(N),R=T.setEndPosition(N.lineNumber,N.column),F=yield(yield this._workerManager.withWorker()).textualSuggest(M,B==null?void 0:B.word,O);if(!!F)return{duration:F.duration,suggestions:F.words.map(W=>({kind:18,label:W,insertText:W,range:{insert:R,replace:T}}))}})}}class f extends m.Disposable{constructor(E,N){super();this.languageConfigurationService=N,this._modelService=E,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new y.IntervalTimer).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(o/2)),this._register(this._modelService.onModelRemoved(M=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>o&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new _(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class S extends m.Disposable{constructor(E,N,k){super();if(this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=E,this._modelService=N,!k){const M=new y.IntervalTimer;M.cancelAndSet(()=>this._checkStopModelSync(),Math.round(s/2)),this._register(M)}}dispose(){for(let E in this._syncedModels)(0,m.dispose)(this._syncedModels[E]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(E,N){for(const k of E){const M=k.toString();this._syncedModels[M]||this._beginModelSync(k,N),this._syncedModels[M]&&(this._syncedModelsLastUsedTime[M]=new Date().getTime())}}_checkStopModelSync(){const E=new Date().getTime(),N=[];for(let k in this._syncedModelsLastUsedTime)E-this._syncedModelsLastUsedTime[k]>s&&N.push(k);for(const k of N)this._stopModelSync(k)}_beginModelSync(E,N){const k=this._modelService.getModel(E);if(!k||!N&&k.isTooLargeForSyncing())return;const M=E.toString();this._proxy.acceptNewModel({url:k.uri.toString(),lines:k.getLinesContent(),EOL:k.getEOL(),versionId:k.getVersionId()});const O=new m.DisposableStore;O.add(k.onDidChangeContent(B=>{this._proxy.acceptModelChanged(M.toString(),B)})),O.add(k.onWillDispose(()=>{this._stopModelSync(M)})),O.add((0,m.toDisposable)(()=>{this._proxy.acceptRemovedModel(M)})),this._syncedModels[M]=O}_stopModelSync(E){const N=this._syncedModels[E];delete this._syncedModels[E],delete this._syncedModelsLastUsedTime[E],(0,m.dispose)(N)}}class v{constructor(E){this._instance=E,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class C{constructor(E){this._workerClient=E}fhr(E,N){return this._workerClient.fhr(E,N)}}e.EditorWorkerHost=C;class _ extends m.Disposable{constructor(E,N,k,M){super();this.languageConfigurationService=M,this._disposed=!1,this._modelService=E,this._keepIdleModels=N,this._workerFactory=new I.DefaultWorkerFactory(k),this._worker=null,this._modelManager=null}fhr(E,N){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new D.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new C(this)))}catch(E){(0,D.logOnceWebWorkerWarning)(E),this._worker=new v(new h.EditorSimpleWorker(new C(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,E=>((0,D.logOnceWebWorkerWarning)(E),this._worker=new v(new h.EditorSimpleWorker(new C(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(E){return this._modelManager||(this._modelManager=this._register(new S(E,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(E,N=!1){return ye(this,void 0,void 0,function*(){return this._disposed?Promise.reject((0,r.canceled)()):this._getProxy().then(k=>(this._getOrCreateModelManager(k).ensureSyncedResources(E,N),k))})}computedUnicodeHighlights(E,N,k){return this._withSyncedResources([E]).then(M=>M.computeUnicodeHighlights(E.toString(),N,k))}computeDiff(E,N,k,M){return this._withSyncedResources([E,N],!0).then(O=>O.computeDiff(E.toString(),N.toString(),k,M))}computeMoreMinimalEdits(E,N){return this._withSyncedResources([E]).then(k=>k.computeMoreMinimalEdits(E.toString(),N))}computeLinks(E){return this._withSyncedResources([E]).then(N=>N.computeLinks(E.toString()))}textualSuggest(E,N,k){return ye(this,void 0,void 0,function*(){const M=yield this._withSyncedResources(E),O=k.source,B=(0,i.regExpFlags)(k);return M.textualSuggest(E.map(T=>T.toString()),N,O,B)})}computeWordRanges(E,N){return this._withSyncedResources([E]).then(k=>{const M=this._modelService.getModel(E);if(!M)return Promise.resolve(null);const O=this.languageConfigurationService.getLanguageConfiguration(M.getLanguageId()).getWordDefinition(),B=O.source,T=(0,i.regExpFlags)(O);return k.computeWordRanges(E.toString(),N,B,T)})}navigateValueSet(E,N,k){return this._withSyncedResources([E]).then(M=>{const O=this._modelService.getModel(E);if(!O)return null;const B=this.languageConfigurationService.getLanguageConfiguration(O.getLanguageId()).getWordDefinition(),T=B.source,R=(0,i.regExpFlags)(B);return M.navigateValueSet(E.toString(),N,k,T,R)})}dispose(){super.dispose(),this._disposed=!0}}e.EditorWorkerClient=_}),define(te[613],ie([1,0,276,20]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWebWorker=void 0;function D(w,b,p){return new I(w,b,p)}e.createWebWorker=D;class I extends y.EditorWorkerClient{constructor(b,p,h){super(b,h.keepIdleModels||!1,h.label,p);this._foreignModuleId=h.moduleId,this._foreignModuleCreateData=h.createData||null,this._foreignModuleHost=h.host||null,this._foreignProxy=null}fhr(b,p){if(!this._foreignModuleHost||typeof this._foreignModuleHost[b]!="function")return Promise.reject(new Error("Missing method "+b+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[b].apply(this._foreignModuleHost,p))}catch(h){return Promise.reject(h)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(b=>{const p=this._foreignModuleHost?m.getAllMethodNames(this._foreignModuleHost):[];return b.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,p).then(h=>{this._foreignModuleCreateData=null;const g=(n,l)=>b.fmr(n,l),t=(n,l)=>function(){const c=Array.prototype.slice.call(arguments,0);return l(n,c)},i={};for(const n of h)i[n]=t(n,g);return i})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(b){return this._withSyncedResources(b).then(p=>this.getProxy())}}}),define(te[92],ie([1,0,112,47,111,53,9,64]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureDebounceService=e.ILanguageFeatureDebounceService=void 0,e.ILanguageFeatureDebounceService=(0,w.createDecorator)("ILanguageFeatureDebounceService");var p;(function(t){const i=new WeakMap;let n=0;function l(c){let r=i.get(c);return r===void 0&&(r=++n,i.set(c,r)),r}t.of=l})(p||(p={}));class h{constructor(i,n,l,c,r,s){this._logService=i,this._name=n,this._registry=l,this._default=c,this._min=r,this._max=s,this._cache=new m.LRUCache(50,.7)}_key(i){return i.id+this._registry.all(i).reduce((n,l)=>(0,y.doHash)(p.of(l),n),0)}get(i){const n=this._key(i),l=this._cache.get(n);return l?(0,D.clamp)(l.value,this._min,this._max):this.default()}update(i,n){const l=this._key(i);let c=this._cache.get(l);c||(c=new D.SlidingWindowAverage(6),this._cache.set(l,c));const r=(0,D.clamp)(c.update(n),this._min,this._max);return this._logService.trace(`[DEBOUNCE: ${this._name}] for ${i.uri.toString()} is ${r}ms`),r}_overall(){const i=new D.MovingAverage;for(const[,n]of this._cache)i.update(n.value);return i.value}default(){const i=this._overall()|0||this._default;return(0,D.clamp)(i,this._min,this._max)}}let g=class{constructor(i){this._logService=i,this._data=new Map}for(i,n,l){var c,r,s;const o=(c=l==null?void 0:l.min)!==null&&c!==void 0?c:50,a=(r=l==null?void 0:l.max)!==null&&r!==void 0?r:Math.pow(o,2),d=(s=l==null?void 0:l.key)!==null&&s!==void 0?s:void 0,u=`${p.of(i)},${o}${d?","+d:""}`;let f=this._data.get(u);return f||(f=new h(this._logService,n,i,this._overallAverage()|0||o*1.5,o,a),this._data.set(u,f)),f}_overallAverage(){let i=new D.MovingAverage;for(let n of this._data.values())i.update(n.default());return i.value}};g=Ie([Ce(0,b.ILogService)],g),e.LanguageFeatureDebounceService=g,(0,I.registerSingleton)(e.ILanguageFeatureDebounceService,g,!0)}),define(te[199],ie([1,0,19,21,13,54,47,11,3,18,92,9,53,45,2]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModelService=e.IOutlineModelService=e.OutlineModel=e.OutlineGroup=e.OutlineElement=e.TreeElement=void 0;class c{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(u,f){let S;typeof u=="string"?S=`${f.id}/${u}`:(S=`${f.id}/${u.name}`,f.children.get(S)!==void 0&&(S=`${f.id}/${u.name}_${u.range.startLineNumber}_${u.range.startColumn}`));let v=S;for(let C=0;f.children.get(v)!==void 0;C++)v=`${S}_${C}`;return v}static empty(u){return u.children.size===0}}e.TreeElement=c;class r extends c{constructor(u,f,S){super();this.id=u,this.parent=f,this.symbol=S,this.children=new Map}}e.OutlineElement=r;class s extends c{constructor(u,f,S,v){super();this.id=u,this.parent=f,this.label=S,this.order=v,this.children=new Map}}e.OutlineGroup=s;class o extends c{constructor(u){super();this.uri=u,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}static create(u,f){const S=new m.CancellationTokenSource(f),v=new o(u.uri),C=h.DocumentSymbolProviderRegistry.ordered(u),_=C.map((E,N)=>{var k;let M=c.findId(`provider_${N}`,v),O=new s(M,v,(k=E.displayName)!==null&&k!==void 0?k:"Unknown Outline Provider",N);return Promise.resolve(E.provideDocumentSymbols(u,S.token)).then(B=>{for(const T of B||[])o._makeOutlineElement(T,O);return O},B=>((0,D.onUnexpectedExternalError)(B),O)).then(B=>{c.empty(B)?B.remove():v._groups.set(M,B)})}),L=h.DocumentSymbolProviderRegistry.onDidChange(()=>{const E=h.DocumentSymbolProviderRegistry.ordered(u);(0,y.equals)(E,C)||S.cancel()});return Promise.all(_).then(()=>S.token.isCancellationRequested&&!f.isCancellationRequested?o.create(u,f):v._compact()).finally(()=>{L.dispose()})}static _makeOutlineElement(u,f){let S=c.findId(u,f),v=new r(S,f,u);if(u.children)for(const C of u.children)o._makeOutlineElement(C,v);f.children.set(v.id,v)}_compact(){let u=0;for(const[f,S]of this._groups)S.children.size===0?this._groups.delete(f):u+=1;if(u!==1)this.children=this._groups;else{let f=I.Iterable.first(this._groups.values());for(let[,S]of f.children)S.parent=this,this.children.set(S.id,S)}return this}getTopLevelSymbols(){const u=[];for(const f of this.children.values())f instanceof r?u.push(f.symbol):u.push(...I.Iterable.map(f.children.values(),S=>S.symbol));return u.sort((f,S)=>p.Range.compareRangesUsingStarts(f.range,S.range))}asListOfDocumentSymbols(){const u=this.getTopLevelSymbols(),f=[];return o._flattenDocumentSymbols(f,u,""),f.sort((S,v)=>b.Position.compare(p.Range.getStartPosition(S.range),p.Range.getStartPosition(v.range))||b.Position.compare(p.Range.getEndPosition(v.range),p.Range.getEndPosition(S.range)))}static _flattenDocumentSymbols(u,f,S){for(const v of f)u.push({kind:v.kind,tags:v.tags,name:v.name,detail:v.detail,containerName:v.containerName||S,range:v.range,selectionRange:v.selectionRange,children:void 0}),v.children&&o._flattenDocumentSymbols(u,v.children,v.name)}}e.OutlineModel=o,e.IOutlineModelService=(0,t.createDecorator)("IOutlineModelService");let a=class{constructor(u,f){this._disposables=new l.DisposableStore,this._cache=new w.LRUCache(10,.7),this._debounceInformation=u.for(h.DocumentSymbolProviderRegistry,"DocumentSymbols",{min:350}),this._disposables.add(f.onModelRemoved(S=>{this._cache.delete(S.id)}))}dispose(){this._disposables.dispose()}getOrCreate(u,f){return ye(this,void 0,void 0,function*(){const S=h.DocumentSymbolProviderRegistry.ordered(u);let v=this._cache.get(u.id);if(!v||v.versionId!==u.getVersionId()||!(0,y.equals)(v.provider,S)){let _=new m.CancellationTokenSource;v={versionId:u.getVersionId(),provider:S,promiseCnt:0,source:_,promise:o.create(u,_.token),model:void 0},this._cache.set(u.id,v);const L=Date.now();v.promise.then(E=>{v.model=E,this._debounceInformation.update(u,Date.now()-L)}).catch(E=>{this._cache.delete(u.id)})}if(v.model)return v.model;v.promiseCnt+=1;const C=f.onCancellationRequested(()=>{--v.promiseCnt==0&&(v.source.cancel(),this._cache.delete(u.id))});try{return yield v.promise}finally{C.dispose()}})}};a=Ie([Ce(0,g.ILanguageFeatureDebounceService),Ce(1,n.IModelService)],a),e.OutlineModelService=a,(0,i.registerSingleton)(e.IOutlineModelService,a,!0)}),define(te[614],ie([1,0,21,20,25,58,199,26]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),b.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider",function(p,...h){return ye(this,void 0,void 0,function*(){const[g]=h;(0,m.assertType)(D.URI.isUri(g));const t=p.get(w.IOutlineModelService),n=yield p.get(I.ITextModelService).createModelReference(g);try{return(yield t.getOrCreate(n.object.textEditorModel,y.CancellationToken.None)).getTopLevelSymbols()}finally{n.dispose()}})})}),define(te[615],ie([1,0,34,7,10,2,129,64]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserClipboardService=void 0;let p=class extends I.Disposable{constructor(g,t){super();this.layoutService=g,this.logService=t,this.mapTextToType=new Map,this.findText="",(y.isSafari||y.isWebkitWebView)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const g=()=>{const t=new D.DeferredPromise;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=t,navigator.clipboard.write([new ClipboardItem({"text/plain":t.p})]).catch(i=>ye(this,void 0,void 0,function*(){(!(i instanceof Error)||i.name!=="NotAllowedError"||!t.isRejected)&&this.logService.error(i)}))};this.layoutService.hasContainer&&(this._register((0,m.addDisposableListener)(this.layoutService.container,"click",g)),this._register((0,m.addDisposableListener)(this.layoutService.container,"keydown",g)))}writeText(g,t){return ye(this,void 0,void 0,function*(){if(t){this.mapTextToType.set(t,g);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(g);try{return yield navigator.clipboard.writeText(g)}catch(l){console.error(l)}const i=document.activeElement,n=document.body.appendChild((0,m.$)("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=g,n.focus(),n.select(),document.execCommand("copy"),i instanceof HTMLElement&&i.focus(),document.body.removeChild(n)})}readText(g){return ye(this,void 0,void 0,function*(){if(g)return this.mapTextToType.get(g)||"";try{return yield navigator.clipboard.readText()}catch(t){return console.error(t),""}})}readFindText(){return ye(this,void 0,void 0,function*(){return this.findText})}writeFindText(g){return ye(this,void 0,void 0,function*(){this.findText=g})}};p=Ie([Ce(0,w.ILayoutService),Ce(1,b.ILogService)],p),e.BrowserClipboardService=p}),define(te[77],ie([1,0,74,587,9]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerService=e.IMarkerData=e.MarkerSeverity=void 0;var I;(function(b){b[b.Hint=1]="Hint",b[b.Info=2]="Info",b[b.Warning=4]="Warning",b[b.Error=8]="Error"})(I=e.MarkerSeverity||(e.MarkerSeverity={})),function(b){function p(n,l){return l-n}b.compare=p;const h=Object.create(null);h[b.Error]=(0,m.localize)(0,null),h[b.Warning]=(0,m.localize)(1,null),h[b.Info]=(0,m.localize)(2,null);function g(n){return h[n]||""}b.toString=g;function t(n){switch(n){case y.default.Error:return b.Error;case y.default.Warning:return b.Warning;case y.default.Info:return b.Info;case y.default.Ignore:return b.Hint}}b.fromSeverity=t;function i(n){switch(n){case b.Error:return y.default.Error;case b.Warning:return y.default.Warning;case b.Info:return y.default.Info;case b.Hint:return y.default.Ignore}}b.toSeverity=i}(I=e.MarkerSeverity||(e.MarkerSeverity={}));var w;(function(b){const p="";function h(t){return g(t,!0)}b.makeKey=h;function g(t,i){let n=[p];return t.source?n.push(t.source.replace("\xA6","\\\xA6")):n.push(p),t.code?typeof t.code=="string"?n.push(t.code.replace("\xA6","\\\xA6")):n.push(t.code.value.replace("\xA6","\\\xA6")):n.push(p),t.severity!==void 0&&t.severity!==null?n.push(I.toString(t.severity)):n.push(p),t.message&&i?n.push(t.message.replace("\xA6","\\\xA6")):n.push(p),t.startLineNumber!==void 0&&t.startLineNumber!==null?n.push(t.startLineNumber.toString()):n.push(p),t.startColumn!==void 0&&t.startColumn!==null?n.push(t.startColumn.toString()):n.push(p),t.endLineNumber!==void 0&&t.endLineNumber!==null?n.push(t.endLineNumber.toString()):n.push(p),t.endColumn!==void 0&&t.endColumn!==null?n.push(t.endColumn.toString()):n.push(p),n.push(p),n.join("\xA6")}b.makeKeyOptionalMessage=g})(w=e.IMarkerData||(e.IMarkerData={})),e.IMarkerService=(0,D.createDecorator)("markerService")}),define(te[616],ie([1,0,19,4,2,81,8,25,3,53,9,77,40]),function(j,e,y,m,D,I,w,b,p,h,g,t,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerNavigationService=e.MarkerList=e.MarkerCoordinate=void 0;class n{constructor(s,o,a){this.marker=s,this.index=o,this.total=a}}e.MarkerCoordinate=n;let l=class{constructor(s,o,a){this._markerService=o,this._configService=a,this._onDidChange=new m.Emitter,this.onDidChange=this._onDidChange.event,this._dispoables=new D.DisposableStore,this._markers=[],this._nextIdx=-1,b.URI.isUri(s)?this._resourceFilter=S=>S.toString()===s.toString():s&&(this._resourceFilter=s);const d=this._configService.getValue("problems.sortOrder"),u=(S,v)=>{let C=(0,w.compare)(S.resource.toString(),v.resource.toString());return d==="position"?C=p.Range.compareRangesUsingStarts(S,v)||t.MarkerSeverity.compare(S.severity,v.severity):C=t.MarkerSeverity.compare(S.severity,v.severity)||p.Range.compareRangesUsingStarts(S,v),C},f=()=>{this._markers=this._markerService.read({resource:b.URI.isUri(s)?s:void 0,severities:t.MarkerSeverity.Error|t.MarkerSeverity.Warning|t.MarkerSeverity.Info}),typeof s=="function"&&(this._markers=this._markers.filter(S=>this._resourceFilter(S.resource))),this._markers.sort(u)};f(),this._dispoables.add(o.onMarkerChanged(S=>{(!this._resourceFilter||S.some(v=>this._resourceFilter(v)))&&(f(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(s){return!this._resourceFilter&&!s?!0:!this._resourceFilter||!s?!1:this._resourceFilter(s)}get selected(){const s=this._markers[this._nextIdx];return s&&new n(s,this._nextIdx+1,this._markers.length)}_initIdx(s,o,a){let d=!1,u=this._markers.findIndex(f=>f.resource.toString()===s.uri.toString());u<0&&(u=(0,y.binarySearch)(this._markers,{resource:s.uri},(f,S)=>(0,w.compare)(f.resource.toString(),S.resource.toString())),u<0&&(u=~u));for(let f=u;f<this._markers.length;f++){let S=p.Range.lift(this._markers[f]);if(S.isEmpty()){const v=s.getWordAtPosition(S.getStartPosition());v&&(S=new p.Range(S.startLineNumber,v.startColumn,S.startLineNumber,v.endColumn))}if(o&&(S.containsPosition(o)||o.isBeforeOrEqual(S.getStartPosition()))){this._nextIdx=f,d=!0;break}if(this._markers[f].resource.toString()!==s.uri.toString())break}d||(this._nextIdx=a?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(s,o,a){if(this._markers.length===0)return!1;let d=this._nextIdx;return this._nextIdx===-1?this._initIdx(o,a,s):s?this._nextIdx=(this._nextIdx+1)%this._markers.length:s||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),d!==this._nextIdx}find(s,o){let a=this._markers.findIndex(d=>d.resource.toString()===s.toString());if(!(a<0)){for(;a<this._markers.length;a++)if(p.Range.containsPosition(this._markers[a],o))return new n(this._markers[a],a+1,this._markers.length)}}};l=Ie([Ce(1,t.IMarkerService),Ce(2,i.IConfigurationService)],l),e.MarkerList=l,e.IMarkerNavigationService=(0,g.createDecorator)("IMarkerNavigationService");let c=class{constructor(s,o){this._markerService=s,this._configService=o,this._provider=new I.LinkedList}getMarkerList(s){for(let o of this._provider){const a=o.getMarkerList(s);if(a)return a}return new l(s,this._markerService,this._configService)}};c=Ie([Ce(0,t.IMarkerService),Ce(1,i.IConfigurationService)],c),(0,h.registerSingleton)(e.IMarkerNavigationService,c,!0)}),define(te[617],ie([1,0,19,4,54,47,48,25,77]),function(j,e,y,m,D,I,w,b,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerService=void 0;class h{constructor(){this._byResource=new I.ResourceMap,this._byOwner=new Map}set(n,l,c){let r=this._byResource.get(n);r||(r=new Map,this._byResource.set(n,r)),r.set(l,c);let s=this._byOwner.get(l);s||(s=new I.ResourceMap,this._byOwner.set(l,s)),s.set(n,c)}get(n,l){let c=this._byResource.get(n);return c==null?void 0:c.get(l)}delete(n,l){let c=!1,r=!1,s=this._byResource.get(n);s&&(c=s.delete(l));let o=this._byOwner.get(l);if(o&&(r=o.delete(n)),c!==r)throw new Error("illegal state");return c&&r}values(n){var l,c,r,s;return typeof n=="string"?(c=(l=this._byOwner.get(n))===null||l===void 0?void 0:l.values())!==null&&c!==void 0?c:D.Iterable.empty():b.URI.isUri(n)?(s=(r=this._byResource.get(n))===null||r===void 0?void 0:r.values())!==null&&s!==void 0?s:D.Iterable.empty():D.Iterable.map(D.Iterable.concat(...this._byOwner.values()),o=>o[1])}}class g{constructor(n){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new I.ResourceMap,this._service=n,this._subscription=n.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(n){for(const l of n){const c=this._data.get(l);c&&this._substract(c);const r=this._resourceStats(l);this._add(r),this._data.set(l,r)}}_resourceStats(n){const l={errors:0,warnings:0,infos:0,unknowns:0};if(n.scheme===w.Schemas.inMemory||n.scheme===w.Schemas.walkThrough||n.scheme===w.Schemas.walkThroughSnippet)return l;for(const{severity:c}of this._service.read({resource:n}))c===p.MarkerSeverity.Error?l.errors+=1:c===p.MarkerSeverity.Warning?l.warnings+=1:c===p.MarkerSeverity.Info?l.infos+=1:l.unknowns+=1;return l}_substract(n){this.errors-=n.errors,this.warnings-=n.warnings,this.infos-=n.infos,this.unknowns-=n.unknowns}_add(n){this.errors+=n.errors,this.warnings+=n.warnings,this.infos+=n.infos,this.unknowns+=n.unknowns}}class t{constructor(){this._onMarkerChanged=new m.DebounceEmitter({delay:0,merge:t._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new h,this._stats=new g(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(n,l){for(const c of l||[])this.changeOne(n,c,[])}changeOne(n,l,c){if((0,y.isFalsyOrEmpty)(c))this._data.delete(l,n)&&this._onMarkerChanged.fire([l]);else{const r=[];for(const s of c){const o=t._toMarker(n,l,s);o&&r.push(o)}this._data.set(l,n,r),this._onMarkerChanged.fire([l])}}static _toMarker(n,l,c){let{code:r,severity:s,message:o,source:a,startLineNumber:d,startColumn:u,endLineNumber:f,endColumn:S,relatedInformation:v,tags:C}=c;if(!!o)return d=d>0?d:1,u=u>0?u:1,f=f>=d?f:d,S=S>0?S:u,{resource:l,owner:n,code:r,severity:s,message:o,source:a,startLineNumber:d,startColumn:u,endLineNumber:f,endColumn:S,relatedInformation:v,tags:C}}read(n=Object.create(null)){let{owner:l,resource:c,severities:r,take:s}=n;if((!s||s<0)&&(s=-1),l&&c){const o=this._data.get(c,l);if(o){const a=[];for(const d of o)if(t._accept(d,r)){const u=a.push(d);if(s>0&&u===s)break}return a}else return[]}else if(!l&&!c){const o=[];for(let a of this._data.values())for(let d of a)if(t._accept(d,r)){const u=o.push(d);if(s>0&&u===s)return o}return o}else{const o=this._data.values(c??l),a=[];for(const d of o)for(const u of d)if(t._accept(u,r)){const f=a.push(u);if(s>0&&f===s)return a}return a}}static _accept(n,l){return l===void 0||(l&n.severity)===n.severity}static _merge(n){const l=new I.ResourceMap;for(let c of n)for(let r of c)l.set(r,!0);return Array.from(l.keys())}}e.MarkerService=t}),define(te[38],ie([1,0,74,9]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoOpNotification=e.INotificationService=e.Severity=void 0,e.Severity=y.default,e.INotificationService=(0,m.createDecorator)("notificationService");class D{}e.NoOpNotification=D}),define(te[51],ie([1,0,2,8,25,9]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.selectionFragment=e.matchesSomeScheme=e.matchesScheme=e.NullOpenerService=e.IOpenerService=void 0,e.IOpenerService=(0,I.createDecorator)("openerService"),e.NullOpenerService=Object.freeze({_serviceBrand:void 0,registerOpener(){return y.Disposable.None},registerValidator(){return y.Disposable.None},registerExternalUriResolver(){return y.Disposable.None},setDefaultExternalOpener(){},registerExternalOpener(){return y.Disposable.None},open(){return ye(this,void 0,void 0,function*(){return!1})},resolveExternalUri(h){return ye(this,void 0,void 0,function*(){return{resolved:h,dispose(){}}})}});function w(h,g){return D.URI.isUri(h)?(0,m.equalsIgnoreCase)(h.scheme,g):(0,m.startsWithIgnoreCase)(h,g+":")}e.matchesScheme=w;function b(h,...g){return g.some(t=>w(h,t))}e.matchesSomeScheme=b;function p(h){let g;const t=/^L?(\d+)(?:,(\d+))?/.exec(h.fragment);return t&&(g={startLineNumber:parseInt(t[1]),startColumn:t[2]?parseInt(t[2]):1}),g}e.selectionFragment=p}),define(te[618],ie([1,0,7,21,81,47,216,48,41,25,28,26,594,51]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenerService=void 0;let l=class{constructor(o){this._commandService=o}open(o,a){return ye(this,void 0,void 0,function*(){if(!(0,n.matchesScheme)(o,b.Schemas.command))return!1;if(!(a==null?void 0:a.allowCommands))return!0;typeof o=="string"&&(o=h.URI.parse(o));let d=[];try{d=(0,w.parse)(decodeURIComponent(o.query))}catch{try{d=(0,w.parse)(o.query)}catch{}}return Array.isArray(d)||(d=[d]),yield this._commandService.executeCommand(o.path,...d),!0})}};l=Ie([Ce(0,t.ICommandService)],l);let c=class{constructor(o){this._editorService=o}open(o,a){return ye(this,void 0,void 0,function*(){typeof o=="string"&&(o=h.URI.parse(o));const d=(0,n.selectionFragment)(o);return d&&(o=o.with({fragment:""})),o.scheme===b.Schemas.file&&(o=(0,p.normalizePath)(o)),yield this._editorService.openCodeEditor({resource:o,options:Object.assign({selection:d,context:(a==null?void 0:a.fromUserGesture)?i.EditorOpenContext.USER:i.EditorOpenContext.API},a==null?void 0:a.editorOptions)},this._editorService.getFocusedCodeEditor(),a==null?void 0:a.openToSide),!0})}};c=Ie([Ce(0,g.ICodeEditorService)],c);let r=class{constructor(o,a){this._openers=new D.LinkedList,this._validators=new D.LinkedList,this._resolvers=new D.LinkedList,this._resolvedUriTargets=new I.ResourceMap(d=>d.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new D.LinkedList,this._defaultExternalOpener={openExternal:d=>ye(this,void 0,void 0,function*(){return(0,n.matchesSomeScheme)(d,b.Schemas.http,b.Schemas.https)?y.windowOpenNoOpener(d):window.location.href=d,!0})},this._openers.push({open:(d,u)=>ye(this,void 0,void 0,function*(){return(u==null?void 0:u.openExternal)||(0,n.matchesSomeScheme)(d,b.Schemas.mailto,b.Schemas.http,b.Schemas.https,b.Schemas.vsls)?(yield this._doOpenExternal(d,u),!0):!1})}),this._openers.push(new l(a)),this._openers.push(new c(o))}registerOpener(o){return{dispose:this._openers.unshift(o)}}registerValidator(o){return{dispose:this._validators.push(o)}}registerExternalUriResolver(o){return{dispose:this._resolvers.push(o)}}setDefaultExternalOpener(o){this._defaultExternalOpener=o}registerExternalOpener(o){return{dispose:this._externalOpeners.push(o)}}open(o,a){var d;return ye(this,void 0,void 0,function*(){const u=typeof o=="string"?h.URI.parse(o):o,f=(d=this._resolvedUriTargets.get(u))!==null&&d!==void 0?d:o;for(const S of this._validators)if(!(yield S.shouldOpen(f)))return!1;for(const S of this._openers)if(yield S.open(o,a))return!0;return!1})}resolveExternalUri(o,a){return ye(this,void 0,void 0,function*(){for(const d of this._resolvers)try{const u=yield d.resolveExternalUri(o,a);if(u)return this._resolvedUriTargets.has(u.resolved)||this._resolvedUriTargets.set(u.resolved,o),u}catch{}throw new Error("Could not resolve external URI: "+o.toString())})}_doOpenExternal(o,a){return ye(this,void 0,void 0,function*(){const d=typeof o=="string"?h.URI.parse(o):o;let u;try{u=(yield this.resolveExternalUri(d,a)).resolved}catch{u=d}let f;if(typeof o=="string"&&d.toString()===u.toString()?f=o:f=encodeURI(u.toString(!0)),a==null?void 0:a.allowContributedOpeners){const S=typeof(a==null?void 0:a.allowContributedOpeners)=="string"?a==null?void 0:a.allowContributedOpeners:void 0;for(const v of this._externalOpeners)if(yield v.openExternal(f,{sourceUri:d,preferredOpenerId:S},m.CancellationToken.None))return!0}return this._defaultExternalOpener.openExternal(f,{sourceUri:d},m.CancellationToken.None)})}dispose(){this._validators.clear()}};r=Ie([Ce(0,g.ICodeEditorService),Ce(1,t.ICommandService)],r),e.OpenerService=r}),define(te[71],ie([1,0,9]),function(j,e,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorProgressService=e.Progress=e.emptyProgressRunner=void 0,e.emptyProgressRunner=Object.freeze({total(){},worked(){},done(){}});class m{constructor(I){this.callback=I}report(I){this._value=I,this.callback(this._value)}}e.Progress=m,m.None=Object.freeze({report(){}}),e.IEditorProgressService=(0,y.createDecorator)("editorProgressService")}),define(te[619],ie([1,0,10,21,2]),function(j,e,y,m,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PickerQuickAccessProvider=e.TriggerAction=void 0;var I;(function(h){h[h.NO_ACTION=0]="NO_ACTION",h[h.CLOSE_PICKER=1]="CLOSE_PICKER",h[h.REFRESH_PICKER=2]="REFRESH_PICKER",h[h.REMOVE_ITEM=3]="REMOVE_ITEM"})(I=e.TriggerAction||(e.TriggerAction={}));function w(h){const g=h;return Array.isArray(g.items)}function b(h){const g=h;return!!g.picks&&g.additionalPicks instanceof Promise}class p extends D.Disposable{constructor(g,t){super();this.prefix=g,this.options=t}provide(g,t){var i;const n=new D.DisposableStore;g.canAcceptInBackground=!!((i=this.options)===null||i===void 0?void 0:i.canAcceptInBackground),g.matchOnLabel=g.matchOnDescription=g.matchOnDetail=g.sortByLabel=!1;let l;const c=n.add(new D.MutableDisposable),r=()=>ye(this,void 0,void 0,function*(){const s=c.value=new D.DisposableStore;l==null||l.dispose(!0),g.busy=!1,l=new m.CancellationTokenSource(t);const o=l.token,a=g.value.substr(this.prefix.length).trim(),d=this._getPicks(a,s,o),u=(f,S)=>{var v;let C,_;if(w(f)?(C=f.items,_=f.active):C=f,C.length===0){if(S)return!1;a.length>0&&((v=this.options)===null||v===void 0?void 0:v.noResultsPick)&&(C=[this.options.noResultsPick])}return g.items=C,_&&(g.activeItems=[_]),!0};if(d!==null)if(b(d)){let f=!1,S=!1;yield Promise.all([(()=>ye(this,void 0,void 0,function*(){yield(0,y.timeout)(p.FAST_PICKS_RACE_DELAY),!o.isCancellationRequested&&(S||(f=u(d.picks,!0)))}))(),(()=>ye(this,void 0,void 0,function*(){g.busy=!0;try{const v=yield d.additionalPicks;if(o.isCancellationRequested)return;let C,_;w(d.picks)?(C=d.picks.items,_=d.picks.active):C=d.picks;let L,E;if(w(v)?(L=v.items,E=v.active):L=v,L.length>0||!f){let N;if(!_&&!E){const k=g.activeItems[0];k&&C.indexOf(k)!==-1&&(N=k)}u({items:[...C,...L],active:_||E||N})}}finally{o.isCancellationRequested||(g.busy=!1),S=!0}}))()])}else if(!(d instanceof Promise))u(d);else{g.busy=!0;try{const f=yield d;if(o.isCancellationRequested)return;u(f)}finally{o.isCancellationRequested||(g.busy=!1)}}});return n.add(g.onDidChangeValue(()=>r())),r(),n.add(g.onDidAccept(s=>{const[o]=g.selectedItems;typeof(o==null?void 0:o.accept)=="function"&&(s.inBackground||g.hide(),o.accept(g.keyMods,s))})),n.add(g.onDidTriggerItemButton(({button:s,item:o})=>ye(this,void 0,void 0,function*(){var a,d;if(typeof o.trigger=="function"){const u=(d=(a=o.buttons)===null||a===void 0?void 0:a.indexOf(s))!==null&&d!==void 0?d:-1;if(u>=0){const f=o.trigger(u,g.keyMods),S=typeof f=="number"?f:yield f;if(t.isCancellationRequested)return;switch(S){case I.NO_ACTION:break;case I.CLOSE_PICKER:g.hide();break;case I.REFRESH_PICKER:r();break;case I.REMOVE_ITEM:{const v=g.items.indexOf(o);if(v!==-1){const C=g.items.slice(),_=C.splice(v,1),L=g.activeItems.filter(N=>N!==_[0]),E=g.keepScrollPosition;g.keepScrollPosition=!0,g.items=C,L&&(g.activeItems=L),g.keepScrollPosition=E}break}}}}}))),n}}e.PickerQuickAccessProvider=p,p.FAST_PICKS_RACE_DELAY=200});var Gt=this&&this.__createBinding||(Object.create?function(j,e,y,m){m===void 0&&(m=y),Object.defineProperty(j,m,{enumerable:!0,get:function(){return e[y]}})}:function(j,e,y,m){m===void 0&&(m=y),j[m]=e[y]}),Zt=this&&this.__exportStar||function(j,e){for(var y in j)y!=="default"&&!Object.prototype.hasOwnProperty.call(e,y)&&Gt(e,j,y)};define(te[78],ie([1,0,9,220]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IQuickInputService=void 0,Zt(m,e),e.IQuickInputService=(0,y.createDecorator)("quickInputService")}),define(te[36],ie([1,0,213,20]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class D{constructor(){this.data=new Map}add(w,b){y.ok(m.isString(w)),y.ok(m.isObject(b)),y.ok(!this.data.has(w),"There is already an extension with this id"),this.data.set(w,b)}as(w){return this.data.get(w)||null}}e.Registry=new D}),define(te[200],ie([1,0,4,36]),function(j,e,y,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function D(b){return b.length>0&&b.charAt(b.length-1)==="#"?b.substring(0,b.length-1):b}class I{constructor(){this._onDidChangeSchema=new y.Emitter,this.schemasById={}}registerSchema(p,h){this.schemasById[D(p)]=h,this._onDidChangeSchema.fire(p)}notifySchemaChanged(p){this._onDidChangeSchema.fire(p)}}const w=new I;m.Registry.add(e.Extensions.JSONContribution,w)}),define(te[103],ie([1,0,19,4,20,582,200,36]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateProperty=e.getDefaultValue=e.overrideIdentifiersFromKey=e.OVERRIDE_PROPERTY_REGEX=e.OVERRIDE_PROPERTY_PATTERN=e.resourceLanguageSettingsSchemaId=e.resourceSettings=e.windowSettings=e.machineOverridableSettings=e.machineSettings=e.applicationSettings=e.allSettings=e.Extensions=void 0,e.Extensions={Configuration:"base.contributions.configuration"},e.allSettings={properties:{},patternProperties:{}},e.applicationSettings={properties:{},patternProperties:{}},e.machineSettings={properties:{},patternProperties:{}},e.machineOverridableSettings={properties:{},patternProperties:{}},e.windowSettings={properties:{},patternProperties:{}},e.resourceSettings={properties:{},patternProperties:{}},e.resourceLanguageSettingsSchemaId="vscode://schemas/settings/resourceLanguage";const p=b.Registry.as(w.Extensions.JSONContribution);class h{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new m.Emitter,this._onDidUpdateConfiguration=new m.Emitter,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:I.localize(0,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},p.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(s,o=!0){this.registerConfigurations([s],o)}registerConfigurations(s,o=!0){const a=this.doRegisterConfigurations(s,o);p.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:a})}registerDefaultConfigurations(s){var o;const a=[],d=[];for(const{overrides:u,source:f}of s)for(const S in u)if(a.push(S),e.OVERRIDE_PROPERTY_REGEX.test(S)){const v=Object.assign(Object.assign({},((o=this.configurationDefaultsOverrides.get(S))===null||o===void 0?void 0:o.value)||{}),u[S]);this.configurationDefaultsOverrides.set(S,{source:f,value:v});const C={type:"object",default:v,description:I.localize(1,null,S),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:v,source:D.isString(f)?void 0:f};d.push(...i(S)),this.configurationProperties[S]=C,this.defaultLanguageConfigurationOverridesNode.properties[S]=C}else{this.configurationDefaultsOverrides.set(S,{value:u[S],source:f});const v=this.configurationProperties[S];v&&(this.updatePropertyDefaultValue(S,v),this.updateSchema(S,v))}this.registerOverrideIdentifiers(d),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:a,defaultsOverrides:!0})}registerOverrideIdentifiers(s){for(const o of s)this.overrideIdentifiers.add(o);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(s,o){const a=[];return s.forEach(d=>{a.push(...this.validateAndRegisterProperties(d,o,d.extensionInfo,d.restrictedProperties)),this.configurationContributors.push(d),this.registerJSONConfiguration(d)}),a}validateAndRegisterProperties(s,o=!0,a,d,u=3){u=D.isUndefinedOrNull(s.scope)?u:s.scope;let f=[],S=s.properties;if(S)for(let C in S){if(o&&c(C)){delete S[C];continue}const _=S[C];if(_.source=a,_.defaultDefaultValue=S[C].default,this.updatePropertyDefaultValue(C,_),e.OVERRIDE_PROPERTY_REGEX.test(C)?_.scope=void 0:(_.scope=D.isUndefinedOrNull(_.scope)?u:_.scope,_.restricted=D.isUndefinedOrNull(_.restricted)?!!(d==null?void 0:d.includes(C)):_.restricted),S[C].hasOwnProperty("included")&&!S[C].included){this.excludedConfigurationProperties[C]=S[C],delete S[C];continue}else this.configurationProperties[C]=S[C];!S[C].deprecationMessage&&S[C].markdownDeprecationMessage&&(S[C].deprecationMessage=S[C].markdownDeprecationMessage),f.push(C)}let v=s.allOf;if(v)for(let C of v)f.push(...this.validateAndRegisterProperties(C,o,a,d,u));return f}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(s){const o=a=>{let d=a.properties;if(d)for(const f in d)this.updateSchema(f,d[f]);let u=a.allOf;u&&u.forEach(o)};o(s)}updateSchema(s,o){switch(e.allSettings.properties[s]=o,o.scope){case 1:e.applicationSettings.properties[s]=o;break;case 2:e.machineSettings.properties[s]=o;break;case 6:e.machineOverridableSettings.properties[s]=o;break;case 3:e.windowSettings.properties[s]=o;break;case 4:e.resourceSettings.properties[s]=o;break;case 5:e.resourceSettings.properties[s]=o,this.resourceLanguageSettingsSchema.properties[s]=o;break}}updateOverridePropertyPatternKey(){for(const s of this.overrideIdentifiers.values()){const o=`[${s}]`,a={type:"object",description:I.localize(2,null),errorMessage:I.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(o,a),e.allSettings.properties[o]=a,e.applicationSettings.properties[o]=a,e.machineSettings.properties[o]=a,e.machineOverridableSettings.properties[o]=a,e.windowSettings.properties[o]=a,e.resourceSettings.properties[o]=a}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){const s={type:"object",description:I.localize(4,null),errorMessage:I.localize(5,null),$ref:e.resourceLanguageSettingsSchemaId};e.allSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=s,e.applicationSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=s,e.machineSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=s,e.machineOverridableSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=s,e.windowSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=s,e.resourceSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=s,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(s,o){const a=this.configurationDefaultsOverrides.get(s);let d=a==null?void 0:a.value,u=a==null?void 0:a.source;D.isUndefined(d)&&(d=o.defaultDefaultValue,u=void 0),D.isUndefined(d)&&(d=n(o.type)),o.default=d,o.defaultValueSource=u}}const g="\\[([^\\]]+)\\]",t=new RegExp(g,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${g})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function i(r){const s=[];if(e.OVERRIDE_PROPERTY_REGEX.test(r)){let o=t.exec(r);for(;o==null?void 0:o.length;){const a=o[1].trim();a&&s.push(a),o=t.exec(r)}}return(0,y.distinct)(s)}e.overrideIdentifiersFromKey=i;function n(r){switch(Array.isArray(r)?r[0]:r){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=n;const l=new h;b.Registry.add(e.Extensions.Configuration,l);function c(r){return r.trim()?e.OVERRIDE_PROPERTY_REGEX.test(r)?I.localize(7,null,r):l.getConfigurationProperties()[r]!==void 0?I.localize(8,null,r):null:I.localize(6,null)}e.validateProperty=c}),define(te[620],ie([1,0,31,145,505,103,36]),function(j,e,y,m,D,I,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDiffEditorConfigurationKey=e.isEditorConfigurationKey=e.editorConfigurationBaseNode=void 0,e.editorConfigurationBaseNode=Object.freeze({id:"editor",order:5,type:"object",title:D.localize(0,null),scope:5});const b=Object.assign(Object.assign({},e.editorConfigurationBaseNode),{properties:{"editor.tabSize":{type:"number",default:m.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:D.localize(1,null)},"editor.insertSpaces":{type:"boolean",default:m.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:D.localize(2,null)},"editor.detectIndentation":{type:"boolean",default:m.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:D.localize(3,null)},"editor.trimAutoWhitespace":{type:"boolean",default:m.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:D.localize(4,null)},"editor.largeFileOptimizations":{type:"boolean",default:m.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:D.localize(5,null)},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:D.localize(6,null)},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[D.localize(7,null),D.localize(8,null),D.localize(9,null)],description:D.localize(10,null)},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[D.localize(11,null),D.localize(12,null),D.localize(13,null)],default:"configuredByTheme",description:D.localize(14,null)},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:D.localize(15,null)},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:D.localize(16,null)},"editor.language.brackets":{type:"array",default:!1,description:D.localize(17,null),items:{type:"array",items:[{type:"string",description:D.localize(18,null)},{type:"string",description:D.localize(19,null)}]}},"editor.language.colorizedBracketPairs":{type:"array",default:!1,description:D.localize(20,null),items:{type:"array",items:[{type:"string",description:D.localize(21,null)},{type:"string",description:D.localize(22,null)}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:D.localize(23,null)},"diffEditor.maxFileSize":{type:"number",default:50,description:D.localize(24,null)},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:D.localize(25,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:D.localize(26,null)},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:D.localize(27,null)},"diffEditor.codeLens":{type:"boolean",default:!1,description:D.localize(28,null)},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[D.localize(29,null),D.localize(30,null),D.localize(31,null)]}}});function p(l){return typeof l.type!="undefined"||typeof l.anyOf!="undefined"}for(const l of y.editorOptionsRegistry){const c=l.schema;if(typeof c!="undefined")if(p(c))b.properties[`editor.${l.name}`]=c;else for(const r in c)Object.hasOwnProperty.call(c,r)&&(b.properties[r]=c[r])}let h=null;function g(){return h===null&&(h=Object.create(null),Object.keys(b.properties).forEach(l=>{h[l]=!0})),h}function t(l){return g()[`editor.${l}`]||!1}e.isEditorConfigurationKey=t;function i(l){return g()[`diffEditor.${l}`]||!1}e.isDiffEditorConfigurationKey=i,w.Registry.as(I.Extensions.Configuration).registerConfiguration(b)}),define(te[79],ie([1,0,513,4,32,36,135,103]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PLAINTEXT_EXTENSION=e.PLAINTEXT_LANGUAGE_ID=e.ModesRegistry=e.EditorModesRegistry=e.Extensions=void 0,e.Extensions={ModesRegistry:"editor.modesRegistry"};class p{constructor(){this._onDidChangeLanguages=new m.Emitter,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(g){return this._languages.push(g),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t<i;t++)if(this._languages[t]===g){this._languages.splice(t,1);return}}}}getLanguages(){return this._languages}}e.EditorModesRegistry=p,e.ModesRegistry=new p,I.Registry.add(e.Extensions.ModesRegistry,e.ModesRegistry),e.PLAINTEXT_LANGUAGE_ID="plaintext",e.PLAINTEXT_EXTENSION=".txt",e.ModesRegistry.registerLanguage({id:e.PLAINTEXT_LANGUAGE_ID,extensions:[e.PLAINTEXT_EXTENSION],aliases:[y.localize(0,null),"text"],mimetypes:[w.Mimes.text]}),D.LanguageConfigurationRegistry.register(e.PLAINTEXT_LANGUAGE_ID,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0),I.Registry.as(b.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}])}),define(te[621],ie([1,0,48,41,79,269]),function(j,e,y,m,D,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cssEscape=e.getIconClasses=void 0;function w(h,g,t,i){const n=i===I.FileKind.ROOT_FOLDER?["rootfolder-icon"]:i===I.FileKind.FOLDER?["folder-icon"]:["file-icon"];if(t){let l;if(t.scheme===y.Schemas.data?l=m.DataUri.parseMetaData(t).get(m.DataUri.META_DATA_LABEL):l=p((0,m.basenameOrAuthority)(t).toLowerCase()),i===I.FileKind.FOLDER)n.push(`${l}-name-folder-icon`);else{if(l){if(n.push(`${l}-name-file-icon`),l.length<=255){const r=l.split(".");for(let s=1;s<r.length;s++)n.push(`${r.slice(s).join(".")}-ext-file-icon`)}n.push("ext-file-icon")}const c=b(h,g,t);c&&n.push(`${p(c)}-lang-file-icon`)}}return n}e.getIconClasses=w;function b(h,g,t){if(!t)return null;let i=null;if(t.scheme===y.Schemas.data){const l=m.DataUri.parseMetaData(t).get(m.DataUri.META_DATA_MIME);l&&(i=g.getLanguageIdByMimeType(l))}else{const n=h.getModel(t);n&&(i=n.getLanguageId())}return i&&i!==D.PLAINTEXT_LANGUAGE_ID?i:g.guessLanguageIdByFilepathOrFirstLine(t)}function p(h){return h.replace(/[\11\12\14\15\40]/g,"/")}e.cssEscape=p}),define(te[622],ie([1,0,19,13,4,2,8,422,79,103,36]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagesRegistry=e.LanguageIdCodec=void 0;const t=Object.prototype.hasOwnProperty,i="vs.editor.nullLanguage";class n{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(i,0),this._register(p.PLAINTEXT_LANGUAGE_ID,1),this._nextLanguageId=2}_register(r,s){this._languageIdToLanguage[s]=r,this._languageToLanguageId.set(r,s)}register(r){if(this._languageToLanguageId.has(r))return;const s=this._nextLanguageId++;this._register(r,s)}encodeLanguageId(r){return this._languageToLanguageId.get(r)||0}decodeLanguageId(r){return this._languageIdToLanguage[r]||i}}e.LanguageIdCodec=n;class l extends I.Disposable{constructor(r=!0,s=!1){super();this._onDidChange=this._register(new D.Emitter),this.onDidChange=this._onDidChange.event,l.instanceCount++,this._warnOnOverwrite=s,this.languageIdCodec=new n,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},r&&(this._initializeFromRegistry(),this._register(p.ModesRegistry.onDidChangeLanguages(o=>{this._initializeFromRegistry()})))}dispose(){l.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,b.clearLanguageAssociations)();const r=[].concat(p.ModesRegistry.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(r)}_registerLanguages(r){for(const s of r)this._registerLanguage(s);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(s=>{const o=this._languages[s];o.name&&(this._nameMap[o.name]=o.identifier),o.aliases.forEach(a=>{this._lowercaseNameMap[a.toLowerCase()]=o.identifier}),o.mimetypes.forEach(a=>{this._mimeTypesMap[a]=o.identifier})}),g.Registry.as(h.Extensions.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(r){const s=r.id;let o;t.call(this._languages,s)?o=this._languages[s]:(this.languageIdCodec.register(s),o={identifier:s,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[s]=o),this._mergeLanguage(o,r)}_mergeLanguage(r,s){const o=s.id;let a=null;if(Array.isArray(s.mimetypes)&&s.mimetypes.length>0&&(r.mimetypes.push(...s.mimetypes),a=s.mimetypes[0]),a||(a=`text/x-${o}`,r.mimetypes.push(a)),Array.isArray(s.extensions)){s.configuration?r.extensions=s.extensions.concat(r.extensions):r.extensions=r.extensions.concat(s.extensions);for(let f of s.extensions)(0,b.registerLanguageAssociation)({id:o,mime:a,extension:f},this._warnOnOverwrite)}if(Array.isArray(s.filenames))for(let f of s.filenames)(0,b.registerLanguageAssociation)({id:o,mime:a,filename:f},this._warnOnOverwrite),r.filenames.push(f);if(Array.isArray(s.filenamePatterns))for(let f of s.filenamePatterns)(0,b.registerLanguageAssociation)({id:o,mime:a,filepattern:f},this._warnOnOverwrite);if(typeof s.firstLine=="string"&&s.firstLine.length>0){let f=s.firstLine;f.charAt(0)!=="^"&&(f="^"+f);try{const S=new RegExp(f);(0,w.regExpLeadsToEndlessLoop)(S)||(0,b.registerLanguageAssociation)({id:o,mime:a,firstline:S},this._warnOnOverwrite)}catch(S){(0,m.onUnexpectedError)(S)}}r.aliases.push(o);let d=null;if(typeof s.aliases!="undefined"&&Array.isArray(s.aliases)&&(s.aliases.length===0?d=[null]:d=s.aliases),d!==null)for(const f of d)!f||f.length===0||r.aliases.push(f);const u=d!==null&&d.length>0;if(!(u&&d[0]===null)){const f=(u?d[0]:null)||o;(u||!r.name)&&(r.name=f)}s.configuration&&r.configurationFiles.push(s.configuration),s.icon&&r.icons.push(s.icon)}isRegisteredLanguageId(r){return r?t.call(this._languages,r):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(r){const s=r.toLowerCase();return t.call(this._lowercaseNameMap,s)?this._lowercaseNameMap[s]:null}getLanguageIdByMimeType(r){return r&&t.call(this._mimeTypesMap,r)?this._mimeTypesMap[r]:null}guessLanguageIdByFilepathOrFirstLine(r,s){if(!r&&!s)return[];const o=(0,b.getMimeTypes)(r,s);return(0,y.coalesce)(o.map(a=>this.getLanguageIdByMimeType(a)))}}e.LanguagesRegistry=l,l.instanceCount=0}),define(te[623],ie([1,0,4,2,622,19,18,79]),function(j,e,y,m,D,I,w,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageService=void 0;class p extends m.Disposable{constructor(t=!1){super();this._onDidEncounterLanguage=this._register(new y.Emitter),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onDidChange=this._register(new y.Emitter({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,p.instanceCount++,this._encounteredLanguages=new Set,this._registry=this._register(new D.LanguagesRegistry(!0,t)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){p.instanceCount--,super.dispose()}isRegisteredLanguageId(t){return this._registry.isRegisteredLanguageId(t)}getLanguageIdByLanguageName(t){return this._registry.getLanguageIdByLanguageName(t)}getLanguageIdByMimeType(t){return this._registry.getLanguageIdByMimeType(t)}guessLanguageIdByFilepathOrFirstLine(t,i){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(t,i);return(0,I.firstOrDefault)(n,null)}createById(t){return new h(this.onDidChange,()=>this._createAndGetLanguageIdentifier(t))}createByFilepathOrFirstLine(t,i){return new h(this.onDidChange,()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(t,i);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(t){return(!t||!this.isRegisteredLanguageId(t))&&(t=b.PLAINTEXT_LANGUAGE_ID),this._encounteredLanguages.has(t)||(this._encounteredLanguages.add(t),w.TokenizationRegistry.getOrCreate(t),this._onDidEncounterLanguage.fire(t)),t}}e.LanguageService=p,p.instanceCount=0;class h{constructor(t,i){this._onDidChangeLanguages=t,this._selector=i,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new y.Emitter({onLastListenerRemove:()=>{this._dispose()}})),this._emitter.event}_evaluate(){const t=this._selector();t!==this.languageId&&(this.languageId=t,this._emitter&&this._emitter.fire(this.languageId))}}}),define(te[104],ie([1,0,324,51,35,13,249,4,2,62,79]),function(j,e,y,m,D,I,w,b,p,h,g){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.MarkdownRenderer=void 0;let i=class Si{constructor(l,c,r){this._options=l,this._languageService=c,this._openerService=r,this._onDidRenderAsync=new b.Emitter,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(l,c,r){if(!l)return{element:document.createElement("span"),dispose:()=>{}};const s=new p.DisposableStore;return{element:s.add((0,y.renderMarkdown)(l,Object.assign(Object.assign({},this._getRenderOptions(l,s)),c),r)).element,dispose:()=>s.dispose()}}_getRenderOptions(l,c){return{baseUrl:this._options.baseUrl,codeBlockRenderer:(r,s)=>ye(this,void 0,void 0,function*(){var o,a,d;let u;r?u=this._languageService.getLanguageIdByLanguageName(r):this._options.editor&&(u=(o=this._options.editor.getModel())===null||o===void 0?void 0:o.getLanguageId()),u||(u=g.PLAINTEXT_LANGUAGE_ID);const f=yield(0,w.tokenizeToString)(this._languageService,s,u),S=document.createElement("span");if(S.innerHTML=(d=(a=Si._ttpTokenizer)===null||a===void 0?void 0:a.createHTML(f))!==null&&d!==void 0?d:f,this._options.editor){const v=this._options.editor.getOption(44);(0,h.applyFontInfo)(S,v)}else this._options.codeBlockFontFamily&&(S.style.fontFamily=this._options.codeBlockFontFamily);return S}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:r=>this._openerService.open(r,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:l.isTrusted}).catch(I.onUnexpectedError),disposables:c}}}};i._ttpTokenizer=(t=window.trustedTypes)===null||t===void 0?void 0:t.createPolicy("tokenizeToString",{createHTML(n){return n}}),i=Ie([Ce(1,D.ILanguageService),Ce(2,m.IOpenerService)],i),e.MarkdownRenderer=i}),define(te[624],ie([1,0,7,19,66,2,104,257,51,227]),function(j,e,y,m,D,I,w,b,p,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginHoverWidget=void 0;const g=y.$;class t extends I.Disposable{constructor(l,c,r=p.NullOpenerService){super();this._renderDisposeables=this._register(new I.DisposableStore),this._editor=l,this._isVisible=!1,this._messages=[],this._hover=this._register(new h.HoverWidget),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new w.MarkdownRenderer({editor:this._editor},c,r)),this._computer=new i(this._editor),this._hoverOperation=this._register(new b.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(s=>{this._withResult(s.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(44)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return t.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(c=>this._editor.applyFontInfo(c))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(l){this._computer.lineNumber!==l&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=l,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),!!this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(l){this._messages=l,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(l,c){this._renderDisposeables.clear();const r=document.createDocumentFragment();for(const s of c){const o=g("div.hover-row.markdown-hover"),a=y.append(o,g("div.hover-contents")),d=this._renderDisposeables.add(this._markdownRenderer.render(s.value));a.appendChild(d.element),r.appendChild(o)}this._updateContents(r),this._showAt(l)}_updateContents(l){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(l),this._updateFont()}_showAt(l){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const c=this._editor.getLayoutInfo(),r=this._editor.getTopForLineNumber(l),s=this._editor.getScrollTop(),o=this._editor.getOption(59),a=this._hover.containerDomNode.clientHeight,d=r-s-(a-o)/2;this._hover.containerDomNode.style.left=`${c.glyphMarginLeft+c.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(d),0)}px`}}e.MarginHoverWidget=t,t.ID="editor.contrib.modesGlyphHoverWidget";class i{constructor(l){this._editor=l,this._lineNumber=-1}get lineNumber(){return this._lineNumber}set lineNumber(l){this._lineNumber=l}computeSync(){const l=s=>({value:s}),c=this._editor.getLineDecorations(this._lineNumber),r=[];if(!c)return r;for(const s of c){if(!s.options.glyphMarginClassName)continue;const o=s.options.glyphMarginHoverMessage;!o||(0,D.isEmptyMarkdownString)(o)||r.push(...(0,m.asArray)(o).map(l))}return r}}}),define(te[277],ie([1,0,34,7,67,27,4,66,2,104,31,261,571,9]),function(j,e,y,m,D,I,w,b,p,h,g,t,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestDetailsOverlay=e.SuggestDetailsWidget=e.canExpandCompletionItem=void 0;function l(s){return!!s&&Boolean(s.completion.documentation||s.completion.detail&&s.completion.detail!==s.completion.label)}e.canExpandCompletionItem=l;let c=class{constructor(o,a){this._editor=o,this._onDidClose=new w.Emitter,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new w.Emitter,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new p.DisposableStore,this._renderDisposeable=new p.DisposableStore,this._borderWidth=1,this._size=new m.Dimension(330,0),this.domNode=m.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=a.createInstance(h.MarkdownRenderer,{editor:o}),this._body=m.$(".body"),this._scrollbar=new D.DomScrollableElement(this._body,{}),m.append(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=m.append(this._body,m.$(".header")),this._close=m.append(this._header,m.$("span"+I.Codicon.close.cssSelector)),this._close.title=i.localize(0,null),this._type=m.append(this._header,m.$("p.type")),this._docs=m.append(this._body,m.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(d=>{d.hasChanged(44)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const o=this._editor.getOptions(),a=o.get(44),d=a.getMassagedFontFamily(y.isSafari?g.EDITOR_FONT_DEFAULTS.fontFamily:null),u=o.get(107)||a.fontSize,f=o.get(108)||a.lineHeight,S=a.fontWeight,v=`${u}px`,C=`${f}px`;this.domNode.style.fontSize=v,this.domNode.style.lineHeight=`${f/u}`,this.domNode.style.fontWeight=S,this.domNode.style.fontFeatureSettings=a.fontFeatureSettings,this._type.style.fontFamily=d,this._close.style.height=C,this._close.style.width=C}getLayoutInfo(){const o=this._editor.getOption(108)||this._editor.getOption(44).lineHeight,a=this._borderWidth,d=a*2;return{lineHeight:o,borderWidth:a,borderHeight:d,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=i.localize(1,null),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(o,a){var d,u;this._renderDisposeable.clear();let{detail:f,documentation:S}=o.completion;if(a){let v="";v+=`score: ${o.score[0]}

Callers

nothing calls this directly

Calls 1

evaluateMethod · 0.45

Tested by

no test coverage detected