@airalogy/aimd-recorder 1.14.1

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 (178) hide show
  1. package/README.md +240 -0
  2. package/README.zh-CN.md +224 -0
  3. package/dist/AimdCodeField-DC3DPvgc.js +172 -0
  4. package/dist/AimdDnaSequenceField-__jdnFS9.js +59466 -0
  5. package/dist/AimdEditor.vue_vue_type_style_index_0_lang-Bq79rKNw.js +28370 -0
  6. package/dist/AimdMarkdownField-98ImHGbc.js +66 -0
  7. package/dist/AimdMarkdownNoteField-CuUJZkgT.js +185 -0
  8. package/dist/_.contribution-IP0cDNhs.js +38 -0
  9. package/dist/_commonjsHelpers-CZXJ37nu.js +40 -0
  10. package/dist/abap-Bs8kvjsq.js +1398 -0
  11. package/dist/aimd-recorder.css +1 -0
  12. package/dist/apex-Dspwrl5m.js +326 -0
  13. package/dist/assets/css.worker-Dmf38jDD.js +79 -0
  14. package/dist/assets/editor.worker-CpuX8TSY.js +12 -0
  15. package/dist/assets/html.worker-DotaEs7v.js +456 -0
  16. package/dist/assets/json.worker-B4VHhH6h.js +44 -0
  17. package/dist/assets/ts.worker-sl17zBDo.js +51316 -0
  18. package/dist/azcli-k1BiOau1.js +68 -0
  19. package/dist/bat-BIP72KWc.js +100 -0
  20. package/dist/bicep-VhQeYhS3.js +102 -0
  21. package/dist/cameligo-DnuAXtHg.js +174 -0
  22. package/dist/clojure-BAuDPsal.js +761 -0
  23. package/dist/coffee-BV06qSnj.js +232 -0
  24. package/dist/components.js +3595 -0
  25. package/dist/composables.js +72 -0
  26. package/dist/cpp-Cz8Jeyrf.js +389 -0
  27. package/dist/csharp-F6hhlXFb.js +326 -0
  28. package/dist/csp-KzlEHCyI.js +53 -0
  29. package/dist/css-e4FKntZ3.js +187 -0
  30. package/dist/cssMode-uz9U6SUU.js +1571 -0
  31. package/dist/cypher-CpvDGKRr.js +263 -0
  32. package/dist/dart-DdHeFWR0.js +281 -0
  33. package/dist/dockerfile-aoNXDcio.js +130 -0
  34. package/dist/ecl-C4Q0DYuA.js +456 -0
  35. package/dist/editor.api-CgD9w0gG.js +77091 -0
  36. package/dist/editor.main-Du02abDl.js +33783 -0
  37. package/dist/elixir-C9X42b0T.js +569 -0
  38. package/dist/flow9-Bff42pfB.js +142 -0
  39. package/dist/freemarker2-DFLX4iQ-.js +989 -0
  40. package/dist/fsharp-C6vPAsHG.js +217 -0
  41. package/dist/go-DEr8zx9f.js +218 -0
  42. package/dist/graphql-BiNBBRFh.js +151 -0
  43. package/dist/handlebars-aiZbIuWY.js +419 -0
  44. package/dist/hcl-2T9lKuFg.js +183 -0
  45. package/dist/html-phzTMObN.js +308 -0
  46. package/dist/htmlMode-BF7wMi3N.js +1581 -0
  47. package/dist/index.js +89 -0
  48. package/dist/ini-CZGtssYM.js +71 -0
  49. package/dist/ini.contribution-DyWtiacL.js +8 -0
  50. package/dist/java-B260NeH3.js +232 -0
  51. package/dist/javascript-BKKOItMi.js +70 -0
  52. package/dist/jsonMode-CDYK4B5l.js +1996 -0
  53. package/dist/julia-kuNLM9c5.js +511 -0
  54. package/dist/kotlin-Bz6kAefA.js +253 -0
  55. package/dist/less-AZUtS89I.js +162 -0
  56. package/dist/lexon-BcmgnyRb.js +157 -0
  57. package/dist/liquid-B2eRz5SA.js +240 -0
  58. package/dist/lua-Dz1RbATg.js +162 -0
  59. package/dist/m3-CIMooLFn.js +210 -0
  60. package/dist/markdown-C1BsCK9P.js +229 -0
  61. package/dist/markdown.contribution-DYYk6zUU.js +7 -0
  62. package/dist/mdx-BfV1HDRG.js +165 -0
  63. package/dist/mips-BovsnfLQ.js +198 -0
  64. package/dist/monaco.contribution-C-bQhUTI.js +114 -0
  65. package/dist/monaco.contribution-CCVvl3Jx.js +72 -0
  66. package/dist/monaco.contribution-Col-f0XR.js +164 -0
  67. package/dist/monaco.contribution-b5xkgQ-s.js +112 -0
  68. package/dist/msdax-CiRB2ZB-.js +375 -0
  69. package/dist/mysql-BwdpPE19.js +878 -0
  70. package/dist/objective-c-D4nfHfso.js +183 -0
  71. package/dist/pascal--j5-PYtz.js +251 -0
  72. package/dist/pascaligo-C7TcJxNL.js +164 -0
  73. package/dist/perl-BzEWqUb5.js +626 -0
  74. package/dist/pgsql-B_KZ0mGX.js +851 -0
  75. package/dist/php-A19QHzQV.js +500 -0
  76. package/dist/pla-COeKY1hA.js +137 -0
  77. package/dist/postiats-BfMp7zJL.js +907 -0
  78. package/dist/powerquery-B0TS_5Gb.js +890 -0
  79. package/dist/powershell-5jSbKdYB.js +239 -0
  80. package/dist/protobuf-YgnOutn3.js +420 -0
  81. package/dist/pug-DLej6kn5.js +402 -0
  82. package/dist/python-CQrZx9mR.js +301 -0
  83. package/dist/python.contribution-CcKs2Ktm.js +8 -0
  84. package/dist/qsharp-AhjqtSHB.js +301 -0
  85. package/dist/r-D-F4P80w.js +243 -0
  86. package/dist/razor-DWmpHMcx.js +550 -0
  87. package/dist/redis-hwwIlMnV.js +302 -0
  88. package/dist/redshift-Bcm_kjEG.js +809 -0
  89. package/dist/restructuredtext-CrdzfPP-.js +174 -0
  90. package/dist/ruby-QC2UNm1s.js +511 -0
  91. package/dist/rust-5aqiQ3L5.js +343 -0
  92. package/dist/sb-B1g1ZfLJ.js +115 -0
  93. package/dist/scala-C2U4R5Gb.js +370 -0
  94. package/dist/scheme-DeFRbslr.js +108 -0
  95. package/dist/scss-RSTCiCmI.js +262 -0
  96. package/dist/shell-BpF-iNu8.js +221 -0
  97. package/dist/shell.contribution-B80NZ3iO.js +7 -0
  98. package/dist/solidity-C00r2mbQ.js +1367 -0
  99. package/dist/sophia-DVW5ZKDB.js +199 -0
  100. package/dist/sparql-B0nmpxeX.js +201 -0
  101. package/dist/sql-CJwKPERn.js +853 -0
  102. package/dist/sql.contribution-DQy36aE5.js +7 -0
  103. package/dist/st-DPlKG5DT.js +416 -0
  104. package/dist/swift-YZBAbVHV.js +309 -0
  105. package/dist/systemverilog-CDQSaH63.js +576 -0
  106. package/dist/tcl-Dlu8sp6Q.js +232 -0
  107. package/dist/tsMode-Bh-v12OL.js +887 -0
  108. package/dist/twig-C5TO7-kw.js +392 -0
  109. package/dist/typescript-c7y6IZVP.js +343 -0
  110. package/dist/typespec-BsmjDEu7.js +117 -0
  111. package/dist/useFieldRendering-BIqeE3qo.js +6083 -0
  112. package/dist/vb-ChHvIDrk.js +372 -0
  113. package/dist/wgsl-XEp1ju8c.js +439 -0
  114. package/dist/xml-MAEprTnF.js +95 -0
  115. package/dist/xml.contribution-XMOaon8i.js +27 -0
  116. package/dist/yaml-C1p8rXG7.js +206 -0
  117. package/dist/yaml.contribution-DRRVhJmJ.js +8 -0
  118. package/package.json +88 -0
  119. package/src/__tests__/client-assigner.test.ts +341 -0
  120. package/src/__tests__/code-types.test.ts +30 -0
  121. package/src/__tests__/markdown-field.test.ts +34 -0
  122. package/src/__tests__/markdown-note-field.test.ts +135 -0
  123. package/src/__tests__/quiz-recorder.test.ts +195 -0
  124. package/src/__tests__/recorder-editor-content-sync.test.ts +172 -0
  125. package/src/__tests__/recorder-editor.test.ts +143 -0
  126. package/src/__tests__/recorder-render.test.ts +57 -0
  127. package/src/__tests__/recorder-wysiwyg-field-host.test.ts +33 -0
  128. package/src/__tests__/step-field.test.ts +270 -0
  129. package/src/__tests__/type-plugins.test.ts +59 -0
  130. package/src/__tests__/var-field-render.test.ts +26 -0
  131. package/src/client-assigner.ts +269 -0
  132. package/src/code-types.ts +94 -0
  133. package/src/components/AimdCodeField.vue +228 -0
  134. package/src/components/AimdDnaSequenceField.vue +983 -0
  135. package/src/components/AimdMarkdownField.vue +168 -0
  136. package/src/components/AimdMarkdownNoteField.vue +457 -0
  137. package/src/components/AimdQuizRecorder.vue +792 -0
  138. package/src/components/AimdRecorder.vue +1959 -0
  139. package/src/components/AimdRecorderEditor.vue +2281 -0
  140. package/src/components/AimdRecorderWysiwygFieldHost.vue +93 -0
  141. package/src/components/AimdRecorderWysiwygSurface.vue +487 -0
  142. package/src/components/AimdSeqVizViewer.vue +122 -0
  143. package/src/components/AimdStepCheckField.vue +453 -0
  144. package/src/components/AimdVarField.vue +213 -0
  145. package/src/components/AimdVarTableField.vue +516 -0
  146. package/src/components/DnaAnnotationEditor.vue +477 -0
  147. package/src/components/DnaSequenceEditor.vue +44 -0
  148. package/src/components/DnaSequenceToolbar.vue +98 -0
  149. package/src/components/DnaSequenceViewer.vue +162 -0
  150. package/src/components/index.ts +21 -0
  151. package/src/components/recorderMilkdownPlugin.ts +632 -0
  152. package/src/composables/__tests__/useDnaSequence.test.ts +467 -0
  153. package/src/composables/__tests__/useFieldAdapters.test.ts +115 -0
  154. package/src/composables/__tests__/useFocusManagement.test.ts +66 -0
  155. package/src/composables/__tests__/useRecordState.test.ts +586 -0
  156. package/src/composables/__tests__/useStepTimers.test.ts +64 -0
  157. package/src/composables/__tests__/useVarHelpers.test.ts +424 -0
  158. package/src/composables/__tests__/workbenchFieldEditing.test.ts +97 -0
  159. package/src/composables/index.ts +94 -0
  160. package/src/composables/useClientAssignerRunner.ts +74 -0
  161. package/src/composables/useDnaSequence.ts +400 -0
  162. package/src/composables/useDnaSequenceField.ts +316 -0
  163. package/src/composables/useFieldAdapters.ts +61 -0
  164. package/src/composables/useFieldRendering.ts +269 -0
  165. package/src/composables/useFocusManagement.ts +144 -0
  166. package/src/composables/useRecordState.ts +429 -0
  167. package/src/composables/useStepTimers.ts +243 -0
  168. package/src/composables/useVarHelpers.ts +545 -0
  169. package/src/composables/useVarTableDragDrop.ts +236 -0
  170. package/src/composables/workbenchFieldEditing.ts +705 -0
  171. package/src/css.d.ts +9 -0
  172. package/src/index.ts +65 -0
  173. package/src/locales.ts +559 -0
  174. package/src/monaco-code.ts +75 -0
  175. package/src/styles/aimd.css +994 -0
  176. package/src/type-plugins.ts +132 -0
  177. package/src/type-utils.ts +3 -0
  178. package/src/types.ts +191 -0
@@ -0,0 +1,887 @@
1
+ import { m as O } from "./editor.api-CgD9w0gG.js";
2
+ import { typescriptDefaults as I } from "./monaco.contribution-Col-f0XR.js";
3
+ var N = Object.defineProperty, M = Object.getOwnPropertyDescriptor, R = Object.getOwnPropertyNames, K = Object.prototype.hasOwnProperty, E = (e, t, i, o) => {
4
+ if (t && typeof t == "object" || typeof t == "function")
5
+ for (let n of R(t))
6
+ !K.call(e, n) && n !== i && N(e, n, { get: () => t[n], enumerable: !(o = M(t, n)) || o.enumerable });
7
+ return e;
8
+ }, H = (e, t, i) => (E(e, t, "default"), i), a = {};
9
+ H(a, O);
10
+ var V = class {
11
+ constructor(e, t) {
12
+ this._modeId = e, this._defaults = t, this._worker = null, this._client = null, this._configChangeListener = this._defaults.onDidChange(() => this._stopWorker()), this._updateExtraLibsToken = 0, this._extraLibsChangeListener = this._defaults.onDidExtraLibsChange(
13
+ () => this._updateExtraLibs()
14
+ );
15
+ }
16
+ dispose() {
17
+ this._configChangeListener.dispose(), this._extraLibsChangeListener.dispose(), this._stopWorker();
18
+ }
19
+ _stopWorker() {
20
+ this._worker && (this._worker.dispose(), this._worker = null), this._client = null;
21
+ }
22
+ async _updateExtraLibs() {
23
+ if (!this._worker)
24
+ return;
25
+ const e = ++this._updateExtraLibsToken, t = await this._worker.getProxy();
26
+ this._updateExtraLibsToken === e && t.updateExtraLibs(this._defaults.getExtraLibs());
27
+ }
28
+ _getClient() {
29
+ return this._client || (this._client = (async () => (this._worker = a.editor.createWebWorker({
30
+ // module that exports the create() method and returns a `TypeScriptWorker` instance
31
+ moduleId: "vs/language/typescript/tsWorker",
32
+ label: this._modeId,
33
+ keepIdleModels: !0,
34
+ // passed in to the create() method
35
+ createData: {
36
+ compilerOptions: this._defaults.getCompilerOptions(),
37
+ extraLibs: this._defaults.getExtraLibs(),
38
+ customWorkerPath: this._defaults.workerOptions.customWorkerPath,
39
+ inlayHintsOptions: this._defaults.inlayHintsOptions
40
+ }
41
+ }), this._defaults.getEagerModelSync() ? await this._worker.withSyncedResources(
42
+ a.editor.getModels().filter((e) => e.getLanguageId() === this._modeId).map((e) => e.uri)
43
+ ) : await this._worker.getProxy()))()), this._client;
44
+ }
45
+ async getLanguageServiceWorker(...e) {
46
+ const t = await this._getClient();
47
+ return this._worker && await this._worker.withSyncedResources(e), t;
48
+ }
49
+ }, r = {};
50
+ r["lib.d.ts"] = !0;
51
+ r["lib.decorators.d.ts"] = !0;
52
+ r["lib.decorators.legacy.d.ts"] = !0;
53
+ r["lib.dom.asynciterable.d.ts"] = !0;
54
+ r["lib.dom.d.ts"] = !0;
55
+ r["lib.dom.iterable.d.ts"] = !0;
56
+ r["lib.es2015.collection.d.ts"] = !0;
57
+ r["lib.es2015.core.d.ts"] = !0;
58
+ r["lib.es2015.d.ts"] = !0;
59
+ r["lib.es2015.generator.d.ts"] = !0;
60
+ r["lib.es2015.iterable.d.ts"] = !0;
61
+ r["lib.es2015.promise.d.ts"] = !0;
62
+ r["lib.es2015.proxy.d.ts"] = !0;
63
+ r["lib.es2015.reflect.d.ts"] = !0;
64
+ r["lib.es2015.symbol.d.ts"] = !0;
65
+ r["lib.es2015.symbol.wellknown.d.ts"] = !0;
66
+ r["lib.es2016.array.include.d.ts"] = !0;
67
+ r["lib.es2016.d.ts"] = !0;
68
+ r["lib.es2016.full.d.ts"] = !0;
69
+ r["lib.es2016.intl.d.ts"] = !0;
70
+ r["lib.es2017.d.ts"] = !0;
71
+ r["lib.es2017.date.d.ts"] = !0;
72
+ r["lib.es2017.full.d.ts"] = !0;
73
+ r["lib.es2017.intl.d.ts"] = !0;
74
+ r["lib.es2017.object.d.ts"] = !0;
75
+ r["lib.es2017.sharedmemory.d.ts"] = !0;
76
+ r["lib.es2017.string.d.ts"] = !0;
77
+ r["lib.es2017.typedarrays.d.ts"] = !0;
78
+ r["lib.es2018.asyncgenerator.d.ts"] = !0;
79
+ r["lib.es2018.asynciterable.d.ts"] = !0;
80
+ r["lib.es2018.d.ts"] = !0;
81
+ r["lib.es2018.full.d.ts"] = !0;
82
+ r["lib.es2018.intl.d.ts"] = !0;
83
+ r["lib.es2018.promise.d.ts"] = !0;
84
+ r["lib.es2018.regexp.d.ts"] = !0;
85
+ r["lib.es2019.array.d.ts"] = !0;
86
+ r["lib.es2019.d.ts"] = !0;
87
+ r["lib.es2019.full.d.ts"] = !0;
88
+ r["lib.es2019.intl.d.ts"] = !0;
89
+ r["lib.es2019.object.d.ts"] = !0;
90
+ r["lib.es2019.string.d.ts"] = !0;
91
+ r["lib.es2019.symbol.d.ts"] = !0;
92
+ r["lib.es2020.bigint.d.ts"] = !0;
93
+ r["lib.es2020.d.ts"] = !0;
94
+ r["lib.es2020.date.d.ts"] = !0;
95
+ r["lib.es2020.full.d.ts"] = !0;
96
+ r["lib.es2020.intl.d.ts"] = !0;
97
+ r["lib.es2020.number.d.ts"] = !0;
98
+ r["lib.es2020.promise.d.ts"] = !0;
99
+ r["lib.es2020.sharedmemory.d.ts"] = !0;
100
+ r["lib.es2020.string.d.ts"] = !0;
101
+ r["lib.es2020.symbol.wellknown.d.ts"] = !0;
102
+ r["lib.es2021.d.ts"] = !0;
103
+ r["lib.es2021.full.d.ts"] = !0;
104
+ r["lib.es2021.intl.d.ts"] = !0;
105
+ r["lib.es2021.promise.d.ts"] = !0;
106
+ r["lib.es2021.string.d.ts"] = !0;
107
+ r["lib.es2021.weakref.d.ts"] = !0;
108
+ r["lib.es2022.array.d.ts"] = !0;
109
+ r["lib.es2022.d.ts"] = !0;
110
+ r["lib.es2022.error.d.ts"] = !0;
111
+ r["lib.es2022.full.d.ts"] = !0;
112
+ r["lib.es2022.intl.d.ts"] = !0;
113
+ r["lib.es2022.object.d.ts"] = !0;
114
+ r["lib.es2022.regexp.d.ts"] = !0;
115
+ r["lib.es2022.sharedmemory.d.ts"] = !0;
116
+ r["lib.es2022.string.d.ts"] = !0;
117
+ r["lib.es2023.array.d.ts"] = !0;
118
+ r["lib.es2023.collection.d.ts"] = !0;
119
+ r["lib.es2023.d.ts"] = !0;
120
+ r["lib.es2023.full.d.ts"] = !0;
121
+ r["lib.es5.d.ts"] = !0;
122
+ r["lib.es6.d.ts"] = !0;
123
+ r["lib.esnext.collection.d.ts"] = !0;
124
+ r["lib.esnext.d.ts"] = !0;
125
+ r["lib.esnext.decorators.d.ts"] = !0;
126
+ r["lib.esnext.disposable.d.ts"] = !0;
127
+ r["lib.esnext.full.d.ts"] = !0;
128
+ r["lib.esnext.intl.d.ts"] = !0;
129
+ r["lib.esnext.object.d.ts"] = !0;
130
+ r["lib.esnext.promise.d.ts"] = !0;
131
+ r["lib.scripthost.d.ts"] = !0;
132
+ r["lib.webworker.asynciterable.d.ts"] = !0;
133
+ r["lib.webworker.d.ts"] = !0;
134
+ r["lib.webworker.importscripts.d.ts"] = !0;
135
+ r["lib.webworker.iterable.d.ts"] = !0;
136
+ function D(e, t, i = 0) {
137
+ if (typeof e == "string")
138
+ return e;
139
+ if (e === void 0)
140
+ return "";
141
+ let o = "";
142
+ if (i) {
143
+ o += t;
144
+ for (let n = 0; n < i; n++)
145
+ o += " ";
146
+ }
147
+ if (o += e.messageText, i++, e.next)
148
+ for (const n of e.next)
149
+ o += D(n, t, i);
150
+ return o;
151
+ }
152
+ function w(e) {
153
+ return e ? e.map((t) => t.text).join("") : "";
154
+ }
155
+ var _ = class {
156
+ constructor(e) {
157
+ this._worker = e;
158
+ }
159
+ // protected _positionToOffset(model: editor.ITextModel, position: monaco.IPosition): number {
160
+ // return model.getOffsetAt(position);
161
+ // }
162
+ // protected _offsetToPosition(model: editor.ITextModel, offset: number): monaco.IPosition {
163
+ // return model.getPositionAt(offset);
164
+ // }
165
+ _textSpanToRange(e, t) {
166
+ let i = e.getPositionAt(t.start), o = e.getPositionAt(t.start + t.length), { lineNumber: n, column: c } = i, { lineNumber: u, column: s } = o;
167
+ return { startLineNumber: n, startColumn: c, endLineNumber: u, endColumn: s };
168
+ }
169
+ }, W = class {
170
+ constructor(e) {
171
+ this._worker = e, this._libFiles = {}, this._hasFetchedLibFiles = !1, this._fetchLibFilesPromise = null;
172
+ }
173
+ isLibFile(e) {
174
+ return e && e.path.indexOf("/lib.") === 0 ? !!r[e.path.slice(1)] : !1;
175
+ }
176
+ getOrCreateModel(e) {
177
+ const t = a.Uri.parse(e), i = a.editor.getModel(t);
178
+ if (i)
179
+ return i;
180
+ if (this.isLibFile(t) && this._hasFetchedLibFiles)
181
+ return a.editor.createModel(this._libFiles[t.path.slice(1)], "typescript", t);
182
+ const o = I.getExtraLibs()[e];
183
+ return o ? a.editor.createModel(o.content, "typescript", t) : null;
184
+ }
185
+ _containsLibFile(e) {
186
+ for (let t of e)
187
+ if (this.isLibFile(t))
188
+ return !0;
189
+ return !1;
190
+ }
191
+ async fetchLibFilesIfNecessary(e) {
192
+ this._containsLibFile(e) && await this._fetchLibFiles();
193
+ }
194
+ _fetchLibFiles() {
195
+ return this._fetchLibFilesPromise || (this._fetchLibFilesPromise = this._worker().then((e) => e.getLibFiles()).then((e) => {
196
+ this._hasFetchedLibFiles = !0, this._libFiles = e;
197
+ })), this._fetchLibFilesPromise;
198
+ }
199
+ }, j = class extends _ {
200
+ constructor(e, t, i, o) {
201
+ super(o), this._libFiles = e, this._defaults = t, this._selector = i, this._disposables = [], this._listener = /* @__PURE__ */ Object.create(null);
202
+ const n = (s) => {
203
+ if (s.getLanguageId() !== i)
204
+ return;
205
+ const l = () => {
206
+ const { onlyVisible: h } = this._defaults.getDiagnosticsOptions();
207
+ h ? s.isAttachedToEditor() && this._doValidate(s) : this._doValidate(s);
208
+ };
209
+ let g;
210
+ const d = s.onDidChangeContent(() => {
211
+ clearTimeout(g), g = window.setTimeout(l, 500);
212
+ }), b = s.onDidChangeAttached(() => {
213
+ const { onlyVisible: h } = this._defaults.getDiagnosticsOptions();
214
+ h && (s.isAttachedToEditor() ? l() : a.editor.setModelMarkers(s, this._selector, []));
215
+ });
216
+ this._listener[s.uri.toString()] = {
217
+ dispose() {
218
+ d.dispose(), b.dispose(), clearTimeout(g);
219
+ }
220
+ }, l();
221
+ }, c = (s) => {
222
+ a.editor.setModelMarkers(s, this._selector, []);
223
+ const l = s.uri.toString();
224
+ this._listener[l] && (this._listener[l].dispose(), delete this._listener[l]);
225
+ };
226
+ this._disposables.push(
227
+ a.editor.onDidCreateModel((s) => n(s))
228
+ ), this._disposables.push(a.editor.onWillDisposeModel(c)), this._disposables.push(
229
+ a.editor.onDidChangeModelLanguage((s) => {
230
+ c(s.model), n(s.model);
231
+ })
232
+ ), this._disposables.push({
233
+ dispose() {
234
+ for (const s of a.editor.getModels())
235
+ c(s);
236
+ }
237
+ });
238
+ const u = () => {
239
+ for (const s of a.editor.getModels())
240
+ c(s), n(s);
241
+ };
242
+ this._disposables.push(this._defaults.onDidChange(u)), this._disposables.push(this._defaults.onDidExtraLibsChange(u)), a.editor.getModels().forEach((s) => n(s));
243
+ }
244
+ dispose() {
245
+ this._disposables.forEach((e) => e && e.dispose()), this._disposables = [];
246
+ }
247
+ async _doValidate(e) {
248
+ const t = await this._worker(e.uri);
249
+ if (e.isDisposed())
250
+ return;
251
+ const i = [], { noSyntaxValidation: o, noSemanticValidation: n, noSuggestionDiagnostics: c } = this._defaults.getDiagnosticsOptions();
252
+ o || i.push(t.getSyntacticDiagnostics(e.uri.toString())), n || i.push(t.getSemanticDiagnostics(e.uri.toString())), c || i.push(t.getSuggestionDiagnostics(e.uri.toString()));
253
+ const u = await Promise.all(i);
254
+ if (!u || e.isDisposed())
255
+ return;
256
+ const s = u.reduce((g, d) => d.concat(g), []).filter(
257
+ (g) => (this._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore || []).indexOf(g.code) === -1
258
+ ), l = s.map((g) => g.relatedInformation || []).reduce((g, d) => d.concat(g), []).map(
259
+ (g) => g.file ? a.Uri.parse(g.file.fileName) : null
260
+ );
261
+ await this._libFiles.fetchLibFilesIfNecessary(l), !e.isDisposed() && a.editor.setModelMarkers(
262
+ e,
263
+ this._selector,
264
+ s.map((g) => this._convertDiagnostics(e, g))
265
+ );
266
+ }
267
+ _convertDiagnostics(e, t) {
268
+ const i = t.start || 0, o = t.length || 1, { lineNumber: n, column: c } = e.getPositionAt(i), { lineNumber: u, column: s } = e.getPositionAt(
269
+ i + o
270
+ ), l = [];
271
+ return t.reportsUnnecessary && l.push(a.MarkerTag.Unnecessary), t.reportsDeprecated && l.push(a.MarkerTag.Deprecated), {
272
+ severity: this._tsDiagnosticCategoryToMarkerSeverity(t.category),
273
+ startLineNumber: n,
274
+ startColumn: c,
275
+ endLineNumber: u,
276
+ endColumn: s,
277
+ message: D(t.messageText, `
278
+ `),
279
+ code: t.code.toString(),
280
+ tags: l,
281
+ relatedInformation: this._convertRelatedInformation(e, t.relatedInformation)
282
+ };
283
+ }
284
+ _convertRelatedInformation(e, t) {
285
+ if (!t)
286
+ return [];
287
+ const i = [];
288
+ return t.forEach((o) => {
289
+ let n = e;
290
+ if (o.file && (n = this._libFiles.getOrCreateModel(o.file.fileName)), !n)
291
+ return;
292
+ const c = o.start || 0, u = o.length || 1, { lineNumber: s, column: l } = n.getPositionAt(c), { lineNumber: g, column: d } = n.getPositionAt(
293
+ c + u
294
+ );
295
+ i.push({
296
+ resource: n.uri,
297
+ startLineNumber: s,
298
+ startColumn: l,
299
+ endLineNumber: g,
300
+ endColumn: d,
301
+ message: D(o.messageText, `
302
+ `)
303
+ });
304
+ }), i;
305
+ }
306
+ _tsDiagnosticCategoryToMarkerSeverity(e) {
307
+ switch (e) {
308
+ case 1:
309
+ return a.MarkerSeverity.Error;
310
+ case 3:
311
+ return a.MarkerSeverity.Info;
312
+ case 0:
313
+ return a.MarkerSeverity.Warning;
314
+ case 2:
315
+ return a.MarkerSeverity.Hint;
316
+ }
317
+ return a.MarkerSeverity.Info;
318
+ }
319
+ }, B = class C extends _ {
320
+ get triggerCharacters() {
321
+ return ["."];
322
+ }
323
+ async provideCompletionItems(t, i, o, n) {
324
+ const c = t.getWordUntilPosition(i), u = new a.Range(
325
+ i.lineNumber,
326
+ c.startColumn,
327
+ i.lineNumber,
328
+ c.endColumn
329
+ ), s = t.uri, l = t.getOffsetAt(i), g = await this._worker(s);
330
+ if (t.isDisposed())
331
+ return;
332
+ const d = await g.getCompletionsAtPosition(s.toString(), l);
333
+ return !d || t.isDisposed() ? void 0 : {
334
+ suggestions: d.entries.map((h) => {
335
+ let y = u;
336
+ if (h.replacementSpan) {
337
+ const S = t.getPositionAt(h.replacementSpan.start), x = t.getPositionAt(h.replacementSpan.start + h.replacementSpan.length);
338
+ y = new a.Range(S.lineNumber, S.column, x.lineNumber, x.column);
339
+ }
340
+ const v = [];
341
+ return h.kindModifiers !== void 0 && h.kindModifiers.indexOf("deprecated") !== -1 && v.push(a.languages.CompletionItemTag.Deprecated), {
342
+ uri: s,
343
+ position: i,
344
+ offset: l,
345
+ range: y,
346
+ label: h.name,
347
+ insertText: h.name,
348
+ sortText: h.sortText,
349
+ kind: C.convertKind(h.kind),
350
+ tags: v
351
+ };
352
+ })
353
+ };
354
+ }
355
+ async resolveCompletionItem(t, i) {
356
+ const o = t, n = o.uri, c = o.position, u = o.offset, l = await (await this._worker(n)).getCompletionEntryDetails(
357
+ n.toString(),
358
+ u,
359
+ o.label
360
+ );
361
+ return l ? {
362
+ uri: n,
363
+ position: c,
364
+ label: l.name,
365
+ kind: C.convertKind(l.kind),
366
+ detail: w(l.displayParts),
367
+ documentation: {
368
+ value: C.createDocumentationString(l)
369
+ }
370
+ } : o;
371
+ }
372
+ static convertKind(t) {
373
+ switch (t) {
374
+ case f.primitiveType:
375
+ case f.keyword:
376
+ return a.languages.CompletionItemKind.Keyword;
377
+ case f.variable:
378
+ case f.localVariable:
379
+ return a.languages.CompletionItemKind.Variable;
380
+ case f.memberVariable:
381
+ case f.memberGetAccessor:
382
+ case f.memberSetAccessor:
383
+ return a.languages.CompletionItemKind.Field;
384
+ case f.function:
385
+ case f.memberFunction:
386
+ case f.constructSignature:
387
+ case f.callSignature:
388
+ case f.indexSignature:
389
+ return a.languages.CompletionItemKind.Function;
390
+ case f.enum:
391
+ return a.languages.CompletionItemKind.Enum;
392
+ case f.module:
393
+ return a.languages.CompletionItemKind.Module;
394
+ case f.class:
395
+ return a.languages.CompletionItemKind.Class;
396
+ case f.interface:
397
+ return a.languages.CompletionItemKind.Interface;
398
+ case f.warning:
399
+ return a.languages.CompletionItemKind.File;
400
+ }
401
+ return a.languages.CompletionItemKind.Property;
402
+ }
403
+ static createDocumentationString(t) {
404
+ let i = w(t.documentation);
405
+ if (t.tags)
406
+ for (const o of t.tags)
407
+ i += `
408
+
409
+ ${T(o)}`;
410
+ return i;
411
+ }
412
+ };
413
+ function T(e) {
414
+ let t = `*@${e.name}*`;
415
+ if (e.name === "param" && e.text) {
416
+ const [i, ...o] = e.text;
417
+ t += `\`${i.text}\``, o.length > 0 && (t += ` — ${o.map((n) => n.text).join(" ")}`);
418
+ } else Array.isArray(e.text) ? t += ` — ${e.text.map((i) => i.text).join(" ")}` : e.text && (t += ` — ${e.text}`);
419
+ return t;
420
+ }
421
+ var U = class P extends _ {
422
+ constructor() {
423
+ super(...arguments), this.signatureHelpTriggerCharacters = ["(", ","];
424
+ }
425
+ static _toSignatureHelpTriggerReason(t) {
426
+ switch (t.triggerKind) {
427
+ case a.languages.SignatureHelpTriggerKind.TriggerCharacter:
428
+ return t.triggerCharacter ? t.isRetrigger ? { kind: "retrigger", triggerCharacter: t.triggerCharacter } : { kind: "characterTyped", triggerCharacter: t.triggerCharacter } : { kind: "invoked" };
429
+ case a.languages.SignatureHelpTriggerKind.ContentChange:
430
+ return t.isRetrigger ? { kind: "retrigger" } : { kind: "invoked" };
431
+ case a.languages.SignatureHelpTriggerKind.Invoke:
432
+ default:
433
+ return { kind: "invoked" };
434
+ }
435
+ }
436
+ async provideSignatureHelp(t, i, o, n) {
437
+ const c = t.uri, u = t.getOffsetAt(i), s = await this._worker(c);
438
+ if (t.isDisposed())
439
+ return;
440
+ const l = await s.getSignatureHelpItems(c.toString(), u, {
441
+ triggerReason: P._toSignatureHelpTriggerReason(n)
442
+ });
443
+ if (!l || t.isDisposed())
444
+ return;
445
+ const g = {
446
+ activeSignature: l.selectedItemIndex,
447
+ activeParameter: l.argumentIndex,
448
+ signatures: []
449
+ };
450
+ return l.items.forEach((d) => {
451
+ const b = {
452
+ label: "",
453
+ parameters: []
454
+ };
455
+ b.documentation = {
456
+ value: w(d.documentation)
457
+ }, b.label += w(d.prefixDisplayParts), d.parameters.forEach((h, y, v) => {
458
+ const S = w(h.displayParts), x = {
459
+ label: S,
460
+ documentation: {
461
+ value: w(h.documentation)
462
+ }
463
+ };
464
+ b.label += S, b.parameters.push(x), y < v.length - 1 && (b.label += w(d.separatorDisplayParts));
465
+ }), b.label += w(d.suffixDisplayParts), g.signatures.push(b);
466
+ }), {
467
+ value: g,
468
+ dispose() {
469
+ }
470
+ };
471
+ }
472
+ }, $ = class extends _ {
473
+ async provideHover(e, t, i) {
474
+ const o = e.uri, n = e.getOffsetAt(t), c = await this._worker(o);
475
+ if (e.isDisposed())
476
+ return;
477
+ const u = await c.getQuickInfoAtPosition(o.toString(), n);
478
+ if (!u || e.isDisposed())
479
+ return;
480
+ const s = w(u.documentation), l = u.tags ? u.tags.map((d) => T(d)).join(`
481
+
482
+ `) : "", g = w(u.displayParts);
483
+ return {
484
+ range: this._textSpanToRange(e, u.textSpan),
485
+ contents: [
486
+ {
487
+ value: "```typescript\n" + g + "\n```\n"
488
+ },
489
+ {
490
+ value: s + (l ? `
491
+
492
+ ` + l : "")
493
+ }
494
+ ]
495
+ };
496
+ }
497
+ }, z = class extends _ {
498
+ async provideDocumentHighlights(e, t, i) {
499
+ const o = e.uri, n = e.getOffsetAt(t), c = await this._worker(o);
500
+ if (e.isDisposed())
501
+ return;
502
+ const u = await c.getDocumentHighlights(o.toString(), n, [
503
+ o.toString()
504
+ ]);
505
+ if (!(!u || e.isDisposed()))
506
+ return u.flatMap((s) => s.highlightSpans.map((l) => ({
507
+ range: this._textSpanToRange(e, l.textSpan),
508
+ kind: l.kind === "writtenReference" ? a.languages.DocumentHighlightKind.Write : a.languages.DocumentHighlightKind.Text
509
+ })));
510
+ }
511
+ }, G = class extends _ {
512
+ constructor(e, t) {
513
+ super(t), this._libFiles = e;
514
+ }
515
+ async provideDefinition(e, t, i) {
516
+ const o = e.uri, n = e.getOffsetAt(t), c = await this._worker(o);
517
+ if (e.isDisposed())
518
+ return;
519
+ const u = await c.getDefinitionAtPosition(o.toString(), n);
520
+ if (!u || e.isDisposed() || (await this._libFiles.fetchLibFilesIfNecessary(
521
+ u.map((l) => a.Uri.parse(l.fileName))
522
+ ), e.isDisposed()))
523
+ return;
524
+ const s = [];
525
+ for (let l of u) {
526
+ const g = this._libFiles.getOrCreateModel(l.fileName);
527
+ g && s.push({
528
+ uri: g.uri,
529
+ range: this._textSpanToRange(g, l.textSpan)
530
+ });
531
+ }
532
+ return s;
533
+ }
534
+ }, J = class extends _ {
535
+ constructor(e, t) {
536
+ super(t), this._libFiles = e;
537
+ }
538
+ async provideReferences(e, t, i, o) {
539
+ const n = e.uri, c = e.getOffsetAt(t), u = await this._worker(n);
540
+ if (e.isDisposed())
541
+ return;
542
+ const s = await u.getReferencesAtPosition(n.toString(), c);
543
+ if (!s || e.isDisposed() || (await this._libFiles.fetchLibFilesIfNecessary(
544
+ s.map((g) => a.Uri.parse(g.fileName))
545
+ ), e.isDisposed()))
546
+ return;
547
+ const l = [];
548
+ for (let g of s) {
549
+ const d = this._libFiles.getOrCreateModel(g.fileName);
550
+ d && l.push({
551
+ uri: d.uri,
552
+ range: this._textSpanToRange(d, g.textSpan)
553
+ });
554
+ }
555
+ return l;
556
+ }
557
+ }, Q = class extends _ {
558
+ async provideDocumentSymbols(e, t) {
559
+ const i = e.uri, o = await this._worker(i);
560
+ if (e.isDisposed())
561
+ return;
562
+ const n = await o.getNavigationTree(i.toString());
563
+ if (!n || e.isDisposed())
564
+ return;
565
+ const c = (s, l) => ({
566
+ name: s.text,
567
+ detail: "",
568
+ kind: m[s.kind] || a.languages.SymbolKind.Variable,
569
+ range: this._textSpanToRange(e, s.spans[0]),
570
+ selectionRange: this._textSpanToRange(e, s.spans[0]),
571
+ tags: [],
572
+ children: s.childItems?.map((d) => c(d, s.text)),
573
+ containerName: l
574
+ });
575
+ return n.childItems ? n.childItems.map((s) => c(s)) : [];
576
+ }
577
+ }, p, f = (p = class {
578
+ }, p.unknown = "", p.keyword = "keyword", p.script = "script", p.module = "module", p.class = "class", p.interface = "interface", p.type = "type", p.enum = "enum", p.variable = "var", p.localVariable = "local var", p.function = "function", p.localFunction = "local function", p.memberFunction = "method", p.memberGetAccessor = "getter", p.memberSetAccessor = "setter", p.memberVariable = "property", p.constructorImplementation = "constructor", p.callSignature = "call", p.indexSignature = "index", p.constructSignature = "construct", p.parameter = "parameter", p.typeParameter = "type parameter", p.primitiveType = "primitive type", p.label = "label", p.alias = "alias", p.const = "const", p.let = "let", p.warning = "warning", p), m = /* @__PURE__ */ Object.create(null);
579
+ m[f.module] = a.languages.SymbolKind.Module;
580
+ m[f.class] = a.languages.SymbolKind.Class;
581
+ m[f.enum] = a.languages.SymbolKind.Enum;
582
+ m[f.interface] = a.languages.SymbolKind.Interface;
583
+ m[f.memberFunction] = a.languages.SymbolKind.Method;
584
+ m[f.memberVariable] = a.languages.SymbolKind.Property;
585
+ m[f.memberGetAccessor] = a.languages.SymbolKind.Property;
586
+ m[f.memberSetAccessor] = a.languages.SymbolKind.Property;
587
+ m[f.variable] = a.languages.SymbolKind.Variable;
588
+ m[f.const] = a.languages.SymbolKind.Variable;
589
+ m[f.localVariable] = a.languages.SymbolKind.Variable;
590
+ m[f.variable] = a.languages.SymbolKind.Variable;
591
+ m[f.function] = a.languages.SymbolKind.Function;
592
+ m[f.localFunction] = a.languages.SymbolKind.Function;
593
+ var k = class extends _ {
594
+ static _convertOptions(e) {
595
+ return {
596
+ ConvertTabsToSpaces: e.insertSpaces,
597
+ TabSize: e.tabSize,
598
+ IndentSize: e.tabSize,
599
+ IndentStyle: 2,
600
+ NewLineCharacter: `
601
+ `,
602
+ InsertSpaceAfterCommaDelimiter: !0,
603
+ InsertSpaceAfterSemicolonInForStatements: !0,
604
+ InsertSpaceBeforeAndAfterBinaryOperators: !0,
605
+ InsertSpaceAfterKeywordsInControlFlowStatements: !0,
606
+ InsertSpaceAfterFunctionKeywordForAnonymousFunctions: !0,
607
+ InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: !1,
608
+ InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: !1,
609
+ InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: !1,
610
+ PlaceOpenBraceOnNewLineForControlBlocks: !1,
611
+ PlaceOpenBraceOnNewLineForFunctions: !1
612
+ };
613
+ }
614
+ _convertTextChanges(e, t) {
615
+ return {
616
+ text: t.newText,
617
+ range: this._textSpanToRange(e, t.span)
618
+ };
619
+ }
620
+ }, q = class extends k {
621
+ constructor() {
622
+ super(...arguments), this.canFormatMultipleRanges = !1;
623
+ }
624
+ async provideDocumentRangeFormattingEdits(e, t, i, o) {
625
+ const n = e.uri, c = e.getOffsetAt({
626
+ lineNumber: t.startLineNumber,
627
+ column: t.startColumn
628
+ }), u = e.getOffsetAt({
629
+ lineNumber: t.endLineNumber,
630
+ column: t.endColumn
631
+ }), s = await this._worker(n);
632
+ if (e.isDisposed())
633
+ return;
634
+ const l = await s.getFormattingEditsForRange(
635
+ n.toString(),
636
+ c,
637
+ u,
638
+ k._convertOptions(i)
639
+ );
640
+ if (!(!l || e.isDisposed()))
641
+ return l.map((g) => this._convertTextChanges(e, g));
642
+ }
643
+ }, X = class extends k {
644
+ get autoFormatTriggerCharacters() {
645
+ return [";", "}", `
646
+ `];
647
+ }
648
+ async provideOnTypeFormattingEdits(e, t, i, o, n) {
649
+ const c = e.uri, u = e.getOffsetAt(t), s = await this._worker(c);
650
+ if (e.isDisposed())
651
+ return;
652
+ const l = await s.getFormattingEditsAfterKeystroke(
653
+ c.toString(),
654
+ u,
655
+ i,
656
+ k._convertOptions(o)
657
+ );
658
+ if (!(!l || e.isDisposed()))
659
+ return l.map((g) => this._convertTextChanges(e, g));
660
+ }
661
+ }, Y = class extends k {
662
+ async provideCodeActions(e, t, i, o) {
663
+ const n = e.uri, c = e.getOffsetAt({
664
+ lineNumber: t.startLineNumber,
665
+ column: t.startColumn
666
+ }), u = e.getOffsetAt({
667
+ lineNumber: t.endLineNumber,
668
+ column: t.endColumn
669
+ }), s = k._convertOptions(e.getOptions()), l = i.markers.filter((h) => h.code).map((h) => h.code).map(Number), g = await this._worker(n);
670
+ if (e.isDisposed())
671
+ return;
672
+ const d = await g.getCodeFixesAtPosition(
673
+ n.toString(),
674
+ c,
675
+ u,
676
+ l,
677
+ s
678
+ );
679
+ return !d || e.isDisposed() ? { actions: [], dispose: () => {
680
+ } } : {
681
+ actions: d.filter((h) => h.changes.filter((y) => y.isNewFile).length === 0).map((h) => this._tsCodeFixActionToMonacoCodeAction(e, i, h)),
682
+ dispose: () => {
683
+ }
684
+ };
685
+ }
686
+ _tsCodeFixActionToMonacoCodeAction(e, t, i) {
687
+ const o = [];
688
+ for (const c of i.changes)
689
+ for (const u of c.textChanges)
690
+ o.push({
691
+ resource: e.uri,
692
+ versionId: void 0,
693
+ textEdit: {
694
+ range: this._textSpanToRange(e, u.span),
695
+ text: u.newText
696
+ }
697
+ });
698
+ return {
699
+ title: i.description,
700
+ edit: { edits: o },
701
+ diagnostics: t.markers,
702
+ kind: "quickfix"
703
+ };
704
+ }
705
+ }, Z = class extends _ {
706
+ constructor(e, t) {
707
+ super(t), this._libFiles = e;
708
+ }
709
+ async provideRenameEdits(e, t, i, o) {
710
+ const n = e.uri, c = n.toString(), u = e.getOffsetAt(t), s = await this._worker(n);
711
+ if (e.isDisposed())
712
+ return;
713
+ const l = await s.getRenameInfo(c, u, {
714
+ allowRenameOfImportPath: !1
715
+ });
716
+ if (l.canRename === !1)
717
+ return {
718
+ edits: [],
719
+ rejectReason: l.localizedErrorMessage
720
+ };
721
+ if (l.fileToRename !== void 0)
722
+ throw new Error("Renaming files is not supported.");
723
+ const g = await s.findRenameLocations(
724
+ c,
725
+ u,
726
+ /*strings*/
727
+ !1,
728
+ /*comments*/
729
+ !1,
730
+ /*prefixAndSuffix*/
731
+ !1
732
+ );
733
+ if (!g || e.isDisposed())
734
+ return;
735
+ const d = [];
736
+ for (const b of g) {
737
+ const h = this._libFiles.getOrCreateModel(b.fileName);
738
+ if (h)
739
+ d.push({
740
+ resource: h.uri,
741
+ versionId: void 0,
742
+ textEdit: {
743
+ range: this._textSpanToRange(h, b.textSpan),
744
+ text: i
745
+ }
746
+ });
747
+ else
748
+ throw new Error(`Unknown file ${b.fileName}.`);
749
+ }
750
+ return { edits: d };
751
+ }
752
+ }, ee = class extends _ {
753
+ async provideInlayHints(e, t, i) {
754
+ const o = e.uri, n = o.toString(), c = e.getOffsetAt({
755
+ lineNumber: t.startLineNumber,
756
+ column: t.startColumn
757
+ }), u = e.getOffsetAt({
758
+ lineNumber: t.endLineNumber,
759
+ column: t.endColumn
760
+ }), s = await this._worker(o);
761
+ return e.isDisposed() ? null : { hints: (await s.provideInlayHints(n, c, u)).map((d) => ({
762
+ ...d,
763
+ label: d.text,
764
+ position: e.getPositionAt(d.position),
765
+ kind: this._convertHintKind(d.kind)
766
+ })), dispose: () => {
767
+ } };
768
+ }
769
+ _convertHintKind(e) {
770
+ switch (e) {
771
+ case "Parameter":
772
+ return a.languages.InlayHintKind.Parameter;
773
+ case "Type":
774
+ return a.languages.InlayHintKind.Type;
775
+ default:
776
+ return a.languages.InlayHintKind.Type;
777
+ }
778
+ }
779
+ }, A, F;
780
+ function ie(e) {
781
+ F = L(e, "typescript");
782
+ }
783
+ function ne(e) {
784
+ A = L(e, "javascript");
785
+ }
786
+ function ae() {
787
+ return new Promise((e, t) => {
788
+ if (!A)
789
+ return t("JavaScript not registered!");
790
+ e(A);
791
+ });
792
+ }
793
+ function oe() {
794
+ return new Promise((e, t) => {
795
+ if (!F)
796
+ return t("TypeScript not registered!");
797
+ e(F);
798
+ });
799
+ }
800
+ function L(e, t) {
801
+ const i = [], o = new V(t, e), n = (...s) => o.getLanguageServiceWorker(...s), c = new W(n);
802
+ function u() {
803
+ const { modeConfiguration: s } = e;
804
+ te(i), s.completionItems && i.push(
805
+ a.languages.registerCompletionItemProvider(
806
+ t,
807
+ new B(n)
808
+ )
809
+ ), s.signatureHelp && i.push(
810
+ a.languages.registerSignatureHelpProvider(
811
+ t,
812
+ new U(n)
813
+ )
814
+ ), s.hovers && i.push(
815
+ a.languages.registerHoverProvider(t, new $(n))
816
+ ), s.documentHighlights && i.push(
817
+ a.languages.registerDocumentHighlightProvider(
818
+ t,
819
+ new z(n)
820
+ )
821
+ ), s.definitions && i.push(
822
+ a.languages.registerDefinitionProvider(
823
+ t,
824
+ new G(c, n)
825
+ )
826
+ ), s.references && i.push(
827
+ a.languages.registerReferenceProvider(
828
+ t,
829
+ new J(c, n)
830
+ )
831
+ ), s.documentSymbols && i.push(
832
+ a.languages.registerDocumentSymbolProvider(
833
+ t,
834
+ new Q(n)
835
+ )
836
+ ), s.rename && i.push(
837
+ a.languages.registerRenameProvider(
838
+ t,
839
+ new Z(c, n)
840
+ )
841
+ ), s.documentRangeFormattingEdits && i.push(
842
+ a.languages.registerDocumentRangeFormattingEditProvider(
843
+ t,
844
+ new q(n)
845
+ )
846
+ ), s.onTypeFormattingEdits && i.push(
847
+ a.languages.registerOnTypeFormattingEditProvider(
848
+ t,
849
+ new X(n)
850
+ )
851
+ ), s.codeActions && i.push(
852
+ a.languages.registerCodeActionProvider(t, new Y(n))
853
+ ), s.inlayHints && i.push(
854
+ a.languages.registerInlayHintsProvider(t, new ee(n))
855
+ ), s.diagnostics && i.push(new j(c, e, t, n));
856
+ }
857
+ return u(), n;
858
+ }
859
+ function te(e) {
860
+ for (; e.length; )
861
+ e.pop().dispose();
862
+ }
863
+ export {
864
+ _ as Adapter,
865
+ Y as CodeActionAdaptor,
866
+ G as DefinitionAdapter,
867
+ j as DiagnosticsAdapter,
868
+ z as DocumentHighlightAdapter,
869
+ q as FormatAdapter,
870
+ k as FormatHelper,
871
+ X as FormatOnTypeAdapter,
872
+ ee as InlayHintsAdapter,
873
+ f as Kind,
874
+ W as LibFiles,
875
+ Q as OutlineAdapter,
876
+ $ as QuickInfoAdapter,
877
+ J as ReferenceAdapter,
878
+ Z as RenameAdapter,
879
+ U as SignatureHelpAdapter,
880
+ B as SuggestAdapter,
881
+ V as WorkerManager,
882
+ D as flattenDiagnosticMessageText,
883
+ ae as getJavaScriptWorker,
884
+ oe as getTypeScriptWorker,
885
+ ne as setupJavaScript,
886
+ ie as setupTypeScript
887
+ };