@adecore/editor-react 0.31.12 → 0.33.0

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 (137) hide show
  1. package/dist/AnchoredPopup.js +73 -19
  2. package/dist/AttributionCard.js +162 -4
  3. package/dist/BaselineStatus.js +62 -8
  4. package/dist/CallHierarchyPanel.js +977 -60
  5. package/dist/ChangeReview.js +76 -25
  6. package/dist/CodeAuthorsCard.js +314 -14
  7. package/dist/CompletionPopup.js +490 -83
  8. package/dist/DiffView.js +548 -181
  9. package/dist/EditorContextMenu.js +352 -34
  10. package/dist/EditorView.js +276 -99
  11. package/dist/FindReplace.js +525 -67
  12. package/dist/HoverCard.js +378 -38
  13. package/dist/HoverSections.js +367 -56
  14. package/dist/LanguagePopups.js +95 -34
  15. package/dist/Markdown.js +41 -6
  16. package/dist/PanelResizeHandle.js +199 -66
  17. package/dist/PathText.js +49 -7
  18. package/dist/PeekPanel.js +675 -72
  19. package/dist/PickPopup.js +304 -34
  20. package/dist/RenameCard.js +679 -85
  21. package/dist/RenderedDocs.js +329 -58
  22. package/dist/SignatureCard.js +91 -7
  23. package/dist/SplitDiffView.js +344 -254
  24. package/dist/SymbolPicker.js +440 -85
  25. package/dist/call-hierarchy-model.js +102 -68
  26. package/dist/call-hierarchy.js +458 -359
  27. package/dist/code-actions-model.js +88 -76
  28. package/dist/code-actions.js +372 -283
  29. package/dist/code-authors.js +64 -55
  30. package/dist/code-vision-model.js +134 -127
  31. package/dist/code-vision.js +224 -206
  32. package/dist/completion-call.js +94 -67
  33. package/dist/completion-model.js +334 -244
  34. package/dist/completion.js +840 -649
  35. package/dist/conflict-model.js +35 -29
  36. package/dist/context-menu-rows.js +42 -17
  37. package/dist/context-menu.js +64 -46
  38. package/dist/definition-link.js +88 -85
  39. package/dist/diagnostics-model.js +74 -55
  40. package/dist/diagnostics.js +121 -100
  41. package/dist/diff-expansion.js +38 -35
  42. package/dist/diff-overlays.js +144 -22
  43. package/dist/diff-syntax.js +65 -42
  44. package/dist/diff-wordmarks.js +26 -23
  45. package/dist/doc-comment-model.js +265 -216
  46. package/dist/editor-language.js +177 -152
  47. package/dist/error-message.js +2 -2
  48. package/dist/find-query.js +49 -36
  49. package/dist/folding.js +81 -62
  50. package/dist/format-on-type.js +86 -67
  51. package/dist/highlight-layers.js +19 -20
  52. package/dist/highlights.js +105 -83
  53. package/dist/history.js +44 -38
  54. package/dist/holder.js +18 -18
  55. package/dist/host-types.js +1 -1
  56. package/dist/hover-content.js +167 -129
  57. package/dist/hover.js +285 -245
  58. package/dist/index.js +10 -10
  59. package/dist/inlay-hints.js +369 -324
  60. package/dist/key-priority.js +34 -31
  61. package/dist/language-ids.js +45 -42
  62. package/dist/line-edits.js +74 -28
  63. package/dist/line-text.js +18 -3
  64. package/dist/locales/en.json +38 -38
  65. package/dist/locales/nl.json +41 -41
  66. package/dist/models.js +1 -1
  67. package/dist/navigation-history.js +40 -41
  68. package/dist/navigation.js +141 -123
  69. package/dist/panel-size.js +8 -8
  70. package/dist/patch-decorations.js +236 -160
  71. package/dist/patch-layout.js +331 -262
  72. package/dist/paths.js +3 -3
  73. package/dist/peek-model.js +86 -69
  74. package/dist/peek.js +254 -192
  75. package/dist/pick.js +164 -157
  76. package/dist/popup-focus.js +5 -5
  77. package/dist/popup-placement.js +36 -21
  78. package/dist/popups.js +13 -13
  79. package/dist/project-language.js +228 -211
  80. package/dist/project-problems.js +81 -69
  81. package/dist/proposal-model.js +163 -126
  82. package/dist/recent-choices.js +25 -25
  83. package/dist/refresher.js +44 -49
  84. package/dist/rename-model.js +113 -113
  85. package/dist/rename.js +321 -233
  86. package/dist/rendered-docs.d.ts +4 -2
  87. package/dist/rendered-docs.js +384 -318
  88. package/dist/rendering-context.js +5 -3
  89. package/dist/rendering.js +22 -4
  90. package/dist/review-group.js +42 -39
  91. package/dist/row-host.d.ts +4 -2
  92. package/dist/row-host.js +90 -78
  93. package/dist/selection-ranges.js +21 -17
  94. package/dist/semantic-delta.js +22 -19
  95. package/dist/semantic-model.js +86 -73
  96. package/dist/semantic-tokens.js +201 -162
  97. package/dist/shortcut-keys.js +16 -10
  98. package/dist/signature-model.js +34 -28
  99. package/dist/signature.js +177 -129
  100. package/dist/snippet-field-transforms.js +118 -106
  101. package/dist/snippet-indent.js +48 -43
  102. package/dist/snippet-range-order.js +11 -11
  103. package/dist/snippet-session.js +703 -667
  104. package/dist/snippet-transform-client.js +59 -59
  105. package/dist/snippet-transform-format.js +285 -263
  106. package/dist/snippet-transform-protocol.js +1 -1
  107. package/dist/snippet-transform-queue.js +163 -153
  108. package/dist/snippet-transform-worker.js +42 -35
  109. package/dist/snippet-variable-names.js +1 -36
  110. package/dist/snippet-variables.js +53 -63
  111. package/dist/snippet.js +477 -405
  112. package/dist/split-alignment.js +47 -35
  113. package/dist/split-scroll.js +42 -40
  114. package/dist/symbol-links.js +33 -25
  115. package/dist/symbol-picker-model.js +126 -116
  116. package/dist/symbol-picker.js +98 -59
  117. package/dist/symbols.js +117 -88
  118. package/dist/testing.js +248 -165
  119. package/dist/timers.js +35 -30
  120. package/dist/use-panel-body.js +49 -8
  121. package/dist/use-problem-counts.js +29 -15
  122. package/dist/view-state.js +54 -33
  123. package/dist/word-diff.js +18 -18
  124. package/dist/workspace-edit.js +300 -249
  125. package/package.json +6 -6
  126. package/src/CallHierarchyPanel.tsx +2 -2
  127. package/src/DiffView.tsx +3 -3
  128. package/src/FindReplace.tsx +2 -2
  129. package/src/LanguagePopups.tsx +2 -0
  130. package/src/PeekPanel.tsx +3 -3
  131. package/src/RenderedDocs.tsx +9 -10
  132. package/src/SymbolPicker.tsx +2 -2
  133. package/src/diff-overlays.tsx +6 -4
  134. package/src/locales/en.json +38 -38
  135. package/src/locales/nl.json +41 -41
  136. package/src/rendered-docs.ts +14 -3
  137. package/src/row-host.ts +14 -3
package/dist/HoverCard.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { CircleX, Info, TriangleAlert } from 'lucide-react';
4
4
  import { fileUriToPath } from '@adecore/lsp';
@@ -6,48 +6,388 @@ import { Button, Icon, Tooltip } from '@adecore/ui';
6
6
  import { formatNumber } from '@adecore/ui/format';
7
7
  import { basenameOf } from './paths.js';
8
8
  import { codeLabelOf, severityOf } from './diagnostics-model.js';
9
- import { SymbolSections } from './HoverSections.js';
10
- const SEVERITY_ICONS = { error: CircleX, warning: TriangleAlert, info: Info, hint: Info };
11
- const SEVERITY_COLORS = { error: 'text-status-error', warning: 'text-status-needs-you', info: 'text-status-running', hint: 'text-text-muted' };
9
+ import { SymbolSections } from "./HoverSections.js";
10
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
11
+ const SEVERITY_ICONS = {
12
+ error: CircleX,
13
+ warning: TriangleAlert,
14
+ info: Info,
15
+ hint: Info
16
+ };
17
+ const SEVERITY_COLORS = {
18
+ error: 'text-status-error',
19
+ warning: 'text-status-needs-you',
20
+ info: 'text-status-running',
21
+ hint: 'text-text-muted'
22
+ };
12
23
  /*
13
24
  * Where a definition is: only its line in the file of the card, else the file and the line, with a long name cut
14
25
  * short before the line. A definition outside the project folder, such as the stubs of a standard library, has none.
15
26
  */
16
- export function DefinitionPlace({ definition, uri, folder }) {
17
- const { t } = useTranslation('editor');
18
- const path = fileUriToPath(definition.uri);
19
- const line = formatNumber(definition.range.start.line + 1);
20
- if (path === null || (folder !== '' && !path.startsWith(`${folder}/`))) {
21
- return null;
27
+ export function DefinitionPlace(t0) {
28
+ const $ = _c(19);
29
+ const {
30
+ definition,
31
+ uri,
32
+ folder
33
+ } = t0;
34
+ const {
35
+ t
36
+ } = useTranslation("editor");
37
+ let line;
38
+ let t1;
39
+ let t2;
40
+ let t3;
41
+ let t4;
42
+ if ($[0] !== definition.range.start.line || $[1] !== definition.uri || $[2] !== folder || $[3] !== t || $[4] !== uri) {
43
+ t4 = Symbol.for("react.early_return_sentinel");
44
+ bb0: {
45
+ const path = fileUriToPath(definition.uri);
46
+ line = formatNumber(definition.range.start.line + 1);
47
+ if (path === null || folder !== "" && !path.startsWith(`${folder}/`)) {
48
+ t4 = null;
49
+ break bb0;
50
+ }
51
+ if (definition.uri === uri) {
52
+ t4 = /*#__PURE__*/_jsx("span", {
53
+ className: "text-text-faint",
54
+ children: t("language.hover.line", {
55
+ line
56
+ })
57
+ });
58
+ break bb0;
59
+ }
60
+ t3 = "flex min-w-0 font-mono text-text-faint";
61
+ t1 = "truncate";
62
+ t2 = basenameOf(path);
22
63
  }
23
- if (definition.uri === uri) {
24
- return _jsx("span", { className: "text-text-faint", children: t('language.hover.line', { line }) });
25
- }
26
- return (_jsxs("span", { className: "flex min-w-0 font-mono text-text-faint", children: [_jsx("span", { className: "truncate", children: basenameOf(path) }), _jsxs("span", { className: "shrink-0", children: [":", line] })] }));
64
+ $[0] = definition.range.start.line;
65
+ $[1] = definition.uri;
66
+ $[2] = folder;
67
+ $[3] = t;
68
+ $[4] = uri;
69
+ $[5] = line;
70
+ $[6] = t1;
71
+ $[7] = t2;
72
+ $[8] = t3;
73
+ $[9] = t4;
74
+ } else {
75
+ line = $[5];
76
+ t1 = $[6];
77
+ t2 = $[7];
78
+ t3 = $[8];
79
+ t4 = $[9];
80
+ }
81
+ if (t4 !== Symbol.for("react.early_return_sentinel")) {
82
+ return t4;
83
+ }
84
+ let t5;
85
+ if ($[10] !== t1 || $[11] !== t2) {
86
+ t5 = /*#__PURE__*/_jsx("span", {
87
+ className: t1,
88
+ children: t2
89
+ });
90
+ $[10] = t1;
91
+ $[11] = t2;
92
+ $[12] = t5;
93
+ } else {
94
+ t5 = $[12];
95
+ }
96
+ let t6;
97
+ if ($[13] !== line) {
98
+ t6 = /*#__PURE__*/_jsxs("span", {
99
+ className: "shrink-0",
100
+ children: [":", line]
101
+ });
102
+ $[13] = line;
103
+ $[14] = t6;
104
+ } else {
105
+ t6 = $[14];
106
+ }
107
+ let t7;
108
+ if ($[15] !== t3 || $[16] !== t5 || $[17] !== t6) {
109
+ t7 = /*#__PURE__*/_jsxs("span", {
110
+ className: t3,
111
+ children: [t5, t6]
112
+ });
113
+ $[15] = t3;
114
+ $[16] = t5;
115
+ $[17] = t6;
116
+ $[18] = t7;
117
+ } else {
118
+ t7 = $[18];
119
+ }
120
+ return t7;
27
121
  }
28
- function ProblemSection({ problem, language }) {
29
- const { t } = useTranslation('editor');
30
- const { diagnostic } = problem;
31
- const severity = severityOf(diagnostic);
32
- const label = diagnostic.source === undefined ? [codeLabelOf(diagnostic), problem.server].filter((part) => part !== '').join(' · ') : codeLabelOf(diagnostic);
33
- const supported = language.codeActions.supported;
34
- return (_jsxs("div", { className: "flex flex-col gap-1.5 px-3 py-2.5", children: [_jsxs("div", { className: "flex items-start gap-2", children: [_jsx(Icon, { icon: SEVERITY_ICONS[severity], size: 14, className: `mt-px shrink-0 ${SEVERITY_COLORS[severity]}` }), _jsx("div", { className: "min-w-0 text-xs/[18px] break-words whitespace-pre-wrap select-text", children: diagnostic.message })] }), label !== '' && _jsx("div", { className: "pl-[22px] text-xs text-text-muted select-text", children: label }), diagnostic.relatedInformation?.map((related, index) => {
35
- const path = fileUriToPath(related.location.uri);
36
- return (_jsxs("div", { className: "pl-[22px] text-xs text-text-muted", children: [path !== null && (_jsxs("button", { type: "button", className: "font-mono text-accent hover:underline", onClick: () => language.goTo(related.location), children: [basenameOf(path), ":", formatNumber(related.location.range.start.line + 1)] })), ' ', related.message] }, index));
37
- }), _jsx("div", { className: "pt-1 pl-[22px]", children: _jsx(Tooltip, { label: t(supported ? 'language.hover.quickFix' : 'language.hover.quickFixNone'), children: _jsx(Button, { size: "xs", variant: "secondary", "aria-disabled": !supported, onClick: () => {
38
- if (supported) {
39
- language.hover.hide();
40
- void language.codeActions.quickFixFor(problem);
41
- }
42
- }, children: t('language.hover.quickFix') }) }) })] }));
122
+ function ProblemSection(t0) {
123
+ const $ = _c(38);
124
+ const {
125
+ problem,
126
+ language
127
+ } = t0;
128
+ const {
129
+ t
130
+ } = useTranslation("editor");
131
+ const {
132
+ diagnostic
133
+ } = problem;
134
+ const severity = severityOf(diagnostic);
135
+ let t1;
136
+ if ($[0] !== diagnostic || $[1] !== problem.server) {
137
+ t1 = diagnostic.source === undefined ? [codeLabelOf(diagnostic), problem.server].filter(_temp).join(" \xB7 ") : codeLabelOf(diagnostic);
138
+ $[0] = diagnostic;
139
+ $[1] = problem.server;
140
+ $[2] = t1;
141
+ } else {
142
+ t1 = $[2];
143
+ }
144
+ const label = t1;
145
+ const supported = language.codeActions.supported;
146
+ const t2 = SEVERITY_ICONS[severity];
147
+ const t3 = `mt-px shrink-0 ${SEVERITY_COLORS[severity]}`;
148
+ let t4;
149
+ if ($[3] !== t2 || $[4] !== t3) {
150
+ t4 = /*#__PURE__*/_jsx(Icon, {
151
+ icon: t2,
152
+ size: 14,
153
+ className: t3
154
+ });
155
+ $[3] = t2;
156
+ $[4] = t3;
157
+ $[5] = t4;
158
+ } else {
159
+ t4 = $[5];
160
+ }
161
+ let t5;
162
+ if ($[6] !== diagnostic.message) {
163
+ t5 = /*#__PURE__*/_jsx("div", {
164
+ className: "min-w-0 text-xs/[18px] break-words whitespace-pre-wrap select-text",
165
+ children: diagnostic.message
166
+ });
167
+ $[6] = diagnostic.message;
168
+ $[7] = t5;
169
+ } else {
170
+ t5 = $[7];
171
+ }
172
+ let t6;
173
+ if ($[8] !== t4 || $[9] !== t5) {
174
+ t6 = /*#__PURE__*/_jsxs("div", {
175
+ className: "flex items-start gap-2",
176
+ children: [t4, t5]
177
+ });
178
+ $[8] = t4;
179
+ $[9] = t5;
180
+ $[10] = t6;
181
+ } else {
182
+ t6 = $[10];
183
+ }
184
+ let t7;
185
+ if ($[11] !== label) {
186
+ t7 = label !== "" && /*#__PURE__*/_jsx("div", {
187
+ className: "pl-[22px] text-xs text-text-muted select-text",
188
+ children: label
189
+ });
190
+ $[11] = label;
191
+ $[12] = t7;
192
+ } else {
193
+ t7 = $[12];
194
+ }
195
+ let t8;
196
+ if ($[13] !== diagnostic.relatedInformation || $[14] !== language) {
197
+ t8 = diagnostic.relatedInformation?.map((related, index) => {
198
+ const path = fileUriToPath(related.location.uri);
199
+ return /*#__PURE__*/_jsxs("div", {
200
+ className: "pl-[22px] text-xs text-text-muted",
201
+ children: [path !== null && /*#__PURE__*/_jsxs("button", {
202
+ type: "button",
203
+ className: "font-mono text-accent hover:underline",
204
+ onClick: () => language.goTo(related.location),
205
+ children: [basenameOf(path), ":", formatNumber(related.location.range.start.line + 1)]
206
+ }), " ", related.message]
207
+ }, index);
208
+ });
209
+ $[13] = diagnostic.relatedInformation;
210
+ $[14] = language;
211
+ $[15] = t8;
212
+ } else {
213
+ t8 = $[15];
214
+ }
215
+ const t9 = supported ? "language.hover.quickFix" : "language.hover.quickFixNone";
216
+ let t10;
217
+ if ($[16] !== t || $[17] !== t9) {
218
+ t10 = t(t9);
219
+ $[16] = t;
220
+ $[17] = t9;
221
+ $[18] = t10;
222
+ } else {
223
+ t10 = $[18];
224
+ }
225
+ const t11 = !supported;
226
+ let t12;
227
+ if ($[19] !== language.codeActions || $[20] !== language.hover || $[21] !== problem || $[22] !== supported) {
228
+ t12 = () => {
229
+ if (supported) {
230
+ language.hover.hide();
231
+ language.codeActions.quickFixFor(problem);
232
+ }
233
+ };
234
+ $[19] = language.codeActions;
235
+ $[20] = language.hover;
236
+ $[21] = problem;
237
+ $[22] = supported;
238
+ $[23] = t12;
239
+ } else {
240
+ t12 = $[23];
241
+ }
242
+ let t13;
243
+ if ($[24] !== t) {
244
+ t13 = t("language.hover.quickFix");
245
+ $[24] = t;
246
+ $[25] = t13;
247
+ } else {
248
+ t13 = $[25];
249
+ }
250
+ let t14;
251
+ if ($[26] !== t11 || $[27] !== t12 || $[28] !== t13) {
252
+ t14 = /*#__PURE__*/_jsx(Button, {
253
+ size: "xs",
254
+ variant: "secondary",
255
+ "aria-disabled": t11,
256
+ onClick: t12,
257
+ children: t13
258
+ });
259
+ $[26] = t11;
260
+ $[27] = t12;
261
+ $[28] = t13;
262
+ $[29] = t14;
263
+ } else {
264
+ t14 = $[29];
265
+ }
266
+ let t15;
267
+ if ($[30] !== t10 || $[31] !== t14) {
268
+ t15 = /*#__PURE__*/_jsx("div", {
269
+ className: "pt-1 pl-[22px]",
270
+ children: /*#__PURE__*/_jsx(Tooltip, {
271
+ label: t10,
272
+ children: t14
273
+ })
274
+ });
275
+ $[30] = t10;
276
+ $[31] = t14;
277
+ $[32] = t15;
278
+ } else {
279
+ t15 = $[32];
280
+ }
281
+ let t16;
282
+ if ($[33] !== t15 || $[34] !== t6 || $[35] !== t7 || $[36] !== t8) {
283
+ t16 = /*#__PURE__*/_jsxs("div", {
284
+ className: "flex flex-col gap-1.5 px-3 py-2.5",
285
+ children: [t6, t7, t8, t15]
286
+ });
287
+ $[33] = t15;
288
+ $[34] = t6;
289
+ $[35] = t7;
290
+ $[36] = t8;
291
+ $[37] = t16;
292
+ } else {
293
+ t16 = $[37];
294
+ }
295
+ return t16;
43
296
  }
44
- export function HoverCard({ language, problems, info, anchor, position, footer }) {
45
- const { t } = useTranslation('editor');
46
- return (_jsxs("div", { className: "flex w-max min-w-[280px] max-w-[min(520px,calc(100vw-16px))] flex-col divide-y divide-border", children: [info !== null && (_jsxs(_Fragment, { children: [_jsx(SymbolSections, { text: info.text, onName: (name, declared) => {
47
- language.hover.hide();
48
- void language.navigation.goToName(name, anchor, name === (declared ?? info.word) ? info.definition : null);
49
- } }), info.plain !== true && (_jsxs("div", { className: "flex flex-col gap-0.5 px-3 py-1.5 text-xs", children: [_jsxs("div", { className: "flex items-center gap-3 whitespace-nowrap", children: [info.definition !== null && (_jsx("button", { type: "button", className: "text-accent hover:underline", onClick: () => language.goTo(info.definition), children: t('language.hover.definition') })), info.references !== null && info.references > 0 && (_jsx("button", { type: "button", className: "text-accent hover:underline", onClick: () => {
50
- language.hover.hide();
51
- void language.peek.open(position);
52
- }, children: t('language.hover.references', { count: info.references, formatted: formatNumber(info.references) }) }))] }), info.definition !== null && _jsx(DefinitionPlace, { definition: info.definition, uri: language.uri, folder: language.project.folder })] }))] })), problems.map((problem, index) => (_jsx(ProblemSection, { problem: problem, language: language }, index))), footer] }));
297
+ function _temp(part) {
298
+ return part !== "";
53
299
  }
300
+ export function HoverCard(t0) {
301
+ const $ = _c(15);
302
+ const {
303
+ language,
304
+ problems,
305
+ info,
306
+ anchor,
307
+ position,
308
+ footer
309
+ } = t0;
310
+ const {
311
+ t
312
+ } = useTranslation("editor");
313
+ let t1;
314
+ if ($[0] !== anchor || $[1] !== info || $[2] !== language || $[3] !== position || $[4] !== t) {
315
+ t1 = info !== null && /*#__PURE__*/_jsxs(_Fragment, {
316
+ children: [/*#__PURE__*/_jsx(SymbolSections, {
317
+ text: info.text,
318
+ onName: (name, declared) => {
319
+ language.hover.hide();
320
+ language.navigation.goToName(name, anchor, name === (declared ?? info.word) ? info.definition : null);
321
+ }
322
+ }), info.plain !== true && /*#__PURE__*/_jsxs("div", {
323
+ className: "flex flex-col gap-0.5 px-3 py-1.5 text-xs",
324
+ children: [/*#__PURE__*/_jsxs("div", {
325
+ className: "flex items-center gap-3 whitespace-nowrap",
326
+ children: [info.definition !== null && /*#__PURE__*/_jsx("button", {
327
+ type: "button",
328
+ className: "text-accent hover:underline",
329
+ onClick: () => language.goTo(info.definition),
330
+ children: t("language.hover.definition")
331
+ }), info.references !== null && info.references > 0 && /*#__PURE__*/_jsx("button", {
332
+ type: "button",
333
+ className: "text-accent hover:underline",
334
+ onClick: () => {
335
+ language.hover.hide();
336
+ language.peek.open(position);
337
+ },
338
+ children: t("language.hover.references", {
339
+ count: info.references,
340
+ formatted: formatNumber(info.references)
341
+ })
342
+ })]
343
+ }), info.definition !== null && /*#__PURE__*/_jsx(DefinitionPlace, {
344
+ definition: info.definition,
345
+ uri: language.uri,
346
+ folder: language.project.folder
347
+ })]
348
+ })]
349
+ });
350
+ $[0] = anchor;
351
+ $[1] = info;
352
+ $[2] = language;
353
+ $[3] = position;
354
+ $[4] = t;
355
+ $[5] = t1;
356
+ } else {
357
+ t1 = $[5];
358
+ }
359
+ let t2;
360
+ if ($[6] !== language || $[7] !== problems) {
361
+ let t3;
362
+ if ($[9] !== language) {
363
+ t3 = (problem, index) => /*#__PURE__*/_jsx(ProblemSection, {
364
+ problem: problem,
365
+ language: language
366
+ }, index);
367
+ $[9] = language;
368
+ $[10] = t3;
369
+ } else {
370
+ t3 = $[10];
371
+ }
372
+ t2 = problems.map(t3);
373
+ $[6] = language;
374
+ $[7] = problems;
375
+ $[8] = t2;
376
+ } else {
377
+ t2 = $[8];
378
+ }
379
+ let t3;
380
+ if ($[11] !== footer || $[12] !== t1 || $[13] !== t2) {
381
+ t3 = /*#__PURE__*/_jsxs("div", {
382
+ className: "flex w-max min-w-[280px] max-w-[min(520px,calc(100vw-16px))] flex-col divide-y divide-border",
383
+ children: [t1, t2, footer]
384
+ });
385
+ $[11] = footer;
386
+ $[12] = t1;
387
+ $[13] = t2;
388
+ $[14] = t3;
389
+ } else {
390
+ t3 = $[14];
391
+ }
392
+ return t3;
393
+ }