1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7045],{7045:function(e,l,t){t.d(l,{Z:function(){return f}});var a=t(5893),i=t(5675),o=t.n(i),n=t(1163),s=t(7294),r=t(6501),d=t(6131),c={src:"/_next/static/media/apply-now-hero-logo.23b63698.svg",height:387,width:579,blurWidth:0,blurHeight:0},u={src:"/_next/static/media/brands-white.21d59c7a.svg",height:35,width:27,blurWidth:0,blurHeight:0},m={src:"/_next/static/media/invoices-white.17cef927.svg",height:35,width:27,blurWidth:0,blurHeight:0},p={src:"/_next/static/media/merchants-white.a582f2cc.svg",height:34,width:34,blurWidth:0,blurHeight:0},g=t(7135),v=t(9588),h=t(9930),x=t(3128),f=e=>{let{heading:l,subHeading:t,Facility:i,img:f,constant:b,stateData:w,setState:y}=e,j=(0,n.useRouter)(),[S,N]=(0,s.useState)(""),[A,_]=(0,s.useState)(!0),[T,k]=(0,s.useState)(!1),[E,I]=(0,d.Z)(),[O,P]=(0,d.Z)(),[C,Z]=(0,s.useState)(v.$9),[M,L]=(0,s.useState)([]),[R,V]=(0,s.useState)(!1),[F,W]=(0,d.Z)(),[G,q]=(0,d.Z)(),H=(0,h.dz)(),B=(0,s.useRef)(null),Q=e=>{var l;return e?"string"==typeof e?e:(null==e?void 0:e.error)==="invalid_grant"?"Invalid OTP":"string"==typeof(null==e?void 0:e.error_description)?e.error_description.toLowerCase().includes("bad credentials")?"Invalid OTP":e.error_description:"string"==typeof(null==e?void 0:e.errorMessage)?e.errorMessage:"string"==typeof(null==e?void 0:e.message)?e.message:"string"==typeof(null==e?void 0:null===(l=e.payload)||void 0===l?void 0:l.Message)?e.payload.Message:"string"==typeof(null==e?void 0:e.error)?e.error:"Something went wrong":null};(0,s.useEffect)(()=>{E&&(k(!1),V(!0));let e=Q(E),l=Q(F),t=Q(O),a=R?null:Q(G),i=e||l||t||a||null;if(!i){B.current=null;return}i!==B.current&&(r.Am.error(i),B.current=i,k(!1))},[E,F,O,G]);let $=[{price:"120+",label:"Brands",img:u},{price:"3,00,000+",label:"Merchants",img:p},{price:"1.2Mn+",label:"Invoices",img:m}];function D(e){return"/"===e||"/about-us/"===e?"":e=(e=(e=e.replace(/^\/+|\/+$/g,"")).replace(/[\/-]/g,"_")).toUpperCase()}let U=async e=>{var l,t;let a=await e;null===a.error&&"/campaign/goldloan"===j.pathname&&(k(!1),r.Am.success("Lead Submitted Successfully"),(0,h.qQ)("id",null==a?void 0:null===(l=a.payload)||void 0===l?void 0:l.id),y(v.mj)),null===a.error&&"/campaign/goldloan"!==j.pathname&&(k(!1),r.Am.success("Lead Submitted Successfully"),window.location.href="".concat(g.mQ).concat(null==a?void 0:null===(t=a.payload)||void 0===t?void 0:t.mobile,"&partnerId=1000&productType=").concat(D(localStorage.getItem("previousRoute")))),(null==a?void 0:a.error)&&r.Am.error("Lead Submission Failed"),k(!1),V(!0)},Y=async e=>{(null==e?void 0:e.error)===null&&k(!1),r.Am.success("Lead Verified"),localStorage.clear()};(0,s.useEffect)(()=>{if(R){Z(v.no),y(v.mj);return}if(b){Z(b);return}"Yes"===S?Z(v.Yw):Z(v.$9)},[S,R]);let z=async e=>{var l,t;(null==e?void 0:null===(l=e.payload)||void 0===l?void 0:l.Status)==="Error"&&r.Am.error(null==e?void 0:null===(t=e.payload)||void 0===t?void 0:t.Message),(null==e?void 0:e.payload)&&L(null==e?void 0:e.payload)};(0,s.useEffect)(()=>{(null==w?void 0:w.pincode.length)===6&&(null==P||P(g.oi+(null==w?void 0:w.pincode),"GET",null,z,null,g.ZE))},[null==w?void 0:w.pincode]);let J=async e=>{(null==e?void 0:e.error)||r.Am.success("OTP sent successfully")},K=async e=>{var l,t;localStorage.getItem("id")&&await (null==q?void 0:q(g.C4+localStorage.getItem("id"),"PUT",{mobileVerified:!0},Y,null,g.ZE)),j.replace("".concat("https://merchant-v2.kredmint.in/","/auth/?userId=").concat((null==e?void 0:e.id)||(null==e?void 0:null===(l=e.payload)||void 0===l?void 0:l.id),"&token=").concat((null==e?void 0:e.access_token)||(null==e?void 0:null===(t=e.payload)||void 0===t?void 0:t.access_token),"&route=/&version=v2"))},X=async e=>{var l,t,a;if(k(!0),R){if(!1===A)return;let l={grant_type:"password",password:(null==e?void 0:e.otp)||"",username:localStorage.getItem("mobile")||""},t=null==I?void 0:I("/api/auth/otp","POST",l,K,null,g.ZE);await Promise.allSettled([t]);return}(0,h.qQ)("mobile",null==e?void 0:e.phone);let i={fullName:null==e?void 0:e.name,mobile:null==e?void 0:e.phone,email:(null==e?void 0:e.email)||null,companyTurnover:null==e?void 0:e.income,companyPan:null==e?void 0:e.pan,businessName:null==e?void 0:e.company,gstRegistered:S,isWhatsApp:A,companyGst:(null==e?void 0:e.companyGst)||null,source:(null==j?void 0:j.pathname)==="/campaign/goldloan"?"goldloan":"website",address:{addressLine1:(null==e?void 0:e.address)||null,pincode:(null==e?void 0:e.pincode)||null,state:(null==e?void 0:e.state)||null,city:(null==e?void 0:e.city)||null},reqAmount:null!==(l=null==e?void 0:e.amount_required)&&void 0!==l?l:null,platform:"Browser",device:null==H?void 0:H.device,os:null==H?void 0:H.os,deviceVersion:(null==H?void 0:H.device)+(null==H?void 0:H.osVersion),osVersion:(null==H?void 0:H.os)+(null==H?void 0:H.osVersion),productType:D(localStorage.getItem("previousRoute"))};try{let l=await fetch("/api/auth/create-lead",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),o=await l.json();if(!l.ok||(null==o?void 0:o.error)){r.Am.error((null==o?void 0:o.message)||(null==o?void 0:null===(t=o.payload)||void 0===t?void 0:t.Message)||"Lead Submission Failed"),k(!1);return}U(o);let n=await fetch("/api/auth/latest-otp?mobile=".concat(null==e?void 0:e.phone),{method:"POST",headers:{"Content-Type":"application/json"}}),s=await n.json();if(!n.ok||(null==s?void 0:s.error)){r.Am.error((null==o?void 0:o.message)||(null==o?void 0:null===(a=o.payload)||void 0===a?void 0:a.Message)||"Lead Submission Failed"),k(!1);return}}catch(e){console.error(e),r.Am.error("Something went wrong"),k(!1)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex w-full flex-wrap gap-10 bg-cover bg-no-repeat pb-5 lg:pt-10 ".concat(R&&"items-center"),children:[(0,a.jsxs)("div",{className:"flex w-full flex-col justify-between lg:w-[45%]",children:[(0,a.jsx)("div",{className:" grow lg:grow-0",children:(0,a.jsxs)("div",{className:"text-white-0 lg:w-[495px]",children:[(0,a.jsx)("h1",{className:"text-4xl font-semibold xl:text-5xl 2xl:text-7xl",children:l||"Get collateral free funds for your Business needs"}),(0,a.jsx)("p",{className:"text-sm font-light lg:text-lg xl:text-xl",children:t}),(0,a.jsx)("div",{className:"flex justify-center gap-10 py-8 md:gap-40 lg:justify-between lg:gap-0",children:i.map((e,l)=>(0,a.jsxs)("div",{className:"text-white-0",children:[(0,a.jsx)(o(),{src:e.img,alt:e.img}),(0,a.jsx)("p",{className:"m-0 p-0 text-xs font-semibold sm:text-base",children:e.label}),(0,a.jsx)("p",{className:"m-0 p-0 text-xs font-semibold sm:text-base",children:e.label2})]},l))})]})}),(0,a.jsx)(o(),{src:f||c,alt:"ApplyNowForm",className:"mt-10 hidden w-[70%] grow lg:mt-0 lg:block lg:w-100 lg:grow-0 xl:w-150 2xl:w-200"}),(0,a.jsx)("div",{className:"hidden lg:block",children:"/campaign/goldloan"!==j.pathname&&(0,a.jsx)("div",{className:"flex flex-wrap justify-between py-8",children:$.map((e,l)=>(0,a.jsxs)("div",{className:"text-white-0",children:[(0,a.jsx)(o(),{src:e.img,alt:e.img}),(0,a.jsx)("h1",{className:"m-0 p-0 text-[22px] font-medium lg:text-3xl xl:text-100",children:e.price}),(0,a.jsx)("p",{className:"m-0 p-0 text-xxs font-semibold lg:text-sm xl:text-base",children:e.label})]},l))})})]}),(0,a.jsx)(x.Z,{formObject:C,onFormSubmit:X,btnName:"Apply Now",onChange:e=>{N(e)},isGst:S,ShareOnWhatsApp:()=>{_(!A)},whatsAppShare:A,loader:T,stateData:w,onChangeCampaignState:e=>{y({...w,[e.target.id]:e.target.value})},pinData:M,isRegistered:R,onOtpResend:()=>{null==W||W("/api/auth/latest-otp?mobile=".concat(localStorage.getItem("mobile")),"POST",null,J,null,g.ZE)},className:"!w-full",btnName:R?"Verify Phone":"Apply Now"})]}),(0,a.jsx)("div",{className:"block lg:hidden",children:"/campaign/goldloan"!==j.pathname&&(0,a.jsx)("div",{className:"flex flex-wrap justify-between py-8",children:$.map((e,l)=>(0,a.jsxs)("div",{className:"text-white-0",children:[(0,a.jsx)(o(),{src:e.img,alt:e.img}),(0,a.jsx)("h1",{className:"m-0 p-0 text-[22px] font-medium lg:text-3xl xl:text-100",children:e.price}),(0,a.jsx)("p",{className:"m-0 p-0 text-lg font-semibold lg:text-sm xl:text-base",children:e.label})]},l))})}),(0,a.jsx)(r.x7,{})]})}}}]);
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.