PageSourceSearch

https://assets.thriva.co/_nuxt/CYO8mary2.js

js thriva.co collected 2026-10-02 06:18:27 UTC 5,668 bytes, 1 lines download raw bytes

1try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`a3fc5dab-6973-46ba-8f91-e8d34b12560e`,e._sentryDebugIdIdentifier=`sentry-dbid-a3fc5dab-6973-46ba-8f91-e8d34b12560e`)}catch{}import{D as e,E as t,Kt as n,On as r,_ as i,b as ee,et as te,g as a,k as o,mt as s,qt as c,un as l,v as u,vn as d,y as f}from"./CXDca9_m.js";import{S as ne}from"./D5UmnfXk.js";import{f as p,p as m,u as h}from"./COMVtrDw.js";import{n as g}from"./BXgSEs-W.js";import{t as _}from"./pZo_8pjJ.js";import{t as v}from"./yS7wEJZs.js";import{t as y}from"./CWMCmEHJ.js";import{t as b}from"./BL-fWKSB.js";import{i as x,n as S}from"./Cn2r1YpA2.js";import"./D04K1jXV2.js";import{t as C}from"./CseG8nM_.js";import{a as w,kt as T,t as E,vt as re}from"./vsQU50f6.js";import{t as ie}from"./MEz9Bhd_.js";import{n as ae,t as oe}from"./KZdTU5eB.js";import{t as se}from"./DXnqiXcU2.js";import{t as ce}from"./BnCpoUSs.js";import{t as le}from"./TFi2FWu42.js";import{t as D}from"./D2Q6WcRs2.js";import{n as O,t as k}from"./DDmERE2e.js";var A={class:`md_pt-4xl pb-sm md_pb-2xl px-sm md_px-xl`},j={class:`md_bg-white mx-auto pt-md md_p-lg md_grid rounded-lg md_rounded-2xl max-w-[53rem] grid-cols-[4fr_3fr]`},M={class:`md_border-r border-border-utility-light md_pr-lg md_mr-lg`},N={role:`alert`},P={class:`md_grid place-items-center bg-white px-md pb-md md_p-none rounded-b-lg`},F=o({__name:`login`,async setup(o){let F,I,L=y(`Login`);le({layout:`focused`}),g({title:`Log in`});let R=m(),z=p(),{host:B}=v(),V=z.query.redirectTo?.toString(),{testShopProduct:H,genericShopProducts:U}=k(),W=b(),ue=E(re({emailAddress:T().min(1,`Required`).email(),password:T().min(1,`Required`)})),{defineField:de,handleSubmit:fe,errors:G,isFieldTouched:pe}=w({validationSchema:ue,initialValues:{emailAddress:``,password:``}}),[K,me]=de(`password`),he=a(()=>{let e={};return V&&(e.redirectTo=V),H&&(e.shop_product=H.value),U&&(e.shop_products=U.value),e}),q=O(),J=d(!1),{prepareToCheckout:Y,isPending:ge,isError:X,isSuccess:_e}=ae();X.value&&console.error(`Error preparing to checkout: ${X.value}`);let{prepareGenericCheckout:Z,isPending:ve,isError:Q,isSuccess:ye}=oe();if(Q.value&&console.error(`Error preparing generic checkout: ${Q.value}`),W.value.isAuthenticated&&!R.options.history.state.requestHad401Response){if(V&&x(V,B))[F,I]=n(()=>h(V,{external:!S(V)})),await F,I();else if(H.value)try{[F,I]=n(()=>Y(H.value)),await F,I()}catch(e){L.error(`Error preparing checkout`,{},e instanceof Error?e:void 0),[F,I]=n(()=>h({name:`home`})),await F,I()}else if(U.value)try{[F,I]=n(()=>Z(U.value)),await F,I()}catch(e){L.error(`Error preparing generic checkout`,{},e instanceof Error?e:void 0),[F,I]=n(()=>h({name:`home`})),await F,I()}else[F,I]=n(()=>h({name:`home`})),await F,I()}let be=a(()=>q.isPending.value||J.value||ge.value||_e.value||ve.value||ye.value),$=fe(async e=>{try{if(await q.mutateAsync(e),J.value=!0,V&&x(V,B)){if(S(V)){R.push(V);return}window.location.assign(V);return}if(H.value){try{await Y(H.value)}catch(e){L.error(`Error preparing checkout after login`,{},e instanceof Error?e:void 0),await h({name:`home`})}return}if(U.value){try{await Z(U.value)}catch(e){L.error(`Error preparing generic checkout after login`,{},e instanceof Error?e:void 0),await h({name:`home`})}return}await h({name:`home`})}catch(e){console.error(e)}});return(n,a)=>{let o=ie,d=ce,p=D,m=C,h=_,g=se;return s(),ee(`div`,A,[i(`div`,j,[i(`div`,M,[a[6]||=i(`h1`,{class:`title-medium mb-md`},`Log in`,-1),i(`div`,N,[r(q).errorType.value===`invalidCredentials`?(s(),u(o,{key:0,class:`mb-sm md_mb-md`,sentiment:`negative`},{default:c(()=>a[2]||=[t(`Invalid email or password`)]),_:1})):r(q).errorType.value===`unknownError`?(s(),u(o,{key:1,class:`mb-sm md_mb-md`,sentiment:`negative`},{default:c(()=>a[3]||=[t(`An error occurred on our side. Please try again.`)]),_:1})):f(``,!0)]),i(`form`,{class:`bg-white pt-md px-md pb-xl md_p-none rounded-t-lg`,onSubmit:a[1]||=ne((...e)=>r($)&&r($)(...e),[`prevent`])},[e(d,{class:`mb-md`,name:`emailAddress`,placeholder:`Email address`,size:`large`,type:`email`,autocomplete:`email`}),e(p,te({class:`mb-sm`,modelValue:r(K),"onUpdate:modelValue":a[0]||=e=>l(K)?K.value=e:null},r(me),{autocomplete:`current-password`,size:`large`,placeholder:`Password`,"error-text":r(G).password,"is-error":r(pe)(`password`)&&!!r(G).password,"data-dd-privacy":`mask-user-input`}),null,16,[`modelValue`,`error-text`,`is-error`]),e(h,{to:`/forgot-password`,custom:``},{default:c(({href:n,navigate:r})=>[e(m,{class:`mb-lg md_mb-xl`,is:`a`,kind:`tertiary`,size:`medium`,href:n,onClick:r},{default:c(()=>a[4]||=[t(`Forgot your password?`)]),_:2},1032,[`href`,`onClick`])]),_:1}),e(m,{class:`block w-full`,kind:`primary`,size:`large`,"is-loading":r(be),"loading-text":`Logging in...`,type:`submit`},{default:c(()=>
1a[5]||=[t(`Log in`)]),_:1},8,[`is-loading`])],32)]),i(`div`,P,[i(`div`,null,[a[8]||=i(`h2`,{class:`title-small text-content-dark-secondary mb-2xs`},`New to Thriva?`,-1),a[9]||=i(`div`,{class:`text-content-dark-tertiary mb-md text-pretty`},`Create an account to purchase blood tests and view your results`,-1),e(h,{to:{name:`create-account`,query:r(he)},custom:``},{default:c(({href:n,navigate:r})=>[e(m,{class:`w-full text-center`,is:`a`,kind:`secondary`,size:`large`,href:n,onClick:r},{default:c(()=>a[7]||=[t(`Create an account`)]),_:2},1032,[`href`,`onClick`])]),_:1},8,[`to`])])])]),e(g,{class:`mx-auto justify-center mt-lg`,"apple-url":`https://thriva.onelink.me/lvy7/rf7u4cza`,"android-url":`https://thriva.onelink.me/lvy7/nkd4equ7`})])}}});export{F as default};

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.