1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2139],{11221:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/plan/enterprise-esab",function(){return n(67058)}])},25244:function(e,t,n){"use strict";n.d(t,{Q:function(){return b}});var r=n(85893),i=n(59007),o=n(27239),a=n(48783),s=n(81136),l=n(71293),c=n(13990),u=n(22757),d=n(33299),h=n(11163),p=n(99893),g=n(67294),f=n(39157);let b=(e,t)=>{let n=t=>{var n;let f=(0,h.useRouter)(),{data:b,status:m}=(0,d.useSession)(),y=(0,g.useRef)(!1),x=i.S.chatbot.claimTrialChatbot.useMutation({onSuccess:e=>{var t;let n="true"===f.query.onboardingV2;try{n||(n="true"===localStorage.getItem("onboardingV2")),localStorage.removeItem("trialChatbotId"),localStorage.removeItem("onboardingV2")}catch(e){}if(n){f.push("/onboarding?surveyOnly=true&onboardingV2=true&chatbotId=".concat(e.chatbotId));return}let r=(null==b?void 0:null===(t=b.user)||void 0===t?void 0:t.isOnboardingCompleted)?"/agents/settings/".concat(e.chatbotId):"/onboarding?surveyOnly=true&chatbotId=".concat(e.chatbotId);f.push(r)},onError:()=>{try{localStorage.removeItem("trialChatbotId")}catch(e){}}});return((0,g.useEffect)(()=>{var e;if(null==b?void 0:null===(e=b.user)||void 0===e?void 0:e.id){p.ZP.get_distinct_id()!==b.user.id&&p.ZP.identify(b.user.id,{email:b.user.email,name:b.user.name,subscription_type:b.user.subscriptionType});try{b.user.createdAt&&!localStorage.getItem("ph_account_created_at_set")&&(p.ZP.setPersonProperties(void 0,{account_created_at:b.user.createdAt}),localStorage.setItem("ph_account_created_at_set","1"))}catch(e){}}},[null==b?void 0:null===(n=b.user)||void 0===n?void 0:n.id]),(0,g.useEffect)(()=>{if(!(null==b?void 0:b.user)||y.current)return;let e=null,t=null,n=f.query.trialChatbotId,r=f.query.claimToken;if("string"==typeof n&&n)e=n,t="string"==typeof r?r:null;else try{e=localStorage.getItem("trialChatbotId"),t=localStorage.getItem("trialClaimToken")}catch(e){}e&&(y.current=!0,x.mutate({chatbotId:e,claimToken:null!=t?t:void 0}))},[b,f.query.trialChatbotId,f.query.claimToken]),(0,g.useEffect)(()=>{var e;b||"loading"===m||f.push("/auth/sign-in");let t=function(e,t){if("string"!=typeof e||!e)return null;try{let n=new URL(e,t);if(n.origin===t&&(n.pathname.startsWith("/workspace-v2/invite/")||n.pathname.startsWith("/workspace-v2/join/")))return"".concat(n.pathname).concat(n.search)}catch(e){}return null}(f.query.callbackUrl,window.location.origin);if(t){f.replace(t);return}let n="string"==typeof f.query.trialChatbotId&&!!f.query.trialChatbotId;if(!n)try{n=!!localStorage.getItem("trialChatbotId")}catch(e){}(!n||null==b||!b.user)&&((null==b?void 0:null===(e=b.user)||void 0===e?void 0:e.isOnboardingCompleted)||"loading"===m||"/onboarding"===f.pathname||f.push("/onboarding"))},[b,m,f]),x.isLoading)?(0,r.jsx)(o.M,{h:"100vh",flexDir:"column",children:(0,r.jsxs)(a.g,{spacing:4,children:[(0,r.jsx)(s.$,{size:"lg",color:"brand.500"}),(0,r.jsx)(l.x,{color:"gray.600",fontWeight:"medium",children:"Setting up your AI agent..."})]})}):b||"loading"!==m?(null==b?void 0:b.user)?b.user.isDisabled?(0,r.jsx)(o.M,{h:"calc(100vh - 60px)",flexDir:"column",children:(0,r.jsxs)(c.Z,{p:8,maxW:"600px",children:[(0,r.jsx)(u.X,{size:"lg",mb:4,color:"red.500",children:"Account Disabled"}),(0,r.jsx)(l.x,{children:"Your account has been disabled due to a late payment. Please contact support to resolve this issue."})]})}):(0,r.jsx)(e,{...t}):(0,r.jsx)(o.M,{h:"calc(100vh - 60px)",flexDir:"column",children:(0,r.jsx)(l.x,{children:"Redirecting you to sign in page ..."})}):(0,r.jsx)(o.M,{h:"calc(100vh - 60px)",flexDir:"column",children:(0,r.jsx)(l.x,{children:"Loading ..."})})};return n.getLayout=function(e){return(null==t?void 0:t.noLayout)?e:(0,r.jsx)(f.Z,{children:e})},n}},67058:function(e,t,n){"use strict";n.r(t);var r=n(85893),i=n(25244),o=n(84790),a=n(59007),s=n(7963),l=n(20967),c=n(81136),u=n(71293),d=n(93717),h=n(93108),p=n(35541),g=n(83589),f=n(14581),b=n(64859),m=n(54346),y=n(48783),x=n(14253),v=n(34292);t.default=(0,i.Q)(function(){var e;let{data:t,isLoading:n,isError:i,refetch:S}=a.S.user.getUserDetails.useQuery(),I=(0,s.p)(),j=a.S.subscriptions.changeSubscription.useMutation({onSuccess:()=>{S(),C(),I({title:"Subscription updated!",description:"Your subscription type has been changed. Please head over to the subscription page to. Contact us if something seems to have gone wrong",status:"success",duration:4e3,isClosable:!0})}}),{isOpen:E,onOpen:_,onClose:C}=(0,l.q)(),{data:w,isLoading:k,isError:P}=a.S.subscriptions.getSubscriptionInfo.useQuery();if(n||k)return(0,r.jsx)(c.$,{});if(i||P)return(0,r.jsx)(u.x,{children:"Error, please try again. If this persists, please contact Support"});let{subscriptionType:R,email:T}=t,{subscriptionInfo:N}=w;return(0,r.jsxs)(d.k,{alignItems:"center",justifyContent:"center",h:"full",children:[(0,r.jsx)(h.z,{onClick:()=>
1{if(N)_();else{let e="undefined"!=typeof Rewardful?Rewardful.referral:null;Paddle.Checkout.open({product:o.cj.ENTERPRISE_ESAB,email:T,passthrough:JSON.stringify({userId:t.id,rewardful:{referral:e}})})}},children:"Upgrade to Enterprise (ESAB)"}),(0,r.jsxs)(p.u_,{isOpen:E,onClose:C,children:[(0,r.jsx)(g.Z,{}),(0,r.jsxs)(f.h,{children:[(0,r.jsx)(b.x,{children:"Change subscription plan"}),(0,r.jsx)(m.f,{children:(0,r.jsxs)(y.g,{alignItems:"flex-start",children:[(0,r.jsx)(u.x,{layerStyle:"bigImpt",children:"Plan change: ".concat(R," to Enterprise ESAB yearly")}),(0,r.jsx)(u.x,{fontSize:14,children:"You will be billed ".concat(o.yJ.ENTERPRISE_ESAB," USD immediately, and your remaining messages will be increased by ").concat(null!==(e=o.aq.ENTERPRISE_ESAB)&&void 0!==e?e:0,". You will be billed ").concat(o.yJ.ENTERPRISE_ESAB," USD for all subsequent years.")})]})}),(0,r.jsx)(x.m,{children:(0,r.jsxs)(v.U,{children:[(0,r.jsx)(h.z,{onClick:C,children:"Close"}),(0,r.jsx)(h.z,{isLoading:j.isLoading,colorScheme:"red",onClick:()=>{j.mutate({planId:o.cj.ENTERPRISE_ESAB})},children:"Confirm"})]})})]})]})]})})},27239:function(e,t,n){"use strict";n.d(t,{M:function(){return a},u:function(){return l}});var r=n(2169),i=n(16554),o=n(85893),a=(0,r.m)("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});a.displayName="Center";var s={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}},l=(0,i.G)(function(e,t){let{axis:n="both",...i}=e;return(0,o.jsx)(r.m.div,{ref:t,__css:s[n],...i,position:"absolute"})})}},function(e){e.O(0,[2432,6152,5937,5445,260,2260,2832,512,9562,6057,5145,2553,8237,4790,8100,9157,2888,9774,179],function(){return e(e.s=11221)}),_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.