!function(e){try{const q=new URLSearchParams(location.search),K=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","gclid","fbclid"],A={};K.forEach(k=>{const v=q.get(k);v&&(A[k]=v)});if(Object.keys(A).length){const s=JSON.stringify(A);try{sessionStorage.setItem("kandua_attr",s)}catch(e2){}try{e.cookie="kandua_attr="+encodeURIComponent(s)+";domain=.kandua.com;path=/;max-age=2592000;SameSite=Lax"}catch(e2){}}}catch(e2){}!function(){const t=e.createElement("link");t.rel="stylesheet",t.href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css",e.head.appendChild(t);const n=e.createElement("script");n.src="https://cdn.jsdelivr.net/npm/flatpickr",e.head.appendChild(n);const o=e.createElement("script");o.src="https://cdn.voiceflow.com/widget-next/bundle.mjs",o.type="text/javascript",o.onload=()=>{let t;const n=(()=>{let t,n,o=0;return{enable:()=>{innerWidth>1024||(t||(t=e.querySelector('meta[name="viewport"]'),t||(t=e.createElement("meta"),t.name="viewport",e.head.appendChild(t)),n=t.getAttribute("content")||"width=device-width, initial-scale=1"),o++,t.setAttribute("content","width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover"))},disable:()=>{innerWidth>1024||setTimeout(()=>{o=Math.max(0,o-1),t&&0===o&&null!=n&&t.setAttribute("content",n)},50)},blurActive:()=>{try{e.activeElement?.blur?.()}catch(e){}}}})(),o=(()=>{const t="data-vf-hide-composer";let n,o=!1,a=new Set;const i=()=>{const t=new Set([e]),n=[e],o=new Set(n);for(;n.length;){const e=n.shift();(e instanceof Document||e instanceof ShadowRoot?e.querySelectorAll("*"):[]).forEach(e=>{e&&e.shadowRoot&&!o.has(e.shadowRoot)&&(o.add(e.shadowRoot),t.add(e.shadowRoot),n.push(e.shadowRoot))})}return[...t]},r=n=>{if(!n||!(n instanceof Document||n instanceof ShadowRoot))return;if(n.querySelector(`style[${t}]`))return;const o=e.createElement("style");o.setAttribute(t,"1"),o.textContent=".vfrc-input-container,.vfrc-footer,.vfrc-composer,.vfrc-message-composer,.vfrc-chat-input-container{display:none!important}";try{n.appendChild(o),a.add(n)}catch(e){}},s=e=>{const n=e.querySelector?.(`style[${t}]`);if(n)try{n.remove()}catch(e){}a.delete(e)};return{hide(){o=!0,i().forEach(r),n||(n=new MutationObserver(()=>{o&&i().forEach(r)}),n.observe(e.documentElement,{childList:!0,subtree:!0}))},show(){o=!1,a.forEach(s),a.clear(),n?.disconnect?.(),n=null}}})(),a=(()=>{const e='.vfrc-avatar,[class*="vfrc-avatar"]',t=new WeakMap,n=t=>{t.querySelectorAll(e).forEach(e=>{e.style.display="none",e.style.visibility="hidden",e.style.width="0",e.style.margin="0",e.style.padding="0"})};return{hideFor:o=>{const a=(t=>{let n=t;for(let t=0;t<12&&n;t++){if(n.querySelector?.(e))return n;n=n.parentElement||n.getRootNode&&n.getRootNode().host||null}return null})(o);if(!a)return;if(n(a),t.has(a))return;const i=new MutationObserver(e=>{let t=!1;for(const n of e)n.addedNodes&&n.addedNodes.length&&(t=!0);t&&n(a)});i.observe(a,{childList:!0,subtree:!0}),t.set(a,i),setTimeout(()=>{i.disconnect(),t.delete(a)},1200)}}})(),i=(t,n)=>{const o=[],a=[e],i=new Set(a);for(;a.length;){const e=a.shift();o.push(e),(e instanceof Document||e instanceof ShadowRoot?e.querySelectorAll("*"):[]).forEach(e=>{e&&e.shadowRoot&&!i.has(e.shadowRoot)&&(i.add(e.shadowRoot),a.push(e.shadowRoot))})}o.forEach(o=>{if(!o||!(o instanceof Document||o instanceof ShadowRoot))return;if(o.querySelector(`style[${n}]`))return;const a=e.createElement("style");a.setAttribute(n,"1"),a.textContent=t;try{o.appendChild(a)}catch(e){}})};function r(e){let t=e,n=0;for(;t&&n<20;){const e=(t.className||"")+"";if("listitem"===t.getAttribute?.("role")||/vfrc-.*(message|bubble|response|chat|row)/i.test(e))return t;t=t.parentNode||t.getRootNode&&t.getRootNode().host||null,n++}return null}function s(e){try{if(!e)return;let t=e;for(let e=0;e<15&&t;e++){if((t.className||"").includes("vfrc-system-response")){t.style.display="none",t.style.height="0",t.style.margin="0",t.style.padding="0",t.style.overflow="hidden";break}t=t.parentElement||t.getRootNode&&t.getRootNode().host||null}}catch(e){}}i(".vf-wide-card{width:100%!important;max-width:100%!important;display:block!important}.vf-wide-card>.vf-form-card{width:100%!important;max-width:100%!important}.vf-savefx-success{background:#00bf63!important;transition:background .22s ease,transform .22s ease,opacity .3s ease}.vf-savefx-bounce{transform:translateY(-1px) scale(1.02)}.vf-savefx-hide{opacity:0;transform:translateY(-6px) scale(.98);pointer-events:none;transition:opacity .28s ease,transform .28s ease}.vf-progress-card{padding:16px;border:1px solid #e5e7eb;border-radius:8px;margin:12px 0;background:#fafafa;width:100%}.vf-progress-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.vf-progress-title{font-weight:700;color:#111827;font-size:14px}.vf-progress-sub{color:#6b7280;font-size:12px}.vf-progress-track{position:relative;height:10px;background:#e5e7eb;border-radius:9999px;overflow:hidden}.vf-progress-fill{position:absolute;inset:0 auto 0 0;width:0;height:100%;border-radius:9999px;background:#165dfb;transition:width .7s cubic-bezier(.22,1,.36,1)}.vf-step-dots{display:flex;justify-content:space-between;margin-top:10px}.vf-step-dot{width:22px;height:22px;border-radius:50%;background:#e5e7eb;display:flex;align-items:center;justify-content:center;color:#fff;font-size:12px;box-shadow:inset 0 0 0 2px #fff}.vf-step-dot.complete{background:#22c55e}.vf-step-dot.current{background:#3b82f6;animation:vfPulse 1.2s ease-in-out infinite}@keyframes vfPulse{0%{transform:scale(1);box-shadow:0 0 0 0 rgba(59,130,246,.55)}70%{box-shadow:0 0 0 10px rgba(59,130,246,0)}100%{transform:scale(1)}}","data-vf-styles"),i(".vf-loader-card{padding:16px;border:1px solid #e5e7eb;border-radius:12px;margin:12px 0;background:#f8fafc;width:100%}.vf-loader-wrap{display:flex;align-items:center;gap:14px}.vf-spinner{width:46px;height:46px;border-radius:9999px;border:4px solid #dbeafe;border-top-color:#0551fb;animation:vfSpin 1s linear infinite;flex:0 0 auto}@keyframes vfSpin{to{transform:rotate(360deg)}}.vf-loader-text{display:flex;flex-direction:column}.vf-loader-title{font-weight:800;color:#0f172a;font-size:16px}.vf-loader-sub{color:#334155;font-size:14px;margin-top:2px}.vf-dots{display:inline-flex;gap:4px;margin-top:6px}.vf-dot{width:6px;height:6px;border-radius:9999px;background:#0551fb;opacity:.35;animation:vfBounce 1s ease-in-out infinite}.vf-dot:nth-child(2){animation-delay:.15s}.vf-dot:nth-child(3){animation-delay:.3s}@keyframes vfBounce{0%,80%,100%{transform:translateY(0);opacity:.35}40%{transform:translateY(-6px);opacity:1}}","data-vf-loader-styles"),i('[class*="vfrc-message--extension-"]{background:transparent!important;padding:0!important;border-radius:0!important}',"data-vf-unbubble"),i(".vfrc-chat--dialog{flex:1 1 auto!important;min-height:0!important}","data-vf-fill");const l=new Set,d=e=>{try{return"string"==typeof e?.payload?JSON.parse(e.payload):e?.payload||{}}catch(e){return{}}};const c=(()=>{const e=new Map;function t(e,t){if("function"==typeof gtag)try{gtag("event",e,t)}catch(e){}}return{trackEvent:t,trackStart:function(t){e.set(t,Date.now())},trackComplete:function(n,o={}){const a=e.get(n);t(`${n}_complete`,a?{...o,duration_seconds:Math.round((Date.now()-a)/1e3)}:o)},sessions:e}})(),p=(e,t,n,o)=>({name:e,type:"response",match:({trace:t})=>t?.type===e||t?.payload?.name===e,render:({element:e})=>(c.trackStart(t),c.trackEvent(n,o),s(e),()=>{})}),f=(e,t,n)=>({name:e,type:"response",match:({trace:t})=>t?.type===e||t?.payload?.name===e,render:({trace:e,element:o})=>(c.trackComplete(t,n(d(e))),s(o),()=>{})}),P=(e,t)=>({name:e,type:"response",match:({trace:n})=>n?.type===e||n?.payload?.name===e,render:({trace:n,element:o})=>(c.trackEvent(t,{event_category:"funnel",...d(n)}),s(o),()=>{})}),TRK=[P("ext_chatInitiated","chat_initiated"),P("ext_conversationStarted","conversation_started"),P("ext_mainIntent","main_intent"),P("ext_getGuidance","get_guidance"),p("ext_plumbingDiagnoseStart","plumbing_diagnose","plumbing_diagnose_start",{event_category:"funnel"}),f("ext_plumbingDiagnoseEnd","plumbing_diagnose",e=>({event_category:"funnel",...e})),p("ext_electricianDiagnoseStart","electrician_diagnose","electrician_diagnose_start",{event_category:"funnel"}),f("ext_electricianDiagnoseEnd","electrician_diagnose",e=>({event_category:"funnel",...e})),p("ext_locationStart","location_capture","location_capture_start",{event_category:"funnel"}),f("ext_locationEnd","location_capture",e=>({event_category:"funnel",...e})),P("ext_locationFallback","location_fallback"),p("ext_dateTimeCaptureStart","datetime_capture","datetime_capture_start",{event_category:"funnel"}),f("ext_dateTimeCaptureEnd","datetime_capture",e=>({event_category:"funnel",...e})),P("ext_proCheckAPIFailed","pro_check_api_failed"),P("ext_checkForProsSuccess","check_for_pros_success"),P("ext_pros_found","pros_found"),p("ext_finalDetailsStart","final_details","final_details_start",{event_category:"funnel"}),f("ext_finalDetailsCaptured","final_details",e=>({event_category:"funnel",...e})),P("ext_jobPostSuccess","job_post_success")],y={name:"ext_loading_on_first",type:"response",match:({trace:e})=>"ext_loading_on_first"===e?.type||"ext_loading_on_first"===e?.payload?.name,render:({trace:t,element:i})=>{const s=d(t),c=s.label||"Please wait a moment...",p=Math.max(1e3,Number(s.min_ms||0));o.hide(),n.enable();const f=e.createElement("div");return f.className="vf-anti-zoom vf-wide-card vf-loader-card",f.setAttribute("role","status"),f.setAttribute("aria-live","polite"),f.setAttribute("aria-busy","true"),f.innerHTML=`
Looking for nearby Pros
${c}
`,i.appendChild(f),L(i,f),a.hideFor(f),l.add({node:f,contentEl:i,wrapper:r(i),started:Date.now(),minMs:p}),()=>{}}},w={name:"ext_loading_off_first",type:"response",match:({trace:e})=>"ext_loading_off_first"===e?.type||"ext_loading_off_first"===e?.payload?.name,render:()=>(function(){const e=Date.now();l.forEach(t=>{const{node:a,contentEl:i,started:s,minMs:d}=t,c=Math.max(0,s+d-e);setTimeout(()=>{try{a?.remove()}catch(e){}!function(e){try{if(!e)return;if(0===e.childElementCount&&""===(e.textContent||"").trim()){const t=r(e)||e.parentNode;if(t)try{t.remove()}catch(e){}}}catch(e){}}(i);try{l.delete(t)}catch(e){}0===l.size&&(o.show(),n.disable())},c)})}(),()=>{}),},k=(()=>{function e(e,t){e&&e.classList.add("vf-savefx-hide"),t&&t.classList.add("vf-savefx-hide"),setTimeout(()=>{e&&(e.style.display="none"),t&&(t.style.display="none")},320)}return{celebrate(t,n){t&&(t.classList.add("vf-savefx-success","vf-savefx-bounce"),setTimeout(()=>t.classList.remove("vf-savefx-bounce"),240),setTimeout(()=>e(t,n),1e3))},hideBoth:e}})(),L=(e,t)=>{try{e.style.width=e.style.maxWidth="100%",e.style.alignSelf="stretch"}catch(e){}try{t.style.width=t.style.maxWidth="100%"}catch(e){}let n=e.parentElement;for(let e=0;e<4&&n;e++){try{n.style&&(n.style.width=n.style.maxWidth="100%",n.style.flex="1 1 100%",n.style.alignSelf="stretch")}catch(e){}n=n.parentElement||n.getRootNode&&n.getRootNode().host||null}},S=(e,n)=>{try{t?.setVariable?.(e,n)}catch(e){}},C=({label:t,description:n,htmlField:o,submitText:a="Save",errorText:i="Please fix the error above."})=>{const r=e.createElement("div");if(r.className="vf-wide-card",r.innerHTML=`
${n?`

${n}

`:""}${o}
`,!e.getElementById("vf-anti-zoom-style")){const t=e.createElement("style");t.id="vf-anti-zoom-style",t.textContent="@media(max-width:1024px){.vf-anti-zoom input,.vf-anti-zoom textarea,.vf-anti-zoom select{font-size:16px!important;-webkit-text-size-adjust:100%}}",e.head.appendChild(t)}return r},_={name:"ext_location_picker",type:"response",match:({trace:e})=>"ext_location_picker"===e?.type||"ext_location_picker"===e?.payload?.name,render:({element:i})=>{o.hide(),n.enable();const r=C({label:"Where do you need the work done?",description:"Please enter your street number, name and suburb below then select from the list.",submitText:"Confirm Location",errorText:"Please select a location before continuing.",htmlField:'
Type at least 3 characters to see suggestions
Selected Location:
Getting your location...
'});i.appendChild(r),L(i,r),a.hideFor(r);const s=r.querySelector(".vf-location-input"),l=r.querySelector(".vf-input-icon"),d=r.querySelector(".vf-dropdown-container"),c=r.querySelector(".vf-input-helper"),p=r.querySelector(".vf-selected-location"),f=r.querySelector(".vf-selected-address"),v=r.querySelector(".vf-location-loading"),h=r.querySelector(".vf-error"),u=r.querySelector(".vf-submit"),m=r.querySelector(".vf-autocomplete-wrapper"),g=r.querySelector("label"),x=r.querySelector(".vf-desc"),b=e.createElement("div");b.className="vf-location-fallback",b.innerHTML='Issues providing your location? Click here...',u.insertAdjacentElement("afterend",b);const y=b.querySelector("a");let w=null,_=null,z=null,E=null,M=[];function T(){v.style.display="none"}function j(e){h.textContent=e,h.style.display="block",T()}function q(){h.style.display="none"}function A(e){const t=["sublocality_level_1","locality","administrative_area_level_3"];for(const n of t){const t=e.find(e=>e.types.includes(n));if(t)return t.long_name}return""}function B(t){if(d.innerHTML="",!t||0===t.length)return void d.classList.remove("show");const n=t.slice(0,2);M=n,n.forEach((t,o)=>{const a=e.createElement("div");a.className="vf-prediction-item",a.style.cssText="padding:16px;cursor:pointer;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;gap:12px;-webkit-tap-highlight-color:transparent;transition:background 0.15s ease";const i=e.createElement("div");i.style.cssText="width:20px;height:20px;flex-shrink:0;color:#6b7280",i.innerHTML="\ud83d\udccd",a.appendChild(i);const r=e.createElement("div");r.style.cssText="flex:1;min-width:0";const h=e.createElement("div");h.style.cssText="font-weight:600;color:#111827;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis",h.textContent=t.structured_formatting.main_text;const g=e.createElement("div");g.style.cssText="color:#6b7280;font-size:13px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis",g.textContent=t.structured_formatting.secondary_text,r.appendChild(h),r.appendChild(g),a.appendChild(r),o===n.length-1&&(a.style.borderBottom="none"),a.addEventListener("mouseenter",()=>{a.style.background="#eff6ff"}),a.addEventListener("mouseleave",()=>{a.style.background="white"}),a.addEventListener("click",()=>{!function(t){z&&(v.querySelector("span").textContent="Getting location details...",v.style.display="flex",d.classList.remove("show"),z.getDetails({placeId:t.place_id,fields:["address_components","formatted_address","geometry","name"],sessionToken:E},(t,n)=>{if(T(),n===google.maps.places.PlacesServiceStatus.OK&&t){const n={formattedAddress:t.formatted_address,suburb:A(t.address_components||[]),lat:t.geometry.location.lat(),lng:t.geometry.location.lng()};s.value=t.formatted_address,function(t){w=t,f.textContent=t.formattedAddress,p.classList.add("show"),c.classList.remove("show"),d.classList.remove("show"),u.disabled=!1,u.style.background="#0551fb",u.style.cursor="pointer",q(),T(),window.innerWidth<=768&&(s.style.display="none",l&&(l.style.display="none"),m.style.marginBottom="0"),requestAnimationFrame(()=>{requestAnimationFrame(()=>{try{const t=e=>e.parentElement||e.getRootNode&&e.getRootNode().host||null,n=e=>{try{const t=getComputedStyle(e);return/(auto|scroll)/.test(t.overflowY)&&e.scrollHeight>e.clientHeight+4}catch(e){return!1}};let o=t(u);for(let a=0;a<30&&o&&o!==e.documentElement&&o!==e.body;a++){try{!n(o)&&o.scrollTop&&(o.scrollTop=0)}catch(e){}o=t(o)}let a=null,i=u;for(let e=0;e<30&&i;e++){if(i.classList&&i.classList.contains("vfrc-chat--dialog")){a=i;break}i=t(i)}if(!a||!n(a)){let o=t(u);for(let i=0;i<30&&o&&o!==e.documentElement&&o!==e.body;i++){if(n(o)){a=o;break}o=t(o)}}if(!a||!n(a))return;const r=a.getBoundingClientRect(),s=u.getBoundingClientRect().bottom-r.bottom+24;s>0&&a.scrollTo({top:a.scrollTop+s,behavior:"smooth"})}catch(e){}})})}(n),E=new google.maps.places.AutocompleteSessionToken}else j("Could not get location details. Please try another address.")}))}(t)}),a.addEventListener("touchstart",()=>{a.style.background="#dbeafe"},{passive:!0}),a.addEventListener("touchend",()=>{a.style.background="#eff6ff"},{passive:!0}),d.appendChild(a)}),d.classList.add("show")}return u.disabled=!0,u.style.background="#9ca3af",u.style.cursor="not-allowed",y.addEventListener("click",e=>{e.preventDefault(),t.interact({type:"captured",payload:{locationFallback:!0}}),n.blurActive(),o.show(),n.disable()}),u.onclick=()=>{w?(q(),k.celebrate(u),setTimeout(()=>{g&&(g.style.display="none"),x&&(x.style.display="none"),m&&(m.style.display="none"),v&&(v.style.display="none"),h&&(h.style.display="none"),u&&(u.style.display="none"),b&&(b.style.display="none"),c&&(c.style.display="none")},1e3),S("formattedAddress",w.formattedAddress),S("suburb",w.suburb),S("googleLat",w.lat.toString()),S("googleLong",w.lng.toString()),n.blurActive(),o.show(),n.disable(),t.interact({type:"captured",payload:{formattedAddress:w.formattedAddress,suburb:w.suburb,latitude:w.lat,longitude:w.lng,locationConfirmed:!0}})):j("Please select a location before continuing.")},async function(){try{await new Promise((t,n)=>{if(window.google&&window.google.maps)return void t();const o=e.createElement("script");o.src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC51PJx9faiS3ptAxYuMfkYKKtTU00Tz-Q&libraries=places",o.onload=()=>t(),o.onerror=()=>n(new Error("Failed to load Google Maps")),e.head.appendChild(o)}),_=new google.maps.places.AutocompleteService;const t=e.createElement("div");t.style.display="none",e.body.appendChild(t),z=new google.maps.places.PlacesService(t),E=new google.maps.places.AutocompleteSessionToken,function(){let t;s.addEventListener("input",()=>{const e=s.value.trim();return clearTimeout(t),e.length>0&&e.length<3?(c.textContent=`Type ${3-e.length} more character${3-e.length==1?"":"s"}`,c.classList.add("show"),void d.classList.remove("show")):0===e.length?(c.classList.remove("show"),void d.classList.remove("show")):(c.textContent="Select an address from the suggestions below",c.classList.add("show"),void(t=setTimeout(()=>{var t;e.length>=3&&(t=e,_&&_.getPlacePredictions({input:t,componentRestrictions:{country:"za"},types:["address"],sessionToken:E},(e,t)=>{t===google.maps.places.PlacesServiceStatus.OK&&e?B(e):t===google.maps.places.PlacesServiceStatus.ZERO_RESULTS?(d.innerHTML='
No addresses found. Try a different search.
',d.classList.add("show")):d.classList.remove("show")}))},300)))}),s.addEventListener("keydown",e=>{" "!==e.key&&32!==e.keyCode||e.stopPropagation()}),e.addEventListener("click",e=>{m.contains(e.target)||d.classList.remove("show")})}()}catch(e){j("Failed to load location services. Please refresh and try again.")}}(),()=>{o.show(),n.disable()}}},z={name:"calendar-picker",type:"response",match:({trace:e})=>"calendar"===e?.type||"calendar-picker"===e?.payload?.name,render:({element:i})=>{o.hide(),n.enable();const r=C({label:"When would you like the work to be done?",description:"",submitText:"Confirm date",errorText:"Please pick a date before confirming.",htmlField:'\n
\n
\n
Pick a date, then confirm to continue.
\n
'});i.appendChild(r),L(i,r),a.hideFor(r);const s=r.querySelector(".vf-calendar"),l=r.querySelector(".vf-error"),d=r.querySelector(".vf-submit"),c=r.querySelector(".vf-help"),p=r.querySelector("label");p&&(p.style.fontSize="18px",p.style.lineHeight="1.35",p.style.marginBottom="14px"),d.disabled=!0;const f=e.createElement("div");f.className="vf-picked",f.innerHTML='Selected date',d.insertAdjacentElement("beforebegin",f);const v=f.querySelector(".vf-picked-val"),h=new Date,u=new Date(h.getFullYear(),h.getMonth(),h.getDate()),m=new Date(u.getFullYear()+1,11,31);let g=null;return flatpickr(s,{inline:!0,appendTo:s,monthSelectorType:"static",minDate:u,maxDate:m,showMonths:1,disableMobile:!0,dateFormat:"Y-m-d",defaultDate:null,onChange:(e,t)=>{g=t,t&&(d.disabled=!1,l.style.display="none",c&&(c.style.display="none"),f.classList.add("show"),v.textContent=(e=>{try{const[t,n,o]=e.split("-").map(Number);return new Date(t,n-1,o).toLocaleDateString("en-GB",{weekday:"long",day:"numeric",month:"long",year:"numeric"})}catch{return e}})(t))}}),d.onclick=()=>{g?(l.style.display="none",k.celebrate(d),["label",".vf-desc",".vf-cal-wrap"].forEach(e=>{const t=r.querySelector(e);t&&(t.style.display="none")}),f.classList.add("show"),S("date",g),n.blurActive(),o.show(),n.disable(),t.interact({type:"captured",payload:{date:g,urgent:!1}})):l.style.display="block"},()=>{o.show(),n.disable()}}},E={name:"ext_Intent",type:"response",match:({trace:e})=>"ext_Intent"===e?.type||"ext_Intent"===e?.payload?.name,render:({element:i})=>{o.hide(),n.enable();const r=e.createElement("div");r.className="vf-wide-card",r.innerHTML='\n
\n \n\n
\n
\n
\n
You selected
\n
\n
\n
\n
\n\n
How can I help you today?
\n\n
\n
\n \n Get a plumber\n \n
\n\n
\n \n Get an electrician\n \n
\n\n
\n Jess\n \n Get guidance\n Ask Jess anything about improving, maintaining and protecting your home\n \n \n
\n
\n\n
We currently only support plumbing and electrical services in Gauteng and Cape Town areas. We\'ll be expanding soon \ud83d\ude80.
\n
\n ',i.appendChild(r),L(i,r),a.hideFor(r);const s=r.querySelectorAll(".vf-intent-card"),l=r.querySelector(".vf-intent-head"),d=r.querySelector(".vf-intent-options"),c=r.querySelector(".vf-intent-disclaimer"),p=r.querySelector(".vf-intent-selected"),f=r.querySelector(".vf-intent-selected-lead"),v=r.querySelector(".vf-intent-selected-value"),h=r.querySelector(".vf-form-card");return s.forEach(e=>{e.onclick=()=>{const a=e.getAttribute("data-intent"),i=e.getAttribute("data-label"),r=e.querySelector(".vf-intent-lead");s.forEach(e=>{e.style.pointerEvents="none",e.style.opacity="0.4"}),e.classList.add("selected"),e.style.opacity="1",S("mainIntent",a),setTimeout(()=>{l.style.opacity="0",d.style.opacity="0",c.style.opacity="0",setTimeout(()=>{l.style.display="none",d.style.display="none",c.style.display="none",f.innerHTML="",r&&f.appendChild(r.cloneNode(!0)),v.textContent=i,p.style.display="flex",h.style.padding="12px",requestAnimationFrame(()=>{p.style.opacity="0",p.style.transform="translateY(-10px)",requestAnimationFrame(()=>{p.style.transition="all 0.3s ease",p.style.opacity="1",p.style.transform="translateY(0)"})})},300)},400),n.blurActive(),o.show(),n.disable(),t.interact({type:"captured",payload:{mainIntent:a}})}}),()=>{o.show(),n.disable()}}},M={name:"ext_handover",type:"response",match:({trace:e})=>"ext_handover"===e?.type||"ext_handover"===e?.payload?.name,render:({trace:i,element:r})=>{o.hide(),n.enable();const s=(()=>{try{return"string"==typeof i?.payload?JSON.parse(i.payload):i?.payload||{}}catch(e){return{}}})();let l=s.user_id||s.userId||"",d=s.service||"",c=s.location||"",p=s.vf_transcript_id||s.transcriptId||"";try{!l&&t?.getVariable&&(l=t.getVariable("user_id")||""),!p&&t?.getVariable&&(p=t.getVariable("vf_transcript_id")||"")}catch(e){}try{"function"==typeof gtag&>ag("event","handover_to_pwa",{event_category:"funnel",event_label:"Handover card shown",user_id:l||"unknown",transcript_id:p||"unknown"})}catch(e){}const f=(()=>{let u2=`https://marketplace.kandua.com/?conversation=${encodeURIComponent(l)}&redirect=book&service=${encodeURIComponent(d)}&location=${encodeURIComponent(c)}`;try{let a2=null;try{a2=sessionStorage.getItem("kandua_attr")}catch(e2){}if(!a2){const m2=e.cookie.match(/(?:^|; )kandua_attr=([^;]*)/);m2&&(a2=decodeURIComponent(m2[1]))}if(a2){const o2=JSON.parse(a2);for(const k2 in o2)u2+="&"+encodeURIComponent(k2)+"="+encodeURIComponent(o2[k2])}}catch(e2){}return u2})(),v=e.createElement("div");v.className="vf-wide-card",v.innerHTML=`\n
\n \n\n
\n
\n
\n
We've found top-rated pros near you
\n
\n
\n
\n\n
\n\n
One last step to complete your booking
\n
Sign in or create your account to complete your booking and manage it all in one place.
\n\n \n\n \n Complete booking\n \n \n\n
Takes a minute \u2014 we'll just need your name, number and any extra details or photos.
\n\n
\n \u2705 Your booking has moved to the secure portal. Please complete it there \u2014 this conversation is now closed.\n
\n
\n `,r.appendChild(v),L(r,v),a.hideFor(v);const h=v.querySelector(".vf-handover-btn"),u=v.querySelector(".vf-handover-locked"),m=v.querySelector(".vf-ho-track"),g=v.querySelector(".vf-ho-dots");let x=null,b=null;const y=()=>{x&&(clearInterval(x),x=null)};if(m&&g){const t=m.querySelectorAll(".vf-ho-slide").length;let n=0,o=null;const a={on:!1,x0:0,sl0:0};for(let n=0;n()=>{s(e),d()})(n)),g.appendChild(t)}const i=g.querySelectorAll(".vf-ho-dot"),r=e=>{for(let t=0;t{n=e,m.scrollTo({left:e*m.clientWidth,behavior:"smooth"}),r(e)},l=()=>{y(),x=setInterval(()=>s((n+1)%t),3500)},d=()=>{y(),clearTimeout(b),b=setTimeout(l,6e3)};m.addEventListener("scroll",()=>{o||(o=requestAnimationFrame(()=>{o=null;const e=Math.round(m.scrollLeft/m.clientWidth);e!==n&&(n=e,r(e))}))},{passive:!0}),m.addEventListener("mouseenter",()=>{a.on||y()}),m.addEventListener("mouseleave",()=>{a.on||l()}),m.addEventListener("pointerdown",e=>{if("touch"!==e.pointerType){a.on=!0,a.x0=e.clientX,a.sl0=m.scrollLeft,m.classList.add("drag"),m.style.scrollSnapType="none",y();try{m.setPointerCapture(e.pointerId)}catch(e){}}}),m.addEventListener("pointermove",e=>{a.on&&(m.scrollLeft=a.sl0-(e.clientX-a.x0))});const c=e=>{if(!a.on)return;a.on=!1,m.classList.remove("drag");const n=Math.max(0,Math.min(t-1,Math.round(m.scrollLeft/m.clientWidth)));m.style.scrollSnapType="x mandatory",s(n),d();try{m.releasePointerCapture(e.pointerId)}catch(e){}};m.addEventListener("pointerup",c),m.addEventListener("pointercancel",c),l()}h.addEventListener("click",()=>{try{"function"==typeof gtag&>ag("event","handover_click",{event_category:"funnel",event_label:"User clicked through to booking portal",user_id:l||"unknown",transcript_id:p||"unknown"})}catch(e){}(()=>{try{y(),o.hide(),n.disable(),n.blurActive(),u.classList.add("show");let e=0;const t=setInterval(()=>{o.hide(),e++,e>20&&clearInterval(t)},500)}catch(e){}})()}),o.hide(),requestAnimationFrame(()=>{try{o.hide()}catch(e){}}),setTimeout(()=>{try{o.hide()}catch(e){}},50);const w=setInterval(()=>{try{o.hide()}catch(e){}},500);return()=>{try{y(),clearTimeout(b),clearInterval(w)}catch(e){}o.hide(),n.disable()}}},T={name:"ext_welcome",type:"response",match:({trace:e})=>"ext_welcome"===e?.type||"ext_welcome"===e?.payload?.name,render:({element:i})=>{o.hide(),n.enable();const r=e.createElement("div");return r.className="vf-wide-card",r.innerHTML='\n
\n \n\n
\n \n Trusted by 85,000+ households\n
\n\n
Here\'s how I\'ll help you
\n
Three quick steps \u2014 about two minutes.
\n\n
\n
1
\n
\n
Tell me what\'s wrong
\n
I\'ll ask a few quick questions to diagnose the problem, so we match you with the perfect Pro.
\n
\n
\n\n
\n
2
\n
\n
Where and when
\n
Share your location and the day you\'d like the work done.
\n
\n
\n\n
\n
3
\n
\n
Complete your booking
\n
Create your account to complete the booking, then track and manage the whole job securely \u2014 from booking to paid.
\n
\n
\n\n
\n Vetted Pros\n Secure\n No obligation\n
\n\n \n
\n ',i.appendChild(r),L(i,r),a.hideFor(r),r.querySelector(".vf-welcome-btn").addEventListener("click",()=>{n.blurActive(),o.show(),n.disable(),t.interact({type:"captured",payload:{started:!0}})}),()=>{o.show(),n.disable()}}};function j({name:t,step:n,title:o,subtitle:i}){return{name:t,type:"response",match:({trace:e})=>e?.type===t||e?.payload?.name===t,render:({element:t})=>{const r=Math.min(100,Math.max(0,25*n)),s=e.createElement("div");s.className="vf-wide-card",s.innerHTML=`
Step ${n} of 4 \u2014 ${o}
0%
1
2
3
4
${i?`
${i}
`:""}
`,t.appendChild(s),L(t,s),a.hideFor(s);const l=s.querySelector(".vf-progress-pct"),d=s.querySelector(".vf-progress-fill");[...s.querySelectorAll(".vf-step-dot")].forEach((e,t)=>{const o=t+1;e.classList.remove("complete","current"),o1-Math.pow(1-e,3))(n));d.style.width=o+"%",l.textContent=o+"%",n<1&&requestAnimationFrame(e)}(c)}}}const q=j({name:"ext_progress_step1",step:1,title:"Problem diagnosis",subtitle:"We are understanding your issue."}),A=j({name:"ext_progress_step2",step:2,title:"Location",subtitle:"Where do you need help?"}); /* ==================== GEYSER HEALTH CHECK — WINTER CAMPAIGN (v2) ==================== */ i(".vfrc-message.vfrc-message--extension-GeyserWelcome,.vfrc-message.vfrc-message--extension-GeyserWelcome .vfrc-message__content,.vfrc-message.vfrc-message--extension-GeyserResults,.vfrc-message.vfrc-message--extension-GeyserResults .vfrc-message__content,.vfrc-message.vfrc-message--extension-ext_geyserWelcome,.vfrc-message.vfrc-message--extension-ext_geyserWelcome .vfrc-message__content,.vfrc-message.vfrc-message--extension-ext_geyserResults,.vfrc-message.vfrc-message--extension-ext_geyserResults .vfrc-message__content{width:100%!important;max-width:100%!important;align-self:stretch!important;padding-left:0!important;padding-right:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important}","data-vf-geyser-fullwidth"); const GTRK=[P("ext_geyserStarted","geyser_started"),P("ext_geyserDiagnosticCompleted","geyser_diagnostic_completed"),P("ext_geyserBookingStart","geyser_booking_start")]; const GW={name:"GeyserWelcome",type:"response",match:({trace:g})=>"ext_geyserWelcome"===g?.type||"ext_geyserWelcome"===g?.payload?.name,render:({element:el})=>{ c.trackEvent("geyser_welcome_viewed",{event_category:"funnel"}); const box=e.createElement("div");box.className="vf-wide-card"; box.innerHTML=`
Winter alert: cold months are peak season for geyser bursts & leaks
Is your geyser ready for winter?
Answer 8 quick questions and Jess will assess your burst risk before the cold does it for you.
Why now

Geysers are South Africa's #1 home insurance claim \u2014 and winter is when most of them fail. The average burst costs R15,000\u2013R50,000+ in damage, and most failures are preventable.

What you'll get
Geyser risk assessment
Takes about 2 minutes
`; el.appendChild(box);L(el,box);a.hideFor(box);o.hide(); box.querySelector(".jgw-btn").addEventListener("click",()=>{ c.trackEvent("geyser_welcome_cta_click",{event_category:"funnel"}); const card=box.querySelector(".jgw-card");card&&card.classList.add("jgw-exit"); setTimeout(()=>{box.style.overflow="hidden";box.style.maxHeight=box.scrollHeight+"px";box.offsetHeight;box.style.transition="max-height .35s ease,opacity .35s ease";box.style.maxHeight="0";box.style.opacity="0"},350); setTimeout(()=>{try{box.remove()}catch(err){}o.show();t.interact({type:"start_diagnostic",payload:{}})},700); }); return()=>{o.hide()}; }}; const GR={name:"GeyserResults",type:"response",match:({trace:g})=>"ext_geyserResults"===g?.type||"ext_geyserResults"===g?.payload?.name,render:({trace:g,element:el})=>{ const pl=d(g),zone=pl.zone||"caution",findings=pl.findings||""; const zones={ danger:{accent:"linear-gradient(90deg,#E24B4A,#D85A30)",color:"#E24B4A",chipBg:"#FCEBEB",chipText:"#791F1F",icon:'',headline:"Your geyser is at high risk this winter",subtext:"Based on your answers, a few things seriously concern me \u2014 and winter is exactly when geysers like yours fail:",nudge:"Don't wait this one out. A burst now means weeks of disruption and R15,000\u2013R50,000+ in damage. Get a vetted pro out this week.",cta:"Book a geyser inspection",pulse:!0,segments:4}, caution:{accent:"linear-gradient(90deg,#EF9F27,#BA7517)",color:"#EF9F27",chipBg:"#FAEEDA",chipText:"#633806",icon:'',headline:"Your geyser needs attention before winter peaks",subtext:"Nothing has failed yet, but these warning signs tend to turn into bursts once the cold sets in:",nudge:"A service now costs a fraction of a burst later \u2014 and mid-winter is when plumbers get booked out. Beat the rush.",cta:"Book a geyser check-up",pulse:!1,segments:3}, safe:{accent:"linear-gradient(90deg,#97C459,#639922)",color:"#639922",chipBg:"#EAF3DE",chipText:"#27500A",icon:'',headline:"Your geyser's in good shape \u2014 let's keep it that way",subtext:"Based on your answers, here's what's working in your favour going into winter:",nudge:"An annual service can double a geyser's lifespan and keeps you covered when it matters. A pre-winter once-over locks in that peace of mind.",cta:"Book a preventative service",pulse:!1,segments:1} }; const z2=zones[zone]||zones.caution,list=findings.split(",").map(f2=>f2.trim()).filter(Boolean); c.trackEvent("geyser_results_viewed",{event_category:"funnel",zone:zone,findings_count:list.length}); let segs="";for(let s2=0;s2<5;s2++)segs+=`
`; let chips="";list.forEach((f2,i2)=>{chips+=`${f2}`}); const box=e.createElement("div");box.className="vf-wide-card"; box.innerHTML=`
${z2.icon}
${z2.headline}
${segs}
${z2.subtext}
${chips}
${z2.nudge}
All Kandua Pros are vetted and rated 4.5\u2605 or higher
`; el.appendChild(box);L(el,box);a.hideFor(box);o.hide(); box.querySelectorAll(".jgr-btn").forEach(btn=>{btn.addEventListener("click",()=>{ c.trackEvent("geyser_book_pro_click",{event_category:"funnel",zone:zone}); o.show();t.interact({type:btn.getAttribute("data-action"),payload:{}}); })}); return()=>{o.hide()}; }}; /* ==================== END GEYSER HEALTH CHECK ==================== */ t=window.voiceflow.chat,t.load({verify:{projectID:"6a1d7b09a2bdb2f81d8077cd"},url:"https://general-runtime.sanlamstudios.voiceflow.com",versionID:"production",launch:{event:{type:"launch",payload:{event:"santamgeyser"}}},assistant:{persistence:"memory",extensions:[y,w,q,A,_,z,E,M,T,GW,GR,...TRK,...GTRK]}}).then(()=>{t.open(),e.querySelectorAll(".launch_jess").forEach(e=>e.addEventListener("click",()=>t.open()))})},e.body.appendChild(o)}()}(document);