PageSourceSearch

https://deepsearchai.co/assets/UserUpdateModal-4mD6YpOS.js

js deepsearchai.co collected 2026-10-02 01:22:02 UTC 10,520 bytes, 3 lines download raw bytes

1import{j as e}from"./motion-media-DawMv428.js";import{w as U,p as D,Q as I,m as c,X as R,u as T,a6 as z,K as M,a as q,g as B,k as L,t as V,z as W,A as J}from"./index-Cz5ChEQq.js";import{r as A}from"./redux-CL95a3IE.js";import{F as Q}from"./logo-C699SkD-.js";import{m as H}from"./user-x8tAkV4a.js";import{u as G}from"./subscription-DeeMW2SB.js";import{u as X}from"./landing-flow-DgnUhZHa.js";import{u as Y}from"./media-query-C5HekP-S.js";import{u as Z}from"./ChatLayout-DvfkNHel.js";import{l as ee}from"./log-event-CZxIKv7k.js";import{c as te}from"./custom-event-push-Cu10HthM.js";import{F as h,B as g}from"./Table-DJc65YUW.js";import"./carousels-DxFOfUD6.js";import{M as ne}from"./Modal-DrrpmWM4.js";import{I as j}from"./Input-D5DSOsez.js";import{t as C}from"./ToastHelper-DWXL6ZrB.js";import{u as P,T as w}from"./i18n-BHtsDrR1.js";import{o as k,s as N}from"./forms-B9OIJNcw.js";import"./firebase-core-BKuvjIs7.js";import"./hubx-analytics-DIbwCOgs.js";import"./growth-payment-BfHadXwg.js";import"./react-vendor-D7_aQVuf.js";import"./names-BMg9Zd4j.js";import"./path-BwZy-gV3.js";import"./eventsEnum-DmAUH84c.js";import"./TrustPilotModalContext-BIGMZd-N.js";import"./firestore-DPkgl4RA.js";import"./user-preferences-DvQYfRGE.js";import"./date-format-CLwbHEFo.js";import"./pro-k0wisggv.js";import"./index-DOlDrOJ-.js";import"./cdn-urls-DubwJRq-.js";import"./MenuButton-Diy6WTv5.js";import"./saved-people-BPUg1ysB.js";import"./TypewriterAnimation-BLyl2B9Z.js";import"./conversation-remove-2gxLQyRN.js";import"./PricingPlan-6S4b70gY.js";import"./log-big-query-event-326fLlBb.js";import"./calculate-price-diff-DfAQfiNe.js";import"./logout-yp8f8JYS.js";import"./ClearAllChat.module-HVcceKro.js";import"./upsell-status-BOleBmI-.js";import"./pre-load-image-SIrk11-G.js";import"./pre-load-video-Dki3Rl-z.js";import"./content-rendering-BMcRWwGo.js";const se="_stepper_5d5wf_1",oe="_stepper__counter_5d5wf_1",ae="_stepper__item_5d5wf_1",re="_stepper__title_5d5wf_1",p={stepper:se,stepper__counter:oe,stepper__item:ae,"stepper__item--completed":"_stepper__item--completed_5d5wf_1","stepper__item--active":"_stepper__item--active_5d5wf_1",stepper__title:re,"stepper__title--active":"_stepper__title--active_5d5wf_1"},ie=({currentStep:o,steps:t})=>e.jsx("div",{className:p.stepper,children:t?.map((m,n)=>{const l=m.split(`
2`);return e.jsxs("div",{className:U(p.stepper__item,{[p["stepper__item--active"]]:n<=o,[p["stepper__item--completed"]]:n<o}),children:[e.jsx("div",{className:U(p.stepper__counter,{[p["stepper__counter--active"]]:n<=o,[p["stepper__counter--completed"]]:n<o})}),e.jsx("div",{className:U(p.stepper__title,{[p["stepper__title--active"]]:n<=o}),children:l.map(a=>e.jsx("div",{children:a},a.trim()))})]},m.trim())})}),ce=D.injectEndpoints({endpoints:o=>({updateUser:o.mutation({query:t=>({url:"/redeem/user-update",method:"POST",body:{email:t.email,userId:t.userId,fullName:t.fullName}})}),updatePassword:o.mutation({query:t=>({url:"/redeem/password-update",method:"POST",body:{userId:t.userId,password:t.password}})})})}
2),{useUpdateUserMutation:F,useUpdatePasswordMutation:me}=ce,le="_container_gnuyk_1",pe="_container__form_gnuyk_1",b={container:le,container__form:pe},de=k({name:N().min(1,"Password can't be empty.").min(3,"Must be at least 6 characters").optional()}),_e=({onSubmit:o})=>{const[t]=I(c),[m,{isLoading:n}]=F(),[l,a]=R(c),f=T(),{t:i}=P(),s=async r=>{const v=r.name;if(t?.email!==null)try{await m({email:t?.email,fullName:r.name,userId:t?.uid}).unwrap(),f(z({uid:t?.uid??"",fullName:r.name})),await l({displayName:v}),o()}catch{C.error("Something went wrong. Please try again.")}};return e.jsx("div",{className:b.container,children:e.jsx(h,{schema:de,onSubmit:s,mode:"onChange",children:e.jsxs("div",{className:b.container__form,children:[e.jsx(h.Item,{name:"name",children:e.jsx(j,{type:"text",label:i("account.profile.fullName"),name:"name",placeholder:i("account.profile.fullNamePlaceholder")})}),e.jsx(g,{size:"xl",type:"submit",className:b.container__button,loading:n||a,children:e.jsx(w,{i18nKey:"userUpdate.saveAndContinue",children:"Save & Continue"})})]})})})},ue="_container_gnuyk_1",fe="_container__form_gnuyk_1",S={container:ue,container__form:fe},he=({onSubmit:o})=>{const[t]=I(c),[m]=M(c),[n,{isLoading:l}]=me(),{t:a}=P(),f=k({password:N().trim().min(1,a("validation.passwordRequired")).min(6,a("validation.passwordMin")),confirmPassword:N().trim().min(1,a("validation.confirmPasswordRequired")).min(6,a("validation.confirmPasswordMin"))}).refine(s=>s.password===s.confirmPassword,{message:a("validation.passwordMatch"),path:["confirmPassword"]}),i=async s=>{try{await n({password:s.confirmPassword,userId:t?.uid}).unwrap(),await m(t?.email??"",s.confirmPassword),o()}catch{C.error("Something went wrong. Please try again.")}};return e.jsx("div",{className:S.container,children:e.jsx(h,{schema:f,onSubmit:i,mode:"onChange",children:e.jsxs("div",{className:S.container__form,children:[e.jsx(h.Item,{name:"password",children:e.jsx(j,{type:"password",label:a("password"),name:"password",placeholder:a("account.changePassword.newPasswordPlaceholder")})}),e.jsx(h.Item,{name:"confirmPassword",children:e.jsx(j,{type:"password",label:a("confirmPassword"),name:"confirmPassword",placeholder:a("account.changePassword.confirmPasswordPlaceholder")})}),e.jsx(g,{size:"xl",type:"submit",className:S.container__button,loading:l,children:e.jsx(w,{i18nKey:"userUpdate.saveAndContinue",children:"Save & Continue"})})]})})})},we="_container_gnuyk_1",xe="_container__form_gnuyk_1",$={container:we,container__form:xe},ye=k({email:N().trim().min(1,"Email can't be empty.").email("Invalid email format")}),ge=({onSubmit:o})=>{const[t]=I(c),[m,{isLoading:n}]=F(),[l]=M(c),{t:a}=P(),f=async i=>{if(t!=null)try{const s=await m({email:i.email,userId:t.uid}).unwrap();await l(i.email,s.data.password),o()}catch{C.error("Something went wrong. Please try again.")}};return e.jsx("div",{className:$.container,children:e.jsx(h,{schema:ye,id:"emailConfirmation",onSubmit:f,defaultValues:{email:t?.email??""},children:e.jsxs("div",{className:$.container__form,children:[e.jsx(h.Item,{name:"email",children:e.jsx(j,{type:"text",label:a("emailAddress"),name:"email"})}),e.jsx(g,{size:"xl",type:"submit",loading:n,children:e.jsx(w,{i18nKey:"userUpdate.saveAndContinue",children:"Save & Continue"})})]})})})},ve="_modal_1tddv_1",je="_container_1tddv_1",Ne="_container__logo_1tddv_1",Pe="_container__component_1tddv_1",Ue="_container__title_1tddv_1",be="_container__description_1tddv_1",d={modal:ve,container:je,"container__logo-content":"_container__logo-content_1tddv_1",container__logo:Ne,container__component:Pe,container__title:Ue,container__description:be,"container__skip-button":"_container__skip-button_1tddv_1"},Se="_container_x8kuy_1",Ie="_container__content_x8kuy_1",Ce="_container__title_x8kuy_1",ke="_container__description_x8kuy_1",Ee="_container__button_x8kuy_1",y={container:Se,container__content:Ie,container__title:Ce,container__description:ke,container__button:Ee},Ae=({onSubmit:o})=>e.jsxs("div",{className:y.container,children:[e.jsxs("div",{className:y.container__content,children:[e.jsx("h3",{className:y.container__title,children:e.jsx(w,{i18nKey:"onboarding.step1.title",children:"Unlock the Full Picture of Anyone Online"})}),e.jsx("p",{className:y.container__description,children:e.jsx(w,{i18nKey:"onboarding.step1.description",children:"Discover social media profiles, photos, videos, and professional details instantly!"})})]}),e.jsx(g,{onClick:o,size:"xl",className:y.container__button,children:e.jsx(w,{i18nKey:"continueButton",children:"Continue"})})]}),Pt=({onClose:o})=>{const{path:t}=X(),m=T(),{t:n}=P(),l=Y("(max-width: 800px)"),[a,f]=Z("landing-meta"),{userInfo:i}=q(B),{data:s}=G("subscription"),[r,v]=A.useState(()=>{const u=localStorage.getItem("step");return u!=null?parseInt(u,10):0}),E=()=>{te({event_name:"after_purchase_info_v2",currency:s?.currencyCode,amount:s?.items[0]?.price?.unitPrice.amount??"",product_id:s?.items[0]?.price?.id??"",paywallType:t??"in_app",UserInfo:JSON.stringify({email:c.currentUser?.email??"",fullName:i?.fullName??""})}),ee("after_purchase_info",{currency:s?.currencyCode,amount:Number(s?.items[0]?.price?.unitPrice.amount)??0,product_id:s?.items[0]?.price?.id??"",UserInfo:JSON.stringify({email:c.currentUser?.email??"",fullName:i?.fullName??""})}),W({eventName:J.CommonEventsEnum.AFTER_PURCHASE_INFO,event_params:{currency:s?.currencyCode,amount:Number(s?.items[0]?.price?.unitPrice.amount)??0,product_id:s?.items[0]?.price?.id??"",paywallType:t??"in_app",UserInfo:JSON.stringify({email:c.currentUser?.email??"",fullName:i?.fullName??""})}})},x=()=>
2{if(r===_.length-1){E(),localStorage.removeItem("step"),f(!1),o?.();return}if(c.currentUser!==null&&(_[r].updateUser??!1)){const K=H(c.currentUser);m(V(K))}const u=r+1;v(u),localStorage.setItem("step",u.toString())},O=()=>{const u=r+1;v(u),localStorage.setItem("step",u.toString())},_=[{component:e.jsx(ge,{onSubmit:x}),title:n("userUpdate.emailVerification.title"),description:n("userUpdate.emailVerification.description"),updateUser:!0},{component:e.jsx(he,{onSubmit:x}),title:n("userUpdate.createPassword.title"),description:n("userUpdate.createPassword.description")},{component:e.jsx(_e,{onSubmit:x}),title:n("userUpdate.accountDetail.title"),description:n("userUpdate.accountDetail.description"),optional:!0,updateUser:!0},{component:e.jsx(Ae,{onSubmit:x}),title:`${n("userUpdate.getStarted.title")} ${L.name}`}];return A.useEffect(()=>{t==="landing-meta"&&localStorage.setItem("step",r.toString())},[t,r]),e.jsx(ne,{className:d.modal,fullscreen:l,width:427,closedButton:r<_.length-1,open:a??!1,overlayClose:!1,onClose:()=>{x()},content:e.jsxs("div",{className:d.container,children:[r<_.length-1?e.jsx(ie,{currentStep:r,steps:[n("userUpdate.emailVerification.name"),n("userUpdate.createPassword.name"),n("userUpdate.accountDetail.name"),n("userUpdate.getStarted.name")]}):e.jsx("div",{className:d["container__logo-content"],children:e.jsx(Q,{className:d.container__logo})}),e.jsx("div",{children:e.jsxs("div",{className:d.container__component,children:[e.jsxs("div",{className:d["container__title-area"],children:[e.jsx("h2",{className:d.container__title,children:_[r].title}),e.jsx("p",{className:d.container__description,children:_[r].description})]}),_[r].component,(_[r].optional??!1)&&e.jsx(g,{className:d["container__skip-button"],onClick:O,variant:"nostyle",children:n("userUpdate.skip")})]})})]})})};export{Pt as UserUpdateModal};
3//# sourceMappingURL=UserUpdateModal-4mD6YpOS.js.map

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.