PageSourceSearch

https://student.lifeskillsgo.com/static/js/199.bdb44871.chunk.js

js lifeskillsgo.com collected 2026-10-05 09:42:21 UTC 11,063 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkclient=self.webpackChunkclient||[]).push([[199],{81768:function(e,r,n){var t=n(80296),o=n(65043),i=n(77627),s=n(3431),a=n(86868),c=n(50399),l=(n(2066),n(70579));r.A=(0,i.bk)({mapPropsToValues:function(e){return{username:e.username||"",password:e.password||""}},validationSchema:(0,s.Ik)().shape({username:(0,s.Yj)().required("Username is a required field"),password:(0,s.Yj)().min(1,"The password value is too short").required("Password is a required field")}),handleSubmit:function(e,r){var n=r.resetForm,t=r.setSubmitting;r.props.loginStudent(e),t(!1),n()}})(function(e){var r=e.touched,n=e.isSubmitting,s=e.errors,d=(0,o.useState)(!1),u=(0,t.A)(d,2),h=u[0],m=u[1];return(0,l.jsx)("div",{id:"student-login",children:(0,l.jsxs)("div",{id:"student-login-wrapper",children:[(0,l.jsx)("div",{id:"galaxy-girl",style:{backgroundImage:"url(".concat(c,")")}}),(0,l.jsx)("div",{id:"earth-boy",style:{backgroundImage:"url(".concat(a,")")}}),(0,l.jsx)("div",{id:"login-header",children:(0,l.jsx)("h3",{children:"Student log in"})}),(0,l.jsx)("div",{id:"login-body",children:(0,l.jsxs)(i.lV,{className:"form-signin",autoComplete:"off",children:[(0,l.jsx)("div",{className:"form-group row",children:(0,l.jsxs)("div",{className:"col-12",children:[(0,l.jsx)(i.D0,{"data-testid":"student-login-username-input",className:"form-control  ".concat(r.username&&s.username?"is-invalid":""),name:"username",type:"text",style:{position:"relative",zIndex:4},autoComplete:"username",autoFocus:!0,"aria-label":"username",placeholder:"Username"}),r.username&&s.username&&(0,l.jsx)("div",{"data-testid":"student-login-username-invalid-helper-text",id:"login-username-input-helper",className:"invalid-feedback",children:s.username})]})}),(0,l.jsx)("div",{className:"form-group row",children:(0,l.jsx)("div",{className:"col-12",children:(0,l.jsxs)("div",{className:"row",id:"passwordDiv",children:[(0,l.jsx)(i.D0,{"data-testid":"student-login-password-input",className:"form-control  ".concat(r.password&&s.password?"is-invalid":""),name:"password",type:h?"text":"password",autoComplete:"password",id:"passwordField","aria-label":"password",placeholder:"Password"}),r.password&&s.password&&(0,l.jsx)("div",{id:"login-password-input-helper",className:"invalid-feedback",children:s.password}),(0,l.jsx)("i",{className:"fa fa-".concat(h?"eye-slash":"eye"),id:"passwordIcon",onClick:function(){m(!h)}})]})})}),(0,l.jsx)("button",{"data-testid":"student-login-submit-button",className:"btn mb-3 btn-lg btn-primary btn-block",disabled:n,style:{position:"relative",zIndex:4},type:"submit",children:"Log In"})]})})]})})})},8998:function(e,r,n){var t=n(23029),o=n(92901),i=n(53895),s=n(85501),a=n(65043),c=n(70579),l=function(e){function r(){return(0,t.A)(this,r),(0,i.A)(this,r,arguments)}return(0,s.A)(r,e),(0,o.A)(r,[{key:"render",value:function(){return(0,c.jsx)("div",{className:"alert alert-".concat(this.props.type),role:"alert",children:this.props.message})}}])}(a.Component);l.DANGER="danger",l.PRIMARY="primary",l.SECONDARY="secondary",l.SUCCESS="success",l.INFO="info",l.WARNING="warning",l.LIGHT="light",l.DARK="dark",r.A=l},43189:function(e,r,n){n.r(r),n.d(r,{StudentLogin:function(){return I},default:function(){return M},mapDispatchToProps:function(){return T},mapStateToProps:function(){return L}});var t=n(64467),o=n(91212),i=n(10467),s=n(80296),a=n(65043),c=n(80284),l=n(18456),d=n(96446),u=n(85865),h=n(43845),m=n(17830),p=n(99466),g=n(15447),f=n(76375),x=n(93843),v=n(81768),w=n(69309),b=n.n(w),A=(n(86868),n(50399),n(2066),n(70579));function y(e){var r=(0,a.useState)(!1),n=(0,s.A)(r,2),t=n[0],o=n[1];return(0,a.useEffect)(function(){navigator.mediaDevices.getUserMedia({video:{facingMode:"environment",width:{ideal:1280},height:{ideal:720}}}).then(function(e){return o(!0),function(){e.getTracks().forEach(function(e){return e.stop()})}}).catch(function(r){console.error("Camera permission error:",r),e.handleError(r)})},[]),t?(0,A.jsx)("div",{className:"lsgo-qr-scanner",style:{maxWidth:"100%"},children:(0,A.jsx)(b(),{"data-testid":"student-qr-scanner",delay:300,onError:e.handleError,onScan:e.handleScan,constraints:{video:{facingMode:"environment",width:{ideal:1280},height:{ideal:720}}},style:{height:"100%",width:"100%",margin:"0 auto",maxHeight:240},className:"lsgo-qr",canvasOptions:{willReadFrequently:!0},scanInterval:500},e.scannerKey)}):(0,A.jsx)("div",{style:{height:300},children:"Requesting camera permission..."})}var j=n(8998),S=n(41197),k=n(43675),C=n(97756),N=n(33341),E=n.p+"static/media/nswdoe_logo_white.b50a6c388f0dc3789f36.png",R=n(20625),q=n(98083);function I(e){var r,n,c,l,f,x=(0,a.useState)(!1),w=(0,s.A)(x,2),b=w[0],I=w[1],L=(0,a.useState)(!1),T=(0,s.A)(L,2),M=T[0],W=T[1],P=e.cleanError,_=C.qg(e.history.location.search),D=(0,a.useState)(0),U=(0,s.A)(D,2),z=U[0],F=U[1],G=(0,a.useState)(!1),O
1=(0,s.A)(G,2),Q=O[0],V=O[1],Y=function(){var r=(0,i.A)((0,o.A)().m(function r(n){var t,i,s;return(0,o.A)().w(function(r){for(;;)switch(r.n){case 0:if(console.log(n,"response"),!n.access_token){r.n=2;break}return t=n.access_token,r.n=1,e.loginStudent({accessToken:t},e.history,"googleLogin");case 1:i=r.v,console.log(i,"result"),i&&!i.success&&(s=i.googleId,console.log("redirect",s),e.history.push("/googleRegistration",{userId:s}));case 2:return r.a(2)}},r)}));return function(e){return r.apply(this,arguments)}}(),K=(0,g.mg)({onSuccess:Y,onError:function(e){console.log(e,"response"),e&&"Cookies are not enabled in current environment."===e.details?alert("Please allow cookies on this website"):console.log(e,"google login failed")}});a.useEffect(function(){function r(){return(r=(0,i.A)((0,o.A)().m(function r(){return(0,o.A)().w(function(r){for(;;)switch(r.n){case 0:if(null!==localStorage.getItem("authToken")){r.n=1;break}return r.n=1,S.A.userV2({redirect:!0,history:e.history});case 1:return r.a(2)}},r)}))).apply(this,arguments)}!function(){r.apply(this,arguments)}()},[]),(0,a.useEffect)(function(){_.code&&Z()},[null===_||void 0===_?void 0:_.code]);var Z=function(){var r=(0,i.A)((0,o.A)().m(function r(){var n;return(0,o.A)().w(function(r){for(;;)switch(r.n){case 0:if(null===_||void 0===_||!_.code||null===_||void 0===_||!_.state){r.n=1;break}return n=null===_||void 0===_?void 0:_.redirectUri,r.n=1,S.A.userV2({redirect:!0,history:e.history,redirectUri:n});case 1:return r.a(2)}},r)}));return function(){return r.apply(this,arguments)}}();(0,a.useEffect)(function(){e.location.pathname.includes("qrscan")&&I(!0)},[]),(0,a.useEffect)(function(){return function(){P(),I(!1),V(!1)}},[P]),e.auth.isAuthenticated&&e.history.push("/");var H=e.errors,B=e.auth.passwordChanged,$=e.auth.reset_message;return console.log(H,"errors",null===H||void 0===H||null===(r=H.errors)||void 0===r?void 0:r.message),(0,A.jsxs)("div",{className:"text-center",children:[(0,A.jsxs)(d.A,{sx:{maxWidth:"75%",mx:"auto",width:"100%","& .notification":{maxWidth:"400px",mx:"auto"}},children:[!(0,k.A)($)&&(0,A.jsx)(d.A,{sx:{maxWidth:"320px",mx:"auto",mb:2},children:(0,A.jsx)(j.A,{message:$,type:j.A.SUCCESS})}),!(0,k.A)(B)&&(0,A.jsx)(d.A,{sx:{maxWidth:"320px",mx:"auto",mb:2},children:(0,A.jsx)(j.A,{message:B,type:j.A.SUCCESS})})]}),!(0,k.A)(e.errors)&&!(0,k.A)(e.errors.errors)&&(0,A.jsx)(j.A,{message:(null===H||void 0===H||null===(n=H.errors)||void 0===n?void 0:n.message)||(null===H||void 0===H||null===(c=H.errors)||void 0===c||null===(l=c.errors)||void 0===l||null===(f=l.error)||void 0===f?void 0:f.message),type:"danger"}),!b&&(0,A.jsx)(v.A,{loginStudent:function(r){e.loginStudent(r)}}),b&&(0,A.jsxs)(d.A,{sx:{borderRadius:"8px",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",maxWidth:"90%",margin:"auto"},children:[(0,A.jsx)(u.A,{variant:"body2",sx:{mb:2},children:Q?"Processing...":"Position QR code in front of camera"}),(0,A.jsx)(y,{handleError:function(e){console.error("QR Scanner Error:",e),F(function(e){return e+1})},handleScan:function(r){if(!Q&&r)try{V(!0);var n=r.text.split("/qrLogin/")[1];n&&(e.loginStudent({qrToken:n},e.history,"qrCode"),I(!1))}catch(t){console.error("Error processing QR code:",t)}finally{V(!1)}},scannerKey:z})]}),(0,A.jsxs)("div",{className:"extra-login",children:[(0,A.jsx)(u.A,{variant:"subtitle1",className:"mt-2",children:"Or log in using:"}),(0,A.jsxs)(d.A,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, 1fr)"},gap:2,alignItems:"center",justifyContent:"center",my:2,maxWidth:"400px",mx:"auto"},children:[(0,A.jsx)(h.A,{icon:(0,A.jsx)(m.A,{src:"https://www.google.com/favicon.ico",sx:{width:24,height:24,marginLeft:"8px",borderRadius:"2px"}}),label:"Login with Google",onClick:function(){return K()},sx:{textTransform:"uppercase",height:"48px",minWidth:{xs:"160px",sm:"190px"},fontSize:{xs:"0.7rem",sm:"0.8rem"},"& .MuiChip-label":{marginRight:"16px"},backgroundColor:"#666766",color:"white","&:hover":{backgroundColor:"#888988"},"& .MuiChip-icon":{marginLeft:{xs:"4px",sm:"8px"}}}}),(0,A.jsx)(h.A,{icon:(0,A.jsx)(m.A,{src:E,sx:{width:24,height:24,marginLeft:"8px",borderRadius:"2px"}}),label:"Login with NSW DoE",onClick:function(){window.location.href="".concat((0,N.o)(window.location).replace(/\/$/,""),"/samlp/sso/acs")},sx:{textTransform:"uppercase",height:"48px",minWidth:{xs:"160px",sm:"190px"},fontSize:{xs:"0.7rem",sm:"0.8rem"},backgroundColor:"#666766",color:"white","&:hover":{backgroundColor:"#888988"},"& .MuiChip-icon":{marginLeft:{xs:"4px",sm:"8px"}},"& .MuiChip-label":{marginRight:"16px"}}}),(0,A.jsx)(h.A,{"data-testid":"qr-chip",icon:(0,A.jsx)(p.A,{sx:{width:24,height:24,marginLeft:"8px",color:"white"}}),label:b?"Password Login":"QR Code Login",onClick:function(){I(function(e){return!e}),W(!0),F(function(e){return e+1}),V(!1),setTimeout(function(){return W(!1)},1e3)},disabled:M,sx:(0,t.A)({textTransform:"uppercase",height:"48px",minWidth:{xs:"160px",sm:"190px"},fontSize:{xs:"0.7rem",sm:"0.8rem"}
1,backgroundColor:(0,R.A)("teal","dark"),color:"white","&:hover":{backgroundColor:(0,R.A)("teal")},"& .MuiChip-icon":{marginLeft:{xs:"4px",sm:"8px"}},"& .MuiChip-label":{marginRight:"16px"},"&.Mui-disabled":{opacity:.6,backgroundColor:"#e0e0e0","& .MuiChip-label":{color:"rgba(0, 0, 0, 0.38)"}}},"color","black")})]})]}),(0,A.jsx)("div",{style:{margin:16},children:(0,A.jsx)("a",{id:"link-teacher-platform",className:"other-login to-teacher",href:"//teacher.lifeskillsgo.com",style:{fontSize:"1.2rem"},children:"Are you a teacher? Login here."})}),["sentral_sso"].includes(_.auth_method)&&!localStorage.getItem("authToken")&&(0,A.jsx)(q.A,{history:e.history,auth_method:_.auth_method})]})}var L=function(e){return{auth:e.auth,errors:e.errors}},T=function(e){return{loginStudent:function(r,n,t){return e((0,f.bZ)(r,n,t))},cleanError:function(){return e((0,x.Cs)())},showServerNotification:function(r,n,t){return e((0,x.qq)(r,n,t))},setCurrentStudent:function(r){return e((0,f.ZZ)(r))}}},M=(0,c.Ng)(L,T)((0,l.withRouter)(I))},2066:function(){},86868:function(e,r,n){e.exports=n.p+"static/media/Earth_Boy.163d20896c508f343cbd.png"},50399:function(e,r,n){e.exports=n.p+"static/media/Galaxy.441717cb8823fff93e6e.png"}}]);
2//# sourceMappingURL=199.bdb44871.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.