PageSourceSearch

https://www.piramalfinance.com/esign/_next/static/chunks/437.54ab3f97860bb4e9-fed.js

js piramalfinance.com collected 2026-10-01 15:27:57 UTC 8,952 bytes, 1 lines download raw bytes

1(self.webpackChunkeSignApp=self.webpackChunkeSignApp||[]).push([[437],{5984:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return q}});var s=n(5893),r=n(6029),a=n.n(r),o=n(512),i=n(4231),l=n(1643),c=n(8732),d=n(9702),u=n(2443),p=n.n(u),_=e=>(0,s.jsxs)("div",{className:"".concat(p().commonLoader," ").concat(e.className),children:[(0,s.jsx)(d.$,{size:"5xl",withLogo:!0}),(0,s.jsx)("p",{className:p().textMessage,children:e.text}),(0,s.jsx)("p",{className:p().subTextMessage,children:e.subText})]}),g=n(4956),m=n.n(g),x=n(2321),v=n.n(x),h=a().memo(e=>{let{numberOfRetries:t,timer:n=30,resendOtp:a}=e,[o,i]=(0,r.useState)(n);return(0,r.useEffect)(()=>{let e;return t>=1&&(e=setTimeout(()=>{o>0&&i(o-1)},1e3)),()=>clearTimeout(e)},[t,o]),(0,s.jsxs)("div",{className:v().resendWrapper,children:["Didn't recieve code?",(0,s.jsx)(s.Fragment,{children:o>0?(0,s.jsxs)(s.Fragment,{children:[" Resend code ","00:".concat(o%10===o?"0".concat(o):o)," "]}):(0,s.jsxs)(s.Fragment,{children:[" ",(0,s.jsx)("button",{type:"button",className:v().resendButton,onClick:()=>{i(30),a()},children:"Resend Code"})]})})]})}),y={configUrl:"/esign/config/ui",sendOtp:"/api/v1/esign/click-n-wrap/otp",verifyOtp:"/api/v1/esign/click-n-wrap/otp/verify",resendOtp:"/api/v1/esign/click-n-wrap/otp/regenerate",signDocument:"/api/v1/esign/click-n-wrap"},T=n(7066),b=n(1955),j=n(7632),f=n(1354);let k={},N=T.Z.create(),S=async e=>{if(k[e])return k[e];let t=(0,j.Z)();try{let n=await N.get("".concat(e,"/").concat(t));if(n&&n.data){let s=f.AES.decrypt(n.data,t);return k[e]=JSON.parse(s.toString(f.enc.Utf8)),k[e]}return null}catch(e){return null}};function w(e){let{accessToken:t="",accessTokenExpiryTime:n="",refreshToken:s="",refreshTokenExpiryTime:r=""}=e||{},a=new Date(n),o=new Date(r);b.Z.remove("R_AT"),b.Z.remove("R_ATX"),b.Z.remove("R_RT"),b.Z.set("R_AT",t,{expires:a,sameSite:"strict"}),b.Z.set("R_ATX",n,{expires:a,sameSite:"strict"}),b.Z.set("R_RT",s,{expires:o,sameSite:"strict"})}async function I(e,t,n,s){try{let r={method:"post",url:"".concat(t,"/logins/v1/token/renew"),headers:{"x-apikey":n,"Content-Type":"application/json"},data:{refreshToken:e}};s&&(r.headers.Environment=s);let a=(await (0,T.Z)(r)).data;return a&&w(a),!0}catch(e){return!1}}let R=T.Z.create();R.interceptors.request.use(async e=>{let t=await S(y.configUrl);if(e.baseURL=t.NGINX_API_URL,function(e){if(!e)return!0;let t=new Date(e),n=new Date;return t.getTime()-n.getTime()<3e5}(b.Z.get("R_ATX"))){let e=b.Z.get("R_RT");e&&await I(e,t.API_URL,t.RENEW_TOKEN_API_KEY,t.ENV_KEY)}let n=b.Z.get("R_AT");return n&&(e.headers.Authorization="Bearer ".concat(n)),e.headers.apikey=t.NGINX_API_KEY,t.ENV_KEY&&(e.headers.Environment=t.ENV_KEY),e});let E=async function(e){try{return(await R.post(y.resendOtp,e)).data}catch(e){return e.response.data}},A=async function(e){try{return(await R.post(y.signDocument,e)).data}catch(e){throw Error(String(e))}},D="/esign/assets/images/";var C={lockIcon:"".concat(D,"/svgs/lock.svg"),secureIcon:"".concat(D,"/svgs/secure.svg"),backIcon:"".concat(D,"/svgs/back.svg"),error:"".concat(D,"/svgs/error.svg")},P=n(4965),O=n.n(P),Z=e=>{let{isBackButton:t=!1,onBackButtonPress:n,headerText:r}=e;return(0,s.jsxs)("div",{className:O().topbarWrapper,children:[t&&(0,s.jsx)("div",{className:O().backIcon,onClick:n,onKeyDown:e=>"Enter"===e.key&&n&&n(),role:"button",tabIndex:0,children:(0,s.jsx)("img",{src:C.backIcon,alt:"Go back"})}),(0,s.jsxs)("div",{className:O().content,children:[(0,s.jsx)("div",{className:O().label,children:r}),(0,s.jsxs)("div",{className:O().iconGroup,children:[(0,s.jsx)("div",{className:O().icon,children:(0,s.jsx)("img",{src:C.secureIcon,alt:"Secure"})}),(0,s.jsx)("div",{className:O().iconLabel,children:"100% Secure"})]})]})]})},W=n(4458),X=n.n(W);let B={errorFallbackTitle:"Something went wrong",errorFallbackSubtitle:"Your e-sign was not completed, we request you to please try again"};var L=e=>{let{onRetry:t}=e;return(0,s.jsxs)("div",{className:X().wrapper,children:[(0,s.jsxs)("div",{className:X().content,children:[(0,s.jsx)("img",{src:C.error,className:X().errorImage,alt:"Error"}),(0,s.jsx)("div",{className:X().title,children:null==B?void 0:B.errorFallbackTitle}),(0,s.jsx)("div",{className:X().subTitle,children:null==B?void 0:B.errorFallbackSubtitle})]}),(0,s.jsx)("div",{className:X().tryAgainButton,children:(0,s.jsx)(c.zx,{onClick:t,is
1FullWidth:!0,size:c.qE["2xl"],children:"Try Again"})})]})};let F="Some internal error occurred";var K=e=>{var t,n,a,d;let{tokenData:u,leadId:p,customerId:g,mobileNumber:x,location:v,source:T="PCHF_CUSTOMER_APP",documents:b,onBackPress:j,onESignSuccess:f,productId:k="PSBPL",isReEsign:N=!1}=e,[S,I]=(0,r.useState)(!1),[D,P]=(0,r.useState)(!1),[O,W]=(0,r.useState)(0),[X,B]=(0,r.useState)({authId:"",errorCode:"",message:"",errorDescription:""}),[K,q]=(0,r.useState)(!1),[G,U]=(0,r.useState)(!1);(0,r.useEffect)(()=>{w(u),p&&g&&x?H():P(!0)},[]);let Y=i.Ry({otpText:i.Z_().required("OTP is required").test("len"," ",e=>!!e&&6===e.length)}),{values:M,handleChange:V,errors:z,setFieldError:Q}=(0,o.TA)({initialValues:{otpText:""},validationSchema:Y,onSubmit:()=>{}}),J=()=>{W(e=>e+1)},H=()=>{var e;I(!0),P(!1),(e={userData:{mobileNo:x},source:T,leadId:p},new Promise((t,n)=>{R.post(y.sendOtp,e).then(e=>(t(e.data),e.data)).catch(e=>{n(e.response.data)})})).then(e=>(I(!1),(null==e?void 0:e.errorCode)||(null==e?void 0:e.errorDescription)?Q("otpText",(null==e?void 0:e.errorDescription)||F):(B(e),J()),e)).catch(e=>{Q("otpText",F),I(!1)})},$=()=>{let e={documents:b,leadId:p,productId:k};(null==v?void 0:v.lat)&&(null==v?void 0:v.long)&&(e.location={latitude:null==v?void 0:v.lat,longitude:null==v?void 0:v.long}),U(!0),A(e).then(e=>(U(!1),f({signedDocuments:null==e?void 0:e.signedDocuments}),e)).catch(e=>{U(!1),P(!0)})};return S?(0,s.jsx)(_,{text:"Sending OTP to your mobile number ".concat(null==x?void 0:null===(a=x.toString())||void 0===a?void 0:a.substring(0,2),"XXXXXX").concat(null==x?void 0:null===(d=x.toString())||void 0===d?void 0:d.substring(8,10)," to complete eSign")}):N&&G?(0,s.jsx)(_,{text:"Completing E-sign"}):D?(0,s.jsx)(L,{onRetry:H}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Z,{headerText:"eSign agreement via OTP",isBackButton:!0,onBackButtonPress:j}),(0,s.jsxs)("div",{className:m().container,children:[(0,s.jsx)("img",{src:C.lockIcon,alt:"Lock"}),(0,s.jsx)("div",{className:m().heading,children:"Enter OTP"}),(0,s.jsxs)("div",{className:m().subHeading,children:["Enter the 6 digit OTP sent to ",(0,s.jsx)("br",{})," ","".concat(null==x?void 0:x.slice(0,2),"XXXXX").concat(null==x?void 0:x.slice(7))]}),(0,s.jsx)(l.I,{label:"6 Digit Code",placeholder:"E.g. 123456",hintTextRight:"".concat(null==M?void 0:null===(t=M.otpText)||void 0===t?void 0:t.length,"/6"),isFullWidth:!0,value:null==M?void 0:M.otpText,onChange:e=>{e.length<=6&&(/^\d+$/.test(e)?V({target:{name:"otpText",value:e}}):e||V({target:{name:"otpText",value:""}}))},controlled:!0,name:"otpText",errorState:!!(null==z?void 0:z.otpText),errorText:null==z?void 0:z.otpText,type:"tel"}),(0,s.jsx)(h,{numberOfRetries:O,timer:30,resendOtp:()=>{E({userData:{mobileNo:x},source:T,leadId:p,authId:null==X?void 0:X.authId}).then(e=>(e.errorCode||e.errorDescription?Q("otpText",e.errorDescription||F):(B(e),J()),e)).catch(e=>{Q("otpText",F)})}}),(0,s.jsx)("div",{className:m().paperRoot,children:(0,s.jsx)(c.zx,{size:c.qE["2xl"],isDisabled:(null==M?void 0:null===(n=M.otpText)||void 0===n?void 0:n.length)!==6||G||K,onClick:()=>{let e={authId:null==X?void 0:X.authId,otp:null==M?void 0:M.otpText};q(!0),new Promise((t,n)=>{R.post(y.verifyOtp,e).then(e=>(t(e.data),e.data)).catch(e=>{n(e.response.data)})}).then(e=>(q(!1),(null==e?void 0:e.validOTP)?$():Q("otpText",e.errorDescription),e)).catch(e=>{q(!1),Q("otpText",(null==e?void 0:e.errorDescription)||F)})},variant:c.Wu.Primary,isFullWidth:!0,children:"Verify OTP"})})]})]})},q=e=>(0,s.jsx)(K,{...e})},4458:function(e){e.exports={wrapper:"styles_wrapper__W8YWk",content:"styles_content__xfmXy",errorImage:"styles_errorImage__TmVrU",title:"styles_title__LQ2t6",subTitle:"styles_subTitle__fm5Gq",tryAgainButton:"styles_tryAgainButton__ZCFGf",fullWidth:"styles_fullWidth__Zn6sf"}},2443:function(e){e.exports={commonLoader:"styles_commonLoader__AR2Ba",textMessage:"styles_textMessage__bC6bO",subTextMessage:"styles_subTextMessage__ETJEW"}},2321:function(e){e.exports={resendWrapper:"styles_resendWrapper__i9dQk",resendButton:"styles_resendButton__KvGBK"}},4965:function(e){e.exports={topbarWrapper:"styles_topbarWrapper__JyYde",backIcon:"styles_backIcon__IoD1I",content:"styles_content__JAmKY",label:"styles_label__LpBgR",iconGroup:"styles_iconGroup__Zj84d",icon:"styles_icon__QqNRJ",iconLabel:"styles_iconLabel__xj_fc"}},4956:function(e){e.exports={mudraInputCustom:"styles_mudraInputCustom__bQxQo",container:"styles_container__DCZmh",heading:"styles_heading__mqUsW",subHeading:"styles_subHeading__iVT7a",paperRoot:"styles_paperRoot__gBAkQ"}},2480:function(){}}]);

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.