PageSourceSearch

https://www.app.aisensy.com/static/js/1661.454a0129.chunk.js

js aisensy.com collected 2026-10-02 04:07:29 UTC 15,121 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwhatsapp_dashboard=self.webpackChunkwhatsapp_dashboard||[]).push([[1661],{91661:(e,t,s)=>{s.r(t),s.d(t,{default:()=>O});var i=s(47313),n=s(70089),a=s(45695),o=s(21144),r=s(73908),l=s(57009),d=s(3187),c=s(3873),h=s(54070),g=s(52376),p=s(6006),m=s(92381),u=s(9841),x=s(45788),v=s(71497),y=s(1805),w=s(72338),f=(s(59017),s(67367)),b=s(70816),j=s.n(b),C=s(99094);const S={displayName:C.z.string().regex(/^[a-zA-Z][a-zA-Z0-9\s]*$/,"Must start with a letter and can contain numbers or spaces"),email:C.z.string().email("Invalid email format"),phoneNumber:C.z.string().regex(/^\d+$/,"Only numbers are allowed")};var P=s(75010),Z=s(46417);class I extends i.Component{constructor(){super(...arguments),this.state={displayName:"",password:"",confirmPassword:"",changeName:!1,changePassword:!1,userNameHelper:"",showPassword:!1,showConfirmPassword:!1,status:"",isLoading:!1,country:"India",prevCountry:"India",phoneNumber:"",email:"",otpSending:!1,remainingTime:null,otpSent:!1,otp:"",isOtpVerified:!1,otpVerifying:!1,OTPDialog:!1,alertOpen:!1,alertMsg:"",severity:""},this.timeout=null,this.onChange=e=>{const{name:t,value:s}=e.target;if("password"===t||"confirmPassword"===t)return void this.setState({[t]:s});const i=S[t];if(i){(i.safeParse(s).success||""===s)&&this.setState({[t]:s})}else this.setState({[t]:s})},this.componentDidMount=async()=>{const e=this.getCountryFromDialCode(this.props.agent.countryCode);this.setState({country:e||"India",prevCountry:e||"India"})},this.setEmailMessage=()=>{this.state.changeName&&this.setState({userNameHelper:"You cannot change your user name!"})},this.changePassword=()=>{this.state.changeName&&this.setState({changePassword:!0})},this.onEdit=()=>{this.setState({changeName:!0,showPassword:!1,showConfirmPassword:!1})},this.handleClickShowPassword=()=>{this.setState({showPassword:!this.state.showPassword})},this.handleClickShowConfirmPassword=()=>{this.setState({showConfirmPassword:!this.state.showConfirmPassword})},this.onCancel=()=>{this.setState({changeName:!1,changePassword:!1,displayName:"",email:"",phoneNumber:"",country:"India",password:"",confirmPassword:"",userNameHelper:""})},this.onSnackbarClose=()=>{this.setState({alertOpen:!1})},this.decrementRemainingTime=()=>{const{remainingTime:e}=this.state;e>0?this.setState({remainingTime:e-1}):clearInterval(this.intervalId)},this.onChangeOtp=e=>{["otp"].includes(e.target.name)?this.setState({[e.target.name]:e.target.value.replace(/\D/g,"").substring(0,6)}):this.setState({[e.target.name]:e.target.value})},this.toggleOTPDialog=()=>{this.setState({OTPDialog:!this.state.OTPDialog})},this.sendOTP=()=>{const{agent:e}=this.props,{name:t}=e,{email:s,phoneNumber:i,password:a,confirmPassword:o,displayName:r,isOtpVerified:l,country:d}=this.state;let c="DISPLAY_NAME_CHANGE";a?c="PASSWORD_CHANGE":i&&i!==e.contact?c="PHONE_CHANGE":r&&r!==e.displayName&&(c="DISPLAY_NAME_CHANGE"),this.setState({otpService:c}),setTimeout((()=>{this.setState({otpSending:!0}),n.Z.post(y.URL+"/auth/send-verification-otp",{email:s||e.email,countryCode:this.getDialCode(),contact:i?this.getDialCode(d).slice(1)+i:e.contact,password:a||"",dis
1playName:r||e.displayName,confirmPassword:o||"",fullName:t,service:c}).then((async e=>{var t,s,i,n;if(localStorage.setItem("otpObjectId",(null===(t=e.data)||void 0===t||null===(s=t.data)||void 0===s?void 0:s.otpObjectId)||""),"Blocked"==(null===e||void 0===e||null===(i=e.data)||void 0===i||null===(n=i.data)||void 0===n?void 0:n.otpMode))this.setState({otpSending:!1,OTPDialog:!1,alertOpen:!0,alertMsg:"Failed to send OTP!. Please contact support for help.",severity:"error"});else{var a;const t=(null===(a=e.data)||void 0===a?void 0:a.message)||"OTP sent successfully.";this.setState({OTPDialog:!0,otpSent:!0,otp:"",otpSending:!1,remainingTime:30,checkMode:"email",alertOpen:!0,alertMsg:t,severity:"success"},(()=>{this.intervalId&&clearInterval(this.intervalId),this.intervalId=setInterval(this.decrementRemainingTime,1e3)}))}})).catch((e=>{var t,s,i,n,a;let o="Failed to send OTP!";"string"===typeof(null===e||void 0===e||null===(t=e.response)||void 0===t||null===(s=t.data)||void 0===s?void 0:s.message)?o=e.response.data.message:null!==e&&void 0!==e&&null!==(i=e.response)&&void 0!==i&&null!==(n=i.data)&&void 0!==n&&n.message?o=JSON.stringify(e.response.data.message):null!==e&&void 0!==e&&null!==(a=e.response)&&void 0!==a&&a.data?o="string"===typeof e.response.data?e.response.data:JSON.stringify(e.response.data):null!==e&&void 0!==e&&e.message&&(o=e.message),this.setState({otpSending:!1,OTPDialog:!1,alertOpen:!0,alertMsg:o,severity:"error"})}))}),300)},this.verifyOTP=e=>{const t=this.state.otp,s="string"===typeof e&&6===e.length?e:t,{name:i,email:a,contact:o}=this.props.agent;this.setState({otpVerifying:!0}),n.Z.post(y.URL+"/auth/validate-verification-otp",{otp:s,otpObjectId:localStorage.getItem("otpObjectId"),service:this.state.otpService}).then((async e=>{this.setState({otp:"",isOtpVerified:!0,otpVerifying:!1,status:"success",success:!0,statusMessage:"Profile updated successfully ",isLoading:!1,OTPDialog:!1},(()=>{this.onCancel(),this.timeout=setTimeout((()=>{this.setState({statusMessage:""})}),1e4)}));const{session:t}=e.data.data||"";t&&(localStorage.setItem("session",t),this.props.modifyUser(t))})).catch((e=>{var t,s,i,n;this.setState({otpVerifying:!1,otp:"",isLoading:!1,alertOpen:!0,alertMsg:(null===e||void 0===e||null===(t=e.response)||void 0===t||null===(s=t.data)||void 0===s?void 0:s.message)||(null===e||void 0===e||null===(i=e.response)||void 0===i||null===(n=i.data)||void 0===n?void 0:n.errorMessage)||"Failed to verify OTP!",severity:"error"})}))},this.onSave=async()=>{var e;const{displayName:t,password:s,confirmPassword:i,phoneNumber:n,country:a,email:o,isOtpVerified:r}=this.state;if(s!==i)return void this.setState({alertOpen:!0,alertMsg:"Password and Confirm Password do not match!",severity:"error"});if(s){const e=(0,P.fN)(s);if(e)return void this.setState({alertOpen:!0,alertMsg:e,severity:"error"})}null===(e=this.props.agent)||void 0===e||e.partnerId;2===this.props.agent.power&&this.sendOTP(),this.setState({otp:""})},this.onGoogleLogoutSuccess=e=>{const{agent:t,signOut:s}=this.props;s(t.id)},this.onGoogleLogoutFailure=e=>{},this.handleAutoComplete=(e,t,s)=>{"select-option"==s&&this.setState({country:t})},this.getCountryFromDialCode=e=>{const t=f.ZP.filter((t=>t.dialCode===e));return t.length>0?t[0].name:null},this.getDialCode=()=>f.ZP.filter((e=>e.name==this.state.country))[0].dialCode}render(){const{password:e,confirmPassword:t,displayName:s,showPassword:i,showConfirmPassword:n,email:g,country:x,phoneNumber:v,otp:b,remainingTime:C,otpSending:S,otpVerifying:P}=this.state;let I=j().duration(C||0,"seconds").seconds();const{changeName:N,changePassword:O,userNameHelper:T}=this.state,{success:k,statusMessage:D,isLoading:z}=this.state,{classes:M,agent:L}=this.props;return(0,Z.jsxs)("div",{className:M.root,children:[(0,Z.jsx)(o.Z,{container:!0,justify:"center",alignItems:"center",className:"".concat(M.pageTitleContainer," ").concat(M.fullWidth),children:(0,Z.jsx)(o.Z,{item:!0,xs:!0,children:(0,Z.jsx)(r.Z,{pl:{xs:2,md:3},children:(0,Z.jsx)(l.Z,{variant:"h3",children:"Your Profile"})})})}),(0,Z.jsx)(r.Z,{my:3}),(0,Z.jsx)(o.Z,{container:!0,justify:"center",children:(0,Z.jsxs)(o.Z,{container:!0,item:!0,xs:12,md:11,lg:9,spacing:2,children:[(0,Z.jsxs)(o.Z,{item:!0,xs:12,md:4,container:!0,direction:"column",justify:"center",children:[(0,Z.jsx)(r.Z,{pb:{xs:4,md:2},display:"flex",width:"100%",justifyContent:"center",alignItems:"center",children:(0,Z.jsx)(d.Z,{alt:L.displayName.substring(0,1).toUpperCase(),src:L.imageUrl,className:M.avatar,children:L.displayName.substring(0,1).toUpperCase()})}),(0,Z.jsx)(o.Z,{container:!0,justify:"center",children:z?(0,Z.jsx)(c.Z,{}):N?(0,Z.jsxs)(o.Z,{container:!0,justify:"center",children:[(0,Z.jsx)(r.Z,{children:(0,Z.jsx)(u.zx,{variant:"outlined",onClick:this.onCancel,children:"Cancel"})}),(0,Z.jsx)(r.Z,{ml:"30px",children:(0,Z.jsx)(u.zx,{variant:"contained",onClick:this.onSave,disabled:g&&!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,10})+$/.test(g)||v&&v.length<7,children:"Save"})})]}):(0,Z.jsxs)(o.Z,{container:!0,justify:"center",alignItems:"center",children:[(0,Z.jsx)(r.Z,{children:(0,Z.jsx)(u.zx,{variant:"contained",onClick:this.onEdit,children:"Edit"})}),(0,Z.jsx)(r.Z,{ml:"30px",children:L.googleId?(0,Z.jsx)(w.GoogleLogout,{clientId:y.GOOGLE_CLIENT_ID,buttonText:"Logout",onLogoutSuccess:this.onGoogleLogoutSuccess,onFailure:this.onGoogleLogoutFailure,className:M.googleButtonContainer}):(0,Z.jsx)(u.zx,{variant:"outlined",onClick:()=>{this.props.signOut(L.id),window.webengage.user.logout()},children:"Logout"})})]})})]}),(0,Z.jsxs)(o.Z,{item:!0,xs:12,md:6,children:[(0,Z.jsxs)(o.Z,{container:!0,direction:"column",alignItems:"flex-start",children:[(0,Z.jsx)(l.Z,{variant:"h4",align:"center",children:"Display Name"}),(0,Z.jsx)(r.Z,{width:"100%",boxSizing:"border-box",mt:"0px",mb:"10px",children:(0,Z.jsx)(u.II,{margin:"dense",type:"string",value:N?s:L.displayName,placeholder:L.displayName,disabled:!N,name:"displayName",fullWidth:!0,onChange:this.onChange})})]}),(0,Z.jsxs)(o.Z,{container:!0,direction:"column",alignItems:"flex-start",children:[(0,Z.jsx)(l.Z,{variant:"h4",align:"center",children:"Email"}),(0,Z.jsx)(r.Z,{width:"100%",boxSizing:"border-box",mt:"0px",mb:"10px",children:(0,Z.jsx)(u.II,{margin:"dense",type:"string",value:N?g:L.email,placeholder:L.email,disabled:!0,name:"email",fullWidth:!0,onChange:this.onChange})})]}),(0,Z.jsxs)(o.Z,{container:!0,direction:"column",alignItems:"flex-start",children:[(0,Z.jsx)(l.Z,{variant:"h4",align:"center",children:"WhatsApp Number"}),(0,Z.jsx)(r.Z,{width:"100%",boxSizing:"border-box",mt:"0px",mb:"10px",children:N?(0,Z.jsxs)(o.Z,{container:!0,spacing:1,alignItems:"center",children:[(0,Z.jsx)(o.Z,{item:!0,xs:4,children:(0,Z.jsx)(u.pY,{disableClearable:!0,value:x,options:f.ZP.map((e=>e.name)),onChange:(e,t,s)=>this.handleAutoComplete("country",t,s),placeholder:"Select country"})}),(0,Z.jsx)(o.Z,{item:!0,xs:8,children:(0,Z.jsx)(u.II,{fullWidth:!0,margin:"dense",startIcon:this.getDialCode(),onChange:this.onChange,value:v,name:"phoneNumber",placeholder:L.contact,type:"tel"})})]}):(0,Z.jsx)(u.II,{margin:"dense",type:"string",value:N?s:L.contact,placeholder:L.contact,disabled:!0,name:"displayName",fullWidth:!0})})]}),L.name&&(0,Z.jsxs)(o.Z,{container:!0,direction:"column",alignItems:"flex-start",children:[(0,Z.jsx)(l.Z,{variant:"h4",align:"center",children:"User Name"}),(0,Z.jsx)(r.Z,{width:"100%",boxSizing:"border-box",mt:"0px",mb:"10px",children:(0,Z.jsx)(u.II,{margin:"dense",type:"string",value:L.name,placeholder:L.name,disabled:!0,name:"name",fullWidth:!0,onClick:this.setEmailMessage,helperText:T})})]}),(0,Z.jsxs)(o.Z,{container:!0,direction:"column",alignItems:"flex-start",children:[(0,Z.jsx)(l.Z,{variant:"h4",align:"center",children:"Password"}),(0,Z.jsx)(r.Z,{width:"100%",boxSizing:"border-box",mt:"0px",mb:"10px",children:(0,Z.jsx)(u.II,{autoComplete:"new-password",margin:"dense",name:"password",disabled:!N,onChange:this.onChange,onFocus:this.changePassword,fullWidth:!0,type:i?"text":"password",value:O?e:"***********",placeholder:"***********",endIcon:O?(0,Z.jsx)(h.Z,{"aria-label":"toggle password visibility",onClick:this.handleClickShowPassword,disabled:!N,children:i?(0,Z.jsx)(p.Z,{}):(0,Z.jsx)(m.Z,{})}):null})})]}),(0,Z.jsxs)(o.Z,{container:!0,direction:"column",alignItems:"flex-start",style:{visibility:O?"visible":"hidden"},children:[(0,Z.jsx)(l.Z,{variant:"h4",align:"center",children:"Confirm password"}),(0,Z.jsx)(r.Z,{width:"100%",boxSizing:"border-box",mt:"0px",mb:"10px",children:(0,Z.jsx)(u.II,{autoComplete:"new-password",margin:"dense",name:"confirmPassword",disabled:!O,onChange:this.onChange,fullWidth:!0,placeholder:"***********",type:n?"text":"password",value:t,endIcon:(0,Z.jsx)(h.Z,{"aria-label":"toggle confirm password visibility",onClick:this.handleClickShowConfirmPassword,children:n?(0,Z.jsx)(p.Z,{}):(0,Z.jsx)(m.Z,{})})})})]}),D&&(0,Z.jsx)(l.Z,{style:{width:"100%",color:k?"green":"red"},align:"left",variant:"body1",children:D})]})]})}),(0,Z.jsx)(u.u_,{open:this.state.OTPDialog,onClose:this.toggleOTPDialog,showClose:!1,dismissible:!1,actions:(0,Z.jsxs)(r.Z,{display:"flex",justifyContent:"center",width:"100%",style:{gap:8},children:[(0,Z.jsx)(u.zx,{variant:"outlined",onClick:()=>{this.toggleOTPDialog(),this.setState({success:!1,statusMessage:"",otp:"",remainingTime:30,changeName:!1})},children:"Cancel"}),(0,Z.jsx)(u.zx,{variant:"contained",onClick:()=>{this.verifyOTP(),this.setState({changeName:!1})},disabled:6!==b.length,loading:S||P,children:S?"Sending OTP":P?"Verifying OTP":"Submit"})]}),children:(0,Z.jsxs)(o.Z,{style:{textAlign:"center",display:"flex",flexDirection:"column"},children:[(0,Z.jsx)(l.Z,{variant:"h4",align:"center",children:(0,Z.jsx)("strong",{children:"Enter Your OTP"})}),(0,Z.jsx)(a.Z,{value:b,onChange:e=>this.setState({otp:e}),onComplete:e=>this.verifyOTP(e),disabled:S||P}),C>0&&(0,Z.jsx)(l.Z,{color:"textSecondary",variant:"body1",gutterBottom:!0,className:M.otpTimer,children:"You can resend the OTP in ".concat(I," second").concat(1===I?"":"s",".")}),(0,Z.jsxs)(l.Z,{variant:"body1",color:"textSecondary",className:M.otpTimer,children:["Didn't receive code?"," ",(0,Z.jsx)("span",{className:C>0?M.resendButtonDisabled:M.resendButton,onClick:C>0?()=>{}:()=>{this.sendOTP()},children:"Resend OTP"})]})]})}),(0,Z.jsx)(r.Z,{my:15}),(0,Z.jsx)(u.A9,{open:this.state.alertOpen,onClose:this.onSnackbarClose,severity:this.state.severity,message:this.state.alertMsg})]})}}const N=(0,x.connect)((e=>({agent:e.login.user})),{modifyUser:v.RW,signOut:v.w7})(I),O=(0,g.Z)((e=>({root:{width:"100%",height:"100%",background:"rgb(247,247,247)",boxSizing:"border-box",overflowX:"hidden",position:"relative"},pageTitleContainer:{position:"sticky",zIndex:100,top:0,height:60,boxSizing:"border-box",boxShadow:"0 0 11px rgb(230 230 230)",[e.breakpoints.down("md")]:{},[e.breakpoints.down("sm")]:{}},fullWidth:{width:"100%",background:"white"},progress:{position:"fixed",top:"8em",right:"44.5vw"},avatar:{height:"2em",width:"2em",fontSize:"4em"},googleButtonContainer:{width:"100%",marginBottom:e.spacing(4),marginTop:e.spacing(2),height:"50px",backgroundColor:"lightgrey",borderRadius:"5px",display:"flex",alignItems:"center",boxSizing:"border-box",paddingLeft:"15px",justifyContent:"center"},resendButton:{color:e.palette.primary.main,cursor:"pointer","&:hover":{color:"grey"}},resendButtonDisabled:{color:"lightgrey"},otpInputField:{zIndex:"2",background:"transparent",margin:"auto",display:"flex",bottom:"60px",left:"23px",maxWidth:"300px","& input":{fontSize:"24px",letterSpacing:"50px",caretColor:"transparent",position:"absolute",width:"100%",textAlign:"center"}},otpTimer:{textAlign:"center"},otpFieldOverlay:{marginTop:"10px",height:"60px",width:"10px",background:"white",position:"absolute",right:"calc(50% - 160px)",zIndex:1}
1,hiddenOtpInput:{position:"absolute",top:0,left:0,opacity:0,width:"100%",height:"100%",caretColor:"transparent",marginTop:"10%",marginLeft:"34%",height:"34px",width:"33%"}})))(N)}}]);

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.