online-compiler-widget 0.0.3 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/dist/abap-CrvW7_qN.js +1398 -0
  2. package/dist/apex-BAOI8p1v.js +327 -0
  3. package/dist/assets/css.worker-Cb0JI69t.js +93 -0
  4. package/dist/assets/html.worker-BNFZMwEc.js +470 -0
  5. package/dist/assets/json.worker-BCybXpia.js +58 -0
  6. package/dist/assets/ts.worker-DAVh1bw1.js +67731 -0
  7. package/dist/azcli-BlCk_UqW.js +68 -0
  8. package/dist/bat-DPoEelVx.js +100 -0
  9. package/dist/bicep-Cp1F394l.js +102 -0
  10. package/dist/cameligo-CWqtSlQs.js +174 -0
  11. package/dist/clojure-CKBp32Gf.js +761 -0
  12. package/dist/coffee-CDo6vc-J.js +232 -0
  13. package/dist/cpp-DokufPgf.js +389 -0
  14. package/dist/csharp-BQi3szM0.js +326 -0
  15. package/dist/csp-BSGtCCZ-.js +53 -0
  16. package/dist/css-DEPFDJfb.js +187 -0
  17. package/dist/cssMode-nHrB9Mnr.js +141 -0
  18. package/dist/cypher-DAb1vOxS.js +263 -0
  19. package/dist/dart-C8p4jewR.js +281 -0
  20. package/dist/dockerfile-DP0iLFPN.js +130 -0
  21. package/dist/ecl-BDQHA6fi.js +456 -0
  22. package/dist/elixir-D4II6kDM.js +569 -0
  23. package/dist/flow9-StcnL-VB.js +142 -0
  24. package/dist/freemarker2-BoiXdkJM.js +982 -0
  25. package/dist/fsharp-DdUVp3EN.js +217 -0
  26. package/dist/go-D1-I258M.js +218 -0
  27. package/dist/graphql-DWkL3f8U.js +151 -0
  28. package/dist/handlebars-C7PJzkmo.js +412 -0
  29. package/dist/hcl-D_0MNifv.js +183 -0
  30. package/dist/html-D_xe_tUa.js +301 -0
  31. package/dist/htmlMode-Dk_luXu_.js +152 -0
  32. package/dist/index-Ds0EJmOd.js +129200 -0
  33. package/dist/index.js +14 -0
  34. package/dist/ini-C4I2-MT7.js +71 -0
  35. package/dist/java-OBvaP_SS.js +232 -0
  36. package/dist/javascript-CUK67ITD.js +70 -0
  37. package/dist/jsonMode-BIAYTpVF.js +569 -0
  38. package/dist/julia-BmDH8Kkf.js +511 -0
  39. package/dist/kotlin-Dhu5AGOD.js +252 -0
  40. package/dist/less-CzmjXREq.js +162 -0
  41. package/dist/lexon-CV2c4pN9.js +157 -0
  42. package/dist/liquid-Cgsk8EmK.js +233 -0
  43. package/dist/lspLanguageFeatures-HqO1l9Me.js +1458 -0
  44. package/dist/lua-CFY5U8qF.js +162 -0
  45. package/dist/m3-BL_AnZVh.js +210 -0
  46. package/dist/markdown-CWKQPXCv.js +229 -0
  47. package/dist/mdx-QboWmT4M.js +158 -0
  48. package/dist/mips-ButYmJ5E.js +198 -0
  49. package/dist/msdax-C3cnXqDh.js +375 -0
  50. package/dist/mysql-YlSHaf6G.js +878 -0
  51. package/dist/objective-c-Dwnlproe.js +183 -0
  52. package/dist/pascal-UzGbSWEN.js +251 -0
  53. package/dist/pascaligo-CslTgu68.js +164 -0
  54. package/dist/perl-oj6r_mgw.js +626 -0
  55. package/dist/pgsql-DSBO0Mev.js +851 -0
  56. package/dist/php-YzCD--7j.js +500 -0
  57. package/dist/pla-CmylB8vQ.js +137 -0
  58. package/dist/postiats-CLFW5gNY.js +907 -0
  59. package/dist/powerquery-CmOWUvlh.js +890 -0
  60. package/dist/powershell-fHQcmBLK.js +239 -0
  61. package/dist/protobuf-p5BArb-9.js +420 -0
  62. package/dist/pug-gVdUDvqf.js +402 -0
  63. package/dist/python-kIZaMFF7.js +294 -0
  64. package/dist/qsharp-DnrWSUlt.js +301 -0
  65. package/dist/r-Cv309K2z.js +243 -0
  66. package/dist/razor-ms2cCMGp.js +543 -0
  67. package/dist/redis-DTcS4wMj.js +302 -0
  68. package/dist/redshift-hLxZVESM.js +809 -0
  69. package/dist/restructuredtext-C898lK4f.js +174 -0
  70. package/dist/ruby-CgKtnJIQ.js +511 -0
  71. package/dist/rust-bj8oxVnh.js +343 -0
  72. package/dist/sb-DWynz26l.js +115 -0
  73. package/dist/scala-BL5z1UEd.js +370 -0
  74. package/dist/scheme-DUJsH6VU.js +108 -0
  75. package/dist/scss-CxjmhvaL.js +262 -0
  76. package/dist/shell-D14Zs1dF.js +221 -0
  77. package/dist/solidity-WyRm-BGK.js +1367 -0
  78. package/dist/sophia-CKk-_Oa5.js +199 -0
  79. package/dist/sparql-DHtmINMZ.js +201 -0
  80. package/dist/sql-Dqaj5JHC.js +853 -0
  81. package/dist/st-Bj2IIaop.js +416 -0
  82. package/dist/style.css +1 -0
  83. package/dist/swift-DwxP72iM.js +312 -0
  84. package/dist/systemverilog-D7wJfuql.js +576 -0
  85. package/dist/tcl-0ApMt-eC.js +232 -0
  86. package/dist/tsMode-BiXWAJYS.js +946 -0
  87. package/dist/twig-DxwbdmvQ.js +392 -0
  88. package/dist/typescript-ByMmjZ38.js +336 -0
  89. package/dist/typespec-Fd-JwSuS.js +117 -0
  90. package/dist/vb-CxuyYE1I.js +372 -0
  91. package/dist/wgsl-DoEGc31J.js +439 -0
  92. package/dist/xml-iOXTZgNN.js +88 -0
  93. package/dist/yaml-RRlyy-QW.js +199 -0
  94. package/package.json +41 -36
  95. package/FileStorage/obj/FileStorage.csproj.EntityFrameworkCore.targets +0 -28
  96. package/README.md +0 -1
  97. package/eslint.config.js +0 -26
  98. package/index.html +0 -13
  99. package/index.tsx +0 -3
  100. package/openapitools.json +0 -7
  101. package/pnpm-workspace.yaml +0 -2
  102. package/public/vite.svg +0 -1
  103. package/src/App.css +0 -49
  104. package/src/App.tsx +0 -84
  105. package/src/api/.openapi-generator/FILES +0 -25
  106. package/src/api/.openapi-generator/VERSION +0 -1
  107. package/src/api/.openapi-generator-ignore +0 -23
  108. package/src/api/api.ts +0 -1312
  109. package/src/api/base.ts +0 -62
  110. package/src/api/common.ts +0 -113
  111. package/src/api/configuration.ts +0 -121
  112. package/src/api/docs/CompilationError.md +0 -26
  113. package/src/api/docs/CompileRequest.md +0 -22
  114. package/src/api/docs/CompileResult.md +0 -28
  115. package/src/api/docs/CompilerApi.md +0 -263
  116. package/src/api/docs/CreateFileDto.md +0 -22
  117. package/src/api/docs/CreateProjectRequest.md +0 -20
  118. package/src/api/docs/FileApi.md +0 -274
  119. package/src/api/docs/ProcessStatus.md +0 -28
  120. package/src/api/docs/ProjectApi.md +0 -362
  121. package/src/api/docs/ProjectInfo.md +0 -24
  122. package/src/api/docs/ProjectStats.md +0 -28
  123. package/src/api/docs/RenameFileDto.md +0 -20
  124. package/src/api/docs/RenameProjectRequest.md +0 -20
  125. package/src/api/docs/RunRequest.md +0 -24
  126. package/src/api/docs/RunResult.md +0 -30
  127. package/src/api/docs/RunningProjectInfo.md +0 -26
  128. package/src/api/docs/UpdateFileDto.md +0 -20
  129. package/src/api/git_push.sh +0 -57
  130. package/src/api/index.ts +0 -18
  131. package/src/assets/Badge.svg +0 -17
  132. package/src/assets/closeIcon.svg +0 -20
  133. package/src/assets/documentIcon.svg +0 -11
  134. package/src/assets/history.svg +0 -11
  135. package/src/assets/output.svg +0 -12
  136. package/src/assets/plus.svg +0 -20
  137. package/src/assets/react.svg +0 -1
  138. package/src/assets/save-icon.svg +0 -11
  139. package/src/assets/shield.svg +0 -10
  140. package/src/assets/start.svg +0 -11
  141. package/src/assets/stop.svg +0 -11
  142. package/src/components/CompilerWidget.module.scss +0 -169
  143. package/src/components/CompilerWidget.tsx +0 -279
  144. package/src/components/FileExplorer.module.scss +0 -372
  145. package/src/components/FileExplorer.tsx +0 -285
  146. package/src/components/MonacoEditorWrapper.module.scss +0 -29
  147. package/src/components/MonacoEditorWrapper.tsx +0 -74
  148. package/src/components/OutputPanel.module.scss +0 -123
  149. package/src/components/OutputPanel.tsx +0 -53
  150. package/src/components/RunContainer.module.scss +0 -150
  151. package/src/components/RunContainer.tsx +0 -34
  152. package/src/hooks/useCompiler.ts +0 -228
  153. package/src/hooks/useInitialNodes.ts +0 -0
  154. package/src/index.css +0 -78
  155. package/src/main.tsx +0 -8
  156. package/src/types/EditorDocument.ts +0 -8
  157. package/swagger.json +0 -1020
  158. package/tsconfig.app.json +0 -29
  159. package/tsconfig.json +0 -7
  160. package/tsconfig.node.json +0 -26
  161. package/vite.config.ts +0 -8
@@ -0,0 +1,569 @@
1
+ import { c as P, l as _, e as B } from "./index-Ds0EJmOd.js";
2
+ import { f as y, g as J, C as Q, H as Y, b as G, d as X, F as Z, S as $, e as K } from "./lspLanguageFeatures-HqO1l9Me.js";
3
+ import { a as Ae, D as Oe, h as Ie, R as Ne, c as Le, i as Ee, j as Ue, t as De, k as Be } from "./lspLanguageFeatures-HqO1l9Me.js";
4
+ const x = 2 * 60 * 1e3;
5
+ class C {
6
+ constructor(i) {
7
+ this._defaults = i, this._worker = null, this._client = null, this._idleCheckInterval = window.setInterval(() => this._checkIfIdle(), 30 * 1e3), this._lastUsedTime = 0, this._configChangeListener = this._defaults.onDidChange(() => this._stopWorker());
8
+ }
9
+ _stopWorker() {
10
+ this._worker && (this._worker.dispose(), this._worker = null), this._client = null;
11
+ }
12
+ dispose() {
13
+ clearInterval(this._idleCheckInterval), this._configChangeListener.dispose(), this._stopWorker();
14
+ }
15
+ _checkIfIdle() {
16
+ if (!this._worker)
17
+ return;
18
+ Date.now() - this._lastUsedTime > x && this._stopWorker();
19
+ }
20
+ _getClient() {
21
+ return this._lastUsedTime = Date.now(), this._client || (this._worker = P({
22
+ // module that exports the create() method and returns a `JSONWorker` instance
23
+ moduleId: "vs/language/json/jsonWorker",
24
+ createWorker: () => new Worker(new URL(
25
+ /* @vite-ignore */
26
+ "/assets/json.worker-BCybXpia.js",
27
+ import.meta.url
28
+ ), { type: "module" }),
29
+ label: this._defaults.languageId,
30
+ // passed in to the create() method
31
+ createData: {
32
+ languageSettings: this._defaults.diagnosticsOptions,
33
+ languageId: this._defaults.languageId,
34
+ enableSchemaRequest: this._defaults.diagnosticsOptions.enableSchemaRequest
35
+ }
36
+ }), this._client = this._worker.getProxy()), this._client;
37
+ }
38
+ getLanguageServiceWorker(...i) {
39
+ let t;
40
+ return this._getClient().then((n) => {
41
+ t = n;
42
+ }).then((n) => {
43
+ if (this._worker)
44
+ return this._worker.withSyncedResources(i);
45
+ }).then((n) => t);
46
+ }
47
+ }
48
+ function ee(e, i = !1) {
49
+ const t = e.length;
50
+ let n = 0, u = "", p = 0, l = 16, o = 0, g = 0, w = 0, v = 0, c = 0;
51
+ function O(s, m) {
52
+ let a = 0, r = 0;
53
+ for (; a < s; ) {
54
+ let f = e.charCodeAt(n);
55
+ if (f >= 48 && f <= 57)
56
+ r = r * 16 + f - 48;
57
+ else if (f >= 65 && f <= 70)
58
+ r = r * 16 + f - 65 + 10;
59
+ else if (f >= 97 && f <= 102)
60
+ r = r * 16 + f - 97 + 10;
61
+ else
62
+ break;
63
+ n++, a++;
64
+ }
65
+ return a < s && (r = -1), r;
66
+ }
67
+ function U(s) {
68
+ n = s, u = "", p = 0, l = 16, c = 0;
69
+ }
70
+ function L() {
71
+ let s = n;
72
+ if (e.charCodeAt(n) === 48)
73
+ n++;
74
+ else
75
+ for (n++; n < e.length && T(e.charCodeAt(n)); )
76
+ n++;
77
+ if (n < e.length && e.charCodeAt(n) === 46)
78
+ if (n++, n < e.length && T(e.charCodeAt(n)))
79
+ for (n++; n < e.length && T(e.charCodeAt(n)); )
80
+ n++;
81
+ else
82
+ return c = 3, e.substring(s, n);
83
+ let m = n;
84
+ if (n < e.length && (e.charCodeAt(n) === 69 || e.charCodeAt(n) === 101))
85
+ if (n++, (n < e.length && e.charCodeAt(n) === 43 || e.charCodeAt(n) === 45) && n++, n < e.length && T(e.charCodeAt(n))) {
86
+ for (n++; n < e.length && T(e.charCodeAt(n)); )
87
+ n++;
88
+ m = n;
89
+ } else
90
+ c = 3;
91
+ return e.substring(s, m);
92
+ }
93
+ function q() {
94
+ let s = "", m = n;
95
+ for (; ; ) {
96
+ if (n >= t) {
97
+ s += e.substring(m, n), c = 2;
98
+ break;
99
+ }
100
+ const a = e.charCodeAt(n);
101
+ if (a === 34) {
102
+ s += e.substring(m, n), n++;
103
+ break;
104
+ }
105
+ if (a === 92) {
106
+ if (s += e.substring(m, n), n++, n >= t) {
107
+ c = 2;
108
+ break;
109
+ }
110
+ switch (e.charCodeAt(n++)) {
111
+ case 34:
112
+ s += '"';
113
+ break;
114
+ case 92:
115
+ s += "\\";
116
+ break;
117
+ case 47:
118
+ s += "/";
119
+ break;
120
+ case 98:
121
+ s += "\b";
122
+ break;
123
+ case 102:
124
+ s += "\f";
125
+ break;
126
+ case 110:
127
+ s += `
128
+ `;
129
+ break;
130
+ case 114:
131
+ s += "\r";
132
+ break;
133
+ case 116:
134
+ s += " ";
135
+ break;
136
+ case 117:
137
+ const f = O(4);
138
+ f >= 0 ? s += String.fromCharCode(f) : c = 4;
139
+ break;
140
+ default:
141
+ c = 5;
142
+ }
143
+ m = n;
144
+ continue;
145
+ }
146
+ if (a >= 0 && a <= 31)
147
+ if (I(a)) {
148
+ s += e.substring(m, n), c = 2;
149
+ break;
150
+ } else
151
+ c = 6;
152
+ n++;
153
+ }
154
+ return s;
155
+ }
156
+ function D() {
157
+ if (u = "", c = 0, p = n, g = o, v = w, n >= t)
158
+ return p = t, l = 17;
159
+ let s = e.charCodeAt(n);
160
+ if (E(s)) {
161
+ do
162
+ n++, u += String.fromCharCode(s), s = e.charCodeAt(n);
163
+ while (E(s));
164
+ return l = 15;
165
+ }
166
+ if (I(s))
167
+ return n++, u += String.fromCharCode(s), s === 13 && e.charCodeAt(n) === 10 && (n++, u += `
168
+ `), o++, w = n, l = 14;
169
+ switch (s) {
170
+ case 123:
171
+ return n++, l = 1;
172
+ case 125:
173
+ return n++, l = 2;
174
+ case 91:
175
+ return n++, l = 3;
176
+ case 93:
177
+ return n++, l = 4;
178
+ case 58:
179
+ return n++, l = 6;
180
+ case 44:
181
+ return n++, l = 5;
182
+ case 34:
183
+ return n++, u = q(), l = 10;
184
+ case 47:
185
+ const m = n - 1;
186
+ if (e.charCodeAt(n + 1) === 47) {
187
+ for (n += 2; n < t && !I(e.charCodeAt(n)); )
188
+ n++;
189
+ return u = e.substring(m, n), l = 12;
190
+ }
191
+ if (e.charCodeAt(n + 1) === 42) {
192
+ n += 2;
193
+ const a = t - 1;
194
+ let r = !1;
195
+ for (; n < a; ) {
196
+ const f = e.charCodeAt(n);
197
+ if (f === 42 && e.charCodeAt(n + 1) === 47) {
198
+ n += 2, r = !0;
199
+ break;
200
+ }
201
+ n++, I(f) && (f === 13 && e.charCodeAt(n) === 10 && n++, o++, w = n);
202
+ }
203
+ return r || (n++, c = 1), u = e.substring(m, n), l = 13;
204
+ }
205
+ return u += String.fromCharCode(s), n++, l = 16;
206
+ case 45:
207
+ if (u += String.fromCharCode(s), n++, n === t || !T(e.charCodeAt(n)))
208
+ return l = 16;
209
+ case 48:
210
+ case 49:
211
+ case 50:
212
+ case 51:
213
+ case 52:
214
+ case 53:
215
+ case 54:
216
+ case 55:
217
+ case 56:
218
+ case 57:
219
+ return u += L(), l = 11;
220
+ default:
221
+ for (; n < t && d(s); )
222
+ n++, s = e.charCodeAt(n);
223
+ if (p !== n) {
224
+ switch (u = e.substring(p, n), u) {
225
+ case "true":
226
+ return l = 8;
227
+ case "false":
228
+ return l = 9;
229
+ case "null":
230
+ return l = 7;
231
+ }
232
+ return l = 16;
233
+ }
234
+ return u += String.fromCharCode(s), n++, l = 16;
235
+ }
236
+ }
237
+ function d(s) {
238
+ if (E(s) || I(s))
239
+ return !1;
240
+ switch (s) {
241
+ case 125:
242
+ case 93:
243
+ case 123:
244
+ case 91:
245
+ case 34:
246
+ case 58:
247
+ case 44:
248
+ case 47:
249
+ return !1;
250
+ }
251
+ return !0;
252
+ }
253
+ function z() {
254
+ let s;
255
+ do
256
+ s = D();
257
+ while (s >= 12 && s <= 15);
258
+ return s;
259
+ }
260
+ return {
261
+ setPosition: U,
262
+ getPosition: () => n,
263
+ scan: i ? z : D,
264
+ getToken: () => l,
265
+ getTokenValue: () => u,
266
+ getTokenOffset: () => p,
267
+ getTokenLength: () => n - p,
268
+ getTokenStartLine: () => g,
269
+ getTokenStartCharacter: () => p - v,
270
+ getTokenError: () => c
271
+ };
272
+ }
273
+ function E(e) {
274
+ return e === 32 || e === 9;
275
+ }
276
+ function I(e) {
277
+ return e === 10 || e === 13;
278
+ }
279
+ function T(e) {
280
+ return e >= 48 && e <= 57;
281
+ }
282
+ var R;
283
+ (function(e) {
284
+ e[e.lineFeed = 10] = "lineFeed", e[e.carriageReturn = 13] = "carriageReturn", e[e.space = 32] = "space", e[e._0 = 48] = "_0", e[e._1 = 49] = "_1", e[e._2 = 50] = "_2", e[e._3 = 51] = "_3", e[e._4 = 52] = "_4", e[e._5 = 53] = "_5", e[e._6 = 54] = "_6", e[e._7 = 55] = "_7", e[e._8 = 56] = "_8", e[e._9 = 57] = "_9", e[e.a = 97] = "a", e[e.b = 98] = "b", e[e.c = 99] = "c", e[e.d = 100] = "d", e[e.e = 101] = "e", e[e.f = 102] = "f", e[e.g = 103] = "g", e[e.h = 104] = "h", e[e.i = 105] = "i", e[e.j = 106] = "j", e[e.k = 107] = "k", e[e.l = 108] = "l", e[e.m = 109] = "m", e[e.n = 110] = "n", e[e.o = 111] = "o", e[e.p = 112] = "p", e[e.q = 113] = "q", e[e.r = 114] = "r", e[e.s = 115] = "s", e[e.t = 116] = "t", e[e.u = 117] = "u", e[e.v = 118] = "v", e[e.w = 119] = "w", e[e.x = 120] = "x", e[e.y = 121] = "y", e[e.z = 122] = "z", e[e.A = 65] = "A", e[e.B = 66] = "B", e[e.C = 67] = "C", e[e.D = 68] = "D", e[e.E = 69] = "E", e[e.F = 70] = "F", e[e.G = 71] = "G", e[e.H = 72] = "H", e[e.I = 73] = "I", e[e.J = 74] = "J", e[e.K = 75] = "K", e[e.L = 76] = "L", e[e.M = 77] = "M", e[e.N = 78] = "N", e[e.O = 79] = "O", e[e.P = 80] = "P", e[e.Q = 81] = "Q", e[e.R = 82] = "R", e[e.S = 83] = "S", e[e.T = 84] = "T", e[e.U = 85] = "U", e[e.V = 86] = "V", e[e.W = 87] = "W", e[e.X = 88] = "X", e[e.Y = 89] = "Y", e[e.Z = 90] = "Z", e[e.asterisk = 42] = "asterisk", e[e.backslash = 92] = "backslash", e[e.closeBrace = 125] = "closeBrace", e[e.closeBracket = 93] = "closeBracket", e[e.colon = 58] = "colon", e[e.comma = 44] = "comma", e[e.dot = 46] = "dot", e[e.doubleQuote = 34] = "doubleQuote", e[e.minus = 45] = "minus", e[e.openBrace = 123] = "openBrace", e[e.openBracket = 91] = "openBracket", e[e.plus = 43] = "plus", e[e.slash = 47] = "slash", e[e.formFeed = 12] = "formFeed", e[e.tab = 9] = "tab";
285
+ })(R || (R = {}));
286
+ new Array(20).fill(0).map((e, i) => " ".repeat(i));
287
+ const A = 200;
288
+ new Array(A).fill(0).map((e, i) => `
289
+ ` + " ".repeat(i)), new Array(A).fill(0).map((e, i) => "\r" + " ".repeat(i)), new Array(A).fill(0).map((e, i) => `\r
290
+ ` + " ".repeat(i)), new Array(A).fill(0).map((e, i) => `
291
+ ` + " ".repeat(i)), new Array(A).fill(0).map((e, i) => "\r" + " ".repeat(i)), new Array(A).fill(0).map((e, i) => `\r
292
+ ` + " ".repeat(i));
293
+ var F;
294
+ (function(e) {
295
+ e.DEFAULT = {
296
+ allowTrailingComma: !1
297
+ };
298
+ })(F || (F = {}));
299
+ const ne = ee;
300
+ var W;
301
+ (function(e) {
302
+ e[e.None = 0] = "None", e[e.UnexpectedEndOfComment = 1] = "UnexpectedEndOfComment", e[e.UnexpectedEndOfString = 2] = "UnexpectedEndOfString", e[e.UnexpectedEndOfNumber = 3] = "UnexpectedEndOfNumber", e[e.InvalidUnicode = 4] = "InvalidUnicode", e[e.InvalidEscapeCharacter = 5] = "InvalidEscapeCharacter", e[e.InvalidCharacter = 6] = "InvalidCharacter";
303
+ })(W || (W = {}));
304
+ var h;
305
+ (function(e) {
306
+ e[e.OpenBraceToken = 1] = "OpenBraceToken", e[e.CloseBraceToken = 2] = "CloseBraceToken", e[e.OpenBracketToken = 3] = "OpenBracketToken", e[e.CloseBracketToken = 4] = "CloseBracketToken", e[e.CommaToken = 5] = "CommaToken", e[e.ColonToken = 6] = "ColonToken", e[e.NullKeyword = 7] = "NullKeyword", e[e.TrueKeyword = 8] = "TrueKeyword", e[e.FalseKeyword = 9] = "FalseKeyword", e[e.StringLiteral = 10] = "StringLiteral", e[e.NumericLiteral = 11] = "NumericLiteral", e[e.LineCommentTrivia = 12] = "LineCommentTrivia", e[e.BlockCommentTrivia = 13] = "BlockCommentTrivia", e[e.LineBreakTrivia = 14] = "LineBreakTrivia", e[e.Trivia = 15] = "Trivia", e[e.Unknown = 16] = "Unknown", e[e.EOF = 17] = "EOF";
307
+ })(h || (h = {}));
308
+ var j;
309
+ (function(e) {
310
+ e[e.InvalidSymbol = 1] = "InvalidSymbol", e[e.InvalidNumberFormat = 2] = "InvalidNumberFormat", e[e.PropertyNameExpected = 3] = "PropertyNameExpected", e[e.ValueExpected = 4] = "ValueExpected", e[e.ColonExpected = 5] = "ColonExpected", e[e.CommaExpected = 6] = "CommaExpected", e[e.CloseBraceExpected = 7] = "CloseBraceExpected", e[e.CloseBracketExpected = 8] = "CloseBracketExpected", e[e.EndOfFileExpected = 9] = "EndOfFileExpected", e[e.InvalidCommentToken = 10] = "InvalidCommentToken", e[e.UnexpectedEndOfComment = 11] = "UnexpectedEndOfComment", e[e.UnexpectedEndOfString = 12] = "UnexpectedEndOfString", e[e.UnexpectedEndOfNumber = 13] = "UnexpectedEndOfNumber", e[e.InvalidUnicode = 14] = "InvalidUnicode", e[e.InvalidEscapeCharacter = 15] = "InvalidEscapeCharacter", e[e.InvalidCharacter = 16] = "InvalidCharacter";
311
+ })(j || (j = {}));
312
+ function ie(e) {
313
+ return {
314
+ getInitialState: () => new N(null, null, !1, null),
315
+ tokenize: (i, t) => me(e, i, t)
316
+ };
317
+ }
318
+ const M = "delimiter.bracket.json", S = "delimiter.array.json", te = "delimiter.colon.json", se = "delimiter.comma.json", le = "keyword.json", ue = "keyword.json", oe = "string.value.json", ce = "number.json", fe = "string.key.json", pe = "comment.block.json", ge = "comment.line.json";
319
+ class b {
320
+ constructor(i, t) {
321
+ this.parent = i, this.type = t;
322
+ }
323
+ static pop(i) {
324
+ return i ? i.parent : null;
325
+ }
326
+ static push(i, t) {
327
+ return new b(i, t);
328
+ }
329
+ static equals(i, t) {
330
+ if (!i && !t)
331
+ return !0;
332
+ if (!i || !t)
333
+ return !1;
334
+ for (; i && t; ) {
335
+ if (i === t)
336
+ return !0;
337
+ if (i.type !== t.type)
338
+ return !1;
339
+ i = i.parent, t = t.parent;
340
+ }
341
+ return !0;
342
+ }
343
+ }
344
+ class N {
345
+ constructor(i, t, n, u) {
346
+ this._state = i, this.scanError = t, this.lastWasColon = n, this.parents = u;
347
+ }
348
+ clone() {
349
+ return new N(this._state, this.scanError, this.lastWasColon, this.parents);
350
+ }
351
+ equals(i) {
352
+ return i === this ? !0 : !i || !(i instanceof N) ? !1 : this.scanError === i.scanError && this.lastWasColon === i.lastWasColon && b.equals(this.parents, i.parents);
353
+ }
354
+ getStateData() {
355
+ return this._state;
356
+ }
357
+ setStateData(i) {
358
+ this._state = i;
359
+ }
360
+ }
361
+ function me(e, i, t, n = 0) {
362
+ let u = 0, p = !1;
363
+ switch (t.scanError) {
364
+ case 2:
365
+ i = '"' + i, u = 1;
366
+ break;
367
+ case 1:
368
+ i = "/*" + i, u = 2;
369
+ break;
370
+ }
371
+ const l = ne(i);
372
+ let o = t.lastWasColon, g = t.parents;
373
+ const w = {
374
+ tokens: [],
375
+ endState: t.clone()
376
+ };
377
+ for (; ; ) {
378
+ let v = n + l.getPosition(), c = "";
379
+ const O = l.scan();
380
+ if (O === 17)
381
+ break;
382
+ if (v === n + l.getPosition())
383
+ throw new Error(
384
+ "Scanner did not advance, next 3 characters are: " + i.substr(l.getPosition(), 3)
385
+ );
386
+ switch (p && (v -= u), p = u > 0, O) {
387
+ case 1:
388
+ g = b.push(
389
+ g,
390
+ 0
391
+ /* Object */
392
+ ), c = M, o = !1;
393
+ break;
394
+ case 2:
395
+ g = b.pop(g), c = M, o = !1;
396
+ break;
397
+ case 3:
398
+ g = b.push(
399
+ g,
400
+ 1
401
+ /* Array */
402
+ ), c = S, o = !1;
403
+ break;
404
+ case 4:
405
+ g = b.pop(g), c = S, o = !1;
406
+ break;
407
+ case 6:
408
+ c = te, o = !0;
409
+ break;
410
+ case 5:
411
+ c = se, o = !1;
412
+ break;
413
+ case 8:
414
+ case 9:
415
+ c = le, o = !1;
416
+ break;
417
+ case 7:
418
+ c = ue, o = !1;
419
+ break;
420
+ case 10:
421
+ const L = (g ? g.type : 0) === 1;
422
+ c = o || L ? oe : fe, o = !1;
423
+ break;
424
+ case 11:
425
+ c = ce, o = !1;
426
+ break;
427
+ }
428
+ switch (O) {
429
+ case 12:
430
+ c = ge;
431
+ break;
432
+ case 13:
433
+ c = pe;
434
+ break;
435
+ }
436
+ w.endState = new N(
437
+ t.getStateData(),
438
+ l.getTokenError(),
439
+ o,
440
+ g
441
+ ), w.tokens.push({
442
+ startIndex: v,
443
+ scopes: c
444
+ });
445
+ }
446
+ return w;
447
+ }
448
+ let k;
449
+ function we() {
450
+ return new Promise((e, i) => {
451
+ if (!k)
452
+ return i("JSON not registered!");
453
+ e(k);
454
+ });
455
+ }
456
+ class re extends K {
457
+ constructor(i, t, n) {
458
+ super(i, t, n.onDidChange), this._disposables.push(
459
+ B.onWillDisposeModel((u) => {
460
+ this._resetSchema(u.uri);
461
+ })
462
+ ), this._disposables.push(
463
+ B.onDidChangeModelLanguage((u) => {
464
+ this._resetSchema(u.model.uri);
465
+ })
466
+ );
467
+ }
468
+ _resetSchema(i) {
469
+ this._worker().then((t) => {
470
+ t.resetSchema(i.toString());
471
+ });
472
+ }
473
+ }
474
+ function be(e) {
475
+ const i = [], t = [], n = new C(e);
476
+ i.push(n), k = (...l) => n.getLanguageServiceWorker(...l);
477
+ function u() {
478
+ const { languageId: l, modeConfiguration: o } = e;
479
+ H(t), o.documentFormattingEdits && t.push(
480
+ _.registerDocumentFormattingEditProvider(
481
+ l,
482
+ new y(k)
483
+ )
484
+ ), o.documentRangeFormattingEdits && t.push(
485
+ _.registerDocumentRangeFormattingEditProvider(
486
+ l,
487
+ new J(k)
488
+ )
489
+ ), o.completionItems && t.push(
490
+ _.registerCompletionItemProvider(
491
+ l,
492
+ new Q(k, [" ", ":", '"'])
493
+ )
494
+ ), o.hovers && t.push(
495
+ _.registerHoverProvider(l, new Y(k))
496
+ ), o.documentSymbols && t.push(
497
+ _.registerDocumentSymbolProvider(
498
+ l,
499
+ new G(k)
500
+ )
501
+ ), o.tokens && t.push(_.setTokensProvider(l, ie(!0))), o.colors && t.push(
502
+ _.registerColorProvider(
503
+ l,
504
+ new X(k)
505
+ )
506
+ ), o.foldingRanges && t.push(
507
+ _.registerFoldingRangeProvider(
508
+ l,
509
+ new Z(k)
510
+ )
511
+ ), o.diagnostics && t.push(new re(l, k, e)), o.selectionRanges && t.push(
512
+ _.registerSelectionRangeProvider(
513
+ l,
514
+ new $(k)
515
+ )
516
+ );
517
+ }
518
+ u(), i.push(_.setLanguageConfiguration(e.languageId, ke));
519
+ let p = e.modeConfiguration;
520
+ return e.onDidChange((l) => {
521
+ l.modeConfiguration !== p && (p = l.modeConfiguration, u());
522
+ }), i.push(V(t)), V(i);
523
+ }
524
+ function V(e) {
525
+ return { dispose: () => H(e) };
526
+ }
527
+ function H(e) {
528
+ for (; e.length; )
529
+ e.pop().dispose();
530
+ }
531
+ const ke = {
532
+ wordPattern: /(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,
533
+ comments: {
534
+ lineComment: "//",
535
+ blockComment: ["/*", "*/"]
536
+ },
537
+ brackets: [
538
+ ["{", "}"],
539
+ ["[", "]"]
540
+ ],
541
+ autoClosingPairs: [
542
+ { open: "{", close: "}", notIn: ["string"] },
543
+ { open: "[", close: "]", notIn: ["string"] },
544
+ { open: '"', close: '"', notIn: ["string"] }
545
+ ]
546
+ };
547
+ export {
548
+ Q as CompletionAdapter,
549
+ Ae as DefinitionAdapter,
550
+ K as DiagnosticsAdapter,
551
+ X as DocumentColorAdapter,
552
+ y as DocumentFormattingEditProvider,
553
+ Oe as DocumentHighlightAdapter,
554
+ Ie as DocumentLinkAdapter,
555
+ J as DocumentRangeFormattingEditProvider,
556
+ G as DocumentSymbolAdapter,
557
+ Z as FoldingRangeAdapter,
558
+ Y as HoverAdapter,
559
+ Ne as ReferenceAdapter,
560
+ Le as RenameAdapter,
561
+ $ as SelectionRangeAdapter,
562
+ C as WorkerManager,
563
+ Ee as fromPosition,
564
+ Ue as fromRange,
565
+ we as getWorker,
566
+ be as setupMode,
567
+ De as toRange,
568
+ Be as toTextEdit
569
+ };