(this["webpackJsonprent-then-buy"]=this["webpackJsonprent-then-buy"]||[]).push([[0],{121:function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return s}));var r="access_token",a="refresh_token",c=function(e){var t=e.accessToken,n=e.refreshToken;localStorage.setItem(r,t),localStorage.setItem(a,n)},o=function(){return{accessToken:localStorage.getItem(r),refreshToken:localStorage.getItem(a)}},s=function(){localStorage.removeItem(r),localStorage.removeItem(a)}},124:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return b})),n.d(t,"g",(function(){return j})),n.d(t,"f",(function(){return m})),n.d(t,"d",(function(){return O})),n.d(t,"h",(function(){return p})),n.d(t,"c",(function(){return f})),n.d(t,"e",(function(){return x}));var r,a,c=n(29),o=n(5),s=n(456),i=n(453),u=n(44),l=n(45),d=Object(u.a)("div")({position:"relative",display:"flex",flexDirection:"column",backgroundColor:"rgba(226, 233, 251, 0.25)"}),b=Object(u.a)(s.a)((function(e){var t=e.theme;return Object(o.a)({position:"absolute",top:9,right:11,zIndex:1,color:t.palette.primary.light,border:"1px solid",borderColor:t.palette.primary.light,borderRadius:0,padding:1},t.breakpoints.only("xs"),{padding:3,top:10,right:10,marginRight:0})})),j=Object(u.a)(i.a)((function(e){var t,n=e.theme;return t={backgroundColor:"rgba(226, 233, 251, 0.25)",width:"100%",aspectRatio:"187 / 134"},Object(o.a)(t,n.breakpoints.only("xs"),{aspectRatio:"165 / 134"}),Object(o.a)(t,"display","flex"),Object(o.a)(t,"justifyContent","center"),Object(o.a)(t,"alignItems","center"),Object(o.a)(t,"&:hover",{backgroundColor:"rgba(226, 233, 251, 0.25)"}),t})),m=Object(l.c)("div")(r||(r=Object(c.a)(["\n background: url(",");\n width: 100%;\n aspect-ratio: ",";\n background-size: cover;\n background-position: center;\n @media screen and (max-width: 500px) {\n height: 134px;\n }\n"])),(function(e){return e.source}),(function(e){return e.matchXs?165/134:187/134})),O=Object(u.a)("div")(a||(a=Object(c.a)(["\n background: white;\n padding: 10px 12px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n border: 1px solid rgba(226, 233, 251, 0.25);\n"]))),p=Object(u.a)("span")((function(e){return{fontWeight:600,color:e.theme.palette.text.main}})),f=Object(u.a)("span")((function(e){return{fontWeight:400,color:e.theme.palette.secondary.contrastText}})),x=Object(u.a)(i.a)((function(e){return{color:e.theme.palette.primary.main,width:"fit-content",fontWeight:400,fontSize:"14px"}}))},135:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(5),a=n(3);function c(e){return Object.keys(e).reduce((function(e,t){return Object(a.a)(Object(a.a)({},e),{},Object(r.a)({},t,t))}),{})}},139:function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return s}));var r=n(44),a=n(48),c=Object(r.a)(a.a)((function(){return{backgroundColor:"#ececec",color:"#171717",borderRadius:"100px",height:"31px",padding:"0px 42px",marginRight:"8px"}})),o=Object(r.a)(a.a)((function(e){return{borderRadius:"100px",height:"31px",padding:"0px 42px",backgroundColor:e.theme.palette.success.main,color:"white"}})),s=Object(r.a)("div")((function(){return{position:"absolute",top:"24px",right:"48px",display:"flex",alignItems:"center",flexDirection:"row"}}))},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return c})),n.d(t,"c",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(3),a={firstName:"",lastName:"",relationship:"",streetAddress:"",homeAddress:"",city:"",state:"",postCode:"",contactPerson:"",phone:"",businessName:""},c={homeAddress:"",businessName:"",businessABN:"",businessPhone:"",businessEmail:"",businessStreetAddress:"",businessAddress:"",businessCity:"",businessState:"",businessPostCode:"",bankAccountInfo:{bankAccountName:"",bankAccountNo:"",bsb:""},creditCardInfo:{cardName:null,cardNumber:null,expiry:"",exp_month:null,exp_year:null,cvv:null},references:[Object(r.a)(Object(r.a)({},a),{},{referencesType:"MEMBER_FAMILY_ONE"}),Object(r.a)(Object(r.a)({},a),{},{referencesType:"MEMBER_FAMILY_TWO"}),Object(r.a)(Object(r.a)({},a),{},{referencesType:"FRIEND_ONE"}),Object(r.a)(Object(r.a)({},a),{},{referencesType:"FRIEND_TWO"}),Object(r.a)(Object(r.a)({},a),{},{referencesType:"EMPLOYER"})],documents:[{docType:"DRIVER_LICENSE_FRONT",docUrl:""},{docType:"DRIVER_LICENSE_BACK",docUrl:""},{docType:"MOTOR_VEHICLE_REGO",docUrl:""},{docType:"BANK_ACCOUNT",docUrl:""},{docType:"CREDIT_CARD",docUrl:""},{docType:"MEDICARE_CARD",docUrl:""}],streetAddress:"",city:"",state:"",postCode:"",phone:"",emailAddress:"",firstName:"",lastName:""},o={customer:{firstName:"",lastName:"",emailAddress:""},paymentType:"WEEKLY",product:{trailerType:"",modelNumber:"",serialNumber:"",trNumber:"",trailerLength:"",trailerWidth:"",cost:null},registrationFee:null,retailPrice:null,interestRate:.5,startDate:new Date},s=Object(r.a)(Object(r.a)({},o),{},{customer:Object(r.a)(Object(r.a)({},c),o.customer)})},162:function(e,t,n){"use strict";n.d(t,"a",(function(){return j})),n.d(t,"b",(function(){return m}));var r=n(24),a=n(12),c=n(135),o=n(43),s=n(168),i=["id"],u=["id"],l=["id"],d=["id"],b="/contracts",j={list:function(e){var t=Object(a.a)(e.queryKey,2)[1];return o.b.get("".concat(b),{params:t})},getById:function(e){var t=Object(a.a)(e.queryKey,2)[1].id;return o.b.get("".concat(b,"/").concat(t))},updateAdminApproval:function(e){var t=e.id,n=Object(r.a)(e,i);return o.b.put("".concat(b,"/").concat(t,"/approve"),n)},createAdminFlowContract:function(e){return o.b.post("".concat(b),e)},updateAdminFlow:function(e){var t=e.id,n=Object(r.a)(e,u);return o.b.put("".concat(b,"/").concat(t),n)},getTokenForCustomerFlow:function(e){var t=Object(a.a)(e.queryKey,2)[1];return o.b.get("".concat(s.a,"/token-contract"),{params:t})},createAdminManual:function(e){return o.b.post("".concat(b,"/manual"),e)},activatePayment:function(e){var t=e.id;return o.b.put("".concat(b,"/").concat(t,"/activate-payment"))},buyout:function(e){var t=e.id,n=Object(r.a)(e,l);return o.b.put("".concat(b,"/").concat(t,"/buyout"),n)},pausePayment:function(e){var t=e.id;return o.b.put("".concat(b,"/").concat(t,"/pause-payment"))},editManual:function(e){var t,n,a,c=e.id,s=Object(r.a)(e,d);(null===s||void 0===s||null===(t=s.customer)||void 0===t?void 0:t.creditCardInfo)&&(null===s||void 0===s||(null===(n=s.customer)||void 0===n||(null===(a=n.creditCardInfo)||void 0===a||delete a.expiry)));return o.b.put("".concat(b,"/").concat(c,"/manual"),s)},exportPdf:function(e){var t=Object(a.a)(e.queryKey,2)[1].id;return o.b.get("".concat(b,"/").concat(t,"/export-pdf"),{responseType:"blob"})}},m=Object(c.a)(j)},163:function(e,t,n){"use strict";var r,a=n(5),c=n(29),o=n(262),s=n(742),i=n(107),u=n(726),l=n(44),d=(n(1),n(30)),b=n(0),j=n(714);t.a=function(e){var t=Object(d.g)(),n=Object(i.a)(),r=Object(o.a)(n.breakpoints.only("xs"));return Object(b.jsxs)(p,{children:[Object(b.jsx)(f,{children:!r&&Object(b.jsxs)(b.Fragment,{children:[Object(b.jsx)(O,{onDoubleClick:function(){return t.push("/")},children:Object(b.jsx)("img",{src:j.default,alt:"logo"})}),Object(b.jsx)(m,{children:e.title})]})}),Object(b.jsx)(x,{children:Object(b.jsx)(s.a,{component:"main",maxWidth:"sm",style:{display:"flex",flex:1},children:Object(b.jsx)(u.a,{sx:{flex:1,marginTop:(null===e||void 0===e?void 0:e.paddingTopRightHandSide)|(r?3:10),display:"flex",flexDirection:"column"},children:e.children})})})]})};var m=Object(l.a)("h1")(r||(r=Object(c.a)(["\n font-weight: bold;\n font-size: 50px;\n line-height: 60px;\n color: #ffffff;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: 76px;\n"]))),O=Object(l.a)("div")((function(){return{position:"absolute",top:"32px",left:"76px"}})),p=Object(l.a)("div")((function(e){var t=e.theme;return Object(a.a)({display:"grid",gridTemplateColumns:"50% 50%",height:"100vh"},t.breakpoints.only("xs"),{gridTemplateColumns:"100%",gridTemplateRows:"0% 100%",height:"100%",minHeight:"-webkit-fill-available"})})),f=Object(l.a)("div")((function(e){var t=e.theme;return Object(a.a)({position:"relative",backgroundColor:t.palette.primary.main},t.breakpoints.only("xs"),{})})),x=Object(l.a)("div")((function(e){return{position:"relative",backgroundColor:e.theme.palette.background.default,display:"flex"}}))},168:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return l}));var r=n(24),a=n(12),c=n(135),o=n(43),s=["token"],i="/customers",u={getTokenForCustomerFlow:function(e){var t=Object(a.a)(e.queryKey,2)[1];return o.b.get("".concat(i,"/token-contract"),{params:t})},updateCustomerContract:function(e){var t=e.token,n=Object(r.a)(e,s);return o.b.put("".concat(i,"?token=").concat(t),n)}},l=Object(c.a)(u)},200:function(e,t,n){"use strict";t.a=n.p+"static/media/doc.3e2d0810.svg"},209:function(e,t,n){"use strict";n.d(t,"b",(function(){return u}));var r=n(58),a=n(121),c={authorized:!!Object(a.b)().accessToken},o=Object(r.b)({name:"auth",initialState:c,reducers:{signIn:function(e){e.authorized=!0},signOut:function(e){e.authorized=!1}}}),s=o.actions,i=o.reducer,u=function(){return{actions:s}};t.a=i},232:function(e,t,n){"use strict";var r=n(45),a=n(748),c=(n(1),n(0)),o=Object(r.c)(a.a).withConfig({componentId:"sc-p87aen-0"})((function(){return{backgroundColor:"#C4C4C4"}})),s=Object(r.c)("div").withConfig({componentId:"sc-p87aen-1"})((function(){return{width:"100%",flexGrow:1,alignSelf:"stretch"}})),i=function(e,t){return 100*(e+1)/t.length};t.a=function(e){var t=e.current,n=e.step;return Object(c.jsx)(s,{children:Object(c.jsx)(o,{variant:"determinate",value:i(t,n)})})}},233:function(e,t,n){"use strict";var r=n(12),a=n(412),c=n.n(a),o=n(309),s=n(455),i=n(175),u=n(741),l=n(44),d=n(1),b=n.n(d),j=n(0),m=Object(l.a)(o.a)((function(){return{"& .MuiPaper-root":{minWidth:340,border:"1px solid #ECEFF1",boxShadow:"0px 0px 5px rgba(112, 129, 163, 0.102109)"}}})),O=Object(l.a)(s.a)((function(){return{width:"fit-content",margin:"0 auto",cursor:"pointer"}}));t.a=function(e){var t=e.steps,n=e.onGoTo,a=e.current,o=void 0===a?0:a,s=e.latestStep,l=void 0===s?0:s,d=b.a.useState(null),p=Object(r.a)(d,2),f=p[0],x=p[1],h=Boolean(f);return Object(j.jsxs)(j.Fragment,{children:[Object(j.jsxs)(O,{variant:"h2",onClick:function(e){x(e.currentTarget)},"aria-expanded":h?"true":void 0,textAlign:"center","aria-controls":"basic-menu",children:[t[o].title,Object(j.jsx)(c.a,{fontSize:"large",sx:{marginBottom:-1}})]}),Object(j.jsx)(i.a,{sx:{width:340,maxWidth:"100%"},children:Object(j.jsx)(m,{anchorEl:f,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},open:h,onClose:function(){x(null)},MenuListProps:{"aria-labelledby":"basic-button"},children:t.slice(0,l+1).map((function(e,t){return Object(j.jsx)(u.a,{onClick:function(){return n(t)},children:e.title},t)}))})})]})}},237:function(e,t,n){"use strict";n.d(t,"b",(function(){return u}));var r=n(58),a=n(93),c=Object(a.d)().length,o=Object(r.b)({name:"step",initialState:{current:0,latestStep:0,requestingGoTo:void 0,requestingSave:void 0,canSave:void 0},reducers:{requestNext:function(e){e.requestingGoTo=e.current+1},requestGoTo:function(e,t){var n=t.payload;if("number"===typeof n){if(n<=e.current)return void(e.current=n);e.requestingGoTo=n}else"boolean"===typeof n&&(e.requestingSave=n)},answerGoTo:function(e,t){var n=t.payload;e.requestingSave?(e.canSave=n,e.requestingSave=void 0,e.requestingGoTo=void 0):(n&&e.currente.latestStep&&(e.latestStep=e.current)),e.requestingGoTo=void 0)},nextStep:function(e){e.current+=1},backStep:function(e){e.current>0&&(e.current-=1)},requestSave:function(e,t){var n=t.payload;e.requestingSave=n,e.requestingGoTo=e.current+1},answerSave:function(e,t){var n=t.payload;e.canSave=n,e.requestingSave=void 0},editGoTo:function(e,t){var n=t.payload;e.current=n,e.latestStep=c-1},exitStep:function(e){e.current=0,e.latestStep=0,e.requestingSave=void 0,e.canSave=!1}}}),s=o.actions,i=o.reducer;o.name;t.a=i;var u=function(){return{actions:s}}},238:function(e,t,n){"use strict";var r=n(262),a=n(119),c=n(313),o=n(107),s=(n(1),n(59)),i=n(47),u=n(0);t.a=function(e){var t=e.buyoutSchedule,n=t.schedule,l=t.start,d=t.end,b=t.isCustomer,j=void 0!==b&&b,m=Object(o.a)(),O={fontSize:Object(r.a)(m.breakpoints.only("xs"))?"1.1rem":"1.2rem"};return Object(u.jsxs)(u.Fragment,{children:[Object(u.jsx)(a.a,{item:!0,xs:12,children:Object(u.jsxs)(i.b,{children:[Object(u.jsx)(i.d,{titleTypographyProps:O,title:"Payments"}),Object(u.jsx)(c.a,{variant:"fullWidth"}),Object(u.jsxs)(i.c,{children:[Object(u.jsx)(i.a,{title:"Trailer value",value:Object(s.b)(n.retailValue)}),Object(u.jsx)(i.a,{title:"Start / End date",value:"".concat(l," - ").concat(d)}),Object(u.jsx)(i.a,{title:"Daily rental for first year",value:Object(s.b)(n.firstYear.daily)}),Object(u.jsx)(i.a,{title:"Weekly rental",value:Object(s.b)(n.firstYear.weekly)}),Object(u.jsx)(i.a,{title:"First payment (4 weeks rent)",value:Object(s.b)(n.firstPayment)})]})]})}),Object(u.jsx)(a.a,{item:!0,xs:12,children:Object(u.jsxs)(i.b,{children:[Object(u.jsx)(i.d,{titleTypographyProps:O,title:"Post renewal figures"}),Object(u.jsx)(c.a,{variant:"fullWidth"}),Object(u.jsxs)(i.c,{children:[Object(u.jsx)(i.a,{title:"Year 2 to 7 daily rent",value:Object(s.b)(n.laterYear.daily)}),Object(u.jsx)(i.a,{title:"Year 2 to 7 weekly rent",value:Object(s.b)(n.laterYear.weekly)})]})]})}),!j&&Object(u.jsx)(a.a,{item:!0,xs:12,children:Object(u.jsxs)(i.b,{children:[Object(u.jsx)(i.d,{titleTypographyProps:O,title:"Buy out figures"}),Object(u.jsx)(c.a,{variant:"fullWidth"}),Object(u.jsxs)(i.c,{children:[Object(u.jsx)(i.a,{title:"Buy out first year",value:Object(s.b)(n.buyouts[0].buyout)}),Object(u.jsx)(i.a,{title:"Buy out second year",value:Object(s.b)(n.buyouts[0].buyout)}),Object(u.jsx)(i.a,{title:"Buy out third year",value:Object(s.b)(n.buyouts[1].buyout)}),Object(u.jsx)(i.a,{title:"Buy out fourth year",value:Object(s.b)(n.buyouts[2].buyout)}),Object(u.jsx)(i.a,{title:"Buy out fifth year",value:Object(s.b)(n.buyouts[3].buyout)}),Object(u.jsx)(i.a,{title:"Buy out sixth year",value:Object(s.b)(n.buyouts[4].buyout)}),Object(u.jsx)(i.a,{title:"Buy out any time after",value:Object(s.b)(n.buyouts[4].buyout)})]})]})})]})}},239:function(e,t,n){"use strict";var r=n(119),a=(n(1),n(46)),c=n(0);t.a=function(e){var t=e.open,n=e.handleClose,o=e.onExit;return Object(c.jsxs)(a.i,{open:t,onClose:n,children:[Object(c.jsx)(a.f,{children:"Are you sure you would like to exit the form"}),Object(c.jsx)(a.e,{children:"You will lose all progress you have made on the form"}),Object(c.jsx)(a.d,{disableSpacing:!0,children:Object(c.jsxs)(r.a,{container:!0,columnSpacing:{xs:1,md:2},children:[Object(c.jsx)(a.c,{onClick:o,children:"Exit form"}),Object(c.jsx)(a.b,{onClick:n,children:"Continue form"})]})})]})}},240:function(e,t,n){"use strict";n.d(t,"b",(function(){return d}));var r=n(3),a=n(58),c=n(93),o={current:0,latestStep:0,requestingGoTo:void 0,requestingSave:void 0,canSave:void 0,confirmation:{term:void 0,errorTerm:void 0,returnable:void 0,errorReturnable:void 0},paymentType:"bankAccount"},s=Object(c.b)().length,i=Object(a.b)({name:"adminManualFlowSteps",initialState:o,reducers:{requestNext:function(e){e.requestingGoTo=e.current+1},updatepaymentType:function(e,t){var n=t.payload;e.paymentType=n},requestGoTo:function(e,t){var n=t.payload;n<=e.current?e.current=n:e.requestingGoTo=n},answerGoTo:function(e,t){t.payload&&e.currente.latestStep&&(e.latestStep=e.current)),e.requestingGoTo=void 0},nextStep:function(e){e.current+=1},backStep:function(e){e.current>0&&(e.current-=1)},requestSave:function(e,t){var n=t.payload;e.requestingSave=n},answerSave:function(e,t){var n=t.payload;e.canSave=n,e.requestingSave=void 0},editGoTo:function(e,t){var n=t.payload;e.current=n,e.latestStep=s-1},exitStep:function(e){e.current=0,e.latestStep=0,e.confirmation=null,e.paymentType="bankAccount"},updateConfirmation:function(e,t){var n=t.payload;return Object(r.a)(Object(r.a)({},e),{},{confirmation:Object(r.a)(Object(r.a)({},e.confirmation),n)})}}}),u=i.actions,l=i.reducer;i.name;t.a=l;var d=function(){return{actions:u}}},248:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return o}));var r=n(135),a=n(43),c={get:function(){return a.b.get("".concat("/calculator/config-values"))}},o=Object(r.a)(c)},294:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return j}));var r,a,c=n(29),o=n(45),s=(n(1),n(0)),i=function(e){return Object(s.jsx)(d,{viewBox:"-24 -24 48 48",small:e.small,children:Object(s.jsx)(b,{cx:"0",cy:"0",r:"20",fill:"none",strokeWidth:"4"})})},u=Object(o.d)(r||(r=Object(c.a)(["\n 100% {\n transform: rotate(360deg);\n }\n"]))),l=Object(o.d)(a||(a=Object(c.a)(["\n 0% {\n stroke-dasharray: 0, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 100, 150;\n stroke-dashoffset: -24;\n }\n 100% {\n stroke-dasharray: 0, 150;\n stroke-dashoffset: -124;\n }\n"]))),d=o.c.svg.withConfig({componentId:"sc-1ce0p34-0"})(["animation:"," ","s linear infinite;height:",";width:",";transform-origin:center;"],u,2.625,(function(e){return e.small?"1.25rem":"3rem"}),(function(e){return e.small?"1.25rem":"3rem"})),b=o.c.circle.withConfig({componentId:"sc-1ce0p34-1"})(["animation:"," ","s ease-in-out infinite;stroke:",";stroke-linecap:round;"],l,1.5,(function(e){return e.theme.primary})),j=o.c.div.withConfig({componentId:"sc-1ce0p34-2"})(["width:100%;height:100vh;display:flex;align-items:center;justify-content:center;"])},307:function(e){e.exports=JSON.parse('{"routingFeature":{"title":"Industry-standard Routing","description":"It\'s natural to want to add pages (e.g. `/about`) to your application, and routing makes this possible."},"i18nFeature":{"title":"i18n Internationalization & Pluralization","selectLanguage":"Select Language","description":"Scalable apps need to support multiple languages, easily add and support multiple languages. Change the language below to see how instantly it updates the page without refreshing."},"feedbackFeature":{"title":"Instant Feedback","description":"Enjoy the best DX and code your app at the speed of thought! Your saved changes to the CSS and JS are reflected instantaneously without refreshing the page."},"scaffoldingFeature":{"title":"Quick Scaffolding","description":"Automate the creation of components, features, routes, selectors and sagas - and their tests - right from the CLI! Avoid fighting the glue of your code and focus on your app!"}}')},314:function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return b})),n.d(t,"e",(function(){return j})),n.d(t,"d",(function(){return m}));var r=n(3),a=n(456),c=n(175),o=n(457),s=n(44),i=(n(1),n(48)),u=n(0),l=Object(s.a)(a.a)((function(e){return{backgroundColor:e.theme.palette.primary.dark,color:"white",position:"absolute",right:"56px",top:"32px",marginRight:"0"}})),d=Object(s.a)(i.a)((function(e){return{marginRight:"27px",padding:"11px 50px",backgroundColor:e.theme.palette.primary.dark}})),b=Object(s.a)(c.a)((function(){return{backgroundColor:"rgba(226, 233, 251, 0.25)",border:"1px solid rgba(83, 95, 120, 0.2)",position:"relative",borderRadius:16}})),j=Object(s.a)("p")((function(){return{fontSize:"1.15rem",marginTop:"1rem",marginBottom:0,fontWeight:"bold"}})),m=Object(s.a)((function(e){return Object(u.jsx)(o.a,Object(r.a)(Object(r.a)({},e),{},{InputProps:{readOnly:!0},fullWidth:!0,variant:"outlined",value:e.value||""}))}))((function(e){return{"& .MuiOutlinedInput-root":{backgroundColor:"#DDE6FF"},"& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline":{borderColor:"transparent !important",color:"black"},"& .MuiInputBase-input-MuiOutlinedInput-input":{color:e.theme.palette.text.primary},"& .MuiInputLabel-root.Mui-focused":{color:"inherit"},"&.MuiOutlinedInput-root.Mui-focused":{borderColor:"black !important"}}}))},315:function(e,t,n){"use strict";n.d(t,"b",(function(){return u}));var r=n(3),a=n(58),c={page:0,itemsPerPage:10,total:0},o=Object(a.b)({name:"pagination",initialState:c,reducers:{setPagination:function(e,t){var n=t.payload;return Object(r.a)(Object(r.a)({},e),n)}}}),s=o.actions,i=o.reducer,u=function(){return{actions:s}};t.a=i},410:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(51),a=n(56),c=n(168),o=function(e,t){return Object(r.useQuery)([c.c.getTokenForCustomerFlow,{token:e}],a.a.Customers.getTokenForCustomerFlow,t)}},413:function(e,t,n){"use strict";n.r(t),t.default=n.p+"static/media/success.16e7cc3d.png"},414:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return l}));var r=n(24),a=n(3),c=n(12),o=n(151),s=["id","customerId","firstName","lastName","streetAddress","city","state","postCode"],i=["id","customerId"],u=function(e,t){if(!e||!t)return null;var n=e>=10?"".concat(e):"0".concat(e);return"".concat(n,"/").concat(t)},l=function(e){if(e&&(null===e||void 0===e?void 0:e.customer)){var t=e.customOrder,n=e.interestRate,r=e.customer,a=r.homeAddress,o=r.streetAddress,s=r.city,i=r.state,l=r.postCode,b=r.phone,m=r.emailAddress,O=r.firstName,p=r.lastName,f=r.businessName,x=r.businessABN,h=r.businessPhone,g=r.businessEmail,v=r.businessStreetAddress,y=r.businessAddress,C=r.businessCity,A=r.businessState,S=r.businessPostCode,T=Object(c.a)(r.creditCards,1)[0],k=Object(c.a)(r.bankAccounts,1)[0],w=r.documents,N=r.references,I=e.product,R=I.trailerType,E=I.modelNumber,F=I.serialNumber,P=I.trNumber,B=I.trailerLength,M=I.trailerWidth,D=I.cost,L=e.contractVersion,q=e.registrationFee,G=k||{bankAccountNo:"",bankAccountName:"",bsb:""},_=G.bankAccountNo,W=G.bankAccountName,z=G.bsb,U=T||{cardName:"",cardNumber:"",cvv:"",exp_month:null,exp_year:null},Y=U.cardName,V=U.cardNumber,H=U.cvv,K=U.exp_month,Z=U.exp_year,Q=L.retailPrice,X=L.startDate,J=L.paymentType;return{customOrder:t,interestRate:n,customer:{emailAddress:m,firstName:O,lastName:p,phone:b,streetAddress:o,homeAddress:a,city:s,state:i,postCode:l,businessName:f,businessABN:x,businessPhone:h,businessEmail:g,businessStreetAddress:v,businessAddress:y,businessCity:C,businessState:A,businessPostCode:S,references:d(N),documents:j(w),bankAccountInfo:{bankAccountNo:_,bankAccountName:W,bsb:z},creditCardInfo:{cardNumber:V,cardName:Y,cvv:H,exp_year:Z,exp_month:K,expiry:u(K,Z)}},product:{trailerType:R,modelNumber:E,serialNumber:F,trNumber:P,trailerLength:B,trailerWidth:M,cost:D},startDate:new Date(X),paymentType:J,registrationFee:q,retailPrice:Q}}},d=function(e){return[b(e,"MEMBER_FAMILY_ONE"),b(e,"MEMBER_FAMILY_TWO"),b(e,"FRIEND_ONE"),b(e,"FRIEND_TWO"),b(e,"EMPLOYER")]},b=function(e,t){var n=e.find((function(e){return e.referencesType===t}));if(!n)return Object(a.a)(Object(a.a)({},o.a),{},{referencesType:t});n.id,n.customerId;var c=n.firstName,i=n.lastName,u=n.streetAddress,l=n.city,d=n.state,b=n.postCode,j=Object(r.a)(n,s);return Object(a.a)(Object(a.a)({},j),{},{firstName:c||"",lastName:i||"",streetAddress:u||"",city:l||"",state:d||"",postCode:b||"",referencesType:t})},j=function(e){return e.map((function(e){e.id,e.customerId;return Object(r.a)(e,i)}))}},415:function(e,t,n){"use strict";var r=n(119),a=(n(1),n(46)),c=n(0);t.a=function(e){var t=e.open,n=e.handleClose,o=e.loading,s=e.onSuccess;return Object(c.jsxs)(a.i,{open:t,onClose:n,children:[Object(c.jsx)(a.h,{}),Object(c.jsx)(a.f,{children:"Approve contract"}),Object(c.jsx)(a.e,{children:"Are you sure, clicking confirm will withdraw the 4 week advanced deposit payment from the customers account."}),Object(c.jsx)(a.d,{disableSpacing:!0,children:Object(c.jsxs)(r.a,{container:!0,columnSpacing:{xs:1,md:2},children:[Object(c.jsx)(a.c,{onClick:n,children:"Go Back"}),Object(c.jsx)(a.b,{onClick:s,loading:o,children:"Confirm"})]})})]})}},416:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return l}));var r=n(3),a={firstName:"string",lastName:"string",relationship:"string",streetAddress:"string",homeAddress:"string",city:"string",state:"Victoria",postCode:"1234",contactPerson:"string",phone:"04 3654 6545",businessName:"string"},c={cardName:"string",cardNumber:"4242424242424242",exp_month:12,exp_year:22,expiry:"12/22",cvv:"123"},o=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_HOST:"https://api.stage.app.rentthenbuy.net.au"}).REACT_APP_ASSETS_HOST,s={homeAddress:"string",businessName:"string",businessABN:"12345678911",businessPhone:"04 3654 6545",businessEmail:"string@string.com",businessStreetAddress:"string",businessAddress:"string",businessCity:"string",businessState:"Victoria",businessPostCode:"1234",bankAccountInfo:{bankAccountName:"string",bankAccountNo:"123456789",bsb:"012312"},creditCardInfo:c,references:[Object(r.a)(Object(r.a)({},a),{},{referencesType:"MEMBER_FAMILY_ONE"}),Object(r.a)(Object(r.a)({},a),{},{referencesType:"MEMBER_FAMILY_TWO"}),Object(r.a)(Object(r.a)({},a),{},{referencesType:"FRIEND_ONE"}),Object(r.a)(Object(r.a)({},a),{},{referencesType:"FRIEND_TWO"}),Object(r.a)(Object(r.a)({},a),{},{referencesType:"EMPLOYER"})],documents:[{docType:"DRIVER_LICENSE_FRONT",docUrl:o+"/document/KqsnJPwuzDHaaYceDD4La_lab%201-erd.pdf"},{docType:"DRIVER_LICENSE_BACK",docUrl:o+"/document/KqsnJPwuzDHaaYceDD4La_lab%201-erd.pdf"},{docType:"MOTOR_VEHICLE_REGO",docUrl:o+"/document/KqsnJPwuzDHaaYceDD4La_lab%201-erd.pdf"},{docType:"BANK_ACCOUNT",docUrl:o+"/document/KqsnJPwuzDHaaYceDD4La_lab%201-erd.pdf"},{docType:"CREDIT_CARD",docUrl:o+"/document/KqsnJPwuzDHaaYceDD4La_lab%201-erd.pdf"},{docType:"MEDICARE_CARD",docUrl:o+"/document/KqsnJPwuzDHaaYceDD4La_lab%201-erd.pdf"}],streetAddress:"string",city:"string",state:"Victoria",postCode:"1234",phone:"04 3654 6545",emailAddress:"",firstName:"",lastName:""},i={customer:{firstName:"string",lastName:"string",emailAddress:"string@string.com"},startDate:new Date,paymentType:"FORTNIGHT",retailPrice:123,interestRate:123,registrationFee:100,product:{trailerType:"string",modelNumber:"string",serialNumber:"string",trNumber:"string",trailerLength:"string",trailerWidth:"string",cost:123}},u={phone:"04 3654 6545",streetAddress:"string",homeAddress:"string",city:"string",state:"Victoria",postCode:"1234",businessName:"string",businessABN:"12345678912",businessPhone:"04 3654 6545",businessEmail:"string@sdf.cop",businessStreetAddress:"string",businessAddress:"string",businessCity:"string",businessState:"Victoria",businessPostCode:"1234",bankAccountInfo:{bankAccountName:"",bankAccountNo:"",bsb:""},creditCardInfo:c,references:[Object(r.a)(Object(r.a)({},a),{},{referencesType:"MEMBER_FAMILY_ONE"}),Object(r.a)(Object(r.a)({},a),{},{referencesType:"MEMBER_FAMILY_TWO"}),Object(r.a)(Object(r.a)({},a),{},{referencesType:"FRIEND_ONE"}),Object(r.a)(Object(r.a)({},a),{},{referencesType:"FRIEND_TWO"}),Object(r.a)(Object(r.a)({},a),{},{referencesType:"EMPLOYER"})],documents:[{docType:"DRIVER_LICENSE_FRONT",docUrl:o+"/document/KqsnJPwuzDHaaYceDD4La_lab%201-erd.pdf"},{docType:"DRIVER_LICENSE_BACK",docUrl:o+"/document/KqsnJPwuzDHaaYceDD4La_lab%201-erd.pdf"},{docType:"MOTOR_VEHICLE_REGO",docUrl:o+"/document/KqsnJPwuzDHaaYceDD4La_lab%201-erd.pdf"},{docType:"BANK_ACCOUNT",docUrl:o+"/document/KqsnJPwuzDHaaYceDD4La_lab%201-erd.pdf"},{docType:"CREDIT_CARD",docUrl:o+"/document/KqsnJPwuzDHaaYceDD4La_lab%201-erd.pdf"},{docType:"MEDICARE_CARD",docUrl:o+"/document/KqsnJPwuzDHaaYceDD4La_lab%201-erd.pdf"}],emailAddress:"string@ds.cp",firstName:"string",lastName:"string"},l=Object(r.a)(Object(r.a)({},i),{},{customer:Object(r.a)({},u)});Object(r.a)({},{trailerType:"string",modelNumber:"string",serialNumber:"string",trNumber:"string",trailerLength:"string",trailerWidth:"string",cost:110}),new Date},417:function(e,t,n){"use strict";n.d(t,"b",(function(){return l}));var r=n(58),a=n(93),c={current:0,latestStep:0,requestingGoTo:void 0,requestingSave:void 0,canSave:void 0,paymentType:"bankAccount"},o=Object(a.a)().length,s=Object(r.b)({name:"adminApprovalFlowSteps",initialState:c,reducers:{requestNext:function(e){e.requestingGoTo=e.current+1},requestGoTo:function(e,t){var n=t.payload;n<=e.current?e.current=n:e.requestingGoTo=n},updatepaymentType:function(e,t){var n=t.payload;e.paymentType=n},answerGoTo:function(e,t){t.payload&&e.currente.latestStep&&(e.latestStep=e.current)),e.requestingGoTo=void 0},nextStep:function(e){e.current+=1},backStep:function(e){e.current>0&&(e.current-=1)},requestSave:function(e,t){var n=t.payload;e.requestingSave=n},answerSave:function(e,t){var n=t.payload;e.canSave=n,e.requestingSave=void 0},editGoTo:function(e,t){var n=t.payload;e.current=n,e.latestStep=o-1},exitStep:function(e){e.current=0,e.latestStep=0,e.paymentType="bankAccount"}}}),i=s.actions,u=s.reducer;s.name;t.a=u;var l=function(){return{actions:i}}},418:function(e,t,n){"use strict";n.d(t,"b",(function(){return l}));var r=n(3),a=n(58),c=n(93),o=Object(c.c)().length,s=Object(a.b)({name:"customerFlowSteps",initialState:{current:0,latestStep:0,requestingGoTo:void 0,confirmation:{term:void 0,errorTerm:void 0,returnable:void 0,errorReturnable:void 0},paymentMethod:"bankAccount"},reducers:{setContract:function(e,t){var n=t.payload;e.contract=n},updateConfirmation:function(e,t){var n=t.payload;return Object(r.a)(Object(r.a)({},e),{},{confirmation:Object(r.a)(Object(r.a)({},e.confirmation),n)})},requestNext:function(e){e.requestingGoTo=e.current+1},updatePaymentMethod:function(e,t){var n=t.payload;e.paymentMethod=n},requestGoTo:function(e,t){var n=t.payload;n<=e.current?e.current=n:e.requestingGoTo=n},answerGoTo:function(e,t){t.payload&&e.currente.latestStep&&(e.latestStep=e.current)),e.requestingGoTo=void 0},nextStep:function(e){e.current+=1},backStep:function(e){e.current>0&&(e.current-=1)},exitStep:function(e){e.current=0,e.latestStep=0,e.confirmation=null,e.paymentMethod="bankAccount"}}}),i=s.actions,u=s.reducer;s.name;t.a=u;var l=function(){return{actions:i}}},43:function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return b}));var r=n(3),a=n(41),c=n.n(a),o=n(81),s=n(260),i=n.n(s),u=n(54),l=n(121),d=i.a.create({baseURL:"https://api.stage.app.rentthenbuy.net.au",timeout:5e3}),b=i.a.create({baseURL:"https://api.stage.app.rentthenbuy.net.au",timeout:5e3}),j=function(){var e=Object(o.a)(c.a.mark((function e(){var t,n,r,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Object(l.b)(),n=t.refreshToken,e.prev=1,n){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,d.put("/auth/refresh",{refreshToken:n});case 6:if(r=e.sent,a=r.data){e.next=10;break}return e.abrupt("return");case 10:return Object(l.c)(a),e.abrupt("return",a.accessToken);case 14:return e.prev=14,e.t0=e.catch(1),e.abrupt("return");case 17:case"end":return e.stop()}}),e,null,[[1,14]])})));return function(){return e.apply(this,arguments)}}();d.interceptors.request.use((function(e){var t=Object(l.b)().accessToken;return Object(r.a)(Object(r.a)({},e),{},{headers:Object(r.a)(Object(r.a)({},e.headers||{}),t?{Authorization:"Bearer ".concat(t)}:{})})})),d.interceptors.response.use((function(e){return e}),function(){var e=Object(o.a)(c.a.mark((function e(t){var n,r,a;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.config,![401,403].includes(null===t||void 0===t||null===(n=t.response)||void 0===n?void 0:n.status)||r._retry){e.next=13;break}return r._retry=!0,e.next=5,j();case 5:if(a=e.sent){e.next=11;break}return Object(l.a)(),window.location.href="/auth/login",u.b.error("Session expired. Please login again."),e.abrupt("return");case 11:return i.a.defaults.headers.common.Authorization="Bearer ".concat(a),e.abrupt("return",d(r));case 13:return e.abrupt("return",Promise.reject(t));case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},442:function(e){e.exports=JSON.parse('{"routingFeature":{"title":"Standard Routing","description":"Routing macht es m\xf6glich Seiten (z.B. \'/about\') Ihrer Anwendung hinzuzuf\xfcgen."},"i18nFeature":{"title":"i18n Internationalisierung und Pluralisierung","selectLanguage":"Sprache ausw\xe4hlen","description":"Das Internet ist global. Mehrsprachige- und Pluralisierungsunterst\xfctzung ist entscheidend f\xfcr gro\xdfe Web-Anwendungen. Sie k\xf6nnen die Sprache unten ver\xe4ndern, ohne die Seite aktualisieren zu m\xfcssen."},"feedbackFeature":{"title":"Sofortiges Feedback","description":"Genie\xdfen Sie die beste Entwicklungserfahrung und programmieren Sie Ihre App so schnell wie noch nie! Ihre \xc4nderungen an dem CSS und JavaScript sind sofort reflektiert, ohne die Seite aktualisieren zu m\xfcssen."},"scaffoldingFeature":{"title":"Schnelles Scaffolding","description":"Automatisieren Sie die Kreation von Komponenten, Containern, Routen, Selektoren und Sagas \u2013 und ihre Tests \u2013 direkt von dem Terminal!"}}')},46:function(e,t,n){"use strict";n.d(t,"a",(function(){return T})),n.d(t,"j",(function(){return k})),n.d(t,"i",(function(){return w})),n.d(t,"f",(function(){return N})),n.d(t,"e",(function(){return I})),n.d(t,"c",(function(){return R})),n.d(t,"b",(function(){return E})),n.d(t,"d",(function(){return F})),n.d(t,"h",(function(){return P})),n.d(t,"g",(function(){return B}));var r=n(24),a=n(3),c=n(262),o=n(454),s=n(746),i=n(750),u=n(119),l=n(747),d=n(175),b=n(735),j=n(749),m=n(736),O=n(7),p=n(107),f=n(1),x=n.n(f),h=n(48),g=n(0),v=["open","onClose"],y=["children"],C=["children"],A=n(413),S=n(718),T=Object(O.a)("div")((function(e){return{position:"absolute",bottom:0,left:0,right:0,display:"flex",flexDirection:"column",paddingBottom:"17px",backgroundColor:e.theme.palette.background.paper,zIndex:100}})),k=x.a.forwardRef((function(e,t){return Object(g.jsx)(m.a,Object(a.a)({direction:"down",ref:t},e))})),w=function(e){var t=e.open,n=e.onClose,s=Object(r.a)(e,v),i=Object(p.a)(),u=Object(c.a)(i.breakpoints.down("sm"));return Object(g.jsx)(b.a,Object(a.a)(Object(a.a)({TransitionComponent:k,keepMounted:!0,PaperProps:{sx:{width:480}},maxWidth:!1,fullScreen:u,BackdropComponent:Object(O.a)(o.a,{name:"MuiModal",slot:"Backdrop",overridesResolver:function(e,t){return t.backdrop}})({zIndex:-1,backgroundColor:"rgba(0, 0, 0, 0.8)"}),"aria-describedby":"alert-dialog-slide-description",open:t,onClose:n},s),{},{children:s.children}))},N=Object(O.a)(j.a)((function(e){var t=e.theme;return{fontSize:"32px",paddingTop:t.spacing(3),paddingLeft:t.spacing(4),paddingRight:t.spacing(4),lineHeight:"initial"}})),I=function(e){return Object(g.jsx)(s.a,{sx:{paddingBottom:0,paddingLeft:4,paddingRight:4},children:Object(g.jsx)(i.a,{id:"alert-dialog-slide-description",sx:{fontWeight:"normal"},children:e.children})})},R=function(e){var t=e.children,n=Object(r.a)(e,y);return Object(g.jsx)(u.a,{item:!0,xs:6,children:Object(g.jsx)(h.a,Object(a.a)(Object(a.a)({variant:"outlined",sx:{minWidth:"100%",color:"primary.dark",borderColor:"primary.dark"}},n),{},{children:t}))})},E=function(e){var t=e.children,n=Object(r.a)(e,C);return Object(g.jsx)(u.a,{item:!0,xs:6,children:Object(g.jsx)(h.a,Object(a.a)(Object(a.a)({variant:"contained",sx:{minWidth:"100%",backgroundColor:"primary.dark"},autoFocus:!0},n),{},{children:t}))})},F=Object(O.a)(l.a)({justifyContent:"normal",display:"block",padding:"36px 32px"}),P=function(){return Object(g.jsx)(d.a,{sx:{boxShadow:"none",padding:"36px 32px 0 32px"},children:Object(g.jsx)("img",{src:A.default,alt:"success"})})},B=function(){return Object(g.jsx)(d.a,{sx:{boxShadow:"none",padding:"36px 32px 0 32px"},children:Object(g.jsx)("img",{src:S.default,alt:"pause"})})}},47:function(e,t,n){"use strict";n.d(t,"d",(function(){return j})),n.d(t,"b",(function(){return m})),n.d(t,"c",(function(){return O})),n.d(t,"a",(function(){return p})),n.d(t,"e",(function(){return x}));var r=n(743),a=n(744),c=n(745),o=n(119),s=n(455),i=n(457),u=n(262),l=n(44),d=n(107),b=(n(1),n(0)),j=Object(l.a)(r.a)((function(){return{padding:"12px 17px"}})),m=Object(l.a)(a.a)((function(e){var t=e.theme;return{backgroundColor:t.palette.background.default,boxShadow:"0px 0px 4px rgba(0, 0, 0, 0.08)",border:"1px solid",paddingLeft:"3px",paddingRight:"3px",borderRadius:"8px",borderColor:t.palette.secondary.light}})),O=Object(l.a)(c.a)((function(){return{paddingTop:12,"&:last-child":{paddingBottom:15}}})),p=function(e){var t=e.title,n=e.value,r=Object(d.a)(),a=Object(u.a)(r.breakpoints.down("md"));return Object(b.jsxs)(o.a,{container:!0,children:[Object(b.jsx)(o.a,{item:!0,xs:12,lg:6,children:Object(b.jsx)(s.a,{variant:"body1",sx:{fontWeight:"500",letterSpacing:1.1},children:t})}),Object(b.jsx)(o.a,{item:!0,xs:12,lg:6,children:Object(b.jsx)(f,{sx:{textAlign:a?"left":"right",marginBottom:a?2:0},children:n})})]})},f=Object(l.a)("div")((function(e){return{color:e.theme.palette.text.secondary}})),x=Object(l.a)(i.a)((function(e){return{"& .MuiInputBase-input":{color:e.theme.palette.success.main,fontSize:24,textAlign:"center",fontWeight:"bold",padding:10},"& .MuiOutlinedInput-notchedOutline legend":{textAlign:"center",maxWidth:"100%"},"& .MuiInputLabel-root.Mui-focused":{left:"51%",transform:"translate(-50%, -9px) scale(0.75)"},"& .MuiInputLabel-root":{left:"51%",transform:"translate(-50%, -9px) scale(0.75)"}}}))},48:function(e,t,n){"use strict";n.d(t,"a",(function(){return j})),n.d(t,"b",(function(){return p}));var r,a,c=n(29),o=n(3),s=n(24),i=n(45),u=n(730),l=n(739),d=(n(1),n(0)),b=["loading","children"],j=function(e){var t=e.loading,n=e.children,r=Object(s.a)(e,b);return Object(d.jsx)(l.a,Object(o.a)(Object(o.a)({loading:t,loadingPosition:t?"end":void 0,endIcon:t&&Object(d.jsx)(u.a,{})},r),{},{children:n}))},m=Object(i.b)(r||(r=Object(c.a)(["\n min-width: 97px;\n border-radius: 4px;\n font-size: 16px;\n padding: 0;\n transition: All 0.3s;\n &:focus {\n outline: none;\n }\n"]))),O=Object(i.b)(a||(a=Object(c.a)(["\n ","\n background: ",";\n color: white;\n border: 1px solid white;\n height: 41px;\n\n &:hover,\n &:focus {\n outline: none;\n background: transparent;\n color: ",";\n border: 1px solid ",";\n }\n"])),m,(function(e){return e.theme.primary}),(function(e){return e.theme.primary}),(function(e){return e.theme.primary})),p=(i.c.button.withConfig({componentId:"sc-dwfwpf-0"})([""," height:54px;padding:0 38px;background:",";color:white;border:1px solid white;&:hover,&:focus{background:transparent;color:",";border:1px solid ",";}"],m,(function(e){return e.theme.primary}),(function(e){return e.theme.primary}),(function(e){return e.theme.primary})),i.c.button.withConfig({componentId:"sc-dwfwpf-1"})(["background:transparent;color:",";border:1px solid ",";height:fit-content;padding:8px 7px;font-size:14px;border-radius:4px;transition:All 0.3s;&:hover,&:focus{outline:none;background:",";color:white;border:1px solid white;}"],(function(e){return e.theme.primary}),(function(e){return e.theme.primary}),(function(e){return e.theme.primary})),i.c.button.withConfig({componentId:"sc-dwfwpf-2"})([""," background-color:",";min-width:143px;"],O,(function(e){return e.theme.colorErrorRed})),i.c.button.withConfig({componentId:"sc-dwfwpf-3"})(["background:#ececec;cursor:pointer;border-radius:100px;color:#171717;border:1px solid transparent;height:31px;transition:All 0.3s;padding:0px 23px;font-size:14px;font-family:'SF ProDisplay';&:hover,&:focus{background:#ececec;color:#171717;opacity:0.6;border:1px solid white;}"]))},53:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(22),a=r.c},56:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(135),a=n(43),c="/auth",o={login:function(e){return a.b.post("".concat(c,"/login"),e)},resetPassword:function(e){return a.b.post("".concat(c,"/reset-password"),e)},changePassword:function(e){return a.b.put("".concat(c,"/change-password"),e)}},s=(Object(r.a)(o),n(248)),i=n(162),u=n(168),l=n(24),d=["file"],b={getUploadUrl:function(e){e.file;var t=Object(l.a)(e,d);return a.b.post("/media/get-presigned-url",t)},upload:function(e){var t=e.url,n=e.file;return a.a.put(t,n,{headers:{"Content-Type":n.type}})}},j={verifyCard:function(e){return a.b.post("".concat("/payment","/verify-card"),e)}},m={Auth:o,Contracts:i.a,Customers:u.b,Medias:b,Payment:j,Configs:s.a}},57:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}));var r={login:"/auth/login",forgotPassword:"/auth/forgot-password",changePassword:"/auth/change-password"},a={addContract:"/contract/add",customerFlow:"/contract/customer-flow",sentSuccess:"/contract/sent-success",contract:"/contract",adminApproval:"/contract/admin-approval",adminManual:"/contract/admin-manual",notFound:"/not-found"}},59:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(25),a=n(115),c=n(116),o=function(){function e(t){Object(a.a)(this,e),this.configs=void 0,this.configs=t}return Object(c.a)(e,[{key:"calFirstYear",value:function(e){var t=this.configs,n=(t.annualFee/12*23.66+e)/23.66*t.allowance*1.015,r=12*n/365;return{monthly:n,daily:r,weekly:7*r}}},{key:"calLaterYear",value:function(e,t){var n=this.configs.yearly,r=365*((t||n)/365)/12,a=.5*e.monthly+r,c=12*a/365;return{monthly:a,daily:c,weekly:7*c}}},{key:"calYearlyTotal",value:function(e,t){return t?t+7*e*48:365*e}},{key:"getSchedule",value:function(e){var t,n=e.retailPrice,a=e.registrationFee,c=e.interestRate,o=void 0===c?null===(t=this.configs)||void 0===t?void 0:t.interestRate:c,s=n+a,i=this.calFirstYear(s),u=this.calLaterYear(i,a),l=4*i.weekly,d=this.calYearlyTotal(i.daily,l),b=this.calYearlyTotal(u.daily),j={buyout:s-d*o,rebate:d*o},m=j.buyout,O=Array(4).fill(null).map((function(){var e=m-.28*b;return m=e,{buyout:e,rebate:s-e}}));return{retailValue:s,firstPayment:l,firstYear:i,laterYear:u,buyouts:[j].concat(Object(r.a)(O))}}}]),e}(),s=function(e){return e&&"$".concat(e.toFixed(2))}},62:function(e,t,n){"use strict";n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return b})),n.d(t,"b",(function(){return j})),n.d(t,"d",(function(){return m})),n.d(t,"a",(function(){return O})),n.d(t,"c",(function(){return p}));var r=n(12),a=n(24),c=n(740),o=n(306),s=n(54),i=["expiry"],u="Server Error. Please try again later.",l=function(e,t,n){var r,a,c,o,i,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"top-right",d=null===e||void 0===e||null===(r=e.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.message;(null===e||void 0===e||null===(c=e.response)||void 0===c||null===(o=c.data)||void 0===o?void 0:o.message)?500===(null===e||void 0===e||null===(i=e.response)||void 0===i?void 0:i.status)?s.b.error(u,{position:l}):Array.isArray(d)?d.map((function(e){return s.b.error(e,{position:l})})):s.b.error(d,{position:l}):s.b.error("Server Time-out. Please try again later",{position:l})},d=function(e){e.preventDefault(),e.returnValue="You have made some changes to the contract"},b=function(e){if(e)return window.addEventListener("beforeunload",d),function(){return window.removeEventListener("beforeunload",d)}},j=function(e){var t=e.expiry,n=Object(a.a)(e,i);if(!t)return n;var c=t&&t.toString().includes("/")?t.split("/"):[t.toString().slice(0,2),t.toString().slice(2,4)],o=Object(r.a)(c,2),s=o[0],u=o[1];return{cardName:n.cardName,cardNumber:n.cardNumber,cvv:n.cvv,exp_month:+s,exp_year:+u}};var m=function(e){return Object.entries(e).some((function(e){var t=Object(r.a)(e,2),n=t[0];return!function(e){return[void 0,null,""].includes(e)}(t[1])&&"referencesType"!==n}))},O=function(e){["businessABN","businessAddress","businessCity","businessEmail","businessName","businessPhone","businessPostCode","businessState","businessStreetAddress"].forEach((function(t){""===e[t]&&delete e[t]}))},p=function(e){return e&&Object(c.a)(Object(o.a)(e),"dd/MM/yy")}},714:function(e,t,n){"use strict";n.r(t),t.default="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALYAAAAsCAYAAADIDUIhAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAoeSURBVHgB7Vx7sFVVGf+O3FQeWWqZj0zzUZKZimmkmYyaMZRmM04TTuUtew1pZgj5fhEiA0lde4wXil5aTf+oCCoGFMGdBDR1RBFRRFQUUXwgol7v8vdzfdu77mKts/c597xw1m/mN/vstb71rX32+fa31vettY9IQkJCQsK2gZIkNA3GmAE4fA0cCu4MvgquBOeUSqWnJCFhWwOM+lLwGRPGq+BM8MOSUBWSx24w1Fj/CQ4HN4M3gYvBDeCO4FHgl8B9wMfBdnjvBZKQ0KqAUe8NrlSvvBA8IiK3J3iNyq0DvyAJCa0INeqH1FhvAd9XoA2nKz3gU+BJkpDQSvA89RzwvRW0vUyNe10y7oSWgeepZ1di1I4O17iPk4SEZkKN+l7HUw+QKoG249W4NybjTmga1Kjvczx11Ubt6Byv+pJxJzQenqe+vRZG7ehOxl0AffLYuFEzcNi+QLsXwbXgPeBi5Flf8QWg60oc9pXq8Cx0joWOXfD5V1Tn1bPvqyL9Tsdhh4DOcyH/XJn6onhBdb0ZqqRR4zAbPAScC46KyVYLGjcOk/VaRkL/nTnyI3E4XYqB17pe7G+7CLrXOnpoL7SR9wTaXQnZVV6/A3HolK1/P+I8cC/wXAljPvT90S+ETq7UfjnShjaxQgKNXjGV42nwzICuZaZ6rFAde5SR+XXom6H8pYj8fjn1RfEY2Bbp281+MKVXM08d6Guc9sNVyuE5sueY6rAFHOvo2c7EbeS4QL+7lNF9kMp0Reo3gLt5+mgPayPyi1zZ7aT/+BA4A4o7pbH4Efo8S1oExnrq+eCBYj32V2rtqV1A9xQcxoldrVxgcoy7SnBkmwrdP5b64RywO1C+K/gTr6wdDG0z6AG/5RbUwrAzfA834DxpLKagz8OlyVCjngceINa462rUGdDHVBwuk/oaN0En0p/pWxT4Dktx+FukeozR/TI4covB2IjctdDzqFtQS8MmviONBX/Qm/RLNwXGxgE3i/XUNOoTG2HUGdAXY5lLxd6Lf+F6Dqyg+Rax83Rycxk5TuP2lPrhInBjoJyrs+P0M41614AM99Nc6BcG54oB/A5cp593Ak+TcGA4lEaGm72mjC5e6Eopj+elOOgt/4p+RxQ0qA7ZOkAeBR4ckGVQttArY+Dc45zTYx4GLhNr1G8HSrgebnSiB38dPAbl3Sibhs8jtN3JKHtCagDomQDd/E4Xi70Xw7PryMEVkLtar7ek13arbB1c9+j3qAsYoKJ/jj4TA9Vnom4Wjt+NNJ+I9uUeyrLB46GeHIOkjRHZE1UmFjweIQVhygePPv6gbcoGj5F+fh9pc1XO9e0HvgauBz/olO/m6PivU/6klj0pNQZ0lsClqn+UVxcLHs/35IZE7t8ira958Ohd/90R2e5I+f2x+1HUY/vgD/Mc+P5A3eactswWbMmROQlP4cNSGb4NvfdKY8G9G/SUN+J6n2WBsXPCDkdmEMroFf8kvcM5H3p6qGPB69G2Q9uy/izVy5RbJ+pu1Lpv4nCktufDQg/GEWoMZB6jhwauwHnm3eZIPj6PNtkoRy89GvSX/DlCXSx1hl4/+5kdqI5ll74vRVDmaTxcn6g28APgpIgcn/YdVFd/0n1ZKqgSj03Qe/ZE6urhsWeq3Cin7LSAnnngGc75m179QeAwEx4FT1G9/3PK3nA+3+H0vbOWrfGus9p0H7fWftLRUzeP7bS52RTDX6QMigaPd4lNyXCeRU9yfkRuFp6816R5oPds5MsTWZ7VNaRN0pu+elrsQgoDPDcdtURswJaBnvrPYkdAZgmGiZ3fE6cam/k5Ss8ZZC122r4zBcK9Z93LYl8zqwUGSTi9Vk8wEN6UI8PR8aflBIoadkllSxI3HK5QjZPGgMPjndJ8ZNOuIU4Z70M2xVsKY6MT4NThs1q2AmX8vMxpw0AvC17pyW4BP6Hng8UaenbfLwHPdtq+E4DSo+LA1b43pDZgPHSr6TtyxYLSaqe1fYB7wxXPjhyxadnUT+p5MQBziF8s+AIq51Abc2RezKnnS6/fEJs7/og0D1kQyKxI9qC5gTbfaaTH4zUO1LIsmMzy7w+B7ig3XXXtpfofEOvFMtwu1tAzzHc+f0rsb5qXdcpwndiRguBDsT9II/ZTexfge3Th92V8xBFhcEAXc+jzvLLo9E/syBID4w/GFHsH6lbiOiZJJTDVLanfbwJ7jE19syLclzwQHG7ic2of9Zhjn6Jy85yy8Z6OG8DLnfNjwU875z/X75LNr58HH9Tv9XVj45psP/dd2scMp/0eTt+XaNkk7zoLZUVUdkJEtlPrZ0XqHwYHebpmRmQZI5TdboD6jkjbX0oBFPXYTI5/XMJRKIfQdvBaKYYfmPx0Vzeeyok5Mhy2GFCdIb1ep9GgQdM7Ho/rYF6aGQlufOKCQfbq19+l1+MyA7FE+i4ocLMP93t8Vez3oJfiHJmjGmOGY8CPqSydBT3rSD1fjrZvry8Y++BeLnZ+/xsphgGmd0WRejmyjI7IZhkwpthCm5CYs18OfRyROQLRgx8d0TW3kYtYZfPYxmZFFkbq6WUO9nT1JyuyRXWU9dhOX1NNPmrusbXtySrLaUeWzdke5GIV8/28bwMzan2bU1ZydLVpuwOMXXDxZdu0LDvfUc/Zz2q9jsmBa4x57B6P5fBb1XW06T9ydxqafnrswkvqupI1Ruz81gc9TKM3QbngkuxcaQLUS08QmyFZgBt/KMpeBx/kihrvGz1yRm3T7ZQZR1e3tltFHQHZbi3Lzrn7bl+xq6M8Mif+MymOksdymK19d+Fwg1SP1WL/fqKuqGivCL4Uh6FfRKr5JF8gTYCmGNulb9qtkf1zqkHvvjt4m/FWausFNWr+5wiP/xAbcNUDV+M7ugsn3Oz2iFQOTptOgK5aZW2iqGYTFH/ErkjdhbjZw6QJ0LkmF0q6pQlA/xw1GmbcnlFzHj+64P6QSsBYiFtWL3IL9V6PELuaWhSMRz6HtqulAfCDRwaAobcjNmQfdOnzh2I9ZAhMY90tdrj6j1SHLLBgov6aQD3fnNnqqce1PYBrOxUfjw+0eUHiuC1Sv0gqAI0b/fMjg0MaN99uqfkyf8CoT88x6v9L+D6GwOkSF5aWg0tCbykRuoGrHdfCEZwO5QSxacidVOQlkC+M/FvsfxF2SWVgGjPk2RdKQnOAH3uKBjoMcj8jNQT07W96A8XrjRN8tgKMDZbTX+e9W+EZd02mJQGjHiwJCY2GZ9yHST+gRr0qGXVCS6AWnjsZdUJLAoY4sVrP7Rl1ZzLqhJaCZ9xDC7b5qGPU08EhkpDQavCM+8gcWS6tP6Ly15kq/swyIaFhcIyby+HTfO+N892N3aW33pl+JE+d0PqAoZ5t7MaxDNymeoexW4CzzUibwMkm5YQTtiUYuyOPO9j455XZW9h8F3KNlh8iCQnbMpjpAPcx3kb9hISEhISEdz/eAks3zkxSlVSXAAAAAElFTkSuQmCC"},718:function(e,t,n){"use strict";n.r(t),t.default=n.p+"static/media/Pause.3f881e11.svg"},719:function(e,t,n){},720:function(e,t,n){"use strict";n.r(t);var r,a,c,o=n(814),s=n(1),i=n.n(s),u=(n(486),n(498),n(78)),l=n(392),d=n(422),b=n.n(d),j=(n(689),n(22)),m=n(54),O=(n(693),n(51)),p=n(156),f=n(30),x=n(53),h=n(3),g=n(294),v=n(0),y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{fallback:Object(v.jsx)(g.b,{children:Object(v.jsx)(g.a,{})})},r=e;t&&(r=function(){return e().then((function(e){return{default:t(e)}}))});var a=Object(s.lazy)(r);return function(e){return Object(v.jsx)(s.Suspense,{fallback:n.fallback,children:Object(v.jsx)(a,Object(h.a)({},e))})}},C=n(57),A=n(56),S=n(248),T=n(58),k=Object(T.b)({name:"configs",initialState:{annualFee:29,allowance:1.02,administrationFee:1.02,firstRegistration:0,clubMembership:0,damageWaiver:0,yearly:185,interestRate:.5},reducers:{setState:function(e,t){var n=t.payload;return Object(h.a)(Object(h.a)({},e),n)}}}),w=k.actions,N=k.reducer,I=N,R=function(){var e={actions:w}.actions,t=Object(j.b)(),n=Object(O.useQuery)([S.b.get],A.a.Configs.get).data;return Object(s.useEffect)((function(){(null===n||void 0===n?void 0:n.data)&&t(e.setState(n.data))}),[e,null===n||void 0===n?void 0:n.data,t]),Object(v.jsx)(i.a.Fragment,{})},E=n(163),F=n(455),P=n(726),B=n(15),M=n(62),D=n(48),L=n(12),q=n(24),G=n(429),_=n.n(G),W=n(428),z=n.n(W),U=n(825),Y=n(821),V=n(822),H=n(826),K=n(456),Z=["value","onChange","onBlur","error","label","helperText"],Q=function(e){var t=e.value,n=e.onChange,r=e.onBlur,a=e.error,c=e.label,o=(e.helperText,Object(q.a)(e,Z)),s=i.a.useState(!1),u=Object(L.a)(s,2),l=u[0],d=u[1];return Object(v.jsxs)(U.a,Object(h.a)(Object(h.a)({},o),{},{error:a,margin:"normal",fullWidth:!0,variant:"outlined",children:[Object(v.jsx)(Y.a,{htmlFor:"outlined-adornment-password",children:c||"Password"}),Object(v.jsx)(V.a,{id:"outlined-adornment-password",type:l?"text":"password",value:t,onChange:n,onBlur:r,autoComplete:"password",endAdornment:Object(v.jsx)(H.a,{position:"end",children:Object(v.jsx)(K.a,{"aria-label":"toggle password visibility",onClick:function(){d(!l)},onMouseDown:function(e){e.preventDefault()},edge:"end",children:l?Object(v.jsx)(z.a,{}):Object(v.jsx)(_.a,{})})}),label:c||"Password"})]}))},X={password:"",confirmPassword:""},J=function(){var e=Object(f.h)().token,t=Object(f.g)(),n=Object(B.e)({defaultValues:X}),r=n.control,a=n.handleSubmit,c=n.watch,o=n.formState.errors,s=Object(O.useMutation)(A.a.Auth.changePassword,{onSuccess:function(){Object(m.b)("Password successfully updated!",{position:"top-right"}),t.push("".concat(C.b.login))},onError:M.e}),i=s.mutate,u=s.isLoading,l=a((function(t){var n=t.password;i({password:n,token:e})}));return Object(v.jsxs)("form",{onSubmit:l,children:[Object(v.jsx)(F.a,{variant:"h2",textAlign:"left",children:"Reset your password"}),Object(v.jsxs)(P.a,{component:"div",sx:{mt:2},children:[Object(v.jsx)(B.a,{control:r,name:"password",rules:{required:"Required",minLength:{value:8,message:"Password must have at least 8 characters"},pattern:{value:/(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).*/,message:"Minimum of 1 upper case letter, 1 lower case letter, 1 number"}},render:function(e){var t=e.field,n=t.value,r=t.onChange,a=t.onBlur;return Object(v.jsx)(Q,{value:n,onChange:r,onBlur:a,error:!!o.password})}}),Object(v.jsx)(B.a,{control:r,name:"confirmPassword",rules:{required:"Required",validate:{confirm:function(e){return e===c("password")||"The two passwords that you entered do not match!"}}},render:function(e){var t=e.field,n=t.value,r=t.onChange,a=t.onBlur;return Object(v.jsx)(Q,{value:n,onChange:r,onBlur:a,label:"Confirm password",error:!!o.confirmPassword})}}),Object(v.jsx)(D.a,{type:"submit",variant:"contained",sx:{mt:3,minWidth:41},loading:u,children:"Reset Password"})]})]})},$=n(29),ee=n(430),te=n.n(ee),ne=n(457),re=n(45),ae=function(){var e=Object(f.g)(),t=Object(B.e)({defaultValues:{email:""}}),n=t.control,r=t.handleSubmit,a=t.formState.errors,c=r((function(e){s({email:e.email.toLowerCase()})})),o=Object(O.useMutation)(A.a.Auth.resetPassword,{onSuccess:function(){Object(m.b)("Instructions to reset your password have been sent to you. Please Check your email.",{position:"top-right"}),e.push(C.b.login)},onError:M.e}),s=o.mutate,i=o.isLoading;return Object(v.jsxs)(v.Fragment,{children:[Object(v.jsxs)(ce,{onClick:function(){return e.goBack()},children:[Object(v.jsx)(te.a,{}),Object(v.jsx)(se,{children:"Back"})]}),Object(v.jsxs)("form",{onSubmit:c,children:[Object(v.jsx)(F.a,{variant:"h2",textAlign:"left",children:"Forgot password"}),Object(v.jsxs)(P.a,{component:"div",sx:{mt:1},children:[Object(v.jsxs)(oe,{children:["Enter the email address you used to sign up and we\u2019ll send you instructions to reset your password."," "]}),Object(v.jsx)(B.a,{control:n,name:"email",rules:{required:"Required",pattern:{value:/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:"Invalid email"}},render:function(e){var t=e.field,n=t.value,r=t.onChange,c=t.onBlur;return Object(v.jsx)(ne.a,{value:n,onChange:r,onBlur:c,error:!!a.email,margin:"normal",fullWidth:!0,label:"Email",autoComplete:"email",autoFocus:!0})}}),Object(v.jsx)(D.a,{type:"submit",variant:"contained",sx:{mt:3,minWidth:41},loading:i,children:"Send Reset Instructions"})]})]})]})},ce=Object(re.c)(D.b)(r||(r=Object($.a)(["\n position: absolute;\n top: 28px;\n left: 48px;\n display: flex;\n align-items: center;\n"]))),oe=re.c.div(a||(a=Object($.a)(["\n width: 80%;\n font-size: 1rem;\n line-height: 1.2rem;\n color: ",";\n mix-blend-mode: normal;\n opacity: 0.8;\n margin-bottom: 1rem;\n margin-top: 24px;\n"])),(function(e){return e.theme.text})),se=re.c.span(c||(c=Object($.a)(["\n margin-left: 5px;\n vertical-align: middle;\n"]))),ie=n(7),ue=n(209),le=n(121),de=function(){var e=Object(f.g)(),t=Object(ue.b)().actions,n=Object(j.b)(),r=Object(B.e)({defaultValues:{username:"",password:""}}),a=r.control,c=r.handleSubmit,o=r.formState.errors,s=Object(O.useMutation)(A.a.Auth.login,{onSuccess:function(r){var a=r.data;Object(le.c)(a),n(t.signIn());try{e.goBack()}catch(c){e.push("/")}},onError:M.e}),i=s.mutate,u=s.isLoading,l=c((function(e){var t=e.username,n=e.password;i({username:t.toLowerCase(),password:n})}));return Object(v.jsxs)("form",{onSubmit:l,children:[Object(v.jsx)(F.a,{variant:"h2",textAlign:"left",children:"Sign in to your account"}),Object(v.jsxs)(P.a,{component:"div",sx:{mt:2},display:"flex",flexDirection:"column",alignItems:"flex-start",children:[Object(v.jsx)(B.a,{control:a,name:"username",rules:{required:"Required"},render:function(e){var t=e.field,n=t.value,r=t.onChange,a=t.onBlur;return Object(v.jsx)(ne.a,{value:n,onChange:r,onBlur:a,error:!!o.username,margin:"normal",fullWidth:!0,label:"Login",name:"username",autoComplete:"username",autoFocus:!0})}}),Object(v.jsx)(B.a,{control:a,name:"password",rules:{required:"Required"},render:function(e){var t=e.field,n=t.value,r=t.onChange,a=t.onBlur;return Object(v.jsx)(Q,{value:n,onChange:r,onBlur:a,error:!!o.password})}}),Object(v.jsx)(be,{variant:"text",onClick:function(){return e.push("forgot-password")},children:"Forgot Password"}),Object(v.jsx)(D.a,{type:"submit",variant:"contained",sx:{mt:3,minWidth:41},disabled:u,loading:u,children:"Sign In"})]})]})},be=Object(ie.a)(D.a)((function(e){return{color:e.theme.palette.text.primary}})),je=function(){var e=Object(f.g)(),t=Object(x.a)((function(e){var t;return null===(t=e.auth)||void 0===t?void 0:t.authorized}));return i.a.useEffect((function(){t&&e.location.pathname.includes("/auth")&&e.push("/")}),[t,e]),Object(v.jsx)(E.a,{paddingTopRightHandSide:15,children:Object(v.jsxs)(f.d,{children:[Object(v.jsx)(f.b,{path:"".concat(C.b.login),component:de}),Object(v.jsx)(f.b,{exact:!0,path:"".concat(C.b.forgotPassword),component:ae}),Object(v.jsx)(f.b,{path:"".concat(C.b.changePassword,"/:token"),component:J}),Object(v.jsx)(f.a,{to:"".concat(C.b.login)})]})})},me=n(162),Oe=n(237),pe=n(93),fe=n(232),xe=n(233),he=n(139),ge=n(119),ve=n(46),ye=function(e){var t=e.open,n=e.handleClose,r=e.onExit,a=e.onSubmit,c=e.loading;return Object(v.jsxs)(ve.i,{open:t,onClose:n,children:[Object(v.jsx)(ve.f,{children:"You have made some changes to the contract"}),Object(v.jsx)(ve.e,{children:"An email will be sent to the customer with new information"}),Object(v.jsx)(ve.d,{disableSpacing:!0,children:Object(v.jsxs)(ge.a,{container:!0,columnSpacing:{xs:1,md:2},children:[Object(v.jsx)(ve.c,{onClick:r,children:"Discard changes"}),Object(v.jsx)(ve.b,{onClick:a,loading:c,children:"Send new contract"})]})})]})},Ce=n(239),Ae=n(151),Se=function(){var e,t,n=Object(f.g)(),r=Object(f.h)().contractId,a=Object(j.b)(),c=Object(Oe.b)().actions,o=Object(x.a)((function(e){return e.step})),u=Object(x.a)((function(e){return e.step.current})),l=Object(x.a)((function(e){return e.step.canSave})),d=Object(x.a)((function(e){return e.step.requestingGoTo})),b=void 0!==d,p=Object(x.a)((function(e){return e.step.latestStep})),g=Object(pe.d)({actions:c,state:o}),y=Object(s.useState)({exit:!1,saveAndExit:!1}),C=Object(L.a)(y,2),S=C[0],T=C[1],k=parseInt(r,10),w=Object(O.useQuery)([me.b.getById,{id:k}],A.a.Contracts.getById,{enabled:!!k,retry:!1}).data,N=Object(B.e)({defaultValues:Ae.c,mode:"onSubmit"}),I=N.handleSubmit,R=N.reset,F=N.formState.dirtyFields,q=Object.keys(F).length>0;Object(s.useEffect)((function(){if(null===w||void 0===w?void 0:w.data){var e=function(e){var t=e.customer,n=t.firstName,r=t.lastName,a=t.emailAddress,c=e.startDate,o=e.paymentType,s=e.retailPrice,i=e.interestRate,u=e.registrationFee,l=e.product,d=l.cost;return{customer:{firstName:n,lastName:r,emailAddress:a},product:{trailerType:l.trailerType,modelNumber:l.modelNumber,serialNumber:l.serialNumber,trNumber:l.trNumber,trailerLength:l.trailerLength,trailerWidth:l.trailerWidth,cost:d},startDate:c,paymentType:o,retailPrice:s,interestRate:i,registrationFee:u}}(w.data);R(Object(h.a)(Object(h.a)({},e),{},{startDate:new Date(e.startDate)}))}}),[null===w||void 0===w?void 0:w.data,R]),i.a.useEffect((function(){Object(M.f)(q)}),[q]);var G=Object(O.useMutation)(A.a.Contracts.createAdminFlowContract,{onSuccess:function(){Object(m.b)("Create contract successfully"),H()},onError:M.e}),_=G.mutate,W=G.isLoading,z=Object(O.useMutation)(A.a.Contracts.updateAdminFlow,{onSuccess:function(){Object(m.b)("Update contract successfully"),H()},onError:M.e}),U=z.mutate,Y=z.isLoading,V=I((function(e){k?U(Object(h.a)(Object(h.a)({},e),{},{customer:Object(h.a)(Object(h.a)({},e.customer),{},{emailAddress:e.customer.emailAddress.toLowerCase()}),product:Object(h.a)({},e.product),startDate:new Date(e.startDate.toUTCString()).toISOString(),id:k})):_(Object(h.a)(Object(h.a)({},e),{},{customer:Object(h.a)(Object(h.a)({},e.customer),{},{emailAddress:e.customer.emailAddress.toLowerCase()}),startDate:new Date(e.startDate.toUTCString()).toISOString()}))})),H=function(){a(c.exitStep()),n.push("/")},K=function(){V()},Z=function(){a(c.requestNext()),a(c.requestSave(!1))};Object(s.useEffect)((function(){!0===l&&T((function(e){return Object(h.a)(Object(h.a)({},e),{},{saveAndExit:!0})}))}),[l]);return Object(v.jsxs)(B.b,Object(h.a)(Object(h.a)({},N),{},{children:[Object(v.jsxs)(E.a,{title:(null===(e=g[u])||void 0===e?void 0:e.leftTitle)?g[u].leftTitle:"Add our customer ".concat(g[u].title.toLowerCase()),children:[Object(v.jsxs)(he.a,{children:[Object(v.jsx)(he.b,{onClick:function(){q?T((function(e){return Object(h.a)(Object(h.a)({},e),{},{exit:!0})})):H()},type:"button",children:"Exit"}),!!k&&Object(v.jsx)(he.c,{loading:b,sx:{backgroundColor:"success.main",color:"white"},onClick:K,children:"Save & Exit"})]}),Object(v.jsxs)(P.a,{component:"form",onSubmit:V,display:"flex",flex:1,flexDirection:"column",children:[Object(v.jsx)(xe.a,{steps:g,current:u,latestStep:p,onGoTo:function(e){return a(c.requestGoTo(e))}}),Object(v.jsx)(P.a,{onKeyUp:function(e){"Enter"===e.key&&u!==g.length-1&&Z()},component:"div",flex:1,px:3,sx:{maxHeight:"70vh",overflowY:"auto"},children:null===(t=g[u])||void 0===t?void 0:t.component}),Object(v.jsxs)(ve.a,{children:[Object(v.jsx)(fe.a,{current:u,step:g}),Object(v.jsxs)(P.a,{display:"flex",flex:1,justifyContent:"space-between",mt:2,px:6,children:[0!==u?Object(v.jsx)(D.a,{variant:"outlined",onClick:function(){return a(c.backStep())},children:"Back"}):Object(v.jsx)("div",{}),u!==g.length-1?Object(v.jsx)(D.a,{variant:"contained",loading:b,onClick:Z,children:"Next"}):Object(v.jsx)(D.a,{variant:"contained",loading:W||Y,onClick:V,children:"Send Application"})]})]})]})]}),Object(v.jsx)(Ce.a,{open:S.exit,onExit:H,handleClose:function(){return T((function(e){return Object(h.a)(Object(h.a)({},e),{},{exit:!1})}))}}),Object(v.jsx)(ye,{open:S.saveAndExit,onExit:H,handleClose:function(){return T((function(e){return Object(h.a)(Object(h.a)({},e),{},{saveAndExit:!1})}))},onSubmit:K,loading:Y||W})]}))},Te=n(414),ke=n(415),we=n(416),Ne=n(240),Ie=function(){var e,t,n,r=Object(f.g)(),a=Object(j.b)(),c=Object(Ne.b)().actions,o=Object(x.a)((function(e){return e.adminManualFlowSteps}))||{},u=o.current,l=o.requestingGoTo,d=o.latestStep,b=o.confirmation,p=o.paymentType,g=Object(x.a)((function(e){return e.adminManualFlowSteps})),y=void 0!==l,C=Object(s.useState)({exit:!1,success:!1,saveAndExit:!1}),S=Object(L.a)(C,2),T=S[0],k=S[1],w=Object(pe.b)({actions:c,state:g}),N=Object(B.e)({defaultValues:Object(h.a)({},Ae.b),mode:"onSubmit"}),I=N.handleSubmit,R=N.formState.dirtyFields,F=N.watch,q=N.reset,G=Object.keys(R).length>0;i.a.useEffect((function(){Object(M.f)(G)}),[G]);var _=Object(f.h)().contractId,W=parseInt(_,10),z=Object(O.useQuery)([me.b.getById,{id:W}],A.a.Contracts.getById,{enabled:!1,onSuccess:function(e){var t=Object(Te.b)(e.data);q(Object(h.a)(Object(h.a)({},Ae.b),t))}}).refetch;i.a.useEffect((function(){z()}),[z]);var U=Object(O.useMutation)(A.a.Contracts.createAdminManual,{onSuccess:function(){Object(m.b)("Create contract successfully"),X()},onError:M.e}),Y=U.mutate,V=U.isLoading,H=Object(O.useMutation)(A.a.Contracts.editManual,{onSuccess:function(){Object(m.b)("Edit contract successfully"),X()},onError:M.e}),K=H.mutate,Z=H.isLoading,Q=I((function(e){var t,n,r,a,c=e.customer,o=c.creditCardInfo,s=c.references,i=Object(h.a)(Object(h.a)({},e),{},{startDate:new Date(e.startDate.toUTCString()).toISOString()});"creditCard"===p?(i.customer.creditCardInfo=Object(M.b)(o),delete i.customer.bankAccountInfo):"bankAccount"===p&&delete i.customer.creditCardInfo,i.customer=Object(h.a)(Object(h.a)({},i.customer),{},{emailAddress:null===(t=i.customer)||void 0===t||null===(n=t.emailAddress)||void 0===n?void 0:n.toLowerCase(),businessEmail:null===(r=i.customer)||void 0===r||null===(a=r.businessEmail)||void 0===a?void 0:a.toLowerCase(),references:s.filter((function(e){return Object(M.d)(e)}))}),Object(M.a)(i.customer),W?W&&K(Object(h.a)(Object(h.a)({},i),{},{id:W})):Y(i)})),X=function(){k((function(e){return Object(h.a)(Object(h.a)({},e),{},{success:!1})})),a(c.exitStep()),r.push("/")},J=function(){a(c.requestNext())};return Object(v.jsxs)(B.b,Object(h.a)(Object(h.a)({},N),{},{children:[Object(v.jsxs)(E.a,{title:(null===(e=w[u])||void 0===e?void 0:e.leftTitle)?null===(t=w[u])||void 0===t?void 0:t.leftTitle:"Add our customer\n ".concat(w[u].title.toLowerCase()),children:[Object(v.jsxs)(he.a,{children:[Object(v.jsx)(D.a,{variant:"contained",sx:{opacity:0,cursor:"default"},onDoubleClick:function(){return q(we.a)},children:"dummie data"}),Object(v.jsx)(he.b,{onClick:function(){G?k((function(e){return Object(h.a)(Object(h.a)({},e),{},{exit:!0})})):X()},type:"button",children:"Exit"}),Object(v.jsx)(he.c,{loading:y,sx:{backgroundColor:"success.main",color:"white"},onClick:Q,children:"Save & Exit"})]}),Object(v.jsxs)(P.a,{component:"form",onSubmit:Q,display:"flex",flex:1,flexDirection:"column",children:[Object(v.jsx)(xe.a,{steps:w,current:u,latestStep:d,onGoTo:function(e){return a(c.requestGoTo(e))}}),Object(v.jsx)(P.a,{component:"div",flex:1,px:3,onKeyUp:function(e){"Enter"===e.key&&u!==w.length-1&&J()},sx:{maxHeight:"70vh",overflowY:"auto"},children:null===(n=w[u])||void 0===n?void 0:n.component}),Object(v.jsxs)(ve.a,{children:[Object(v.jsx)(fe.a,{current:u,step:w}),Object(v.jsxs)(P.a,{display:"flex",flex:1,justifyContent:"space-between",mt:2,px:6,children:[0!==u?Object(v.jsx)(D.a,{variant:"outlined",onClick:function(){return a(c.backStep())},children:"Back"}):Object(v.jsx)("div",{}),u!==w.length-1?Object(v.jsx)(D.a,{variant:"contained",loading:y,onClick:J,children:"Next"}):Object(v.jsx)(D.a,{variant:"contained",onClick:function(){var e=!F("customOrder")||!!(null===b||void 0===b?void 0:b.returnable);(null===b||void 0===b?void 0:b.term)&&e?k((function(e){return Object(h.a)(Object(h.a)({},e),{},{success:!0})})):a(c.updateConfirmation({errorTerm:!(null===b||void 0===b?void 0:b.term),errorReturnable:!(null===b||void 0===b?void 0:b.returnable)}))},children:"Approve contract"})]})]})]})]}),Object(v.jsx)(Ce.a,{open:T.exit,onExit:X,handleClose:function(){return k((function(e){return Object(h.a)(Object(h.a)({},e),{},{exit:!1})}))}}),Object(v.jsx)(ke.a,{open:T.success,handleClose:function(){return k((function(e){return Object(h.a)(Object(h.a)({},e),{},{success:!1})}))},onSuccess:Q,loading:V}),Object(v.jsx)(ye,{open:T.saveAndExit,onExit:X,handleClose:function(){return k((function(e){return Object(h.a)(Object(h.a)({},e),{},{saveAndExit:!1})}))},onSubmit:function(){return Q()},loading:V||Z})]}))},Re=n(810),Ee=n(742),Fe=n(413);function Pe(){return Object(v.jsx)(Ee.a,{component:"main",maxWidth:"sm",sx:{height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},children:Object(v.jsxs)(Re.a,{sx:{textAlign:"center"},children:[Object(v.jsx)("img",{src:Fe.default,alt:"success"}),Object(v.jsx)(F.a,{component:"h1",variant:"h2",sx:{mt:2,mb:1},children:"Your application has been submitted"}),Object(v.jsx)(F.a,{variant:"body2",sx:{fontWeight:"normal",color:"text.secondary"},children:"Your application has been sent to the Rent then Buy staff for there approval."})]})})}var Be=y((function(){return Promise.all([n.e(3),n.e(5)]).then(n.bind(null,878))})),Me=y((function(){return n.e(6).then(n.bind(null,881))})),De=y((function(){return Promise.all([n.e(8),n.e(10)]).then(n.bind(null,882))})),Le=y((function(){return Promise.all([n.e(7),n.e(4)]).then(n.bind(null,877))})),qe=y((function(){return n.e(9).then(n.bind(null,872))})),Ge=new O.QueryClient;function _e(){return Object(v.jsx)(O.QueryClientProvider,{client:Ge,children:Object(v.jsx)(p.a,{children:Object(v.jsxs)(f.d,{children:[Object(v.jsx)(f.b,{path:"/auth",component:je}),Object(v.jsx)(f.b,{path:"".concat(C.a.customerFlow,"/:id"),component:De}),Object(v.jsx)(f.b,{path:"".concat(C.a.notFound),component:Me,exact:!0}),Object(v.jsx)(f.b,{path:"".concat(C.a.sentSuccess),component:Pe}),Object(v.jsx)(f.b,{path:"/",component:We}),Object(v.jsx)(f.b,{component:Me}),Object(v.jsx)(f.a,{to:"/"})]})})})}var We=function(){var e=Object(x.a)((function(e){var t;return null===(t=e.auth)||void 0===t?void 0:t.authorized})),t=Object(f.g)();return i.a.useEffect((function(){e||("/"!==t.location.pathname?t.push("".concat(C.b.login,"?redirectUrl=").concat(t.location.pathname)):t.push("".concat(C.b.login)))}),[t,e]),e?Object(v.jsxs)(v.Fragment,{children:[Object(v.jsx)(R,{}),Object(v.jsxs)(f.d,{children:[Object(v.jsx)(f.b,{path:"".concat(C.a.adminApproval,"/:id"),component:qe}),Object(v.jsx)(f.b,{path:"".concat(C.a.adminManual,"/:contractId"),component:Ie}),Object(v.jsx)(f.b,{path:"".concat(C.a.adminManual),component:Ie}),Object(v.jsx)(f.b,{path:"".concat(C.a.addContract,"/:contractId?"),component:Se}),Object(v.jsx)(f.b,{path:"".concat(C.a.contract,"/:contractId"),component:Le}),Object(v.jsx)(f.b,{exact:!0,path:"/",component:Be}),Object(v.jsx)(f.a,{to:"/"})]})]}):null},ze=n(447),Ue=n(441),Ye=n(813),Ve=n(442),He=n(307),Ke={},Ze={en:{translation:He},de:{translation:Ve}};!function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ke,r=arguments.length>2?arguments[2]:void 0;Object.keys(t).forEach((function(a){var c=r?"".concat(r,".").concat(a):a;"object"===typeof t[a]?(n[a]={},e(t[a],n[a],c)):n[a]=c}))}(He);ze.a.use(Ye.a).use(Ue.a).init({resources:Ze,fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1}});var Qe=function(e){e&&e instanceof Function&&n.e(11).then(n.bind(null,875)).then((function(t){var n=t.getCLS,r=t.getFID,a=t.getFCP,c=t.getLCP,o=t.getTTFB;n(e),r(e),a(e),c(e),o(e)}))};var Xe={selected:window.localStorage&&localStorage.getItem("selectedTheme")||"system"},Je=Object(T.b)({name:"theme",initialState:Xe,reducers:{changeTheme:function(e,t){e.selected=t.payload}}}),$e=(Je.actions,Je.reducer),et=n(315),tt=n(417),nt=n(418),rt=Object(T.a)({reducer:{theme:$e,auth:ue.a,step:Oe.a,configs:I,customerFlowSteps:nt.a,adminApprovalFlowSteps:tt.a,adminManualFlowSteps:Ne.a,pagination:et.a},devTools:"".length>0}),at=n(308),ct=n(834),ot=n.p+"static/media/SFPRODISPLAYBOLD.b1f4d2c6.OTF",st=n.p+"static/media/SFPRODISPLAYMEDIUM.b85d841d.OTF",it=n.p+"static/media/SFPRODISPLAYREGULAR.d1f5e6e1.OTF",ut=n(236),lt={light:{primary:"#F00023",primaryLight:"#F00023",primaryDark:"#B80012",text:"#313131",textSecondary:"#535F78",background:"#FBFCFE",backgroundVariant:"rgba(251,249,249,1)",backgroundLightBlue:"#DEE7FA",border:"rgba(58,52,51,0.12)",borderLight:"rgba(58,52,51,0.05)",fontFamily:"SF ProDisplay",colorErrorRed:"#F00023",colorGreen:"#1EAD54",colorOffBlue:"#535F78"}},dt=Object(ut.a)([function(e){return e.theme||Xe}],(function(e){return"system"===e.selected?lt.light:lt[e.selected]})),bt=(Object(ut.a)([function(e){return e.theme||Xe}],(function(e){return e.selected})),lt.light),jt='\n@font-face {\n font-family: "SF ProDisplay";\n src: local("SF ProDisplay"), url('.concat(it,');\n font-weight: normal;\n font-style: normal;\n}\n@font-face {\n font-family: "SF ProDisplay";\n src:local("SF ProDisplay"), url(').concat(ot,');\n font-weight: bold;\n font-style: normal;\n}\n@font-face {\n font-family: "SF ProDisplay";\n src: local("SF ProDisplay"),url(').concat(st,");\n font-weight: 500;\n font-style: normal;\n}\n"),mt=Object(at.a)({palette:{primary:{main:bt.primary,dark:bt.primaryDark,light:bt.primaryLight},background:{default:bt.background},secondary:{main:bt.primary,light:bt.backgroundLightBlue,contrastText:bt.textSecondary},divider:bt.border,text:{primary:bt.text,secondary:bt.colorOffBlue},success:{main:bt.colorGreen}},breakpoints:{values:{xs:0,sm:750,md:900,lg:1200,xl:1536}},typography:{fontFamily:["SF ProDisplay","Opens Sans","serif"].join(","),button:{textTransform:"inherit",fontWeight:500,boxShadow:"unset"},h1:{fontSize:"3.125rem"},h2:{fontSize:"2rem"}},components:{MuiInputBase:{styleOverrides:{root:{"&.Mui-error":{background:"rgba(255, 0, 0, 0.1)",color:bt.textSecondary}}}},MuiList:{styleOverrides:{root:{"&.MuiMenu-list":{paddingTop:0,paddingBottom:0}}}},MuiMenuItem:{styleOverrides:{root:{color:bt.colorOffBlue,padding:"12px 16px",borderBottom:"1px solid #DEE7FA","&:last-child":{borderBottom:"1px solid white"}}}},MuiIconButton:{styleOverrides:{root:{marginRight:"10px","&:hover":{}}}},MuiSnackbarContent:{styleOverrides:{root:{boxShadow:"none",color:bt.text,backgroundColor:"white",border:"1px solid black"}}},MuiFormLabel:{styleOverrides:{root:{"&.Mui-focused":{color:bt.colorGreen}}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:"inherit",opacity:.8,marginLeft:0,marginTop:"8px"}}},MuiButton:{styleOverrides:{root:{boxShadow:"none",":hover":{boxShadow:"none"}}}},MuiTypography:{styleOverrides:{root:{fontWeight:"bold"}}},MuiOutlinedInput:{styleOverrides:{input:{padding:"16px"},root:{borderColor:bt.colorGreen,borderRadius:"7px","&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:bt.colorGreen,borderWidth:"1px"}}}},MuiCssBaseline:{styleOverrides:{body:{fontFamily:jt,height:"-webkit-fill-available"}}}},shape:{borderRadius:4}}),Ot=function(e){Je.actions;var t=Object(j.c)(dt);return Object(v.jsx)(re.a,{theme:t,children:Object(v.jsx)(ct.a,{theme:mt,children:s.Children.only(e.children)})})},pt=(n(719),document.getElementById("root"));u.render(Object(v.jsx)(j.a,{store:rt,children:Object(v.jsx)(Ot,{children:Object(v.jsx)(l.b,{children:Object(v.jsx)(s.StrictMode,{children:Object(v.jsxs)(b.a,{children:[Object(v.jsx)(o.a,{}),Object(v.jsx)(_e,{}),Object(v.jsx)(m.a,{position:"top-center",autoClose:3e3,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0,className:"toast-container"})]})})})})}),pt),Qe()},93:function(e,t,n){"use strict";n.d(t,"d",(function(){return _t})),n.d(t,"c",(function(){return Wt})),n.d(t,"a",(function(){return zt})),n.d(t,"b",(function(){return Ut}));var r,a=n(3),c=n(1),o=n.n(c),s=n(119),i=n(15),u=n(22),l=n(24),d=n(457),b=n(0),j=["name","rules"],m=function(e){var t=e.name,n=e.rules,r=Object(l.a)(e,j),c=Object(i.f)(),o=c.control,s=c.formState.errors,u=Object(i.c)(s,t);return Object(b.jsx)(b.Fragment,{children:Object(b.jsx)(i.a,{name:t,control:o,rules:n,render:function(e){var n=e.field,c=n.value,o=n.onChange,s=n.onBlur;return Object(b.jsx)(d.a,Object(a.a)(Object(a.a)({},Object(a.a)(Object(a.a)({},r),{},{value:null!==c&&void 0!==c?c:"",onChange:o,onBlur:s})),{},{error:!!u,margin:"normal",fullWidth:!0,name:t,autoComplete:t}))}})})},O=n(432),p=n(825),f=n(821),x=n(820),h=n(741),g=n(830),v=function(e){var t=e.name,n=e.required,r=void 0!==n&&n,a=Object(i.f)(),c=a.control,o=a.formState.errors;return Object(b.jsx)(i.a,{name:t,control:c,rules:r?{}:{required:"Required"},render:function(e){var n=e.field,r=n.value,a=n.onChange,c=n.onBlur;return Object(b.jsxs)(b.Fragment,{children:[Object(b.jsxs)(p.a,{fullWidth:!0,sx:{marginTop:2},error:!!Object(i.c)(o,t),children:[Object(b.jsx)(f.a,{id:"demo-simple-select-label",children:"State"}),Object(b.jsx)(x.a,{labelId:"demo-simple-select-label",id:"demo-simple-select",label:"State",value:r||"",onChange:a,onBlur:c,children:y.map((function(e,t){return Object(b.jsx)(h.a,{value:e,children:e},t)}))})]}),Object(b.jsx)(O.a,{errors:o,name:t,render:function(e){var t=e.message;return t&&"Required"!==t&&Object(b.jsx)(g.a,{sx:{mt:2},children:t})}})]})}})},y=["New South Wales","Victoria","Queensland","Tasmania","Wester Australia","Southern Australia"],C=n(433),A=n(68),S=["value","onChange","onBlur"],T=["value","onChange","onBlur"],k=["value","onChange","onBlur"],w=["value","onChange","onBlur"],N=["value","onChange","onBlur"],I={decimalScale:0,allowLeadingZeros:!0,allowNegative:!1},R=o.a.forwardRef((function(e,t){var n=e.value,r=e.onChange,c=e.onBlur,o=Object(l.a)(e,S);return Object(b.jsx)(A.a,Object(a.a)(Object(a.a)({getInputRef:t,onValueChange:function(e){var t=e.value;return r(t||null)},format:"###-###",value:n,onBlur:c},I),o))})),E=o.a.forwardRef((function(e,t){var n=e.value,r=e.onChange,c=e.onBlur,o=Object(l.a)(e,T);return Object(b.jsx)(A.a,Object(a.a)(Object(a.a)({getInputRef:t,onValueChange:function(e){var t=e.value;return r(t||null)},format:"### ### ###",value:n,onBlur:c},I),o))})),F=o.a.forwardRef((function(e,t){var n=e.value,r=e.onChange,c=e.onBlur,o=Object(l.a)(e,k);return Object(b.jsx)(A.a,Object(a.a)(Object(a.a)({getInputRef:t,onValueChange:function(e){var t=e.value;return r(t||null)},format:"#### #### #### ####",value:n,onBlur:c},I),o))})),P=o.a.forwardRef((function(e,t){var n=e.value,r=e.onChange,c=e.onBlur,o=Object(l.a)(e,w);return Object(b.jsx)(A.a,Object(a.a)(Object(a.a)({getInputRef:t,onValueChange:function(e){var t=e.value;return r(t||null)},format:"###",value:n,onBlur:c},I),o))})),B=o.a.forwardRef((function(e,t){var n=e.value,r=e.onChange,c=e.onBlur,o=Object(l.a)(e,N);return Object(b.jsx)(A.a,Object(a.a)({getInputRef:t,onValueChange:function(e){var t=e.formattedValue;r(t||null)},decimalScale:0,allowNegative:!1,value:n,onBlur:c,format:"##/##"},o))})),M=R,D=["value","onChange","onBlur"],L=o.a.forwardRef((function(e,t){var n=e.value,r=e.onChange,c=e.onBlur,o=Object(l.a)(e,D);return Object(b.jsx)(A.a,Object(a.a)(Object(a.a)({getInputRef:t,onValueChange:function(e){var t=e.value;return r(t||null)},format:"## #### ####",value:n,onBlur:c},I),o))})),q=["value","onChange","onBlur"],G=o.a.forwardRef((function(e,t){var n=e.value,r=e.onChange,c=e.onBlur,o=Object(l.a)(e,q);return Object(b.jsx)(A.a,Object(a.a)({getInputRef:t,required:!0,value:n,type:"text",onValueChange:function(e){var t=e.value;r(t||null)},onBlur:c,thousandSeparator:!0,format:"####",allowLeadingZeros:!0},o))})),_=["value","onChange","onBlur"],W=o.a.forwardRef((function(e,t){var n=e.value,r=e.onChange,c=e.onBlur,o=Object(l.a)(e,_);return Object(b.jsx)(A.a,Object(a.a)(Object(a.a)({getInputRef:t,onValueChange:function(e){var t=e.value;r(t?+t:null)},format:"## ### ### ###",allowLeadingZeros:!0},I),{},{value:n,onBlur:c},o))})),z={maxLength:250,pattern:/\S/},U={maxLength:250,pattern:/\S/,required:!0},Y=Object(a.a)(Object(a.a)({},z),{},{maxLength:40}),V=Object(a.a)(Object(a.a)({},Y),{},{required:!0}),H=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,K=Object(a.a)(Object(a.a)({},U),{},{pattern:H}),Z=Object(a.a)(Object(a.a)({},z),{},{pattern:H}),Q={pattern:/^[0-9]*$/,maxLength:4,minLength:4},X={rules:Object(a.a)({required:!0},Q),label:"Post Code",InputProps:{inputComponent:G}},J={rules:Q,label:"Post Code",InputProps:{inputComponent:G}},$={required:!0,maxLength:250,validate:{positiveNumber:function(e){return e>0||!1}}},ee=C.PhoneNumberUtil.getInstance(),te={rules:{minLength:8,validate:function(e){return function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{var n=ee.parse(e,"AU");return ee.isValidNumber(n)}catch(r){return!t}}(e,!1)||!1}},label:"Phone number",InputProps:{inputComponent:L}},ne=Object(a.a)(Object(a.a)({},te),{},{rules:Object(a.a)({required:!0},te.rules)}),re={rules:{maxLength:11,minLength:11,pattern:/^[0-9]*$/},label:"ABN",InputProps:{inputComponent:W}},ae=function(e){var t=e.actions,n=e.state,r=Object(u.b)(),o=n.requestingGoTo,l=Object(i.f)().trigger;return Object(c.useEffect)((function(){o&&l(["customer.emailAddress","customer.firstName","customer.lastName","customer.phone","customer.streetAddress","customer.homeAddress","customer.city","customer.state","customer.postCode"]).then((function(e){return r(t.answerGoTo(e))}))}),[t,r,o,l]),Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"customer.firstName",rules:V,label:"First Name",autoFocus:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{rules:V,name:"customer.lastName",label:"Last Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{rules:K,name:"customer.emailAddress",label:"Email address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"customer.phone"},ne))}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.streetAddress",rules:U,label:"Street address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.homeAddress",label:"Apt, suite, etc (Optional)",rules:z})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,{name:"customer.city",rules:U,label:"City"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(v,{name:"customer.state"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,Object(a.a)({name:"customer.postCode"},X))})]})},ce=function(e){var t=e.actions,n=e.state,r=Object(u.b)(),o=n.requestingGoTo,l=Object(i.f)().trigger;return Object(c.useEffect)((function(){o&&l(["customer.businessName","customer.businessABN","customer.businessPhone","customer.businessEmail","customer.businessStreetAddress","customer.businessAddress","customer.businessCity","customer.businessState","customer.businessPostCode"]).then((function(e){return r(t.answerGoTo(e))}))}),[t,r,o,l]),Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"customer.businessName",rules:z,label:"Business name",autoFocus:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,Object(a.a)({name:"customer.businessABN"},re))}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,Object(a.a)({name:"customer.businessPhone"},te))}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"customer.businessEmail",rules:Z,label:"Email"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.businessStreetAddress",rules:z,label:"Street address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.businessAddress",rules:z,label:"Apt, suite, etc (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,{name:"customer.businessCity",rules:z,label:"City"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(v,{name:"customer.businessState",required:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,Object(a.a)({name:"customer.businessPostCode"},J))})]})},oe=n(831),se=n(832),ie=n(818),ue=n(455),le=n(726),de=n(7),be=n(53),je=function(e){var t=e.actions,n=Object(u.b)(),r=Object(i.f)().watch,c=Object(be.a)((function(e){var t;return null===(t=e.adminManualFlowSteps)||void 0===t?void 0:t.confirmation}))||{},o=r("customOrder");return Object(b.jsxs)(s.a,{container:!0,spacing:2,sx:{mt:0},children:[Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(le.a,{sx:Object(a.a)(Object(a.a)({},me),{},{borderColor:c.errorTerm?"primary.main":"transparent"}),children:Object(b.jsx)(p.a,{required:!0,error:!(null===c||void 0===c?void 0:c.term),children:Object(b.jsx)(oe.a,{children:Object(b.jsx)(se.a,{control:Object(b.jsx)(ie.a,{checked:null===c||void 0===c?void 0:c.term,onChange:function(e){n(t.updateConfirmation({term:e.target.checked,errorTerm:!e.target.checked}))},name:"term",sx:{"& .MuiSvgIcon-root":{fontSize:32}}}),label:Object(b.jsxs)(ue.a,{variant:"body2",sx:{ml:1},children:["I have read and understood and agreed to the \xa0",Object(b.jsx)(Oe,{target:"_blank",href:"https://wordpress-615660-2228780.cloudwaysapps.com/index.php/terms-conditions/",children:"Terms & Conditions"})]})})})})})}),!!o&&Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(le.a,{sx:Object(a.a)(Object(a.a)({},me),{},{borderColor:c.errorReturnable?"primary.main":"transparent"}),children:Object(b.jsx)(p.a,{required:!0,error:!(null===c||void 0===c?void 0:c.errorReturnable),children:Object(b.jsx)(oe.a,{children:Object(b.jsx)(se.a,{control:Object(b.jsx)(ie.a,{checked:null===c||void 0===c?void 0:c.returnable,onChange:function(e){n(t.updateConfirmation({returnable:e.target.checked,errorReturnable:!e.target.checked}))},name:"term",sx:{"& .MuiSvgIcon-root":{fontSize:32}}}),label:Object(b.jsxs)(ue.a,{variant:"body2",sx:{ml:1},children:["This trailer is a special custom order and as per the \xa0",Object(b.jsx)(Oe,{target:"_blank",href:"https://wordpress-615660-2228780.cloudwaysapps.com/index.php/terms-conditions/",children:"Terms & Conditions"})," ","I agree it is not returnable"]})})})})})})]})},me={backgroundColor:"#F0F3FC",px:4,borderWidth:"1px",borderStyle:"solid",borderColor:"transparent",minWidth:"100%"},Oe=Object(de.a)("a")((function(e){return{color:e.theme.palette.primary.main,cursor:"poiter",display:"inline-block",textDecoration:"none"}})),pe=function(e){var t=e.actions,n=e.state,r=e.isManual,a=Object(u.b)(),o=n.requestingGoTo,l=Object(i.f)(),d=l.control,j=l.trigger;return Object(c.useEffect)((function(){o&&j(["product.trailerType","product.modelNumber","product.serialNumber","product.trNumber","product.trailerLength","product.trailerWidth"]).then((function(e){return a(t.answerGoTo(e))}))}),[t,a,o,j]),Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"product.trailerType",rules:U,label:"Trailer Type",autoFocus:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"product.modelNumber",rules:U,label:"Model Number"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"product.serialNumber",rules:U,label:"Serial Number"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"product.trNumber",rules:U,label:"TR (policy) number"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"product.trailerLength",rules:U,label:"Length"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"product.trailerWidth",rules:U,label:"Width"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(i.a,{name:"customOrder",control:d,render:function(e){var t=e.field,n=t.value,a=t.onChange;return Object(b.jsx)(le.a,{sx:me,children:Object(b.jsx)(p.a,{children:Object(b.jsx)(oe.a,{children:Object(b.jsx)(se.a,{control:Object(b.jsx)(ie.a,{checked:n,onChange:a,name:"term",sx:{"& .MuiSvgIcon-root":{fontSize:32}},disabled:!r}),label:Object(b.jsx)(ue.a,{variant:"body2",sx:{ml:1},children:"This trailer is a special custom order."})})})})})}})})]})},fe=n(61),xe={rules:{required:!0,minLength:6,pattern:/^[a-zA-Z0-9]{6,}$/},label:"BSB",InputProps:{inputComponent:M}},he={rules:{required:!0,maxLength:9,pattern:/^[a-zA-Z0-9]{8,}$/},label:"Account number",InputProps:{inputComponent:E}},ge={rules:{required:!0,maxLength:250},label:"Name on card"},ve={rules:{required:!0,maxLength:16,pattern:/^[a-zA-Z0-9]{16,}$/},InputProps:{inputComponent:F},label:"Card number"},ye={rules:{required:!0,pattern:/^(0[1-9]|1[0-2])\/?([0-9]{4}|[0-9]{2})$/},label:"Expiry",placeholder:"01/26",InputProps:{inputComponent:B}},Ce={rules:{required:!0,maxLength:3,pattern:/^[a-zA-Z0-9]{3,}$/},label:"CVV",InputProps:{inputComponent:P}},Ae=n(5),Se=n(819),Te=n(833),ke=["children","value","index"],we=Object(de.a)(Se.a)({"& .MuiTabs-indicator":{backgroundColor:"transparent",display:"none"},"& .MuiTabs-flexContainer":{border:"1px solid black",width:"fit-content",padding:"2px 3px",borderRadius:4,margin:"22px auto 17px auto"}}),Ne=Object(de.a)((function(e){return Object(b.jsx)(Te.a,Object(a.a)({disableRipple:!0},e))}))((function(e){var t,n=e.theme;return t={textTransform:"none",width:129,minHeight:29,borderRadius:4,padding:0},Object(Ae.a)(t,n.breakpoints.up("sm"),{minWidth:0}),Object(Ae.a)(t,"fontWeight",n.typography.fontWeightRegular),Object(Ae.a)(t,"&:hover",{color:n.palette.primary.dark,opacity:1}),Object(Ae.a)(t,"&.Mui-selected",{color:"white",backgroundColor:n.palette.primary.dark,fontWeight:n.typography.fontWeightMedium}),t})),Ie=function(e){var t=e.children,n=e.value,r=e.index,c=Object(l.a)(e,ke);return Object(b.jsx)("div",Object(a.a)(Object(a.a)({role:"tabpanel",hidden:n!==r,id:"full-width-tabpanel-".concat(r),"aria-labelledby":"full-width-tab-".concat(r)},c),{},{children:n===r&&Object(b.jsx)(ue.a,{children:t})}))};!function(e){e[e.Bank=0]="Bank",e[e.Card=1]="Card"}(r||(r={}));var Re,Ee=function(e){var t=e.actions,n=e.state,l=Object(u.b)(),d=n.requestingGoTo,j=n.paymentType,O=Object(i.f)(),p=O.trigger,f=O.watch,x=o.a.useMemo((function(){return"bankAccount"===j?r.Bank:r.Card}),[j]);Object(c.useEffect)((function(){l(t.updatepaymentType(f("customer.creditCardInfo.cardName")?"creditCard":"bankAccount"))}),[t,l,f]);var h=Object(fe.a)();return Object(c.useEffect)((function(){d&&(x===r.Bank?p(["customer.bankAccountInfo.bankAccountName","customer.bankAccountInfo.bankAccountNo","customer.bankAccountInfo.bsb"]).then((function(e){l(t.answerGoTo(e))})):p(["customer.creditCardInfo.cardName","customer.creditCardInfo.cardNumber","customer.creditCardInfo.cvv","customer.creditCardInfo.expiry"]).then((function(e){return l(t.answerGoTo(e))})))}),[t,l,d,x,p]),Object(b.jsxs)(b.Fragment,{children:[Object(b.jsxs)(we,{value:x,onChange:function(e,n){l(t.updatepaymentType(n?"creditCard":"bankAccount"))},"aria-label":"ant example",children:[Object(b.jsx)(Ne,{label:"Bank details"}),Object(b.jsx)(Ne,{label:"Card details"})]}),Object(b.jsx)(Ie,{value:x,index:0,dir:h.direction,children:Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.bankAccountInfo.bankAccountName",rules:U,label:"Account name",autoFocus:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"customer.bankAccountInfo.bsb"},xe))}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"customer.bankAccountInfo.bankAccountNo"},he))})]})}),Object(b.jsx)(Ie,{value:x,index:1,dir:h.direction,children:Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"customer.creditCardInfo.cardName"},ge))}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"customer.creditCardInfo.cardNumber"},ve))}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,Object(a.a)({name:"customer.creditCardInfo.expiry"},ye))}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,Object(a.a)({name:"customer.creditCardInfo.cvv"},Ce))})]})})]})},Fe=function(e){var t=e.actions,n=e.state,r=Object(u.b)(),o=n.requestingGoTo,l=Object(i.f)().trigger;return Object(c.useEffect)((function(){o&&l(["customer.references"]).then((function(e){return r(t.answerGoTo(e))}))}),[t,r,o,l]),Object(b.jsxs)(b.Fragment,{children:[Object(b.jsxs)(s.a,{container:!0,spacing:2,sx:{p:0,pt:3},children:[Object(b.jsx)(s.a,{item:!0,xs:12,sx:{mb:-1},children:Object(b.jsx)(ue.a,{children:"1st Family member of applicants"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,sx:{pt:0},children:Object(b.jsx)(m,{name:"customer.references.0.firstName",rules:V,label:"First Name",autoFocus:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,sx:{pt:0},children:Object(b.jsx)(m,{name:"customer.references.0.lastName",rules:V,label:"Last Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.references.0.relationship",rules:U,label:"Relationship to applicant"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.references.0.streetAddress",rules:U,label:"Street address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.references.0.homeAddress",label:"Apt, suite, etc (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,{name:"customer.references.0.city",rules:U,label:"City"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(v,{name:"customer.references.0.state"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,Object(a.a)({name:"customer.references.0.postCode"},X))})]}),Object(b.jsxs)(s.a,{container:!0,spacing:2,sx:{p:0,pt:3},children:[Object(b.jsx)(s.a,{item:!0,xs:12,sx:{mb:-1},children:Object(b.jsx)(ue.a,{children:"2nd Family member of applicants (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"customer.references.1.firstName",rules:Y,label:"First Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"customer.references.1.lastName",rules:Y,label:"Last Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.references.1.relationship",rules:z,label:"Relationship to applicant"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.references.1.streetAddress",rules:z,label:"Street address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.references.1.homeAddress",label:"Apt, suite, etc (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,{name:"customer.references.1.city",rules:z,label:"City"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(v,{name:"customer.references.1.state",required:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,Object(a.a)({name:"customer.references.1.postCode"},J))})]}),Object(b.jsxs)(s.a,{container:!0,spacing:2,sx:{p:0,pt:3},children:[Object(b.jsx)(s.a,{item:!0,xs:12,sx:{mb:-1},children:Object(b.jsx)(ue.a,{children:"1st friend of applicant"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"customer.references.2.firstName",rules:V,label:"First Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"customer.references.2.lastName",rules:V,label:"Last Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.references.2.streetAddress",rules:U,label:"Street address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.references.2.homeAddress",label:"Apt, suite, etc (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,{name:"customer.references.2.city",rules:U,label:"City"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(v,{name:"customer.references.2.state"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,Object(a.a)({name:"customer.references.2.postCode"},X))})]}),Object(b.jsxs)(s.a,{container:!0,spacing:2,sx:{p:0,pt:3},children:[Object(b.jsx)(s.a,{item:!0,xs:12,sx:{mb:-1},children:Object(b.jsx)(ue.a,{children:"2nd friend of applicant (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"customer.references.3.firstName",rules:Y,label:"First Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"customer.references.3.lastName",rules:Y,label:"Last Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.references.3.streetAddress",rules:z,label:"Street address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.references.3.homeAddress",label:"Apt, suite, etc (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,{name:"customer.references.3.city",rules:z,label:"City"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(v,{name:"customer.references.3.state",required:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,Object(a.a)({name:"customer.references.3.postCode"},J))})]}),Object(b.jsxs)(s.a,{container:!0,spacing:2,sx:{p:0,pt:3},children:[Object(b.jsx)(s.a,{item:!0,xs:12,sx:{mb:-1},children:Object(b.jsx)(ue.a,{children:"Employer details"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"customer.references.4.businessName",rules:U,label:"Business name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"customer.references.4.contactPerson",rules:U,label:"Contact person"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"customer.references.4.phone"},ne))}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.references.4.streetAddress",rules:U,label:"Street address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.references.4.homeAddress",label:"Apt, suite, etc (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,{name:"customer.references.4.city",rules:U,label:"City"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(v,{name:"customer.references.4.state"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,Object(a.a)({name:"customer.references.4.postCode"},X))})]})]})},Pe={DRIVER_LICENSE_FRONT:"Driver License Front",DRIVER_LICENSE_BACK:"Driver License Back",BANK_ACCOUNT:"Bank Account",CREDIT_CARD:"Credit Card",MEDICARE_CARD:"Medicare Card",MOTOR_VEHICLE_REGO:"Motor Vehice Rego"},Be=n(12),Me=n(435),De=n.n(Me),Le=n(436),qe=n.n(Le),Ge=n(262),_e=n(823),We=n(107),ze=n(44),Ue=n(448),Ye=n(51),Ve=n(156),He=n(54),Ke=n(56),Ze=n.p+"static/media/add.e5834b01.svg",Qe=n(200),Xe=n(124),Je=["title","onChange","value","name","errors"],$e=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_HOST:"https://api.stage.app.rentthenbuy.net.au"}).REACT_APP_ASSETS_HOST,et=function(e){var t=e.title,n=e.onChange,r=e.value,c=e.name,s=e.errors,u=Object(l.a)(e,Je),d=Object(We.a)(),j=Object(Ge.a)(d.breakpoints.only("xs")),m=o.a.useState((null===r||void 0===r?void 0:r.endsWith(".pdf"))?Qe.a:r),O=Object(Be.a)(m,2),p=O[0],f=O[1];o.a.useEffect((function(){f((null===r||void 0===r?void 0:r.endsWith(".pdf"))?Qe.a:r)}),[r]);var x=function(e){var t,n,r,a,c=null===e||void 0===e||null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.message;(null===e||void 0===e||null===(r=e.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.message)?He.b.error(c,{position:"top-right"}):(He.b.error("Unsuccessful file upload",{position:"top-right"}),f(null))},h=Object(Ye.useMutation)(Ke.a.Medias.upload,{onSuccess:function(e,t){var r=t.pathname;"application/pdf"===t.file.type?f(Qe.a):f("".concat($e).concat(r)),n("".concat($e).concat(r))},onError:x}).mutate,g=Object(Ye.useMutation)(Ke.a.Medias.getUploadUrl,{onSuccess:function(e,t){var n=e.data,r=n.url,a=n.pathname,c=t.file;h({url:r,pathname:a,file:c})},onError:x}),v=g.mutate,y=g.isLoading,C=Object(Ue.a)({accept:"application/pdf, image/png, image/jpg, image/jpeg",multiple:!1,onDrop:function(e){var t=Object(Be.a)(e,1)[0];t&&("application/pdf"===t.type?f(Qe.a):f(URL.createObjectURL(t)),v({type:"DOCUMENT_INFO",fileName:t.name,contentType:t.type,file:t}))},onDropRejected:function(e){e.map((function(e){return e.errors.map((function(e){return He.b.error(e.message,{position:"top-right"})}))}))}}),A=C.getRootProps,S=C.getInputProps,T=C.fileRejections;return Object(b.jsxs)(Xe.a,{children:[p&&Object(b.jsx)(Xe.b,{"aria-label":"delete",onClick:function(){f(void 0),n(null)},children:Object(b.jsx)(De.a,{})}),p?Object(b.jsx)(Ve.b,{to:{pathname:"".concat(r)},replace:!0,target:"_blank",rel:"noopener noreferrer",children:Object(b.jsx)(Xe.f,{source:p,matchXs:j})}):Object(b.jsx)(b.Fragment,{children:Object(b.jsxs)(Xe.g,Object(a.a)(Object(a.a)({},A({className:"dropzone"})),{},{children:[Object(b.jsx)("input",Object(a.a)(Object(a.a)({},S()),u)),Object(b.jsx)("img",{src:Ze,alt:"add"})]}))}),Object(b.jsx)(Xe.d,{children:y?Object(b.jsxs)(b.Fragment,{children:[Object(b.jsx)(_e.a,{variant:"text",width:"100%"}),Object(b.jsx)(_e.a,{variant:"text",width:"85%"})]}):Object(b.jsxs)(b.Fragment,{children:[Object(b.jsx)(Xe.h,{children:t}),n&&(p?Object(b.jsxs)("div",Object(a.a)(Object(a.a)({},A({className:"dropzone"})),{},{children:[Object(b.jsx)("input",Object(a.a)(Object(a.a)({},S()),u)),Object(b.jsx)(Xe.e,{children:"Change"})]})):Object(b.jsxs)(tt,{children:[Object(b.jsx)(Xe.c,{children:"PDF, PNG, JPG "}),(T[0]||Object(i.c)(s,c))&&Object(b.jsx)(nt,{})]}))]})})]})},tt=Object(ze.a)("div")((function(){return{display:"flex",justifyContent:"space-between",width:"100%"}})),nt=Object(ze.a)(qe.a)((function(e){return{color:e.theme.palette.primary.dark}})),rt=function(e){var t=e.actions,n=e.state,r=Object(u.b)(),a=n.requestingGoTo,o=Object(i.f)(),l=o.trigger,d=o.control,j=o.formState.errors;Object(c.useEffect)((function(){a&&l(["customer.documents"]).then((function(e){return r(t.answerGoTo(e))}))}),[t,r,a,l]);var m=Object(i.d)({control:d,name:"customer.documents"}).fields;return Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(ue.a,{sx:{marginTop:5,fontSize:14,marginLeft:"auto",marginRight:"auto"},children:"Identification and supporting documentation Rent then Buy needs to verify your identity."}),Object(b.jsx)(ue.a,{variant:"body2",sx:{fontSize:14,marginTop:1,textAlign:"center",fontWeight:"normal",color:"secondary.contrastText",marginBottom:3},children:"To help your application, add supporting documentation including your drivers license (Front and back), motor vehicle registration, Bank account, credit card and medicare card"}),m.map((function(e,t){return Object(b.jsx)(s.a,{item:!0,xs:12,md:6,lg:4,children:Object(b.jsx)(i.a,{name:"customer.documents.".concat(t,".docUrl"),control:d,rules:{required:"Required"},render:function(n){var r=n.field,a=r.value,c=r.onChange;return Object(b.jsx)(et,{errors:j,name:"customer.documents.".concat(t,".docUrl"),title:Pe[e.docType],value:a,onChange:c})}})},t)}))]})},at=n(257),ct=n(437),ot=n(59),st=["value","onChange","onBlur"],it=o.a.forwardRef((function(e,t){var n=e.value,r=e.onChange,c=e.onBlur,o=Object(l.a)(e,st);return Object(b.jsx)(A.a,Object(a.a)({getInputRef:t,value:100*n,onValueChange:function(e){var t=e.value;r(t?+t/100:0)},onBlur:c,thousandSeparator:!0,suffix:"%",decimalScale:2,allowNegative:!1,allowLeadingZeros:!1},o))})),ut=n(238),lt=n(47),dt=function(e){var t=e.actions,n=e.state,r=Object(i.f)(),l=r.watch,d=r.control,j=r.getValues,m=r.trigger,O=r.formState.errors,p=Object(u.b)(),f=n.requestingGoTo;o.a.useEffect((function(){f&&m(["interestRate"]).then((function(e){return p(t.answerGoTo(e))}))}),[t,p,f,m]);var x=Object(be.a)((function(e){return null===e||void 0===e?void 0:e.configs})),h=j(),g=l("interestRate",0),v=l("registrationFee",0),y=l("product.cost",0),C=l("retailPrice",0),A=new Date(h.startDate),S=Object(at.a)(A,"dd/MM/yyyy"),T=Object(at.a)(Object(ct.a)(A,1),"dd/MM/yyyy"),k=Object(c.useMemo)((function(){return new ot.a(Object(a.a)(Object(a.a)({},x),{},{interestRate:g})).getSchedule({retailPrice:C,registrationFee:v,interestRate:g})}),[x,g,v,C]);return Object(b.jsxs)(s.a,{container:!0,spacing:2,sx:{mt:0},children:[Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(i.a,{name:"interestRate",control:d,rules:{required:"Required",min:{value:.01,message:"Must be greater than 0"}},render:function(e){var t=e.field,n=t.value,r=t.onChange,a=t.onBlur;return Object(b.jsx)(lt.e,{value:n,onChange:r,onBlur:a,error:!!O.interestRate,variant:"outlined",autoFocus:!0,margin:"normal",label:"Target rate",fullWidth:!0,name:"interestRate",autoComplete:"interestRate",InputProps:{inputComponent:it}})}})}),Object(b.jsx)(ut.a,{buyoutSchedule:{schedule:k,start:S,end:T,cost:y}})]})},bt=function(e){var t=e.actions,n=Object(u.b)(),r=Object(be.a)((function(e){return e.adminManualFlowSteps.requestingGoTo})),o=Object(i.f)().trigger;return Object(c.useEffect)((function(){r&&o(["customer.emailAddress","customer.firstName","customer.lastName","customer.phone","customer.streetAddress","customer.homeAddress","customer.city","customer.state","customer.postCode"]).then((function(e){return n(t.answerGoTo(e))}))}),[t,n,r,o]),Object(b.jsx)("div",{children:Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"customer.firstName",rules:V,label:"First Name",autoFocus:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{rules:V,name:"customer.lastName",label:"Last Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.emailAddress",rules:K,label:"Email address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"customer.phone"},ne))}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.streetAddress",rules:U,label:"Street address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.homeAddress",label:"Apt, suite, etc (Optional)",rules:z})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,{name:"customer.city",rules:U,label:"City"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(v,{name:"customer.state"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,Object(a.a)({name:"customer.postCode"},X))})]})})},jt=function(e){var t=e.actions,n=e.state,r=Object(u.b)(),a=n.requestingGoTo,o=Object(i.f)(),l=o.trigger,d=o.control,j=o.formState.errors;Object(c.useEffect)((function(){a&&l(["customer.documents"]).then((function(e){return r(t.answerGoTo(e))}))}),[t,r,a,l]);var m=Object(i.d)({control:d,name:"customer.documents"}).fields;return Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(ue.a,{sx:{marginTop:5,fontSize:14,marginLeft:"auto",marginRight:"auto"},children:"Identification and supporting documentation Rent then Buy needs to verify your identity."}),Object(b.jsx)(ue.a,{variant:"body2",sx:{fontSize:14,marginTop:1,textAlign:"center",fontWeight:"normal",color:"secondary.contrastText",marginBottom:3},children:"To help your application, add supporting documentation including your drivers license (Front and back), motor vehicle registration, Bank account, credit card and medicare card"}),m.map((function(e,t){return Object(b.jsx)(s.a,{item:!0,xs:12,md:6,lg:4,children:Object(b.jsx)(i.a,{name:"customer.documents.".concat(t,".docUrl"),control:d,rules:{required:"Required"},render:function(n){var r=n.field,a=r.value,c=r.onChange;return Object(b.jsx)(et,{errors:j,name:"customer.documents.".concat(t,".docUrl"),title:Pe[e.docType],value:a,onChange:c})}})},t)}))]})},mt=n(314),Ot=function(e){var t=e.name,n=Object(i.f)().control;return Object(b.jsx)(i.a,{name:t,control:n,render:function(e){var n=e.field,r=n.value,a=n.onChange,c=n.onBlur;return Object(b.jsx)(mt.d,{value:null!==r&&void 0!==r?r:"",onChange:a,onBlur:c,margin:"normal",fullWidth:!0,name:t,autoComplete:t,label:"Email address"})}})},pt=function(e){var t=e.actions,n=e.state,r=Object(u.b)(),o=n.requestingGoTo,l=Object(i.f)().trigger;return Object(c.useEffect)((function(){o&&l(["phone","streetAddress","homeAddress","city","state","postCode"]).then((function(e){r(t.answerGoTo(e))}))}),[t,r,o,l]),Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(Ot,{name:"emailAddress"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)(Object(a.a)({name:"phone"},ne),{},{autoFocus:!0}))}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"streetAddress",rules:U,label:"Street address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"homeAddress",label:"Apt, suite, etc (Optional)",rules:z})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,{name:"city",rules:U,label:"City"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(v,{name:"state"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,Object(a.a)({name:"postCode"},X))})]})},ft=function(e){var t=e.actions,n=e.state,r=Object(u.b)(),o=n.requestingGoTo,l=Object(i.f)().trigger;return Object(c.useEffect)((function(){o&&l(["businessName","businessABN","businessPhone","businessEmail","businessStreetAddress","businessAddress","businessCity","businessState","businessPostCode"]).then((function(e){return r(t.answerGoTo(e))}))}),[t,r,o,l]),Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"businessName",rules:z,label:"Business name",autoFocus:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,Object(a.a)({name:"businessABN"},re))}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,Object(a.a)({name:"businessPhone"},te))}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"businessEmail",rules:Z,label:"Email"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"businessStreetAddress",rules:z,label:"Street address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"businessAddress",rules:z,label:"Apt, suite, etc (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,{name:"businessCity",rules:z,label:"City"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(v,{name:"businessState",required:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,Object(a.a)({name:"businessPostCode"},J))})]})};!function(e){e[e.Bank=0]="Bank",e[e.Card=1]="Card"}(Re||(Re={}));var xt,ht=function(e){var t=e.actions,n=e.state,r=Object(u.b)(),o=n.requestingGoTo,l=Object(be.a)((function(e){return e.customerFlowSteps.paymentMethod})),d=Object(c.useMemo)((function(){return"bankAccount"===l?Re.Bank:Re.Card}),[l]),j=Object(i.f)().trigger,O=Object(fe.a)();return Object(c.useEffect)((function(){o&&(d===Re.Bank?j(["bankAccountInfo.bankAccountName","bankAccountInfo.bankAccountNo","bankAccountInfo.bsb"]).then((function(e){r(t.answerGoTo(e))})):j(["creditCardInfo.cardName","creditCardInfo.cardNumber","creditCardInfo.cvv","creditCardInfo.expiry"]).then((function(e){return r(t.answerGoTo(e))})))}),[t,r,o,d,j]),Object(b.jsxs)(b.Fragment,{children:[Object(b.jsxs)(we,{value:d,onChange:function(e,n){r(t.updatePaymentMethod(n?"creditCard":"bankAccount"))},"aria-label":"ant example",children:[Object(b.jsx)(Ne,{label:"Bank details"}),Object(b.jsx)(Ne,{label:"Card details"})]}),Object(b.jsx)(Ie,{value:d,index:Re.Bank,dir:O.direction,children:Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"bankAccountInfo.bankAccountName",rules:U,label:"Account name",autoFocus:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"bankAccountInfo.bsb"},xe))}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"bankAccountInfo.bankAccountNo"},he))})]})}),Object(b.jsx)(Ie,{value:d,index:Re.Card,dir:O.direction,children:Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"creditCardInfo.cardName"},ge))}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"creditCardInfo.cardNumber"},ve))}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,Object(a.a)({name:"creditCardInfo.expiry"},ye))}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,Object(a.a)({name:"creditCardInfo.cvv"},Ce))})]})})]})},gt=function(e){var t=e.actions,n=e.state,r=Object(u.b)(),o=n.requestingGoTo,l=Object(i.f)().trigger;return Object(c.useEffect)((function(){o&&l(["references"]).then((function(e){return r(t.answerGoTo(e))})).catch((function(e){console.error(e),r(t.answerGoTo(!1))}))}),[t,r,o,l]),Object(b.jsxs)(b.Fragment,{children:[Object(b.jsxs)(s.a,{container:!0,spacing:2,sx:{p:0,pt:3},children:[Object(b.jsx)(s.a,{item:!0,xs:12,sx:{mb:-1},children:Object(b.jsx)(ue.a,{children:"1st Family member of applicants"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,sx:{pt:0},children:Object(b.jsx)(m,{name:"references.0.firstName",rules:V,label:"First Name",autoFocus:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,sx:{pt:0},children:Object(b.jsx)(m,{name:"references.0.lastName",rules:V,label:"Last Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"references.0.relationship",rules:U,label:"Relationship to applicant"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"references.0.streetAddress",rules:U,label:"Street address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"references.0.homeAddress",label:"Apt, suite, etc (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,{name:"references.0.city",rules:U,label:"City"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(v,{name:"references.0.state"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,Object(a.a)(Object(a.a)({name:"references.0.postCode"},X),{},{label:"Post code"}))})]}),Object(b.jsxs)(s.a,{container:!0,spacing:2,sx:{p:0,pt:3},children:[Object(b.jsx)(s.a,{item:!0,xs:12,sx:{mb:-1},children:Object(b.jsx)(ue.a,{children:"2nd Family member of applicants (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"references.1.firstName",rules:Y,label:"First Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"references.1.lastName",rules:Y,label:"Last Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"references.1.relationship",rules:z,label:"Relationship to applicant"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"references.1.streetAddress",rules:z,label:"Street address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"references.1.homeAddress",label:"Apt, suite, etc (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,{name:"references.1.city",rules:z,label:"City"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(v,{name:"references.1.state",required:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,Object(a.a)(Object(a.a)({name:"references.1.postCode"},J),{},{label:"Post code"}))})]}),Object(b.jsxs)(s.a,{container:!0,spacing:2,sx:{p:0,pt:3},children:[Object(b.jsx)(s.a,{item:!0,xs:12,sx:{mb:-1},children:Object(b.jsx)(ue.a,{children:"1st friend of applicant"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"references.2.firstName",rules:V,label:"First Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"references.2.lastName",rules:V,label:"Last Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"references.2.streetAddress",rules:U,label:"Street address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"references.2.homeAddress",label:"Apt, suite, etc (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,{name:"references.2.city",rules:U,label:"City"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(v,{name:"references.2.state"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,Object(a.a)(Object(a.a)({name:"references.2.postCode"},X),{},{label:"Post code"}))})]}),Object(b.jsxs)(s.a,{container:!0,spacing:2,sx:{p:0,pt:3},children:[Object(b.jsx)(s.a,{item:!0,xs:12,sx:{mb:-1},children:Object(b.jsx)(ue.a,{children:"2nd friend of applicant (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"references.3.firstName",rules:Y,label:"First Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"references.3.lastName",rules:Y,label:"Last Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"references.3.streetAddress",rules:z,label:"Street address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"references.3.homeAddress",label:"Apt, suite, etc (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,{name:"references.3.city",rules:z,label:"City"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(v,{name:"references.3.state",required:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,Object(a.a)(Object(a.a)({name:"references.3.postCode"},J),{},{label:"Post code"}))})]}),Object(b.jsxs)(s.a,{container:!0,spacing:2,sx:{p:0,pt:3},children:[Object(b.jsx)(s.a,{item:!0,xs:12,sx:{mb:-1},children:Object(b.jsx)(ue.a,{children:"Employer details"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"references.4.businessName",rules:U,label:"Business name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"references.4.contactPerson",rules:U,label:"Contact person"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"references.4.phone"},ne))}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"references.4.streetAddress",rules:U,label:"Street address"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"references.4.homeAddress",label:"Apt, suite, etc (Optional)"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,{name:"references.4.city",rules:U,label:"City"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(v,{name:"references.4.state"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:4,children:Object(b.jsx)(m,Object(a.a)(Object(a.a)({name:"references.4.postCode"},X),{},{label:"Post code"}))})]})]})},vt=function(){var e=Object(We.a)();return Object(Ge.a)(e.breakpoints.only("xs"))?Object(b.jsx)(b.Fragment,{}):Object(b.jsxs)(b.Fragment,{children:[Object(b.jsx)(ue.a,{sx:{marginTop:5,fontSize:14,marginLeft:"auto",marginRight:"auto"},children:"Identification and supporting documentation Rent then Buy needs to verify your identity."}),Object(b.jsx)(ue.a,{variant:"body2",sx:{fontSize:14,marginTop:1,textAlign:"center",fontWeight:"normal",color:"secondary.contrastText",marginBottom:3},children:"To help your application, add supporting documentation including your drivers license (Front and back), motor vehicle registration, Bank account, credit card and medicare card"})]})},yt=function(e){var t=e.actions,n=e.state,r=Object(u.b)(),a=n.requestingGoTo,o=Object(i.f)(),l=o.trigger,d=o.control,j=o.formState.errors;Object(c.useEffect)((function(){a&&l(["documents"]).then((function(e){return r(t.answerGoTo(e))}))}),[t,r,a,l]);var m=Object(i.d)({control:d,name:"documents"}).fields;return Object(b.jsxs)(s.a,{container:!0,spacing:2,sx:{width:"100%"},children:[Object(b.jsx)(vt,{}),m.map((function(e,t){return Object(b.jsx)(s.a,{item:!0,xs:6,md:6,lg:4,children:Object(b.jsx)(i.a,{name:"documents.".concat(t,".docUrl"),control:d,rules:{required:"Required"},render:function(n){var r=n.field,a=r.value,c=r.onChange;return Object(b.jsx)(et,{errors:j,name:"documents.".concat(t,".docUrl"),title:Pe[e.docType],value:a,onChange:c})}})},t)}))]})},Ct=n(438),At=n(30),St=n(410),Tt=function(e){var t,n=e.actions,r=e.state,i=Object(be.a)((function(e){return e.configs})),l=Object(At.h)().id,d=Object(St.a)(l,{enabled:!1}).data,j=(null===d||void 0===d||null===(t=d.data)||void 0===t?void 0:t.contract)||{retailPrice:0,product:{cost:0},registrationFee:0,startDate:(new Date).toISOString()},m=j.retailPrice,O=j.product.cost,p=j.startDate,f=j.registrationFee,x=i.interestRate,h=Object(Ct.a)(p),g=Object(at.a)(h,"dd/MM/yyyy"),v=Object(at.a)(Object(ct.a)(h,1),"dd/MM/yyyy"),y=Object(c.useMemo)((function(){return new ot.a(Object(a.a)(Object(a.a)({},i),{},{interestRate:x})).getSchedule({retailPrice:m,registrationFee:f,interestRate:x})}),[i,x,f,m]),C=Object(We.a)(),A=Object(Ge.a)(C.breakpoints.only("xs")),S=Object(u.b)(),T=r.requestingGoTo;return o.a.useEffect((function(){T&&S(n.answerGoTo(!0))}),[n,S,T]),Object(b.jsx)(s.a,{container:!0,spacing:A?4:2,sx:{mt:0},children:Object(b.jsx)(ut.a,{buyoutSchedule:{schedule:y,start:g,end:v,cost:O,isCustomer:!0}})})},kt=function(e){var t=e.actions,n=e.state,r=Object(u.b)(),c=n.confirmation,o=(0,Object(i.f)().getValues)("customOrder");return Object(b.jsxs)(s.a,{container:!0,spacing:2,sx:{mt:0},children:[Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(le.a,{sx:Object(a.a)(Object(a.a)({},me),{},{borderColor:c.errorTerm?"primary.main":"transparent"}),children:Object(b.jsx)(p.a,{required:!0,error:!c.term,children:Object(b.jsx)(oe.a,{children:Object(b.jsx)(se.a,{control:Object(b.jsx)(ie.a,{checked:c.term,onChange:function(e){r(t.updateConfirmation({term:e.target.checked,errorTerm:!e.target.checked}))},name:"term",sx:{"& .MuiSvgIcon-root":{fontSize:32}}}),label:Object(b.jsxs)(ue.a,{variant:"body2",sx:{ml:1},children:["I have read and understood and agreed to the \xa0",Object(b.jsx)(Oe,{target:"_blank",href:"https://wordpress-615660-2228780.cloudwaysapps.com/index.php/terms-conditions/",children:"Terms & Conditions"})]})})})})})}),!!o&&Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(le.a,{sx:Object(a.a)(Object(a.a)({},me),{},{borderColor:c.errorReturnable?"primary.main":"transparent"}),children:Object(b.jsx)(p.a,{required:!0,error:!c.returnable,children:Object(b.jsx)(oe.a,{children:Object(b.jsx)(se.a,{control:Object(b.jsx)(ie.a,{checked:c.returnable,onChange:function(e){r(t.updateConfirmation({returnable:e.target.checked,errorReturnable:!e.target.checked}))},name:"term",sx:{"& .MuiSvgIcon-root":{fontSize:32}}}),label:Object(b.jsxs)(ue.a,{variant:"body2",sx:{ml:1},children:["This trailer is a special custom order and as per the \xa0",Object(b.jsx)(Oe,{target:"_blank",href:"https://wordpress-615660-2228780.cloudwaysapps.com/index.php/terms-conditions/",children:"Terms & Conditions"})," ","I agree it is not returnable"]})})})})})})]})},wt=function(e){var t=e.actions,n=e.state,r=Object(u.b)(),a=n.requestingGoTo,o=n.requestingSave,l=Object(i.f)().trigger;return Object(c.useEffect)((function(){a&&l(["customer.emailAddress","customer.firstName","customer.lastName"]).then((function(e){r(t.answerGoTo(e))}))}),[t,r,a,o,l]),Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"customer.firstName",rules:V,label:"First Name",autoFocus:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{rules:V,name:"customer.lastName",label:"Last Name"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.emailAddress",rules:K,label:"Email"})})]})},Nt=n(810),It=function(e){var t=e.actions,n=e.state,r=Object(u.b)(),a=n.requestingGoTo,o=Object(i.f)(),l=o.control,d=o.trigger;return Object(c.useEffect)((function(){a&&d(["product.trailerType","product.modelNumber","product.serialNumber","product.trNumber","product.trailerLength","product.trailerWidth","customOrder"]).then((function(e){return r(t.answerGoTo(e))}))}),[t,r,a,d]),Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"product.trailerType",rules:U,label:"Trailer Type",autoFocus:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"product.modelNumber",rules:U,label:"Model Number"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"product.serialNumber",rules:U,label:"Serial Number"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"product.trNumber",rules:U,label:"TR (policy) number"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"product.trailerLength",rules:U,label:"Length"})}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,{name:"product.trailerWidth",rules:U,label:"Width"})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(i.a,{name:"customOrder",control:l,render:function(e){var t=e.field,n=t.value,r=t.onChange;return Object(b.jsx)(Nt.a,{sx:me,children:Object(b.jsx)(p.a,{children:Object(b.jsx)(oe.a,{children:Object(b.jsx)(se.a,{control:Object(b.jsx)(ie.a,{checked:n,onChange:r,name:"term",sx:{"& .MuiSvgIcon-root":{fontSize:32}}}),label:Object(b.jsx)(ue.a,{variant:"body2",sx:{ml:1},children:"This trailer is a special custom order."})})})})})}})})]})},Rt=n(812),Et=n(815),Ft=n(816),Pt=n(817),Bt=["value","onChange","onBlur"],Mt=o.a.forwardRef((function(e,t){var n=e.value,r=e.onChange,c=e.onBlur,o=Object(l.a)(e,Bt);return Object(b.jsx)(A.a,Object(a.a)({getInputRef:t,value:n,onValueChange:function(e){var t=e.value;r(t?+t:null)},onBlur:c,thousandSeparator:!0,prefix:"$",allowNegative:!1,decimalScale:2},o))})),Dt=[{value:"WEEKLY",title:"Weekly payments"},{value:"FORTNIGHT",title:"Fortnightly payments"},{value:"MONTHLY",title:"Monthly payments"}],Lt=function(){var e=Object(i.f)().control;return Object(b.jsx)(i.a,{name:"paymentType",control:e,rules:{required:"Required"},render:function(e){var t=e.field,n=t.value,r=t.onChange,a=t.onBlur;return Object(b.jsx)(p.a,{fullWidth:!0,sx:{marginTop:2},children:Object(b.jsx)(x.a,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:n,onChange:r,onBlur:a,children:Dt.map((function(e){return Object(b.jsx)(h.a,{value:e.value,children:e.title},e.title)}))})})}})},qt=function(e){var t=e.actions,n=e.state,r=Object(u.b)(),c=n.requestingGoTo,s=Object(i.f)(),l=s.trigger,j=s.control,O=s.formState.errors;return o.a.useEffect((function(){c&&l(["startDate","product.cost","retailPrice","paymentType","registrationFee"]).then((function(e){r(t.answerGoTo(e))}))}),[t,r,c,l]),Object(b.jsxs)(b.Fragment,{children:[Object(b.jsx)(m,{name:"product.cost",rules:$,label:"Cost",autoFocus:!0,InputProps:{inputComponent:Mt}}),Object(b.jsx)(m,{name:"retailPrice",rules:$,label:"Retail Price",InputProps:{inputComponent:Mt}}),Object(b.jsx)(m,{name:"registrationFee",rules:$,label:"Registration fee",InputProps:{inputComponent:Mt}}),Object(b.jsx)(i.a,{name:"startDate",control:j,rules:{required:"Required",validate:function(e){return Object(Pt.a)(e)||"Invalid Date"}},render:function(e){var t=e.field,n=t.value,r=t.onChange,c=t.onBlur;return Object(b.jsx)(Rt.b,{dateAdapter:Ft.a,children:Object(b.jsx)(Et.a,{value:n,onChange:r,onBlur:c,label:"Contract date DD/MM/YYYY",inputFormat:"dd/MM/yyyy",mask:"__/__/____",renderInput:function(e){return Object(b.jsx)(d.a,Object(a.a)(Object(a.a)({},e),{},{error:!!O.startDate,margin:"normal",fullWidth:!0,name:"startDate"}))}})})}}),Object(b.jsx)(Lt,{})]})};!function(e){e[e.Bank=0]="Bank",e[e.Card=1]="Card"}(xt||(xt={}));var Gt=function(e){var t=e.actions,n=e.state,r=Object(u.b)(),l=n.requestingGoTo,d=n.paymentType,j=Object(i.f)(),O=j.trigger,p=j.watch,f=o.a.useMemo((function(){return"bankAccount"===d?xt.Bank:xt.Card}),[d]);Object(c.useEffect)((function(){}),[t,r,p]);var x=Object(fe.a)();return Object(c.useEffect)((function(){l&&(f===xt.Bank?O(["customer.bankAccountInfo.bankAccountName","customer.bankAccountInfo.bankAccountNo","customer.bankAccountInfo.bsb"]).then((function(e){r(t.answerGoTo(e))})):O(["customer.creditCardInfo.cardName","customer.creditCardInfo.cardNumber","customer.creditCardInfo.cvv","customer.creditCardInfo.expiry"]).then((function(e){return r(t.answerGoTo(e))})))}),[t,r,l,f,O]),Object(b.jsxs)(b.Fragment,{children:[Object(b.jsxs)(we,{value:f,onChange:function(e,n){r(t.updatepaymentType(n?"creditCard":"bankAccount"))},"aria-label":"ant example",children:[Object(b.jsx)(Ne,{label:"Bank details"}),Object(b.jsx)(Ne,{label:"Card details"})]}),Object(b.jsx)(Ie,{value:f,index:0,dir:x.direction,children:Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,{name:"customer.bankAccountInfo.bankAccountName",rules:U,label:"Account name",autoFocus:!0})}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"customer.bankAccountInfo.bsb"},xe))}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"customer.bankAccountInfo.bankAccountNo"},he))})]})}),Object(b.jsx)(Ie,{value:f,index:1,dir:x.direction,children:Object(b.jsxs)(s.a,{container:!0,spacing:2,children:[Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"customer.creditCardInfo.cardName"},ge))}),Object(b.jsx)(s.a,{item:!0,xs:12,children:Object(b.jsx)(m,Object(a.a)({name:"customer.creditCardInfo.cardNumber"},ve))}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,Object(a.a)({name:"customer.creditCardInfo.expiry"},ye))}),Object(b.jsx)(s.a,{item:!0,xs:12,md:6,children:Object(b.jsx)(m,Object(a.a)({name:"customer.creditCardInfo.cvv"},Ce))})]})})]})},_t=function(e){return[{component:e&&Object(b.jsx)(wt,Object(a.a)({},e)),title:"Customer details",leftTitle:"Add our customers personal details"},{component:e&&Object(b.jsx)(It,Object(a.a)({},e)),title:"Product details"},{component:e&&Object(b.jsx)(qt,Object(a.a)({},e)),title:"Payment terms"},{component:e&&Object(b.jsx)(dt,Object(a.a)(Object(a.a)({},e),{},{isManual:!1})),title:"Trailer Buy out Schedule",leftTitle:"Review customers trailer buyout schedule"}]},Wt=function(e){return[{component:e&&Object(b.jsx)(pt,Object(a.a)({},e)),title:"Personal details"},{component:e&&Object(b.jsx)(ft,Object(a.a)({},e)),title:"Business details"},{component:e&&Object(b.jsx)(ht,Object(a.a)({},e)),title:"Payment details"},{component:e&&Object(b.jsx)(gt,Object(a.a)({},e)),title:"References",leftTitle:"Add your next of kin and employers details"},{component:e&&Object(b.jsx)(yt,Object(a.a)({},e)),title:"Identification documentation"},{component:e&&Object(b.jsx)(Tt,Object(a.a)({},e)),title:"Trailer Buy out Schedule",leftTitle:"Review customers trailer buyout schedule"},{component:e&&Object(b.jsx)(kt,Object(a.a)({},e)),title:"Confirmation",leftTitle:"Confirm you have read the terms and conditions"}]},zt=function(e){return[{component:e&&Object(b.jsx)(ae,Object(a.a)({},e)),title:"Personal details"},{component:e&&Object(b.jsx)(ce,Object(a.a)({},e)),title:"Business details"},{component:e&&Object(b.jsx)(pe,Object(a.a)(Object(a.a)({},e),{},{isManual:!1})),title:"Product details"},{component:e&&Object(b.jsx)(qt,Object(a.a)({},e)),title:"Payment terms"},{component:e&&Object(b.jsx)(Ee,Object(a.a)({},e)),title:"Payment details"},{component:e&&Object(b.jsx)(Fe,Object(a.a)({},e)),title:"References",leftTitle:"Add our customers next of kin and employers details"},{component:e&&Object(b.jsx)(rt,Object(a.a)({},e)),title:"Identification documentation"},{component:e&&Object(b.jsx)(dt,Object(a.a)(Object(a.a)({},e),{},{isManual:!1})),title:"Trailer Buy out Schedule",leftTitle:"Review customers trailer buyout schedule"}]},Ut=function(e){return[{component:e&&Object(b.jsx)(bt,Object(a.a)({},e)),title:"Personal details"},{component:e&&Object(b.jsx)(ce,Object(a.a)({},e)),title:"Business details"},{component:e&&Object(b.jsx)(pe,Object(a.a)(Object(a.a)({},e),{},{isManual:!0})),title:"Product details"},{component:e&&Object(b.jsx)(qt,Object(a.a)({},e)),title:"Payment terms"},{component:e&&Object(b.jsx)(Gt,Object(a.a)({},e)),title:"Payment details",leftTitle:"Add your next of kin and employers details"},{component:e&&Object(b.jsx)(Fe,Object(a.a)({},e)),title:"References"},{component:e&&Object(b.jsx)(jt,Object(a.a)({},e)),title:"Identification documentation"},{component:e&&Object(b.jsx)(dt,Object(a.a)(Object(a.a)({},e),{},{isManual:!0})),title:"Trailer Buy out Schedule",leftTitle:"Review customers trailer buyout schedule"},{component:e&&Object(b.jsx)(je,Object(a.a)({},e)),title:"Confirmation",leftTitle:"Confirm our customers have read the terms and conditions"}]}}},[[720,1,2]]]);