PageSourceSearch

https://coffeecontracts.com/_next/static/chunks/pages/settings/membership-8afec0aed858d4d6.js

js coffeecontracts.com collected 2026-09-28 09:27:19 UTC 15,839 bytes, 1 lines download raw bytes

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]="fdb91897-606d-459e-8a25-39e979386f01",e._sentryDebugIdIdentifier="sentry-dbid-fdb91897-606d-459e-8a25-39e979386f01")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5463,5455],{87366:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/membership",function(){return s(67946)}])},19655:function(e,t,s){"use strict";s.d(t,{T:function(){return c}});var n=s(85893),r=s(67294),a=s(50494),i=s(58952),o=s(391),l=s.n(o);let c=(0,r.forwardRef)(function({children:e,visibleCards:t=2,gap:s=15,className:o},c){let d=(0,r.useRef)(null),[_,u]=(0,r.useState)(!0),[p,m]=(0,r.useState)(!0),g=r.Children.toArray(e);(0,r.useEffect)(()=>{let e=d.current;if(!e)return;let t=()=>{let{scrollLeft:t,scrollWidth:s,clientWidth:n}=e;u(t<=1),m(t+n>=s-1)};t(),e.addEventListener("scroll",t,{passive:!0});let s=new ResizeObserver(t);return s.observe(e),()=>{e.removeEventListener("scroll",t),s.disconnect()}},[]);let b=e=>{let t=d.current;if(!t)return;let n=t.firstElementChild;if(!n)return;let r=n.getBoundingClientRect().width;t.scrollBy({left:e*(r+s),behavior:"smooth"})};(0,r.useImperativeHandle)(c,()=>({scrollToStart:({behavior:e="smooth"}={})=>{d.current?.scrollTo({left:0,behavior:e})}}));let h=!(_&&p);return(0,n.jsxs)("div",{className:(0,i.d)([l().wrapper,o]),children:[h&&(0,n.jsx)(a.z,{icon:"chevron-left",variation:"text","aria-label":"Previous card",onClick:()=>b(-1),disabled:_,className:(0,i.d)([l().arrow,l()["arrow-left"]])}),(0,n.jsx)("div",{className:l().clip,children:(0,n.jsx)("div",{ref:d,className:l().track,style:{"--visible-cards":t,"--gap":`${s}px`},children:g.map((e,t)=>(0,n.jsx)("div",{className:l().slide,children:e},t))})}),h&&(0,n.jsx)(a.z,{icon:"chevron-right",variation:"text","aria-label":"Next card",onClick:()=>b(1),disabled:p,className:(0,i.d)([l().arrow,l()["arrow-right"]])})]})})},67946:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return B}});var n=s(85893),r=s(67294),a=s(11163),i=s(2962),o=s(97551),l=s(50494),c=s(66651),d=s(55999),_=s(49938),u=s.n(_);let p=({billing:e,isEnterpriseMembership:t,isExpiredMembership:s})=>{let r=(0,d.o)(e=>e.setModal),a=e?.last4Digits?`${o.title(e?.cardType)} ending in ${e?.last4Digits}`:`${o.title(e?.cardType)}`;return(0,n.jsxs)("div",{className:u()["billing-wrapper"],children:[(0,n.jsxs)("div",{className:u().header,children:[(0,n.jsx)("span",{className:u().title,children:"Billing Information"}),s&&(0,n.jsx)(l.z,{variation:"secondary",href:"/demo",target:"_blank",children:"Try for free"})]}),(0,n.jsxs)("div",{className:u()["billing-details"],children:[(0,n.jsxs)("div",{className:u()["card-details"],children:[(0,n.jsx)(c.J,{name:"credit-card",className:u()["card-icon"]}),(0,n.jsx)("span",{children:a||(0,n.jsxs)("span",{className:!t&&u().error,children:[t?"Add":"Please add "," a payment method"]})})]}),(0,n.jsx)(l.z,{variation:"outline-black",onClick:e=>{e.preventDefault(),r("UpdateBillingInfo")},className:u()["billing-btn"],children:"Update Billing Info"})]})]})};var m=s(19655),g=s(39280),b=s(69093),h=s(97829),f=s(57401),x=s(95380),y=s(37569),v=s(10438),w=s(15078),k=s.n(w);let N=({membership:e,cadence:t,title:s,description:r,coupon:a,teamMemberCount:i})=>{let o=(0,d.o)(e=>e.setModal),c=(0,d.o)(e=>e.setModalState),{data:_}=(0,v.P)(),u=e?.type===x.wD.TEAM,p=(0,y.QS)(e?.type,i),m=t===x.NP.QUARTERLY,g=_?.results?.find(t=>t.type===e?.type&&t.recurrence===x.mz.MONTHLY&&3!==t.intervalCount),b=_?.results?.find(t=>t.type===e?.type&&t.recurrence===x.mz.MONTHLY&&3===t.intervalCount),h=m?b:g;if(!h)return null;let{effectivePrice:w,originalPrice:N,firstPeriodSavings:j}=(0,f.t2)({plan:h,coupon:a,seats:p}),C=g&&b?Math.round((12*g.unitAmount-4*b.unitAmount)/100):null,S=(0,f.YQ)(u),P=(0,f.eK)({amount:Math.round(w),isTeam:u,cadence:t}),M=j>0?`${P} — $${j} off your first ${m?"quarter":"month"}`:P;return(0,n.jsx)(f.ld,{title:s,description:r,variant:"muted",footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f.Tz,{price:m?Math.round(w/3):Math.round(w),recurrenceLabel:S,billedText:M,originalPrice
1:N}),(0,n.jsxs)(l.z,{variation:"outline",onClick:()=>{c({membership:e,targetPlan:h}),o("ChangePlan")},className:k()["change-btn"],children:["Switch to"," ",m?`quarterly${C>0?` & save $${C}`:""}`:"monthly"]})]})})};var j=s(93108),C=s(56193),S=s(58295),P=s(50293),M=s(36109),T=s(88261),E=s(63594),I=s.n(E),A=s(98652);let z=["My market is in a slow season right now","I haven't been able to get started / need time to learn the platform","I'm taking a break from social media posting","Don't need new content right now","Other temporary reason"],D=({hasPauseFeedback:e,pausePeriodId:t})=>{let[s,a]=(0,r.useState)(""),[i,o]=(0,r.useState)(!1),l=(0,d.o)(e=>e.setNotification),{events:{pauseSubscriptionFeedback:c},trackEvent:_}=(0,M.h)(),u=(0,C.cI)({onSubmit:async e=>{try{await T.U.patch(`user/payment/pause-period/${t}`,{reason:s,comment:e.comment}),_(c,{reason:s,comments:e.comment}),A.ampli.feedbackSubmitted({type:"survey",reason:s}),o(!0)}catch(e){console.log({error:e}),l({type:"error",text:"There was an error submitting your feedback. Please try again later."}),o(!1)}}});return(0,r.useEffect)(()=>{i&&e&&o(!1)},[i,e]),(0,n.jsx)(C.l0,{methods:u,hideFormError:!1,className:I()["pause-feedback"],children:i?(0,n.jsx)("div",{className:I().loader,children:(0,n.jsx)(P.hG,{})}):e?(0,n.jsx)("div",{className:I().submitted,children:"Thank you for submitting your feedback!"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:I().text,children:"Why did you decide to pause your plan?"}),(0,n.jsx)("div",{className:I().select,children:(0,n.jsxs)(S.Ph,{name:"reason",onChange:e=>{a(e.target.value)},value:s,children:[(0,n.jsx)("option",{value:"",disabled:!0,children:"Select a reason"}),z.map(e=>(0,n.jsx)("option",{value:e,children:e},e))]})}),(0,n.jsx)(C.Kx,{name:"comment",label:"Comments/suggestions:",type:"text",placeholder:"Let us know why and how we can improve",className:I().comments}),(0,n.jsx)(C.Mm,{loadingText:"Submitting...",disabled:e||""===s,className:I()["submit-btn"],children:"Send Feedback"})]})})};var q=s(82856),L=s(48130),R=s(19252),U=s(78551);let O=e=>(0,U.a)({queryKey:["userOrders",e],queryFn:async()=>(await T.U.get("/user/payment/invoices",{params:e})).data});var Y=s(9976),H=s(42665),$=s(11534),F=s.n($);let K=()=>{let e=(0,r.useRef)(null),t=(0,a.useRouter)(),s=(0,r.useRef)(!1),o=(0,d.o)(e=>e.changePlanSuccessful),l=(0,d.o)(e=>e.setChangePlanSuccessful),c=(0,d.o)(e=>e.setModal),_=(0,d.o)(e=>e.setModalState),u=(0,d.o)(e=>e.setNotification),{events:m,trackEvent:h}=(0,M.h)(),{data:f,isLoading:y}=(0,R.f)({refetchInterval:5e3}),{data:w,refetch:k,isLoading:N}=(0,L.h)(),{data:j}=(0,v.P)(),{data:C}=(0,q.a)(),S=C?.orgMemberCount,P=f?.membership,T=f?.billing,E=t.isReady&&"string"==typeof t.query.code?t.query.code:"",I=j?.results?.find(e=>e.type===x.wD.INDIVIDUAL&&e.recurrence===x.mz.ANNUAL),A=I?.unitAmount?I.unitAmount/100:null,z=P?.unitAmount?P.unitAmount/100/("year"===P.recurrence?12:P.intervalCount||1):null,U=!I&&P?.type===x.wD.INDIVIDUAL&&P?.recurrence===x.mz.MONTHLY,$=f?.membership?.subscriptionStatus,K=null==$||[x.qq.PAUSED,x.qq.CANCELED].includes($),B=P?.isPausing,Z=P?.type===x.wD.TEAM,X=P?.recurrence===x.mz.MONTHLY&&P?.intervalCount===3,G=P?.recurrence===x.mz.ANNUAL,J=P?.recurrence===x.mz.MONTHLY&&!X,W=(0,b.sm)({id:"orders",defaultParams:{limit:10},useQuery:e=>O(e,{refetchInterval:5e3})});if((0,r.useEffect)(()=>{!s.current&&"annual"===t.query.upgrade&&P&&I&&(s.current=!0,_({membership:P,targetPlan:I,couponCode:E}),c("ChangePlan"))},[I,P,E,t.query.upgrade,c,_]),(0,r.useEffect)(()=>{if((P?.subscriptionStatus===x.qq.FAILED_PAYMENT||P?.subscriptionStatus===x.qq.INCOMPLETE)&&W.query.isSuccess){let e=W.query.data?.results?.find(e=>e.invoiceStatus===x.Ux.OPEN);e&&(_({invoiceId:e?.id}),c("PaymentFailed"),h(m.showedPaymentFailedModal,{invoiceId:e?.id}))}},[m,P?.subscriptionStatus,W.query.data?.results?.find,W.query.isSuccess,c,_,h]),(0,r.useEffect)(()=>{if(o&&(u({type:"success",text:"Your plan has been successfully changed",duration:3e3}),e.current?.scrollToStart(),l(!1),t.query.code||t.query.upgrade)){let e={...t.query};delete e.code,delete e.upgrade,t.replace({pathname:t.pathname,query:e},void 0,{shallow:!0})}},[o,t,l,u]),!y)return(0,n.jsxs)("div",{className:F()["membership-wrapper"],children:[(0,n.jsx)(i.PB,{title:"Membership Settings"}),(0,n.jsxs)("div",{className:F()["plan-wrapper"],children:[(0,n.jsx)("span",{className:F().title,children:"Current Membership"}),(0,n.jsx)("div",{className:F().membership,children:P?(0,n.jsx)(Q,{carouselRef:e,membership:P,userCoupon:w,isAnnualSubscription:G,isMonthlySubscription:J,isQuarterlySubscription:X,isPausing:B,isUnsupportedLegacy:U,isTeam:Z,monthlySavings:z&&A?Math.round(12*z-A):null,teamMemberCount:S,prefillCouponCode:E}):(0,n.jsx)("div",{children:(0,n.jsx)(V,{disabled:!T?.last4Digits})})}
1),B&&(0,n.jsx)(D,{hasPauseFeedback:P?.hasPauseFeedback,pausePeriodId:P?.pausePeriodId}),t.isReady&&!N&&(0,n.jsx)("div",{className:F()["coupon-wrapper"],children:(0,n.jsx)(Y.U,{heading:"Have a promo code?",className:F()["coupon-accordion"],contentClassName:F()["coupon-accordion-content"],useIndicator:!0,indicatorPosition:"left",indicatorIcon:"plus",defaultOpen:!!(w?.couponCode||E),children:(0,n.jsx)(H.u,{refreshCoupon:k,initialCode:E},E)})})]}),(0,n.jsx)(p,{billing:T,isEnterpriseMembership:P?.isEnterprise,isExpiredMembership:K}),(0,n.jsxs)("div",{className:F()["orders-wrapper"],children:[(0,n.jsx)("span",{className:F().title,children:"Orders"}),(0,n.jsx)(g.Z,{list:W})]})]})},Q=({carouselRef:e,membership:t,userCoupon:s,isAnnualSubscription:r,isMonthlySubscription:a,isQuarterlySubscription:i,isPausing:o,isUnsupportedLegacy:l,isTeam:c,monthlySavings:d,teamMemberCount:_,prefillCouponCode:u})=>(0,n.jsxs)(m.T,{ref:e,visibleCards:2,children:[(0,n.jsx)(h.O,{membership:t,isAnnualUpsell:r}),!r&&!o&&!l&&(0,n.jsx)(j.z,{membership:t,coupon:s,teamMemberCount:_,description:d?`Save $${d}/year by upgrading to Annual`:"Save by upgrading to Annual",pendingCouponCode:u}),!i&&!o&&(0,n.jsx)(N,{membership:t,coupon:s,teamMemberCount:_,cadence:x.NP.QUARTERLY,title:`${c?"Team":"Agent"} Quarterly`,description:"Recurring quarterly payments (every 3 months)"}),!a&&!o&&(0,n.jsx)(N,{membership:t,coupon:s,teamMemberCount:_,cadence:x.NP.MONTHLY,title:`${c?"Team":"Agent"} Monthly`,description:"Recurring monthly payments"})]}),V=({disabled:e})=>{let t=(0,d.o)(e=>e.setModal);return(0,n.jsx)(l.z,{onClick:()=>{t("ChangePlan")},disabled:e,children:"Choose Plan"})};K.Layouts=["BaseLayout","SettingsLayout"];var B=K},49938:function(e){e.exports={"billing-wrapper":"billing-info_billing-wrapper__yFTfm",header:"billing-info_header__9vaFf",title:"billing-info_title__5UaZb","billing-details":"billing-info_billing-details__yhYZK","card-details":"billing-info_card-details__ZxCI8","card-icon":"billing-info_card-icon__H5JCk",error:"billing-info_error__WYKhy","billing-btn":"billing-info_billing-btn__jIHUD"}},391:function(e){e.exports={wrapper:"cards-carousel_wrapper__AwlmB",clip:"cards-carousel_clip__a26_p",track:"cards-carousel_track__l8uig",slide:"cards-carousel_slide__82_o_",arrow:"cards-carousel_arrow__BiBHV","arrow-left":"cards-carousel_arrow-left__1mA7f","arrow-right":"cards-carousel_arrow-right__KSy39","chevron-left":"cards-carousel_chevron-left__8gwAC","chevron-right":"cards-carousel_chevron-right___4qDb"}},15078:function(e){e.exports={"change-btn":"membership-switch-card_change-btn__Tlegv"}},63594:function(e){e.exports={loader:"pause-feedback_loader___NtXZ","pause-feedback":"pause-feedback_pause-feedback__Yzu3d",submitted:"pause-feedback_submitted__pG5j5",text:"pause-feedback_text__kHVES",select:"pause-feedback_select__hFkdy",other:"pause-feedback_other__3TT2D",comments:"pause-feedback_comments___bjTZ","submit-btn":"pause-feedback_submit-btn__f1Q6t"}},11534:function(e){e.exports={"text-display-36":"settings_text-display-36__I6_Jv","text-display-32":"settings_text-display-32__VHv4Q","text-boogy-24":"settings_text-boogy-24__Xk8xz","text-boogy-16":"settings_text-boogy-16__pZuDR","text-regular-16":"settings_text-regular-16__4ZR8w","text-regular-14":"settings_text-regular-14__OXq4t","text-regular-12":"settings_text-regular-12__sYKOe","text-medium-16":"settings_text-medium-16__CS5v5","text-medium-14":"settings_text-medium-14__aK_H5","text-medium-12":"settings_text-medium-12__8a1xe","text-caps-12":"settings_text-caps-12__6x4ur","text-caps-10":"settings_text-caps-10__26pI5","text-caps-8":"settings_text-caps-8__D2Jka",header:"settings_header__pDQrH","membership-wrapper":"settings_membership-wrapper__iDwgK","plan-wrapper":"settings_plan-wrapper__0GfR7",membership:"settings_membership__tNVMO","coupon-wrapper":"settings_coupon-wrapper___3sSx","coupon-accordion-content":"settings_coupon-accordion-content__vb7po","orders-wrapper":"settings_orders-wrapper__PgQ2P","orders-table":"settings_orders-table__bRUxG","view-btn":"settings_view-btn__GYprK","orders-loading":"settings_orders-loading__IwTlo","orders-no-results":"settings_orders-no-results__CsVOn","orders-pagination":"settings_orders-pagination__dorS9","account-wrapper":"settings_account-wrapper__IzR7P",row:"settings_row__sSrTv","password-wrapper":"settings_password-wrapper__6gfcR","submit-btn":"settings_submit-btn__zH2Ml","account-details":"settings_account-details__ejNhK","notifications-detail
1s":"settings_notifications-details__g2CZE","account-password":"settings_account-password__lyfwd","notifications-wrapper":"settings_notifications-wrapper__h6Cmk",title:"settings_title__tJUY2",subtitle:"settings_subtitle__fDYrm","developer-wrapper":"settings_developer-wrapper__GL8RC","developer-section":"settings_developer-section__W9zGY","developer-section-filled":"settings_developer-section-filled__V4WUy","connector-steps":"settings_connector-steps__RxjNd","step-marker":"settings_step-marker__KADXx","recommended-badge":"settings_recommended-badge__mlE4C","secret-row":"settings_secret-row__Vroy4","secret-hidden":"settings_secret-hidden__bvRSW","reveal-btn":"settings_reveal-btn__OGCgd","developer-accordion":"settings_developer-accordion__X8vzt","accordion-heading":"settings_accordion-heading__PrwWM","developer-accordion-content":"settings_developer-accordion-content__qlmRn",divider:"settings_divider__CTt_E","token-created-banner":"settings_token-created-banner__U66j7","token-display":"settings_token-display__k_CdN","create-token-form":"settings_create-token-form__EOWsl","token-name-input":"settings_token-name-input__ZUnpT","tokens-list":"settings_tokens-list__r_5pV","tokens-table":"settings_tokens-table__Wkoim","revoke-cell":"settings_revoke-cell__PK4SJ","no-tokens":"settings_no-tokens__mNfsr","team-wrapper":"settings_team-wrapper__mYXtA","organization-details":"settings_organization-details__nbSJk","organization-name":"settings_organization-name__1HGib","organization-team":"settings_organization-team__m9nLH","table-header":"settings_table-header__9Nx9i","member-management-btns":"settings_member-management-btns__Y7tVE","access-cell":"settings_access-cell__0gt_3","access-state":"settings_access-state__7eHzh","access-dot":"settings_access-dot__tMCgj","is-granted":"settings_is-granted__Y3ICT","is-pending":"settings_is-pending__SPur5","access-none":"settings_access-none__tZ6MU","access-link":"settings_access-link__bXFN6","team-table":"settings_team-table__X5pPl","admin-actions":"settings_admin-actions__Q0l3p","delete-member":"settings_delete-member__ci8ir","billing-wrapper":"settings_billing-wrapper__BJ4pm","billing-details":"settings_billing-details__HcpxV"}}},function(e){e.O(0,[2644,6342,7536,1446,3328,1867,7407,8276,8295,3457,19,3593,2888,9774,179],function(){return e(e.s=87366)}),_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.