import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{X as t,ct as n}from"./vendor-primevue-7po8Zk9v.js";import"./vendor-firebase-CdLSXhbt.js";import{$ as r,A as i,Bt as a,D as o,Et as s,F as c,Ft as l,L as u,O as d,P as f,X as p,a as m,ht as h,k as g,o as _}from"./vendor-vue-core-D3IvUUeM.js";import"./vendor-other-CrvBxfcV.js";import{t as v}from"./types-0oh-UGWL.js";import"./remoteConfig-CNDr9CtS.js";import{Ot as y}from"./api-3C7_IVZO.js";import"./colorUtil-C83P1Arv.js";import{n as b}from"./vendor-i18n-CsAN_zFP.js";import"./i18n-DjEVEIh2.js";import"./useErrorHandling-CBX3YQ5l.js";import"./vendor-reka-ui-Bm3o_ZTf.js";import{t as x}from"./Button-mG8zDgxj.js";import{V as S,wn as C}from"./dialogService-BC0EXJA5.js";import"./systemStatsStore-gvlzOl4W.js";import{t as w}from"./_plugin-vue_export-helper-CTPoQIH5.js";import"./dialogStore-BbHfkjRE.js";import"./useCopyToClipboard-CUuoo5Dm.js";import"./vendor-tiptap-DsZVujQD.js";import"./vendor-markdown-yjaB1jgA.js";import"./markdownRendererUtil-D5cHPoK2.js";import{n as T}from"./networkUtil-DwmQqSmq.js";import"./signInSchema-DbixSTrZ.js";import"./PasswordFields-D8F7TaOn.js";import{t as E}from"./SignUpForm-B9cCgfYU.js";import{t as D}from"./previousFullPath-BPojMS3V.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=w(u({__name:`CloudSignupView`,setup(e){let{t:u}=b(),w=_(),V=m(),H=C(),U=globalThis.isSecureContext,W=s(``),G=s(!1),K=y(),navigateToLogin=async()=>{await w.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 w.replace(e);return}await w.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 p(async()=>{v&&S()?.trackSignupOpened(),G.value=await T()}),(e,s)=>(r(),i(`div`,O,[o(`div`,k,[o(`div`,A,[o(`h1`,j,a(l(u)(`auth.signup.title`)),1),o(`p`,M,[o(`span`,N,a(l(u)(`auth.signup.alreadyHaveAccount`)),1),o(`span`,{class:`ml-1 cursor-pointer text-blue-500`,onClick:navigateToLogin},a(l(u)(`auth.signup.signIn`)),1)])]),l(U)?g(``,!0):(r(),d(l(n),{key:0,severity:`warn`,class:`mb-4`},{default:h(()=>[f(a(l(u)(`auth.login.insecureContextWarning`)),1)]),_:1})),G.value?(r(),d(l(n),{key:1,severity:`warn`,class:`mb-4`},{default:h(()=>[f(a(l(u)(`auth.signup.regionRestrictionChina`)),1)]),_:1})):(r(),d(E,{key:2,"auth-error":W.value,onSubmit:signUpWithEmail},null,8,[`auth-error`])),c(l(t),{align:`center`,layout:`horizontal`,class:`my-8`},{default:h(()=>[o(`span`,P,a(l(u)(`auth.login.orContinueWith`)),1)]),_:1}),o(`div`,F,[c(x,{type:`button`,class:`h-10 bg-[#2d2e32]`,variant:`secondary`,onClick:signInWithGoogle},{default:h(()=>[s[0]||=o(`i`,{class:`pi pi-google mr-2`},null,-1),f(` `+a(l(u)(`auth.signup.signUpWithGoogle`)),1)]),_:1}),c(x,{type:`button`,class:`h-10 bg-[#2d2e32]`,variant:`secondary`,onClick:signInWithGithub},{default:h(()=>[s[1]||=o(`i`,{class:`pi pi-github mr-2`},null,-1),f(` `+a(l(u)(`auth.signup.signUpWithGithub`)),1)]),_:1})]),o(`div`,I,[f(a(l(u)(`auth.login.termsText`))+` `,1),o(`a`,L,a(l(u)(`auth.login.termsLink`)),1),f(` `+a(l(u)(`auth.login.andText`))+` `,1),o(`a`,R,a(l(u)(`auth.login.privacyLink`)),1),s[3]||=f(`. `),o(`p`,z,[f(a(l(u)(`cloudWaitlist_questionsText`))+` `,1),o(`a`,B,a(l(u)(`cloudWaitlist_contactLink`)),1),s[2]||=f(`. `)])])])]))}}),[[`__scopeId`,`data-v-89909ff5`]]);export{V as default};
//# sourceMappingURL=CloudSignupView-sRhDSVW9.js.map