PageSourceSearch

https://www2.thals.org/donor-management/static/js/341.629ae4c6.chunk.js

js thals.org collected 2026-10-08 06:42:20 UTC 10,306 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkthals_donor_management_frontend=self.webpackChunkthals_donor_management_frontend||[]).push([[341],{80295:(e,o,s)=>{s.d(o,{A:()=>n});var r=s(82483);const n=e=>{let{title:o}=e;return(0,r.useEffect)((()=>{document.title="".concat(o," | ").concat("Thalassemia Foundation Financial Donor Management")}),[o]),null}},83031:(e,o,s)=>{s.d(o,{A:()=>x});var r=s(24797),n=s(42342),i=s(2857),t=s(51044),a=s(15499),l=s(83240),d=s(56723);const c=e=>{let{onResolveCallback:o,onRejectCallback:s}=e;return(0,d.jsx)(i.Lp,{appId:"2586060891557933",onResolve:e=>{let{data:r}=e;null!=r&&r.accessToken?o(r.accessToken):s(t.h.FACEBOOK_TOKEN_ERROR)},onReject:e=>{},children:(0,d.jsx)(n.FacebookLoginButton,{onClick:()=>{(0,a.B)(l.x.FacebookLoginButton)},align:"center",style:{display:"flex",justifyContent:"center",height:38,fontFamily:"Outfit, ui-sans-serif, system-ui",fontSize:"16px",width:"100%",margin:0},iconSize:"20px"})})};var u=s(6871);const m=e=>{let{width:o,onResolveCallback:s,onRejectCallback:r}=e;const n=()=>{(0,a.B)(l.x.GoogleLoginButton)};return(0,d.jsx)(u.j,{onSuccess:e=>{n(),e.credential?s(e.credential):r(t.h.GOOGLE_TOKEN_ERROR)},onError:()=>{n()},type:"standard",locale:"en",logo_alignment:"center",width:o})},x=e=>{let{loginWithFacebook:o,widthOfGoogleSignInButton:s,loginWithGoogle:n,socialLoginError:i}=e;return(0,d.jsxs)(r.A,{gap:"24px",children:[(0,d.jsx)(c,{onResolveCallback:o,onRejectCallback:i}),s&&(0,d.jsx)(m,{width:s,onResolveCallback:n,onRejectCallback:i})]})}},7266:(e,o,s)=>{s.d(o,{f:()=>r});const r={LOGIN:"Log In",REGISTER:"Sign Up",FORGOT_PASSWORD:"Forgot Password",RESET_PASSWORD:"Reset Password",VERIFY_EMAIL:"Verify Email",DASHBOARD_ADMIN:"Admin Dashboard",DASHBOARD_USER:"User Dashboard",DONATION_HISTORY_ADMIN:"Admin Donation History",DONATION_HISTORY_USER:"User Donation History",DONORS:"Donors",DONOR_DETAILS:"Donor Details",USERS:"Users",USER_CREATE:"Create User",USER_EDIT:"Edit User",USER_DETAILS:"User Details",OFFLINE_PAYMENTS:"Offline Payments",CAMPAIGNS:"Campaigns",REFUND_REQUEST:"Refund Requests",ADMIN_REPORTS:"Admin Reports",USER_REPORTS:"User Reports",REPORT_CREATE:"Create Report",REPORT_EDIT:"Edit Report",CAMPAIGN_CREATE:"Create Campaign",CAMPAIGN_EDIT:"Edit Campaign",PATIENTS:"Patients",PATIENTS_CREATE:"Create Patient",PATIENTS_EDIT:"Edit Patient",DESERVING_ITEMS:"Deserving Items",DESERVING_ITEMS_CREATE:"Create Deserving Item",DESERVING_ITEMS_EDIT:"Edit Deserving Item",PROFILE:"My Profile",SETTINGS:"Settings",COMING_SOON:"Coming Soon",PAGE_NOT_FOUND:"Status - 404"}},96699:(e,o,s)=>{s.d(o,{f:()=>r});let r=function(e){return e.GOOGLE="Google",e.FACEBOOK="Facebook",e}({})},78341:(e,o,s)=>{s.r(o),s.d(o,{default:()=>F});var r=s(26855),n=s(57373),i=s(43063),t=s(22555),a=s(82483),l=s(93376),d=s(99891),c=s(63117),u=s(74312),m=s(65470),x=s(98717),p=s(55988),f=s(16253),h=s(57513),g=s(70407),A=s(62224),E=s(83031),R=s(77579),b=s(47448),S=s(21508),O=s(41662),w=s(56767),I=s(65128),j=s(90799),C=s(96699),T=s(33828),y=s(51044),P=s(76663),_=s(72751),D=s(35387),v=s(5843),N=s(15499),M=s(83240),B=s(56723);const L=()=>{const e=(0,S.j)(),o=(0,l.Zp)(),s=(0,a.useRef)((0,R.T)()),r=(0,a.useRef)(null),[L,k]=(0,a.useState)(void 0),[G,U]=(0,a.useState)({isOpen:!1,message:"",type:"success"}),[F,W]=(0,a.useState)(!1),[V,H]=(0,a.useState)(!1),{values:z,handleChange:q,handleBlur:K,handleSubmit:Y,errors:Q,touched:Z}=(0,c.Wx)({initialValues:{username:"",email:"",password:"",confirmPassword:""},validationSchema:T.O5,validateOnChange:!0,validateOnBlur:!1,onSubmit:()=>{J()}});(0,a.useEffect)((()=>{$();const e=()=>{$()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const $=()=>{var e;k(null===(e=r.current)||void 0===e?void 0:e.offsetWidth)},J=async()=>{(0,N.B)(M.x.SignupButton),await ee({username:z.username,email:z.email,password:z.password,emailVerificationBaseUrl:"https://www2.thals.org/donor-management"})},X=async r=>{e((0,v.ro)());try{const{data:n}=await(0,j.Lx)(r,s.current),{token:i,user:t}=n,a={id:t.id,username:t.username,email:t.email,role:t.role,profilePicUrl:t.image_url};e((0,I.E8)({token:i,userInfo:a})),e((0,O.$8)((0,w.V)(a.role))),a.role===P.f.ADMIN?o(_.a.DASHBOARD_ADMIN):o(_.a.DASHBOARD_USER)}catch(e){U((0,t.A)((0,t.A)({},G),{},{isOpen:!0,message:e.message,type:"error"}))}finally{e((0,v.yr)())}},ee=async o=>{e((0,v.ro)());try{await(0,j.iP)(o,s.current),U((0,t.A)((0,t.A)({},G),{},{isOpen:!0,message:y.h.SIGNUP_SUCCESS,type:"success"}))}catch(e){U((0,t.A)((0,t.A)({},G),{},{isOpen:!0,message:e.message,type:"error"}))}finally{e((0,v.yr)())}};return(0,B.jsx)(i.A,{sx:{backgroundColor:"#fff",boxShadow:"0px 4px 10px rgba(0, 0, 0, 0.1)",borderRadius:"8px"}
1,component:"main",maxWidth:"xs",children:(0,B.jsxs)(n.A,{ref:r,sx:{marginTop:8,display:"flex",flexDirection:"column",alignItems:"center",py:3},children:[(0,B.jsx)(n.A,{sx:{"@media (max-width: 480px)":{width:"200px"},px:2,width:"200px"},children:(0,B.jsx)("img",{src:"".concat("/donor-management","/static/images/logo/BTF-Logo-TransparentUse.png"),alt:"Thals-logo",style:{width:"100%",height:"100%"}})}),(0,B.jsx)(n.A,{sx:{px:2},mt:6,children:(0,B.jsx)(n.A,{width:"100%",children:(0,B.jsx)(E.A,{loginWithFacebook:async e=>{await X({token:e,authProvider:C.f.FACEBOOK})},widthOfGoogleSignInButton:L,loginWithGoogle:async e=>{await X({token:e,authProvider:C.f.GOOGLE})},socialLoginError:e=>{U((0,t.A)((0,t.A)({},G),{},{isOpen:!0,message:e,type:"error"}))}})})}),(0,B.jsxs)(n.A,{component:"form",onSubmit:Y,noValidate:!0,children:[(0,B.jsxs)(n.A,{display:"flex",flexDirection:"row",alignItems:"center",sx:{pt:"17px",pb:"12px"},children:[(0,B.jsx)(n.A,{flex:1,children:(0,B.jsx)(u.A,{})}),(0,B.jsx)(m.A,{mx:1,children:"Or"}),(0,B.jsx)(n.A,{flex:1,children:(0,B.jsx)(u.A,{})})]}),(0,B.jsx)(x.A,{sx:{"& .MuiOutlinedInput-root":{borderRadius:"4px","& fieldset":{border:"1px solid #eceef1"},"&:hover fieldset":{border:"1px solid #eceef1",transition:"border 0.3s ease"},"&.Mui-focused fieldset":{border:"1px solid #4571d7"}},"& .MuiInputLabel-root":{color:"#223354"},"& .MuiInputLabel-root.Mui-focused":{color:"#223354"}},required:!0,fullWidth:!0,id:"username",label:"Username",name:"username",autoComplete:"username",autoFocus:!0,value:z.username,onBlur:K,onChange:q,helperText:Q.username&&Z.username&&Q.username,error:Boolean(Q.username)&&Z.username}),(0,B.jsx)(x.A,{sx:{"& .MuiOutlinedInput-root":{borderRadius:"4px","& fieldset":{border:"1px solid #eceef1"},"&:hover fieldset":{border:"1px solid #eceef1",transition:"border 0.3s ease"},"&.Mui-focused fieldset":{border:"1px solid #4571d7"}},"& .MuiInputLabel-root":{color:"#223354"},"& .MuiInputLabel-root.Mui-focused":{color:"#223354"}},margin:"normal",required:!0,fullWidth:!0,id:"email",label:"Email Address",name:"email",autoComplete:"email",value:z.email,onBlur:K,onChange:q,helperText:Q.email&&Z.email&&Q.email,error:Boolean(Q.email)&&Z.email}),(0,B.jsx)(x.A,{sx:{"& .MuiOutlinedInput-root":{borderRadius:"4px","& fieldset":{border:"1px solid #eceef1"},"&:hover fieldset":{border:"1px solid #eceef1",transition:"border 0.3s ease"},"&.Mui-focused fieldset":{border:"1px solid #4571d7"}},"& .MuiInputLabel-root":{color:"#223354"},"& .MuiInputLabel-root.Mui-focused":{color:"#223354"}},margin:"normal",required:!0,fullWidth:!0,name:"password",label:"Password",type:F?"text":"password",id:"password",autoComplete:"current-password",value:z.password,onBlur:K,onChange:q,helperText:Q.password&&Z.password&&Q.password,error:Boolean(Q.password)&&Z.password,InputProps:{endAdornment:(0,B.jsx)(p.A,{position:"end",children:(0,B.jsx)(f.A,{edge:"end","aria-label":"toggle password visibility",onClick:()=>{(0,N.B)(M.x.PasswordVisibilityToggleButton,{action:F?"Password Hidden":"Password Shown"}),W((e=>!e))},children:F?(0,B.jsx)(g.A,{}):(0,B.jsx)(A.A,{})})})}}),(0,B.jsx)(x.A,{sx:{"& .MuiOutlinedInput-root":{borderRadius:"4px","& fieldset":{border:"1px solid #eceef1"},"&:hover fieldset":{border:"1px solid #eceef1",transition:"border 0.3s ease"},"&.Mui-focused fieldset":{border:"1px solid #4571d7"}},"& .MuiInputLabel-root":{color:"#223354"},"& .MuiInputLabel-root.Mui-focused":{color:"#223354"}},margin:"normal",required:!0,fullWidth:!0,id:"confirmPassword",label:"Confirm Password",name:"confirmPassword",autoComplete:"confirmPassword",type:V?"text":"password",value:z.confirmPassword,onBlur:K,onChange:q,helperText:Q.confirmPassword&&Z.confirmPassword&&Q.confirmPassword,error:Boolean(Q.confirmPassword)&&Z.confirmPassword,InputProps:{endAdornment:(0,B.jsx)(p.A,{position:"end",children:(0,B.jsx)(f.A,{edge:"end","aria-label":"toggle password visibility",onClick:()=>{(0,N.B)(M.x.PasswordVisibilityToggleButton,{action:V?"Password Hidden":"Password Shown"}),H((e=>!e))},children:V?(0,B.jsx)(g.A,{}):(0,B.jsx)(A.A,{})})})}}),(0,B.jsxs)(n.A,{children:[(0,B.jsx)(D.A,{type:"submit",fullWidth:!0,variant:"contained",sx:{mt:3,mb:2,backgroundColor:"#ce1337",border:"1px solid #ce1337",fontFamily:"Outfit, ui-sans-serif, system-ui",fontWeight:600,fontSize:"16px","&:hover":{backgroundColor:"#fff",border:"1px solid #ce1337",color:"#ce1337",transition:".5s ease"}},children:"Sign Up"}),(0,B.jsx)(h.Ay,{container:!0,justifyContent:"center",children:(0,B.jsx)(n.A,{sx:{fontSize:14,fontFamily:"Outfit, ui-sans-serif, system-ui","& a":{color:"#223354",textDecoration:"none",transition:"color 0.5s ease"},"& a:hover":{color:"#ce1337"},"& .highlight":{color:"#ce1337"}},children:(()=>{const e="Already has an account? Login here",o=e.indexOf("?");return-1!==o?(0,B.jsxs)(d.N_,{to:_.a.LOGIN,children:[e.substring(0,o+1),(0,B.jsx)("span",{className:"highlight",children:e.substring(o+1)})]}):(0,B.jsx)(d.N_,{to:_.a.LOGIN,children:e})})()})})]})]}),(0,B.jsx)(b.A,{topPadding:0,notification:G,setNotification:U})]})})};var k=s(80295),G=s(7266);const U=(0,r.Ay)(n.A)((()=>"\n    overflow: auto;\n    flex: 1;\n    overflow-x: hidden;
1\n    align-items: center;\n")),F=()=>(0,B.jsx)("div",{style:{backgroundColor:"#f5f5f5"},children:(0,B.jsx)(n.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,B.jsxs)(U,{children:[(0,B.jsx)(k.A,{title:G.f.REGISTER}),(0,B.jsx)(n.A,{display:"flex",justifyContent:"center",children:(0,B.jsx)(i.A,{maxWidth:"lg",children:(0,B.jsx)(n.A,{marginBottom:8,children:(0,B.jsx)(L,{})})})})]})})})}}]);
2//# sourceMappingURL=341.629ae4c6.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.