@burdenoff/microfe-technospam 2026.801.1 → 2026.828.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 (57) hide show
  1. package/dist/technospam/TechnoSpamRoutes.d.ts.map +1 -1
  2. package/dist/technospam/TechnoSpamRoutes.js +89 -88
  3. package/dist/technospam/TechnoSpamRoutes.js.map +1 -1
  4. package/dist/technospam/api/technospamApi.d.ts +19 -0
  5. package/dist/technospam/api/technospamApi.d.ts.map +1 -1
  6. package/dist/technospam/api/technospamApi.js +171 -150
  7. package/dist/technospam/api/technospamApi.js.map +1 -1
  8. package/dist/technospam/components/SubmissionViews.d.ts +31 -0
  9. package/dist/technospam/components/SubmissionViews.d.ts.map +1 -0
  10. package/dist/technospam/components/SubmissionViews.js +149 -0
  11. package/dist/technospam/components/SubmissionViews.js.map +1 -0
  12. package/dist/technospam/components/TechnoSpamErrorBoundary.d.ts +25 -0
  13. package/dist/technospam/components/TechnoSpamErrorBoundary.d.ts.map +1 -0
  14. package/dist/technospam/components/TechnoSpamErrorBoundary.js +31 -0
  15. package/dist/technospam/components/TechnoSpamErrorBoundary.js.map +1 -0
  16. package/dist/technospam/components/index.d.ts +2 -0
  17. package/dist/technospam/components/index.d.ts.map +1 -1
  18. package/dist/technospam/components/index.js +2 -0
  19. package/dist/technospam/pages/AdminAdminDashboardPagePage.d.ts.map +1 -1
  20. package/dist/technospam/pages/AdminAdminDashboardPagePage.js +725 -500
  21. package/dist/technospam/pages/AdminAdminDashboardPagePage.js.map +1 -1
  22. package/dist/technospam/pages/AnalyticsAnalyticsPagePage.d.ts.map +1 -1
  23. package/dist/technospam/pages/AnalyticsAnalyticsPagePage.js +343 -262
  24. package/dist/technospam/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
  25. package/dist/technospam/pages/ApplicationsPortfolioPagePage.js +2 -2
  26. package/dist/technospam/pages/ApplicationsPortfolioPagePage.js.map +1 -1
  27. package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.d.ts.map +1 -1
  28. package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js +97 -235
  29. package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js.map +1 -1
  30. package/dist/technospam/pages/ApplicationsProblemsPagePage.js +1 -1
  31. package/dist/technospam/pages/ApplicationsProblemsPagePage.js.map +1 -1
  32. package/dist/technospam/pages/CoursesCourseDetailsPagePage.d.ts.map +1 -1
  33. package/dist/technospam/pages/CoursesCourseDetailsPagePage.js +293 -202
  34. package/dist/technospam/pages/CoursesCourseDetailsPagePage.js.map +1 -1
  35. package/dist/technospam/pages/CoursesCoursesPagePage.js +1 -1
  36. package/dist/technospam/pages/CoursesCoursesPagePage.js.map +1 -1
  37. package/dist/technospam/pages/CoursesMyLearningPagePage.d.ts.map +1 -1
  38. package/dist/technospam/pages/CoursesMyLearningPagePage.js +2 -2
  39. package/dist/technospam/pages/CoursesMyLearningPagePage.js.map +1 -1
  40. package/dist/technospam/pages/DashboardDashboardPagePage.js +1 -1
  41. package/dist/technospam/pages/DashboardDashboardPagePage.js.map +1 -1
  42. package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js +1 -1
  43. package/dist/technospam/pages/HackathonsHackathonDetailsPagePage.js.map +1 -1
  44. package/dist/technospam/pages/HackathonsHackathonsPagePage.js +1 -1
  45. package/dist/technospam/pages/HackathonsHackathonsPagePage.js.map +1 -1
  46. package/dist/technospam/pages/MentorshipMentorProfilePagePage.js +1 -2
  47. package/dist/technospam/pages/MentorshipMentorProfilePagePage.js.map +1 -1
  48. package/dist/technospam/pages/MentorshipMentorsPagePage.js +1 -1
  49. package/dist/technospam/pages/MentorshipMentorsPagePage.js.map +1 -1
  50. package/dist/technospam/pages/MentorshipSessionsPagePage.js +1 -1
  51. package/dist/technospam/pages/MentorshipSessionsPagePage.js.map +1 -1
  52. package/dist/technospam/pages/StudyPlannerStudyPlannerPagePage.d.ts.map +1 -1
  53. package/dist/technospam/pages/StudyPlannerStudyPlannerPagePage.js +180 -121
  54. package/dist/technospam/pages/StudyPlannerStudyPlannerPagePage.js.map +1 -1
  55. package/dist/test/setup.d.ts +2 -0
  56. package/dist/test/setup.d.ts.map +1 -0
  57. package/package.json +9 -3
@@ -2,322 +2,503 @@ import { useTechnoSpam as e } from "../providers/TechnoSpamProvider.js";
2
2
  import { cn as t } from "../utils/cn.js";
3
3
  import { PageLayout as n } from "../components/PageLayout.js";
4
4
  import { coverGradient as r, topicIcon as i } from "../components/MediaCover.js";
5
- import { formatDateTime as a, formatDuration as o, formatMoney as s, formatMoneyFromMinorUnits as c, humanizeEnum as l } from "../utils/format.js";
6
- import { StatusBadge as u } from "../components/StatusBadge.js";
7
- import { EmptyView as d, ErrorView as f, LoadingRows as p } from "../components/StateViews.js";
8
- import { TagInput as m } from "../components/TagInput.js";
5
+ import { formatDate as a, formatDateTime as o, formatDuration as s, formatMoney as c, formatMoneyFromMinorUnits as l, humanizeEnum as u } from "../utils/format.js";
6
+ import { StatusBadge as d } from "../components/StatusBadge.js";
7
+ import { EmptyView as f, ErrorView as p, LoadingRows as m } from "../components/StateViews.js";
8
+ import { TagInput as h } from "../components/TagInput.js";
9
+ import { CodePanel as g, TestResultsPanel as _ } from "../components/SubmissionViews.js";
9
10
  import "../components/index.js";
10
- import { notify as h } from "../lib/toast.js";
11
- import { useApproveMentor as g, useArchiveCourse as _, useCompleteHackathon as v, useCoursesQuery as y, useCreateCourse as b, useCreateHackathon as ee, useCreateLesson as x, useCreateProblem as S, useGradeSubmission as C, useHackathonsQuery as te, useLessonsQuery as w, useMentorsQuery as T, useOpenRegistration as E, useProblemsQuery as D, usePublishCourse as O, usePublishProblem as k, useScoreTeam as A, useStartHackathon as ne, useStartJudging as j, useSubmissionsQuery as M, useTeamsQuery as N } from "../api/technospamApi.js";
12
- import { useState as P } from "react";
13
- import { Archive as F, Award as I, BookOpen as L, Code2 as R, Gavel as re, ListChecks as z, Play as ie, Plus as B, Rocket as ae, ShieldAlert as V, Trophy as H, UserCheck as oe, Users as U, X as se } from "lucide-react";
14
- import { Fragment as W, jsx as G, jsxs as K } from "react/jsx-runtime";
15
- import { Badge as q, Button as J, GlassCard as Y, Input as X, Select as Z, SelectContent as ce, SelectItem as Q, SelectTrigger as le, SelectValue as ue, Tabs as de, TabsList as fe, TabsTrigger as pe, Textarea as me } from "@burdenoff/fe-libs/ui";
16
- import { nativeConfirm as he } from "@burdenoff/fe-libs/shared/native";
11
+ import { notify as v } from "../lib/toast.js";
12
+ import { useApproveMentor as y, useArchiveCourse as b, useCompleteHackathon as x, useCoursesQuery as S, useCreateCourse as C, useCreateHackathon as w, useCreateLesson as T, useCreateProblem as E, useGradeSubmission as D, useHackathonsQuery as ee, useLessonsQuery as O, useMentorsQuery as k, useOpenRegistration as te, useProblemsQuery as A, usePublishCourse as j, usePublishProblem as M, useRegradeSubmission as N, useScoreTeam as P, useStartHackathon as F, useStartJudging as I, useSubmissionsQuery as L, useTeamsQuery as R, useUpdateLesson as z } from "../api/technospamApi.js";
13
+ import { useState as B } from "react";
14
+ import { Archive as ne, Award as V, BookOpen as H, Code2 as U, ExternalLink as re, Gavel as ie, ListChecks as ae, Pencil as oe, Play as se, Plus as ce, RefreshCw as W, Rocket as le, ShieldAlert as ue, Trophy as de, UserCheck as fe, Users as G, X as pe } from "lucide-react";
15
+ import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
16
+ import { Badge as me, Button as Y, GlassCard as he, Input as X, Select as ge, SelectContent as _e, SelectItem as ve, SelectTrigger as ye, SelectValue as be, Tabs as xe, TabsList as Se, TabsTrigger as Ce, Textarea as Z } from "@burdenoff/fe-libs/ui";
17
+ import { nativeConfirm as we } from "@burdenoff/fe-libs/shared/native";
17
18
  //#region src/technospam/pages/AdminAdminDashboardPagePage.tsx
18
- var ge = [
19
+ var Te = [
19
20
  "ARTICLE",
20
21
  "VIDEO",
21
22
  "INTERACTIVE",
22
23
  "QUIZ",
23
24
  "PROJECT"
24
- ], _e = [
25
+ ], Ee = [
25
26
  "ACCEPTED",
26
27
  "WRONG_ANSWER",
27
28
  "TIME_LIMIT_EXCEEDED",
28
29
  "RUNTIME_ERROR",
29
30
  "COMPILE_ERROR"
30
- ], ve = [
31
+ ], De = [
31
32
  "BEGINNER",
32
33
  "INTERMEDIATE",
33
34
  "ADVANCED",
34
35
  "EXPERT"
35
- ], ye = [
36
+ ], Oe = [
36
37
  "EASY",
37
38
  "MEDIUM",
38
39
  "HARD"
39
40
  ];
40
- function be(e) {
41
+ function ke(e) {
41
42
  return e.toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
42
43
  }
43
- function xe(e) {
44
+ function Ae(e) {
44
45
  return e.split(",").map((e) => e.trim()).filter(Boolean);
45
46
  }
46
- function Se(e) {
47
+ function Q(e) {
47
48
  let t = Number.parseInt(e, 10);
48
49
  return Number.isFinite(t) ? t : void 0;
49
50
  }
50
- function Ce(e) {
51
+ function je(e) {
51
52
  if (!e) return null;
52
53
  let t = new Date(e);
53
54
  return Number.isNaN(t.getTime()) ? null : t.toISOString();
54
55
  }
55
56
  function $({ label: e, required: t, className: n, children: r }) {
56
- return /* @__PURE__ */ K("div", {
57
+ return /* @__PURE__ */ J("div", {
57
58
  className: `flex flex-col gap-1.5 ${n ?? ""}`,
58
- children: [/* @__PURE__ */ K("span", {
59
+ children: [/* @__PURE__ */ J("span", {
59
60
  className: "text-xs font-medium text-text-secondary",
60
- children: [e, t ? /* @__PURE__ */ G("span", {
61
+ children: [e, t ? /* @__PURE__ */ q("span", {
61
62
  className: "text-status-error-text",
62
63
  children: " *"
63
64
  }) : null]
64
65
  }), r]
65
66
  });
66
67
  }
67
- function we({ seed: e, icon: n }) {
68
- return /* @__PURE__ */ G("span", {
68
+ function Me({ seed: e, icon: n }) {
69
+ return /* @__PURE__ */ q("span", {
69
70
  className: t("flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br text-white shadow-sm", r(e)),
70
- children: /* @__PURE__ */ G(n, {
71
+ children: /* @__PURE__ */ q(n, {
71
72
  size: 18,
72
73
  strokeWidth: 2
73
74
  })
74
75
  });
75
76
  }
76
- function Te({ title: e, description: t, icon: n, children: r, footer: i }) {
77
- return /* @__PURE__ */ K(Y, {
77
+ function Ne({ title: e, description: t, icon: n, children: r, footer: i }) {
78
+ return /* @__PURE__ */ J(he, {
78
79
  className: "space-y-4 p-4 sm:p-5",
79
80
  children: [
80
- /* @__PURE__ */ K("div", {
81
+ /* @__PURE__ */ J("div", {
81
82
  className: "flex items-center gap-3 border-b border-border-seam pb-3",
82
- children: [/* @__PURE__ */ G("span", {
83
+ children: [/* @__PURE__ */ q("span", {
83
84
  className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-accent-primary/15 text-accent-primary ring-1 ring-accent-primary/20",
84
- children: /* @__PURE__ */ G(n, { size: 17 })
85
- }), /* @__PURE__ */ K("div", {
85
+ children: /* @__PURE__ */ q(n, { size: 17 })
86
+ }), /* @__PURE__ */ J("div", {
86
87
  className: "min-w-0",
87
- children: [/* @__PURE__ */ G("h3", {
88
+ children: [/* @__PURE__ */ q("h3", {
88
89
  className: "text-sm font-semibold text-text-primary",
89
90
  children: e
90
- }), t ? /* @__PURE__ */ G("p", {
91
+ }), t ? /* @__PURE__ */ q("p", {
91
92
  className: "text-xs text-text-muted",
92
93
  children: t
93
94
  }) : null]
94
95
  })]
95
96
  }),
96
- /* @__PURE__ */ G("div", {
97
+ /* @__PURE__ */ q("div", {
97
98
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
98
99
  children: r
99
100
  }),
100
- /* @__PURE__ */ G("div", {
101
+ /* @__PURE__ */ q("div", {
101
102
  className: "flex justify-end gap-2 border-t border-border-seam pt-3",
102
103
  children: i
103
104
  })
104
105
  ]
105
106
  });
106
107
  }
107
- function Ee({ summary: e, actionLabel: t, open: n, onToggle: r }) {
108
- return /* @__PURE__ */ K("div", {
108
+ function Pe({ summary: e, actionLabel: t, open: n, onToggle: r }) {
109
+ return /* @__PURE__ */ J("div", {
109
110
  className: "flex items-center justify-between gap-3",
110
- children: [/* @__PURE__ */ G("p", {
111
+ children: [/* @__PURE__ */ q("p", {
111
112
  className: "text-sm text-text-secondary",
112
113
  children: e
113
- }), t && r ? /* @__PURE__ */ K(J, {
114
+ }), t && r ? /* @__PURE__ */ J(Y, {
114
115
  size: "sm",
115
116
  variant: n ? "outline" : "default",
116
117
  onClick: r,
117
- children: [G(n ? se : B, { size: 15 }), n ? "Close" : t]
118
+ children: [q(n ? pe : ce, { size: 15 }), n ? "Close" : t]
118
119
  }) : null]
119
120
  });
120
121
  }
121
- function De({ leading: e, children: t, actions: n }) {
122
- return /* @__PURE__ */ K(Y, {
122
+ function Fe({ leading: e, children: t, actions: n }) {
123
+ return /* @__PURE__ */ J(he, {
123
124
  className: "flex flex-col gap-3 p-4 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md sm:flex-row sm:items-center sm:justify-between",
124
- children: [/* @__PURE__ */ K("div", {
125
+ children: [/* @__PURE__ */ J("div", {
125
126
  className: "flex min-w-0 items-center gap-3",
126
- children: [e, /* @__PURE__ */ G("div", {
127
+ children: [e, /* @__PURE__ */ q("div", {
127
128
  className: "min-w-0",
128
129
  children: t
129
130
  })]
130
- }), n ? /* @__PURE__ */ G("div", {
131
+ }), n ? /* @__PURE__ */ q("div", {
131
132
  className: "flex shrink-0 flex-wrap items-center gap-2",
132
133
  children: n
133
134
  }) : null]
134
135
  });
135
136
  }
136
- function Oe({ courseId: e }) {
137
- let { data: t, loading: n, refetch: r } = w(e), [i, { loading: a }] = x(), [s, c] = P(""), [u, d] = P("ARTICLE"), [f, m] = P(""), [g, _] = P(""), [v, y] = P(!1), b = [...t?.tecListLessons.items ?? []].sort((e, t) => e.position - t.position);
138
- return /* @__PURE__ */ K("div", {
137
+ function Ie({ lesson: e, onSaved: t, onCancel: n }) {
138
+ let [r, { loading: i }] = z(), [a, o] = B(e.title), [s, c] = B(e.kind), [l, d] = B(e.content ?? ""), [f, p] = B(String(e.estimatedMinutes ?? ""));
139
+ return /* @__PURE__ */ J("div", {
140
+ className: "mt-2 space-y-2 rounded-lg border border-border-seam bg-bg-surface p-3",
141
+ children: [
142
+ /* @__PURE__ */ J("div", {
143
+ className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
144
+ children: [/* @__PURE__ */ q(X, {
145
+ value: a,
146
+ onChange: (e) => o(e.target.value),
147
+ placeholder: "Lesson title"
148
+ }), /* @__PURE__ */ J(ge, {
149
+ value: s,
150
+ onValueChange: (e) => c(e),
151
+ children: [/* @__PURE__ */ q(ye, { children: /* @__PURE__ */ q(be, {}) }), /* @__PURE__ */ q(_e, { children: Te.map((e) => /* @__PURE__ */ q(ve, {
152
+ value: e,
153
+ children: u(e)
154
+ }, e)) })]
155
+ })]
156
+ }),
157
+ /* @__PURE__ */ q(Z, {
158
+ placeholder: "Lesson content (markdown / notes)",
159
+ value: l,
160
+ onChange: (e) => d(e.target.value)
161
+ }),
162
+ /* @__PURE__ */ J("div", {
163
+ className: "flex flex-wrap items-center gap-2",
164
+ children: [/* @__PURE__ */ q(X, {
165
+ type: "number",
166
+ min: 0,
167
+ className: "w-28",
168
+ placeholder: "Minutes",
169
+ value: f,
170
+ onChange: (e) => p(e.target.value)
171
+ }), /* @__PURE__ */ J("div", {
172
+ className: "ml-auto flex gap-2",
173
+ children: [/* @__PURE__ */ q(Y, {
174
+ size: "sm",
175
+ variant: "outline",
176
+ onClick: n,
177
+ children: "Cancel"
178
+ }), /* @__PURE__ */ q(Y, {
179
+ size: "sm",
180
+ onClick: async () => {
181
+ let i = a.trim();
182
+ if (!i) return v.error("Lesson title is required");
183
+ (await r({ variables: {
184
+ id: e.id,
185
+ input: {
186
+ title: i,
187
+ kind: s,
188
+ content: l.trim() || null,
189
+ estimatedMinutes: Q(f)
190
+ }
191
+ } })).data?.tecUpdateLesson && (v.success("Lesson updated", i), await t(), n());
192
+ },
193
+ disabled: i,
194
+ children: i ? "Saving…" : "Save lesson"
195
+ })]
196
+ })]
197
+ })
198
+ ]
199
+ });
200
+ }
201
+ function Le({ courseId: e }) {
202
+ let { data: t, loading: n, refetch: r } = O(e), [i, { loading: a }] = T(), [o] = z(), [c, l] = B(null), [d, f] = B(null), [p, h] = B(""), [g, _] = B("ARTICLE"), [y, b] = B(""), [x, S] = B(""), [C, w] = B(!1), E = [...t?.tecListLessons?.items ?? []].sort((e, t) => e.position - t.position), D = async (e) => {
203
+ f(e.id);
204
+ try {
205
+ let t = await o({ variables: {
206
+ id: e.id,
207
+ input: { isPreview: !e.isPreview }
208
+ } });
209
+ t.data?.tecUpdateLesson && (v.success(t.data.tecUpdateLesson.isPreview ? "Free preview enabled" : "Free preview removed", e.title), await r());
210
+ } finally {
211
+ f(null);
212
+ }
213
+ };
214
+ return /* @__PURE__ */ J("div", {
139
215
  className: "mt-3 rounded-xl border border-border-seam bg-bg-sunken p-4",
140
216
  children: [
141
- /* @__PURE__ */ K("div", {
217
+ /* @__PURE__ */ J("div", {
142
218
  className: "mb-3 flex items-center gap-2",
143
- children: [/* @__PURE__ */ G("span", {
219
+ children: [/* @__PURE__ */ q("span", {
144
220
  className: "flex h-7 w-7 items-center justify-center rounded-lg bg-accent-primary/15 text-accent-primary ring-1 ring-accent-primary/20",
145
- children: /* @__PURE__ */ G(z, { size: 15 })
146
- }), /* @__PURE__ */ K("span", {
221
+ children: /* @__PURE__ */ q(ae, { size: 15 })
222
+ }), /* @__PURE__ */ J("span", {
147
223
  className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
148
224
  children: [
149
225
  "Curriculum (",
150
- b.length,
226
+ E.length,
151
227
  ")"
152
228
  ]
153
229
  })]
154
230
  }),
155
- n && b.length === 0 ? /* @__PURE__ */ G(p, {
231
+ n && E.length === 0 ? /* @__PURE__ */ q(m, {
156
232
  count: 2,
157
233
  height: "h-10"
158
- }) : b.length === 0 ? /* @__PURE__ */ G("p", {
234
+ }) : E.length === 0 ? /* @__PURE__ */ q("p", {
159
235
  className: "mb-3 text-xs text-text-muted",
160
236
  children: "No lessons yet — add the first below."
161
- }) : /* @__PURE__ */ G("ol", {
237
+ }) : /* @__PURE__ */ q("ol", {
162
238
  className: "mb-3 space-y-1.5",
163
- children: b.map((e, t) => /* @__PURE__ */ K("li", {
164
- className: "flex items-center gap-2 rounded-lg bg-bg-surface px-3 py-2 text-sm text-text-primary",
239
+ children: E.map((e, t) => /* @__PURE__ */ J("li", { children: [/* @__PURE__ */ J("div", {
240
+ className: "flex flex-wrap items-center gap-2 rounded-lg bg-bg-surface px-3 py-2 text-sm text-text-primary",
165
241
  children: [
166
- /* @__PURE__ */ G("span", {
242
+ /* @__PURE__ */ q("span", {
167
243
  className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-md bg-accent-primary/10 text-[11px] font-semibold text-accent-primary",
168
244
  children: t + 1
169
245
  }),
170
- /* @__PURE__ */ G("span", {
171
- className: "truncate",
246
+ /* @__PURE__ */ q("span", {
247
+ className: "min-w-0 flex-1 truncate",
172
248
  children: e.title
173
249
  }),
174
- /* @__PURE__ */ G(q, {
250
+ /* @__PURE__ */ q(me, {
175
251
  variant: "secondary",
176
252
  className: "text-[11px]",
177
- children: l(e.kind)
253
+ children: u(e.kind)
178
254
  }),
179
- e.isPreview ? /* @__PURE__ */ G(q, {
180
- variant: "outline",
181
- className: "text-[11px]",
182
- children: "Preview"
183
- }) : null,
184
- /* @__PURE__ */ G("span", {
185
- className: "ml-auto text-xs text-text-muted",
186
- children: o(e.estimatedMinutes)
255
+ /* @__PURE__ */ q("span", {
256
+ className: "text-xs text-text-muted",
257
+ children: s(e.estimatedMinutes)
258
+ }),
259
+ /* @__PURE__ */ J("label", {
260
+ className: "flex items-center gap-1.5 text-xs text-text-secondary",
261
+ children: [/* @__PURE__ */ q("input", {
262
+ type: "checkbox",
263
+ checked: e.isPreview,
264
+ disabled: d === e.id,
265
+ onChange: () => void D(e)
266
+ }), "Free preview"]
267
+ }),
268
+ /* @__PURE__ */ J(Y, {
269
+ size: "sm",
270
+ variant: "ghost",
271
+ onClick: () => l(c === e.id ? null : e.id),
272
+ children: [
273
+ /* @__PURE__ */ q(oe, { size: 13 }),
274
+ " ",
275
+ c === e.id ? "Close" : "Edit"
276
+ ]
187
277
  })
188
278
  ]
189
- }, e.id))
279
+ }), c === e.id ? /* @__PURE__ */ q(Ie, {
280
+ lesson: e,
281
+ onSaved: async () => {
282
+ await r();
283
+ },
284
+ onCancel: () => l(null)
285
+ }) : null] }, e.id))
190
286
  }),
191
- /* @__PURE__ */ K("div", {
287
+ /* @__PURE__ */ J("div", {
192
288
  className: "grid grid-cols-1 gap-2 sm:grid-cols-2",
193
- children: [/* @__PURE__ */ G(X, {
289
+ children: [/* @__PURE__ */ q(X, {
194
290
  placeholder: "Lesson title",
195
- value: s,
196
- onChange: (e) => c(e.target.value)
197
- }), /* @__PURE__ */ K(Z, {
198
- value: u,
199
- onValueChange: (e) => d(e),
200
- children: [/* @__PURE__ */ G(le, { children: /* @__PURE__ */ G(ue, {}) }), /* @__PURE__ */ G(ce, { children: ge.map((e) => /* @__PURE__ */ G(Q, {
291
+ value: p,
292
+ onChange: (e) => h(e.target.value)
293
+ }), /* @__PURE__ */ J(ge, {
294
+ value: g,
295
+ onValueChange: (e) => _(e),
296
+ children: [/* @__PURE__ */ q(ye, { children: /* @__PURE__ */ q(be, {}) }), /* @__PURE__ */ q(_e, { children: Te.map((e) => /* @__PURE__ */ q(ve, {
201
297
  value: e,
202
- children: l(e)
298
+ children: u(e)
203
299
  }, e)) })]
204
300
  })]
205
301
  }),
206
- /* @__PURE__ */ G(me, {
302
+ /* @__PURE__ */ q(Z, {
207
303
  className: "mt-2",
208
304
  placeholder: "Lesson content (markdown / notes)",
209
- value: f,
210
- onChange: (e) => m(e.target.value)
305
+ value: y,
306
+ onChange: (e) => b(e.target.value)
211
307
  }),
212
- /* @__PURE__ */ K("div", {
308
+ /* @__PURE__ */ J("div", {
213
309
  className: "mt-2 flex flex-wrap items-center gap-3",
214
310
  children: [
215
- /* @__PURE__ */ G(X, {
311
+ /* @__PURE__ */ q(X, {
216
312
  type: "number",
217
313
  className: "w-28",
218
314
  placeholder: "Minutes",
219
- value: g,
220
- onChange: (e) => _(e.target.value)
315
+ value: x,
316
+ onChange: (e) => S(e.target.value)
221
317
  }),
222
- /* @__PURE__ */ K("label", {
318
+ /* @__PURE__ */ J("label", {
223
319
  className: "flex items-center gap-2 text-xs text-text-secondary",
224
- children: [/* @__PURE__ */ G("input", {
320
+ children: [/* @__PURE__ */ q("input", {
225
321
  type: "checkbox",
226
- checked: v,
227
- onChange: (e) => y(e.target.checked)
322
+ checked: C,
323
+ onChange: (e) => w(e.target.checked)
228
324
  }), "Free preview"]
229
325
  }),
230
- /* @__PURE__ */ K(J, {
326
+ /* @__PURE__ */ J(Y, {
231
327
  size: "sm",
232
328
  onClick: async () => {
233
- let t = s.trim();
234
- if (!t) return h.error("Lesson title is required");
329
+ let t = p.trim();
330
+ if (!t) return v.error("Lesson title is required");
235
331
  (await i({ variables: { input: {
236
332
  courseId: e,
237
333
  title: t,
238
- kind: u,
239
- content: f.trim() || void 0,
240
- position: b.length + 1,
241
- estimatedMinutes: Se(g),
242
- isPreview: v
243
- } } })).data?.tecCreateLesson && (h.success("Lesson added", t), c(""), m(""), _(""), y(!1), await r());
334
+ kind: g,
335
+ content: y.trim() || void 0,
336
+ position: E.length + 1,
337
+ estimatedMinutes: Q(x),
338
+ isPreview: C
339
+ } } })).data?.tecCreateLesson && (v.success("Lesson added", t), h(""), b(""), S(""), w(!1), await r());
244
340
  },
245
341
  disabled: a,
246
342
  className: "ml-auto",
247
- children: [/* @__PURE__ */ G(B, { size: 14 }), " Add lesson"]
343
+ children: [/* @__PURE__ */ q(ce, { size: 14 }), " Add lesson"]
344
+ })
345
+ ]
346
+ })
347
+ ]
348
+ });
349
+ }
350
+ function Re({ submission: e, busy: t, onGrade: n, onRegrade: r }) {
351
+ let [i, a] = B(!1), s = e.verdict !== "PENDING";
352
+ return /* @__PURE__ */ J("div", {
353
+ className: "space-y-3 rounded-lg bg-bg-surface px-3 py-3 text-sm",
354
+ children: [
355
+ /* @__PURE__ */ J("div", {
356
+ className: "flex flex-wrap items-center gap-x-3 gap-y-1",
357
+ children: [
358
+ /* @__PURE__ */ q(d, { status: e.verdict }),
359
+ /* @__PURE__ */ J("span", {
360
+ className: "inline-flex items-center gap-1 text-xs text-text-muted",
361
+ children: [
362
+ /* @__PURE__ */ q(U, { size: 12 }),
363
+ " ",
364
+ u(e.language)
365
+ ]
366
+ }),
367
+ e.totalCount > 0 ? /* @__PURE__ */ J("span", {
368
+ className: "text-xs text-text-muted",
369
+ children: [
370
+ e.passedCount,
371
+ " / ",
372
+ e.totalCount,
373
+ " test cases passed"
374
+ ]
375
+ }) : /* @__PURE__ */ q("span", {
376
+ className: "text-xs text-text-muted",
377
+ children: "No test cases run"
378
+ }),
379
+ /* @__PURE__ */ J("span", {
380
+ className: "text-xs text-text-muted",
381
+ children: [e.runtimeMs, " ms"]
382
+ }),
383
+ s ? /* @__PURE__ */ J("span", {
384
+ className: "text-xs text-text-muted",
385
+ children: [e.pointsAwarded, " pts"]
386
+ }) : null,
387
+ /* @__PURE__ */ q("span", {
388
+ className: "ml-auto text-xs text-text-muted",
389
+ children: o(e.judgedAt ?? e.createdAt)
248
390
  })
249
391
  ]
392
+ }),
393
+ /* @__PURE__ */ J("div", {
394
+ className: "flex flex-wrap items-center gap-2",
395
+ children: [
396
+ /* @__PURE__ */ J(Y, {
397
+ size: "sm",
398
+ variant: "outline",
399
+ onClick: () => a((e) => !e),
400
+ children: [
401
+ /* @__PURE__ */ q(U, { size: 13 }),
402
+ " ",
403
+ i ? "Hide code" : "View code"
404
+ ]
405
+ }),
406
+ e.verdict === "PENDING" ? /* @__PURE__ */ J(Y, {
407
+ size: "sm",
408
+ variant: "outline",
409
+ onClick: r,
410
+ disabled: t,
411
+ children: [/* @__PURE__ */ q(W, { size: 13 }), " Re-run grader"]
412
+ }) : null,
413
+ /* @__PURE__ */ q("div", {
414
+ className: "ml-auto flex flex-wrap gap-1",
415
+ children: Ee.map((r) => /* @__PURE__ */ q(Y, {
416
+ size: "sm",
417
+ variant: r === "ACCEPTED" ? "default" : "outline",
418
+ onClick: () => n(r),
419
+ disabled: t || e.verdict === r,
420
+ children: r === "ACCEPTED" ? "Accept" : u(r)
421
+ }, r))
422
+ })
423
+ ]
424
+ }),
425
+ i ? /* @__PURE__ */ q(g, {
426
+ label: u(e.language),
427
+ bodyClassName: "max-h-72",
428
+ children: e.code
429
+ }) : null,
430
+ /* @__PURE__ */ q(_, {
431
+ submission: e,
432
+ actualOutputLabel: "Actual output"
250
433
  })
251
434
  ]
252
435
  });
253
436
  }
254
- function ke({ problemId: e }) {
255
- let { data: t, loading: n, refetch: r } = M({ problemId: e }), [i] = C(), [o, s] = P(null), c = t?.tecListSubmissions.items ?? [], d = async (e, t) => {
437
+ function ze({ problemId: e }) {
438
+ let { data: t, loading: n, refetch: r } = L({ problemId: e }), [i] = D(), [a] = N(), [o, s] = B(null), [c, l] = B(!1), d = t?.tecListSubmissions?.items ?? [], f = c ? d.filter((e) => e.verdict === "PENDING") : d, p = d.filter((e) => e.verdict === "PENDING").length, h = async (e, t) => {
256
439
  s(e);
257
440
  try {
258
441
  (await i({ variables: {
259
442
  id: e,
260
443
  verdict: t
261
- } })).data?.tecGradeSubmission && (h.success("Submission graded", l(t)), await r());
444
+ } })).data?.tecGradeSubmission && (v.success("Submission graded", u(t)), await r());
445
+ } finally {
446
+ s(null);
447
+ }
448
+ }, g = async (e) => {
449
+ s(e);
450
+ try {
451
+ let t = await a({ variables: { id: e } });
452
+ t.data?.tecRegradeSubmission && (v.success("Grader re-run", u(t.data.tecRegradeSubmission.verdict)), await r());
262
453
  } finally {
263
454
  s(null);
264
455
  }
265
456
  };
266
- return /* @__PURE__ */ K("div", {
457
+ return /* @__PURE__ */ J("div", {
267
458
  className: "mt-3 rounded-xl border border-border-seam bg-bg-sunken p-4",
268
- children: [/* @__PURE__ */ K("div", {
269
- className: "mb-3 flex items-center gap-2",
270
- children: [/* @__PURE__ */ G("span", {
271
- className: "flex h-7 w-7 items-center justify-center rounded-lg bg-accent-purple/15 text-accent-purple ring-1 ring-accent-purple/20",
272
- children: /* @__PURE__ */ G(re, { size: 15 })
273
- }), /* @__PURE__ */ K("span", {
274
- className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
275
- children: [
276
- "Submissions (",
277
- c.length,
278
- ")"
279
- ]
280
- })]
281
- }), n && c.length === 0 ? /* @__PURE__ */ G(p, {
459
+ children: [/* @__PURE__ */ J("div", {
460
+ className: "mb-3 flex flex-wrap items-center gap-2",
461
+ children: [
462
+ /* @__PURE__ */ q("span", {
463
+ className: "flex h-7 w-7 items-center justify-center rounded-lg bg-accent-purple/15 text-accent-purple ring-1 ring-accent-purple/20",
464
+ children: /* @__PURE__ */ q(ie, { size: 15 })
465
+ }),
466
+ /* @__PURE__ */ J("span", {
467
+ className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
468
+ children: [
469
+ "Submissions (",
470
+ d.length,
471
+ ")",
472
+ p ? ` · ${p} pending` : ""
473
+ ]
474
+ }),
475
+ p ? /* @__PURE__ */ q(Y, {
476
+ size: "sm",
477
+ variant: c ? "default" : "outline",
478
+ className: "ml-auto",
479
+ onClick: () => l((e) => !e),
480
+ children: c ? "Showing pending" : "Pending only"
481
+ }) : null
482
+ ]
483
+ }), n && d.length === 0 ? /* @__PURE__ */ q(m, {
282
484
  count: 2,
283
485
  height: "h-10"
284
- }) : c.length === 0 ? /* @__PURE__ */ G("p", {
486
+ }) : f.length === 0 ? /* @__PURE__ */ q("p", {
285
487
  className: "text-xs text-text-muted",
286
- children: "No submissions yet."
287
- }) : /* @__PURE__ */ G("div", {
488
+ children: c ? "Nothing is waiting on a verdict." : "No submissions yet."
489
+ }) : /* @__PURE__ */ q("div", {
288
490
  className: "space-y-2",
289
- children: c.map((e) => /* @__PURE__ */ K("div", {
290
- className: "flex flex-wrap items-center gap-2 rounded-lg bg-bg-surface px-3 py-2 text-sm",
291
- children: [
292
- /* @__PURE__ */ G(u, { status: e.verdict }),
293
- /* @__PURE__ */ G("span", {
294
- className: "text-xs text-text-muted",
295
- children: e.language
296
- }),
297
- /* @__PURE__ */ G("span", {
298
- className: "text-xs text-text-muted",
299
- children: a(e.createdAt)
300
- }),
301
- e.verdict === "PENDING" ? /* @__PURE__ */ G("div", {
302
- className: "ml-auto flex flex-wrap gap-1",
303
- children: _e.map((t) => /* @__PURE__ */ G(J, {
304
- size: "sm",
305
- variant: t === "ACCEPTED" ? "default" : "outline",
306
- onClick: () => d(e.id, t),
307
- disabled: o === e.id,
308
- children: t === "ACCEPTED" ? "Accept" : l(t)
309
- }, t))
310
- }) : /* @__PURE__ */ K("span", {
311
- className: "ml-auto text-xs text-text-muted",
312
- children: [e.pointsAwarded, " pts"]
313
- })
314
- ]
491
+ children: f.map((e) => /* @__PURE__ */ q(Re, {
492
+ submission: e,
493
+ busy: o === e.id,
494
+ onGrade: (t) => void h(e.id, t),
495
+ onRegrade: () => void g(e.id)
315
496
  }, e.id))
316
497
  })]
317
498
  });
318
499
  }
319
- function Ae({ hackathon: e }) {
320
- let { data: t, loading: n, refetch: r } = N(e.id), [i] = A(), [a, o] = P(null), [s, c] = P({}), l = t?.tecListTeams.items ?? [], d = async (e, t) => {
500
+ function Be({ hackathon: e }) {
501
+ let { data: t, loading: n, refetch: r } = R(e.id), [i] = P(), [a, o] = B(null), [s, c] = B({}), l = t?.tecListTeams?.items ?? [], u = async (e, t) => {
321
502
  let n = Math.max(0, Number(s[e] ?? "0") || 0);
322
503
  o(e);
323
504
  try {
@@ -325,19 +506,19 @@ function Ae({ hackathon: e }) {
325
506
  id: e,
326
507
  score: n,
327
508
  winner: t
328
- } })).data?.tecScoreTeam && (h.success("Team scored", `${n} pts${t ? " · winner" : ""}`), await r());
509
+ } })).data?.tecScoreTeam && (v.success("Team scored", `${n} pts${t ? " · winner" : ""}`), await r());
329
510
  } finally {
330
511
  o(null);
331
512
  }
332
513
  };
333
- return /* @__PURE__ */ K("div", {
514
+ return /* @__PURE__ */ J("div", {
334
515
  className: "mt-3 rounded-xl border border-border-seam bg-bg-sunken p-4",
335
- children: [/* @__PURE__ */ K("div", {
516
+ children: [/* @__PURE__ */ J("div", {
336
517
  className: "mb-3 flex items-center gap-2",
337
- children: [/* @__PURE__ */ G("span", {
518
+ children: [/* @__PURE__ */ q("span", {
338
519
  className: "flex h-7 w-7 items-center justify-center rounded-lg bg-accent-teal/15 text-accent-teal ring-1 ring-accent-teal/20",
339
- children: /* @__PURE__ */ G(U, { size: 15 })
340
- }), /* @__PURE__ */ K("span", {
520
+ children: /* @__PURE__ */ q(G, { size: 15 })
521
+ }), /* @__PURE__ */ J("span", {
341
522
  className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
342
523
  children: [
343
524
  "Teams (",
@@ -345,374 +526,417 @@ function Ae({ hackathon: e }) {
345
526
  ")"
346
527
  ]
347
528
  })]
348
- }), n && l.length === 0 ? /* @__PURE__ */ G(p, {
529
+ }), n && l.length === 0 ? /* @__PURE__ */ q(m, {
349
530
  count: 2,
350
531
  height: "h-10"
351
- }) : l.length === 0 ? /* @__PURE__ */ G("p", {
532
+ }) : l.length === 0 ? /* @__PURE__ */ q("p", {
352
533
  className: "text-xs text-text-muted",
353
534
  children: "No teams registered yet."
354
- }) : /* @__PURE__ */ G("div", {
535
+ }) : /* @__PURE__ */ q("div", {
355
536
  className: "space-y-2",
356
- children: l.map((t) => /* @__PURE__ */ K("div", {
357
- className: "flex flex-wrap items-center gap-2 rounded-lg bg-bg-surface px-3 py-2 text-sm",
358
- children: [
359
- /* @__PURE__ */ G("span", {
360
- className: "truncate font-medium text-text-primary",
361
- children: t.name
362
- }),
363
- /* @__PURE__ */ G(u, { status: t.status }),
364
- t.projectName ? /* @__PURE__ */ G("span", {
365
- className: "text-xs text-text-muted",
366
- children: t.projectName
367
- }) : null,
368
- e.status === "JUDGING" ? /* @__PURE__ */ K("div", {
369
- className: "ml-auto flex items-center gap-1",
370
- children: [
371
- /* @__PURE__ */ G(X, {
372
- type: "number",
373
- className: "w-20",
374
- placeholder: "Score",
375
- value: s[t.id] ?? "",
376
- onChange: (e) => c((n) => ({
377
- ...n,
378
- [t.id]: e.target.value
379
- }))
380
- }),
381
- /* @__PURE__ */ G(J, {
382
- size: "sm",
383
- onClick: () => d(t.id, !1),
384
- disabled: a === t.id,
385
- children: "Score"
386
- }),
387
- /* @__PURE__ */ K(J, {
388
- size: "sm",
389
- variant: "outline",
390
- onClick: () => d(t.id, !0),
391
- disabled: a === t.id,
392
- children: [/* @__PURE__ */ G(H, { size: 14 }), " Winner"]
393
- })
394
- ]
395
- }) : /* @__PURE__ */ K("span", {
396
- className: "ml-auto text-xs text-text-muted",
397
- children: [t.score, " pts"]
398
- })
399
- ]
537
+ children: l.map((t) => /* @__PURE__ */ J("div", {
538
+ className: "space-y-2 rounded-lg bg-bg-surface px-3 py-2.5 text-sm",
539
+ children: [/* @__PURE__ */ J("div", {
540
+ className: "flex flex-wrap items-center gap-2",
541
+ children: [
542
+ /* @__PURE__ */ q("span", {
543
+ className: "truncate font-medium text-text-primary",
544
+ children: t.name
545
+ }),
546
+ /* @__PURE__ */ q(d, { status: t.status }),
547
+ /* @__PURE__ */ J("span", {
548
+ className: "inline-flex items-center gap-1 text-xs text-text-muted",
549
+ children: [
550
+ /* @__PURE__ */ q(G, { size: 12 }),
551
+ " ",
552
+ t.memberIds.length,
553
+ " member",
554
+ t.memberIds.length === 1 ? "" : "s"
555
+ ]
556
+ }),
557
+ e.status === "JUDGING" ? /* @__PURE__ */ J("div", {
558
+ className: "ml-auto flex items-center gap-1",
559
+ children: [
560
+ /* @__PURE__ */ q(X, {
561
+ type: "number",
562
+ min: 0,
563
+ className: "w-20",
564
+ placeholder: "Score",
565
+ value: s[t.id] ?? "",
566
+ onChange: (e) => c((n) => ({
567
+ ...n,
568
+ [t.id]: e.target.value
569
+ }))
570
+ }),
571
+ /* @__PURE__ */ q(Y, {
572
+ size: "sm",
573
+ onClick: () => u(t.id, !1),
574
+ disabled: a === t.id,
575
+ children: "Score"
576
+ }),
577
+ /* @__PURE__ */ J(Y, {
578
+ size: "sm",
579
+ variant: "outline",
580
+ onClick: () => u(t.id, !0),
581
+ disabled: a === t.id,
582
+ children: [/* @__PURE__ */ q(de, { size: 14 }), " Winner"]
583
+ })
584
+ ]
585
+ }) : /* @__PURE__ */ J("span", {
586
+ className: "ml-auto text-xs text-text-muted",
587
+ children: [t.score, " pts"]
588
+ })
589
+ ]
590
+ }), t.projectName || t.pitch || t.projectUrl || t.repoUrl ? /* @__PURE__ */ J("div", {
591
+ className: "space-y-1 border-t border-border-seam pt-2",
592
+ children: [
593
+ t.projectName ? /* @__PURE__ */ q("div", {
594
+ className: "truncate text-xs font-medium text-text-secondary",
595
+ children: t.projectName
596
+ }) : null,
597
+ t.pitch ? /* @__PURE__ */ q("p", {
598
+ className: "line-clamp-2 text-xs text-text-muted",
599
+ children: t.pitch
600
+ }) : null,
601
+ /* @__PURE__ */ J("div", {
602
+ className: "flex flex-wrap gap-3",
603
+ children: [t.projectUrl ? /* @__PURE__ */ J("a", {
604
+ href: t.projectUrl,
605
+ target: "_blank",
606
+ rel: "noreferrer noopener",
607
+ className: "inline-flex items-center gap-1 text-xs font-medium text-accent-primary hover:underline",
608
+ children: [/* @__PURE__ */ q(re, { size: 12 }), " Project"]
609
+ }) : null, t.repoUrl ? /* @__PURE__ */ J("a", {
610
+ href: t.repoUrl,
611
+ target: "_blank",
612
+ rel: "noreferrer noopener",
613
+ className: "inline-flex items-center gap-1 text-xs font-medium text-accent-primary hover:underline",
614
+ children: [/* @__PURE__ */ q(U, { size: 12 }), " Repository"]
615
+ }) : null]
616
+ })
617
+ ]
618
+ }) : /* @__PURE__ */ q("p", {
619
+ className: "border-t border-border-seam pt-2 text-xs text-text-muted",
620
+ children: "Nothing submitted yet."
621
+ })]
400
622
  }, t.id))
401
623
  })]
402
624
  });
403
625
  }
404
- function je() {
405
- let { data: e, loading: t, error: n, refetch: r } = y({}), [a, { loading: s }] = b(), [c] = O(), [g] = _(), [v, ee] = P(!1), [x, S] = P(null), [C, te] = P(null), [w, T] = P(""), [E, D] = P(""), [k, A] = P(""), [ne, j] = P(""), [M, N] = P("BEGINNER"), [I, R] = P(""), [re, ie] = P([]), B = e?.tecListCourses.items ?? [], V = () => {
406
- T(""), D(""), A(""), j(""), N("BEGINNER"), R(""), ie([]), ee(!1);
407
- }, H = async () => {
408
- let e = w.trim();
409
- if (!e) return h.error("Title is required");
410
- let t = be(E || e);
411
- if (!t) return h.error("A valid slug is required");
412
- (await a({ variables: { input: {
626
+ function Ve() {
627
+ let { data: e, loading: t, error: n, refetch: r } = S({}), [o, { loading: c }] = C(), [l] = j(), [g] = b(), [_, y] = B(!1), [x, w] = B(null), [T, E] = B(null), [D, ee] = B(""), [O, k] = B(""), [te, A] = B(""), [M, N] = B(""), [P, F] = B("BEGINNER"), [I, L] = B(""), [R, z] = B([]), V = e?.tecListCourses?.items ?? [], U = () => {
628
+ ee(""), k(""), A(""), N(""), F("BEGINNER"), L(""), z([]), y(!1);
629
+ }, re = async () => {
630
+ let e = D.trim();
631
+ if (!e) return v.error("Title is required");
632
+ let t = ke(O || e);
633
+ if (!t) return v.error("A valid slug is required");
634
+ (await o({ variables: { input: {
413
635
  title: e,
414
636
  slug: t,
415
- summary: k.trim() || void 0,
416
- topic: ne.trim() || void 0,
417
- level: M,
418
- estimatedMinutes: Se(I),
419
- tags: re
420
- } } })).data?.tecCreateCourse && (h.success("Course created", `"${e}" saved as a draft.`), V(), await r());
421
- }, oe = async (e) => {
422
- S(e);
637
+ summary: te.trim() || void 0,
638
+ topic: M.trim() || void 0,
639
+ level: P,
640
+ estimatedMinutes: Q(I),
641
+ tags: R
642
+ } } })).data?.tecCreateCourse && (v.success("Course created", `"${e}" saved as a draft.`), U(), await r());
643
+ }, ie = async (e) => {
644
+ w(e);
423
645
  try {
424
- (await c({ variables: { id: e } })).data?.tecPublishCourse && (h.success("Course published"), await r());
646
+ (await l({ variables: { id: e } })).data?.tecPublishCourse && (v.success("Course published"), await r());
425
647
  } finally {
426
- S(null);
648
+ w(null);
427
649
  }
428
- }, U = async (e, t) => {
429
- if (await he({
650
+ }, oe = async (e, t) => {
651
+ if (await we({
430
652
  title: "Archive course",
431
653
  message: `Archive "${t}"? Learners will no longer be able to enroll.`,
432
654
  okButtonTitle: "Archive",
433
655
  cancelButtonTitle: "Cancel"
434
656
  })) {
435
- S(e);
657
+ w(e);
436
658
  try {
437
- (await g({ variables: { id: e } })).data?.tecArchiveCourse && (h.success("Course archived"), await r());
659
+ (await g({ variables: { id: e } })).data?.tecArchiveCourse && (v.success("Course archived"), await r());
438
660
  } finally {
439
- S(null);
661
+ w(null);
440
662
  }
441
663
  }
442
664
  };
443
- return /* @__PURE__ */ K("div", {
665
+ return /* @__PURE__ */ J("div", {
444
666
  className: "space-y-4",
445
667
  children: [
446
- /* @__PURE__ */ G(Ee, {
447
- summary: `${B.length} course${B.length === 1 ? "" : "s"}`,
668
+ /* @__PURE__ */ q(Pe, {
669
+ summary: `${V.length} course${V.length === 1 ? "" : "s"}`,
448
670
  actionLabel: "New course",
449
- open: v,
450
- onToggle: () => ee((e) => !e)
671
+ open: _,
672
+ onToggle: () => y((e) => !e)
451
673
  }),
452
- v ? /* @__PURE__ */ K(Te, {
674
+ _ ? /* @__PURE__ */ J(Ne, {
453
675
  title: "New course",
454
676
  description: "Draft a course, then add lessons and publish when it's ready.",
455
- icon: L,
456
- footer: /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(J, {
677
+ icon: H,
678
+ footer: /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Y, {
457
679
  variant: "outline",
458
680
  size: "sm",
459
- onClick: V,
681
+ onClick: U,
460
682
  children: "Cancel"
461
- }), /* @__PURE__ */ G(J, {
683
+ }), /* @__PURE__ */ q(Y, {
462
684
  size: "sm",
463
- onClick: H,
464
- disabled: s,
465
- children: s ? "Creating…" : "Create course"
685
+ onClick: re,
686
+ disabled: c,
687
+ children: c ? "Creating…" : "Create course"
466
688
  })] }),
467
689
  children: [
468
- /* @__PURE__ */ G($, {
690
+ /* @__PURE__ */ q($, {
469
691
  label: "Title",
470
692
  required: !0,
471
- children: /* @__PURE__ */ G(X, {
472
- value: w,
473
- onChange: (e) => T(e.target.value),
693
+ children: /* @__PURE__ */ q(X, {
694
+ value: D,
695
+ onChange: (e) => ee(e.target.value),
474
696
  placeholder: "Intro to TypeScript"
475
697
  })
476
698
  }),
477
- /* @__PURE__ */ G($, {
699
+ /* @__PURE__ */ q($, {
478
700
  label: "Slug",
479
701
  required: !0,
480
- children: /* @__PURE__ */ G(X, {
481
- value: E,
482
- onChange: (e) => D(e.target.value),
702
+ children: /* @__PURE__ */ q(X, {
703
+ value: O,
704
+ onChange: (e) => k(e.target.value),
483
705
  placeholder: "auto from title if blank"
484
706
  })
485
707
  }),
486
- /* @__PURE__ */ G($, {
708
+ /* @__PURE__ */ q($, {
487
709
  label: "Topic",
488
- children: /* @__PURE__ */ G(X, {
489
- value: ne,
490
- onChange: (e) => j(e.target.value),
710
+ children: /* @__PURE__ */ q(X, {
711
+ value: M,
712
+ onChange: (e) => N(e.target.value),
491
713
  placeholder: "e.g. Web, AI, Data, Cloud"
492
714
  })
493
715
  }),
494
- /* @__PURE__ */ G($, {
716
+ /* @__PURE__ */ q($, {
495
717
  label: "Level",
496
- children: /* @__PURE__ */ K(Z, {
497
- value: M,
498
- onValueChange: (e) => N(e),
499
- children: [/* @__PURE__ */ G(le, { children: /* @__PURE__ */ G(ue, {}) }), /* @__PURE__ */ G(ce, { children: ve.map((e) => /* @__PURE__ */ G(Q, {
718
+ children: /* @__PURE__ */ J(ge, {
719
+ value: P,
720
+ onValueChange: (e) => F(e),
721
+ children: [/* @__PURE__ */ q(ye, { children: /* @__PURE__ */ q(be, {}) }), /* @__PURE__ */ q(_e, { children: De.map((e) => /* @__PURE__ */ q(ve, {
500
722
  value: e,
501
- children: l(e)
723
+ children: u(e)
502
724
  }, e)) })]
503
725
  })
504
726
  }),
505
- /* @__PURE__ */ G($, {
727
+ /* @__PURE__ */ q($, {
506
728
  label: "Estimated minutes",
507
- children: /* @__PURE__ */ G(X, {
729
+ children: /* @__PURE__ */ q(X, {
508
730
  type: "number",
509
731
  min: 0,
510
732
  value: I,
511
- onChange: (e) => R(e.target.value),
733
+ onChange: (e) => L(e.target.value),
512
734
  placeholder: "120"
513
735
  })
514
736
  }),
515
- /* @__PURE__ */ G($, {
737
+ /* @__PURE__ */ q($, {
516
738
  label: "Tags",
517
- children: /* @__PURE__ */ G(m, {
518
- value: re,
519
- onChange: ie,
739
+ children: /* @__PURE__ */ q(h, {
740
+ value: R,
741
+ onChange: z,
520
742
  placeholder: "typescript, basics"
521
743
  })
522
744
  }),
523
- /* @__PURE__ */ G($, {
745
+ /* @__PURE__ */ q($, {
524
746
  label: "Summary",
525
747
  className: "sm:col-span-2",
526
- children: /* @__PURE__ */ G(me, {
527
- value: k,
748
+ children: /* @__PURE__ */ q(Z, {
749
+ value: te,
528
750
  onChange: (e) => A(e.target.value),
529
751
  placeholder: "What learners will build and take away."
530
752
  })
531
753
  })
532
754
  ]
533
755
  }) : null,
534
- t && !B.length ? /* @__PURE__ */ G(p, { count: 4 }) : n ? /* @__PURE__ */ G(f, {
756
+ t && !V.length ? /* @__PURE__ */ q(m, { count: 4 }) : n ? /* @__PURE__ */ q(p, {
535
757
  title: "Couldn't load courses",
536
758
  error: n
537
- }) : B.length === 0 ? /* @__PURE__ */ G(d, {
538
- icon: /* @__PURE__ */ G(L, { size: 26 }),
759
+ }) : V.length === 0 ? /* @__PURE__ */ q(f, {
760
+ icon: /* @__PURE__ */ q(H, { size: 26 }),
539
761
  title: "No courses yet",
540
762
  description: "Create your first course with the button above. TechnoSpam is pre-launch."
541
- }) : /* @__PURE__ */ G("div", {
763
+ }) : /* @__PURE__ */ q("div", {
542
764
  className: "space-y-3",
543
- children: B.map((e) => /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ K(De, {
544
- leading: /* @__PURE__ */ G(we, {
765
+ children: V.map((e) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J(Fe, {
766
+ leading: /* @__PURE__ */ q(Me, {
545
767
  seed: `${e.topic ?? ""} ${e.title}`,
546
768
  icon: i(e.topic ?? e.title)
547
769
  }),
548
- actions: /* @__PURE__ */ K(W, { children: [
549
- /* @__PURE__ */ K(J, {
770
+ actions: /* @__PURE__ */ J(K, { children: [
771
+ /* @__PURE__ */ J(Y, {
550
772
  size: "sm",
551
773
  variant: "outline",
552
- onClick: () => te(C === e.id ? null : e.id),
553
- children: [/* @__PURE__ */ G(z, { size: 15 }), " Lessons"]
774
+ onClick: () => E(T === e.id ? null : e.id),
775
+ children: [/* @__PURE__ */ q(ae, { size: 15 }), " Lessons"]
554
776
  }),
555
- e.status === "DRAFT" ? /* @__PURE__ */ K(J, {
777
+ e.status === "DRAFT" ? /* @__PURE__ */ J(Y, {
556
778
  size: "sm",
557
- onClick: () => oe(e.id),
779
+ onClick: () => ie(e.id),
558
780
  disabled: x === e.id,
559
- children: [/* @__PURE__ */ G(ae, { size: 15 }), " Publish"]
781
+ children: [/* @__PURE__ */ q(le, { size: 15 }), " Publish"]
560
782
  }) : null,
561
- e.status === "ARCHIVED" ? null : /* @__PURE__ */ K(J, {
783
+ e.status === "ARCHIVED" ? null : /* @__PURE__ */ J(Y, {
562
784
  size: "sm",
563
785
  variant: "outline",
564
- onClick: () => U(e.id, e.title),
786
+ onClick: () => oe(e.id, e.title),
565
787
  disabled: x === e.id,
566
- children: [/* @__PURE__ */ G(F, { size: 15 }), " Archive"]
788
+ children: [/* @__PURE__ */ q(ne, { size: 15 }), " Archive"]
567
789
  })
568
790
  ] }),
569
- children: [/* @__PURE__ */ K("div", {
791
+ children: [/* @__PURE__ */ J("div", {
570
792
  className: "flex flex-wrap items-center gap-2",
571
793
  children: [
572
- /* @__PURE__ */ G("span", {
794
+ /* @__PURE__ */ q("span", {
573
795
  className: "truncate text-sm font-semibold text-text-primary",
574
796
  children: e.title
575
797
  }),
576
- /* @__PURE__ */ G(u, { status: e.status }),
577
- /* @__PURE__ */ G(u, {
798
+ /* @__PURE__ */ q(d, { status: e.status }),
799
+ /* @__PURE__ */ q(d, {
578
800
  status: e.level,
579
801
  kind: "level"
580
802
  })
581
803
  ]
582
- }), /* @__PURE__ */ K("div", {
804
+ }), /* @__PURE__ */ J("div", {
583
805
  className: "mt-1 truncate text-xs text-text-muted",
584
806
  children: [
585
807
  e.slug,
586
808
  " · ",
587
809
  e.topic ?? "No topic",
588
810
  " · ",
589
- o(e.estimatedMinutes)
811
+ s(e.estimatedMinutes),
812
+ " · updated ",
813
+ a(e.updatedAt)
590
814
  ]
591
815
  })]
592
- }), C === e.id ? /* @__PURE__ */ G(Oe, { courseId: e.id }) : null] }, e.id))
816
+ }), T === e.id ? /* @__PURE__ */ q(Le, { courseId: e.id }) : null] }, e.id))
593
817
  })
594
818
  ]
595
819
  });
596
820
  }
597
- function Me() {
598
- let { data: e, loading: t, error: n, refetch: r } = D({}), [a, { loading: o }] = S(), [s] = k(), [c, m] = P(!1), [g, _] = P(null), [v, y] = P(null), [b, ee] = P(""), [x, C] = P(""), [te, w] = P(""), [T, E] = P(""), [O, A] = P("EASY"), [ne, j] = P(""), [M, N] = P(""), [F, I] = P(""), L = e?.tecListProblems.items ?? [], z = () => {
599
- ee(""), C(""), w(""), E(""), A("EASY"), j(""), N(""), I(""), m(!1);
600
- }, ie = async () => {
821
+ function He() {
822
+ let { data: e, loading: t, error: n, refetch: r } = A({}), [a, { loading: o }] = E(), [s] = M(), [c, l] = B(!1), [h, g] = B(null), [_, y] = B(null), [b, x] = B(""), [S, C] = B(""), [w, T] = B(""), [D, ee] = B(""), [O, k] = B("EASY"), [te, j] = B(""), [N, P] = B(""), [F, I] = B(""), L = e?.tecListProblems?.items ?? [], R = () => {
823
+ x(""), C(""), T(""), ee(""), k("EASY"), j(""), P(""), I(""), l(!1);
824
+ }, z = async () => {
601
825
  let e = b.trim();
602
- if (!e) return h.error("Title is required");
603
- let t = be(x || e);
604
- if (!t) return h.error("A valid slug is required");
826
+ if (!e) return v.error("Title is required");
827
+ let t = ke(S || e);
828
+ if (!t) return v.error("A valid slug is required");
605
829
  (await a({ variables: { input: {
606
830
  title: e,
607
831
  slug: t,
608
- statement: te.trim() || void 0,
609
- topic: T.trim() || void 0,
832
+ statement: w.trim() || void 0,
833
+ topic: D.trim() || void 0,
610
834
  difficulty: O,
611
- points: Se(ne),
612
- languages: xe(M),
835
+ points: Q(te),
836
+ languages: Ae(N),
613
837
  starterCode: F.trim() || void 0
614
- } } })).data?.tecCreateProblem && (h.success("Problem created", `"${e}" saved as a draft.`), z(), await r());
615
- }, B = async (e) => {
616
- _(e);
838
+ } } })).data?.tecCreateProblem && (v.success("Problem created", `"${e}" saved as a draft.`), R(), await r());
839
+ }, ne = async (e) => {
840
+ g(e);
617
841
  try {
618
- (await s({ variables: { id: e } })).data?.tecPublishProblem && (h.success("Problem published"), await r());
842
+ (await s({ variables: { id: e } })).data?.tecPublishProblem && (v.success("Problem published"), await r());
619
843
  } finally {
620
- _(null);
844
+ g(null);
621
845
  }
622
846
  };
623
- return /* @__PURE__ */ K("div", {
847
+ return /* @__PURE__ */ J("div", {
624
848
  className: "space-y-4",
625
849
  children: [
626
- /* @__PURE__ */ G(Ee, {
850
+ /* @__PURE__ */ q(Pe, {
627
851
  summary: `${L.length} problem${L.length === 1 ? "" : "s"}`,
628
852
  actionLabel: "New problem",
629
853
  open: c,
630
- onToggle: () => m((e) => !e)
854
+ onToggle: () => l((e) => !e)
631
855
  }),
632
- c ? /* @__PURE__ */ K(Te, {
856
+ c ? /* @__PURE__ */ J(Ne, {
633
857
  title: "New problem",
634
858
  description: "Define a coding challenge learners can solve and submit.",
635
- icon: R,
636
- footer: /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(J, {
859
+ icon: U,
860
+ footer: /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Y, {
637
861
  variant: "outline",
638
862
  size: "sm",
639
- onClick: z,
863
+ onClick: R,
640
864
  children: "Cancel"
641
- }), /* @__PURE__ */ G(J, {
865
+ }), /* @__PURE__ */ q(Y, {
642
866
  size: "sm",
643
- onClick: ie,
867
+ onClick: z,
644
868
  disabled: o,
645
869
  children: o ? "Creating…" : "Create problem"
646
870
  })] }),
647
871
  children: [
648
- /* @__PURE__ */ G($, {
872
+ /* @__PURE__ */ q($, {
649
873
  label: "Title",
650
874
  required: !0,
651
- children: /* @__PURE__ */ G(X, {
875
+ children: /* @__PURE__ */ q(X, {
652
876
  value: b,
653
- onChange: (e) => ee(e.target.value),
877
+ onChange: (e) => x(e.target.value),
654
878
  placeholder: "Two Sum"
655
879
  })
656
880
  }),
657
- /* @__PURE__ */ G($, {
881
+ /* @__PURE__ */ q($, {
658
882
  label: "Slug",
659
883
  required: !0,
660
- children: /* @__PURE__ */ G(X, {
661
- value: x,
884
+ children: /* @__PURE__ */ q(X, {
885
+ value: S,
662
886
  onChange: (e) => C(e.target.value),
663
887
  placeholder: "auto from title if blank"
664
888
  })
665
889
  }),
666
- /* @__PURE__ */ G($, {
890
+ /* @__PURE__ */ q($, {
667
891
  label: "Topic",
668
- children: /* @__PURE__ */ G(X, {
669
- value: T,
670
- onChange: (e) => E(e.target.value),
892
+ children: /* @__PURE__ */ q(X, {
893
+ value: D,
894
+ onChange: (e) => ee(e.target.value),
671
895
  placeholder: "Arrays"
672
896
  })
673
897
  }),
674
- /* @__PURE__ */ G($, {
898
+ /* @__PURE__ */ q($, {
675
899
  label: "Difficulty",
676
- children: /* @__PURE__ */ K(Z, {
900
+ children: /* @__PURE__ */ J(ge, {
677
901
  value: O,
678
- onValueChange: (e) => A(e),
679
- children: [/* @__PURE__ */ G(le, { children: /* @__PURE__ */ G(ue, {}) }), /* @__PURE__ */ G(ce, { children: ye.map((e) => /* @__PURE__ */ G(Q, {
902
+ onValueChange: (e) => k(e),
903
+ children: [/* @__PURE__ */ q(ye, { children: /* @__PURE__ */ q(be, {}) }), /* @__PURE__ */ q(_e, { children: Oe.map((e) => /* @__PURE__ */ q(ve, {
680
904
  value: e,
681
- children: l(e)
905
+ children: u(e)
682
906
  }, e)) })]
683
907
  })
684
908
  }),
685
- /* @__PURE__ */ G($, {
909
+ /* @__PURE__ */ q($, {
686
910
  label: "Points",
687
- children: /* @__PURE__ */ G(X, {
911
+ children: /* @__PURE__ */ q(X, {
688
912
  type: "number",
689
913
  min: 0,
690
- value: ne,
914
+ value: te,
691
915
  onChange: (e) => j(e.target.value),
692
916
  placeholder: "100"
693
917
  })
694
918
  }),
695
- /* @__PURE__ */ G($, {
919
+ /* @__PURE__ */ q($, {
696
920
  label: "Languages (comma-separated)",
697
- children: /* @__PURE__ */ G(X, {
698
- value: M,
699
- onChange: (e) => N(e.target.value),
921
+ children: /* @__PURE__ */ q(X, {
922
+ value: N,
923
+ onChange: (e) => P(e.target.value),
700
924
  placeholder: "python, typescript"
701
925
  })
702
926
  }),
703
- /* @__PURE__ */ G($, {
927
+ /* @__PURE__ */ q($, {
704
928
  label: "Statement",
705
929
  className: "sm:col-span-2",
706
- children: /* @__PURE__ */ G(me, {
707
- value: te,
708
- onChange: (e) => w(e.target.value),
930
+ children: /* @__PURE__ */ q(Z, {
931
+ value: w,
932
+ onChange: (e) => T(e.target.value),
709
933
  placeholder: "Describe the problem and constraints."
710
934
  })
711
935
  }),
712
- /* @__PURE__ */ G($, {
936
+ /* @__PURE__ */ q($, {
713
937
  label: "Starter code",
714
938
  className: "sm:col-span-2",
715
- children: /* @__PURE__ */ G(me, {
939
+ children: /* @__PURE__ */ q(Z, {
716
940
  value: F,
717
941
  onChange: (e) => I(e.target.value),
718
942
  className: "font-mono",
@@ -721,45 +945,45 @@ function Me() {
721
945
  })
722
946
  ]
723
947
  }) : null,
724
- t && !L.length ? /* @__PURE__ */ G(p, { count: 4 }) : n ? /* @__PURE__ */ G(f, {
948
+ t && !L.length ? /* @__PURE__ */ q(m, { count: 4 }) : n ? /* @__PURE__ */ q(p, {
725
949
  title: "Couldn't load problems",
726
950
  error: n
727
- }) : L.length === 0 ? /* @__PURE__ */ G(d, {
728
- icon: /* @__PURE__ */ G(R, { size: 26 }),
951
+ }) : L.length === 0 ? /* @__PURE__ */ q(f, {
952
+ icon: /* @__PURE__ */ q(U, { size: 26 }),
729
953
  title: "No problems yet",
730
954
  description: "Create your first coding problem with the button above. TechnoSpam is pre-launch."
731
- }) : /* @__PURE__ */ G("div", {
955
+ }) : /* @__PURE__ */ q("div", {
732
956
  className: "space-y-3",
733
- children: L.map((e) => /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ K(De, {
734
- leading: /* @__PURE__ */ G(we, {
957
+ children: L.map((e) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J(Fe, {
958
+ leading: /* @__PURE__ */ q(Me, {
735
959
  seed: `${e.topic ?? ""} ${e.title}`,
736
960
  icon: i(e.topic ?? e.title)
737
961
  }),
738
- actions: /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ K(J, {
962
+ actions: /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J(Y, {
739
963
  size: "sm",
740
964
  variant: "outline",
741
- onClick: () => y(v === e.id ? null : e.id),
742
- children: [/* @__PURE__ */ G(re, { size: 15 }), " Grade"]
743
- }), e.status === "DRAFT" ? /* @__PURE__ */ K(J, {
965
+ onClick: () => y(_ === e.id ? null : e.id),
966
+ children: [/* @__PURE__ */ q(ie, { size: 15 }), " Grade"]
967
+ }), e.status === "DRAFT" ? /* @__PURE__ */ J(Y, {
744
968
  size: "sm",
745
- onClick: () => B(e.id),
746
- disabled: g === e.id,
747
- children: [/* @__PURE__ */ G(ae, { size: 15 }), " Publish"]
969
+ onClick: () => ne(e.id),
970
+ disabled: h === e.id,
971
+ children: [/* @__PURE__ */ q(le, { size: 15 }), " Publish"]
748
972
  }) : null] }),
749
- children: [/* @__PURE__ */ K("div", {
973
+ children: [/* @__PURE__ */ J("div", {
750
974
  className: "flex flex-wrap items-center gap-2",
751
975
  children: [
752
- /* @__PURE__ */ G("span", {
976
+ /* @__PURE__ */ q("span", {
753
977
  className: "truncate text-sm font-semibold text-text-primary",
754
978
  children: e.title
755
979
  }),
756
- /* @__PURE__ */ G(u, { status: e.status }),
757
- /* @__PURE__ */ G(u, {
980
+ /* @__PURE__ */ q(d, { status: e.status }),
981
+ /* @__PURE__ */ q(d, {
758
982
  status: e.difficulty,
759
983
  kind: "level"
760
984
  })
761
985
  ]
762
- }), /* @__PURE__ */ K("div", {
986
+ }), /* @__PURE__ */ J("div", {
763
987
  className: "mt-1 truncate text-xs text-text-muted",
764
988
  children: [
765
989
  e.slug,
@@ -772,301 +996,302 @@ function Me() {
772
996
  e.languages.length ? e.languages.join(", ") : "No languages"
773
997
  ]
774
998
  })]
775
- }), v === e.id ? /* @__PURE__ */ G(ke, { problemId: e.id }) : null] }, e.id))
999
+ }), _ === e.id ? /* @__PURE__ */ q(ze, { problemId: e.id }) : null] }, e.id))
776
1000
  })
777
1001
  ]
778
1002
  });
779
1003
  }
780
- function Ne() {
781
- let { data: e, loading: t, error: n, refetch: r } = te({}), [o, { loading: c }] = ee(), [l] = E(), [g] = ne(), [_] = j(), [y] = v(), [b, x] = P(!1), [S, C] = P(null), [w, T] = P(null), [D, O] = P(""), [k, A] = P(""), [M, N] = P(""), [F, L] = P(""), [R, z] = P(""), [B, V] = P(""), [oe, se] = P(""), [q, Y] = P(""), [Z, ce] = P([]), Q = e?.tecListHackathons.items ?? [], le = () => {
782
- O(""), A(""), N(""), L(""), z(""), V(""), se(""), Y(""), ce([]), x(!1);
783
- }, ue = async () => {
1004
+ function Ue() {
1005
+ let { data: e, loading: t, error: n, refetch: r } = ee({}), [a, { loading: s }] = w(), [l] = te(), [u] = F(), [g] = I(), [_] = x(), [y, b] = B(!1), [S, C] = B(null), [T, E] = B(null), [D, O] = B(""), [k, A] = B(""), [j, M] = B(""), [N, P] = B(""), [L, R] = B(""), [z, ne] = B(""), [H, U] = B(""), [re, ae] = B(""), [oe, ce] = B([]), W = e?.tecListHackathons?.items ?? [], ue = () => {
1006
+ O(""), A(""), M(""), P(""), R(""), ne(""), U(""), ae(""), ce([]), b(!1);
1007
+ }, fe = async () => {
784
1008
  let e = D.trim();
785
- if (!e) return h.error("Title is required");
786
- let t = be(k || e);
787
- if (!t) return h.error("A valid slug is required");
788
- let n = Ce(R), i = Ce(B);
789
- if (!n || !i) return h.error("Start and end date/time are required");
790
- if (new Date(i) <= new Date(n)) return h.error("End must be after the start");
791
- (await o({ variables: { input: {
1009
+ if (!e) return v.error("Title is required");
1010
+ let t = ke(k || e);
1011
+ if (!t) return v.error("A valid slug is required");
1012
+ let n = je(L), i = je(z);
1013
+ if (!n || !i) return v.error("Start and end date/time are required");
1014
+ if (new Date(i) <= new Date(n)) return v.error("End must be after the start");
1015
+ (await a({ variables: { input: {
792
1016
  title: e,
793
1017
  slug: t,
794
- theme: M.trim() || void 0,
795
- description: F.trim() || void 0,
1018
+ theme: j.trim() || void 0,
1019
+ description: N.trim() || void 0,
796
1020
  startAt: n,
797
1021
  endAt: i,
798
- prizePool: Se(oe),
799
- maxTeamSize: Se(q),
800
- tags: Z
801
- } } })).data?.tecCreateHackathon && (h.success("Hackathon created", `"${e}" saved as a draft.`), le(), await r());
802
- }, de = async (e) => {
1022
+ prizePool: Q(H),
1023
+ maxTeamSize: Q(re),
1024
+ tags: oe
1025
+ } } })).data?.tecCreateHackathon && (v.success("Hackathon created", `"${e}" saved as a draft.`), ue(), await r());
1026
+ }, pe = async (e) => {
803
1027
  C(e);
804
1028
  try {
805
- (await l({ variables: { id: e } })).data?.tecOpenRegistration && (h.success("Registration open", "Teams can now register."), await r());
1029
+ (await l({ variables: { id: e } })).data?.tecOpenRegistration && (v.success("Registration open", "Teams can now register."), await r());
806
1030
  } finally {
807
1031
  C(null);
808
1032
  }
809
- }, fe = async (e, t, n) => {
1033
+ }, me = async (e, t, n) => {
810
1034
  C(e);
811
1035
  try {
812
- (await t({ variables: { id: e } })).data && (h.success(n), await r());
1036
+ (await t({ variables: { id: e } })).data && (v.success(n), await r());
813
1037
  } finally {
814
1038
  C(null);
815
1039
  }
816
1040
  };
817
- return /* @__PURE__ */ K("div", {
1041
+ return /* @__PURE__ */ J("div", {
818
1042
  className: "space-y-4",
819
1043
  children: [
820
- /* @__PURE__ */ G(Ee, {
821
- summary: `${Q.length} hackathon${Q.length === 1 ? "" : "s"}`,
1044
+ /* @__PURE__ */ q(Pe, {
1045
+ summary: `${W.length} hackathon${W.length === 1 ? "" : "s"}`,
822
1046
  actionLabel: "New hackathon",
823
- open: b,
824
- onToggle: () => x((e) => !e)
1047
+ open: y,
1048
+ onToggle: () => b((e) => !e)
825
1049
  }),
826
- b ? /* @__PURE__ */ K(Te, {
1050
+ y ? /* @__PURE__ */ J(Ne, {
827
1051
  title: "New hackathon",
828
1052
  description: "Set up an event, open registration, then run judging to completion.",
829
- icon: H,
830
- footer: /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(J, {
1053
+ icon: de,
1054
+ footer: /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Y, {
831
1055
  variant: "outline",
832
1056
  size: "sm",
833
- onClick: le,
1057
+ onClick: ue,
834
1058
  children: "Cancel"
835
- }), /* @__PURE__ */ G(J, {
1059
+ }), /* @__PURE__ */ q(Y, {
836
1060
  size: "sm",
837
- onClick: ue,
838
- disabled: c,
839
- children: c ? "Creating…" : "Create hackathon"
1061
+ onClick: fe,
1062
+ disabled: s,
1063
+ children: s ? "Creating…" : "Create hackathon"
840
1064
  })] }),
841
1065
  children: [
842
- /* @__PURE__ */ G($, {
1066
+ /* @__PURE__ */ q($, {
843
1067
  label: "Title",
844
1068
  required: !0,
845
- children: /* @__PURE__ */ G(X, {
1069
+ children: /* @__PURE__ */ q(X, {
846
1070
  value: D,
847
1071
  onChange: (e) => O(e.target.value),
848
1072
  placeholder: "Build Days 2026"
849
1073
  })
850
1074
  }),
851
- /* @__PURE__ */ G($, {
1075
+ /* @__PURE__ */ q($, {
852
1076
  label: "Slug",
853
1077
  required: !0,
854
- children: /* @__PURE__ */ G(X, {
1078
+ children: /* @__PURE__ */ q(X, {
855
1079
  value: k,
856
1080
  onChange: (e) => A(e.target.value),
857
1081
  placeholder: "auto from title if blank"
858
1082
  })
859
1083
  }),
860
- /* @__PURE__ */ G($, {
1084
+ /* @__PURE__ */ q($, {
861
1085
  label: "Theme",
862
- children: /* @__PURE__ */ G(X, {
863
- value: M,
864
- onChange: (e) => N(e.target.value),
1086
+ children: /* @__PURE__ */ q(X, {
1087
+ value: j,
1088
+ onChange: (e) => M(e.target.value),
865
1089
  placeholder: "AI for good"
866
1090
  })
867
1091
  }),
868
- /* @__PURE__ */ G($, {
1092
+ /* @__PURE__ */ q($, {
869
1093
  label: "Tags",
870
- children: /* @__PURE__ */ G(m, {
871
- value: Z,
1094
+ children: /* @__PURE__ */ q(h, {
1095
+ value: oe,
872
1096
  onChange: ce,
873
1097
  placeholder: "ai, web"
874
1098
  })
875
1099
  }),
876
- /* @__PURE__ */ G($, {
1100
+ /* @__PURE__ */ q($, {
877
1101
  label: "Starts",
878
1102
  required: !0,
879
- children: /* @__PURE__ */ G(X, {
1103
+ children: /* @__PURE__ */ q(X, {
880
1104
  type: "datetime-local",
881
- value: R,
882
- onChange: (e) => z(e.target.value)
1105
+ value: L,
1106
+ onChange: (e) => R(e.target.value)
883
1107
  })
884
1108
  }),
885
- /* @__PURE__ */ G($, {
1109
+ /* @__PURE__ */ q($, {
886
1110
  label: "Ends",
887
1111
  required: !0,
888
- children: /* @__PURE__ */ G(X, {
1112
+ children: /* @__PURE__ */ q(X, {
889
1113
  type: "datetime-local",
890
- value: B,
891
- onChange: (e) => V(e.target.value)
1114
+ value: z,
1115
+ onChange: (e) => ne(e.target.value)
892
1116
  })
893
1117
  }),
894
- /* @__PURE__ */ G($, {
1118
+ /* @__PURE__ */ q($, {
895
1119
  label: "Prize pool",
896
- children: /* @__PURE__ */ G(X, {
1120
+ children: /* @__PURE__ */ q(X, {
897
1121
  type: "number",
898
1122
  min: 0,
899
- value: oe,
900
- onChange: (e) => se(e.target.value),
1123
+ value: H,
1124
+ onChange: (e) => U(e.target.value),
901
1125
  placeholder: "5000"
902
1126
  })
903
1127
  }),
904
- /* @__PURE__ */ G($, {
1128
+ /* @__PURE__ */ q($, {
905
1129
  label: "Max team size",
906
- children: /* @__PURE__ */ G(X, {
1130
+ children: /* @__PURE__ */ q(X, {
907
1131
  type: "number",
908
1132
  min: 1,
909
- value: q,
910
- onChange: (e) => Y(e.target.value),
1133
+ value: re,
1134
+ onChange: (e) => ae(e.target.value),
911
1135
  placeholder: "4"
912
1136
  })
913
1137
  }),
914
- /* @__PURE__ */ G($, {
1138
+ /* @__PURE__ */ q($, {
915
1139
  label: "Description",
916
1140
  className: "sm:col-span-2",
917
- children: /* @__PURE__ */ G(me, {
918
- value: F,
919
- onChange: (e) => L(e.target.value),
1141
+ children: /* @__PURE__ */ q(Z, {
1142
+ value: N,
1143
+ onChange: (e) => P(e.target.value),
920
1144
  placeholder: "What the hackathon is about and how judging works."
921
1145
  })
922
1146
  })
923
1147
  ]
924
1148
  }) : null,
925
- t && !Q.length ? /* @__PURE__ */ G(p, { count: 4 }) : n ? /* @__PURE__ */ G(f, {
1149
+ t && !W.length ? /* @__PURE__ */ q(m, { count: 4 }) : n ? /* @__PURE__ */ q(p, {
926
1150
  title: "Couldn't load hackathons",
927
1151
  error: n
928
- }) : Q.length === 0 ? /* @__PURE__ */ G(d, {
929
- icon: /* @__PURE__ */ G(H, { size: 26 }),
1152
+ }) : W.length === 0 ? /* @__PURE__ */ q(f, {
1153
+ icon: /* @__PURE__ */ q(de, { size: 26 }),
930
1154
  title: "No hackathons yet",
931
1155
  description: "Create your first hackathon with the button above. TechnoSpam is pre-launch."
932
- }) : /* @__PURE__ */ G("div", {
1156
+ }) : /* @__PURE__ */ q("div", {
933
1157
  className: "space-y-3",
934
- children: Q.map((e) => /* @__PURE__ */ K("div", { children: [/* @__PURE__ */ K(De, {
935
- leading: /* @__PURE__ */ G(we, {
1158
+ children: W.map((e) => /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ J(Fe, {
1159
+ leading: /* @__PURE__ */ q(Me, {
936
1160
  seed: e.title,
937
- icon: i(e.title, H)
1161
+ icon: i(e.title, de)
938
1162
  }),
939
- actions: /* @__PURE__ */ K(W, { children: [
940
- /* @__PURE__ */ K(J, {
1163
+ actions: /* @__PURE__ */ J(K, { children: [
1164
+ /* @__PURE__ */ J(Y, {
941
1165
  size: "sm",
942
1166
  variant: "outline",
943
- onClick: () => T(w === e.id ? null : e.id),
944
- children: [/* @__PURE__ */ G(U, { size: 15 }), " Teams"]
1167
+ onClick: () => E(T === e.id ? null : e.id),
1168
+ children: [/* @__PURE__ */ q(G, { size: 15 }), " Teams"]
945
1169
  }),
946
- e.status === "DRAFT" ? /* @__PURE__ */ K(J, {
1170
+ e.status === "DRAFT" ? /* @__PURE__ */ J(Y, {
947
1171
  size: "sm",
948
- onClick: () => de(e.id),
1172
+ onClick: () => pe(e.id),
949
1173
  disabled: S === e.id,
950
- children: [/* @__PURE__ */ G(ae, { size: 15 }), " Open registration"]
1174
+ children: [/* @__PURE__ */ q(le, { size: 15 }), " Open registration"]
951
1175
  }) : null,
952
- e.status === "REGISTRATION_OPEN" ? /* @__PURE__ */ K(J, {
1176
+ e.status === "REGISTRATION_OPEN" ? /* @__PURE__ */ J(Y, {
953
1177
  size: "sm",
954
- onClick: () => fe(e.id, g, "Hackathon started"),
1178
+ onClick: () => me(e.id, u, "Hackathon started"),
955
1179
  disabled: S === e.id,
956
- children: [/* @__PURE__ */ G(ie, { size: 15 }), " Start"]
1180
+ children: [/* @__PURE__ */ q(se, { size: 15 }), " Start"]
957
1181
  }) : null,
958
- e.status === "IN_PROGRESS" ? /* @__PURE__ */ K(J, {
1182
+ e.status === "IN_PROGRESS" ? /* @__PURE__ */ J(Y, {
959
1183
  size: "sm",
960
- onClick: () => fe(e.id, _, "Judging started"),
1184
+ onClick: () => me(e.id, g, "Judging started"),
961
1185
  disabled: S === e.id,
962
- children: [/* @__PURE__ */ G(re, { size: 15 }), " Start judging"]
1186
+ children: [/* @__PURE__ */ q(ie, { size: 15 }), " Start judging"]
963
1187
  }) : null,
964
- e.status === "JUDGING" ? /* @__PURE__ */ K(J, {
1188
+ e.status === "JUDGING" ? /* @__PURE__ */ J(Y, {
965
1189
  size: "sm",
966
- onClick: () => fe(e.id, y, "Hackathon completed"),
1190
+ onClick: () => me(e.id, _, "Hackathon completed"),
967
1191
  disabled: S === e.id,
968
- children: [/* @__PURE__ */ G(I, { size: 15 }), " Complete"]
1192
+ children: [/* @__PURE__ */ q(V, { size: 15 }), " Complete"]
969
1193
  }) : null
970
1194
  ] }),
971
- children: [/* @__PURE__ */ K("div", {
1195
+ children: [/* @__PURE__ */ J("div", {
972
1196
  className: "flex flex-wrap items-center gap-2",
973
- children: [/* @__PURE__ */ G("span", {
1197
+ children: [/* @__PURE__ */ q("span", {
974
1198
  className: "truncate text-sm font-semibold text-text-primary",
975
1199
  children: e.title
976
- }), /* @__PURE__ */ G(u, { status: e.status })]
977
- }), /* @__PURE__ */ K("div", {
1200
+ }), /* @__PURE__ */ q(d, { status: e.status })]
1201
+ }), /* @__PURE__ */ J("div", {
978
1202
  className: "mt-1 truncate text-xs text-text-muted",
979
1203
  children: [
980
1204
  e.slug,
981
1205
  " · ",
982
- a(e.startAt),
1206
+ o(e.startAt),
983
1207
  " → ",
984
- a(e.endAt),
985
- e.prizePool ? ` · ${s(e.prizePool, e.currency)} prize` : ""
1208
+ o(e.endAt),
1209
+ e.prizePool ? ` · ${c(e.prizePool, e.currency)} prize` : ""
986
1210
  ]
987
1211
  })]
988
- }), w === e.id ? /* @__PURE__ */ G(Ae, { hackathon: e }) : null] }, e.id))
1212
+ }), T === e.id ? /* @__PURE__ */ q(Be, { hackathon: e }) : null] }, e.id))
989
1213
  })
990
1214
  ]
991
1215
  });
992
1216
  }
993
- function Pe() {
994
- let { data: e, loading: t, error: n, refetch: r } = T({}), [a] = g(), [o, s] = P(null), l = e?.tecListMentors.items ?? [], m = l.filter((e) => e.status === "PENDING").length, _ = async (e) => {
1217
+ function We() {
1218
+ let { data: e, loading: t, error: n, refetch: r } = k({}), [a] = y(), [o, s] = B(null), c = e?.tecListMentors?.items ?? [], u = c.filter((e) => e.status === "PENDING").length, h = async (e) => {
995
1219
  s(e);
996
1220
  try {
997
- (await a({ variables: { id: e } })).data?.tecApproveMentor && (h.success("Mentor approved", "They can now accept mentees."), await r());
1221
+ (await a({ variables: { id: e } })).data?.tecApproveMentor && (v.success("Mentor approved", "They can now accept mentees."), await r());
998
1222
  } finally {
999
1223
  s(null);
1000
1224
  }
1001
1225
  };
1002
- return /* @__PURE__ */ K("div", {
1226
+ return /* @__PURE__ */ J("div", {
1003
1227
  className: "space-y-4",
1004
- children: [/* @__PURE__ */ G(Ee, { summary: `${l.length} mentor${l.length === 1 ? "" : "s"}${m ? ` · ${m} pending approval` : ""}` }), t && !l.length ? /* @__PURE__ */ G(p, { count: 4 }) : n ? /* @__PURE__ */ G(f, {
1228
+ children: [/* @__PURE__ */ q(Pe, { summary: `${c.length} mentor${c.length === 1 ? "" : "s"}${u ? ` · ${u} pending approval` : ""}` }), t && !c.length ? /* @__PURE__ */ q(m, { count: 4 }) : n ? /* @__PURE__ */ q(p, {
1005
1229
  title: "Couldn't load mentors",
1006
1230
  error: n
1007
- }) : l.length === 0 ? /* @__PURE__ */ G(d, {
1008
- icon: /* @__PURE__ */ G(U, { size: 26 }),
1231
+ }) : c.length === 0 ? /* @__PURE__ */ q(f, {
1232
+ icon: /* @__PURE__ */ q(G, { size: 26 }),
1009
1233
  title: "No mentors yet",
1010
1234
  description: "Mentor applications will appear here for review. TechnoSpam is pre-launch."
1011
- }) : /* @__PURE__ */ G("div", {
1235
+ }) : /* @__PURE__ */ q("div", {
1012
1236
  className: "space-y-3",
1013
- children: l.map((e) => /* @__PURE__ */ K(De, {
1014
- leading: /* @__PURE__ */ G(we, {
1237
+ children: c.map((e) => /* @__PURE__ */ J(Fe, {
1238
+ leading: /* @__PURE__ */ q(Me, {
1015
1239
  seed: e.headline,
1016
- icon: i(e.expertise[0] ?? e.headline, U)
1240
+ icon: i(e.expertise[0] ?? e.headline, G)
1017
1241
  }),
1018
- actions: e.status === "PENDING" ? /* @__PURE__ */ K(J, {
1242
+ actions: e.status === "PENDING" ? /* @__PURE__ */ J(Y, {
1019
1243
  size: "sm",
1020
- onClick: () => _(e.id),
1244
+ onClick: () => h(e.id),
1021
1245
  disabled: o === e.id,
1022
- children: [/* @__PURE__ */ G(oe, { size: 15 }), " Approve"]
1246
+ children: [/* @__PURE__ */ q(fe, { size: 15 }), " Approve"]
1023
1247
  }) : void 0,
1024
- children: [/* @__PURE__ */ K("div", {
1248
+ children: [/* @__PURE__ */ J("div", {
1025
1249
  className: "flex flex-wrap items-center gap-2",
1026
1250
  children: [
1027
- /* @__PURE__ */ G("span", {
1251
+ /* @__PURE__ */ q("span", {
1028
1252
  className: "truncate text-sm font-semibold text-text-primary",
1029
1253
  children: e.headline
1030
1254
  }),
1031
- /* @__PURE__ */ G(u, { status: e.status }),
1032
- e.isAcceptingMentees ? /* @__PURE__ */ G(q, {
1255
+ /* @__PURE__ */ q(d, { status: e.status }),
1256
+ e.isAcceptingMentees ? /* @__PURE__ */ q(me, {
1033
1257
  variant: "secondary",
1034
1258
  className: "text-[11px]",
1035
1259
  children: "Accepting mentees"
1036
1260
  }) : null
1037
1261
  ]
1038
- }), /* @__PURE__ */ K("div", {
1262
+ }), /* @__PURE__ */ J("div", {
1039
1263
  className: "mt-1 truncate text-xs text-text-muted",
1040
1264
  children: [
1041
1265
  e.expertise.length ? e.expertise.slice(0, 4).join(", ") : "No expertise listed",
1042
1266
  " ·",
1043
1267
  " ",
1044
- c(e.hourlyRate, e.currency),
1268
+ l(e.hourlyRate, e.currency),
1045
1269
  "/hr · ",
1046
1270
  e.sessionsCount,
1047
- " sessions"
1271
+ " ",
1272
+ "sessions"
1048
1273
  ]
1049
1274
  })]
1050
1275
  }, e.id))
1051
1276
  })]
1052
1277
  });
1053
1278
  }
1054
- function Fe() {
1055
- let [t, r] = P("courses"), { currentUser: i } = e(), a = (i?.role ?? "").toLowerCase();
1056
- return /* @__PURE__ */ K(n, {
1279
+ function Ge() {
1280
+ let [t, r] = B("courses"), { currentUser: i } = e(), a = (i?.role ?? "").toLowerCase();
1281
+ return /* @__PURE__ */ J(n, {
1057
1282
  hero: !0,
1058
1283
  title: "Authoring Console",
1059
1284
  description: "Create and manage TechnoSpam content — courses, problems, hackathons, and mentor applications.",
1060
1285
  children: [
1061
- a.includes("admin") || a.includes("owner") || a.includes("instructor") ? null : /* @__PURE__ */ K(Y, {
1286
+ a.includes("admin") || a.includes("owner") || a.includes("instructor") ? null : /* @__PURE__ */ J(he, {
1062
1287
  className: "mb-5 flex items-start gap-3 border-status-warning-border p-4",
1063
- children: [/* @__PURE__ */ G(V, {
1288
+ children: [/* @__PURE__ */ q(ue, {
1064
1289
  size: 18,
1065
1290
  className: "mt-0.5 shrink-0 text-status-warning-text"
1066
- }), /* @__PURE__ */ K("div", {
1291
+ }), /* @__PURE__ */ J("div", {
1067
1292
  className: "text-sm text-text-secondary",
1068
1293
  children: [
1069
- /* @__PURE__ */ G("span", {
1294
+ /* @__PURE__ */ q("span", {
1070
1295
  className: "font-medium text-text-primary",
1071
1296
  children: "Authoring is limited to workspace admins."
1072
1297
  }),
@@ -1075,36 +1300,36 @@ function Fe() {
1075
1300
  ]
1076
1301
  })]
1077
1302
  }),
1078
- /* @__PURE__ */ G(de, {
1303
+ /* @__PURE__ */ q(xe, {
1079
1304
  value: t,
1080
1305
  onValueChange: (e) => r(e),
1081
- children: /* @__PURE__ */ K(fe, {
1306
+ children: /* @__PURE__ */ J(Se, {
1082
1307
  className: "mb-5",
1083
1308
  children: [
1084
- /* @__PURE__ */ K(pe, {
1309
+ /* @__PURE__ */ J(Ce, {
1085
1310
  value: "courses",
1086
- children: [/* @__PURE__ */ G(L, { size: 15 }), " Courses"]
1311
+ children: [/* @__PURE__ */ q(H, { size: 15 }), " Courses"]
1087
1312
  }),
1088
- /* @__PURE__ */ K(pe, {
1313
+ /* @__PURE__ */ J(Ce, {
1089
1314
  value: "problems",
1090
- children: [/* @__PURE__ */ G(R, { size: 15 }), " Problems"]
1315
+ children: [/* @__PURE__ */ q(U, { size: 15 }), " Problems"]
1091
1316
  }),
1092
- /* @__PURE__ */ K(pe, {
1317
+ /* @__PURE__ */ J(Ce, {
1093
1318
  value: "hackathons",
1094
- children: [/* @__PURE__ */ G(H, { size: 15 }), " Hackathons"]
1319
+ children: [/* @__PURE__ */ q(de, { size: 15 }), " Hackathons"]
1095
1320
  }),
1096
- /* @__PURE__ */ K(pe, {
1321
+ /* @__PURE__ */ J(Ce, {
1097
1322
  value: "mentors",
1098
- children: [/* @__PURE__ */ G(U, { size: 15 }), " Mentors"]
1323
+ children: [/* @__PURE__ */ q(G, { size: 15 }), " Mentors"]
1099
1324
  })
1100
1325
  ]
1101
1326
  })
1102
1327
  }),
1103
- G(t === "courses" ? je : t === "problems" ? Me : t === "hackathons" ? Ne : Pe, {})
1328
+ q(t === "courses" ? Ve : t === "problems" ? He : t === "hackathons" ? Ue : We, {})
1104
1329
  ]
1105
1330
  });
1106
1331
  }
1107
1332
  //#endregion
1108
- export { Fe as AdminAdminDashboardPagePage };
1333
+ export { Ge as AdminAdminDashboardPagePage };
1109
1334
 
1110
1335
  //# sourceMappingURL=AdminAdminDashboardPagePage.js.map