import{r as e}from"./rolldown-runtime-DCMCV6zW.js";import{Q as t,Y as n}from"./vendor-primevue-7po8Zk9v.js";import"./vendor-firebase-CdLSXhbt.js";import{$ as r,A as i,Bt as a,D as o,E as s,Et as c,Ft as l,L as u,O as d,X as f,a as p,k as m,o as h}from"./vendor-vue-core-D3IvUUeM.js";import"./vendor-other-CrvBxfcV.js";import"./types-0oh-UGWL.js";import"./remoteConfig-CNDr9CtS.js";import{V as g}from"./vendor-vueuse-ChSVzIZz.js";import"./api-3C7_IVZO.js";import"./colorUtil-C83P1Arv.js";import{n as _}from"./vendor-i18n-CsAN_zFP.js";import"./i18n-DjEVEIh2.js";import{t as v}from"./useErrorHandling-CBX3YQ5l.js";import"./vendor-reka-ui-Bm3o_ZTf.js";import"./Button-mG8zDgxj.js";import{_n as y,wn as b}from"./dialogService-BC0EXJA5.js";import"./systemStatsStore-gvlzOl4W.js";import"./dialogStore-BbHfkjRE.js";import"./useCopyToClipboard-CUuoo5Dm.js";import"./vendor-tiptap-DsZVujQD.js";import"./vendor-markdown-yjaB1jgA.js";import"./markdownRendererUtil-D5cHPoK2.js";import{t as x}from"./comfy-logo-single-BE2gkbo1.js";import{t as S}from"./subscriptionCheckoutUtil-B_HowdP4.js";var C={class:`flex h-full w-full items-center justify-center bg-comfy-menu-secondary-bg`},w={class:`flex flex-col items-center gap-4`},T=[`alt`],E={key:0,class:`font-inter text-base font-normal leading-normal text-base-foreground`},D=u({__name:`CloudSubscriptionRedirectView`,setup(e){let{t:u}=_(),D=p(),O=h(),{reportError:k,accessBillingPortal:A}=b(),{wrapWithErrorHandlingAsync:j}=v(),{isActiveSubscription:M,isInitialized:N}=y(),P=c(null),F=s(()=>P.value?{standard:u(`subscription.tiers.standard.name`),creator:u(`subscription.tiers.creator.name`),pro:u(`subscription.tiers.pro.name`),founder:u(`subscription.tiers.founder.name`)}[P.value]:``),I=j(async()=>{let e=D.query.tier,t=D.query.cycle,n=null,r=`monthly`;if(typeof e==`string`?n=e:Array.isArray(e)&&e[0]&&(n=e[0]),typeof t==`string`?r=t:Array.isArray(t)&&t[0]&&(r=t[0]),!n){await O.push(`/`);return}if(![`standard`,`creator`,`pro`,`founder`].includes(n)){await O.push(`/`);return}let i=n;P.value=i,(!r||![`monthly`,`yearly`].includes(r))&&(r=`monthly`),N.value||await g(N).toBe(!0),M.value?await A(void 0,!1):await S(i,r,!1)},k);return f(()=>{I()}),(e,s)=>(r(),i(`div`,C,[o(`div`,w,[o(`img`,{src:x,alt:l(u)(`g.comfyOrgLogoAlt`),class:`h-16 w-16`},null,8,T),P.value?(r(),i(`p`,E,a(l(u)(`subscription.subscribeTo`,{plan:F.value})),1)):m(``,!0),P.value?(r(),d(l(n),{key:1,class:`h-8 w-8`,"stroke-width":`4`})):m(``,!0),P.value?(r(),d(l(t),{key:2,as:`a`,href:`/`,link:``,label:l(u)(`cloudOnboarding.skipToCloudApp`)},null,8,[`label`])):m(``,!0)])]))}});export{D as default};
//# sourceMappingURL=CloudSubscriptionRedirectView-Dxt63cML.js.map