var z;
(function(n) {
  function i(r) {
    return typeof r == "string";
  }
  n.is = i;
})(z || (z = {}));
var y;
(function(n) {
  function i(r) {
    return typeof r == "string";
  }
  n.is = i;
})(y || (y = {}));
var q;
(function(n) {
  n.MIN_VALUE = -2147483648, n.MAX_VALUE = 2147483647;
  function i(r) {
    return typeof r == "number" && n.MIN_VALUE <= r && r <= n.MAX_VALUE;
  }
  n.is = i;
})(q || (q = {}));
var _;
(function(n) {
  n.MIN_VALUE = 0, n.MAX_VALUE = 2147483647;
  function i(r) {
    return typeof r == "number" && n.MIN_VALUE <= r && r <= n.MAX_VALUE;
  }
  n.is = i;
})(_ || (_ = {}));
var p;
(function(n) {
  function i(t, e) {
    return t === Number.MAX_VALUE && (t = _.MAX_VALUE), e === Number.MAX_VALUE && (e = _.MAX_VALUE), { line: t, character: e };
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.objectLiteral(e) && a.uinteger(e.line) && a.uinteger(e.character);
  }
  n.is = r;
})(p || (p = {}));
var l;
(function(n) {
  function i(t, e, u, c) {
    if (a.uinteger(t) && a.uinteger(e) && a.uinteger(u) && a.uinteger(c))
      return { start: p.create(t, e), end: p.create(u, c) };
    if (p.is(t) && p.is(e))
      return { start: t, end: e };
    throw new Error(`Range#create called with invalid arguments[${t}, ${e}, ${u}, ${c}]`);
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.objectLiteral(e) && p.is(e.start) && p.is(e.end);
  }
  n.is = r;
})(l || (l = {}));
var E;
(function(n) {
  function i(t, e) {
    return { uri: t, range: e };
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.objectLiteral(e) && l.is(e.range) && (a.string(e.uri) || a.undefined(e.uri));
  }
  n.is = r;
})(E || (E = {}));
var B;
(function(n) {
  function i(t, e, u, c) {
    return { targetUri: t, targetRange: e, targetSelectionRange: u, originSelectionRange: c };
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.objectLiteral(e) && l.is(e.targetRange) && a.string(e.targetUri) && l.is(e.targetSelectionRange) && (l.is(e.originSelectionRange) || a.undefined(e.originSelectionRange));
  }
  n.is = r;
})(B || (B = {}));
var R;
(function(n) {
  function i(t, e, u, c) {
    return {
      red: t,
      green: e,
      blue: u,
      alpha: c
    };
  }
  n.create = i;
  function r(t) {
    const e = t;
    return a.objectLiteral(e) && a.numberRange(e.red, 0, 1) && a.numberRange(e.green, 0, 1) && a.numberRange(e.blue, 0, 1) && a.numberRange(e.alpha, 0, 1);
  }
  n.is = r;
})(R || (R = {}));
var H;
(function(n) {
  function i(t, e) {
    return {
      range: t,
      color: e
    };
  }
  n.create = i;
  function r(t) {
    const e = t;
    return a.objectLiteral(e) && l.is(e.range) && R.is(e.color);
  }
  n.is = r;
})(H || (H = {}));
var Q;
(function(n) {
  function i(t, e, u) {
    return {
      label: t,
      textEdit: e,
      additionalTextEdits: u
    };
  }
  n.create = i;
  function r(t) {
    const e = t;
    return a.objectLiteral(e) && a.string(e.label) && (a.undefined(e.textEdit) || L.is(e)) && (a.undefined(e.additionalTextEdits) || a.typedArray(e.additionalTextEdits, L.is));
  }
  n.is = r;
})(Q || (Q = {}));
var G;
(function(n) {
  n.Comment = "comment", n.Imports = "imports", n.Region = "region";
})(G || (G = {}));
var J;
(function(n) {
  function i(t, e, u, c, f, d) {
    const o = {
      startLine: t,
      endLine: e
    };
    return a.defined(u) && (o.startCharacter = u), a.defined(c) && (o.endCharacter = c), a.defined(f) && (o.kind = f), a.defined(d) && (o.collapsedText = d), o;
  }
  n.create = i;
  function r(t) {
    const e = t;
    return a.objectLiteral(e) && a.uinteger(e.startLine) && a.uinteger(e.startLine) && (a.undefined(e.startCharacter) || a.uinteger(e.startCharacter)) && (a.undefined(e.endCharacter) || a.uinteger(e.endCharacter)) && (a.undefined(e.kind) || a.string(e.kind));
  }
  n.is = r;
})(J || (J = {}));
var U;
(function(n) {
  function i(t, e) {
    return {
      location: t,
      message: e
    };
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.defined(e) && E.is(e.location) && a.string(e.message);
  }
  n.is = r;
})(U || (U = {}));
var Y;
(function(n) {
  n.Error = 1, n.Warning = 2, n.Information = 3, n.Hint = 4;
})(Y || (Y = {}));
var Z;
(function(n) {
  n.Unnecessary = 1, n.Deprecated = 2;
})(Z || (Z = {}));
var k;
(function(n) {
  function i(r) {
    const t = r;
    return a.objectLiteral(t) && a.string(t.href);
  }
  n.is = i;
})(k || (k = {}));
var I;
(function(n) {
  function i(t, e, u, c, f, d) {
    let o = { range: t, message: e };
    return a.defined(u) && (o.severity = u), a.defined(c) && (o.code = c), a.defined(f) && (o.source = f), a.defined(d) && (o.relatedInformation = d), o;
  }
  n.create = i;
  function r(t) {
    var e;
    let u = t;
    return a.defined(u) && l.is(u.range) && a.string(u.message) && (a.number(u.severity) || a.undefined(u.severity)) && (a.integer(u.code) || a.string(u.code) || a.undefined(u.code)) && (a.undefined(u.codeDescription) || a.string((e = u.codeDescription) === null || e === void 0 ? void 0 : e.href)) && (a.string(u.source) || a.undefined(u.source)) && (a.undefined(u.relatedInformation) || a.typedArray(u.relatedInformation, U.is));
  }
  n.is = r;
})(I || (I = {}));
var b;
(function(n) {
  function i(t, e, ...u) {
    let c = { title: t, command: e };
    return a.defined(u) && u.length > 0 && (c.arguments = u), c;
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.defined(e) && a.string(e.title) && a.string(e.command);
  }
  n.is = r;
})(b || (b = {}));
var L;
(function(n) {
  function i(u, c) {
    return { range: u, newText: c };
  }
  n.replace = i;
  function r(u, c) {
    return { range: { start: u, end: u }, newText: c };
  }
  n.insert = r;
  function t(u) {
    return { range: u, newText: "" };
  }
  n.del = t;
  function e(u) {
    const c = u;
    return a.objectLiteral(c) && a.string(c.newText) && l.is(c.range);
  }
  n.is = e;
})(L || (L = {}));
var M;
(function(n) {
  function i(t, e, u) {
    const c = { label: t };
    return e !== void 0 && (c.needsConfirmation = e), u !== void 0 && (c.description = u), c;
  }
  n.create = i;
  function r(t) {
    const e = t;
    return a.objectLiteral(e) && a.string(e.label) && (a.boolean(e.needsConfirmation) || e.needsConfirmation === void 0) && (a.string(e.description) || e.description === void 0);
  }
  n.is = r;
})(M || (M = {}));
var x;
(function(n) {
  function i(r) {
    const t = r;
    return a.string(t);
  }
  n.is = i;
})(x || (x = {}));
var C;
(function(n) {
  function i(u, c, f) {
    return { range: u, newText: c, annotationId: f };
  }
  n.replace = i;
  function r(u, c, f) {
    return { range: { start: u, end: u }, newText: c, annotationId: f };
  }
  n.insert = r;
  function t(u, c) {
    return { range: u, newText: "", annotationId: c };
  }
  n.del = t;
  function e(u) {
    const c = u;
    return L.is(c) && (M.is(c.annotationId) || x.is(c.annotationId));
  }
  n.is = e;
})(C || (C = {}));
var N;
(function(n) {
  function i(t, e) {
    return { textDocument: t, edits: e };
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.defined(e) && X.is(e.textDocument) && Array.isArray(e.edits);
  }
  n.is = r;
})(N || (N = {}));
var P;
(function(n) {
  function i(t, e, u) {
    let c = {
      kind: "create",
      uri: t
    };
    return e !== void 0 && (e.overwrite !== void 0 || e.ignoreIfExists !== void 0) && (c.options = e), u !== void 0 && (c.annotationId = u), c;
  }
  n.create = i;
  function r(t) {
    let e = t;
    return e && e.kind === "create" && a.string(e.uri) && (e.options === void 0 || (e.options.overwrite === void 0 || a.boolean(e.options.overwrite)) && (e.options.ignoreIfExists === void 0 || a.boolean(e.options.ignoreIfExists))) && (e.annotationId === void 0 || x.is(e.annotationId));
  }
  n.is = r;
})(P || (P = {}));
var V;
(function(n) {
  function i(t, e, u, c) {
    let f = {
      kind: "rename",
      oldUri: t,
      newUri: e
    };
    return u !== void 0 && (u.overwrite !== void 0 || u.ignoreIfExists !== void 0) && (f.options = u), c !== void 0 && (f.annotationId = c), f;
  }
  n.create = i;
  function r(t) {
    let e = t;
    return e && e.kind === "rename" && a.string(e.oldUri) && a.string(e.newUri) && (e.options === void 0 || (e.options.overwrite === void 0 || a.boolean(e.options.overwrite)) && (e.options.ignoreIfExists === void 0 || a.boolean(e.options.ignoreIfExists))) && (e.annotationId === void 0 || x.is(e.annotationId));
  }
  n.is = r;
})(V || (V = {}));
var O;
(function(n) {
  function i(t, e, u) {
    let c = {
      kind: "delete",
      uri: t
    };
    return e !== void 0 && (e.recursive !== void 0 || e.ignoreIfNotExists !== void 0) && (c.options = e), u !== void 0 && (c.annotationId = u), c;
  }
  n.create = i;
  function r(t) {
    let e = t;
    return e && e.kind === "delete" && a.string(e.uri) && (e.options === void 0 || (e.options.recursive === void 0 || a.boolean(e.options.recursive)) && (e.options.ignoreIfNotExists === void 0 || a.boolean(e.options.ignoreIfNotExists))) && (e.annotationId === void 0 || x.is(e.annotationId));
  }
  n.is = r;
})(O || (O = {}));
var F;
(function(n) {
  function i(r) {
    let t = r;
    return t && (t.changes !== void 0 || t.documentChanges !== void 0) && (t.documentChanges === void 0 || t.documentChanges.every((e) => a.string(e.kind) ? P.is(e) || V.is(e) || O.is(e) : N.is(e)));
  }
  n.is = i;
})(F || (F = {}));
var S;
(function(n) {
  function i(t) {
    return { uri: t };
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.defined(e) && a.string(e.uri);
  }
  n.is = r;
})(S || (S = {}));
var T;
(function(n) {
  function i(t, e) {
    return { uri: t, version: e };
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.defined(e) && a.string(e.uri) && a.integer(e.version);
  }
  n.is = r;
})(T || (T = {}));
var X;
(function(n) {
  function i(t, e) {
    return { uri: t, version: e };
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.defined(e) && a.string(e.uri) && (e.version === null || a.integer(e.version));
  }
  n.is = r;
})(X || (X = {}));
var K;
(function(n) {
  function i(t, e, u, c) {
    return { uri: t, languageId: e, version: u, text: c };
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.defined(e) && a.string(e.uri) && a.string(e.languageId) && a.integer(e.version) && a.string(e.text);
  }
  n.is = r;
})(K || (K = {}));
var D;
(function(n) {
  n.PlainText = "plaintext", n.Markdown = "markdown";
  function i(r) {
    const t = r;
    return t === n.PlainText || t === n.Markdown;
  }
  n.is = i;
})(D || (D = {}));
var A;
(function(n) {
  function i(r) {
    const t = r;
    return a.objectLiteral(r) && D.is(t.kind) && a.string(t.value);
  }
  n.is = i;
})(A || (A = {}));
var ee;
(function(n) {
  n.Text = 1, n.Method = 2, n.Function = 3, n.Constructor = 4, n.Field = 5, n.Variable = 6, n.Class = 7, n.Interface = 8, n.Module = 9, n.Property = 10, n.Unit = 11, n.Value = 12, n.Enum = 13, n.Keyword = 14, n.Snippet = 15, n.Color = 16, n.File = 17, n.Reference = 18, n.Folder = 19, n.EnumMember = 20, n.Constant = 21, n.Struct = 22, n.Event = 23, n.Operator = 24, n.TypeParameter = 25;
})(ee || (ee = {}));
var ne;
(function(n) {
  n.PlainText = 1, n.Snippet = 2;
})(ne || (ne = {}));
var te;
(function(n) {
  n.Deprecated = 1;
})(te || (te = {}));
var re;
(function(n) {
  function i(t, e, u) {
    return { newText: t, insert: e, replace: u };
  }
  n.create = i;
  function r(t) {
    const e = t;
    return e && a.string(e.newText) && l.is(e.insert) && l.is(e.replace);
  }
  n.is = r;
})(re || (re = {}));
var ie;
(function(n) {
  n.asIs = 1, n.adjustIndentation = 2;
})(ie || (ie = {}));
var ae;
(function(n) {
  function i(r) {
    const t = r;
    return t && (a.string(t.detail) || t.detail === void 0) && (a.string(t.description) || t.description === void 0);
  }
  n.is = i;
})(ae || (ae = {}));
var ue;
(function(n) {
  function i(r) {
    return { label: r };
  }
  n.create = i;
})(ue || (ue = {}));
var ce;
(function(n) {
  function i(r, t) {
    return { items: r || [], isIncomplete: !!t };
  }
  n.create = i;
})(ce || (ce = {}));
var j;
(function(n) {
  function i(t) {
    return t.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&");
  }
  n.fromPlainText = i;
  function r(t) {
    const e = t;
    return a.string(e) || a.objectLiteral(e) && a.string(e.language) && a.string(e.value);
  }
  n.is = r;
})(j || (j = {}));
var fe;
(function(n) {
  function i(r) {
    let t = r;
    return !!t && a.objectLiteral(t) && (A.is(t.contents) || j.is(t.contents) || a.typedArray(t.contents, j.is)) && (r.range === void 0 || l.is(r.range));
  }
  n.is = i;
})(fe || (fe = {}));
var se;
(function(n) {
  function i(r, t) {
    return t ? { label: r, documentation: t } : { label: r };
  }
  n.create = i;
})(se || (se = {}));
var oe;
(function(n) {
  function i(r, t, ...e) {
    let u = { label: r };
    return a.defined(t) && (u.documentation = t), a.defined(e) ? u.parameters = e : u.parameters = [], u;
  }
  n.create = i;
})(oe || (oe = {}));
var de;
(function(n) {
  n.Text = 1, n.Read = 2, n.Write = 3;
})(de || (de = {}));
var le;
(function(n) {
  function i(r, t) {
    let e = { range: r };
    return a.number(t) && (e.kind = t), e;
  }
  n.create = i;
})(le || (le = {}));
var ge;
(function(n) {
  n.File = 1, n.Module = 2, n.Namespace = 3, n.Package = 4, n.Class = 5, n.Method = 6, n.Property = 7, n.Field = 8, n.Constructor = 9, n.Enum = 10, n.Interface = 11, n.Function = 12, n.Variable = 13, n.Constant = 14, n.String = 15, n.Number = 16, n.Boolean = 17, n.Array = 18, n.Object = 19, n.Key = 20, n.Null = 21, n.EnumMember = 22, n.Struct = 23, n.Event = 24, n.Operator = 25, n.TypeParameter = 26;
})(ge || (ge = {}));
var ve;
(function(n) {
  n.Deprecated = 1;
})(ve || (ve = {}));
var he;
(function(n) {
  function i(r, t, e, u, c) {
    let f = {
      name: r,
      kind: t,
      location: { uri: u, range: e }
    };
    return c && (f.containerName = c), f;
  }
  n.create = i;
})(he || (he = {}));
var pe;
(function(n) {
  function i(r, t, e, u) {
    return u !== void 0 ? { name: r, kind: t, location: { uri: e, range: u } } : { name: r, kind: t, location: { uri: e } };
  }
  n.create = i;
})(pe || (pe = {}));
var be;
(function(n) {
  function i(t, e, u, c, f, d) {
    let o = {
      name: t,
      detail: e,
      kind: u,
      range: c,
      selectionRange: f
    };
    return d !== void 0 && (o.children = d), o;
  }
  n.create = i;
  function r(t) {
    let e = t;
    return e && a.string(e.name) && a.number(e.kind) && l.is(e.range) && l.is(e.selectionRange) && (e.detail === void 0 || a.string(e.detail)) && (e.deprecated === void 0 || a.boolean(e.deprecated)) && (e.children === void 0 || Array.isArray(e.children)) && (e.tags === void 0 || Array.isArray(e.tags));
  }
  n.is = r;
})(be || (be = {}));
var Le;
(function(n) {
  n.Empty = "", n.QuickFix = "quickfix", n.Refactor = "refactor", n.RefactorExtract = "refactor.extract", n.RefactorInline = "refactor.inline", n.RefactorRewrite = "refactor.rewrite", n.Source = "source", n.SourceOrganizeImports = "source.organizeImports", n.SourceFixAll = "source.fixAll";
})(Le || (Le = {}));
var m;
(function(n) {
  n.Invoked = 1, n.Automatic = 2;
})(m || (m = {}));
var xe;
(function(n) {
  function i(t, e, u) {
    let c = { diagnostics: t };
    return e != null && (c.only = e), u != null && (c.triggerKind = u), c;
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.defined(e) && a.typedArray(e.diagnostics, I.is) && (e.only === void 0 || a.typedArray(e.only, a.string)) && (e.triggerKind === void 0 || e.triggerKind === m.Invoked || e.triggerKind === m.Automatic);
  }
  n.is = r;
})(xe || (xe = {}));
var Ae;
(function(n) {
  function i(t, e, u) {
    let c = { title: t }, f = !0;
    return typeof e == "string" ? (f = !1, c.kind = e) : b.is(e) ? c.command = e : c.edit = e, f && u !== void 0 && (c.kind = u), c;
  }
  n.create = i;
  function r(t) {
    let e = t;
    return e && a.string(e.title) && (e.diagnostics === void 0 || a.typedArray(e.diagnostics, I.is)) && (e.kind === void 0 || a.string(e.kind)) && (e.edit !== void 0 || e.command !== void 0) && (e.command === void 0 || b.is(e.command)) && (e.isPreferred === void 0 || a.boolean(e.isPreferred)) && (e.edit === void 0 || F.is(e.edit));
  }
  n.is = r;
})(Ae || (Ae = {}));
var _e;
(function(n) {
  function i(t, e) {
    let u = { range: t };
    return a.defined(e) && (u.data = e), u;
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.defined(e) && l.is(e.range) && (a.undefined(e.command) || b.is(e.command));
  }
  n.is = r;
})(_e || (_e = {}));
var Ee;
(function(n) {
  function i(t, e) {
    return { tabSize: t, insertSpaces: e };
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.defined(e) && a.uinteger(e.tabSize) && a.boolean(e.insertSpaces);
  }
  n.is = r;
})(Ee || (Ee = {}));
var Ie;
(function(n) {
  function i(t, e, u) {
    return { range: t, target: e, data: u };
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.defined(e) && l.is(e.range) && (a.undefined(e.target) || a.string(e.target));
  }
  n.is = r;
})(Ie || (Ie = {}));
var je;
(function(n) {
  function i(t, e) {
    return { range: t, parent: e };
  }
  n.create = i;
  function r(t) {
    let e = t;
    return a.objectLiteral(e) && l.is(e.range) && (e.parent === void 0 || n.is(e.parent));
  }
  n.is = r;
})(je || (je = {}));
var me;
(function(n) {
  n.namespace = "namespace", n.type = "type", n.class = "class", n.enum = "enum", n.interface = "interface", n.struct = "struct", n.typeParameter = "typeParameter", n.parameter = "parameter", n.variable = "variable", n.property = "property", n.enumMember = "enumMember", n.event = "event", n.function = "function", n.method = "method", n.macro = "macro", n.keyword = "keyword", n.modifier = "modifier", n.comment = "comment", n.string = "string", n.number = "number", n.regexp = "regexp", n.operator = "operator", n.decorator = "decorator";
})(me || (me = {}));
var we;
(function(n) {
  n.declaration = "declaration", n.definition = "definition", n.readonly = "readonly", n.static = "static", n.deprecated = "deprecated", n.abstract = "abstract", n.async = "async", n.modification = "modification", n.documentation = "documentation", n.defaultLibrary = "defaultLibrary";
})(we || (we = {}));
var ye;
(function(n) {
  function i(r) {
    const t = r;
    return a.objectLiteral(t) && (t.resultId === void 0 || typeof t.resultId == "string") && Array.isArray(t.data) && (t.data.length === 0 || typeof t.data[0] == "number");
  }
  n.is = i;
})(ye || (ye = {}));
var Re;
(function(n) {
  function i(t, e) {
    return { range: t, text: e };
  }
  n.create = i;
  function r(t) {
    const e = t;
    return e != null && l.is(e.range) && a.string(e.text);
  }
  n.is = r;
})(Re || (Re = {}));
var Ue;
(function(n) {
  function i(t, e, u) {
    return { range: t, variableName: e, caseSensitiveLookup: u };
  }
  n.create = i;
  function r(t) {
    const e = t;
    return e != null && l.is(e.range) && a.boolean(e.caseSensitiveLookup) && (a.string(e.variableName) || e.variableName === void 0);
  }
  n.is = r;
})(Ue || (Ue = {}));
var Me;
(function(n) {
  function i(t, e) {
    return { range: t, expression: e };
  }
  n.create = i;
  function r(t) {
    const e = t;
    return e != null && l.is(e.range) && (a.string(e.expression) || e.expression === void 0);
  }
  n.is = r;
})(Me || (Me = {}));
var Ne;
(function(n) {
  function i(t, e) {
    return { frameId: t, stoppedLocation: e };
  }
  n.create = i;
  function r(t) {
    const e = t;
    return a.defined(e) && l.is(t.stoppedLocation);
  }
  n.is = r;
})(Ne || (Ne = {}));
var $;
(function(n) {
  n.Type = 1, n.Parameter = 2;
  function i(r) {
    return r === 1 || r === 2;
  }
  n.is = i;
})($ || ($ = {}));
var W;
(function(n) {
  function i(t) {
    return { value: t };
  }
  n.create = i;
  function r(t) {
    const e = t;
    return a.objectLiteral(e) && (e.tooltip === void 0 || a.string(e.tooltip) || A.is(e.tooltip)) && (e.location === void 0 || E.is(e.location)) && (e.command === void 0 || b.is(e.command));
  }
  n.is = r;
})(W || (W = {}));
var Pe;
(function(n) {
  function i(t, e, u) {
    const c = { position: t, label: e };
    return u !== void 0 && (c.kind = u), c;
  }
  n.create = i;
  function r(t) {
    const e = t;
    return a.objectLiteral(e) && p.is(e.position) && (a.string(e.label) || a.typedArray(e.label, W.is)) && (e.kind === void 0 || $.is(e.kind)) && e.textEdits === void 0 || a.typedArray(e.textEdits, L.is) && (e.tooltip === void 0 || a.string(e.tooltip) || A.is(e.tooltip)) && (e.paddingLeft === void 0 || a.boolean(e.paddingLeft)) && (e.paddingRight === void 0 || a.boolean(e.paddingRight));
  }
  n.is = r;
})(Pe || (Pe = {}));
var Ve;
(function(n) {
  function i(r) {
    return { kind: "snippet", value: r };
  }
  n.createSnippet = i;
})(Ve || (Ve = {}));
var Oe;
(function(n) {
  function i(r, t, e, u) {
    return { insertText: r, filterText: t, range: e, command: u };
  }
  n.create = i;
})(Oe || (Oe = {}));
var Fe;
(function(n) {
  function i(r) {
    return { items: r };
  }
  n.create = i;
})(Fe || (Fe = {}));
var Xe;
(function(n) {
  n.Invoked = 0, n.Automatic = 1;
})(Xe || (Xe = {}));
var De;
(function(n) {
  function i(r, t) {
    return { range: r, text: t };
  }
  n.create = i;
})(De || (De = {}));
var $e;
(function(n) {
  function i(r, t) {
    return { triggerKind: r, selectedCompletionInfo: t };
  }
  n.create = i;
})($e || ($e = {}));
var We;
(function(n) {
  function i(r) {
    const t = r;
    return a.objectLiteral(t) && y.is(t.uri) && a.string(t.name);
  }
  n.is = i;
})(We || (We = {}));
var ze;
(function(n) {
  function i(u, c, f, d) {
    return new Be(u, c, f, d);
  }
  n.create = i;
  function r(u) {
    let c = u;
    return !!(a.defined(c) && a.string(c.uri) && (a.undefined(c.languageId) || a.string(c.languageId)) && a.uinteger(c.lineCount) && a.func(c.getText) && a.func(c.positionAt) && a.func(c.offsetAt));
  }
  n.is = r;
  function t(u, c) {
    let f = u.getText(), d = e(c, (g, v) => {
      let h = g.range.start.line - v.range.start.line;
      return h === 0 ? g.range.start.character - v.range.start.character : h;
    }), o = f.length;
    for (let g = d.length - 1; g >= 0; g--) {
      let v = d[g], h = u.offsetAt(v.range.start), s = u.offsetAt(v.range.end);
      if (s <= o)
        f = f.substring(0, h) + v.newText + f.substring(s, f.length);
      else
        throw new Error("Overlapping edit");
      o = h;
    }
    return f;
  }
  n.applyEdits = t;
  function e(u, c) {
    if (u.length <= 1)
      return u;
    const f = u.length / 2 | 0, d = u.slice(0, f), o = u.slice(f);
    e(d, c), e(o, c);
    let g = 0, v = 0, h = 0;
    for (; g < d.length && v < o.length; )
      c(d[g], o[v]) <= 0 ? u[h++] = d[g++] : u[h++] = o[v++];
    for (; g < d.length; )
      u[h++] = d[g++];
    for (; v < o.length; )
      u[h++] = o[v++];
    return u;
  }
})(ze || (ze = {}));
class Be {
  constructor(i, r, t, e) {
    this._uri = i, this._languageId = r, this._version = t, this._content = e, this._lineOffsets = void 0;
  }
  get uri() {
    return this._uri;
  }
  get languageId() {
    return this._languageId;
  }
  get version() {
    return this._version;
  }
  getText(i) {
    if (i) {
      let r = this.offsetAt(i.start), t = this.offsetAt(i.end);
      return this._content.substring(r, t);
    }
    return this._content;
  }
  update(i, r) {
    this._content = i.text, this._version = r, this._lineOffsets = void 0;
  }
  getLineOffsets() {
    if (this._lineOffsets === void 0) {
      let i = [], r = this._content, t = !0;
      for (let e = 0; e < r.length; e++) {
        t && (i.push(e), t = !1);
        let u = r.charAt(e);
        t = u === "\r" || u === `
`, u === "\r" && e + 1 < r.length && r.charAt(e + 1) === `
` && e++;
      }
      t && r.length > 0 && i.push(r.length), this._lineOffsets = i;
    }
    return this._lineOffsets;
  }
  positionAt(i) {
    i = Math.max(Math.min(i, this._content.length), 0);
    let r = this.getLineOffsets(), t = 0, e = r.length;
    if (e === 0)
      return p.create(0, i);
    for (; t < e; ) {
      let c = Math.floor((t + e) / 2);
      r[c] > i ? e = c : t = c + 1;
    }
    let u = t - 1;
    return p.create(u, i - r[u]);
  }
  offsetAt(i) {
    let r = this.getLineOffsets();
    if (i.line >= r.length)
      return this._content.length;
    if (i.line < 0)
      return 0;
    let t = r[i.line], e = i.line + 1 < r.length ? r[i.line + 1] : this._content.length;
    return Math.max(Math.min(t + i.character, e), t);
  }
  get lineCount() {
    return this.getLineOffsets().length;
  }
}
var a;
(function(n) {
  const i = Object.prototype.toString;
  function r(s) {
    return typeof s < "u";
  }
  n.defined = r;
  function t(s) {
    return typeof s > "u";
  }
  n.undefined = t;
  function e(s) {
    return s === !0 || s === !1;
  }
  n.boolean = e;
  function u(s) {
    return i.call(s) === "[object String]";
  }
  n.string = u;
  function c(s) {
    return i.call(s) === "[object Number]";
  }
  n.number = c;
  function f(s, w, qe) {
    return i.call(s) === "[object Number]" && w <= s && s <= qe;
  }
  n.numberRange = f;
  function d(s) {
    return i.call(s) === "[object Number]" && -2147483648 <= s && s <= 2147483647;
  }
  n.integer = d;
  function o(s) {
    return i.call(s) === "[object Number]" && 0 <= s && s <= 2147483647;
  }
  n.uinteger = o;
  function g(s) {
    return i.call(s) === "[object Function]";
  }
  n.func = g;
  function v(s) {
    return s !== null && typeof s == "object";
  }
  n.objectLiteral = v;
  function h(s, w) {
    return Array.isArray(s) && s.every(w);
  }
  n.typedArray = h;
})(a || (a = {}));
export {
  C as AnnotatedTextEdit,
  M as ChangeAnnotation,
  x as ChangeAnnotationIdentifier,
  Ae as CodeAction,
  xe as CodeActionContext,
  Le as CodeActionKind,
  m as CodeActionTriggerKind,
  k as CodeDescription,
  _e as CodeLens,
  R as Color,
  H as ColorInformation,
  Q as ColorPresentation,
  b as Command,
  ue as CompletionItem,
  ee as CompletionItemKind,
  ae as CompletionItemLabelDetails,
  te as CompletionItemTag,
  ce as CompletionList,
  P as CreateFile,
  O as DeleteFile,
  I as Diagnostic,
  U as DiagnosticRelatedInformation,
  Y as DiagnosticSeverity,
  Z as DiagnosticTag,
  le as DocumentHighlight,
  de as DocumentHighlightKind,
  Ie as DocumentLink,
  be as DocumentSymbol,
  z as DocumentUri,
  J as FoldingRange,
  G as FoldingRangeKind,
  Ee as FormattingOptions,
  fe as Hover,
  Pe as InlayHint,
  $ as InlayHintKind,
  W as InlayHintLabelPart,
  $e as InlineCompletionContext,
  Oe as InlineCompletionItem,
  Fe as InlineCompletionList,
  Xe as InlineCompletionTriggerKind,
  Ne as InlineValueContext,
  Me as InlineValueEvaluatableExpression,
  Re as InlineValueText,
  Ue as InlineValueVariableLookup,
  re as InsertReplaceEdit,
  ne as InsertTextFormat,
  ie as InsertTextMode,
  E as Location,
  B as LocationLink,
  j as MarkedString,
  A as MarkupContent,
  D as MarkupKind,
  X as OptionalVersionedTextDocumentIdentifier,
  se as ParameterInformation,
  p as Position,
  l as Range,
  V as RenameFile,
  De as SelectedCompletionInfo,
  je as SelectionRange,
  we as SemanticTokenModifiers,
  me as SemanticTokenTypes,
  ye as SemanticTokens,
  oe as SignatureInformation,
  Ve as StringValue,
  he as SymbolInformation,
  ge as SymbolKind,
  ve as SymbolTag,
  ze as TextDocument,
  N as TextDocumentEdit,
  S as TextDocumentIdentifier,
  K as TextDocumentItem,
  L as TextEdit,
  y as URI,
  T as VersionedTextDocumentIdentifier,
  F as WorkspaceEdit,
  We as WorkspaceFolder,
  pe as WorkspaceSymbol,
  q as integer,
  _ as uinteger
};
