1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5682],{50411:function(t,r,n){var o;o=t=>(()=>{var r={694:(t,r,n)=>{"use strict";var o=n(925);function i(){}function a(){}a.resetWarningCache=i,t.exports=function(){function t(t,r,n,i,a,l){if(l!==o){var u=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function r(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:r,element:t,elementType:t,instanceOf:r,node:t,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},556:(t,r,n)=>{t.exports=n(694)()},925:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},12:r=>{"use strict";r.exports=t}},n={};function o(t){var i=n[t];if(void 0!==i)return i.exports;var a=n[t]={exports:{}};return r[t](a,a.exports,o),a.exports}o.n=t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return o.d(r,{a:r}),r},o.d=(t,r)=>{for(var n in r)o.o(r,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";o.r(i),o.d(i,{Modal:()=>nL,UnVerifiedModal:()=>nT});var t,r,n={};o.r(n),o.d(n,{authContainer:()=>m,bgBtnMeniit:()=>y,bgBtnMep:()=>v,bgBtnNias:()=>g,btnSubmit:()=>b,centerByMargin:()=>_,commonHeading:()=>w,cursorPointer:()=>E,customArrow:()=>x,customScroll:()=>S,customSelect:()=>O,errBtn:()=>L,errMsgs:()=>T,errcustomArrow:()=>N,errcustomSelect:()=>P,errinputBox:()=>j,font18:()=>A,formGroup:()=>k,formSwitchText:()=>I,hiddenText:()=>F,imgLogo:()=>M,inputBox:()=>D,inputFieldGroup:()=>B,inputIcon:()=>C,inputUnderline:()=>V,labelText:()=>G,loginSignupText:()=>U,loginText:()=>R,mbTwenty:()=>q,otpFooter:()=>z,otpTimer:()=>W,otpTimerText:()=>Y,otpVerificationText:()=>H,resendOtp:()=>$,resendOtpInActive:()=>Z,termsAndConditionWrapper:()=>J,termsText:()=>K,textBlue:()=>Q,textBlueHeader:()=>X,textBlueTimer:()=>ee});var a={};o.r(a),o.d(a,{authContainer:()=>rN,bgBtnMeniit:()=>rP,bgBtnMep:()=>rj,bgBtnNias:()=>rA,btnSubmit:()=>rk,centerByMargin:()=>rI,closeButton:()=>rF,commonHeading:()=>rM,cursorPointer:()=>rD,customArrow:()=>rB,customScroll:()=>rC,customSelect:()=>rV,errBtn:()=>rG,errMsgs:()=>rU,errcustomArrow:()=>rR,errcustomSelect:()=>rq,errinputBox:()=>rz,font18:()=>rW,formGroup:()=>rY,formSwitchText:()=>rH,hiddenText:()=>r$,imgLogo:()=>rZ,inputBox:()=>rJ,inputFieldGroup:()=>rK,inputIcon:()=>rQ,inputUnderline:()=>rX,labelText:()=>r0,loader:()=>r1,loginSignupText:()=>r2,loginText:()=>r3,mbTwenty:()=>r5,modalContent:()=>r8,modalOverlay:()=>r6,otpFooter:()=>r4,otpTimer:()=>r9,otpTimerText:()=>r7,otpVerificationText:()=>ne,posCenter:()=>nt,resendOtp:()=>nr,resendOtpInActive:()=>nn,spin:()=>no,termsAndConditionWrapper:()=>ni,termsText:()=>na,textBlue:()=>nl,textBlueHeader:()=>nu,textBlueTimer:()=>nc});var l=o(12),u=o.n(l),c=o(556),s=o.n(c);let f=(0,l.createContext)(null);function d({clientId:t,nonce:r,onScriptLoadSuccess:n,onScriptLoadError:o,children:i}){let a=function(t={}){let{nonce:r,onScriptLoadSuccess:n,onScriptLoadError:o}=t,[i,a]=(0,l.useState)(!1),u=(0,l.useRef)(n);u.current=n;let c=(0,l.useRef)(o);return c.current=o,(0,l.useEffect)(()=>{let t=document.createElement("script");return t.src="https://accounts.google.com/gsi/client",t.async=!0,t.defer=!0,t.nonce=r,t.onload=()=>{var t;a(!0),null===(t=u.current)||void 0===t||t.call(u)},t.onerror=()=>{var t;a(!1),null===(t=c.current)||void 0===t||t.call(c)},document.body.appendChild(t),()=>{document.body.removeChild(t)}},[r]),i}({nonce:r,onScriptLoadSuccess:n,onScriptLoadError:o}),c=(0,l.useMemo)(()=>({clientId:t,scriptLoadedSuccessfully:a}),[t,a]);return u().createElement(f.Provider,{value:c},i)}let h={large:40,medium:32,small:20};function p({onSuccess:t,onError:r,useOneTap:n,promptMomentNotification:o,type:i="standard",theme:a="outline",size:c="large",text:s,shape:d,logo_alignment:p,width:m,locale:y,click_listener:v,containerProps:g,...b}){let _=(0,l.useRef)(null),{clientId:w,scriptLoadedSuccessfully:E}=function(){let t=(0,l.useContext)(f);if(!t)throw Error("Google OAuth components must be used within GoogleOAuthProvider");return t}(),x=(0,l.useRef)(t);x.current=t;let S=(0,l.useRef)(r);S.current=r;let O=(0,l.useRef)(o);return O.current=o,(0,l.useEffect)(()=>{var t,r,o,l,u,f,h,g,L;if(E)return null===(o=null===(r=null===(t=null==window?void 0:window.google)||void 0===t?void 0:t.accounts)||void 0===r?void 0:r.id)||void 0===o||o.initialize({client_id:w,callback:t=>{var r,n;if(!(null==t?void 0:t.credential))return null===(r=S.current)||void 0===r?void 0:r.call(S);let{credential:o,select_by:i}=t;x.current({credential:o,clientId:null!==(n=null==t?void 0:t.clientId)&&void 0!==n?n:null==t?void 0:t.client_id,select_by:i})},...b}),null===(f=null===(u=null===(l=null==window?void 0:window.google)||void 0===l?void 0:l.accounts)||void 0===u?void 0:u.id)||void 0===f||f.renderButton(_.current,{type:i,theme:a,size:c,text:s,shape:d,logo_alignment:p,width:m,locale:y,click_listener:v}),n&&(null===(L=null===(g=null===(h=null==window?void 0:window.google)||void 0===h?void 0:h.accounts)||void 0===g?void 0:g.id)||void 0===L||L.prompt(O.current)),()=>{var t,r,o;n&&(null===(o=null===(r=null===(t=null==window?void 0:window.google)||void 0===t?void 0:t.accounts)||void 0===r?void 0:r.id)||void 0===o||o.cancel())}},[w,E,n,i,a,c,s,d,p,m,y]),u().createElement("div",{...g,ref:_,style:{height:h[c],...null==g?void 0:g.style}})}var m="Authmodal-module__authContainer__def1bf01602073d329bd",y="Authmodal-module__bgBtnMeniit__accc51bf2878d7b8f850",v="Authmodal-module__bgBtnMep__f3e45143feed6ac58f97",g="Authmodal-module__bgBtnNias__dd6bea37a37dce95ddc0",b="Authmodal-module__btnSubmit__e018f599972639d0c8e6",_="Authmodal-module__centerByMargin__e35a5f072394e10d8702",w="Authmodal-module__commonHeading__bb9801d74b8982ae1936",E="Authmodal-module__cursorPointer__f7fb387e1b6eecbfa884",x="Authmodal-module__customArrow__c62f138371777049d1d1",S="Authmodal-module__customScroll__ddfa166b9b2f01449dae",O="Authmodal-module__customSelect__c557ab888ca1ff1d4549",L="Authmodal-module__errBtn__b02c8e08f182a860cbd5",T="Authmodal-module__errMsgs__ce3998f0a58dea07fe8c",N="Authmodal-module__errcustomArrow__a249a72862f68a25c4dd",P="Authmodal-module__errcustomSelect__a4c42d55087ddf796fcd",j="Authmodal-module__errinputBox__da26a7d440b4b3ba197d",A="Authmodal-module__font18__b3cac05cf64c1579b76f",k="Authmodal-module__formGroup__a03e7d45258d208623a1",I="Authmodal-module__formSwitchText__bf03aa32a5fe360d3fe0",F="Authmodal-module__hiddenText__ffcbbba72cca42cc5c7e",M="Authmodal-module__imgLogo__c1585884fd10e49ea9bc",D="Authmodal-module__inputBox__cdfb589052b7b0aa3ebd",B="Authmodal-module__inputFieldGroup__eb060276c09533e3e3d3",C="Authmodal-module__inputIcon__f90626d337af29ea6d9e",V="Authmodal-module__inputUnderline__ec125b613dd7265d767f",G="Authmodal-module__labelText__f7002f438a8606002595",U="Authmodal-module__loginSignupText__d78a383815a2c0c1fdd3",R="Authmodal-module__loginText__f16d95f040073bd14832",q="Authmodal-module__mbTwenty__bd00b9a378bca30da158",z="Authmodal-module__otpFooter__e20b1bfb6d59f45ea3e6",W="Authmodal-module__otpTimer__f13e7766f988ad47e610",Y="Authmodal-module__otpTimerText__edc7e1f37a343fb69bc2",H="Authmodal-module__otpVerificationText__fe312e7d3a53eff583e9",$="Authmodal-module__resendOtp__f203a62019e7aa7fbac2",Z="Authmodal-module__resendOtpInActive__f40da64574aa1f166fac",J="Authmodal-module__termsAndConditionWrapper__fb3d511962366bc58cbc",K="Authmodal-module__termsText__c23aefda32611246fafb",Q="Authmodal-module__textBlue__a1088b7c4e689a42f38a",X="Authmodal-module__textBlueHeader__f1a01674fa9908e3e54a",ee="Authmodal-module__textBlueTimer__da41d27ece263d500a2d",et=t=>"checkbox"===t.type,er=t=>t instanceof Date,en=t=>null==t;let eo=t=>"object"==typeof t;var ei=t=>!en(t)&&!Array.isArray(t)&&eo(t)&&!er(t),ea=t=>ei(t)&&t.target?et(t.target)?t.target.checked:t.target.value:t,el=(t,r)=>t.has(r.substring(0,r.search(/\.\d+(\.|$)/))||r),eu=t=>{let r=t.constructor&&t.constructor.prototype;return ei(r)&&r.hasOwnProperty("isPrototypeOf")},ec="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function es(t){let r;let n=Array.isArray(t);if(t instanceof Date)r=new Date(t);else if(t instanceof Set)r=new Set(t);else{if(ec&&(t instanceof Blob||t instanceof FileList)||!n&&!ei(t))return t;if(r=n?[]:{},n||eu(t))for(let n in t)t.hasOwnProperty(n)&&(r[n]=es(t[n]));else r=t}return r}var ef=t=>Array.isArray(t)?t.filter(Boolean):[],ed=t=>void 0===t,eh=(t,r,n)=>{if(!r||!ei(t))return n;let o=ef(r.split(/[,[\].]+?/)).reduce((t,r)=>en(t)?t:t[r],t);return ed(o)||o===t?ed(t[r])?n:t[r]:o},ep=t=>"boolean"==typeof t,em=t=>/^\w*$/.test(t),ey=t=>ef(t.replace(/["|']|\]/g,"").split(/\.|\[/)),ev=(t,r,n)=>{let o=-1,i=em(r)?[r]:ey(r),a=i.length,l=a-1;for(;++o<a;){let r=i[o],a=n;if(o!==l){let n=t[r];a=ei(n)||Array.isArray(n)?n:isNaN(+i[o+1])?{}:[]}if("__proto__"===r)return;t[r]=a,t=t[r]}return t};let eg={BLUR:"blur",FOCUS_OUT:"focusout"},eb={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},e_="pattern",ew="required";l.createContext(null);var eE=(t,r,n,o=!0)=>{let i={defaultValues:r._defaultValues};for(let a in t)Object.defineProperty(i,a,{get:()=>(r._proxyFormState[a]!==eb.all&&(r._proxyFormState[a]=!o||eb.all),n&&(n[a]=!0),t[a])});return i},ex=t=>ei(t)&&!Object.keys(t).length,eS=(t,r,n,o)=>{n(t);let{name:i,...a}=t;return ex(a)||Object.keys(a).length>=Object.keys(r).length||Object.keys(a).find(t=>r[t]===(!o||eb.all))},eO=t=>Array.isArray(t)?t:[t],eL=t=>"string"==typeof t,eT=(t,r,n,o,i)=>eL(t)?(o&&r.watch.add(t),eh(n,t,i)):Array.isArray(t)?t.map(t=>(o&&r.watch.add(t),eh(n,t))):(o&&(r.watchAll=!0),n),eN=(t,r,n,o,i)=>r?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[o]:i||!0}}:{},eP=t=>({isOnSubmit:!t||t===eb.onSubmit,isOnBlur:t===eb.onBlur,isOnChange:t===eb.onChange,isOnAll:t===eb.all,isOnTouch:t===eb.onTouched}),ej=(t,r,n)=>!n&&(r.watchAll||r.watch.has(t)||[...r.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));let eA=(t,r,n,o)=>{for(let i of n||Object.keys(t)){let n=eh(t,i);if(n){let{_f:t,...a}=n;if(t){if(t.refs&&t.refs[0]&&r(t.refs[0],i)&&!o||t.ref&&r(t.ref,t.name)&&!o)return!0;
1if(eA(a,r))break}else if(ei(a)&&eA(a,r))break}}};var ek=(t,r,n)=>{let o=eO(eh(t,n));return ev(o,"root",r[n]),ev(t,n,o),t},eI=t=>"file"===t.type,eF=t=>"function"==typeof t,eM=t=>{if(!ec)return!1;let r=t?t.ownerDocument:0;return t instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},eD=t=>eL(t),eB=t=>"radio"===t.type,eC=t=>t instanceof RegExp;let eV={value:!1,isValid:!1},eG={value:!0,isValid:!0};var eU=t=>{if(Array.isArray(t)){if(t.length>1){let r=t.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!ed(t[0].attributes.value)?ed(t[0].value)||""===t[0].value?eG:{value:t[0].value,isValid:!0}:eG:eV}return eV};let eR={isValid:!1,value:null};var eq=t=>Array.isArray(t)?t.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,eR):eR;function ez(t,r,n="validate"){if(eD(t)||Array.isArray(t)&&t.every(eD)||ep(t)&&!t)return{type:n,message:eD(t)?t:"",ref:r}}var eW=t=>ei(t)&&!eC(t)?t:{value:t,message:""},eY=async(t,r,n,o,i)=>{let{ref:a,refs:l,required:u,maxLength:c,minLength:s,min:f,max:d,pattern:h,validate:p,name:m,valueAsNumber:y,mount:v,disabled:g}=t._f,b=eh(r,m);if(!v||g)return{};let _=l?l[0]:a,w=t=>{o&&_.reportValidity&&(_.setCustomValidity(ep(t)?"":t||""),_.reportValidity())},E={},x=eB(a),S=et(a),O=(y||eI(a))&&ed(a.value)&&ed(b)||eM(a)&&""===a.value||""===b||Array.isArray(b)&&!b.length,L=eN.bind(null,m,n,E),T=(t,r,n,o="maxLength",i="minLength")=>{let l=t?r:n;E[m]={type:t?o:i,message:l,ref:a,...L(t?o:i,l)}};if(i?!Array.isArray(b)||!b.length:u&&(!(x||S)&&(O||en(b))||ep(b)&&!b||S&&!eU(l).isValid||x&&!eq(l).isValid)){let{value:t,message:r}=eD(u)?{value:!!u,message:u}:eW(u);if(t&&(E[m]={type:ew,message:r,ref:_,...L(ew,r)},!n))return w(r),E}if(!(O||en(f)&&en(d))){let t,r;let o=eW(d),i=eW(f);if(en(b)||isNaN(b)){let n=a.valueAsDate||new Date(b),l=t=>new Date((new Date).toDateString()+" "+t),u="time"==a.type,c="week"==a.type;eL(o.value)&&b&&(t=u?l(b)>l(o.value):c?b>o.value:n>new Date(o.value)),eL(i.value)&&b&&(r=u?l(b)<l(i.value):c?b<i.value:n<new Date(i.value))}else{let n=a.valueAsNumber||(b?+b:b);en(o.value)||(t=n>o.value),en(i.value)||(r=n<i.value)}if((t||r)&&(T(!!t,o.message,i.message,"max","min"),!n))return w(E[m].message),E}if((c||s)&&!O&&(eL(b)||i&&Array.isArray(b))){let t=eW(c),r=eW(s),o=!en(t.value)&&b.length>+t.value,i=!en(r.value)&&b.length<+r.value;if((o||i)&&(T(o,t.message,r.message),!n))return w(E[m].message),E}if(h&&!O&&eL(b)){let{value:t,message:r}=eW(h);if(eC(t)&&!b.match(t)&&(E[m]={type:e_,message:r,ref:a,...L(e_,r)},!n))return w(r),E}if(p){if(eF(p)){let t=ez(await p(b,r),_);if(t&&(E[m]={...t,...L("validate",t.message)},!n))return w(t.message),E}else if(ei(p)){let t={};for(let o in p){if(!ex(t)&&!n)break;let i=ez(await p[o](b,r),_,o);i&&(t={...i,...L(o,i.message)},w(i.message),n&&(E[m]=t))}if(!ex(t)&&(E[m]={ref:_,...t},!n))return E}}return w(!0),E};function eH(t,r){let n=Array.isArray(r)?r:em(r)?[r]:ey(r),o=1===n.length?t:function(t,r){let n=r.slice(0,-1).length,o=0;for(;o<n;)t=ed(t)?o++:t[r[o++]];return t}(t,n),i=n.length-1,a=n[i];return o&&delete o[a],0!==i&&(ei(o)&&ex(o)||Array.isArray(o)&&function(t){for(let r in t)if(t.hasOwnProperty(r)&&!ed(t[r]))return!1;return!0}(o))&&eH(t,n.slice(0,-1)),t}var e$=()=>{let t=[];return{get observers(){return t},next:r=>{for(let n of t)n.next&&n.next(r)},subscribe:r=>(t.push(r),{unsubscribe:()=>{t=t.filter(t=>t!==r)}}),unsubscribe:()=>{t=[]}}},eZ=t=>en(t)||!eo(t);function eJ(t,r){if(eZ(t)||eZ(r))return t===r;if(er(t)&&er(r))return t.getTime()===r.getTime();let n=Object.keys(t),o=Object.keys(r);if(n.length!==o.length)return!1;for(let i of n){let n=t[i];if(!o.includes(i))return!1;if("ref"!==i){let t=r[i];if(er(n)&&er(t)||ei(n)&&ei(t)||Array.isArray(n)&&Array.isArray(t)?!eJ(n,t):n!==t)return!1}}return!0}var eK=t=>"select-multiple"===t.type,eQ=t=>eB(t)||et(t),eX=t=>eM(t)&&t.isConnected,e0=t=>{for(let r in t)if(eF(t[r]))return!0;return!1};function e1(t,r={}){let n=Array.isArray(t);if(ei(t)||n)for(let n in t)Array.isArray(t[n])||ei(t[n])&&!e0(t[n])?(r[n]=Array.isArray(t[n])?[]:{},e1(t[n],r[n])):en(t[n])||(r[n]=!0);return r}var e2=(t,r)=>(function t(r,n,o){let i=Array.isArray(r);if(ei(r)||i)for(let i in r)Array.isArray(r[i])||ei(r[i])&&!e0(r[i])?ed(n)||eZ(o[i])?o[i]=Array.isArray(r[i])?e1(r[i],[]):{...e1(r[i])}:t(r[i],en(n)?{}:n[i],o[i]):o[i]=!eJ(r[i],n[i]);return o}
1)(t,r,e1(r)),e3=(t,{valueAsNumber:r,valueAsDate:n,setValueAs:o})=>ed(t)?t:r?""===t?NaN:t?+t:t:n&&eL(t)?new Date(t):o?o(t):t;function e5(t){let r=t.ref;if(!(t.refs?t.refs.every(t=>t.disabled):r.disabled))return eI(r)?r.files:eB(r)?eq(t.refs).value:eK(r)?[...r.selectedOptions].map(({value:t})=>t):et(r)?eU(t.refs).value:e3(ed(r.value)?t.ref.value:r.value,t)}var e8=(t,r,n,o)=>{let i={};for(let n of t){let t=eh(r,n);t&&ev(i,n,t._f)}return{criteriaMode:n,names:[...t],fields:i,shouldUseNativeValidation:o}},e6=t=>ed(t)?t:eC(t)?t.source:ei(t)?eC(t.value)?t.value.source:t.value:t;let e4="AsyncFunction";var e9=t=>!(t&&t.validate||!(eF(t.validate)&&t.validate.constructor.name===e4||ei(t.validate)&&Object.values(t.validate).find(t=>t.constructor.name===e4))),e7=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function te(t,r,n){let o=eh(t,n);if(o||em(n))return{error:o,name:n};let i=n.split(".");for(;i.length;){let o=i.join("."),a=eh(r,o),l=eh(t,o);if(a&&!Array.isArray(a)&&n!==o)break;if(l&&l.type)return{name:o,error:l};i.pop()}return{name:n}}var tt=(t,r,n,o,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(r||t):(n?o.isOnBlur:i.isOnBlur)?!t:!(n?o.isOnChange:i.isOnChange)||t),tr=(t,r)=>!ef(eh(t,r)).length&&eH(t,r);let tn={mode:eb.onSubmit,reValidateMode:eb.onChange,shouldFocusError:!0};function to(t={}){let r=l.useRef(),n=l.useRef(),[o,i]=l.useState({isDirty:!1,isValidating:!1,isLoading:eF(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,defaultValues:eF(t.defaultValues)?void 0:t.defaultValues});r.current||(r.current={...function(t={}){let r,n={...tn,...t},o={submitCount:0,isDirty:!1,isLoading:eF(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},i={},a=(ei(n.defaultValues)||ei(n.values))&&es(n.defaultValues||n.values)||{},l=n.shouldUnregister?{}:es(a),u={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},s=0,f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},d={values:e$(),array:e$(),state:e$()},h=eP(n.mode),p=eP(n.reValidateMode),m=n.criteriaMode===eb.all,y=async t=>{if(!n.disabled&&(f.isValid||t)){let t=n.resolver?ex((await _()).errors):await w(i,!0);t!==o.isValid&&d.state.next({isValid:t})}},v=(t,r)=>{!n.disabled&&(f.isValidating||f.validatingFields)&&((t||Array.from(c.mount)).forEach(t=>{t&&(r?ev(o.validatingFields,t,r):eH(o.validatingFields,t))}),d.state.next({validatingFields:o.validatingFields,isValidating:!ex(o.validatingFields)}))},g=(t,r,n,o)=>{let c=eh(i,t);if(c){let i=eh(l,t,ed(n)?eh(a,t):n);ed(i)||o&&o.defaultChecked||r?ev(l,t,r?i:e5(c._f)):S(t,i),u.mount&&y()}},b=(t,r,l,u,c)=>{let s=!1,h=!1,p={name:t};if(!n.disabled){let n=!!(eh(i,t)&&eh(i,t)._f&&eh(i,t)._f.disabled);if(!l||u){f.isDirty&&(h=o.isDirty,o.isDirty=p.isDirty=E(),s=h!==p.isDirty);let i=n||eJ(eh(a,t),r);h=!(n||!eh(o.dirtyFields,t)),i||n?eH(o.dirtyFields,t):ev(o.dirtyFields,t,!0),p.dirtyFields=o.dirtyFields,s=s||f.dirtyFields&&!i!==h}if(l){let r=eh(o.touchedFields,t);r||(ev(o.touchedFields,t,l),p.touchedFields=o.touchedFields,s=s||f.touchedFields&&r!==l)}s&&c&&d.state.next(p)}return s?p:{}},_=async t=>{v(t,!0);let r=await n.resolver(l,n.context,e8(t||c.mount,i,n.criteriaMode,n.shouldUseNativeValidation));return v(t),r},w=async(t,r,i={valid:!0})=>{for(let a in t){let u=t[a];if(u){let{_f:t,...s}=u;if(t){let s=c.array.has(t.name),d=u._f&&e9(u._f);d&&f.validatingFields&&v([a],!0);let h=await eY(u,l,m,n.shouldUseNativeValidation&&!r,s);if(d&&f.validatingFields&&v([a]),h[t.name]&&(i.valid=!1,r))break;r||(eh(h,t.name)?s?ek(o.errors,h,t.name):ev(o.errors,t.name,h[t.name]):eH(o.errors,t.name))}ex(s)||await w(s,r,i)}}return i.valid},E=(t,r)=>!n.disabled&&(t&&r&&ev(l,t,r),!eJ(j(),a)),x=(t,r,n)=>eT(t,c,{...u.mount?l:ed(r)?a:eL(t)?{[t]:r}:r},n,r),S=(t,r,n={})=>{let o=eh(i,t),a=r;if(o){let n=o._f;n&&(n.disabled||ev(l,t,e3(r,n)),a=eM(n.ref)&&en(r)?"":r,eK(n.ref)?[...n.ref.options].forEac
1h(t=>t.selected=a.includes(t.value)):n.refs?et(n.ref)?n.refs.length>1?n.refs.forEach(t=>(!t.defaultChecked||!t.disabled)&&(t.checked=Array.isArray(a)?!!a.find(r=>r===t.value):a===t.value)):n.refs[0]&&(n.refs[0].checked=!!a):n.refs.forEach(t=>t.checked=t.value===a):eI(n.ref)?n.ref.value="":(n.ref.value=a,n.ref.type||d.values.next({name:t,values:{...l}})))}(n.shouldDirty||n.shouldTouch)&&b(t,a,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&P(t)},O=(t,r,n)=>{for(let o in r){let a=r[o],l=`${t}.${o}`,u=eh(i,l);(c.array.has(t)||ei(a)||u&&!u._f)&&!er(a)?O(l,a,n):S(l,a,n)}},L=(t,r,n={})=>{let s=eh(i,t),h=c.array.has(t),p=es(r);ev(l,t,p),h?(d.array.next({name:t,values:{...l}}),(f.isDirty||f.dirtyFields)&&n.shouldDirty&&d.state.next({name:t,dirtyFields:e2(a,l),isDirty:E(t,p)})):!s||s._f||en(p)?S(t,p,n):O(t,p,n),ej(t,c)&&d.state.next({...o}),d.values.next({name:u.mount?t:void 0,values:{...l}})},T=async a=>{u.mount=!0;let g=a.target,E=g.name,x=!0,S=eh(i,E),O=t=>{x=Number.isNaN(t)||er(t)&&isNaN(t.getTime())||eJ(t,eh(l,E,t))};if(S){let u,L;let T=g.type?e5(S._f):ea(a),N=a.type===eg.BLUR||a.type===eg.FOCUS_OUT,j=!e7(S._f)&&!n.resolver&&!eh(o.errors,E)&&!S._f.deps||tt(N,eh(o.touchedFields,E),o.isSubmitted,p,h),A=ej(E,c,N);ev(l,E,T),N?(S._f.onBlur&&S._f.onBlur(a),r&&r(0)):S._f.onChange&&S._f.onChange(a);let k=b(E,T,N,!1),I=!ex(k)||A;if(N||d.values.next({name:E,type:a.type,values:{...l}}),j)return f.isValid&&("onBlur"===t.mode?N&&y():y()),I&&d.state.next({name:E,...A?{}:k});if(!N&&A&&d.state.next({...o}),n.resolver){let{errors:t}=await _([E]);if(O(T),x){let r=te(o.errors,i,E),n=te(t,i,r.name||E);u=n.error,E=n.name,L=ex(t)}}else v([E],!0),u=(await eY(S,l,m,n.shouldUseNativeValidation))[E],v([E]),O(T),x&&(u?L=!1:f.isValid&&(L=await w(i,!0)));x&&(S._f.deps&&P(S._f.deps),((n,i,a,l)=>{var u;let c=eh(o.errors,n),h=f.isValid&&ep(i)&&o.isValid!==i;if(t.delayError&&a?(u=()=>{ev(o.errors,n,a),d.state.next({errors:o.errors})},(r=t=>{clearTimeout(s),s=setTimeout(u,t)})(t.delayError)):(clearTimeout(s),r=null,a?ev(o.errors,n,a):eH(o.errors,n)),(a?!eJ(c,a):c)||!ex(l)||h){let t={...l,...h&&ep(i)?{isValid:i}:{},errors:o.errors,name:n};o={...o,...t},d.state.next(t)}})(E,L,u,k))}},N=(t,r)=>{if(eh(o.errors,r)&&t.focus)return t.focus(),1},P=async(t,r={})=>{let a,l;let u=eO(t);if(n.resolver){let r=await (async t=>{let{errors:r}=await _(t);if(t)for(let n of t){let t=eh(r,n);t?ev(o.errors,n,t):eH(o.errors,n)}else o.errors=r;return r})(ed(t)?t:u);a=ex(r),l=t?!u.some(t=>eh(r,t)):a}else t?((l=(await Promise.all(u.map(async t=>{let r=eh(i,t);return await w(r&&r._f?{[t]:r}:r)}))).every(Boolean))||o.isValid)&&y():l=a=await w(i);return d.state.next({...!eL(t)||f.isValid&&a!==o.isValid?{}:{name:t},...n.resolver||!t?{isValid:a}:{},errors:o.errors}),r.shouldFocus&&!l&&eA(i,N,t?u:c.mount),l},j=t=>{let r={...u.mount?l:a};return ed(t)?r:eL(t)?eh(r,t):t.map(t=>eh(r,t))},A=(t,r)=>({invalid:!!eh((r||o).errors,t),isDirty:!!eh((r||o).dirtyFields,t),error:eh((r||o).errors,t),isValidating:!!eh(o.validatingFields,t),isTouched:!!eh((r||o).touchedFields,t)}),k=(t,r,n)=>{let a=(eh(i,t,{_f:{}})._f||{}).ref,{ref:l,message:u,type:c,...s}=eh(o.errors,t)||{};ev(o.errors,t,{...s,...r,ref:a}),d.state.next({name:t,errors:o.errors,isValid:!1}),n&&n.shouldFocus&&a&&a.focus&&a.focus()},I=(t,r={})=>{for(let u of t?eO(t):c.mount)c.mount.delete(u),c.array.delete(u),r.keepValue||(eH(i,u),eH(l,u)),r.keepError||eH(o.errors,u),r.keepDirty||eH(o.dirtyFields,u),r.keepTouched||eH(o.touchedFields,u),r.keepIsValidating||eH(o.validatingFields,u),n.shouldUnregister||r.keepDefaultValue||eH(a,u);d.values.next({values:{...l}}),d.state.next({...o,...r.keepDirty?{isDirty:E()}:{}}),r.keepIsValid||y()},F=({disabled:t,name:r,field:n,fields:o,value:i})=>{if(ep(t)&&u.mount||t){let a=t?void 0:ed(i)?e5(n?n._f:eh(o,r)._f):i;ev(l,r,a),b(r,a,!1,!1,!0)}},M=(t,r={})=>{let o=eh(i,t),l=ep(r.disabled)||ep(n.disabled);return ev(i,t,{...o||{},_f:{...o&&o._f?o._f:{ref:{name:t}},name:t,mount:!0,...r}}),c.mount.add(t),o?F({field:o,disabled:ep(r.disabled)?r.disabled:n.disabled,name:t,value:r.value}):g(t,!0,r.value),{...l?{disabled:r.disabled||n.disabled}:{},...n.progressive?{required:!!r.required,min:e6(r.min),max:e6(r.max),minLength:e6(r.minLength),maxLength:e6(r.maxLength),pattern:e6(r.pattern)}:{},name:t,onChange:T,onBlur:T,ref:l=>{if(l){M(t,r),o=eh(i,t);let n=ed(l.value)&&l.querySelectorAll&&l.querySelectorAll("input,select,textarea")[0]||l,u=eQ(n),c=o._f.refs||[];(u?c.find(t=>t===n):n===o._f.ref)||(ev(i,t,{_f:{...o._f,...u?{refs:[...c.filter(eX),n,...Array.isArray(eh(a,t))?[{}]:[]],ref:{type:n.type,name:t}}:{ref:n}}}),g(t,!1,void 0,n))}else(o=eh(i,t,{}))._f&&(o._f.mount=!1),(n.shouldUnregister||r.shouldUnregister)&&(!el(c.array,t)||!u.action)&&c.unMount.add(t)}}},D=()=>n.shouldFocusError&&eA(i,N,c.mount),B=(t,r)=>async a=>{let u;if(a&&(a.preventDefault&&a.preventDefault(),a.persist&&a.persist()),n.disabled)return void(r&&await r({...o.errors},a));let c=es(l);if(d.state.next({isSubmitting:!0}),n.resolver){let{errors:t,values:r}=await _();o.errors=t,c=r}else await w(i);if(eH(o.errors,"root"),ex(o.errors)){d.state.next({errors:{}});try{await t(c,a)}catch(t){u=t}}else r&&await r({...o.errors},a),D(),setTimeout(D);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ex(o.errors)&&!u,submitCount:o.submitCount+1,errors:o.errors}),u)throw u},C=(r,n={})=>{let s=r?es(r):a,h=es(s),p=ex(r),m=p?a:h;if(n.keepDefaultValues||(a=s),!n.keepValues){if(n.keepDirtyValues)for(let t of Array.from(new Set([...c.mount,...Object.keys(e2(a,l))])))eh(o.dirtyFields,t)?ev(m,t,eh(l,t)):L(t,eh(m,t));else{if(ec&&ed(r))for(let t of c.mount){let r=eh(i,t);if(r&&r._f){let t=Array.isArray(r._f.refs)?r._f.refs[0]:r._f.ref;if(eM(t)){let r=t.closest("form");if(r){r.reset();break}}}}i={}}l=t.shouldUnregister?n.keepDefaultValues?es(a):{}:es(m),d.array.next({values:{...m}}),d.values.next({values:{...m}})}
1c={mount:n.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},u.mount=!f.isValid||!!n.keepIsValid||!!n.keepDirtyValues,u.watch=!!t.shouldUnregister,d.state.next({submitCount:n.keepSubmitCount?o.submitCount:0,isDirty:!p&&(n.keepDirty?o.isDirty:!(!n.keepDefaultValues||eJ(r,a))),isSubmitted:!!n.keepIsSubmitted&&o.isSubmitted,dirtyFields:p?{}:n.keepDirtyValues?n.keepDefaultValues&&l?e2(a,l):o.dirtyFields:n.keepDefaultValues&&r?e2(a,r):n.keepDirty?o.dirtyFields:{},touchedFields:n.keepTouched?o.touchedFields:{},errors:n.keepErrors?o.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&o.isSubmitSuccessful,isSubmitting:!1})},V=(t,r)=>C(eF(t)?t(l):t,r);return{control:{register:M,unregister:I,getFieldState:A,handleSubmit:B,setError:k,_executeSchema:_,_getWatch:x,_getDirty:E,_updateValid:y,_removeUnmounted:()=>{for(let t of c.unMount){let r=eh(i,t);r&&(r._f.refs?r._f.refs.every(t=>!eX(t)):!eX(r._f.ref))&&I(t)}c.unMount=new Set},_updateFieldArray:(t,r=[],c,s,h=!0,p=!0)=>{if(s&&c&&!n.disabled){if(u.action=!0,p&&Array.isArray(eh(i,t))){let r=c(eh(i,t),s.argA,s.argB);h&&ev(i,t,r)}if(p&&Array.isArray(eh(o.errors,t))){let r=c(eh(o.errors,t),s.argA,s.argB);h&&ev(o.errors,t,r),tr(o.errors,t)}if(f.touchedFields&&p&&Array.isArray(eh(o.touchedFields,t))){let r=c(eh(o.touchedFields,t),s.argA,s.argB);h&&ev(o.touchedFields,t,r)}f.dirtyFields&&(o.dirtyFields=e2(a,l)),d.state.next({name:t,isDirty:E(t,r),dirtyFields:o.dirtyFields,errors:o.errors,isValid:o.isValid})}else ev(l,t,r)},_updateDisabledField:F,_getFieldArray:r=>ef(eh(u.mount?l:a,r,t.shouldUnregister?eh(a,r,[]):[])),_reset:C,_resetDefaultValues:()=>eF(n.defaultValues)&&n.defaultValues().then(t=>{V(t,n.resetOptions),d.state.next({isLoading:!1})}),_updateFormState:t=>{o={...o,...t}},_disableForm:t=>{ep(t)&&(d.state.next({disabled:t}),eA(i,(r,n)=>{let o=eh(i,n);o&&(r.disabled=o._f.disabled||t,Array.isArray(o._f.refs)&&o._f.refs.forEach(r=>{r.disabled=o._f.disabled||t}))},0,!1))},_subjects:d,_proxyFormState:f,_setErrors:t=>{o.errors=t,d.state.next({errors:o.errors,isValid:!1})},get _fields(){return i},get _formValues(){return l},get _state(){return u},set _state(e){u=e},get _defaultValues(){return a},get _names(){return c},set _names(e){c=e},get _formState(){return o},set _formState(e){o=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:P,register:M,handleSubmit:B,watch:(t,r)=>eF(t)?d.values.subscribe({next:n=>t(x(void 0,r),n)}):x(t,r,!0),setValue:L,getValues:j,reset:V,resetField:(t,r={})=>{eh(i,t)&&(ed(r.defaultValue)?L(t,es(eh(a,t))):(L(t,r.defaultValue),ev(a,t,es(r.defaultValue))),r.keepTouched||eH(o.touchedFields,t),r.keepDirty||(eH(o.dirtyFields,t),o.isDirty=r.defaultValue?E(t,es(eh(a,t))):E()),r.keepError||(eH(o.errors,t),f.isValid&&y()),d.state.next({...o}))},clearErrors:t=>{t&&eO(t).forEach(t=>eH(o.errors,t)),d.state.next({errors:t?o.errors:{}})},unregister:I,setError:k,setFocus:(t,r={})=>{let n=eh(i,t),o=n&&n._f;if(o){let t=o.refs?o.refs[0]:o.ref;t.focus&&(t.focus(),r.shouldSelect&&eF(t.select)&&t.select())}},getFieldState:A}}(t),formState:o});let a=r.current.control;return a._options=t,function(t){let r=l.useRef(t);r.current=t,l.useEffect(()=>{let n=!t.disabled&&r.current.subject&&r.current.subject.subscribe({next:r.current.next});return()=>{n&&n.unsubscribe()}},[t.disabled])}({subject:a._subjects.state,next:t=>{eS(t,a._proxyFormState,a._updateFormState,!0)&&i({...a._formState})}}),l.useEffect(()=>a._disableForm(t.disabled),[a,t.disabled]),l.useEffect(()=>{if(a._proxyFormState.isDirty){let t=a._getDirty();t!==o.isDirty&&a._subjects.state.next({isDirty:t})}},[a,o.isDirty]),l.useEffect(()=>{t.values&&!eJ(t.values,n.current)?(a._reset(t.values,a._options.resetOptions),n.current=t.values,i(t=>({...t}))):a._resetDefaultValues()},[t.values,a]),l.useEffect(()=>{t.errors&&a._setErrors(t.errors)},[t.errors,a]),l.useEffect(()=>
1{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),l.useEffect(()=>{t.shouldUnregister&&a._subjects.values.next({values:a._getWatch()})},[t.shouldUnregister,a]),r.current.formState=eE(o,a),r.current}function ti(t){var r=t.show,n=t.size;if(!r)return null;var o,i="large"===(o=void 0===n?"small":n)?"Spinner-module__large__aac0f1f1aaac9ff5bd54":"medium"===o?"Spinner-module__medium__be13d8232863d1776cc2":"Spinner-module__small__f60259b544be5ceb1a45";return u().createElement("div",{className:"Spinner-module__overlay__b8388044fc5740ab77b2"},u().createElement("div",{className:"".concat("Spinner-module__spinner__b723ae11d1eee8f9c872"," ").concat(i)}))}ti.propTypes={show:s().bool.isRequired,size:s().string.isRequired};var ta="OTP sent successfully",tl="< BACK ";function tu(t){return(tu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tc(){tc=function(){return r};var t,r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,n){t[r]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,r,n){return Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,n){return t[r]=n}}function f(r,n,o,a){var l,u,c=Object.create((n&&n.prototype instanceof v?n:v).prototype);return i(c,"_invoke",{value:(l=new N(a||[]),u=h,function(n,i){if(u===p)throw Error("Generator is already running");if(u===m){if("throw"===n)throw i;return{value:t,done:!0}}for(l.method=n,l.arg=i;;){var a=l.delegate;if(a){var c=function r(n,o){var i=o.method,a=n.iterator[i];if(a===t)return o.delegate=null,"throw"===i&&n.iterator.return&&(o.method="return",o.arg=t,r(n,o),"throw"===o.method)||"return"!==i&&(o.method="throw",o.arg=TypeError("The iterator does not provide a '"+i+"' method")),y;var l=d(a,n.iterator,o.arg);if("throw"===l.type)return o.method="throw",o.arg=l.arg,o.delegate=null,y;var u=l.arg;return u?u.done?(o[n.resultName]=u.value,o.next=n.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,y):u:(o.method="throw",o.arg=TypeError("iterator result is not an object"),o.delegate=null,y)}(a,l);if(c){if(c===y)continue;return c}}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(u===h)throw u=m,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);u=p;var s=d(r,o,l);if("normal"===s.type){if(u=l.done?m:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:l.done}}"throw"===s.type&&(u=m,l.method="throw",l.arg=s.arg)}})}),c}function d(t,r,n){try{return{type:"normal",arg:t.call(r,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=f;var h="suspendedStart",p="executing",m="completed",y={};function v(){}function g(){}function b(){}var _={};s(_,l,function(){return this});var w=Object.getPrototypeOf,E=w&&w(w(P([])));E&&E!==n&&o.call(E,l)&&(_=E);var x=b.prototype=v.prototype=Object.create(_);function S(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function O(t,r){var n;i(this,"_invoke",{value:function(i,a){function l(){return new r(function(n,l){(function n(i,a,l,u){var c=d(t[i],t,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==tu(f)&&o.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,l,u)},function(t){n("throw",t,l,u)}):r.resolve(f).then(function(t){s.value=t,l(s)},function(t){return n("throw",t,l,u)})}u(c.arg)})(i,a,n,l)})}return n=n?n.then(l,l):l()}})}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function P(r){if(r||""===r){var n=r[l];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function n(){for(;++i<r.length;)if(o.call(r,i))return n.value=r[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw TypeError(tu(r)+" is not iterable")}return g.prototype=b,i(x,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},S(O.prototype),s(O.prototype,u,function(){return this}),r.AsyncIterator=O,r.async=function(t,n,o,i,a){void 0===a&&(a=Promise);var l=new O(f(t,n,o,i),a);return r.isGeneratorFunction(n)?l:l.next().then(function(t){return t.done?t.value:l.next()})},S(x),s(x,c,"Generator"),s(x,l,function(){return this}),s(x,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),n=[];for(var o in r)n.push(o);return n.reverse(),function t(){for(;n.length;){var o=n.pop();if(o in r)return t.value=o,t.done=!1,t}return t.done=!0,t}},r.values=P,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEac
1h(T),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function i(o,i){return u.type="throw",u.arg=r,n.next=o,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a],u=l.completion;if("root"===l.tryLoc)return i("end");if(l.tryLoc<=this.prev){var c=o.call(l,"catchLoc"),s=o.call(l,"finallyLoc");if(c&&s){if(this.prev<l.catchLoc)return i(l.catchLoc,!0);if(this.prev<l.finallyLoc)return i(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return i(l.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return i(l.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var l=a?a.completion:{};return l.type=t,l.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(l)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(r,n,o){return this.delegate={iterator:P(r),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function ts(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,o)}return n}function tf(t,r,n,o,i,a,l){try{var u=t[a](l),c=u.value}catch(t){return void n(t)}u.done?r(c):Promise.resolve(c).then(o,i)}var td=(t=tc().mark(function t(r){var n,o,i,a,l,u=arguments;return tc().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:{},o=u.length>2&&void 0!==u[2]?u[2]:function(){},t.prev=2,t.next=5,fetch(r,function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ts(Object(n),!0).forEach(function(r){(function(t,r,n){var o;(o=function(t){if("object"!=tu(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=tu(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r),(r="symbol"==tu(o)?o:o+"")in t)?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n})(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ts(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}({credentials:"include",headers:{"Content-Type":"application/json"}},n));case 5:return i=t.sent,t.next=8,i.json();case 8:if(a=t.sent,i.ok){t.next=11;break}throw Error((null==a?void 0:a.message)||(null==a||null===(l=a.error)||void 0===l?void 0:l.message)||"An error occurred while fetching data.");case 11:return t.abrupt("return",a);case 14:return t.prev=14,t.t0=t.catch(2),o(t.t0),t.abrupt("return",t.t0);case 18:case"end":return t.stop()}},t,null,[[2,14]])}),r=function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function l(t){tf(a,o,i,l,u,"next",t)}function u(t){tf(a,o,i,l,u,"throw",t)}l(void 0)})},function(t){return r.apply(this,arguments)});function th(t){var r=t.split(".");return r.length<=2?r[0]:r[r.length-2]}function tp(){}let tm=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=new Headers;return n.append("Content-Type","application/json"),n.append("organization",t),n.append("device-type","4"),n.append("version-code","24"),n.append("platform","web"),r&&n.append("Authorization","Bearer ".concat(r)),n};var ty=function(t,r,n){var o="";if(n){var i=new Date;i.setTime(i.getTime()+24*n*36e5),o="; expires=".concat(i.toUTCString())}document.cookie="".concat(t,"=").concat(r||"").concat(o,"; path=/")}
1;function tv(t){for(var r=t+"=",n=decodeURIComponent(document.cookie).split(";"),o=0;o<n.length;o++){for(var i=n[o];" "==i.charAt(0);)i=i.substring(1);if(0==i.indexOf(r))return i.substring(r.length,i.length)}return""}function tg(t){return(tg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tb(){tb=function(){return r};var t,r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,n){t[r]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,r,n){return Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,n){return t[r]=n}}function f(r,n,o,a){var l,u,c=Object.create((n&&n.prototype instanceof v?n:v).prototype);return i(c,"_invoke",{value:(l=new N(a||[]),u=h,function(n,i){if(u===p)throw Error("Generator is already running");if(u===m){if("throw"===n)throw i;return{value:t,done:!0}}for(l.method=n,l.arg=i;;){var a=l.delegate;if(a){var c=function r(n,o){var i=o.method,a=n.iterator[i];if(a===t)return o.delegate=null,"throw"===i&&n.iterator.return&&(o.method="return",o.arg=t,r(n,o),"throw"===o.method)||"return"!==i&&(o.method="throw",o.arg=TypeError("The iterator does not provide a '"+i+"' method")),y;var l=d(a,n.iterator,o.arg);if("throw"===l.type)return o.method="throw",o.arg=l.arg,o.delegate=null,y;var u=l.arg;return u?u.done?(o[n.resultName]=u.value,o.next=n.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,y):u:(o.method="throw",o.arg=TypeError("iterator result is not an object"),o.delegate=null,y)}(a,l);if(c){if(c===y)continue;return c}}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(u===h)throw u=m,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);u=p;var s=d(r,o,l);if("normal"===s.type){if(u=l.done?m:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:l.done}}"throw"===s.type&&(u=m,l.method="throw",l.arg=s.arg)}})}),c}function d(t,r,n){try{return{type:"normal",arg:t.call(r,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=f;var h="suspendedStart",p="executing",m="completed",y={};function v(){}function g(){}function b(){}var _={};s(_,l,function(){return this});var w=Object.getPrototypeOf,E=w&&w(w(P([])));E&&E!==n&&o.call(E,l)&&(_=E);var x=b.prototype=v.prototype=Object.create(_);function S(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function O(t,r){var n;i(this,"_invoke",{value:function(i,a){function l(){return new r(function(n,l){(function n(i,a,l,u){var c=d(t[i],t,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==tg(f)&&o.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,l,u)},function(t){n("throw",t,l,u)}):r.resolve(f).then(function(t){s.value=t,l(s)},function(t){return n("throw",t,l,u)})}u(c.arg)})(i,a,n,l)})}return n=n?n.then(l,l):l()}})}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function P(r){if(r||""===r){var n=r[l];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function n(){for(;++i<r.length;)if(o.call(r,i))return n.value=r[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw TypeError(tg(r)+" is not iterable")}return g.prototype=b,i(x,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},S(O.prototype),s(O.prototype,u,function(){return this}),r.AsyncIterator=O,r.async=function(t,n,o,i,a){void 0===a&&(a=Promise);var l=new O(f(t,n,o,i),a);return r.isGeneratorFunction(n)?l:l.next().then(function(t){return t.done?t.value:l.next()})},S(x),s(x,c,"Generator"),s(x,l,function(){return this}),s(x,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),n=[];for(var o in r)n.push(o);return n.reverse(),function t(){for(;n.length;){var o=n.pop();if(o in r)return t.value=o,t.done=!1,t}return t.done=!0,t}},r.values=P,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEac
1h(T),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function i(o,i){return u.type="throw",u.arg=r,n.next=o,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a],u=l.completion;if("root"===l.tryLoc)return i("end");if(l.tryLoc<=this.prev){var c=o.call(l,"catchLoc"),s=o.call(l,"finallyLoc");if(c&&s){if(this.prev<l.catchLoc)return i(l.catchLoc,!0);if(this.prev<l.finallyLoc)return i(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return i(l.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return i(l.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var l=a?a.completion:{};return l.type=t,l.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(l)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(r,n,o){return this.delegate={iterator:P(r),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function t_(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,o)}return n}function tw(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t_(Object(n),!0).forEach(function(r){(function(t,r,n){var o;(o=function(t){if("object"!=tg(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=tg(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r),(r="symbol"==tg(o)?o:o+"")in t)?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n})(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):t_(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function tE(t,r,n,o,i,a,l){try{var u=t[a](l),c=u.value}catch(t){return void n(t)}u.done?r(c):Promise.resolve(c).then(o,i)}let tx=function(t){var r,n,o=t.orgId,i=t.handleCallBack,a=t.googleMsgHandler,l=t.isGoogleVerify,c=void 0!==l&&l,s=(r=tb().mark(function t(r){var n,a;return tb().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=function(t){console.log("err gglg",null==t?void 0:t.message)},a={},!c){t.next=8;break}return t.next=5,td("".concat("https://apicore.madeeasy.in/api/v1","/auth/verify/email/google"),{method:"POST",body:JSON.stringify(tw({},r)),headers:tm(o,tv("userToken")),errorCallback:n});case 5:a=t.sent,t.next=11;break;case 8:return t.next=10,td("".concat("https://apicore.madeeasy.in/api/v1","/auth/login-google"),{method:"POST",body:JSON.stringify(tw({},r)),headers:tm(o),errorCallback:n});case 10:a=t.sent;case 11:console.log("Server response:",a),i(a);case 13:case"end":return t.stop()}},t)}),n=function(){var t=this,n=arguments;return new Promise(function(o,i){var a=r.apply(t,n);function l(t){tE(a,o,i,l,u,"next",t)}function u(t){tE(a,o,i,l,u,"throw",t)}l(void 0)})},function(t){return n.apply(this,arguments)});return u().createElement("div",{style:{display:"flex",justifyContent:"center",width:"100%"}}
1,u().createElement("div",{style:{display:"flex"}},u().createElement(p,{onSuccess:function(t){var r=t.credential;console.log("Google ID Token:",r),s({tokenId:r})},onError:function(){console.log("Login Failed"),a("Something went wrong with google login")},text:"continue_with",shape:"square",theme:"outline",size:"large",width:"100%"})))};function tS(t){return(tS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tO(){tO=function(){return r};var t,r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,n){t[r]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,r,n){return Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,n){return t[r]=n}}function f(r,n,o,a){var l,u,c=Object.create((n&&n.prototype instanceof v?n:v).prototype);return i(c,"_invoke",{value:(l=new N(a||[]),u=h,function(n,i){if(u===p)throw Error("Generator is already running");if(u===m){if("throw"===n)throw i;return{value:t,done:!0}}for(l.method=n,l.arg=i;;){var a=l.delegate;if(a){var c=function r(n,o){var i=o.method,a=n.iterator[i];if(a===t)return o.delegate=null,"throw"===i&&n.iterator.return&&(o.method="return",o.arg=t,r(n,o),"throw"===o.method)||"return"!==i&&(o.method="throw",o.arg=TypeError("The iterator does not provide a '"+i+"' method")),y;var l=d(a,n.iterator,o.arg);if("throw"===l.type)return o.method="throw",o.arg=l.arg,o.delegate=null,y;var u=l.arg;return u?u.done?(o[n.resultName]=u.value,o.next=n.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,y):u:(o.method="throw",o.arg=TypeError("iterator result is not an object"),o.delegate=null,y)}(a,l);if(c){if(c===y)continue;return c}}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(u===h)throw u=m,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);u=p;var s=d(r,o,l);if("normal"===s.type){if(u=l.done?m:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:l.done}}"throw"===s.type&&(u=m,l.method="throw",l.arg=s.arg)}})}),c}function d(t,r,n){try{return{type:"normal",arg:t.call(r,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=f;var h="suspendedStart",p="executing",m="completed",y={};function v(){}function g(){}function b(){}var _={};s(_,l,function(){return this});var w=Object.getPrototypeOf,E=w&&w(w(P([])));E&&E!==n&&o.call(E,l)&&(_=E);var x=b.prototype=v.prototype=Object.create(_);function S(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function O(t,r){var n;i(this,"_invoke",{value:function(i,a){function l(){return new r(function(n,l){(function n(i,a,l,u){var c=d(t[i],t,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==tS(f)&&o.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,l,u)},function(t){n("throw",t,l,u)}):r.resolve(f).then(function(t){s.value=t,l(s)},function(t){return n("throw",t,l,u)})}u(c.arg)})(i,a,n,l)})}return n=n?n.then(l,l):l()}})}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function P(r){if(r||""===r){var n=r[l];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function n(){for(;++i<r.length;)if(o.call(r,i))return n.value=r[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw TypeError(tS(r)+" is not iterable")}return g.prototype=b,i(x,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},S(O.prototype),s(O.prototype,u,function(){return this}),r.AsyncIterator=O,r.async=function(t,n,o,i,a){void 0===a&&(a=Promise);var l=new O(f(t,n,o,i),a);return r.isGeneratorFunction(n)?l:l.next().then(function(t){return t.done?t.value:l.next()})},S(x),s(x,c,"Generator"),s(x,l,function(){return this}),s(x,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),n=[];for(var o in r)n.push(o);return n.reverse(),function t(){for(;n.length;){var o=n.pop();if(o in r)return t.value=o,t.done=!1,t}return t.done=!0,t}},r.values=P,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEac
1h(T),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function i(o,i){return u.type="throw",u.arg=r,n.next=o,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a],u=l.completion;if("root"===l.tryLoc)return i("end");if(l.tryLoc<=this.prev){var c=o.call(l,"catchLoc"),s=o.call(l,"finallyLoc");if(c&&s){if(this.prev<l.catchLoc)return i(l.catchLoc,!0);if(this.prev<l.finallyLoc)return i(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return i(l.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return i(l.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var l=a?a.completion:{};return l.type=t,l.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(l)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(r,n,o){return this.delegate={iterator:P(r),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function tL(t,r,n,o,i,a,l){try{var u=t[a](l),c=u.value}catch(t){return void n(t)}u.done?r(c):Promise.resolve(c).then(o,i)}function tT(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,a,l,u=[],c=!0,s=!1;try{if(a=(n=n.call(t)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=a.call(n)).done)&&(u.push(o.value),u.length!==r);c=!0);}catch(t){s=!0,i=t}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return u}}(t,r)||function(t,r){if(t){if("string"==typeof t)return tN(t,r);var n=({}).toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tN(t,r):void 0}}(t,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tN(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,o=Array(r);n<r;n++)o[n]=t[n];return o}function tP(t){var r,n,o=t.styles,i=t.loading,a=t.handleSubmitForm,c=t.orgType,s=t.error,f=t.orgId,d=t.handleGoogleLoginCallBack,h=t.errorCallbackGoogleLogin,p=o.inputUnderline,m=o.loginText,y=o.inputBox,v=o.formGroup,g=o.labelText,b=o.hiddenText,_=o.btnSubmit,w=o.bgBtnMeniit,E=o.bgBtnMep,x=o.bgBtnNias,S=o.commonHeading,O=o.errBtn,L=o.errMsgs,T=tT((0,l.useState)("phone"),2),N=T[0],P=T[1],j=tT((0,l.useState)(""),2),A=j[0],k=j[1],I=tT((0,l.useState)(O),2),F=I[0],M=I[1],D=tT((0,l.useState)(!0),2),B=D[0],C=D[1],V=to({shouldUnregister:!0}),G=V.register,U=V.handleSubmit,R=V.formState.errors,q=V.trigger;(0,l.useEffect)(function(){localStorage.removeItem("emailSkip"),k("meniit"===c?w:"madeeasyprime"===c?E:x)},[c,s]);var z=(r=tO().mark(function t(r,n){return tO().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n.onChange(r),t.next=3,q(n.name);case 3:t.sent?(M(A),C(!1)):(M(O),C(!0));case 5:case"end":return t.stop()}},t)}),n=function(){var t=this,n=arguments;return new Promise(function(o,i){var a=r.apply(t,n);function l(t){tL(a,o,i,l,u,"next",t)}function u(t){tL(a,o,i,l,u,"throw",t)}l(void 0)})},function(t,r){return n.apply(this,arguments)});return u().createElement(u().Fragment,null,u().createElement("span",{className:m},u().createElement("span",{className:o.textBlueHeader}
1,"Welcome Back :)")),u().createElement("div",{className:S},u().createElement("span",null," LOGIN")),u().createElement("form",{className:v,onSubmit:U(a)},function(){if("email"===N){var t=G("email",{required:"This field is required",pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,message:"Invalid email address"}});return u().createElement("div",{key:"email",className:v},u().createElement("label",{className:g,htmlFor:"email"},"Email",u().createElement("span",{style:{color:"red"}},"*"),u().createElement("input",{id:"email",name:t.name,onChange:function(r){return z(r,t)},onBlur:t.onBlur,ref:t.ref,width:"100%",className:"".concat(R.email?o.errinputBox:y),placeholder:"Enter email address"})),R.email?u().createElement("span",{className:L,style:{color:"red"}}," ",R.email.message):u().createElement("span",{style:{color:"red"}},s||""))}var r=G("phone",{required:"This field is required",pattern:{value:/^(?:\+91|91)?[6789]\d{9}$/,message:"Please enter a valid 10-digit number"}});return u().createElement("div",{key:"phone",className:v},u().createElement("label",{className:g,htmlFor:"phone"},"Mobile Number",u().createElement("span",{style:{color:"red"}},"*"),u().createElement("input",{id:"phone",name:r.name,onChange:function(t){return z(t,r)},onBlur:r.onBlur,ref:r.ref,type:"tel",width:"100%",maxLength:"10",className:"".concat(R.phone?o.errinputBox:y),placeholder:"Enter mobile number(10 digits)"})),R.phone?u().createElement("span",{className:L,style:{color:"red"}}," ",R.phone.message):u().createElement("span",{style:{color:"red"}},s||""))}(),u().createElement("button",{className:"".concat(_," ").concat(i?o.loading:""," ").concat(F),type:"submit",disabled:i||B},i&&u().createElement(ti,{show:i}),u().createElement("span",{className:"".concat(i?b:"")},"CONTINUE"))),"email"===N&&u().createElement(tx,{orgId:f,handleCallBack:function(t){d(t)},googleMsgHandler:function(t){h(t)}}),u().createElement("br",null),u().createElement("button",{type:"button",onClick:function(){P(function(t){return"email"===t?"phone":"email"})},className:p},"Login with ".concat("email"===N?"mobile number >":"email >")))}function tj(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,a,l,u=[],c=!0,s=!1;try{if(a=(n=n.call(t)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=a.call(n)).done)&&(u.push(o.value),u.length!==r);c=!0);}catch(t){s=!0,i=t}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return u}}(t,r)||function(t,r){if(t){if("string"==typeof t)return tA(t,r);var n=({}).toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tA(t,r):void 0}}(t,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tA(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,o=Array(r);n<r;n++)o[n]=t[n];return o}function tk(t){return(tk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tI(){tI=function(){return r};var t,r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,n){t[r]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,r,n){return Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,n){return t[r]=n}}function f(r,n,o,a){var l,u,c=Object.create((n&&n.prototype instanceof v?n:v).prototype);return i(c,"_invoke",{value:(l=new N(a||[]),u=h,function(n,i){if(u===p)throw Error("Generator is already running");if(u===m){if("throw"===n)throw i;return{value:t,done:!0}}for(l.method=n,l.arg=i;;){var a=l.delegate;if(a){var c=function r(n,o){var i=o.method,a=n.iterator[i];if(a===t)return o.delegate=null,"throw"===i&&n.iterator.return&&
vendor: 4,167 bytes, line 1
1(o.method="return",o.arg=t,r(n,o),"throw"===o.method)||"return"!==i&&(o.method="throw",o.arg=TypeError("The iterator does not provide a '"+i+"' method")),y;var l=d(a,n.iterator,o.arg);if("throw"===l.type)return o.method="throw",o.arg=l.arg,o.delegate=null,y;var u=l.arg;return u?u.done?(o[n.resultName]=u.value,o.next=n.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,y):u:(o.method="throw",o.arg=TypeError("iterator result is not an object"),o.delegate=null,y)}(a,l);if(c){if(c===y)continue;return c}}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(u===h)throw u=m,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);u=p;var s=d(r,o,l);if("normal"===s.type){if(u=l.done?m:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:l.done}}"throw"===s.type&&(u=m,l.method="throw",l.arg=s.arg)}})}),c}function d(t,r,n){try{return{type:"normal",arg:t.call(r,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=f;var h="suspendedStart",p="executing",m="completed",y={};function v(){}function g(){}function b(){}var _={};s(_,l,function(){return this});var w=Object.getPrototypeOf,E=w&&w(w(P([])));E&&E!==n&&o.call(E,l)&&(_=E);var x=b.prototype=v.prototype=Object.create(_);function S(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function O(t,r){var n;i(this,"_invoke",{value:function(i,a){function l(){return new r(function(n,l){(function n(i,a,l,u){var c=d(t[i],t,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==tk(f)&&o.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,l,u)},function(t){n("throw",t,l,u)}):r.resolve(f).then(function(t){s.value=t,l(s)},function(t){return n("throw",t,l,u)})}u(c.arg)})(i,a,n,l)})}return n=n?n.then(l,l):l()}})}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function P(r){if(r||""===r){var n=r[l];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function n(){for(;++i<r.length;)if(o.call(r,i))return n.value=r[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw TypeError(tk(r)+" is not iterable")}return g.prototype=b,i(x,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},S(O.prototype),s(O.prototype,u,function(){return this}),r.AsyncIterator=O,r.async=function(t,n,o,i,a){void 0===a&&(a=Promise);var l=new O(f(t,n,o,i),a);return r.isGeneratorFunction(n)?l:l.next().then(function(t){return t.done?t.value:l.next()})},S(x),s(x,c,"Generator"),s(x,l,function(){return this}),s(x,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),n=[];for(var o in r)n.push(o);return n.reverse(),function t(){for(;n.length;){var o=n.pop();if(o in r)return t.value=o,t.done=!1,t}return t.done=!0,t}},r.values=P,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function i(o,i){return u.type="throw",u.arg=r,n.next=o,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a],u=l.completion;if("root"===l.tryLoc)return i("end");if(l.tryLoc<=this.prev){var c=o.call(l,"catchLoc"),s=o.call(l,"finallyLoc");
1if(c&&s){if(this.prev<l.catchLoc)return i(l.catchLoc,!0);if(this.prev<l.finallyLoc)return i(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return i(l.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return i(l.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var l=a?a.completion:{};return l.type=t,l.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(l)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(r,n,o){return this.delegate={iterator:P(r),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function tF(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,o)}return n}function tM(t,r,n,o,i,a,l){try{var u=t[a](l),c=u.value}catch(t){return void n(t)}u.done?r(c):Promise.resolve(c).then(o,i)}function tD(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function l(t){tM(a,o,i,l,u,"next",t)}function u(t){tM(a,o,i,l,u,"throw",t)}l(void 0)})}}function tB(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,a,l,u=[],c=!0,s=!1;try{if(a=(n=n.call(t)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=a.call(n)).done)&&(u.push(o.value),u.length!==r);c=!0);}catch(t){s=!0,i=t}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return u}}(t,r)||function(t,r){if(t){if("string"==typeof t)return tC(t,r);var n=({}).toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tC(t,r):void 0}}(t,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tC(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,o=Array(r);n<r;n++)o[n]=t[n];return o}tP.propTypes={styles:s().object.isRequired,loading:s().bool.isRequired,handleSubmitForm:s().func.isRequired,orgType:s().string.isRequired,error:s().string.isRequired};var tV=(0,l.memo)(function(t){var r=t.styles,n=t.otpPayload,o=t.orgId,i=t.setOtpStatus,a=t.authType,c=t.setOtp,s=t.setValue,f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:60,r=tj((0,l.useState)(t),2),n=r[0],o=r[1],i=tj((0,l.useState)(!1),2),a=i[0],u=i[1];return(0,l.useEffect)(function(){var t;return n>0?t=setTimeout(function(){return o(n-1)},1e3):u(!0),function(){t&&clearTimeout(t)}},[n]),{minutes:Math.floor(n/60),remainingSeconds:n%60,timeEnd:a,resetTimer:function(){o(t),u(!1)}}}(),d=f.minutes,h=f.remainingSeconds,p=f.timeEnd,m=f.resetTimer,y=r.otpTimerText,v=r.resendOtp,g=r.resendOtpInActive,b=(r.textBlue,r.errMsgs,tB((0,l.useState)(!1),2)),_=b[0],w=b[1],E=(0,l.useCallback)(tD(tI().mark(function t(){var r,l,u;return tI().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i(""),l=tm((r={organization:o,phone:n.phone,email:n.email,authType:a||"LOGIN",test:"auth"}).organization),w(!0),t.next=6,td("".concat("https://apicore.madeeasy.in/api/v1","/auth/verification/send-otp"),{method:"POST",body:JSON.stringify(function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};
1r%2?tF(Object(n),!0).forEach(function(r){(function(t,r,n){var o;(o=function(t){if("object"!=tk(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=tk(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r),(r="symbol"==tk(o)?o:o+"")in t)?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n})(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tF(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}({},r)),headers:l},function(t){console.log("handle err ",t)});case 6:null!=(u=t.sent)&&u.success?(window.screen.width<1023&&tU(c,s),w(!1),m(),i(ta)):w(!1);case 8:case"end":return t.stop()}},t)})),[w,i,m]);return u().createElement("div",null,p?u().createElement("button",{type:"button",disabled:!p,className:p&&!_?v:g,onClick:E},"Resend OTP ",u().createElement(ti,{show:_})):u().createElement("span",null,u().createElement("span",{className:y},"OTP will expire in:")," ",u().createElement("div",{className:r.textBlueTimer},d>0?parseInt(d,10).toString().padStart(2,"0"):"00",":",h<10?"0".concat(h):h)))});tV.propTypes={styles:s().object.isRequired,otpPayload:s().object.isRequired,orgId:s().object.isRequired,setOtpStatus:s().func.isRequired,setOtp:s().func.isRequired};var tG=(0,l.memo)(function(t){var r,n=t.loading,o=t.styles,i=t.setLoading,a=t.handleLoginWithOTP,c=t.handleResendOtp,s=t.otpPayload,f=t.orgType,d=t.orgId,h=t.error,p=t.suceessMsg,m=t.handleBackButton,y=t.authType,v=t.closeModal,g=o.btnSubmit,b=o.inputBox,_=o.formGroup,w=o.labelText,E=o.hiddenText,x=o.otpTimer,S=o.centerByMargin,O=o.bgBtnMeniit,L=o.bgBtnMep,T=o.bgBtnNias,N=o.loginText,P=o.otpVerificationText,j=(o.textBlue,o.otpFooter),A=o.cursorPointer,k=o.errMsgs,I=to(),F=I.register,M=I.handleSubmit,D=I.setValue,B=I.formState.errors,C=tB((0,l.useState)(T),2),V=C[0],G=C[1],U=F("otp",{required:"This field is required"}),R=tB((0,l.useState)(""),2),q=R[0],z=R[1],W=tB((0,l.useState)(""),2),Y=W[0],H=W[1],$=tB((0,l.useState)(h),2),Z=$[0],J=$[1],K=tB((0,l.useState)(!1),2),Q=K[0],X=K[1];return(0,l.useEffect)(function(){window.screen.width<1023&&(tU(z,D),X(!0))},[]),(0,l.useEffect)(function(){G("meniit"===f?O:"madeeasyprime"===f?L:T),J(h)},[f,h,p]),(0,l.useEffect)(function(){var t;console.log("otp fill"),(q&&4===q.length||Q)&&(console.log("otp fill if"),null===(t=document.getElementById("otp-form-submit"))||void 0===t||t.click())},[q,Q]),u().createElement(u().Fragment,null,u().createElement("div",{className:N},"Verification OTP sent to"," ",u().createElement("div",{className:o.textBlueHeader,style:{paddingBottom:"0px",display:"inline"}},s.phone?s.phone:s.email)),u().createElement("div",{className:P},u().createElement("h4",null," ","OTP VERIFICATION"," ")),u().createElement("form",{className:_,onSubmit:M(function(t){J(""),i(!0),a(t,function(t){H(t)})})},u().createElement("div",{className:_},u().createElement("label",{className:w,htmlFor:"otp"},"Enter your verification code",u().createElement("span",{style:{color:"red"}},"*"),u().createElement("input",{id:"otp",name:U.name,onChange:function(t){U.onChange(t),z(t.target.value.replace(/\D/g,"")),H(""),J("")},onBlur:U.onBlur,ref:U.ref,type:"text",value:q,maxLength:"4",autoComplete:"one-time-code",className:"".concat(!Y===ta&&B.otp||Z?o.errinputBox:b),placeholder:"Enter one time password",inputMode:"numeric",onKeyDown:function(t){["e","E","+","-",".",","].includes(t.key)&&t.preventDefault()}})),u().createElement("span",{className:"err1 ".concat(k),style:{color:"red"}},!Y&&Z||""),!Y&&"The email provided is already registered with us. Kindly use any other email"===Z&&u().createElement("div",{onClick:function(){localStorage.setItem("emailSkip",!0),v()},style:{cursor:"pointer",width:"100%",textAlign:"right"}},u().createElement("p",null,"skip for now >>")),u().createElement("span",{className:"err2 ".concat(k)},((null==B?void 0:B.otp)||Y)&&u().createElement("span",{style:{color:Y===ta?"green":"red"}},(null==B||null===(r=B.otp)||void 0===r?void 0:r.message)||Y))),u().createElement("button",{type:"submit",id:"otp-form-submit",className:"".concat(g," ").concat(q.length<4?o.errBtn:V),disabled:!(4==q.length&&!n)},n&&u().createElement(ti,{show:n})," ",u().createElement("span",{className:"".concat(n?E:"")},"VERIFY")),u().createElement("div",{className:j},u().createElement("div",{onClick:function(){m("loginSignup")},className:A},tl),u().createElement("div",{className:x},u().createElement(tV,{styles:o,otpPayload:s,orgId:d,setOtpStatus:H,handleResendOtp:c,authType:y,setOtp:z,setValue:D}))),u().createElement("span",{className:S,style:{color:"green"}},p||"")))});function tU(t,r){var n=new AbortController;function o(){return(o=tD(tI().mark(function o(){return tI().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!("OTPCredential"in window)){o.next=17;break}if(console.log("OTPCredential auto read otp function testing "),o.prev=2,!navigator.credentials){o.next=12;break}return o.prev=4,o.next=7,navigator.credentials.get({abort:n,otp:{transport:["sms"]}}).then(function(n){console.log("content in navigation ",n),n&&n.code&&(r("otp",n.code,{shouldValidate:!0}),t(n.code))}).catch(function(t){return console.error("OTP Read Error:",t)});case 7:o.next=12;break;case 9:return o.prev=9,o.t0=o.catch(4),o.abrupt("return");case 12:o.next=17;break;case 14:o.prev=14,o.t1=o.catch(2),console.log(o.t1);case 17:case"end":return o.stop()}},o,null,[[2,14],[4,9]])}
1))).apply(this,arguments)}setTimeout(function(){n.abort(),console.log("signal ",n)},6e4),function(){o.apply(this,arguments)}()}function tR(t){return(tR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tq(){return(tq=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(null,arguments)}function tz(){tz=function(){return r};var t,r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,n){t[r]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,r,n){return Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,n){return t[r]=n}}function f(r,n,o,a){var l,u,c=Object.create((n&&n.prototype instanceof v?n:v).prototype);return i(c,"_invoke",{value:(l=new N(a||[]),u=h,function(n,i){if(u===p)throw Error("Generator is already running");if(u===m){if("throw"===n)throw i;return{value:t,done:!0}}for(l.method=n,l.arg=i;;){var a=l.delegate;if(a){var c=function r(n,o){var i=o.method,a=n.iterator[i];if(a===t)return o.delegate=null,"throw"===i&&n.iterator.return&&(o.method="return",o.arg=t,r(n,o),"throw"===o.method)||"return"!==i&&(o.method="throw",o.arg=TypeError("The iterator does not provide a '"+i+"' method")),y;var l=d(a,n.iterator,o.arg);if("throw"===l.type)return o.method="throw",o.arg=l.arg,o.delegate=null,y;var u=l.arg;return u?u.done?(o[n.resultName]=u.value,o.next=n.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,y):u:(o.method="throw",o.arg=TypeError("iterator result is not an object"),o.delegate=null,y)}(a,l);if(c){if(c===y)continue;return c}}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(u===h)throw u=m,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);u=p;var s=d(r,o,l);if("normal"===s.type){if(u=l.done?m:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:l.done}}"throw"===s.type&&(u=m,l.method="throw",l.arg=s.arg)}})}),c}function d(t,r,n){try{return{type:"normal",arg:t.call(r,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=f;var h="suspendedStart",p="executing",m="completed",y={};function v(){}function g(){}function b(){}var _={};s(_,l,function(){return this});var w=Object.getPrototypeOf,E=w&&w(w(P([])));E&&E!==n&&o.call(E,l)&&(_=E);var x=b.prototype=v.prototype=Object.create(_);function S(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function O(t,r){var n;i(this,"_invoke",{value:function(i,a){function l(){return new r(function(n,l){(function n(i,a,l,u){var c=d(t[i],t,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==tR(f)&&o.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,l,u)},function(t){n("throw",t,l,u)}):r.resolve(f).then(function(t){s.value=t,l(s)},function(t){return n("throw",t,l,u)})}u(c.arg)})(i,a,n,l)})}return n=n?n.then(l,l):l()}})}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function P(r){if(r||""===r){var n=r[l];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function n(){for(;++i<r.length;)if(o.call(r,i))return n.value=r[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw TypeError(tR(r)+" is not iterable")}return g.prototype=b,i(x,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},S(O.prototype),s(O.prototype,u,function(){return this}),r.AsyncIterator=O,r.async=function(t,n,o,i,a){void 0===a&&(a=Promise);var l=new O(f(t,n,o,i),a);return r.isGeneratorFunction(n)?l:l.next().then(function(t){return t.done?t.value:l.next()})},S(x),s(x,c,"Generator"),s(x,l,function(){return this}),s(x,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),n=[];for(var o in r)n.push(o);return n.reverse(),function t(){for(;n.length;){var o=n.pop();if(o in r)return t.value=o,t.done=!1,t}return t.done=!0,t}},r.values=P,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEac
1h(T),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function i(o,i){return u.type="throw",u.arg=r,n.next=o,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a],u=l.completion;if("root"===l.tryLoc)return i("end");if(l.tryLoc<=this.prev){var c=o.call(l,"catchLoc"),s=o.call(l,"finallyLoc");if(c&&s){if(this.prev<l.catchLoc)return i(l.catchLoc,!0);if(this.prev<l.finallyLoc)return i(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return i(l.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return i(l.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var l=a?a.completion:{};return l.type=t,l.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(l)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(r,n,o){return this.delegate={iterator:P(r),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function tW(t,r,n,o,i,a,l){try{var u=t[a](l),c=u.value}catch(t){return void n(t)}u.done?r(c):Promise.resolve(c).then(o,i)}function tY(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,o=Array(r);n<r;n++)o[n]=t[n];return o}tG.propTypes={loading:s().bool.isRequired,styles:s().object.isRequired,handleLoginWithOTP:s().func.isRequired,setLoading:s().func.isRequired,handleResendOtp:s().func.isRequired,otpPayload:s().shape({organization:s().string,phone:s().string,email:s().string}).isRequired,orgType:s().string.isRequired,orgId:s().string.isRequired,error:s().string.isRequired,suceessMsg:s().string.isRequired,handleBackButton:s().func.isRequired,closeModal:s().func.isRequired};let tH=function(t){var r,n,o=t.styles,i=t.register,a=t.errors,c=(t.orgName,t.orgId),s=t.mandaToryFields,f=t.pageType,d=o.formGroup,h=o.labelText,p=o.inputFieldGroup,m=(o.inputBox,o.customSelect),y=o.customArrow,v=function(t){if(Array.isArray(t))return t}(n=(0,l.useState)([]))||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,a,l,u=[],c=!0,s=!1;try{for(a=(n=n.call(t)).next;!(c=(o=a.call(n)).done)&&(u.push(o.value),2!==u.length);c=!0);}catch(t){s=!0,i=t}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return u}}(n,0)||function(t,r){if(t){if("string"==typeof t)return tY(t,2);var n=({}).toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tY(t,2):void 0}}(n,0)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),g=v[0],b=v[1];return(0,l.useEffect)(function(){var t,r;(t=tz().mark(function t(){var r;return tz().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,r=tm(c),t.next=4,td("".concat("https://apicore.madeeasy.in/api/v1","/auth/meta"),{method:"GET",headers:r},function(t){console.error("Handle auth/registration error",t)});case 4:b(t.sent.data[c].streams),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.error("Error fetching data:",t.t0);case 12:case"end":return t.stop()}},t,null,[[0,9]])}),r=function(){var r=this,n=arguments;
1return new Promise(function(o,i){var a=t.apply(r,n);function l(t){tW(a,o,i,l,u,"next",t)}function u(t){tW(a,o,i,l,u,"throw",t)}l(void 0)})},function(){return r.apply(this,arguments)})()},[]),u().createElement(u().Fragment,null,("profileComplete"!=f||(null==s||null===(r=s.missingFields)||void 0===r?void 0:r.includes("stream_id")))&&u().createElement("div",{className:d},u().createElement("label",{className:h,htmlFor:"stream_id"},"Stream",u().createElement("span",{style:{color:"red"}},"*")),u().createElement("span",{className:p},u().createElement("select",tq({},i("stream_id",{required:"Stream is required"}),{id:"stream_id",className:"".concat(a.stream_id?o.errcustomSelect:m)}),u().createElement("option",{value:""},"Select Stream "),g&&g.map(function(t){return u().createElement("option",{key:t.id,value:t.id},t.name)})),u().createElement("div",{className:"".concat(a.stream_id?o.errcustomArrow:y)}),a.stream_id&&u().createElement("span",{className:o.errMsgs,style:{color:"red"}},a.stream_id.message))))};function t$(t){return(t$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tZ(){return(tZ=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(null,arguments)}function tJ(){tJ=function(){return r};var t,r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,n){t[r]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,r,n){return Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,n){return t[r]=n}}function f(r,n,o,a){var l,u,c=Object.create((n&&n.prototype instanceof v?n:v).prototype);return i(c,"_invoke",{value:(l=new N(a||[]),u=h,function(n,i){if(u===p)throw Error("Generator is already running");if(u===m){if("throw"===n)throw i;return{value:t,done:!0}}for(l.method=n,l.arg=i;;){var a=l.delegate;if(a){var c=function r(n,o){var i=o.method,a=n.iterator[i];if(a===t)return o.delegate=null,"throw"===i&&n.iterator.return&&(o.method="return",o.arg=t,r(n,o),"throw"===o.method)||"return"!==i&&(o.method="throw",o.arg=TypeError("The iterator does not provide a '"+i+"' method")),y;var l=d(a,n.iterator,o.arg);if("throw"===l.type)return o.method="throw",o.arg=l.arg,o.delegate=null,y;var u=l.arg;return u?u.done?(o[n.resultName]=u.value,o.next=n.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,y):u:(o.method="throw",o.arg=TypeError("iterator result is not an object"),o.delegate=null,y)}(a,l);if(c){if(c===y)continue;return c}}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(u===h)throw u=m,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);u=p;var s=d(r,o,l);if("normal"===s.type){if(u=l.done?m:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:l.done}}"throw"===s.type&&(u=m,l.method="throw",l.arg=s.arg)}})}),c}function d(t,r,n){try{return{type:"normal",arg:t.call(r,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=f;var h="suspendedStart",p="executing",m="completed",y={};function v(){}function g(){}function b(){}var _={};s(_,l,function(){return this});var w=Object.getPrototypeOf,E=w&&w(w(P([])));E&&E!==n&&o.call(E,l)&&(_=E);var x=b.prototype=v.prototype=Object.create(_);function S(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function O(t,r){var n;i(this,"_invoke",{value:function(i,a){function l(){return new r(function(n,l){(function n(i,a,l,u){var c=d(t[i],t,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==t$(f)&&o.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,l,u)},function(t){n("throw",t,l,u)}):r.resolve(f).then(function(t){s.value=t,l(s)},function(t){return n("throw",t,l,u)})}u(c.arg)})(i,a,n,l)})}return n=n?n.then(l,l):l()}})}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function P(r){if(r||""===r){var n=r[l];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function n(){for(;++i<r.length;)if(o.call(r,i))return n.value=r[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw TypeError(t$(r)+" is not iterable")}return g.prototype=b,i(x,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},S(O.prototype),s(O.prototype,u,function(){return this}),r.AsyncIterator=O,r.async=function(t,n,o,i,a){void 0===a&&(a=Promise);var l=new O(f(t,n,o,i),a);return r.isGeneratorFunction(n)?l:l.next().then(function(t){return t.done?t.value:l.next()})},S(x),s(x,c,"Generator"),s(x,l,function(){return this}),s(x,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),n=[];for(var o in r)n.push(o);return n.reverse(),function t(){for(;n.length;){var o=n.pop();if(o in r)return t.value=o,t.done=!1,t}return t.done=!0,t}},r.values=P,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEac
1h(T),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function i(o,i){return u.type="throw",u.arg=r,n.next=o,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a],u=l.completion;if("root"===l.tryLoc)return i("end");if(l.tryLoc<=this.prev){var c=o.call(l,"catchLoc"),s=o.call(l,"finallyLoc");if(c&&s){if(this.prev<l.catchLoc)return i(l.catchLoc,!0);if(this.prev<l.finallyLoc)return i(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return i(l.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return i(l.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var l=a?a.completion:{};return l.type=t,l.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(l)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(r,n,o){return this.delegate={iterator:P(r),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function tK(t,r,n,o,i,a,l){try{var u=t[a](l),c=u.value}catch(t){return void n(t)}u.done?r(c):Promise.resolve(c).then(o,i)}function tQ(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,a,l,u=[],c=!0,s=!1;try{if(a=(n=n.call(t)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=a.call(n)).done)&&(u.push(o.value),u.length!==r);c=!0);}catch(t){s=!0,i=t}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return u}}(t,r)||function(t,r){if(t){if("string"==typeof t)return tX(t,r);var n=({}).toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tX(t,r):void 0}}(t,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tX(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,o=Array(r);n<r;n++)o[n]=t[n];return o}let t0=function(t){var r=t.styles,n=t.register,o=t.errors,i=t.clearErrors,a=(t.orgName,t.orgId),c=t.mandaToryFields,s=t.pageType,f=r.formGroup,d=r.labelText,h=r.inputFieldGroup,p=(r.inputBox,r.customSelect),m=r.customArrow,y=tQ((0,l.useState)([]),2),v=y[0],g=y[1],b=tQ((0,l.useState)([]),2),_=b[0],w=b[1],E=function(t){var r;return"profileComplete"!=s||(null==c||null===(r=c.missingFields)||void 0===r?void 0:r.includes(t))};return(0,l.useEffect)(function(){var t,r;(t=tJ().mark(function t(){var r;return tJ().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,r=tm(a),t.next=4,td("".concat("https://apicore.madeeasy.in/api/v1","/auth/meta"),{method:"GET",headers:r},function(t){console.error("Handle auth/registration error",t)});case 4:g(t.sent.data[a].streams),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.error("Error fetching data:",t.t0);case 12:case"end":return t.stop()}},t,null,[[0,9]])}),r=function(){var r=this,n=arguments;
1return new Promise(function(o,i){var a=t.apply(r,n);function l(t){tK(a,o,i,l,u,"next",t)}function u(t){tK(a,o,i,l,u,"throw",t)}l(void 0)})},function(){return r.apply(this,arguments)})()},[]),u().createElement(u().Fragment,null,(E("stream_id")||E("exam_id"))&&u().createElement("div",{className:f},u().createElement("label",{className:d,htmlFor:"stream_id"},"Stream",u().createElement("span",{style:{color:"red"}},"*")),u().createElement("span",{className:h},u().createElement("select",tZ({},n("stream_id",{required:"Stream is required"}),{id:"stream_id",className:"".concat(o.stream_id?r.errcustomSelect:p),onChange:function(t){if(i("stream_id"),t.target.value){var r=null==v?void 0:v.filter(function(r){return r.id===Number(t.target.value)});w(r?r[0].courses:[])}else w([])}}),u().createElement("option",{value:""},"Select Stream "),v&&v.map(function(t){return u().createElement("option",{key:t.id,value:t.id},t.name)})),u().createElement("div",{className:"".concat(o.stream_id?r.errcustomArrow:m)}),o.stream_id&&u().createElement("span",{className:r.errMsgs,style:{color:"red"}},o.stream_id.message))),E("exam_id")&&u().createElement("div",{className:f},u().createElement("label",{className:d,htmlFor:"course_id"},"Courses",u().createElement("span",{style:{color:"red"}},"*")),u().createElement("span",{className:h},u().createElement("select",tZ({},n("course_id",{required:"Course is required"}),{id:"course_id",className:"".concat(o.course_id?r.errcustomSelect:p)}),u().createElement("option",{value:""},"Select Course "),_&&_.map(function(t){return u().createElement("option",{key:t.id,value:t.id},t.name)})),u().createElement("div",{className:"".concat(o.course_id?r.errcustomArrow:m)}),o.course_id&&u().createElement("span",{className:r.errMsgs,style:{color:"red"}},o.course_id.message))))},t1=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";window.localStorage.setItem("userAuth",JSON.stringify(t)),3!==r&&(ty("userToken",t.token,2),ty("userDamsToken",t.dams_token,2)),"meniit"===n&&ty("zigyanAuthToken",t.zigyanAuthToken,2)},t2=function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(null===(t=window)||void 0===t?void 0:t.location.hostname).includes("meniit")?"".concat(window.location.origin,"/student/dashboard"):(console.log("org ",r),"".concat(window.location.origin,n?"/prep/my-course":"/prep/home"))},t3=function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="",o=new URLSearchParams(window.location.search);console.log("redirect to home code",o);var i=o.get("redirectTo"),a=o.get("noRedirect");return localStorage.removeItem("guest_user_loggedIn"),i?(n=decodeURIComponent(i),localStorage.setItem("guest_user_loggedIn",1),window.location.href=n):a||(n=t2(t,r),window.location.href=n),""};function t5(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,o=Array(r);n<r;n++)o[n]=t[n];return o}function t8(t){var r,n=t.userAuthData,o=t.orgName,i=t.succesMsg,a=t.type,c=void 0===a?1:a,s=t.closePopup,f=function(t){if(Array.isArray(t))return t}(r=(0,l.useState)("Success!"))||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,a,l,u=[],c=!0,s=!1;try{for(a=(n=n.call(t)).next;!(c=(o=a.call(n)).done)&&(u.push(o.value),2!==u.length);c=!0);}catch(t){s=!0,i=t}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return u}}(r,0)||function(t,r){if(t){if("string"==typeof t)return t5(t,2);var n=({}).toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t5(t,2):void 0}}(r,0)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),d=f[0],h=f[1];return(0,l.useEffect)(function(){if(2===c?h("Congratulations!"):3===c&&(h("Congratulations!"),localStorage.removeItem("emailSkip")),3!==c&&n){var t,r,o,i,a,l,u,s={name:n.accountDetails.name,gender:n.accountDetails.gender,profilePicture:"",is_profile_completed:null==n?void 0:n.accountDetails.is_profile_completed,token:n.authToken,id:(null===(t=n.accountDetails)||void 0===t?void 0:t.user_id)||(null===(r=n.accountDetails)||void 0===r?void 0:r.userId),user_t
1ype:(null===(o=n.accountDetails)||void 0===o?void 0:o.user_type)||(null===(i=n.accountDetails)||void 0===i?void 0:i.userType),oldValue:"",email:n.accountDetails.email,dams_token:n.accountDetails.dams_tokken||(null===(a=n.accountDetails)||void 0===a?void 0:a.damsToken),isEmailVerified:n.verificationDetails.isEmailVerified,isPhoneVerified:n.verificationDetails.isPhoneVerified};"meniit"==n.organizationDetails.slug&&(s.zigyan_stream_id=null===(l=n.accountDetails)||void 0===l?void 0:l.zigyan_stream_id,s.zigyanAuthToken=null===(u=n.accountDetails)||void 0===u?void 0:u.zigyan_login_token),t1(s,c,n.organizationDetails.slug)}},[]),u().createElement("div",null,u().createElement("div",{className:"SucessModal-module__successModal__fef2911f6e2496e6f0dd"},u().createElement("div",{className:"SucessModal-module__successModalContent__ab15bb13759a95523331"},u().createElement("div",{className:"SucessModal-module__popupHeader__db5795754ddc05d08477"},u().createElement("div",{span:!0,className:"SucessModal-module__successIcon__c996888f75b8baff63ff"},u().createElement("svg",{width:"57",height:"56",viewBox:"0 0 57 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},u().createElement("path",{d:"M28.5 52.5C42.031 52.5 53 41.531 53 28C53 14.469 42.031 3.5 28.5 3.5C14.969 3.5 4 14.469 4 28C4 41.531 14.969 52.5 28.5 52.5Z",fill:"#46CC5C"}),u().createElement("path",{d:"M25.4555 36.1667C24.8441 36.1548 24.2617 35.9035 23.8338 35.4667L17.5455 29.015C17.1138 28.571 16.8762 27.9737 16.885 27.3545C16.8938 26.7353 17.1481 26.145 17.5921 25.7133C18.0361 25.2817 18.6334 25.0441 19.2526 25.0529C19.8718 25.0616 20.4622 25.316 20.8938 25.76L25.5605 30.5667L36.2705 20.475C36.7253 20.079 37.3159 19.8745 37.9182 19.9044C38.5206 19.9342 39.0879 20.1962 39.5014 20.6353C39.9148 21.0744 40.1422 21.6565 40.1358 22.2595C40.1294 22.8626 39.8898 23.4398 39.4671 23.87L27.0888 35.5367C26.6467 35.9507 26.061 36.1766 25.4555 36.1667Z",fill:"white"})))),u().createElement("h3",{className:"SucessModal-module__mb20__de22fd8ec435a0bb9b3f"},d),u().createElement("p",{className:"SucessModal-module__successMsgStyle__f2057ad0627187e11d7f",style:{fontWeight:"400"}},void 0===i?"You've been registered. Let's get started!":i),u().createElement("button",{onClick:function(){var t;t3(o,null==n||null===(t=n.paidAccess)||void 0===t?void 0:t.isPaid),s(!1)},className:"SucessModal-module__btn__d073fcc8d07fc9c7daef"},"OK"))))}function t6(t){return(t6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function t4(){return(t4=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(null,arguments)}function t9(){t9=function(){return r};var t,r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,n){t[r]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,r,n){return Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,n){return t[r]=n}}function f(r,n,o,a){var l,u,c=Object.create((n&&n.prototype instanceof v?n:v).prototype);return i(c,"_invoke",{value:(l=new N(a||[]),u=h,function(n,i){if(u===p)throw Error("Generator is already running");if(u===m){if("throw"===n)throw i;return{value:t,done:!0}}for(l.method=n,l.arg=i;;){var a=l.delegate;if(a){var c=function r(n,o){var i=o.method,a=n.iterator[i];if(a===t)return o.delegate=null,"throw"===i&&n.iterator.return&&(o.method="return",o.arg=t,r(n,o),"throw"===o.method)||"return"!==i&&(o.method="throw",o.arg=TypeError("The iterator does not provide a '"+i+"' method")),y;var l=d(a,n.iterator,o.arg);if("throw"===l.type)return o.method="throw",o.arg=l.arg,o.delegate=null,y;var u=l.arg;return u?u.done?(o[n.resultName]=u.value,o.next=n.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,y):u:(o.method="throw",o.arg=TypeError("iterator result is not an object"),o.delegate=null,y)}(a,l);if(c){if(c===y)continue;return c}}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(u===h)throw u=m,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);u=p;var s=d(r,o,l);if("normal"===s.type){if(u=l.done?m:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:l.done}}"throw"===s.type&&(u=m,l.method="throw",l.arg=s.arg)}})}),c}function d(t,r,n){try{return{type:"normal",arg:t.call(r,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=f;var h="suspendedStart",p="executing",m="completed",y={};function v(){}function g(){}function b(){}var _={};s(_,l,function(){return this});var w=Object.getPrototypeOf,E=w&&w(w(P([])));E&&E!==n&&o.call(E,l)&&(_=E);var x=b.prototype=v.prototype=Object.create(_);function S(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function O(t,r){var n;i(this,"_invoke",{value:function(i,a){function l(){return new r(function(n,l){(function n(i,a,l,u){var c=d(t[i],t,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==t6(f)&&o.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,l,u)}
vendor: 4,544 bytes, line 1
1,function(t){n("throw",t,l,u)}):r.resolve(f).then(function(t){s.value=t,l(s)},function(t){return n("throw",t,l,u)})}u(c.arg)})(i,a,n,l)})}return n=n?n.then(l,l):l()}})}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function P(r){if(r||""===r){var n=r[l];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function n(){for(;++i<r.length;)if(o.call(r,i))return n.value=r[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw TypeError(t6(r)+" is not iterable")}return g.prototype=b,i(x,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},S(O.prototype),s(O.prototype,u,function(){return this}),r.AsyncIterator=O,r.async=function(t,n,o,i,a){void 0===a&&(a=Promise);var l=new O(f(t,n,o,i),a);return r.isGeneratorFunction(n)?l:l.next().then(function(t){return t.done?t.value:l.next()})},S(x),s(x,c,"Generator"),s(x,l,function(){return this}),s(x,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),n=[];for(var o in r)n.push(o);return n.reverse(),function t(){for(;n.length;){var o=n.pop();if(o in r)return t.value=o,t.done=!1,t}return t.done=!0,t}},r.values=P,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function i(o,i){return u.type="throw",u.arg=r,n.next=o,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a],u=l.completion;if("root"===l.tryLoc)return i("end");if(l.tryLoc<=this.prev){var c=o.call(l,"catchLoc"),s=o.call(l,"finallyLoc");if(c&&s){if(this.prev<l.catchLoc)return i(l.catchLoc,!0);if(this.prev<l.finallyLoc)return i(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return i(l.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return i(l.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var l=a?a.completion:{};return l.type=t,l.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(l)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(r,n,o){return this.delegate={iterator:P(r),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function t7(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,o)}return n}function re(t,r,n,o,i,a,l){try{var u=t[a](l),c=u.value}catch(t){return void n(t)}u.done?r(c):Promise.resolve(c).then(o,i)}function rt(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,a,l,u=[],c=!0,s=!1;try{if(a=(n=n.call(t)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;
1!(c=(o=a.call(n)).done)&&(u.push(o.value),u.length!==r);c=!0);}catch(t){s=!0,i=t}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return u}}(t,r)||function(t,r){if(t){if("string"==typeof t)return rr(t,r);var n=({}).toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rr(t,r):void 0}}(t,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rr(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,o=Array(r);n<r;n++)o[n]=t[n];return o}function rn(t){var r,n,o,i,a,c,s=t.styles,f=t.orgName,d=t.orgId,h=t.verificationAuthData,p=t.handleBackButton,m=t.handleSuccessModal,y=rt((0,l.useState)(),2),v=(y[0],y[1],s.btnSubmit),g=s.loginText,b=s.inputBox,_=s.formGroup,w=s.labelText,E=(s.inputIcon,s.hiddenText),x=s.bgBtnMeniit,S=s.bgBtnMep,O=s.bgBtnNias,L=s.inputFieldGroup,T=s.textBlue,N=s.otpFooter,P=s.cursorPointer,j=s.customScroll,A=s.termsAndConditionWrapper,k=s.termsText,I=s.errMsgs,F=to({defaultValues:{mobile:(null==h||null===(o=h.verificationDetails)||void 0===o?void 0:o.phone)||"",email:(null==h||null===(i=h.verificationDetails)||void 0===i?void 0:i.email)||""}}),M=F.register,D=F.handleSubmit,B=F.formState.errors,C=F.clearErrors,V=rt((0,l.useState)(O),2),G=V[0],U=V[1],R=rt((0,l.useState)(!1),2),q=R[0],z=R[1],W=rt((0,l.useState)(""),2),Y=W[0],H=W[1],$=rt((0,l.useState)(!1),2),Z=$[0],J=$[1],K=rt((0,l.useState)({email:!(null==h||null===(a=h.verificationDetails)||void 0===a||!a.email),mobile:!(null==h||null===(c=h.verificationDetails)||void 0===c||!c.phone)}),2),Q=K[0],X=(K[1],rt((0,l.useState)(!1),2)),ee=X[0],et=X[1],er=(0,l.useRef)(null);(0,l.useEffect)(function(){U("meniit"===f?x:"madeeasyprime"===f?S:O)},[]),(0,l.useEffect)(function(){Y&&er.current&&er.current.scrollIntoView({behavior:"smooth",block:"center"})},[Y]);var en=(0,l.useCallback)((r=t9().mark(function t(r){var n,o,i;return t9().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n={phone:r.mobile,name:r.name,email:r.email,interimAuthToken:h.interimAuthTokenDetails.interimAuthToken,identifier:h.interimAuthTokenDetails.identifier},"madeeasyprime"===f?n.stream_id=r.stream_id:"meniit"===f&&(n.stream_id=r.course_id,n.course_id=r.stream_id,n.exam_id=r.stream_id,n.grade_id="1"),o=tm(d),z(!0),J(!1),H(),t.next=8,td("".concat("https://apicore.madeeasy.in/api/v1","/auth/registration"),{method:"POST",body:JSON.stringify(function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t7(Object(n),!0).forEach(function(r){(function(t,r,n){var o;(o=function(t){if("object"!=t6(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=t6(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r),(r="symbol"==t6(o)?o:o+"")in t)?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n})(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):t7(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}({},n)),headers:o},function(t){console.log("handle auth/registration err ",t),H(t.message)});case 8:null!=(i=t.sent)&&i.success?(z(!1),localStorage.setItem("userRegister",1),J(!0),m(i.data),et(i.data)):z(!1);case 10:case"end":return t.stop()}},t)}),n=function(){var t=this,n=arguments;return new Promise(function(o,i){var a=r.apply(t,n);function l(t){re(a,o,i,l,u,"next",t)}function u(t){re(a,o,i,l,u,"throw",t)}l(void 0)})},function(t){return n.apply(this,arguments)}),[]),eo={meniit:u().createElement(t0,{styles:s,register:M,errors:B,clearErrors:C,orgName:f,orgId:d}),madeeasyprime:u().createElement(tH,{styles:s,register:M,errors:B,clearErrors:C,orgName:f,orgId:d})};return u().createElement(u().Fragment,null,Z?u().createElement(t8,{userAuthData:ee,orgName:f,closePopup:J}):u().createElement(u().Fragment,null,u().createElement("span",{className:g},u().createElement("span",{className:s.textBlueHeader}
1,"Welcome")),u().createElement("div",{className:s.commonHeading},"CREATE NEW ACCOUNT"),u().createElement("form",{className:"".concat(_," ").concat(j),onSubmit:D(en)},u().createElement("div",{className:_},u().createElement("label",{className:w,htmlFor:"name"},"Full Name",u().createElement("span",{style:{color:"red"}},"*")),u().createElement("span",{className:L},u().createElement("input",t4({},M("name",{required:"This field is required",pattern:{value:/^[A-Za-z]+(?: [A-Za-z]+)*$/,message:"Name must contain only letters"}}),{className:"".concat(B.name?s.errinputBox:b),width:"100%",name:"name",placeholder:"Enter your full name",id:"name"})),B.name&&u().createElement("span",{className:I,style:{color:"red"}},B.name.message))),Q.email?"":u().createElement("div",{className:_},u().createElement("label",{className:w,htmlFor:"email"},"Email Address",u().createElement("span",{style:{color:"red"}},"*")),u().createElement("span",{className:L},u().createElement("input",t4({},M("email",{required:"This field is required",pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,message:"Invalid email address"}}),{className:"".concat(B.email?s.errinputBox:b),width:"100%",name:"email",placeholder:"Enter email address",id:"email"})),B.email&&u().createElement("span",{className:I,style:{color:"red"}},B.email.message))),Q.mobile?"":u().createElement("div",{className:_},u().createElement("label",{className:w,htmlFor:"mobile"},"Mobile Number",u().createElement("span",{style:{color:"red"}},"*")),u().createElement("span",{className:L},u().createElement("input",t4({},M("mobile",{required:"This field is required",pattern:{value:/^(?:\+91|91)?[6789]\d{9}$/,message:"Please enter a valid 10-digit number"}}),{type:"text",className:"".concat(B.mobile?s.errinputBox:b),width:"100%",name:"mobile",placeholder:"Enter mobile number",id:"mobile",maxLength:"10"})),B.mobile&&u().createElement("span",{className:I,style:{color:"red"}}," ",B.mobile.message))),eo[f],u().createElement("div",{className:"".concat(B.agreeToTerms?A:s.mbTwenty),style:{display:"flex",alignItems:"center",justifyContent:"center"}},u().createElement("label",null,u().createElement("input",t4({type:"checkbox",defaultChecked:!0},M("agreeToTerms",{required:!0}),{style:{marginRight:"8px",cursor:"pointer",fontSize:"clamp(12px, 14px, 16px)",marginTop:"2px"}}))),"By signing up, you agree to our"," ",u().createElement("div",{className:"".concat(T," ").concat(k),onClick:function(){var t="";"nextias"===f?t="https://www.nextias.com/terms-conditions":"madeeasyprime"===f?t="https://www.madeeasy.in/online/terms-condition":"meniit"===f&&(t="".concat(t2(),"/terms-condition")),window.open(t,"__blank")}},"\xa0Terms & Conditions")),B.agreeToTerms&&u().createElement("span",{className:I,style:{color:"red",marginTop:"5px",display:"block",textAlign:"left",marginBottom:"20px"}},"This field is required"),u().createElement("button",{className:"".concat(v," ").concat(q?s.loading:""," ").concat(B.name||B.email||B.mobile||B.agreeToTerms?s.errBtn:G),loading:!0,type:"submit",disabled:q},q&&u().createElement(ti,{show:q}),u().createElement("span",{className:"".concat(q?E:"")},"SIGN UP")),u().createElement("div",{className:N},u().createElement("div",{onClick:function(){p("loginSignup")},className:P},tl," ")),Y&&u().createElement("span",{ref:er,style:{color:"#ff0000e3",marginTop:"10px",textAlign:"center",fontSize:"15px",fontWeight:"bold"}},Y))))}rn.propTypes={styles:s().object.isRequired,orgName:s().string.isRequired,verificationAuthData:s().string.isRequired,handleBackButton:s().func.isRequired,handleSuccessModal:s().func.isRequired};var ro=function(t){window.localStorage.setItem("userProfileAuth",JSON.stringify(t))},ri=function(){var t=window.localStorage.getItem("userProfileAuth");return t?JSON.parse(t):""};function ra(t){return(ra="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rl(){return(rl=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(null,arguments)}function ru(){ru=function(){return r};var t,r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,n){t[r]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,r,n){return Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,n){return t[r]=n}}function f(r,n,o,a){var l,u,c=Object.create((n&&n.prototype instanceof v?n:v).prototype);return i(c,"_invoke",{value:(l=new N(a||[]),u=h,function(n,i){if
vendor: 4,441 bytes, line 1
1(u===p)throw Error("Generator is already running");if(u===m){if("throw"===n)throw i;return{value:t,done:!0}}for(l.method=n,l.arg=i;;){var a=l.delegate;if(a){var c=function r(n,o){var i=o.method,a=n.iterator[i];if(a===t)return o.delegate=null,"throw"===i&&n.iterator.return&&(o.method="return",o.arg=t,r(n,o),"throw"===o.method)||"return"!==i&&(o.method="throw",o.arg=TypeError("The iterator does not provide a '"+i+"' method")),y;var l=d(a,n.iterator,o.arg);if("throw"===l.type)return o.method="throw",o.arg=l.arg,o.delegate=null,y;var u=l.arg;return u?u.done?(o[n.resultName]=u.value,o.next=n.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,y):u:(o.method="throw",o.arg=TypeError("iterator result is not an object"),o.delegate=null,y)}(a,l);if(c){if(c===y)continue;return c}}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(u===h)throw u=m,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);u=p;var s=d(r,o,l);if("normal"===s.type){if(u=l.done?m:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:l.done}}"throw"===s.type&&(u=m,l.method="throw",l.arg=s.arg)}})}),c}function d(t,r,n){try{return{type:"normal",arg:t.call(r,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=f;var h="suspendedStart",p="executing",m="completed",y={};function v(){}function g(){}function b(){}var _={};s(_,l,function(){return this});var w=Object.getPrototypeOf,E=w&&w(w(P([])));E&&E!==n&&o.call(E,l)&&(_=E);var x=b.prototype=v.prototype=Object.create(_);function S(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function O(t,r){var n;i(this,"_invoke",{value:function(i,a){function l(){return new r(function(n,l){(function n(i,a,l,u){var c=d(t[i],t,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==ra(f)&&o.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,l,u)},function(t){n("throw",t,l,u)}):r.resolve(f).then(function(t){s.value=t,l(s)},function(t){return n("throw",t,l,u)})}u(c.arg)})(i,a,n,l)})}return n=n?n.then(l,l):l()}})}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function P(r){if(r||""===r){var n=r[l];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function n(){for(;++i<r.length;)if(o.call(r,i))return n.value=r[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw TypeError(ra(r)+" is not iterable")}return g.prototype=b,i(x,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},S(O.prototype),s(O.prototype,u,function(){return this}),r.AsyncIterator=O,r.async=function(t,n,o,i,a){void 0===a&&(a=Promise);var l=new O(f(t,n,o,i),a);return r.isGeneratorFunction(n)?l:l.next().then(function(t){return t.done?t.value:l.next()})},S(x),s(x,c,"Generator"),s(x,l,function(){return this}),s(x,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),n=[];for(var o in r)n.push(o);return n.reverse(),function t(){for(;n.length;){var o=n.pop();if(o in r)return t.value=o,t.done=!1,t}return t.done=!0,t}},r.values=P,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function i(o,i){return u.type="throw",u.arg=r,n.next=o,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a],u=l.completion;if("root"===l.tryLoc)return i("end");if(l.tryLoc<=this.prev){var c=o.call(l,"catchLoc"),s=o.call(l,"finallyLoc");
1if(c&&s){if(this.prev<l.catchLoc)return i(l.catchLoc,!0);if(this.prev<l.finallyLoc)return i(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return i(l.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return i(l.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var l=a?a.completion:{};return l.type=t,l.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(l)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(r,n,o){return this.delegate={iterator:P(r),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function rc(t,r,n,o,i,a,l){try{var u=t[a](l),c=u.value}catch(t){return void n(t)}u.done?r(c):Promise.resolve(c).then(o,i)}function rs(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function l(t){rc(a,o,i,l,u,"next",t)}function u(t){rc(a,o,i,l,u,"throw",t)}l(void 0)})}}function rf(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,a,l,u=[],c=!0,s=!1;try{if(a=(n=n.call(t)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=a.call(n)).done)&&(u.push(o.value),u.length!==r);c=!0);}catch(t){s=!0,i=t}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return u}}(t,r)||function(t,r){if(t){if("string"==typeof t)return rd(t,r);var n=({}).toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rd(t,r):void 0}}(t,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rd(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,o=Array(r);n<r;n++)o[n]=t[n];return o}function rh(t){var r,n,o=t.styles,i=t.orgName,a=t.orgId,c=t.handleBackButton,s=t.handleSuccessModal,f=o.btnSubmit,d=o.loginText,h=o.inputBox,p=o.formGroup,m=o.labelText,y=(o.inputIcon,o.hiddenText),v=(o.bgBtnMeniit,o.bgBtnMep,o.bgBtnNias),g=o.inputFieldGroup,b=(o.textBlue,o.otpFooter),_=o.cursorPointer,w=to(),E=w.register,x=w.handleSubmit,S=w.formState.errors,O=w.clearErrors,L=rf((0,l.useState)(v),2),T=L[0],N=(L[1],rf((0,l.useState)(!1),2)),P=N[0],j=N[1],A=rf((0,l.useState)(""),2),k=A[0],I=A[1],F=rf((0,l.useState)(!1),2),M=(F[0],F[1],rf((0,l.useState)(!1),2)),D=(M[0],M[1],rf((0,l.useState)(""),2)),B=D[0],C=D[1],V=rf((0,l.useState)(!0),2),G=V[0],U=V[1];(0,l.useEffect)(function(){R(tm(a,ri().authToken))},[]);var R=(r=rs(ru().mark(function t(r){var n;return ru().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,td("".concat("https://apicore.madeeasy.in/api/v1","/auth/me"),{method:"GET",headers:r},function(t){console.log("auth/me ",t),I(t.message),U(!1)});case 2:(n=t.sent).data.authToken=ri().authToken,C(n.data),U(!1);case 6:case"end":return t.stop()}},t)})),function(t){return r.apply(this,arguments)}),q=(0,l.useCallback)((n=rs(ru().mark(function t(r){var n,o,l,u,c;return ru().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("handleCompleteProfile payload : ",r),n=r,"meniit"===i&&(n.exam_id=n.stream_id,n.stream_id=n.course_id,n.grade_id="1"),o=tm(a,ri().authToken),j(!0),I(""),t.next=8,td("".concat("https://apicore.madeeasy.in/api/v1","/auth/update-profile"),{method:"POST",body:JSON.stringify(n),headers:o},function(t){console.log("handle auth/update-profile err ",t),I(t.message)});case 8:null!=(l=t.sent)&&l.success?(j(!1),localStorage.setItem("userLogin",1),null!=l&&null!==(u=l.data)&&void 0!==u&&u.isRegistered&&null!=l&&null!==(c=l.data)&&void 0!==c&&c.isProfileCompleted&&(l.data.authToken=ri().authToken,localStorage.removeItem("userProfileAuth"),s(l.data,2))):j(!1);case 10:case"end":return t.stop()}},t)})),function(t){return n.apply(this,arguments)}),[]),z=function(t){var r;if(!G)return null==B||null===(r=B.mandatoryProfileDetails)||void 0===r||null===(r=r.missingFields)||void 0===r?void 0:r.includes(t)},W={meniit:u().createElement(t0,{styles:o,register:E,errors:S,orgName:i,orgId:a,mandaToryFields:null==B?void 0:B.mandatoryProfileDetails,clearErrors:O,pageType:"profileComplete"}),madeeasyprime:u().createElement(tH,{styles:o,register:E,errors:S,orgName:i,orgId:a,mandaToryFields:null==B?void 0:B.mandatoryProfileDetails,clearErrors:O,pageType:"profileComplete"})};return u().createElement(u().Fragment,null,u().createElement("span",{className:d},u().createElement("span",{className:o.textBlueHeader}
1,"Welcome")),u().createElement("div",{className:o.commonHeading},"COMPLETE YOUR PROFILE"),u().createElement("form",{className:p,onSubmit:x(q)},G&&u().createElement(ti,{show:G,size:"large"}),!G&&z("name")&&u().createElement("div",{className:p},u().createElement("label",{className:m,htmlFor:"name"},"Full Name",u().createElement("span",{style:{color:"red"}},"*")),u().createElement("span",{className:g},u().createElement("input",rl({},E("name",{required:"This field is required",pattern:{value:/^[A-Za-z\s]+$/,message:"Name must contain only letters"}}),{className:"".concat(S.name?o.errinputBox:h),width:"100%",name:"name",placeholder:"Enter your full name",id:"name"})),S.name&&u().createElement("span",{className:o.errMsgs,style:{color:"red"}},S.name.message))),!G&&z("email")&&u().createElement("div",{className:p},u().createElement("label",{className:m,htmlFor:"email"},"Email Address",u().createElement("span",{style:{color:"red"}},"*")),u().createElement("span",{className:g},u().createElement("input",rl({},E("email",{required:"This field is required",pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,message:"Invalid email address"}}),{className:"".concat(S.email?o.errinputBox:h),width:"100%",name:"email",placeholder:"Enter email address",id:"email"})),S.email&&u().createElement("span",{className:o.errMsgs,style:{color:"red"}},S.email.message))),!G&&z("phone")&&u().createElement("div",{className:p},u().createElement("label",{className:m,htmlFor:"phone"},"Mobile Number",u().createElement("span",{style:{color:"red"}},"*")),u().createElement("span",{className:g},u().createElement("input",rl({},E("phone",{required:"This field is required",pattern:{value:/^\d{10}$/,message:"Invalid Mobile number"}}),{type:"text",className:"".concat(S.phone?o.errinputBox:h),width:"100%",name:"phone",placeholder:"Enter mobile number",id:"phone"})),S.phone&&u().createElement("span",{className:o.errMsgs,style:{color:"red"}}," ",S.phone.message))),!G&&W[i],u().createElement("button",{className:"".concat(f," ").concat(P?o.loading:""," ").concat(S.name||S.email||S.phone?o.errBtn:T),loading:!0,type:"submit"},P&&u().createElement(ti,{show:P}),u().createElement("span",{className:"".concat(P?y:"")},"SUBMIT")),u().createElement("div",{className:b},u().createElement("div",{onClick:function(){c("loginSignup","backWithNew")},className:_},tl," ")),k&&u().createElement("span",{style:{color:"#ff0000e3",marginTop:"10px",textAlign:"center",fontSize:"15px",fontWeight:"bold"}},k)))}rh.propTypes={styles:s().object.isRequired,orgName:s().string.isRequired,orgId:s().string.isRequired,handleBackButton:s().func.isRequired,handleSuccessModal:s().func.isRequired};var rp="ModalWrapper-module__closeButton__ee0148a1c1d5b1b9e7b4";let rm=function(){var t=window.innerWidth;return t<=575?"Mobile":t>576&&t<=1024?"Tablet":"Desktop"};function ry(t){return(ry="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rv(){rv=function(){return r};var t,r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,n){t[r]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,r,n){return Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,n){return t[r]=n}}function f(r,n,o,a){var l,u,c=Object.create((n&&n.prototype instanceof v?n:v).prototype);return i(c,"_invoke",{value:(l=new N(a||[]),u=h,function(n,i){if(u===p)throw Error("Generator is already running");if(u===m){if("throw"===n)throw i;return{value:t,done:!0}}for(l.method=n,l.arg=i;;){var a=l.delegate;if(a){var c=function r(n,o){var i=o.method,a=n.iterator[i];if(a===t)return o.delegate=null,"throw"===i&&n.iterator.return&&(o.method="return",o.arg=t,r(n,o),"throw"===o.method)||"return"!==i&&(o.method="throw",o.arg=TypeError("The iterator does not provide a '"+i+"' method")),y;var l=d(a,n.iterator,o.arg);if("throw"===l.type)return o.method="throw",o.arg=l.arg,o.delegate=null,y;var u=l.arg;return u?u.done?(o[n.resultName]=u.value,o.next=n.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,y):u:(o.method="throw",o.arg=TypeError("iterator result is not an object"),o.delegate=null,y)}(a,l);if(c){if(c===y)continue;return c}}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(u===h)throw u=m,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);u=p;var s=d(r,o,l);if("normal"===s.type){if(u=l.done?m:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:l.done}}"throw"===s.type&&(u=m,l.method="throw",l.arg=s.arg)}})}),c}function d(t,r,n){try{return{type:"normal",arg:t.call(r,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=f;var h="suspendedStart",p="executing",m="completed",y={};function v(){}function g(){}function b(){}var _={};s(_,l,function(){return this});var w=Object.getPrototypeOf,E=w&&w(w(P([])));E&&E!==n&&o.call(E,l)&&(_=E);var x=b.prototype=v.prototype=Object.create(_);function S(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function O(t,r){var n;i(this,"_invoke",{value:function(i,a){function l(){return new r(function(n,l){(function n(i,a,l,u){var c=d(t[i],t,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==ry(f)&&o.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,l,u)}
vendor: 4,234 bytes, line 1
1,function(t){n("throw",t,l,u)}):r.resolve(f).then(function(t){s.value=t,l(s)},function(t){return n("throw",t,l,u)})}u(c.arg)})(i,a,n,l)})}return n=n?n.then(l,l):l()}})}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function P(r){if(r||""===r){var n=r[l];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function n(){for(;++i<r.length;)if(o.call(r,i))return n.value=r[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw TypeError(ry(r)+" is not iterable")}return g.prototype=b,i(x,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},S(O.prototype),s(O.prototype,u,function(){return this}),r.AsyncIterator=O,r.async=function(t,n,o,i,a){void 0===a&&(a=Promise);var l=new O(f(t,n,o,i),a);return r.isGeneratorFunction(n)?l:l.next().then(function(t){return t.done?t.value:l.next()})},S(x),s(x,c,"Generator"),s(x,l,function(){return this}),s(x,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),n=[];for(var o in r)n.push(o);return n.reverse(),function t(){for(;n.length;){var o=n.pop();if(o in r)return t.value=o,t.done=!1,t}return t.done=!0,t}},r.values=P,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function i(o,i){return u.type="throw",u.arg=r,n.next=o,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a],u=l.completion;if("root"===l.tryLoc)return i("end");if(l.tryLoc<=this.prev){var c=o.call(l,"catchLoc"),s=o.call(l,"finallyLoc");if(c&&s){if(this.prev<l.catchLoc)return i(l.catchLoc,!0);if(this.prev<l.finallyLoc)return i(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return i(l.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return i(l.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var l=a?a.completion:{};return l.type=t,l.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(l)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(r,n,o){return this.delegate={iterator:P(r),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function rg(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,o)}return n}function rb(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};
1r%2?rg(Object(n),!0).forEach(function(r){(function(t,r,n){var o;(o=function(t){if("object"!=ry(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=ry(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r),(r="symbol"==ry(o)?o:o+"")in t)?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n})(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rg(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function r_(t,r,n,o,i,a,l){try{var u=t[a](l),c=u.value}catch(t){return void n(t)}u.done?r(c):Promise.resolve(c).then(o,i)}function rw(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function l(t){r_(a,o,i,l,u,"next",t)}function u(t){r_(a,o,i,l,u,"throw",t)}l(void 0)})}}function rE(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,a,l,u=[],c=!0,s=!1;try{if(a=(n=n.call(t)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=a.call(n)).done)&&(u.push(o.value),u.length!==r);c=!0);}catch(t){s=!0,i=t}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return u}}(t,r)||function(t,r){if(t){if("string"==typeof t)return rx(t,r);var n=({}).toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rx(t,r):void 0}}(t,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rx(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,o=Array(r);n<r;n++)o[n]=t[n];return o}function rS(t,r){console.log("Emitting login success event with userData:",t);var n=new CustomEvent("loginSuccess",{detail:{user:t,organization:r.organizationName,orgId:r.orgId,timestamp:Date.now()}});window.dispatchEvent(n)}function rO(t){var r,o,i,a=t.toggleModal,c=(t.text,t.orgInfo),s=rE((0,l.useState)("loginSignup"),2),f=s[0],d=s[1],h=rE((0,l.useState)("loginSignup"),2),p=(h[0],h[1]),y=rE((0,l.useState)(!1),2),v=y[0],g=y[1],b=rE((0,l.useState)({}),2),_=b[0],w=b[1],E=rE((0,l.useState)(""),2),x=E[0],S=E[1],O=rE((0,l.useState)(""),2),L=O[0],T=O[1],N=rE((0,l.useState)({}),2),P=N[0],j=N[1],A=rE((0,l.useState)(!1),2),k=A[0],I=A[1],F=rE((0,l.useState)(!1),2),D=F[0],B=F[1],C=rE((0,l.useState)(!1),2),V=C[0],G=C[1],U=rE((0,l.useState)(!1),2),R=U[0],q=U[1],z=rE((0,l.useState)(""),2),W=z[0],Y=z[1],H=rE((0,l.useState)(1),2),$=H[0],Z=H[1],J=rE((0,l.useState)(!0),2),K=J[0],Q=J[1],X=(r=rw(rv().mark(function t(r){var n,o,i;return rv().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,td("".concat("https://apicore.madeeasy.in/api/v1","/auth/verification/send-otp"),{method:"POST",body:JSON.stringify(rb({},r)),headers:tm(c.orgId)},function(t){console.log("error sending otp",t.message)});case 2:null!=(n=t.sent)&&n.success?(g(!1),p(f),d("otp"),w({organization:c.orgId,phone:null==n||null===(o=n.data)||void 0===o?void 0:o.phone,email:null==n||null===(i=n.data)||void 0===i?void 0:i.email})):(S(null==n?void 0:n.message),g(!1));case 4:case"end":return t.stop()}},t)})),function(t){return r.apply(this,arguments)}),ee=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";S(""),"backWithNew"===r&&(localStorage.removeItem("userProfileAuth"),q(!1)),d(t)},et=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Q(!K),B(!0),G(t),1===r?(Y("You've been registered. Let's get started!"),Z(1)):(Y("Your profile has been completed!"),Z(2))},er=function(){return new URLSearchParams(window.location.search).get("utm_source")?decodeURIComponent(window.location.href):""},en=(o=rw(rv().mark(function t(r,n){var o,i,a,l,u,s,h,m,y,v,b,w,E,x,O,L,N,P,A,k,F,M,D,B,C,V;return rv().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return T(""),S(""),o=rb(rb(rb({},_),r),{},{sourceType:er()}),i=function(t){n(null==t?void 0:t.message)},t.next=6,td("".concat("https://apicore.madeeasy.in/api/v1","/auth"),{method:"POST",body:JSON.stringify(rb({},o)),headers:tm(c.orgId),errorCallback:i});case 6:a=t.sent,p(f),null!=a&&a.success?(g(!1),null!=a&&null!==(l=a.data)&&void 0!==l&&l.isRegistered||null!=a&&null!==(u=a.data)&&void 0!==u&&u.isProfileCompleted?null==a||null===(s=a.data)||void 0===s||!s.isRegistered||null!=a&&null!==(h=a.data)&&void 0!==h&&h.isProfileCompleted?(D=a.data,localStorage.setItem("userLogin",1),I(!0),B={name:null==D||null===(m=D.accountDetails)||void 0===m?void 0:m.name,gender:null==D||null===(y=D.accountDetails)||void 0===y?void 0:y.gender,phone:null==D||null===(v=D.accountDetails)||void 0===v?void 0:v.mobile,accountId:null==D||null===(b=D.accountDetails)||void 0===b?void 0:b.accountId,profilePicture:"",token:null==D?void 0:D.authToken,id:(null==D||null===(w=D.accountDetails)||void 0===w?void 0:w.user_id
1)||(null==D||null===(E=D.accountDetails)||void 0===E?void 0:E.userId),user_type:(null==D||null===(x=D.accountDetails)||void 0===x?void 0:x.user_type)||(null==D||null===(O=D.accountDetails)||void 0===O?void 0:O.userType),oldValue:"",email:null==D||null===(L=D.accountDetails)||void 0===L?void 0:L.email,dams_token:(null==D||null===(N=D.accountDetails)||void 0===N?void 0:N.dams_tokken)||(null==D||null===(P=D.accountDetails)||void 0===P?void 0:P.damsToken),isEmailVerified:null==D||null===(A=D.verificationDetails)||void 0===A?void 0:A.isEmailVerified,isPhoneVerified:null==D||null===(k=D.verificationDetails)||void 0===k?void 0:k.isPhoneVerified,is_profile_completed:null==D||null===(F=D.accountDetails)||void 0===F?void 0:F.is_profile_completed},"meniit"==c.organizationName&&(B.zigyan_stream_id=null==D||null===(C=D.accountDetails)||void 0===C?void 0:C.zigyan_stream_id,B.zigyanAuthToken=null==D||null===(V=D.accountDetails)||void 0===V?void 0:V.zigyan_login_token),t1(B,1,c.organizationName),rS(B,c),eo(),t3(c.organizationName,null==D||null===(M=D.paidAccess)||void 0===M?void 0:M.isPaid)):(d("profileComplete"),j(a.data),ro({orgId:c.orgId,authToken:a.data.authToken}),q(!0)):(d("signup"),j(a.data))):(S(null==a?void 0:a.message),g(!1));case 9:case"end":return t.stop()}},t)})),function(t,r){return o.apply(this,arguments)});(0,l.useEffect)(function(){ri()?q(!0):console.log("profile complete not exist",ri())},[]),(0,l.useEffect)(function(){},[f]),k||R?!k&&R&&(i=u().createElement(rh,{styles:n,orgName:c.organizationName,orgId:c.orgId,handleBackButton:ee,handleSuccessModal:et})):i="otp"===f?u().createElement(tG,{loading:v,setLoading:g,styles:n,otpPayload:_,handleLoginWithOTP:en,handleBackButton:ee,orgType:c.organizationName,orgId:c.orgId,error:x,suceessMsg:L}):"signup"===f?u().createElement(rn,{styles:n,orgName:c.organizationName,orgId:c.orgId,verificationAuthData:P,handleBackButton:ee,handleSuccessModal:et}):u().createElement(tP,{loading:v,setLoading:g,styles:n,setFormType:d,handleSubmitForm:function(t){var r=rb(rb({organization:c.organizationName,authType:"LOGIN"},t),{},{sourceType:er()});g(!0),X(r)},orgType:c.organizationName,orgId:c.orgId,error:x,handleGoogleLoginCallBack:function(t){if(g(!0),console.log("authmodal login with google",t),null!=t&&t.success){var r,n,o,i;if(null!=t&&null!==(r=t.data)&&void 0!==r&&r.isRegistered||null!=t&&null!==(n=t.data)&&void 0!==n&&n.isProfileCompleted){if(null==t||null===(o=t.data)||void 0===o||!o.isRegistered||null!=t&&null!==(i=t.data)&&void 0!==i&&i.isProfileCompleted){var a,l,u,s,f,h,p,m,y,v,b,_,w,E=t.data;localStorage.setItem("userLogin",1),I(!0);var x,O,L={name:null==E||null===(a=E.accountDetails)||void 0===a?void 0:a.name,gender:null==E||null===(l=E.accountDetails)||void 0===l?void 0:l.gender,profilePicture:"",token:null==E?void 0:E.authToken,id:(null==E||null===(u=E.accountDetails)||void 0===u?void 0:u.user_id)||(null==E||null===(s=E.accountDetails)||void 0===s?void 0:s.userId),user_type:(null==E||null===(f=E.accountDetails)||void 0===f?void 0:f.user_type)||(null==E||null===(h=E.accountDetails)||void 0===h?void 0:h.userType),oldValue:"",email:null==E||null===(p=E.accountDetails)||void 0===p?void 0:p.email,dams_token:(null==E||null===(m=E.accountDetails)||void 0===m?void 0:m.dams_token)||(null==E||null===(y=E.accountDetails)||void 0===y?void 0:y.damsToken),isEmailVerified:null==E||null===(v=E.verificationDetails)||void 0===v?void 0:v.isEmailVerified,isPhoneVerified:null==E||null===(b=E.verificationDetails)||void 0===b?void 0:b.isPhoneVerified,is_profile_completed:null==E||null===(_=E.accountDetails)||void 0===_?void 0:_.is_profile_completed};"meniit"==c.organizationName&&(L.zigyan_stream_id=null==E||null===(x=E.accountDetails)||void 0===x?void 0:x.zigyan_stream_id,L.zigyanAuthToken=null==E||null===(O=E.accountDetails)||void 0===O?void 0:O.zigyan_login_token),t1(L,1,c.organizationName),rS(L,c),eo(),t3(c.organizationName,null==E||null===(w=E.paidAccess)||void 0===w?void 0:w.isPaid)}else d("profileComplete"),j(t.data),ro({orgId:c.orgId,authToken:t.data.authToken}),q(!0)}else d("signup"),j(t.data)}else{d("loginSignup");var T="Google login failed. Please try again.";"string"==typeof t||(null!=t&&t.message?T=t.message:null!=t&&t.error&&(T=t.error)),console.error("Google login error:",t),S(T),g(!1)}},errorCallbackGoogleLogin:function(t){S(t)}});var eo=function(){Q(!K),a()};return u().createElement(u().Fragment,null,K?u().createElement("div",{role:"button",tabIndex:"0",className:"ModalWrapper-module__modalOverlay__e1c4d81c2c88
1620b2267",onClick:function(){eo()},onKeyUp:function(){eo()}},u().createElement("div",{role:"button",tabIndex:"0",className:"ModalWrapper-module__modalContent__ae441b5f2325c0303b0d",onClick:function(t){return t.stopPropagation()},onKeyUp:function(t){return t.stopPropagation()}},u().createElement("div",{className:rp,onClick:function(){eo()},onKeyUp:function(){eo()}},"Mobile"==rm()&&u().createElement("button",{type:"button",className:rp,onClick:function(){eo()}},"\xd7"),"Mobile"!==rm()&&u().createElement("img",{src:"https://cdnstatic.meniit.com/resources/images/icons/Page-1-1732799284973.png",alt:"close"})),u().createElement("div",{className:"authmodalWrapper",style:"Mobile"==rm()?{paddingTop:"3rem"}:{paddingTop:"2rem"}},u().createElement("div",{className:m},u().createElement("img",{alt:"logo",style:{height:"100%",margin:"0 auto",maxWidth:"250px",marginBottom:"10px"},className:M,src:c.logo}),i)))):"",D?u().createElement("div",{className:"authmodalWrapper"},u().createElement("div",{className:m},u().createElement(t8,{userAuthData:V,orgName:c.organizationName,succesMsg:W,type:$,closePopup:B}))):"")}function rL(t){var r=t.children,n=t.toggleModal;return u().createElement(u().Fragment,null,u().createElement("span",{style:{display:"none"}},n),r)}rO.propTypes={toggleModal:s().func.isRequired,text:s().string.isRequired,orgInfo:s().object.isRequired},rL.propTypes={children:s().node.isRequired,toggleModal:s().func.isRequired};let rT={nextias:{orgId:"2410f924-6cc4-4e88-b490-ffd3bbc40d03",organizationName:"nextias",logo:"https://cdnstatic.nextias.com/resources/logos/nextias-1732862719729.svg"},meniit:{orgId:"c2a3acad-54ba-437f-85a1-d0d850cec900",organizationName:"meniit",logo:"https://cdnstatic.meniit.com/resources/logos/MENIIT-1732862852503.svg"},madeeasy:{orgId:"9a523aa7-dc66-410a-98bb-8cd66e875f35",organizationName:"madeeasyprime",logo:"https://cdnstatic.madeeasyprime.com/resources/logos/MADEEASY-1732862810616.svg"},madeeasyprime:{orgId:"9a523aa7-dc66-410a-98bb-8cd66e875f35",organizationName:"madeeasyprime",logo:"https://cdnstatic.madeeasyprime.com/resources/logos/MADEEASY-1732862810616.svg"},localhost:{orgId:"2410f924-6cc4-4e88-b490-ffd3bbc40d03",organizationName:"nextias",logo:"https://cdnstatic.nextias.com/resources/logos/nextias-1732862719729.svg"}};var rN="UnverifyModalPopup-module__authContainer__beb4a9bed1e3f41322f9",rP="UnverifyModalPopup-module__bgBtnMeniit__fadce7fd458275735866",rj="UnverifyModalPopup-module__bgBtnMep__ee6848fdd084263af572",rA="UnverifyModalPopup-module__bgBtnNias__e5ce8be326741f225c39",rk="UnverifyModalPopup-module__btnSubmit__dc9932c73b0946f25339",rI="UnverifyModalPopup-module__centerByMargin__b7b5cdb6057495aa89b4",rF="UnverifyModalPopup-module__closeButton__a1209f5a91b0c8c995c4",rM="UnverifyModalPopup-module__commonHeading__f607aab31232d5e7721b",rD="UnverifyModalPopup-module__cursorPointer__a5d3b10217cf2ea1eabe",rB="UnverifyModalPopup-module__customArrow__be810c2a33891b8a107a",rC="UnverifyModalPopup-module__customScroll__d3ff91663c9de6fe9789",rV="UnverifyModalPopup-module__customSelect__d77c76617571bcf127f7",rG="UnverifyModalPopup-module__errBtn__e73e51e69a4405f344ab",rU="UnverifyModalPopup-module__errMsgs__d757a51d96cdd377f960",rR="UnverifyModalPopup-module__errcustomArrow__d698495188b0df260499",rq="UnverifyModalPopup-module__errcustomSelect__cab2c54933fccd93ab56",rz="UnverifyModalPopup-module__errinputBox__a900a9cb0748eb0b10fa",rW="UnverifyModalPopup-module__font18__e5b74771349a436aa16e",rY="UnverifyModalPopup-module__formGroup__f771609b8749a6eb7eb4",rH="UnverifyModalPopup-module__formSwitchText__bd037729adb3e0b1348a",r$="UnverifyModalPopup-module__hiddenText__f0251bd0961e103a508b",rZ="UnverifyModalPopup-module__imgLogo__c1aa87aa10265dd17916",rJ="UnverifyModalPopup-module__inputBox__f9aca2bce9af00cf9f0e",rK="UnverifyModalPopup-module__inputFieldGroup__e73763879b835a7dd2f1",rQ="UnverifyModalPopup-module__inputIcon__b2d5bfd9b118122de709",rX="UnverifyModalPopup-module__inputUnderline__d519dcc96b5041e91cfc",r0="UnverifyModalPopup-module__labelText__a8682f1dfd6213fd8ffa",r1="UnverifyModalPopup-module__loader__bc48508d1653314d4dcb",r2="UnverifyModalPopup-module__loginSignupText__e13dd4f037cb22cc3a52",r3="UnverifyModalPopup-module__loginText__dcc1e7ce5fd83b37479a",r5="UnverifyModalPopup-module__mbTwenty__a83bd8565e7849fcecc8",r8="UnverifyModalPopup-module__modalContent__c3f5d73433cd17e4b2ca",r6="UnverifyModalPopup-module__modalOverlay__e484584a1d4156799155",r4="UnverifyModalPopup-module__otpFooter__eae23fc84b3ec21b6c03",r9="UnverifyModalPopup-module__otpTimer__f06a64850f3306ea2686",r7="UnverifyModalPopup-module__otpTimerText__a9ff2d15a1c12af42e26",ne="UnverifyModalPopup-module__otpVerificationText__a55a6b9429d54145c5dc",nt="UnverifyModalPopup-module__posCenter__ea26599098dfcf4c99a3",nr="UnverifyModalPopup-module__resendOtp__d3e6526c3acaa8d70988",nn="UnverifyModalPopup-module__resendOtpInActive__a5e2fd463c6ba44e065c",no="UnverifyModalPopup-module__spin__e6d035806923f8b1d96d",ni="UnverifyModalPopup-module__termsAndConditionWrapper__cc91bfc1f396df8f1a75",na="UnverifyModalPopup-module__termsText__a0c76ab88d7709638575",nl="UnverifyModalPopup-module__textBlue__e0241528d62aae3fe310",nu="UnverifyModalPopup-module__textBlueHeader__d4ddeb6396cd834c9a97",nc="UnverifyModalPopup-module__textBlueTimer__c845ea80e81194eae115";function ns(t){return(ns="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function nf(){nf=function(){return r};var t,r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,n){t[r]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,r,n){return Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,n){return t[r]=n}}function f(r,n,o,a){var l,u,c=Object.create((n&&n.prototype instanceof v?n:v).prototype);return i(c,"_invoke",{value:(l=new N(a||[]),u=h,function(n,i){if
vendor: 4,441 bytes, line 1
1(u===p)throw Error("Generator is already running");if(u===m){if("throw"===n)throw i;return{value:t,done:!0}}for(l.method=n,l.arg=i;;){var a=l.delegate;if(a){var c=function r(n,o){var i=o.method,a=n.iterator[i];if(a===t)return o.delegate=null,"throw"===i&&n.iterator.return&&(o.method="return",o.arg=t,r(n,o),"throw"===o.method)||"return"!==i&&(o.method="throw",o.arg=TypeError("The iterator does not provide a '"+i+"' method")),y;var l=d(a,n.iterator,o.arg);if("throw"===l.type)return o.method="throw",o.arg=l.arg,o.delegate=null,y;var u=l.arg;return u?u.done?(o[n.resultName]=u.value,o.next=n.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,y):u:(o.method="throw",o.arg=TypeError("iterator result is not an object"),o.delegate=null,y)}(a,l);if(c){if(c===y)continue;return c}}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(u===h)throw u=m,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);u=p;var s=d(r,o,l);if("normal"===s.type){if(u=l.done?m:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:l.done}}"throw"===s.type&&(u=m,l.method="throw",l.arg=s.arg)}})}),c}function d(t,r,n){try{return{type:"normal",arg:t.call(r,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=f;var h="suspendedStart",p="executing",m="completed",y={};function v(){}function g(){}function b(){}var _={};s(_,l,function(){return this});var w=Object.getPrototypeOf,E=w&&w(w(P([])));E&&E!==n&&o.call(E,l)&&(_=E);var x=b.prototype=v.prototype=Object.create(_);function S(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function O(t,r){var n;i(this,"_invoke",{value:function(i,a){function l(){return new r(function(n,l){(function n(i,a,l,u){var c=d(t[i],t,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==ns(f)&&o.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,l,u)},function(t){n("throw",t,l,u)}):r.resolve(f).then(function(t){s.value=t,l(s)},function(t){return n("throw",t,l,u)})}u(c.arg)})(i,a,n,l)})}return n=n?n.then(l,l):l()}})}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function P(r){if(r||""===r){var n=r[l];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function n(){for(;++i<r.length;)if(o.call(r,i))return n.value=r[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw TypeError(ns(r)+" is not iterable")}return g.prototype=b,i(x,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},S(O.prototype),s(O.prototype,u,function(){return this}),r.AsyncIterator=O,r.async=function(t,n,o,i,a){void 0===a&&(a=Promise);var l=new O(f(t,n,o,i),a);return r.isGeneratorFunction(n)?l:l.next().then(function(t){return t.done?t.value:l.next()})},S(x),s(x,c,"Generator"),s(x,l,function(){return this}),s(x,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),n=[];for(var o in r)n.push(o);return n.reverse(),function t(){for(;n.length;){var o=n.pop();if(o in r)return t.value=o,t.done=!1,t}return t.done=!0,t}},r.values=P,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function i(o,i){return u.type="throw",u.arg=r,n.next=o,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a],u=l.completion;if("root"===l.tryLoc)return i("end");if(l.tryLoc<=this.prev){var c=o.call(l,"catchLoc"),s=o.call(l,"finallyLoc");
1if(c&&s){if(this.prev<l.catchLoc)return i(l.catchLoc,!0);if(this.prev<l.finallyLoc)return i(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return i(l.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return i(l.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var l=a?a.completion:{};return l.type=t,l.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(l)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(r,n,o){return this.delegate={iterator:P(r),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function nd(t,r,n,o,i,a,l){try{var u=t[a](l),c=u.value}catch(t){return void n(t)}u.done?r(c):Promise.resolve(c).then(o,i)}function nh(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,a,l,u=[],c=!0,s=!1;try{if(a=(n=n.call(t)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=a.call(n)).done)&&(u.push(o.value),u.length!==r);c=!0);}catch(t){s=!0,i=t}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return u}}(t,r)||function(t,r){if(t){if("string"==typeof t)return np(t,r);var n=({}).toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?np(t,r):void 0}}(t,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function np(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,o=Array(r);n<r;n++)o[n]=t[n];return o}var nm=function(t){var r,n,o=t.userUnverifiedField,i=t.styles,a=t.loading,c=t.handleSubmitForm,s=t.orgType,f=(t.orgId,t.orgInfo,t.error),d=t.loader,h=t.closeModal,p=t.authMeResp,m=nh((0,l.useState)(!1),2),y=m[0],v=m[1],g=nh((0,l.useState)(i.bgBtnNias),2),b=g[0],_=g[1],w=nh((0,l.useState)(i.bgBtnNias),2),E=w[0],x=w[1],S=nh((0,l.useState)(""),2),O=S[0],L=S[1],T=nh((0,l.useState)(!1),2),N=T[0],P=T[1],j=(r=nf().mark(function t(r,n){return nf().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n.onChange(r),t.next=3,M(n.name);case 3:t.sent?(_(E),v(!1)):(_(i.errBtn),v(!0));case 5:case"end":return t.stop()}},t)}),n=function(){var t=this,n=arguments;return new Promise(function(o,i){var a=r.apply(t,n);function l(t){nd(a,o,i,l,u,"next",t)}function u(t){nd(a,o,i,l,u,"throw",t)}l(void 0)})},function(t,r){return n.apply(this,arguments)}),A=to({shouldUnregister:!0}),k=A.register,I=A.handleSubmit,F=A.formState.errors,M=A.trigger;function D(t){return document.cookie=t+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"}return(0,l.useEffect)(function(){"email"===o?(P(!0),L("Verify your email address")):"phone"===o&&L("Verify your mobile number"),x("meniit"===s?i.bgBtnMeniit:"madeeasy"===s?i.bgBtnMep:i.bgBtnNias)},[s,f,d,p,a]),u().createElement(u().Fragment,null,d&&u().createElement(ny,{styles:i}),!d&&u().createElement(u().Fragment,null,u().createElement("div",{className:i.centerByMargin},O),u().createElement("div",{className:i.commonHeading},u().createElement("span",null," ","email"==o?"VERIFY EMAIL":"VERIFY MOBILE"," ")),u().createElement("form",{className:i.formGroup,onSubmit:I(c)},function(){if("email"===o){var t,r,n=k("email",{required:"This field is required",pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i,message:"Invalid email address"}});return u().createElement("div",{key:"email",className:i.formGroup},u().createElement("label",{className:i.labelText,htmlFor:"email"},"Email",u().createElement("span",{style:{color:"red"}},"*"),u().createElement("input",{id:"email",name:n.name,onChange:function(t){return j(t,n)},onBlur:n.onBlur,ref:n.ref,defaultValue:null==p||null===(r=p.data)||void 0===r||null===(r=r.verificationDetail
1s)||void 0===r?void 0:r.email,width:"100%",className:"".concat(F.email?i.errinputBox:i.inputBox),placeholder:"Enter email address"})),F.email&&u().createElement("span",{className:i.errMsgs,style:{color:"red"}},F.email.message))}var a=k("phone",{required:"This field is required",pattern:{value:/^(?:\+91|91)?[6789]\d{9}$/,message:"Please enter a valid 10-digit number"}});return u().createElement("div",{key:"phone",className:i.formGroup},u().createElement("label",{className:i.labelText,htmlFor:"phone"},"Mobile Number",u().createElement("span",{style:{color:"red"}},"*"),u().createElement("input",{id:"phone",name:a.name,onChange:function(t){return j(t,a)},onBlur:a.onBlur,ref:a.ref,defaultValue:null==p||null===(t=p.data)||void 0===t||null===(t=t.verificationDetails)||void 0===t?void 0:t.phone,type:"tel",width:"100%",maxLength:"10",className:"".concat(F.phone?i.errinputBox:i.inputBox),placeholder:"Enter mobile number(10 digits)"})),F.phone?u().createElement("span",{className:i.errMsgs,style:{color:"red"}}," ",F.phone.message):u().createElement("span",{style:{color:"red"}},f||""))}(),u().createElement("button",{className:"".concat(i.btnSubmit," ").concat(a?i.loading:""," ").concat(b),type:"submit",disabled:a||y},a&&u().createElement(ti,{show:!0,size:"small"}),u().createElement("span",{className:"".concat(a?i.hiddenText:"")},"SEND OTP"))),N&&u().createElement("div",{onClick:function(){localStorage.setItem("emailSkip",!0),h()},style:{cursor:"pointer",width:"100%",textAlign:"right"}},u().createElement("p",null,"skip >")),f&&u().createElement("span",{className:i.errMsgs,style:{color:"red",marginBottom:"10px",textAlign:"center"}},f),"phone"===o?u().createElement("div",{onClick:function(){window.localStorage.clear(),D("userDamsToken"),D("zigyanAuthToken"),D("userToken"),window.location.href="/"},style:{width:"100%",textAlign:"center",cursor:"pointer"}},"Login with another account >"," "):""))},ny=function(t){var r=t.styles;return u().createElement("div",{className:r.posCenter},u().createElement("div",{className:r.loader}))};function nv(t){return(nv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ng(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,o)}return n}function nb(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?ng(Object(n),!0).forEach(function(r){(function(t,r,n){var o;(o=function(t){if("object"!=nv(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=nv(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r),(r="symbol"==nv(o)?o:o+"")in t)?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n})(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ng(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function n_(){n_=function(){return r};var t,r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,n){t[r]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,r,n){return Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,n){return t[r]=n}}function f(r,n,o,a){var l,u,c=Object.create((n&&n.prototype instanceof v?n:v).prototype);return i(c,"_invoke",{value:(l=new N(a||[]),u=h,function(n,i){if(u===p)throw Error("Generator is already running");if(u===m){if("throw"===n)throw i;return{value:t,done:!0}}for(l.method=n,l.arg=i;;){var a=l.delegate;if(a){var c=function r(n,o){var i=o.method,a=n.iterator[i];if(a===t)return o.delegate=null,"throw"===i&&n.iterator.return&&(o.method="return",o.arg=t,r(n,o),"throw"===o.method)||"return"!==i&&(o.method="throw",o.arg=TypeError("The iterator does not provide a '"+i+"' method")),y;var l=d(a,n.iterator,o.arg);if("throw"===l.type)return o.method="throw",o.arg=l.arg,o.delegate=null,y;var u=l.arg;return u?u.done?(o[n.resultName]=u.value,o.next=n.nextLoc,"return"!==o.method&&(o.method="next",o.arg=t),o.delegate=null,y):u:(o.method="throw",o.arg=TypeError("iterator result is not an object"),o.delegate=null,y)}(a,l);if(c){if(c===y)continue;return c}}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if(u===h)throw u=m,l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);u=p;var s=d(r,o,l);if("normal"===s.type){if(u=l.done?m:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:l.done}}"throw"===s.type&&(u=m,l.method="throw",l.arg=s.arg)}})}),c}function d(t,r,n){try{return{type:"normal",arg:t.call(r,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=f;var h="suspendedStart",p="executing",m="completed",y={};function v(){}function g(){}function b(){}var _={};s(_,l,function(){return this});var w=Object.getPrototypeOf,E=w&&w(w(P([])));E&&E!==n&&o.call(E,l)&&(_=E);var x=b.prototype=v.prototype=Object.create(_);function S(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function O(t,r){var n;i(this,"_invoke",{value:function(i,a){function l(){return new r(function(n,l){(function n(i,a,l,u){var c=d(t[i],t,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==nv(f)&&o.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,l,u)}
vendor: 4,099 bytes, line 1
1,function(t){n("throw",t,l,u)}):r.resolve(f).then(function(t){s.value=t,l(s)},function(t){return n("throw",t,l,u)})}u(c.arg)})(i,a,n,l)})}return n=n?n.then(l,l):l()}})}function L(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function P(r){if(r||""===r){var n=r[l];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var i=-1,a=function n(){for(;++i<r.length;)if(o.call(r,i))return n.value=r[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw TypeError(nv(r)+" is not iterable")}return g.prototype=b,i(x,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,c,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,s(t,c,"GeneratorFunction")),t.prototype=Object.create(x),t},r.awrap=function(t){return{__await:t}},S(O.prototype),s(O.prototype,u,function(){return this}),r.AsyncIterator=O,r.async=function(t,n,o,i,a){void 0===a&&(a=Promise);var l=new O(f(t,n,o,i),a);return r.isGeneratorFunction(n)?l:l.next().then(function(t){return t.done?t.value:l.next()})},S(x),s(x,c,"Generator"),s(x,l,function(){return this}),s(x,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),n=[];for(var o in r)n.push(o);return n.reverse(),function t(){for(;n.length;){var o=n.pop();if(o in r)return t.value=o,t.done=!1,t}return t.done=!0,t}},r.values=P,N.prototype={constructor:N,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!r)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function i(o,i){return u.type="throw",u.arg=r,n.next=o,i&&(n.method="next",n.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a],u=l.completion;if("root"===l.tryLoc)return i("end");if(l.tryLoc<=this.prev){var c=o.call(l,"catchLoc"),s=o.call(l,"finallyLoc");if(c&&s){if(this.prev<l.catchLoc)return i(l.catchLoc,!0);if(this.prev<l.finallyLoc)return i(l.finallyLoc)}else if(c){if(this.prev<l.catchLoc)return i(l.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return i(l.finallyLoc)}}}},abrupt:function(t,r){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var l=a?a.completion:{};return l.type=t,l.arg=r,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(l)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),y},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),y}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(r,n,o){return this.delegate={iterator:P(r),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),y}},r}function nw(t,r,n,o,i,a,l){try{var u=t[a](l),c=u.value}catch(t){return void n(t)}u.done?r(c):Promise.resolve(c).then(o,i)}function nE(t){return function(){var r=this,n=arguments;
1return new Promise(function(o,i){var a=t.apply(r,n);function l(t){nw(a,o,i,l,u,"next",t)}function u(t){nw(a,o,i,l,u,"throw",t)}l(void 0)})}}function nx(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,a,l,u=[],c=!0,s=!1;try{if(a=(n=n.call(t)).next,0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=a.call(n)).done)&&(u.push(o.value),u.length!==r);c=!0);}catch(t){s=!0,i=t}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw i}}return u}}(t,r)||function(t,r){if(t){if("string"==typeof t)return nS(t,r);var n=({}).toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nS(t,r):void 0}}(t,r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nS(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,o=Array(r);n<r;n++)o[n]=t[n];return o}nm.propTypes={styles:s().object.isRequired,loading:s().bool.isRequired,handleSubmitForm:s().func.isRequired,orgType:s().string.isRequired,orgId:s().string.isRequired,error:s().string.isRequired};var nO=function(t){t.toggleModal;var r=t.text,n=t.orgInfo;console.log("unverified modal with missing field ",r,t.missingField);var o,i=nx((0,l.useState)(!1),2),c=(i[0],i[1],nx((0,l.useState)("verifyFieldForm"),2)),s=c[0],f=c[1],d=nx((0,l.useState)(!1),2),h=d[0],p=d[1],m=nx((0,l.useState)({}),2),y=m[0],v=m[1],g=nx((0,l.useState)(""),2),b=g[0],_=g[1],w=nx((0,l.useState)(),2),E=w[0],x=w[1],S=nx((0,l.useState)(!0),2),O=S[0],L=S[1],T=nx((0,l.useState)({}),2),N=T[0],P=T[1],j=nx((0,l.useState)(!0),2),A=j[0],k=j[1],I=nx((0,l.useState)(""),2),F=I[0],M=I[1],D=nx((0,l.useState)(!!(o=window.localStorage.getItem("userAuth"))&&!(!(o=JSON.parse(o)).isEmailVerified||!o.isPhoneVerified)),2),B=D[0],C=D[1],V=nx((0,l.useState)(!1),2),G=V[0],U=V[1];(0,l.useEffect)(function(){B||Y(tm(n.orgId,tv("userToken")))},[]);var R,q,z,W,Y=(R=nE(n_().mark(function t(r){var n;return n_().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,td("".concat("https://apicore.madeeasy.in/api/v1","/auth/me"),{method:"GET",headers:r},function(t){console.log("auth/me ",t),k(!1)});case 2:n=t.sent,k(!1),P(n),1==n.success&&x(n.data.verificationDetails.isPhoneVerified?n.data.verificationDetails.isEmailVerified?"":"email":"phone");case 7:case"end":return t.stop()}},t)})),function(t){return R.apply(this,arguments)}),H=function(){L(!1)},$=(q=nE(n_().mark(function t(r){var o,i,a,l;return n_().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,td("".concat("https://apicore.madeeasy.in/api/v1","/auth/verification/send-otp"),{method:"POST",body:JSON.stringify(nb({},r)),headers:tm(n.orgId)},function(t){console.log("error sending otp",t.message)});case 3:null!=(o=t.sent)&&o.success?(p(!1),f("otp"),i={organization:n.orgId},"email"==E?i.email=null==o||null===(a=o.data)||void 0===a?void 0:a.email:i.phone=null==o||null===(l=o.data)||void 0===l?void 0:l.phone,v(i)):_(null==o?void 0:o.message),p(!1);case 5:case"end":return t.stop()}},t)})),function(t){return q.apply(this,arguments)}),Z=(z=nE(n_().mark(function t(r,o){var i,a,l,u,c;return n_().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return _(""),i=nb(nb({},y),r),t.next=4,td("".concat("https://apicore.madeeasy.in/api/v1","/auth/verify/").concat(E),{method:"POST",body:JSON.stringify(nb({},i)),headers:tm(n.orgId,tv("userToken"))},function(t){console.log("error otpVerifyRes ",t.message)});case 4:(a=t.sent).success?((c=JSON.parse(localStorage.getItem("userAuth"))).isEmailVerified=null==a||null===(l=a.data)||void 0===l||null===(l=l.verificationDetails)||void 0===l?void 0:l.isEmailVerified,c.isPhoneVerified=null==a||null===(u=a.data)||void 0===u||null===(u=u.verificationDetails)||void 0===u?void 0:u.isPhoneVerified,P(null==a?void 0:a.data),t1(c,2),C(!0),U(!0)):_(null==a?void 0:a.message),p(!1);case 7:case"end":return t.stop()}},t)})),function(t,r){return z.apply(this,arguments)});
1return B||(W="otp"===s?u().createElement(tG,{loading:h,setLoading:p,styles:a,otpPayload:y,orgType:n.organizationName,handleLoginWithOTP:Z,handleBackButton:function(t){_(""),f("verifyPopup")},orgId:n.orgId,orgInfo:n,error:b,authType:F,closeModal:H}):u().createElement(nm,{userUnverifiedField:E,styles:a,loading:h,setLoading:p,orgType:n.organizationName,handleSubmitForm:function(t){var r="";"phone"==E?(M("PHONE_VERIFICATION"),r="PHONE_VERIFICATION"):(M("EMAIL_VERIFICATION"),r="EMAIL_VERIFICATION");var o=nb({organization:n.organizationName,authType:r},t);p(!0),$(o)},orgId:n.orgId,orgInfo:n,error:b,loader:A,closeModal:H,authMeResp:N})),u().createElement("div",null,!B&&O?u().createElement("div",{role:"button",tabIndex:"0",className:r6},u().createElement("div",{role:"button",tabIndex:"0",className:r8,onClick:function(t){return t.stopPropagation()},onKeyUp:function(t){return t.stopPropagation()}},u().createElement("div",{className:"authmodalWrapper",style:"Mobile"==rm()?{paddingTop:"3rem"}:{paddingTop:"2rem"}},u().createElement("div",{className:rN},u().createElement("img",{alt:"logo",style:{height:"100%",margin:"0 auto",maxWidth:"250px",marginBottom:"10px"},className:rZ,src:n.logo}),W,"email"===E&&"otp"!==s&&u().createElement(tx,{isGoogleVerify:!0,orgId:n.orgId,handleCallBack:function(t){console.log("handleCallBack verify login cp",t),function(t){if(t.success){var r,n,o=JSON.parse(localStorage.getItem("userAuth"));o.isEmailVerified=null==t||null===(r=t.data)||void 0===r||null===(r=r.verificationDetails)||void 0===r?void 0:r.isEmailVerified,o.isPhoneVerified=null==t||null===(n=t.data)||void 0===n||null===(n=n.verificationDetails)||void 0===n?void 0:n.isPhoneVerified,P(null==t?void 0:t.data),t1(o,2),C(!0),U(!0),p(!1)}else _(null==t?void 0:t.message),p(!1)}(t)},googleMsgHandler:function(t){console.log("err",t)}}))))):"",G&&u().createElement(t8,{userAuthData:N,orgName:n.organizationName,succesMsg:"Profile completely verified!",type:3,closePopup:U}))};function nL(t){var r,n=t.toggleModal,o=void 0===n?tp:n,i=t.text,a=rT[th(null===(r=window)||void 0===r?void 0:r.location.hostname)]||null;return u().createElement(l.StrictMode,null,u().createElement(rL,{toggleModal:o},u().createElement(d,{clientId:"141035980421-0q7ruio0h2lp5ai53dc5jclg3abhvmsj.apps.googleusercontent.com"},u().createElement(rO,{toggleModal:o,text:i,orgInfo:a}))))}function nT(t){var r,n=t.toggleModal,o=t.text,i=rT[th(null===(r=window)||void 0===r?void 0:r.location.hostname)]||null;return u().createElement(l.StrictMode,null,u().createElement(rL,{toggleModal:n},u().createElement(d,{clientId:"141035980421-0q7ruio0h2lp5ai53dc5jclg3abhvmsj.apps.googleusercontent.com"},u().createElement(nO,{text:o,orgInfo:i}))))}nO.propTypes={toggleModal:s().func.isRequired,text:s().string.isRequired,orgInfo:s().object.isRequired},nL.propTypes={toggleModal:s().func.isRequired,text:s().string.isRequired},nT.propTypes={toggleModal:s().func.isRequired,text:s().string.isRequired}})(),i})(),t.exports=o(n(96540))}}]);
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.