1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0ea2e-d64d-74f3-b9a1-e0abce250a1c")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89365,e=>{e.v({activeCycle:"v3-upgrade-modal-module__tEZeJa__activeCycle",backdropReveal:"v3-upgrade-modal-module__tEZeJa__backdropReveal",benefitGrid:"v3-upgrade-modal-module__tEZeJa__benefitGrid",benefitIcon:"v3-upgrade-modal-module__tEZeJa__benefitIcon",benefitTile:"v3-upgrade-modal-module__tEZeJa__benefitTile",capacityReveal:"v3-upgrade-modal-module__tEZeJa__capacityReveal",compactReach:"v3-upgrade-modal-module__tEZeJa__compactReach",compactReachHeadline:"v3-upgrade-modal-module__tEZeJa__compactReachHeadline",compactReachNumbers:"v3-upgrade-modal-module__tEZeJa__compactReachNumbers",confirmButton:"v3-upgrade-modal-module__tEZeJa__confirmButton",contentArrival:"v3-upgrade-modal-module__tEZeJa__contentArrival",ctaEntrance:"v3-upgrade-modal-module__tEZeJa__ctaEntrance",cycleCaption:"v3-upgrade-modal-module__tEZeJa__cycleCaption",cycleChoice:"v3-upgrade-modal-module__tEZeJa__cycleChoice",cycleChoices:"v3-upgrade-modal-module__tEZeJa__cycleChoices",dialog:"v3-upgrade-modal-module__tEZeJa__dialog",entranceOverlay:"v3-upgrade-modal-module__tEZeJa__entranceOverlay",lightSweep:"v3-upgrade-modal-module__tEZeJa__lightSweep",magicArrival:"v3-upgrade-modal-module__tEZeJa__magicArrival",nextReach:"v3-upgrade-modal-module__tEZeJa__nextReach",numberArrival:"v3-upgrade-modal-module__tEZeJa__numberArrival",payToday:"v3-upgrade-modal-module__tEZeJa__payToday",planChoice:"v3-upgrade-modal-module__tEZeJa__planChoice",previousReach:"v3-upgrade-modal-module__tEZeJa__previousReach",priceRow:"v3-upgrade-modal-module__tEZeJa__priceRow",priceSummary:"v3-upgrade-modal-module__tEZeJa__priceSummary",primaryCtaText:"v3-upgrade-modal-module__tEZeJa__primaryCtaText",radio:"v3-upgrade-modal-module__tEZeJa__radio",reachArrow:"v3-upgrade-modal-module__tEZeJa__reachArrow",reachBadge:"v3-upgrade-modal-module__tEZeJa__reachBadge",reachCard:"v3-upgrade-modal-module__tEZeJa__reachCard",reachComparison:"v3-upgrade-modal-module__tEZeJa__reachComparison",reachHeading:"v3-upgrade-modal-module__tEZeJa__reachHeading",reachTrack:"v3-upgrade-modal-module__tEZeJa__reachTrack",saving:"v3-upgrade-modal-module__tEZeJa__saving",selected:"v3-upgrade-modal-module__tEZeJa__selected",sparkleBurst:"v3-upgrade-modal-module__tEZeJa__sparkleBurst",sparkleEntrance:"v3-upgrade-modal-module__tEZeJa__sparkleEntrance"})},416705,e=>{"use strict";var a=e.i(843476),t=e.i(271645),s=e.i(271235),l=e.i(776639),r=e.i(519455),n=e.i(692361),i=e.i(25652),d=e.i(283086),o=e.i(643531),c=e.i(37727),u=e.i(581418),m=e.i(972520),p=e.i(531278),h=e.i(878894),x=e.i(87316),g=e.i(327965),_=e.i(306552),f=e.i(985595),v=e.i(41931),y=e.i(13217),N=e.i(21845),b=e.i(807973),j=e.i(975157),E=e.i(833277),S=e.i(89365),w=e.i(201436);let P={lite:0,standard:1,pro:2},T={"3_month":0,"6_month":1,"12_month":2},L={"3_month":"Quarterly","6_month":"Semi-Annual","12_month":"Annual"},R=[{value:"3_month",label:"Quarterly",months:3},{value:"6_month",label:"Semi-Annual",months:6,savePct:10},{value:"12_month",label:"Annual",months:12,savePct:20}],A=e=>`$${e.toLocaleString("en-US",{maximumFractionDigits:0})}`,C=e=>`$${(e/100).toLocaleString("en-US",{maximumFractionDigits:2,minimumFractionDigits:2})}`;function I(e){if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(e.key))return;let a=Array.from(e.currentTarget.querySelectorAll('button[role="radio"]:not(:disabled)')),t=a.indexOf(e.target);if(t<0)return;e.preventDefault();let s="ArrowLeft"===e.key||"ArrowUp"===e.key?-1:1,l="Home"===e.key?0:"End"===e.key?a.length-1:(t+s+a.length)%a.length;a[l].focus(),a[l].click()}e.s(["V3UpgradeModal",0,function({open:e,onOpenChange:k,team:O,currentBillingCycle:D=null,targetPlan:U=null,targetCycle:B=null,source:M="profiles_page",mode:V="upgrade",onUpgradeSuccess:J,upgradeAttribution:Z,creditBenefit:$,fixedTargetPlan:G=!1}){let Y,F,H,W,q,X,K,z,Q,ee,ea,et,es,el,er,en,ei,{user:ed}=(0,E.useUser)(),eo=ed?.first_name?.trim(),{buddyData:ec,isLoading:eu,error:em,mutate:ep}=(0,w.useBuddy)({enabled:e}),eh=ec?.name?.trim().split(/\s+/)[0],ex=ec?.meeting_link?.trim(),eg=!!(eh&&ex&&/^https?:\/\//i.test(ex)),{mutate:e_}
1=(0,s.useSWRConfig)(),ef=(0,g.getTeamV3DailyCaps)(O),ev="v3"===(O?.billing_mode||"").trim().toLowerCase(),ey=(0,N.isV3TrialingTeam)(O),eN=ey?b.TRIAL_UI_POST_TRIAL_PLAN:(0,N.normalizeV3Plan)(O?.plan||"lite"),[eb,ej]=(0,t.useState)("standard"),[eE,eS]=(0,t.useState)("12_month"),[ew,eP]=(0,t.useState)({}),[eT,eL]=(0,t.useState)(null),[eR,eA]=(0,t.useState)(0),[eC,eI]=(0,t.useState)(!1),ek=(0,t.useRef)(null),eO=(0,t.useRef)(!1),eD=O?.id?`v3-plan-upgrade-pending:${O.id}`:null,eU=(0,t.useRef)(O?.id);(0,t.useLayoutEffect)(()=>{eU.current=O?.id},[O?.id]);let[eB,eM]=(0,t.useState)(null),[eV,eJ]=(0,t.useState)(null),[eZ,e$]=(0,t.useState)(!1),[eG,eY]=(0,t.useState)(!1),[eF,eH]=(0,t.useState)(null),[eW,eq]=(0,t.useState)(!1),[eX,eK]=(0,t.useState)(!1),ez=(0,t.useRef)(!1);(0,t.useEffect)(()=>{if(ek.current=null,eH(null),eJ(null),eM(null),"downgrade"!==V){if(!eD)return void eJ("We could not identify your team. Reload this page before upgrading.");try{let e=sessionStorage.getItem(eD);if(e){let a=JSON.parse(e);if(a.teamId!==O?.id||!["lite","standard","pro"].includes(a.plan)||!["3_month","6_month","12_month"].includes(a.cycle)||"string"!=typeof a.billingAttemptId)throw Error("Invalid saved upgrade");ek.current=a,eH("We are checking your previous upgrade. Refresh your account status before making another change.")}eM(eD)}catch{eJ("We could not read your previous upgrade. Restore browser storage access and reopen this page before making another change.")}}},[eD,O?.id,V]);let eQ=(e,a)=>`${e}__${a}`,e0=`v3_preview_cache__${O?.id??"unknown"}__${eN}__${D??"none"}`,e3=`${e0}__${G?U:"all"}__${e}`,e1=eT===e3?ew[eQ(eb,eE)]??null:null,e5="downgrade"!==V&&(eZ||eT!==e3)&&!e1,e2=eG&&!e1||!!(G&&e1&&!e1.is_prorated),e4="downgrade"===V,e6=(()=>{if(!ey)return null;let e=O?.subscription_end_time?new Date(O.subscription_end_time).getTime():NaN,a=O?.subscription_start_time?new Date(O.subscription_start_time).getTime():NaN;if(!Number.isFinite(e))return null;let t=Number.isFinite(a)?Math.max(1,Math.round((e-a)/864e5)):14,s=Math.max(0,Math.ceil((e-Date.now())/864e5)),l=Math.min(t,Math.max(1,t-s+1)),r=Math.max(0,Math.min(100,(t-s)/t*100)),n=new Date(e);return{totalDays:t,daysLeft:s,dayNumber:l,progress:r,endLabel:Number.isNaN(n.getTime())?null:n.toLocaleDateString("en-US",{month:"short",day:"numeric"})}})(),e7=g.V3_PLAN_ORDER.map(e=>({value:e,label:g.V3_PLAN_LABELS[e],desc:`${ef[e]} pitches/day`,recommended:"pro"===e})).filter(e=>G&&U?e.value===U:!!ey||(e4?P[e.value]<=P[eN]:P[e.value]>=P[eN])),e8=R.filter(e=>{if(ey||!D)return!0;let a=T[D],t=T[e.value];return e4?t<=a:t>=a}),e9=e7.length>0,ae=e8.length>0;(0,t.useEffect)(()=>{if(e){if(U&&(ey||(e4?P[U]<=P[eN]:P[U]>=P[eN])))return void ej(U);if(ey)return void ej(b.TRIAL_UI_POST_TRIAL_PLAN);if(e4)return void("pro"===eN?ej("standard"):ej("lite"));"lite"===eN?ej("standard"):ej("pro")}},[e,e4,ey,U,eN]),(0,t.useEffect)(()=>{e&&e9&&(e7.some(e=>e.value===eb)||ej(e7[0].value))},[e,e9,e7,eb]),(0,t.useEffect)(()=>{if(!e){ez.current=!1;return}if(ae){if(!ez.current&&(ez.current=!0,B&&e8.some(e=>e.value===B)))return void eS(B);e8.some(e=>e.value===eE)||eS(e8[0].value)}},[e,B,ae,D,e4,eE]),(0,t.useEffect)(()=>{e&&(0,_.captureEvent)(f.POSTHOG_EVENTS.V3_UPGRADE_MODAL_OPENED,{[f.CUSTOM_PROPERTIES.SOURCE]:M,[f.CUSTOM_PROPERTIES.PLAN_TYPE]:eN,mode:V})},[e,M,eN,V]),(0,t.useEffect)(()=>{if(!e){eP({}),eL(null);return}if(!ev||e4||!e9||!ae)return;try{let e=!G&&O?.id?sessionStorage.getItem(e0):null;if(e&&!G){let a=JSON.parse(e);if(Date.now()-a.ts<6e5&&Object.keys(a.data).length>0){eP(a.data),eL(e3),e$(!1),eY(!1);return}}}catch{}let a=e7.map(e=>e.value),t=e8.map(e=>e.value),s=a.flatMap(e=>t.map(a=>({plan:e,cycle:a}))),l=!1;return eP({}),e$(!0),eY(!1),Promise.allSettled(s.map(e=>v.paymentApi.v3CheckoutPreview({plan:e.plan,billing_cycle:e.cycle}).then(a=>({key:eQ(e.plan,e.cycle),result:a})))).then(e=>{if(l)return;let a={},t=!1;for(let s of e)"fulfilled"===s.status&&(a[s.value.key]=s.value.result,t=!0);if(eP(a),eL(e3),eY(Object.keys(a).length!==s.length),t&&!G&&O?.id&&Object.keys(a).length===s.length)try{sessionStorage.setItem(e0,JSON.stringify({ts:Date.now(),data:a}))}catch{}}).finally(()=>{l||e$(!1)}),()=>{l=!0}},[e,ev,e4,e9,ae,e0,G,D,eN,U,e3,eR,O?.id]);let aa=!e5&&!e2&&null!==e1,at=!!D&&eb===eN&&eE===D,as=P[eN],al=P[eb],ar=al>as,an=g.V3_FEATURE_MATRIX.filter(e=>P[e.requiredPlan]<=al&&P[e.requiredPlan]>as),ai=g.V3_FEATURE_MATRIX.filter(e=>P[e.requiredPlan]>al&&P[e.requiredPlan]<=as),ad=g.V3_FEATURE_MATRIX.filter(e=>P[e.requiredPlan]<=al),ao=async()=>{let e=at&&!ey;if("downgrade"!==V&&(!aa||!eD||eB!==eD)||eW||eO.current||eF||e)return;if(!ev)return void y.default.error("Direct plan change is only available for v3 billing teams.");eO.current=!0,eq(!0);let a=!1,t=!1,s=!1,l={plan:eb,cycle:eE,teamId:O?.id,billingAttemptId:crypto.randomUUID(),upgradeAttribution:Z};try{if("downgrade"!==V&&eD&&sessionStorage.setItem(eD,JSON.stringify(l)),ek.current=l,eJ(null),(0,_.captureEvent)(f.POSTHOG_EVENTS.V3_UPGRADE_MODAL_CONTINUE,{[f.CUSTOM_PROPERTIES.PLAN_TYPE]:eb,[f.CUSTOM_PROPERTIES.BILLING_INTERVAL]:eE,[f.CUSTOM_PROPERTIES.SOURCE]:M}),(0,_.captureEvent)(f.POSTHOG_EVENTS.V3_BILLING_PLAN_SWITCH_STARTED,{[f.CUSTOM_PROPERTIES.PLAN_TYPE]:eb,[f.CUSTOM_PROPERTIES.BILLING_INTERVAL]:eE,[f.CUSTOM_PROPERTIES.SOURCE]:M,mode:V}),s=!0,"downgrade"===V)await v.paymentApi.v3DowngradeSubscription({plan:eb,billing_cycle:eE}),a=!0;else{let e=await v.paymentApi.v3UpgradeSubscription({plan:eb,billing_cycle:eE,billing_attempt_id:l.billingAttemptId,expected_plan:eN,expected_billing_cycle:D??void 0});if(a=!0,eU.current!==l.teamId)return;if(!(t=e.success&&"annual_flex_rider"===e.billing&&!1===e.pending_update)&&(!e.success||e.pending_update||"active"!==e.status||!0!==e.entitlements_synced))return void eH("Your upgrade is still processing. Please refresh your account in a moment before making another change.")}if(await Promise.all([e_("team"),e_("me"),e_("daily-usage"),e_("billing-preview"),e_("subscription-schedules")]),eU.current!==l.teamId)return;eD&&sessionStorage.removeItem(eD),t||await J?.(l.upgradeAttribution),eH(null),ek.current=null,k(!1),eK(!1),eP({});try{sessionStorage.removeItem(e0)}catch{}if(t)return void y.default.success("Your Pro upgrade is scheduled.");(0,_.captureEvent)(f.POSTHOG_EVENTS.V3_BILLING_PLAN_SWITCH_COMPLETED,{[f.CUSTOM_PROPERTIES.PLAN_TYPE]:eb,[f.CUSTOM_PROPERTIES.BILLING_INTERVAL]:eE,[f.CUSTOM_PROPERTIES.SOURCE]:M,mode:V}),y.default.success("downgrade"===V?"Downgrade successful! Your plan has been updated.":ey?"Your paid subscription is now active.":"Upgrade successful! Your plan has been updated.")}catch(r){if(eU.current!==l.teamId)return;if(!s){ek.current=null,eJ("Your upgrade was not submitted. We could not save its recovery details. Restore browser storage access and try again.");return}let e=!a&&(0,v.isApiRequestError)(r)&&(402===r.status||r.detail?.billing_outcome==="not_submitted");if(e&&(ek.current=null,eD&&sessionStorage.removeItem(eD),await Promise.allSettled([e_("team"),e_("me"),e_("billing-preview"),e_("subscription-schedules"),e_(e=>Array.isArray(e)&&("upgrade-addons"===e[0]||"v3-addons"===e[0]))]),eA(e=>e+1)),a||"downgrade"!==V&&!e)return void eH((0,v.isApiRequestError)(r)&&400===r.status?"We could not confirm whether your upgrade completed. Refresh your account status. If it stays unchanged, contact support before making another change.":"We are checking your upgrade. Refresh your account status before making another change.");(0,_.captureEvent)(f.POSTHOG_EVENTS.V3_BILLING_PLAN_SWITCH_FAILED,{[f.CUSTOM_PROPERTIES.PLAN_TYPE]:eb,[f.CUSTOM_PROPERTIES.BILLING_INTERVAL]:eE,[f.CUSTOM_PROPERTIES.SOURCE]:M,mode:V});let t=r instanceof Error?r.message:"downgrade"===V?"Failed to downgrade plan":"Failed to upgrade plan";y.default.error(t)}finally{eq(!1),eO.current=!1}},ac=async()=>{let e=ek.current;if(!eC&&e&&e.teamId===O?.id){eI(!0);try{let a=await v.paymentApi.v3UpgradeSubscription({plan:e.plan,billing_cycle:e.cycle,billing_attempt_id:e.billingAttemptId,reconcile_only:!0});if(eU.current!==e.teamId)return;
1if(a?.success&&"annual_flex_rider"===a.billing&&!1===a.pending_update){if(await Promise.all([e_("team"),e_("me"),e_("subscription-schedules")]),eU.current!==e.teamId)return;eD&&sessionStorage.removeItem(eD),ek.current=null,eH(null),eP({}),k(!1),y.default.success("Your Pro upgrade is scheduled.");return}let t=await v.paymentApi.v3GetAddons();if(eU.current!==e.teamId||!1===t.entitlements_synced&&(t=await v.paymentApi.v3GetAddons(),eU.current!==e.teamId))return;if(t.plan!==e.plan||t.billing_cycle!==e.cycle||"active"!==t.status||t.pending_update||!0!==t.entitlements_synced)return void eH("Your upgrade is still processing. You can check again in a moment.");if(await Promise.all([e_("team"),e_("me"),e_("daily-usage"),e_("billing-preview"),e_("subscription-schedules")]),eU.current!==e.teamId)return;eD&&sessionStorage.removeItem(eD),await J?.(e.upgradeAttribution),(0,_.captureEvent)(f.POSTHOG_EVENTS.V3_BILLING_PLAN_SWITCH_COMPLETED,{[f.CUSTOM_PROPERTIES.PLAN_TYPE]:e.plan,[f.CUSTOM_PROPERTIES.BILLING_INTERVAL]:e.cycle,[f.CUSTOM_PROPERTIES.SOURCE]:M,mode:V}),eP({});try{sessionStorage.removeItem(e0)}catch{}eH(null),ek.current=null,k(!1),y.default.success("Upgrade successful! Your plan has been updated.")}catch{eH("We could not refresh your account yet. Check again in a moment; this will not submit another payment.")}finally{eI(!1)}}},au=aa?`Regular renewal price: ${function(e){let a=e.replace(/[^0-9.]/g,""),t=parseFloat(a);if(isNaN(t))return e.trim().startsWith("$")?e:`$${e}`;let s=a.includes(".");return`$${t.toLocaleString("en-US",{minimumFractionDigits:2*!!s,maximumFractionDigits:2*!!s})}`}(e1.next_renewal_amount_formatted??C(e1.next_renewal_amount??e1.full_price))} every ${R.find(e=>e.value===eE).months} months, before discounts and tax.`:null,am=e&&!eX;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.Dialog,{open:am,onOpenChange:k,children:(0,a.jsxs)(l.DialogContent,{className:(0,j.cn)("flex max-h-[calc(100dvh-2rem)] flex-col gap-0 overflow-y-auto p-0 sm:max-w-[560px]",S.default.dialog),overlayClassName:S.default.entranceOverlay,closeButtonProps:{"data-e2e-dismiss":"cancel","aria-label":"Close plan change"},"data-e2e-modal-id":"v3-plan-change","data-e2e-modal-kind":"confirm",children:[(0,a.jsxs)(l.DialogHeader,{className:"shrink-0 px-5 pb-2 pt-5 pr-16 text-left sm:px-7 sm:pr-20",children:[(0,a.jsx)("div",{className:"flex flex-col gap-1",children:(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)(l.DialogTitle,{className:"text-2xl font-semibold leading-8 text-slate-950",children:e4?"Change my plan":ey?"Start your subscription":G&&U?`${eo?`${eo}, get`:"Get"} more replies with ${g.V3_PLAN_LABELS[U]}!`:"Upgrade your plan"}),(0,a.jsx)(l.DialogDescription,{className:"sr-only",children:e4?"Review what changes and confirm your new plan.":ey?"Choose your plan and how often you pay.":G&&U&&ef[U]>ef[eN]?`Reach ${ef[U]-ef[eN]} more prospects every day. More reach. More chances to get noticed.`:"Choose the right plan for your next stage of growth."})]})}),eV&&(0,a.jsx)("div",{role:"alert",className:"mt-3 text-sm text-red-700",children:eV}),eF&&(0,a.jsxs)("div",{role:"status",className:"mt-3 rounded-xl bg-amber-50 p-3 text-sm text-amber-900",children:[(0,a.jsx)("p",{children:eF}),(0,a.jsxs)(r.Button,{variant:"outline",className:"mt-2",disabled:eC,onClick:()=>void ac(),children:[eC&&(0,a.jsx)(p.Loader2,{className:"mr-2 h-4 w-4 animate-spin"}),"Refresh account status"]})]})]}),(Y=aa?e1.amount_due:0,F=!!aa&&e1.is_prorated,q=Math.min(W=(H=aa?e1.customer_balance??0:0)<0?Math.abs(H):0,Y),X=e1?.actual_charge??Y-q,K=aa&&0===X,z=D?L[D]:"Quarterly",Q=ef[eb]!==ef[eN],ee=eE!==D,ea=eb!==eN||ee,et=e4?ea:ea||ey,(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("div",{className:"shrink-0",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"min-w-0 space-y-3 px-5 pb-3 sm:px-7",children:[ey&&!e4&&(0,a.jsxs)("div",{className:"rounded-xl border border-violet-200 bg-violet-50 p-4",children:[(0,a.jsxs)("div",{className:"relative flex flex-col gap-4 sm:flex-row sm:items-center sm:gap-5",children:[e6&&(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:flex-col sm:items-center sm:gap-1.5",children:[(0,a.jsxs)("div",{className:"relative h-14 w-14 shrink-0",role:"img","aria-label":`Day ${e6.dayNumber} of ${e6.totalDays} of your trial`,children:[(0,a.jsxs)("svg",{viewBox:"0 0 36 36",className:"h-14 w-14 -rotate-90",children:[(0,a.jsx)("circle",{cx:"18",cy:"18",r:"15.9",fill:"none",stroke:"currentColor",strokeWidth:"3",className:"text-purple-100"}),(0,a.jsx)("circle",{cx:"18",cy:"18",r:"15.9",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeDasharray:`${e6.progress}, 100`,className:"text-purple-600 transition-[stroke-dasharray] duration-500"})]}),(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,a.jsxs)("span",{className:"text-[13px] font-bold tabular-nums text-purple-700",children:[e6.daysLeft,"d"]})})]}),(0,a.jsxs)("div",{className:"sm:text-center",children:[(0,a.jsxs)("p",{className:"text-xs font-medium text-violet-700",children:["Day ",e6.dayNumber," /"," ",e6.totalDays]}),(0,a.jsx)("p",{className:"text-xs text-slate-500",children:0===e6.daysLeft?"Ends today":e6.endLabel?`Ends ${e6.endLabel}`:"Trial ending soon"})]})]}),(0,a.jsxs)("div",{className:"flex-1 min-w-0 space-y-1",children:[(0,a.jsx)("p",{className:"text-base font-semibold leading-snug text-foreground",children:"Start your subscription now, or let your trial convert automatically."}),(0,a.jsxs)("p",{className:"text-sm leading-snug text-muted-foreground",children:["Confirming below"," ",(0,a.jsx)("span",{className:"font-semibold text-foreground",children:"ends your trial and charges your card today"}),". Your trial fee is credited toward the first payment. Otherwise you'll convert to"," ",(0,a.jsxs)("span",{className:"font-semibold text-foreground",children:[g.V3_PLAN_LABELS[b.TRIAL_UI_POST_TRIAL_PLAN]," ·"," ",L[b.TRIAL_UI_POST_TRIAL_BILLING_CYCLE]]})," ","automatically when the trial ends."]})]})]}),ea&&(0,a.jsxs)("div",{className:"relative mt-4 flex items-center gap-3 rounded-xl bg-white/70 ring-1 ring-purple-100 px-3 py-2.5 backdrop-blur-sm",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-slate-500",children:"Default"}),(0,a.jsxs)("p",{className:"truncate text-sm font-semibold text-foreground",children:[g.V3_PLAN_LABELS[eN]," ·"," ",ef[eN],"/day"]})]}),(0,a.jsx)(m.ArrowRight,{className:"h-4 w-4 text-purple-500 shrink-0"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0 text-right",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-violet-700",children:"Your pick"}),(0,a.jsxs)("p",{className:"truncate text-sm font-semibold text-purple-700",children:[g.V3_PLAN_LABELS[eb]," ·"," ",ef[eb],"/day"]})]})]})]}),!G&&(0,a.jsxs)("section",{"aria-label":"Plan selection",className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-slate-900",children:"Choose your plan"}),(0,a.jsx)("span",{className:"text-xs text-slate-500",children:"Monthly equivalent"})]}),(0,a.jsx)("div",{className:"space-y-2",role:"radiogroup","aria-label":"Choose plan",onKeyDown:I,children:e7.map(e=>{let t=eb===e.value;return(0,a.jsxs)("button",{type:"button",role:"radio","aria-checked":t,tabIndex:t?0:-1,disabled:eW||!!eF,onClick:()=>ej(e.value),className:(0,j.cn)(S.default.planChoice,t&&S.default.selected),children:[(0,a.jsxs)("span",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:S.default.radio,"aria-hidden":"true",children:t&&(0,a.jsx)("span",{})}),(0,a.jsxs)("span",{className:"text-left",children:[(0,a.jsxs)("span",{className:"block text-sm font-semibold text-slate-900",children:[e.label,e.value===eN&&(0,a.jsx)("span",{className:"ml-2 text-xs font-normal text-slate-500",children:ey?"After trial":"Current"})]}),(0,a.jsx)("span",{className:"mt-0.5 block text-sm text-slate-500",children:e.desc})]})]}),(0,a.jsxs)("span",{className:"shrink-0 text-lg font-semibold tabular-nums text-slate-900",children:[A(g.V3_PO
1STED_MRR[e.value][eE]),(0,a.jsx)("span",{className:"text-xs font-normal text-slate-500",children:"/mo"})]})]},e.value)})}),!e9&&(0,a.jsx)("p",{className:"text-sm text-slate-600",children:e4?"Youâre on our lowest plan.":"Youâre already on our highest plan. Contact us for more capacity."})]}),ar&&(an.length>0||Q)?(0,a.jsxs)("div",{className:"space-y-3",children:[Q&&(0,a.jsxs)("div",{className:S.default.reachCard,children:[(0,a.jsxs)("div",{className:S.default.reachHeading,children:[(0,a.jsx)("span",{children:"More reach. Every day."}),(0,a.jsxs)("span",{className:S.default.reachBadge,children:[(0,a.jsx)(i.TrendingUp,{size:14,"aria-hidden":"true"}),(ef[eb]/ef[eN]).toLocaleString(void 0,{maximumFractionDigits:1}),"à daily capacity"]})]}),(0,a.jsxs)("div",{className:S.default.reachComparison,children:[(0,a.jsxs)("div",{className:S.default.previousReach,children:[(0,a.jsx)("span",{children:g.V3_PLAN_LABELS[eN]}),(0,a.jsx)("strong",{children:ef[eN]}),(0,a.jsx)("span",{children:"base pitches / day"})]}),(0,a.jsx)(m.ArrowRight,{className:S.default.reachArrow,"aria-hidden":"true"}),(0,a.jsxs)("div",{className:S.default.nextReach,children:[(0,a.jsx)("span",{children:g.V3_PLAN_LABELS[eb]}),(0,a.jsx)("strong",{children:ef[eb]}),(0,a.jsx)("span",{children:"base pitches / day"})]})]}),(0,a.jsx)("div",{className:S.default.reachTrack,"aria-hidden":"true",children:(0,a.jsx)("span",{style:{width:`${ef[eN]/ef[eb]*100}%`}})})]}),(0,a.jsxs)("div",{className:S.default.benefitGrid,children:[an.filter(e=>"Implementation Support"!==e.label).map(e=>(0,a.jsxs)("div",{className:S.default.benefitTile,children:[(0,a.jsx)("span",{className:S.default.benefitIcon,children:(0,a.jsx)(o.Check,{size:18,"aria-hidden":"true"})}),(0,a.jsx)("div",{children:(0,a.jsx)("strong",{children:e.label})})]},e.key)),$&&"pro"===eb&&(0,a.jsxs)("div",{className:S.default.benefitTile,children:[(0,a.jsx)("span",{className:S.default.benefitIcon,children:(0,a.jsx)(d.Sparkles,{size:18,"aria-hidden":"true"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("strong",{children:"Pro comes with More Magic Pitch Credits for FREE"}),(0,a.jsx)("p",{children:$})]})]})]})]}):e4&&ea?(0,a.jsxs)("div",{className:"space-y-3",children:[ai.length>0&&(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-red-700",children:"You'll lose"}),ef[eN]>ef[eb]&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-red-700",children:[(0,a.jsx)(c.X,{className:"h-3.5 w-3.5 text-red-400 shrink-0"}),(0,a.jsxs)("span",{children:[ef[eN]," â"," ",ef[eb]," pitches/day"]})]}),ai.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-red-700",children:[(0,a.jsx)(c.X,{className:"h-3.5 w-3.5 text-red-400 shrink-0"}),(0,a.jsx)("span",{children:"Implementation Support"===e.label?"Get help putting your bigger reach to work":e.label})]},e.key))]}),ad.length>0&&(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-muted-foreground",children:"Still included"}),ad.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,a.jsx)(o.Check,{className:"h-3.5 w-3.5 text-violet-600 shrink-0"}),(0,a.jsx)("span",{children:"Implementation Support"===e.label?"Get help putting your bigger reach to work":e.label})]},e.key))]})]}):!ea&&ad.length>0?(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("p",{className:"text-sm font-semibold text-muted-foreground",children:["Included in ",g.V3_PLAN_LABELS[eb]]}),ad.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,a.jsx)(o.Check,{className:"h-3.5 w-3.5 text-violet-600 shrink-0"}),(0,a.jsx)("span",{children:"Implementation Support"===e.label?"Get help putting your bigger reach to work":e.label})]},e.key))]}):null,$&&"pro"===eb&&!ar&&(0,a.jsx)("p",{className:"text-sm leading-5 text-slate-600",children:$}),(0,a.jsxs)("section",{className:"space-y-2","aria-label":"Payment frequency",children:[(0,a.jsx)("h3",{className:"text-sm font-medium text-slate-900",children:"Pick Your Billing Cycle"}),(0,a.jsx)("div",{className:S.default.cycleChoices,role:"radiogroup","aria-label":"Billing cycle",onKeyDown:I,children:e8.map(e=>{let t=eE===e.value;return(0,a.jsxs)("button",{type:"button",role:"radio","aria-checked":t,tabIndex:t?0:-1,disabled:eW||!!eF,onClick:()=>eS(e.value),className:(0,j.cn)(S.default.cycleChoice,t&&S.default.activeCycle),children:[(0,a.jsx)("span",{children:"Semi-Annual"===e.label?"6 months":e.label}),e.savePct?(0,a.jsxs)("span",{className:S.default.saving,children:["Save ",e.savePct,"%"]}):(0,a.jsx)("span",{className:S.default.cycleCaption,children:"Every 3 months"})]},e.value)})})]})]}),et&&(0,a.jsx)("div",{className:"mx-5 mb-3 min-w-0 space-y-3 sm:mx-7",children:et&&(e5?(0,a.jsxs)("div",{className:"flex min-h-24 items-center justify-center gap-3 text-sm text-slate-500",role:"status","aria-live":"polite",children:[(0,a.jsx)(p.Loader2,{className:"h-4 w-4 animate-spin"}),(0,a.jsx)("span",{children:"Calculating your totalâ¦"})]}):aa?(0,a.jsxs)("div",{className:"overflow-hidden",role:"region","aria-label":"Billing summary",children:[(0,a.jsx)("div",{className:S.default.payToday,children:(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-4",children:[(0,a.jsx)("p",{className:"text-base font-medium text-slate-900",children:"Pay today"}),(0,a.jsx)("p",{className:(0,j.cn)("text-3xl font-semibold tabular-nums leading-none",K?"text-emerald-600":"text-foreground"),children:K?"$0":C(X)})]})}),(F||W>0||au)&&(0,a.jsxs)("div",{className:"space-y-2 pt-1 text-slate-500",children:[F&&!K&&(0,a.jsxs)("p",{className:"text-xs text-muted-foreground leading-snug",children:["Prorated for the remaining time in your current ",z.toLowerCase()," ","billing cycle."]}),W>0&&void 0===e1.actual_charge&&(0,a.jsxs)("p",{className:"text-xs text-emerald-700 font-medium",children:[C(W-q)," ","in credits will remain after this charge."]}),au&&(0,a.jsxs)("p",{className:"text-xs text-muted-foreground flex items-center gap-1.5",children:[(0,a.jsx)(x.Calendar,{className:"h-3 w-3 shrink-0"}),au]})]})]}):e2?(0,a.jsxs)("div",{className:"rounded-xl bg-rose-50 p-4 text-sm leading-6 text-rose-800",role:"alert",children:["We couldnât load your exact total. Try again before confirming.",(0,a.jsx)(r.Button,{variant:"outline",className:"mt-3 h-10 w-full rounded-lg border-0 bg-white text-slate-900 shadow-sm hover:bg-rose-100",onClick:()=>eA(e=>e+1),children:"Try again"})]}):null)})]})}),et&&(0,a.jsx)("div",{className:"shrink-0 border-t border-slate-200/70 bg-slate-50/70 px-5 py-3 sm:px-7",children:(0,a.jsxs)("div",{className:"space-y-3",children:[!e4&&aa&&(es=ey?"Start subscription now":`Get more replies with ${g.V3_PLAN_LABELS[eb]}`,el=at&&!ey,(0,a.jsxs)("div",{className:(0,j.cn)("relative",S.default.ctaEntrance),children:[!eW&&!el&&!eF&&(0,a.jsx)("span",{className:S.default.sparkleEntrance,children:(0,a.jsx)(n.CtaSparkles,{})}),(0,a.jsx)(r.Button,{onClick:ao,disabled:!!eF||eW||!ev||!eD||!!eV||el,className:(0,j.cn)(n.homeCtaClassName,"w-full rounded-[18px] border-0 text-lg !font-extrabold"),children:eW?(0,a.jsxs)("span",{className:"inline-flex items-center",children:[(0,a.jsx)(p.Loader2,{className:"h-5 w-5 mr-2 animate-spin"}),"Processingâ¦"]}):el?(0,a.jsx)("span",{className:"text-base",children:"No changes selected"}):(0,a.jsxs)("span",{className:(0,j.cn)("flex items-center justify-center gap-2 whitespace-normal",S.default.primaryCtaText),children:[es,(0,a.jsx)(m.ArrowRight,{size:18,"aria-hidden":"true",className:"shrink-0"})]})})]})),!e4&&!aa&&(0,a.jsx)(r.Button,{disabled:!0,className:S.default.confirmButton,children:e5?"Loading priceâ¦":"Price unavailable"}),e4&&(0,a.jsx)(r.Button,{variant:"destructive",onClick:()=>{eK(!0)},disabled:!!eF||eW||!ev||at,className:"w-full h-14 text-base font-semibold rounded-2xl",children:at?"No changes":(0,a.jsxs)("span",{className:"flex items-center justify-center gap-2",children:["Downgrade to ",g.V3_PLAN_LABELS[eb],(0,a.jsx)(m.ArrowRight,{className:"h-4 w-4"})]})}),(0,a.jsxs)("div",{className:"flex items-center justify-center gap-x-4 gap-y-1 flex-wrap text-xs text-slate-500",children:[(0,a.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,a.jsx)(u.ShieldCheck,{className:"h-3 w-3"}),"Secured by Stripe"]}),!e4&&(eg||eu||em)&&("standard"===eb||"pro"===eb)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"h-0.5 w-0.5 rounded-full bg-border","aria-hidden":"true"}),eg?(0,a.jsxs)("a",{href:ex,target:"_blank",rel:"noopener noreferrer",onClick:()=>{(0,_.captureEvent)(f.POSTHOG_EVENTS.V3_DEMO_CTA_CLICKED,{[f.CUSTOM_PROPERTIES.SOURCE]:M,[f.CUSTOM_PROPERTIES.PLAN_TYPE]:eb})},className:"font-medium text-purple-600 hover:text-purple-800 underline-offset-2 hover:underline",children:["Talk with my PodPitch Buddy ",eh]}):eu?(0,a.jsx)("span",{role:"status",children:"Loading your PodPitch Buddyâ¦"}):em?(0,a.jsx)("button",{type:"button",onClick:()=>void ep(),className:"font-medium text-purple-600 underline-offset-2 hover:underline",children:"Retry loading your PodPitch Buddy"}):null]})]})]})})]}))]})}),(0,a.jsx)(l.Dialog,{open:e&&eX,onOpenChange:eK,children:(0,a.jsxs)(l.DialogContent,{className:"sm:max-w-lg","data-e2e-modal-id":"v3-downgrade-confirm","data-e2e-modal-kind":"confirm",children:[(0,a.jsxs)(l.DialogHeader,{children:[(0,a.jsx)("div",{className:"mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-red-100",children:(0,a.jsx)(h.AlertTriangle,{className:"h-6 w-6 text-red-600"})}),(0,a.jsx)(l.DialogTitle,{className:"text-center text-xl font-bold",children:"Are you sure you want to downgrade?"}),(0,a.jsxs)(l.DialogDescription,{className:"text-center text-base text-muted-foreground mt-2",children:["You're moving from"," ",(0,a.jsx)("span",{className:"font-semibold text-foreground",children:g.V3_PLAN_LABELS[eN]})," ","to"," ",(0,a.jsx)("span",{className:"font-semibold text-foreground",children:g.V3_PLAN_LABELS[eb]}),". This change takes effect at the end of your current billing period."]})]}),(0,a.jsxs)("div",{className:"mt-4 space-y-4",children:[(ai.length>0||ef[eN]>ef[eb])&&(0,a.jsxs)("div",{className:"rounded-xl border border-red-200 bg-red-50 p-4",children:[(0,a.jsx)("p",{className:"text-sm font-bold text-red-800 mb
1-3",children:"You'll lose access to:"}),(0,a.jsxs)("ul",{className:"space-y-2",children:[ef[eN]>ef[eb]&&(0,a.jsxs)("li",{className:"flex items-start gap-2.5 text-base text-red-800",children:[(0,a.jsx)(c.X,{className:"h-5 w-5 text-red-500 shrink-0 mt-0.5"}),(0,a.jsxs)("span",{children:[(0,a.jsxs)("span",{className:"font-semibold",children:[ef[eN]-ef[eb]," ","fewer pitches/day"]})," ","(from ",ef[eN]," down to"," ",ef[eb],")"]})]}),ai.map(e=>(0,a.jsxs)("li",{className:"flex items-start gap-2.5 text-base text-red-800",children:[(0,a.jsx)(c.X,{className:"h-5 w-5 text-red-500 shrink-0 mt-0.5"}),(0,a.jsx)("span",{children:"Implementation Support"===e.label?"Get help putting your bigger reach to work":e.label})]},e.key))]})]}),(er=g.V3_POSTED_MRR[eN][eE],(ei=er-(en=g.V3_POSTED_MRR[eb][eE]))<=0?null:(0,a.jsx)("div",{className:"rounded-xl border border-border bg-muted/30 p-4",children:(0,a.jsxs)("p",{className:"text-base text-muted-foreground",children:["Your bill will decrease by"," ",(0,a.jsxs)("span",{className:"font-semibold text-foreground",children:[A(ei),"/mo"]})," ","(from ",A(er),"/mo to ",A(en),"/mo)."]})}))]}),(0,a.jsxs)(l.DialogFooter,{className:"mt-6 flex-row gap-2 sm:justify-center",children:[(0,a.jsxs)(r.Button,{variant:"outline",className:"flex-1",onClick:()=>eK(!1),children:["Keep ",g.V3_PLAN_LABELS[eN]]}),(0,a.jsx)(r.Button,{variant:"destructive",className:"flex-1",onClick:ao,disabled:!!eF||eW,children:eW?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.Loader2,{className:"h-4 w-4 mr-1.5 animate-spin"}),"Downgrading..."]}):(0,a.jsxs)(a.Fragment,{children:["Yes, downgrade to ",g.V3_PLAN_LABELS[eb]]})})]})]})})]})}])}]); 2 3//# sourceMappingURL=0wjvpyuf73lat.js.map 4//# chunkId=01a0ea2e-d64d-74f3-b9a1-e0abce250a1c
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.