import{aI as l,ao as e,b0 as A,hh as b,y as L,az as c,aj as x,bu as P,bN as j,L as I,fi as y,v as d,e as f,f as h,hi as _,p as v,g7 as E}from"./app-k0jcl5PQ.js";import{u as F,a as N,M as H,S as M,b as R,c as z}from"./CiRQuJ84.chunk.js";import{u as B,A as w}from"./ClXKCv7P.chunk.js";import{L as D}from"./CIOPWeNI.chunk.js";import{U as k}from"./Cq8Wr_gd.chunk.js";import"./CK1wYtr2.chunk.js";import"./D41e4O-3.chunk.js";import"./kLXBNYk1.chunk.js";import"./CRGucDdi.chunk.js";import"./Dh_4ebb2.chunk.js";import"./ChH5FnWn.chunk.js";import"./BCKXZxoz.chunk.js";const q="_left_b1bis_1",G="_imageContainer_b1bis_15",O="_imagePosition_b1bis_23",K="_image_b1bis_15",n={left:q,imageContainer:G,imagePosition:O,image:K};function T(t){const[o,r]=l.useState(!1);return l.useEffect(()=>{if(!t.imageUrl)return;const a=new Image;return a.onload=()=>r(!0),a.src=t.imageUrl,()=>a.onload=null},[]),e.jsx("div",{className:n.left,children:o&&e.jsx(e.Fragment,{children:e.jsx("div",{className:n.imageContainer,children:e.jsx("div",{className:n.imagePosition,children:e.jsx("img",{className:n.image,src:t.imageUrl,alt:t.title})})})})})}const V="launchpad.signUp",J=I.encloseNamespace(V);function re(t){var u;const o=A(),r=b(L.BrazeClient),a=c(x.currentUser()),g=c(P.config()),{createOrUpdateProfile:S}=F();j({title:J("title")});const s=B(),m=c((s==null?void 0:s.countryCode)&&w.globalIdps(s.countryCode,y.Primary));async function U(i){const C=await o(k.getLookups(i));return E.getCrmId(C)}const p=N();return l.useEffect(()=>{if(a.hasCompleted&&a.data.isAuthenticated){d.trigger({action:h.Dashboard.HOME,application:f.DASHBOARD,args:[null]});return}},[a]),a.hasCompleted&&!((u=a.data)!=null&&u.isAuthenticated)&&g.hasCompleted&&s&&p&&m.hasCompleted?e.jsx(D,{leftComponent:()=>e.jsx(T,{title:"Sign Up",imageUrl:"/images/sign-up/fullscreen-dashboard-v2.png"}),children:e.jsx(H,{type:z.FullPage,initialValues:{email:t.email},location:v.SignUpPage,googleMapsApiKey:g.data.googleMapsApiKey,geoLocation:s,imageUrls:R,ajaxUrls:p,productName:M.Lite,pageAppLinkString:t.pageAppLinkString,getSignInUrl:i=>d.getHref({application:f.DEFAULT,action:h.Default.CHALLENGE,params:i}),logBrazeEvent:i=>_.logBrazeEvent(r,i),globalIdps:m.data,createOrUpdateProfile:S,getCrmIdForProspect:U})}):e.jsx(e.Fragment,{})}export{re as SignUpView};
//# sourceMappingURL=DRiHml8R.chunk.js.map
