1"use strict";(self.webpackChunkravvoo=self.webpackChunkravvoo||[]).push([[8540],{16924(e,t,o){o(9950);var i=o(62894),s=o(64609),n=o(44517),l=o(44414);const r=e=>{let t=e.children;const o=(0,n.Zp)();return(0,l.jsx)("div",{className:"flex justify-center items-center flex-col min-h-screen",children:(0,l.jsxs)("div",{className:"relative bg-white p-3 rounded-xl min-h-[50vh] w-full sm:min-h-[50vh] sm:w-[60vw] lg:w-[50vw] xl:w-[40vw] ",children:[(0,l.jsx)("div",{className:"flex rounded-xl bg-blue-10 justify-center py-6 sm:py-8",children:(0,l.jsx)(i.A,{className:"h-16 sm:h-20 lg:h-24",src:s.b.Logo})}),t,(0,l.jsx)("div",{className:"flex absolute bg-white top-6 left-6 sm:left-8 justify-center items-center ",children:(0,l.jsx)(i.A,{onClick:()=>o(-1),src:s.b.ICONS.NavArrow,className:"w-[48px] sm:w-[44px] h-[40px] cursor-pointer"})})]})})};o.d(t,["A",0,r])},55831(e,t,o){var i=o(89379),s=o(53986),n=o(91467),l=o(16985),r=o(48385),a=o(24877);const c=["mutationKey","onSuccess","onError"];o.d(t,["$",0,e=>{let t=e.mutationKey,o=e.onSuccess,d=e.onError,u=(0,s.A)(e,c);const m=(0,a.A)((0,i.A)({mutationKey:t,onSuccess:o,onError:d},u)),g=m.mutate;return{subscribe:async e=>{let t=e.topic,o=e.tokens,i=void 0===o?[]:o;try{const e={myObj:{topic:t,tokens:i.length>0?i:[await(0,r.mT)()]},url:l.Y.COMMON.TOPIC_SUBSCRIBE,method:n.J.POST};g(e)}catch(s){console.error("Error subscribing to topic:",s)}},isLoading:m.isLoading,isSuccess:m.isSuccess,isError:m.isError}}])},58540(e,t,o){o.r(t),o.d(t,{default:()=>I});var i=o(89379),s=o(5544),n=o(9950),l=o(10300),r=o(44517),a=o(55030),c=o(16924),d=o(37797),u=o(16985),m=o(91467),g=o(55620),v=o(81699),p=o(64609),h=o(65369),_=o(74635),x=o(44414);const S=e=>{let t=e.loading,o=e.onClick,i=e.iconSrc,s=e.alt,n=void 0===s?"icon":s,l=e.children,r=void 0===l?(0,_.t)("WELCOME.SignIn"):l,a=e.className,c=void 0===a?"":a,d=e.imageClassName,u=void 0===d?"":d,m=e.style,g=void 0===m?{}:m,v=e.disabled,p=void 0!==v&&v;return(0,x.jsxs)(h.A,{loading:t,type:"ghost",onClick:o,disabled:p,className:"\n relative flex items-center justify-center w-full max-w-sm h-14 border-grey-10 border-2 rounded-xl bg-white text-black font-medium transition duration-200 hover:shadow-md disabled:opacity-60\n ".concat(c,"\n "),style:g,children:[i&&(0,x.jsx)("img",{src:i,alt:n,className:" absolute left-5 mr-3 ".concat(u)}),(0,x.jsx)("span",{className:"px-8 text-center truncate max-w-[calc(100%-40px)]",children:r})]})};var b=o(24877),A=o(35127),E=o(55831),N=o(97490),f=o(48385);const I=()=>{const e=(0,r.Zp)(),t=(0,l.wA)(),o=(0,a.Bd)().t,h=n.useState(null),_=(0,s.A)(h,2),I=_[0],C=_[1];console.log("error",I);const T=localStorage.getItem("Lang"),y=n.useState({google:!1,apple:!1,phone:!1}),j=(0,s.A)(y,2),w=j[0],O=j[1],k=["userid"],H=(0,E.$)({mutationKey:g.L.COMMON.TOPIC_SUBSCRIBE,onSuccess:()=>{},onError:e=>{console.error("Failed to subscribe to topic:",e)}}),U=H.subscribe,L=(0,b.A)({mutationKey:g.L.AUTH.SOCIAL_LOGIN,onSuccessCallback:async i=>{var s;const n=null===i||void 0===i?void 0:i.data;k.forEach((e=>{U({topic:e.replace("userid",null===n||void 0===n?void 0:n._id)})}));const l={useremail:null===n||void 0===n?void 0:n.email,userPhn:null===n||void 0===n?void 0:n.phone_number,countryCode:null===n||void 0===n?void 0:n.country_code};(0,d.A)("s",o("SignIn.ErrorTitle")),localStorage.setItem("authToken",null===n||void 0===n?void 0:n.token),t((0,N.IT)(n)),t((0,N.mZ)(l));const r=null===n||void 0===n?void 0:n.phone_number,a=null===n||void 0===n?void 0:n.is_phone_verified,c=null===n||void 0===n?void 0:n.is_email_verified,u=null===n||void 0===n?void 0:n.first_name,m=null===n||void 0===n?void 0:n.email,g=null===n||void 0===n?void 0:n.dob,p=null===n||void 0===n||null===(s=n.location)||void 0===s?void 0:s.name,h=null===n||void 0===n?void 0:n.gender,_=null===n||void 0===n?void 0:n.media,x=null===n||void 0===n?void 0:n.bio;n?r?r&&!a?e("".concat(v.E.AUTH.SIGN_WITH_PHONE,"?isSocial=true"),{replace:!0}):m&&!c?e(v.E.AUTH.SIGN_WITH_EMAIL,{replace:!0}):c?u&&m&&g&&h?p?!_||_.length<=0?e(v.E.AUTH.CREATE_ACCOUNT,{replace:!0}):x?(t((0,N.MX)(null===n||void 0===n?void 0:n.token)),e(v.E.PROTECTED.EVENT_FEED.HOME,{replace:!0})):e(v.E.AUTH.BIO,{replace:!0}):e(v.E.AUTH.MAP,{replace:!0}):e(v.E.AUTH.CREATE_ACCOUNT,{replace:!0}):e(v.E.AUTH.SIGN_WITH_EMAIL,{replace:!0}):e("".concat(v.E.AUTH.SIGN_WITH_PHONE,"?isSocial=true"),{replace:!0}
1):e(v.E.AUTH.SIGNIN,{replace:!0})},onErrorCallback:e=>{C(e.message||"Failed to authenticate with server"),O({google:!1,apple:!1,phone:!1})}}),P=L.mutate,M=async(e,s)=>{O((e=>(0,i.A)((0,i.A)({},e),{},{[s]:!0})));try{const o=String((0,A.bP)());sessionStorage.setItem("deviceId",o);const n=await(0,f.l3)(e),l=null===n||void 0===n?void 0:n.user;let r="",a="";const c=(null===l||void 0===l?void 0:l.displayName)||"";if(c){const e=c.trim().split(/\s+/);e.length>0&&(r=e[0],e.length>1&&(a=e.slice(1).join(" ")))}const d=await(0,f.mT)();localStorage.setItem("providerType",s),t((0,N.Ft)(s));const g=e=>e?e.charAt(0).toUpperCase()+e.slice(1):e,v={myObj:{fcm_tokens:[d],email:null===l||void 0===l?void 0:l.email,login_source:s,social_auth:null===l||void 0===l?void 0:l.uid,first_name:g(r),last_name:g(a),os_type:(0,A.uo)(),device_id:o,language:T},url:u.Y.AUTH.SOCIAL_LOGIN,method:m.J.POST};P(v,{onSuccess:()=>{"google.com"===(null===e||void 0===e?void 0:e.providerId)&&null!==n&&void 0!==n&&n.accessToken&&t((0,N.IV)(n.accessToken))},onSettled:()=>{O((e=>(0,i.A)((0,i.A)({},e),{},{[s]:!1})))},onErrorCallback:e=>{O({google:!1,apple:!1,phone:!1})},onError:()=>{O({google:!1,apple:!1,phone:!1})}})}catch(n){console.error("Login error:",n),O((e=>(0,i.A)((0,i.A)({},e),{},{[s]:!1}))),"auth/popup-closed-by-user"===n.code?(O((e=>(0,i.A)((0,i.A)({},e),{},{[s]:!1}))),(0,d.A)("e",o("SignIn.Des"))):C(n.message||o("SignIn.Des"))}finally{O((e=>(0,i.A)((0,i.A)({},e),{},{[s]:!1})))}};return n.useEffect((()=>{const e=(0,f.hg)(f.j2,(e=>{e?console.log("User is signed in:",e):console.log("User is signed out")}));return()=>e()}),[]),n.useEffect((()=>{(async()=>{f.j2.currentUser&&await(0,f.BP)()})()}),[]),n.useEffect((()=>{const e=new URLSearchParams(location.search),o={event_id:e.get("event_id"),host_id:e.get("host_id"),age_requirement:e.get("age_requirement"),invitation_id:e.get("invitation_id"),request_direction:e.get("request_direction"),request_for:e.get("request_for"),invited_phone:e.get("invited_phone"),branch_match_id:e.get("_branch_match_id"),branch_referrer:e.get("_branch_referrer"),utm_source:e.get("utm_source"),utm_campaign:e.get("utm_campaign"),utm_medium:e.get("utm_medium")};t((0,N.vO)(o))}),[]),(0,x.jsx)("div",{className:"px-2",children:(0,x.jsxs)(c.A,{children:[(0,x.jsx)("div",{children:(0,x.jsx)("p",{className:"text-title20 sm:titleMedium text-center pt-5 font-semibold",children:o("getStarted.title")})}),(0,x.jsxs)("div",{className:"flex flex-col justify-center items-center space-y-3 mt-10",children:[(0,x.jsx)(S,{disabled:w.google,loading:w.google,onClick:()=>M(f.hJ,"google"),imageClassName:"h-5",iconSrc:p.b.ICONS.Googleicon,children:o("getStarted.googleSignIn")}),(0,x.jsx)(S,{disabled:w.apple,loading:w.apple,onClick:()=>M(f.sm,"apple"),className:"h-14",imageClassName:"h-6",iconSrc:p.b.ICONS.Appleicon,children:o("getStarted.appleSignIn")}),(0,x.jsx)(S,{iconSrc:p.b.ICONS.PhoneIcon,imageClassName:"h-5",onClick:()=>{O((e=>(0,i.A)((0,i.A)({},e),{},{phone:!0}))),e(v.E.AUTH.SIGN_WITH_PHONE)},disabled:w.phone,loading:w.phone,children:(0,x.jsx)("p",{className:"sm:ml-0 text-center text-wrap break-words",children:o("getStarted.phoneSignIn")})})]}),(0,x.jsx)("div",{className:"w-full text-center flex justify-center items-baseline",children:(0,x.jsxs)("p",{className:"px-2 sm:px-0 max-w-sm text-center text-title16 text-grey-20 mt-14",children:[(0,x.jsx)("span",{children:o("getStarted.terms1")})," ",(0,x.jsx)("span",{className:"text-black-100",children:o("getStarted.termsHighLight")})," ",(0,x.jsx)("span",{children:o("getStarted.terms")})]})})]})})}}}]);
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.