1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9709],{3089:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/journey/[plan-name]/save-your-plan",function(){return n(9688)}])},1943:function(e,t,n){"use strict";var o=n(5893),l=n(9008),a=n.n(l);t.Z=e=>{let{title:t}=e;return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(a(),{children:[t&&(0,o.jsx)("title",{children:t}),(0,o.jsx)("link",{rel:"icon",href:"/favicon.ico"})]})})}},9688:function(e,t,n){"use strict";n.r(t);var o=n(5893),l=n(6211),a=n(7294),s=n(5895),i=n(9865),c=n(2088),r=n(5153),d=n(572),m=n(1943),u=n(5675),v=n.n(u),p=n(1664),h=n.n(p),y=n(1163),C=n(8190),f=n(8666);t.default=()=>{let e=(0,y.useRouter)(),t=e.query["plan-name"],{savedUrl:n}=(0,f.bN)(),u=(0,l.v)(n||"/journey/".concat(t,"/plan-summary")),[p,x]=(0,a.useState)(""),[b,j]=(0,a.useState)(""),[g,w]=(0,a.useState)(!1),[k,S]=(0,a.useState)(""),P=async()=>{if(S(""),!p||!b){S("Please enter your email address and date of birth.");return}w(!0);try{let n=await fetch("/api/wp/user/save-quote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:p,dateOfBirth:b,quote:u()})});if(n.ok){let o=await n.json();if(o.existingAccount){if(o.emailConfirmed){e.push({pathname:"/journey/".concat(t,"/quote-saved"),query:{email:p,account:"confirmed"}});return}e.push({pathname:"/request-password",query:{mode:"saved-quote",email:p,planId:o.planId,source:"save-plan"}});return}e.push("/journey/".concat(t,"/quote-saved?email=").concat(encodeURIComponent(p)));return}if(409===n.status){S("An account already exists with this email address.");return}S("We could not save your quote. Please try again.")}catch(e){S("We could not save your quote. Please try again.")}finally{w(!1)}};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(m.Z,{title:"Choice Funeral Plans | Save your Plan"}),(0,o.jsxs)("div",{className:"lg:p-0 pb-[50px] lg:flex block items-center",children:[(0,o.jsxs)("div",{className:"relative lg:w-1/2 w-full lg:h-screen h-[500px] lg:inline-block block",children:[(0,o.jsx)(h(),{href:"https://choiceplan.co.uk",children:(0,o.jsx)("div",{className:"px-[5%] xl:px-[20%] pt-[60px]",children:(0,o.jsx)(v(),{src:"/assets/choice-logo-pink.svg",width:128,height:34,alt:"Choice",className:"absolute z-[9] w-[80px] lg:w-[128px] h-auto"})})}),(0,o.jsx)("div",{className:"hidden xl:block",children:(0,o.jsx)(v(),{src:"/assets/AuthHeader_quote_new.jpg",fill:!0,alt:"",style:{objectFit:"cover",objectPosition:"center center"}})}),(0,o.jsx)("div",{className:"block xl:hidden",children:(0,o.jsx)(v(),{src:"/assets/AuthHeader_quote_new.jpg",fill:!0,alt:"",style:{objectFit:"cover",objectPosition:"bottom center"}})})]}),(0,o.jsx)("div",{className:"flex flex-col rounded-t-full h-[20px] translate-y-[-20px] bg-white xl:hidden"}),(0,o.jsx)("main",{className:"lg:px-[7%] px-[5%] lg:w-1/2 w-full lg:h-fit lg:inline-block block",children:(0,o.jsxs)("div",{className:"w-full max-w-[420px]",children:[(0,o.jsx)(d.Z,{title:"Save your Plan",copy:"Provide your email address and date of birth to save your quote.\n\nWe'll send you an email with your quote summary and details of how to log in."}),(0,o.jsx)("div",{className:"mt-[10px]",children:(0,o.jsx)(C.Z,{id:"save-your-plan-email",label:"What's your email address?",type:"email",onValueUpdate:x,hideTopBorder:!0})}),(0,o.jsx)("div",{className:"mt-[25px]",children:(0,o.jsx)(i.Z,{id:"save-your-plan-date-of-birth",label:"Enter your date of birth",onValueUpdate:j,hideTopBorder:!0})}),(0,o.jsxs)("div",{className:"btn-combo-container",children:[(0,o.jsx)(s.Z,{label:"Save my Plan",onClick:P,loading:g}),(0,o.jsx)(s.Z,{label:"Back",type:"tertiary",onClick:()=>e.push("/journey/".concat(t,"/plan-summary"))})]}),k&&(0,o.jsx)(c.Z,{error:k})]})})]}),(0,o.jsx)(r.Z,{})]})}},6211:function(e,t,n){"use strict";n.d(t,{v:function(){return a}});var o=n(8024),l=n(7536);let a=e=>{let{getValues:t}=(0,l.Gc)(),{totalAdditionalServices:n,totalFuneralDirectorCosts:a,totalPrice:s,totalThirdPartyFees:i}=(0,o.Kc)();return()=>{var o,l,c,r,d,m,u,v,p;let h=t("enquiry"),y=t("options"),C=y.selectedQuote,f=y.paymentMonthlyOrFull||h.paymentType,x={...y};delete x.password,delete x.passwordconfirm,delete x.directDebit;let b=h.customer?{...h.customer}:void 0;b&&delete b.password;let j={...h,customer:b,coveredIndividual1:h.coveredIndividual1?{...h.coveredIndividual1}:void 0,nominatedRep:h.nominatedRep?{...h.nominatedRep}:void 0};delete j.cardAuthCode,delete j.paymentDateTime,delete j.fca,delete j.planSummaryUrl,delete j.planTermsAndConditionsUrl;let g=[h.vcOoSComments,h.vcObituaryComments,h.vcFloralTributesComments,h.vcReceptionComments,h.vcSpecialistVehicleC
1omments,h.vcUrnComments,h.vcWakeCateringComments,h.vcKeepsakesComments,h.vcMasonryComments,h.vcAdditionalComments].filter(Boolean).join("\n");return{branchId:h.branchId,nominateForMe:h.nominateForMe,planType:h.planType,planStatus:"enquiry",funeralType:h.funeralType,limosineCount:h.limosineCount,coffinProductCode:h.coffinProductCode,prIncludeEmbalming:h.prIncludeEmbalming,promoCode:y.promoCode||h.promoCode,planCost:h.planCost,paymentAmount:"Monthly"===f?null!==(l=null==C?void 0:C.monthly)&&void 0!==l?l:h.paymentAmount:null!==(c=h.paymentAmount)&&void 0!==c?c:s,paymentType:f,paymentFirstInstallmentAmount:null!==(d=null!==(r=null==C?void 0:C.firstMonth)&&void 0!==r?r:null==C?void 0:C.monthly)&&void 0!==d?d:h.paymentFirstInstallmentAmount,paymentInstallmentTotal:null!==(m=null==C?void 0:C.total)&&void 0!==m?m:h.paymentInstallmentTotal,monthlyPaymentLength:null!==(u=h.monthlyPaymentLength)&&void 0!==u?u:null==C?void 0:C.term,vcCemetaryCosts:h.vcCemetaryCosts,vcCemetaryChurchService:h.vcCemetaryChurchService,vcCrematorium:h.vcCrematorium,vcDoctors:h.vcDoctors,vcCelebrant:h.vcCelebrant,vcThirdPartyCosts:null!==(v=h.vcThirdPartyCosts)&&void 0!==v?v:0,vcAcceptThirdPartyFees:h.vcAcceptThirdPartyFees,vcObituary:h.vcObituary,vcObituaryComments:h.vcObituaryComments,vcOoS:h.vcOoS,vcOoSComments:h.vcOoSComments,vcReception:h.vcReception,vcReceptionComments:h.vcReceptionComments,vcUrn:h.vcUrn,vcUrnComments:h.vcUrnComments,vcWakeCatering:h.vcWakeCatering,vcWakeCateringComments:h.vcWakeCateringComments,vcSpecialistVehicleType:h.vcSpecialistVehicleType,vcSpecialistVehiclePrice:h.vcSpecialistVehiclePrice,vcSpecialistVehicle:h.vcSpecialistVehicle,vcSpecialistVehicleComments:h.vcSpecialistVehicleComments,vcHorseDrawn:h.vcHorseDrawn,vcOtherVehicle:h.vcOtherVehicle,vcFloralTributes:h.vcFloralTributes,vcFloralTributesComments:h.vcFloralTributesComments,vcKeepsakes:h.vcKeepsakes,vcKeepsakesComments:h.vcKeepsakesComments,vcMasonry:h.vcMasonry,vcMasonryComments:h.vcMasonryComments,vcOtherCosts:h.vcOtherCosts,vcAdditional:null!==(p=h.vcAdditional)&&void 0!==p?p:0,vcAdditionalComments:h.vcAdditionalComments||g,savedUrl:e,journey:j,pricing:{planCost:h.planCost,totalFuneralDirectorCosts:a,totalThirdPartyFees:i,totalAdditionalServices:n,totalPrice:s,promoDiscountAmount:y.promoDiscountAmount||0,selectedCoffinPrice:(null===(o=y.selectedCoffin)||void 0===o?void 0:o.cost)||0},comments:{thirdPartyFees:"",additionalProductsAndServices:g},optionsMeta:{...x,paymentMonthlyOrFull:f,selectedQuote:C,selectedCoffin:y.selectedCoffin?{id:y.selectedCoffin.id,title:y.selectedCoffin.title,cost:y.selectedCoffin.cost}:null}}}}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=3089)}),_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.