import{r as e}from"./rolldown-runtime-DIIn1E2Q.js";import{K as t,ct as n}from"./vendor-primevue-DyvCA8Nd.js";import"./vendor-firebase-yTFzdAQf.js";import{A as r,F as i,Ht as a,I as o,Lt as s,O as c,Ot as l,R as u,Z as d,_t as f,a as p,et as m,j as h,k as g,o as _}from"./vendor-vue-core-IZuWV8u3.js";import"./vendor-other-Q0G0D0d6.js";import{t as v}from"./types-Bc3W4AWd.js";import"./useFeatureFlags-BfqxvwHy.js";import{Ot as y}from"./api-C840HmAF.js";import"./vendor-markdown-8POvMhty.js";import"./colorUtil-Q3kaA72Z.js";import{n as b}from"./vendor-i18n-NwyZMF0q.js";import"./i18n-B8CRKNXU.js";import{t as x}from"./telemetry-B10ff63e.js";import"./vendor-reka-ui-Dfvl2gA8.js";import{t as S}from"./Button-uSZXZovG.js";import{U as C,_r as w}from"./dialogService-J-k0CeI4.js";import"./systemStatsStore-BJOd4X3d.js";import{t as T}from"./_plugin-vue_export-helper-D8rLfeal.js";import"./userStore-o2bxxBJt.js";import"./useErrorHandling-t4kNWELW.js";import"./vendor-tiptap-BZCaYoPl.js";import"./Popover-BV6_S20i.js";import"./markdownRendererUtil-DH1PCfUd.js";import"./useExternalLink-Cxwyf6Kb.js";import"./signInSchema-BMYA3BDA.js";import"./PasswordFields-D0_uh31-.js";import{t as E}from"./SignUpForm-fN2TxV1T.js";import{t as D}from"./previousFullPath-BPHboocI.js";var O={class:`flex h-full items-center justify-center p-8`},k={class:`max-w-screen p-2 lg:w-96`},A={class:`mb-8 flex flex-col gap-4`},j={class:`my-0 text-xl leading-normal font-medium`},M={class:`my-0 text-base`},N={class:`text-muted`},P={class:`text-muted`},F={class:`flex flex-col gap-6`},I={class:`mt-5 text-sm text-gray-600`},L={href:`https://www.comfy.org/terms-of-service`,target:`_blank`,class:`cursor-pointer text-blue-400 no-underline`},R={href:`/privacy-policy`,target:`_blank`,class:`cursor-pointer text-blue-400 no-underline`},z={class:`mt-2`},B={href:`https://support.comfy.org`,class:`cursor-pointer text-blue-400 no-underline`,target:`_blank`,rel:`noopener noreferrer`},V=T(u({__name:`CloudSignupView`,setup(e){let{t:u}=b(),T=_(),V=p(),H=w(),U=globalThis.isSecureContext,W=l(``),G=l(!1),K=y(),navigateToLogin=async()=>{await T.push({name:`cloud-login`,query:V.query})},onSuccess=async()=>{K.add({severity:`success`,summary:`Sign up Completed`,life:2e3});let e=D(V.query);if(e){await T.replace(e);return}await T.push({path:`/`,query:V.query})},signInWithGoogle=async()=>{W.value=``,await H.signInWithGoogle()&&await onSuccess()},signInWithGithub=async()=>{W.value=``,await H.signInWithGithub()&&await onSuccess()},signUpWithEmail=async e=>{W.value=``,await H.signUpWithEmail(e.email,e.password)&&await onSuccess()};return d(async()=>{v&&x()?.trackSignupOpened(),G.value=await C()}),(e,l)=>(m(),h(`div`,O,[c(`div`,k,[c(`div`,A,[c(`h1`,j,a(s(u)(`auth.signup.title`)),1),c(`p`,M,[c(`span`,N,a(s(u)(`auth.signup.alreadyHaveAccount`)),1),c(`span`,{class:`ml-1 cursor-pointer text-blue-500`,onClick:navigateToLogin},a(s(u)(`auth.signup.signIn`)),1)])]),s(U)?r(``,!0):(m(),g(s(n),{key:0,severity:`warn`,class:`mb-4`},{default:f(()=>[i(a(s(u)(`auth.login.insecureContextWarning`)),1)]),_:1})),G.value?(m(),g(s(n),{key:1,severity:`warn`,class:`mb-4`},{default:f(()=>[i(a(s(u)(`auth.signup.regionRestrictionChina`)),1)]),_:1})):(m(),g(E,{key:2,"auth-error":W.value,onSubmit:signUpWithEmail},null,8,[`auth-error`])),o(s(t),{align:`center`,layout:`horizontal`,class:`my-8`},{default:f(()=>[c(`span`,P,a(s(u)(`auth.login.orContinueWith`)),1)]),_:1}),c(`div`,F,[o(S,{type:`button`,class:`h-10 bg-[#2d2e32]`,variant:`secondary`,onClick:signInWithGoogle},{default:f(()=>[l[0]||=c(`i`,{class:`pi pi-google mr-2`},null,-1),i(` `+a(s(u)(`auth.signup.signUpWithGoogle`)),1)]),_:1}),o(S,{type:`button`,class:`h-10 bg-[#2d2e32]`,variant:`secondary`,onClick:signInWithGithub},{default:f(()=>[l[1]||=c(`i`,{class:`pi pi-github mr-2`},null,-1),i(` `+a(s(u)(`auth.signup.signUpWithGithub`)),1)]),_:1})]),c(`div`,I,[i(a(s(u)(`auth.login.termsText`))+` `,1),c(`a`,L,a(s(u)(`auth.login.termsLink`)),1),i(` `+a(s(u)(`auth.login.andText`))+` `,1),c(`a`,R,a(s(u)(`auth.login.privacyLink`)),1),l[3]||=i(`. `),c(`p`,z,[i(a(s(u)(`cloudWaitlist_questionsText`))+` `,1),c(`a`,B,a(s(u)(`cloudWaitlist_contactLink`)),1),l[2]||=i(`. `)])])])]))}}),[[`__scopeId`,`data-v-89909ff5`]]);export{V as default};
//# sourceMappingURL=CloudSignupView-BFTecN-m.js.map