@learnpack/learnpack 5.0.258 → 5.0.261
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/lib/creatorDist/assets/{index-2CbcfNHW.js → index-BvHkfJm4.js} +51 -52
- package/lib/creatorDist/index.html +1 -1
- package/package.json +1 -1
- package/src/creator/src/App.tsx +0 -1
- package/src/creatorDist/assets/{index-2CbcfNHW.js → index-BvHkfJm4.js} +51 -52
- package/src/creatorDist/index.html +1 -1
@@ -7549,7 +7549,7 @@ Error generating stack: ` +
|
|
7549
7549
|
(a.stateNode = null),
|
7550
7550
|
(a.updateQueue = null)
|
7551
7551
|
}
|
7552
|
-
var
|
7552
|
+
var Ke = null,
|
7553
7553
|
qt = !1
|
7554
7554
|
function oa(a, r, o) {
|
7555
7555
|
for (o = o.child; o !== null; ) ak(a, r, o), (o = o.sibling)
|
@@ -7569,48 +7569,48 @@ Error generating stack: ` +
|
|
7569
7569
|
break
|
7570
7570
|
case 27:
|
7571
7571
|
it || Nn(o, r)
|
7572
|
-
var c =
|
7572
|
+
var c = Ke,
|
7573
7573
|
m = qt
|
7574
|
-
La(o.type) && ((
|
7574
|
+
La(o.type) && ((Ke = o.stateNode), (qt = !1)),
|
7575
7575
|
oa(a, r, o),
|
7576
7576
|
Ds(o.stateNode),
|
7577
|
-
(
|
7577
|
+
(Ke = c),
|
7578
7578
|
(qt = m)
|
7579
7579
|
break
|
7580
7580
|
case 5:
|
7581
7581
|
it || Nn(o, r)
|
7582
7582
|
case 6:
|
7583
7583
|
if (
|
7584
|
-
((c =
|
7584
|
+
((c = Ke),
|
7585
7585
|
(m = qt),
|
7586
|
-
(
|
7586
|
+
(Ke = null),
|
7587
7587
|
oa(a, r, o),
|
7588
|
-
(
|
7588
|
+
(Ke = c),
|
7589
7589
|
(qt = m),
|
7590
|
-
|
7590
|
+
Ke !== null)
|
7591
7591
|
)
|
7592
7592
|
if (qt)
|
7593
7593
|
try {
|
7594
|
-
;(
|
7595
|
-
?
|
7596
|
-
:
|
7597
|
-
?
|
7598
|
-
:
|
7594
|
+
;(Ke.nodeType === 9
|
7595
|
+
? Ke.body
|
7596
|
+
: Ke.nodeName === "HTML"
|
7597
|
+
? Ke.ownerDocument.body
|
7598
|
+
: Ke
|
7599
7599
|
).removeChild(o.stateNode)
|
7600
7600
|
} catch (g) {
|
7601
7601
|
He(o, r, g)
|
7602
7602
|
}
|
7603
7603
|
else
|
7604
7604
|
try {
|
7605
|
-
|
7605
|
+
Ke.removeChild(o.stateNode)
|
7606
7606
|
} catch (g) {
|
7607
7607
|
He(o, r, g)
|
7608
7608
|
}
|
7609
7609
|
break
|
7610
7610
|
case 18:
|
7611
|
-
|
7611
|
+
Ke !== null &&
|
7612
7612
|
(qt
|
7613
|
-
? ((a =
|
7613
|
+
? ((a = Ke),
|
7614
7614
|
$k(
|
7615
7615
|
a.nodeType === 9
|
7616
7616
|
? a.body
|
@@ -7620,15 +7620,15 @@ Error generating stack: ` +
|
|
7620
7620
|
o.stateNode
|
7621
7621
|
),
|
7622
7622
|
Fs(a))
|
7623
|
-
: $k(
|
7623
|
+
: $k(Ke, o.stateNode))
|
7624
7624
|
break
|
7625
7625
|
case 4:
|
7626
|
-
;(c =
|
7626
|
+
;(c = Ke),
|
7627
7627
|
(m = qt),
|
7628
|
-
(
|
7628
|
+
(Ke = o.stateNode.containerInfo),
|
7629
7629
|
(qt = !0),
|
7630
7630
|
oa(a, r, o),
|
7631
|
-
(
|
7631
|
+
(Ke = c),
|
7632
7632
|
(qt = m)
|
7633
7633
|
break
|
7634
7634
|
case 0:
|
@@ -7703,23 +7703,23 @@ Error generating stack: ` +
|
|
7703
7703
|
switch (C.tag) {
|
7704
7704
|
case 27:
|
7705
7705
|
if (La(C.type)) {
|
7706
|
-
;(
|
7706
|
+
;(Ke = C.stateNode), (qt = !1)
|
7707
7707
|
break e
|
7708
7708
|
}
|
7709
7709
|
break
|
7710
7710
|
case 5:
|
7711
|
-
;(
|
7711
|
+
;(Ke = C.stateNode), (qt = !1)
|
7712
7712
|
break e
|
7713
7713
|
case 3:
|
7714
7714
|
case 4:
|
7715
|
-
;(
|
7715
|
+
;(Ke = C.stateNode.containerInfo), (qt = !0)
|
7716
7716
|
break e
|
7717
7717
|
}
|
7718
7718
|
C = C.return
|
7719
7719
|
}
|
7720
|
-
if (
|
7720
|
+
if (Ke === null) throw Error(i(160))
|
7721
7721
|
ak(g, w, m),
|
7722
|
-
(
|
7722
|
+
(Ke = null),
|
7723
7723
|
(qt = !1),
|
7724
7724
|
(g = m.alternate),
|
7725
7725
|
g !== null && (g.return = null),
|
@@ -15080,7 +15080,7 @@ var PE = ({
|
|
15080
15080
|
})
|
15081
15081
|
)
|
15082
15082
|
},
|
15083
|
-
|
15083
|
+
Xe = mt
|
15084
15084
|
const $E = (e, t, n, i) => {
|
15085
15085
|
var l, u, f, h
|
15086
15086
|
const s = [n, { code: t, ...(i || {}) }]
|
@@ -18680,8 +18680,8 @@ const Sv = async (e) => {
|
|
18680
18680
|
return (
|
18681
18681
|
console.log("error trying to create course", u),
|
18682
18682
|
((s = u.response) == null ? void 0 : s.status) === 403
|
18683
|
-
?
|
18684
|
-
:
|
18683
|
+
? Xe.error("You've reached the limit. Please log in to continue.")
|
18684
|
+
: Xe.error("Something went wrong while generating the course."),
|
18685
18685
|
null
|
18686
18686
|
)
|
18687
18687
|
}
|
@@ -21122,7 +21122,7 @@ const Ys = new Uv(""),
|
|
21122
21122
|
N = `${window.location.origin}/notifications/${_}`
|
21123
21123
|
V.append("webhook_callback_url", N),
|
21124
21124
|
V.append("limit_exceeded_behavior", y)
|
21125
|
-
const I =
|
21125
|
+
const I = Xe.loading(`Processing ${S.name}...`)
|
21126
21126
|
try {
|
21127
21127
|
const $ = await qe.post(
|
21128
21128
|
`${Ei}/v1/learnpack/public/tools/read-document`,
|
@@ -21132,17 +21132,17 @@ const Ys = new Uv(""),
|
|
21132
21132
|
if ($.status >= 300) throw new Error(`Failed to read ${S.name}`)
|
21133
21133
|
const Z = $.data
|
21134
21134
|
return (
|
21135
|
-
|
21135
|
+
Xe.success(`Processing ${S.name}`, { id: I }),
|
21136
21136
|
{ name: R, text: "", status: Z.status, notificationId: _ }
|
21137
21137
|
)
|
21138
21138
|
} catch ($) {
|
21139
21139
|
return (
|
21140
21140
|
console.log($.response.data, "ERROR IN FILE UPLOADER"),
|
21141
21141
|
$.response.data.error_code === "too_many_images"
|
21142
|
-
?
|
21142
|
+
? Xe.error(`❌ ${n("uploader.files.maxImagesPerPDFError")}`, {
|
21143
21143
|
id: I,
|
21144
21144
|
})
|
21145
|
-
:
|
21145
|
+
: Xe.error(n("uploader.files.errorProcessingPDF"), { id: I }),
|
21146
21146
|
{ name: R, text: "", status: "ERROR", notificationId: "" }
|
21147
21147
|
)
|
21148
21148
|
}
|
@@ -21150,7 +21150,7 @@ const Ys = new Uv(""),
|
|
21150
21150
|
x = async (S) => {
|
21151
21151
|
const z = Array.from(S).filter((_) => ST.includes(_.type))
|
21152
21152
|
if (z.length === 0) {
|
21153
|
-
|
21153
|
+
Xe.error("No valid files selected")
|
21154
21154
|
return
|
21155
21155
|
}
|
21156
21156
|
p(!0)
|
@@ -21641,7 +21641,7 @@ function RT() {
|
|
21641
21641
|
console.log("RES", re), z(re.notificationId)
|
21642
21642
|
} catch (H) {
|
21643
21643
|
console.error(H, "ERROR CREATING TUTORIAL"),
|
21644
|
-
|
21644
|
+
Xe.error("Something went wrong. Please try again."),
|
21645
21645
|
s({ isCompleted: !1, currentStep: "hasContentIndex" })
|
21646
21646
|
}
|
21647
21647
|
},
|
@@ -21730,11 +21730,11 @@ function RT() {
|
|
21730
21730
|
onSuccess: async (te) => {
|
21731
21731
|
const { human: ie, message: re, token: oe } = await jv(te)
|
21732
21732
|
ie
|
21733
|
-
? (
|
21733
|
+
? (Xe.success(t("stepWizard.humanSuccess")),
|
21734
21734
|
console.log("JWT TOKEN received", oe),
|
21735
21735
|
l({ ...y, publicToken: oe }),
|
21736
21736
|
s({ currentStep: "hasContentIndex" }))
|
21737
|
-
: (
|
21737
|
+
: (Xe.error(re), s({ currentStep: "purpose" }))
|
21738
21738
|
},
|
21739
21739
|
}),
|
21740
21740
|
},
|
@@ -21811,8 +21811,7 @@ function RT() {
|
|
21811
21811
|
S &&
|
21812
21812
|
E.jsx(Iv, {
|
21813
21813
|
onNotification: (H) => {
|
21814
|
-
console.log("Async response", H)
|
21815
|
-
Ke.success("Initial course created successfully")
|
21814
|
+
console.log("Async response", H)
|
21816
21815
|
const ee = H.parsed.listOfSteps.map((te) => vv(te, []))
|
21817
21816
|
u({
|
21818
21817
|
lessons: ee,
|
@@ -30368,7 +30367,7 @@ const qD = ({ messages: e, syllabus: t }) => {
|
|
30368
30367
|
f.lessons.length > 0 &&
|
30369
30368
|
E.jsxs("button", {
|
30370
30369
|
onClick: () => {
|
30371
|
-
s(),
|
30370
|
+
s(), Xe.success(n("contentIndex.changesReverted"))
|
30372
30371
|
},
|
30373
30372
|
className:
|
30374
30373
|
"w-full sm:w-auto text-gray-500 bg-gray-200 rounded px-4 py-2 hover:bg-gray-300 flex items-center justify-center gap-2 cursor-pointer",
|
@@ -37949,18 +37948,18 @@ function mL({ onFinish: e }) {
|
|
37949
37948
|
{ setAuth: x } = Ie(wm((_) => ({ setAuth: _.setAuth }))),
|
37950
37949
|
j = async (_) => {
|
37951
37950
|
_.preventDefault(), f(!0)
|
37952
|
-
const N =
|
37951
|
+
const N = Xe.loading(t("login.loggingIn"))
|
37953
37952
|
try {
|
37954
37953
|
if (!n || !s) {
|
37955
|
-
f(!1),
|
37954
|
+
f(!1), Xe.error(t("login.pleaseFillAllFields"), { id: N })
|
37956
37955
|
return
|
37957
37956
|
}
|
37958
37957
|
const I = await w5({ email: n, password: s })
|
37959
37958
|
if (!I) {
|
37960
|
-
f(!1),
|
37959
|
+
f(!1), Xe.error(t("login.invalidCredentials"), { id: N })
|
37961
37960
|
return
|
37962
37961
|
}
|
37963
|
-
|
37962
|
+
Xe.success(t("login.loggedInSuccessfully"), { id: N }),
|
37964
37963
|
x({
|
37965
37964
|
bcToken: I.token,
|
37966
37965
|
userId: I.user.id,
|
@@ -37971,25 +37970,25 @@ function mL({ onFinish: e }) {
|
|
37971
37970
|
f(!1),
|
37972
37971
|
e()
|
37973
37972
|
} catch (I) {
|
37974
|
-
console.error(I),
|
37973
|
+
console.error(I), Xe.error("Invalid credentials", { id: N }), f(!1)
|
37975
37974
|
}
|
37976
37975
|
},
|
37977
37976
|
T = async (_) => {
|
37978
37977
|
_.preventDefault(), f(!0)
|
37979
|
-
const N =
|
37978
|
+
const N = Xe.loading(t("login.creatingAccount")),
|
37980
37979
|
{ firstName: I, lastName: $, email: Z } = k
|
37981
37980
|
if (!I || !$ || !Z) {
|
37982
|
-
f(!1),
|
37981
|
+
f(!1), Xe.error(t("login.pleaseFillAllFields"), { id: N })
|
37983
37982
|
return
|
37984
37983
|
}
|
37985
37984
|
try {
|
37986
37985
|
await S5(I, $, Z),
|
37987
|
-
|
37986
|
+
Xe.success(t("login.accountCreated"), { id: N }),
|
37988
37987
|
y(!1),
|
37989
37988
|
d(!0),
|
37990
37989
|
i(Z)
|
37991
37990
|
} catch {
|
37992
|
-
|
37991
|
+
Xe.error(t("login.registrationFailed"), { id: N })
|
37993
37992
|
} finally {
|
37994
37993
|
f(!1)
|
37995
37994
|
}
|
@@ -38238,7 +38237,7 @@ const pL = () => {
|
|
38238
38237
|
}, [])
|
38239
38238
|
const R = async () => {
|
38240
38239
|
if (!z.courseInfo.title) {
|
38241
|
-
|
38240
|
+
Xe.error("Please provide a title for the course")
|
38242
38241
|
return
|
38243
38242
|
}
|
38244
38243
|
let N = z.courseInfo.slug,
|
@@ -38316,7 +38315,7 @@ USER: ${N}`,
|
|
38316
38315
|
return
|
38317
38316
|
}
|
38318
38317
|
if (!z.courseInfo.title) {
|
38319
|
-
|
38318
|
+
Xe.error("Please provide a title for the course")
|
38320
38319
|
return
|
38321
38320
|
}
|
38322
38321
|
let N = i.rigoToken
|
@@ -38328,10 +38327,10 @@ USER: ${N}`,
|
|
38328
38327
|
return
|
38329
38328
|
}
|
38330
38329
|
if (!(await b5(i.bcToken, "ai-course-generation"))) {
|
38331
|
-
|
38330
|
+
Xe.error(
|
38332
38331
|
"You don't have enough credits to generate a course! Please add more credits to your account."
|
38333
38332
|
),
|
38334
|
-
|
38333
|
+
Xe.loading(
|
38335
38334
|
"You will be redirected to the settings page in 5 seconds."
|
38336
38335
|
),
|
38337
38336
|
setTimeout(() => {
|
@@ -10,7 +10,7 @@
|
|
10
10
|
/>
|
11
11
|
|
12
12
|
<title>Learnpack Creator: Craft tutorials in seconds!</title>
|
13
|
-
<script type="module" crossorigin src="/creator/assets/index-
|
13
|
+
<script type="module" crossorigin src="/creator/assets/index-BvHkfJm4.js"></script>
|
14
14
|
<link rel="stylesheet" crossorigin href="/creator/assets/index-DmpsXknz.css">
|
15
15
|
</head>
|
16
16
|
<body>
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@learnpack/learnpack",
|
3
3
|
"description": "Seamlessly build, sell and/or take interactive & auto-graded tutorials, start learning now or build a new tutorial to your audience.",
|
4
|
-
"version": "5.0.
|
4
|
+
"version": "5.0.261",
|
5
5
|
"author": "Alejandro Sanchez @alesanchezr",
|
6
6
|
"contributors": [
|
7
7
|
{
|
package/src/creator/src/App.tsx
CHANGED
@@ -456,7 +456,6 @@ function App() {
|
|
456
456
|
<NotificationListener
|
457
457
|
onNotification={(res) => {
|
458
458
|
console.log("Async response", res)
|
459
|
-
toast.success("Initial course created successfully")
|
460
459
|
const lessons = res.parsed.listOfSteps.map((lesson: any) => {
|
461
460
|
return parseLesson(lesson, [])
|
462
461
|
})
|
@@ -7549,7 +7549,7 @@ Error generating stack: ` +
|
|
7549
7549
|
(a.stateNode = null),
|
7550
7550
|
(a.updateQueue = null)
|
7551
7551
|
}
|
7552
|
-
var
|
7552
|
+
var Ke = null,
|
7553
7553
|
qt = !1
|
7554
7554
|
function oa(a, r, o) {
|
7555
7555
|
for (o = o.child; o !== null; ) ak(a, r, o), (o = o.sibling)
|
@@ -7569,48 +7569,48 @@ Error generating stack: ` +
|
|
7569
7569
|
break
|
7570
7570
|
case 27:
|
7571
7571
|
it || Nn(o, r)
|
7572
|
-
var c =
|
7572
|
+
var c = Ke,
|
7573
7573
|
m = qt
|
7574
|
-
La(o.type) && ((
|
7574
|
+
La(o.type) && ((Ke = o.stateNode), (qt = !1)),
|
7575
7575
|
oa(a, r, o),
|
7576
7576
|
Ds(o.stateNode),
|
7577
|
-
(
|
7577
|
+
(Ke = c),
|
7578
7578
|
(qt = m)
|
7579
7579
|
break
|
7580
7580
|
case 5:
|
7581
7581
|
it || Nn(o, r)
|
7582
7582
|
case 6:
|
7583
7583
|
if (
|
7584
|
-
((c =
|
7584
|
+
((c = Ke),
|
7585
7585
|
(m = qt),
|
7586
|
-
(
|
7586
|
+
(Ke = null),
|
7587
7587
|
oa(a, r, o),
|
7588
|
-
(
|
7588
|
+
(Ke = c),
|
7589
7589
|
(qt = m),
|
7590
|
-
|
7590
|
+
Ke !== null)
|
7591
7591
|
)
|
7592
7592
|
if (qt)
|
7593
7593
|
try {
|
7594
|
-
;(
|
7595
|
-
?
|
7596
|
-
:
|
7597
|
-
?
|
7598
|
-
:
|
7594
|
+
;(Ke.nodeType === 9
|
7595
|
+
? Ke.body
|
7596
|
+
: Ke.nodeName === "HTML"
|
7597
|
+
? Ke.ownerDocument.body
|
7598
|
+
: Ke
|
7599
7599
|
).removeChild(o.stateNode)
|
7600
7600
|
} catch (g) {
|
7601
7601
|
He(o, r, g)
|
7602
7602
|
}
|
7603
7603
|
else
|
7604
7604
|
try {
|
7605
|
-
|
7605
|
+
Ke.removeChild(o.stateNode)
|
7606
7606
|
} catch (g) {
|
7607
7607
|
He(o, r, g)
|
7608
7608
|
}
|
7609
7609
|
break
|
7610
7610
|
case 18:
|
7611
|
-
|
7611
|
+
Ke !== null &&
|
7612
7612
|
(qt
|
7613
|
-
? ((a =
|
7613
|
+
? ((a = Ke),
|
7614
7614
|
$k(
|
7615
7615
|
a.nodeType === 9
|
7616
7616
|
? a.body
|
@@ -7620,15 +7620,15 @@ Error generating stack: ` +
|
|
7620
7620
|
o.stateNode
|
7621
7621
|
),
|
7622
7622
|
Fs(a))
|
7623
|
-
: $k(
|
7623
|
+
: $k(Ke, o.stateNode))
|
7624
7624
|
break
|
7625
7625
|
case 4:
|
7626
|
-
;(c =
|
7626
|
+
;(c = Ke),
|
7627
7627
|
(m = qt),
|
7628
|
-
(
|
7628
|
+
(Ke = o.stateNode.containerInfo),
|
7629
7629
|
(qt = !0),
|
7630
7630
|
oa(a, r, o),
|
7631
|
-
(
|
7631
|
+
(Ke = c),
|
7632
7632
|
(qt = m)
|
7633
7633
|
break
|
7634
7634
|
case 0:
|
@@ -7703,23 +7703,23 @@ Error generating stack: ` +
|
|
7703
7703
|
switch (C.tag) {
|
7704
7704
|
case 27:
|
7705
7705
|
if (La(C.type)) {
|
7706
|
-
;(
|
7706
|
+
;(Ke = C.stateNode), (qt = !1)
|
7707
7707
|
break e
|
7708
7708
|
}
|
7709
7709
|
break
|
7710
7710
|
case 5:
|
7711
|
-
;(
|
7711
|
+
;(Ke = C.stateNode), (qt = !1)
|
7712
7712
|
break e
|
7713
7713
|
case 3:
|
7714
7714
|
case 4:
|
7715
|
-
;(
|
7715
|
+
;(Ke = C.stateNode.containerInfo), (qt = !0)
|
7716
7716
|
break e
|
7717
7717
|
}
|
7718
7718
|
C = C.return
|
7719
7719
|
}
|
7720
|
-
if (
|
7720
|
+
if (Ke === null) throw Error(i(160))
|
7721
7721
|
ak(g, w, m),
|
7722
|
-
(
|
7722
|
+
(Ke = null),
|
7723
7723
|
(qt = !1),
|
7724
7724
|
(g = m.alternate),
|
7725
7725
|
g !== null && (g.return = null),
|
@@ -15080,7 +15080,7 @@ var PE = ({
|
|
15080
15080
|
})
|
15081
15081
|
)
|
15082
15082
|
},
|
15083
|
-
|
15083
|
+
Xe = mt
|
15084
15084
|
const $E = (e, t, n, i) => {
|
15085
15085
|
var l, u, f, h
|
15086
15086
|
const s = [n, { code: t, ...(i || {}) }]
|
@@ -18680,8 +18680,8 @@ const Sv = async (e) => {
|
|
18680
18680
|
return (
|
18681
18681
|
console.log("error trying to create course", u),
|
18682
18682
|
((s = u.response) == null ? void 0 : s.status) === 403
|
18683
|
-
?
|
18684
|
-
:
|
18683
|
+
? Xe.error("You've reached the limit. Please log in to continue.")
|
18684
|
+
: Xe.error("Something went wrong while generating the course."),
|
18685
18685
|
null
|
18686
18686
|
)
|
18687
18687
|
}
|
@@ -21122,7 +21122,7 @@ const Ys = new Uv(""),
|
|
21122
21122
|
N = `${window.location.origin}/notifications/${_}`
|
21123
21123
|
V.append("webhook_callback_url", N),
|
21124
21124
|
V.append("limit_exceeded_behavior", y)
|
21125
|
-
const I =
|
21125
|
+
const I = Xe.loading(`Processing ${S.name}...`)
|
21126
21126
|
try {
|
21127
21127
|
const $ = await qe.post(
|
21128
21128
|
`${Ei}/v1/learnpack/public/tools/read-document`,
|
@@ -21132,17 +21132,17 @@ const Ys = new Uv(""),
|
|
21132
21132
|
if ($.status >= 300) throw new Error(`Failed to read ${S.name}`)
|
21133
21133
|
const Z = $.data
|
21134
21134
|
return (
|
21135
|
-
|
21135
|
+
Xe.success(`Processing ${S.name}`, { id: I }),
|
21136
21136
|
{ name: R, text: "", status: Z.status, notificationId: _ }
|
21137
21137
|
)
|
21138
21138
|
} catch ($) {
|
21139
21139
|
return (
|
21140
21140
|
console.log($.response.data, "ERROR IN FILE UPLOADER"),
|
21141
21141
|
$.response.data.error_code === "too_many_images"
|
21142
|
-
?
|
21142
|
+
? Xe.error(`❌ ${n("uploader.files.maxImagesPerPDFError")}`, {
|
21143
21143
|
id: I,
|
21144
21144
|
})
|
21145
|
-
:
|
21145
|
+
: Xe.error(n("uploader.files.errorProcessingPDF"), { id: I }),
|
21146
21146
|
{ name: R, text: "", status: "ERROR", notificationId: "" }
|
21147
21147
|
)
|
21148
21148
|
}
|
@@ -21150,7 +21150,7 @@ const Ys = new Uv(""),
|
|
21150
21150
|
x = async (S) => {
|
21151
21151
|
const z = Array.from(S).filter((_) => ST.includes(_.type))
|
21152
21152
|
if (z.length === 0) {
|
21153
|
-
|
21153
|
+
Xe.error("No valid files selected")
|
21154
21154
|
return
|
21155
21155
|
}
|
21156
21156
|
p(!0)
|
@@ -21641,7 +21641,7 @@ function RT() {
|
|
21641
21641
|
console.log("RES", re), z(re.notificationId)
|
21642
21642
|
} catch (H) {
|
21643
21643
|
console.error(H, "ERROR CREATING TUTORIAL"),
|
21644
|
-
|
21644
|
+
Xe.error("Something went wrong. Please try again."),
|
21645
21645
|
s({ isCompleted: !1, currentStep: "hasContentIndex" })
|
21646
21646
|
}
|
21647
21647
|
},
|
@@ -21730,11 +21730,11 @@ function RT() {
|
|
21730
21730
|
onSuccess: async (te) => {
|
21731
21731
|
const { human: ie, message: re, token: oe } = await jv(te)
|
21732
21732
|
ie
|
21733
|
-
? (
|
21733
|
+
? (Xe.success(t("stepWizard.humanSuccess")),
|
21734
21734
|
console.log("JWT TOKEN received", oe),
|
21735
21735
|
l({ ...y, publicToken: oe }),
|
21736
21736
|
s({ currentStep: "hasContentIndex" }))
|
21737
|
-
: (
|
21737
|
+
: (Xe.error(re), s({ currentStep: "purpose" }))
|
21738
21738
|
},
|
21739
21739
|
}),
|
21740
21740
|
},
|
@@ -21811,8 +21811,7 @@ function RT() {
|
|
21811
21811
|
S &&
|
21812
21812
|
E.jsx(Iv, {
|
21813
21813
|
onNotification: (H) => {
|
21814
|
-
console.log("Async response", H)
|
21815
|
-
Ke.success("Initial course created successfully")
|
21814
|
+
console.log("Async response", H)
|
21816
21815
|
const ee = H.parsed.listOfSteps.map((te) => vv(te, []))
|
21817
21816
|
u({
|
21818
21817
|
lessons: ee,
|
@@ -30368,7 +30367,7 @@ const qD = ({ messages: e, syllabus: t }) => {
|
|
30368
30367
|
f.lessons.length > 0 &&
|
30369
30368
|
E.jsxs("button", {
|
30370
30369
|
onClick: () => {
|
30371
|
-
s(),
|
30370
|
+
s(), Xe.success(n("contentIndex.changesReverted"))
|
30372
30371
|
},
|
30373
30372
|
className:
|
30374
30373
|
"w-full sm:w-auto text-gray-500 bg-gray-200 rounded px-4 py-2 hover:bg-gray-300 flex items-center justify-center gap-2 cursor-pointer",
|
@@ -37949,18 +37948,18 @@ function mL({ onFinish: e }) {
|
|
37949
37948
|
{ setAuth: x } = Ie(wm((_) => ({ setAuth: _.setAuth }))),
|
37950
37949
|
j = async (_) => {
|
37951
37950
|
_.preventDefault(), f(!0)
|
37952
|
-
const N =
|
37951
|
+
const N = Xe.loading(t("login.loggingIn"))
|
37953
37952
|
try {
|
37954
37953
|
if (!n || !s) {
|
37955
|
-
f(!1),
|
37954
|
+
f(!1), Xe.error(t("login.pleaseFillAllFields"), { id: N })
|
37956
37955
|
return
|
37957
37956
|
}
|
37958
37957
|
const I = await w5({ email: n, password: s })
|
37959
37958
|
if (!I) {
|
37960
|
-
f(!1),
|
37959
|
+
f(!1), Xe.error(t("login.invalidCredentials"), { id: N })
|
37961
37960
|
return
|
37962
37961
|
}
|
37963
|
-
|
37962
|
+
Xe.success(t("login.loggedInSuccessfully"), { id: N }),
|
37964
37963
|
x({
|
37965
37964
|
bcToken: I.token,
|
37966
37965
|
userId: I.user.id,
|
@@ -37971,25 +37970,25 @@ function mL({ onFinish: e }) {
|
|
37971
37970
|
f(!1),
|
37972
37971
|
e()
|
37973
37972
|
} catch (I) {
|
37974
|
-
console.error(I),
|
37973
|
+
console.error(I), Xe.error("Invalid credentials", { id: N }), f(!1)
|
37975
37974
|
}
|
37976
37975
|
},
|
37977
37976
|
T = async (_) => {
|
37978
37977
|
_.preventDefault(), f(!0)
|
37979
|
-
const N =
|
37978
|
+
const N = Xe.loading(t("login.creatingAccount")),
|
37980
37979
|
{ firstName: I, lastName: $, email: Z } = k
|
37981
37980
|
if (!I || !$ || !Z) {
|
37982
|
-
f(!1),
|
37981
|
+
f(!1), Xe.error(t("login.pleaseFillAllFields"), { id: N })
|
37983
37982
|
return
|
37984
37983
|
}
|
37985
37984
|
try {
|
37986
37985
|
await S5(I, $, Z),
|
37987
|
-
|
37986
|
+
Xe.success(t("login.accountCreated"), { id: N }),
|
37988
37987
|
y(!1),
|
37989
37988
|
d(!0),
|
37990
37989
|
i(Z)
|
37991
37990
|
} catch {
|
37992
|
-
|
37991
|
+
Xe.error(t("login.registrationFailed"), { id: N })
|
37993
37992
|
} finally {
|
37994
37993
|
f(!1)
|
37995
37994
|
}
|
@@ -38238,7 +38237,7 @@ const pL = () => {
|
|
38238
38237
|
}, [])
|
38239
38238
|
const R = async () => {
|
38240
38239
|
if (!z.courseInfo.title) {
|
38241
|
-
|
38240
|
+
Xe.error("Please provide a title for the course")
|
38242
38241
|
return
|
38243
38242
|
}
|
38244
38243
|
let N = z.courseInfo.slug,
|
@@ -38316,7 +38315,7 @@ USER: ${N}`,
|
|
38316
38315
|
return
|
38317
38316
|
}
|
38318
38317
|
if (!z.courseInfo.title) {
|
38319
|
-
|
38318
|
+
Xe.error("Please provide a title for the course")
|
38320
38319
|
return
|
38321
38320
|
}
|
38322
38321
|
let N = i.rigoToken
|
@@ -38328,10 +38327,10 @@ USER: ${N}`,
|
|
38328
38327
|
return
|
38329
38328
|
}
|
38330
38329
|
if (!(await b5(i.bcToken, "ai-course-generation"))) {
|
38331
|
-
|
38330
|
+
Xe.error(
|
38332
38331
|
"You don't have enough credits to generate a course! Please add more credits to your account."
|
38333
38332
|
),
|
38334
|
-
|
38333
|
+
Xe.loading(
|
38335
38334
|
"You will be redirected to the settings page in 5 seconds."
|
38336
38335
|
),
|
38337
38336
|
setTimeout(() => {
|
@@ -10,7 +10,7 @@
|
|
10
10
|
/>
|
11
11
|
|
12
12
|
<title>Learnpack Creator: Craft tutorials in seconds!</title>
|
13
|
-
<script type="module" crossorigin src="/creator/assets/index-
|
13
|
+
<script type="module" crossorigin src="/creator/assets/index-BvHkfJm4.js"></script>
|
14
14
|
<link rel="stylesheet" crossorigin href="/creator/assets/index-DmpsXknz.css">
|
15
15
|
</head>
|
16
16
|
<body>
|