PageSourceSearch

https://myka.ng/assets/SummaryPage-yos-EQ45.js

js myka.ng collected 2026-10-09 22:42:25 UTC 7,676 bytes, 1 lines download raw bytes

1import{d as U,u as V,p as Y,r as P,j as e,N as q}from"./vendor-react-DfYGAhtm.js";import{b4 as G,P as Q}from"./vendor-icons-1odZwi-b.js";import{t as K,m as J,g as X}from"./index-DsBgCU7r.js";import{u as Z,P as ee,a as te}from"./PaymentTermsConsentCopy-DOzXQujc.js";import{u as oe,L as ne}from"./usePaymentReadiness-DQ-J6Nqr.js";import{u as re,P as ie}from"./useProductPaymentFlow-BTWzU1Vd.js";import{C as ae,D as se,d as le,F as ce,E as g,a as m,b as k,e as pe}from"./EducationCardShell-CWM2CwNG.js";import{E as C}from"./routes-CkGlntR3.js";import{C as ue}from"./Checkbox-DwOz6egu.js";import{F as h,T as s,a as b,G as me,v as M}from"./vendor-ui-DA_r9yXk.js";import"./vendor-forms-BP-7CbAP.js";import{g as de}from"./errors-BYKXB8DF.js";import"./LinkPaymentMethodOption-CuZHpNDU.js";import{f as S,m as xe,e as fe,u as I,v as ge}from"./educationFlow-DDSnkTTP.js";import"./vendor-state-BsBVN-fX.js";import"./Modal-DS-VW05m.js";import"./EmailVerificationModal-BxNiYJiq.js";import"./paymentReturnUrls-CXEwLwaV.js";import"./walletApi-DyFgHNVA.js";import"./walletMandateApi-Du1GplC_.js";import"./walletMandateSession-B-c6J5GS.js";import"./failed-Dd90HJgP.js";import"./success-C0L8gZxS.js";import"./useAnalytics-HP01GbIH.js";import"./userEmail-9DwyWHBc.js";import"./transactionsApi-CANA4ntQ.js";import"./useWalletMandateLinkFlow-m9cf0nTk.js";import"./walletMandateReturnUrls-BPu4z42g.js";import"./paymentMandateReturnSession-B31Waw65.js";import"./checkoutSessionStore-BRM5sYZN.js";const he=()=>{const o=U(),{state:a}=V(),[n]=Y(),[r,y]=P.useState(!1),[l,E]=P.useState(!1),{recordPolicyConsentAsync:F,isRecordingConsent:T}=Z("education"),d=a,x=d?.providerPlan?null:ae(n.get("policyId")),c=d?.providerPlan??x?.providerPlan??null,t=d?.goal??x?.goal??null,p=d?.policy??x?.policy??null,u=d?.customerDetails??x?.customerDetails??null,f=t?.contributionAmount,i=p?.id??n.get("policyId")??void 0,v=P.useCallback(()=>{t&&o(`/${C.ActivationSuccess}`,{replace:!0,state:{goal:t,...i?{policyId:i}:{}}})},[t,o,i]),L=P.useMemo(()=>i&&c&&t&&p?{policyId:i,providerPlan:c,goal:t,policy:p,...u?{customerDetails:u}:{}}:null,[i,c,t,p,u]),A=re({policyId:i,amountDue:f,sessionStore:se,sessionPayload:L,successPath:C.Summary,persistBeforeEmailGate:!0,isPaidContextValid:!!t,unverifiedPaymentMessage:"We could not verify your payment. Please check My Policies or contact support.",onPaid:v,...f!=null?{amountDisplay:S(f)}:{}}),{continueAfterConsent:R,isCheckingMandates:O,linkModalProps:B}=oe({onReadyForPayment:A.openMethodModal});if(!t||!c||!p?.id)return{status:"redirect"};const w=xe(c),{maturityValue:H}=fe(w,{amount:t.contributionAmount,frequency:t.frequency,durationYears:t.durationYears}),D=le[t.frequency],N=S(t.contributionAmount),W=()=>{if(I({isTermsAccepted:l,isRecurring:r})){if(!i){R();return}F({policyId:i,...l?{consent:!0}:{},...r?{debitConsent:!0}:{}}).then(()=>R()).catch($=>{K.error(de($)??"We could not record your consent. Please try again.")})}},_=()=>o(`/${C.Details}`,{state:{goal:t,policy:p,...u?{customerDetails:u}:{},providerPlan:c}});return{status:"ready",planName:c.name,underwriter:w.underwriter,maturityValueLabel:S(H),contributionLabel:`${N} / ${D}`,durationLabel:ge(t.durationYears),lifeCoverLabel:ce.title,premiumDueLabel:S(f??t.contributionAmount),futurePaymentLabel:`Future payments: ${N} / ${D}`,isRecurring:r,setIsRecurring:y,isTermsAccepted:l,setIsTermsAccepted:E,canProceedToPayment:I({isTermsAccepted:l,isRecurring:r}),isRecordingConsent:T||O,linkModalProps:B,payment:A,proceedToPayment:W,goToDetails:_}},z=({isChecked:o,onToggle:a,label:n})=>e.jsxs(h,{align:"flex-start",gap:"8px",bg:g.consentBg,border:"1px solid",borderColor:g.consentBorder,borderRadius:"16px",px:"18px",py:"12px",cursor:"pointer",onClick:r=>{r.target.closest("a")||a(!o)},children:[e.jsx(ue,{checked:o,onCheckedChange:r=>a(r.checked===!0),controlProps:{boxSize:"20px",borderRadius:"6px"},flexShrink:0,mt:"1px",pointerEvents:"none"}),e.jsx(s,{fontFamily:m,fontSize:"12px",fontWeight:"medium",lineHeight:"16px",color:J.text.tertiary,children:n})]}),ye="/assets/card-edu-BrQjTfKf.jpeg",j=({label:o,value:a,trailing:n})=>e.jsxs(b,{children:[e.jsx(s,{fontFamily:m,fontSize:"10px",fontWeight:"semibold",lineHeight:"15px",letterSpacing:"1px",textTransform:"uppercase",color:"white",whiteSpace:"nowrap",children:o}),e.jsxs(h,{align:"center",gap:"4px",pt:"4px",children:[e.jsx(s,{fontFamily:m,fontSize:n?"14px":"16px",fontWeight:"semibold",lineHeight:n?"21px":"24px",color:"white",whiteSpace:"nowrap",children:a}),n]})]}),be=({planName:o,maturityValue:a,contributionLabel:n,durationLabel:r,underwriter:y,lifeCoverLabel:l})=>e.jsxs(b,{position:"relative",overflow:"hidden",border:"1px solid",borderColor:"#F0F2F5",borderRadius:"24px",p:"24px",backgroundImage:`url(${ye})`,backgroundSize:"cover",backgroundPosition:"center",children:[e.jsx(b,{position:"absolute",inset:0,bg:"rgba(31, 54, 95, 0.53)",pointerEvents:"none"}),e.jsxs(b,{position:"relative",children:[e.jsxs(h,{align:"center",justify:"space-between",gap:"12px",children:[e.jsx(s,{fontFamily:m,fontSize:"11px",fontWeight:"semibold",lineHeight:"16.5px",letterSpacing:"1.1px",textTransform:"uppercase",color:"white",children:"Selected plan"}),e.jsxs(s,{fontFamily:m,fontSize:"10px",lineHeight:"15px",color:"white",whiteSpace:"nowrap",children:["Underwritten by: ",y]})]}),e.jsx(s,{pt:"16px",fontFamily:k,fontWeight:"600",fontSize:"24px",lineHeight:"36px",color:"white",children:o}),e.jsxs(me,{templateColumns:{base:"1fr",sm:"1fr 1fr"},gap:"20px",pt:"24px",children:[e.jsx(j,{label:"Est maturity value",value:a}),e.jsx(j,{label:"Recurring contribution",value:n}),l?e.jsx(j,{label:"Life cover",value:l,trailing:e.jsx(M,{as:G,boxSize:"12px",color:"white","aria-hidden":!0})}):null,e.jsx(j,{label:"Duration",value:r})]})]})]}),Ke=()=>{const o=he();if(o.status==="redirect")return e.jsx(q,{to:`/${C.Plan}`,replace:!0});const{planName:a,underwriter:n,maturityValueLabel:r,contributionLabel:y,durationLabel:l,lifeCoverLabel:E,premiumDueLabel:F,futurePaymentLabel:T,isRecurring:d,setIsRecurring:x,isTermsAccepted:c,setIsTermsAccepted:t,canProceedToPayment:p,isRecordingConsent:u,linkModalProps:f,payment:i,proceedToPayment:v,goToDetails:L}=o;return e.jsxs(pe,{onBack:L,children:[e.jsx(ie,{...i.modals}),e.jsx(ne,{...f}),e.jsx(s,{as:"h1",pb:"24px",fontFamily:k,fontWeight:"600",fontSize:{base:"24px",md:"28px"},lineHeight:"35px",color:g.titleNavy,children:"Payment Summary"}),e.jsx(be,{planName:a,maturityValue:r,contributionLabel:y,durationLabel:l,underwriter:n,lifeCoverLabel:E}),e.jsxs(h,{align:"center",justify:"space-between",gap:"16px",mt:"16px",bg:"white",border:"1px solid",borderColor:"#F0F2F5",borderRadius:"24px",p:"20px",children:[e.jsx(s,{fontFamily:m,fontSize:"15px",fontWeight:"semibold",lineHeight:"22.5px",color:"#1F365F",children:"Premium Due"}),e.jsx(s,{fontFamily:k,fontWeight:"600",fontSize:"24px",lineHeight:"36px",color:g.successGreen,children:F})]}),e.jsxs(h,{align:"center",gap:"8px",mt:"16px",bg:"#F9FAFB",border:"1px solid",borderColor:"#F0F2F5",borderRadius:"16px",p:"16px",children:[e.jsx(M,{as:Q,boxSize:"16px",flexShrink:0,color:g.steelSlate}),e.jsx(s,{fontFamily:m,fontSize:"13px",fontWeight:"medium",lineHeight:"19.5px",color:g.steelSlate,children:T})]}),e.jsxs(h,{direction:"column",gap:"12px",mt:"16px",children:[e.jsx(z,{isChecked:d,onToggle:x,label:ee}),e.jsx(z,{isChecked:c,onToggle:t,label:e.jsx(te,{instalment:!0})})]}),e.jsx(b,{pt:"32px",children:e.jsx(X,{buttonType:"primary",type:"button",text:"Proceed to Payment",size:"lg",h:"48px",fullWidth:!0,borderRadius:"full",fontFamily:m,fontSize:"14px",fontWeight:"medium",letterSpacing:"-0.9px",disabled:!p||u,opacity:p?1:.4,loading:u,onClick:v})})]})};export{Ke as default};

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.