@burdenoff/microfe-technospam 2026.1101.5 → 2026.1102.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/wspace-types.d.ts +7468 -141
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/node_modules/@codemirror/autocomplete/dist/index.js +527 -0
- package/dist/node_modules/@codemirror/autocomplete/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/commands/dist/index.js +1108 -0
- package/dist/node_modules/@codemirror/commands/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/lang-go/dist/index.js +206 -0
- package/dist/node_modules/@codemirror/lang-go/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/lang-javascript/dist/index.js +321 -0
- package/dist/node_modules/@codemirror/lang-javascript/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/lang-python/dist/index.js +265 -0
- package/dist/node_modules/@codemirror/lang-python/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/language/dist/index.js +957 -0
- package/dist/node_modules/@codemirror/language/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/legacy-modes/mode/ruby.js +164 -0
- package/dist/node_modules/@codemirror/legacy-modes/mode/ruby.js.map +1 -0
- package/dist/node_modules/@codemirror/legacy-modes/mode/shell.js +109 -0
- package/dist/node_modules/@codemirror/legacy-modes/mode/shell.js.map +1 -0
- package/dist/node_modules/@codemirror/state/dist/index.js +1739 -0
- package/dist/node_modules/@codemirror/state/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/streamparser/dist/index.js +70 -0
- package/dist/node_modules/@codemirror/streamparser/dist/index.js.map +1 -0
- package/dist/node_modules/@codemirror/view/dist/index.js +5427 -0
- package/dist/node_modules/@codemirror/view/dist/index.js.map +1 -0
- package/dist/node_modules/@lezer/common/dist/index.js +896 -0
- package/dist/node_modules/@lezer/common/dist/index.js.map +1 -0
- package/dist/node_modules/@lezer/go/dist/index.js +215 -0
- package/dist/node_modules/@lezer/go/dist/index.js.map +1 -0
- package/dist/node_modules/@lezer/highlight/dist/index.js +395 -0
- package/dist/node_modules/@lezer/highlight/dist/index.js.map +1 -0
- package/dist/node_modules/@lezer/javascript/dist/index.js +437 -0
- package/dist/node_modules/@lezer/javascript/dist/index.js.map +1 -0
- package/dist/node_modules/@lezer/lr/dist/index.js +842 -0
- package/dist/node_modules/@lezer/lr/dist/index.js.map +1 -0
- package/dist/node_modules/@lezer/python/dist/index.js +352 -0
- package/dist/node_modules/@lezer/python/dist/index.js.map +1 -0
- package/dist/node_modules/@marijn/find-cluster-break/src/index.js +66 -0
- package/dist/node_modules/@marijn/find-cluster-break/src/index.js.map +1 -0
- package/dist/node_modules/style-mod/src/style-mod.js +74 -0
- package/dist/node_modules/style-mod/src/style-mod.js.map +1 -0
- package/dist/node_modules/w3c-keyname/index.js +90 -0
- package/dist/node_modules/w3c-keyname/index.js.map +1 -0
- package/dist/stories/fixtures/technospamFixtures.d.ts.map +1 -1
- package/dist/stories/journeys/Problems.stories.d.ts.map +1 -1
- package/dist/technospam/api/technospamApi.d.ts +39 -0
- package/dist/technospam/api/technospamApi.d.ts.map +1 -1
- package/dist/technospam/api/technospamApi.js +120 -86
- package/dist/technospam/api/technospamApi.js.map +1 -1
- package/dist/technospam/components/CertificateVerifyLink.d.ts +11 -0
- package/dist/technospam/components/CertificateVerifyLink.d.ts.map +1 -0
- package/dist/technospam/components/CertificateVerifyLink.js +63 -0
- package/dist/technospam/components/CertificateVerifyLink.js.map +1 -0
- package/dist/technospam/components/SubmissionViews.d.ts +6 -2
- package/dist/technospam/components/SubmissionViews.d.ts.map +1 -1
- package/dist/technospam/components/SubmissionViews.js +6 -5
- package/dist/technospam/components/SubmissionViews.js.map +1 -1
- package/dist/technospam/components/TechnoSpamErrorBoundary.d.ts +6 -0
- package/dist/technospam/components/TechnoSpamErrorBoundary.d.ts.map +1 -1
- package/dist/technospam/components/TechnoSpamErrorBoundary.js +2 -2
- package/dist/technospam/components/TechnoSpamErrorBoundary.js.map +1 -1
- package/dist/technospam/components/editor/CodeEditor.d.ts +26 -0
- package/dist/technospam/components/editor/CodeEditor.d.ts.map +1 -0
- package/dist/technospam/components/editor/CodeEditor.js +102 -0
- package/dist/technospam/components/editor/CodeEditor.js.map +1 -0
- package/dist/technospam/components/editor/RunOutputPanel.d.ts +14 -0
- package/dist/technospam/components/editor/RunOutputPanel.d.ts.map +1 -0
- package/dist/technospam/components/editor/RunOutputPanel.js +127 -0
- package/dist/technospam/components/editor/RunOutputPanel.js.map +1 -0
- package/dist/technospam/components/editor/editorLanguages.d.ts +11 -0
- package/dist/technospam/components/editor/editorLanguages.d.ts.map +1 -0
- package/dist/technospam/components/editor/editorLanguages.js +30 -0
- package/dist/technospam/components/editor/editorLanguages.js.map +1 -0
- package/dist/technospam/components/editor/editorTheme.d.ts +11 -0
- package/dist/technospam/components/editor/editorTheme.d.ts.map +1 -0
- package/dist/technospam/components/editor/editorTheme.js +120 -0
- package/dist/technospam/components/editor/editorTheme.js.map +1 -0
- package/dist/technospam/components/index.d.ts +1 -0
- package/dist/technospam/components/index.d.ts.map +1 -1
- package/dist/technospam/components/index.js +1 -0
- package/dist/technospam/hooks/useSolutionRunner.d.ts +35 -0
- package/dist/technospam/hooks/useSolutionRunner.d.ts.map +1 -0
- package/dist/technospam/hooks/useSolutionRunner.js +66 -0
- package/dist/technospam/hooks/useSolutionRunner.js.map +1 -0
- package/dist/technospam/hooks/useTechnoSpamAnalytics.d.ts +1 -1
- package/dist/technospam/hooks/useTechnoSpamAnalytics.d.ts.map +1 -1
- package/dist/technospam/hooks/useTechnoSpamAnalytics.js.map +1 -1
- package/dist/technospam/index.d.ts +2 -0
- package/dist/technospam/index.d.ts.map +1 -1
- package/dist/technospam/index.js +2 -0
- package/dist/technospam/lib/certificateVerify.d.ts +71 -0
- package/dist/technospam/lib/certificateVerify.d.ts.map +1 -0
- package/dist/technospam/lib/certificateVerify.js +55 -0
- package/dist/technospam/lib/certificateVerify.js.map +1 -0
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js +416 -263
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js +236 -231
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesMyLearningPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/CoursesMyLearningPagePage.js +104 -96
- package/dist/technospam/pages/CoursesMyLearningPagePage.js.map +1 -1
- package/dist/technospam/pages/public/CertificateVerifyPage.d.ts +4 -0
- package/dist/technospam/pages/public/CertificateVerifyPage.d.ts.map +1 -0
- package/dist/technospam/pages/public/CertificateVerifyPage.js +257 -0
- package/dist/technospam/pages/public/CertificateVerifyPage.js.map +1 -0
- package/package.json +14 -4
|
@@ -4,139 +4,140 @@ import { cn as r } from "../utils/cn.js";
|
|
|
4
4
|
import { PageLayout as i } from "../components/PageLayout.js";
|
|
5
5
|
import { StatCard as a } from "../components/StatCard.js";
|
|
6
6
|
import { MediaCover as o, topicIcon as s } from "../components/MediaCover.js";
|
|
7
|
-
import { formatDate as c, formatDuration as
|
|
8
|
-
import { PremiumBadge as
|
|
9
|
-
import { EmptyView as
|
|
10
|
-
import { TagStrip as
|
|
11
|
-
import { notify as
|
|
12
|
-
import { useCourseQuery as
|
|
7
|
+
import { formatDate as c, formatDuration as l, humanizeEnum as u } from "../utils/format.js";
|
|
8
|
+
import { PremiumBadge as d, UpgradeGate as f } from "../components/UpgradeGate.js";
|
|
9
|
+
import { EmptyView as ee, ErrorView as te } from "../components/StateViews.js";
|
|
10
|
+
import { TagStrip as ne } from "../components/TagStrip.js";
|
|
11
|
+
import { notify as p } from "../lib/toast.js";
|
|
12
|
+
import { useCourseQuery as re, useEnroll as ie, useIssueCertificate as ae, useMyCertificatesQuery as oe } from "../api/technospamApi.js";
|
|
13
|
+
import { CertificateVerifyLink as m } from "../components/CertificateVerifyLink.js";
|
|
13
14
|
import "../components/index.js";
|
|
14
|
-
import { offlineScope as
|
|
15
|
-
import { useOnlineStatus as
|
|
16
|
-
import { FOCUS_PARAMS as
|
|
17
|
-
import { lessonPlayerPath as
|
|
18
|
-
import { useFocusedRecordParam as
|
|
19
|
-
import { SaveCourseOffline as
|
|
20
|
-
import { SavedCourseOutline as
|
|
21
|
-
import { useEffect as
|
|
22
|
-
import { ArrowRight as
|
|
15
|
+
import { offlineScope as se, readSavedCourseOutline as ce } from "../lib/offlineLessons.js";
|
|
16
|
+
import { useOnlineStatus as le, usePurgeOtherUsersLessons as ue } from "../hooks/useOfflineLessons.js";
|
|
17
|
+
import { FOCUS_PARAMS as de } from "../utils/pageContext.js";
|
|
18
|
+
import { lessonPlayerPath as h } from "../utils/lessonPath.js";
|
|
19
|
+
import { useFocusedRecordParam as fe } from "../hooks/useFocusedRecordParam.js";
|
|
20
|
+
import { SaveCourseOffline as pe } from "../components/lesson/SaveCourseOffline.js";
|
|
21
|
+
import { SavedCourseOutline as me } from "../components/lesson/SavedCourseOutline.js";
|
|
22
|
+
import { useEffect as g, useMemo as he, useRef as ge } from "react";
|
|
23
|
+
import { ArrowRight as _e, Award as _, BookOpen as ve, CheckCircle2 as v, ChevronDown as y, Clock as b, Eye as x, FileText as S, Layers as C, Lock as w, PlayCircle as T, ShieldCheck as E, Sparkles as D, TrendingUp as O, Trophy as k, Users as ye } from "lucide-react";
|
|
23
24
|
import { useSearchParams as be } from "react-router";
|
|
24
|
-
import { jsx as
|
|
25
|
-
import { Button as
|
|
25
|
+
import { jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
26
|
+
import { Button as M, GlassCard as N, Skeleton as P } from "@burdenoff/fe-libs/ui";
|
|
26
27
|
//#region src/technospam/pages/CoursesCourseDetailsPagePage.tsx
|
|
27
|
-
var
|
|
28
|
+
var F = {
|
|
28
29
|
VIDEO: {
|
|
29
|
-
icon:
|
|
30
|
+
icon: T,
|
|
30
31
|
chip: "bg-accent-primary/15 text-accent-primary",
|
|
31
32
|
badge: "border-accent-primary/25 bg-accent-primary/6 text-accent-primary"
|
|
32
33
|
},
|
|
33
34
|
ARTICLE: {
|
|
34
|
-
icon:
|
|
35
|
+
icon: S,
|
|
35
36
|
chip: "bg-accent-indigo/15 text-accent-indigo",
|
|
36
37
|
badge: "border-accent-indigo/25 bg-accent-indigo/10 text-accent-indigo"
|
|
37
38
|
},
|
|
38
39
|
INTERACTIVE: {
|
|
39
|
-
icon:
|
|
40
|
+
icon: D,
|
|
40
41
|
chip: "bg-accent-teal/15 text-accent-teal",
|
|
41
42
|
badge: "border-accent-teal/25 bg-accent-teal/10 text-accent-teal"
|
|
42
43
|
},
|
|
43
44
|
QUIZ: {
|
|
44
|
-
icon:
|
|
45
|
+
icon: v,
|
|
45
46
|
chip: "bg-accent-purple/15 text-accent-purple",
|
|
46
47
|
badge: "border-accent-purple/25 bg-accent-purple/10 text-accent-purple"
|
|
47
48
|
},
|
|
48
49
|
PROJECT: {
|
|
49
|
-
icon:
|
|
50
|
+
icon: C,
|
|
50
51
|
chip: "bg-status-warning-bg-subtle text-status-warning-text",
|
|
51
52
|
badge: "border-status-warning-border bg-status-warning-bg-subtle text-status-warning-text"
|
|
52
53
|
}
|
|
53
54
|
};
|
|
54
|
-
function
|
|
55
|
-
return /* @__PURE__ */
|
|
55
|
+
function I({ icon: e, children: t }) {
|
|
56
|
+
return /* @__PURE__ */ j("span", {
|
|
56
57
|
className: "inline-flex items-center gap-1 rounded-full bg-white/15 px-2.5 py-1 text-xs font-medium text-white ring-1 ring-white/25 backdrop-blur-sm",
|
|
57
|
-
children: [e ? /* @__PURE__ */
|
|
58
|
+
children: [e ? /* @__PURE__ */ A(e, { size: 12 }) : null, t]
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
61
|
function xe({ lesson: e, index: t, done: n, open: i, onToggle: a, onStart: o }) {
|
|
61
|
-
let s =
|
|
62
|
-
return /* @__PURE__ */
|
|
62
|
+
let s = F[e.kind] ?? F.ARTICLE, c = s.icon, d = `tec-lesson-body-${e.id}`;
|
|
63
|
+
return /* @__PURE__ */ j("div", {
|
|
63
64
|
className: "border-b border-border-seam last:border-b-0",
|
|
64
|
-
children: [/* @__PURE__ */
|
|
65
|
+
children: [/* @__PURE__ */ j("button", {
|
|
65
66
|
type: "button",
|
|
66
67
|
onClick: a,
|
|
67
68
|
"aria-expanded": i,
|
|
68
|
-
"aria-controls":
|
|
69
|
+
"aria-controls": d,
|
|
69
70
|
className: "group flex w-full items-center gap-3 rounded-xl px-2 py-3 text-left transition-colors hover:bg-bg-sunken/60",
|
|
70
71
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ A("span", {
|
|
72
73
|
className: "hidden w-6 shrink-0 text-center text-sm font-medium tabular-nums text-text-muted sm:block",
|
|
73
74
|
children: t + 1
|
|
74
75
|
}),
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ A("span", {
|
|
76
77
|
className: r("flex h-9 w-9 shrink-0 items-center justify-center rounded-lg", n ? "bg-status-success-bg-subtle text-status-success-text" : s.chip),
|
|
77
|
-
children:
|
|
78
|
+
children: A(n ? v : c, { size: 17 })
|
|
78
79
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ j("div", {
|
|
80
81
|
className: "min-w-0 flex-1",
|
|
81
|
-
children: [/* @__PURE__ */
|
|
82
|
+
children: [/* @__PURE__ */ A("span", {
|
|
82
83
|
className: "block truncate text-sm font-medium text-text-primary",
|
|
83
84
|
children: e.title
|
|
84
|
-
}), /* @__PURE__ */
|
|
85
|
+
}), /* @__PURE__ */ j("div", {
|
|
85
86
|
className: "mt-1 flex flex-wrap items-center gap-2",
|
|
86
|
-
children: [/* @__PURE__ */
|
|
87
|
+
children: [/* @__PURE__ */ A("span", {
|
|
87
88
|
className: r("inline-flex items-center rounded-full border px-2 py-0.5 text-[11px] font-medium", s.badge),
|
|
88
|
-
children:
|
|
89
|
-
}), /* @__PURE__ */
|
|
89
|
+
children: u(e.kind)
|
|
90
|
+
}), /* @__PURE__ */ j("span", {
|
|
90
91
|
className: "inline-flex items-center gap-1 text-xs text-text-muted",
|
|
91
92
|
children: [
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ A(b, { size: 12 }),
|
|
93
94
|
" ",
|
|
94
|
-
|
|
95
|
+
l(e.estimatedMinutes)
|
|
95
96
|
]
|
|
96
97
|
})]
|
|
97
98
|
})]
|
|
98
99
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ j("div", {
|
|
100
101
|
className: "flex shrink-0 items-center gap-2",
|
|
101
|
-
children: [n ? /* @__PURE__ */
|
|
102
|
+
children: [n ? /* @__PURE__ */ A(v, {
|
|
102
103
|
size: 18,
|
|
103
104
|
className: "text-status-success-text"
|
|
104
|
-
}) : e.isPreview ? /* @__PURE__ */
|
|
105
|
+
}) : e.isPreview ? /* @__PURE__ */ j("span", {
|
|
105
106
|
className: "inline-flex items-center gap-1 rounded-full border border-accent-primary/30 bg-accent-primary/6 px-2 py-0.5 text-[11px] font-medium text-accent-primary",
|
|
106
|
-
children: [/* @__PURE__ */
|
|
107
|
-
}) : e.isLocked ? /* @__PURE__ */
|
|
107
|
+
children: [/* @__PURE__ */ A(x, { size: 12 }), " Preview"]
|
|
108
|
+
}) : e.isLocked ? /* @__PURE__ */ j("span", {
|
|
108
109
|
className: "inline-flex items-center gap-1 rounded-full border border-status-warning-border/60 bg-status-warning-bg-subtle px-2 py-0.5 text-[11px] font-medium text-status-warning-text",
|
|
109
|
-
children: [/* @__PURE__ */
|
|
110
|
-
}) : /* @__PURE__ */
|
|
110
|
+
children: [/* @__PURE__ */ A(w, { size: 12 }), " Upgrade to unlock"]
|
|
111
|
+
}) : /* @__PURE__ */ A(w, {
|
|
111
112
|
size: 15,
|
|
112
113
|
className: "text-text-muted"
|
|
113
|
-
}), /* @__PURE__ */
|
|
114
|
+
}), /* @__PURE__ */ A(y, {
|
|
114
115
|
size: 16,
|
|
115
116
|
"aria-hidden": !0,
|
|
116
117
|
className: r("text-text-muted transition-transform duration-200", i ? "rotate-180" : "")
|
|
117
118
|
})]
|
|
118
119
|
})
|
|
119
120
|
]
|
|
120
|
-
}), i ? /* @__PURE__ */
|
|
121
|
-
id:
|
|
121
|
+
}), i ? /* @__PURE__ */ A("div", {
|
|
122
|
+
id: d,
|
|
122
123
|
className: "px-2 pb-4 sm:pl-11",
|
|
123
|
-
children: e.isLocked ? /* @__PURE__ */
|
|
124
|
+
children: e.isLocked ? /* @__PURE__ */ A(f, {
|
|
124
125
|
compact: !0,
|
|
125
126
|
description: "This lesson is part of a paid TechnoSpam plan — its content unlocks once your workspace upgrades."
|
|
126
|
-
}) : /* @__PURE__ */
|
|
127
|
+
}) : /* @__PURE__ */ j("div", {
|
|
127
128
|
className: "space-y-3",
|
|
128
|
-
children: [e.content ? /* @__PURE__ */
|
|
129
|
+
children: [e.content ? /* @__PURE__ */ A("div", {
|
|
129
130
|
className: "rounded-xl border border-border-seam bg-bg-sunken p-4",
|
|
130
|
-
children: /* @__PURE__ */
|
|
131
|
+
children: /* @__PURE__ */ A("p", {
|
|
131
132
|
className: "line-clamp-6 whitespace-pre-wrap text-sm leading-relaxed text-text-secondary",
|
|
132
133
|
children: e.content
|
|
133
134
|
})
|
|
134
|
-
}) : null, /* @__PURE__ */
|
|
135
|
+
}) : null, /* @__PURE__ */ j(M, {
|
|
135
136
|
size: "sm",
|
|
136
137
|
onClick: o,
|
|
137
138
|
"data-testid": `open-lesson-${e.id}`,
|
|
138
139
|
children: [
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ A(T, { size: 15 }),
|
|
140
141
|
" ",
|
|
141
142
|
n ? "Review lesson" : "Start lesson"
|
|
142
143
|
]
|
|
@@ -147,205 +148,209 @@ function xe({ lesson: e, index: t, done: n, open: i, onToggle: a, onStart: o })
|
|
|
147
148
|
}
|
|
148
149
|
function Se({ certificate: e, learnerName: t, courseTitle: n }) {
|
|
149
150
|
let r = e.status === "REVOKED";
|
|
150
|
-
return /* @__PURE__ */
|
|
151
|
+
return /* @__PURE__ */ j(N, {
|
|
151
152
|
className: "overflow-hidden p-0",
|
|
152
|
-
children: [/* @__PURE__ */
|
|
153
|
+
children: [/* @__PURE__ */ A("div", {
|
|
153
154
|
className: "border-b border-border-seam px-5 py-3",
|
|
154
|
-
children: /* @__PURE__ */
|
|
155
|
+
children: /* @__PURE__ */ A("span", {
|
|
155
156
|
className: "text-xs font-semibold uppercase tracking-wide text-text-muted",
|
|
156
157
|
children: "Certificate preview"
|
|
157
158
|
})
|
|
158
|
-
}), /* @__PURE__ */
|
|
159
|
+
}), /* @__PURE__ */ j("div", {
|
|
159
160
|
className: "space-y-4 bg-bg-sunken/50 px-5 py-6 text-center",
|
|
160
161
|
children: [
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ j("div", {
|
|
162
163
|
className: "flex items-center justify-center gap-2 text-xs font-semibold uppercase tracking-[0.2em] text-text-muted",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
164
|
+
children: [/* @__PURE__ */ A(_, {
|
|
164
165
|
size: 14,
|
|
165
166
|
className: "text-status-warning-text"
|
|
166
167
|
}), " Certificate of completion"]
|
|
167
168
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ A("h3", {
|
|
169
170
|
className: "text-lg font-bold text-text-primary",
|
|
170
171
|
children: n
|
|
171
172
|
}),
|
|
172
|
-
t ? /* @__PURE__ */
|
|
173
|
+
t ? /* @__PURE__ */ j("p", {
|
|
173
174
|
className: "text-sm text-text-secondary",
|
|
174
|
-
children: ["Awarded to ", /* @__PURE__ */
|
|
175
|
+
children: ["Awarded to ", /* @__PURE__ */ A("span", {
|
|
175
176
|
className: "font-semibold text-text-primary",
|
|
176
177
|
children: t
|
|
177
178
|
})]
|
|
178
179
|
}) : null,
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ j("div", {
|
|
180
181
|
className: "grid grid-cols-1 gap-3 border-t border-border-seam pt-4 text-left sm:grid-cols-3",
|
|
181
182
|
children: [
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("div", {
|
|
183
184
|
className: "text-[11px] font-medium uppercase tracking-wide text-text-muted",
|
|
184
185
|
children: "Serial number"
|
|
185
|
-
}), /* @__PURE__ */
|
|
186
|
+
}), /* @__PURE__ */ A("div", {
|
|
186
187
|
className: "truncate font-mono text-sm text-text-primary",
|
|
187
188
|
children: e.serial
|
|
188
189
|
})] }),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("div", {
|
|
190
191
|
className: "text-[11px] font-medium uppercase tracking-wide text-text-muted",
|
|
191
192
|
children: "Score"
|
|
192
|
-
}), /* @__PURE__ */
|
|
193
|
+
}), /* @__PURE__ */ A("div", {
|
|
193
194
|
className: "text-sm font-semibold text-text-primary",
|
|
194
195
|
children: e.score
|
|
195
196
|
})] }),
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("div", {
|
|
197
198
|
className: "text-[11px] font-medium uppercase tracking-wide text-text-muted",
|
|
198
199
|
children: "Issued on"
|
|
199
|
-
}), /* @__PURE__ */
|
|
200
|
+
}), /* @__PURE__ */ A("div", {
|
|
200
201
|
className: "text-sm text-text-primary",
|
|
201
202
|
children: c(e.issuedAt)
|
|
202
203
|
})] })
|
|
203
204
|
]
|
|
204
205
|
}),
|
|
205
|
-
r ? /* @__PURE__ */
|
|
206
|
+
r ? /* @__PURE__ */ j("div", {
|
|
206
207
|
className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle px-3 py-2 text-left text-xs text-status-error-text",
|
|
207
208
|
children: [
|
|
208
209
|
"This certificate was revoked",
|
|
209
210
|
e.revokedAt ? ` on ${c(e.revokedAt)}` : "",
|
|
210
211
|
e.revokeReason ? ` — ${e.revokeReason}` : "."
|
|
211
212
|
]
|
|
212
|
-
}) : /* @__PURE__ */
|
|
213
|
+
}) : /* @__PURE__ */ j("span", {
|
|
213
214
|
className: "inline-flex items-center gap-1 rounded-full border border-status-success-border bg-status-success-bg-subtle px-2.5 py-1 text-xs font-medium text-status-success-text",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ A(E, { size: 13 }), " Verified"]
|
|
216
|
+
}),
|
|
217
|
+
/* @__PURE__ */ A(m, {
|
|
218
|
+
serial: e.serial,
|
|
219
|
+
className: "border-t border-border-seam pt-4 text-left"
|
|
215
220
|
})
|
|
216
221
|
]
|
|
217
222
|
})]
|
|
218
223
|
});
|
|
219
224
|
}
|
|
220
|
-
function
|
|
221
|
-
let [c] = be(),
|
|
222
|
-
|
|
223
|
-
let { emit:
|
|
224
|
-
|
|
225
|
-
|
|
225
|
+
function L() {
|
|
226
|
+
let [c] = be(), m = c.get("id") ?? "", [y, x] = fe(de.lesson), { currentUser: T, workspaceId: E } = e(), D = t();
|
|
227
|
+
ue(T?.id);
|
|
228
|
+
let { emit: F } = n(), { data: L, loading: R, error: z, refetch: B } = re(m), V = le(), H = se(E, T?.id);
|
|
229
|
+
g(() => {
|
|
230
|
+
m && F("technospam.course.viewed", {
|
|
226
231
|
workspaceId: E,
|
|
227
|
-
entityId:
|
|
232
|
+
entityId: m,
|
|
228
233
|
entityType: "TEC_COURSE"
|
|
229
234
|
});
|
|
230
235
|
}, [
|
|
231
|
-
|
|
236
|
+
m,
|
|
232
237
|
E,
|
|
233
|
-
|
|
238
|
+
F
|
|
234
239
|
]);
|
|
235
|
-
let [
|
|
236
|
-
buiCourseId:
|
|
237
|
-
technospamCourseId:
|
|
238
|
-
skip: !
|
|
239
|
-
}), [
|
|
240
|
-
!
|
|
240
|
+
let [Ce, { loading: U }] = ie(), W = L?.tecCourse ?? null, { certificates: G, refetch: we } = oe({
|
|
241
|
+
buiCourseId: W?.buiCourseId,
|
|
242
|
+
technospamCourseId: m,
|
|
243
|
+
skip: !m
|
|
244
|
+
}), [Te, { loading: K }] = ae(), q = [...W?.lessons ?? []].sort((e, t) => e.position - t.position), J = (W?.enrollments ?? []).find((e) => e.learnerId === T?.id), Y = G.find((e) => e.status === "ISSUED") ?? G[0], Ee = !!J && J.progressPct >= 100, De = async () => {
|
|
245
|
+
!m || !T?.id || (F("technospam.course.certificate_claimed", {
|
|
241
246
|
workspaceId: E,
|
|
242
|
-
entityId:
|
|
247
|
+
entityId: m,
|
|
243
248
|
entityType: "TEC_COURSE"
|
|
244
|
-
}), (await
|
|
245
|
-
courseId:
|
|
249
|
+
}), (await Te({ variables: {
|
|
250
|
+
courseId: m,
|
|
246
251
|
learnerId: T.id,
|
|
247
252
|
score: 100
|
|
248
|
-
} })).data?.tecIssueCertificate && (
|
|
249
|
-
},
|
|
250
|
-
|
|
253
|
+
} })).data?.tecIssueCertificate && (p.success("Certificate issued", "Your verifiable certificate is ready in My Learning."), await we()));
|
|
254
|
+
}, Oe = async () => {
|
|
255
|
+
m && (F("technospam.course.enroll_clicked", {
|
|
251
256
|
workspaceId: E,
|
|
252
|
-
entityId:
|
|
257
|
+
entityId: m,
|
|
253
258
|
entityType: "TEC_COURSE"
|
|
254
|
-
}), (await
|
|
259
|
+
}), (await Ce({ variables: { input: { courseId: m } } })).data?.tecEnroll && (F("technospam.course.enrolled", {
|
|
255
260
|
workspaceId: E,
|
|
256
|
-
entityId:
|
|
261
|
+
entityId: m,
|
|
257
262
|
entityType: "TEC_COURSE"
|
|
258
|
-
}),
|
|
259
|
-
},
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
]),
|
|
265
|
-
if (
|
|
266
|
-
let e =
|
|
267
|
-
|
|
263
|
+
}), p.success("Enrolled", `You're enrolled in "${W?.title}".`), await B()));
|
|
264
|
+
}, X = he(() => W || R ? null : ce(H, m), [
|
|
265
|
+
W,
|
|
266
|
+
R,
|
|
267
|
+
H,
|
|
268
|
+
m
|
|
269
|
+
]), Z = ge(V);
|
|
270
|
+
if (g(() => {
|
|
271
|
+
let e = V && !Z.current;
|
|
272
|
+
Z.current = V, e && !W && B();
|
|
268
273
|
}, [
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
]),
|
|
274
|
+
V,
|
|
275
|
+
W,
|
|
276
|
+
B
|
|
277
|
+
]), R && !W) return /* @__PURE__ */ j(i, {
|
|
273
278
|
title: "Course",
|
|
274
279
|
backPath: "/courses/courses-page",
|
|
275
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ A(P, { className: "mb-4 h-40 w-full rounded-2xl" }), /* @__PURE__ */ A(P, { className: "h-64 w-full rounded-xl" })]
|
|
276
281
|
});
|
|
277
|
-
if (!
|
|
278
|
-
title:
|
|
282
|
+
if (!W && X) return /* @__PURE__ */ A(i, {
|
|
283
|
+
title: X.course.title,
|
|
279
284
|
backPath: "/courses/courses-page",
|
|
280
|
-
children: /* @__PURE__ */
|
|
281
|
-
outline:
|
|
282
|
-
online:
|
|
283
|
-
onOpenLesson: (e) =>
|
|
285
|
+
children: /* @__PURE__ */ A(me, {
|
|
286
|
+
outline: X,
|
|
287
|
+
online: V,
|
|
288
|
+
onOpenLesson: (e) => D(h(m, e))
|
|
284
289
|
})
|
|
285
290
|
});
|
|
286
|
-
if (
|
|
291
|
+
if (z || !W) return /* @__PURE__ */ A(i, {
|
|
287
292
|
title: "Course",
|
|
288
293
|
backPath: "/courses/courses-page",
|
|
289
|
-
children:
|
|
294
|
+
children: z ? /* @__PURE__ */ A(te, {
|
|
290
295
|
title: "Couldn't load course",
|
|
291
|
-
error:
|
|
292
|
-
}) : /* @__PURE__ */
|
|
296
|
+
error: z
|
|
297
|
+
}) : /* @__PURE__ */ A(ee, {
|
|
293
298
|
title: "Course not found",
|
|
294
299
|
description: "This course may have been unpublished."
|
|
295
300
|
})
|
|
296
301
|
});
|
|
297
|
-
let
|
|
298
|
-
return /* @__PURE__ */
|
|
302
|
+
let Q = J?.lessonsCompleted ?? 0, ke = q.find((e) => !e.completedByMe) ?? q[0], Ae = q.length > 0 && q.every((e) => e.completedByMe), je = (e) => D(h(m, e)), $ = Math.max(0, q.length - Q), Me = J && J.progressPct >= 100 ? "Course complete — claim your certificate below." : $ === 1 ? "1 lesson to go — almost there!" : `${$} lessons to go — keep it up!`, Ne = `${W.topic ?? ""} ${W.title}`;
|
|
303
|
+
return /* @__PURE__ */ j(i, {
|
|
299
304
|
backPath: "/courses/courses-page",
|
|
300
|
-
title:
|
|
301
|
-
description:
|
|
302
|
-
actions:
|
|
303
|
-
onClick: () =>
|
|
305
|
+
title: W.title,
|
|
306
|
+
description: W.summary ?? void 0,
|
|
307
|
+
actions: J ? ke ? /* @__PURE__ */ j(M, {
|
|
308
|
+
onClick: () => je(ke.id),
|
|
304
309
|
"data-testid": "continue-learning",
|
|
305
|
-
children: [
|
|
306
|
-
}) : null : /* @__PURE__ */
|
|
307
|
-
onClick:
|
|
308
|
-
disabled:
|
|
310
|
+
children: [A(Ae ? v : _e, { size: 16 }), Ae ? "Review course" : Q > 0 ? "Continue learning" : "Start course"]
|
|
311
|
+
}) : null : /* @__PURE__ */ j(M, {
|
|
312
|
+
onClick: Oe,
|
|
313
|
+
disabled: U,
|
|
309
314
|
children: [
|
|
310
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ A(ve, { size: 16 }),
|
|
311
316
|
" ",
|
|
312
|
-
|
|
317
|
+
U ? "Enrolling…" : "Enroll"
|
|
313
318
|
]
|
|
314
319
|
}),
|
|
315
320
|
children: [
|
|
316
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ A(o, {
|
|
317
322
|
height: "h-40",
|
|
318
323
|
seed: Ne,
|
|
319
|
-
icon: s(
|
|
324
|
+
icon: s(W.topic ?? W.title),
|
|
320
325
|
className: "mb-5 rounded-2xl",
|
|
321
|
-
children: /* @__PURE__ */
|
|
326
|
+
children: /* @__PURE__ */ j("div", {
|
|
322
327
|
className: "flex w-full flex-col gap-2",
|
|
323
328
|
children: [
|
|
324
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ A("span", {
|
|
325
330
|
className: "text-xs font-medium uppercase tracking-wide text-white/80",
|
|
326
|
-
children:
|
|
331
|
+
children: W.topic ?? "Course"
|
|
327
332
|
}),
|
|
328
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ A("h2", {
|
|
329
334
|
className: "text-2xl font-bold leading-tight text-white drop-shadow-sm sm:text-3xl",
|
|
330
|
-
children:
|
|
335
|
+
children: W.title
|
|
331
336
|
}),
|
|
332
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ j("div", {
|
|
333
338
|
className: "flex flex-wrap items-center gap-2",
|
|
334
339
|
children: [
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
-
icon:
|
|
337
|
-
children:
|
|
340
|
+
/* @__PURE__ */ A(I, {
|
|
341
|
+
icon: O,
|
|
342
|
+
children: u(W.level)
|
|
338
343
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
icon:
|
|
341
|
-
children:
|
|
344
|
+
/* @__PURE__ */ A(I, {
|
|
345
|
+
icon: v,
|
|
346
|
+
children: u(W.status)
|
|
342
347
|
}),
|
|
343
|
-
|
|
344
|
-
icon: S,
|
|
345
|
-
children: U.topic
|
|
346
|
-
}) : null,
|
|
347
|
-
U.isPremiumOnly ? /* @__PURE__ */ k(F, {
|
|
348
|
+
W.topic ? /* @__PURE__ */ A(I, {
|
|
348
349
|
icon: C,
|
|
350
|
+
children: W.topic
|
|
351
|
+
}) : null,
|
|
352
|
+
W.isPremiumOnly ? /* @__PURE__ */ A(I, {
|
|
353
|
+
icon: w,
|
|
349
354
|
children: "Premium"
|
|
350
355
|
}) : null
|
|
351
356
|
]
|
|
@@ -353,180 +358,180 @@ function I() {
|
|
|
353
358
|
]
|
|
354
359
|
})
|
|
355
360
|
}),
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
-
tags:
|
|
361
|
+
/* @__PURE__ */ A(ne, {
|
|
362
|
+
tags: W.tags,
|
|
358
363
|
className: "mb-5"
|
|
359
364
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ j("div", {
|
|
361
366
|
className: "mb-6 grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
362
367
|
children: [
|
|
363
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ A(a, {
|
|
364
369
|
label: "Lessons",
|
|
365
|
-
value:
|
|
366
|
-
icon:
|
|
370
|
+
value: q.length,
|
|
371
|
+
icon: S,
|
|
367
372
|
tone: "blue"
|
|
368
373
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ A(a, {
|
|
370
375
|
label: "Duration",
|
|
371
|
-
value:
|
|
372
|
-
icon:
|
|
376
|
+
value: l(W.estimatedMinutes),
|
|
377
|
+
icon: b,
|
|
373
378
|
tone: "teal"
|
|
374
379
|
}),
|
|
375
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ A(a, {
|
|
376
381
|
label: "Enrolled",
|
|
377
|
-
value:
|
|
382
|
+
value: W.enrollments?.length ?? 0,
|
|
378
383
|
icon: ye,
|
|
379
384
|
tone: "indigo"
|
|
380
385
|
}),
|
|
381
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ A(a, {
|
|
382
387
|
label: "Your progress",
|
|
383
|
-
value:
|
|
384
|
-
icon:
|
|
388
|
+
value: J ? `${J.progressPct}%` : "Not started",
|
|
389
|
+
icon: O,
|
|
385
390
|
tone: "purple"
|
|
386
391
|
})
|
|
387
392
|
]
|
|
388
393
|
}),
|
|
389
|
-
|
|
394
|
+
J ? /* @__PURE__ */ j(N, {
|
|
390
395
|
className: "mb-6 p-5",
|
|
391
396
|
children: [
|
|
392
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ j("div", {
|
|
393
398
|
className: "mb-3 flex items-center gap-2",
|
|
394
399
|
children: [
|
|
395
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ A("span", {
|
|
396
401
|
className: "flex h-8 w-8 items-center justify-center rounded-lg bg-accent-primary/15 text-accent-primary",
|
|
397
|
-
children: /* @__PURE__ */
|
|
402
|
+
children: /* @__PURE__ */ A(O, { size: 16 })
|
|
398
403
|
}),
|
|
399
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ A("span", {
|
|
400
405
|
className: "text-sm font-semibold text-text-primary",
|
|
401
406
|
children: "Your progress"
|
|
402
407
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ j("span", {
|
|
404
409
|
className: "ml-auto text-sm text-text-secondary",
|
|
405
410
|
children: [
|
|
406
|
-
|
|
411
|
+
Q,
|
|
407
412
|
"/",
|
|
408
|
-
|
|
413
|
+
q.length,
|
|
409
414
|
" lessons · ",
|
|
410
|
-
|
|
415
|
+
J.progressPct,
|
|
411
416
|
"%"
|
|
412
417
|
]
|
|
413
418
|
})
|
|
414
419
|
]
|
|
415
420
|
}),
|
|
416
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ A("div", {
|
|
417
422
|
className: "h-2.5 w-full overflow-hidden rounded-full bg-bg-sunken",
|
|
418
|
-
children: /* @__PURE__ */
|
|
423
|
+
children: /* @__PURE__ */ A("div", {
|
|
419
424
|
className: "h-full rounded-full bg-gradient-to-r from-accent-primary via-accent-indigo to-accent-purple transition-all duration-500",
|
|
420
|
-
style: { width: `${
|
|
425
|
+
style: { width: `${J.progressPct}%` }
|
|
421
426
|
})
|
|
422
427
|
}),
|
|
423
|
-
/* @__PURE__ */
|
|
428
|
+
/* @__PURE__ */ A("p", {
|
|
424
429
|
className: "mt-2 text-xs text-text-muted",
|
|
425
430
|
children: Me
|
|
426
431
|
})
|
|
427
432
|
]
|
|
428
433
|
}) : null,
|
|
429
|
-
|
|
434
|
+
Y ? /* @__PURE__ */ j("div", {
|
|
430
435
|
className: "mb-6 grid grid-cols-1 gap-4 lg:grid-cols-2",
|
|
431
|
-
children: [/* @__PURE__ */
|
|
432
|
-
className: r("flex items-center gap-4 border p-5",
|
|
433
|
-
children: [/* @__PURE__ */
|
|
436
|
+
children: [/* @__PURE__ */ j(N, {
|
|
437
|
+
className: r("flex items-center gap-4 border p-5", Y.status === "REVOKED" ? "border-status-error-border/60 bg-status-error-bg-subtle/20" : "border-status-success-border/60 bg-status-success-bg-subtle/30"),
|
|
438
|
+
children: [/* @__PURE__ */ A("span", {
|
|
434
439
|
className: "flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-status-warning-bg-subtle text-status-warning-text ring-1 ring-status-warning-border/40",
|
|
435
|
-
children: /* @__PURE__ */ k
|
|
436
|
-
}), /* @__PURE__ */
|
|
440
|
+
children: /* @__PURE__ */ A(k, { size: 26 })
|
|
441
|
+
}), /* @__PURE__ */ j("div", {
|
|
437
442
|
className: "min-w-0",
|
|
438
|
-
children: [/* @__PURE__ */
|
|
443
|
+
children: [/* @__PURE__ */ A("div", {
|
|
439
444
|
className: "text-base font-semibold text-text-primary",
|
|
440
|
-
children:
|
|
441
|
-
}), /* @__PURE__ */
|
|
445
|
+
children: Y.status === "REVOKED" ? "Your certificate was revoked" : "You finished this course"
|
|
446
|
+
}), /* @__PURE__ */ A("div", {
|
|
442
447
|
className: "text-sm text-text-muted",
|
|
443
|
-
children:
|
|
448
|
+
children: Y.status === "REVOKED" ? "Contact a workspace admin if you believe this was a mistake." : "Your verifiable certificate of completion is issued — it also appears in My Learning."
|
|
444
449
|
})]
|
|
445
450
|
})]
|
|
446
|
-
}), /* @__PURE__ */
|
|
447
|
-
certificate:
|
|
451
|
+
}), /* @__PURE__ */ A(Se, {
|
|
452
|
+
certificate: Y,
|
|
448
453
|
learnerName: T?.name ?? void 0,
|
|
449
|
-
courseTitle:
|
|
454
|
+
courseTitle: Y.course?.title ?? W.title
|
|
450
455
|
})]
|
|
451
|
-
}) :
|
|
456
|
+
}) : Ee ? /* @__PURE__ */ j(N, {
|
|
452
457
|
className: "mb-6 flex flex-col items-start gap-4 border border-status-success-border/60 bg-status-success-bg-subtle/40 p-5 sm:flex-row sm:items-center sm:justify-between",
|
|
453
|
-
children: [/* @__PURE__ */
|
|
458
|
+
children: [/* @__PURE__ */ j("div", {
|
|
454
459
|
className: "flex items-center gap-4",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
460
|
+
children: [/* @__PURE__ */ A("span", {
|
|
456
461
|
className: "flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl bg-status-warning-bg-subtle text-status-warning-text ring-1 ring-status-warning-border/40",
|
|
457
|
-
children: /* @__PURE__ */ k
|
|
458
|
-
}), /* @__PURE__ */
|
|
462
|
+
children: /* @__PURE__ */ A(k, { size: 26 })
|
|
463
|
+
}), /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("div", {
|
|
459
464
|
className: "text-base font-semibold text-text-primary",
|
|
460
465
|
children: "You finished this course"
|
|
461
|
-
}), /* @__PURE__ */
|
|
466
|
+
}), /* @__PURE__ */ A("div", {
|
|
462
467
|
className: "text-sm text-text-muted",
|
|
463
468
|
children: "Claim your verifiable certificate of completion."
|
|
464
469
|
})] })]
|
|
465
|
-
}), /* @__PURE__ */
|
|
466
|
-
onClick:
|
|
467
|
-
disabled:
|
|
470
|
+
}), /* @__PURE__ */ j(M, {
|
|
471
|
+
onClick: De,
|
|
472
|
+
disabled: K,
|
|
468
473
|
children: [
|
|
469
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ A(_, { size: 16 }),
|
|
470
475
|
" ",
|
|
471
|
-
|
|
476
|
+
K ? "Issuing…" : "Claim certificate"
|
|
472
477
|
]
|
|
473
478
|
})]
|
|
474
479
|
}) : null,
|
|
475
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ j(N, {
|
|
476
481
|
className: "p-5",
|
|
477
482
|
children: [
|
|
478
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ j("div", {
|
|
479
484
|
className: "mb-3 flex items-center justify-between gap-2",
|
|
480
|
-
children: [/* @__PURE__ */
|
|
485
|
+
children: [/* @__PURE__ */ j("h2", {
|
|
481
486
|
className: "flex items-center gap-2 text-base font-semibold text-text-primary",
|
|
482
487
|
children: [
|
|
483
|
-
/* @__PURE__ */
|
|
488
|
+
/* @__PURE__ */ A(ve, {
|
|
484
489
|
size: 18,
|
|
485
490
|
className: "text-accent-primary"
|
|
486
491
|
}),
|
|
487
492
|
" Curriculum",
|
|
488
|
-
|
|
493
|
+
W.isPremiumOnly ? /* @__PURE__ */ A(d, { locked: W.isLocked }) : null
|
|
489
494
|
]
|
|
490
|
-
}), /* @__PURE__ */
|
|
495
|
+
}), /* @__PURE__ */ j("div", {
|
|
491
496
|
className: "flex flex-wrap items-center justify-end gap-2",
|
|
492
|
-
children: [
|
|
493
|
-
scope:
|
|
494
|
-
courseId:
|
|
495
|
-
lessons:
|
|
497
|
+
children: [J ? /* @__PURE__ */ A(pe, {
|
|
498
|
+
scope: H,
|
|
499
|
+
courseId: W.id,
|
|
500
|
+
lessons: q,
|
|
496
501
|
enrollment: {
|
|
497
|
-
id:
|
|
498
|
-
progressPct:
|
|
502
|
+
id: J.id,
|
|
503
|
+
progressPct: J.progressPct
|
|
499
504
|
}
|
|
500
|
-
}) : null,
|
|
505
|
+
}) : null, q.length ? /* @__PURE__ */ j("span", {
|
|
501
506
|
className: "rounded-full bg-status-success-bg-subtle px-2.5 py-1 text-xs font-medium text-status-success-text",
|
|
502
507
|
children: [
|
|
503
|
-
|
|
508
|
+
Q,
|
|
504
509
|
"/",
|
|
505
|
-
|
|
510
|
+
q.length,
|
|
506
511
|
" completed"
|
|
507
512
|
]
|
|
508
513
|
}) : null]
|
|
509
514
|
})]
|
|
510
515
|
}),
|
|
511
|
-
|
|
516
|
+
W.isLocked ? /* @__PURE__ */ A("div", {
|
|
512
517
|
className: "mb-4",
|
|
513
|
-
children: /* @__PURE__ */
|
|
518
|
+
children: /* @__PURE__ */ A(f, {
|
|
514
519
|
compact: !0,
|
|
515
520
|
description: "This course is on a paid TechnoSpam plan. Preview lessons below stay free — the rest unlock once your workspace upgrades."
|
|
516
521
|
})
|
|
517
522
|
}) : null,
|
|
518
|
-
|
|
523
|
+
q.length === 0 ? /* @__PURE__ */ A("p", {
|
|
519
524
|
className: "py-6 text-center text-sm text-text-muted",
|
|
520
525
|
children: "Lessons for this course are being prepared."
|
|
521
|
-
}) : /* @__PURE__ */
|
|
526
|
+
}) : /* @__PURE__ */ A("div", {
|
|
522
527
|
className: "flex flex-col",
|
|
523
|
-
children:
|
|
528
|
+
children: q.map((e, t) => /* @__PURE__ */ A(xe, {
|
|
524
529
|
lesson: e,
|
|
525
530
|
index: t,
|
|
526
531
|
done: !!e.completedByMe,
|
|
527
|
-
open:
|
|
528
|
-
onToggle: () =>
|
|
529
|
-
onStart: () =>
|
|
532
|
+
open: y === e.id,
|
|
533
|
+
onToggle: () => x(y === e.id ? null : e.id),
|
|
534
|
+
onStart: () => je(e.id)
|
|
530
535
|
}, e.id))
|
|
531
536
|
})
|
|
532
537
|
]
|
|
@@ -535,6 +540,6 @@ function I() {
|
|
|
535
540
|
});
|
|
536
541
|
}
|
|
537
542
|
//#endregion
|
|
538
|
-
export {
|
|
543
|
+
export { L as CoursesCourseDetailsPagePage };
|
|
539
544
|
|
|
540
545
|
//# sourceMappingURL=CoursesCourseDetailsPagePage.js.map
|