PageSourceSearch

https://my.cowrywise.com/_nuxt/DQHVpLw_.js

js cowrywise.com collected 2026-10-03 22:18:33 UTC 21,572 bytes, 1 lines download raw bytes

1import{b4 as L,b9 as p,ba as m,bb as t,bc as n,bu as Q,bA as I,cF as D,bp as u,b8 as e,bn as h,br as C,bB as R,bq as U,bd as H,bk as c,bs as d,bP as ke,bg as X,be as w,b5 as Ce,bh as F,bm as Se,bj as Ae,b7 as ze,bU as De,bJ as q,bx as J,bF as Fe,bo as K,bt as Ie}from"./Caf5E3-E.js";import{_ as Re}from"./DU-YQzwV.js";import{_ as xe}from"./5kcpbgSW.js";import{_ as Be}from"./BOjRSxDi.js";import{_ as Ne,a as He,b as Le}from"./BlcXdvsT.js";import{$ as x}from"./CMhqVWQ_.js";import{P as Ue,a as Ye}from"./OR9aU3Tb.js";import{S as Ge}from"./CISf-A_p.js";import{S as Oe}from"./CZjopfgs.js";import{u as Z}from"./BXDLVMun.js";import{a as ee}from"./C7XkchL9.js";import{_ as Ve}from"./BcIaKqAl.js";import{i as te}from"./DX59j_bl.js";import{_ as je}from"./C0cWUMIw.js";import{_ as We}from"./CmiiEaml.js";import{u as oe}from"./DLj-XHz8.js";import{_ as ne}from"./Df3NMXIX.js";import{T as qe}from"./4cILzus2.js";import{S as Je}from"./CA8sxIhO.js";import{_ as Ke}from"./CdI_QwwL.js";import{S as Qe}from"./DDxt_bss.js";import{M as Xe}from"./Dm8KbUs-.js";import{u as Ze}from"./Bx5BCwBg.js";import{u as et}from"./D2LtJn6J.js";import{T as tt}from"./tJ89paJG.js";import{P as ot}from"./CXWVlXL_.js";import"./Ba1zLknN.js";import"./B3sneF79.js";import"./BaZSKT8s.js";import"./BHL-axLq.js";import"./9kEjmFoo.js";import"./BWgusLpf.js";import"./BJcQBNcB.js";import"./C4nfJp3e.js";import"./Bp7WUX0G.js";import"./BjKCZ7u3.js";import"./zZF13pfH.js";import"./C0k4tXI2.js";import"./C27LQlTg.js";import"./2_YM1Fmo.js";import"./BPbRD4Ng.js";import"./DbacS9zZ.js";import"./CinU4lSj.js";import"./CA7kJy7j.js";import"./BMcmC559.js";import"./rL9WNTE4.js";import"./Cg-u-mhe.js";import"./jc9Jv-r7.js";import"./D9sbVK-u.js";import"./CPXNXcxQ.js";import"./D1MoOOSt.js";import"./Bmt3eIF-.js";import"./C4cnGcp_.js";import"./DiZSH2jm.js";import"./BbGkcDlX.js";import"./DHQrpo_k.js";import"./D116FIw6.js";import"./BOVTIOpE.js";import"./Dk3vw-gH.js";import"./Cov3omaK.js";import"./gGy7fXQO.js";import"./BJ-mMW54.js";import"./C8AAVgQf.js";import"./9kxFw6Uz.js";import"./BoFUGL9X.js";import"./c4_qGd1X.js";import"./FWwYgxcA.js";import"./BENQSUoE.js";import"./B_4w_U1P.js";import"./D1cJjEGQ.js";import"./De_Edliy.js";import"./BUnxcpry.js";import"./Dt9xu8ZR.js";import"./D2MItziI.js";import"./DR1ZzAds.js";import"./7AWZUhoO.js";import"./CzNXler8.js";import"./BbkvdOHB.js";import"./BLBFfsGg.js";import"./BQtBBKhq.js";import"./BU0g6DRW.js";import"./BDZIRDvD.js";import"./BWU0Uyz3.js";import"./BD9QRQrl.js";import"./Bv39hVSP.js";import"./CAf1CGZK.js";import"./gYvgHSWb.js";import"./BtTqgyN_.js";import"./DENm9l6G.js";import"./uY1NSj3z.js";import"./DC4Kknds.js";import"./DekuR4OT.js";import"./BYjOEYpB.js";import"./BglVLgz4.js";import"./ClrisVqW.js";import"./8QP1eVei.js";import"./QGYp5aMY.js";import"./C5XXX9Y6.js";import"./ZulY20Cv.js";import"./DzmJ9Vw_.js";import"./B5mor0XL.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};i.SENTRY_RELEASE={id:"2a5717eb9274c4bcff8b18723f5f84d11447f814"};var l=new i.Error().stack;l&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[l]="08b9678b-6d1a-48f4-a3a2-8e6b1b8da79a",i._sentryDebugIdIdentifier="sentry-dbid-08b9678b-6d1a-48f4-a3a2-8e6b1b8da79a")}catch{}})();const nt={class:"investment-status"},at={class:"item-content"},st={class:"item-content"},rt={class:"card card--outline"},it={class:"card__header"},lt={class:"flex min-h-87.5 items-center justify-center"},ct=L({__name:"EmergencyPlanActions",props:{plan:{type:Object,required:!0},hasActiveTriggers:{type:Boolean},hasTriggers:{type:Boolean}},setup(i){const l=i,{user:T}=Z(),{userHasLinkedBank:P}=ee(),g=d(()=>l.plan.status.name.toLowerCase()=="active"),E=d(()=>l.hasTriggers||l.plan.status&&l.plan.status.name.toLowerCase()=="active"),$=d(()=>`${Number(c.getPlanGoalPercent(c.solveExponential(l.plan.book_balance),l.plan.goal_amount))>100?100:c.getPlanGoalPercent(c.solveExponential(l.plan.book_balance),l.plan.goal_amount)}%`),_=d(()=>parseFloat(l.plan.goal_amount)>0),S=d(()=>Math.floor(parseFloat(l.plan.available_balance)/Number(T.value?.emergency.monthly_expense))||0),A=d(()=>{switch(S.value){case 0:return"You're off to a great start. Top up now’.";case 1:return"You're building up strong.";case 2:return"You're doing well, you've got 2 months covered.";
1case 3:return"You're halfway there! 3 months now covered.";case 4:return"You're pushing hard! 4 months now covered";case 5:return"You're acing this! There's no limit, keep going.";default:return"You're acing this! There's no limit, keep going."}});return(s,f)=>{const y=Q,k=Ne,b=He;return p(),m("div",null,[t("div",nt,[n(y,{to:`/savings/emergency/${(s._.provides[D]||s.$route).params.id}/preferences`,class:I(["item",{active:i.plan.status.name.toLowerCase()=="active"}])},{default:u(()=>[t("div",{class:I(["item-content",{"item-content--info":!e(P)&&e(g)}])},[n(e(Ue),{class:"left-icon"})],2),h(" Automation "+C(e(g)?"on":"off"),1)]),_:1},8,["to","class"]),t("a",{href:"",onClick:f[0]||(f[0]=R(B=>i.hasTriggers?s.$router.push(`/triggers/plans/${(s._.provides[D]||s.$route).params.id}?productType=savings&planType=emergency`):s.$emit("openTriggers"),["prevent"])),class:I(["item",{active:i.hasActiveTriggers}])},[t("div",at,[n(e(Ye),{class:"left-icon rollover-icon text-icon-secondary"})]),h(" Triggers "+C(i.hasActiveTriggers?"active":"inactive"),1)],2),n(y,{to:`/savings/emergency/${(s._.provides[D]||s.$route).params.id}/preferences`,class:"item"},{default:u(()=>[t("div",st,[n(e(Ge),{class:"left-icon text-reader-secondary"})]),f[1]||(f[1]=h(" Customize ",-1))]),_:1},8,["to"])]),e(E)?(p(),U(k,{key:0,plan:i.plan,hasTriggers:i.hasTriggers},null,8,["plan","hasTriggers"])):H("",!0),t("div",rt,[t("div",it,[f[2]||(f[2]=t("span",{class:"card__title"},"Target",-1)),n(y,{class:"button button-text button--has-arrow button--no-height normal-case!",to:`/savings/emergency/${(s._.provides[D]||s.$route).params.id}/review`},{default:u(()=>[h(C(e(_)?"Review":"Set Target")+" ",1),n(e(Oe))]),_:1},8,["to"])]),t("div",lt,[n(b,{width:("$helpers"in s?s.$helpers:e(c)).getPlanGoalPercentStyling(("$helpers"in s?s.$helpers:e(c)).solveExponential(i.plan.book_balance),i.plan.goal_amount),animation:i.plan.preset?.animation_url,summary:e(A),target:e(_)?"₦"+("$formatters"in s?s.$formatters:e(x)).nFormatter(+i.plan.goal_amount/100,2):void 0,progress:e(_)?e($):void 0},null,8,["width","animation","summary","target","progress"])])])])}}}),pt=Object.assign(ct,{__name:"EmergencyPlanActions"}),mt={xmlns:"http://www.w3.org/2000/svg",width:"131",height:"84",fill:"none",viewBox:"0 0 131 84"};function dt(i,l){return p(),m("svg",mt,[...l[0]||(l[0]=[ke('<g clip-path="url(#clip0_51661_124692)"><path fill="#FB7E00" d="M0 28.334 26.486 3.67 52.97 28.334v55.073H0z"></path><path fill="#FB7E00" d="M45.065 3.67h-18.58v22.987h18.58z"></path><path fill="#FFEDE5" d="M18.58 28.334 45.065 3.67l26.486 24.664v55.073H18.58z"></path><path fill="#F35000" d="M45.065 0h-18.58v3.67h18.58z"></path><path fill="#fff" d="M36.386 50.852a2.22 2.22 0 0 0 2.822-1.349 2.19 2.19 0 0 0-1.362-2.797l-5.326-1.844a2.22 2.22 0 0 0-2.822 1.35 2.19 2.19 0 0 0 1.361 2.797z"></path><path fill="#FFB200" d="M37.762 46.203c-4.373-3.654-4.976-8.98-.15-12.484-1.88 2.994-1.926 6.224 1.493 7.942.312.16.628.305.96.406.033.005.099.03.078.005l-2.384 4.131z"></path><path fill="#fff" d="M45.377 72.233c-3.186 0-5.893-2.31-6.368-5.433l-2.862-18.85c-.587-3.86 2.43-7.332 6.367-7.332h5.726c3.938 0 6.954 3.472 6.367 7.331L51.745 66.8c-.475 3.124-3.182 5.433-6.368 5.433"></path><path fill="#F7747D" d="M49.436 66.263c0 2.221-1.818 4.023-4.06 4.023-2.24 0-4.058-1.802-4.058-4.023z"></path><path fill="#2C2C2C" d="M43.445 68.505c.39 0 .708-.314.708-.701a.704.704 0 0 0-.708-.701.704.704 0 0 0-.708.7c0 .388.317.702.708.702M47.632 68.505c.39 0 .708-.314.708-.701a.704.704 0 0 0-.708-.701.704.704 0 0 0-.707.7c0 .388.316.702.707.702M41.039 55.615c.663 0 1.2-.533 1.2-1.19 0-.658-.537-1.19-1.2-1.19-.664 0-1.201.532-1.201 1.19s.537 1.19 1.2 1.19M49.596 55.615c.664 0 1.201-.533 1.201-1.19 0-.658-.537-1.19-1.2-1.19-.664 0-1.202.532-1.202 1.19s.538 1.19 1.201 1.19"></path><path fill="#fff" d="M59.068 49.013a2.19 2.19 0 0 0 1.361-2.797 2.22 2.22 0 0 0-2.822-1.35l-5.326 1.844a2.19 2.19 0 0 0-1.361 2.797 2.22 2.22 0 0 0 2.822 1.35z"></path><path fill="#FFB200" d="M50.944 42.072c.663-.132 1.51-.649 2.076-1.075 1.413-1.061 2.05-2.676 1.624-4.478-.2-.946-.626-1.903-1.17-2.8 4.699 3.38 4.259 8.6.105 12.288-.077.062-.121.106-.254.199l-2.383-4.132z"></path><mask id="mask0_51661_124692" width="19" height="33" x="36" y="40" maskUnits="userSpaceOnUse" style="mask-type:luminance;"><path fill="#fff" d="M45.377 72.233c-3.186 0-5.893-2.31-6.368-5.433l-2.862-18.85c-.587-3.86 2.43-7.332 6.367-7.332h5.726c3.938 0 6.954 3.472 6.367 7.331L51.745 66.8c-.475 3.124-3.182 5.433-6.368 5.433"></path></mask><g mask="url(#mask0_51661_124692)"><path fill="#5B5B5B" d="M50.174 52.222c3.572 0 6.468-2.87 6.468-6.411s-2.896-6.41-6.468-6.41-6.468 2.87-6.468 6.41 2.896 6.41 6.468 6.41"></path></g><path fill="#0067F5" d="M91.406 9.919h-48.2v74.08h48.2z"></path><path fill="#002D6D" d="M43.206 9.919h-7.432v21.153l3.717 4.229V84h3.715z"></path><path fill="#fff" d="M85.999 17.52H48.614v8.782H86zM52.624 40.959h-.516c-1.93 0-3.494 1.55-3.494 3.462s1.564 3.463 3.494 3.463h.516c1.93 0 3.494-1.55 3.494-3.462s-1.564-3.463-3.494-3.463M62.583 40.959h-.516c-1.93 0-3.494 1.55-3.494 3.462s1.564 3.463 3.494 3.463h.516c1.93 0 3.494-1.55 3.494-3.462s-1.564-3.463-3.494-3.463M72.545 40.959h-.517c-1.93 0-3.494 1.55-3.494 3.462s1.564 3.463 3.494 3.463h.516c1.93 0 3.494-1.55 3.494-3.462s-1.564-3.463-3.493-3.463M52.624 51.46h-.516c-1.93 0-3.494 1.55-3.494 3.462s1.564 3.463 3.494 3.463h.516c1.93 0 3.494-1.55 3.494-3.462s-1.564-3.463-3.494-3.463M62.583 51.46h-.516c-1.93 0-3.494 1.55-3.494 3.462s1.564 3.463 3.494 3.463h.516c1.93 0 3.494-1.55 3.494-3.462s-1.564-3.463-3.494-3.463M72.545 51.46h-.517c-1.93 0-3.494 1.55-3.494 3.462s1.564 3.463 3.494 3.463h.516c1.93 0 3.494-1.55 3.494-3.462s-1.564-3.463-3.493-3.463M52.624 61.958h-.516c-1.93 0-3.494 1.55-3.494 3.463 0 1.912 1.564 3.462 3.494 3.462h.516c1.93 0 3.494-1.55 3.494-3.462s-1.564-3.463-3.494-3.463M62.583 61.958h-.516c-1.93 0-3.494 1.55-3.494 3.463 0 1.912 1.564 3.462 3.494 3.462h.516c1.93 0 3.494-1.55 3.494-3.462s-1.564-3.463-3.494-3.463M72.545 61.958h-.517c-1.93 0-3.494 1.55-3.494 3.463 0 1.912 1.564 3.462 3.494 3.462h.516c1.93 0 3.494-1.55 3.494-3.462s-1.564-3.463-3.493-3.463"></path><path fill="#F7CAA6" d="M52.624 72.459h-.516c-1.93 0-3.494 1.55-3.494 3.462s1.564 3.463 3.494 3.463h.516c1.93 0 3.494-1.55 3.494-3.463 0-1.912-1.564-3.462-3.494-3.462M62.583 72.459h-.516c-1.93 0-3.494 1.55-3.494 3.462s1.564 3.463 3.494 3.463h.516c1.93 0 3.494-1.55 3.494-3.463 0-1.912-1.564-3.462-3.494-3.462M72.545 72.459h-.517c-1.93 0-3.494 1.55-3.494 3.462s1.564 3.463 3.494 3.463h.516c1.93 0 3.494-1.55 3.494-3.463 0-1.912-1.564-3.462-3.493-3.462"></path><path fill="#F3BEC9" d="M82.503 40.959h-.516c-1.93 0-3.494 1.55-3.494 3.462s1.564 3.463 3.494 3.463h.516c1.93 0 3.494-1.55 3.494-3.462s-1.564-3.463-3.494-3.463"></path><path fill="#fff" d="M54.824 34.528h-4.916c-.714 0-1.294.575-1.294 1.283s.58 1.282 1.294 1.282h4.916c.714 0 1.294-.574 1.294-1.282s-.58-1.283-1.294-1.283M64.783 34.528h-4.916c-.714 0-1.294.575-1.294 1.283s.58 1.282 1.294 1.282h4.916c.714 0 1.294-.574 1.294-1.282s-.58-1.283-1.294-1.283M74.744 34.528h-4.916c-.714 0-1.294.575-1.294 1.283s.58 1.282 1.294 1.282h4.916c.715 0 1.294-.574 1.294-1.282s-.58-1.283-1.294-1.283"></path><path fill="#E0E0E0" d="M84.295 34.528H79.38c-.715 0-1.294.575-1.294 1.283s.58 1.282 1.294 1.282h4.915c.715 0 1.294-.574 1.294-1.282s-.579-1.283-1.294-1.283"></path><path fill="#fff" d="M84.703 34.528h-4.916c-.715 0-1.294.575-1.294 1.283s.58 1.282 1.294 1.282h4.916c.714 0 1.294-.574 1.294-1.282s-.58-1.283-1.294-1.283"></path><path fill="#F7CAA6" d="M82.503 51.46h-.516c-1.93 0-3.494 1.55-3.494 3.462s1.564 3.463 3.494 3.463h.516c1.93 0 3.494-1.55 3.494-3.462s-1.564-3.463-3.494-3.463M82.503 61.958h-.516c-1.93 0-3.494 1.55-3.494 3.463v10.5c0 1.912 1.564 3.463 3.494 3.463h.516c1.93 0 3.494-1.55 3.494-3.463v-10.5c0-1.913-1.564-3.463-3.494-3.463"></path><path fill="#0063FD" d="M43.206 72.24H39.49v1.553h3.715zM43.206 67.324H39.49v1.553h3.715z"></path><path fill="#fff" d="M120.998 34.528H83.709v49.47h37.289z"></path><path fill="#D8F2FF" d="M115.413 40.96H89.295v3.462h26.118zM99.105 48.134h-9.81v1.126h9.81zM115.413 48.134h-6.191v1.126h6.191zM100.845 52.413h-11.55v1.126h11.55zM115.412 52.413h-4.596v1.126h4.596zM96.295 56.69h-7v1.125h7zM115.412 56.69h-7.298v1.125h7.298zM98.413 60.969h-9.118v1.125h9.118zM115.413 60.969h-6.191v1.125h6.191zM101.076 65.246H89.295v1.126h11.781zM115.413 65.246h-5.1v1.126h5.1zM98.413 69.524h-9.118v1.126h9.118zM115.412 69.524h-5.818v1.126h5.818zM101.076 73.802H89.295v1.125h11.781zM115.413 73.802h-3.65v1.125h3.65z"></path><path fill="#D8F2FF" d="M83.709 84h37.289l9.31-16.272h-37.29z"></path><path fill="#fff" d="M130.308 67.728h-37.29V84h37.29z"></path><path fill="#D8F2FF" d="M108.414 72.136h-9.81v1.126h9.81zM124.722 72.136h-6.191v1.126h6.191zM123.435 77.135H99.891v2h23.544z"></path><path fill="#FFEDE5" d="M18.58 72.24H0v1.553h18.58zM18.58 67.324H0v1.553h18.58z"></path></g><defs><clipPath id="clip0_51661_124692"><path fill="#fff" d="M0 0h130.308v84H0z"></path></clipPath></defs>',2)])])}const ut={render:dt},ht={class:"confirmation-modal p-5"},ft={class:"grid grid-cols-12 gap-5"},gt={class:"col-span-12"},_t={class:"emergency-prompt"},vt=L({__name:"EmergencyPlanPrompt",emits:["closed"],setup(i,{expose:l,emit:T}){const P=T,g=X(),{emergencyPlan:E}=oe(),$=w(),_=()=>{$.value?.open()},S=()=>{c.logCustomEvent({flow:"Core_Emergency_Review",event:"EMERGENCY_SAVINGS_REVIEW_STARTED",parameters:{entryPoint:"information_update_nudge"}}),E.value?.id&&g.push(`/savings/emergency/${E.value.id}/review`)};return l({open:_}),(A,s)=>{const f=te;return p(),U(f,{"overlay-theme":"dark",ref_key:"modal",ref:$,class:"cw-modal",onClose:s[0]||(s[0]=y=>P("closed"))},{default:u(()=>[t("div",ht,[t("div",ft,[t("div",gt,[t("div",_t,[n(e(ut)),s[1]||(s[1]=t("h6",null,"Update your income and expense",
1-1)),s[2]||(s[2]=t("p",{class:"text-reader-secondary"},"Get a personalised recommendation for your plan by adding how much you earn and spend monthly.",-1)),t("div",{class:"mt-5"},[t("button",{to:"",onClick:S,type:"button",class:"button"},"Update your information")])])])])])]),_:1},512)}}}),yt=Object.assign(ne(vt,[["__scopeId","data-v-75490f3b"]]),{__name:"EmergencyPlanPrompt"}),bt={key:0,class:"emergency-plan--details grid grid-cols-12 gap-5 p-8"},Mt={class:"col-span-12 pb-2.5"},wt={class:"col-span-12 md:col-span-5"},Tt={class:"flex items-center"},Pt={class:"savings-info mb-5"},Et={class:"money-item"},$t={key:0},kt={key:1,class:"balance-hidden-container"},Ct={class:"text-reader-accent-light-green font-semibold mt-0"},St={class:"btn-container"},At={class:"plan-cta__item"},zt={key:0,class:"dropdown__body"},Dt={key:0},Ft={class:"md:!hidden"},It={class:"col-span-12 !hidden md:!block md:col-span-6 md:col-start-7"},Rt={class:"confirmation-modal p-5"},xt={class:"grid grid-cols-12 gap-5"},Bt={class:"col-span-12"},Nt={key:0,class:"text-reader-secondary mt-5"},Ht={key:1,class:"text-reader-secondary mt-5"},Lt={class:"flex justify-end gap-0 text-right mt-10"},Ut=L({__name:"index",setup(i){const{balanceHidden:l}=Ze(),T=et(),P=X(),g=Ce(),{initializePlanTopup:E}=ee(),{fetchEmergencyPlan:$}=oe();Z();const _=w(""),S=F("successModal"),A=F("topUpModalRef"),s=F("withdrawalNoticeModalRef"),f=F("TriggersIntroModal"),y=()=>{f.value?.open()},k=w(!1),b=w(!1),B=w(null),ae=w(),se=w(!1),r=d(()=>T.emergencyPlan),re=d(()=>!!(r.value?.status.value&&r.value?.next_charge_date)),Y=d(()=>({plan:r.value,hasTriggers:G.value,hasActiveTriggers:ie.value})),G=d(()=>r.value&&r.value.triggers&&r.value.triggers.length>0),ie=d(()=>G.value?r.value?.triggers.some(a=>a.is_active):!1),v=d(()=>g.params.id),le=d(()=>{if(!r.value)return 0;const a=Number(r.value.book_balance),o=Number(r.value.goal_amount),M=a/o*100;return M>100?100:Math.floor(M)});Se(r,(a,o)=>{!o&&a&&V()});async function ce(){await c.sleep(300),P.replace(`/savings/emergency/${v.value}`)}function pe(){b.value=!b.value}async function me(){try{const o=await new tt().getPlanConnections(v.value);ae.value=o.data}catch{}}async function O(){try{k.value=!0;const o=await new ot().getPlanTransactions(v.value,5);o.data&&(B.value=o.data),k.value=!1}catch{k.value=!1}}function V(){c.setPageTitle(r.value.name),O()}function N(a=0){c.logCustomEvent({flow:"Core_Emergency_Topup",event:"EMERGENCY_SAVINGS_TOPUP_STARTED",parameters:{entryPoint:"plan_detail_screen"}}),c.storeEventEntryPoint(["TOP_UP_STARTED","TOP_UP_ATTEMPTED"],"emergency_plan"),c.storeEventEntryPoint("EMERGENCY_SAVINGS_TOPUP_ATTEMPTED","plan_detail_screen"),E({planType:"emergencyPlan",plan:r.value,currency:Ie.naira,amount:a,overviewConfig:{showAmountList:!a}}),A.value?.open()}async function de(){await c.sleep(1e3),O()}function ue(){c.logCustomEvent({flow:"Core_Emergency_Withdrawal",event:"EMERGENCY_SAVINGS_WITHDRAWAL_ATTEMPTED"}),s.value.open()}function he(){b.value=!1}return Ae(async()=>{if(await $(),g.query.topup&&(await c.sleep(500),N(0),P.replace(`/savings/emergency/${v.value}`)),g.query.success&&(_.value=g.query.success,await c.sleep(300),S.value?.open()),r.value){V();const a=ze("hasSeenRecommendationCard",{default:()=>{}});a.value!==1&&(a.value=1,se.value=!0)}me()}),(a,o)=>{const M=Q,fe=Re,ge=xe,_e=Be,ve=Le,j=pt,ye=Ve,W=te,be=je,Me=We,we=yt,Te=qe,Pe=Je,Ee=Ke,$e=De("click-away");return p(),m("div",null,[e(r)?(p(),m("div",bt,[t("div",Mt,[n(M,{to:"/savings",class:"button button--has-arrow text-dark arrow--back button--no-height"},{default:u(()=>[n(e(Qe)),o[5]||(o[5]=h(" Back ",-1))]),_:1}),n(q,{name:"slow"},{default:u(()=>[n(fe,{"payment-context":e(r)?.metadata?.payment_context,"is-automated":e(re),onRetryPayment:o[0]||(o[0]=z=>N(z))},null,8,["payment-context","is-automated"])]),_:1})]),t("div",wt,[t("div",Tt,[o[6]||(o[6]=t("span",{class:"text-reader-secondary text-md mr-2.5"},"Emergency Balance",-1)),n(ge,{class:"text-reader-secondary"})]),t("div",Pt,[t("div",Et,[e(l)?(p(),m("div",kt,[n(_e)])):(p(),m("h2",$t,[h(" ₦ "+C(("$formatters"in a?a.$formatters:e(x)).formatAmou
1ntWithoutDecimal(Number(("$helpers"in a?a.$helpers:e(c)).solveExponential(e(r).book_balance))))+" ",1),t("sub",null,C(("$formatters"in a?a.$formatters:e(x)).formatAmountOnlyDecimal(Number(("$helpers"in a?a.$helpers:e(c)).solveExponential(e(r).book_balance)))),1)])),t("p",Ct,[e(r).is_interest_free?(p(),m(J,{key:0},[h("Interest-Free")],64)):(p(),m(J,{key:1},[h(C(("$formatters"in a?a.$formatters:e(x)).formatPercentage(e(r).interest_rate,2))+"% p.a.",1)],64))])]),t("div",St,[t("a",{href:"",onClick:o[1]||(o[1]=R(z=>N(0),["prevent"])),class:"button button--uppercase pl-7.5 pr-7.5 button--left"},"top up"),t("div",At,[Fe((p(),m("div",{class:"dropdown",onClick:R(pe,["prevent"])},[t("a",{href:"#",class:I(["dropdown__ellipsis button--right px-[18px] py-3",{open:e(b)}])},[n(e(Xe),{class:"more"})],2),n(q,{name:"slow"},{default:u(()=>[e(b)?(p(),m("div",zt,[t("ul",null,[t("li",null,[n(M,{to:`/savings/emergency/${e(v)}/preferences`},{default:u(()=>[...o[7]||(o[7]=[h("Edit Plan",-1)])]),_:1},8,["to"])]),t("li",null,[t("a",{href:"#",onClick:R(ue,["prevent"])},"Withdraw to Stash")]),e(r).is_interest_free?H("",!0):(p(),m("li",Dt,[n(M,{to:`/savings/emergency/${e(v)}/returns/summary`},{default:u(()=>[...o[8]||(o[8]=[h("My Earnings",-1)])]),_:1},8,["to"])])),t("li",null,[n(M,{to:`/savings/emergency/${e(v)}/transactions`},{default:u(()=>[...o[9]||(o[9]=[h("My Transactions",-1)])]),_:1},8,["to"])])])])):H("",!0)]),_:1})])),[[$e,he]])])])]),n(ve,{class:"mb-7.5",chatTitle:"Performance","plan-type":"emergency",plan:e(r),showFilter:!1},null,8,["plan"]),t("div",Ft,[n(j,K(e(Y),{onOpenTriggers:y}),null,16)]),n(ye,{transactions:e(B),isLoading:e(k),viewDestination:`/savings/emergency/${e(v)}/transactions`},null,8,["transactions","isLoading","viewDestination"])]),t("div",It,[n(j,K(e(Y),{onOpenTriggers:y}),null,16)]),n(W,{"overlay-theme":"dark",class:"cw-modal",ref_key:"withdrawalNoticeModalRef",ref:s},{default:u(()=>[t("div",Rt,[t("div",xt,[t("div",Bt,[o[10]||(o[10]=t("h6",null,"Are you sure?",-1)),e(le)>=100?(p(),m("p",Nt,"Is there really an emergency you need to settle?")):(p(),m("p",Ht,"Your target hasn't been met. Do you really need to make this withdrawal?"))])]),t("div",Lt,[t("button",{class:"button button--has-arrow mr-5",onClick:o[2]||(o[2]=z=>a.$router.push(`/savings/emergency/${e(r).id}/withdraw`))},"Yes"),t("button",{class:"button",onClick:o[3]||(o[3]=z=>e(s).close())},"No, I’ll keep saving")])])]),_:1},512),n(be,{class:"cw-modal",ref:"interestRateModal",header:"Dynamic Interest Rate",message:"The interest rate on your Emergency Plan changes daily. It is based on the average performance of conservative mutual funds on Cowrywise",secondaryText:"Done"},null,512),n(W,{class:"success-modal","overlay-theme":"dark",ref:"successModal",onClose:ce},{default:u(()=>[n(Me,{message:e(_)?e(_):"You just made a top up attempt. We will confirm this soon.",showAnimation:!0},null,8,["message"])]),_:1},512),n(we,{ref:"EmergencyPlanPrompt"},null,512),n(Te,{onProceed:o[4]||(o[4]=z=>a.$router.push(`/triggers/plans/${e(v)}/integrate?productType=savings&planType=emergency`)),ref:"TriggersIntroModal",type:"invest",entryPoint:"emergency_plan"},null,512),n(Pe,{onPaymentComplete:de,ref_key:"topUpModalRef",ref:A},null,512)])):(p(),U(Ee,{key:1}))])}}}),Bn=ne(Ut,[["__scopeId","data-v-7079b4da"]]);export{Bn 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.