mario-core 2.0.32-release → 2.0.33-release
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/Dashboard-BIhv8car.js +1 -0
- package/dist/Dashboard-BY5BVLIW.mjs +206 -0
- package/dist/Dashboard-BYXh-LYm.mjs +206 -0
- package/dist/Dashboard-Bp0ko4Nx.js +1 -0
- package/dist/Dashboard-BxX4EZkL.mjs +206 -0
- package/dist/Dashboard-CLvLdCvD.mjs +206 -0
- package/dist/Dashboard-CjDPZlwI.js +1 -0
- package/dist/Dashboard-D4yeROnn.mjs +206 -0
- package/dist/Dashboard-D6igZd4M.js +1 -0
- package/dist/Dashboard-D7X8bg8t.mjs +206 -0
- package/dist/Dashboard-DRaSlZLc.js +1 -0
- package/dist/Dashboard-DbI4E9od.js +1 -0
- package/dist/EmailTemplateDetail-B-Kab5TK.mjs +443 -0
- package/dist/EmailTemplateDetail-BJGaN7uh.js +1 -0
- package/dist/EmailTemplateDetail-BOqn4rkr.mjs +417 -0
- package/dist/EmailTemplateDetail-BlhCa_EF.mjs +443 -0
- package/dist/EmailTemplateDetail-CW0ymDWF.mjs +443 -0
- package/dist/EmailTemplateDetail-CZKvX-_q.js +1 -0
- package/dist/EmailTemplateDetail-D4EupjNO.js +1 -0
- package/dist/EmailTemplateDetail-DDbJbMWn.js +1 -0
- package/dist/EmailTemplateDetail-DP04M6QH.js +1 -0
- package/dist/EmailTemplateDetail-DSeAyn-F.mjs +443 -0
- package/dist/EmailTemplateDetail-J5R0X631.mjs +443 -0
- package/dist/EmailTemplateDetail-c2RcFzG5.js +1 -0
- package/dist/EmailTemplateList-BAVOo58z.js +1 -0
- package/dist/EmailTemplateList-BMCpm7sf.js +1 -0
- package/dist/EmailTemplateList-BQCcXdif.mjs +170 -0
- package/dist/EmailTemplateList-BVB1lsW7.mjs +170 -0
- package/dist/EmailTemplateList-BVfQCPzA.js +1 -0
- package/dist/EmailTemplateList-C-aj1Pl0.mjs +170 -0
- package/dist/EmailTemplateList-C5c2T4_M.mjs +170 -0
- package/dist/EmailTemplateList-D3G-A7Jo.js +1 -0
- package/dist/EmailTemplateList-DPQTaV4-.js +1 -0
- package/dist/EmailTemplateList-JRLV6pZW.mjs +170 -0
- package/dist/EmailTemplateList-ZTs0DmjS.js +1 -0
- package/dist/EmailTemplateList-gwkheOgx.mjs +168 -0
- package/dist/GalleryList-BU1m_MP_.js +1 -0
- package/dist/GalleryList-BftIdfu8.js +1 -0
- package/dist/GalleryList-Bl4FojYJ.mjs +329 -0
- package/dist/GalleryList-ByJ1_7Qx.mjs +329 -0
- package/dist/GalleryList-CVzc1xGW.js +1 -0
- package/dist/GalleryList-D5E7p3kE.mjs +329 -0
- package/dist/GalleryList-D5ZydfSV.js +1 -0
- package/dist/GalleryList-DHblERzG.js +1 -0
- package/dist/GalleryList-DXnU-Aou.mjs +329 -0
- package/dist/GalleryList-DpM906eg.mjs +329 -0
- package/dist/GalleryList-ZJ_mdpVZ.js +1 -0
- package/dist/GalleryList-oJNXivHy.mjs +329 -0
- package/dist/Login-A2cXwovI.mjs +1380 -0
- package/dist/Login-B69XhtIm.mjs +1380 -0
- package/dist/Login-BLyikyni.mjs +1380 -0
- package/dist/Login-Bwr0h4GC.js +1 -0
- package/dist/Login-C12Whvdx.js +1 -0
- package/dist/Login-CIcbHD7-.mjs +1380 -0
- package/dist/Login-D7gUoYyV.js +1 -0
- package/dist/Login-DEMe7ra6.js +1 -0
- package/dist/Login-Dcwb-HaZ.js +1 -0
- package/dist/Login-Rwbmk--s.js +1 -0
- package/dist/Login-h3o1lUKK.mjs +1380 -0
- package/dist/Login-xn2j4Jqq.mjs +1380 -0
- package/dist/NotificationList--DZcYUS5.js +2 -0
- package/dist/NotificationList-D26jJ6Wc.mjs +3969 -0
- package/dist/NotificationList-DZ1epO3L.mjs +3969 -0
- package/dist/NotificationList-D_lGCmIS.js +2 -0
- package/dist/NotificationList-Da-pWu35.js +2 -0
- package/dist/NotificationList-Dogczlgr.mjs +3969 -0
- package/dist/NotificationList-Dv0JIP69.js +2 -0
- package/dist/NotificationList-DygQSzwE.mjs +3969 -0
- package/dist/NotificationList-Ku1m25fI.mjs +3969 -0
- package/dist/NotificationList-Ml4QiyAE.mjs +3969 -0
- package/dist/NotificationList-_AHdv4bs.js +2 -0
- package/dist/NotificationList-rKx7xooX.js +2 -0
- package/dist/SkillList-BUDiP8Ba.mjs +386 -0
- package/dist/SkillList-Btum0zIE.js +1 -0
- package/dist/SkillList-C-dw1122.js +1 -0
- package/dist/SkillList-C0ZfIxCl.js +1 -0
- package/dist/SkillList-CZTd0oz_.mjs +386 -0
- package/dist/SkillList-DPU-l8aA.js +1 -0
- package/dist/SkillList-DTxT0Hbn.js +1 -0
- package/dist/SkillList-DVXAACsz.mjs +386 -0
- package/dist/SkillList-DX530KHp.mjs +386 -0
- package/dist/SkillList-DahOq8Os.mjs +386 -0
- package/dist/SkillList-DivkFIrP.mjs +386 -0
- package/dist/SkillList-yosFFVsc.js +1 -0
- package/dist/TeacherSelector-5UVov2Wf.mjs +30 -0
- package/dist/TeacherSelector-Bi582rEx.mjs +30 -0
- package/dist/TeacherSelector-BmmfQxU8.js +1 -0
- package/dist/TeacherSelector-BngXAzRe.mjs +30 -0
- package/dist/TeacherSelector-C7-XuXfb.mjs +30 -0
- package/dist/TeacherSelector-C9Z5JX-P.js +1 -0
- package/dist/TeacherSelector-CZ1DrLUk.js +1 -0
- package/dist/TeacherSelector-CbJ1kPyV.js +1 -0
- package/dist/TeacherSelector-CkGdl96R.js +1 -0
- package/dist/TeacherSelector-CxDiVyno.mjs +30 -0
- package/dist/TeacherSelector-DomtJIQi.js +1 -0
- package/dist/TeacherSelector-mjBcHGJF.mjs +30 -0
- package/dist/TheContent-B42qwDUV.mjs +38 -0
- package/dist/TheContent-BW03X6oT.mjs +38 -0
- package/dist/TheContent-CayaQR9C.js +1 -0
- package/dist/TheContent-CiU0FBTA.mjs +38 -0
- package/dist/TheContent-D5Qx4QXe.js +1 -0
- package/dist/TheContent-DHWnB8WX.js +1 -0
- package/dist/TheContent-DPy5BFuN.js +1 -0
- package/dist/TheContent-Dl7_h11H.mjs +38 -0
- package/dist/TheContent-DxN9-GIu.mjs +38 -0
- package/dist/TheContent-H-Hg7kIq.js +1 -0
- package/dist/TheContent-aEfXKW_H.mjs +38 -0
- package/dist/TheContent-xUKaH5bl.js +1 -0
- package/dist/UserContainer-3dOz3yZF.js +5 -0
- package/dist/UserContainer-B-abn6--.js +5 -0
- package/dist/UserContainer-BIl8c0yJ.js +5 -0
- package/dist/UserContainer-BjYrV0kt.mjs +2783 -0
- package/dist/UserContainer-BoJ73Ko9.js +5 -0
- package/dist/UserContainer-CFnSfW2A.js +5 -0
- package/dist/UserContainer-CGlDCED1.mjs +2771 -0
- package/dist/UserContainer-CqTUtCe6.mjs +2770 -0
- package/dist/UserContainer-CtYpysOo.mjs +2771 -0
- package/dist/UserContainer-Cu6koTiw.mjs +2771 -0
- package/dist/UserContainer-Dz991Fto.mjs +2770 -0
- package/dist/UserContainer-d3ywqdWh.js +5 -0
- package/dist/UserDetail-BCLssfN6.mjs +902 -0
- package/dist/UserDetail-BRCOabYu.mjs +902 -0
- package/dist/UserDetail-BsWWKLof.js +1 -0
- package/dist/UserDetail-CkMU6eej.js +1 -0
- package/dist/UserDetail-Cl6y6AtA.js +1 -0
- package/dist/UserDetail-CqBaMe5l.mjs +902 -0
- package/dist/UserDetail-D36q7Em-.mjs +902 -0
- package/dist/UserDetail-DFjYZZOc.js +1 -0
- package/dist/UserDetail-DIGlXdot.mjs +914 -0
- package/dist/UserDetail-DizNdqsR.mjs +902 -0
- package/dist/UserDetail-DwNEJ0kC.js +1 -0
- package/dist/UserDetail-Wn1wTs2Z.js +1 -0
- package/dist/UserList-4XLAsuI5.mjs +1205 -0
- package/dist/UserList-B9_Ok-O-.js +5 -0
- package/dist/UserList-BAirPxDM.js +7 -0
- package/dist/UserList-BFRsUwHp.js +5 -0
- package/dist/UserList-BgtFj_YA.mjs +1171 -0
- package/dist/UserList-BjEBqEMi.mjs +1205 -0
- package/dist/UserList-C6MCzl4Q.js +7 -0
- package/dist/UserList-CLDgmfZl.mjs +1171 -0
- package/dist/UserList-CRqA2Kvb.js +7 -0
- package/dist/UserList-D-5W9tzb.mjs +1205 -0
- package/dist/UserList-D63-z7TV.mjs +1205 -0
- package/dist/UserList-DX_DRp8l.js +7 -0
- package/dist/constants-1VW88-cg.mjs +320 -0
- package/dist/constants-B09dcc2W.js +1 -0
- package/dist/constants-BSg1aI4R.js +1 -0
- package/dist/constants-BXFDJA-1.js +1 -0
- package/dist/constants-BdoFiMvT.mjs +320 -0
- package/dist/constants-BrOUFw2c.js +1 -0
- package/dist/constants-ClfPwBI0.mjs +320 -0
- package/dist/constants-D3RqPPqz.mjs +320 -0
- package/dist/constants-D5ZWXomx.js +1 -0
- package/dist/constants-DiRwIQ5M.mjs +320 -0
- package/dist/constants-bWeajrBe.js +1 -0
- package/dist/constants-dgRR32rI.mjs +320 -0
- package/dist/containers/EmailTemplate/hooks/useEmailTemplateDetail.d.ts +1 -0
- package/dist/containers/User/constants/types.d.ts +1 -0
- package/dist/containers/User/hooks/useExportUsersCsv.d.ts +1 -0
- package/dist/index-B3Kqv7dj.mjs +17787 -0
- package/dist/index-BTWI5jDz.js +15 -0
- package/dist/index-C1gw45bw.mjs +17792 -0
- package/dist/index-CFAFmJ4F.mjs +17782 -0
- package/dist/index-D6pNkzlV.mjs +17787 -0
- package/dist/index-DDw_4X4u.js +15 -0
- package/dist/index-DVZt7HdB.js +15 -0
- package/dist/index-Di2zNE1O.mjs +17792 -0
- package/dist/index-DzHydV61.js +15 -0
- package/dist/index-Ihdym4EQ.js +15 -0
- package/dist/index-UpEZLqQV.js +15 -0
- package/dist/index-cuQPyXoT.mjs +17772 -0
- package/dist/index.js +1 -1
- package/dist/index.modern.js +1 -1
- package/dist/mailCategoryService-BbqIjbpT.mjs +11 -0
- package/dist/mailCategoryService-C1sorb9h.js +1 -0
- package/dist/mailCategoryService-CZ9m51K4.js +1 -0
- package/dist/mailCategoryService-C_Lq0Uks.mjs +11 -0
- package/dist/mailCategoryService-DcwLjTWD.mjs +11 -0
- package/dist/mailCategoryService-DexSxwen.js +1 -0
- package/dist/mailCategoryService-DrZXrEp2.js +1 -0
- package/dist/mailCategoryService-DyLMoDxP.mjs +11 -0
- package/dist/mailCategoryService-LumZqQLL.mjs +11 -0
- package/dist/mailCategoryService-MyMGdKSl.mjs +11 -0
- package/dist/mailCategoryService-Pl31B1JT.js +1 -0
- package/dist/mailCategoryService-lvLdr9b4.js +1 -0
- package/dist/mario-core.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,1380 @@
|
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as L, Fragment as ae, useState as v, useEffect as q } from "react";
|
|
3
|
+
import { Input as Z, Form as _e, FormGroup as K, Row as ne, Col as F } from "reactstrap";
|
|
4
|
+
import { Link as ve, useLocation as Me, useNavigate as he } from "react-router-dom";
|
|
5
|
+
import { s as o, E as D, a as Ee, A as qe, g as te, b as w, f as Be, c as $, d as T, e as Ve, r as Fe, h as Y, i as Le, B as He, j as se, k as De, l as ze, m as je, n as We, I as ge, N as Ke, o as Ye, p as Je, q as Ze, t as Qe, u as Xe, v as me, w as Ne, x as es, y as ss, z as os } from "./index-B3Kqv7dj.mjs";
|
|
6
|
+
import { useDispatch as re, useSelector as ye } from "react-redux";
|
|
7
|
+
import { Formik as ie } from "formik";
|
|
8
|
+
import * as x from "yup";
|
|
9
|
+
import { useGoogleReCaptcha as ue, GoogleReCaptcha as as, GoogleReCaptchaProvider as ts } from "react-google-recaptcha-v3";
|
|
10
|
+
import { GoogleOAuthProvider as ns, useGoogleLogin as rs } from "@react-oauth/google";
|
|
11
|
+
import { L as oe, T as Ce } from "./types-BvnbDeJF.mjs";
|
|
12
|
+
import { LogLevel as ee, PublicClientApplication as is } from "@azure/msal-browser";
|
|
13
|
+
import * as W from "@amplitude/analytics-browser";
|
|
14
|
+
const ls = {
|
|
15
|
+
backgroundColor: "#f7f9fc",
|
|
16
|
+
borderRadius: "4px",
|
|
17
|
+
marginBottom: "5px",
|
|
18
|
+
position: "relative"
|
|
19
|
+
}, cs = {
|
|
20
|
+
backgroundColor: "#ffffff",
|
|
21
|
+
paddingRight: "50px",
|
|
22
|
+
color: "#333333",
|
|
23
|
+
caretColor: "#333333"
|
|
24
|
+
}, ds = {
|
|
25
|
+
fontSize: "20px",
|
|
26
|
+
position: "absolute",
|
|
27
|
+
right: "10px",
|
|
28
|
+
color: "#316CD9"
|
|
29
|
+
}, ms = (a) => a.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g, (t, r) => r.toUpperCase()), J = ({
|
|
30
|
+
isShowPassword: a,
|
|
31
|
+
togglePasswordVisible: t,
|
|
32
|
+
onChange: r,
|
|
33
|
+
placeholder: n
|
|
34
|
+
}) => /* @__PURE__ */ l("div", { className: "d-flex align-items-center w-100", style: ls, children: [
|
|
35
|
+
/* @__PURE__ */ e(
|
|
36
|
+
Z,
|
|
37
|
+
{
|
|
38
|
+
className: "border password-input",
|
|
39
|
+
style: cs,
|
|
40
|
+
type: a ? "text" : "password",
|
|
41
|
+
name: "password",
|
|
42
|
+
onChange: r,
|
|
43
|
+
placeholder: n || "Password",
|
|
44
|
+
autocomplete: n ? ms(n) : "password",
|
|
45
|
+
required: !0
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ e(
|
|
49
|
+
"i",
|
|
50
|
+
{
|
|
51
|
+
className: `far ${a ? "fa-eye-slash" : "fa-eye"} mx-2 cursor-pointer`,
|
|
52
|
+
style: ds,
|
|
53
|
+
onClick: () => t(),
|
|
54
|
+
title: a ? "Hide" : "Show"
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
] }), gs = x.object({
|
|
58
|
+
email: x.string().email("Email is invalid").required("Email is required"),
|
|
59
|
+
password: x.string().required("Password is required"),
|
|
60
|
+
rememberMe: x.boolean()
|
|
61
|
+
}), hs = ({ onSuccess: a, onError: t }) => {
|
|
62
|
+
const r = rs({
|
|
63
|
+
onSuccess: async (n) => {
|
|
64
|
+
try {
|
|
65
|
+
const i = await fetch("https://www.googleapis.com/oauth2/v3/userinfo", {
|
|
66
|
+
headers: { Authorization: `Bearer ${n.access_token}` }
|
|
67
|
+
}).then((p) => p.json()), u = {
|
|
68
|
+
accessToken: n.access_token,
|
|
69
|
+
googleId: i.sub,
|
|
70
|
+
profileObj: {
|
|
71
|
+
email: i.email,
|
|
72
|
+
familyName: i.family_name,
|
|
73
|
+
givenName: i.given_name,
|
|
74
|
+
imageUrl: i.picture,
|
|
75
|
+
name: i.name
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
a(u);
|
|
79
|
+
} catch (i) {
|
|
80
|
+
t(i);
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
onError: (n) => t(n)
|
|
84
|
+
});
|
|
85
|
+
return /* @__PURE__ */ l("div", { className: o["btn-login-with-sso"], onClick: () => r(), children: [
|
|
86
|
+
/* @__PURE__ */ l("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", width: "24px", height: "24px", style: { marginRight: "8px" }, children: [
|
|
87
|
+
/* @__PURE__ */ e("path", { fill: "#EA4335", d: "M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z" }),
|
|
88
|
+
/* @__PURE__ */ e("path", { fill: "#4285F4", d: "M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z" }),
|
|
89
|
+
/* @__PURE__ */ e("path", { fill: "#FBBC05", d: "M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z" }),
|
|
90
|
+
/* @__PURE__ */ e("path", { fill: "#34A853", d: "M24 48c6.48 0 12.38-2.12 16.66-5.73l-7.73-6c-2.15 1.45-4.92 2.3-8.93 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z" }),
|
|
91
|
+
/* @__PURE__ */ e("path", { fill: "none", d: "M0 0h48v48H0z" })
|
|
92
|
+
] }),
|
|
93
|
+
/* @__PURE__ */ e("p", { children: "GOOGLE" })
|
|
94
|
+
] });
|
|
95
|
+
}, us = ({
|
|
96
|
+
defaultInfo: a,
|
|
97
|
+
userLogin: t,
|
|
98
|
+
school: r,
|
|
99
|
+
isShowPassword: n,
|
|
100
|
+
setIsShowPassword: i,
|
|
101
|
+
fnIsCheckLogin: u,
|
|
102
|
+
// isLoginGoogle,
|
|
103
|
+
// submitLogin,
|
|
104
|
+
// infoUser,
|
|
105
|
+
googleClientId: p,
|
|
106
|
+
fnLoginSSO: S,
|
|
107
|
+
extensionEmail: k,
|
|
108
|
+
onLoginWidthClever: N
|
|
109
|
+
}) => {
|
|
110
|
+
const y = () => i(!n), c = re(), { executeRecaptcha: f } = ue(), E = L(async () => {
|
|
111
|
+
if (!f) {
|
|
112
|
+
console.log("execute recaptcha undefined");
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
return await f("login");
|
|
116
|
+
}, [f]), U = async (d) => {
|
|
117
|
+
try {
|
|
118
|
+
await qe(d);
|
|
119
|
+
} catch (m) {
|
|
120
|
+
console.error(m);
|
|
121
|
+
}
|
|
122
|
+
}, A = async (d) => {
|
|
123
|
+
if (d?.accessToken) {
|
|
124
|
+
let {
|
|
125
|
+
email: m,
|
|
126
|
+
familyName: G,
|
|
127
|
+
givenName: C,
|
|
128
|
+
imageUrl: _,
|
|
129
|
+
name: M
|
|
130
|
+
// fullName
|
|
131
|
+
} = d.profileObj, I = d.accessToken, R = d.googleId;
|
|
132
|
+
const H = window.location.hostname.split(".marioforme.com")?.[0], z = m.split("@")?.[1], le = k?.split(",")?.map((O) => O.trim())?.filter((O) => O).some((O) => z.includes(O));
|
|
133
|
+
if (!z.includes(H) && !le) {
|
|
134
|
+
alert(
|
|
135
|
+
"The email address you used does not match the login information in the database. Please check that you are using your school assigned email address to log into MARIO for Me. If you have further trouble please notify your school site administrator"
|
|
136
|
+
), await U([`${z} is incorrect`]);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
const Q = {
|
|
140
|
+
firstName: C,
|
|
141
|
+
lastName: G,
|
|
142
|
+
imageUrl: _,
|
|
143
|
+
fullName: M,
|
|
144
|
+
email: m,
|
|
145
|
+
accessToken: I,
|
|
146
|
+
googleId: R
|
|
147
|
+
};
|
|
148
|
+
c(Ee(Q)), u(
|
|
149
|
+
Ce.Google,
|
|
150
|
+
Q,
|
|
151
|
+
I,
|
|
152
|
+
E
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
return /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(
|
|
157
|
+
ie,
|
|
158
|
+
{
|
|
159
|
+
initialValues: a,
|
|
160
|
+
validationSchema: gs,
|
|
161
|
+
onSubmit: async (d) => {
|
|
162
|
+
try {
|
|
163
|
+
const m = await E();
|
|
164
|
+
if (!m) return;
|
|
165
|
+
d.captcha = m, d.loginType = oe.Default, t(d);
|
|
166
|
+
} catch (m) {
|
|
167
|
+
console.error(m);
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
children: (d) => {
|
|
171
|
+
const {
|
|
172
|
+
handleBlur: m,
|
|
173
|
+
handleSubmit: G,
|
|
174
|
+
values: C,
|
|
175
|
+
touched: _,
|
|
176
|
+
errors: M,
|
|
177
|
+
setFieldValue: I
|
|
178
|
+
} = d, R = _.email && M.email, B = _.password && M.password;
|
|
179
|
+
return /* @__PURE__ */ e("div", { className: `${o["box-login"]} w-100`, children: /* @__PURE__ */ e(
|
|
180
|
+
_e,
|
|
181
|
+
{
|
|
182
|
+
className: `${o["block-login"]}`,
|
|
183
|
+
onSubmit: G,
|
|
184
|
+
children: /* @__PURE__ */ l("div", { className: `${o["block-form"]}`, children: [
|
|
185
|
+
/* @__PURE__ */ l("div", { className: "d-flex align-items-center mb-4", children: [
|
|
186
|
+
/* @__PURE__ */ e(
|
|
187
|
+
"img",
|
|
188
|
+
{
|
|
189
|
+
hidden: !r?.schoolLogo,
|
|
190
|
+
src: r?.schoolLogo,
|
|
191
|
+
className: `${o["school-icon"]} mr-3`
|
|
192
|
+
}
|
|
193
|
+
),
|
|
194
|
+
/* @__PURE__ */ e(
|
|
195
|
+
"p",
|
|
196
|
+
{
|
|
197
|
+
className: `${o["school-name"]} mb-0`,
|
|
198
|
+
children: r.schoolName
|
|
199
|
+
}
|
|
200
|
+
)
|
|
201
|
+
] }),
|
|
202
|
+
/* @__PURE__ */ e("p", { className: `${o["title-login"]}`, children: "Welcome Back!" }),
|
|
203
|
+
/* @__PURE__ */ e(
|
|
204
|
+
"p",
|
|
205
|
+
{
|
|
206
|
+
className: `${o["login-description"]} mb-5`,
|
|
207
|
+
children: "Please enter your MARIO Education account details"
|
|
208
|
+
}
|
|
209
|
+
),
|
|
210
|
+
/* @__PURE__ */ l(
|
|
211
|
+
K,
|
|
212
|
+
{
|
|
213
|
+
className: `${o["form-user-name"]}`,
|
|
214
|
+
children: [
|
|
215
|
+
/* @__PURE__ */ e(
|
|
216
|
+
Z,
|
|
217
|
+
{
|
|
218
|
+
type: "text",
|
|
219
|
+
name: "email",
|
|
220
|
+
placeholder: "Email",
|
|
221
|
+
value: C.email,
|
|
222
|
+
onChange: (H) => I(
|
|
223
|
+
"email",
|
|
224
|
+
H.target?.value?.trim() || ""
|
|
225
|
+
),
|
|
226
|
+
autocomplete: "email",
|
|
227
|
+
onBlur: m("email"),
|
|
228
|
+
required: !0
|
|
229
|
+
}
|
|
230
|
+
),
|
|
231
|
+
R && /* @__PURE__ */ e(
|
|
232
|
+
D,
|
|
233
|
+
{
|
|
234
|
+
text: M.email
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
/* @__PURE__ */ l(K, { children: [
|
|
241
|
+
/* @__PURE__ */ e(
|
|
242
|
+
J,
|
|
243
|
+
{
|
|
244
|
+
isShowPassword: n,
|
|
245
|
+
togglePasswordVisible: y,
|
|
246
|
+
onChange: (H) => I(
|
|
247
|
+
"password",
|
|
248
|
+
H.target?.value?.trim() || ""
|
|
249
|
+
)
|
|
250
|
+
}
|
|
251
|
+
),
|
|
252
|
+
B && /* @__PURE__ */ e(
|
|
253
|
+
D,
|
|
254
|
+
{
|
|
255
|
+
text: M.password
|
|
256
|
+
}
|
|
257
|
+
)
|
|
258
|
+
] }),
|
|
259
|
+
/* @__PURE__ */ e(K, {}),
|
|
260
|
+
/* @__PURE__ */ l("div", { className: "d-flex justify-content-between", children: [
|
|
261
|
+
/* @__PURE__ */ l("div", { className: "d-flex align-items-center", style: { gap: "8px" }, children: [
|
|
262
|
+
/* @__PURE__ */ e(
|
|
263
|
+
"input",
|
|
264
|
+
{
|
|
265
|
+
type: "checkbox",
|
|
266
|
+
checked: !C.isSessionUserBrowser,
|
|
267
|
+
className: `${o["checkbox-keep-login"]}`,
|
|
268
|
+
onChange: () => I(
|
|
269
|
+
"isSessionUserBrowser",
|
|
270
|
+
!C.isSessionUserBrowser
|
|
271
|
+
)
|
|
272
|
+
}
|
|
273
|
+
),
|
|
274
|
+
/* @__PURE__ */ e(
|
|
275
|
+
"p",
|
|
276
|
+
{
|
|
277
|
+
className: `${o["label-keep-login"]} mb-0 ml-2`,
|
|
278
|
+
children: "Keep me logged in"
|
|
279
|
+
}
|
|
280
|
+
)
|
|
281
|
+
] }),
|
|
282
|
+
/* @__PURE__ */ e(
|
|
283
|
+
ve,
|
|
284
|
+
{
|
|
285
|
+
to: "/forgot-password",
|
|
286
|
+
className: `${o["link-to-login"]}`,
|
|
287
|
+
children: "Forgot password?"
|
|
288
|
+
}
|
|
289
|
+
)
|
|
290
|
+
] }),
|
|
291
|
+
/* @__PURE__ */ e(
|
|
292
|
+
"button",
|
|
293
|
+
{
|
|
294
|
+
className: `${o["btn-login"]} mt-5`,
|
|
295
|
+
type: "submit",
|
|
296
|
+
children: "LOG IN"
|
|
297
|
+
}
|
|
298
|
+
),
|
|
299
|
+
/* @__PURE__ */ e(
|
|
300
|
+
"p",
|
|
301
|
+
{
|
|
302
|
+
className: `${o["option-text"]} my-3 text-center`,
|
|
303
|
+
children: "OR"
|
|
304
|
+
}
|
|
305
|
+
),
|
|
306
|
+
/* @__PURE__ */ l(ne, { className: "mb-4", children: [
|
|
307
|
+
/* @__PURE__ */ e(
|
|
308
|
+
F,
|
|
309
|
+
{
|
|
310
|
+
lg: 6,
|
|
311
|
+
md: 6,
|
|
312
|
+
xs: 12,
|
|
313
|
+
className: "pr-md-3",
|
|
314
|
+
children: !!p && /* @__PURE__ */ e(
|
|
315
|
+
ns,
|
|
316
|
+
{
|
|
317
|
+
clientId: p,
|
|
318
|
+
children: /* @__PURE__ */ e(
|
|
319
|
+
hs,
|
|
320
|
+
{
|
|
321
|
+
onSuccess: A,
|
|
322
|
+
onError: () => console.log("Google login failed")
|
|
323
|
+
}
|
|
324
|
+
)
|
|
325
|
+
}
|
|
326
|
+
)
|
|
327
|
+
}
|
|
328
|
+
),
|
|
329
|
+
r.schoolId && /* @__PURE__ */ e(
|
|
330
|
+
F,
|
|
331
|
+
{
|
|
332
|
+
lg: 6,
|
|
333
|
+
md: 6,
|
|
334
|
+
xs: 12,
|
|
335
|
+
className: `${o["btn-login-sso"]} pl-md-2`,
|
|
336
|
+
hidden: !r?.schoolId,
|
|
337
|
+
children: /* @__PURE__ */ l(
|
|
338
|
+
"div",
|
|
339
|
+
{
|
|
340
|
+
className: o["btn-login-with-sso"],
|
|
341
|
+
onClick: () => S(E),
|
|
342
|
+
children: [
|
|
343
|
+
/* @__PURE__ */ e("img", { src: "images/microsoft-logo.png" }),
|
|
344
|
+
/* @__PURE__ */ e("p", { children: "MICROSOFT" })
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
)
|
|
348
|
+
}
|
|
349
|
+
)
|
|
350
|
+
] }),
|
|
351
|
+
/* @__PURE__ */ e(
|
|
352
|
+
"div",
|
|
353
|
+
{
|
|
354
|
+
className: `${o["btn-login-sso"]}`,
|
|
355
|
+
children: /* @__PURE__ */ l(
|
|
356
|
+
"div",
|
|
357
|
+
{
|
|
358
|
+
className: o["btn-login-with-sso"],
|
|
359
|
+
onClick: () => window.open(
|
|
360
|
+
"https://launchpad.classlink.com/login"
|
|
361
|
+
),
|
|
362
|
+
children: [
|
|
363
|
+
/* @__PURE__ */ e("img", { src: "images/class-link-icon.png" }),
|
|
364
|
+
/* @__PURE__ */ e("p", { children: "SIGN IN WITH CLASSLINK" })
|
|
365
|
+
]
|
|
366
|
+
}
|
|
367
|
+
)
|
|
368
|
+
}
|
|
369
|
+
),
|
|
370
|
+
/* @__PURE__ */ e(
|
|
371
|
+
"div",
|
|
372
|
+
{
|
|
373
|
+
className: `${o["btn-login-sso"]} mt-4`,
|
|
374
|
+
children: /* @__PURE__ */ l(
|
|
375
|
+
"div",
|
|
376
|
+
{
|
|
377
|
+
className: o["btn-login-with-sso"],
|
|
378
|
+
onClick: () => N(),
|
|
379
|
+
children: [
|
|
380
|
+
/* @__PURE__ */ e("img", { src: "images/clever-icon.png" }),
|
|
381
|
+
/* @__PURE__ */ e("p", { children: "SIGN IN WITH CLEVER" })
|
|
382
|
+
]
|
|
383
|
+
}
|
|
384
|
+
)
|
|
385
|
+
}
|
|
386
|
+
)
|
|
387
|
+
] })
|
|
388
|
+
}
|
|
389
|
+
) });
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
) });
|
|
393
|
+
}, ps = {
|
|
394
|
+
email: "",
|
|
395
|
+
captcha: ""
|
|
396
|
+
}, fs = "/", Ie = "/login", ws = "Log in", Re = () => {
|
|
397
|
+
const a = new URLSearchParams(Me().search), t = a.get("token"), r = a.get("key") ?? "", n = re(), i = he(), [u, p] = v(!1), S = L(() => {
|
|
398
|
+
p(!u);
|
|
399
|
+
}, [u]), [k, N] = v(!1), [y, c] = v(!1), [f, E] = v({
|
|
400
|
+
token: "",
|
|
401
|
+
password: "",
|
|
402
|
+
reEnterPassword: "",
|
|
403
|
+
email: "",
|
|
404
|
+
userId: ""
|
|
405
|
+
}), [U, A] = v(!0), { executeRecaptcha: d } = ue();
|
|
406
|
+
q(() => {
|
|
407
|
+
document.title = ws, te() && i(fs);
|
|
408
|
+
}, []);
|
|
409
|
+
const m = L(async (I) => {
|
|
410
|
+
n(w(!0));
|
|
411
|
+
try {
|
|
412
|
+
await Be(I), i(Ie), n(
|
|
413
|
+
$({
|
|
414
|
+
type: "success",
|
|
415
|
+
message: "A mail to reset password was sent"
|
|
416
|
+
})
|
|
417
|
+
);
|
|
418
|
+
} catch (R) {
|
|
419
|
+
n(
|
|
420
|
+
$({
|
|
421
|
+
type: "danger",
|
|
422
|
+
message: R.response?.data?.title || R.message || "Error occured"
|
|
423
|
+
})
|
|
424
|
+
), localStorage.removeItem(T), sessionStorage.removeItem(T);
|
|
425
|
+
}
|
|
426
|
+
n(w(!1));
|
|
427
|
+
}, []), G = L(
|
|
428
|
+
async (I, R) => {
|
|
429
|
+
n(w(!0));
|
|
430
|
+
try {
|
|
431
|
+
const B = await Ve(I, R);
|
|
432
|
+
B.data ? E({
|
|
433
|
+
...f,
|
|
434
|
+
token: I,
|
|
435
|
+
email: B.data
|
|
436
|
+
}) : A(!1);
|
|
437
|
+
} catch {
|
|
438
|
+
A(!1);
|
|
439
|
+
}
|
|
440
|
+
n(w(!1));
|
|
441
|
+
},
|
|
442
|
+
[]
|
|
443
|
+
), C = L(async (I) => {
|
|
444
|
+
n(w(!0));
|
|
445
|
+
try {
|
|
446
|
+
await Fe({ ...I, key: r }), i(Ie), n(
|
|
447
|
+
$({
|
|
448
|
+
type: "success",
|
|
449
|
+
message: "Reset password sucessfully"
|
|
450
|
+
})
|
|
451
|
+
);
|
|
452
|
+
} catch (R) {
|
|
453
|
+
n(
|
|
454
|
+
$({
|
|
455
|
+
type: "danger",
|
|
456
|
+
message: R.response?.data?.title || R.message || "Error occured"
|
|
457
|
+
})
|
|
458
|
+
), localStorage.removeItem(T), sessionStorage.removeItem(T);
|
|
459
|
+
}
|
|
460
|
+
n(w(!1));
|
|
461
|
+
}, []), _ = L(async () => {
|
|
462
|
+
if (!d) {
|
|
463
|
+
console.log("execute recaptcha undefined");
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
return await d("forgetPass");
|
|
467
|
+
}, [d]), M = L(() => {
|
|
468
|
+
}, []);
|
|
469
|
+
return q(() => {
|
|
470
|
+
t && r && G(t, r);
|
|
471
|
+
}, [t, r]), {
|
|
472
|
+
defaultInfo: ps,
|
|
473
|
+
forgotPasswordRequest: m,
|
|
474
|
+
checkResetTokenRequest: G,
|
|
475
|
+
validLink: U,
|
|
476
|
+
resetPasswordRequest: C,
|
|
477
|
+
openLogin: u,
|
|
478
|
+
toggle: S,
|
|
479
|
+
isShowNewPassword: k,
|
|
480
|
+
setIsShowNewPassword: N,
|
|
481
|
+
isShowReTypePassword: y,
|
|
482
|
+
setIsShowReTypePassword: c,
|
|
483
|
+
clickHandler: _,
|
|
484
|
+
handleVerify: M,
|
|
485
|
+
initialValues: f
|
|
486
|
+
};
|
|
487
|
+
}, Ss = {
|
|
488
|
+
email: "",
|
|
489
|
+
captcha: ""
|
|
490
|
+
}, Ns = x.object({
|
|
491
|
+
email: x.string().email("Email is invalid").required("Email is required")
|
|
492
|
+
}), ys = ({ school: a }) => {
|
|
493
|
+
const {
|
|
494
|
+
forgotPasswordRequest: t,
|
|
495
|
+
clickHandler: r,
|
|
496
|
+
handleVerify: n
|
|
497
|
+
} = Re();
|
|
498
|
+
return /* @__PURE__ */ e(
|
|
499
|
+
ie,
|
|
500
|
+
{
|
|
501
|
+
initialValues: Ss,
|
|
502
|
+
enableReinitialize: !0,
|
|
503
|
+
validationSchema: Ns,
|
|
504
|
+
onSubmit: async (i) => {
|
|
505
|
+
const u = await r();
|
|
506
|
+
u && (i.captcha = u, t(i));
|
|
507
|
+
},
|
|
508
|
+
children: (i) => {
|
|
509
|
+
const {
|
|
510
|
+
handleChange: u,
|
|
511
|
+
handleSubmit: p,
|
|
512
|
+
values: S,
|
|
513
|
+
touched: k,
|
|
514
|
+
errors: N
|
|
515
|
+
} = i;
|
|
516
|
+
return /* @__PURE__ */ e("div", { className: `${o["box-login"]}`, children: /* @__PURE__ */ e("div", { className: `${o["block-login"]}`, children: /* @__PURE__ */ l("div", { className: `${o["block-form"]}`, children: [
|
|
517
|
+
/* @__PURE__ */ l("div", { className: "d-flex align-items-center mb-4", children: [
|
|
518
|
+
/* @__PURE__ */ e(
|
|
519
|
+
"img",
|
|
520
|
+
{
|
|
521
|
+
src: a.schoolLogo,
|
|
522
|
+
className: `${o["school-icon"]} mr-3`
|
|
523
|
+
}
|
|
524
|
+
),
|
|
525
|
+
/* @__PURE__ */ e(
|
|
526
|
+
"p",
|
|
527
|
+
{
|
|
528
|
+
className: `${o["school-name"]} mb-0`,
|
|
529
|
+
children: a.schoolName
|
|
530
|
+
}
|
|
531
|
+
)
|
|
532
|
+
] }),
|
|
533
|
+
/* @__PURE__ */ e("p", { className: `${o["title-login"]} `, children: "Forgot password" }),
|
|
534
|
+
/* @__PURE__ */ e(
|
|
535
|
+
"p",
|
|
536
|
+
{
|
|
537
|
+
className: `${o["recover-account"]} mb-5`,
|
|
538
|
+
children: "Enter email to recover your account"
|
|
539
|
+
}
|
|
540
|
+
),
|
|
541
|
+
/* @__PURE__ */ l("div", { className: "w-100", children: [
|
|
542
|
+
/* @__PURE__ */ e(
|
|
543
|
+
Z,
|
|
544
|
+
{
|
|
545
|
+
type: "text",
|
|
546
|
+
name: "email",
|
|
547
|
+
id: "email",
|
|
548
|
+
placeholder: "Input email",
|
|
549
|
+
onChange: u,
|
|
550
|
+
value: S.email
|
|
551
|
+
}
|
|
552
|
+
),
|
|
553
|
+
k.email && N.email && /* @__PURE__ */ e(D, { text: N.email })
|
|
554
|
+
] }),
|
|
555
|
+
/* @__PURE__ */ e(
|
|
556
|
+
ve,
|
|
557
|
+
{
|
|
558
|
+
to: "/login",
|
|
559
|
+
className: `${o["link-to-login"]} mt-2`,
|
|
560
|
+
children: "Return to login"
|
|
561
|
+
}
|
|
562
|
+
),
|
|
563
|
+
/* @__PURE__ */ e(
|
|
564
|
+
as,
|
|
565
|
+
{
|
|
566
|
+
action: "forgetPass",
|
|
567
|
+
onVerify: n
|
|
568
|
+
}
|
|
569
|
+
),
|
|
570
|
+
/* @__PURE__ */ e(F, { className: "p-0", children: /* @__PURE__ */ e(
|
|
571
|
+
"button",
|
|
572
|
+
{
|
|
573
|
+
className: `${o["btn-login"]} mt-5`,
|
|
574
|
+
onClick: () => p(),
|
|
575
|
+
children: "Continue"
|
|
576
|
+
}
|
|
577
|
+
) })
|
|
578
|
+
] }) }) });
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
);
|
|
582
|
+
}, Is = x.object({
|
|
583
|
+
password: x.string().required("New password is required"),
|
|
584
|
+
reEnterPassword: x.string().required("Please re-enter new password").test("matching", "Passwords do not match", function() {
|
|
585
|
+
return this.parent.password === this.parent.reEnterPassword;
|
|
586
|
+
})
|
|
587
|
+
}), bs = () => {
|
|
588
|
+
const {
|
|
589
|
+
validLink: a,
|
|
590
|
+
resetPasswordRequest: t,
|
|
591
|
+
isShowNewPassword: r,
|
|
592
|
+
setIsShowNewPassword: n,
|
|
593
|
+
isShowReTypePassword: i,
|
|
594
|
+
setIsShowReTypePassword: u,
|
|
595
|
+
initialValues: p
|
|
596
|
+
} = Re();
|
|
597
|
+
return /* @__PURE__ */ e(
|
|
598
|
+
ie,
|
|
599
|
+
{
|
|
600
|
+
initialValues: p,
|
|
601
|
+
enableReinitialize: !0,
|
|
602
|
+
validationSchema: Is,
|
|
603
|
+
onSubmit: (S) => {
|
|
604
|
+
t(S);
|
|
605
|
+
},
|
|
606
|
+
children: (S) => {
|
|
607
|
+
const { setFieldValue: k, handleSubmit: N, touched: y, errors: c, values: f } = S;
|
|
608
|
+
return /* @__PURE__ */ e(ne, { className: `${o["box-login"]}`, children: /* @__PURE__ */ e(F, { className: "p-0", children: /* @__PURE__ */ e("div", { className: `${o["block-login"]}`, children: /* @__PURE__ */ l("div", { className: `${o["block-form"]}`, children: [
|
|
609
|
+
/* @__PURE__ */ e(
|
|
610
|
+
"img",
|
|
611
|
+
{
|
|
612
|
+
src: `${Y(
|
|
613
|
+
"/images/horizontal-logo-blue.svg"
|
|
614
|
+
)}`,
|
|
615
|
+
className: `${o["img-login-rectangle"]}`
|
|
616
|
+
}
|
|
617
|
+
),
|
|
618
|
+
/* @__PURE__ */ e("p", { className: `${o["title-login"]}`, children: "Reset Password" }),
|
|
619
|
+
/* @__PURE__ */ e("div", { className: "w-100", children: a ? /* @__PURE__ */ l(ae, { children: [
|
|
620
|
+
/* @__PURE__ */ e(
|
|
621
|
+
K,
|
|
622
|
+
{
|
|
623
|
+
className: `${o["form-user-name"]}`,
|
|
624
|
+
children: /* @__PURE__ */ e(
|
|
625
|
+
Z,
|
|
626
|
+
{
|
|
627
|
+
disabled: !0,
|
|
628
|
+
type: "text",
|
|
629
|
+
name: "email",
|
|
630
|
+
placeholder: "Email",
|
|
631
|
+
value: f.email,
|
|
632
|
+
autocomplete: "email",
|
|
633
|
+
required: !0,
|
|
634
|
+
className: `${o.input}`
|
|
635
|
+
}
|
|
636
|
+
)
|
|
637
|
+
}
|
|
638
|
+
),
|
|
639
|
+
/* @__PURE__ */ l(
|
|
640
|
+
"div",
|
|
641
|
+
{
|
|
642
|
+
className: `${o["form-user-name"]}`,
|
|
643
|
+
children: [
|
|
644
|
+
/* @__PURE__ */ e(
|
|
645
|
+
J,
|
|
646
|
+
{
|
|
647
|
+
isShowPassword: r,
|
|
648
|
+
togglePasswordVisible: () => n(
|
|
649
|
+
!r
|
|
650
|
+
),
|
|
651
|
+
onChange: (E) => k(
|
|
652
|
+
"password",
|
|
653
|
+
E.target.value
|
|
654
|
+
)
|
|
655
|
+
}
|
|
656
|
+
),
|
|
657
|
+
y.password && c.password && /* @__PURE__ */ e(
|
|
658
|
+
D,
|
|
659
|
+
{
|
|
660
|
+
text: c.password
|
|
661
|
+
}
|
|
662
|
+
)
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
),
|
|
666
|
+
/* @__PURE__ */ l(
|
|
667
|
+
"div",
|
|
668
|
+
{
|
|
669
|
+
className: `${o["form-user-name"]}`,
|
|
670
|
+
children: [
|
|
671
|
+
/* @__PURE__ */ e(
|
|
672
|
+
J,
|
|
673
|
+
{
|
|
674
|
+
placeholder: "Confirm Password",
|
|
675
|
+
isShowPassword: i,
|
|
676
|
+
togglePasswordVisible: () => u(
|
|
677
|
+
!i
|
|
678
|
+
),
|
|
679
|
+
onChange: (E) => k(
|
|
680
|
+
"reEnterPassword",
|
|
681
|
+
E.target.value
|
|
682
|
+
)
|
|
683
|
+
}
|
|
684
|
+
),
|
|
685
|
+
y.reEnterPassword && c.reEnterPassword && /* @__PURE__ */ e(
|
|
686
|
+
D,
|
|
687
|
+
{
|
|
688
|
+
text: c.reEnterPassword
|
|
689
|
+
}
|
|
690
|
+
)
|
|
691
|
+
]
|
|
692
|
+
}
|
|
693
|
+
)
|
|
694
|
+
] }) : /* @__PURE__ */ l(ae, { children: [
|
|
695
|
+
/* @__PURE__ */ e(
|
|
696
|
+
"p",
|
|
697
|
+
{
|
|
698
|
+
className: `${o["recover-account"]} mb-5`,
|
|
699
|
+
children: "Invalid reset password link"
|
|
700
|
+
}
|
|
701
|
+
),
|
|
702
|
+
/* @__PURE__ */ e("p", { className: "w-100", children: "It may have been accessed before or expired or you have just tried to reset another account's password" })
|
|
703
|
+
] }) }),
|
|
704
|
+
a && /* @__PURE__ */ e(F, { className: "p-0", children: /* @__PURE__ */ e(
|
|
705
|
+
"button",
|
|
706
|
+
{
|
|
707
|
+
className: `${o["btn-login"]} ${o["btn-rounder"]} mt-4`,
|
|
708
|
+
onClick: () => N(),
|
|
709
|
+
children: "SET A NEW PASSWORD"
|
|
710
|
+
}
|
|
711
|
+
) })
|
|
712
|
+
] }) }) }) });
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
);
|
|
716
|
+
}, Te = `${He}/api/school`, ks = () => Le.get(`${Te}/settings`), Ps = () => Le.get(`${Te}/info`), vs = {
|
|
717
|
+
auth: {
|
|
718
|
+
clientId: se ? "a27f8ac9-e039-4bbd-a9e1-3096e52a77bb" : "90c6897c-f17b-475e-a7a8-9a19651e0060",
|
|
719
|
+
authority: "https://login.microsoftonline.com/common",
|
|
720
|
+
redirectUri: "https://sso.marioforme.com/microsoft-login.html"
|
|
721
|
+
},
|
|
722
|
+
cache: {
|
|
723
|
+
cacheLocation: "sessionStorage",
|
|
724
|
+
// This configures where your cache will be stored
|
|
725
|
+
storeAuthStateInCookie: !1
|
|
726
|
+
// Set this to "true" if you are having issues on IE11 or Edge
|
|
727
|
+
},
|
|
728
|
+
system: {
|
|
729
|
+
loggerOptions: {
|
|
730
|
+
loggerCallback: (a, t, r) => {
|
|
731
|
+
if (!r)
|
|
732
|
+
switch (a) {
|
|
733
|
+
case ee.Error:
|
|
734
|
+
console.error(t);
|
|
735
|
+
return;
|
|
736
|
+
case ee.Info:
|
|
737
|
+
console.info(t);
|
|
738
|
+
return;
|
|
739
|
+
case ee.Verbose:
|
|
740
|
+
console.debug(t);
|
|
741
|
+
return;
|
|
742
|
+
case ee.Warning:
|
|
743
|
+
console.warn(t);
|
|
744
|
+
return;
|
|
745
|
+
default:
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
}, Es = {
|
|
752
|
+
email: "",
|
|
753
|
+
password: "",
|
|
754
|
+
captcha: "",
|
|
755
|
+
rememberMe: !1,
|
|
756
|
+
isSessionUserBrowser: !!sessionStorage.getItem(ge)
|
|
757
|
+
}, Ls = "/home", be = "/home", Cs = "/admin/home", Rs = "/parent", Ts = "/admin/schools", $s = "/list-student", xs = "Log in", As = () => {
|
|
758
|
+
const a = re(), t = he(), [r, n] = v(!1), i = ye(
|
|
759
|
+
(s) => s.common.isLoginGoogle
|
|
760
|
+
), [u, p] = v(""), [S, k] = v(""), [N, y] = v(""), c = ye((s) => s.common.inforUserGoogle), f = new URLSearchParams(location.search), E = f.get("type") === "classlink", U = f.get("token"), A = f.get("isAdminUser"), [
|
|
761
|
+
d
|
|
762
|
+
/*, setOpenModelAssign*/
|
|
763
|
+
] = v(!1), [m, G] = v({
|
|
764
|
+
schoolName: "",
|
|
765
|
+
schoolLogo: "",
|
|
766
|
+
schoolId: 0
|
|
767
|
+
}), [C, _] = v(null), M = L(() => {
|
|
768
|
+
n(!r);
|
|
769
|
+
}, [r]), [I, R] = v(!1);
|
|
770
|
+
q(() => {
|
|
771
|
+
document.title = xs;
|
|
772
|
+
const s = De("auth-token");
|
|
773
|
+
if (s) {
|
|
774
|
+
const h = window.location.hostname;
|
|
775
|
+
if (localStorage.setItem(T, s), document.cookie = `auth-token=;domain=${h.includes("localhost") ? h : ".marioforme.com"}; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/`, document.cookie = "redirect-uri=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/", A)
|
|
776
|
+
return t("/admin/home");
|
|
777
|
+
}
|
|
778
|
+
te() && t("/"), $e();
|
|
779
|
+
}, [A]);
|
|
780
|
+
const B = () => {
|
|
781
|
+
localStorage.removeItem(T), sessionStorage.removeItem(T), localStorage.removeItem("USER_EMAIL");
|
|
782
|
+
};
|
|
783
|
+
q(() => {
|
|
784
|
+
E && U != "" && z();
|
|
785
|
+
}, []);
|
|
786
|
+
const H = () => {
|
|
787
|
+
if (se) {
|
|
788
|
+
const s = "https://clever.com/oauth/instant-login?client_id=c3da6c669d239c70d48e&district_id=66132a6f222bda41cc8abe5d";
|
|
789
|
+
window.location.href = s;
|
|
790
|
+
} else {
|
|
791
|
+
const s = `https://clever.com/oauth/authorize?response_type=code&redirect_uri=${encodeURIComponent("https://classlink.marioforme.com/api/clever/clever-login")}&client_id=c3da6c669d239c70d48e`;
|
|
792
|
+
window.location.href = s;
|
|
793
|
+
}
|
|
794
|
+
}, z = async () => {
|
|
795
|
+
a(w(!0));
|
|
796
|
+
try {
|
|
797
|
+
const g = await ze({
|
|
798
|
+
tokenClassLink: U
|
|
799
|
+
}), { email: h, token: b } = g.data;
|
|
800
|
+
await O({
|
|
801
|
+
email: h,
|
|
802
|
+
rememberMe: !1,
|
|
803
|
+
password: "default",
|
|
804
|
+
accessToken: b
|
|
805
|
+
});
|
|
806
|
+
} catch (s) {
|
|
807
|
+
a(
|
|
808
|
+
$({
|
|
809
|
+
type: "danger",
|
|
810
|
+
message: s.response?.data?.title || s.message
|
|
811
|
+
})
|
|
812
|
+
);
|
|
813
|
+
}
|
|
814
|
+
a(w(!1));
|
|
815
|
+
}, le = window.location.host.includes("-district"), Q = L(async () => {
|
|
816
|
+
a(w(!0));
|
|
817
|
+
try {
|
|
818
|
+
const s = await Ps(), g = s.data.schoolLogo ?? "";
|
|
819
|
+
s.data && G({
|
|
820
|
+
schoolName: s.data.schoolName,
|
|
821
|
+
schoolLogo: g ? je(g) : Y("/images/logo_header_blue.png"),
|
|
822
|
+
schoolId: s.data.schoolId
|
|
823
|
+
});
|
|
824
|
+
} catch (s) {
|
|
825
|
+
a(
|
|
826
|
+
$({
|
|
827
|
+
type: "danger",
|
|
828
|
+
message: s.response?.data?.title || s.message
|
|
829
|
+
})
|
|
830
|
+
);
|
|
831
|
+
}
|
|
832
|
+
a(w(!1));
|
|
833
|
+
}, []), O = L(async (s) => {
|
|
834
|
+
a(w(!0));
|
|
835
|
+
try {
|
|
836
|
+
const g = s?.isSessionUserBrowser ?? !1, h = await We({
|
|
837
|
+
...s,
|
|
838
|
+
email: s?.email?.trim(),
|
|
839
|
+
password: s?.password?.trim()
|
|
840
|
+
}), {
|
|
841
|
+
token: b,
|
|
842
|
+
id: V,
|
|
843
|
+
firstName: X,
|
|
844
|
+
lastName: j,
|
|
845
|
+
roles: P,
|
|
846
|
+
email: ce,
|
|
847
|
+
profileImageFileName: Ue,
|
|
848
|
+
isLoginFirst: Ge
|
|
849
|
+
} = h.data;
|
|
850
|
+
if (g ? (sessionStorage.setItem(T, b), sessionStorage.setItem(
|
|
851
|
+
ge,
|
|
852
|
+
g
|
|
853
|
+
)) : (sessionStorage.removeItem(ge), localStorage.setItem(T, b)), localStorage.removeItem(Ke), a(
|
|
854
|
+
Ye({
|
|
855
|
+
id: V,
|
|
856
|
+
firstName: X,
|
|
857
|
+
lastName: j,
|
|
858
|
+
roles: P,
|
|
859
|
+
email: ce,
|
|
860
|
+
profileImageFileName: Ue
|
|
861
|
+
})
|
|
862
|
+
), !localStorage.getItem("ROLES") && P.includes("Admin") && localStorage.setItem("ROLES", "Admin"), s?.email && !P.includes("Admin")) {
|
|
863
|
+
W.init(
|
|
864
|
+
se ? Ze : Je,
|
|
865
|
+
s.email,
|
|
866
|
+
{
|
|
867
|
+
defaultTracking: !1
|
|
868
|
+
}
|
|
869
|
+
);
|
|
870
|
+
const de = window.location.hostname, Se = new W.Identify();
|
|
871
|
+
Se.set("domain", de), W.identify(Se), W.track("general: session start", {
|
|
872
|
+
user_id: s.email,
|
|
873
|
+
domain: de,
|
|
874
|
+
roles: s?.roles?.toString()
|
|
875
|
+
}), localStorage.setItem("USER_EMAIL", s.email), Ge && W.track("general: first login", {
|
|
876
|
+
user_id: s.email,
|
|
877
|
+
domain: de,
|
|
878
|
+
roles: s?.roles?.toString()
|
|
879
|
+
});
|
|
880
|
+
}
|
|
881
|
+
le ? t(Ts) : P.includes("Admin") ? t(Cs) : P.includes("Teacher") || P.includes("Assistant") || P.includes("Counselor") || P.includes("SecondaryTeacher") ? t(Ls) : P.includes("Student") ? t(be) : P.includes("Parent") ? t(Rs) : P.includes("EduTeacher") && t($s);
|
|
882
|
+
} catch (g) {
|
|
883
|
+
a(
|
|
884
|
+
$({
|
|
885
|
+
type: "danger",
|
|
886
|
+
message: g.response?.data?.title || g.message || "Login failed"
|
|
887
|
+
})
|
|
888
|
+
), localStorage.removeItem(T), sessionStorage.removeItem(T);
|
|
889
|
+
}
|
|
890
|
+
a(w(!1));
|
|
891
|
+
}, []), $e = async () => {
|
|
892
|
+
try {
|
|
893
|
+
const s = await Qe();
|
|
894
|
+
p(s.data.googleClientId), k(s.data.googleCaptchaId), y(s.data.extensionEmail);
|
|
895
|
+
} catch (s) {
|
|
896
|
+
a(
|
|
897
|
+
$({
|
|
898
|
+
type: "danger",
|
|
899
|
+
message: s.response?.data?.title || s.message || "Login failed"
|
|
900
|
+
})
|
|
901
|
+
);
|
|
902
|
+
}
|
|
903
|
+
}, pe = L(
|
|
904
|
+
async (s, g, h, b) => {
|
|
905
|
+
a(w(!0));
|
|
906
|
+
try {
|
|
907
|
+
if ((await Xe(s, g)).data) {
|
|
908
|
+
const j = {
|
|
909
|
+
email: g.email,
|
|
910
|
+
isLoginGoogle: !0,
|
|
911
|
+
rememberMe: !1,
|
|
912
|
+
password: "default",
|
|
913
|
+
accessToken: h,
|
|
914
|
+
captcha: "",
|
|
915
|
+
loginType: oe.Google
|
|
916
|
+
};
|
|
917
|
+
if (b != null) {
|
|
918
|
+
const P = await b();
|
|
919
|
+
j.captcha = P;
|
|
920
|
+
}
|
|
921
|
+
await O(j), a(me(!1));
|
|
922
|
+
} else if ((await Ne(g))?.data) {
|
|
923
|
+
const P = {
|
|
924
|
+
email: g.email,
|
|
925
|
+
isLoginGoogle: !0,
|
|
926
|
+
rememberMe: !1,
|
|
927
|
+
password: "default",
|
|
928
|
+
accessToken: h,
|
|
929
|
+
captcha: "",
|
|
930
|
+
loginType: oe.Google
|
|
931
|
+
};
|
|
932
|
+
if (b != null) {
|
|
933
|
+
const ce = await b();
|
|
934
|
+
P.captcha = ce;
|
|
935
|
+
}
|
|
936
|
+
await O(P);
|
|
937
|
+
}
|
|
938
|
+
} catch (V) {
|
|
939
|
+
a(
|
|
940
|
+
$({
|
|
941
|
+
type: "danger",
|
|
942
|
+
message: V.response?.data?.title || V.message || "Login failed"
|
|
943
|
+
})
|
|
944
|
+
);
|
|
945
|
+
}
|
|
946
|
+
a(w(!1));
|
|
947
|
+
},
|
|
948
|
+
[]
|
|
949
|
+
), xe = async (s, g) => {
|
|
950
|
+
a(w(!0));
|
|
951
|
+
try {
|
|
952
|
+
const h = {
|
|
953
|
+
firstName: c.firstName,
|
|
954
|
+
lastName: c.lastName,
|
|
955
|
+
imageUrl: c.imageUrl,
|
|
956
|
+
fullName: c.fullName,
|
|
957
|
+
email: c.email,
|
|
958
|
+
accessToken: c.accessToken,
|
|
959
|
+
teacherId: s
|
|
960
|
+
};
|
|
961
|
+
if ((await Ne(h)).data) {
|
|
962
|
+
const V = await g(), X = {
|
|
963
|
+
email: c.email,
|
|
964
|
+
captcha: V,
|
|
965
|
+
isLoginGoogle: !0,
|
|
966
|
+
rememberMe: !1,
|
|
967
|
+
password: "default",
|
|
968
|
+
accessToken: c.accessToken,
|
|
969
|
+
loginType: oe.Google
|
|
970
|
+
};
|
|
971
|
+
a(me(!1)), await O(X), t(be);
|
|
972
|
+
}
|
|
973
|
+
} catch (h) {
|
|
974
|
+
a(
|
|
975
|
+
$({
|
|
976
|
+
type: "danger",
|
|
977
|
+
message: h.response?.data?.title || h.message || "Login failed"
|
|
978
|
+
})
|
|
979
|
+
);
|
|
980
|
+
}
|
|
981
|
+
a(me(!1)), a(w(!1));
|
|
982
|
+
}, Ae = async () => {
|
|
983
|
+
try {
|
|
984
|
+
const s = await ks();
|
|
985
|
+
a(es(s.data.isSandboxMode));
|
|
986
|
+
} catch (s) {
|
|
987
|
+
console.error(s);
|
|
988
|
+
}
|
|
989
|
+
}, fe = async (s) => {
|
|
990
|
+
C.handleRedirectPromise().then(async (g) => {
|
|
991
|
+
if (m?.schoolId)
|
|
992
|
+
if (g) {
|
|
993
|
+
let h = g.account;
|
|
994
|
+
await we(h, s);
|
|
995
|
+
} else {
|
|
996
|
+
const h = C.getAllAccounts();
|
|
997
|
+
if (h.length === 0) {
|
|
998
|
+
const b = se ? "https://brightsoft.marioforme.com" : "https://sso.marioforme.com";
|
|
999
|
+
window.location.href = (window.location.hostname === "localhost" ? "https://localhost:3000" : b) + `/microsoft-login.html?redirect-uri=${window.location.href}&schoolId=${m.schoolId}`;
|
|
1000
|
+
} else {
|
|
1001
|
+
let b = h[0];
|
|
1002
|
+
await we(b, s);
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
}).catch((g) => {
|
|
1006
|
+
console.error(g);
|
|
1007
|
+
});
|
|
1008
|
+
}, we = async (s, g) => {
|
|
1009
|
+
let h = s.name, b = {
|
|
1010
|
+
firstName: h.split(" ").slice(0, -1).join(" "),
|
|
1011
|
+
lastName: h.split(" ").slice(-1).join(" "),
|
|
1012
|
+
fullName: h,
|
|
1013
|
+
imageUrl: "",
|
|
1014
|
+
email: s.username,
|
|
1015
|
+
accessToken: s.idTokenClaims.aio,
|
|
1016
|
+
googleId: s.tenantId
|
|
1017
|
+
};
|
|
1018
|
+
a(Ee(b)), await pe(
|
|
1019
|
+
Ce.MicrosoftSSO,
|
|
1020
|
+
b,
|
|
1021
|
+
s.idTokenClaims.aio,
|
|
1022
|
+
g
|
|
1023
|
+
);
|
|
1024
|
+
}, Oe = async () => {
|
|
1025
|
+
const s = new is(vs);
|
|
1026
|
+
await s.initialize(), _(s);
|
|
1027
|
+
};
|
|
1028
|
+
return q(() => {
|
|
1029
|
+
let s = window.location.href;
|
|
1030
|
+
C && s.includes("code") && s.includes("client_info") && fe();
|
|
1031
|
+
}, [JSON.stringify(C)]), q(() => {
|
|
1032
|
+
Ae(), Oe(), Q();
|
|
1033
|
+
}, []), {
|
|
1034
|
+
defaultInfo: Es,
|
|
1035
|
+
userLogin: O,
|
|
1036
|
+
openLogin: r,
|
|
1037
|
+
toggle: M,
|
|
1038
|
+
isShowPassword: I,
|
|
1039
|
+
setIsShowPassword: R,
|
|
1040
|
+
fnIsCheckLogin: pe,
|
|
1041
|
+
isLoginGoogle: i,
|
|
1042
|
+
infoUser: c,
|
|
1043
|
+
submitLogin: xe,
|
|
1044
|
+
googleClientId: u,
|
|
1045
|
+
googleRecaptchaId: S,
|
|
1046
|
+
handleCancelModelAssign: B,
|
|
1047
|
+
openModelAssign: d,
|
|
1048
|
+
// handleAssignTeacherByCode,
|
|
1049
|
+
fnLoginSSO: fe,
|
|
1050
|
+
school: m,
|
|
1051
|
+
extensionEmail: N,
|
|
1052
|
+
handleLoginWidthClever: H
|
|
1053
|
+
};
|
|
1054
|
+
}, ke = "/", Os = "/login", Pe = "Log in", Us = () => {
|
|
1055
|
+
const a = re(), t = he(), r = location.search, i = new URLSearchParams(r).get("userId"), [u, p] = v(!1), [S, k] = v(
|
|
1056
|
+
!1
|
|
1057
|
+
), [N, y] = v({
|
|
1058
|
+
password: "",
|
|
1059
|
+
reEnterPassword: "",
|
|
1060
|
+
email: "",
|
|
1061
|
+
userId: i ?? "",
|
|
1062
|
+
token: ""
|
|
1063
|
+
}), { executeRecaptcha: c } = ue(), f = L(async (d) => {
|
|
1064
|
+
a(w(!0));
|
|
1065
|
+
try {
|
|
1066
|
+
const m = await ss(d);
|
|
1067
|
+
y({ ...N, email: m.data });
|
|
1068
|
+
} catch (m) {
|
|
1069
|
+
a(
|
|
1070
|
+
$({
|
|
1071
|
+
type: "danger",
|
|
1072
|
+
message: m.message
|
|
1073
|
+
})
|
|
1074
|
+
);
|
|
1075
|
+
}
|
|
1076
|
+
a(w(!1));
|
|
1077
|
+
}, []), E = L(async (d) => {
|
|
1078
|
+
a(w(!0));
|
|
1079
|
+
try {
|
|
1080
|
+
await os(d), t(Os), a(
|
|
1081
|
+
$({
|
|
1082
|
+
type: "success",
|
|
1083
|
+
message: "Create password sucessfully"
|
|
1084
|
+
})
|
|
1085
|
+
);
|
|
1086
|
+
} catch (m) {
|
|
1087
|
+
a(
|
|
1088
|
+
$({
|
|
1089
|
+
type: "danger",
|
|
1090
|
+
message: m.response?.data?.title || m.message || "Error occured"
|
|
1091
|
+
})
|
|
1092
|
+
), localStorage.removeItem(T), sessionStorage.removeItem(T);
|
|
1093
|
+
}
|
|
1094
|
+
a(w(!1));
|
|
1095
|
+
}, []), U = L(async () => {
|
|
1096
|
+
if (!c) {
|
|
1097
|
+
console.log("execute recaptcha undefined");
|
|
1098
|
+
return;
|
|
1099
|
+
}
|
|
1100
|
+
return await c("forgetPass");
|
|
1101
|
+
}, [c]), A = L(() => {
|
|
1102
|
+
}, []);
|
|
1103
|
+
return q(() => {
|
|
1104
|
+
document.title = Pe, te() && t(ke), i && f(i);
|
|
1105
|
+
}, [i]), q(() => {
|
|
1106
|
+
document.title = Pe, te() && t(ke);
|
|
1107
|
+
}, []), {
|
|
1108
|
+
createPasswordRequest: E,
|
|
1109
|
+
isShowNewPassword: u,
|
|
1110
|
+
setIsShowNewPassword: p,
|
|
1111
|
+
isShowReTypePassword: S,
|
|
1112
|
+
setIsShowReTypePassword: k,
|
|
1113
|
+
clickHandler: U,
|
|
1114
|
+
handleVerify: A,
|
|
1115
|
+
initialValues: N
|
|
1116
|
+
};
|
|
1117
|
+
}, Gs = x.object({
|
|
1118
|
+
password: x.string().required("Password is required"),
|
|
1119
|
+
reEnterPassword: x.string().required("Please re-enter Password").test("matching", "Passwords do not match", function() {
|
|
1120
|
+
return this.parent.password === this.parent.reEnterPassword;
|
|
1121
|
+
})
|
|
1122
|
+
}), _s = () => {
|
|
1123
|
+
const {
|
|
1124
|
+
createPasswordRequest: a,
|
|
1125
|
+
isShowNewPassword: t,
|
|
1126
|
+
setIsShowNewPassword: r,
|
|
1127
|
+
isShowReTypePassword: n,
|
|
1128
|
+
setIsShowReTypePassword: i,
|
|
1129
|
+
initialValues: u
|
|
1130
|
+
} = Us();
|
|
1131
|
+
return /* @__PURE__ */ e(
|
|
1132
|
+
ie,
|
|
1133
|
+
{
|
|
1134
|
+
initialValues: u,
|
|
1135
|
+
enableReinitialize: !0,
|
|
1136
|
+
validationSchema: Gs,
|
|
1137
|
+
onSubmit: (p) => {
|
|
1138
|
+
a(p);
|
|
1139
|
+
},
|
|
1140
|
+
children: (p) => {
|
|
1141
|
+
const {
|
|
1142
|
+
setFieldValue: S,
|
|
1143
|
+
handleSubmit: k,
|
|
1144
|
+
touched: N,
|
|
1145
|
+
errors: y,
|
|
1146
|
+
values: c
|
|
1147
|
+
} = p;
|
|
1148
|
+
return /* @__PURE__ */ e(ne, { className: `${o["box-login"]}`, children: /* @__PURE__ */ l(F, { className: "p-0", children: [
|
|
1149
|
+
/* @__PURE__ */ e(
|
|
1150
|
+
"div",
|
|
1151
|
+
{
|
|
1152
|
+
hidden: !c.email,
|
|
1153
|
+
className: `${o["block-login"]}`,
|
|
1154
|
+
children: /* @__PURE__ */ l("div", { className: `${o["block-form"]}`, children: [
|
|
1155
|
+
/* @__PURE__ */ e(
|
|
1156
|
+
"img",
|
|
1157
|
+
{
|
|
1158
|
+
src: `${Y(
|
|
1159
|
+
"/images/horizontal-logo-blue.svg"
|
|
1160
|
+
)}`,
|
|
1161
|
+
className: `${o["img-login-rectangle"]}`
|
|
1162
|
+
}
|
|
1163
|
+
),
|
|
1164
|
+
/* @__PURE__ */ e("p", { className: `${o["title-login"]}`, children: "Create Your Password" }),
|
|
1165
|
+
/* @__PURE__ */ e("div", { className: "w-100", children: /* @__PURE__ */ l(ae, { children: [
|
|
1166
|
+
/* @__PURE__ */ e(
|
|
1167
|
+
K,
|
|
1168
|
+
{
|
|
1169
|
+
className: `${o["form-user-name"]}`,
|
|
1170
|
+
children: /* @__PURE__ */ e(
|
|
1171
|
+
Z,
|
|
1172
|
+
{
|
|
1173
|
+
disabled: !0,
|
|
1174
|
+
type: "text",
|
|
1175
|
+
name: "email",
|
|
1176
|
+
placeholder: "Email",
|
|
1177
|
+
value: c.email,
|
|
1178
|
+
autocomplete: "email",
|
|
1179
|
+
required: !0,
|
|
1180
|
+
className: `${o.input}`
|
|
1181
|
+
}
|
|
1182
|
+
)
|
|
1183
|
+
}
|
|
1184
|
+
),
|
|
1185
|
+
/* @__PURE__ */ l(
|
|
1186
|
+
"div",
|
|
1187
|
+
{
|
|
1188
|
+
className: `${o["form-user-name"]}`,
|
|
1189
|
+
children: [
|
|
1190
|
+
/* @__PURE__ */ e(
|
|
1191
|
+
J,
|
|
1192
|
+
{
|
|
1193
|
+
isShowPassword: t,
|
|
1194
|
+
togglePasswordVisible: () => r(
|
|
1195
|
+
!t
|
|
1196
|
+
),
|
|
1197
|
+
onChange: (f) => S(
|
|
1198
|
+
"password",
|
|
1199
|
+
f.target.value
|
|
1200
|
+
)
|
|
1201
|
+
}
|
|
1202
|
+
),
|
|
1203
|
+
N.password && y.password && /* @__PURE__ */ e(
|
|
1204
|
+
D,
|
|
1205
|
+
{
|
|
1206
|
+
text: y.password
|
|
1207
|
+
}
|
|
1208
|
+
)
|
|
1209
|
+
]
|
|
1210
|
+
}
|
|
1211
|
+
),
|
|
1212
|
+
/* @__PURE__ */ l(
|
|
1213
|
+
"div",
|
|
1214
|
+
{
|
|
1215
|
+
className: `${o["form-user-name"]}`,
|
|
1216
|
+
children: [
|
|
1217
|
+
/* @__PURE__ */ e(
|
|
1218
|
+
J,
|
|
1219
|
+
{
|
|
1220
|
+
placeholder: "Confirm Password",
|
|
1221
|
+
isShowPassword: n,
|
|
1222
|
+
togglePasswordVisible: () => i(
|
|
1223
|
+
!n
|
|
1224
|
+
),
|
|
1225
|
+
onChange: (f) => S(
|
|
1226
|
+
"reEnterPassword",
|
|
1227
|
+
f.target.value
|
|
1228
|
+
)
|
|
1229
|
+
}
|
|
1230
|
+
),
|
|
1231
|
+
N.reEnterPassword && y.reEnterPassword && /* @__PURE__ */ e(
|
|
1232
|
+
D,
|
|
1233
|
+
{
|
|
1234
|
+
text: y.reEnterPassword
|
|
1235
|
+
}
|
|
1236
|
+
)
|
|
1237
|
+
]
|
|
1238
|
+
}
|
|
1239
|
+
)
|
|
1240
|
+
] }) }),
|
|
1241
|
+
/* @__PURE__ */ e(
|
|
1242
|
+
"button",
|
|
1243
|
+
{
|
|
1244
|
+
className: `${o["btn-login"]} ${o["btn-rounder"]} mt-4`,
|
|
1245
|
+
onClick: () => k(),
|
|
1246
|
+
children: "CREATE YOUR PASSWORD"
|
|
1247
|
+
}
|
|
1248
|
+
)
|
|
1249
|
+
] })
|
|
1250
|
+
}
|
|
1251
|
+
),
|
|
1252
|
+
/* @__PURE__ */ e(
|
|
1253
|
+
"div",
|
|
1254
|
+
{
|
|
1255
|
+
hidden: !!c.email,
|
|
1256
|
+
className: `${o["block-login"]}`,
|
|
1257
|
+
children: /* @__PURE__ */ l("div", { className: `${o["block-form"]}`, children: [
|
|
1258
|
+
/* @__PURE__ */ e(
|
|
1259
|
+
"img",
|
|
1260
|
+
{
|
|
1261
|
+
src: `${Y(
|
|
1262
|
+
"/images/horizontal-logo-blue.svg"
|
|
1263
|
+
)}`,
|
|
1264
|
+
className: `${o["img-login-rectangle"]}`
|
|
1265
|
+
}
|
|
1266
|
+
),
|
|
1267
|
+
/* @__PURE__ */ e("p", { className: `${o["title-login"]}`, children: "You cannot regenerate the password" })
|
|
1268
|
+
] })
|
|
1269
|
+
}
|
|
1270
|
+
)
|
|
1271
|
+
] }) });
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
);
|
|
1275
|
+
}, Ms = "Log in", qs = "Forgot password", Bs = "Reset password", Qs = (a) => {
|
|
1276
|
+
const {
|
|
1277
|
+
isLogin: t,
|
|
1278
|
+
isForgotPassword: r,
|
|
1279
|
+
isResetPassword: n,
|
|
1280
|
+
isCreatePassword: i
|
|
1281
|
+
// isLoginTwoFactor
|
|
1282
|
+
} = a, {
|
|
1283
|
+
defaultInfo: u,
|
|
1284
|
+
userLogin: p,
|
|
1285
|
+
googleRecaptchaId: S,
|
|
1286
|
+
handleCancelModelAssign: k,
|
|
1287
|
+
school: N,
|
|
1288
|
+
openModelAssign: y,
|
|
1289
|
+
setIsShowPassword: c,
|
|
1290
|
+
fnIsCheckLogin: f,
|
|
1291
|
+
isLoginGoogle: E,
|
|
1292
|
+
submitLogin: U,
|
|
1293
|
+
infoUser: A,
|
|
1294
|
+
googleClientId: d,
|
|
1295
|
+
isShowPassword: m,
|
|
1296
|
+
fnLoginSSO: G,
|
|
1297
|
+
extensionEmail: C,
|
|
1298
|
+
handleLoginWidthClever: _
|
|
1299
|
+
} = As();
|
|
1300
|
+
return q(() => {
|
|
1301
|
+
t && (document.title = Ms), r && (document.title = qs), n && (document.title = Bs);
|
|
1302
|
+
}, [t, r, n]), /* @__PURE__ */ e("div", { className: `${o.login} container-fluid font-family-lato`, children: /* @__PURE__ */ l(ne, { className: "h-100", children: [
|
|
1303
|
+
/* @__PURE__ */ l(
|
|
1304
|
+
F,
|
|
1305
|
+
{
|
|
1306
|
+
lg: 8,
|
|
1307
|
+
md: 12,
|
|
1308
|
+
xs: 12,
|
|
1309
|
+
className: "d-flex justify-content-center h-100 align-items-center p-3 flex-column",
|
|
1310
|
+
children: [
|
|
1311
|
+
!!S && /* @__PURE__ */ l(
|
|
1312
|
+
ts,
|
|
1313
|
+
{
|
|
1314
|
+
useRecaptchaNet: !0,
|
|
1315
|
+
reCaptchaKey: S,
|
|
1316
|
+
scriptProps: {
|
|
1317
|
+
async: !0,
|
|
1318
|
+
defer: !0,
|
|
1319
|
+
appendTo: "body"
|
|
1320
|
+
},
|
|
1321
|
+
children: [
|
|
1322
|
+
t && /* @__PURE__ */ e(
|
|
1323
|
+
us,
|
|
1324
|
+
{
|
|
1325
|
+
userLogin: p,
|
|
1326
|
+
defaultInfo: u,
|
|
1327
|
+
onCancelModelAssign: k,
|
|
1328
|
+
openModelAssign: y,
|
|
1329
|
+
school: N,
|
|
1330
|
+
fnIsCheckLogin: f,
|
|
1331
|
+
googleClientId: d,
|
|
1332
|
+
infoUser: A,
|
|
1333
|
+
isLoginGoogle: E,
|
|
1334
|
+
isShowPassword: m,
|
|
1335
|
+
setIsShowPassword: c,
|
|
1336
|
+
submitLogin: U,
|
|
1337
|
+
fnLoginSSO: G,
|
|
1338
|
+
extensionEmail: C,
|
|
1339
|
+
onLoginWidthClever: _
|
|
1340
|
+
}
|
|
1341
|
+
),
|
|
1342
|
+
r && /* @__PURE__ */ e(ys, { school: N })
|
|
1343
|
+
]
|
|
1344
|
+
}
|
|
1345
|
+
),
|
|
1346
|
+
n && /* @__PURE__ */ e(bs, {}),
|
|
1347
|
+
i && /* @__PURE__ */ e(_s, {}),
|
|
1348
|
+
/* @__PURE__ */ e(
|
|
1349
|
+
"a",
|
|
1350
|
+
{
|
|
1351
|
+
href: "/privacy-policy/",
|
|
1352
|
+
target: "blank",
|
|
1353
|
+
className: `${o["privacy-policy"]}`,
|
|
1354
|
+
children: "Privacy Policy"
|
|
1355
|
+
}
|
|
1356
|
+
)
|
|
1357
|
+
]
|
|
1358
|
+
}
|
|
1359
|
+
),
|
|
1360
|
+
/* @__PURE__ */ e(
|
|
1361
|
+
F,
|
|
1362
|
+
{
|
|
1363
|
+
className: "p-3 mh-100 d-flex justify-content-end",
|
|
1364
|
+
lg: 4,
|
|
1365
|
+
md: 12,
|
|
1366
|
+
xs: 12,
|
|
1367
|
+
children: /* @__PURE__ */ e(
|
|
1368
|
+
"img",
|
|
1369
|
+
{
|
|
1370
|
+
src: `${Y(window.innerWidth > 992 ? "/images/img-login.png" : "/images/img-login-tablet.png")}`,
|
|
1371
|
+
className: `${o["img-login"]}`
|
|
1372
|
+
}
|
|
1373
|
+
)
|
|
1374
|
+
}
|
|
1375
|
+
)
|
|
1376
|
+
] }) });
|
|
1377
|
+
};
|
|
1378
|
+
export {
|
|
1379
|
+
Qs as default
|
|
1380
|
+
};
|