PageSourceSearch

https://www.millerhomes.co.uk/assets/miller.BookAppointmentForm.4f6026cab723ccc105b9.js

js millerhomes.co.uk collected 2026-10-01 12:29:08 UTC 28,855 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkmillerhomescorp=self.webpackChunkmillerhomescorp||[]).push([[6676,9511],{3892:(e,a,t)=>{t.r(a),t.d(a,{default:()=>Ie});var l=t(8253);const o={class:"",id:"baa_form"},n={class:"space-y-sm"};var r=t(5838),i=t(4242),s=t(8841),u=t(2185),d=t(1486);const c={name:"BookTypeChoice",components:{FieldTextInput:s.default,FieldRadioInput:u.Z,FieldTextAreaInput:d.Z},props:{developmentName:{type:String,required:!0},devItemId:{type:String,required:!0},jdePlotId:{type:String,required:!0},plotNumber:{type:Number,required:!1},hash:{type:String,required:!0},defaultIsPhoneAppointment:{type:Boolean,default:!1}},setup(e){var a=(0,l.iH)([{value:"true",label:"Telephone appointment"},{value:"false",label:"Appointment at the development"}]);const t=(0,l.iH)(String(e.defaultIsPhoneAppointment)),o=(0,l.Fl)((()=>({isPhoneAppointment:{required:i.C1}})));return{options:a,isPhoneAppointment:t,v$:(0,r.Xw)(o,{isPhoneAppointment:t})}},methods:{submitForm(){this.$emit("chosen",{isPhoneAppointment:"true"===this.isPhoneAppointment})}},mounted(){try{window.dataLayer&&window.dataLayer.push({event:"Book Appointment",stepName:"Choose Type"})}catch(e){}}};var p=t(3744);const m=(0,p.Z)(c,[["render",function(e,a,t,r,i,s){const u=(0,l.up)("field-radio-input");return(0,l.wg)(),(0,l.iD)("div",o,[(0,l._)("div",n,[(0,l.Wm)(u,{id:"type",options:r.options,modelValue:r.isPhoneAppointment,"onUpdate:modelValue":a[0]||(a[0]=e=>r.isPhoneAppointment=e),"is-error":r.v$.isPhoneAppointment.$error,errors:r.v$.isPhoneAppointment.$errors,label:"Please choose if you would like to book an appointment on the telephone or to visit us at the development."},null,8,["options","modelValue","is-error","errors"]),(0,l._)("button",{onClick:a[1]||(a[1]=(0,l.iM)(((...e)=>s.submitForm&&s.submitForm(...e)),["prevent"])),class:"c-button c-button--primary c-button--blue"},"Next")])])}],["__scopeId","data-v-40ab4dfa"]]);var v=t(1257),h=t(9770),g=t(923),y=t(1899),b=t(1785);const w=e=>((0,l.dD)("data-v-2915443c"),e=e(),(0,l.Cn)(),e),f={key:0},_={id:"baaMainIntro",class:"space-y-sm"},k={class:"u-form-control-label"},x=["href"],P=(0,l.uE)('<div class="flex flex-wrap gap-x-md gap-y-xs pb-3 mx-auto" data-v-2915443c><div class="flex items-center gap-x-xs text-sm" data-v-2915443c><div class="w-4 h-4 outline outline-1 outline-brand-extra-dark-blue bg-transparent" data-v-2915443c></div> Availability </div><div class="flex items-center gap-x-xs text-sm" data-v-2915443c><div class="w-4 h-4 outline outline-1 outline-brand-extra-dark-blue bg-[#999]" data-v-2915443c></div> No Availability </div></div>',1),S={id:"baaMain",class:"container-fluid mb-5"},D={class:"font-bold text-xl text-center mt-2"},I={class:"grid grid-cols-7 gap-4 row-week"},M={class:"text-center font-medium"},A=["data-date","onClick"],q={key:0,class:"flex flex-col"},L={key:1,class:"col-span-7 p-4 space-y-md"},H={class:"u-form-control-label"},U={class:"flex flex-wrap gap-2"},C=["onClick"],$={key:0,class:"u-rich-text"},T=["href"],E={key:0},N={key:1},B=["href"],V={key:1,id:"additionalDetails",class:"space-y-md"},F={class:"grid gap-x-md gap-y-xs xs:grid-cols-2"},z={class:"space-y-sm"},Z=w((()=>(0,l._)("label",{class:"u-form-control-label"},"Proposed Time:",-1))),O={key:0,class:"space-y-sm"},G=w((()=>(0,l._)("label",{class:"u-form-control-label"},"Log In",-1))),W=w((()=>(0,l._)("div",null,"If you have an account please login",-1))),j={key:0,class:"mb-4"},Y={class:"rewards-block baa"},R=["innerHTML"],K={key:1,class:"ba-extrainfo space-y-sm"},X={key:0,class:"grid gap-x-md gap-y-xs xs:grid-cols-2"},J={class:"grid gap-x-md gap-y-xs xs:grid-cols-2"},Q=w((()=>(0,l._)("div",{class:"u-rich-text"},[(0,l._)("p",null," Be sure to also let us know the following information: "),(0,l._)("ul",null,[(0,l._)("li",null,"Any plots or house types of interest"),(0,l._)("li",null,"How many bedrooms you would like"),(0,l._)("li",null,"When you are thinking of moving")])],-1))),ee={key:2},ae=w((()=>(0,l._)("div",{class:"space-y-sm"},"To book an appointment, please create a My Miller Home account.",-1))),te={class:"grid gap-x-md gap-y-xs xs:grid-cols-2 mt-4"},le={class:"space-y-sm mt-4 md:mt-0"},oe=w((()=>(0,l._)("p",{class:"font-text-heavy"}," I would like to receive the following notifications: ",-1))),ne={class:"mr-3 inline-flex items-baseline gap-x-1"},re=w((()=>(0,l._)("span",{class:"select-none","aria-hidden":""}," All plot releases, news, offers etc, by email and SMS ",-1))),ie=w((()=>(0,l._)("span",{class:"mr-2"}," Only information about plots & developments which match my preferences via: ",-1))),se={class:"mr-3 inline-flex items-baseline gap-x-1"},ue=w((()=>(0,l._)("span",{class:"select-none","aria-hidden":""}," Email ",-1))),de={class:"mr-3 inline-flex items-baseline gap-x-1"},ce=w((()=>(0,l._)("span",{class:"select-none","aria-hidden":""}," SMS (Free) ",-1))),pe={class:"mr-3 inline-flex items-baseline gap-x-1"},me=w((()=>(0,l._)("span",{class:"select-none","aria-hidden":""}," Only news & offer emails ",-1))),ve=w((()=>(0,l._)("p",{class:"text-sm"},[(0,l.Uk)(" By submitting this form you confirm that you are happy for Miller Homes to process your details. Please read our"+(0,l.zw)(" ")+" "),
1(0,l._)("a",{href:"/privacy-policy/terms-and-conditions",target:"_blank",class:"font-text-heavy underline"}," Terms & Conditions "),(0,l.Uk)((0,l.zw)(" ")+" and"+(0,l.zw)(" ")+" "),(0,l._)("a",{href:"/privacy-policy",target:"_blank",class:"font-text-heavy underline"}," Privacy Policy "),(0,l.Uk)((0,l.zw)(" ")+" for more information. ")],-1))),he=w((()=>(0,l._)("div",null,[(0,l._)("label",{class:"mr-3 inline-flex items-baseline gap-x-1"},[(0,l._)("input",{type:"checkbox",id:"sign-up_preferences_vulnerable",class:"translate-y-[2px] rounded-sm border-2 border-[#002E5D40] text-brand-aqua-blue checked:border-[transparent] focus:ring-brand-aqua-blue"}),(0,l._)("span",{class:"select-none"},[(0,l.Uk)(" I consider myself to be vulnerable "),(0,l._)("div",{class:"c-tooltip c-tooltip--top lg:!hidden !align-middle"},[(0,l._)("button",{class:"c-tooltip__trigger",type:"button","aria-describedby":"sign-up--tooltip-preferences_vulnerable","aria-label":"More information about vulnerable customers"},[(0,l._)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[(0,l._)("g",{id:"Group_2837","data-name":"Group 2837",transform:"translate(-975 -1220)"},[(0,l._)("g",{id:"Group_1109","data-name":"Group 1109"},[(0,l._)("g",{id:"Ellipse_5","data-name":"Ellipse 5",transform:"translate(975 1220)",fill:"#fff",stroke:"#009fc2","stroke-width":"2"},[(0,l._)("circle",{cx:"12",cy:"12",r:"12",stroke:"none"}),(0,l._)("circle",{cx:"12",cy:"12",r:"11",fill:"none"})]),(0,l._)("g",{id:"Group_1108","data-name":"Group 1108",transform:"translate(-0.288)"},[(0,l._)("path",{id:"Path_51","data-name":"Path 51",d:"M163.538,177.377c-.057.222-.1.417-.161.607a.223.223,0,0,1-.131.11,13.194,13.194,0,0,1-1.462.484,2.562,2.562,0,0,1-2.094-.289,1.429,1.429,0,0,1-.648-1.342,15.592,15.592,0,0,1,.7-2.926,10.361,10.361,0,0,0,.293-1.439c.059-.577-.233-.848-.815-.8a9.817,9.817,0,0,0-.994.175c.045-.183.087-.378.144-.569a.221.221,0,0,1,.113-.132,6.351,6.351,0,0,1,2.511-.577,1.632,1.632,0,0,1,1.6,1.2,3.417,3.417,0,0,1-.057,1.3c-.238,1.016-.548,2.015-.816,3.025a3.015,3.015,0,0,0-.079.672.58.58,0,0,0,.527.658,2.252,2.252,0,0,0,1.22-.107c.035-.012.071-.021.148-.042",transform:"translate(826.058 1059.349)",fill:"#002e5d"}),(0,l._)("path",{id:"Path_52","data-name":"Path 52",d:"M200.084,102.214a1.46,1.46,0,0,1,1.554,1.429,1.4,1.4,0,0,1-1.092,1.3,1.6,1.6,0,0,1-1.831-.736,1.4,1.4,0,0,1,1.2-1.984c.062-.006.125-.008.166-.01",transform:"translate(788.086 1123.786)",fill:"#002e5d"})])])])])]),(0,l._)("div",{id:"sign-up--tooltip-preferences_vulnerable",class:"c-tooltip__content",role:"tooltip",type:"button"},[(0,l._)("div",{class:"c-tooltip__content-inner"},[(0,l._)("p",null,"We recognise that some customers may need additional advice and assistance during the process of buying and settling into your new home. If you advise us that you require this, we will keep a secure record of your needs and ensure that the service we provide is suitable for you in every way. Our teams are here to support you through every step. Please let us know, at any point, if there’s anything more we can do to make your experience easier.")])])]),(0,l._)("div",{class:"c-tooltip c-tooltip--bottom !hidden lg:!inline-flex !align-middle"},[(0,l._)("button",{class:"c-tooltip__trigger",type:"button","aria-describedby":"sign-up--tooltip-preferences_vulnerable","aria-label":"More information about vulnerable customers"},[(0,l._)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[(0,l._)("g",{id:"Group_2837","data-name":"Group 2837",transform:"translate(-975 -1220)"},[(0,l._)("g",{id:"Group_1109","data-name":"Group 1109"},[(0,l._)("g",{id:"Ellipse_5","data-name":"Ellipse 5",transform:"translate(975 1220)",fill:"#fff",stroke:"#009fc2","stroke-width":"2"},[(0,l._)("circle",{cx:"12",cy:"12",r:"12",stroke:"none"}),(0,l._)("circle",{cx:"12",cy:"12",r:"11",fill:"none"})]),(0,l._)("g",{id:"Group_1108","data-name":"Group 1108",transform:"translate(-0.288)"},[(0,l._)("path",{id:"Path_51","data-name":"Path 51",d:"M163.538,177.377c-.057.222-.1.417-.161.607a.223.223,0,0,1-.131.11,13.194,13.194,0,0,1-1.462.484,2.562,2.562,0,0,1-2.094-.289,1.429,1.429,0,0,1-.648-1.342,15.592,15.592,0,0,1,.7-2.926,10.361,10.361,0,0,0,.293-1.439c.059-.577-.233-.848-.815-.8a9.817,9.817,0,0,0-.994.175c.045-.183.087-.378.144-.569a.221.221,0,0,1,.113-.132,6.351,6.351,0,0,1,2.511-.577,1.632,1.632,0,0,1,1.6,1.2,3.417,3.417,0,0,1-.057,1.3c-.238,1.016-.548,2.015-.816,3.025a3.015,3.015,0,0,0-.079.672.58.58,0,0,0,.527.658,2.252,2.252,0,0,0,1.22-.107c.035-.012.071-.021.148-.042",transform:"translate(826.058 1059.349)",fill:"#002e5d"}),(0,l._)("path",{id:"Path_52","data-name":"Path 52",d:"M200.084,102.214a1.46,1.46,0,0,1,1.554,1.429,1.4,1.4,0,0,1-1.092,1.3,1.6,1.6,0,0,1-1.831-.736,1.4,1.4,0,0,1,1.2-1.984c.062-.006.125-.008.166-.01",transform:"translate(788.086 1123.786)",fill:"#002e5d"})])])])])]),(0,l._)("div",{id:"sign-up--tooltip-preferences_vulnerable",class:"c-tooltip__content",role:"tooltip",type:"button"},[(0,l._)("div",{class:"c-tooltip__content-inner"},[(0,l._)("p",null,"We recognise that some customers may need additional advice and assistance during the process of buying and settling into your new home. If you advise us that you require this, we will keep a secure record of your needs and ensure that the service we provide is suitable for you in every way. Our teams are here to supp
1ort you through every step. Please let us know, at any point, if there’s anything more we can do to make your experience easier.")])])])])])],-1))),ge={class:"pt-4"},ye={key:3,class:"ba-extrainfo space-y-sm pt-4"},be={class:"grid gap-x-md gap-y-xs xs:grid-cols-2"},we={class:"pt-4"},fe={key:2,class:"error mt-4"},_e={key:3},ke={key:0,class:"flex items-center justify-center w-full pb-2"},xe={class:"text-2xl"},Pe={__name:"BookAppointment",props:{developmentName:{type:String,required:!0},developmentId:{type:String,required:!0},developmentPhone:{type:String,default:""},region:{type:String,required:!0},developmentIds:{type:Array,required:!0},isPhoneAppointment:{type:Boolean,required:!0},jdePlotId:{type:String,required:!0},dayHeadings:{type:Array,default:()=>["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},daySlots:{type:Array,default:()=>[]},monthSlots:{type:Array,default:()=>[]},voucherText:{type:String,default:""},hash:{type:String,required:!0},customerPhone:{type:String,default:""}},emits:["booked"],setup(e,{emit:a}){const t=e,o=a,n=(0,y.h)(),u=(0,l.iH)(!1),c=(0,l.iH)(!1),p=(0,l.iH)({}),m=(0,l.iH)(""),w=(0,l.iH)(""),Pe=(0,l.iH)(null),Se=(0,l.iH)(null),De=(0,l.iH)(null),Ie=(0,l.iH)(null),Me=(0,l.iH)(t.customerPhone),Ae=(0,l.iH)(""),qe=(0,l.iH)(""),Le=(0,l.iH)(0),He=(0,l.iH)(""),Ue=(0,l.iH)(""),Ce=(0,l.iH)(""),$e=(0,l.iH)(""),Te=(0,l.iH)(""),Ee=(0,l.iH)(""),Ne=(0,l.iH)(""),Be=(0,l.iH)(!1),Ve=(0,l.iH)(!1),Fe=(0,l.iH)(!1),ze=(0,l.iH)(!1),Ze=(0,l.iH)(!1),Oe=(0,l.iH)(!1),Ge=(0,l.iH)(!1),We=(0,l.iH)(!1),je=(0,l.iH)(""),Ye=(0,l.Fl)((()=>t.developmentPhone.replace(/\s+/g,""))),Re=(0,l.Fl)((()=>null!==Ie.value)),Ke=i.BM.regex(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/),Xe=i.BM.regex(/^(?=.*[\d\W]).{8,}$/),Je={customerPhoneLocal:{required:i.BM.withMessage("Phone number is required",i.C1),minLength:i.BM.withMessage("Phone number must be at least 8 characters",(0,i.Ei)(8))},userFirstName:{required:i.BM.withMessage("First name is required",i.C1),minLength:(0,i.Ei)(2)},userLastName:{required:i.BM.withMessage("Last name is required",i.C1),minLength:(0,i.Ei)(2)},userEmail:{required:i.BM.withMessage("Email is required",i.C1),isValidEmail:i.BM.withMessage("Please enter a valid email address",Ke)},userPassword:{required:i.BM.withMessage("Password is required",i.C1),isValidPassword:i.BM.withMessage("Password must be at least 8 characters and include a number or special character",Xe)}},Qe=(0,r.Xw)(Je,{customerPhoneLocal:Me,userFirstName:Ce,userLastName:$e,userEmail:He,userPassword:Ue});function ea(e){return new Date(e+"Z").toISOString().split("T")[0]}function aa(e){const a=e=>String(e).padStart(2,"0"),t=a(e.getDate()),l=a(e.getMonth()+1),o=e.getFullYear();let n=e.getHours();const r=n>=12?"PM":"AM";return n=n%12||12,`${t}/${l}/${o} ${n}:${a(e.getMinutes())} ${r}`}function ta(e,a=!0){return{date:new Intl.DateTimeFormat("en-GB",{weekday:"short",day:"2-digit",month:"short",year:"numeric",timeZone:"Europe/London"}).format(e),time:new Intl.DateTimeFormat("en-GB",{hour:"2-digit",minute:"2-digit",hour12:!a,timeZone:"Europe/London"}).format(e)}}function la(e){const a=[];for(let t=0;t<e.length;t+=7)a.push(e.slice(t,t+7));return a}function oa(){Ie.value=null}async function na(){if(c.value=!0,!n.isLoggedIn){if(Qe.value.userPassword.$touch(),Qe.value.userPassword.$invalid)return void(c.value=!1);if(je.value="Creating your My Miller Home Account",!await ra())return c.value=!1,void(je.value="")}je.value="Booking your appointment",await async function(){const e={chosenDateTime:aa(Ie.value),jdePlotID:t.jdePlotId,sfDevelopmentID:t.developmentIds[0],description:Ae.value,region:t.region,infinityTrackingId:qe.value,isPhoneAppointment:t.isPhoneAppointment,phoneNumber:Me.value,voucherText:t.voucherText,hash:t.hash};try{const{data:a}=await v.Z.post("/api/sitecore/bookappointment/book",e);window.dataLayer?.push({event:"Book Appointment",stepName:"Completed"});const t=new URLSearchParams(window.location.search),l=["src","utm_source","utm_medium","utm_campaign","region"].some((e=>t.has(e))),n="Email"===t.get("src");if((l||n)&&window.dataLayer?.push({event:"Direct Booking"}),!a.IsError){const e=ta(Ie.value);a.Message=`<p>Thanks for your booking on ${e.date} at ${e.time}</p>`}o("booked",a)}catch(e){Ge.value&&(Le.value=0,Ne.value="Your account was created Successfully, but there was an issue booking the appointment. Please try again")}finally{c.value=!1,je.value=""}}()}(0,l.Fl)((()=>{const e=Qe.value.customerPhoneLocal.$errors;return e.length?e[0].$message:""}));const ra=async()=>{Ne.value="";const e=await(0,g.NB)(),a={firstName:Ce.value,lastName:$e.value,email:He.value,password:Ue.value,phone:Me.value,id:t.developmentId,allOptIn:Ze.value,emailOptIn:Ve.value,smsOptIn:Fe.value,newsOptIn:ze.value,pushOptIn:!1,infinityId:qe.value,referralCode:"",isVulnerable:Oe.value,recaptchaResponse:e};try{const e=await v.Z.post("/api/registration/register",a,{headers:{"Content-Type":"application/json"}});if(e.data.Success)return Be.value=!1,await ua(e.data,!0),Ge.value=!0,"undefined"!=typeof dataLayer&&(dataLayer.push({event:"Registration",event_category:"Register",event_action:"Complete",stage:"Completed"}),(a.newsOptIn||a.smsOptIn||a.allOptIn||a.emailOptIn)&&dataLayer.push({event:"CommsOptin",event_category:"registration"})),!0;Ne.value="Looks like something went wrong. Please try again"}catch(e){Be.value=!1,e.response&&403===e.response.status?(Ne.value="Recaptcha verification failed, please try again",Be.value=!0):Ne.value="Looks like something went wrong. Please try again"}return(0,g.x7)(),c.value=!1,!1},ia=async()=>{c.value=!0,Ne.value="";try{const e=await v.Z.post("/api/mmh/login",{Username:Te.value,Password:Ee.value},{headers:{"Content-Type":"application/json"}});e.data.Success&&await ua(e.data)}catch(e){Ne.value="Login failed, please check email and password"}c.value=!1},sa=e=>{try{const a={event:"Book Appointment Stage",appointment_stage:e};window.dataLayer.push(a)}catch(e){}},ua=async(e,a=!1)=>{(0,b.bb)(!0),a||await(async()=>{c.value=!0;const e=(await v.Z.post("/api/sitecore/ComplimentsComplaints/LoadUserDetails")).data;He.value=e.Email,Ce.value=e.FirstName,$e.value=e.LastName,Me.value=e.Phone,c.value=!1,We.value=!1}
1)(),Ne.value="",n.setLoggedInState(!0,e.IsOwner,e.ProfileCompleted),n.loadSaved(!0),n.reloadTopNav()},da=(e,a)=>{if(a&&e<=0)return"bg-[#D3D3D3]"};return(0,l.bv)((()=>{const e=document.getElementById("BookAppointmentForm");if(e){const a="True"===e.getAttribute("data-is-logged-in");a&&n.setLoggedInState(a,!1,!1,!0)}})),(a,o)=>((0,l.wg)(),(0,l.iD)("div",null,[Re.value?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("div",f,[(0,l._)("div",_,[(0,l._)("h3",k," Available "+(0,l.zw)(e.isPhoneAppointment?"telephone ":"")+"appointments at "+(0,l.zw)(e.developmentName),1),(0,l._)("p",null," Thank you for your interest in our development. Appointments can be booked up to 30 days in advance. Please select a date to view available "+(0,l.zw)(e.isPhoneAppointment?"telephone ":"")+"appointment times. ",1),(0,l._)("p",null,[(0,l.Uk)(" If the times below are not suitable, please visit us or call our "),(0,l._)("strong",null,[(0,l.Uk)(" Development Sales Manager on "),(0,l._)("a",{class:"underline",href:`tel:${Ye.value}`},(0,l.zw)(e.developmentPhone),9,x)]),(0,l.Uk)(" to arrange a time to visit. ")]),P]),(0,l._)("div",S,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.monthSlots,((a,o)=>((0,l.wg)(),(0,l.iD)("div",{key:"mon-"+o,class:"grid grid-row gap-2 md:gap-4 h-full row-week mb-2"},[(0,l._)("h2",D,(0,l.zw)(a.Name),1),(0,l._)("div",I,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.dayHeadings,((e,a)=>((0,l.wg)(),(0,l.iD)("div",{key:"heading-"+a,class:"col-weekday flex items-center justify-center py-2 md:py-4"},[(0,l._)("h3",M,(0,l.zw)(e),1)])))),128))]),((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(la(a.DaySlots),((a,n)=>((0,l.wg)(),(0,l.iD)("div",{key:"week-"+o+"-"+n,class:"grid grid-cols-7 gap-2 md:gap-4 h-full row-week mb-2"},[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(a,((e,a)=>((0,l.wg)(),(0,l.iD)("div",{key:"day-"+n+"-"+a,class:(0,l.C_)(["text-center flex rounded-sm items-center justify-center relative py-2 md:py-4",[e.IsSelectable?"cursor-pointer border":"cursor-default border-none",da(e.Availability,e.IsSelectable),Pe.value===a&&De.value==o&&Se.value===n?"!bg-[#009FC2] text-white":"bg-inherit text-inherit"]]),"data-date":ea(e.DateTime),onClick:l=>{(async function(e,a,l,o){if(e.IsSelectable){Se.value=a,De.value=l,Pe.value=o,u.value=!0,(0,g.Hm)();try{const{data:a}=await v.Z.post("/api/sitecore/bookappointment/gettimeslots",{date:ea(e.DateTime),developmentIds:t.developmentIds,isPhoneAppointment:t.isPhoneAppointment});p.value=a.result,function(e){if(!e)return;const a=ta(new Date(e));m.value=a.date,w.value=a.time}(p.value?.NextAvailableDateTime)}catch(e){}finally{u.value=!1}}})(e,n,o,a),sa("Day Selected")}},[e.IsSelectable?((0,l.wg)(),(0,l.iD)("div",q,[(0,l._)("div",null,(0,l.zw)(e.DayNumber),1)])):(0,l.kq)("",!0)],10,A)))),128)),Se.value===n&&u.value&&De.value==o?((0,l.wg)(),(0,l.j4)(h.default,{key:0,id:"spinner",class:"m-2 col-span-7 flex items-center justify-center w-full"})):(0,l.kq)("",!0),Se.value!==n||u.value||De.value!=o?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("div",L,[(0,l._)("h4",H,(0,l.zw)(p.value.FormattedDate),1),(0,l._)("div",U,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(p.value.Slots,((e,a)=>((0,l.wg)(),(0,l.iD)("button",{key:"slot-"+a,class:"c-button c-button--primary c-button--blue m-1 text-xs gtm-pick-time",onClick:a=>{!function(e){Ie.value=new Date(e.DateTime)}(e),sa("Time Selected")}},(0,l.zw)(function(e){return new Date(e.DateTime).toLocaleTimeString("en-GB",{timeZone:"Europe/London",hour:"2-digit",minute:"2-digit"})}(e)),9,C)))),128))]),p.value.Slots?.length<1?((0,l.wg)(),(0,l.iD)("div",$,[(0,l._)("p",null,[(0,l.Uk)(" Sorry, no appointments are currently available for your selected date. Please choose another date or call our "),(0,l._)("strong",null,[(0,l.Uk)(" Development Sales Manager on "),(0,l._)("a",{class:"underline",href:`tel:${Ye.value}`},(0,l.zw)(e.developmentPhone),9,T)]),(0,l.Uk)(" to arrange a time to visit. ")]),m.value&&w.value?((0,l.wg)(),(0,l.iD)("p",E,[(0,l.Uk)(" Our next available appointment time is "),(0,l._)("strong",null,(0,l.zw)(m.value),1),(0,l.Uk)(" on "),(0,l._)("strong",null,(0,l.zw)(w.value),1),(0,l.Uk)(". ")])):(0,l.kq)("",!0)])):((0,l.wg)(),(0,l.iD)("div",N,[(0,l._)("p",null,[(0,l.Uk)(" If the times shown are not suitable, please visit us or call our "),(0,l._)("strong",null,[(0,l.Uk)(" Development Sales Manager on "),(0,l._)("a",{class:"underline",href:`tel:${Ye.value}`},(0,l.zw)(e.developmentPhone),9,B)]),(0,l.Uk)(" to arrange a time to visit. ")])]))]))])))),128))])))),128))])])),Re.value&&!c.value?((0,l.wg)(),(0,l.iD)("div",V,[(0,l._)("div",F,[(0,l._)("div",z,[Z,(0,l._)("div",null,(0,l.zw)(ta(Ie.value).date)+", "+(0,l.zw)(ta(Ie.value).time),1),(0,l._)("div",null,[(0,l._)("button",{class:"c-button c-button--primary c-button--blue",onClick:oa}," Choose a different time ")])]),(0,l.SU)(n).isLoggedIn||We.value||0!=Le.value?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("div",O,[G,W,(0,l._)("div",null,[(0,l._)("button",{class:"c-button c-button--primary c-button--blue",onClick:o[0]||(o[0]=e=>We.value=!0)}," Login ")])]))]),e.voucherText?((0,l.wg)(),(0,l.iD)("div",j,[(0,l._)("div",Y,[(0,l._)("div",{class:"rewards",innerHTML:e.voucherText},null,8,R)])])):(0,l.kq)("",!0),0!=Le.value||We.value?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("div",K,[(0,l.SU)(n).isLoggedIn?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("div",X,[(0,l.Wm)(s.default,{id:"firstName",type:"text",label:"First Name",placeholder:"Enter your first name",modelValue:Ce.value,"onUpdate:modelValue":o[1]||(o[1]=e=>Ce.value=e),minlength:"2","is-error":(0,l.SU)(Qe).userFirstName.$error,errors:(0,l.SU)(Qe).userFirstName.$errors,showMandatory:"true"},null,8,["modelValue","is-error","errors"]),(0,l.Wm)(s.default,{id:"lastName",type:"text",label:"Last Name",placeholder:"Enter your last name",modelValue:$e.value,"onUpdate:modelValue":o[2]||(o[2]=e=>$e.value=e),minlength:"2","is-error":(0,l.SU)(Qe).userLastName.$error,errors:(0,l.SU)(Qe).userLastName.$errors,showMandatory:"true"},null,8,["modelValue","is-error","errors"])])),(0,l._)("div",J,[(0,l.SU)(n).isLoggedIn?(0,l.kq)("",!0):((0,l.wg)(),(0,l.j4)(s.default,{key:0,id:"email",type:"email",label:"Email",placeholder:"Enter your email",modelValue:He.value,"onUpdate:modelValue":o[3]||(o[3]=e=>He.value=e),minlength:"2","is-error":(0,l.SU)(Qe).userEmail.$error,errors:(0,l.SU)(Qe).userEmail.$errors,showMandatory:"true"},null,8,["modelValue","is-error","errors"])),(0,l.Wm)(s.default,{id:"customerPhoneLocal",type:"text",label:"Contact Phone Number",placeholder:"Telephone number",modelValue:Me.value,"onUpdate:modelValue":o[4]||(o[4]=e=>Me.value=e),minlength:"8","is-error":(0,l.SU)(Qe).customerPhoneLocal.$error,errors:(0,l.SU)(Qe).customerPhoneLocal.$errors,showMandatory:!0},null,8,["modelValue","is-error","errors"])]),Q,(0,l.Wm)(d.Z,{id:"extraDescription",label:"",placeholder:"",modelValue:Ae.value,"onUpdate:modelValue":o[5]||(o[5]=e=>Ae.value=e),showMandatory:!1},null,8,["modelValue"]),(0,l.SU)(n).isLoggedIn?((0,l.wg)(),(0,l.iD)("button",{key:2,class:"c-button c-button--primary c-button--blue gtm-place-booking",onClick:na}," Submit Booking ")):((0,l.wg)(),(0,l.iD)("button",{key:1,class:"c-button c-button--primary c-button--blue gtm-baa-details-complete",onClick:o[6]||(o[6]=e=>{!async function(){if(!await(async()=>{c.value=!0;try{return await v.Z.get(`/api/registration/isemailavailable?e=${encodeURIComponent(He.value)}`),c.value=!1,!1}catch(e){return Te.value=He.value,We.value=!0,c.value=!1,!0}})()){if(Qe.value.userFirstName.$touch(),Qe.value.userLastName.$touch(),Qe.value.userEmail.$touch(),Qe.value.customerPhoneLocal.$touch(),Qe.value.userFirstName.$invali
1d||Qe.value.userLastName.$invalid||Qe.value.userEmail.$invalid||Qe.value.customerPhoneLocal.$invalid)return;Le.value+=1}}(),sa("Personal Details Entered")})}," Next "))])),1==Le.value?((0,l.wg)(),(0,l.iD)("div",ee,[ae,(0,l._)("div",te,[(0,l.Wm)(s.default,{id:"sign-up_create-password",type:"password",label:"Password",placeholder:"Create a password",description:"Use at least 8 characters with a number or special character",min:"{8}",max:"{16}",autocomplete:"new-password",modelValue:Ue.value,"onUpdate:modelValue":o[7]||(o[7]=e=>Ue.value=e),"is-error":(0,l.SU)(Qe).userPassword.$error,errors:(0,l.SU)(Qe).userPassword.$errors,showMandatory:"true"},null,8,["modelValue","is-error","errors"]),(0,l._)("div",le,[oe,(0,l._)("p",null,[(0,l._)("label",ne,[re,(0,l.wy)((0,l._)("input",{type:"checkbox","onUpdate:modelValue":o[8]||(o[8]=e=>Ze.value=e),id:"sign-up_preferences_all-comms","aria-label":"I would like to receive plot releases, news, offers etc, by email and SMS",class:"translate-y-[2px] rounded-sm border-2 border-[#002E5D40] text-brand-aqua-blue checked:border-[transparent] focus:ring-brand-aqua-blue"},null,512),[[l.e8,Ze.value]])])]),(0,l._)("p",null,[ie,(0,l._)("label",se,[ue,(0,l.wy)((0,l._)("input",{type:"checkbox","onUpdate:modelValue":o[9]||(o[9]=e=>Ve.value=e),id:"sign-up_preferences_email","aria-label":"I would like to receive emails about plots and developments which match my preferences",class:"translate-y-[2px] rounded-sm border-2 border-[#002E5D40] text-brand-aqua-blue checked:border-[transparent] focus:ring-brand-aqua-blue"},null,512),[[l.e8,Ve.value]])]),(0,l._)("label",de,[ce,(0,l.wy)((0,l._)("input",{type:"checkbox","onUpdate:modelValue":o[10]||(o[10]=e=>Fe.value=e),id:"sign-up_preferences_sms","aria-label":"I would like to receive free SMS messages about plots and developments which match my preferences",class:"translate-y-[2px] rounded-sm border-2 border-[#002E5D40] text-brand-aqua-blue checked:border-[transparent] focus:ring-brand-aqua-blue"},null,512),[[l.e8,Fe.value]])])]),(0,l._)("p",null,[(0,l._)("label",pe,[me,(0,l.wy)((0,l._)("input",{type:"checkbox","onUpdate:modelValue":o[11]||(o[11]=e=>ze.value=e),id:"sign-up_preferences_news-offer","aria-label":"I would like to receive emails about news and offers",class:"translate-y-[2px] rounded-sm border-2 border-[#002E5D40] text-brand-aqua-blue checked:border-[transparent] focus:ring-brand-aqua-blue"},null,512),[[l.e8,ze.value]])])]),ve,he])]),(0,l._)("div",ge,[(0,l._)("button",{class:"c-button c-button--primary c-button--blue is-outlined",onClick:o[12]||(o[12]=e=>Le.value=0)}," Previous "),(0,l._)("button",{class:"c-button c-button--primary c-button--blue gtm-place-booking float-right",onClick:na}," Submit Booking ")])])):(0,l.kq)("",!0),0==Le.value&&We.value?((0,l.wg)(),(0,l.iD)("div",ye,[(0,l._)("div",be,[(0,l.Wm)(s.default,{id:"email-login",type:"email",label:"Email",placeholder:"Enter your email",modelValue:Te.value,"onUpdate:modelValue":o[13]||(o[13]=e=>Te.value=e),minlength:"2",showMandatory:"true"},null,8,["modelValue"]),(0,l.Wm)(s.default,{id:"sign-up_create-password-login",type:"password",label:"Password",placeholder:"Enter your Password",min:"{8}",max:"{16}",autocomplete:"new-password",modelValue:Ee.value,"onUpdate:modelValue":o[14]||(o[14]=e=>Ee.value=e),showMandatory:"true"},null,8,["modelValue"])]),(0,l._)("div",we,[(0,l._)("button",{class:"c-button c-button--primary c-button--blue",onClick:o[15]||(o[15]=e=>We.value=!1)}," Back "),(0,l._)("button",{class:"c-button c-button--primary c-button--blue float-right",onClick:ia}," Login ")])])):(0,l.kq)("",!0)])):(0,l.kq)("",!0),Ne.value?((0,l.wg)(),(0,l.iD)("div",fe,(0,l.zw)(Ne.value),1)):(0,l.kq)("",!0),c.value?((0,l.wg)(),(0,l.iD)("div",_e,[je.value?((0,l.wg)(),(0,l.iD)("div",ke,[(0,l._)("p",xe,(0,l.zw)(je.value),1)])):(0,l.kq)("",!0),(0,l.Wm)(h.default,{id:"spinner",class:"flex items-center justify-center w-full"})])):(0,l.kq)("",!0)]))}},Se=(0,p.Z)(Pe,[["__scopeId","data-v-2915443c"]]);var De=t(6217);function Ie(){return(0,l.ri)({components:{BookTypeChoice:m,BookAppointment:Se,ThankYou:De.Z},setup(){const e=(0,l.iH)(!1),a=(0,l.iH)(!1),t=(0,l.iH)(null);return{showAppointment:e,isPhoneAppointment:a,thankyou:t,handleTypeChosen:t=>{a.value=t.isPhoneAppointment,e.value=!0,(e=>{try{const a={event:"Book Appointment Stage",appointment_stage:"Ap
1pointment Type",appointment_type:e};window.dataLayer.push(a)}catch(e){}})(t.isPhoneAppointment?"Phone Appointment":"Development Appointment")},handleBooked:e=>{t.value=e}}}})}}}]);

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.