1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c5f09031-d9cb-4429-b31d-931eb0906f30",e._sentryDebugIdIdentifier="sentry-dbid-c5f09031-d9cb-4429-b31d-931eb0906f30")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1917],{54837:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/settings/account",function(){return i(73971)}])},73971:function(e,t,i){"use strict";let o;i.r(t),i.d(t,{__N_SSP:function(){return eO},default:function(){return ek}});var n=i(62364),r=i(67294),d=i(47041),a=i(11163),c=i(29496),s=i(81292),l=i(42727),p=i(89600),m=i(49471),h=i(29417),u=i(46347),f=i(15437);let g=f.ZP.aside.withConfig({componentId:"sc-f9389583-0"})(["width:24.5rem;flex:0 0 24.5rem;@media (max-width:767px){display:none;}"]);f.ZP.h2.withConfig({componentId:"sc-f9389583-1"})(["margin:0 0 ",";padding-left:",";color:",";font-family:",";font-size:",";font-weight:",";line-height:",";letter-spacing:0.14em;text-transform:uppercase;"],u.W0.formGroupGap,u.W0.formFieldGap,u.O9.brand.pink,u.cp.fontFamily.primary,u.cp.body.xs,u.cp.weight.bold,u.cp.lineHeight.body);let b=f.ZP.ul.withConfig({componentId:"sc-f9389583-2"})(["margin:0;padding:",";list-style-type:none;border:1px solid ",";border-radius:",";background:",";box-shadow:0 1.4rem 3rem ",";"],u.W0.formFieldGap,u.O9.border.medium,u.W0.radiusCard,u.O9.background.panel,u.O9.shadow.soft),y=f.ZP.li.withConfig({componentId:"sc-f9389583-3"})(["width:100%;min-height:",";padding:0 ",";border-radius:",";display:flex;align-items:center;box-sizing:border-box;cursor:pointer;color:",";background:",";font-family:",";font-size:",";font-weight:",";line-height:",";transition:background 0.2s ease,color 0.2s ease;&:hover{color:",";background:",";}"],u.W0.heroBottomMobile,u.W0.cardPaddingMobile,u.W0.radiusInput,e=>{let{$selected:t}=e;return t?u.O9.text.primary:u.O9.text.secondary},e=>{let{$selected:t}=e;return t?u.O9.background.soft:"transparent"},u.cp.fontFamily.primary,u.cp.body.md,e=>{let{$selected:t}=e;return t?u.cp.weight.bold:u.cp.weight.medium},u.cp.lineHeight.body,u.O9.text.primary,u.O9.background.soft),w=f.ZP.div.withConfig({componentId:"sc-f9389583-4"})(["position:relative;width:100%;display:flex;@media (min-width:768px){display:none;}"]),x=f.ZP.button.withConfig({componentId:"sc-f9389583-5"})(["width:100%;min-height:",";padding:0 "," 0 ",";border:1px solid ",";border-radius:",";background:",";color:",";box-shadow:0 1.4rem 3rem ",";box-sizing:border-box;display:flex;justify-content:flex-start;align-items:center;font-family:",";font-size:",";font-weight:",";cursor:pointer;position:relative;.icon{position:absolute;right:",";top:50%;display:flex;transform:translateY(-50%) rotate(",");transition:transform 0.3s ease;}"],u.W0.heroBottomMobile,u.W0.heroBottomMobile,u.W0.cardPaddingCompact,u.O9.border.medium,u.W0.radiusInput,u.O9.background.panel,u.O9.text.primary,u.O9.shadow.soft,u.cp.fontFamily.primary,u.cp.body.md,u.cp.weight.semibold,u.W0.cardPaddingCompact,e=>{let{$show:t}=e;return t?"180deg":"0deg"}),Z=f.ZP.ul.withConfig({componentId:"sc-f9389583-6"})(["position:absolute;top:calc(100% + ",");left:0;right:0;display:",";margin:0;padding:",";list-style:none;border:1px solid ",";border-radius:",";background:",";box-shadow:0 2rem 4rem ",";z-index:100;box-sizing:border-box;"],u.W0.formFieldGap,e=>{let{$show:t}=e;return t?"block":"none"},u.W0.formFieldGap,u.O9.border.medium,u.W0.radiusCard,u.O9.background.panel,u.O9.shadow.medium),v=f.ZP.li.withConfig({componentId:"sc-f9389583-7"})(["padding:"," ",";border-radius:",";cursor:pointer;color:",";background:",";font-family:",";font-size:",";font-weight:",";text-align:left;transition:background 0.2s ease,color 0.2s ease;&:hover{background:",";color:",";}"],u.W0.formGroupGap,u.W0.cardPaddingMobile,u.W0.radiusInput,e=>{let{$selected:t}=e;return t?u.O9.text.primary:u.O9.text.secondary},e=>{let{$selected:t}=e;return t?u.O9.background.soft:"transparent"},u.cp.fontFamily.primary,u.cp.body.md,e=>{let{$selected:t}=e;return t?u.cp.weight.bold:u.cp.weight.medium},u.O9.background.soft,u.O9.text.primary),O=["Account","Address","Billing Details","Active Plans","Change Password"];var k=e=>{let{onSelect:t,selectedItem:i}=e,[o,d]=(0,r.useState)(!1),c=r.useRef(null),s=r.useRef(null),l=(0,a.useRouter)(),p=e=>{t(e),l.push("/dashboard/settings/account?section=".concat(e))};return(0,r.useEffect)(()=>{let e=e=>{c.current&&!c.current.contains(e.target)&&s.current&&e.target!==s.current&&d(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,n.BX)(n.HY,{children:[(0,n.BX)(w,{children:[(0,n.BX)(x,{id:"dropdown-basic-button",onClick:()=>
1d(!o),$show:o,ref:s,type:"button",children:[i||"Account",(0,n.tZ)("span",{className:"icon",children:(0,n.tZ)(h.Z,{width:9,height:9,color:u.O9.text.secondary})})]}),(0,n.tZ)(Z,{$show:o,ref:c,children:O.map(e=>(0,n.tZ)(v,{$selected:i===e,onClick:()=>{d(!1),p(e)},children:e},e))})]}),(0,n.tZ)(g,{children:(0,n.tZ)(b,{children:O.map(e=>(0,n.tZ)(y,{onClick:()=>p(e),$selected:i===e,children:e},e))})})]})};let C=f.ZP.div.withConfig({componentId:"sc-9b13a6c8-0"})(["width:100%;min-width:0;padding:3.2rem;border:1px solid ",";border-radius:2.4rem;background:",";box-shadow:0 1.4rem 3rem ",";box-sizing:border-box;font-family:",";@media screen and (max-width:768px){padding:2rem;border-radius:2rem;}"],u.O9.border.soft,u.O9.background.panel,u.O9.shadow.soft,u.cp.fontFamily.primary);var P=e=>{let{children:t}=e;return(0,n.tZ)(C,{children:t})},W=i(61312),I=i(7492),S=i(2859),_=i(86664),B=i(25675),G=i.n(B),z=i(86455),E=i.n(z),X=i(40487),F=i(5451);let M=f.ZP.section.withConfig({componentId:"sc-96c4e9fd-0"})(["width:100%;display:flex;flex-direction:column;gap:",";font-family:",";"],u.W0.dashboardContentGap,u.cp.fontFamily.primary),A=f.ZP.section.withConfig({componentId:"sc-96c4e9fd-1"})(["width:100%;display:flex;flex-direction:column;gap:",";font-family:",";"],u.W0.dashboardContentGap,u.cp.fontFamily.primary),N=f.ZP.header.withConfig({componentId:"sc-96c4e9fd-2"})(["display:flex;flex-direction:column;gap:",";"],u.W0.formFieldGap),T=f.ZP.h2.withConfig({componentId:"sc-96c4e9fd-3"})(["margin:0;color:",";font-size:",";font-weight:",";line-height:",";"],u.O9.text.primary,u.cp.body.xl,u.cp.weight.bold,u.cp.lineHeight.heading),H=f.ZP.p.withConfig({componentId:"sc-96c4e9fd-4"})(["margin:0;color:",";font-size:",";font-weight:",";line-height:",";"],u.O9.text.secondary,u.cp.body.md,u.cp.weight.medium,u.cp.lineHeight.body),j=f.ZP.div.withConfig({componentId:"sc-96c4e9fd-5"})(["display:flex;flex-direction:column;gap:",";"],u.W0.dashboardContentGap),D=f.ZP.section.withConfig({componentId:"sc-96c4e9fd-6"})(["display:flex;flex-direction:column;gap:",";"],u.W0.formGroupGap),R=f.ZP.h3.withConfig({componentId:"sc-96c4e9fd-7"})(["margin:0;color:",";font-size:",";font-weight:",";line-height:",";letter-spacing:0.14em;text-transform:uppercase;"],u.O9.brand.pink,u.cp.body.xs,u.cp.weight.bold,u.cp.lineHeight.body),L=f.ZP.div.withConfig({componentId:"sc-96c4e9fd-8"})(["display:grid;grid-template-columns:repeat(auto-fit,minmax(28rem,1fr));gap:",";@media (max-width:640px){grid-template-columns:1fr;}"],u.W0.dashboardCardGap),J=f.ZP.article.withConfig({componentId:"sc-96c4e9fd-9"})(["width:100%;min-height:14rem;padding:",";border:1px solid ",";border-radius:",";background:",";box-shadow:0 1.4rem 3rem ",";display:flex;align-items:flex-start;gap:",";box-sizing:border-box;position:relative;@media (max-width:640px){padding:",";}"],u.W0.cardPadding,u.O9.border.medium,u.W0.radiusCard,u.O9.background.panel,u.O9.shadow.soft,u.W0.dashboardCardGap,u.W0.cardPaddingMobile),Y=f.ZP.div.withConfig({componentId:"sc-96c4e9fd-10"})(["width:6rem;min-height:3.8rem;flex-shrink:0;"]),U=f.ZP.div.withConfig({componentId:"sc-96c4e9fd-11"})(["min-width:0;display:flex;flex-direction:column;gap:",";"],u.W0.formFieldGap),$=f.ZP.p.withConfig({componentId:"sc-96c4e9fd-12"})(["margin:0;color:",";font-size:",";font-weight:",";line-height:",";text-transform:capitalize;"],u.O9.text.primary,u.cp.body.md,u.cp.weight.bold,u.cp.lineHeight.heading),q=f.ZP.p.withConfig({componentId:"sc-96c4e9fd-13"})(["margin:0;color:",";font-size:",";font-weight:",";line-height:",";"],u.O9.text.secondary,u.cp.body.sm,u.cp.weight.medium,u.cp.lineHeight.body),Q=f.ZP.button.withConfig({componentId:"sc-96c4e9fd-14"})(["width:",";height:",";padding:0;border:1px solid transparent;border-radius:",";background:transparent;color:",";display:inline-flex;justify-content:center;align-items:center;cursor:pointer;transition:background 0.2s ease,border-color 0.2s ease,color 0.2s ease,transform 0.2s ease;&:hover{background:",";border-color:",";color:",";transform:translateY(-1px);}"],u.W0.dashboardPageGap,u.W0.dashboardPageGap,u.W0.radiusButton,u.O9.text.secondary,u.O9.background.soft,u.O9.border.medium,u.O9.text.primary),V=(0,f.ZP)(Q).withConfig({componentId:"sc-96c4e9fd-15"})(["position:absolute;right:",";bottom:",";"],u.W0.cardPaddingMobile,u.W0.cardPaddingMobile),K=(0,f.ZP)(Q).withConfig({componentId:"sc-96c4e9fd-16"})(["position:absolute;right:",";top:",";&:hover{border-color:",";color:",";}"],u.W0.cardPaddingMobile,u.W0.cardPaddingMobile,u.O9.border.pinkSoft,u.O9.brand.pink),ee=f.ZP.div.withConfig({componentId:"sc-96c4e9fd-17"})(["display:flex;justify-content:flex-start;
1"]),et=f.ZP.form.withConfig({componentId:"sc-96c4e9fd-18"})(["width:100%;display:flex;flex-direction:column;gap:",";"],u.W0.dashboardContentGap),ei=f.ZP.div.withConfig({componentId:"sc-96c4e9fd-19"})(["width:100%;padding:",";border:1px solid ",";border-radius:",";background:",";box-shadow:0 1.4rem 3rem ",";box-sizing:border-box;@media (max-width:640px){padding:",";}"],u.W0.cardPadding,u.O9.border.medium,u.W0.radiusCard,u.O9.background.panel,u.O9.shadow.soft,u.W0.cardPaddingMobile),eo=f.ZP.div.withConfig({componentId:"sc-96c4e9fd-20"})(["display:flex;gap:",";flex-wrap:wrap;@media (max-width:640px){flex-direction:column;}"],u.W0.buttonGap),en=f.ZP.button.withConfig({componentId:"sc-96c4e9fd-21"})(["min-height:",";padding:0 ",";border-radius:",";border:1px solid ",";background:",";color:",";display:inline-flex;justify-content:center;align-items:center;font-family:",";font-size:",";font-weight:",";cursor:pointer;box-shadow:0 1.4rem 3rem ",";transition:transform 0.2s ease,box-shadow 0.2s ease,opacity 0.2s ease;&:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 1.8rem 4rem ",";}&:disabled{opacity:0.45;cursor:not-allowed;box-shadow:none;}@media (max-width:640px){width:100%;}"],u.W0.heroBottomMobile,u.W0.cardPadding,u.W0.radiusButton,u.O9.border.pinkSoft,u.O9.brand.pink,u.O9.text.inverse,u.cp.fontFamily.primary,u.cp.button.lg,u.cp.weight.semibold,u.O9.shadow.pink,u.O9.shadow.pinkHover),er=f.ZP.button.withConfig({componentId:"sc-96c4e9fd-22"})(["min-height:",";padding:0 ",";border-radius:",";border:1px solid ",";background:",";color:",";display:inline-flex;justify-content:center;align-items:center;font-family:",";font-size:",";font-weight:",";cursor:pointer;transition:transform 0.2s ease,border-color 0.2s ease,color 0.2s ease,box-shadow 0.2s ease;&:hover{border-color:",";color:",";transform:translateY(-1px);box-shadow:0 1.4rem 3rem ",";}@media (max-width:640px){width:100%;}"],u.W0.heroBottomMobile,u.W0.cardPadding,u.W0.radiusButton,u.O9.border.medium,u.O9.background.panel,u.O9.text.secondary,u.cp.fontFamily.primary,u.cp.button.lg,u.cp.weight.semibold,u.O9.border.pinkSoft,u.O9.brand.pink,u.O9.shadow.soft),ed=f.ZP.div.withConfig({componentId:"sc-96c4e9fd-23"})(["width:100%;padding:"," ",";border:1px solid ",";border-radius:",";background:",";text-align:center;color:",";font-size:",";font-weight:",";"],u.W0.dashboardPageGap,u.W0.cardPadding,u.O9.border.soft,u.W0.radiusCard,u.O9.background.soft,u.O9.text.secondary,u.cp.body.md,u.cp.weight.semibold),ea=f.ZP.div.withConfig({componentId:"sc-96c4e9fd-24"})(["width:100%;color:",";font-size:",";font-weight:",";line-height:",";"],u.O9.brand.pink,u.cp.body.sm,u.cp.weight.semibold,u.cp.lineHeight.body),ec=e=>{var t;let{customerId:i}=e,o=(0,_.useStripe)(),d=(0,_.useElements)(),[a,s]=(0,r.useState)(!1),[l,p]=(0,r.useState)([]),[m,h]=(0,r.useState)(null),[f,g]=(0,r.useState)(null),[b,y]=(0,r.useState)({active:!1,message:""});(0,r.useEffect)(()=>{!a&&i&&(y({active:!0,message:"Getting payment methods"}),(0,I.Zm)(i).then(g).catch(e=>{var t;return h(null==e?void 0:null===(t=e.raw)||void 0===t?void 0:t.message)}),(0,I.F7)(i).then(e=>{var t;return(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.length)&&p(e.data)}).catch(console.error).finally(()=>y({active:!1})))},[a,i]);let w=async e=>{if(e.preventDefault(),!o||!d)return;let t=await o.confirmSetup({elements:d,redirect:"if_required",confirmParams:{return_url:"",payment_method_data:{allow_redisplay:"always"}}});t.error?(0,c.yv)(t.error.message||"Unknown error",{variant:"error"}):((0,c.yv)("Payment method added successfully!",{variant:"success"}),setTimeout(()=>s(!1),1e3))},x=null==f?void 0:null===(t=f.invoice_settings)||void 0===t?void 0:t.default_payment_method,Z=l.find(e=>e.id===x),v=l.filter(e=>e.id!==x),O=async e=>{if((await E().fire({title:"Are you sure?",text:"Do you really want to delete this payment method?",icon:"warning",showCancelButton:!0,confirmButtonColor:u.O9.brand.pink,cancelButtonColor:u.O9.text.secondary})).isConfirmed){y({active:!0,message:"Removing payment method"});try{await fetch("/api/customer/stripe/remove-payment-method",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({paymentMethodId:e})}),p(t=>t.filter(t=>t.id!==e)),(0,c.yv)("Payment method deleted successfully!",{variant:"success"})}catch(e){(0,c.yv)("Failed to delete payment method.",{variant:"error"})}finally{y({active:!1})}}};return b.active?(0,n.tZ)(W.Z,{message:b.message}):a?(0,n.BX)(A,{children:[(0,n.BX)(N,{children:[(0,n.tZ)(T,{children:"Add payment method"}),(0,n.tZ)(H,{children:"Securely add a new card to your NaviSavi account."})]}),(0,n.BX)(et,{onSubmit:w,children:[(0,n.tZ)(ei,{children:(0,n.tZ)(_.PaymentElement,{})}),(0,n.BX)(eo,{children:[(0,n.tZ)(en,{type:"submit",disabled:!o,children:"Save payment method"}),(0,n.tZ)(er,{type:"button",onClick:()=>s(!1),children:"Back"})]})]}),m&&(0,n.tZ)(ea,{children:m})]}):(0,n.BX)(M,{children:[(0,n.BX)(N,{children:[(0,n.tZ)(T,{children:"Billing details"}),(0,n.tZ)(H,{children:"Manage the payment methods connected to your account."})]}),l.length>0?(0,n.BX)(j,{children:[Z&&(0,n.BX)(D,{children:[(0,n.tZ)(R,{children:"Primary payment method"}),(0,n.BX)(J,{children:[(0,n.tZ)(Y,{children:(0,n.tZ)(G(),{src:"/images/".concat(Z.card.brand,".png"),width:60,height:38,alt:Z.card.brand})}),(0,n.BX)(U,{children:[(0,n.BX)($,{children:[Z.card.brand," â¢â¢â¢â¢ ",Z.card.last4]}),(0,n.BX)(q,{children:["Expires ",Z.card.exp_month,"/",Z.card.exp_year]})]}),(0,n.tZ)(V,{type:"button","aria-label":"Edit card",children:(0,n.tZ)(X.Z,{size:16})})]})]}),v.length>0&&(0,n.BX)(D,{children:[(0,n.tZ)(R,{children:"Available payment methods"}),(0,n.tZ)(L,{children:v.map(e=>(0,n.BX)(J,{children:[(0,n.tZ)(Y,{children:(0,n.tZ)(G(),{src:"/images/".concat(e.card.brand,".png"),width:60,height:38,alt:e.card.brand})}),(0,n.BX)(U,{children:[(0,n.BX)($,{children:[e.card.brand," â¢â¢â¢â¢ ",e.card.last4]}),(0,n.BX)(q,{children:["Expires ",e.card.exp_month,"/",e.card.exp_year]})]}),(0,n.tZ)(K,{type:"button","aria-label":"Remove card",onClick:()=>O(e.id),children:(0,n.tZ)(F.Z,{size:16})})]},e.id))})]})]}):(0,n.tZ)(ed,{children:"No payment methods available."}),(0,n.tZ)(ee,{children:(0,n.tZ)(en,{type:"button",onClick:()=>s(!0),children:"Add payment method"})})]})};var es=e=>{let{customer_id:t}=e,i=(o||(o=(0,S.J)("pk_live_51O7LZED8sm7g64NbeFD1FJotfakRgUeS5w0lG00uOGzliFOcOTb2Bg2oE8diygksEe9HVmMRtlT74QSWxZV6ESmi00bWEsIHKx")),o),[d,a]=(0,r.useState)(null);return((0,r.useEffect)(()=>{t&&fetch("/api/customer/stripe/create-setup-intent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customerId:t})}).then(e=>e.json()).then(e=>a(e.clientSecret))},[t]),d)?(0,n.tZ)(_.Elements,{stripe:i,options:{clientSecret:d},children:(0,n.tZ)(ec,{customerId:t})}):(0,n.tZ)(W.Z,{message:"Getting stripe data..."})},el=i(90909),ep=i(85918),em=i(5810);let eh=f.ZP.div.withConfig({componentId:"sc-92ba2e32-0"})(["width:100%;max-width:",";margin:0 auto;padding:"," "," ",";display:flex;flex-direction:column;align-items:stretch;gap:",";background:",";font-family:",";box-sizing:border-box;@media screen and (max-width:1023px){padding:"," "," ",";}@media screen and (max-width:768px){padding:"," "," ",";}"],u.W0.dashboardMaxWidth,u.W0.formGroupGap,u.W0.pageX,u.W0.dashboardPageBottom,u.W0.dashboardContentGap,u.O9.background.page,u.cp.fontFamily.primary,u.W0.formGroupGap,u.W0.pageXTablet,u.W0.dashboardPageBottom,u.W0.formGroupGap,u.W0.pageXMobile,u.W0.sectionYMobile),eu=f.ZP.p.withConfig({componentId:"sc-92ba2e32-1"})(["margin:0;color:",";font-size:",";font-weight:",";line-height:",";"],u.O9.text.muted,u.cp.body.md,u.cp.weight.medium,u.cp.lineHeight.body),ef=f.ZP.div.withConfig({componentId:"sc-92ba2e32-2"})(["width:100%;display:flex;justify-content:flex-start;align-items:flex-start;gap:",";@media screen and (max-width:768px){flex-direction:column;align-items:stretch;gap:2.4rem;}"],u.W0.dashboardContentGap),eg=f.ZP.div.withConfig({componentId:"sc-92ba2e32-3"})(["width:100%;padding:2.4rem;border:1px solid ",";border-radius:1.6rem;background:",";color:",";font-size:",";font-weight:",";text-align:center;"],u.O9.border.soft,u.O9.background.soft,u.O9.text.secondary,u.cp.body.md,u.cp.weight.semibold);var eb=i(83454);let ey=(0,r.lazy)(()=>i.e(2936).then(i.bind(i,22936))),ew=(0,r.lazy)(()=>i.e(441).then(i.bind(i,50441))),ex=(0,r.lazy)(()=>Promise.all([i.e(8686),i.e(9661),i.e(1939)]).then(i.bind(i,21939))),eZ=(0,r.lazy)(()=>i.e(8028).then(i.bind(i,38028))),ev=(0,el.Z)(e=>{var t,i,o,h,u;let{content:f,shared:g}=e,{user:b,isUserValid:y}=(0,ep.a)(),{fetchUserPurchaseData:w}=(0,em.iQ)(),x=(0,a.useRouter)(),Z=null===(t=x.query.section)||void 0===t?void 0:t.toString(),v=x.query,O={canonicalUrl:"".concat(null!==(i=eb.env.NS_URL_HOSTNAME)&&void 0!==i?i:"https://www.navisavitravel.com").concat(null!==(o=null==f?void 0:f.slug)&&void 0!==o?o:"/dashboard/settings/account"),metaDescription:null!==(h=null==f?void 0:f.metaDescription)&&void 0!==h?h:"Account Settings",title:null!==(u=null==f?void 0:f.pageTitle)&&void 0!==u?u:"Account Settings"},C=(0,l.Eg)(f,g),I=null==f?void 0:f.openGraphMetadata,S=null==f?void 0:f.menu,[_,B]=(0,r.useState)(null!=Z?Z:"Account"),[G,z]=(0,r.useState)(""),[E,X]=(0,r.useState)("");(0,r.useEffect)(()=>{(async()=>{let e=null;e=localStorage.getItem("dbuser");let t=await (0,d.getCookie)("dbuser")||e,i=t?JSON.parse(t):void 0,o=(null==i?void 0:i.firebase_id)||(0,d.getCookie)("userLog"),n=null==i?void 0:i.customer_id;X(o),z(n)})()},[b]),(0,r.useEffect)(()=>{(async function(){let e=localStorage.getItem("purchaseAddOns");if(v&&e){(0,c.yv)("Add-ons successfully added to your subscription.",{variant:"success"}),localStorage.removeItem("purchaseAddOns"),await w(null);let{pathname:e}=x;x.replace(e,void 0,{shallow:!0})}})()},[]),(0,r.useEffect)(()=>{Z&&B(Z)},[Z]);let F=()=>(0,n.tZ)(W.Z,{message:"Loading..."});return b&&y?(0,n.BX)(s.Z,{metadata:O,ogmd:I,shared:g,hideFooterTop:!0,children:[C&&
1(0,n.tZ)(p.Z,{banner:C}),S&&(0,n.tZ)(m.Z,{menu:S}),(0,n.BX)(eh,{children:[(0,n.tZ)(eu,{children:"Manage your account and billing details from here."}),(0,n.BX)(ef,{children:[(0,n.tZ)(k,{onSelect:B,selectedItem:_}),(0,n.tZ)(P,{children:(()=>{switch(_){case"Account":return(0,n.tZ)(r.Suspense,{fallback:(0,n.tZ)(F,{}),children:(0,n.tZ)(ey,{firebase_id:E,customer_id:G})});case"Billing Details":return(0,n.tZ)(r.Suspense,{fallback:(0,n.tZ)(F,{}),children:(0,n.tZ)(es,{firebase_id:E,customer_id:G})});case"Address":return(0,n.tZ)(r.Suspense,{fallback:(0,n.tZ)(F,{}),children:(0,n.tZ)(ew,{firebase_id:E,customer_id:G})});case"Active Plans":return(0,n.tZ)(r.Suspense,{fallback:(0,n.tZ)(F,{}),children:(0,n.tZ)(ex,{firebase_id:E,customer_id:G})});case"Change Password":return(0,n.tZ)(r.Suspense,{fallback:(0,n.tZ)(F,{}),children:(0,n.tZ)(eZ,{firebase_id:E,customer_id:G})});default:return(0,n.BX)(eg,{children:["Content not found for ",_]})}})()})]})]})]}):null});var eO=!0,ek=ev},90909:function(e,t,i){"use strict";var o=i(62364),n=i(67294),r=i(85918),d=i(11163);t.Z=e=>function(t){let{user:i,isUserValid:a,loadingAuth:c,parsedUser:s}
1=(0,r.a)(),l=(0,d.useRouter)(),[p,m]=(0,n.useState)(!1),[h,u]=(0,n.useState)(!0),[f,g]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{c||(g(!i||!s||!(null==s?void 0:s.customer_id)||!a),f?(m(!0),u(!1)):(u(!0),m(!1)))},[a,i,p,h,s,l]),(0,o.tZ)(e,{...t})}},89600:function(e,t,i){"use strict";var o=i(62364),n=i(67294),r=i(15437),d=i(233),a=i(13049);let c=r.ZP.div.withConfig({componentId:"sc-24a7eb8e-0"})(["display:flex;width:100%;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;background:rgb(23,115,235);position:relative;background-color:rgba(70,80,99,0.1);font-size:12px;font-weight:400;padding:1.5rem 3rem;box-sizing:border-box;*{color:rgba(70,80,99,1);padding:0;margin:0;}a{font-weight:700;text-decoration:none;}"]),s=r.ZP.div.withConfig({componentId:"sc-24a7eb8e-1"})(["color:white;"]),l=r.ZP.div.withConfig({componentId:"sc-24a7eb8e-2"})(["position:absolute;right:1.5rem;"]);t.Z=e=>{let{banner:t}=e,[i,r]=n.useState(!0),{closable:p,content:m}=t;return i?(0,o.BX)(c,{children:[(0,o.tZ)(s,{className:"intro",dangerouslySetInnerHTML:{__html:null!=m?m:""}}),p&&(0,o.tZ)(l,{children:(0,o.tZ)(d.Z,{onClick:()=>r(!1),title:"Close Banner",icon:(0,o.tZ)(a.Z,{}),styles:{border:"0px",padding:0}})})]}):null}},7492:function(e,t,i){"use strict";i.d(t,{F7:function(){return n},Zm:function(){return o}});let o=async e=>{let t=await fetch("/api/customer/stripe/get-stripe-billing-info",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customerId:e})});if(!t.ok)throw Error("Failed to fetch billing info");return(await t.json()).customer},n=async e=>{let t=await fetch("/api/customer/stripe/list-payment-methods",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customerId:e})});if(!t.ok)throw Error("Failed to fetch billing info");return await t.json()}}},function(e){e.O(0,[4577,9332,9184,7636,5168,4097,1292,2888,9774,179],function(){return e(e.s=54837)}),_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.