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