1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[110],{121:(e,t,a)=>{a.d(t,{Ay:()=>o,Ox:()=>i,iC:()=>r,w9:()=>s});var n=a(7876),l=a(3529);let s="button";var i=function(e){return e.Primary="primary",e.Secondary="secondary",e.White="white",e.NoBackground="no-background",e.Preview="preview",e}({});let r=e=>{switch(e){case"secondary":return{button:"inline-block bg-sc-5 hover:bg-sc-4 group-hover/button:bg-sc-4 text-pc-5 font-bold px-bt-spacing-20 py-bt-spacing-16 rounded-bt-radius-8",arrow:"inline-flex items-center gap-bt-spacing-16 px-bt-spacing-48",stroke:"stroke-pc-5"};case"white":return{button:"inline-block bg-white hover:bg-sc-4 group-hover/button:bg-sc-4 text-pc-5 font-bold px-bt-spacing-20 py-bt-spacing-16 rounded-bt-radius-8",arrow:"inline-flex items-center gap-bt-spacing-16 px-bt-spacing-48",stroke:"stroke-pc-5"};case"no-background":return{button:"inline-block text-pc-5 font-bold hover:text-pc-4 group-hover/button:text-pc-4 underline",arrow:"inline-flex items-center gap-bt-spacing-16 px-bt-spacing-48",stroke:"stroke-pc-5"};case"preview":return{button:"inline-block bg-bc-4 font-bold text-black px-bt-spacing-20 py-bt-spacing-16 rounded-bt-radius-8",arrow:"inline-flex items-center gap-bt-spacing-16 px-bt-spacing-48",stroke:"stroke-black"};default:return{button:"inline-block bg-pc-5 hover:bg-pc-4 group-hover/button:bg-pc-4 text-white font-bold px-bt-spacing-20 py-bt-spacing-16 rounded-bt-radius-8",arrow:"inline-flex items-center gap-bt-spacing-16 px-bt-spacing-48",stroke:"stroke-white"}}},o=e=>{let{id:t,text:a,link:s,theme:i,arrow:o,type:c,className:d,onBlur:m,onClick:u,onFocus:h,onMouseEnter:p,onMouseLeave:g}=e,b=r(i);return s?(0,n.jsxs)(l.A,{className:"".concat(b.button," ").concat(o?b.arrow:"").concat(d?" ".concat(d):""),...s,...u&&{onClick:u},children:[(0,n.jsx)("span",{children:a||s.name}),o&&(0,n.jsx)("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{className:b.stroke,d:"M1 11L6 6.18519L1 1",strokeWidth:"2"})})]}):(0,n.jsxs)("button",{...t?{id:t}:{},className:"".concat(b.button," ").concat(o?b.arrow:"").concat(d?" ".concat(d):""),onClick:u,onMouseEnter:p,onMouseLeave:g,onFocus:h,onBlur:m,...c?{type:c}:{},children:[(0,n.jsx)("span",{children:a}),o&&(0,n.jsx)("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{className:b.stroke,d:"M1 11L6 6.18519L1 1",strokeWidth:"2"})})]})}},420:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>d,default:()=>u,formatDataAttribute:()=>m});var n=a(7876),l=a(4499),s=a(4232),i=a(1423),r=a(6733),o=a(5105),c=a.n(o);let d="widget-works-block";function m(e){if(e.length<=0)return!1;let t=e.trim().toLowerCase().replace(/[^0-9a-z-\s]/ug,"").replace(/\s+/ug,"-").replace(/^-+|-+$/ug,"");return 0!==t.length&&"data-ww-".concat(t)}let u=e=>{let{widgetWorksId:t,blockLayout:a,widgetWorksData:o,blockVisibility:d}=e,{layout:u}=a,h=(0,l.rt)(a),[p,g]=(0,s.useState)((0,i.A)());(0,s.useEffect)(()=>{g((0,i.A)())},[t,o]);let b={};null==o||o.forEach(e=>{let t=m(e.key);t&&(b[t]=e.value)});let x=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c(),{src:"https://calcs.widgetworks.com.au/s/".concat(t,"/live.js?key=").concat(p),strategy:"afterInteractive"},"wiwo-live-".concat(p)),(0,n.jsx)("iframe",{id:"wiwo-".concat(t),src:"about:blank",width:"100%",height:"200","data-wiwo-init":"false",...b},"wiwo-iframe-".concat(p)),(0,n.jsx)(c(),{src:"https://calcs.widgetworks.com.au/widget/widget-scout.min.js?key=".concat(p),strategy:"afterInteractive"},"wiwo-scout-".concat(p))]});return"Full"===u?(0,n.jsx)(r.A,{...d,children:(0,n.jsx)("div",{className:"".concat(h," min-h-[380px]"),children:x})}):(0,n.jsx)(r.A,{...d,children:(0,n.jsx)("div",{className:h,children:(0,n.jsx)("div",{className:"container min-h-[380px]".concat("Narrow"===u?" lg:max-w-[956px]":""),children:x})})})}},422:(e,t,a)=>{a.d(t,{A:()=>ev});var n=a(7876),l=a(6597),s=a(9223),i=a(3109),r=a(3955),o=a(7566),c=a(1375),d=a(7165),m=a(6218),u=a(3251),h=a(9027),p=a(7981),g=a(7680),b=a(4140),x=a(1170),f=a(1387),v=a(7687),j=a(6048),w=a(5724),y=a(8630),N=a(9042),A=a(7137),k=a(6286),P=a(527),C=a(6027),L=a(5937),T=a(4224),B=a(4647),S=a(8820),R=a(6955),F=a(7393),I=a(4041),M=a(1351),E=a(420),D=a(8847),_=a.n(D);let q=_()(()=>Promise.resolve().then(a.bind(a,6597)),{loadableGenerated:{webpack:()=>[6597]}}),U=_()(()=>Promise.resolve().then(a.bind(a,9223)),{loadableGenerated:{webpack:()=>[9223]}}),O=_()(()=>Promise.resolve().then(a.bind(a,3109)),{loadableGenerated:{webpack:()=>[3109]}}),G=_()(()=>Promise.resolve().then(a.bind(a,3955)),{loadableGenerated:{webpack:()=>[3955]}}),V=_()(()=>Promise.resolve().then(a.bind(a,7566)),{loadableGenerated:{webpack:()=>[7566]}}),z=_()(()=>Promise.resolve().then(a.bind(a,1375)),{loadableGenerated:{webpack:()=>[1375]}}),W=_()(()=>Promise.resolve().then(a.bind(a,7165)),{loadableGenerated:{webpack:()=>[7165]}}),Y=_()(()=>Promise.resolve().then(a.bind(a,6218)),{loadableGenerated:{webpack:()=>[6218]}}),X=_()(()=>Promise.resolve().then(a.bind(a,9027)),{loadableGenerated:{webpack:()=>[9027]}}),K=_()(()=>Promise.resolve().then(a.bind(a,3251)),{loadableGenerated:{webpack:()=>[3251]}}),H=_()(()=>Promise.resolve().then(a.bind(a,7981)),{loadableGenerated:{webpack:()=>[7981]}}),Z=_()(()=>Promise.resolve().then(a.bind(a,7680)),{loadableGenerated:{webpack:()=>[7680]}}),$=_()(()=>Promise.resolve().then(a.bind(a,4140)),{loadableGenerated:{webpack:()=>[4140]}}),J=_()(()=>Promise.resolve().then(a.bind(a,1170)),{loadableGenerated:{webpack:()=>[1170]}}),Q=_()(()=>Promise.resolve().then(a.bind(a,1387)),{loadableGenerated:{webpack:()=>[1387]}}),ee=_()(()=>Promise.resolve().then(a.bind(a,7687)),{loadableGenerated:{webpack:()=>[7687]}}),et=_()(()=>Promise.resolve().then(a.bind(a,6048)),{loadableGenerated:{webpack:()=>[6048]}}),ea=_()(()=>Promise.resolve().then(a.bind(a,8630)),{loadableGenerated:{webpack:()=>[8630]}}),en=_()(()=>Promise.resolve().then(a.bind(a,5724)),{loadableGenerated:{webpack:()=>[5724]}}),el=_()(()=>Promise.resolve().then(a.bind(a,9042)),{loadableGenerated:{webpack:()=>[9042]}}),es=_()(()=>Promise.resolve().then(a.bind(a,7137)),{loadableGenerated:{webpack:()=>[7137]}}),ei=_()(()=>Promise.resolve().then(a.bind(a,6286)),{loadableGenerated:{webpack:()=>[6286]}}),er=_()(()=>Promise.resolve().then(a.bind(a,527)),{loadableGenerated:{webpack:()=>[527]}}),eo=_()(()=>Promise.resolve().then(a.bind(a,6027)),{loadableGenerated:{webpack:()=>[6027]}}),ec=_()(()=>Promise.resolve().then(a.bind(a,5937)),{loadableGenerated:{webpack:()=>[5937]}}),ed=_()(()=>Promise.resolve().then(a.bind(a,4647)),{loadableGenerated:{webpack:()=>[4647]}}),em=_()(()=>Promise.resolve().then(a.bind(a,4224)),{loadableGenerated:{webpack:()=>[4224]}}),eu=_()(()=>Promise.resolve().then(a.bind(a,8820)),{loadableGenerated:{webpack:()=>[8820]}}),eh=_()(()=>Promise.resolve().then(a.bind(a,6955)),{loadableGenerated:{webpack:()=>[6955]}}),ep=_()(()=>Promise.resolve().then(a.bind(a,7393)),{loadableGenerated:{webpack:()=>[7393]}}),eg=_()(()=>Promise.resolve().then(a.bind(a,4041)),{loadableGenerated:{webpack:()=>[4041]}}),eb=_()(()=>Promise.resolve().then(a.bind(a,1351)),{loadableGenerated:{webpack:()=>[1351]}}),ex=_()(()=>a.e(771).then(a.bind(a,1771)),{loadableGenerated:{webpack:()=>[1771]}}),ef=_()(()=>Promise.resolve().then(a.bind(a,420)),{loadableGenerated:{webpack:()=>[420]}}),ev=e=>{let{componentAlias:t}=e;return t===l.componentAlias?(0,n.jsx)(q,{...e}):t===s.componentAlias?(0,n.jsx)(U,{...e}):t===i.componentAlias?(0,n.jsx)(O,{...e}):t===r.componentAlias?(0,n.jsx)(G,{...e}):t===o.componentAlias?(0,n.jsx)(V,{...e}):t===c.componentAlias?(0,n.jsx)(z,{...e}):t===d.componentAlias?(0,n.jsx)(W,{...e}):t===m.componentAlias?(0,n.jsx)(Y,{...e}):t===h.componentAlias?(0,n.jsx)(X,{...e}):t===u.componentAlias?(0,n.jsx)(K,{...e}):t===p.componentAlias?(0,n.jsx)(H,{...e}):t===g.componentAlias?(0,n.jsx)(Z,{...e}):t===b.componentAlias?(0,n.jsx)($,{...e}):t===x.componentAlias?(0,n.jsx)(J,{...e}):t===f.componentAlias?(0,n.jsx)(Q,{...e}):t===v.componentAlias?(0,n.jsx)(ee,{...e}):t===j.componentAlias?(0,n.jsx)(et,{...e}):t===y.componentAlias?(0,n.jsx)(ea,{...e}):t===w.componentAlias?(0,n.jsx)(en,{...e}):t===N.componentAlias?(0,n.jsx)(el,{...e}):t===A.componentAlias?(0,n.jsx)(es,{...e}):t===k.componentAlias?(0,n.jsx)(ei,{...e}):t===P.componentAlias?(0,n.jsx)(er,{...e}):t===C.componentAlias?(0,n.jsx)(eo,{...e}):t===L.componentAlias?(0,n.jsx)(ec,{...e}):t===B.componentAlias?(0,n.jsx)(ed,{...e}):t===T.componentAlias?(0,n.jsx)(em,{...e}):t===S.componentAlias?(0,n.jsx)(eu,{...e}):t===R.componentAlias?(0,n.jsx)(eh,{...e}):t===F.componentAlias?(0,n.jsx)(ep,{...e}):t===I.componentAlias?(0,n.jsx)(eg,{...e}
1):t===M.componentAlias?(0,n.jsx)(eb,{...e}):t===E.componentAlias?(0,n.jsx)(ef,{...e}):(0,n.jsx)(ex,{...e})}},527:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>s,default:()=>i});var n=a(7876),l=a(7393);let s="policy-document-block";function i(e){let{className:t,content:a,blockVisibility:s}=e;return(0,n.jsx)(l.default,{className:"".concat(t?" ".concat(t):""),componentAlias:l.componentAlias,text:a,blockVisibility:s})}},630:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(7876),l=a(5499);let s=e=>{let{className:t,...a}=e;return(0,n.jsx)("input",{className:"".concat(l.J," ").concat(t),type:"email",...a})}},709:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>l,default:()=>s});var n=a(7876);let l="feature-table-title",s=e=>{let{className:t,title:a}=e;return(0,n.jsx)("div",{className:"my-bt-spacing-16 text-2xl leading-md lg:leading-sm text-pc-5 font-bold ".concat(t?" ".concat(t):""),children:a})}},929:(e,t,a)=>{a.d(t,{A:()=>i});var n=a(7876),l=a(4232),s=a(4402);function i(e){let{enabled:t=!1,children:a}=e,[i,r]=(0,l.useState)(null);return(0,l.useEffect)(()=>{t&&(0,s.x7)().then(r)},[t]),(0,n.jsx)(s.M1.Provider,{value:{logCustomEvent:(e,t)=>{null==i||i.logCustomEvent(e,t)},setUserEmail:e=>{var t;null==i||null==(t=i.getUser())||t.setEmail(e)},setUserPhoneNumber:e=>{var t;null==i||null==(t=i.getUser())||t.setPhoneNumber(e)},setUserLastName:e=>{var t;null==i||null==(t=i.getUser())||t.setLastName(e)},setUserFirstName:e=>{var t;null==i||null==(t=i.getUser())||t.setFirstName(e)},setUserDateOfBirth:(e,t,a)=>{var n;null==i||null==(n=i.getUser())||n.setDateOfBirth(e,t,a)},changeUser:e=>{null==i||i.changeUser(e)},setCustomUserAttribute:(e,t)=>{var a;null==i||null==(a=i.getUser())||a.setCustomUserAttribute(e,t)},requestImmediateDataFlush:e=>{null==i||i.requestImmediateDataFlush(e)}},children:a})}},942:(e,t,a)=>{a.d(t,{A:()=>c});var n=a(7876),l=a(7328),s=a.n(l),i=a(9099);let r=e=>{let{schema:t}=e;return(0,n.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:null!=t?t:""}})};var o=a(5364);let c=e=>{let{metaTitle:t,metaDescription:a,canonicalUrl:l,noIndex:c,noFollow:d,disallowRobots:m,schemaScriptTags:u}=e,h=(0,i.useRouter)(),p="".concat("https://www.afs.com.au").concat(h.asPath),g="",b=[];
1c&&b.push("noindex"),d&&b.push("nofollow"),m&&b.push("noarchive"),b.length>0&&(g=b.join(", "));let x=null==u?void 0:u.map((e,t)=>(0,n.jsx)(r,{...e},t));return(0,n.jsxs)(s(),{children:[(0,n.jsx)("title",{children:"".concat(o.env.NEXT_PUBLIC_TITLE_PREFIX?"".concat(o.env.NEXT_PUBLIC_TITLE_PREFIX," - "):"").concat(t||"AFS")}),(0,n.jsx)("meta",{charSet:"utf-8"}),x,(0,n.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),a&&(0,n.jsx)("meta",{name:"description",content:a}),(0,n.jsx)("link",{rel:"canonical",href:null!=l?l:p}),g&&(0,n.jsx)("meta",{name:"robots",content:g})]})}},1170:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>m,default:()=>h,getFeatureCardRowClasses:()=>u});var n=a(7876),l=a(4822),s=a(121),i=a(5839),r=a(3529),o=a(4e3);let c=e=>{let{brandIcon:t,title:a,button:c,className:d,content:m,theme:u,offset:h,hideButton:p}=e,g=(0,o.useRouter)(),b="secondary"===u?{background:"feature-card flex flex-col bg-sc-5 px-bt-spacing-24 pb-bt-spacing-8 rounded-bt-radius-16 shadow-feature-card",title:"text-xl text-pc-5 font-bold leading-md lg:leading-xs mb-bt-spacing-16"}:{background:"feature-card flex flex-col bg-white px-bt-spacing-24 pb-bt-spacing-8 border-3 border-pc-5 rounded-bt-radius-16 shadow-feature-card",title:"text-2xl text-pc-5 font-bold leading-md lg:leading-sm mb-bt-spacing-16"};return(0,n.jsxs)("div",{className:"group/button ".concat(b.background).concat((null==c?void 0:c.link)?" cursor-pointer":"").concat(d?" ".concat(d):""),onClick:()=>{(null==c?void 0:c.link)&&g.push(c.link.url)},children:[t&&(0,n.jsx)(l.A,{...t,className:h?"-mt-bt-spacing-24":"mt-bt-spacing-16"}),(null==c?void 0:c.link)?(0,n.jsx)(r.A,{className:"group-hover/button:underline my-bt-spacing-16 ".concat(b.title),...c.link,children:a}):(0,n.jsx)("div",{className:"my-bt-spacing-16 ".concat(b.title),children:a}),m?(0,n.jsx)(i.Ay,{componentAlias:i.w9,className:"grow",text:m}):"",!p&&c?(0,n.jsx)("div",{children:(0,n.jsx)(s.Ay,{...c,className:"mb-bt-spacing-16"})}):""]})};var d=a(6733);let m="feature-card-row",u=e=>{switch(e){case"2":return{gap:"gap-bt-spacing-30 md:gap-bt-spacing-24",cols:"sm:grid-cols-2"};case"4":return{gap:"gap-bt-spacing-30 md:gap-bt-spacing-24",cols:"sm:grid-cols-2 lg:grid-cols-4"};default:return{gap:"gap-bt-spacing-30 md:gap-bt-spacing-24",cols:"sm:grid-cols-2 lg:grid-cols-3"}}},h=e=>{let{className:t,featureCardItems:a,cols:l="3",blockVisibility:s}=e,i=null==a?void 0:a.map((e,t)=>(0,n.jsx)(c,{...e},t)),r=u(l);return(0,n.jsx)(d.A,{...s,children:(0,n.jsx)("div",{className:"grid ".concat(r.cols," gap-bt-spacing-24 ").concat(t?" ".concat(t):""),children:i})})}},1351:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>o,default:()=>m,themeSecondary:()=>d,themeWhite:()=>c});var n=a(7876),l=a(6733),s=a(5839);let i=e=>{let{text:t,className:a,heading:l}=e;return!0===l?(0,n.jsx)("th",{className:"p-bt-spacing-16".concat(a?" ".concat(a):""),children:t?(0,n.jsx)(s.Ay,{componentAlias:s.w9,text:t}):""}):(0,n.jsx)("td",{className:"p-bt-spacing-16".concat(a?" ".concat(a):""),children:t?(0,n.jsx)(s.Ay,{componentAlias:s.w9,text:t}):""})},r=e=>{let{heading:t,tableCellItems:a,className:l,offsetPattern:s,theme:r}=e,o=null==a?void 0:a.map((e,a)=>(0,n.jsx)(i,{heading:t,...e},a)),m="";r!==c&&r!==d&&(m=!0===s?"even:bg-white odd:bg-sc-5":"even:bg-sc-5 odd:bg-white");let u=!0===t?"bg-pc-5 text-white":"".concat(m," [&:not(:last-child)]:border-b [&:not(:last-child)]:border-gs-1");return(0,n.jsx)("tr",{className:"".concat(u).concat(l?" ".concat(l):""),children:o})},o="table",c="White",d="Secondary",m=e=>{let{tableRowItems:t,className:a,blockVisibility:s,theme:i}=e,o=-1,c="bg-white";i===d&&(c="bg-sc-5");let m=null==t?void 0:t.map((e,t)=>(!0===e.heading&&(o=t),(0,n.jsx)(r,{offsetPattern:(o+1)%2==1&&-1!==o,theme:i,...e},t)));return(0,n.jsx)(l.A,{...s,children:(0,n.jsx)("div",{className:"".concat(c," text-left border border-gs-1 rounded-bt-radius-8 lg:rounded-bt-radius-16 overflow-x-auto ").concat(a?" ".concat(a):""),children:(0,n.jsx)("table",{className:"w-full",children:(0,n.jsx)("tbody",{children:m})})})})}},1375:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>r,default:()=>o});var n=a(7876),l=a(4647);let s=e=>(0,n.jsx)(l.default,{...e});var i=a(6733);let r="broker-quick-lead-form-block",o=e=>{let{className:t,brokerQuickLeadForm:a,title:l,blockVisibility:r}=e;return(0,n.jsx)(i.A,{...r,children:(0,n.jsx)("div",{className:"bg-pc-5 ".concat(t?" ".concat(t):""),children:(0,n.jsx)("div",{className:"container py-bt-spacing-40",children:(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsxs)("div",{className:" bg-white rounded-bt-radius-20 overflow-hidden",children:[l?(0,n.jsx)("h2",{className:"block bg-sc-5 text-gs-5 text-center py-bt-spacing-26",children:l}):"",(0,n.jsx)(s,{...a,className:"py-bt-spacing-26 px-bt-spacing-30"})]})})})})})}},1387:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>g,default:()=>b});var n=a(7876),l=a(6891),s=a(7343),i=a(709),r=a(8847),o=a.n(r);let c=o()(()=>Promise.resolve().then(a.bind(a,6891)),{loadableGenerated:{webpack:()=>[6891]}}),d=o()(()=>Promise.resolve().then(a.bind(a,7343)),{loadableGenerated:{webpack:()=>[7343]}}),m=o()(()=>Promise.resolve().then(a.bind(a,709)),{loadableGenerated:{webpack:()=>[709]}}),u=o()(()=>a.e(771).then(a.bind(a,1771)),{loadableGenerated:{webpack:()=>[1771]}}),h=e=>{let{componentAlias:t}=e;return t===l.componentAlias?(0,n.jsx)(c,{...e}):t===s.componentAlias?(0,n.jsx)(d,{...e}):t===i.componentAlias?(0,n.jsx)(m,{...e}):(0,n.jsx)(u,{...e})};var p=a(6733);let g="feature-table",b=e=>{let{className:t,start:a,end:l,blockVisibility:s}=e,i=null==a?void 0:a.map((e,t)=>(0,n.jsx)(h,{...e},t)),r=null==l?void 0:l.map((e,t)=>(0,n.jsx)(h,{...e},t));return(0,n.jsx)(p.A,{...s,children:(0,n.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-bt-spacing-10 lg:gap-bt-spacing-70".concat(t?" ".concat(t):""),children:[(0,n.jsx)("div",{className:"flex flex-col gap-bt-spacing-10",children:i}),(0,n.jsx)("div",{className:"flex flex-col gap-bt-spacing-10",children:r})]})})}},1719:(e,t,a)=>{a.d(t,{A:()=>v});var n=a(7876),l=a(4232),s=a(4012),i=a(3529);let r=e=>{let{title:t,className:a,links:s}=e,r=null==s?void 0:s.map((e,t)=>(0,l.createElement)(i.A,{...e,key:"".concat(e.name).concat(t),className:"inline-block underline"}));return(0,n.jsxs)("div",{className:"flex flex-col gap-bt-spacing-16".concat(a?" ".concat(a):""),children:[(0,n.jsx)("div",{className:"font-bold",children:t}),r]})};var o=a(5839);let c=e=>{let{link:t,image:a,className:l}=e;return(0,n.jsx)(i.A,{...t,className:"".concat(l?" ".concat(l):""),children:(0,n.jsx)(s.A,{className:"w-bt-spacing-32 h-bt-spacing-32",src:a.src,alt:a.alt,width:a.width,height:a.height})})};var d=a(7678),m=a(3293),u=a(8847),h=a.n(u);let p=h()(()=>Promise.resolve().then(a.bind(a,7678)),{loadableGenerated:{webpack:()=>[7678]}}),g=h()(()=>Promise.resolve().then(a.bind(a,3293)),{loadableGenerated:{webpack:()=>[3293]}}),b=h()(()=>a.e(771).then(a.bind(a,1771)),{loadableGenerated:{webpack:()=>[1771]}}),x=e=>{let{componentAlias:t}=e;return t===d.componentAlias?(0,n.jsx)(p,{...e}):t===m.componentAlias?(0,n.jsx)(g,{...e}):(0,n.jsx)(b,{...e})},f=["p","strong","b","a"],v=e=>{var t,a;let{className:d,logo:m,copyrightText:u,navLists:h,asideText:p,asideSocialItems:g,logoItems:b,bottomText:v}=e,j=null==h?void 0:h.map((e,t)=>(0,l.createElement)(r,{...e,key:t})),w=null==g?void 0:g.map((e,t)=>(0,l.createElement)(c,{...e,key:t})),y=null==b?void 0:b.map((e,t)=>(0,n.jsx)(x,{...e},t));return(0,n.jsxs)("footer",{className:"site-footer bg-pc-5 text-white".concat(d?" ".concat(d):""),children:[(0,n.jsxs)("div",{className:"container py-bt-spacing-96",children:[(0,n.jsxs)("div",{className:"flex flex-col lg:flex-row items-center justify-between gap-bt-spacing-16",children:[(0,n.jsx)("div",{className:"grow",children:m?(0,n.jsx)(i.A,{url:"/",children:(0,n.jsx)(s.A,{className:"w-[13.125rem] h-[3.3125rem]",src:m.src,alt:m.alt,width:null!=(t=m.width)?t:140,height:null!=(a=m.height)?a:72})}):""}),u?(0,n.jsx)("div",{children:u}):"",w?(0,n.jsx)("div",{className:"flex gap-bt-spacing-20 lg:hidden",children:w}):""]}),(0,n.jsx)("hr",{className:"border-sc-6"}),(0,n.jsxs)("div",{className:"flex flex-col justify-between lg:flex-row gap-bt-spacing-40 lg:gap-bt-spacing-26".concat(v?" pb-bt-spacing-32":""),children:[j,(0,n.jsxs)("div",{className:"lg:order-first",children:[p?(0,n.jsx)(o.Ay,{componentAlias:o.w9,text:p,allowedTags:f}):"",w?(0,n.jsx)("div",{className:"hidden lg:flex gap-bt-spacing-20",children:w}):""]})]}),v?(0,n.jsx)(o.Ay,{componentAlias:o.w9,text:v}):null]}),y&&y.length>0?(0,n.jsx)("div",{className:"bg-white",children:(0,n.jsx)("div",{className:"container py-bt-spacing-40",children:(0,n.jsx)("div",{className:"flex flex-wrap align-items-center justify-center gap-bt-spacing-40",children:y})})}):""]})}},2453:(e,t,a)=>{function n(e){let{src:t,width:a}=e,n=new URL(t,"https://www.afs.com.au"),l=new URLSearchParams(n.search);return l.has("width")||l.set("width",a>1080?"1080":a.toString()),n.search=l.toString(),n.toString().replace("https://www.afs.com.au","")}a.r(t),a.d(t,{default:()=>n})},2895:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(7876),l=a(5499);let s=e=>{let{className:t,...a}=e;return(0,n.jsx)("input",{className:"afs-input currency ".concat(l.J," ").concat(t),type:"number",...a})}},3109:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>i,default:()=>r});var n=a(7876),l=a(422),s=a(6733);let i="aside-container",r=e=>{let{className:t,start:a,end:i,inverseMobileOrder:r,first:o,blockVisibility:c}
1=e,d=null==a?void 0:a.map((e,t)=>(0,n.jsx)(l.A,{...e,first:!!o&&0===t},t)),m=null==i?void 0:i.map((e,t)=>(0,n.jsx)(l.A,{...e,first:!!o&&0===t},t));return(0,n.jsx)(s.A,{...c,children:(0,n.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-bt-spacing-40".concat(t?" ".concat(t):""),children:[(0,n.jsx)("div",{className:"flex flex-col justify-center",children:d}),(0,n.jsx)("div",{className:"flex flex-col justify-center".concat(r?" order-first lg:order-none":""),children:m})]})})}},3251:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>i,default:()=>r});var n=a(7876),l=a(9027),s=a(6733);let i="contact-us-form-block",r=e=>{let{className:t,blockVisibility:a}=e;return(0,n.jsx)(s.A,{...a,children:(0,n.jsx)("div",{className:"bg-sc-5 ".concat(t?" ".concat(t):""),children:(0,n.jsx)("div",{className:"container max-w-[956px] py-bt-spacing-30 flex flex-col gap-bt-spacing-30",children:(0,n.jsxs)("div",{className:"bg-white rounded-bt-radius-20 overflow-hidden",children:[(0,n.jsx)("h2",{className:"block bg-pc-5 text-white text-center px-bt-spacing-16 py-bt-spacing-26",children:"Contact Us"}),(0,n.jsx)(l.default,{...e,className:"py-bt-spacing-26 px-bt-spacing-16 lg:px-bt-spacing-30"})]})})})})}},3293:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>i,default:()=>r});var n=a(7876),l=a(5105),s=a.n(l);let i="site-footer-our-trace-item",r=e=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("trace-badge",{className:"flex items-center w-[170px] lg:w-[160xp] h-[56px]","instance-id":"2f3f1d95-0410-44f3-a755-10077af91f83"}),(0,n.jsx)(s(),{src:"https://public.our-trace.com/scripts/trace-badge.js"})]})},3529:(e,t,a)=>{a.d(t,{A:()=>i});var n=a(7876),l=a(8230),s=a.n(l);let i=e=>{let{children:t,className:a,name:l,onBlur:i,onClick:r,onFocus:o,onMouseEnter:c,onMouseLeave:d,rel:m,target:u,url:h}=e;return(0,n.jsx)(s(),{href:h,className:a,target:u,rel:m,onClick:r,onMouseEnter:c,onMouseLeave:d,onFocus:o,onBlur:i,children:t||l})}},3955:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>i,default:()=>r});var n=a(7876);let l=e=>{let{text:t,title:a,className:l}=e;return(0,n.jsx)("li",{className:"px-bt-spacing-0 pb-bt-spacing-24".concat(l?" ".concat(l):""),children:(0,n.jsxs)("span",{children:[(0,n.jsxs)("strong",{children:[a,":"]})," ",t]})})};var s=a(6733);let i="benefit-list",r=e=>{let{benefitItems:t,className:a,blockVisibility:i}=e,r=null==t?void 0:t.map((e,t)=>(0,n.jsx)(l,{...e},t));return(0,n.jsx)(s.A,{...i,children:(0,n.jsx)("div",{className:"benefit-list".concat(a?" ".concat(a):""),children:(0,n.jsx)("ul",{children:r})})})}},4012:(e,t,a)=>{a.d(t,{A:()=>i});var n=a(7876),l=a(4587),s=a.n(l);let i=e=>{let{src:t,alt:a,className:l,width:i,height:r,fill:o,sizes:c,quality:d,priority:m,style:u,loading:h,blurDataURL:p,layout:g,placeholder:b,focalPoint:x}=e;return(0,n.jsx)(s(),{className:l,src:t,alt:a,...void 0!==i&&{width:i},...void 0!==r&&{height:r},...void 0!==o&&{fill:o},...c&&{sizes:c},...d&&{quality:d},...g&&{layout:g},...!0===m&&{priority:!0},...h&&{loading:h},..."blur"===b&&p&&{placeholder:b,blurDataURL:p},style:{...x&&{objectPosition:(e=>{if(!e)return"";let{left:t,top:a}=e;return"".concat(100*t,"% ").concat(100*a,"%")}
1)(x)},...u&&u}})}},4041:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>c,default:()=>d});var n=a(7876),l=a(422);let s=e=>{let{dynamicComponents:t,isActive:a,first:s}=e,i=null==t?void 0:t.map((e,t)=>(0,n.jsx)(l.A,{...e,first:!!s&&0===t},t));return a?(0,n.jsx)("div",{className:"",children:i}):(0,n.jsx)(n.Fragment,{})};var i=a(4232),r=a(6218),o=a(6733);let c="tab-container",d=e=>{let{tabContainerItems:t,className:a,defaultActiveTab:l=0,blockVisibility:c}=e,[d,m]=(0,i.useState)(l),u=null==t?void 0:t.map((e,t)=>e.mobileText?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.default,{className:"hidden lg:block",componentAlias:r.componentAlias,onClick:()=>m(t),text:e.text,active:d===t},"".concat(t,"-d")),(0,n.jsx)(r.default,{className:"lg:hidden",componentAlias:r.componentAlias,onClick:()=>m(t),text:e.mobileText,active:d===t},"".concat(t,"-m"))]}):(0,n.jsx)(r.default,{componentAlias:r.componentAlias,onClick:()=>m(t),text:e.text,active:d===t},"".concat(t,"-d"))),h=null==t?void 0:t.map((e,t)=>(0,n.jsx)(s,{...e,isActive:d===t},t));return(0,n.jsx)(o.A,{...c,children:(0,n.jsxs)("div",{className:"".concat(a?" ".concat(a):""),children:[(0,n.jsx)("div",{className:"flex flex-wrap justify-center gap-bt-spacing-10 lg:gap-bt-spacing-30 mb-bt-spacing-24",children:u}),(0,n.jsx)("div",{className:"flex flex-col gap-bt-spacing-30",children:h})]})})}},4140:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>d,default:()=>u});var n=a(7876),l=a(5105),s=a.n(l),i=a(4232),r=a(4499),o=a(6733),c=a(8122);let d="elf-sight-block",m=(e,t,a)=>e<=t?"elf-sight-star-0 w-bt-spacing-32 h-bt-spacing-32 bg-no-repeat bg-cover":e>=a?"elf-sight-star-1 w-bt-spacing-32 h-bt-spacing-32 bg-no-repeat bg-cover":"elf-sight-star-half w-bt-spacing-32 h-bt-spacing-32 bg-no-repeat bg-cover",u=e=>{let{elfSightClassName:t,starRating:a=4.5,blockHeading:l,blockLayout:d,blockVisibility:u}=e,{layout:h}=d,p=(0,r.rt)(d),[g,b]=(0,i.useState)(!0);(0,i.useEffect)(()=>{let e=setTimeout(()=>{b(!1)},5e3);return()=>{clearTimeout(e)}},[t]);let x=(0,n.jsxs)(n.Fragment,{children:[g?null:(0,n.jsx)(s(),{src:"https://static.elfsight.com/platform/platform.js",async:!0,strategy:"lazyOnload"}),(0,n.jsxs)("div",{className:t,"data-elfsight-app-lazy":!0,style:{textAlign:"center",height:"100%",display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,n.jsx)("p",{className:"pb-bt-spacing-10 text-gs-2".concat(l?" mt-bt-spacing-30":""),children:(0,n.jsx)("strong",{children:"Loading Reviewsâ¦"})}),(0,n.jsxs)("div",{className:"flex gap-bt-spacing-10 justify-center mb-bt-spacing-30",children:[(0,n.jsx)("div",{className:m(a,0,1)}),(0,n.jsx)("div",{className:m(a,1,2)}),(0,n.jsx)("div",{className:m(a,2,3)}),(0,n.jsx)("div",{className:m(a,3,4)}),(0,n.jsx)("div",{className:m(a,4,5)})]})]})]}),f=l?(0,n.jsx)("div",{className:"container pt-bt-spacing-30 lg:pt-bt-spacing-48 ".concat(p).concat("Narrow"===h?" lg:max-w-[956px]":""),children:(0,n.jsx)(c.A,{className:"text-center",...l})}):"";return h===r.ir?(0,n.jsx)(o.A,{...u,children:(0,n.jsxs)("div",{className:"flex flex-col gap-bt-spacing-16 ".concat(p," elf-sight-block min-h-[380px]"),children:[f,x]})}):(0,n.jsx)(o.A,{...u,children:(0,n.jsxs)("div",{className:"flex flex-col gap-bt-spacing-16 ".concat(p," elf-sight-block"),children:[f,(0,n.jsx)("div",{className:"container min-h-[380px]".concat("Narrow"===h?" lg:max-w-[956px]":""),children:x})]})})}},4224:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>r,default:()=>o});var n=a(7876),l=a(5839),s=a(4647),i=a(6733);let r="quick-lead-form-block",o=e=>{let{className:t,asideText:a,quickLeadForm:r,title:o,blockVisibility:c}=e;return(0,n.jsx)(i.A,{...c,children:(0,n.jsx)("div",{className:"bg-pc-5 ".concat(t?" ".concat(t):""),children:(0,n.jsx)("div",{className:"container py-bt-spacing-30 lg:py-bt-spacing-48",children:(0,n.jsxs)("div",{className:"flex flex-col lg:flex-row lg:gap-bt-spacing-40",children:[(0,n.jsx)("div",{className:"grow flex flex-col justify-center",children:a?(0,n.jsx)(l.Ay,{className:"rich-text-quick-lead-form-block",componentAlias:l.w9,text:a}):""}),(0,n.jsxs)("div",{className:"lg:w-[466px] shrink-0 bg-white rounded-bt-radius-20 overflow-hidden",children:[(0,n.jsx)("h2",{className:"block bg-sc-5 text-center px-bt-spacing-16 py-bt-spacing-12 text-xl",children:o}),(0,n.jsx)(s.default,{...r,className:"py-bt-spacing-16 px-bt-spacing-16 lg:px-bt-spacing-30"})]})]})})})})}},4310:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(7876),l=a(121);let s=e=>{let{className:t,arrow:a,value:s}=e,i=(0,l.iC)(l.Ox.Primary);return(0,n.jsx)(l.Ay,{componentAlias:l.w9,className:"".concat(i.button," ").concat(a?i.arrow:"").concat(t?" ".concat(t):""),type:"submit",arrow:a,text:s})}},4402:(e,t,a)=>{a.d(t,{M1:()=>l,ml:()=>s,x7:()=>o});var n=a(4232);let l=(0,n.createContext)(null),s=()=>{let e=(0,n.useContext)(l);if(!e)throw Error("useBraze must be used within BrazeProvider");return e},i=null,r=null,o=async()=>i||r||(r=(async()=>{await new Promise(e=>{let t=!1,a=()=>{t||(t=!0,window.removeEventListener("click",a),window.removeEventListener("scroll",a),clearTimeout(n),e())};window.addEventListener("click",a,{passive:!0}),window.addEventListener("scroll",a,{passive:!0});let n=setTimeout(a,3e3)});let e=await a.e(406).then(a.bind(a,8406));return e.initialize("5f95dada-ce35-4bb0-bb72-600cf975762e",{baseUrl:"sdk.au-01.braze.com",enableLogging:!1}),e.automaticallyShowInAppMessages(),e.openSession(),i=e,e})())},4499:(e,t,a)=>{a.d(t,{AY:()=>s,ir:()=>n,rt:()=>l});let n="Full";function l(e){let{theme:t}=e;switch(t){case"Secondary":return"bg-sc-5";case"White":return"bg-white";default:return""}}function s(e){let{layout:t}=e;switch(t){case n:return"container w-full max-w-none";case"Narrow":return"container lg:max-w-[956px]";default:return"container"}}},4647:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>w,default:()=>A,quickLeadFormProductTypeRadioMax:()=>y});var n=a(7876);function l(e){return e.replace(/([-_][a-z])/gu,e=>e.toUpperCase().replace("-","").replace("_",""))}var s=a(4768),i=a(630),r=a(2895);let o=e=>{let{labelText:t,className:a,id:l,name:s,value:i,options:r,checked:c,...d}=e;return r&&r.length>0?(0,n.jsx)(n.Fragment,{children:r.map((e,t)=>(0,n.jsx)(o,{className:a,id:"".concat(s,"-").concat(e.key),name:s,value:e.key,labelText:e.value,checked:i===e.ke
1y,...d},t))}):(0,n.jsxs)("div",{className:a,children:[(0,n.jsx)("input",{name:s,id:l,type:"radio",className:"hidden peer",value:i,checked:null!=c&&c,...d}),(0,n.jsx)("label",{htmlFor:l,className:"block text-xs text-gs-5 text-center px-bt-spacing-10 py-bt-spacing-8 border border-gs-1 rounded-bt-radius-8 bg-white capitalize cursor-pointer select-none w-full peer-checked:border-pc-5 peer-checked:bg-pc-5 peer-checked:text-white",children:void 0===t?i:t})]})};var c=a(4232),d=a(4934),m=a(4310),u=a(5377),h=a(5499),p=a(3529),g=a(5839),b=a(4402);let x=async e=>{let t=new TextEncoder().encode("WebSiteUser-".concat(e)),a=Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",t))).map(e=>e.toString(16).padStart(2,"0")).join("");return"".concat(a.slice(0,8),"-").concat(a.slice(8,12),"-").concat(a.slice(12,16),"-").concat(a.slice(16,20),"-").concat(a.slice(20,32))};var f=a(6733);let v=e=>{let{className:t,...a}=e;return(0,n.jsx)("input",{className:"afs-input ".concat(h.J," ").concat(t),type:"number",...a})};var j=a(5662);let w="quick-lead-form",y=2;class N extends c.Component{componentDidMount(){let e="afs_confirm_email_ab",t=localStorage.getItem(e),a=!1;"show"===t||"hide"===t?a="show"===t:(a=.5>Math.random(),localStorage.setItem(e,a?"show":"hide")),this.setState({showConfirmEmail:a}),(async()=>{let{quickLeadConfigs:e}=this.props,{form:t,multipleQuickLeadConfigs:a}=this.state;try{var n,l,s,i,r,o,c,d,m,u,h,p;let g=await fetch("/api/quick-lead/form-data");if(200!==g.status)return void this.setState({isLoading:!1});let b=await g.json(),x=Object.keys(t).reduce((e,t)=>({...e,[t]:b[t]||""}),t),f=Object.fromEntries(Object.entries(x).filter(e=>
1{let[t,a]=e;return!!a})),{applicationData:v}=b,j=(null==v||null==(n=v.loan)?void 0:n.loanType)||(null==b?void 0:b.productType)||"",w=(null==v||null==(l=v.loan)?void 0:l.loanPurpose)||(null==b?void 0:b.loanPurpose)||"";if(w){let t=e.find(e=>e.value===j)||e[0];void 0===t.loanPurpose.options.find(e=>e.value===w)&&(w=t.loanPurpose.defaultValue)}else w=a?(e.find(e=>e.value===j)||e[0]).value:(null==(p=e[0].loanPurpose.options.find(e=>{var t;return e.value===(null==v||null==(t=v.loan)?void 0:t.loanPurpose)}))?void 0:p.value)||e[0].loanPurpose.defaultValue;let y={};try{let e=await fetch("https://ipinfo.io?token=7220a43d1c2fd7");y=await e.json()}catch(e){console.error("Error fetching IP Info",e),y={}}let N={...t,...y.ip&&{ipAddress:y.ip},...y.city&&{xcity:y.city},...y.region&&{xregion:y.region},...f,...v&&{application:JSON.stringify(v)},...(null==v||null==(s=v.loan)?void 0:s.loanAmount)&&{loanAmount:v.loan.loanAmount},...j&&{productType:j},...w&&{loanPurpose:w},...(null==v||null==(i=v.personalDetails)?void 0:i.title)&&{title:v.personalDetails.title},...(null==v||null==(r=v.personalDetails)?void 0:r.firstName)&&{firstName:v.personalDetails.firstName},...(null==v||null==(o=v.personalDetails)?void 0:o.lastName)&&{lastName:v.personalDetails.lastName},...(null==v||null==(c=v.personalDetails)?void 0:c.mobilePhone)&&{mobilePhone:v.personalDetails.mobilePhone},...(null==v||null==(d=v.personalDetails)?void 0:d.email)&&{email:v.personalDetails.email,confirmEmail:v.personalDetails.email},...(null==v||null==(m=v.personalDetails)?void 0:m.dateOfBirth)&&{dateOfBirth:v.personalDetails.dateOfBirth},...(null==(h=window)||null==(u=h.location)?void 0:u.pathname)&&{page:window.location.pathname}};this.setState({originalForm:N,form:this.getUpdatedMarketingValueState(this.getUpdatedLoanTermState(N),N),updatedFields:Object.keys(N).filter(e=>""!==N[e]),isLoading:!1,isOfflineApplication:b.offlineApplicationEnabled||!1})}catch(e){this.setState({isLoading:!1})}})()}getUpdatedMarketingValueState(e,t){let{quickLeadConfigs:a}=this.props,n=a.find(t=>t.value===e.productType)||a[0];return{...e,ref:t.ref||n.ref||"",suba:t.suba||n.suba||"",subb:t.subb||n.subb||"",subc:t.subc||n.subc||"",subd:t.subd||n.subd||"",sube:t.sube||n.sube||"",subf:t.subf||n.subf||"",subg:t.subg||n.subg||"",subh:t.subh||n.subh||"",gclid:t.gclid||n.gclid||"",m3Utma:t.m3Utma||n.m3Utma||"",m3Ga:t.m3Ga||n.m3Ga||"",fbclid:t.fbclid||n.fbclid||"",msclkid:t.msclkid||n.msclkid||"",brokerName:t.brokerName||n.brokerName||""}}validateDateOfBirth(e,t){if(!e){t.dateOfBirth="Date of Birth is required";return}if(!/^[0-9]{0,1}\d\/[0-9]{0,1}\d\/\d{4}$/u.test(e)){t.dateOfBirth="Required format DD/MM/YYYY";return}let[a,n,l]=e.split("/").map(Number),i=new Date(l,n-1,a);if(1930>=i.getFullYear()){t.dateOfBirth="Date of birth error DD/MM/YYYY";return}let r=new Date;if(r.setHours(0,0,0,0),i.setHours(0,0,0,0),i>r){t.dateOfBirth="Please enter a valid date of birth";return}r.setFullYear(r.getFullYear()-18),i>r&&(t.dateOfBirth="You must be over 18 years old to qualify"),(0,s.ZV)(a,n,l)||(t.dateOfBirth="Please enter a valid date")}validateForm(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",{quickLeadConfigs:n}=this.props,{updatedFields:l}=this.state,s=[...l,a],i={};if(s.includes("loanAmount")||t)if(e.loanAmount){var r,o;let t=n.find(t=>t.value===e.productType)||n[0],a=t.loanPurpose.options.find(t=>t.value===e.loanPurpose)||null,l=null!=(r=null==a?void 0:a.minValue)?r:t.loanPurpose.defaultMinLoanAmount,s=null!=(o=null==a?void 0:a.maxValue)?o:t.loanPurpose.defaultMaxLoanAmount,c=e.loanAmount?parseInt(e.loanAmount,10):0;c<l?i.loanAmount="The minimum Loan Amount is $".concat(l):c>s&&(i.loanAmount="Please enter a value less than or equal to $".concat(s,"."))}else i.loanAmount="Loan Amount is required";if(s.includes("loanTerm")&&t)if(e.loanTerm){let{defaultMinLoanTerm:t,defaultMaxLoanTerm:a}=(n.find(t=>t.value===e.productType)||n[0]).loanPurpose,{loanTerm:l}=e;l<t?i.loanTerm="The minimum Loan Term is ".concat(t," months"):l>a&&(i.loanTerm="The maximum Loan Term is ".concat(a," months"))}else i.loanTerm="Loan Term is required";return(s.includes("firstName")||t)&&(e.firstName?/\d/u.test(e.firstName)?i.firstName="Please enter only letters.":e.firstName.length<2&&(i.firstName="Please enter a valid first name."):i.firstName="First name is required"),(s.includes("lastName")||t)&&(e.lastName?/\d/u.test(e.lastName)?i.lastName="Please enter only letters.":e.lastName.length<2&&(i.lastName="Please enter a valid last name."):i.lastName="Last name is required"),(s.includes("loanPurpose")||t)&&!e.loanPurpose&&(i.loanPurpose="Loan Purpose is required"),(s.includes("productType")||t)&&!e.productType&&(i.productType="Product Type is required"),(s.includes("title")||t)&&!e.title&&(i.title="Title is required"),(s.includes("email")||t)&&(e.email?/^[^\s@]+@[^\s@]+\.[^\s@]+$/u.test(e.email)||(i.email="Please enter a valid email address"):i.email="Email address is required"),this.state.showConfirmEmail&&(s.includes("confirmEmail")||t)&&(e.confirmEmail?/^[^\s@]+@[^\s@]+\.[^\s@]+$/u.test(e.email)?e.email!==e.confirmEmail&&(i.email="Email addresses do not match",i.confirmEmail="Email addresses do not match"):i.email="Please enter a valid email address":i.email="Confirm Email address is required"),(s.includes("mobilePhone")||t)&&(e.mobilePhone?/^04\d{8}$/u.test(e.mobilePhone)||(i.mobilePhone="Please enter a valid 04XXXXXXXX mobile phone number"):i.mobilePhone="Mobile Phone is required"),(s.includes("dateOfBirth")||t)&&this.validateDateOfBirth(e.dateOfBirth,i),this.setState({updatedFields:s,errors:i}),!Object.keys(i).length}getUpdatedLoanTermState(e){let{quickLeadConfigs:t}=this.props,{defaultMinLoanTerm:a,defaultMaxLoanTerm:n}=(t.find(t=>t.value===e.productType)||t[0]).loanPurpose,l=Math.max(a,Math.min(e.loanTerm,n));return{...e,loanTerm:l}}validateAndUpdateForm(e,t){let{originalForm:a}=this.state;this.validateForm(e,!1,t),this.setState({form:this.getUpdatedMarketingValueState(this.getUpdatedLoanTermState(e),a)})}handleSelectChange(e){let{form:t}=this.state,{name:a,value:n}=e.target,s=l(a);this.validateAndUpdateForm({...t,[s]:n},s)}handleInputChange(e){let{form:t}=this.state,{name:a,value:n}=e.target,s=l(a);this.validateAndUpdateForm({...t,[s]:n},s)}handleInputChangeBasic(e){let{form:t}=this.state,{name:a,value:n}=e.target,s=l(a);this.setState({form:{...t,[s]:n}})}handleNumberKeyDown(e){!((e.ctrlKey||e.metaKey)&&["v","a","c"].includes(e.ke
1y.toLowerCase()))&&(["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(e.key)||/\d/u.test(e.key)||e.preventDefault())}handleDateKeyDown(e){if(!["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(e.key)&&!((e.ctrlKey||e.metaKey)&&["v","a","c"].includes(e.key.toLowerCase()))){if(["/",".","-"].includes(e.key)){var t;let a=null!=(t=e.currentTarget.selectionStart)?t:0,n=e.currentTarget.value,l=n.substring(0,a);return(n.match(/[/.-]/gu)||[]).length>=2||0===a||l.endsWith("/")||l.endsWith(".")||l.endsWith("-")?void e.preventDefault():void 0}/\d/u.test(e.key)||e.preventDefault()}}handleDateInputChange(e){let{form:t,updatedFields:a,originalForm:n}=this.state,{name:s}=e.target,i=l(s),{value:r}=e.target;if(3===(r=(r=r.replace(/[.-]/gu,"/")).replace(/[^\d/]/gu,"")).length&&"/"!==r.slice(-1)?r="".concat(r.substring(0,2),"/").concat(r.slice(-1)):6===r.length&&"/"!==r.slice(-1)&&(r="".concat(r.substring(0,5),"/").concat(r.slice(-1))),((r=r.replace(/\/\//gu,"/")).match(/\//gu)||[]).length>2){let e=0;r=r.split("").filter(t=>"/"!==t||(e+=1)<=2).join("")}let o=r.split("/");o.length>=1&&o[0].length>2&&(o[0]=o[0].substring(0,2)),o.length>=2&&o[1].length>2&&(o[1]=o[1].substring(0,2)),o.length>=3&&o[2].length>4&&(o[2]=o[2].substring(0,4)),r=o.join("/"),this.setState({updatedFields:[...a,i],form:this.getUpdatedMarketingValueState({...t,[i]:r},n)})}handleNoValidationInputChange(e){let{form:t,updatedFields:a,originalForm:n}=this.state,{name:s,value:i}=e.target,r=l(s),o=[...a,r];this.setState({updatedFields:o,form:this.getUpdatedMarketingValueState(this.getUpdatedLoanTermState({...t,[r]:i}),n)})}async sendQuickleadTrack(){let{brazeContext:e}=this.props;if(!e)return;let{hasTrackingSent:t,form:a}=this.state;if(t)return;this.setState({hasTrackingSent:!0});let{changeUser:n,logCustomEvent:l,setUserDateOfBirth:s,setUserEmail:i,setUserFirstName:r,setUserLastName:o,setUserPhoneNumber:c,requestImmediateDataFlush:d}=e,{email:m,firstName:u,lastName:h,mobilePhone:p,dateOfBirth:g}=a;n(await x(m));let[b,f,v]=g.split("/").map(Number);r(u),o(h),i(m),c(function(e){if(!e)return"";let t=e.replace(/[^\d+]/ug,"");return t.startsWith("+")&&t.length>10?t:(t=t.replace(/^\+/u,""),/^04\d{8}$/u.test(t))?"+61".concat(t.substring(1)):/^614\d{8}$/u.test(t)?"+".concat(t):e}(p)),s(v,f,b),l("website_quicklead_submit",{loanAmount:a.loanAmount,loanPurpose:a.loanPurpose}),d()}async handleOnSubmit(e){let{form:t,isLoading:a,isSubmitting:n,showConfirmEmail:l}=this.state;(a||n)&&e.preventDefault();let s=l?t:{...t,confirmEmail:t.email};if(this.validateForm(s,!0)){let a=e.currentTarget;e.preventDefault(),l||this.setState({form:{...t,confirmEmail:t.email}}),this.setState({isSubmitting:!0}),await this.sendQuickleadTrack(),a.submit()}else e.preventDefault()}render(){var e,t,a,l,s,c,b;let{id:x,className:w,quickLeadConfigs:N,action:A,privacyPolicyLink:k,blockVisibility:P}=this.props,{form:C,errors:L,isSubmitting:T,isLoading:B,multipleQuickLeadConfigs:S,isOfflineApplication:R,showConfirmEmail:F}=this.state,I=N.find(e=>e.value===C.productType)||N[0],M=I.loanPurpose.options.find(e=>e.value===C.loanPurpose)||null,E=[];S?(E=null==N?void 0:N.map(e=>({key:e.value,value:e.text})),N.length>y&&E.unshift({key:"default",value:"select..."})):E=[{key:I.value,value:I.text}];let D=null==I||null==(t=I.loanPurpose)||null==(e=t.options)?void 0:e.map(e=>({key:e.value,value:e.value}));return D.length>=1&&D.unshift({key:"default",value:"select..."}),(0,n.jsx)(f.A,{...P,children:(0,n.jsxs)("form",{id:x,className:"".concat(w),method:"POST",onSubmit:this.handleOnSubmit,action:R?"".concat("https://www.afs.com.au","/api/quick-lead/offline-application"):A.url,children:[S?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mb-bt-spacing-4 grid grid-cols-2 gap-bt-spacing-10 lg:gap-bt-spacing-20",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-pc-5 relative text-xs font-semibold",htmlFor:"loan_amount",children:["Loan Amount",(0,n.jsx)("span",{className:"text-xs text-red absolute right-full top-0 mr-bt-spacing-3",children:"*"})]}),(0,n.jsx)(r.A,{name:"loan_amount",id:"loan_amount",required:!0,onChange:this.handleNoValidationInputChange,onBlur:this.handleInputChange,onKeyDown:this.handleNumberKeyDown,value:C.loanAmount,readOnly:B,placeholder:"".concat(null!=(a=null==M?void 0:M.minValue)?a:I.loanPurpose.defaultMinLoanAmount," - ").concat(null!=(l=null==M?void 0:M.maxValue)?l:I.loanPurpose.defaultMaxLoanAmount)}),L.loanAmount?(0,n.jsx)("span",{className:"text-danger text-xs",children:L.loanAmount}):null]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-pc-5 relative text-xs font-semibold",htmlFor:"product_type",children:["Loan Purpose Type",(0,n.jsx)("span",{className:"text-xs text-red absolute right-full top-0 mr-bt-spacing-3",children:"*"})]}),(0,n.jsx)(d.A,{name:"product_type",id:"product_type",value:C.productType,required:!0,onChange:this.handleSelectChange,options:E}),L.productType?(0,n.jsx)("span",{className:"text-danger text-xs",children:L.productType}):null]})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-pc-5 relative text-xs font-semibold",htmlFor:"loan_purpose",children:[I.inputLabel,(0,n.jsx)("span",{className:"text-xs text-red absolute right-full top-0 mr-bt-spacing-3",children:"*"})]}),(0,n.jsx)(d.A,{name:"loan_purpose",id:"loan_purpose",value:C.loanPurpose,onChange:this.handleSelectChange,required:!0,options:D}),L.loanPurpose?(0,n.jsx)("span",{className:"text-danger text-xs",children:L.loanPurpose}):null]})]}):(0,n.jsxs)("div",{className:"mb-bt-spacing-4 grid grid-cols-4 gap-bt-spacing-10 lg:gap-bt-spacing-20",children:[(0,n.jsxs)("div",{className:"col-span-3 sm:col-span-2",children:[(0,n.jsxs)("label",{className:"block text-pc-5 relative text-xs font-semibold",htmlFor:"loan_amount",children:["Loan Amount",(0,n.jsx)("span",{className:"text-xs text-red absolute right-full top-0 mr-bt-spacing-3",children:"*"})]}),(0,n.jsx)(r.A,{name:"loan_amount",id:"loan_amount",required:!0,onChange:this.handleNoValidationInputChange,onBlur:this.handleInputChange,onKeyDown:this.handleNumberKeyDown,value:C.loanAmount,readOnly:B,placeholder:"".concat(null!=(s=null==M?void 0:M.minValue)?s:I.loanPurpose.defaultMinLoanAmount," - ").concat(null!=(c=null==M?void 0:M.maxValue)?c:I.loanPurpose.defaultMaxLoanAmount)}),L.loanAmount?(0,n.jsx)("span",{className:"text-danger text-xs",children:L.loanAmount}):null]}),(0,n.jsxs)("div",{className:"col-span-3 sm:col-span-2",children:[(0,n.jsxs)("label",{className:"block text-pc-5 relative text-xs font-semibold",htmlFor:"loan_purpose",children:[I.inputLabel,(0,n.jsx)("span",{className:"text-xs text-red absolute right-full top-0 mr-bt-spacing-3",children:"*"})]}),(0,n.jsx)(d.A,{name:"loan_purpose",id:"loan_purpose",value:C.loanPurpose,onChange:this.handleSelectChange,required:!0,options:D}),L.loanPurpose?(0,n.jsx)("span",{className:"text-danger text-xs",children:L.loanPurpose}):null]}),(0,n.jsx)("input",{type:"hidden",name:"product_type",id:"product_type",value:C.productType})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-pc-5 relative text-xs font-semibold",htmlFor:"loan_term",children:["Loan Term",(0,n.jsx)("span",{className:"text-xs text-red absolute right-full top-0 mr-bt-spacing-3",children:"*"})]}),(0,n.jsxs)("div",{className:"flex gap-bt-spacing-10 lg:gap-bt-spacing-20 items-center",children:[(0,n.jsx)(j.A,{name:"loan_term",id:"loan_term",min:I.loanPurpose.defaultMinLoanTerm,max:I.loanPurpose.defaultMaxLoanTerm,value:C.loanTerm,step:"1",onBlur:this.handleInputChange,onChange:this.handleInputChangeBasic,required:!0}),(0,n.jsxs)("div",{className:"relative w-auto",children:[(0,n.jsx)(v,{className:"peer !w-auto pr-bt-spacing-56 text-transparent focus:text-black",name:"loan_term",id:"loan_term_preview",value:C.loanTerm,onBlur:this.handleInputChange,onChange:this.handleInputChangeBasic,min:I.loanPurpose.defaultMinLoanTerm,max:I.loanPurpose.defaultMaxLoanTerm}),(0,n.jsxs)("span",{className:"absolute left-bt-spacing-16 top-1/2 -translate-y-1/2 text-gray-600 pointer-events-none peer-focus:hidden",children:[C.loanTerm," year",C.loanTerm>1?"s":""]})]})]}),L.loanTerm?(0,n.jsx)("span",{className:"text-danger text-xs",children:L.loanTerm}):null]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-pc-5 relative text-xs font-semibold",htmlFor:"title",children:["Title",(0,n.jsx)("span",{className:"text-xs text-red absolute right-full top-0 mr-bt-spacing-3",children:"*"})]}),(0,n.jsx)("div",{className:"flex justify-evenly gap-bt-spacing-10 lg:gap-bt-spacing-20",children:(0,n.jsx)(o,{onChange:this.handleInputChange,className:"grow",name:"title",id:"title",value:C.title,options:[{key:"Mr",value:"Mr"},{key:"Mrs",value:"Mrs"},{key:"Miss",value:"Miss"},{key:"Ms",value:"Ms"}]})}),L.title?(0,n.jsx)("span",{className:"text-danger text-xs",children:L.title}):null]}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-bt-spacing-10 lg:gap-bt-spacing-20",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-pc-5 relative text-xs font-semibold",htmlFor:"first_name",children:["First Name",(0,n.jsx)("span",{className:"text-xs text-red absolute right-full top-0 mr-bt-spacing-3",children:"*"})]}),(0,n.jsx)(h.A,{id:"first_name",name:"first_name",onBlur:this.handleInputChange,onChange:this.handleNoValidationInputChange,readOnly:B,value:C.firstName}),L.firstName?(0,n.jsx)("span",{className:"text-danger text-xs",children:L.firstName}):null]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-pc-5 relative text-xs font-semibold",htmlFor:"last_name",children:["Last Name",(0,n.jsx)("span",{className:"text-xs text-red absolute right-full top-0 mr-bt-spacing-3",children:"*"})]}),(0,n.jsx)(h.A,{id:"last_name",name:"last_name",onBlur:this.handleInputChange,onChange:this.handleNoValidationInputChange,readOnly:B,required:!0,value:C.lastName}),L.lastName?(0,n.jsx)("span",{className:"text-danger text-xs",children:L.lastName}):null]})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-pc-5 relative text-xs font-semibold",htmlFor:"email",children:["Email Address",(0,n.jsx)("span",{className:"text-xs text-red absolute right-full top-0 mr-bt-spacing-3",children:"*"})]}),(0,n.jsx)(i.A,{name:"email",id:"email",required:!0,onChange:this.handleNoValidationInputChange,onBlur:this.handleInputChange,readOnly:B,value:C.email}),L.email?(0,n.jsx)("span",{className:"text-danger text-xs",children:L.email}):null]}),F&&(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-pc-5 relative text-xs font-semibold",htmlFor:"confirm_email",children:["Confirm Email Address",(0,n.jsx)("span",{className:"text-xs text-red absolute right-full top-0 mr-bt-spacing-3",children:"*"})]}
1),(0,n.jsx)(i.A,{name:"confirm_email",id:"confirm_email",required:!0,onChange:this.handleNoValidationInputChange,onBlur:this.handleInputChange,readOnly:B,value:C.confirmEmail}),L.confirmEmail?(0,n.jsx)("span",{className:"text-danger text-xs",children:L.confirmEmail}):null]}),(0,n.jsxs)("div",{className:"mb-bt-spacing-30 grid grid-cols-2 gap-bt-spacing-10 lg:gap-bt-spacing-20",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-pc-5 relative text-xs font-semibold",htmlFor:"mobile_phone",children:["Mobile Phone",(0,n.jsx)("span",{className:"text-xs text-red absolute right-full top-0 mr-bt-spacing-3",children:"*"})]}),(0,n.jsx)(u.A,{name:"mobile_phone",id:"mobile_phone",required:!0,onChange:this.handleNoValidationInputChange,onBlur:this.handleInputChange,onKeyDown:this.handleNumberKeyDown,readOnly:B,value:C.mobilePhone}),L.mobilePhone?(0,n.jsx)("span",{className:"text-danger text-xs",children:L.mobilePhone}):null]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-pc-5 relative text-xs font-semibold",htmlFor:"date_of_birth",children:["Date of Birth",(0,n.jsx)("span",{className:"text-xs text-red absolute right-full top-0 mr-bt-spacing-3",children:"*"})]}),(0,n.jsx)(h.A,{name:"date_of_birth",id:"date_of_birth",placeholder:"DD/MM/YYYY",required:!0,onChange:this.handleDateInputChange,onKeyDown:this.handleDateKeyDown,onBlur:this.handleInputChange,readOnly:B,value:C.dateOfBirth}),L.dateOfBirth?(0,n.jsx)("span",{className:"text-danger text-xs",children:L.dateOfBirth}):null]})]}),(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:g.fs,children:(0,n.jsxs)("p",{className:"mb-bt-spacing-30 text-xs leading-tiny",children:["By submitting your request for a pre-approval quote, you consent and agree to our ",(0,n.jsx)(p.A,{...k,target:"_blank",children:"Privacy Policy"}),"."]})}),(0,n.jsx)(m.A,{id:"apply-submit",className:"inline-block",value:T?"Please Waitâ¦":"Apply Now",arrow:!0})]}),(0,n.jsx)("input",{type:"hidden",name:"ref",id:"ref",value:C.ref}),(0,n.jsx)("input",{type:"hidden",name:"broker_name",id:"broker_name",value:C.brokerName}),(0,n.jsx)("input",{type:"hidden",name:"suba",id:"suba",value:C.suba}),(0,n.jsx)("input",{type:"hidden",name:"subb",id:"subb",value:C.subb}),(0,n.jsx)("input",{type:"hidden",name:"subc",id:"subc",value:(null!=(b=C.subc)?b:F)?"yesemail":"noemail"}),(0,n.jsx)("input",{type:"hidden",name:"subd",id:"subd",value:C.subd}),(0,n.jsx)("input",{type:"hidden",name:"sube",id:"sube",value:C.sube}),(0,n.jsx)("input",{type:"hidden",name:"subf",id:"subf",value:C.subf}),(0,n.jsx)("input",{type:"hidden",name:"subg",id:"subg",value:C.subg}),(0,n.jsx)("input",{type:"hidden",name:"subh",id:"subh",value:C.subh}),(0,n.jsx)("input",{type:"hidden",name:"gclid",id:"gclid",value:C.gclid}),(0,n.jsx)("input",{type:"hidden",name:"m3_utma",id:"m3_utma",value:C.m3Utma}),(0,n.jsx)("input",{type:"hidden",name:"m3_ga",id:"m3_ga",value:C.m3Ga}),(0,n.jsx)("input",{type:"hidden",name:"fbclid",id:"fbclid",value:C.fbclid}),(0,n.jsx)("input",{type:"hidden",name:"msclkid",id:"msclkid",value:C.msclkid}),(0,n.jsx)("input",{type:"hidden",name:"privacy_policy",id:"privacy_policy",value:C.privacyPolicy}),(0,n.jsx)("input",{type:"hidden",name:"ipaddress",id:"ipaddress",value:C.ipAddress}),(0,n.jsx)("input",{type:"hidden",name:"xcity",id:"xcity",value:C.xcity}),(0,n.jsx)("input",{type:"hidden",name:"xregion",id:"xregion",value:C.xregion}),(0,n.jsx)("input",{type:"hidden",name:"bundoora",id:"bundoora",value:C.bundoora}),(0,n.jsx)("input",{type:"hidden",name:"callback",id:"callback",value:C.callback}),(0,n.jsx)("input",{type:"hidden",name:"display_brand",id:"display_brand",value:C.displayBrand}),(0,n.jsx)("input",{type:"hidden",name:"application",id:"application",value:C.application}),(0,n.jsx)("input",{type:"hidden",name:"loan_term",id:"loan_term",value:C.loanTerm})]})})}constructor(e){super(e);let{quickLeadConfigs:t}=e,a=t.length>1,n={action:"",application:"",brokerName:"",bundoora:"true",callback:"Anytime",clientNotes:"",dateOfBirth:"",displayBrand:"M3",email:"",confirmEmail:"",fbclid:"",firstName:"",gclid:"",ipAddress:"",lastName:"",loanAmount:"",loanPurpose:t[0].loanPurpose.defaultValue,loanTerm:t[0].loanPurpose.defaultMinLoanTerm,m3Ga:"",m3Utma:"",mobilePhone:"",msclkid:"",page:"",privacyPolicy:"Agree",productType:t[0].value,ref:"",suba:"",subb:"",subc:"",subd:"",sube:"",subf:"",subg:"",subh:"",title:"",xcity:"",xregion:""};this.state={multipleQuickLeadConfigs:a,isLoading:!0,isSubmitting:!1,isOfflineApplication:!1,originalForm:n,form:n,errors:{},updatedFields:[],hasTrackingSent:!1,showConfirmEmail:!0},this.getUpdatedMarketingValueState=this.getUpdatedMarketingValueState.bind(this),this.getUpdatedLoanTermState=this.getUpdatedLoanTermState.bind(this),this.validateDateOfBirth=this.validateDateOfBirth.bind(this),this.validateForm=this.validateForm.bind(this),this.validateAndUpdateForm=this.validateAndUpdateForm.bind(this),this.handleSelectChange=this.handleSelectChange.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleInputChangeBasic=this.handleInputChangeBasic.bind(this),this.handleNumberKeyDown=this.handleNumberKeyDown.bind(this),this.handleDateKeyDown=this.handleDateKeyDown.bind(this),this.handleNoValidationInputChange=this.handleNoValidationInputChange.bind(this),this.handleOnSubmit=this.handleOnSubmit.bind(this),this.sendQuickleadTrack=this.sendQuickleadTrack.bind(this),this.handleDateInputChange=this.handleDateInputChange.bind(this)}}let A=e=>{let t=(0,b.ml)();return(0,n.jsx)(N,{...e,brazeContext:t})}},4768:(e,t,a)=>{function n(e,t,a){return!(t<=0)&&!(t>12)&&!(e<=0)&&!(e>(2===t&&a%4==0?29:[31,28,31,30,31,30,31,31,30,31,30,31][t-1]))&&!(a<1753)&&(2!==t||29!==e||!!(a%4==0&&(a%100!=0||a%400==0)&&a>=1753))}function l(e){return new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}a.d(t,{Yq:()=>l,ZV:()=>n})},4822:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(7876),l=a(4012);let s=e=>{let{theme:t,icon:a,className:s}=e;return(0,n.jsx)("div",{className:"".concat(("alternate"===t?{icon:"inline-block bg-ac-5 border-3 border-pc-5 rounded-full overflow-hidden w-[64px] h-[64px]"}:{icon:"inline-block bg-sc-5 border-3 border-pc-5 rounded-full overflow-hidden w-[64px] h-[64px]"}).icon).concat(s?" ".concat(s):""),children:(0,n.jsx)(l.A,{...a,alt:(null==a?void 0:a.alt)||"Brand Icon",width:64,height:64})})}},4934:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(7876),l=a(5499);let s=e=>{let{className:t,options:a,children:s,...i}=e,r=[];return void 0!==a&&(r=null==a?void 0:a.map((e,t)=>(0,n.jsx)("option",{value:e.key,children:e.value},t))),(0,n.jsx)("select",{className:"".concat(l.J," afs-input").concat(t?" ".concat(t):""),...i,children:s||r})}},5377:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(7876),l=a(5499);let s=e=>{let{className:t,...a}=e;return(0,n.jsx)("input",{className:"".concat(l.J," ").concat(t),type:"tel",...a})}},5499:(e,t,a)=>{a.d(t,{A:()=>s,J:()=>l});var n=a(7876);let l="block text-sm bg-white p-bt-spacing-8 border border-gs-1 rounded-bt-radius-8 focus:outline focus:outline-pc-2 focus:drop-shadow-input w-full",s=e=>{let{className:t,...a}=e;return(0,n.jsx)("input",{className:"".concat(l," ").concat(t),type:"text",...a})}},5662:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(7876);let l=e=>{let{className:t,min:a,max:l,value:s,...i}=e,r=Number(a),o=Number(l),c=Number(s),d=0;return c>=o?d=100:c>r&&(d=(c-r)/(o-r)*100),(0,n.jsx)("input",{type:"range",className:t,style:{backgroundSize:"".concat(d,"% 100%")},min:a,max:l,value:s,...i})}},5724:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>i,default:()=>r});var n=a(7876),l=a(8630),s=a(6733);let i="loan-calculator-block",r=e=>{let{className:t,blockVisibility:a}=e;return(0,n.jsx)(s.A,{...a,children:(0,n.jsx)("div",{className:"bg-sc-5 ".concat(t?" ".concat(t):""),children:(0,n.jsx)("div",{className:"container max-w-[956px] py-bt-spacing-30 flex flex-col gap-bt-spacing-30",children:(0,n.jsxs)("div",{className:"bg-white rounded-bt-radius-20 overflow-hidden",children:[(0,n.jsx)("h2",{className:"block bg-pc-5 text-white text-center px-bt-spacing-16 py-bt-spacing-26",children:"Calculate Your Repayments"}),(0,n.jsx)(l.default,{...e,className:"py-bt-spacing-26 px-bt-spacing-16 lg:px-bt-spacing-30"})]})})})})}},5839:(e,t,a)=>{a.d(t,{w9:()=>m,Ay:()=>h,fs:()=>u});var n=a(7876);let l="/afsv2/";var s=a(8230),i=a.n(s),r=a(6649);let o=["br"];function c(e){return"string"!=typeof e?"":(0,r.Ay)(e,{replace:e=>{var t,a;if("a"===e.name&&(null==(t=e.attribs)?void 0:t.href)){let{href:t,target:s,rel:r}=e.attribs;return(0,n.jsx)(i(),{href:(t.startsWith(l)?t.replace(l,"/"):t).replaceAll(" ",""),...s&&{target:s},...r&&{rel:r},children:null==(a=e.children[0])?void 0:a.data})}}})}let d=e=>Object.entries(e).map(e=>
1{let[t,a]=e;return"".concat(t,'="').concat(a,'"')}).join(" "),m="rich-text",u="rich-text",h=e=>{let{className:t,text:a,allowedTags:l}=e;return(0,n.jsx)("div",{className:"".concat(u).concat(t?" ".concat(t):""),children:l?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a="";return(0,r.Ay)(e,{replace:e=>{var n,l,s;if("tag"===e.type&&t.includes(e.name)&&o.includes(e.name)){a+="<".concat(e.name," ").concat(e.attribs?d(e.attribs):"",">/>");return}null===e.prev&&(null==(n=e.parent)?void 0:n.type)==="tag"&&t.includes(e.parent.name)&&(a+="<".concat(e.parent.name," ").concat(e.parent.attribs?d(e.parent.attribs):"",">")),"text"===e.type&&(a+=e.data),null===e.next&&!(null==(l=e.children)?void 0:l.length)&&(null==(s=e.parent)?void 0:s.type)==="tag"&&t.includes(e.parent.name)&&(a+="</".concat(e.parent.name,">"))}}),c(a)}(a,l):c(a)})}},5937:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>d,default:()=>m});var n=a(7876),l=a(4232),s=a(4012),i=a(3529),r=a(4e3);let o=e=>{let{image:t,title:a,text:l,link:o,className:c}=e,d=(0,r.useRouter)();return(0,n.jsxs)("div",{className:"h-[492px] group flex flex-col rounded-bt-radius-12 overflow-hidden cursor-pointer hover:shadow-article-card transition-shadow".concat(c?" ".concat(c):""),onClick:()=>{d.push(o.url)},children:[(0,n.jsx)("div",{className:"relative h-full max-h-[270px] w-full overflow-hidden z-fill-image",children:(0,n.jsx)(s.A,{src:t.src,alt:t.alt,className:"object-cover",fill:!0,sizes:"(max-width: 1000px) 100vw, 20vw",placeholder:"blur",blurDataURL:t.blurDataURL,...t.focalPoint&&{focalPoint:t.focalPoint}})}),(0,n.jsxs)("div",{className:"flex flex-col gap-bt-spacing-12 relative bg-ac-5 grow py-bt-spacing-20 px-bt-spacing-24 rounded-bt-radius-12 -mt-bt-spacing-12 z-fill-image-overlay",children:[(0,n.jsx)(i.A,{url:o.url,className:"text-xl font-bold leading-md lg:leading-xs group-hover:underline",children:a}),(0,n.jsx)("div",{children:l})]})]})};var c=a(6733);let d="product-preview-card-grid",m=e=>{let{productPreviewCards:t,className:a,blockVisibility:s}=e,i=null==t?void 0:t.map((e,t)=>(0,l.createElement)(o,{...e,key:t}));return(0,n.jsx)(c.A,{...s,children:(0,n.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-bt-spacing-24 lg:gap-bt-spacing-24".concat(a?" ".concat(a):""),children:i})})}},6027:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>c,default:()=>d});var n=a(7876),l=a(4012),s=a(121),i=a(4e3);let r=e=>{let{className:t,image:a,imageMobile:r,text:o,link:c,align:d,first:m}=e,u=r||a,h=(0,i.useRouter)();return(0,n.jsxs)("div",{className:"shadow-product-banner lg:shadow-none rounded-bt-radius-16 lg:rounded-none relative h-[276px] lg:h-[280px] cursor-pointer overflow-hidden".concat(t?" ".concat(t):""),onClick:()=>{h.push(c.url)},children:[(0,n.jsxs)("div",{className:"absolute left-0 right-0 bottom-0 top-0 z-fill-image",children:[(0,n.jsx)(l.A,{src:a.src,alt:a.alt,fill:!0,sizes:"100vw",className:"max-lg:hidden object-cover",priority:m,...!m&&{placeholder:"blur",blurDataURL:a.blurDataURL}}),(0,n.jsx)(l.A,{src:u.src,alt:u.alt,fill:!0,sizes:"100vw",className:"lg:hidden object-cover",priority:m,...!m&&{placeholder:"blur",blurDataURL:u.blurDataURL}})]}),(0,n.jsxs)("div",{className:"flex flex-col relative justify-end lg:justify-center px-bt-spacing-20 lg:px-bt-spacing-70 h-full lg:w-[390px] z-fill-image-overlay max-lg:bg-gradient-to-t from-white".concat("right"===d?" lg:bg-gradient-to-l lg:ml-auto lg:text-right":" lg:bg-gradient-to-r"),children:[(0,n.jsx)("div",{className:"text-4xl lg:text-5xl text-pc-5 font-bold pb-bt-spacing-32",children:o}),(0,n.jsx)("div",{className:"max-lg:hidden",children:(0,n.jsx)(s.Ay,{componentAlias:s.w9,link:c,theme:"primary"})})]})]})};var o=a(6733);let c="product-banner-list",d=e=>{var t;let{className:a,blockVisibility:l}=e,s=null==(t=e.productBanners)?void 0:t.map((e,t)=>(0,n.jsx)(r,{...e},t));return(0,n.jsx)(o.A,{...l,children:(0,n.jsx)("div",{className:"flex flex-col gap-bt-spacing-16".concat(a?" ".concat(a):""),children:s})})}},6048:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>o,default:()=>c});var n=a(7876),l=a(4232),s=a(4822);let i=e=>{let{brandIcon:t,text:a,className:l}=e;return(0,n.jsxs)("div",{className:"flex gap-bt-spacing-32 items-center".concat(l?" ".concat(l):""),children:[(0,n.jsx)(s.A,{...t,className:"shrink-0"}),(0,n.jsx)("div",{className:"text-sm lg:text-base text-pc-5 font-bold grow",children:a})]})};var r=a(6733);let o="icon-text-list",c=e=>{let{iconTextItems:t,className:a,blockVisibility:s}=e,o=null==t?void 0:t.map((e,t)=>(0,l.createElement)(i,{...e,key:t}));return(0,n.jsx)(r.A,{...s,children:(0,n.jsx)("div",{className:"flex flex-col gap-bt-spacing-24".concat(a?" ".concat(a):""),children:o})})}},6080:(e,t,a)=>{a.d(t,{A:()=>i});var n=a(7876),l=a(9099),s=a(121);function i(){let e=(0,l.useRouter)();return e.isPreview?(0,n.jsxs)("div",{className:"block fixed left-bt-spacing-20 bottom-bt-spacing-20 z-[999999]",children:[(0,n.jsx)("span",{className:"animate-ping rounded-full absolute w-bt-spacing-16 h-bt-spacing-16 bg-ac-5 -right-bt-spacing-5 -top-bt-spacing-5"}),(0,n.jsx)("span",{className:"animate rounded-full absolute w-bt-spacing-16 h-bt-spacing-16 bg-ac-5 -right-bt-spacing-5 -top-bt-spacing-5"}),(0,n.jsx)(s.Ay,{componentAlias:s.w9,text:"Exit Preview Mode",theme:s.Ox.Preview,className:"shadow-icon-button",onClick:()=>{fetch("/api/preview-close").then(t=>{t.ok&&e.reload()})}})]}):(0,n.jsx)(n.Fragment,{})}},6218:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>i,default:()=>r});var n=a(7876),l=a(3529),s=a(4e3);let i="category-button",r=e=>{let{text:t,link:a,active:i,onBlur:r,onClick:o,onFocus:c,onMouseEnter:d,onMouseLeave:m,className:u}=e,h=(0,s.usePathname)(),p="inline-block bg-ac-5 hover:bg-pc-4 text-gs-5 hover:text-white font-bold uppercase px-bt-spacing-26 lg:px-bt-spacing-16 py-bt-spacing-12 rounded-full",g="inline-block bg-pc-5 text-white font-bold uppercase px-bt-spacing-26 lg:px-bt-spacing-16 py-bt-spacing-12 rounded-full",b=null!=i&&i;return a?(a.url===h&&(b=!0),(0,n.jsx)(l.A,{className:"".concat(b?g:p).concat(u?" ".concat(u):""),...a})):(0,n.jsx)("button",{className:"".concat(b?g:p).concat(u?" ".concat(u):""),onClick:o,onMouseEnter:d,onMouseLeave:m,onFocus:c,onBlur:r,children:t})}},6286:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>i,default:()=>r});var n=a(7876),l=a(121),s=a(4012);let i="pl-title-area",r=e=>{let{heading:t,text:a,button:i,className:r,image:o,imageMobile:c,first:d}=e,m=c||o;return(0,n.jsxs)("div",{className:"flex flex-col gap-bt-spacing-24 text-center lg:text-left relative lg:h-[450px] lg:px-bt-spacing-48 lg:py-bt-spacing-38".concat(r?" ".concat(r):""),children:[(0,n.jsx)("h1",{className:"relative z-fill-image-overlay lg:w-[420px]",children:t}),(0,n.jsx)("div",{className:"absolute max-lg:hidden left-0 right-0 bottom-0 top-0 z-fill-image rounded-bt-radius-20 overflow-hidden",children:(0,n.jsx)(s.A,{src:o.src,alt:o.alt,fill:!0,sizes:"100vw",className:"object-cover",priority:d,...!d&&{placeholder:"blur",blurDataURL:o.blurDataURL}})}),(0,n.jsx)("div",{className:"relative flex align-center justify-center lg:hidden".concat(r?" ".concat(r):""),children:(0,n.jsx)(s.A,{src:m.src,alt:m.alt,width:m.width,height:m.height,sizes:"(max-width: 1000px) 50vw, 100vw",className:"object-cover max-h-[276px] rounded-bt-radius-16",priority:d,...!d&&{placeholder:"blur",blurDataURL:m.blurDataURL},focalPointUrlTemplate:m.focalPointUrlTemplate})}),(0,n.jsx)("div",{className:"relative z-fill-image-overlay text-pc-5 font-bold text-2xl leading-sm lg:leading-md lg:w-[420px]",children:a}),i?(0,n.jsx)("div",{children:(0,n.jsx)(l.Ay,{...i,className:"relative z-fill-image-overlay"})}):""]})}},6597:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>c,default:()=>d});var n=a(7876),l=a(5839),s=a(7687),i=a(4232);let r=e=>{var t;
1let{title:a,content:r,titleTag:o}=e,[c,d]=(0,i.useState)(null!=(t=e.startOpen)&&t);return(0,n.jsxs)("div",{className:"px-bt-spacing-16 lg:px-bt-spacing-24 border border-sc-5 rounded-bt-radius-16",children:[(0,n.jsxs)("div",{className:"flex items-center gap-bt-spacing-24 my-bt-spacing-16 lg:my-bt-spacing-26 justify-between",children:[i.createElement(function(e){let t=e.trim().toLowerCase();return["h1","h2","h3","h4","h5","h6"].includes(t)?t:"h4"}(null!=o?o:""),{className:"text-gs-5 text-base md:text-2xl font-bold leading-md lg:leading-sm cursor-pointer",onClick:()=>d(!c)},a),(0,n.jsx)(s.default,{componentAlias:s.componentAlias,className:"accordion-btn shrink-0 cursor-pointer ".concat(c?" open":""),icon:"arrow-down",onClick:()=>d(!c)})]}),(0,n.jsx)("div",{className:"accordion-content border-t border-gs-2 mt-bt-spacing-16 lg:mt-bt-spacing-24".concat(c?" open":""),children:(0,n.jsx)(l.Ay,{className:"py-bt-spacing-16 lg:py-bt-spacing-24",componentAlias:l.w9,text:r})})]})};var o=a(6733);let c="accordion-list",d=e=>{let{accordionItems:t,accordionItemTitleTag:a,className:l,blockVisibility:s}=e,i=null==t?void 0:t.map((e,t)=>(0,n.jsx)(r,{...e,...a&&{titleTag:a}},t));return(0,n.jsx)(o.A,{...s,children:(0,n.jsx)("div",{className:"flex flex-col gap-bt-spacing-12 ".concat(l?" ".concat(l):""),children:i})})}},6733:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(7876);let l=e=>{let{hideOnDesktop:t,hideOnMobile:a,children:l}=e;return t||a?(0,n.jsx)("div",{className:t&&a?"hidden":t?"md:hidden":"hidden md:block",children:l}):l}},6891:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>l,default:()=>s});var n=a(7876);let l="feature-table-key-value-pair",s=e=>{let{className:t,keyText:a,valueText:l}=e;return(0,n.jsxs)("div",{className:"pb-bt-spacing-10 border-b border-gs-5 flex".concat(t?" ".concat(t):""),children:[(0,n.jsx)("span",{className:"grow",children:a}),(0,n.jsx)("span",{children:l})]})}},6955:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>i,default:()=>r});var n=a(7876),l=a(4012),s=a(6733);let i="rich-image",r=e=>{let{image:t,imageMobile:a,className:i,first:r,blockVisibility:o}=e;return(0,n.jsx)(s.A,{...o,children:(0,n.jsxs)("div",{className:"relative flex align-center justify-center rounded-bt-radius-16 w-full min-h-[276px] lg:min-h-[376px] max-h-[500px] overflow-hidden".concat(i?" ".concat(i):""),children:[(0,n.jsx)(l.A,{src:t.src,alt:t.alt,fill:!0,sizes:"(max-width: 1000px) 100vw, 50vw",className:"object-cover".concat(a?" hidden md:block":""),priority:r,...!r&&{blurDatURL:t.blurDataURL,placeholder:"blur"},...t.focalPoint&&{focalPoint:t.focalPoint}}),a?(0,n.jsx)(l.A,{src:a.src,alt:a.alt,fill:!0,sizes:"(max-width: 1000px) 100vw, 50vw",className:"object-cover md:hidden",priority:r,...!r&&{blurDatURL:a.blurDataURL,placeholder:"blur"},...a.focalPoint&&{focalPoint:a.focalPoint}}):""]})})}},7137:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>s,default:()=>r,getPillButtonThemeClass:()=>i});var n=a(7876),l=a(3529);let s="pill-button",i=e=>{switch(e){case"2":return{background:"bg-bc-2"};case"3":return{background:"bg-bc-3"};case"4":return{background:"bg-bc-4"};default:return{background:"bg-bc-1"}}},r=e=>{let{text:t,link:a,theme:s,onBlur:r,onClick:o,onFocus:c,onMouseEnter:d,onMouseLeave:m}=e,u="inline-block text-gs-5 text-xs font-bold uppercase px-bt-spacing-8 py-bt-spacing-4 rounded-full tracking-wider shadow-pill-button hover:opacity-50",h=i(s);return a?(0,n.jsx)(l.A,{className:"".concat(u," ").concat(h.background),...a}):(0,n.jsx)("button",{className:"".concat(u," ").concat(h.background),onClick:o,onMouseEnter:d,onMouseLeave:m,onFocus:c,onBlur:r,children:t})}},7165:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>r,default:()=>o});var n=a(7876),l=a(4232),s=a(121),i=a(6733);let r="button-block",o=e=>{let{blockVisibility:t}=e,{buttonItems:a,className:r}=e,o=null==a?void 0:a.map((e,a)=>(0,l.createElement)(i.A,{...t,key:a},(0,n.jsx)(s.Ay,{...e})));return(0,n.jsx)(i.A,{...t,children:(0,n.jsx)("div",{className:"flex gap-bt-spacing-10".concat(r?" ".concat(r):""),children:o})})}},7174:(e,t,a)=>{a.d(t,{A:()=>h,w:()=>u});var n=a(7876),l=a(4232),s=a(942),i=a(7566),r=a(422),o=a(6080),c=a(1719),d=a(8053),m=a(929);let u="standard-page",h=e=>{let{system:t,contentBlocks:a,seo:u}=e,{siteFooter:h,siteHeader:p,systemOptions:g}=t,b=null==a?void 0:a.map((e,t)=>(null==e?void 0:e.blockComponent)?(0,l.createElement)(r.A,{...e,key:t,first:0===t,last:t===a.length-1}):(0,n.jsx)(i.default,{componentAlias:i.componentAlias,dynamicComponents:[e],mobileBlockComponent:null==e?void 0:e.mobileBlockComponent,first:0===t,last:t===a.length-1,blockLayout:{}},t));return(0,n.jsxs)(m.A,{enabled:g.customerEngagementEnabled,children:[(0,n.jsx)(s.A,{...u}),(0,n.jsx)(d.A,{...p}),(0,n.jsx)("main",{className:"bg-white py-xl",children:b}),(0,n.jsx)(c.A,{...h}),(0,n.jsx)(o.A,{})]})}},7343:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>l,default:()=>s});var n=a(7876);let l="feature-table-text-check",s=e=>{let{className:t,text:a}=e;return(0,n.jsxs)("div",{className:"pb-bt-spacing-10 border-b border-gs-5 flex items-center".concat(t?" ".concat(t):""),children:[(0,n.jsx)("span",{className:"grow",children:a}),(0,n.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{className:"stroke-pc-5",d:"M1.5 11.5L6.5 16.5L16.5 1.5",strokeWidth:"3",strokeLinecap:"round"})})]})}},7393:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>i,default:()=>r});var n=a(7876),l=a(5839),s=a(6733);let i="rich-text",r=e=>{let{blockVisibility:t}=e;return(0,n.jsx)(s.A,{...t,children:(0,n.jsx)(l.Ay,{...e,className:"rich-text-block"})})}},7566:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>c,default:()=>d});var n=a(7876),l=a(121),s=a(422),i=a(6733),r=a(4499),o=a(8122);let c="block-wrapper",d=e=>{let{dynamicComponents:t,className:a,button:c,first:d,blockLayout:m,blockVisibility:u,blockHeading:h}=e,{layout:p}=m,g=null==t?void 0:t.map((e,t)=>(0,n.jsx)("div",{className:"".concat((null==e?void 0:e.mobileBlockComponent)?"lg:":"").concat((0,r.AY)(m)),children:(0,n.jsx)(s.A,{...e,first:!!d&&0===t},t)},t));return p===r.ir?(0,n.jsx)(i.A,{...u,children:(0,n.jsxs)("div",{className:"flex flex-col py-bt-spacing-30 lg:py-bt-spacing-48 gap-bt-spacing-30 lg:gap-bt-spacing-48 ".concat((0,r.rt)(m)).concat(a?" ".concat(a):""),children:[h?(0,n.jsx)(o.A,{className:"text-center",...h}):"",g,c?(0,n.jsx)("div",{className:"text-center ".concat((0,r.rt)(m)),children:(0,n.jsx)(l.Ay,{...c})}):""]})}):(0,n.jsx)(i.A,{...u,children:(0,n.jsx)("div",{className:"".concat((0,r.rt)(m)).concat(a?" ".concat(a):""),children:(0,n.jsxs)("div",{className:"flex flex-col py-bt-spacing-30 lg:py-bt-spacing-48 gap-bt-spacing-30 lg:gap-bt-spacing-48",children:[h?(0,n.jsx)("div",{className:(0,r.AY)(m),children:(0,n.jsx)(o.A,{className:"text-center",...h})}):"",g,c?(0,n.jsx)("div",{className:"text-center ".concat((0,r.rt)(m)),children:(0,n.jsx)(l.Ay,{...c})}):""]})})})}},7678:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>i,default:()=>r});var n=a(7876),l=a(3529),s=a(4012);let i="site-footer-logo-item",r=e=>{let{link:t,image:a,className:i}=e,r=(0,n.jsx)(s.A,{className:"max-w-full",src:a.src,alt:a.alt,fill:!0,style:{objectFit:"contain"},sizes:"(max-width: 640px) 50vw, 20vw"});return t?(0,n.jsx)(l.A,{...t,rel:"nofollow noopener noreferrer",className:"flex relative align-items-center justify-center w-[170px] h-[56px]".concat(i?" ".concat(i):""),children:r}):(0,n.jsx)("div",{className:"flex relative align-items-center justify-center w-[170px] h-[56px]".concat(i?" ".concat(i):""),children:r})}},7680:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>d,default:()=>m});var n=a(7876),l=a(4232),s=a(7399),i=a.n(s);a(1702);var r=a(4012);let o=e=>{let{className:t,name:a,location:l,image:s,review:i}=e;return(0,n.jsxs)("div",{className:"bg-white h-full max-w-[360px] mx-bt-spacing-16 rounded-bt-radius-20 shadow-feature-card select-none".concat(t?" ".concat(t):""),children:[(0,n.jsx)("div",{className:"relative h-[50px]",children:(0,n.jsx)(r.A,{src:s.src,alt:s.alt,width:100,height:100,className:"absolute bg-white -top-[50px] left-half h-[100px] w-[100px] object-cover rounded-full transform -translate-x-1/2 mb-bt-spacing-16 shadow-icon-button"})}),(0,n.jsxs)("div",{className:"flex flex-col items-center justify-between mt-bt-spacing-16 text-center p-bt-spacing-24",children:[(0,n.jsx)("p",{className:"text-gs-2 font-semi-bold italic mb-bt-spacing-16",children:i}),(0,n.jsxs)("p",{className:"font-bold",children:[a,(0,n.jsx)("br",{}),l]})]})]})};var c=a(6733);let d="customer-review-block",m=e=>{let t=(0,l.useRef)(null),{className:a,customerReviewGroup:s,blockVisibility:r}=e,{displayName:d,reviews:m}=s,[u,h]=(0,l.useState)(0),[p,g]=(0,l.useState)(!0);(0,l.useEffect)(()=>{let e=setTimeout(()=>{g(!1)},1e3);return()=>{clearTimeout(e)}},[s]);let b=m.map((e,t)=>(0,n.jsx)(o,{...e},t)),x=m.map((e,a)=>(0,n.jsx)("li",{onClick:()=>{var e;null==(e=t.current)||e.slideTo(a)},"aria-label":"Go to slide ".concat(a+1),className:"block ".concat(u===a?"bg-sc-6":"bg-white"," transition-all hover:shadow-
1pill-button rounded-full w-bt-spacing-20 hover:scale-125 h-bt-spacing-20")},a));return(0,n.jsx)(c.A,{...r,children:(0,n.jsx)("div",{className:"customer-review-block bg-sc-5 ".concat(a?" ".concat(a):""),children:(0,n.jsxs)("div",{className:"container py-bt-spacing-30 lg:py-bt-spacing-48 ",children:[(0,n.jsx)("h2",{className:"text-center pb-bt-spacing-48",children:d}),p?(0,n.jsx)("div",{className:"flex justify-center items-center h-[380px]",children:(0,n.jsx)("p",{className:"pb-bt-spacing-10 text-gs-2",children:(0,n.jsx)("strong",{children:"Loading Reviewsâ¦"})})}):null,(0,n.jsx)("div",{className:"".concat(p?"opacity-0":"opacity-100"," transition-opacity duration-1000"),children:p?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i(),{items:b,responsive:{0:{items:1.5},480:{items:1.5},640:{items:2.5},768:{items:2.5},1e3:{items:3.5},1196:{items:3.5}},mouseTracking:!0,disableButtonsControls:!0,disableDotsControls:!0,ref:t,onSlideChanged:e=>{h(e.item)}}),(0,n.jsx)("nav",{children:(0,n.jsx)("ul",{className:"flex flex-wrap justify-center items-center gap-bt-spacing-10 cursor-pointer",children:x})})]})})]})})})}},7687:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>l,default:()=>i,getIconButtonThemeClass:()=>s});var n=a(7876);let l="icon-button",s=e=>"white"===e?{background:"bg-white",stroke:"stroke-pc-5",fill:"fill-pc-5"}:{background:" bg-pc-5",stroke:"stroke-white",fill:"fill-white"},i=e=>{let{icon:t,theme:a,shadow:l,className:i,onBlur:r,onClick:o,onFocus:c,onMouseEnter:d,onMouseLeave:m}=e,u=(0,n.jsx)(n.Fragment,{}),h=s(a);switch(t){case"arrow-up":u=(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{className:h.fill,d:"M13.0607 0.939341C12.4749 0.353554 11.5251 0.353554 10.9393 0.939341L1.3934 10.4853C0.807611 11.0711 0.807611 12.0208 1.3934 12.6066C1.97919 13.1924 2.92893 13.1924 3.51472 12.6066L12 4.12132L20.4853 12.6066C21.0711 13.1924 22.0208 13.1924 22.6066 12.6066C23.1924 12.0208 23.1924 11.0711 22.6066 10.4853L13.0607 0.939341ZM13.5 28L13.5 2H10.5L10.5 28H13.5Z"})});break;case"arrow-down":u=(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{className:h.stroke,d:"M2 2L11.6296 12L22 2",strokeWidth:"3"})});break;case"tick":u=(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{className:h.stroke,d:"M1.5 11.5L6.5 16.5L16.5 1.5",strokeWidth:"3",strokeLinecap:"round"})})}return(0,n.jsx)("button",{className:"inline-flex items-center justify-center rounded-full w-[50px] h-[50px] ".concat(h.background).concat(l?" shadow-icon-button":"").concat(i?" ".concat(i):""),onClick:o,onMouseEnter:d,onMouseLeave:m,onFocus:c,onBlur:r,children:u})}},7981:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>i,default:()=>r});var n=a(7876),l=a(5839),s=a(6733);let i="cost-chart",r=e=>{let{className:t,title:a,subtitle:i,chartTitle:r,disclaimer:o,chartData:c,blockVisibility:d}=e;return(0,n.jsx)(s.A,{...d,children:(0,n.jsx)("div",{className:"bg-white ".concat(t?" ".concat(t):""),children:(0,n.jsxs)("div",{className:"container flex flex-col py-bt-spacing-30 lg:py-bt-spacing-48 gap-bt-spacing-30",children:[(0,n.jsxs)("div",{className:"text-center",children:[a&&(0,n.jsx)("h2",{children:a}),i&&(0,n.jsx)("div",{className:"mt-bt-spacing-30 lg:text-2xl",children:i})]}),(0,n.jsxs)("div",{className:"bg-white rounded-bt-radius-16 sm:p-bt-spacing-24 lg:p-bt-spacing-30 sm:shadow-feature-card",children:[r&&(0,n.jsx)("div",{className:"mb-bt-spacing-30 text-xl font-bold",children:r}),(0,n.jsxs)("table",{className:"w-full text-center",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{className:"text-white",children:[(0,n.jsx)("th",{className:"py-bt-spacing-12 bg-pc-5 border border-white",children:"Borrow"}),(0,n.jsx)("th",{className:"py-bt-spacing-12 bg-pc-5 border border-white",children:"Costs"}),(0,n.jsx)("th",{className:"py-bt-spacing-12 bg-pc-5 border border-white",children:"Repay"})]})}),(0,n.jsx)("tbody",{children:null==c?void 0:c.map(e=>[(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"py-bt-spacing-12 font-bold",children:e.borrow}),(0,n.jsx)("td",{className:"py-bt-spacing-12 font-bold border-x border-gs-2/25",children:e.costs}),(0,n.jsx)("td",{className:"py-bt-spacing-12 font-bold",children:e.repay})]},"cost-chart-block-values-".concat(e.borrow).concat(e.costs).concat(e.repay)),(0,n.jsx)("tr",{children:(0,n.jsx)("td",{className:"p-bt-spacing-12 bg-sc-5 text-sm",colSpan:3,children:e.info})},"cost-chart-block-info-".concat(e.borrow).concat(e.costs).concat(e.repay))])})]}),o&&(0,n.jsx)(l.Ay,{className:"mt-bt-spacing-30",componentAlias:l.w9,text:o})]})]})})})}},8053:(e,t,a)=>{a.d(t,{A:()=>h});var n=a(7876),l=a(4232),s=a(121),i=a(4012),r=a(3529);let o=e=>{let{className:t,...a}=e;return(0,n.jsx)("nav",{className:"text-pc-5 py-bt-spacing-16 px-bt-spacing-20".concat(t?" ".concat(t):""),children:(0,n.jsx)(r.A,{...a})})},c=e=>{let{link:t,subLinks:a,className:s}=e,[i,c]=(0,l.useState)(!1),d=null==a?void 0:a.map((e,t)=>(0,l.createElement)(o,{...e,key:t,onClick:()=>c(!1)}));return(0,n.jsxs)("div",{className:"font-bold text-white py-bt-spacing-28 relative".concat(s?" ".concat(s):""),onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:[(0,n.jsx)("nav",{children:d&&d.length?(0,n.jsxs)(r.A,{...t,className:"flex items-center gap-bt-spacing-3",onClick:()=>c(!1),children:[(0,n.jsx)("span",{children:t.name}
1),(0,n.jsx)("svg",{width:"15",height:"9",viewBox:"0 0 15 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{className:"stroke-white",d:"M14 1L7.5 7L1 0.999999",strokeWidth:"1.5"})})]}):(0,n.jsx)(r.A,{...t})}),(0,n.jsx)("div",{className:i&&d&&d.length?"absolute top-full left-0 flex flex-col bg-sc-5 p-bt-spacing-12 w-[280px] rounded-bl-bt-radius-20 rounded-r-bt-radius-20 z-header-menu shadow-header":"hidden",children:d})]})},d=e=>{let{children:t,link:a,className:l,onClick:s,callback:i}=e;return(0,n.jsx)("div",{className:"px-bt-spacing-20 py-bt-spacing-12 text-white font-semibold".concat(s?" cursor-pointer":"").concat(l?" ".concat(l):""),...s?{onClick:s}:{onClick:i},children:s?t||a.name:(0,n.jsx)("nav",{children:(0,n.jsx)(r.A,{...a})})})},m=e=>{var t;let{navItems:a,className:i,callback:r,mainCtaLink:o}=e,[c,m]=(0,l.useState)(0),u=null==(t=(e=>{if(!e)return[];let t=[];return t.push([]),null==e||e.forEach(e=>{let{subLinks:a,link:n}=e;if(!a||0===a.length)return void t[0].push({link:n});let l=t.length;t[0].push({goTo:l,link:n}),t.push(null==a?void 0:a.map(e=>({link:e}))),t[l].unshift({link:n}),t[l].unshift({goTo:0,link:{name:"Back",url:"#"}})}),t})(a)[c])?void 0:t.map((e,t)=>{let{goTo:a}=e;return 0===a?(0,n.jsx)(d,{callback:r,...e,...void 0!==a&&{onClick:()=>m(a)},children:(0,n.jsx)("svg",{width:"15",height:"12",viewBox:"0 0 15 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M0.46967 6.53033C0.176777 6.23744 0.176777 5.76256 0.46967 5.46967L5.24264 0.696699C5.53553 0.403806 6.01041 0.403806 6.3033 0.696699C6.59619 0.989593 6.59619 1.46447 6.3033 1.75736L2.06066 6L6.3033 10.2426C6.59619 10.5355 6.59619 11.0104 6.3033 11.3033C6.01041 11.5962 5.53553 11.5962 5.24264 11.3033L0.46967 6.53033ZM14.5 6.75H1V5.25H14.5V6.75Z",fill:"#ffffff"})})},t):(0,n.jsx)(d,{callback:r,...e,...void 0!==a&&{onClick:()=>m(a)}},t)});return(0,n.jsxs)("div",{className:"bg-pc-5 p-bt-spacing-12 pt-bt-spacing-26 rounded-b-bt-radius-20 shadow-header".concat(i?" ".concat(i):""),children:[(0,n.jsx)("div",{children:u}),(0,n.jsx)("div",{className:"text-center",children:o?(0,n.jsx)(s.Ay,{arrow:!0,className:"sm:hidden mt-bt-spacing-16",componentAlias:s.w9,theme:"secondary",link:o,onClick:r}):""})]})},u=e=>{let{className:t,isOpen:a,onClick:l}=e;return(0,n.jsx)("div",{className:"flex items-center justify-center px-bt-spacing-16 cursor-pointer".concat(t?" ".concat(t):""),onClick:l,role:"button","aria-pressed":a,"aria-label":a?"Close menu":"Open menu",tabIndex:0,children:a?(0,n.jsxs)("svg",{width:"24",height:"18",viewBox:"0 0 17.68 17.68",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{className:"stroke-white",d:"M.35.35l16.97,16.97",fill:"none",strokeWidth:"2"}),(0,n.jsx)("path",{className:"stroke-white",d:"M.35,17.32L17.32.35",fill:"none",strokeWidth:"2"})]}):(0,n.jsxs)("svg",{width:"24",height:"18",viewBox:"0 0 24 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{className:"stroke-white",d:"M0 1H24",strokeWidth:"2"}),(0,n.jsx)("path",{className:"stroke-white",d:"M0 8.81396H24",strokeWidth:"2"}),(0,n.jsx)("path",{className:"stroke-white",d:"M0 17H24",strokeWidth:"2"})]})})},h=e=>{var t,a;let{className:o,logo:d,mainCtaLink:h,navItems:p}=e,[g,b]=(0,l.useState)(!1),[x,f]=(0,l.useState)(0),v=(0,l.useRef)(null);(0,l.useEffect)(()=>{v.current&&f(v.current.clientHeight)},[e]);let j=null==p?void 0:p.map((e,t)=>(0,l.createElement)(c,{...e,key:t,className:"hidden lg:block"}));return(0,n.jsx)("header",{className:o,style:{height:"".concat(x,"px")},children:(0,n.jsx)("div",{ref:v,className:"site-header fixed top-0 left-0 right-0 bg-pc-5 text-white z-header",children:(0,n.jsxs)("div",{className:"container py-bt-spacing-12 lg:py-0 relative",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("div",{className:"grow",children:d?(0,n.jsx)(r.A,{url:"/",children:(0,n.jsx)(i.A,{className:"sm:w-[13.125rem] sm:h-[3.3125rem]",src:d.src,alt:d.alt,width:null!=(t=d.width)?t:140,height:null!=(a=d.height)?a:72,priority:!0})}):""}),(0,n.jsxs)("div",{className:"flex items-center gap-bt-spacing-16 xl:gap-bt-spacing-30",children:[j,h?(0,n.jsx)(s.Ay,{className:"max-sm:py-bt-spacing-8 shrink-0",componentAlias:s.w9,theme:"secondary",link:h}):"",(0,n.jsx)(u,{className:"lg:hidden",isOpen:g,onClick:()=>b(!g)})]})]}),(0,n.jsx)(m,{navItems:p,callback:()=>{b(!1)},className:g?"lg:hidden absolute top-full left-0 right-0 z-header-menu":"hidden"})]})})})}},8122:(e,t,a)=>{a.d(t,{A:()=>s});var n=a(7876);let l=e=>{let{className:t,text:a,tag:l}=e;return"h1"===l?(0,n.jsx)("h1",{className:"".concat(t?" ".concat(t):""),children:a}):"h2"===l?(0,n.jsx)("h2",{className:"".concat(t?" ".concat(t):""),children:a}):"h3"===l?(0,n.jsx)("h3",{className:"".concat(t?" ".concat(t):""),children:a}):"h4"===l?(0,n.jsx)("h4",{className:"".concat(t?" ".concat(t):""),children:a}):(0,n.jsx)("div",{className:"".concat(t?" ".concat(t):""),children:a})},s=e=>(0,n.jsx)(l,{...e})},8630:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>h,default:()=>b,getFormLayoutClass:()=>p});var n=a(7876),l=a(121),s=a(2895);let i={PVIF:function(e,t){return Math.pow(1+e,t)},FVIFA:function(e,t){return 0==e?t:(this.PVIF(e,t)-1)/e},PMT:function(e,t,a,n,l){if(n||(n=0),l||(l=0),0==e)return-(a+n)/t;var s=Math.pow(1+e,t),i=-(e/(s-1)*(a*s+n));return 1==l&&(i/=1+e),i},IPMT:function(e,t,a,n){var l=Math.pow(1+a,n);return 0-(e*l*a+t*(l-1))},PPMT:function(e,t,a,n,l,s){if(t<1||t>=a+1)return null;var i=this.PMT(e,a,n,l,s),r=this.IPMT(n,i,e,t-1);return i-r},DaysBetween:function(e,t){return Math.round(Math.abs((e.getTime()-t.getTime())/864e5))},XNPV:function(e,t){var a=0;for(var n in t){var l=t[n];a+=l.Flow/Math.pow(1+e,l.Period)}return a},XIRR:function(e,t){t||(t=.1);
1for(var a=0,n=t,l=this.XNPV(a,e),s=this.XNPV(n,e),i=0;i<100&&!(l*s<0);i++)Math.abs(l)<Math.abs(s)?l=this.XNPV(a+=1.6*(a-n),e):s=this.XNPV(n+=1.6*(n-a),e);if(l*s>0)return null;if(0>this.XNPV(a,e))var r=a,o=n-a;else var r=n,o=a-n;for(var i=0;i<100;i++){var c=r+(o*=.5),d=this.XNPV(c,e);if(d<=0&&(r=c),1e-6>Math.abs(d)||1e-6>Math.abs(o))return c}return null}};var r=a(5662),o=a(4232),c=a(7393),d=a(4934),m=a(5499),u=a(6733);let h="loan-calculator",p=e=>"Narrow"===e?{mainWrap:"flex flex-col gap-bt-spacing-16 md:gap-bt-spacing-32"}:{mainWrap:"lg:grid lg:grid-cols-2 gap-bt-spacing-16 md:gap-bt-spacing-32"};class g extends o.Component{formatCurrency(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"$".concat(e.toFixed(t))}formatNumber(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.toFixed(t)}formatPecentage(e){return"".concat((e/100).toFixed(2),"%")}formatTerm(e){return"".concat(e," years")}calculateRepayments(e,t,a,n){let l=Math.abs(i.PMT(a/100/1200,12*t,e+this.config.aggregateCreditFees,-n,0))+this.config.monthlyAdminFee;return{weekly:this.formatCurrency(100*l*(12/52)/100,2),fortnightly:this.formatCurrency(100*l*(12/26)/100,2),monthly:this.formatCurrency(100*l/100,2)}}preventRangeInputFocus(e){"range"===e.target.type&&document.activeElement instanceof HTMLElement&&document.activeElement.blur()}onLoanTypeChange(e){let{value:t}=e.target;this.setState({loanType:t})}onPaymentFrequencyChange(e){let{value:t}=e.target;this.setState({paymentFrequency:t})}onLoanAmountChange(e){let{balloonPercentage:t,loanTerm:a,interestRate:n,balloonAmount:l}=this.state,s=Number(e.target.value.replace(/[^\d.]/ug,""));s>this.config.maxLoanAmount&&(s=this.config.maxLoanAmount);let i=s*(t.range/1e4);this.setState({loanAmount:{text:this.formatNumber(s),range:s},balloonAmount:{text:this.formatNumber(i),range:i},repayments:this.calculateRepayments(s,a.range,n.range,l.range)})}onLoanAmountBlur(e){let{loanTerm:t,interestRate:a,balloonAmount:n}=this.state,l=Number(e.target.value.replace(/[^\d.]/ug,""));l<this.config.minLoanAmount&&(l=this.config.minLoanAmount),this.setState({loanAmount:{text:this.formatNumber(l),range:l},repayments:this.calculateRepayments(l,t.range,a.range,n.range)})}onLoanTermChange(e){let{loanAmount:t,interestRate:a,balloonAmount:n}=this.state,l=Number(e.target.value.replace(/[^\d]/ug,""));l>this.config.maxLoanTerm&&(l=this.config.maxLoanTerm),this.setState({loanTerm:{text:this.formatTerm(l),range:l},repayments:this.calculateRepayments(t.range,l,a.range,n.range)})}onLoanTermBlur(e){let{loanAmount:t,interestRate:a,balloonAmount:n}=this.state,l=Number(e.target.value.replace(/[^\d]/ug,""));this.preventRangeInputFocus(e),l<this.config.minLoanTerm&&(l=this.config.minLoanTerm),this.setState({loanTerm:{text:this.formatTerm(l),range:l},repayments:this.calculateRepayments(t.range,l,a.range,n.range)})}onInterestRateChange(e){let{loanAmount:t,loanTerm:a,balloonAmount:n}=this.state,l=Number(e.target.value.replace(/[^\d]/ug,""));this.preventRangeInputFocus(e),l>this.config.maxInterestRate&&(l=this.config.maxInterestRate),this.setState({interestRate:{text:this.formatPecentage(l),range:l},repayments:this.calculateRepayments(t.range,a.range,l,n.range)})}onInterestRateBlur(e){let{loanAmount:t,loanTerm:a,balloonAmount:n}=this.state,l=Number(e.target.value.replace(/[^\d]/ug,""));this.preventRangeInputFocus(e),l<this.config.minInterestRate&&(l=this.config.minInterestRate),this.setState({interestRate:{text:this.formatPecentage(l),range:l},repayments:this.calculateRepayments(t.range,a.range,l,n.range)})}onBalloonPercentageChange(e){let{loanAmount:t,loanTerm:a,interestRate:n}=this.state,l=Number(e.target.value.replace(/[^\d]/ug,""));l>this.config.maxBalloonPercentage&&(l=this.config.maxBalloonPercentage),"range"===e.target.type&&(l=Math.round(l/this.balloonPercentageStep)*this.balloonPercentageStep);let s=l/1e4*t.range;this.setState({balloonPercentage:{text:this.formatPecentage(l),range:l},balloonAmount:{text:this.formatNumber(s),range:s},repayments:this.calculateRepayments(t.range,a.range,n.range,s)})}onBalloonPercentageBlur(e){let{loanAmount:t,loanTerm:a,interestRate:n}=this.state,l=Number(e.target.value.replace(/[^\d]/ug,""));this.preventRangeInputFocus(e),l<this.config.minBalloonPercentage&&(l=this.config.minBalloonPercentage);let s=l/1e4*t.range;this.setState({balloonPercentage:{text:this.formatPecentage(l),range:l},balloonAmount:{text:this.formatNumber(s),range:s},repayments:this.calculateRepayments(t.range,a.range,n.range,s)})}onBalloonAmountChange(e){let{loanAmount:t,loanTerm:a,interestRate:n}=this.state,l=Number(e.target.value.replace(/[^\d.]/ug,""));this.preventRangeInputFocus(e),l>this.config.maxBalloonAmount&&(l=this.config.maxBalloonAmount),"range"===e.target.type&&(l=Math.round(l/this.balloonAmountStep)*this.balloonAmountStep);let s=l/t.range*1e4;s>this.config.maxBalloonPercentage&&(s=this.config.maxBalloonPercentage),this.setState({balloonAmount:{text:this.formatNumber(l),range:l},balloonPercentage:{text:this.formatPecentage(s),range:s},repayments:this.calculateRepayments(t.range,a.range,n.range,l)})}onBalloonAmountBlur(e){let{loanAmount:t,loanTerm:a,interestRate:n}=this.state,l=Number(e.target.value.replace(/[^\d.]/ug,""));l<this.config.minBalloonAmount&&(l=this.config.minBalloonAmount);let s=l/t.range*1e4;s>this.config.maxBalloonPercentage&&(s=this.config.maxBalloonPercentage),this.setState({balloonAmount:{text:this.formatCurrency(l),range:l},balloonPercentage:{text:this.formatPecentage(s),range:s},repayments:this.calculateRepayments(t.range,a.range,n.range,l)})}render(){let{id:e,className:t,applyNowLink:a,disclaimerText:i,layout:o,blockVisibility:h}=this.props,{loanAmount:g,loanTerm:b,interestRate:x,paymentFrequency:f,balloonPercentage:v,balloonAmount:j,repayments:w}=this.state,y="";switch(f){case"weekly":y=w.weekly;break;case"fortnightly":y=w.fortnightly;break;default:y=w.monthly}let N=Array.from({length:this.config.maxLoanTerm-this.config.minLoanTerm+1},(e,t)=>{let a=t+this.config.minLoanTerm;return{key:"".concat(a),value:"".concat(a," years")}}),A=p(o);return(0,n.jsx)(u.A,{...h,children:(0,n.jsx)("form",{className:t,id:e,onSubmit:e=>{e.preventDefault()},children:(0,n.jsxs)("div",{className:A.mainWrap,children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"mb-bt-spacing-16",children:[(0,n.jsx)("label",{className:"block mb-bt-spacing-12 text-black",htmlFor:"loanAmountRange",children:"Your Loan Amount"}),(0,n.jsx)(s.A,{min:this.config.minLoanAmount,max:this.config.maxLoanAmount,name:"loanAmountRange",id:"loanAmountRange",value:g.text,onChange:this.onLoanAmountChange})]}),(0,n.jsxs)("div",{className:"mb-bt-spacing-16 grid grid-cols-1 sm:grid-cols-2 gap-bt-spacing-16 md:gap-bt-spacing-32",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block mb-bt-spacing-12 text-black",htmlFor:"paymentFrequency",children:"Payment Frequency"}),(0,n.jsx)(d.A,{name:"paymentFrequency",id:"paymentFrequency",value:f,options:[{key:"weekly",value:"Weekly"},{key:"fortnightly",value:"Fortnightly"},{key:"monthly",value:"Monthly"}],onChange:this.onPaymentFrequencyChange})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block mb-bt-spacing-12 text-black",htmlFor:"loanTermRange",children:"Loan Term"}),(0,n.jsx)(d.A,{name:"loanTermRange",id:"loanTermRange",value:b.range.toString(),options:N,onChange:this.onLoanTermChange})]})]}),(0,n.jsxs)("div",{className:"mb-bt-spacing-16",children:[(0,n.jsx)("label",{className:"block mb-bt-spacing-12 text-black",htmlFor:"interestRateRange",children:"Interest Rate *"}),(0,n.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 lg:grid-cols-3 gap-bt-spacing-16
1items-center",children:[(0,n.jsx)(r.A,{min:this.config.minInterestRate,max:this.config.maxInterestRate,name:"interestRateRange",value:x.range,onChange:this.onInterestRateChange,className:"sm:col-span-2 md:col-span-4 lg:col-span-2"}),(0,n.jsx)(m.A,{min:this.config.minInterestRate,max:this.config.maxInterestRate,name:"interestRateRange",id:"interestRateRange",value:x.text,onChange:this.onInterestRateChange})]})]}),(0,n.jsx)("div",{className:"text-pc-5 text-lg font-bold mb-bt-spacing-16",children:"Your Balloon Repayment"}),(0,n.jsxs)("div",{className:"mb-bt-spacing-16",children:[(0,n.jsx)("label",{className:"block mb-bt-spacing-12 text-black",htmlFor:"balloonPercentageRange",children:"Balloon Percentage"}),(0,n.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 lg:grid-cols-3 gap-bt-spacing-16 items-center",children:[(0,n.jsx)(r.A,{min:this.config.minBalloonPercentage,max:this.config.maxBalloonPercentage,name:"balloonPercentageRange",step:v.range%this.balloonPercentageStep?1:this.balloonPercentageStep,value:v.range,onChange:this.onBalloonPercentageChange,className:"sm:col-span-2 md:col-span-4 lg:col-span-2"}),(0,n.jsx)(m.A,{min:this.config.minBalloonPercentage,max:this.config.maxBalloonPercentage,name:"balloonPercentageRange",id:"balloonPercentageRange",value:v.text,onChange:this.onBalloonPercentageChange})]})]}),(0,n.jsxs)("div",{className:"mb-bt-spacing-16",children:[(0,n.jsx)("label",{className:"block mb-bt-spacing-12 text-black",htmlFor:"balloonAmountRange",children:"Balloon Amount"}),(0,n.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 lg:grid-cols-3 gap-bt-spacing-16 items-center",children:[(0,n.jsx)(r.A,{min:this.config.minBalloonAmount,max:.5*g.range,step:j.range%this.balloonAmountStep?1:this.balloonAmountStep,name:"balloonAmountRange",value:j.range,onChange:this.onBalloonAmountChange,className:"sm:col-span-2 md:col-span-4 lg:col-span-2"}),(0,n.jsx)(s.A,{min:this.config.minBalloonAmount,max:.5*g.range,name:"balloonAmountRange",id:"balloonAmountRange",value:j.text,onChange:this.onBalloonAmountChange})]})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"mb-bt-spacing-12 text-black",children:"Repayment Amount"}),(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center bg-sc-5 p-bt-spacing-20 mb-bt-spacing-16 border-2 border-pc-5 rounded-bt-radius-8 text-pc-5",children:[(0,n.jsx)("div",{className:"block text-7xl leading-2xl font-bold",children:y}),(0,n.jsx)("div",{className:"text-sm",children:"Includes fees and charges*"}),(0,n.jsx)("div",{className:"capitalize",children:f})]}),(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)(l.Ay,{componentAlias:l.w9,link:a,arrow:!0})}),i?(0,n.jsx)(c.default,{componentAlias:c.componentAlias,text:i,className:"mt-bt-spacing-32"}):""]})]})})})}constructor(e){super(e),this.balloonPercentageStep=1e3,this.balloonAmountStep=500;let{config:t}=this.props;this.config=t,this.state={loanAmount:{range:this.config.initialLoanAmount,text:this.formatNumber(this.config.initialLoanAmount)},loanTerm:{range:this.config.initialLoanTerm,text:this.formatTerm(this.config.initialLoanTerm)},interestRate:{range:this.config.initialInterestRate,text:this.formatPecentage(this.config.initialInterestRate)},balloonPercentage:{text:this.formatPecentage(this.config.initialBalloonPercentage),range:this.config.initialBalloonPercentage},balloonAmount:{text:this.formatNumber(this.config.initialBalloonAmount),range:this.config.initialBalloonAmount},paymentFrequency:this.config.initialPaymentFrequency,loanType:this.config.initialLoanType,repayments:this.calculateRepayments(this.config.initialLoanAmount,this.config.initialLoanTerm,this.config.initialInterestRate,this.config.initialBalloonAmount)},this.calculateRepayments=this.calculateRepayments.bind(this),this.onLoanTypeChange=this.onLoanTypeChange.bind(this),this.onPaymentFrequencyChange=this.onPaymentFrequencyChange.bind(this),this.onLoanAmountChange=this.onLoanAmountChange.bind(this),this.onLoanAmountBlur=this.onLoanAmountBlur.bind(this),this.onLoanTermChange=this.onLoanTermChange.bind(this),this.onLoanTermBlur=this.onLoanTermBlur.bind(this),this.onInterestRateChange=this.onInterestRateChange.bind(this),this.onBalloonPercentageChange=this.onBalloonPercentageChange.bind(this),this.onBalloonPercentageBlur=this.onBalloonPercentageBlur.bind(this),this.onBalloonAmountChange=this.onBalloonAmountChange.bind(this),this.onBalloonAmountBlur=this.onBalloonAmountBlur.bind(this)}}let b=g},8820:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>d,default:()=>m});var n=a(7876),l=a(4232),s=a(4012),i=a(3529),r=a(4e3);let o=e=>{let{text:t,image:a,mobileImage:l,link:o,className:c}=e,d=(0,r.useRouter)();return(0,n.jsxs)("div",{className:"h-[284px] group bg-white p-bt-spacing-30 border-3 border-pc-5 rounded-bt-radius-16 cursor-pointer shadow-feature-card".concat(c?" ".concat(c):""),onClick:()=>{d.push(o.url)},children:[(0,n.jsxs)("div",{className:"relative h-full max-h-[180px] w-full overflow-hidden z-fill-image mb-bt-spacing-16",children:[(0,n.jsx)(s.A,{src:a.src,alt:a.alt,className:"object-cover rounded-bt-radius-8".concat(l?" hidden lg:block":""),fill:!0,sizes:"(max-width: 1000px) 100v
1w, 20vw",placeholder:"blur",blurDataURL:a.blurDataURL,...a.focalPoint&&{focalPoint:a.focalPoint}}),l&&(0,n.jsx)(s.A,{src:l.src,alt:l.alt,className:"object-cover rounded-bt-radius-8 absolute top-0 left-0 w-full h-full lg:hidden",fill:!0,placeholder:"blur",sizes:"100vw",blurDataURL:l.blurDataURL,...l.focalPoint&&{focalPoint:l.focalPoint}})]}),(0,n.jsx)(i.A,{url:o.url,className:"text-pc-5 font-bold text-2xl leading-sm lg:leading-md text-center group-hover:underline",children:t})]})};var c=a(6733);let d="related-product-card-grid",m=e=>{let{relatedProductCards:t,className:a,blockVisibility:s}=e,i=null==t?void 0:t.map((e,t)=>(0,l.createElement)(o,{...e,key:t}));return(0,n.jsx)(c.A,{...s,children:(0,n.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-bt-spacing-24".concat(a?" ".concat(a):""),children:i})})}},9027:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>g,default:()=>x});var n=a(7876),l=a(630),s=a(4232),i=a(4934),r=a(4310),o=a(5377),c=a(5499),d=a(8239);function m(e){let{className:t,id:a,onChange:l}=e;return(0,n.jsx)(d.A,{className:t,id:a,sitekey:"6LfNxfcqAAAAAL6p9ltM2-Ih_ETQTZkeddz7i06v",onChange:l})}let u=e=>{let{className:t,...a}=e;return(0,n.jsx)("textarea",{className:"".concat(c.J," ").concat(t),...a})},h=e=>{let{className:t,text:a,children:l,type:s}=e;return(0,n.jsx)("div",{className:"".concat(("error"===s?{message:"msg-error flex items-center gap-bt-spacing-20 p-bt-spacing-20 border-2 border-gs-2/25 rounded-bt-radius-12 mb-bt-spacing-20"}:{message:"msg-success flex items-center gap-bt-spacing-20 p-bt-spacing-20 border-2 border-sc-4 rounded-bt-radius-12 mb-bt-spacing-20"}).message).concat(t?" ".concat(t):""),children:l||a})};var p=a(6733);let g="contact-us-form";class b extends s.Component{componentDidMount(){(async()=>{let e=await fetch("/api/contact-us/form-data"),t=await e.json(),a={};try{let e=await fetch("https://ipinfo.io?token=7220a43d1c2fd7");a=await e.json()}catch(e){console.error("Error fetching IP Info",e),a={}}e.ok&&this.setState({fields:{...this.state.fields,...t,...a.ip&&{ipAddress:a.ip},...a.city&&{xcity:a.city},...a.region&&{xregion:a.region}}})})()}onCaptchaChange(e){let{fields:t,errors:a}=this.state;e&&delete a.captcha,t.captcha=null!=e?e:"",this.setState({fields:t,errors:a,isError:Object.keys(a).length>0})}onInputChange(e){let{name:t,value:a}=e.target,{fields:n,errors:l}=this.state;a&&delete l[t],n[t]=a,this.setState({fields:n,errors:l,isError:Object.keys(l).length>0})}handleValidation(){let{fields:e}=this.state,t=!0,a={};for(let n in e){if(!e[n]){if(["loanContractNumber","suba","subb","subc","subd","ipAddress","xRegion","xCity"].includes(n))continue;t=!1;let e=n.replace(/(^[a-z]|[A-Z])/gu,e=>" ".concat(e[0].toUpperCase()));a[n]="".concat(e," is required.")}"email"===n&&(/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/u.test(e[n])||(t=!1,a[n]="Please enter a valid email address.")),"confirmEmail"===n&&e.email!==e.confirmEmail&&(t=!1,a[n]="Email addresses do not match.")}return this.setState({errors:a,isError:!t}),t}async onSubmit(e){(e||window.event).preventDefault();let{fields:t}=this.state;if(!this.handleValidation())return;this.setState({working:!0,errorAlert:!1,successAlert:!1});let a=await fetch("/api/mail/contact-us",{body:JSON.stringify(t),headers:{"Content-Type":"application/json"},method:"POST"});if(!a.ok)return void this.setState({working:!1,errorAlert:!0});try{let{error:e}=await a.json();if(e)return void this.setState({working:!1,errorAlert:!0});for(let e in t){if("enquiryType"===e){var n,l;t[e]=(null==(n=this.props.enquiryTypes)?void 0:n.length)===1?this.props.enquiryTypes[0]:null!=(l=this.props.defaultEnquiryType)?l:"";continue}t[e]=""}this.setState({working:!1,fields:t,successAlert:!0})}catch(e){this.setState({working:!1,errorAlert:!0})}}render(){let{className:e,id:t,enquiryTypes:a,blockVisibility:s}=this.props,{fields:d,errors:g,working:b,successAlert:x,errorAlert:f,isError:v}=this.state,{enquiryType:j,name:w,phone:y,email:N,confirmEmail:A,message:k,loanContractNumber:P}=d,C=[{key:"",value:"Select an enquiry type"}];return null==a||a.forEach(e=>{C.push({key:e,value:e})}),(0,n.jsx)(p.A,{...s,children:(0,n.jsxs)("form",{className:"contact-us-form ".concat(e?" ".concat(e):""),id:t,onSubmit:this.onSubmit,children:[(0,n.jsxs)("div",{className:"lg:grid lg:grid-cols-2 gap-bt-spacing-30",children:[(null==a?void 0:a.length)>1&&(0,n.jsxs)("div",{className:"mb-bt-spacing-30",children:[(0,n.jsx)("label",{htmlFor:"team-member",className:"block font-bold mb-bt-spacing-5",children:"Enquiry Type"}),(0,n.jsx)(i.A,{id:"enquiryType",name:"enquiryType",options:C,value:j,onChange:this.onInputChange}),g.enquiryType?(0,n.jsx)("span",{className:"text-danger text-sm",children:g.enquiryType}):null]}),(0,n.jsxs)("div",{className:"mb-bt-spacing-30",children:[(0,n.jsx)("label",{htmlFor:"loanContractNumber",className:"block font-bold mb-bt-spacing-5",children:"Loan Contract Number"}),(0,n.jsx)(c.A,{id:"loanContractNumber",name:"loanContractNumber",type:"text",placeholder:"Loan contract number (if applicable)",value:P,onChange:this.onInputChange,required:!1,maxLength:12}),g.name?(0,n.jsx)("span",{className:"text-danger text-sm",children:g.name}):null]})]}),(0,n.jsxs)("div",{className:"lg:grid lg:grid-cols-2 gap-bt-spacing-30",children:[(0,n.jsxs)("div",{className:"mb-bt-spacing-30",children:[(0,n.jsx)("label",{htmlFor:"name",className:"block font-bold mb-bt-spacing-5",children:"Name *"}),(0,n.jsx)(c.A,{id:"name",name:"name",type:"text",placeholder:"Enter your name",value:w,onChange:this.onInputChange,required:!0}),g.name?(0,n.jsx)("span",{className:"text-danger text-sm",children:g.name}):null]}),(0,n.jsxs)("div",{className:"mb-bt-spacing-30",children:[(0,n.jsx)("label",{htmlFor:"phone",className:"block font-bold mb-bt-spacing-5",children:"Contact Number *"}),(0,n.jsx)(o.A,{id:"phone",name:"phone",type:"tel",placeholder:"Enter a landline or mobile number",value:y,onChange:this.onInputChange,required:!0}),g.phone?(0,n.jsx)("span",{className:"text-danger text-sm",children:g.phone}):null]})]}),(0,n.jsxs)("div",{className:"mb-bt-spacing-30",children:[(0,n.jsx)("label",{htmlFor:"email",className:"block font-bold mb-bt-spacing-5",children:"Email *"}),(0,n.jsx)(l.A,{id:"email",name:"email",type:"email",placeholder:"Enter a valid email address",value:N,onChange:this.onInputChange,required:!0}),g.email?(0,n.jsx)("span",{className:"text-danger text-sm",children:g.email}):null]}),(0,n.jsxs)("div",{className:"mb-bt-spacing-30",children:[(0,n.jsx)("label",{htmlFor:"email",className:"block font-bold mb-bt-spacing-5",children:"Confirm Email *"}
1),(0,n.jsx)(l.A,{id:"confirmEmail",name:"confirmEmail",type:"email",placeholder:"Confirm your email address",value:A,onChange:this.onInputChange,required:!0}),g.confirmEmail?(0,n.jsx)("span",{className:"text-danger text-sm",children:g.confirmEmail}):null]}),(0,n.jsxs)("div",{className:"mb-bt-spacing-30",children:[(0,n.jsx)("label",{htmlFor:"message",className:"block font-bold mb-bt-spacing-5",children:"Message *"}),(0,n.jsx)(u,{id:"message",name:"message",placeholder:"Enter your message",value:k,onChange:this.onInputChange,required:!0,rows:8,maxLength:500}),g.message?(0,n.jsx)("span",{className:"text-danger text-sm",children:g.message}):null]}),(0,n.jsxs)("div",{className:"mb-bt-spacing-30",children:[(0,n.jsx)(m,{onChange:this.onCaptchaChange}),g.captcha?(0,n.jsx)("span",{className:"text-danger text-sm",children:g.captcha}):null]}),f?(0,n.jsx)(h,{type:"error",text:"An error occurred while submitting the form. Please try again later."}):null,x?(0,n.jsx)(h,{type:"success",text:"Your enquiry has been submitted successfully. We will get back to you shortly."}):null,(0,n.jsx)(r.A,{value:b?"Please waitâ¦":"Send Message"}),v?(0,n.jsx)("p",{className:"text-danger text-sm mt-bt-spacing-16",children:"The form contains errors. Please correct them before submitting."}):null]})})}constructor(e){var t,a;super(e),this.state={fields:{enquiryType:(null==(t=e.enquiryTypes)?void 0:t.length)===1?e.enquiryTypes[0]:null!=(a=e.defaultEnquiryType)?a:"",name:"",phone:"",email:"",confirmEmail:"",message:"",loanContractNumber:"",captcha:"",suba:"",subb:"",subc:"",subd:"",ipAddress:"",xRegion:"",xCity:""},errors:{},isError:!1,working:!1,errorAlert:!1,successAlert:!1},this.handleValidation=this.handleValidation.bind(this),this.onCaptchaChange=this.onCaptchaChange.bind(this),this.onInputChange=this.onInputChange.bind(this),this.onSubmit=this.onSubmit.bind(this)}}let x=b},9042:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>i,default:()=>r});var n=a(7876),l=a(9099),s=a(3529);let i="page-anchor",r=e=>{let t=(0,l.useRouter)(),{id:a}=e;return t.isPreview?(0,n.jsx)("div",{id:a,className:"relative",children:(0,n.jsxs)(s.A,{className:"text-sm bg-bc-4 py-bt-spacing-5 px-bt-spacing-10 absolute left-bt-spacing-16 top-0 -translate-y-1/2 rounded-full shadow-pill-button",url:"#".concat(a),children:[(0,n.jsx)("span",{className:"animate-ping rounded-full absolute w-bt-spacing-16 h-bt-spacing-16 bg-ac-5 -right-bt-spacing-5 -top-bt-spacing-5"}),(0,n.jsx)("span",{className:"animate rounded-full absolute w-bt-spacing-16 h-bt-spacing-16 bg-ac-5 -right-bt-spacing-5 -top-bt-spacing-5"}),(0,n.jsx)("strong",{children:"Page Anchor - #".concat(a)})]})}):(0,n.jsx)("div",{id:a})}},9223:(e,t,a)=>{a.r(t),a.d(t,{componentAlias:()=>d,default:()=>m});var n=a(7876),l=a(4232),s=a(4012),i=a(3529),r=a(4e3);let o=e=>{let{image:t,title:a,link:l,className:o}=e,c=(0,r.useRouter)();return(0,n.jsxs)("div",{className:"h-[340px] lg:h-[290px] group flex flex-col rounded-bt-radius-12 cursor-pointer overflow-hidden hover:shadow-article-card bg-white transition-shadow cursor-pointer".concat(o?" ".concat(o):""),onClick:()=>{c.push(l.url)},children:[(0,n.jsx)("div",{className:"relative h-full max-h-[190px] lg:max-h-[140px] w-full overflow-hidden z-fill-image",children:(0,n.jsx)(s.A,{src:t.src,alt:t.alt,className:"object-cover",fill:!0,sizes:"(max-width: 1000px) 100vw, 25vw",placeholder:"blur",blurDataURL:t.blurDataURL,...t.focalPoint&&{focalPoint:t.focalPoint}})}),(0,n.jsx)("div",{className:"flex flex-col gap-bt-spacing-12 relative bg-sc-5 grow py-bt-spacing-20 px-bt-spacing-24 rounded-bt-radius-12 -mt-bt-spacing-12 z-fill-image-overlay",children:l?(0,n.jsx)(i.A,{className:"text-xl font-bold leading-md lg:leading-xs group-hover:underline",...l,children:a}):(0,n.jsx)("div",{className:"text-xl font-bold leading-md lg:leading-xs group-hover:underline",children:a})})]})};var c=a(6733);let d="article-card-grid",m=e=>{let{articleCards:t,className:a,blockVisibility:s}=e,i=null==t?void 0:t.map((e,t)=>(0,l.createElement)(o,{...e,key:t}));return(0,n.jsx)(c.A,{...s,children:(0,n.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-bt-spacing-24".concat(a?" ".concat(a):""),children:i})})}}}]);
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.