sun-form-v3 1.0.71 → 1.0.72
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/abap-DfvySaIJ.js +1404 -0
- package/dist/apex-B__0irD3.js +332 -0
- package/dist/assets/css.worker-OK053IOu.js +84 -0
- package/dist/assets/editor.worker-D9iUZyMP.js +11 -0
- package/dist/assets/html.worker-CL40hqKM.js +458 -0
- package/dist/assets/json.worker-6f9bhSHY.js +42 -0
- package/dist/assets/ts.worker-B6g3wjaE.js +37021 -0
- package/dist/azcli-CDMGhRmx.js +74 -0
- package/dist/bat-0Mk8aqzx.js +106 -0
- package/dist/bicep-BBi_I06Z.js +108 -0
- package/dist/cameligo-D0G_Zm6X.js +180 -0
- package/dist/clojure-o2ZKLeMp.js +767 -0
- package/dist/coffee-DOQff5VC.js +238 -0
- package/dist/cpp-CQGJnWhD.js +395 -0
- package/dist/csharp-C1jLsHl8.js +332 -0
- package/dist/csp-C_ttMQaW.js +59 -0
- package/dist/css-BC202kVV.js +193 -0
- package/dist/cssMode-D3INtz5D.js +1541 -0
- package/dist/cypher-DwtEH7Fi.js +269 -0
- package/dist/dart-D9XknsP2.js +287 -0
- package/dist/dockerfile-DgsNjqqa.js +136 -0
- package/dist/ecl-BAMCHBl6.js +462 -0
- package/dist/elixir-CegIttP8.js +575 -0
- package/dist/favicon.ico +0 -0
- package/dist/flow9-9608t7UV.js +148 -0
- package/dist/freemarker2-hasIzj0A.js +995 -0
- package/dist/fsharp-CCtt9-1_.js +223 -0
- package/dist/go-CGUIPbct.js +224 -0
- package/dist/graphql-BNRIFFIn.js +157 -0
- package/dist/handlebars-Cqza9dif.js +425 -0
- package/dist/hcl-C__KLIXe.js +189 -0
- package/dist/html-QpDlLWtS.js +314 -0
- package/dist/htmlMode-3p93KT8l.js +1551 -0
- package/dist/index2-jkDcibEo.js +120443 -0
- package/dist/ini-CeKYn_zA.js +77 -0
- package/dist/java-Dm24deQl.js +238 -0
- package/dist/javascript-CSPB5Brm.js +76 -0
- package/dist/jsonMode-qA6pURD0.js +1957 -0
- package/dist/julia-BImNW7VE.js +517 -0
- package/dist/kotlin-BfE79GEb.js +259 -0
- package/dist/less-DglNOcaC.js +168 -0
- package/dist/lexon-BA0dRz9Q.js +163 -0
- package/dist/liquid-BWuASSim.js +246 -0
- package/dist/lua-DMkWzJcm.js +168 -0
- package/dist/m3-sA-5shO8.js +216 -0
- package/dist/markdown-OYRB1igA.js +235 -0
- package/dist/mdx-CnHJXO9F.js +171 -0
- package/dist/mips-rRzkJ_7G.js +204 -0
- package/dist/msdax-DoVJdUhd.js +381 -0
- package/dist/mysql-Ty44IHXo.js +884 -0
- package/dist/objective-c-VUfyhYrA.js +189 -0
- package/dist/pascal-DkASiYyw.js +257 -0
- package/dist/pascaligo-p-ELPlVO.js +170 -0
- package/dist/perl-Cjl1FxLZ.js +632 -0
- package/dist/pgsql-DjVenF7s.js +857 -0
- package/dist/php-CwvGzZOO.js +506 -0
- package/dist/pla-Br1iaBIV.js +143 -0
- package/dist/postiats-BaeP8zZY.js +913 -0
- package/dist/powerquery-CLCshuo8.js +896 -0
- package/dist/powershell-CZV50w5N.js +245 -0
- package/dist/protobuf-MV3XTewJ.js +426 -0
- package/dist/pug-DkDg4c4l.js +408 -0
- package/dist/python-CRYsEVap.js +282 -0
- package/dist/qsharp-BAtiKA97.js +291 -0
- package/dist/r-8ocrd-h-.js +249 -0
- package/dist/razor-DyEtGntt.js +556 -0
- package/dist/redis-9sZiddxc.js +308 -0
- package/dist/redshift-DQfTOGC0.js +815 -0
- package/dist/restructuredtext-DXU-vkgr.js +180 -0
- package/dist/ruby-DotfqwMf.js +517 -0
- package/dist/rust-BIauJ5KN.js +349 -0
- package/dist/sb-CmWMvDEV.js +121 -0
- package/dist/scala-C81brEbk.js +376 -0
- package/dist/scheme-D0pcFz2x.js +114 -0
- package/dist/scss-BOdN2fGG.js +268 -0
- package/dist/shell-6E09eAkU.js +227 -0
- package/dist/solidity-CWStzA1K.js +1373 -0
- package/dist/sophia-76Sb6CWe.js +205 -0
- package/dist/sparql-BmZTkOWT.js +207 -0
- package/dist/sql-Cs9TBAW5.js +859 -0
- package/dist/st-B-rqE1Bu.js +422 -0
- package/dist/style.css +1 -0
- package/dist/sun-form-v3.es.js +4 -0
- package/dist/sun-form-v3.umd.js +1902 -0
- package/dist/swift-Btsj6YxQ.js +318 -0
- package/dist/systemverilog-B3RHBRa2.js +582 -0
- package/dist/tcl-Dpj776pn.js +238 -0
- package/dist/tsMode-BrlIPEQw.js +885 -0
- package/dist/twig-Bb9JmBsE.js +398 -0
- package/dist/typescript-CYTudnTM.js +349 -0
- package/dist/typespec-CDWeg3SU.js +123 -0
- package/dist/vb-DEXnYwEI.js +378 -0
- package/dist/wgsl-D602c1lx.js +445 -0
- package/dist/xml-B-x5164u.js +101 -0
- package/dist/yaml-Buq2hM65.js +212 -0
- package/package.json +7 -10
- package/src/App.vue +0 -9
- package/src/assets/font/YouSheBiaoTiHei-2.ttf +0 -0
- package/src/assets/font/demo.css +0 -539
- package/src/assets/font/demo_index.html +0 -1200
- package/src/assets/font/iconfont.css +0 -191
- package/src/assets/font/iconfont.js +0 -1
- package/src/assets/font/iconfont.json +0 -317
- package/src/assets/font/iconfont.ttf +0 -0
- package/src/assets/font/iconfont.woff +0 -0
- package/src/assets/font/iconfont.woff2 +0 -0
- package/src/assets/img/bg_footer.png +0 -0
- package/src/assets/img/bg_title.png +0 -0
- package/src/assets/img/file.png +0 -0
- package/src/assets/img/logo.png +0 -0
- package/src/assets/img/logo2.png +0 -0
- package/src/assets/img/logo22.png +0 -0
- package/src/assets/img/logo23.png +0 -0
- package/src/assets/img/logo3.png +0 -0
- package/src/assets/img//347/237/251/345/275/242@2x.png +0 -0
- package/src/assets/logo.svg +0 -1
- package/src/assets/styles/element/index.scss +0 -15
- package/src/assets/styles/index.css +0 -3
- package/src/components/a.js +0 -14
- package/src/components/aDesigner/config.vue +0 -127
- package/src/components/aDesigner/design.vue +0 -20
- package/src/components/aDesigner/index.vue +0 -144
- package/src/components/aDesigner/panel.vue +0 -144
- package/src/components/aDesigner/show.vue +0 -24
- package/src/components/widgetCommonComps/commonApiConfig/index.vue +0 -194
- package/src/components/widgetCommonComps/commonCard/index.vue +0 -36
- package/src/components/widgetCommonComps/commonCodeEditor/editor.vue +0 -219
- package/src/components/widgetCommonComps/commonCodeEditor/modalEditor.vue +0 -68
- package/src/components/widgetCommonComps/commonCollapseCard/index.vue +0 -10
- package/src/components/widgetCommonComps/commonContainer/index.vue +0 -95
- package/src/components/widgetCommonComps/commonJsonInput/index.vue +0 -59
- package/src/components/widgetCommonComps/commonLabelContainer/index.vue +0 -39
- package/src/components/widgetCommonComps/commonSidetree/index.vue +0 -61
- package/src/components/widgetCommonComps/commonTypeInput/index.vue +0 -75
- package/src/components/widgetCommonComps/commonWidgetLabelContainer/index.vue +0 -55
- package/src/components/widgetCommonComps/index copy.js +0 -17
- package/src/components/widgetCommonComps/index.js +0 -17
- package/src/components/widgetConfigComps/config-input/index.vue +0 -60
- package/src/components/widgetConfigComps/index copy.js +0 -13
- package/src/components/widgetConfigComps/index.js +0 -17
- package/src/components/widgetShowComps/index.js +0 -29
- package/src/components/widgetShowComps/widget-form/index.vue +0 -43
- package/src/components/widgetShowComps/widget-homepage/index.vue +0 -41
- package/src/components/widgetShowComps/widget-input/index.vue +0 -85
- package/src/components/widgetShowComps/widget-select/index.vue +0 -31
- package/src/designer.js +0 -342
- package/src/http.js +0 -293
- package/src/index.js +0 -24
- package/src/index2.js +0 -23
- package/src/main.js +0 -19
- package/src/remark.js +0 -708
- package/src/testBtn.vue +0 -11
- package/src/testInput.vue +0 -12
- package/src/util/jsformat.js +0 -568
- package/src/widgetConfig.js +0 -1112
@@ -0,0 +1,1541 @@
|
|
1
|
+
import { m as Le } from "./index2-jkDcibEo.js";
|
2
|
+
/*!-----------------------------------------------------------------------------
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
4
|
+
* Version: 0.49.0(383fdf3fc0e1e1a024068b8d0fd4f3dcbae74d04)
|
5
|
+
* Released under the MIT license
|
6
|
+
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
|
7
|
+
*-----------------------------------------------------------------------------*/
|
8
|
+
var je = Object.defineProperty, Ne = Object.getOwnPropertyDescriptor, We = Object.getOwnPropertyNames, Oe = Object.prototype.hasOwnProperty, Ue = (e, n, i, r) => {
|
9
|
+
if (n && typeof n == "object" || typeof n == "function")
|
10
|
+
for (let t of We(n))
|
11
|
+
!Oe.call(e, t) && t !== i && je(e, t, { get: () => n[t], enumerable: !(r = Ne(n, t)) || r.enumerable });
|
12
|
+
return e;
|
13
|
+
}, Ve = (e, n, i) => (Ue(e, n, "default"), i), c = {};
|
14
|
+
Ve(c, Le);
|
15
|
+
var He = 2 * 60 * 1e3, ze = class {
|
16
|
+
constructor(e) {
|
17
|
+
this._defaults = e, this._worker = null, this._client = null, this._idleCheckInterval = window.setInterval(() => this._checkIfIdle(), 30 * 1e3), this._lastUsedTime = 0, this._configChangeListener = this._defaults.onDidChange(() => this._stopWorker());
|
18
|
+
}
|
19
|
+
_stopWorker() {
|
20
|
+
this._worker && (this._worker.dispose(), this._worker = null), this._client = null;
|
21
|
+
}
|
22
|
+
dispose() {
|
23
|
+
clearInterval(this._idleCheckInterval), this._configChangeListener.dispose(), this._stopWorker();
|
24
|
+
}
|
25
|
+
_checkIfIdle() {
|
26
|
+
if (!this._worker)
|
27
|
+
return;
|
28
|
+
Date.now() - this._lastUsedTime > He && this._stopWorker();
|
29
|
+
}
|
30
|
+
_getClient() {
|
31
|
+
return this._lastUsedTime = Date.now(), this._client || (this._worker = c.editor.createWebWorker({
|
32
|
+
// module that exports the create() method and returns a `CSSWorker` instance
|
33
|
+
moduleId: "vs/language/css/cssWorker",
|
34
|
+
label: this._defaults.languageId,
|
35
|
+
// passed in to the create() method
|
36
|
+
createData: {
|
37
|
+
options: this._defaults.options,
|
38
|
+
languageId: this._defaults.languageId
|
39
|
+
}
|
40
|
+
}), this._client = this._worker.getProxy()), this._client;
|
41
|
+
}
|
42
|
+
getLanguageServiceWorker(...e) {
|
43
|
+
let n;
|
44
|
+
return this._getClient().then((i) => {
|
45
|
+
n = i;
|
46
|
+
}).then((i) => {
|
47
|
+
if (this._worker)
|
48
|
+
return this._worker.withSyncedResources(e);
|
49
|
+
}).then((i) => n);
|
50
|
+
}
|
51
|
+
}, J;
|
52
|
+
(function(e) {
|
53
|
+
e.MIN_VALUE = -2147483648, e.MAX_VALUE = 2147483647;
|
54
|
+
})(J || (J = {}));
|
55
|
+
var W;
|
56
|
+
(function(e) {
|
57
|
+
e.MIN_VALUE = 0, e.MAX_VALUE = 2147483647;
|
58
|
+
})(W || (W = {}));
|
59
|
+
var k;
|
60
|
+
(function(e) {
|
61
|
+
function n(r, t) {
|
62
|
+
return r === Number.MAX_VALUE && (r = W.MAX_VALUE), t === Number.MAX_VALUE && (t = W.MAX_VALUE), { line: r, character: t };
|
63
|
+
}
|
64
|
+
e.create = n;
|
65
|
+
function i(r) {
|
66
|
+
var t = r;
|
67
|
+
return s.objectLiteral(t) && s.uinteger(t.line) && s.uinteger(t.character);
|
68
|
+
}
|
69
|
+
e.is = i;
|
70
|
+
})(k || (k = {}));
|
71
|
+
var p;
|
72
|
+
(function(e) {
|
73
|
+
function n(r, t, a, o) {
|
74
|
+
if (s.uinteger(r) && s.uinteger(t) && s.uinteger(a) && s.uinteger(o))
|
75
|
+
return { start: k.create(r, t), end: k.create(a, o) };
|
76
|
+
if (k.is(r) && k.is(t))
|
77
|
+
return { start: r, end: t };
|
78
|
+
throw new Error("Range#create called with invalid arguments[" + r + ", " + t + ", " + a + ", " + o + "]");
|
79
|
+
}
|
80
|
+
e.create = n;
|
81
|
+
function i(r) {
|
82
|
+
var t = r;
|
83
|
+
return s.objectLiteral(t) && k.is(t.start) && k.is(t.end);
|
84
|
+
}
|
85
|
+
e.is = i;
|
86
|
+
})(p || (p = {}));
|
87
|
+
var z;
|
88
|
+
(function(e) {
|
89
|
+
function n(r, t) {
|
90
|
+
return { uri: r, range: t };
|
91
|
+
}
|
92
|
+
e.create = n;
|
93
|
+
function i(r) {
|
94
|
+
var t = r;
|
95
|
+
return s.defined(t) && p.is(t.range) && (s.string(t.uri) || s.undefined(t.uri));
|
96
|
+
}
|
97
|
+
e.is = i;
|
98
|
+
})(z || (z = {}));
|
99
|
+
var Y;
|
100
|
+
(function(e) {
|
101
|
+
function n(r, t, a, o) {
|
102
|
+
return { targetUri: r, targetRange: t, targetSelectionRange: a, originSelectionRange: o };
|
103
|
+
}
|
104
|
+
e.create = n;
|
105
|
+
function i(r) {
|
106
|
+
var t = r;
|
107
|
+
return s.defined(t) && p.is(t.targetRange) && s.string(t.targetUri) && (p.is(t.targetSelectionRange) || s.undefined(t.targetSelectionRange)) && (p.is(t.originSelectionRange) || s.undefined(t.originSelectionRange));
|
108
|
+
}
|
109
|
+
e.is = i;
|
110
|
+
})(Y || (Y = {}));
|
111
|
+
var X;
|
112
|
+
(function(e) {
|
113
|
+
function n(r, t, a, o) {
|
114
|
+
return {
|
115
|
+
red: r,
|
116
|
+
green: t,
|
117
|
+
blue: a,
|
118
|
+
alpha: o
|
119
|
+
};
|
120
|
+
}
|
121
|
+
e.create = n;
|
122
|
+
function i(r) {
|
123
|
+
var t = r;
|
124
|
+
return s.numberRange(t.red, 0, 1) && s.numberRange(t.green, 0, 1) && s.numberRange(t.blue, 0, 1) && s.numberRange(t.alpha, 0, 1);
|
125
|
+
}
|
126
|
+
e.is = i;
|
127
|
+
})(X || (X = {}));
|
128
|
+
var Z;
|
129
|
+
(function(e) {
|
130
|
+
function n(r, t) {
|
131
|
+
return {
|
132
|
+
range: r,
|
133
|
+
color: t
|
134
|
+
};
|
135
|
+
}
|
136
|
+
e.create = n;
|
137
|
+
function i(r) {
|
138
|
+
var t = r;
|
139
|
+
return p.is(t.range) && X.is(t.color);
|
140
|
+
}
|
141
|
+
e.is = i;
|
142
|
+
})(Z || (Z = {}));
|
143
|
+
var K;
|
144
|
+
(function(e) {
|
145
|
+
function n(r, t, a) {
|
146
|
+
return {
|
147
|
+
label: r,
|
148
|
+
textEdit: t,
|
149
|
+
additionalTextEdits: a
|
150
|
+
};
|
151
|
+
}
|
152
|
+
e.create = n;
|
153
|
+
function i(r) {
|
154
|
+
var t = r;
|
155
|
+
return s.string(t.label) && (s.undefined(t.textEdit) || x.is(t)) && (s.undefined(t.additionalTextEdits) || s.typedArray(t.additionalTextEdits, x.is));
|
156
|
+
}
|
157
|
+
e.is = i;
|
158
|
+
})(K || (K = {}));
|
159
|
+
var R;
|
160
|
+
(function(e) {
|
161
|
+
e.Comment = "comment", e.Imports = "imports", e.Region = "region";
|
162
|
+
})(R || (R = {}));
|
163
|
+
var ee;
|
164
|
+
(function(e) {
|
165
|
+
function n(r, t, a, o, u) {
|
166
|
+
var g = {
|
167
|
+
startLine: r,
|
168
|
+
endLine: t
|
169
|
+
};
|
170
|
+
return s.defined(a) && (g.startCharacter = a), s.defined(o) && (g.endCharacter = o), s.defined(u) && (g.kind = u), g;
|
171
|
+
}
|
172
|
+
e.create = n;
|
173
|
+
function i(r) {
|
174
|
+
var t = r;
|
175
|
+
return s.uinteger(t.startLine) && s.uinteger(t.startLine) && (s.undefined(t.startCharacter) || s.uinteger(t.startCharacter)) && (s.undefined(t.endCharacter) || s.uinteger(t.endCharacter)) && (s.undefined(t.kind) || s.string(t.kind));
|
176
|
+
}
|
177
|
+
e.is = i;
|
178
|
+
})(ee || (ee = {}));
|
179
|
+
var B;
|
180
|
+
(function(e) {
|
181
|
+
function n(r, t) {
|
182
|
+
return {
|
183
|
+
location: r,
|
184
|
+
message: t
|
185
|
+
};
|
186
|
+
}
|
187
|
+
e.create = n;
|
188
|
+
function i(r) {
|
189
|
+
var t = r;
|
190
|
+
return s.defined(t) && z.is(t.location) && s.string(t.message);
|
191
|
+
}
|
192
|
+
e.is = i;
|
193
|
+
})(B || (B = {}));
|
194
|
+
var y;
|
195
|
+
(function(e) {
|
196
|
+
e.Error = 1, e.Warning = 2, e.Information = 3, e.Hint = 4;
|
197
|
+
})(y || (y = {}));
|
198
|
+
var te;
|
199
|
+
(function(e) {
|
200
|
+
e.Unnecessary = 1, e.Deprecated = 2;
|
201
|
+
})(te || (te = {}));
|
202
|
+
var re;
|
203
|
+
(function(e) {
|
204
|
+
function n(i) {
|
205
|
+
var r = i;
|
206
|
+
return r != null && s.string(r.href);
|
207
|
+
}
|
208
|
+
e.is = n;
|
209
|
+
})(re || (re = {}));
|
210
|
+
var O;
|
211
|
+
(function(e) {
|
212
|
+
function n(r, t, a, o, u, g) {
|
213
|
+
var d = { range: r, message: t };
|
214
|
+
return s.defined(a) && (d.severity = a), s.defined(o) && (d.code = o), s.defined(u) && (d.source = u), s.defined(g) && (d.relatedInformation = g), d;
|
215
|
+
}
|
216
|
+
e.create = n;
|
217
|
+
function i(r) {
|
218
|
+
var t, a = r;
|
219
|
+
return s.defined(a) && p.is(a.range) && s.string(a.message) && (s.number(a.severity) || s.undefined(a.severity)) && (s.integer(a.code) || s.string(a.code) || s.undefined(a.code)) && (s.undefined(a.codeDescription) || s.string((t = a.codeDescription) === null || t === void 0 ? void 0 : t.href)) && (s.string(a.source) || s.undefined(a.source)) && (s.undefined(a.relatedInformation) || s.typedArray(a.relatedInformation, B.is));
|
220
|
+
}
|
221
|
+
e.is = i;
|
222
|
+
})(O || (O = {}));
|
223
|
+
var D;
|
224
|
+
(function(e) {
|
225
|
+
function n(r, t) {
|
226
|
+
for (var a = [], o = 2; o < arguments.length; o++)
|
227
|
+
a[o - 2] = arguments[o];
|
228
|
+
var u = { title: r, command: t };
|
229
|
+
return s.defined(a) && a.length > 0 && (u.arguments = a), u;
|
230
|
+
}
|
231
|
+
e.create = n;
|
232
|
+
function i(r) {
|
233
|
+
var t = r;
|
234
|
+
return s.defined(t) && s.string(t.title) && s.string(t.command);
|
235
|
+
}
|
236
|
+
e.is = i;
|
237
|
+
})(D || (D = {}));
|
238
|
+
var x;
|
239
|
+
(function(e) {
|
240
|
+
function n(a, o) {
|
241
|
+
return { range: a, newText: o };
|
242
|
+
}
|
243
|
+
e.replace = n;
|
244
|
+
function i(a, o) {
|
245
|
+
return { range: { start: a, end: a }, newText: o };
|
246
|
+
}
|
247
|
+
e.insert = i;
|
248
|
+
function r(a) {
|
249
|
+
return { range: a, newText: "" };
|
250
|
+
}
|
251
|
+
e.del = r;
|
252
|
+
function t(a) {
|
253
|
+
var o = a;
|
254
|
+
return s.objectLiteral(o) && s.string(o.newText) && p.is(o.range);
|
255
|
+
}
|
256
|
+
e.is = t;
|
257
|
+
})(x || (x = {}));
|
258
|
+
var I;
|
259
|
+
(function(e) {
|
260
|
+
function n(r, t, a) {
|
261
|
+
var o = { label: r };
|
262
|
+
return t !== void 0 && (o.needsConfirmation = t), a !== void 0 && (o.description = a), o;
|
263
|
+
}
|
264
|
+
e.create = n;
|
265
|
+
function i(r) {
|
266
|
+
var t = r;
|
267
|
+
return t !== void 0 && s.objectLiteral(t) && s.string(t.label) && (s.boolean(t.needsConfirmation) || t.needsConfirmation === void 0) && (s.string(t.description) || t.description === void 0);
|
268
|
+
}
|
269
|
+
e.is = i;
|
270
|
+
})(I || (I = {}));
|
271
|
+
var m;
|
272
|
+
(function(e) {
|
273
|
+
function n(i) {
|
274
|
+
var r = i;
|
275
|
+
return typeof r == "string";
|
276
|
+
}
|
277
|
+
e.is = n;
|
278
|
+
})(m || (m = {}));
|
279
|
+
var b;
|
280
|
+
(function(e) {
|
281
|
+
function n(a, o, u) {
|
282
|
+
return { range: a, newText: o, annotationId: u };
|
283
|
+
}
|
284
|
+
e.replace = n;
|
285
|
+
function i(a, o, u) {
|
286
|
+
return { range: { start: a, end: a }, newText: o, annotationId: u };
|
287
|
+
}
|
288
|
+
e.insert = i;
|
289
|
+
function r(a, o) {
|
290
|
+
return { range: a, newText: "", annotationId: o };
|
291
|
+
}
|
292
|
+
e.del = r;
|
293
|
+
function t(a) {
|
294
|
+
var o = a;
|
295
|
+
return x.is(o) && (I.is(o.annotationId) || m.is(o.annotationId));
|
296
|
+
}
|
297
|
+
e.is = t;
|
298
|
+
})(b || (b = {}));
|
299
|
+
var U;
|
300
|
+
(function(e) {
|
301
|
+
function n(r, t) {
|
302
|
+
return { textDocument: r, edits: t };
|
303
|
+
}
|
304
|
+
e.create = n;
|
305
|
+
function i(r) {
|
306
|
+
var t = r;
|
307
|
+
return s.defined(t) && V.is(t.textDocument) && Array.isArray(t.edits);
|
308
|
+
}
|
309
|
+
e.is = i;
|
310
|
+
})(U || (U = {}));
|
311
|
+
var M;
|
312
|
+
(function(e) {
|
313
|
+
function n(r, t, a) {
|
314
|
+
var o = {
|
315
|
+
kind: "create",
|
316
|
+
uri: r
|
317
|
+
};
|
318
|
+
return t !== void 0 && (t.overwrite !== void 0 || t.ignoreIfExists !== void 0) && (o.options = t), a !== void 0 && (o.annotationId = a), o;
|
319
|
+
}
|
320
|
+
e.create = n;
|
321
|
+
function i(r) {
|
322
|
+
var t = r;
|
323
|
+
return t && t.kind === "create" && s.string(t.uri) && (t.options === void 0 || (t.options.overwrite === void 0 || s.boolean(t.options.overwrite)) && (t.options.ignoreIfExists === void 0 || s.boolean(t.options.ignoreIfExists))) && (t.annotationId === void 0 || m.is(t.annotationId));
|
324
|
+
}
|
325
|
+
e.is = i;
|
326
|
+
})(M || (M = {}));
|
327
|
+
var S;
|
328
|
+
(function(e) {
|
329
|
+
function n(r, t, a, o) {
|
330
|
+
var u = {
|
331
|
+
kind: "rename",
|
332
|
+
oldUri: r,
|
333
|
+
newUri: t
|
334
|
+
};
|
335
|
+
return a !== void 0 && (a.overwrite !== void 0 || a.ignoreIfExists !== void 0) && (u.options = a), o !== void 0 && (u.annotationId = o), u;
|
336
|
+
}
|
337
|
+
e.create = n;
|
338
|
+
function i(r) {
|
339
|
+
var t = r;
|
340
|
+
return t && t.kind === "rename" && s.string(t.oldUri) && s.string(t.newUri) && (t.options === void 0 || (t.options.overwrite === void 0 || s.boolean(t.options.overwrite)) && (t.options.ignoreIfExists === void 0 || s.boolean(t.options.ignoreIfExists))) && (t.annotationId === void 0 || m.is(t.annotationId));
|
341
|
+
}
|
342
|
+
e.is = i;
|
343
|
+
})(S || (S = {}));
|
344
|
+
var T;
|
345
|
+
(function(e) {
|
346
|
+
function n(r, t, a) {
|
347
|
+
var o = {
|
348
|
+
kind: "delete",
|
349
|
+
uri: r
|
350
|
+
};
|
351
|
+
return t !== void 0 && (t.recursive !== void 0 || t.ignoreIfNotExists !== void 0) && (o.options = t), a !== void 0 && (o.annotationId = a), o;
|
352
|
+
}
|
353
|
+
e.create = n;
|
354
|
+
function i(r) {
|
355
|
+
var t = r;
|
356
|
+
return t && t.kind === "delete" && s.string(t.uri) && (t.options === void 0 || (t.options.recursive === void 0 || s.boolean(t.options.recursive)) && (t.options.ignoreIfNotExists === void 0 || s.boolean(t.options.ignoreIfNotExists))) && (t.annotationId === void 0 || m.is(t.annotationId));
|
357
|
+
}
|
358
|
+
e.is = i;
|
359
|
+
})(T || (T = {}));
|
360
|
+
var $;
|
361
|
+
(function(e) {
|
362
|
+
function n(i) {
|
363
|
+
var r = i;
|
364
|
+
return r && (r.changes !== void 0 || r.documentChanges !== void 0) && (r.documentChanges === void 0 || r.documentChanges.every(function(t) {
|
365
|
+
return s.string(t.kind) ? M.is(t) || S.is(t) || T.is(t) : U.is(t);
|
366
|
+
}));
|
367
|
+
}
|
368
|
+
e.is = n;
|
369
|
+
})($ || ($ = {}));
|
370
|
+
var N = (
|
371
|
+
/** @class */
|
372
|
+
function() {
|
373
|
+
function e(n, i) {
|
374
|
+
this.edits = n, this.changeAnnotations = i;
|
375
|
+
}
|
376
|
+
return e.prototype.insert = function(n, i, r) {
|
377
|
+
var t, a;
|
378
|
+
if (r === void 0 ? t = x.insert(n, i) : m.is(r) ? (a = r, t = b.insert(n, i, r)) : (this.assertChangeAnnotations(this.changeAnnotations), a = this.changeAnnotations.manage(r), t = b.insert(n, i, a)), this.edits.push(t), a !== void 0)
|
379
|
+
return a;
|
380
|
+
}, e.prototype.replace = function(n, i, r) {
|
381
|
+
var t, a;
|
382
|
+
if (r === void 0 ? t = x.replace(n, i) : m.is(r) ? (a = r, t = b.replace(n, i, r)) : (this.assertChangeAnnotations(this.changeAnnotations), a = this.changeAnnotations.manage(r), t = b.replace(n, i, a)), this.edits.push(t), a !== void 0)
|
383
|
+
return a;
|
384
|
+
}, e.prototype.delete = function(n, i) {
|
385
|
+
var r, t;
|
386
|
+
if (i === void 0 ? r = x.del(n) : m.is(i) ? (t = i, r = b.del(n, i)) : (this.assertChangeAnnotations(this.changeAnnotations), t = this.changeAnnotations.manage(i), r = b.del(n, t)), this.edits.push(r), t !== void 0)
|
387
|
+
return t;
|
388
|
+
}, e.prototype.add = function(n) {
|
389
|
+
this.edits.push(n);
|
390
|
+
}, e.prototype.all = function() {
|
391
|
+
return this.edits;
|
392
|
+
}, e.prototype.clear = function() {
|
393
|
+
this.edits.splice(0, this.edits.length);
|
394
|
+
}, e.prototype.assertChangeAnnotations = function(n) {
|
395
|
+
if (n === void 0)
|
396
|
+
throw new Error("Text edit change is not configured to manage change annotations.");
|
397
|
+
}, e;
|
398
|
+
}()
|
399
|
+
), ne = (
|
400
|
+
/** @class */
|
401
|
+
function() {
|
402
|
+
function e(n) {
|
403
|
+
this._annotations = n === void 0 ? /* @__PURE__ */ Object.create(null) : n, this._counter = 0, this._size = 0;
|
404
|
+
}
|
405
|
+
return e.prototype.all = function() {
|
406
|
+
return this._annotations;
|
407
|
+
}, Object.defineProperty(e.prototype, "size", {
|
408
|
+
get: function() {
|
409
|
+
return this._size;
|
410
|
+
},
|
411
|
+
enumerable: !1,
|
412
|
+
configurable: !0
|
413
|
+
}), e.prototype.manage = function(n, i) {
|
414
|
+
var r;
|
415
|
+
if (m.is(n) ? r = n : (r = this.nextId(), i = n), this._annotations[r] !== void 0)
|
416
|
+
throw new Error("Id " + r + " is already in use.");
|
417
|
+
if (i === void 0)
|
418
|
+
throw new Error("No annotation provided for id " + r);
|
419
|
+
return this._annotations[r] = i, this._size++, r;
|
420
|
+
}, e.prototype.nextId = function() {
|
421
|
+
return this._counter++, this._counter.toString();
|
422
|
+
}, e;
|
423
|
+
}()
|
424
|
+
);
|
425
|
+
/** @class */
|
426
|
+
(function() {
|
427
|
+
function e(n) {
|
428
|
+
var i = this;
|
429
|
+
this._textEditChanges = /* @__PURE__ */ Object.create(null), n !== void 0 ? (this._workspaceEdit = n, n.documentChanges ? (this._changeAnnotations = new ne(n.changeAnnotations), n.changeAnnotations = this._changeAnnotations.all(), n.documentChanges.forEach(function(r) {
|
430
|
+
if (U.is(r)) {
|
431
|
+
var t = new N(r.edits, i._changeAnnotations);
|
432
|
+
i._textEditChanges[r.textDocument.uri] = t;
|
433
|
+
}
|
434
|
+
})) : n.changes && Object.keys(n.changes).forEach(function(r) {
|
435
|
+
var t = new N(n.changes[r]);
|
436
|
+
i._textEditChanges[r] = t;
|
437
|
+
})) : this._workspaceEdit = {};
|
438
|
+
}
|
439
|
+
return Object.defineProperty(e.prototype, "edit", {
|
440
|
+
/**
|
441
|
+
* Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal
|
442
|
+
* use to be returned from a workspace edit operation like rename.
|
443
|
+
*/
|
444
|
+
get: function() {
|
445
|
+
return this.initDocumentChanges(), this._changeAnnotations !== void 0 && (this._changeAnnotations.size === 0 ? this._workspaceEdit.changeAnnotations = void 0 : this._workspaceEdit.changeAnnotations = this._changeAnnotations.all()), this._workspaceEdit;
|
446
|
+
},
|
447
|
+
enumerable: !1,
|
448
|
+
configurable: !0
|
449
|
+
}), e.prototype.getTextEditChange = function(n) {
|
450
|
+
if (V.is(n)) {
|
451
|
+
if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
|
452
|
+
throw new Error("Workspace edit is not configured for document changes.");
|
453
|
+
var i = { uri: n.uri, version: n.version }, r = this._textEditChanges[i.uri];
|
454
|
+
if (!r) {
|
455
|
+
var t = [], a = {
|
456
|
+
textDocument: i,
|
457
|
+
edits: t
|
458
|
+
};
|
459
|
+
this._workspaceEdit.documentChanges.push(a), r = new N(t, this._changeAnnotations), this._textEditChanges[i.uri] = r;
|
460
|
+
}
|
461
|
+
return r;
|
462
|
+
} else {
|
463
|
+
if (this.initChanges(), this._workspaceEdit.changes === void 0)
|
464
|
+
throw new Error("Workspace edit is not configured for normal text edit changes.");
|
465
|
+
var r = this._textEditChanges[n];
|
466
|
+
if (!r) {
|
467
|
+
var t = [];
|
468
|
+
this._workspaceEdit.changes[n] = t, r = new N(t), this._textEditChanges[n] = r;
|
469
|
+
}
|
470
|
+
return r;
|
471
|
+
}
|
472
|
+
}, e.prototype.initDocumentChanges = function() {
|
473
|
+
this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._changeAnnotations = new ne(), this._workspaceEdit.documentChanges = [], this._workspaceEdit.changeAnnotations = this._changeAnnotations.all());
|
474
|
+
}, e.prototype.initChanges = function() {
|
475
|
+
this._workspaceEdit.documentChanges === void 0 && this._workspaceEdit.changes === void 0 && (this._workspaceEdit.changes = /* @__PURE__ */ Object.create(null));
|
476
|
+
}, e.prototype.createFile = function(n, i, r) {
|
477
|
+
if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
|
478
|
+
throw new Error("Workspace edit is not configured for document changes.");
|
479
|
+
var t;
|
480
|
+
I.is(i) || m.is(i) ? t = i : r = i;
|
481
|
+
var a, o;
|
482
|
+
if (t === void 0 ? a = M.create(n, r) : (o = m.is(t) ? t : this._changeAnnotations.manage(t), a = M.create(n, r, o)), this._workspaceEdit.documentChanges.push(a), o !== void 0)
|
483
|
+
return o;
|
484
|
+
}, e.prototype.renameFile = function(n, i, r, t) {
|
485
|
+
if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
|
486
|
+
throw new Error("Workspace edit is not configured for document changes.");
|
487
|
+
var a;
|
488
|
+
I.is(r) || m.is(r) ? a = r : t = r;
|
489
|
+
var o, u;
|
490
|
+
if (a === void 0 ? o = S.create(n, i, t) : (u = m.is(a) ? a : this._changeAnnotations.manage(a), o = S.create(n, i, t, u)), this._workspaceEdit.documentChanges.push(o), u !== void 0)
|
491
|
+
return u;
|
492
|
+
}, e.prototype.deleteFile = function(n, i, r) {
|
493
|
+
if (this.initDocumentChanges(), this._workspaceEdit.documentChanges === void 0)
|
494
|
+
throw new Error("Workspace edit is not configured for document changes.");
|
495
|
+
var t;
|
496
|
+
I.is(i) || m.is(i) ? t = i : r = i;
|
497
|
+
var a, o;
|
498
|
+
if (t === void 0 ? a = T.create(n, r) : (o = m.is(t) ? t : this._changeAnnotations.manage(t), a = T.create(n, r, o)), this._workspaceEdit.documentChanges.push(a), o !== void 0)
|
499
|
+
return o;
|
500
|
+
}, e;
|
501
|
+
})();
|
502
|
+
var ie;
|
503
|
+
(function(e) {
|
504
|
+
function n(r) {
|
505
|
+
return { uri: r };
|
506
|
+
}
|
507
|
+
e.create = n;
|
508
|
+
function i(r) {
|
509
|
+
var t = r;
|
510
|
+
return s.defined(t) && s.string(t.uri);
|
511
|
+
}
|
512
|
+
e.is = i;
|
513
|
+
})(ie || (ie = {}));
|
514
|
+
var ae;
|
515
|
+
(function(e) {
|
516
|
+
function n(r, t) {
|
517
|
+
return { uri: r, version: t };
|
518
|
+
}
|
519
|
+
e.create = n;
|
520
|
+
function i(r) {
|
521
|
+
var t = r;
|
522
|
+
return s.defined(t) && s.string(t.uri) && s.integer(t.version);
|
523
|
+
}
|
524
|
+
e.is = i;
|
525
|
+
})(ae || (ae = {}));
|
526
|
+
var V;
|
527
|
+
(function(e) {
|
528
|
+
function n(r, t) {
|
529
|
+
return { uri: r, version: t };
|
530
|
+
}
|
531
|
+
e.create = n;
|
532
|
+
function i(r) {
|
533
|
+
var t = r;
|
534
|
+
return s.defined(t) && s.string(t.uri) && (t.version === null || s.integer(t.version));
|
535
|
+
}
|
536
|
+
e.is = i;
|
537
|
+
})(V || (V = {}));
|
538
|
+
var oe;
|
539
|
+
(function(e) {
|
540
|
+
function n(r, t, a, o) {
|
541
|
+
return { uri: r, languageId: t, version: a, text: o };
|
542
|
+
}
|
543
|
+
e.create = n;
|
544
|
+
function i(r) {
|
545
|
+
var t = r;
|
546
|
+
return s.defined(t) && s.string(t.uri) && s.string(t.languageId) && s.integer(t.version) && s.string(t.text);
|
547
|
+
}
|
548
|
+
e.is = i;
|
549
|
+
})(oe || (oe = {}));
|
550
|
+
var F;
|
551
|
+
(function(e) {
|
552
|
+
e.PlainText = "plaintext", e.Markdown = "markdown";
|
553
|
+
})(F || (F = {}));
|
554
|
+
(function(e) {
|
555
|
+
function n(i) {
|
556
|
+
var r = i;
|
557
|
+
return r === e.PlainText || r === e.Markdown;
|
558
|
+
}
|
559
|
+
e.is = n;
|
560
|
+
})(F || (F = {}));
|
561
|
+
var q;
|
562
|
+
(function(e) {
|
563
|
+
function n(i) {
|
564
|
+
var r = i;
|
565
|
+
return s.objectLiteral(i) && F.is(r.kind) && s.string(r.value);
|
566
|
+
}
|
567
|
+
e.is = n;
|
568
|
+
})(q || (q = {}));
|
569
|
+
var l;
|
570
|
+
(function(e) {
|
571
|
+
e.Text = 1, e.Method = 2, e.Function = 3, e.Constructor = 4, e.Field = 5, e.Variable = 6, e.Class = 7, e.Interface = 8, e.Module = 9, e.Property = 10, e.Unit = 11, e.Value = 12, e.Enum = 13, e.Keyword = 14, e.Snippet = 15, e.Color = 16, e.File = 17, e.Reference = 18, e.Folder = 19, e.EnumMember = 20, e.Constant = 21, e.Struct = 22, e.Event = 23, e.Operator = 24, e.TypeParameter = 25;
|
572
|
+
})(l || (l = {}));
|
573
|
+
var Q;
|
574
|
+
(function(e) {
|
575
|
+
e.PlainText = 1, e.Snippet = 2;
|
576
|
+
})(Q || (Q = {}));
|
577
|
+
var se;
|
578
|
+
(function(e) {
|
579
|
+
e.Deprecated = 1;
|
580
|
+
})(se || (se = {}));
|
581
|
+
var ue;
|
582
|
+
(function(e) {
|
583
|
+
function n(r, t, a) {
|
584
|
+
return { newText: r, insert: t, replace: a };
|
585
|
+
}
|
586
|
+
e.create = n;
|
587
|
+
function i(r) {
|
588
|
+
var t = r;
|
589
|
+
return t && s.string(t.newText) && p.is(t.insert) && p.is(t.replace);
|
590
|
+
}
|
591
|
+
e.is = i;
|
592
|
+
})(ue || (ue = {}));
|
593
|
+
var ce;
|
594
|
+
(function(e) {
|
595
|
+
e.asIs = 1, e.adjustIndentation = 2;
|
596
|
+
})(ce || (ce = {}));
|
597
|
+
var de;
|
598
|
+
(function(e) {
|
599
|
+
function n(i) {
|
600
|
+
return { label: i };
|
601
|
+
}
|
602
|
+
e.create = n;
|
603
|
+
})(de || (de = {}));
|
604
|
+
var fe;
|
605
|
+
(function(e) {
|
606
|
+
function n(i, r) {
|
607
|
+
return { items: i || [], isIncomplete: !!r };
|
608
|
+
}
|
609
|
+
e.create = n;
|
610
|
+
})(fe || (fe = {}));
|
611
|
+
var H;
|
612
|
+
(function(e) {
|
613
|
+
function n(r) {
|
614
|
+
return r.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&");
|
615
|
+
}
|
616
|
+
e.fromPlainText = n;
|
617
|
+
function i(r) {
|
618
|
+
var t = r;
|
619
|
+
return s.string(t) || s.objectLiteral(t) && s.string(t.language) && s.string(t.value);
|
620
|
+
}
|
621
|
+
e.is = i;
|
622
|
+
})(H || (H = {}));
|
623
|
+
var ge;
|
624
|
+
(function(e) {
|
625
|
+
function n(i) {
|
626
|
+
var r = i;
|
627
|
+
return !!r && s.objectLiteral(r) && (q.is(r.contents) || H.is(r.contents) || s.typedArray(r.contents, H.is)) && (i.range === void 0 || p.is(i.range));
|
628
|
+
}
|
629
|
+
e.is = n;
|
630
|
+
})(ge || (ge = {}));
|
631
|
+
var le;
|
632
|
+
(function(e) {
|
633
|
+
function n(i, r) {
|
634
|
+
return r ? { label: i, documentation: r } : { label: i };
|
635
|
+
}
|
636
|
+
e.create = n;
|
637
|
+
})(le || (le = {}));
|
638
|
+
var he;
|
639
|
+
(function(e) {
|
640
|
+
function n(i, r) {
|
641
|
+
for (var t = [], a = 2; a < arguments.length; a++)
|
642
|
+
t[a - 2] = arguments[a];
|
643
|
+
var o = { label: i };
|
644
|
+
return s.defined(r) && (o.documentation = r), s.defined(t) ? o.parameters = t : o.parameters = [], o;
|
645
|
+
}
|
646
|
+
e.create = n;
|
647
|
+
})(he || (he = {}));
|
648
|
+
var P;
|
649
|
+
(function(e) {
|
650
|
+
e.Text = 1, e.Read = 2, e.Write = 3;
|
651
|
+
})(P || (P = {}));
|
652
|
+
var ve;
|
653
|
+
(function(e) {
|
654
|
+
function n(i, r) {
|
655
|
+
var t = { range: i };
|
656
|
+
return s.number(r) && (t.kind = r), t;
|
657
|
+
}
|
658
|
+
e.create = n;
|
659
|
+
})(ve || (ve = {}));
|
660
|
+
var h;
|
661
|
+
(function(e) {
|
662
|
+
e.File = 1, e.Module = 2, e.Namespace = 3, e.Package = 4, e.Class = 5, e.Method = 6, e.Property = 7, e.Field = 8, e.Constructor = 9, e.Enum = 10, e.Interface = 11, e.Function = 12, e.Variable = 13, e.Constant = 14, e.String = 15, e.Number = 16, e.Boolean = 17, e.Array = 18, e.Object = 19, e.Key = 20, e.Null = 21, e.EnumMember = 22, e.Struct = 23, e.Event = 24, e.Operator = 25, e.TypeParameter = 26;
|
663
|
+
})(h || (h = {}));
|
664
|
+
var pe;
|
665
|
+
(function(e) {
|
666
|
+
e.Deprecated = 1;
|
667
|
+
})(pe || (pe = {}));
|
668
|
+
var me;
|
669
|
+
(function(e) {
|
670
|
+
function n(i, r, t, a, o) {
|
671
|
+
var u = {
|
672
|
+
name: i,
|
673
|
+
kind: r,
|
674
|
+
location: { uri: a, range: t }
|
675
|
+
};
|
676
|
+
return o && (u.containerName = o), u;
|
677
|
+
}
|
678
|
+
e.create = n;
|
679
|
+
})(me || (me = {}));
|
680
|
+
var _e;
|
681
|
+
(function(e) {
|
682
|
+
function n(r, t, a, o, u, g) {
|
683
|
+
var d = {
|
684
|
+
name: r,
|
685
|
+
detail: t,
|
686
|
+
kind: a,
|
687
|
+
range: o,
|
688
|
+
selectionRange: u
|
689
|
+
};
|
690
|
+
return g !== void 0 && (d.children = g), d;
|
691
|
+
}
|
692
|
+
e.create = n;
|
693
|
+
function i(r) {
|
694
|
+
var t = r;
|
695
|
+
return t && s.string(t.name) && s.number(t.kind) && p.is(t.range) && p.is(t.selectionRange) && (t.detail === void 0 || s.string(t.detail)) && (t.deprecated === void 0 || s.boolean(t.deprecated)) && (t.children === void 0 || Array.isArray(t.children)) && (t.tags === void 0 || Array.isArray(t.tags));
|
696
|
+
}
|
697
|
+
e.is = i;
|
698
|
+
})(_e || (_e = {}));
|
699
|
+
var we;
|
700
|
+
(function(e) {
|
701
|
+
e.Empty = "", e.QuickFix = "quickfix", e.Refactor = "refactor", e.RefactorExtract = "refactor.extract", e.RefactorInline = "refactor.inline", e.RefactorRewrite = "refactor.rewrite", e.Source = "source", e.SourceOrganizeImports = "source.organizeImports", e.SourceFixAll = "source.fixAll";
|
702
|
+
})(we || (we = {}));
|
703
|
+
var ke;
|
704
|
+
(function(e) {
|
705
|
+
function n(r, t) {
|
706
|
+
var a = { diagnostics: r };
|
707
|
+
return t != null && (a.only = t), a;
|
708
|
+
}
|
709
|
+
e.create = n;
|
710
|
+
function i(r) {
|
711
|
+
var t = r;
|
712
|
+
return s.defined(t) && s.typedArray(t.diagnostics, O.is) && (t.only === void 0 || s.typedArray(t.only, s.string));
|
713
|
+
}
|
714
|
+
e.is = i;
|
715
|
+
})(ke || (ke = {}));
|
716
|
+
var Ee;
|
717
|
+
(function(e) {
|
718
|
+
function n(r, t, a) {
|
719
|
+
var o = { title: r }, u = !0;
|
720
|
+
return typeof t == "string" ? (u = !1, o.kind = t) : D.is(t) ? o.command = t : o.edit = t, u && a !== void 0 && (o.kind = a), o;
|
721
|
+
}
|
722
|
+
e.create = n;
|
723
|
+
function i(r) {
|
724
|
+
var t = r;
|
725
|
+
return t && s.string(t.title) && (t.diagnostics === void 0 || s.typedArray(t.diagnostics, O.is)) && (t.kind === void 0 || s.string(t.kind)) && (t.edit !== void 0 || t.command !== void 0) && (t.command === void 0 || D.is(t.command)) && (t.isPreferred === void 0 || s.boolean(t.isPreferred)) && (t.edit === void 0 || $.is(t.edit));
|
726
|
+
}
|
727
|
+
e.is = i;
|
728
|
+
})(Ee || (Ee = {}));
|
729
|
+
var be;
|
730
|
+
(function(e) {
|
731
|
+
function n(r, t) {
|
732
|
+
var a = { range: r };
|
733
|
+
return s.defined(t) && (a.data = t), a;
|
734
|
+
}
|
735
|
+
e.create = n;
|
736
|
+
function i(r) {
|
737
|
+
var t = r;
|
738
|
+
return s.defined(t) && p.is(t.range) && (s.undefined(t.command) || D.is(t.command));
|
739
|
+
}
|
740
|
+
e.is = i;
|
741
|
+
})(be || (be = {}));
|
742
|
+
var xe;
|
743
|
+
(function(e) {
|
744
|
+
function n(r, t) {
|
745
|
+
return { tabSize: r, insertSpaces: t };
|
746
|
+
}
|
747
|
+
e.create = n;
|
748
|
+
function i(r) {
|
749
|
+
var t = r;
|
750
|
+
return s.defined(t) && s.uinteger(t.tabSize) && s.boolean(t.insertSpaces);
|
751
|
+
}
|
752
|
+
e.is = i;
|
753
|
+
})(xe || (xe = {}));
|
754
|
+
var Ce;
|
755
|
+
(function(e) {
|
756
|
+
function n(r, t, a) {
|
757
|
+
return { range: r, target: t, data: a };
|
758
|
+
}
|
759
|
+
e.create = n;
|
760
|
+
function i(r) {
|
761
|
+
var t = r;
|
762
|
+
return s.defined(t) && p.is(t.range) && (s.undefined(t.target) || s.string(t.target));
|
763
|
+
}
|
764
|
+
e.is = i;
|
765
|
+
})(Ce || (Ce = {}));
|
766
|
+
var Ae;
|
767
|
+
(function(e) {
|
768
|
+
function n(r, t) {
|
769
|
+
return { range: r, parent: t };
|
770
|
+
}
|
771
|
+
e.create = n;
|
772
|
+
function i(r) {
|
773
|
+
var t = r;
|
774
|
+
return t !== void 0 && p.is(t.range) && (t.parent === void 0 || e.is(t.parent));
|
775
|
+
}
|
776
|
+
e.is = i;
|
777
|
+
})(Ae || (Ae = {}));
|
778
|
+
var ye;
|
779
|
+
(function(e) {
|
780
|
+
function n(a, o, u, g) {
|
781
|
+
return new Xe(a, o, u, g);
|
782
|
+
}
|
783
|
+
e.create = n;
|
784
|
+
function i(a) {
|
785
|
+
var o = a;
|
786
|
+
return !!(s.defined(o) && s.string(o.uri) && (s.undefined(o.languageId) || s.string(o.languageId)) && s.uinteger(o.lineCount) && s.func(o.getText) && s.func(o.positionAt) && s.func(o.offsetAt));
|
787
|
+
}
|
788
|
+
e.is = i;
|
789
|
+
function r(a, o) {
|
790
|
+
for (var u = a.getText(), g = t(o, function(A, j) {
|
791
|
+
var G = A.range.start.line - j.range.start.line;
|
792
|
+
return G === 0 ? A.range.start.character - j.range.start.character : G;
|
793
|
+
}), d = u.length, v = g.length - 1; v >= 0; v--) {
|
794
|
+
var w = g[v], E = a.offsetAt(w.range.start), f = a.offsetAt(w.range.end);
|
795
|
+
if (f <= d)
|
796
|
+
u = u.substring(0, E) + w.newText + u.substring(f, u.length);
|
797
|
+
else
|
798
|
+
throw new Error("Overlapping edit");
|
799
|
+
d = E;
|
800
|
+
}
|
801
|
+
return u;
|
802
|
+
}
|
803
|
+
e.applyEdits = r;
|
804
|
+
function t(a, o) {
|
805
|
+
if (a.length <= 1)
|
806
|
+
return a;
|
807
|
+
var u = a.length / 2 | 0, g = a.slice(0, u), d = a.slice(u);
|
808
|
+
t(g, o), t(d, o);
|
809
|
+
for (var v = 0, w = 0, E = 0; v < g.length && w < d.length; ) {
|
810
|
+
var f = o(g[v], d[w]);
|
811
|
+
f <= 0 ? a[E++] = g[v++] : a[E++] = d[w++];
|
812
|
+
}
|
813
|
+
for (; v < g.length; )
|
814
|
+
a[E++] = g[v++];
|
815
|
+
for (; w < d.length; )
|
816
|
+
a[E++] = d[w++];
|
817
|
+
return a;
|
818
|
+
}
|
819
|
+
})(ye || (ye = {}));
|
820
|
+
var Xe = (
|
821
|
+
/** @class */
|
822
|
+
function() {
|
823
|
+
function e(n, i, r, t) {
|
824
|
+
this._uri = n, this._languageId = i, this._version = r, this._content = t, this._lineOffsets = void 0;
|
825
|
+
}
|
826
|
+
return Object.defineProperty(e.prototype, "uri", {
|
827
|
+
get: function() {
|
828
|
+
return this._uri;
|
829
|
+
},
|
830
|
+
enumerable: !1,
|
831
|
+
configurable: !0
|
832
|
+
}), Object.defineProperty(e.prototype, "languageId", {
|
833
|
+
get: function() {
|
834
|
+
return this._languageId;
|
835
|
+
},
|
836
|
+
enumerable: !1,
|
837
|
+
configurable: !0
|
838
|
+
}), Object.defineProperty(e.prototype, "version", {
|
839
|
+
get: function() {
|
840
|
+
return this._version;
|
841
|
+
},
|
842
|
+
enumerable: !1,
|
843
|
+
configurable: !0
|
844
|
+
}), e.prototype.getText = function(n) {
|
845
|
+
if (n) {
|
846
|
+
var i = this.offsetAt(n.start), r = this.offsetAt(n.end);
|
847
|
+
return this._content.substring(i, r);
|
848
|
+
}
|
849
|
+
return this._content;
|
850
|
+
}, e.prototype.update = function(n, i) {
|
851
|
+
this._content = n.text, this._version = i, this._lineOffsets = void 0;
|
852
|
+
}, e.prototype.getLineOffsets = function() {
|
853
|
+
if (this._lineOffsets === void 0) {
|
854
|
+
for (var n = [], i = this._content, r = !0, t = 0; t < i.length; t++) {
|
855
|
+
r && (n.push(t), r = !1);
|
856
|
+
var a = i.charAt(t);
|
857
|
+
r = a === "\r" || a === `
|
858
|
+
`, a === "\r" && t + 1 < i.length && i.charAt(t + 1) === `
|
859
|
+
` && t++;
|
860
|
+
}
|
861
|
+
r && i.length > 0 && n.push(i.length), this._lineOffsets = n;
|
862
|
+
}
|
863
|
+
return this._lineOffsets;
|
864
|
+
}, e.prototype.positionAt = function(n) {
|
865
|
+
n = Math.max(Math.min(n, this._content.length), 0);
|
866
|
+
var i = this.getLineOffsets(), r = 0, t = i.length;
|
867
|
+
if (t === 0)
|
868
|
+
return k.create(0, n);
|
869
|
+
for (; r < t; ) {
|
870
|
+
var a = Math.floor((r + t) / 2);
|
871
|
+
i[a] > n ? t = a : r = a + 1;
|
872
|
+
}
|
873
|
+
var o = r - 1;
|
874
|
+
return k.create(o, n - i[o]);
|
875
|
+
}, e.prototype.offsetAt = function(n) {
|
876
|
+
var i = this.getLineOffsets();
|
877
|
+
if (n.line >= i.length)
|
878
|
+
return this._content.length;
|
879
|
+
if (n.line < 0)
|
880
|
+
return 0;
|
881
|
+
var r = i[n.line], t = n.line + 1 < i.length ? i[n.line + 1] : this._content.length;
|
882
|
+
return Math.max(Math.min(r + n.character, t), r);
|
883
|
+
}, Object.defineProperty(e.prototype, "lineCount", {
|
884
|
+
get: function() {
|
885
|
+
return this.getLineOffsets().length;
|
886
|
+
},
|
887
|
+
enumerable: !1,
|
888
|
+
configurable: !0
|
889
|
+
}), e;
|
890
|
+
}()
|
891
|
+
), s;
|
892
|
+
(function(e) {
|
893
|
+
var n = Object.prototype.toString;
|
894
|
+
function i(f) {
|
895
|
+
return typeof f < "u";
|
896
|
+
}
|
897
|
+
e.defined = i;
|
898
|
+
function r(f) {
|
899
|
+
return typeof f > "u";
|
900
|
+
}
|
901
|
+
e.undefined = r;
|
902
|
+
function t(f) {
|
903
|
+
return f === !0 || f === !1;
|
904
|
+
}
|
905
|
+
e.boolean = t;
|
906
|
+
function a(f) {
|
907
|
+
return n.call(f) === "[object String]";
|
908
|
+
}
|
909
|
+
e.string = a;
|
910
|
+
function o(f) {
|
911
|
+
return n.call(f) === "[object Number]";
|
912
|
+
}
|
913
|
+
e.number = o;
|
914
|
+
function u(f, A, j) {
|
915
|
+
return n.call(f) === "[object Number]" && A <= f && f <= j;
|
916
|
+
}
|
917
|
+
e.numberRange = u;
|
918
|
+
function g(f) {
|
919
|
+
return n.call(f) === "[object Number]" && -2147483648 <= f && f <= 2147483647;
|
920
|
+
}
|
921
|
+
e.integer = g;
|
922
|
+
function d(f) {
|
923
|
+
return n.call(f) === "[object Number]" && 0 <= f && f <= 2147483647;
|
924
|
+
}
|
925
|
+
e.uinteger = d;
|
926
|
+
function v(f) {
|
927
|
+
return n.call(f) === "[object Function]";
|
928
|
+
}
|
929
|
+
e.func = v;
|
930
|
+
function w(f) {
|
931
|
+
return f !== null && typeof f == "object";
|
932
|
+
}
|
933
|
+
e.objectLiteral = w;
|
934
|
+
function E(f, A) {
|
935
|
+
return Array.isArray(f) && f.every(A);
|
936
|
+
}
|
937
|
+
e.typedArray = E;
|
938
|
+
})(s || (s = {}));
|
939
|
+
var Be = class {
|
940
|
+
constructor(e, n, i) {
|
941
|
+
this._languageId = e, this._worker = n, this._disposables = [], this._listener = /* @__PURE__ */ Object.create(null);
|
942
|
+
const r = (a) => {
|
943
|
+
let o = a.getLanguageId();
|
944
|
+
if (o !== this._languageId)
|
945
|
+
return;
|
946
|
+
let u;
|
947
|
+
this._listener[a.uri.toString()] = a.onDidChangeContent(() => {
|
948
|
+
window.clearTimeout(u), u = window.setTimeout(() => this._doValidate(a.uri, o), 500);
|
949
|
+
}), this._doValidate(a.uri, o);
|
950
|
+
}, t = (a) => {
|
951
|
+
c.editor.setModelMarkers(a, this._languageId, []);
|
952
|
+
let o = a.uri.toString(), u = this._listener[o];
|
953
|
+
u && (u.dispose(), delete this._listener[o]);
|
954
|
+
};
|
955
|
+
this._disposables.push(c.editor.onDidCreateModel(r)), this._disposables.push(c.editor.onWillDisposeModel(t)), this._disposables.push(
|
956
|
+
c.editor.onDidChangeModelLanguage((a) => {
|
957
|
+
t(a.model), r(a.model);
|
958
|
+
})
|
959
|
+
), this._disposables.push(
|
960
|
+
i((a) => {
|
961
|
+
c.editor.getModels().forEach((o) => {
|
962
|
+
o.getLanguageId() === this._languageId && (t(o), r(o));
|
963
|
+
});
|
964
|
+
})
|
965
|
+
), this._disposables.push({
|
966
|
+
dispose: () => {
|
967
|
+
c.editor.getModels().forEach(t);
|
968
|
+
for (let a in this._listener)
|
969
|
+
this._listener[a].dispose();
|
970
|
+
}
|
971
|
+
}), c.editor.getModels().forEach(r);
|
972
|
+
}
|
973
|
+
dispose() {
|
974
|
+
this._disposables.forEach((e) => e && e.dispose()), this._disposables.length = 0;
|
975
|
+
}
|
976
|
+
_doValidate(e, n) {
|
977
|
+
this._worker(e).then((i) => i.doValidation(e.toString())).then((i) => {
|
978
|
+
const r = i.map((a) => qe(e, a));
|
979
|
+
let t = c.editor.getModel(e);
|
980
|
+
t && t.getLanguageId() === n && c.editor.setModelMarkers(t, n, r);
|
981
|
+
}).then(void 0, (i) => {
|
982
|
+
console.error(i);
|
983
|
+
});
|
984
|
+
}
|
985
|
+
};
|
986
|
+
function $e(e) {
|
987
|
+
switch (e) {
|
988
|
+
case y.Error:
|
989
|
+
return c.MarkerSeverity.Error;
|
990
|
+
case y.Warning:
|
991
|
+
return c.MarkerSeverity.Warning;
|
992
|
+
case y.Information:
|
993
|
+
return c.MarkerSeverity.Info;
|
994
|
+
case y.Hint:
|
995
|
+
return c.MarkerSeverity.Hint;
|
996
|
+
default:
|
997
|
+
return c.MarkerSeverity.Info;
|
998
|
+
}
|
999
|
+
}
|
1000
|
+
function qe(e, n) {
|
1001
|
+
let i = typeof n.code == "number" ? String(n.code) : n.code;
|
1002
|
+
return {
|
1003
|
+
severity: $e(n.severity),
|
1004
|
+
startLineNumber: n.range.start.line + 1,
|
1005
|
+
startColumn: n.range.start.character + 1,
|
1006
|
+
endLineNumber: n.range.end.line + 1,
|
1007
|
+
endColumn: n.range.end.character + 1,
|
1008
|
+
message: n.message,
|
1009
|
+
code: i,
|
1010
|
+
source: n.source
|
1011
|
+
};
|
1012
|
+
}
|
1013
|
+
var Qe = class {
|
1014
|
+
constructor(e, n) {
|
1015
|
+
this._worker = e, this._triggerCharacters = n;
|
1016
|
+
}
|
1017
|
+
get triggerCharacters() {
|
1018
|
+
return this._triggerCharacters;
|
1019
|
+
}
|
1020
|
+
provideCompletionItems(e, n, i, r) {
|
1021
|
+
const t = e.uri;
|
1022
|
+
return this._worker(t).then((a) => a.doComplete(t.toString(), C(n))).then((a) => {
|
1023
|
+
if (!a)
|
1024
|
+
return;
|
1025
|
+
const o = e.getWordUntilPosition(n), u = new c.Range(
|
1026
|
+
n.lineNumber,
|
1027
|
+
o.startColumn,
|
1028
|
+
n.lineNumber,
|
1029
|
+
o.endColumn
|
1030
|
+
), g = a.items.map((d) => {
|
1031
|
+
const v = {
|
1032
|
+
label: d.label,
|
1033
|
+
insertText: d.insertText || d.label,
|
1034
|
+
sortText: d.sortText,
|
1035
|
+
filterText: d.filterText,
|
1036
|
+
documentation: d.documentation,
|
1037
|
+
detail: d.detail,
|
1038
|
+
command: Ye(d.command),
|
1039
|
+
range: u,
|
1040
|
+
kind: Je(d.kind)
|
1041
|
+
};
|
1042
|
+
return d.textEdit && (Ge(d.textEdit) ? v.range = {
|
1043
|
+
insert: _(d.textEdit.insert),
|
1044
|
+
replace: _(d.textEdit.replace)
|
1045
|
+
} : v.range = _(d.textEdit.range), v.insertText = d.textEdit.newText), d.additionalTextEdits && (v.additionalTextEdits = d.additionalTextEdits.map(L)), d.insertTextFormat === Q.Snippet && (v.insertTextRules = c.languages.CompletionItemInsertTextRule.InsertAsSnippet), v;
|
1046
|
+
});
|
1047
|
+
return {
|
1048
|
+
isIncomplete: a.isIncomplete,
|
1049
|
+
suggestions: g
|
1050
|
+
};
|
1051
|
+
});
|
1052
|
+
}
|
1053
|
+
};
|
1054
|
+
function C(e) {
|
1055
|
+
if (e)
|
1056
|
+
return { character: e.column - 1, line: e.lineNumber - 1 };
|
1057
|
+
}
|
1058
|
+
function Pe(e) {
|
1059
|
+
if (e)
|
1060
|
+
return {
|
1061
|
+
start: {
|
1062
|
+
line: e.startLineNumber - 1,
|
1063
|
+
character: e.startColumn - 1
|
1064
|
+
},
|
1065
|
+
end: { line: e.endLineNumber - 1, character: e.endColumn - 1 }
|
1066
|
+
};
|
1067
|
+
}
|
1068
|
+
function _(e) {
|
1069
|
+
if (e)
|
1070
|
+
return new c.Range(
|
1071
|
+
e.start.line + 1,
|
1072
|
+
e.start.character + 1,
|
1073
|
+
e.end.line + 1,
|
1074
|
+
e.end.character + 1
|
1075
|
+
);
|
1076
|
+
}
|
1077
|
+
function Ge(e) {
|
1078
|
+
return typeof e.insert < "u" && typeof e.replace < "u";
|
1079
|
+
}
|
1080
|
+
function Je(e) {
|
1081
|
+
const n = c.languages.CompletionItemKind;
|
1082
|
+
switch (e) {
|
1083
|
+
case l.Text:
|
1084
|
+
return n.Text;
|
1085
|
+
case l.Method:
|
1086
|
+
return n.Method;
|
1087
|
+
case l.Function:
|
1088
|
+
return n.Function;
|
1089
|
+
case l.Constructor:
|
1090
|
+
return n.Constructor;
|
1091
|
+
case l.Field:
|
1092
|
+
return n.Field;
|
1093
|
+
case l.Variable:
|
1094
|
+
return n.Variable;
|
1095
|
+
case l.Class:
|
1096
|
+
return n.Class;
|
1097
|
+
case l.Interface:
|
1098
|
+
return n.Interface;
|
1099
|
+
case l.Module:
|
1100
|
+
return n.Module;
|
1101
|
+
case l.Property:
|
1102
|
+
return n.Property;
|
1103
|
+
case l.Unit:
|
1104
|
+
return n.Unit;
|
1105
|
+
case l.Value:
|
1106
|
+
return n.Value;
|
1107
|
+
case l.Enum:
|
1108
|
+
return n.Enum;
|
1109
|
+
case l.Keyword:
|
1110
|
+
return n.Keyword;
|
1111
|
+
case l.Snippet:
|
1112
|
+
return n.Snippet;
|
1113
|
+
case l.Color:
|
1114
|
+
return n.Color;
|
1115
|
+
case l.File:
|
1116
|
+
return n.File;
|
1117
|
+
case l.Reference:
|
1118
|
+
return n.Reference;
|
1119
|
+
}
|
1120
|
+
return n.Property;
|
1121
|
+
}
|
1122
|
+
function L(e) {
|
1123
|
+
if (e)
|
1124
|
+
return {
|
1125
|
+
range: _(e.range),
|
1126
|
+
text: e.newText
|
1127
|
+
};
|
1128
|
+
}
|
1129
|
+
function Ye(e) {
|
1130
|
+
return e && e.command === "editor.action.triggerSuggest" ? { id: e.command, title: e.title, arguments: e.arguments } : void 0;
|
1131
|
+
}
|
1132
|
+
var Ze = class {
|
1133
|
+
constructor(e) {
|
1134
|
+
this._worker = e;
|
1135
|
+
}
|
1136
|
+
provideHover(e, n, i) {
|
1137
|
+
let r = e.uri;
|
1138
|
+
return this._worker(r).then((t) => t.doHover(r.toString(), C(n))).then((t) => {
|
1139
|
+
if (t)
|
1140
|
+
return {
|
1141
|
+
range: _(t.range),
|
1142
|
+
contents: et(t.contents)
|
1143
|
+
};
|
1144
|
+
});
|
1145
|
+
}
|
1146
|
+
};
|
1147
|
+
function Ke(e) {
|
1148
|
+
return e && typeof e == "object" && typeof e.kind == "string";
|
1149
|
+
}
|
1150
|
+
function Ie(e) {
|
1151
|
+
return typeof e == "string" ? {
|
1152
|
+
value: e
|
1153
|
+
} : Ke(e) ? e.kind === "plaintext" ? {
|
1154
|
+
value: e.value.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&")
|
1155
|
+
} : {
|
1156
|
+
value: e.value
|
1157
|
+
} : { value: "```" + e.language + `
|
1158
|
+
` + e.value + "\n```\n" };
|
1159
|
+
}
|
1160
|
+
function et(e) {
|
1161
|
+
if (e)
|
1162
|
+
return Array.isArray(e) ? e.map(Ie) : [Ie(e)];
|
1163
|
+
}
|
1164
|
+
var tt = class {
|
1165
|
+
constructor(e) {
|
1166
|
+
this._worker = e;
|
1167
|
+
}
|
1168
|
+
provideDocumentHighlights(e, n, i) {
|
1169
|
+
const r = e.uri;
|
1170
|
+
return this._worker(r).then((t) => t.findDocumentHighlights(r.toString(), C(n))).then((t) => {
|
1171
|
+
if (t)
|
1172
|
+
return t.map((a) => ({
|
1173
|
+
range: _(a.range),
|
1174
|
+
kind: rt(a.kind)
|
1175
|
+
}));
|
1176
|
+
});
|
1177
|
+
}
|
1178
|
+
};
|
1179
|
+
function rt(e) {
|
1180
|
+
switch (e) {
|
1181
|
+
case P.Read:
|
1182
|
+
return c.languages.DocumentHighlightKind.Read;
|
1183
|
+
case P.Write:
|
1184
|
+
return c.languages.DocumentHighlightKind.Write;
|
1185
|
+
case P.Text:
|
1186
|
+
return c.languages.DocumentHighlightKind.Text;
|
1187
|
+
}
|
1188
|
+
return c.languages.DocumentHighlightKind.Text;
|
1189
|
+
}
|
1190
|
+
var nt = class {
|
1191
|
+
constructor(e) {
|
1192
|
+
this._worker = e;
|
1193
|
+
}
|
1194
|
+
provideDefinition(e, n, i) {
|
1195
|
+
const r = e.uri;
|
1196
|
+
return this._worker(r).then((t) => t.findDefinition(r.toString(), C(n))).then((t) => {
|
1197
|
+
if (t)
|
1198
|
+
return [De(t)];
|
1199
|
+
});
|
1200
|
+
}
|
1201
|
+
};
|
1202
|
+
function De(e) {
|
1203
|
+
return {
|
1204
|
+
uri: c.Uri.parse(e.uri),
|
1205
|
+
range: _(e.range)
|
1206
|
+
};
|
1207
|
+
}
|
1208
|
+
var it = class {
|
1209
|
+
constructor(e) {
|
1210
|
+
this._worker = e;
|
1211
|
+
}
|
1212
|
+
provideReferences(e, n, i, r) {
|
1213
|
+
const t = e.uri;
|
1214
|
+
return this._worker(t).then((a) => a.findReferences(t.toString(), C(n))).then((a) => {
|
1215
|
+
if (a)
|
1216
|
+
return a.map(De);
|
1217
|
+
});
|
1218
|
+
}
|
1219
|
+
}, at = class {
|
1220
|
+
constructor(e) {
|
1221
|
+
this._worker = e;
|
1222
|
+
}
|
1223
|
+
provideRenameEdits(e, n, i, r) {
|
1224
|
+
const t = e.uri;
|
1225
|
+
return this._worker(t).then((a) => a.doRename(t.toString(), C(n), i)).then((a) => ot(a));
|
1226
|
+
}
|
1227
|
+
};
|
1228
|
+
function ot(e) {
|
1229
|
+
if (!e || !e.changes)
|
1230
|
+
return;
|
1231
|
+
let n = [];
|
1232
|
+
for (let i in e.changes) {
|
1233
|
+
const r = c.Uri.parse(i);
|
1234
|
+
for (let t of e.changes[i])
|
1235
|
+
n.push({
|
1236
|
+
resource: r,
|
1237
|
+
versionId: void 0,
|
1238
|
+
textEdit: {
|
1239
|
+
range: _(t.range),
|
1240
|
+
text: t.newText
|
1241
|
+
}
|
1242
|
+
});
|
1243
|
+
}
|
1244
|
+
return {
|
1245
|
+
edits: n
|
1246
|
+
};
|
1247
|
+
}
|
1248
|
+
var st = class {
|
1249
|
+
constructor(e) {
|
1250
|
+
this._worker = e;
|
1251
|
+
}
|
1252
|
+
provideDocumentSymbols(e, n) {
|
1253
|
+
const i = e.uri;
|
1254
|
+
return this._worker(i).then((r) => r.findDocumentSymbols(i.toString())).then((r) => {
|
1255
|
+
if (r)
|
1256
|
+
return r.map((t) => ut(t) ? Me(t) : {
|
1257
|
+
name: t.name,
|
1258
|
+
detail: "",
|
1259
|
+
containerName: t.containerName,
|
1260
|
+
kind: Se(t.kind),
|
1261
|
+
range: _(t.location.range),
|
1262
|
+
selectionRange: _(t.location.range),
|
1263
|
+
tags: []
|
1264
|
+
});
|
1265
|
+
});
|
1266
|
+
}
|
1267
|
+
};
|
1268
|
+
function ut(e) {
|
1269
|
+
return "children" in e;
|
1270
|
+
}
|
1271
|
+
function Me(e) {
|
1272
|
+
return {
|
1273
|
+
name: e.name,
|
1274
|
+
detail: e.detail ?? "",
|
1275
|
+
kind: Se(e.kind),
|
1276
|
+
range: _(e.range),
|
1277
|
+
selectionRange: _(e.selectionRange),
|
1278
|
+
tags: e.tags ?? [],
|
1279
|
+
children: (e.children ?? []).map((n) => Me(n))
|
1280
|
+
};
|
1281
|
+
}
|
1282
|
+
function Se(e) {
|
1283
|
+
let n = c.languages.SymbolKind;
|
1284
|
+
switch (e) {
|
1285
|
+
case h.File:
|
1286
|
+
return n.File;
|
1287
|
+
case h.Module:
|
1288
|
+
return n.Module;
|
1289
|
+
case h.Namespace:
|
1290
|
+
return n.Namespace;
|
1291
|
+
case h.Package:
|
1292
|
+
return n.Package;
|
1293
|
+
case h.Class:
|
1294
|
+
return n.Class;
|
1295
|
+
case h.Method:
|
1296
|
+
return n.Method;
|
1297
|
+
case h.Property:
|
1298
|
+
return n.Property;
|
1299
|
+
case h.Field:
|
1300
|
+
return n.Field;
|
1301
|
+
case h.Constructor:
|
1302
|
+
return n.Constructor;
|
1303
|
+
case h.Enum:
|
1304
|
+
return n.Enum;
|
1305
|
+
case h.Interface:
|
1306
|
+
return n.Interface;
|
1307
|
+
case h.Function:
|
1308
|
+
return n.Function;
|
1309
|
+
case h.Variable:
|
1310
|
+
return n.Variable;
|
1311
|
+
case h.Constant:
|
1312
|
+
return n.Constant;
|
1313
|
+
case h.String:
|
1314
|
+
return n.String;
|
1315
|
+
case h.Number:
|
1316
|
+
return n.Number;
|
1317
|
+
case h.Boolean:
|
1318
|
+
return n.Boolean;
|
1319
|
+
case h.Array:
|
1320
|
+
return n.Array;
|
1321
|
+
}
|
1322
|
+
return n.Function;
|
1323
|
+
}
|
1324
|
+
var pt = class {
|
1325
|
+
constructor(e) {
|
1326
|
+
this._worker = e;
|
1327
|
+
}
|
1328
|
+
provideLinks(e, n) {
|
1329
|
+
const i = e.uri;
|
1330
|
+
return this._worker(i).then((r) => r.findDocumentLinks(i.toString())).then((r) => {
|
1331
|
+
if (r)
|
1332
|
+
return {
|
1333
|
+
links: r.map((t) => ({
|
1334
|
+
range: _(t.range),
|
1335
|
+
url: t.target
|
1336
|
+
}))
|
1337
|
+
};
|
1338
|
+
});
|
1339
|
+
}
|
1340
|
+
}, ct = class {
|
1341
|
+
constructor(e) {
|
1342
|
+
this._worker = e;
|
1343
|
+
}
|
1344
|
+
provideDocumentFormattingEdits(e, n, i) {
|
1345
|
+
const r = e.uri;
|
1346
|
+
return this._worker(r).then((t) => t.format(r.toString(), null, Te(n)).then((a) => {
|
1347
|
+
if (!(!a || a.length === 0))
|
1348
|
+
return a.map(L);
|
1349
|
+
}));
|
1350
|
+
}
|
1351
|
+
}, dt = class {
|
1352
|
+
constructor(e) {
|
1353
|
+
this._worker = e, this.canFormatMultipleRanges = !1;
|
1354
|
+
}
|
1355
|
+
provideDocumentRangeFormattingEdits(e, n, i, r) {
|
1356
|
+
const t = e.uri;
|
1357
|
+
return this._worker(t).then((a) => a.format(t.toString(), Pe(n), Te(i)).then((o) => {
|
1358
|
+
if (!(!o || o.length === 0))
|
1359
|
+
return o.map(L);
|
1360
|
+
}));
|
1361
|
+
}
|
1362
|
+
};
|
1363
|
+
function Te(e) {
|
1364
|
+
return {
|
1365
|
+
tabSize: e.tabSize,
|
1366
|
+
insertSpaces: e.insertSpaces
|
1367
|
+
};
|
1368
|
+
}
|
1369
|
+
var ft = class {
|
1370
|
+
constructor(e) {
|
1371
|
+
this._worker = e;
|
1372
|
+
}
|
1373
|
+
provideDocumentColors(e, n) {
|
1374
|
+
const i = e.uri;
|
1375
|
+
return this._worker(i).then((r) => r.findDocumentColors(i.toString())).then((r) => {
|
1376
|
+
if (r)
|
1377
|
+
return r.map((t) => ({
|
1378
|
+
color: t.color,
|
1379
|
+
range: _(t.range)
|
1380
|
+
}));
|
1381
|
+
});
|
1382
|
+
}
|
1383
|
+
provideColorPresentations(e, n, i) {
|
1384
|
+
const r = e.uri;
|
1385
|
+
return this._worker(r).then(
|
1386
|
+
(t) => t.getColorPresentations(r.toString(), n.color, Pe(n.range))
|
1387
|
+
).then((t) => {
|
1388
|
+
if (t)
|
1389
|
+
return t.map((a) => {
|
1390
|
+
let o = {
|
1391
|
+
label: a.label
|
1392
|
+
};
|
1393
|
+
return a.textEdit && (o.textEdit = L(a.textEdit)), a.additionalTextEdits && (o.additionalTextEdits = a.additionalTextEdits.map(L)), o;
|
1394
|
+
});
|
1395
|
+
});
|
1396
|
+
}
|
1397
|
+
}, gt = class {
|
1398
|
+
constructor(e) {
|
1399
|
+
this._worker = e;
|
1400
|
+
}
|
1401
|
+
provideFoldingRanges(e, n, i) {
|
1402
|
+
const r = e.uri;
|
1403
|
+
return this._worker(r).then((t) => t.getFoldingRanges(r.toString(), n)).then((t) => {
|
1404
|
+
if (t)
|
1405
|
+
return t.map((a) => {
|
1406
|
+
const o = {
|
1407
|
+
start: a.startLine + 1,
|
1408
|
+
end: a.endLine + 1
|
1409
|
+
};
|
1410
|
+
return typeof a.kind < "u" && (o.kind = lt(a.kind)), o;
|
1411
|
+
});
|
1412
|
+
});
|
1413
|
+
}
|
1414
|
+
};
|
1415
|
+
function lt(e) {
|
1416
|
+
switch (e) {
|
1417
|
+
case R.Comment:
|
1418
|
+
return c.languages.FoldingRangeKind.Comment;
|
1419
|
+
case R.Imports:
|
1420
|
+
return c.languages.FoldingRangeKind.Imports;
|
1421
|
+
case R.Region:
|
1422
|
+
return c.languages.FoldingRangeKind.Region;
|
1423
|
+
}
|
1424
|
+
}
|
1425
|
+
var ht = class {
|
1426
|
+
constructor(e) {
|
1427
|
+
this._worker = e;
|
1428
|
+
}
|
1429
|
+
provideSelectionRanges(e, n, i) {
|
1430
|
+
const r = e.uri;
|
1431
|
+
return this._worker(r).then(
|
1432
|
+
(t) => t.getSelectionRanges(
|
1433
|
+
r.toString(),
|
1434
|
+
n.map(C)
|
1435
|
+
)
|
1436
|
+
).then((t) => {
|
1437
|
+
if (t)
|
1438
|
+
return t.map((a) => {
|
1439
|
+
const o = [];
|
1440
|
+
for (; a; )
|
1441
|
+
o.push({ range: _(a.range) }), a = a.parent;
|
1442
|
+
return o;
|
1443
|
+
});
|
1444
|
+
});
|
1445
|
+
}
|
1446
|
+
};
|
1447
|
+
function mt(e) {
|
1448
|
+
const n = [], i = [], r = new ze(e);
|
1449
|
+
n.push(r);
|
1450
|
+
const t = (...o) => r.getLanguageServiceWorker(...o);
|
1451
|
+
function a() {
|
1452
|
+
const { languageId: o, modeConfiguration: u } = e;
|
1453
|
+
Fe(i), u.completionItems && i.push(
|
1454
|
+
c.languages.registerCompletionItemProvider(
|
1455
|
+
o,
|
1456
|
+
new Qe(t, ["/", "-", ":"])
|
1457
|
+
)
|
1458
|
+
), u.hovers && i.push(
|
1459
|
+
c.languages.registerHoverProvider(o, new Ze(t))
|
1460
|
+
), u.documentHighlights && i.push(
|
1461
|
+
c.languages.registerDocumentHighlightProvider(
|
1462
|
+
o,
|
1463
|
+
new tt(t)
|
1464
|
+
)
|
1465
|
+
), u.definitions && i.push(
|
1466
|
+
c.languages.registerDefinitionProvider(
|
1467
|
+
o,
|
1468
|
+
new nt(t)
|
1469
|
+
)
|
1470
|
+
), u.references && i.push(
|
1471
|
+
c.languages.registerReferenceProvider(
|
1472
|
+
o,
|
1473
|
+
new it(t)
|
1474
|
+
)
|
1475
|
+
), u.documentSymbols && i.push(
|
1476
|
+
c.languages.registerDocumentSymbolProvider(
|
1477
|
+
o,
|
1478
|
+
new st(t)
|
1479
|
+
)
|
1480
|
+
), u.rename && i.push(
|
1481
|
+
c.languages.registerRenameProvider(o, new at(t))
|
1482
|
+
), u.colors && i.push(
|
1483
|
+
c.languages.registerColorProvider(
|
1484
|
+
o,
|
1485
|
+
new ft(t)
|
1486
|
+
)
|
1487
|
+
), u.foldingRanges && i.push(
|
1488
|
+
c.languages.registerFoldingRangeProvider(
|
1489
|
+
o,
|
1490
|
+
new gt(t)
|
1491
|
+
)
|
1492
|
+
), u.diagnostics && i.push(
|
1493
|
+
new Be(o, t, e.onDidChange)
|
1494
|
+
), u.selectionRanges && i.push(
|
1495
|
+
c.languages.registerSelectionRangeProvider(
|
1496
|
+
o,
|
1497
|
+
new ht(t)
|
1498
|
+
)
|
1499
|
+
), u.documentFormattingEdits && i.push(
|
1500
|
+
c.languages.registerDocumentFormattingEditProvider(
|
1501
|
+
o,
|
1502
|
+
new ct(t)
|
1503
|
+
)
|
1504
|
+
), u.documentRangeFormattingEdits && i.push(
|
1505
|
+
c.languages.registerDocumentRangeFormattingEditProvider(
|
1506
|
+
o,
|
1507
|
+
new dt(t)
|
1508
|
+
)
|
1509
|
+
);
|
1510
|
+
}
|
1511
|
+
return a(), n.push(Re(i)), Re(n);
|
1512
|
+
}
|
1513
|
+
function Re(e) {
|
1514
|
+
return { dispose: () => Fe(e) };
|
1515
|
+
}
|
1516
|
+
function Fe(e) {
|
1517
|
+
for (; e.length; )
|
1518
|
+
e.pop().dispose();
|
1519
|
+
}
|
1520
|
+
export {
|
1521
|
+
Qe as CompletionAdapter,
|
1522
|
+
nt as DefinitionAdapter,
|
1523
|
+
Be as DiagnosticsAdapter,
|
1524
|
+
ft as DocumentColorAdapter,
|
1525
|
+
ct as DocumentFormattingEditProvider,
|
1526
|
+
tt as DocumentHighlightAdapter,
|
1527
|
+
pt as DocumentLinkAdapter,
|
1528
|
+
dt as DocumentRangeFormattingEditProvider,
|
1529
|
+
st as DocumentSymbolAdapter,
|
1530
|
+
gt as FoldingRangeAdapter,
|
1531
|
+
Ze as HoverAdapter,
|
1532
|
+
it as ReferenceAdapter,
|
1533
|
+
at as RenameAdapter,
|
1534
|
+
ht as SelectionRangeAdapter,
|
1535
|
+
ze as WorkerManager,
|
1536
|
+
C as fromPosition,
|
1537
|
+
Pe as fromRange,
|
1538
|
+
mt as setupMode,
|
1539
|
+
_ as toRange,
|
1540
|
+
L as toTextEdit
|
1541
|
+
};
|