@burdenoff/microfe-technospam 2026.1024.1 → 2026.1030.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.
- package/dist/node_modules/recharts/es6/cartesian/Brush.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/XAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/YAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js.map +1 -1
- package/dist/node_modules/sonner/dist/index.js.map +1 -1
- package/dist/technospam/hooks/useFocusedRecordParam.d.ts +41 -0
- package/dist/technospam/hooks/useFocusedRecordParam.d.ts.map +1 -0
- package/dist/technospam/hooks/useFocusedRecordParam.js +41 -0
- package/dist/technospam/hooks/useFocusedRecordParam.js.map +1 -0
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js +176 -161
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js +92 -88
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesMyLearningPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/CoursesMyLearningPagePage.js +89 -79
- package/dist/technospam/pages/CoursesMyLearningPagePage.js.map +1 -1
- package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js +155 -147
- package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipSessionsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/MentorshipSessionsPagePage.js +186 -167
- package/dist/technospam/pages/MentorshipSessionsPagePage.js.map +1 -1
- package/dist/technospam/utils/pageContext.d.ts +54 -5
- package/dist/technospam/utils/pageContext.d.ts.map +1 -1
- package/dist/technospam/utils/pageContext.js +99 -35
- package/dist/technospam/utils/pageContext.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,66 +1,77 @@
|
|
|
1
1
|
import { useTechnoSpam as e } from "../providers/TechnoSpamProvider.js";
|
|
2
2
|
import { useTechnoSpamAnalytics as t } from "../hooks/useTechnoSpamAnalytics.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { cn as n } from "../utils/cn.js";
|
|
4
|
+
import { PageLayout as r } from "../components/PageLayout.js";
|
|
5
|
+
import { StatCard as i } from "../components/StatCard.js";
|
|
6
|
+
import { formatDateTime as a, humanizeEnum as o } from "../utils/format.js";
|
|
7
|
+
import { StatusBadge as s } from "../components/StatusBadge.js";
|
|
8
|
+
import { EmptyView as c, ErrorView as l, LoadingRows as ee } from "../components/StateViews.js";
|
|
8
9
|
import { TagStrip as te } from "../components/TagStrip.js";
|
|
9
|
-
import { PremiumBadge as ne, UpgradeGate as
|
|
10
|
-
import { CodePanel as re, IoBlock as
|
|
10
|
+
import { PremiumBadge as ne, UpgradeGate as u } from "../components/UpgradeGate.js";
|
|
11
|
+
import { CodePanel as re, IoBlock as d, TestResultsPanel as ie } from "../components/SubmissionViews.js";
|
|
11
12
|
import "../components/index.js";
|
|
12
|
-
import { notify as
|
|
13
|
+
import { notify as f } from "../lib/toast.js";
|
|
13
14
|
import { useProblemQuery as ae, useRegradeSubmission as oe, useSubmissionsQuery as se, useSubmitSolution as ce } from "../api/technospamApi.js";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
15
|
+
import { FOCUS_PARAMS as le } from "../utils/pageContext.js";
|
|
16
|
+
import { focusableCardProps as p, useFocusedRecordParam as ue } from "../hooks/useFocusedRecordParam.js";
|
|
17
|
+
import { useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
|
|
18
|
+
import { Clock as v, Code2 as y, FileText as b, FlaskConical as de, Layers as x, RefreshCw as S, Send as fe, Trophy as C } from "lucide-react";
|
|
19
|
+
import { useSearchParams as pe } from "react-router";
|
|
20
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
21
|
+
import { Badge as me, Button as E, GlassCard as D, Select as he, SelectContent as ge, SelectItem as _e, SelectTrigger as ve, SelectValue as ye, Skeleton as O, Textarea as be } from "@burdenoff/fe-libs/ui";
|
|
19
22
|
//#region src/technospam/pages/ApplicationsProblemDetailsPagePage.tsx
|
|
20
|
-
var
|
|
23
|
+
var k = [
|
|
21
24
|
"javascript",
|
|
22
25
|
"python",
|
|
23
26
|
"typescript"
|
|
24
|
-
],
|
|
25
|
-
function
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
className: "rounded-lg border border-transparent px-2 py-3 transition-colors hover:border-border-seam hover:bg-bg-sunken",
|
|
28
|
-
|
|
27
|
+
], xe = 3e3, Se = 3 * 6e4;
|
|
28
|
+
function Ce({ s: e, focused: t, onToggle: r }) {
|
|
29
|
+
return /* @__PURE__ */ T("div", {
|
|
30
|
+
className: n("cursor-pointer rounded-lg border border-transparent px-2 py-3 transition-colors hover:border-border-seam hover:bg-bg-sunken", t && "ring-2 ring-accent-primary"),
|
|
31
|
+
...p(t, r),
|
|
32
|
+
children: [/* @__PURE__ */ T("div", {
|
|
29
33
|
className: "flex flex-wrap items-center gap-x-4 gap-y-1",
|
|
30
34
|
children: [
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
|
|
35
|
+
/* @__PURE__ */ w("button", {
|
|
36
|
+
type: "button",
|
|
37
|
+
"aria-pressed": t,
|
|
38
|
+
"aria-label": `Focus submission from ${a(e.createdAt)}`,
|
|
39
|
+
onClick: r,
|
|
40
|
+
className: "rounded-full",
|
|
41
|
+
children: /* @__PURE__ */ w(s, { status: e.verdict })
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ T("span", {
|
|
33
44
|
className: "inline-flex items-center gap-1 text-sm font-medium text-text-primary",
|
|
34
45
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ w(y, { size: 13 }),
|
|
36
47
|
" ",
|
|
37
|
-
|
|
48
|
+
o(e.language)
|
|
38
49
|
]
|
|
39
50
|
}),
|
|
40
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ T("span", {
|
|
41
52
|
className: "inline-flex items-center gap-1 text-xs text-text-muted",
|
|
42
53
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ w(v, { size: 12 }),
|
|
44
55
|
" ",
|
|
45
56
|
e.runtimeMs,
|
|
46
57
|
" ms"
|
|
47
58
|
]
|
|
48
59
|
}),
|
|
49
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ T("span", {
|
|
50
61
|
className: "inline-flex items-center gap-1 text-xs text-text-muted",
|
|
51
62
|
children: [
|
|
52
|
-
/* @__PURE__ */ C
|
|
63
|
+
/* @__PURE__ */ w(C, { size: 12 }),
|
|
53
64
|
" ",
|
|
54
65
|
e.pointsAwarded,
|
|
55
66
|
" pts"
|
|
56
67
|
]
|
|
57
68
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ w("span", {
|
|
59
70
|
className: "ml-auto text-xs text-text-muted",
|
|
60
|
-
children:
|
|
71
|
+
children: a(e.createdAt)
|
|
61
72
|
})
|
|
62
73
|
]
|
|
63
|
-
}), e.totalCount > 0 ? /* @__PURE__ */
|
|
74
|
+
}), e.totalCount > 0 ? /* @__PURE__ */ T("p", {
|
|
64
75
|
className: "mt-1 px-0.5 text-xs text-text-muted",
|
|
65
76
|
children: [
|
|
66
77
|
"Passed ",
|
|
@@ -72,78 +83,78 @@ function be({ s: e }) {
|
|
|
72
83
|
}) : null]
|
|
73
84
|
});
|
|
74
85
|
}
|
|
75
|
-
function
|
|
76
|
-
let [
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
workspaceId:
|
|
80
|
-
entityId:
|
|
86
|
+
function A() {
|
|
87
|
+
let [n] = pe(), a = n.get("id") ?? "", [p, A] = ue(le.submission), { currentUser: we, workspaceId: j } = e(), M = we?.id, { emit: N } = t(), { data: Te, loading: Ee, error: P, refetch: F } = ae(a);
|
|
88
|
+
m(() => {
|
|
89
|
+
a && N("technospam.problem.viewed", {
|
|
90
|
+
workspaceId: j,
|
|
91
|
+
entityId: a,
|
|
81
92
|
entityType: "TEC_PROBLEM"
|
|
82
93
|
});
|
|
83
94
|
}, [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
95
|
+
a,
|
|
96
|
+
j,
|
|
97
|
+
N
|
|
87
98
|
]);
|
|
88
|
-
let { data: I, loading:
|
|
89
|
-
...
|
|
90
|
-
problemId:
|
|
91
|
-
}), [
|
|
92
|
-
|
|
93
|
-
V && !q.current && (W(V.languages[0] ??
|
|
99
|
+
let { data: I, loading: De, error: L, refetch: R } = se({
|
|
100
|
+
...M ? { learnerId: M } : {},
|
|
101
|
+
problemId: a
|
|
102
|
+
}), [Oe, { loading: z }] = ce(), [ke, { loading: B }] = oe(), V = Te?.tecProblem ?? null, H = h(() => V?.languages?.length ? V.languages : k, [V]), [U, W] = _(""), [G, K] = _(""), q = g(!1);
|
|
103
|
+
m(() => {
|
|
104
|
+
V && !q.current && (W(V.languages[0] ?? k[0]), K(V.starterCode ?? ""), q.current = !0);
|
|
94
105
|
}, [V]);
|
|
95
|
-
let J =
|
|
96
|
-
if (!
|
|
106
|
+
let J = h(() => [...I?.tecListSubmissions?.items ?? []].sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime()), [I]), Ae = async () => {
|
|
107
|
+
if (!a) return;
|
|
97
108
|
if (!U) {
|
|
98
|
-
|
|
109
|
+
f.error("Pick a language", "Choose a language before submitting.");
|
|
99
110
|
return;
|
|
100
111
|
}
|
|
101
112
|
if (!G.trim()) {
|
|
102
|
-
|
|
113
|
+
f.error("Add your solution", "Write some code before submitting.");
|
|
103
114
|
return;
|
|
104
115
|
}
|
|
105
|
-
|
|
106
|
-
workspaceId:
|
|
107
|
-
entityId:
|
|
116
|
+
N("technospam.problem.submit_clicked", {
|
|
117
|
+
workspaceId: j,
|
|
118
|
+
entityId: a,
|
|
108
119
|
entityType: "TEC_PROBLEM",
|
|
109
120
|
language: U
|
|
110
121
|
});
|
|
111
|
-
let e = await
|
|
112
|
-
problemId:
|
|
122
|
+
let e = await Oe({ variables: { input: {
|
|
123
|
+
problemId: a,
|
|
113
124
|
language: U,
|
|
114
125
|
code: G
|
|
115
126
|
} } });
|
|
116
127
|
if (e.data?.tecSubmitSolution) {
|
|
117
|
-
|
|
118
|
-
workspaceId:
|
|
119
|
-
entityId:
|
|
128
|
+
N("technospam.problem.submitted", {
|
|
129
|
+
workspaceId: j,
|
|
130
|
+
entityId: a,
|
|
120
131
|
entityType: "TEC_PROBLEM",
|
|
121
132
|
submissionId: e.data.tecSubmitSolution.id
|
|
122
133
|
});
|
|
123
134
|
let t = e.data.tecSubmitSolution;
|
|
124
|
-
t.verdict === "PENDING" ?
|
|
135
|
+
t.verdict === "PENDING" ? f.info("Solution submitted", "Grading has started — your verdict will appear here in a moment.") : t.verdict === "ACCEPTED" ? f.success("Accepted", `Passed all ${t.totalCount} test cases.`) : f.error(o(t.verdict), `Passed ${t.passedCount} of ${t.totalCount} test cases.`), await Promise.all([F(), R()]);
|
|
125
136
|
}
|
|
126
|
-
},
|
|
127
|
-
let t = (await
|
|
128
|
-
t && (t.verdict === "PENDING" ?
|
|
129
|
-
}, Y = J.find((e) => (e.testResults?.length ?? 0) > 0) ?? null, X = J[0] ?? null, Z = X?.verdict === "PENDING" ? X.id : null, [Q,
|
|
130
|
-
|
|
137
|
+
}, je = async (e) => {
|
|
138
|
+
let t = (await ke({ variables: { id: e } })).data?.tecRegradeSubmission;
|
|
139
|
+
t && (t.verdict === "PENDING" ? f.error("Still pending", "The grader is not available yet. Please try again shortly.") : f.success("Grading complete", `Verdict: ${o(t.verdict)}.`), await Promise.all([F(), R()]));
|
|
140
|
+
}, Y = J.find((e) => (e.testResults?.length ?? 0) > 0) ?? null, X = J[0] ?? null, Z = X?.verdict === "PENDING" ? X.id : null, [Q, Me] = _(null), Ne = Z !== null && Q !== Z;
|
|
141
|
+
m(() => {
|
|
131
142
|
if (!Z || Q === Z) return;
|
|
132
143
|
let e = Date.now(), t = window.setInterval(() => {
|
|
133
|
-
if (Date.now() - e >
|
|
134
|
-
window.clearInterval(t),
|
|
144
|
+
if (Date.now() - e > Se) {
|
|
145
|
+
window.clearInterval(t), Me(Z);
|
|
135
146
|
return;
|
|
136
147
|
}
|
|
137
148
|
R();
|
|
138
|
-
},
|
|
149
|
+
}, xe);
|
|
139
150
|
return () => window.clearInterval(t);
|
|
140
151
|
}, [
|
|
141
152
|
Z,
|
|
142
153
|
Q,
|
|
143
154
|
R
|
|
144
155
|
]);
|
|
145
|
-
let $ =
|
|
146
|
-
return
|
|
156
|
+
let $ = g(null);
|
|
157
|
+
return m(() => {
|
|
147
158
|
if (Z) {
|
|
148
159
|
$.current = Z;
|
|
149
160
|
return;
|
|
@@ -151,159 +162,159 @@ function k() {
|
|
|
151
162
|
let e = $.current;
|
|
152
163
|
if (!e) return;
|
|
153
164
|
let t = J.find((t) => t.id === e);
|
|
154
|
-
!t || t.verdict === "PENDING" || ($.current = null, t.verdict === "ACCEPTED" ?
|
|
165
|
+
!t || t.verdict === "PENDING" || ($.current = null, t.verdict === "ACCEPTED" ? f.success("Accepted", `Passed all ${t.totalCount} test cases.`) : f.error(o(t.verdict), `Passed ${t.passedCount} of ${t.totalCount} test cases.`), F());
|
|
155
166
|
}, [
|
|
156
167
|
Z,
|
|
157
168
|
J,
|
|
158
169
|
F
|
|
159
|
-
]),
|
|
170
|
+
]), Ee && !V ? /* @__PURE__ */ T(r, {
|
|
160
171
|
title: "Problem",
|
|
161
172
|
backPath: "/applications/problems-page",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
163
|
-
}) : P || !V ? /* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ w(O, { className: "mb-4 h-28 w-full rounded-xl" }), /* @__PURE__ */ w(O, { className: "h-72 w-full rounded-xl" })]
|
|
174
|
+
}) : P || !V ? /* @__PURE__ */ w(r, {
|
|
164
175
|
title: "Problem",
|
|
165
176
|
backPath: "/applications/problems-page",
|
|
166
|
-
children: P ? /* @__PURE__ */
|
|
177
|
+
children: P ? /* @__PURE__ */ w(l, {
|
|
167
178
|
title: "Couldn't load problem",
|
|
168
179
|
error: P
|
|
169
|
-
}) : /* @__PURE__ */
|
|
180
|
+
}) : /* @__PURE__ */ w(c, {
|
|
170
181
|
title: "Problem not found",
|
|
171
182
|
description: "This problem may have been unpublished."
|
|
172
183
|
})
|
|
173
|
-
}) : /* @__PURE__ */
|
|
184
|
+
}) : /* @__PURE__ */ T(r, {
|
|
174
185
|
hero: !0,
|
|
175
186
|
backPath: "/applications/problems-page",
|
|
176
187
|
title: V.title,
|
|
177
188
|
description: V.topic ?? void 0,
|
|
178
189
|
children: [
|
|
179
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ T("div", {
|
|
180
191
|
className: "mb-5 flex flex-wrap items-center gap-2",
|
|
181
192
|
children: [
|
|
182
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ w(s, {
|
|
183
194
|
status: V.difficulty,
|
|
184
195
|
kind: "level"
|
|
185
196
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
V.topic ? /* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ w(s, { status: V.status }),
|
|
198
|
+
V.topic ? /* @__PURE__ */ T(me, {
|
|
188
199
|
variant: "outline",
|
|
189
200
|
className: "gap-1",
|
|
190
201
|
children: [
|
|
191
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ w(x, { size: 12 }),
|
|
192
203
|
" ",
|
|
193
204
|
V.topic
|
|
194
205
|
]
|
|
195
206
|
}) : null,
|
|
196
|
-
V.isPremiumOnly ? /* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
207
|
+
V.isPremiumOnly ? /* @__PURE__ */ w(ne, { locked: V.isLocked }) : null,
|
|
208
|
+
/* @__PURE__ */ w(te, { tags: V.tags })
|
|
198
209
|
]
|
|
199
210
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ T("div", {
|
|
201
212
|
className: "mb-6 grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
202
213
|
children: [
|
|
203
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ w(i, {
|
|
204
215
|
label: "Points",
|
|
205
216
|
value: V.points,
|
|
206
|
-
icon:
|
|
217
|
+
icon: C,
|
|
207
218
|
tone: "amber"
|
|
208
219
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ w(i, {
|
|
210
221
|
label: "Languages",
|
|
211
222
|
value: H.length,
|
|
212
|
-
icon:
|
|
223
|
+
icon: y,
|
|
213
224
|
tone: "blue"
|
|
214
225
|
}),
|
|
215
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ w(i, {
|
|
216
227
|
label: "Difficulty",
|
|
217
|
-
value:
|
|
218
|
-
icon:
|
|
228
|
+
value: o(V.difficulty),
|
|
229
|
+
icon: x,
|
|
219
230
|
tone: "purple"
|
|
220
231
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ w(i, {
|
|
222
233
|
label: "My submissions",
|
|
223
234
|
value: J.length,
|
|
224
|
-
icon:
|
|
235
|
+
icon: b,
|
|
225
236
|
tone: "teal"
|
|
226
237
|
})
|
|
227
238
|
]
|
|
228
239
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ T("div", {
|
|
230
241
|
className: "grid grid-cols-1 gap-5 lg:grid-cols-3",
|
|
231
|
-
children: [/* @__PURE__ */
|
|
242
|
+
children: [/* @__PURE__ */ T("div", {
|
|
232
243
|
className: "space-y-5 lg:col-span-2",
|
|
233
244
|
children: [
|
|
234
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ T(D, {
|
|
235
246
|
className: "p-5",
|
|
236
|
-
children: [/* @__PURE__ */
|
|
247
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
237
248
|
className: "mb-2 text-base font-semibold text-text-primary",
|
|
238
249
|
children: "Problem statement"
|
|
239
|
-
}), V.isLocked ? /* @__PURE__ */
|
|
250
|
+
}), V.isLocked ? /* @__PURE__ */ w(u, { description: "This problem's statement is part of a paid TechnoSpam plan. Ask a workspace admin to upgrade to unlock it." }) : V.statement ? /* @__PURE__ */ w("p", {
|
|
240
251
|
className: "whitespace-pre-wrap text-sm leading-relaxed text-text-secondary",
|
|
241
252
|
children: V.statement
|
|
242
|
-
}) : /* @__PURE__ */
|
|
253
|
+
}) : /* @__PURE__ */ w("p", {
|
|
243
254
|
className: "py-4 text-center text-sm text-text-muted",
|
|
244
255
|
children: "The statement for this problem is being prepared."
|
|
245
256
|
})]
|
|
246
257
|
}),
|
|
247
|
-
V.isLocked ? /* @__PURE__ */
|
|
258
|
+
V.isLocked ? /* @__PURE__ */ w(u, {
|
|
248
259
|
compact: !0,
|
|
249
260
|
description: "Starter code and sample test cases unlock with a paid TechnoSpam plan."
|
|
250
|
-
}) : V.starterCode ? /* @__PURE__ */
|
|
261
|
+
}) : V.starterCode ? /* @__PURE__ */ T(D, {
|
|
251
262
|
className: "p-5",
|
|
252
|
-
children: [/* @__PURE__ */
|
|
263
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
253
264
|
className: "mb-3 text-base font-semibold text-text-primary",
|
|
254
265
|
children: "Starter code"
|
|
255
|
-
}), /* @__PURE__ */
|
|
256
|
-
label:
|
|
266
|
+
}), /* @__PURE__ */ w(re, {
|
|
267
|
+
label: o(H[0] ?? "code"),
|
|
257
268
|
bodyClassName: "max-h-72",
|
|
258
269
|
children: V.starterCode
|
|
259
270
|
})]
|
|
260
271
|
}) : null,
|
|
261
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ T(D, {
|
|
262
273
|
className: "p-5",
|
|
263
274
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ T("div", {
|
|
265
276
|
className: "mb-3 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
277
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
267
278
|
className: "text-base font-semibold text-text-primary",
|
|
268
279
|
children: "Submit a solution"
|
|
269
|
-
}), /* @__PURE__ */
|
|
280
|
+
}), /* @__PURE__ */ T("div", {
|
|
270
281
|
className: "flex items-center gap-2",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ w("span", {
|
|
272
283
|
className: "text-sm text-text-secondary",
|
|
273
284
|
children: "Language"
|
|
274
|
-
}), /* @__PURE__ */
|
|
285
|
+
}), /* @__PURE__ */ T(he, {
|
|
275
286
|
value: U,
|
|
276
287
|
onValueChange: W,
|
|
277
|
-
children: [/* @__PURE__ */
|
|
288
|
+
children: [/* @__PURE__ */ w(ve, {
|
|
278
289
|
className: "w-full sm:w-48",
|
|
279
|
-
children: /* @__PURE__ */
|
|
280
|
-
}), /* @__PURE__ */
|
|
290
|
+
children: /* @__PURE__ */ w(ye, { placeholder: "Choose a language" })
|
|
291
|
+
}), /* @__PURE__ */ w(ge, { children: H.map((e) => /* @__PURE__ */ w(_e, {
|
|
281
292
|
value: e,
|
|
282
|
-
children:
|
|
293
|
+
children: o(e)
|
|
283
294
|
}, e)) })]
|
|
284
295
|
})]
|
|
285
296
|
})]
|
|
286
297
|
}),
|
|
287
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ T("div", {
|
|
288
299
|
className: "overflow-hidden rounded-xl border border-border-strong bg-bg-sunken shadow-sm",
|
|
289
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ T("div", {
|
|
290
301
|
className: "flex items-center justify-between gap-2 border-b border-border-seam bg-bg-canvas/40 px-4 py-2",
|
|
291
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ T("div", {
|
|
292
303
|
className: "flex items-center gap-1.5",
|
|
293
304
|
children: [
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
-
/* @__PURE__ */
|
|
296
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-border" }),
|
|
306
|
+
/* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-border" }),
|
|
307
|
+
/* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-border" })
|
|
297
308
|
]
|
|
298
|
-
}), /* @__PURE__ */
|
|
309
|
+
}), /* @__PURE__ */ T("span", {
|
|
299
310
|
className: "inline-flex items-center gap-1.5 font-mono text-xs text-text-muted",
|
|
300
311
|
children: [
|
|
301
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ w(y, { size: 13 }),
|
|
302
313
|
" ",
|
|
303
|
-
U ?
|
|
314
|
+
U ? o(U) : "solution"
|
|
304
315
|
]
|
|
305
316
|
})]
|
|
306
|
-
}), /* @__PURE__ */
|
|
317
|
+
}), /* @__PURE__ */ w(be, {
|
|
307
318
|
value: G,
|
|
308
319
|
onChange: (e) => K(e.target.value),
|
|
309
320
|
placeholder: "Write your solution…",
|
|
@@ -311,57 +322,57 @@ function k() {
|
|
|
311
322
|
spellCheck: !1
|
|
312
323
|
})]
|
|
313
324
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ T(E, {
|
|
315
326
|
className: "mt-4 w-full",
|
|
316
|
-
onClick:
|
|
327
|
+
onClick: Ae,
|
|
317
328
|
disabled: z || !G.trim(),
|
|
318
329
|
children: [
|
|
319
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ w(fe, { size: 16 }),
|
|
320
331
|
" ",
|
|
321
332
|
z ? "Running test cases…" : "Run & submit"
|
|
322
333
|
]
|
|
323
334
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ w("p", {
|
|
325
336
|
className: "mt-2 text-center text-xs text-text-muted",
|
|
326
337
|
children: "Your code runs against this problem's test cases in an isolated sandbox."
|
|
327
338
|
})
|
|
328
339
|
]
|
|
329
340
|
}),
|
|
330
|
-
V.publicTestCases?.length ? /* @__PURE__ */
|
|
341
|
+
V.publicTestCases?.length ? /* @__PURE__ */ T(D, {
|
|
331
342
|
className: "p-5",
|
|
332
343
|
children: [
|
|
333
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ T("h2", {
|
|
334
345
|
className: "mb-1 flex items-center gap-2 text-base font-semibold text-text-primary",
|
|
335
|
-
children: [/* @__PURE__ */
|
|
346
|
+
children: [/* @__PURE__ */ w(de, { size: 16 }), " Sample test cases"]
|
|
336
347
|
}),
|
|
337
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ w("p", {
|
|
338
349
|
className: "mb-3 text-sm text-text-secondary",
|
|
339
350
|
children: "Your solution reads each input from stdin and must print the expected output. Hidden test cases are also run when you submit."
|
|
340
351
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ w("div", {
|
|
342
353
|
className: "space-y-3",
|
|
343
|
-
children: V.publicTestCases.map((e) => /* @__PURE__ */
|
|
354
|
+
children: V.publicTestCases.map((e) => /* @__PURE__ */ T("div", {
|
|
344
355
|
className: "rounded-xl border border-border-seam p-3",
|
|
345
|
-
children: [/* @__PURE__ */
|
|
356
|
+
children: [/* @__PURE__ */ T("div", {
|
|
346
357
|
className: "mb-2 flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
347
|
-
children: [/* @__PURE__ */
|
|
358
|
+
children: [/* @__PURE__ */ w("span", {
|
|
348
359
|
className: "text-sm font-medium text-text-primary",
|
|
349
360
|
children: e.name
|
|
350
|
-
}), /* @__PURE__ */
|
|
361
|
+
}), /* @__PURE__ */ T("span", {
|
|
351
362
|
className: "inline-flex items-center gap-1 text-xs text-text-muted",
|
|
352
363
|
children: [
|
|
353
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ w(v, { size: 12 }),
|
|
354
365
|
" ",
|
|
355
366
|
e.timeLimitMs,
|
|
356
367
|
" ms limit"
|
|
357
368
|
]
|
|
358
369
|
})]
|
|
359
|
-
}), /* @__PURE__ */
|
|
370
|
+
}), /* @__PURE__ */ T("div", {
|
|
360
371
|
className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
|
|
361
|
-
children: [/* @__PURE__ */
|
|
372
|
+
children: [/* @__PURE__ */ w(d, {
|
|
362
373
|
label: "Input",
|
|
363
374
|
value: e.input
|
|
364
|
-
}), /* @__PURE__ */
|
|
375
|
+
}), /* @__PURE__ */ w(d, {
|
|
365
376
|
label: "Expected output",
|
|
366
377
|
value: e.expectedOutput
|
|
367
378
|
})]
|
|
@@ -370,62 +381,66 @@ function k() {
|
|
|
370
381
|
})
|
|
371
382
|
]
|
|
372
383
|
}) : null,
|
|
373
|
-
Z ? /* @__PURE__ */
|
|
384
|
+
Z ? /* @__PURE__ */ T(D, {
|
|
374
385
|
className: "p-5",
|
|
375
386
|
children: [
|
|
376
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ w("h2", {
|
|
377
388
|
className: "mb-2 text-base font-semibold text-text-primary",
|
|
378
389
|
children: "Latest run"
|
|
379
390
|
}),
|
|
380
|
-
|
|
391
|
+
Ne ? /* @__PURE__ */ T("p", {
|
|
381
392
|
className: "mb-3 inline-flex items-center gap-2 text-sm text-text-secondary",
|
|
382
|
-
children: [/* @__PURE__ */
|
|
393
|
+
children: [/* @__PURE__ */ w(S, {
|
|
383
394
|
size: 14,
|
|
384
395
|
className: "animate-spin"
|
|
385
396
|
}), "Grading your submission — the grader is starting up. Your verdict will appear here automatically."]
|
|
386
|
-
}) : /* @__PURE__ */
|
|
397
|
+
}) : /* @__PURE__ */ w("p", {
|
|
387
398
|
className: "mb-3 text-sm text-text-secondary",
|
|
388
399
|
children: "Your most recent submission has not been graded yet — the grader was unavailable. You can re-run it without resubmitting your code."
|
|
389
400
|
}),
|
|
390
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ T(E, {
|
|
391
402
|
variant: "outline",
|
|
392
|
-
onClick: () => void
|
|
403
|
+
onClick: () => void je(Z),
|
|
393
404
|
disabled: B,
|
|
394
405
|
children: [
|
|
395
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ w(S, { size: 16 }),
|
|
396
407
|
" ",
|
|
397
408
|
B ? "Re-running…" : "Re-run grader"
|
|
398
409
|
]
|
|
399
410
|
})
|
|
400
411
|
]
|
|
401
|
-
}) : Y ? /* @__PURE__ */
|
|
412
|
+
}) : Y ? /* @__PURE__ */ T(D, {
|
|
402
413
|
className: "p-5",
|
|
403
|
-
children: [/* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
404
415
|
className: "mb-3 text-base font-semibold text-text-primary",
|
|
405
416
|
children: "Latest run"
|
|
406
|
-
}), /* @__PURE__ */
|
|
417
|
+
}), /* @__PURE__ */ w(ie, { submission: Y })]
|
|
407
418
|
}) : null
|
|
408
419
|
]
|
|
409
|
-
}), /* @__PURE__ */
|
|
420
|
+
}), /* @__PURE__ */ w("div", {
|
|
410
421
|
className: "lg:col-span-1",
|
|
411
|
-
children: /* @__PURE__ */
|
|
422
|
+
children: /* @__PURE__ */ T(D, {
|
|
412
423
|
className: "p-5",
|
|
413
|
-
children: [/* @__PURE__ */
|
|
424
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
414
425
|
className: "mb-3 text-base font-semibold text-text-primary",
|
|
415
426
|
children: "My submissions"
|
|
416
|
-
}),
|
|
427
|
+
}), De && !J.length ? /* @__PURE__ */ w(ee, {
|
|
417
428
|
count: 3,
|
|
418
429
|
height: "h-12"
|
|
419
|
-
}) : L ? /* @__PURE__ */
|
|
430
|
+
}) : L ? /* @__PURE__ */ w(l, {
|
|
420
431
|
title: "Couldn't load submissions",
|
|
421
432
|
error: L
|
|
422
|
-
}) : J.length === 0 ? /* @__PURE__ */
|
|
423
|
-
icon: /* @__PURE__ */
|
|
433
|
+
}) : J.length === 0 ? /* @__PURE__ */ w(c, {
|
|
434
|
+
icon: /* @__PURE__ */ w(b, { size: 24 }),
|
|
424
435
|
title: "No submissions yet",
|
|
425
436
|
description: "Submit a solution above to see your verdicts and points here."
|
|
426
|
-
}) : /* @__PURE__ */
|
|
437
|
+
}) : /* @__PURE__ */ w("div", {
|
|
427
438
|
className: "space-y-1",
|
|
428
|
-
children: J.map((e) => /* @__PURE__ */
|
|
439
|
+
children: J.map((e) => /* @__PURE__ */ w(Ce, {
|
|
440
|
+
s: e,
|
|
441
|
+
focused: p === e.id,
|
|
442
|
+
onToggle: () => A(p === e.id ? null : e.id)
|
|
443
|
+
}, e.id))
|
|
429
444
|
})]
|
|
430
445
|
})
|
|
431
446
|
})]
|
|
@@ -434,6 +449,6 @@ function k() {
|
|
|
434
449
|
});
|
|
435
450
|
}
|
|
436
451
|
//#endregion
|
|
437
|
-
export {
|
|
452
|
+
export { A as ApplicationsProblemDetailsPagePage };
|
|
438
453
|
|
|
439
454
|
//# sourceMappingURL=ApplicationsProblemDetailsPagePage.js.map
|