PageSourceSearch

https://app.truvle.com/_next/static/chunks/pages/subscriptions/man…/setup/standard-d3bae286a0578716.js

js truvle.com collected 2026-10-09 22:07:26 UTC 6,930 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[276],{64155:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/subscriptions/manage/[namespaceId]/setup/standard",function(){return a(28171)}])},49779:function(e,t,a){"use strict";var s=a(52322),n=a(19114);let r=(0,a(10929).j)("flex flex-col items-center justify-center rounded-xl from-10% to-70% px-6 py-5 text-white",{variants:{variant:{free:"bg-[radial-gradient(ellipse_at_top_left,_var(--tw-gradient-stops))] from-accent-color-accent-5 to-accent-color-accent-8",standard:"bg-[radial-gradient(circle_at_top_left,_var(--tw-gradient-stops))] from-accent-color-accent-12 to-accent-color-accent-11",enterprise:"bg-[radial-gradient(circle_at_top_left,_var(--tw-gradient-stops))] from-accent-color-accent-10 to-accent-color-accent-12"}},defaultVariants:{variant:"free"}});t.Z=e=>{let{children:t,variant:a,className:c}=e;return(0,s.jsx)("div",{className:(0,n.cn)(r({variant:a,className:c})),children:t})}},41332:function(e,t,a){"use strict";var s=a(52322),n=a(97729),r=a.n(n),c=a(23848),l=a(62592),i=a(92332),o=a(80481);t.Z=e=>{let{children:t}=e,{status:a}=(0,c.useSession)({required:!0});if("loading"===a)return(0,s.jsx)(l.Z,{});let n="Subscription | ".concat(o.Z.siteName);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(r(),{children:[(0,s.jsx)("title",{children:n}),(0,s.jsx)("meta",{name:"description",content:o.Z.siteDescription}),(0,s.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsx)("main",{children:(0,s.jsxs)("div",{className:"flex h-screen flex-col",children:[(0,s.jsx)(i.H,{}),t]})})]})}},28171:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return b},default:function(){return w}});var s=a(52322),n=a(88883),r=a(70142),c=a(19114),l=a(24982),i=a(82876),o=a(2784),m=a(63955),d=a(30195),x=a(62592),u=a(49779),p=e=>{let{variant:t,title:a,description:n,price:r,periodicity:c="month"}=e;return(0,s.jsxs)(u.Z,{variant:t,children:[(0,s.jsx)("span",{className:"w-full text-right font-bold text-[40.8px] leading-[52.5px] tracking-[-0.8px]",children:r?"$".concat(r):"$*"}),(0,s.jsxs)("span",{className:"mb-6 w-full text-right font-medium text-[16px] tracking-[-0.32px]",children:["/",c]}),(0,s.jsx)("span",{className:"w-full font-bold text-[35px] leading-10 tracking-[-0.7px]",children:a}),(0,s.jsx)("span",{className:"w-full font-medium text-[16px] leading-6 tracking-[-0.32px]",children:n})]})},f=a(50960),h=a(7558),j=a(76690);let g=()=>{let e=j.S.useContext();return{setupSubscription:j.S.subscription.setupSubscription.useMutation({onSuccess:async()=>{await e.member.getCapabilities.invalidate()}})}};var N=a(41332);let v=d.z.object({firstName:d.z.string().max(40,{message:"Name must be less than ".concat(40," characters")}),lastName:d.z.string().max(40,{message:"Name must be less than ".concat(40," characters")}),teamName:d.z.string().min(1,{message:"Team name is required"}).max(40,{message:"Name must be less than ".concat(40," characters")}),seats:d.z.coerce.number().positive().int().min(r.sm,{message:"At least ".concat(r.sm," seats are required")}).max(1e4,{message:"Maximum 10000 seats"})}),_=()=>{var e,t;let a=(0,i.useRouter)(),d=(0,i.useSearchParams)(),{toast:u}=(0,l.pm)(),{isFetching:j,namespace:N}=(0,h.Y)(),[_,b]=(0,o.useState)(),{setupSubscription:w}=g(),{me:y,meIsLoading:S}=(0,f.Z)(),I="yearly"===(null!==(e=d.get("p"))&&void 0!==e?e:"monthly"),k=r.z5.find(e=>"Standard"===e.plan),z=(0,m.cI)({defaultValues:{firstName:"",lastName:"",teamName:"",seats:r.sm},resolver:(0,n.F)(v)});return(_!==N&&(b(N),N&&z.reset({teamName:null!==(t=N.name)&&void 0!==t?t:"",seats:r.sm})),k)?!y||S||!N||j?(0,s.jsx)("section",{className:"flex h-screen w-full flex-col items-center justify-center gap-10 bg-accent-color-accent-1",children:(0,s.jsxs)("div",{className:"flex h-2/5 max-w-md flex-col items-center justify-center gap-4",children:[(0,s.jsx)(p,{price:I?r.i_:r.RU,periodicity:I?"year":"month",title:"".concat(k.plan," Plan"),description:"We need more information to manage your subscription",variant:"standard"}),(0,s.jsx)("div",{className:"w-full",children:(0,s.jsx)(x.Z,{})})]})}):(0,s.jsx)("section",{className:"flex h-screen w-full flex-col items-center justify-center gap-10 bg-accent-color-accent-1",children:(0,s.jsxs)("div",{className:"flex h-2/5 max-w-md flex-col items-center justify-center gap-4",children:[(0,s.jsx)(p,{price:(()=>{let e=z.watch("seats"),t=e%r.Le==0?Math.floor(e/r.Le)-1:Math.floor(e/r.Le),a=t*r.ZR,s=t*r.Ho,n=z.watch("seats")<=r.sm,c=n?r.RU:r.RU+a,l=n?r.i_:r.i_+s;return I?l:c})(),periodicity:I?"year":"month",title:"Standard",description:"We need some information to purchase your subscription",variant:"standard"}),(0,s.jsx)("div",{className:"w-full",children:(0,s.jsx)(c.l09,{...z,children:(0,s.jsxs)("form",{onSubmit:z.handleSubmit(e=>{let{firstName:t,lastName:s,teamName:n,seats:r}=e,c=I?k.value_yearly:k.value;w.mutate({namespaceId:N.id,data:{subscriptionType:"team",userFirstName:t||null,userLastName:s||null,teamName:n,seats:r}},{onSuccess:e=>{a.push("/subscriptions/checkout/".concat(c,"/").concat(e,"/").concat(r),void 0)},onError:()=>{u({title:"Error",description:"An error occurred while updating your information",variant:"destructive"})}})}),className:"flex flex-col gap-3",children:[(0,s.jsx)(c.WiK,{control:z.control,name:"firstName",render:e=>{let{field:t}=e;return(0,s.jsx)(c.xJW,{children:(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(c.NIc,{children:(0,s.jsx)(c.__J,{children:(0,s.jsx)(c.IIB,{className:"flex pl-2",placeholder:"First name",maxLength:40,...t})})}),(0,s.jsx)(c.zGS,{})]})})}}),(0,s.jsx)(c.WiK,{control:z.control,name:"lastName",render:e=>{let{field:t}=e;return(0,s.jsx)(c.xJW,{children:(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(c.NIc,{children:(0,s.jsx)(c.IIB,{...t,className:"flex pl-2",placeholder:"Last name",maxLength:40})}),(0,s.jsx)(c.zGS,{})]})})}}),(0,s.jsx)(c.Z0O,{}),(0,s.jsx)(c.WiK,{control:z.control,name:"teamName",render:e=>{let{field:t}=e;return(0,s.jsx)(c.xJW,{children:(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(c.NIc,{children:(0,s.jsx)(c.__J,{children:(0,s.jsx)(c.IIB,{...t,className:"flex pl-2",placeholder:"Team name",maxLength:40})})}),(0,s.jsx)(c.zGS,{})]})})}}),(0,s.jsx)(c.WiK,{control:z.control,name:"seats",render:e=>{let{field:t}=e;return(0,s.jsx)(c.xJW,{children:(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(c.NIc,{children:(0,s.jsx)(c.__J,{children:(0,s.jsx)(c.IIB,{...t,type:"number",className:"flex pl-2",placeholder:"Seats",min:r.sm})})}),(0,s.jsx)(c.zGS,{})]})})}}),(0,s.jsx)(c.zxk,{type:"submit",children:"Go to payments"})]})})})]})}):null};_.Layout=N.Z;var b=!0,w=_}},function(e){e.O(0,[9795,1273,1965,5647,7642,1944,1200,8422,2876,7361,9097,9137,2316,8168,4307,231,9114,2332,2888,9774,179],function(){return e(e.s=64155)}),_N_E=e.O()}]);

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.