(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3822],{1183:function(e,t,n){"use strict";n.d(t,{z:function(){return a}});var r=n(3255),i=n(9824),o=n(67216),a=function(e,t){var n=(0,o.f)(e);return(0,r.ZP)("tradie-".concat(e),(function(){return(0,i.py)(e,t)}),{isPaused:function(){return null===n.current||void 0===n.current}})}},57335:function(e,t,n){"use strict";n.d(t,{e:function(){return i}});var r=n(25522),i=function(e){return r.Rc.get("/autocomplete?input=".concat(e))}},11805:function(e,t,n){"use strict";n.d(t,{E:function(){return u}});var r=n(70865),i=n(96670),o=n(26297),a=n(52322),s=n(76069),l=n(18869),c=n(61885),u=function(e){var t=e.dropdownProps,n=(0,o.Z)(e,["dropdownProps"]);return(0,a.jsx)(l.L,(0,i.Z)((0,r.Z)({},t),{children:(0,a.jsx)(s.d,{children:(0,a.jsx)(c.o,(0,i.Z)((0,r.Z)({},n),{children:(0,a.jsx)(a.Fragment,{})}))})}))}},65623:function(e,t,n){"use strict";n.d(t,{s:function(){return l}});var r=n(70865),i=n(96670),o=n(26297),a=n(52322),s=n(74728),l=function(e){var t=e.children;return(0,a.jsx)(s.T,{children:function(e){var n=e.getWrapperProps,s=e.getHeadProps,l=(0,o.Z)(e,["getWrapperProps","getHeadProps"]);return t((0,i.Z)((0,r.Z)({},l),{getWrapperProps:function(e){return n((0,r.Z)({height:34,brRadius:17},e))},getHeadProps:function(e){return s((0,r.Z)({afterBegin:(0,a.jsx)(a.Fragment,{}),renderBeforeEnd:function(t,n){var o=n.isDropdownOpen,s=n.edditable;return(0,a.jsx)(a.Fragment,{children:s&&(0,a.jsx)("div",(0,i.Z)((0,r.Z)({},t),{children:(0,a.jsx)("svg",{width:"14",height:"8",viewBox:"0 0 14 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",transform:"rotate(".concat(o?180:0,")"),children:(0,a.jsx)("path",{d:"M1.5 1L7 6.5L12.5 1",stroke:(null===e||void 0===e?void 0:e.arrowColor)||"#3E6C98",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}))})}},e))}}))}})}},144:function(e,t,n){"use strict";n.d(t,{v:function(){return o}});var r=n(70865),i=n(96670),o=function(e,t){if(!t.length)return e;var n={},o=!0,a=!1,s=void 0;try{for(var l,c=function(){var t=l.value;if(n[t.category])n[t.category].subcats.push((0,i.Z)((0,r.Z)({},t),{is_need_license:!1,type:"personal",description:""}));else{var o=e.find((function(e){return+e.pk===+t.category}));o&&(n[t.category]={cat:o,subcats:[(0,i.Z)((0,r.Z)({},t),{is_need_license:!1,type:"personal",description:""})]})}},u=t[Symbol.iterator]();!(o=(l=u.next()).done);o=!0)c()}catch(d){a=!0,s=d}finally{try{o||null==u.return||u.return()}finally{if(a)throw s}}return Object.values(n).map((function(e){return(0,i.Z)((0,r.Z)({},e.cat),{category_job_types:e.subcats})}))}},94335:function(e,t,n){"use strict";n.d(t,{G:function(){return P}});var r=n(98788),i=n(70865),o=n(96670),a=n(26297),s=n(5163),l=n(52322),c=n(97868),u=n(20754),d=n(47264),p=n(18869),f=n(61885),h=n(35505),m=n(98988),v=n(76069),_=n(65623),x=n(37882),g=n(85750),b=n(43417),j=n(43101),y=n.n(j),w=function(e){return{pk:e.pk.toString(),name:(0,g.jC)(e),returnValue:{pk:+e.pk,name:e.name,lat:e.latitude,lon:e.longitude}}},C=function(){var e=(0,r.Z)((function(e){var t;return(0,s.__generator)(this,(function(n){switch(n.label){case 0:return[4,(0,b.Wf)(e)];case 1:return[2,(null===(t=n.sent())||void 0===t?void 0:t.error)?[]:null===t||void 0===t?void 0:t.districts]}}))}));return function(t){return e.apply(this,arguments)}}(),P=function(e){var t=e.dropdownProps,n=e.closeDropdownOnSelect,r=e.dataTestId,s=e.wrapperProps,b=e.inputProps,j=e.selectedItemsProps,P=(0,a.Z)(e,["dropdownProps","closeDropdownOnSelect","dataTestId","wrapperProps","inputProps","selectedItemsProps"]),k=(0,x.y)(),N=k.districts,S=k.isLoading;return(0,l.jsx)(_.s,{children:function(e){var a=e.getDropdownProps,_=e.getHeadProps,x=e.getItem,k=e.getWrapperProps;return(0,l.jsx)(m.e,(0,o.Z)((0,i.Z)({isLoading:S},P),{children:(0,l.jsxs)(c.i,(0,o.Z)((0,i.Z)({},k((0,i.Z)({className:y().wrapper},s))),{dataTestId:r,children:[(0,l.jsx)(u.F,(0,o.Z)((0,i.Z)({},_()),{children:(0,l.jsx)(d.I,{inputProps:(0,i.Z)({placeholder:"Add a city"},b),selectedItemsProps:j})})),(0,l.jsx)(v.d,{children:(0,l.jsx)(p.L,(0,o.Z)((0,i.Z)({},a(t)),{children:(0,l.jsx)(f.o,{onSearch:C,getItemInfo:w,renderItem:function(e,t){return x({className:y().item,props:t,name:(0,g.jC)(e)})},onItemClick:function(e,t,r){n&&r.closeDropdown()},children:(0,l.jsx)(h.o,{data:N||[],getItemInfo:w,renderItem:function(e,t){return x({className:y().item,props:t,name:(0,g.jC)(e)})}})})}))})]}))}))}})}},98004:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(70865),i=n(96670),o=n(26297),a=n(52322),s=n(819),l=n(84664),c=n(76979),u=n(95857),d=n(7948),p=n(82239),f=(0,c.K)({getControllerProps:function(){return{name:"subcategoryMap",defaultValue:new Map}},render:function(e){var t,n=e.props,c=e.errorProps,f=e.field,h=e.fieldState,m=(0,u.V)(null===(t=h.error)||void 0===t?void 0:t.message,c),v=m.wrapperProps,_=m.renderError,x=n.onSelectedItemMapChange,g=n.popupVersion,b=n.initialPks,j=n.placeholder,y=n.getReturnValue,w=(0,o.Z)(n,["onSelectedItemMapChange","popupVersion","initialPks","placeholder","getReturnValue"]);(0,d.e)({pks:b||[],setItemMap:function(e){return f.onChange(e)},disabled:f.value.size>0,getReturnValue:y});var C=(0,i.Z)((0,r.Z)({},w),{selectedItemMap:f.value,onSelectedItemMapChange:function(e){f.onChange(e),null===x||void 0===x||x(e)},onDropdownClose:function(){return f.onBlur()},wrapperProps:(0,r.Z)({},(0,p.W)(h),w.wrapperProps),inputProps:{placeholder:j},getReturnValue:y});return(0,a.jsxs)("div",(0,i.Z)((0,r.Z)({},v),{children:[g?(0,a.jsx)(l.e,(0,r.Z)({},C)):(0,a.jsx)(s.Z,(0,r.Z)({},C)),_()]}))}})},69007:function(e,t,n){"use strict";n.d(t,{S:function(){return c}});var r=n(70865),i=n(96670),o=n(52322),a=n(77081),s=n(76979),l=n(95857),c=(0,s.K)({getControllerProps:function(e){return{name:"files",defaultValue:e.initialFileData||[]}},render:function(e){var t,n=e.errorProps,s=e.props,c=e.field,u=e.fieldState,d=(0,l.V)(null===(t=u.error)||void 0===t?void 0:t.message,n),p=d.renderError,f=d.wrapperProps;return(0,o.jsxs)("div",(0,i.Z)((0,r.Z)({},f),{children:[(0,o.jsx)(a.S,(0,r.Z)({onFileDataChange:c.onChange,initialFileData:c.value,returnFullFileData:!0,placeholder:"Upload your files",openPopupAsAdditonal:!0,disableFilePopup:!0},s)),p()]}))}})},9710:function(e,t,n){"use strict";n.d(t,{t:function(){return r}});var r=(0,n(76979).K)({getControllerProps:function(){return{name:"price",defaultValue:""}},component:function(e){var t=e.field;return{inputProps:{onChange:function(e){var n=e.target.value.replace(/[^0-9]/g,""),r=n.length>5?"99999":n;t.onChange(r)},placeholder:"$0.00"}}}})},59517:function(e,t,n){"use strict";n.d(t,{M:function(){return l}});var r=n(70865),i=n(26297),o=n(52322),a=n(63955),s=n(16830),l=function(e){var t=e.br,n=void 0===t?"sm":t,l=e.w,c=void 0===l?"btn-w-full":l,u=e.loading,d=(0,i.Z)(e,["br","w","loading"]),p=(0,a.cl)(),f=p.isSubmitting,h=p.isLoading;return(0,o.jsx)(s.z,(0,r.Z)({br:n,w:c,disableOpacityOnDisabled:!1,disabled:f||h||u,loading:f||h||u,type:"submit"},d))}},72833:function(e,t,n){"use strict";n.d(t,{o:function(){return r}});var r=(0,n(76979).K)({getControllerProps:function(e){return{name:e.name||"",defaultValue:""}}})},77778:function(e,t,n){"use strict";n.d(t,{s:function(){return i}});var r=n(70865),i=(0,n(76979).K)({getControllerProps:function(e){return{name:e.name||"",defaultValue:e.defaultValue||""}},component:function(e){var t=e.props;return{inputProps:(0,r.Z)({useTextarea:!0,minHeight:130,maxHeight:250},t)}}})},82239:function(e,t,n){"use strict";n.d(t,{W:function(){return r}});var r=function(e){return e.invalid?{brColor:"var(--form-error-color)"}:e.isDirty&&e.isTouched?{brColor:"var(--form-valid-color)"}:void 0}},95857:function(e,t,n){"use strict";n.d(t,{V:function(){return s}});var r=n(52322),i=n(90868),o=n(7418),a=n.n(o),s=function(e,t){return{wrapperProps:{className:a().wrapper},renderError:function(){return e&&!(null===t||void 0===t?void 0:t.disabled)?(0,r.jsx)(i.j,{className:null===t||void 0===t?void 0:t.className,fs:null===t||void 0===t?void 0:t.fs,message:e,isStatic:null===t||void 0===t?void 0:t.isStatic}):null}}}},60522:function(e,t,n){"use strict";n.d(t,{Y:function(){return d}});var r=n(70865),i=n(96670),o=n(26297),a=n(52322),s=n(2784),l=n(18620),c=/[^\d,.]+/g,u=/[^\d]+/g,d=(0,s.forwardRef)((function(e,t){var n=e.onChange,s=e.decimal,d=e.value,p=e.prefix,f=(0,o.Z)(e,["onChange","decimal","value","prefix"]);return(0,a.jsx)(l.I,(0,i.Z)((0,r.Z)({},f),{value:p&&d?"".concat(p).concat(d):d,ref:t,onChange:function(e){var t=e.target.value;p&&(t=t.replace(p,""));var r=t.replace(s?c:u,"");n(s?r:+r,e)}}))}));d.displayName="NumberInput"},92427:function(e,t,n){"use strict";n.d(t,{P:function(){return x}});var r=n(47842),i=n(70865),o=n(96670),a=n(52322),s=n(98988),l=n(97868),c=n(20754),u=n(18869),d=n(35505),p=n(65623),f=n(46776),h=n(72779),m=n.n(h),v=n(77551),_=n.n(v),x=function(e){var t,n=e.selectedItem,h=e.onSelectedItemChange,v=e.data,x=e.getName,g=e.onBlur,b=e.edditable,j=e.wrapperProps,y=void 0===j?{height:50,brRadius:0}:j,w=e.selectedItemClassName;return(0,a.jsx)(p.s,{children:function(e){var p=e.getItem,j=e.getDropdownProps,C=e.getHeadProps;return(0,a.jsx)(s.e,{selectedItems:n?[n]:[],onSelectedItemsChange:function(e){return h(null!==(t=e[0])&&void 0!==t?t:null)},max:1,edditable:b,onDropdownClose:function(){return g()},children:function(e){return(0,a.jsx)(f.Qj,{children:function(){return(0,a.jsxs)(l.i,(0,o.Z)((0,i.Z)({brColor:e.isDropdownOpen?void 0:"transparent"},y),{children:[(0,a.jsx)(c.F,(0,o.Z)((0,i.Z)({},C()),{renderAfterEnd:void 0,children:(0,a.jsx)("div",{className:m()(w,(0,r.Z)({},_().selectedItem,b)),children:(null===n||void 0===n?void 0:n.returnValue)?x(n.returnValue):null})})),(0,a.jsx)(u.L,(0,o.Z)((0,i.Z)({},j()),{maxHeight:150,children:(0,a.jsx)(d.o,{data:v,getItemInfo:function(e,t){return{name:x(e),returnValue:e,pk:t.toString()}},renderItem:function(e,t){return p({props:t,name:x(e),isFound:!0,isNested:!0})}})}))]}))}})}})}})}},44460:function(e,t,n){"use strict";n.d(t,{T:function(){return l},s:function(){return c}});var r=n(87394),i=n(29947),o=n(46776),a=n(80075),s=(0,r.Z)((0,i.k)((function(e){var t=e.initialData,n=e.isEdit,r=e.isCitizen,i=e.tradiePk,s=e.createQuote,l=e.isAdminInvoice,c=e.isDefaultTask,u=e.isDefaultQuote,d=e.isSelectedInvoice;return(0,o.fv)((function(){return{isOnline:!1,isMapOpen:!1,isLoading:!1,isSelectedInvoice:d,isEdit:n,isCitizen:r,initialData:t,tradiePk:i,isAdminInvoice:l,isDefaultTask:c,isDefaultQuote:u,setIsOnline:function(e){this.isOnline=e},setIsMapOpen:function(e){this.isMapOpen=e},setIsLoading:function(e){this.isLoading=e},afterLogInRoutine:function(e){s(e.pk,this.tradiePk)},setIsSelectedInvoice:function(e){this.isSelectedInvoice=e}}}),{initialData:a.LO.ref})}),"QuoteForm"),2),l=s[0],c=s[1]},781:function(e,t,n){"use strict";n.r(t),n.d(t,{CategoryInput:function(){return _}});var r=n(52322),i=n(144),o=n(98004),a=n(85621),s=n(44460),l=n(62141),c=n(7555),u=n(16830),d=n(98988),p=n(46776),f=n(805),h=n.n(f),m=(0,p.Pi)((function(){var e=(0,d.T)();return e.hasSelectedItems&&e.isDropdownOpen?(0,r.jsx)("div",{className:h().buttonWrapper,children:(0,r.jsx)(u.z,{onClick:function(t){t.preventDefault(),e.closeDropdown()},className:h().button,br:"sm",children:"Continue"})}):null}));m.displayName="ContinueButton";var v=function(e){return{pk:e.pk,isOffline:e.only_offline}},_=function(){var e,t,n=(0,a.X)().isMobile,u=(0,s.s)();return(0,r.jsx)(c.z,{title:u.isDefaultTask?"Choose category for your task":"Choose category for your quote",disableOnMobile:!0,children:(0,r.jsx)(o.Z,{dataTestId:"category-input",errorProps:{fs:l.A1.errorFs,disabled:n},dropdownProps:{isStatic:!0,withBorder:!1},getReturnValue:v,shouldUnregister:!1,popupVersion:n,wrapperProps:{beforeEnd:(0,r.jsx)(m,{})},initialPks:null===(e=u.initialData)||void 0===e?void 0:e.subcategoryPks,placeholder:u.isCitizen?"What type of work are you looking?":"What services are you providing?",edditable:!(null===(t=u.initialData)||void 0===t?void 0:t.quote)||!u.isCitizen,middleware:function(e){var t;return(0,i.v)(e,(null===(t=u.initialData)||void 0===t?void 0:t.tradieSubcats)||[])}})})}},7555:function(e,t,n){"use strict";n.d(t,{z:function(){return s}});var r=n(52322),i=n(85621),o=n(70224),a=n.n(o),s=function(e){var t=e.title,n=e.children,o=e.className,s=e.disableOnMobile,l=(0,i.X)().isMobile;return(0,r.jsxs)("div",{className:o,children:[(!l||!s)&&(0,r.jsx)("div",{className:a().title,children:t}),n]})}},56519:function(e,t,n){"use strict";n.d(t,{P:function(){return sn}});var r=n(98788),i=n(70865),o=n(96670),a=n(50930),s=n(5163),l=n(52322),c=n(2784),u=n(72779),d=n.n(u),p=n(85621),f=n(14179),h=n(95034),m=n(59137),v=n(73317),_=n(77050),x=n(22203),g=n(63955),b=n(69410),j=n(91300),y=n(6812),w=n(44460),C=n(62141),P=n(47842),k=n(49612),N=n.n(k),S=function(e){var t,n=e.title,r=e.text,i=e.onClick,o=e.isSelected,a=e.isDisabled,s=e.dataTestId;return(0,l.jsxs)("div",{className:d()(N().wrapper,(t={},(0,P.Z)(t,N().selected,o),(0,P.Z)(t,N().disabled,a),t)),onClick:a?void 0:i,"data-testid":s,children:[(0,l.jsx)("div",{className:N().title,children:n}),r?(0,l.jsx)("p",{className:N().text,children:r}):null]})},I=n(60354),Z=n(71958),D=n(23610),q=n(7555),T=n(90868),M=n(85438),B=n.n(M),A=function(){var e,t,n,r,i=(0,c.useRef)(null),o=(0,p.X)().isMobile,a=((0,w.s)().isDefaultTask,(0,g.bc)({name:"urgency",defaultValue:null})),s=a.field,u=a.fieldState,d=function(e,t){s.onChange({type:e,date:t})},f=function(e,t){d(t,(0,I.E4)(new Date,e))},h=function(e){d("custom",e)};return(0,l.jsxs)(q.z,{className:B().wrapper,title:"How urgent is your task?",children:[(0,l.jsxs)("div",{className:B().buttons,children:[(0,l.jsx)(S,{title:"Not urgent",text:"Approximately 10 days",onClick:function(){return f(10,"low")},isSelected:"low"===(null===(e=s.value)||void 0===e?void 0:e.type)}),(0,l.jsx)(S,{title:"Urgent",text:"1-2 days",onClick:function(){return f(2,"high")},isSelected:"high"===(null===(t=s.value)||void 0===t?void 0:t.type),dataTestId:"urgent-date"}),(0,l.jsx)(S,{title:"Specify the date",onClick:function(){var e;return h((null===(e=s.value)||void 0===e?void 0:e.date)||new Date)},isSelected:"custom"===(null===(n=s.value)||void 0===n?void 0:n.type)})]}),u.error&&(0,l.jsx)(T.j,{className:B().error,message:u.error.message,fs:C.A1.errorFs}),"custom"===(null===(r=s.value)||void 0===r?void 0:r.type)&&(0,l.jsx)("div",{ref:i,children:(0,l.jsx)(Z.M,{className:B().datePicker,selectedDate:s.value.date,onChange:h,closeDropdownOnSelect:o,staticDropdown:!0,onDropdownOpen:function(){if(i.current){var e=i.current;requestAnimationFrame((function(){requestAnimationFrame((function(){(0,D.z)(e)}))}))}}})})]})},E=n(781),F=n(76979),z=(0,F.K)({styleSet:C.A1,useTextarea:!0,getControllerProps:function(){return{name:"description",defaultValue:""}},component:function(){return{inputProps:{minHeight:130,minLength:C.GQ}}}}),V=function(e){var t,n=e.dataTestId,r=(0,p.X)().isMobile,i=(0,w.s)();return(0,l.jsx)(q.z,{title:"What are the details?",disableOnMobile:!0,children:(0,l.jsx)(z,{placeholder:r?"Task description":"Explain your task in more detail",withError:!r,dataTestId:n,defaultValue:null===(t=i.initialData)||void 0===t?void 0:t.description})})},O=(0,F.K)({styleSet:C.A1,getControllerProps:function(){return{name:"title",defaultValue:""}}}),R=function(e){var t,n,r,i=e.dataTestId,o=(0,p.X)().isMobile,a=(0,w.s)();return(0,l.jsx)(q.z,{title:a.isDefaultTask?"Title for your task":"Title for your quote",disableOnMobile:!0,children:(0,l.jsx)(O,{placeholder:o?"Short task title":"In a few words, describe your quote",withError:!o,dataTestId:i,defaultValue:(null===(t=a.initialData)||void 0===t?void 0:t.title)||(null===(n=a.initialData)||void 0===n||null===(r=n.quote)||void 0===r?void 0:r.title)||""})})},L=n(5681),Q=n.n(L),W=function(e){var t=e.children,n=e.gap,r=(0,p.X)().isMobile;return(0,l.jsx)("div",{className:Q().flex,style:{gap:null!==n&&void 0!==n?n:r?16:40},children:t})},H=n(46776),G=n(59517),U=n(93244),X=n(38016),K=n(739),Y=n.n(K),J=(0,H.Pi)((function(){var e=(0,w.s)(),t=e.isLoading,n=e.isEdit,r=e.isCitizen,a=(0,p.X)().isMobile,s=(0,m.s)(),c=s.step,u=s.isLastStep,d=s.prevStep,f=u(),h=(0,U.n)({stepFields:{first:function(e){e.push("title","subcategoryMap"),r?(e.push("description"),a||e.push("urgency")):(e.push("users"),n&&e.push("files","address"))},second:function(e){r?a?e.push("urgency"):e.push("files","address","price"):e.push("files","address")},third:function(e){r?a&&e.push("files","address","price"):e.push("allowedInPersonPayment","depositExpiryDate","depositPercent","description","invoiceExpiryDate","materials")},"register-base":function(e){e.push("name","surname","email","phone","password","cpassword")},"register-code":function(){}}});return(0,l.jsxs)("div",{className:Y().wrapper,"data-testid":"submit-btn",children:["first"!==c&&a&&!f&&(0,l.jsx)(X.U,{onClick:d,children:"Back"}),(0,l.jsx)(G.M,(0,o.Z)((0,i.Z)({loading:t},h),{children:f?"Publish":"Next"}))]})}));J.displayName="SubmitButton";var $=function(){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(W,{children:[(0,l.jsx)(E.CategoryInput,{}),(0,l.jsx)(R,{dataTestId:"title-input"}),(0,l.jsx)(V,{dataTestId:"desc-input"}),(0,l.jsx)(A,{})]}),(0,l.jsx)(J,{})]})},ee=n(25237),te=n.n(ee)()({loader:function(){return Promise.resolve().then(n.bind(n,781)).then((function(e){return e.CategoryInput}))},ssr:!1,loading:function(){return(0,l.jsx)("div",{style:{height:38}})}},{loadableGenerated:{webpack:function(){return[781]}}}),ne=function(){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(W,{children:[(0,l.jsx)(te,{}),(0,l.jsx)(R,{}),(0,l.jsx)(V,{})]}),(0,l.jsx)(J,{})]})},re=n(69007),ie=n(85750),oe=function(){var e,t,n,r=(0,w.s)();return(0,l.jsx)(q.z,{title:r.isDefaultTask?"Any important task files?":"Add images for your quote (optional)",children:(0,l.jsx)(re.S,{onFileLoading:function(){return r.setIsLoading(!0)},onFileLoadingComplete:function(){return r.setIsLoading(!1)},placeholder:"Upload files for your quote",dataTestId:"file-input",initialFileData:null===(e=r.initialData)||void 0===e||null===(t=e.quote)||void 0===t||null===(n=t.attachments)||void 0===n?void 0:n.map((function(e){return(0,ie.Iy)(e,(0,ie.PH)((0,ie.Gr)(e)).type)}))})})},ae=n(9710),se=n(43417),le=n(44826),ce=n(51009),ue=n(623),de=n(52188),pe=n.n(de),fe=function(e){var t=e.lat,n=e.lng,i=e.onChange,o=e.initialAddress,a=(0,c.useState)(!1),u=a[0],d=a[1],p=(0,c.useState)(o),f=p[0],h=p[1],m=function(e,t){d(t),h(e)},v=function(){var e=(0,r.Z)((function(e){var t,n,r,o,a,l,c,u,p,f,h;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:return t=e.lat,n=e.lng,d(!0),[4,(0,se.QC)(t,n)];case 1:return(o=s.sent())&&(null===(r=o.address.country)||void 0===r?void 0:r.toUpperCase())===ce.FJ?[4,(0,se.Wf)(o.address.city)]:(i(null),m(null,!1),[2]);case 2:return a=s.sent(),(l=(null===a||void 0===a?void 0:a.districts.find((function(e){return+e.postcode===+o.address.postcode})))||(null===a||void 0===a?void 0:a.districts[0]))?(c=o.address,u=c.street,p=c.houseNumber,f=c.city,h={pk:l.pk,lat:t,lng:n,city:f,houseNumber:p,street:u},i(h),m(h,!1),[2]):(i(null),m(null,!1),[2])}}))}));return function(t){return e.apply(this,arguments)}}(),_=(0,c.useMemo)((function(){return"number"!==typeof t||"number"!==typeof n?[]:[{lat:t,lng:n}]}),[t,n]),x=f?"".concat(f.city).concat(f.street?", ".concat(f.street):"").concat(f.houseNumber?", ".concat(f.houseNumber):""):"";return(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:pe().textWrapper,children:[(0,l.jsx)("p",{className:pe().text,children:x||"Pick the nearest house"}),u&&(0,l.jsx)(ue.$,{className:pe().spinner})]}),(0,l.jsx)(le.P,{className:pe().map,markerData:_,onPosChange:function(e){return v(e.latlng)},flyToNewPos:!1})]})},he=n(83006),me=n(94335),ve=n(65623),_e=n(98988),xe=n(97868),ge=n(20754),be=n(47264),je=n(18869),ye=n(76069),we=n(61885),Ce=n(93686),Pe=n.n(Ce),ke=n(57335),Ne=/(, Australia)|Australia/i,Se=function(e){var t=e.city,n=e.street,a=e.onChange,u=(0,c.useState)((function(){var e=new Map;if(n){var t=Math.random();e.set(t,{name:n,pk:t,returnValue:{name:name}})}return e})),d=u[0],p=u[1],f=function(){var e=(0,r.Z)((function(e){var n,r;return(0,s.__generator)(this,(function(i){switch(i.label){case 0:return[4,(0,ke.e)(t?"".concat(t,", ").concat(e):e)];case 1:return(n=i.sent()).data?[2,n.data.map((function(e){return r=e.description.replace(Ne,""),{pk:Math.random(),name:r,returnValue:{name:r}}}))]:[2,[]]}}))}));return function(t){return e.apply(this,arguments)}}();return(0,l.jsx)(ve.s,{children:function(e){var t=e.getDropdownProps,n=e.getHeadProps,r=e.getItem,s=e.getWrapperProps;return(0,l.jsx)(_e.e,{max:1,initialSearchQuery:"17",selectedItemMap:d,onSelectedItemMapChange:p,children:(0,l.jsxs)(xe.i,(0,o.Z)((0,i.Z)({},s({className:Pe().wrapper})),{children:[(0,l.jsx)(ge.F,(0,o.Z)((0,i.Z)({},n()),{children:(0,l.jsx)(be.I,{inputProps:{placeholder:"Add a street"}})})),(0,l.jsx)(je.L,(0,o.Z)((0,i.Z)({},t({isStatic:!0,withBorder:!1})),{children:(0,l.jsx)(ye.d,{children:(0,l.jsx)(we.o,{onSearch:f,renderItem:function(e,t){return r({props:t,name:e.name,className:Pe().item})},getItemInfo:function(e){return{pk:e.pk.toString(),name:e.name,returnValue:e.returnValue}},onItemClick:function(e,t,n){a(e.returnValue.name),n.closeDropdown()},children:(0,l.jsx)(l.Fragment,{})})})}))]}))})}})},Ie=n(17421),Ze=n.n(Ie),De=(0,H.Pi)((function(e){var t,n,r,o,s,u,d,p,f,h=e.withStreetInput,m=void 0===h||h,v=(0,w.s)(),_=null===(t=v.initialData)||void 0===t?void 0:t.address,x=(0,g.bc)({name:"address",defaultValue:_?{city:_.district,houseNumber:null!==(p=_.home_number)&&void 0!==p?p:void 0,lat:(null===(n=v.initialData)||void 0===n?void 0:n.lat)||ce.w[0],lng:(null===(r=v.initialData)||void 0===r?void 0:r.lon)||ce.w[1],pk:_.pk,street:null!==(f=_.street)&&void 0!==f?f:void 0}:null}),b=x.field,j=x.fieldState,y=(0,c.useState)((function(){var e=new Map;return b.value&&e.set(b.value.pk,{pk:b.value.pk,name:b.value.city,returnValue:{pk:b.value.pk,name:b.value.city}}),e})),C=y[0],P=y[1],k=(0,w.s)(),N=(0,c.useRef)(null);(0,he.Z)({when:[k.isMapOpen],from:N,scrollOn:50});var S=function(e){null===e?b.onChange(null):b.onChange((0,i.Z)({},b.value||{},e))};return(0,l.jsxs)("div",{children:[!k.isMapOpen&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(me.G,{dropdownProps:{isStatic:!0,withBorder:!1},max:1,closeDropdownOnSelect:!0,selectedItemMap:C,onSelectedItemMapChange:function(e){P(e);var t=(0,a.Z)(e.values()).pop();t&&S({pk:t.returnValue.pk,city:t.returnValue.name})},dataTestId:"district-input",wrapperProps:j.invalid?{brColor:"var(--form-error-color)"}:void 0}),m&&(0,l.jsx)(Se,{onChange:function(e){return S({street:e})},city:null===(o=b.value)||void 0===o?void 0:o.city,street:(null===(s=b.value)||void 0===s?void 0:s.street)||""})]}),(0,l.jsx)("div",{className:Ze().showMapText,onClick:function(){return k.setIsMapOpen(!k.isMapOpen)},children:k.isMapOpen?"Select a city/street":"Select on the map"}),k.isMapOpen&&(0,l.jsx)("div",{ref:N,children:(0,l.jsx)(fe,{lat:null===(u=b.value)||void 0===u?void 0:u.lat,lng:null===(d=b.value)||void 0===d?void 0:d.lng,onChange:b.onChange,initialAddress:b.value})})]})}));De.displayName="ChooseAddress";var qe=n(80211),Te=n.n(qe),Me=(0,H.Pi)((function(){var e=(0,w.s)(),t=(0,g.Gc)().unregister,n=(0,g.qo)().subcategoryMap,r=(0,c.useMemo)((function(){return(0,C.HC)(n||new Map)}),[n]),i=function(t){r&&t||e.setIsOnline(t)};return(0,c.useLayoutEffect)((function(){r&&e.setIsOnline(!1)}),[r,e]),(0,c.useEffect)((function(){e.isOnline&&t("address")}),[e.isOnline,t]),(0,l.jsxs)("div",{children:[(0,l.jsx)(q.z,{className:Te().container,title:e.isDefaultTask?"Choose your task type":"Choose the type of your quote",children:(0,l.jsxs)("div",{className:Te().buttons,children:[(0,l.jsx)(S,{title:"Offline",isSelected:!e.isOnline,onClick:function(){return i(!1)}}),(0,l.jsx)(S,{title:"Online",isSelected:e.isOnline,onClick:function(){return i(!0)},isDisabled:r})]})}),!e.isOnline&&(0,l.jsx)(De,{})]})}));Me.displayName="ChooseOnlineMode";var Be,Ae=function(){var e=(0,w.s)().isDefaultTask;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(W,{children:[(0,l.jsx)(oe,{}),(0,l.jsx)(Me,{}),e?(0,l.jsx)(q.z,{title:"What is the budget for the task?",children:(0,l.jsx)(ae.t,{})}):null]}),(0,l.jsx)(J,{})]})},Ee=function(){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(A,{}),(0,l.jsx)(J,{})]})},Fe=function(){var e=(0,w.s)().isDefaultTask;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(W,{gap:32,children:[(0,l.jsx)(oe,{}),(0,l.jsx)(Me,{}),e?(0,l.jsx)(q.z,{title:"What is the budget for the task?",children:(0,l.jsx)(ae.t,{})}):null]}),(0,l.jsx)(J,{})]})},ze=n(35273),Ve=n(47277),Oe=n(57152),Re=n(59825),Le=n(32894),Qe=n(27272),We=n(49845),He=n.n(We),Ge=function(){var e=(0,g.Gc)(),t=e.setValue,n=e.getValues,r=(0,m.s)().setStep,i=n().isDomain,o=(0,w.s)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:He().wrapper,children:[(0,l.jsx)(ze.k,{onLoading:function(e){return o.setIsLoading(e)},setEmail:function(e){return t("email",e)},afterLogIn:function(e){return o.afterLogInRoutine(e)},next:function(){return r("register-phone")},minimalisticStyle:!0,withOr:!0,isDomainAuth:i}),(0,l.jsx)("p",{children:"Provide your contact details"}),(0,l.jsx)(Ve.R,{placeholder:"Enter your name",withError:!1}),!i&&(0,l.jsx)(Ve.o,{withError:!1}),(0,l.jsx)(Oe.U,{withError:!1}),(0,l.jsx)(Re.W,{withError:!1}),(0,l.jsx)(Re.N,{withError:!1}),(0,l.jsx)(Le.s,{withError:!1}),(0,l.jsx)("p",{className:He().phoneHint,children:"You will recieve a code to verify your phone number"}),(0,l.jsx)(Qe.P,{})]}),(0,l.jsx)(J,{})]})},Ue=n(88007),Xe=n(16830),Ke=n(35479),Ye=n(36653),Je=n.n(Ye),$e=function(){var e=(0,g.Gc)(),t=e.getValues,n=e.setError,r=(0,Ke.w)({getValues:function(){var e=t();return{email:e.email,phone:e.phone}},onError:function(e){return n("root",{message:e.message})},onRequestStart:function(){return n("root",{message:""})}}),i=r.isCodeSent,o=r.isCodeVerified,a=r.isResendDisabled,s=r.verifyCode,c=r.resendCode;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:Je().wrapper,children:[(0,l.jsx)("p",{className:Je().title,children:"Before you post we need to verify your number"}),(0,l.jsx)(Ue.N,{codeLength:4,onCodeSend:s}),i&&!o&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:Je().codeHint,children:"Code has been sent to your phone number"}),!a&&(0,l.jsx)(Xe.z,{color:"white",onClick:function(){return c()},brColor:"blue",br:"sm",children:"Re-send code"})]})]}),o&&(0,l.jsx)(J,{})]})},et=function(){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(Le.s,{}),(0,l.jsx)(J,{})]})},tt=function(){var e=(0,m.s)().step,t=(0,p.X)().isMobile;return(0,l.jsxs)(l.Fragment,{children:["first"===e&&(0,l.jsx)(l.Fragment,{children:t?(0,l.jsx)(ne,{}):(0,l.jsx)($,{})}),"second"===e&&(0,l.jsx)(l.Fragment,{children:t?(0,l.jsx)(Ee,{}):(0,l.jsx)(Ae,{})}),"third"===e&&(0,l.jsx)(l.Fragment,{children:t?(0,l.jsx)(Fe,{}):(0,l.jsx)(l.Fragment,{})}),"register-base"===e&&(0,l.jsx)(Ge,{}),"register-phone"===e&&(0,l.jsx)(et,{}),"register-code"===e&&(0,l.jsx)($e,{})]})},nt=n(95857);function rt(){return rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rt.apply(this,arguments)}var it,ot,at=function(e){return c.createElement("svg",rt({width:17,height:16,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Be||(Be=c.createElement("path",{d:"M8.268 1.9a2.1 2.1 0 1 1 0 4.2 2.1 2.1 0 0 1 0-4.2Zm0 9c2.97 0 6.1 1.46 6.1 2.1v1.1h-12.2V13c0-.64 3.13-2.1 6.1-2.1Zm0-10.9c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4Zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4Z",fill:"#000"})))},st=n(74728),lt=n(11805),ct=n(82239),ut=n(26297),dt=n(28884),pt=n(17569),ft=n.n(pt),ht=function(e){var t=e.photoSrc,n=e.name,r=e.email,a=e.isSelected,s=(0,ut.Z)(e,["photoSrc","name","email","isSelected"]);return(0,l.jsxs)("div",(0,o.Z)((0,i.Z)({className:d()(ft().wrapper,(0,P.Z)({},ft().selected,a))},s),{children:[(0,l.jsx)("div",{className:ft().avatar,children:(0,l.jsx)(dt.Y,{src:t,w:24,h:24})}),(0,l.jsx)("span",{className:ft().name,children:n}),(0,l.jsx)("span",{className:ft().email,children:r})]}))},mt=n(87461),vt=n(14777),_t=n.n(vt),xt=(0,F.K)({getControllerProps:function(e){var t=e.initialValue;return{name:"users",defaultValue:t?new Map(t.map((function(e){return[e.pk,{pk:e.pk,name:e.name,returnValue:{pk:e.pk}}]}))):new Map}},render:function(e){var t,n=e.fieldState,r=e.field,a=e.errorProps,s=e.props,c=(0,nt.V)(null===(t=n.error)||void 0===t?void 0:t.message,(0,o.Z)((0,i.Z)({},a),{isStatic:!0})),u=c.renderError,p=c.wrapperProps,h=s.inputProps,m=s.max,v=s.tradiePk,_=s.edditable,x=(0,f.o)().userStore,g=function(e){var t;if(x.isModerator)t=(0,mt.Fd)({search:e});else{var n={email__contains:e,name__contains:e,surname__contains:e,company_name__contains:e};t=(0,mt.gK)(v,n)}return{controller:t.controller,data:t.then((function(e){var t;return(null===(t=e.data)||void 0===t?void 0:t.results)||[]}))}},b=function(e){return"customer"in e?e.customer:e};return(0,l.jsxs)("div",(0,o.Z)((0,i.Z)({},p),{className:d()(_t().wrapper,p.className),children:[(0,l.jsx)(st.T,{children:function(e){var t=e.getWrapperProps,a=e.getDropdownProps,s=e.getHeadProps;return(0,l.jsx)(_e.e,{selectedItemMap:r.value,onSelectedItemMapChange:r.onChange,debounceTimeMs:0,max:m,edditable:_,children:(0,l.jsxs)(xe.i,(0,o.Z)((0,i.Z)({},t((0,o.Z)((0,i.Z)({},(0,ct.W)(n)),{className:_t().wrapper}))),{children:[(0,l.jsx)(ge.F,(0,o.Z)((0,i.Z)({},s()),{afterBegin:(0,l.jsx)(at,{className:_t().icon}),children:(0,l.jsx)(be.I,{inputProps:(0,i.Z)({placeholder:"Name"},h)})})),(0,l.jsx)(lt.E,{dropdownProps:a({className:_t().dropdown,withBorder:!1}),withInitialRequest:!0,onSearch:g,getItemInfo:function(e){var t=b(e);return{name:(0,ie.Pp)(t),pk:t.pk.toString(),returnValue:{pk:t.pk}}},renderItem:function(e,t){var n=b(e);return(0,l.jsx)(ht,(0,i.Z)({name:(0,ie.Pp)(n),email:n.email,photoSrc:(0,ie.Gr)(n.main_photo),isSelected:t.isSelected},t.dataset))}})]}))})}}),u()]}))}});function gt(){return gt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gt.apply(this,arguments)}var bt,jt,yt=function(e){return c.createElement("svg",gt({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),it||(it=c.createElement("path",{d:"M16.313 11.25H12.75V7.687a.188.188 0 0 0-.188-.187h-1.124a.188.188 0 0 0-.188.188v3.562H7.687a.188.188 0 0 0-.187.188v1.124c0 .104.084.188.188.188h3.562v3.563c0 .103.084.187.188.187h1.124a.188.188 0 0 0 .188-.188V12.75h3.563a.188.188 0 0 0 .187-.188v-1.124a.188.188 0 0 0-.188-.188Z",fill:"#0071E0"})),ot||(ot=c.createElement("path",{d:"M12 1.5C6.202 1.5 1.5 6.202 1.5 12S6.202 22.5 12 22.5 22.5 17.798 22.5 12 17.798 1.5 12 1.5Zm0 19.219A8.72 8.72 0 0 1 3.281 12 8.72 8.72 0 0 1 12 3.281 8.72 8.72 0 0 1 20.719 12 8.72 8.72 0 0 1 12 20.719Z",fill:"#0071E0"})))},wt=n(64726),Ct=n(69483),Pt=n.n(Ct),kt=function(){var e,t,n,r=(0,p.X)().isMobile,i=(0,f.o)().userStore,o=(0,g.Gc)().setError,a=(0,w.s)(),s=(0,h.B)();return(0,l.jsxs)(q.z,{title:"Select a customer from the list",disableOnMobile:!0,children:[(0,l.jsx)(xt,{max:1,tradiePk:null!==(n=null===(e=i.user)||void 0===e?void 0:e.pk)&&void 0!==n?n:-1,inputProps:{placeholder:r?"Select a customer":"Name"},initialValue:(null===(t=a.initialData)||void 0===t?void 0:t.user)?[a.initialData.user]:void 0}),(0,l.jsxs)("div",{className:Pt().button,onClick:function(){a.tradiePk?s.open({component:wt.X,props:{tradiePk:a.tradiePk}}):o("root",{message:"No tradie pk"})},children:[(0,l.jsx)(yt,{}),(0,l.jsx)("span",{className:Pt().buttonText,children:"Add new customer"})]})]})},Nt=n(60686),St=n(99935),It=n.n(St),Zt=function(){var e=(0,w.s)(),t=e.setIsSelectedInvoice,n=e.isSelectedInvoice,r=(0,c.useState)(n?1:0),i=r[0],o=r[1],a=[{content:"Send a Quote",onChoose:function(){return t(!1)}},{content:"Send an Invoice",onChoose:function(){return t(!0)}}];return(0,l.jsx)(Nt.r,{className:It().tabSwitcher,tabClassName:It().tab,tabData:a,selectedTab:i,onSelect:o,customHeight:!0,customWidth:!0,tabBgColor:"bg-c-blue-100"})},Dt=function(){var e=(0,w.s)(),t=e.isAdminInvoice,n=e.isDefaultTask,r=e.isDefaultQuote;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(W,{children:[!r&&!n&&(0,l.jsx)(Zt,{}),(0,l.jsx)(kt,{}),!t&&(0,l.jsx)(E.CategoryInput,{}),(0,l.jsx)(R,{dataTestId:"title-input"}),t&&(0,l.jsx)(A,{})]}),(0,l.jsx)(J,{})]})},qt=function(){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(W,{children:[(0,l.jsx)(oe,{}),(0,l.jsx)(Me,{})]}),(0,l.jsx)(J,{})]})},Tt=function(){var e=(0,w.s)(),t=e.isDefaultTask,n=e.isDefaultQuote;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(W,{children:[!n&&!t&&(0,l.jsx)(Zt,{}),(0,l.jsx)(kt,{}),(0,l.jsx)(E.CategoryInput,{}),(0,l.jsx)(R,{})]}),(0,l.jsx)(J,{})]})},Mt=n(63002),Bt=n(23110),At=n.n(Bt),Et=n(10438),Ft=function(e){var t=e.children,n=(0,m.s)().step,r=(0,c.useRef)(null);return(0,c.useLayoutEffect)((function(){var e;null===(e=r.current)||void 0===e||e.scrollTo(0,0)}),[n]),(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Et.l,{className:At().container,ref:r,children:t})})},zt=n(37295),Vt=n.n(zt),Ot=function(){return(0,l.jsx)(Ft,{children:(0,l.jsx)(Mt.V,{createQuoteBtnClassName:Vt().button})})},Rt=function(){var e=(0,m.s)().step,t=(0,p.X)().isMobile,n=(0,w.s)().isAdminInvoice;return(0,l.jsxs)(l.Fragment,{children:["first"===e&&(0,l.jsx)(l.Fragment,{children:t?(0,l.jsx)(Tt,{}):(0,l.jsx)(Dt,{})}),"second"===e&&(0,l.jsx)(l.Fragment,{children:n?(0,l.jsx)(Ot,{}):(0,l.jsx)(qt,{})}),"third"===e&&(0,l.jsx)(Ot,{})]})},Lt=n(99600),Qt=n(5067);function Wt(){return Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wt.apply(this,arguments)}var Ht=function(e){return c.createElement("svg",Wt({width:20,height:12,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),bt||(bt=c.createElement("path",{d:"M6.93 1.11 2 6.018l4.886 4.866",stroke:"#000",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),jt||(jt=c.createElement("path",{d:"M2.605 6.031h15.51",stroke:"#000",strokeWidth:2,strokeLinecap:"round"})))},Gt=function(){return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(W,{children:[(0,l.jsx)(kt,{}),(0,l.jsx)(E.CategoryInput,{}),(0,l.jsx)(R,{}),(0,l.jsx)(oe,{}),(0,l.jsx)(Me,{})]}),(0,l.jsx)(J,{})]})},Ut=function(){var e=(0,m.s)().step;return(0,l.jsxs)(l.Fragment,{children:["first"===e&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Ft,{children:(0,l.jsx)(Gt,{})})}),"second"===e&&(0,l.jsx)(Ot,{})]})},Xt=n(9750),Kt=n.n(Xt),Yt=function(){var e=(0,g.cl)().errors;return e.root?(0,l.jsx)("p",{className:Kt().error,children:e.root.message}):null},Jt=n(58273),$t=n(23536),en=n(4868),tn=n(15823),nn=n(66835),rn=n(94193),on=n(39544),an=n.n(on),sn=function(e){var t=e.popupId,n=e.isEdit,u=void 0!==n&&n,P=e.isCitizen,k=void 0!==P&&P,N=e.withCitizenRegister,S=void 0!==N&&N,I=e.isInvoice,Z=e.isDefaultQuote,D=void 0!==Z&&Z,q=e.isDefaultTask,T=void 0!==q&&q,M=e.onSuccess,B=e.onAdminInvoiceSuccess,A=void 0===B?en.Z:B,E=e.initialData,F=e.tradiePk,z=e.citizenPk,V=e.isAdminInvoice,O=void 0!==V&&V,R=e.isSelectedInvoice,L=void 0!==R&&R,Q=(0,p.X)().isMobile,W=(0,f.o)(),G=W.userStore,U=W.tradieDomainStore,X=(0,Jt.P)().verify,K=(0,c.useRef)(null),Y=(0,h.B)();Y.setProps(t,Q?(0,C.Qu)():(0,C.Yo)());var J=(0,Lt.sq)({edditable:!0,quote:null===E||void 0===E?void 0:E.quote,isAdminInvoice:O}),$=k?S?(0,b.T)(C.Ex,C.Fj):C.Ex:O?(0,b.T)(C.qW,J.schema):(0,b.T)(C.K9,J.schema),ee=(0,g.cI)({resolver:(0,y.X)($),mode:j.Z,defaultValues:(0,i.Z)({isDomain:U.isDomain,surname:""},k?{}:J.defaultValues)}),te=ee.setError,ne=ee.handleSubmit,re=ee.setValue,ie=(0,C.It)(Q,k,u,S,O),oe=(0,v.g)(ie,{skippedOnNext:["register-phone"],onLast:function(){return Y.close(t)},onChange:function(e,t){"register-base"===e&&"register-phone"===t&&(re("socialAccountPayload",null),re("phone",""),re("email",""))}}),ae=function(e){return te("root",{message:e})},se=function(){var e=(0,r.Z)((function(e){var t,n,r;return(0,s.__generator)(this,(function(i){switch(i.label){case 0:return t=e.socialAccountPayload,n=e.phone,t?[4,X(t,n)]:[3,2];case 1:return r=i.sent(),[3,5];case 2:return[4,G.register({first_name:e.name,last_name:e.surname,email:e.email,password:e.password,phone:tn.h.unmask(e.phone)})];case 3:return(r=i.sent()).error?[3,5]:[4,G.createCitizen()];case 4:r=i.sent(),i.label=5;case 5:return[2,r]}}))}));return function(t){return e.apply(this,arguments)}}(),le=function(){var e=(0,r.Z)((function(e,t,n){var r,i,o,a;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:return r=ee.getValues(),i=!u&&!k&&!!(null===E||void 0===E?void 0:E.quote),a=null!==I&&void 0!==I?I:"invoice"===K.current,u||i?(null===E||void 0===E?void 0:E.quote)?[4,(0,C.Ej)({formData:r,quote:E.quote,isInvoice:a})]:[2,ae("No quote to edit")]:[3,2];case 1:return o=s.sent(),[3,4];case 2:return t&&e?[4,(0,C.Z_)({formData:r,citizenPk:e,tradiePk:t,isCitizen:k,isInvoice:a})]:[2,ae("No tradie or citizen pk")];case 3:o=s.sent(),s.label=4;case 4:return o.error?te("root",{message:o.error.message}):(n&&(0,nn.Z)("successful_registration"),M(o.data,ee)),[2]}}))}));return function(t,n,r){return e.apply(this,arguments)}}(),ce=function(e){return(0,$t.hz)(G.userPk,{account_name:e.accountName,account_number:e.accountNumber,bsb:e.bsb})},ue=function(){var e=(0,r.Z)((function(e,t){var n,r;return(0,s.__generator)(this,(function(i){switch(i.label){case 0:return[4,(0,rn.VV)({tradie_id:+t,expires_date:null===(n=e.urgency)||void 0===n?void 0:n.date,work_materials:(0,C.I4)(e.materials)})];case 1:return(r=i.sent()).error?(te("root",{message:r.error.message}),[2]):(A(),[2])}}))}));return function(t,n){return e.apply(this,arguments)}}(),de=function(){var e=(0,r.Z)((function(e){var t,n,r,i,o,l,c,u,d,p;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:return r=e.users,i=e.bankDetails,o=F||(null===E||void 0===E||null===(t=E.quote)||void 0===t?void 0:t.tradie),l=(null===(n=(0,a.Z)((null===r||void 0===r?void 0:r.values())||[]).at(-1))||void 0===n?void 0:n.returnValue.pk)||z,O?[4,ue(e,l||0)]:[3,2];case 1:return s.sent(),[2];case 2:return S&&k?[4,se(e)]:[3,4];case 3:if((u=s.sent()).error)return[2,te("root",{message:u.error.message})];l=null===(c=u.user)||void 0===c?void 0:c.pk,s.label=4;case 4:return i?[4,ce(i)]:[3,6];case 5:if(d=s.sent().error)return ae(d.message),[2];s.label=6;case 6:return D||T?[4,(0,C.XW)({formData:e,isQuote:D,creatorId:l||-1})]:[3,8];case 7:return p=s.sent(),M(p,ee),[2];case 8:return[4,le(l,o,S)];case 9:return s.sent(),[2]}}))}));return function(t){return e.apply(this,arguments)}}(),pe=(0,l.jsx)(_.b,{className:an().dots,currentStep:oe.step,steps:ie});return(0,l.jsx)("form",{className:d()(an().wrapper,oe.isLastStep()&&!k&&an().quoteInfo),onSubmit:ne(de),children:(0,l.jsx)(w.T,{initialData:E,isCitizen:k,isEdit:u,tradiePk:F,isSelectedInvoice:L,createQuote:le,isAdminInvoice:O,isDefaultTask:T,isDefaultQuote:D,children:function(e){return(0,l.jsx)(H.Qj,{children:function(){return(0,l.jsx)(m.U.Provider,{value:oe,children:(0,l.jsx)(Qt.k,{quote:null===E||void 0===E?void 0:E.quote,edditable:!0,isCitizen:k,isInvoice:I,isSelectedInvoice:e.isSelectedInvoice,isAdminInvoice:O,buttonConfig:{onCreateInvoice:function(){return K.current="invoice"},onCreateQuote:function(){return K.current="quote"}},children:(0,l.jsxs)(g.RV,(0,o.Z)((0,i.Z)({},ee),{children:[!Q&&ie.indexOf(oe.step)>0&&(0,l.jsx)(Ht,{className:an().arrow,onClick:oe.prevStep}),!Q&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h5",{className:an().title,children:(0,C.PD)(u,k,T)}),pe]}),Q&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(x.J,{className:an().historyBack,title:(0,C.PD)(u,k,T),onArrowClick:oe.prevStep}),pe]}),u?(0,l.jsx)(l.Fragment,{children:k?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(Ut,{})}):(0,l.jsx)(l.Fragment,{children:k?(0,l.jsx)(tt,{}):(0,l.jsx)(Rt,{})}),(0,l.jsx)(Yt,{})]}))})})}})}})})}},62141:function(e,t,n){"use strict";n.d(t,{A1:function(){return y},Ej:function(){return A},Ex:function(){return Z},Fj:function(){return M},GQ:function(){return w},HC:function(){return C},I4:function(){return E},It:function(){return P},K9:function(){return D},PD:function(){return k},Qu:function(){return S},XW:function(){return F},Yo:function(){return N},Z_:function(){return B},qW:function(){return q}});var r=n(98788),i=n(70865),o=n(96670),a=n(87394),s=n(50930),l=n(5163),c=n(48601),u=n(26361),d=n(80226),p=n(24264),f=n(10744),h=n(89609),m=n(60354),v=n(85750),_=n(41156),x=n(34514),g=n(5035),b=n(58413),j=n(88680),y=(0,d.l6)(),w=((0,d.vT)(),30),C=function(e){return(0,s.Z)(e.values()).some((function(e){return e.returnValue.isOffline}))},P=function(e,t,n,r,i){if(n||i)return["first","second"];if(t){var o=["first","second"];return e&&o.push("third"),r&&o.push("register-base","register-phone","register-code"),o}return["first","second","third"]},k=function(e,t,n){return e?"Edit the quote":n?"Post a task":t?"Get a quote":"Create a quote/invoice"},N=u.CZ.concat((0,u.$Y)({cross:"long",contentStyle:{borderRadius:15}})),S=u.zJ.concat((0,u.$Y)({contentStyle:{borderRadius:0},backgroundStyle:{backgroundColor:"rgba(0, 0, 0, 0.5)"}})),I=(0,c.Z_)().required(p.C).max(100,"Maximum size is 100 symbols"),Z=(0,c.Ry)().shape({title:I,description:(0,c.Z_)().required(p.C).min(w,"Minimum size is ".concat(w," symbols")),subcategoryMap:f.f.subcategoryMap,urgency:(0,c.nK)().nonNullable().required(p.C),address:(0,c.Ry)().required(p.C),termsAndConditions:(0,c.O7)()}),D=(0,c.Ry)().shape({title:I,subcategoryMap:f.f.map,users:f.f.users}),q=(0,c.Ry)().shape({title:I,users:f.f.users}),T=function(e){return(0,c.nK)().when(["socialAccountPayload"],(function(t,n){return(0,a.Z)(t,1)[0]?n:n.concat(e)}))},M=(0,c.Ry)().shape({name:T((0,c.nK)().when("isDomain",{is:!0,then:function(e){return e.concat(f.f.fullName)},otherwise:function(e){return e.concat(f.f.name)}})),surname:T((0,c.nK)().when("isDomain",{is:!1,then:function(e){return e.concat(f.f.name)}})),phone:f.f.phone,cpassword:T(f.f.cpassword),password:T(f.f.password),email:T(f.f.email.required()),socialAccountPayload:(0,c.Ry)().nullable(),withNewsletters:T((0,c.O7)()),isDomain:(0,c.O7)()}),B=function(){var e=(0,r.Z)((function(e){var t,n,r,a,c,u,d,p,f,g,y,w,C,P;return(0,l.__generator)(this,(function(l){switch(l.label){case 0:return r=e.tradiePk,a=e.citizenPk,c=e.isInvoice,u=e.isCitizen,d=e.formData,p=d.bankDetails||{},f=p.accountName,g=p.accountNumber,y=p.bsb,w={description:d.description,title:d.title,job_type_ids:(0,s.Z)(d.subcategoryMap.values()).map((function(e){return e.returnValue.pk})),tradie:r,creator_role:u?"citizen":"tradie",attachments:d.files.map((function(e){return e.id})),citizen:a,latitude:null===(t=d.address)||void 0===t?void 0:t.lat,longitude:null===(n=d.address)||void 0===n?void 0:n.lng,address:d.address?{street:d.address.street||"",district_id:d.address.pk}:void 0,digital_signature_required:d.withDigitalSignature,terms_and_conditions:d.termsAndConditions,account_name:f,account_number:g?(0,v.Bv)(g,_.Lm):void 0,bsb:y?(0,v.Bv)(y,x.Kf):void 0},u?b.i8.itemsArray.length>0?[4,(0,j.u)(w)]:[3,2]:[3,5];case 1:return C=l.sent(),[3,4];case 2:return[4,(0,h.A4)(r,w)];case 3:C=l.sent(),l.label=4;case 4:return[3,7];case 5:return[4,(0,h.A4)(r,(0,o.Z)((0,i.Z)({},w),{deposit_percent:null!==(P=d.depositPercent)&&void 0!==P?P:void 0,deposit_expire_date:d.depositExpiryDate?(0,m.hC)(d.depositExpiryDate):void 0,allowed_offline_payment:d.allowedInPersonPayment,allowed_online_payment:d.allowedOnlinePayment,work_materials:d.materials.map((function(e){var t,n;return{cost:e.cost.toString(),description:e.description,name:e.name,quantity:e.quantity,tax_type:(null===(t=e.tax_type)||void 0===t?void 0:t.returnValue)||"no tax",unit:(null===(n=e.unit)||void 0===n?void 0:n.returnValue)||"pieces"}})),merchant_fee_pays_role:d.merchantFeePayer}),c)];case 6:C=l.sent(),l.label=7;case 7:return[2,C]}}))}));return function(t){return e.apply(this,arguments)}}(),A=function(e){var t,n,r,i=e.formData,o=e.quote,a=e.isInvoice,l=i.bankDetails||{},c=l.accountName,u=l.accountNumber,d=l.bsb;return(0,h.hv)(o.tradie,o.id,{description:i.description,job_type_ids:(0,s.Z)(i.subcategoryMap.values()).map((function(e){return e.returnValue.pk})),title:i.title,latitude:null===(t=i.address)||void 0===t?void 0:t.lat,longitude:null===(n=i.address)||void 0===n?void 0:n.lng,terms_and_conditions:i.termsAndConditions,address:i.address?{street:i.address.street||"",district_id:i.address.pk}:void 0,deposit_percent:o.paid_deposit&&0!==o.deposit_percent?void 0:null!==(r=i.depositPercent)&&void 0!==r?r:void 0,deposit_expire_date:o.paid_deposit&&0!==o.deposit_percent?void 0:(0,m.hC)(i.depositExpiryDate),allowed_offline_payment:i.allowedInPersonPayment,allowed_online_payment:i.allowedOnlinePayment,work_materials:E(i.materials),invoice_expire_date:a?(0,m.hC)(i.invoiceExpiryDate):void 0,digital_signature_required:o.citizen_accept_date?void 0:i.withDigitalSignature,account_name:c,account_number:u?(0,v.Bv)(u,_.Lm):void 0,bsb:d?(0,v.Bv)(d,x.Kf):void 0,merchant_fee_pays_role:i.merchantFeePayer,attachments:i.files.map((function(e){return e.id}))},a)},E=function(e){return e.map((function(e){var t,n,r;return{name:e.name,description:e.description,cost:e.cost.toString(),payment_type:(null===(t=e.payment_type)||void 0===t?void 0:t.returnValue)||"one-time",quantity:e.quantity,tax_type:(null===(n=e.tax_type)||void 0===n?void 0:n.returnValue)||"no tax",unit:(null===(r=e.unit)||void 0===r?void 0:r.returnValue)||"pieces"}}))},F=function(e){var t,n,r,i,o,a=e.formData,l=e.isQuote,c=e.creatorId;return(0,g.uj)({job_type_ids:(0,s.Z)(a.subcategoryMap.values()).map((function(e){return e.returnValue.pk})),attachments_ids:a.files.map((function(e){return e.id})),address:{district_id:null===(t=a.address)||void 0===t?void 0:t.pk,street:null===(n=a.address)||void 0===n?void 0:n.street},latitude:null===(r=a.address)||void 0===r?void 0:r.lat,longitude:null===(i=a.address)||void 0===i?void 0:i.lng,user_role:"citizen",creator_id:c,need_quota:l,expires_date:(null===(o=a.urgency)||void 0===o?void 0:o.date.toISOString())||null,title:a.title,description:a.description,price:a.price})}},64726:function(e,t,n){"use strict";n.d(t,{X:function(){return B}});var r=n(98788),i=n(70865),o=n(96670),a=n(87394),s=n(5163),l=n(52322),c=n(72779),u=n.n(c),d=n(26361),p=n(18620),f=n(16830),h=n(95034),m=n(14179),v=n(80226),_=n(26297),x=n(2303),g=n(87461),b=n(91300),j=n(10744),y=n(95857),w=n(83899),C=n(35549),P=n(28510),k=n(48601),N=n(63955),S=n(57152),I=n(59517),Z=n(32894),D=n(6812),q=n(10520),T=n(59328),M=n.n(T),B=function(e){var t=e.popupId,n=(0,h.B)(),a=(0,m.o)().userStore,c=(0,C.O)().openErrorPopup,u=(0,N.cI)({mode:b.Z,resolver:(0,D.X)((0,k.Ry)().shape({email:j.f.email}))}),p=(0,N.cI)({mode:b.Z,resolver:(0,D.X)((0,k.Ry)().shape({phone:j.f.phone}))});n.setProps(t,(0,d.CZ)({contentStyle:{borderRadius:15},cross:"small"}));var f=function(){n.open({component:q.Z,props:{title:"We have now sent an invite to your customer. Once your customer registers they will appear in your 'My clients' list.",disableOutlineButton:!0,type:"success",buttonText:"Continue",buttonProps:{fw:"bold",w:"btn-w-md"}}},"replace-last")},_=function(){var e=(0,r.Z)((function(e){var t,n;return(0,s.__generator)(this,(function(r){switch(r.label){case 0:return t=e.email,[4,(0,g.Au)(a.userPk,t)];case 1:return(n=r.sent()).error?c(n.error):f(),[2]}}))}));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=(0,r.Z)((function(e){var t,n;return(0,s.__generator)(this,(function(r){switch(r.label){case 0:return t=e.phone,[4,(0,g.Vm)(a.userPk,t)];case 1:return(n=r.sent()).error?c(n.error):f(),[2]}}))}));return function(t){return e.apply(this,arguments)}}();return(0,l.jsxs)("div",{className:M().wrapper,children:[(0,l.jsx)("div",{className:M().megaTitle,children:"Invite Customers"}),(0,l.jsxs)("div",{className:M().container,children:[(0,l.jsx)(A,{}),(0,l.jsx)("form",{className:M().item,onSubmit:u.handleSubmit(_),children:(0,l.jsxs)(N.RV,(0,o.Z)((0,i.Z)({},u),{children:[(0,l.jsx)("div",{className:M().title,children:"Invite by email"}),(0,l.jsx)(S.U,(0,i.Z)({wrapperClassName:M().input,required:!1,placeholder:"example@email.com",name:"email"},(0,v.vT)({height:48,brColor:"#CBD2E0"}))),(0,l.jsx)(I.M,{className:M().btn,br:"sm-md",w:"custom",fw:"bold",children:"Send Invite"})]}))}),(0,l.jsx)("form",{className:M().item,onSubmit:p.handleSubmit(x),children:(0,l.jsxs)(N.RV,(0,o.Z)((0,i.Z)({},p),{children:[(0,l.jsx)("div",{className:M().title,children:"Invite by SMS"}),(0,l.jsx)(Z.s,(0,i.Z)({name:"phone",required:!1,wrapperClassName:M().input,placeholder:"0433 123 456"},(0,v.vT)({height:48,brColor:"#CBD2E0"}))),(0,l.jsx)(I.M,{className:M().btn,br:"sm-md",w:"custom",fw:"bold",children:"Send Invite"})]}))})]})]})},A=function(){var e,t,n=function(e){var t=(0,x.Z)("tradie-page-invite-link-".concat(e),(function(){return(0,g.ly)(e)})),n=t.data,r=(0,_.Z)(t,["data"]);return(0,i.Z)({inviteLink:n},r)}((0,m.o)().userStore.userPk),r=n.inviteLink,s=n.isLoading,c=(0,y.V)(null===r||void 0===r||null===(e=r.error)||void 0===e?void 0:e.message,{}),d=c.wrapperProps,h=c.renderError,b=(0,a.Z)((0,P.r)((function(){var e;(0,w.v)((null===r||void 0===r||null===(e=r.data)||void 0===e?void 0:e.url)||"")}),1500),2),j=b[0],C=b[1];return(0,l.jsxs)("div",(0,o.Z)((0,i.Z)({},d),{className:u()(M().item,d.className),children:[(0,l.jsx)("div",{className:M().title,children:"Invite link"}),(0,l.jsxs)("div",{className:M().input,children:[(0,l.jsx)(p.I,(0,i.Z)({value:null===r||void 0===r||null===(t=r.data)||void 0===t?void 0:t.url,disabled:!0,wrapperClassName:u()(s&&M().skeleton)},(0,v.vT)({height:48,brColor:"#A7A7A7",bgColor:"#C6C6C6",color:"#5E5E5E"}))),h()]}),(0,l.jsx)(f.z,{className:M().btn,w:"custom",br:"sm-md",fw:"bold",onClick:j,color:C?"green-filled":"blue",children:"Copy Link"})]}))}},97887:function(e,t,n){"use strict";n.d(t,{r:function(){return g}});var r,i=n(98788),o=n(5163),a=n(52322),s=n(26361),l=n(49971),c=n(95034),u=n(85621),d=n(14179),p=n(9576),f=n(2784),h=n(23536);function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(this,arguments)}var v=function(e){return f.createElement("svg",m({width:176,height:71,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=f.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m93.094 12.582-9.902 2.182V6.52l9.902-2.142v8.205Zm20.594 4.568c-3.866 0-6.352 1.859-7.733 3.152l-.512-2.506h-8.68v47.128l9.863-2.142.039-11.438c1.421 1.05 3.512 2.546 6.983 2.546 7.062 0 13.492-5.82 13.492-18.633-.039-11.721-6.549-18.107-13.452-18.107Zm-2.367 27.848c-2.327 0-3.708-.85-4.655-1.9l-.039-14.995c1.026-1.172 2.446-1.98 4.694-1.98 3.59 0 6.076 4.122 6.076 9.417 0 5.416-2.446 9.458-6.076 9.458Zm46.906-9.337c0-10.347-4.892-18.511-14.241-18.511-9.39 0-15.07 8.164-15.07 18.43 0 12.166 6.706 18.31 16.332 18.31 4.694 0 8.245-1.092 10.928-2.627v-8.084c-2.683 1.374-5.76 2.223-9.666 2.223-3.826 0-7.219-1.374-7.653-6.144h19.291c0-.222.014-.725.03-1.305l.001-.005v-.002c.022-.792.048-1.726.048-2.285Zm-19.489-3.838c0-4.567 2.722-6.467 5.208-6.467 2.406 0 4.97 1.9 4.97 6.467h-10.178ZM83.192 17.836h9.902v35.366h-9.902V17.836Zm-11.242 0 .631 2.992c2.328-4.366 6.944-3.476 8.206-2.991v9.296c-1.223-.445-5.168-1.01-7.496 2.102v23.968H63.43V17.836h8.521ZM52.855 9.066l-9.626 2.101-.04 32.375c0 5.982 4.38 10.388 10.218 10.388 3.236 0 5.603-.606 6.904-1.334V44.39c-1.262.526-7.495 2.385-7.495-3.597V26.445h7.495v-8.61h-7.495l.04-8.77ZM29.541 25.92c-2.09 0-3.353.607-3.353 2.183 0 1.721 2.173 2.478 4.868 3.417 4.394 1.532 10.177 3.547 10.202 11.012 0 7.235-5.642 11.398-13.847 11.398-3.393 0-7.101-.687-10.77-2.304v-9.62c3.314 1.86 7.496 3.234 10.77 3.234 2.21 0 3.787-.606 3.787-2.465 0-1.907-2.355-2.778-5.198-3.83-4.33-1.602-9.793-3.623-9.793-10.357 0-7.154 5.326-11.438 13.334-11.438 3.275 0 6.51.525 9.784 1.859v9.498c-2.998-1.657-6.786-2.587-9.784-2.587Z",fill:"#6461FC"})))},_=n(16255),x=n.n(_),g=function(){var e=(0,c.B)(),t=(0,p.A)(),n=(0,u.X)().isMobile,r=(0,d.o)().userStore,m=(0,f.useState)(!1),_=m[0],g=m[1],b=(0,f.useState)(null),j=b[0],y=b[1];e.setProps(t.id,(0,s.CZ)({cross:"small"}));var w=function(){var e=(0,i.Z)((function(){var e,t,n,i,a;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:return(null===(e=r.user)||void 0===e||null===(t=e.stripe_account)||void 0===t?void 0:t.url)?(y(null),g(!0),[4,(0,h.hA)()]):[3,2];case 1:n=o.sent(),i=n.error,(a=n.data)?window.open(a,"_blank"):y(i),g(!1),o.label=2;case 2:return[2]}}))}));return function(){return e.apply(this,arguments)}}();return(0,a.jsxs)("div",{className:x().wrapper,children:[(0,a.jsx)("div",{className:x().title,children:"Connect stipe"}),(0,a.jsx)("div",{className:x().icon,children:(0,a.jsx)(v,{})}),(0,a.jsx)("div",{className:x().secondTitle,children:"Accept card payments"}),(0,a.jsxs)("div",{className:x().description,children:["Accept credit card payments and payments from other popular platforms and systems using Stripe.","\n\n","Stripe is a secure payment platform, trusted by over a million businesses around the world.","\n\n"]}),(0,a.jsxs)("ul",{className:x().benefits,children:[(0,a.jsx)("li",{className:x().benefit,children:"Make payments simple and secure"}),(0,a.jsx)("li",{className:x().benefit,children:"Accept payments online or in person"}),(0,a.jsx)("li",{className:x().benefit,children:"Fast and easy to set up"})]}),(0,a.jsx)(l.a,{className:x().buttons,buttonText:"Connect with Stripe",outlinedButtonText:"Learn more",order:"reversed",columnGap:"space-between",buttonProps:{w:"btn-w-full",onClick:w,loading:_},outlinedButtonProps:{w:"btn-w-full",onClick:function(){return window.open("https://stripe.com/connect","_blank")}},orientation:n?"vertical":"horizontal"}),j&&(0,a.jsx)("p",{className:x().error,children:j.message})]})}},72649:function(e,t,n){"use strict";n.d(t,{T:function(){return j}});var r,i=n(52322),o=n(2784),a=n(54564),s=n(16830),l=n(95034),c=n(9576),u=n(26361),d=n(87394),p=n(18620);function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}var h=function(e){return o.createElement("svg",f({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=o.createElement("path",{d:"M5.503 4.627 5.5 6.75v10.504a3.25 3.25 0 0 0 3.25 3.25h8.616a2.251 2.251 0 0 1-2.122 1.5H8.75A4.75 4.75 0 0 1 4 17.254V6.75c0-.98.627-1.815 1.503-2.123ZM13.128 2c.597 0 1.17.237 1.592.66l4.618 4.62c.422.422.659.995.659 1.591v8.383a2.25 2.25 0 0 1-2.25 2.25H8.752a2.25 2.25 0 0 1-2.25-2.25V4.25A2.25 2.25 0 0 1 8.752 2h4.376ZM13 3.5H8.752a.75.75 0 0 0-.75.75v13.004c0 .414.336.75.75.75h8.995a.75.75 0 0 0 .75-.75V9.003H15.25a2.25 2.25 0 0 1-2.245-2.095L13 6.754V3.5Zm1.5 1.061.001 2.193c0 .38.282.693.648.743l.102.007 2.19-.001-2.94-2.942H14.5Z",fill:"#fff"})))},m=n(83899),v=n(28510),_=n(99128),x=n.n(_),g=function(e){var t=e.placeholder,n=e.value,r=(0,d.Z)((0,v.r)((function(){return(0,m.v)(n)}),1500),2),o=r[0],l=r[1];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.I,{withFloatingLabel:!0,floatingLabelFs:11,bgColor:"#f5f5f6",brRadius:5,floatingLabelOffset:"-4px",padding:"9px 15px",placeholderColor:"#3E6C99",placeholder:t,value:n,disabled:!0}),(0,i.jsxs)(s.z,{onClick:o,className:x().button,color:l?"green-filled":"lightblue",br:"sm",children:[(0,i.jsx)(h,{}),(0,i.jsx)(a.x,{fw:"700",text:l?"Copied":"Copy"})]})]})},b=n(79095),j=function(e){var t=e.accountName,n=e.accountNumber,r=e.bsb,d=e.onSuccess,p=(0,o.useState)(!1),f=p[0],h=p[1],m=(0,c.A)(),v=(0,l.B)();v.setProps(m.id,(0,u.CZ)({cross:"small"}));return(0,i.jsxs)("div",{className:x().wrapper,children:[(0,i.jsx)(a.x,{className:x().title,fs:"20",fw:"700",text:"Bank details"}),(0,i.jsxs)("div",{className:x().fields,children:[(0,i.jsx)(g,{placeholder:"Account name",value:t}),(0,i.jsx)(g,{placeholder:"BSB",value:r}),(0,i.jsx)(g,{placeholder:"Account number",value:n}),(0,i.jsx)(b.f,{onChange:function(e){return h(e.target.checked)},size:"sm",fs:"fs-md",children:"I confirm that I have paid"})]}),(0,i.jsx)(s.z,{onClick:function(){v.close(m.id),d()},disableOpacityOnDisabled:!0,disabled:!f,className:x().submitButton,br:"sm",children:"Continue"})]})}},42646:function(e,t,n){"use strict";n.d(t,{V:function(){return u}});var r=n(52322),i=n(19596),o=n(60354),a=n(27791),s=n.n(a),l=n(72779),c=n.n(l),u=function(e){var t=e.percent,n=e.expiryDate,a=e.amount,l=e.text,u=void 0===l?"Balance due":l,d=e.className;return(0,r.jsxs)("div",{className:c()(s().wrapper,d),children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:s().title,children:[u," ",void 0!==t&&"".concat(t,"%")]}),n&&(0,r.jsx)("div",{className:s().date,children:(0,o.C8)(n,"dd.mm.yyyy")})]}),(0,r.jsx)("div",{className:s().money,children:(0,i.Q)(a)})]})}},42173:function(e,t,n){"use strict";n.d(t,{Y:function(){return g}});var r,i=n(70865),o=n(96670),a=n(26297),s=n(52322),l=n(2784),c=n(72779),u=n.n(c);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d.apply(this,arguments)}var p,f=function(e){return l.createElement("svg",d({width:21,height:21,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=l.createElement("path",{d:"M15.501 11.33h-4.166v4.167a.834.834 0 0 1-1.667 0v-4.166H5.501a.834.834 0 0 1 0-1.667h4.167V5.497a.833.833 0 1 1 1.667 0v4.167H15.5a.833.833 0 0 1 0 1.667Z",fill:"#000"})))};function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}var m=function(e){return l.createElement("svg",h({width:21,height:21,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),p||(p=l.createElement("path",{d:"M15.501 11.33h-10a.834.834 0 0 1 0-1.666h10a.833.833 0 0 1 0 1.667Z",fill:"#000"})))},v=n(60522),_=n(23089),x=n.n(_),g=(0,l.forwardRef)((function(e,t){var n=e.onChange,r=e.disabled,l=e.className,c=e.onWrapperClick,d=(0,a.Z)(e,["onChange","disabled","className","onWrapperClick"]),p=function(e){if(!r){var t=d.value||0,i="inc"===e?t+1:t-1;i<0||n(i)}};return(0,s.jsxs)("div",{className:u()(x().wrapper,l),onClick:c,children:[(0,s.jsx)("button",{disabled:r,className:x().block,onClick:function(){return p("dec")},children:(0,s.jsx)(m,{})}),(0,s.jsx)("div",{className:x().block,children:(0,s.jsx)(v.Y,(0,o.Z)((0,i.Z)({},d),{ref:t,color:"#6b7280",wrapperClassName:x().inputWrapper,inputClassName:x().input,height:20,disabled:r,onChange:function(e){r||n(e)}}))}),(0,s.jsx)("button",{disabled:r,className:x().block,onClick:function(){return p("inc")},children:(0,s.jsx)(f,{})})]})}));g.displayName="CounterButtonsWithInput"},59091:function(e,t,n){"use strict";n.d(t,{_:function(){return d}});var r=n(47842),i=n(52322),o=n(2784),a=n(72779),s=n.n(a),l=n(82864),c=n.n(l),u=n(65361),d=function(e){var t,n=e.className,a=e.iconClassName,l=e.hintClassName,d=e.triangleClassName,p=e.iconType,f=void 0===p?"base":p,h=e.title,m=e.description,v=(0,o.useState)(!1),_=v[0],x=v[1],g=(0,o.useState)(!1),b=g[0],j=g[1],y=(0,o.useRef)(null),w=function(){if(x(!0),y.current){var e=y.current.getBoundingClientRect(),t=e.left+e.width/2;j(t>window.innerWidth/2)}},C=function(){j(!1),x(!1)};return(0,i.jsxs)("div",{className:s()(c().wrapper,n,(0,r.Z)({},c().boldType,"bold"===f)),ref:y,children:[(0,i.jsx)(u.sz,{type:f,className:s()(c().icon,a),onMouseEnter:w,onMouseLeave:C,onTouchStart:w,onTouchEnd:C}),(0,i.jsxs)("div",{className:s()(c().hint,l,(t={},(0,r.Z)(t,c().showHint,_),(0,r.Z)(t,c().isHitntOnRight,b),t)),children:[(0,i.jsx)("div",{className:c().title,children:h}),(0,i.jsx)("div",{className:c().description,children:m}),(0,i.jsx)("div",{className:s()(c().triangle,d)})]})]})}},98653:function(e,t,n){"use strict";n.d(t,{w:function(){return p}});var r=n(70865),i=n(96670),o=n(26297),a=n(52322),s=n(2784),l=n(90581),c=function(){function e(t){(0,l.Z)(this,e),this.context=t,this.buffer=[],this.pointer=-1,this.ctx=t,this.save()}var t=e.prototype;return t.putImageData=function(e){this.ctx.putImageData(e,0,0)},t.save=function(){this.pointer++,this.buffer[this.pointer]=this.ctx.getImageData(0,0,this.ctx.canvas.width,this.ctx.canvas.height)},t.back=function(){this.pointer-1>=0&&(this.pointer--,this.putImageData(this.buffer[this.pointer]))},t.next=function(){this.pointer+1<=this.buffer.length-1&&(this.pointer++,this.putImageData(this.buffer[this.pointer]))},e}(),u=n(12516),d=n.n(u),p=function(e){var t=e.apiRef,n=e.wrapperRef,l=e.width,u=e.height,p=(0,o.Z)(e,["apiRef","wrapperRef","width","height"]),f=(0,s.useRef)(null),h=(0,s.useRef)(null);return(0,s.useLayoutEffect)((function(){if(f.current&&l&&u){var e=f.current,r=e.getContext("2d",{willReadFrequently:!0});if(h.current=r,r){e.width=l,e.height=u,r.strokeStyle="#000",r.lineWidth=3,r.lineCap="round",r.fillStyle="#fff",r.fillRect(0,0,e.width,e.height);var i,o,a=new c(r),s=function(e){var t,r;e?null===(t=n.current)||void 0===t||t.classList.add(d().overflow):null===(r=n.current)||void 0===r||r.classList.remove(d().overflow)};t.current={history:a,clear:function(){this.isBlank()||(r.fillRect(0,0,e.width,e.height),a.save())},getImage:function(t){var n=t.fileName;return new Promise((function(t,r){e.toBlob((function(e){if(e){var i=new File([e],n,{type:"image/jpeg"});t(i)}else r(new Error("Couldn't create an image"))}))}))},isBlank:function(){return!r.getImageData(0,0,r.canvas.width,r.canvas.height).data.some((function(e){return!e}))}};var p=!1,m=function(e){p=!0,i=e.offsetX,o=e.offsetY,s(!0)},v=function(e){p&&(r.beginPath(),r.moveTo(i,o),r.lineTo(e.offsetX,e.offsetY),r.stroke(),i=e.offsetX,o=e.offsetY)},_=function(){p&&(p=!1,a.save()),s(!1)},x=function(e){e.ctrlKey&&"z"===e.key&&a.back()};return document.addEventListener("keypress",x),document.addEventListener("pointerup",_),e.addEventListener("pointerdown",m),e.addEventListener("pointermove",v,{passive:!0,capture:!0}),function(){document.removeEventListener("keypress",x),document.removeEventListener("pointerup",_),e.removeEventListener("pointerdown",m),e.removeEventListener("pointermove",v,{capture:!0})}}}}),[t,l,u,n]),(0,a.jsx)("canvas",(0,i.Z)((0,r.Z)({},p),{style:{userSelect:"none"},ref:f,onTouchStart:function(e){return e.preventDefault()}}))}},53161:function(e,t,n){"use strict";n.d(t,{R:function(){return i}});var r=n(52322),i=function(e){var t=e.quoteId,n=e.isInvoice;return(0,r.jsxs)(r.Fragment,{children:[n?"INV-":"QUO-",t.toString().padStart(4,"0")]})}},17752:function(e,t,n){"use strict";n.d(t,{g:function(){return p},Z:function(){return d}});var r,i=n(52322),o=n(2784);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var s=function(e){return o.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:16,height:36,fill:"none"},e),r||(r=o.createElement("path",{d:"M16 .5H4a3 3 0 0 0-3 3v29a3 3 0 0 0 3 3h12",stroke:"#0071E0"})))},l=n(54564),c=n(41158),u=n.n(c),d=function(e){var t=e.by,n=e.fontFamily,r=t.trim();return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:u().wrapper,children:[(0,i.jsx)("div",{className:u().icon,children:(0,i.jsx)(s,{})}),(0,i.jsxs)("div",{className:u().info,children:[(0,i.jsx)(l.x,{className:u().label,trim:!0,fs:"12",text:"Signed by"}),(0,i.jsx)(l.x,{className:u().by,trim:!0,fw:"500",fs:"16",text:r||" ",style:{fontFamily:n}})]})]})})},p={families:["Dancing Script","Alex Brush","Satisfy","Italianno","Great Vibes","Pinyon Script","Mrs Saint Delafield","Zeyada","Herr Von Muellerhoff","Cookie","Arizonia","Tangerine","Inspiration","Mr Dafoe","Qwigley","Allura","Dawning of a New Day","Parisienne","Montez","Homemade Apple","Mr De Haviland"],getLink:function(){return(0,i.jsx)("link",{href:"https://fonts.googleapis.com/css2?family=Alex+Brush&family=Allura&family=Arizonia&family=Cookie&family=Dancing+Script:wght@500&family=Dawning+of+a+New+Day&family=Great+Vibes&family=Herr+Von+Muellerhoff&family=Homemade+Apple&family=Inspiration&family=Italianno&family=Montez&family=Mr+Dafoe&family=Mr+De+Haviland&family=Mrs+Saint+Delafield&family=Parisienne&family=Pinyon+Script&family=Qwigley&family=Satisfy&family=Tangerine&family=Zeyada&display=swap",rel:"stylesheet"})}}},90767:function(e,t,n){"use strict";n.d(t,{C:function(){return Oe}});var r,i=n(70865),o=n(96670),a=n(26297),s=n(52322),l=n(98788),c=n(87394),u=n(5163),d=n(2784),p=n(29947),f=n(1183),h=n(89609),m=(0,c.Z)((0,p.k)((function(e){var t=e.quote,n=e.isCitizen,r=e.buttonConfig,i=e.isInvoice,o=e.onQuoteUpdate,a=e.citizen,s=(0,d.useState)(null),c=s[0],p=s[1],m=(0,d.useState)(!1),v=m[0],_=m[1],x=(0,d.useState)(null),g=x[0],b=x[1],j=(0,f.z)(t.tradie).data,y=function(){var e=(0,l.Z)((function(e,n){var i,a;return(0,u.__generator)(this,(function(s){switch(s.label){case 0:return void 0===t.tradie||void 0===t.id?(p(new Error("No tradie or quote pk")),[2]):(p(null),_(!0),b(n||null),[4,(0,h.hv)(t.tradie,t.id,e)]);case 1:return(i=s.sent()).error?p(i.error):(o(i.data),null===r||void 0===r||null===(a=r.onSuccess)||void 0===a||a.call(r)),_(!1),b(null),[2]}}))}));return function(t,n){return e.apply(this,arguments)}}();return{buttonConfig:r,quote:t,isCitizen:n,isInvoice:i,patchQuote:y,error:c,setError:p,citizen:a,tradie:j,citizenPk:t.citizen,tradiePk:t.tradie,quotePk:t.id,isLoading:v,buttonLoading:g,onQuoteUpdate:o}}),"QuoteButtons"),2),v=m[0],_=m[1],x=n(16830),g={fw:"bold",w:"btn-w-full",br:"sm",h:"sm-md"},b=n(95034),j=n(42838),y=n(72779),w=n.n(y),C=n(54564),P=n(73664),k=n(14179),N=n(85750),S=n(96577),I=n.n(S),Z=n(98653),D=n(32730);function q(){return q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q.apply(this,arguments)}var T=function(e){return d.createElement("svg",q({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),r||(r=d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.5 12.9a2 2 0 0 0 0 2.828l3.858 3.858H4.086a1 1 0 1 0 0 2h16a1 1 0 1 0 0-2h-9.13l9.515-9.515a2 2 0 0 0 0-2.828L16.227 3a2 2 0 0 0-2.83 0L3.5 12.9Zm4.326-1.498-2.912 2.912 4.243 4.242 2.91-2.911-4.241-4.243ZM9.24 9.988l4.243 4.242 5.573-5.573-4.242-4.243L9.24 9.988Z",fill:"#0071E0"})))},M=n(58151),B=n(85621),A=n(82981),E=n.n(A),F=function(e){var t=e.wrapperRef,n=e.canvasApiRef,r=(0,B.X)().isMobile,i=(0,d.useState)(364),o=i[0],a=i[1];(0,D.B)((function(){if(t.current){var e=t.current,n=getComputedStyle(e).paddingLeft,r=parseFloat(n),i=e.getBoundingClientRect();a(i.width-2*r-2)}}));return(0,s.jsxs)("div",{className:E().wrapper,children:[(0,s.jsx)(Z.w,{className:E().drawer,apiRef:n,wrapperRef:t,width:o,height:r?170:364,style:{borderWidth:1}}),(0,s.jsx)("div",{className:E().img,children:(0,s.jsx)(I(),{src:"/images/digital-signature.png",width:58,height:58,alt:"digital-signature"})}),(0,s.jsxs)("div",{className:E().clear,onClick:function(){var e;return null===(e=n.current)||void 0===e?void 0:e.clear()},children:[(0,s.jsx)(T,{}),(0,s.jsx)(C.x,{text:"Clear",fs:"16",color:"blue"})]}),(0,s.jsxs)("div",{className:E().history,children:[(0,s.jsx)("div",{className:E().historyBtn,onClick:function(){var e;return null===(e=n.current)||void 0===e?void 0:e.history.back()},children:(0,s.jsx)(M.Z,{})}),(0,s.jsx)("div",{className:w()(E().historyBtn,E().rotate),onClick:function(){var e;return null===(e=n.current)||void 0===e?void 0:e.history.next()},children:(0,s.jsx)(M.Z,{})})]})]})},z=n(97729),V=n.n(z),O=n(17752),R=n(70393),L=n(63955),Q=n(78307),W=n.n(Q),H=function(){var e=(0,L.qo)(),t=e.fullName,n=void 0===t?"":t,r=e.initials,i=void 0===r?"":r,o=e.fontData,a=(0,L.Gc)().setValue,l=function(e,t){return e!==(null===o||void 0===o?void 0:o.family)||!t||o.isFullName},c=function(e,t){a("fontData",{family:e,isFullName:t})};return(0,s.jsxs)("div",{className:W().wrapper,children:[(0,s.jsx)(V(),{children:O.g.getLink()}),O.g.families.map((function(e,t){return(0,s.jsxs)("div",{className:W().item,children:[(0,s.jsxs)("label",{className:W().sign,onClick:function(){return c(e,!0)},children:[(0,s.jsx)(R.E,{name:"sign",defaultChecked:l(e,!0)}),(0,s.jsx)(O.Z,{by:n,fontFamily:e})]}),(0,s.jsxs)("label",{className:W().sign,onClick:function(){return c(e,!1)},children:[(0,s.jsx)(R.E,{name:"sign",defaultChecked:l(e,!1)}),(0,s.jsx)(O.Z,{by:i,fontFamily:e})]})]},t)}))]})},G=n(9576),U=n(26361),X=n(72833),K=n(90868),Y=n(59517),J=n(34514),$=n(54093),ee=n.n($),te=n(25522),ne=n(48238),re=n(32689),ie=n(94261),oe=n(85735),ae=n.n(oe),se=function(e){var t=e.signature;return(null===t||void 0===t?void 0:t.signature)?(0,s.jsx)(ie.E,{src:(0,N.Gr)(t.signature),width:"100%",height:"auto",objectFit:"contain",alt:"digital-signature"}):(0,s.jsx)(C.x,{className:ae().placeholder,fs:"15",children:"You haven't created any digital signature yet"})},le=n(623),ce=function(e){var t=e.onSuccess,n=(0,k.o)().userStore,r=(0,d.useRef)(null),a=(0,b.B)(),c=(0,G.A)();a.setProps(c.id,(0,U.CZ)());var p=(0,d.useRef)(null),f=(0,L.cI)({defaultValues:{fullName:(0,N.Pp)(n.user),initials:(0,N.Pp)(n.user).split(" ").map((function(e){var t;return(null===(t=e.at(0))||void 0===t?void 0:t.toUpperCase())||""})).join(""),fontData:void 0,mode:"choose"}}),h=f.handleSubmit,m=f.watch,v=f.setValue,_=f.getValues,x=f.setError,g=m("mode"),y=(0,re.l)((function(){return e=n.userPk,te.Ad.get("/users/".concat(e,"/digital-signature/"));var e})),S=y.isLoading,I=y.data,Z=[{mode:"choose",text:"Choose"},{mode:"write",text:"Write"},{mode:"used-before",text:"Used before",isLoading:S}],D=function(e){var t=e.family,n=e.isFullName;return new Promise((function(e,r){var i=document.createElement("canvas"),o=i.getContext("2d");if(o){var a=_(),s=a.fullName,l=a.initials,c=n?s:l;i.width=100+25*c.length,i.height=125,o.font="15px Encode Sans",o.fillText("Signed by",.1*i.width,.2*i.height),o.font="36px ".concat(t),o.textAlign="center",o.textBaseline="middle",o.fillText(c,i.width/2,i.height/2,i.width),i.toBlob((function(t){if(t){var n=new File([t],"signature.jpg",{type:"image/jpeg"});e(n)}else r(new Error("Couldn't create an image"))}))}}))},q=function(){if(!p.current)return null;var e=p.current;return e.isBlank()?null:e.getImage({fileName:"signature.jpg"})},T=function(){var e=(0,l.Z)((function(e){var t;return(0,u.__generator)(this,(function(r){switch(r.label){case 0:return[4,(0,ne.ku)(e)];case 1:return(t=r.sent()).error?[2,t]:[4,(i=n.userPk,o={signature_id:+t.data.id},te.Ad.post("/users/".concat(i,"/digital-signature/"),o))];case 2:return[2,r.sent()]}var i,o}))}));return function(t){return e.apply(this,arguments)}}(),M=function(){var e=(0,l.Z)((function(e){var n,r,i,o,s,l,d;return(0,u.__generator)(this,(function(u){switch(u.label){case 0:if(n=e.mode,r=e.fontData,"used-before"===n)return(null===I||void 0===I?void 0:I.signature)?(t(+I.signature.id),a.close(c.id)):x("root",{message:"No signature was selected"}),[2];u.label=1;case 1:return u.trys.push([1,7,,8]),i=null,"choose"===n&&r?[4,D(r)]:[3,3];case 2:return i=u.sent(),[3,5];case 3:return"write"!==n?[3,5]:[4,q()];case 4:i=u.sent(),u.label=5;case 5:return i?[4,T(i)]:(x("root",{message:"Couldn't create an image"}),[2]);case 6:return o=u.sent(),s=o.error,l=o.data,s||!l.signature?x("root",{message:(null===s||void 0===s?void 0:s.message)||"No digital signature"}):(a.close(c.id),t(+l.signature.id)),[3,8];case 7:return d=u.sent(),x("root",{message:(0,j.Z)(d,Error)?d.message:J._W}),[3,8];case 8:return[2]}}))}));return function(t){return e.apply(this,arguments)}}();return(0,s.jsx)("form",{className:ee().wrapper,ref:r,onSubmit:h(M),children:(0,s.jsxs)(L.RV,(0,o.Z)((0,i.Z)({},f),{children:[(0,s.jsx)(C.x,{className:ee().title,fs:"20",fw:"700",centered:!0,text:"Create your digital signature"}),(0,s.jsxs)("div",{className:ee().inputs,children:[(0,s.jsx)(X.o,{name:"fullName",placeholder:"Full name"}),(0,s.jsx)(X.o,{name:"initials",placeholder:"Initials"})]}),(0,s.jsx)("div",{className:ee().tabs,children:Z.map((function(e,t){return(0,s.jsxs)("div",{className:w()(ee().tab,e.mode===g&&ee().selected),children:[(0,s.jsx)(C.x,{color:"blue",fs:"14",fw:"500",onClick:function(){return function(e){e.isLoading||v("mode",e.mode)}(e)},text:e.text}),e.isLoading&&(0,s.jsx)(le.$,{w:11,h:11})]},t)}))}),(0,s.jsxs)(P.R,{children:["choose"===g&&(0,s.jsx)(H,{}),"used-before"===g&&!S&&(0,s.jsx)(se,{signature:I})]}),"write"===g&&(0,s.jsx)(F,{wrapperRef:r,canvasApiRef:p}),(0,s.jsx)(C.x,{className:ee().hint,fs:"10",children:"By clicking Save, I agree that the signature and initials will be the electronic representation of my signature and initials for all purposes when I (or my agent) use them on envelopes, including legally binding contracts - just the same as a pen-and-paper signature or initial."}),(0,s.jsx)(K.j,{isStatic:!0}),(0,s.jsx)(Y.M,{className:ee().saveBtn,br:"sm",w:"btn-w-md",fw:"bold",children:"Save"})]}))})},ue=function(){var e=_(),t=e.patchQuote,n=e.buttonLoading,r=e.quote,a=(0,b.B)(),l=function(e){t({status:"accept",digital_signature_citizen_id:e},"accept")};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x.z,(0,o.Z)((0,i.Z)({},g),{color:"danger",onClick:function(){return t({status:"canceled"},"decline")},disableOpacityOnDisabled:!0,disabled:"accept"===n,loading:"decline"===n,children:"Decline"})),(0,s.jsx)(x.z,(0,o.Z)((0,i.Z)({},g),{color:"green-filled",onClick:function(){r.digital_signature_required?a.open({component:ce,props:{onSuccess:l}}):t({status:"accept"},"accept")},disableOpacityOnDisabled:!0,disabled:"decline"===n,loading:"accept"===n,children:"Accept"}))]})},de=function(){var e=_(),t=e.patchQuote,n=e.isLoading;return(0,s.jsx)(x.z,(0,o.Z)((0,i.Z)({},g),{loading:n,onClick:function(){return t({status:"pending_payment"})},children:"Generate Invoice"}))},pe=function(){var e=_(),t=e.isLoading,n=e.patchQuote;return(0,s.jsx)(x.z,(0,o.Z)((0,i.Z)({},g),{color:"green-filled",onClick:function(){return n({deposit_received:!0})},loading:t,children:"Confirm that deposit received"}))},fe=n(56519),he=function(){var e=(0,b.B)(),t=_(),n=t.quote,r=t.isCitizen,a=t.citizen,l=t.isInvoice,c=t.onQuoteUpdate,u=function(t){c(t),e.close(fe.P)};return(0,s.jsx)(x.z,(0,o.Z)((0,i.Z)({},g),{color:"transparent",brColor:"blue",onClick:function(){n&&a&&e.open({component:fe.P,props:{isCitizen:r,onSuccess:u,isEdit:!0,isInvoice:l,initialData:{subcategoryPks:n.job_type_ids.map((function(e){return e.pk})),quote:n,address:n.address||void 0,lat:n.latitude,lon:n.longitude,user:{pk:a.customer.pk,name:(0,N.Pp)(a.customer)}}}})},children:"Edit"}))},me=n(29880),ve=n.n(me),_e=function(){var e=_().error;return e?(0,s.jsx)("div",{className:ve().error,children:e.message}):null},xe=function(){var e,t=(0,b.B)(),n=_(),r=n.buttonConfig,a=n.tradiePk,c=n.isCitizen,d=n.quote,p=n.citizen,f=n.citizenPk,h=n.onQuoteUpdate,m=function(){var e=(0,l.Z)((function(e){var n,i;return(0,u.__generator)(this,(function(o){switch(o.label){case 0:return[4,null===r||void 0===r||null===(n=r.createQuoteButton)||void 0===n||null===(i=n.onSuccess)||void 0===i?void 0:i.call(n)];case 1:return o.sent(),h(e),t.close(fe.P),[2]}}))}));return function(t){return e.apply(this,arguments)}}();return(0,s.jsx)(x.z,(0,o.Z)((0,i.Z)({},g),{onClick:function(){t.open({component:fe.P,props:{isCitizen:c,isEdit:!1,onSuccess:m,citizenPk:f,tradiePk:a,initialData:d?{subcategoryPks:d.job_type_ids.map((function(e){return e.pk})),quote:d,user:{pk:d.citizen,name:(0,N.Pp)(null===p||void 0===p?void 0:p.customer)},address:d.address||void 0,lat:d.latitude,lon:d.longitude}:void 0}})},children:(null===r||void 0===r||null===(e=r.createQuoteButton)||void 0===e?void 0:e.text)||(c?"Get a quote":"Create a quote")}))};xe.displayName="GetQuoteButton";var ge=n(46874),be=n(9824),je=function(){var e=_(),t=e.isLoading,n=e.tradie,r=e.quotePk,a=e.quote,c=e.citizenPk,p=e.citizen,f=e.isCitizen,h=e.onQuoteUpdate,m=(0,b.B)(),v=(0,d.useState)(!0),j=v[0],y=v[1],w=function(){var e=(0,l.Z)((function(e){var t;return(0,u.__generator)(this,(function(s){switch(s.label){case 0:return(null===n||void 0===n?void 0:n.pk)?[4,(0,be.Zu)({from_user_id:f?c:+n.pk,from_user_role:f?"citizen":"tradie",mark:e.rating,external_quote_id:+r,text:e.text,to_user_id:f?+n.pk:c})]:[2,"No tradie pk"];case 1:return(null===(t=s.sent())||void 0===t?void 0:t.error)?[2,t.error.message]:(h((0,o.Z)((0,i.Z)({},a),{citizen_write_review:!!f||a.citizen_write_review,tradie_write_review:!f||a.tradie_write_review})),y(!1),[2,null])}}))}));return function(t){return e.apply(this,arguments)}}();return j?(0,s.jsx)(x.z,(0,o.Z)((0,i.Z)({},g),{color:"green-filled",onClick:function(){m.open({component:ge.o,props:{userSettings:{name:(0,N.Pp)(f?n:null===p||void 0===p?void 0:p.customer),avatarSrc:(0,N.Gr)(f?null===n||void 0===n?void 0:n.main_photo:null===p||void 0===p?void 0:p.customer.main_photo),isBusiness:!1},taskPrice:a.total_price,taskTitle:a.title,onSubmit:w}})},loading:t,children:"Leave a review"})):null},ye=n(47842),we=n(42646),Ce=n(53022),Pe=n(10438),ke=n(69246),Ne=n(70019),Se=n(72649),Ie=n(60892),Ze=n.n(Ie),De=function(e){var t=e.quote,n=e.onSuccess,r=(0,b.B)(),i=(0,d.useRef)(null),o=(0,d.useState)(null),a=o[0],c=o[1],p=(0,d.useState)(!1),f=p[0],m=p[1],v=(0,ke.V)({amount:+t.total_price,paypal:{intent:"authorize",buttonPlaceRef:i},onError:function(e){return c(new Error(e))}}),_=v.withStripe,x=v.isStripeLoading,g=v.paypalLoaded,j=function(){var e=(0,l.Z)((function(e){var r,i;return(0,u.__generator)(this,(function(o){switch(o.label){case 0:return f?[2]:(m(!0),r=!t.deposit_received,[4,(0,h.hv)(t.tradie,t.id,r?{deposit_payment_type:e}:{quote_payment_type:e})]);case 1:return(i=o.sent()).error?c(i.error):(n(i.data),c(null)),m(!1),[2]}}))}));return function(t){return e.apply(this,arguments)}}();return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:Ze().title,children:"Payment"}),(0,s.jsx)(we.V,{className:Ze().balanceDue,amount:t.deposit_received?Ne.R.getRestCost(t):Ne.R.getDepositCost(t),expiryDate:t.deposit_received?t.invoice_expire_date:t.deposit_expire_date,percent:t.deposit_received?void 0:t.deposit_percent,text:t.deposit_received?"Balance due":"Deposit due"}),(0,s.jsx)("div",{className:Ze().paymentOptionText,children:"Select payment option"}),f&&(0,s.jsx)(le.$,{className:Ze().spinner}),(0,s.jsxs)("div",{className:Ze().buttons,children:[t.allowed_online_payment&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Ce.B,{onClick:function(){_((0,l.Z)((function(){var e,n,r;return(0,u.__generator)(this,(function(i){switch(i.label){case 0:return[4,(0,h.WO)(t.tradie,t.id,"stripe",{from_balance:!1})];case 1:return[2,{error:(r=i.sent()).error?r.error.message:null,data:{fromBalance:!1,id:null===(e=r.data)||void 0===e?void 0:e.SESSION_ID,url:null===(n=r.data)||void 0===n?void 0:n.SESSION_URL}}]}}))})))},loading:x})}),(0,s.jsx)(Ce.B,{type:"bank-deposit",onClick:function(){var e=t.account_name,n=t.account_number,i=t.bsb;r.open({props:{accountName:e,accountNumber:n,bsb:i,onSuccess:function(){return j("bank_deposit")}},component:Se.T})}}),t.allowed_offline_payment&&(0,s.jsx)(Ce.B,{type:"in-person",onClick:function(){return j("pay_in_person")}})]}),a&&(0,s.jsx)("p",{className:Ze().error,children:a.message}),(0,s.jsx)(Pe.l,{className:w()(Ze().paypalPlace,(0,ye.Z)({},Ze().loaded,g)),ref:i})]})},qe=(0,U.CZ)({cross:"long",contentStyle:{borderRadius:15,fontFamily:"Encode Sans"}}),Te=n(51373),Me=n.n(Te),Be=function(e){var t=e.popupId,n=(0,a.Z)(e,["popupId"]);return(0,b.B)().setProps(t,qe),(0,s.jsx)("div",{className:Me().wrapper,children:(0,s.jsx)(De,(0,i.Z)({},n))})},Ae=function(){var e=_(),t=e.setError,n=e.quote,r=e.isLoading,a=e.buttonConfig,l=(0,b.B)();return(0,s.jsx)(x.z,(0,o.Z)((0,i.Z)({},g),{color:"green-filled",loading:r,onClick:function(){if(n)var e=l.open({component:Be,props:{quote:n,onSuccess:function(){var t,n;l.close(e),null===a||void 0===a||null===(t=a.payButton)||void 0===t||null===(n=t.onSuccess)||void 0===n||n.call(t)}}});else t(new Error("No quote"))},children:"Pay"}))},Ee=function(){var e=(0,b.B)(),t=_(),n=t.quote,r=t.isLoading,a=t.setError,l=t.buttonConfig;return(0,s.jsx)(x.z,(0,o.Z)((0,i.Z)({},g),{color:"green-filled",loading:r,onClick:function(){if(n)var t=e.open({component:Be,props:{quote:n,onSuccess:function(){var n,r;e.close(t),null===l||void 0===l||null===(n=l.payDepositButton)||void 0===n||null===(r=n.onSuccess)||void 0===r||r.call(n)}}});else a(new Error("No quote"))},children:"Pay Deposit"}))},Fe=function(){var e=_(),t=e.isLoading,n=e.patchQuote;return(0,s.jsx)(x.z,(0,o.Z)((0,i.Z)({},g),{onClick:function(){return n({quote_payment_received:!0})},loading:t,color:"green-filled",children:"Payment received"}))},ze=function(){var e=_(),t=e.isLoading,n=e.patchQuote;return(0,s.jsx)(x.z,(0,o.Z)((0,i.Z)({},g),{color:"green-filled",loading:t,onClick:function(){return n({status:"pending_payment"})},children:"Task is Done"}))},Ve=function(e){return"borisdoes.com.au"===e.domain},Oe=function(e){var t=e.isCitizen,n=e.buttonConfig,r=e.quote,l=e.renderButtons,c=e.isInvoice,u=e.buttons,d=e.citizen,p=(0,a.Z)(e,["isCitizen","buttonConfig","quote","renderButtons","isInvoice","buttons","citizen"]),f=null,h="none",m=Ne.R.isMeeting(r),_=function(e){return!u||u.includes(e)};if("freshest"===r.state)if(t)r.sent_quote&&"canceled"!==r.status?r.sent_quote&&!r.citizen_accept_date&&_("accept-decline")?(f=(0,s.jsx)(ue,{}),h="accept-decline"):"pending_payment"===r.status?r.paid_deposit||r.deposit_payment_type||!_("pay-deposit")?r.deposit_received&&!r.paid_quote&&!r.quote_payment_type&&_("pay")&&(f=(0,s.jsx)(Ae,{}),h="pay"):(f=(0,s.jsx)(Ee,{}),h="pay-deposit"):Ve(d)&&"completed"===r.status&&!r.citizen_write_review&&_("leave-review")&&(f=(0,s.jsx)(je,{})):f=null;else{var x="pending_payment"===r.status&&(r.paid_deposit||r.paid_quote)||"completed"===r.status;"canceled"===r.status?f=null:(m||"quote_request"===r.status&&!r.sent_quote)&&_("get-quote")?(f=(0,s.jsx)(xe,{}),h="get-quote"):"pending_payment"===r.status&&!r.deposit_received&&(r.paid_deposit||r.invoice_only)&&_("deposit-received")?f=(0,s.jsxs)(s.Fragment,{children:[!x&&_("edit")&&(0,s.jsx)(he,{}),(0,s.jsx)(pe,{})]}):"pending_payment"===r.status&&!r.quote_payment_received&&(r.paid_quote||r.invoice_only)&&_("payment-received")?f=(0,s.jsxs)(s.Fragment,{children:[!x&&_("edit")&&(0,s.jsx)(he,{}),(0,s.jsx)(Fe,{})]}):"inprogress"===r.status&&_("task-done")?(f=(0,s.jsxs)(s.Fragment,{children:[!x&&_("edit")&&(0,s.jsx)(he,{}),(0,s.jsx)(ze,{})]}),h="task-done"):!r.sent_invoice&&_("create-invoice")?f=(0,s.jsxs)(s.Fragment,{children:[!x&&_("edit")&&(0,s.jsx)(he,{}),(0,s.jsx)(de,{})]}):("completed"===r.status||"pending_payment"===r.status)&&r.deposit_received||x||!_("edit")?Ve(d)&&"completed"===r.status&&!r.tradie_write_review&&_("leave-review")&&(f=(0,s.jsx)(je,{})):(f=(0,s.jsx)(he,{}),h="edit")}return f?(0,s.jsxs)(v,(0,o.Z)((0,i.Z)({isCitizen:t,quote:r,buttonConfig:n,isInvoice:c,citizen:d},p),{children:[(null===l||void 0===l?void 0:l(f,{type:h}))||f,(0,s.jsx)(_e,{})]})):null}},8294:function(e,t,n){"use strict";n.d(t,{Ig:function(){return u},Ll:function(){return m},PN:function(){return v},eD:function(){return d},fq:function(){return p},kn:function(){return h},lU:function(){return l},mV:function(){return _},pV:function(){return c}});var r=n(87394),i=n(34514),o=n(41156),a=n(60687),s=n(48601),l="0",c={fw:"bold",w:"btn-w-full",br:"sm"},u=(0,a.U)(11,(function(e){return(10*e).toString()})),d=["10"],p=5e3,f=(0,s.IX)().of((0,s.Ry)().shape({description:(0,s.Z_)().required(),cost:(0,s.Rx)().required().min(1),name:(0,s.Z_)().required(),quantity:(0,s.Rx)().required().min(1),tax_type:(0,s.Ry)().required().nonNullable(),unit:(0,s.Ry)().required().nonNullable()})),h=(0,s.Ry)().shape({depositPercent:(0,s.Z_)(),depositExpiryDate:(0,s.hT)().when(["depositPercent"],(function(e,t){return(0,r.Z)(e,1)[0]===l?t.nullable():t.required()})),description:(0,s.Z_)(),materials:f,allowedInPersonPayment:(0,s.O7)(),allowedOnlinePayment:(0,s.O7)(),withDigitalSignature:(0,s.O7)(),invoiceExpiryDate:(0,s.hT)(),merchantFeePayer:(0,s.Z_)(),termsAndConditions:(0,s.Z_)(),bankDetails:(0,s.Ry)().nullable().shape({accountName:(0,s.Z_)().required(),accountNumber:(0,s.Z_)().required().length(o.Lm.length),bsb:(0,s.Z_)().required().length(i.Kf.length)})}),m=(0,s.Ry)().shape({description:(0,s.Z_)(),materials:f,termsAndConditions:(0,s.Z_)(),urgency:(0,s.nK)().nonNullable().required()}),v="These terms and conditions apply to the provision of services by the \u201cService Provider\u201d (referenced in the header section of the quote) to the \u201cCustomer\u201d (referenced in the customer section of the quote). By accepting quote, the Customer agrees to be bound by these terms and conditions\n\nServices\n\nThe Service Provider agrees to provide products or services to the Customer, as described in the quote. The description will include specific details, scope, and duration of the products or services to be provided.\n\nPayment\n\na) Following acceptance of the quote and these Terms and Conditions, the Service Provider will issue the Customer with an invoice for any amount specified as a deposit. The Customer agrees to pay the Service Provider the total amount specified in the quote as a deposit, including any applicable taxes or fees. For products or services valued at more than $5,000, a maximum 10% deposit can be requested.\n\nb) Following payment of any applicable deposit, the Service Provider will commence provision of products or services in accordance with the quote.\n\nc) The Service Provider reserves the right to suspend or terminate the provision of products or services if deposit payment is not received within the specified time frame.\n\nd) Following provision of products or services, the Service Provider will issue the Customer with an invoice for the balance of any amount owed, less any deposit paid in the manner described above.\n\ne) Any variation from the original quote must be agreed to by the Customer, by way of a newly issued and accepted quote.\n\nf) Payment shall be made within 14 days from the date of the invoice. Late payments may be subject to additional charges or interest as determined by the Service Provider.\n\nIntellectual Property\n\na) The Service Provider retains all intellectual property rights, including but not limited to copyrights, patents, and trademarks, related to any materials or deliverables created as part of the delivery of products or services.\n\nb) The Customer agrees not to reproduce, modify, distribute, or use any intellectual property belonging to the Service Provider without obtaining prior written consent.\n\nLimitation of Liability\n\na) The Service Provider shall not be liable for any indirect, incidental, special, or consequential damages arising out of or in connection with the provision of products and services.\n\nb) The Service Provider's liability for any claim related to the provision of products or services, shall be limited to the total amount paid by the Customer for the products or services specified in the quote to which these Terms and Conditions apply.\n\nConsumer Protection\n\na) The Customer shall be afforded all rights and entitlements provided for by consumer protection legislation and regulations in the state or territory in which products or services are to be provided.\n\nb) Should products or services be provided in multiple states or territories, or in no specific jurisdiction (including but not limited to the provision of online products or services), the consumer protection laws of the state in which the Service Provider is registered shall apply.\n",_=function(e){return"1. Definitions\n  \u2022 Service Provider means the registered owner of ".concat(e," and all associated commercial entities, representatives and employees.\n  \u2022 Customer means the person or persons to whom services are being provided, as described in the quote provided to them and accepted by them.\n\n2. Agreement\n\nBy accepting a quote from the Service Provider, the Customer agrees to the following terms and conditions. These terms constitute a legally binding agreement between the Service Provider and the Customer.\n\n3. Services\n\nThe Service Provider agrees to provide the services as outlined in the agreed-upon quote. Any changes to the scope of services must be mutually agreed upon in writing.\n\n4. Payment\n\na. The Customer agrees to pay the Service Provider the agreed-upon fee for the services provided. Payment shall be made in accordance with the payment schedule stated in the invoice or agreement.\n\nb. In the event of any additional services requested by the Customer that are beyond the original scope, the Service Provider shall provide an estimate for these services, and work will commence upon acceptance and payment of the additional charges.\n\n5. Confidentiality\n\nBoth parties agree to treat all non-public information received from the other party as confidential. This includes but is not limited to business plans, financial information, and proprietary processes.\n\n6. Intellectual Property\n\na. The Customer retains ownership of any intellectual property provided to the Service Provider for the purpose of rendering services.\n\nb. The Service Provider retains ownership of any intellectual property developed or created during the provision of services, unless otherwise specified in writing.\n\n7. Termination\n\nEither party may terminate this agreement with written notice in the event of a material breach of these terms. Upon termination, the Customer shall pay for all services provided up to the termination date.\n\n8. Limitation of Liability\n\nThe Service Provider shall not be liable for any indirect, consequential, or incidental damages arising from the provision of services, except where prohibited by law.\n\n9. Governing Law\n\nThis agreement shall be governed by and construed in accordance with the laws of the Australian state in which the Service Provider is registered or is providing services in accordance with these Terms and Conditions.\n\n10. Entire Agreement\n\nThis document constitutes the entire agreement between the parties, supersedes any prior understandings or agreements, and may not be modified except in writing and signed by both parties.\n\n11. Acceptance\n\nBy engaging the Service Provider\u2019s services, the Customer acknowledges that they have read, understood, and agree to these Terms and Conditions.\n")}},58458:function(e,t,n){"use strict";n.d(t,{C8:function(){return l},Wb:function(){return s},hc:function(){return a},oI:function(){return c},rP:function(){return u}});var r=n(60687),i=n(73992),o=n(15253),a=function(){return{cost:0,name:"",description:"",quantity:0,tax_type:null,payment_type:null,unit:null}},s=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return(null===e||void 0===e?void 0:e.work_materials.length)?e.work_materials.map((function(e){return{cost:+e.cost,description:e.description,name:e.name,quantity:+e.quantity,tax_type:{pk:e.tax_type,name:i._d[e.tax_type],returnValue:e.tax_type},payment_type:e.payment_type?{pk:e.payment_type,name:i.kC[e.payment_type],returnValue:e.payment_type}:void 0,unit:{pk:e.unit,name:i.zh[e.unit],returnValue:e.unit}}})):t&&n?(0,r.U)(2,(function(){return a()})):[]},l=function(e){if(!e)return 0;for(var t,n=0,r=0;r<e.length;r++)(t=e[r])&&t.tax_type&&void 0!==t.cost&&void 0!==t.quantity&&(n+=t.cost*t.quantity);return n},c=function(e){if(!e)return 0;for(var t,n=0,r=0;r<e.length;r++)(t=e[r])&&t.tax_type&&void 0!==t.cost&&void 0!==t.quantity&&(n+=t.cost*t.quantity*("gst"===t.tax_type.returnValue?o.T:0));return n},u=function(e){return e&&e.tax_type&&e.quantity&&e.cost?(e.quantity*e.cost*("gst"===e.tax_type.returnValue?o.T+1:1)).toFixed(2):0}},99600:function(e,t,n){"use strict";n.d(t,{GA:function(){return p},kf:function(){return d},sq:function(){return f}});var r=n(2784),i=n(8294),o=n(58458),a=n(85750),s=n(41156),l=n(34514),c=n(85621),u=n(14179),d=(0,r.createContext)(null),p=function(){var e=(0,r.useContext)(d);if(!e)throw new Error("No QuoteCheckFormContext.Provider for ExternalQuoteCheck was found");return e},f=function(e){var t=e.quote,n=e.edditable,r=void 0!==n&&n,d=e.isAdminInvoice;if(void 0!==d&&d)return{schema:i.Ll};var p,f,h,m,v=(0,c.X)().isMobile,_=(0,u.o)(),x=_.subscriptionStore,g=_.tradieDomainStore,b="free"===x.subscriptionType,j=!v,y=null===t||void 0===t?void 0:t.terms_and_conditions;y||(y=b?i.PN:(0,i.mV)((null===(p=g.info)||void 0===p?void 0:p.domain_name)||""));return{schema:i.kn,defaultValues:{materials:(0,o.Wb)(t,r,j),description:(null===t||void 0===t?void 0:t.description)||"",termsAndConditions:y,depositPercent:null!==(f=null===t||void 0===t?void 0:t.deposit_percent.toString())&&void 0!==f?f:"0",depositExpiryDate:t?new Date(t.deposit_expire_date):new Date,allowedInPersonPayment:(null===t||void 0===t?void 0:t.allowed_offline_payment)||!0,allowedOnlinePayment:null!==(h=null===t||void 0===t?void 0:t.allowed_online_payment)&&void 0!==h&&h,invoiceExpiryDate:(null===t||void 0===t?void 0:t.invoice_expire_date)?new Date(t.invoice_expire_date):new Date,merchantFeePayer:(null===t||void 0===t?void 0:t.merchant_fee_pays_role)||"tradie",withDigitalSignature:null!==(m=null===t||void 0===t?void 0:t.digital_signature_required)&&void 0!==m?m:!b,bankDetails:t?{accountName:t.account_name,accountNumber:(0,a.jm)(t.account_number,s.Lm),bsb:t.bsb?(0,a.jm)(t.bsb,l.Kf):""}:void 0}}}},63002:function(e,t,n){"use strict";n.d(t,{V:function(){return un}});var r=n(70865),i=n(96670),o=n(52322),a=n(59517),s=n(14179),l=n(85621),c=n(90767),u=n(8294),d=n(99600),p=n(87394),f=n(46776),h=n(2784),m=n(58458),v=n(29947),_=n(63955),x=/^materials\.\d\.(quantity|cost|tax_type)$/,g=(0,p.Z)((0,v.k)((function(){var e=(0,_.Gc)(),t=e.watch,n=e.getValues,r=(0,d.GA)(),i=r.quote,o=r.isCitizen,a=(0,s.o)().subscriptionStore,l=(0,f.fv)((function(){var e,t=n(),r=t.materials,s=t.merchantFeePayer,l=t.allowedOnlinePayment&&(!o||"citizen"===s);return{totalCost:(0,m.C8)(r),totalTax:(0,m.oI)(r),withMerchantFee:l,merchantFee:{addedValue:i?parseFloat(i.merchant_fee_constant_add):null!==(e=a.merchantFee.addedValue)&&void 0!==e?e:0,percentsDecimal:i?parseFloat(i.merchant_fee_percents)/100:a.merchantFee.percentsDecimal,payer:s},get merchantFeeTotal(){return(this.totalCost+this.totalTax)*this.merchantFee.percentsDecimal+this.merchantFee.addedValue},get totalTotal(){return this.totalCost+this.totalTax+(this.withMerchantFee&&"citizen"===this.merchantFee.payer?this.merchantFeeTotal:0)}}}));return(0,h.useEffect)((function(){var e=t((function(e,t){var n=e.materials,r=e.merchantFeePayer,i=e.allowedOnlinePayment,o=t.name;("materials"===o||(null===o||void 0===o?void 0:o.match(x)))&&(l.totalCost=(0,m.C8)(n),l.totalTax=(0,m.oI)(n)),"merchantFeePayer"===o&&r&&(l.merchantFee.payer=r),"allowedOnlinePayment"===o&&(l.withMerchantFee=!!i)}));return function(){return e.unsubscribe()}}),[t,l,i]),{quoteCheckStore:l}}),"QuoteCheckStore"),2),b=g[0],j=g[1],y=n(80130),w=n(54564),C=n(5149),P=n.n(C),k=n(59091),N=function(){var e=(0,d.GA)().edditable,t=(0,_.bc)({name:"allowedInPersonPayment"}).field;return(0,o.jsxs)("div",{className:P().wrapper,children:[(0,o.jsx)(w.x,{className:P().text,fs:"18",fw:"700",fsm:"16",text:"Allow in-person payment"}),(0,o.jsx)(k._,{className:P().hint,title:"",description:"Toggle this option to allow your customer to pay you in-person. This is a good option if you have already arranged to return to the customer\u2019s house to finalise a quote. If you would rather be paid by secure bank transfer or online payment, toggle this option off"}),(0,o.jsx)(y.j,{checked:t.value,onChange:function(){return t.onChange(!t.value)},disabled:!e})]})};N.displayName="AllowInPersonPayment";var S=n(72779),I=n.n(S),Z=n(81095),D=n.n(Z),q=function(e){var t=e.className,n=e.children,r=e.single;return(0,o.jsx)("div",{className:I()(t,D().wrapper,r&&D().single),children:n})},T=function(e){var t=e.className,n=(0,d.GA)(),s=n.buttonConfig,l=n.isSelectedInvoice;return(0,o.jsx)(q,{className:t,children:l?(0,o.jsx)(a.M,(0,i.Z)((0,r.Z)({},u.pV),{onClick:null===s||void 0===s?void 0:s.onCreateInvoice,children:"Send Invoice"})):(0,o.jsx)(a.M,(0,i.Z)((0,r.Z)({},u.pV),{onClick:null===s||void 0===s?void 0:s.onCreateQuote,children:"Send Quote"}))})},M=n(71958),B=n(23610),A=n(96032),E=n.n(A),F=function(){var e=(0,l.X)().isMobile,t=(0,h.useRef)(null),n=(0,_.bc)({name:"depositExpiryDate"}).field;return(0,o.jsx)(M.M,{className:E().picker,selectedDate:n.value,onChange:n.onChange,staticDropdown:!0,ref:t,onDropdownOpen:function(){requestAnimationFrame((function(){t.current&&!e&&(0,B.z)(t.current)}))}})},z=n(76979),V=n(98988),O=n(97868),R=n(20754),L=n(47264),Q=n(18869),W=n(35505),H=n(65623),G=function(e){var t=e.selectedItemMap,n=e.onSelectedItemMapChange,a=e.onSelectedItemsChange,s=e.selectedItems,l=e.wrapperProps,c=e.inputProps,u=e.dropdownProps,d=e.headProps,p=e.selectedItemsProps,f=e.data,h=e.getItemInfo,m=e.max,v=e.selectedItemsOrInputProps,_=e.edditable;return(0,o.jsx)(H.s,{children:function(e){var x=e.getDropdownProps,g=e.getHeadProps,b=e.getWrapperProps,j=e.getItem;return(0,o.jsx)(V.e,{selectedItemMap:t,onSelectedItemMapChange:n,selectedItems:s,onSelectedItemsChange:a,max:m,edditable:_,children:(0,o.jsxs)(O.i,(0,i.Z)((0,r.Z)({},b(l)),{children:[(0,o.jsx)(R.F,(0,i.Z)((0,r.Z)({},g(d)),{children:(0,o.jsx)(L.I,(0,r.Z)({inputProps:(0,r.Z)({placeholder:"Task status"},c),selectedItemsProps:p},v))})),(0,o.jsx)(Q.L,(0,i.Z)((0,r.Z)({},x(u)),{children:(0,o.jsx)(W.o,{data:f,renderItem:function(e,t,n){return j((0,r.Z)({props:t,isFound:!0,isNested:!0},h(e,n)))},getItemInfo:h})}))]}))})}})},U=n(80075),X=n(72796),K=n.n(X),Y=(0,z.K)({getControllerProps:function(){return{name:"depositPercent"}},render:function(e){var t=e.field,n=(0,_.Gc)(),r=n.getValues,i=n.setValue,a=(0,d.GA)(),s=a.edditable,l=a.quote,c=j().quoteCheckStore,p=(0,h.useState)((function(){return c.totalTotal>u.fq})),f=p[0],m=p[1];(0,h.useEffect)((function(){return(0,U.U5)((function(){return c.totalTotal}),(function(e){var t=e>u.fq;m(t),t&&r("depositPercent")!==u.lU&&i("depositPercent","10")}))}),[c,r,i]);var v=function(e){return{pk:e.toString(),name:"".concat(e,"%"),returnValue:e}};return(0,o.jsxs)("div",{className:K().wrapper,children:[(0,o.jsx)(w.x,{fs:"18",fsm:"16",fw:"700",text:"Deposit request (optional)"}),(0,o.jsxs)("div",{className:K().selectWrapper,children:[(0,o.jsx)(G,{max:1,data:f?u.eD:u.Ig,getItemInfo:v,selectedItems:t.value?[v(t.value)]:[],onSelectedItemsChange:function(e){var n;return t.onChange((null===(n=e[0])||void 0===n?void 0:n.returnValue)||0)},wrapperProps:{className:K().select},headProps:{renderAfterEnd:void 0},inputProps:{placeholder:"",value:null!==t.value?"".concat(t.value,"%"):"",onChange:function(e){if(s){var n=e.target.value.replace("%","");n?/^\d+$/.test(n)&&t.onChange(Math.max(0,Math.min(100,+n))):t.onChange(null)}}},selectedItemsProps:{bgColor:"transparent",withCross:!1,color:"black",fs:15},selectedItemsOrInputProps:{showInputIfNotEmpty:!0},edditable:l?(!l.paid_deposit||0===l.deposit_percent)&&s:s}),(0,o.jsxs)("span",{children:["For quotes above $",u.fq,","," ",u.eD[0],"% is the maximum deposit that can be requested"]})]})]})}}),J=n(51571),$=n(62537),ee=(0,J.W)({getKey:function(e){return(0,$.lS)("/users/".concat(e.tradiePk,"/tradie-page/customers-list/").concat(e.citizenPk,"/"),e.query)},isDisabled:function(e){return void 0===e.tradiePk||void 0===e.citizenPk}}),te=n(1183),ne=n(99630),re=n.n(ne),ie=function(e){var t=e.title,n=e.text,r=e.alignCenter,i=e.column,a=void 0===i||i,s=e.style;return(0,o.jsxs)("div",{className:I()(re().wrapper,r&&re().center,a&&re().column),style:s,children:[(0,o.jsx)("div",{className:re().title,children:t}),(0,o.jsx)("div",{className:re().text,children:n})]})},oe=n(85750),ae=n(53161),se=n(60354),le=n(66130),ce=n.n(le),ue=function(){var e=(0,_.bc)({name:"invoiceExpiryDate"}),t=e.field,n=e.fieldState;return(0,o.jsx)("div",{className:ce().picker,children:(0,o.jsx)(M.M,{selectedDate:t.value,onChange:t.onChange,independentDropdown:!0,inputStyle:{borderColor:n.error?"var(--form-error-color)":void 0}})})},de=n(34514),pe=n(45059),fe=n.n(pe),he=function(){var e=(0,d.GA)(),t=e.quote,n=e.edditable,r=ee.use({citizenPk:null===t||void 0===t?void 0:t.citizen,tradiePk:null===t||void 0===t?void 0:t.tradie}).data,i=(0,te.z)(null===t||void 0===t?void 0:t.tradie).data;return t&&r&&i?(0,o.jsxs)("div",{className:fe().wrapper,children:[(0,o.jsxs)("div",{className:fe().leftBlock,children:[(0,o.jsx)(ie,{title:"To",text:(0,oe.Pp)(r.customer,!0),alignCenter:!0}),(0,o.jsx)(ie,{title:"From",text:(0,o.jsx)("div",{className:fe().from,children:"".concat((0,oe.Pp)(i,!0,!0))})}),(0,o.jsx)(ie,{title:"ABN",text:i.abn?(0,oe.jm)(i.abn,de.nv):"No abn",column:!1,alignCenter:!0,style:{gap:30}})]}),(0,o.jsxs)("div",{className:fe().rightBlock,children:[(0,o.jsx)(ie,{title:"Invoice Number",text:(0,o.jsx)(ae.R,{quoteId:t.id,isInvoice:!0}),alignCenter:!0}),(0,o.jsx)(ie,{title:"Date of Issue",text:t.invoice_issue_date?(0,se.C8)(t.invoice_issue_date,"dd.mm.yyyy"):n?(0,se.C8)((0,se.hC)(new Date),"dd.mm.yyyy"):"Unknown date",alignCenter:!0}),(0,o.jsx)(ie,{title:"Due Date",text:n?(0,o.jsx)(ue,{}):t.invoice_expire_date?(0,se.C8)(t.invoice_expire_date,"dd.mm.yyyy"):"Unknown date",alignCenter:!0})]})]}):null},me=n(47842),ve=n(56142),_e=n.n(ve),xe=function(e){var t,n=e.className,r=e.children,i=e.onClick,a=e.brColor,s=e.colSpan,l=e.centered,c=e.isInvalid,u=(0,h.useState)(!1),d=u[0],p=u[1];return(0,o.jsxs)("td",{className:I()(_e().cell,n,l&&_e().centered),"data-br":a,colSpan:s,onClick:i,onFocus:function(){return p(!0)},onBlur:function(){return p(!1)},children:[r,(0,o.jsx)("div",{className:I()(_e().border,(t={},(0,me.Z)(t,_e().focused,d&&!c),(0,me.Z)(t,_e().invalid,c),t))})]})},ge=n(18620),be=function(e){var t=e.showPlaceholders,n=e.index,i=(0,d.GA)().edditable,a=(0,_.bc)({name:"materials.".concat(n,".name")}),s=a.field,l=a.fieldState;return(0,o.jsx)(xe,{isInvalid:l.invalid,children:(0,o.jsx)(ge.I,(0,r.Z)({brColor:"transparent",useTextarea:!0,placeholder:t?"e.g. :Re-painting walls":"",placeholderColor:"#89A5C1",validate:!1,disabled:!i},s))})};be.displayName="Name";var je=n(38704),ye=function(e){var t=e.showPlaceholders,n=e.index,a=(0,d.GA)().edditable,s=(0,_.bc)({name:"materials.".concat(n,".description")}),l=s.field,c=s.fieldState;return(0,o.jsx)(xe,{isInvalid:c.invalid,children:(0,o.jsx)(ge.I,(0,i.Z)((0,r.Z)({brColor:"transparent",useTextarea:!0,placeholder:t?"e.g. :Re-painted walls in livingroom, kitchen and 2 bedrooms":"",placeholderColor:"#89A5C1",validate:!1,disabled:!a},l),{value:(0,je.ZU)(l.value)}))})};ye.displayName="Description";var we=n(92427),Ce=n(73992),Pe=function(e){var t=e.index,n=e.isAdminInvoice,r=(0,_.bc)({name:"materials.".concat(t,".unit")}),i=r.field,a=r.fieldState,s=(0,d.GA)().edditable;return(0,o.jsx)(xe,{centered:!0,isInvalid:a.invalid,children:(0,o.jsx)(we.P,{edditable:s,data:n?Ce.vc:Ce.uo,selectedItem:i.value,onSelectedItemChange:i.onChange,getName:function(e){return n?Ce.mI[e]:Ce.zh[e]},onBlur:i.onBlur})})},ke=n(42173),Ne=n(64818),Se=n.n(Ne),Ie=function(e){var t=e.index,n=(0,d.GA)().edditable,i=(0,_.bc)({name:"materials.".concat(t,".quantity")}),a=i.field,s=i.fieldState;return(0,o.jsx)(xe,{isInvalid:s.invalid,children:n?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ke.Y,(0,r.Z)({onWrapperClick:function(e){return e.preventDefault()}},a)),(0,o.jsx)(w.x,{className:Se().resetQuantityBtn,onClick:function(){return a.onChange(0)},text:"Remove",color:"blue",centered:!0,pointer:!0})]}):(0,o.jsx)(w.x,{centered:!0,text:a.value})})};Ie.displayName="Quantity";var Ze,De=n(60522),qe=function(e){var t=e.index,n=e.showPlaceholders,r=(0,d.GA)().edditable,i=(0,_.bc)({name:"materials.".concat(t,".cost")}),a=i.field,s=i.fieldState,l=(0,h.useState)("".concat(a.value||"")),c=l[0],u=l[1];return(0,o.jsx)(xe,{centered:!0,isInvalid:s.invalid,children:(0,o.jsx)(De.Y,{prefix:"$",decimal:!0,inputClassName:Se().centered,placeholderColor:"#89A5C1",placeholder:n?"Add cost":"",value:c,onChange:function(e){a.onChange(+e),u(e)},disabled:!r})})},Te=function(e){var t=e.index,n=(0,_.bc)({name:"materials.".concat(t,".tax_type")}),r=n.field,i=n.fieldState,a=(0,d.GA)().edditable;return(0,o.jsx)(xe,{centered:!0,isInvalid:i.invalid,children:(0,o.jsx)(we.P,{edditable:a,data:Ce.zQ,selectedItem:r.value,onSelectedItemChange:r.onChange,getName:function(e){return Ce._d[e]},onBlur:r.onBlur})})};function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Me.apply(this,arguments)}Te.displayName="Tax";var Be=function(e){return h.createElement("svg",Me({width:16,height:18,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),Ze||(Ze=h.createElement("path",{d:"M5 0v1H0v2h1v13a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3h1V1h-5V0H5Zm0 5h2v9H5V5Zm4 0h2v9H9V5Z",fill:"#6C6C6C"})))},Ae=n(19596),Ee=function(e){var t=e.index,n=e.onRemove,r=e.showPlaceholders,i=(0,d.GA)().edditable,a=(0,_.qo)().materials,s=(0,m.rP)(null===a||void 0===a?void 0:a[t]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xe,{centered:!0,children:s?(0,Ae.Q)(s):(0,o.jsx)(o.Fragment,{children:r&&(0,o.jsx)("span",{className:Se().totalPlaceholder,children:"$"})})}),i&&a&&(null===a||void 0===a?void 0:a.length)>1&&(0,o.jsx)(xe,{className:I()(Se().centered,Se().trash),onClick:n,children:(0,o.jsx)(Be,{})})]})};Ee.displayName="Total";var Fe=function(e){var t=e.index,n=(0,_.bc)({name:"materials.".concat(t,".payment_type")}),r=n.field,i=n.fieldState;return(0,o.jsx)(xe,{centered:!0,isInvalid:i.invalid,children:(0,o.jsx)(we.P,{data:Ce.V_,selectedItem:r.value||null,onSelectedItemChange:r.onChange,getName:function(e){return e?Ce.kC[e]:""},onBlur:r.onBlur})})},ze=(0,h.memo)((function(e){var t=e.showPlaceholders,n=e.index,r=e.onRemove,i=(0,d.GA)().isAdminInvoice;return(0,o.jsxs)("tr",{children:[(0,o.jsx)(be,{showPlaceholders:t,index:n}),(0,o.jsx)(ye,{showPlaceholders:t,index:n}),(0,o.jsx)(Pe,{index:n,isAdminInvoice:i}),(0,o.jsx)(Ie,{index:n}),(0,o.jsx)(qe,{showPlaceholders:t,index:n}),i&&(0,o.jsx)(Fe,{index:n}),(0,o.jsx)(Te,{index:n}),(0,o.jsx)(Ee,{index:n,showPlaceholders:t,onRemove:function(){return r(n)}})]})}));ze.displayName="Material";var Ve=n(10438),Oe=n(99371),Re=n.n(Oe),Le=(0,h.memo)((function(e){var t=e.width,n=e.text,r=e.colSpan;return(0,o.jsx)("th",{className:Re().head,style:{width:"".concat(t,"%")},colSpan:r,children:n})}));Le.displayName="Head";var Qe=n(72674),We=n.n(Qe),He=(0,f.Pi)((function(){var e=j().quoteCheckStore;return(0,o.jsxs)("tr",{className:We().row,children:[(0,o.jsx)(xe,{className:We().total,brColor:"blue",colSpan:3,children:"Overall Total"}),(0,o.jsx)(xe,{brColor:"blue"}),(0,o.jsx)(xe,{brColor:"blue"}),(0,o.jsx)(xe,{brColor:"blue"}),(0,o.jsx)(xe,{className:We().totalPrice,brColor:"blue",centered:!0,colSpan:2,children:e.totalCost?(0,Ae.Q)(e.totalCost+e.totalTax):void 0})]})}));He.displayName="Total";var Ge=n(59935),Ue=n.n(Ge),Xe=function(e){var t=e.fullWidth,n=(0,l.X)().isMobile,r=(0,d.GA)(),i=r.edditable,a=r.quote,s=r.isAdminInvoice,c=(0,_.Dq)({name:"materials"}),u=c.append,p=c.remove,f=c.fields,v=(0,h.useCallback)(p,[p]);return(0,o.jsx)(Ve.l,{className:Ue().wrapper,children:(0,o.jsxs)("table",{className:I()(Ue().table,t&&Ue().fullWidth),children:[(0,o.jsx)("thead",{children:(0,o.jsxs)("tr",{children:[(0,o.jsx)(Le,{width:n?24:22,text:"Name of goods, works or services"}),(0,o.jsx)(Le,{width:n?28:23,text:"Description of goods, works, services"}),(0,o.jsx)(Le,{width:12,text:"Unit of measurement"}),(0,o.jsx)(Le,{width:8,text:"Qnty"}),(0,o.jsx)(Le,{width:8,text:"Cost"}),s&&(0,o.jsx)(Le,{width:12,text:"Payment type"}),(0,o.jsx)(Le,{width:10,text:"Tax"}),(0,o.jsx)(Le,{width:17,text:"Total",colSpan:2})]})}),(0,o.jsxs)("tbody",{children:[f.map((function(e,t){return(0,o.jsx)(ze,{onRemove:v,index:t,showPlaceholders:Boolean(0===t&&i&&(!a||!a.work_materials.length))},e.id)})),i&&(0,o.jsx)("tr",{className:Ue().add,children:(0,o.jsx)("td",{onClick:function(){return u((0,m.hc)())},children:"Add Row +"})}),(0,o.jsx)(He,{})]})]})})};Xe.displayName="MaterialsTable";var Ke=n(42646),Ye=n(70019),Je=n(39134),$e=n.n(Je),et=function(e){var t=e.text,n=e.price,r=e.beforePrice,i=e.boldPrice,a=void 0!==i&&i;return(0,o.jsxs)(w.x,{className:$e().wrapper,fs:"14",children:[t,":",(0,o.jsxs)("div",{children:[r||"",(0,o.jsx)("span",{className:a?$e().bold:void 0,children:(0,Ae.Q)(n)})]})]})},tt=n(93861),nt=n.n(tt),rt=(0,f.Pi)((function(){var e=j().quoteCheckStore,t=(0,d.GA)(),n=t.quote,r=t.edditable,i=t.isSelectedInvoice,a=(0,_.qo)({defaultValue:{depositPercent:null===n||void 0===n?void 0:n.deposit_percent.toString()}}).depositPercent,s=e.merchantFee,l="Merchant fee ".concat(Number(100*s.percentsDecimal).toFixed(2),"% + ").concat(s.addedValue,"$ ");return(0,o.jsxs)("div",{className:nt().wrapper,children:[(0,o.jsx)(w.x,{text:"Total",fs:"18",fsm:"16",fw:"700"}),(0,o.jsxs)("div",{className:nt().list,children:[(0,o.jsx)(et,{text:"Subtotal",price:e.totalCost||0}),(0,o.jsx)(et,{text:"Tax",price:e.totalTax}),e.withMerchantFee&&(0,o.jsx)(et,{text:l,price:e.merchantFeeTotal}),(null===n||void 0===n?void 0:n.deposit_received)&&Ye.R.withDeposit(n)&&(0,o.jsx)(et,{text:"Deposit paid",beforePrice:"".concat(Number(a),"% - "),price:Ye.R.getDepositCost(n),boldPrice:!0}),(0,o.jsx)(et,{text:"Amount Paid",price:e.totalTotal}),!(null===n||void 0===n?void 0:n.paid_deposit)&&!i&&(0,o.jsx)(et,{text:"Deposit due",beforePrice:"".concat(Number(a),"% - "),price:Number(e.totalTotal)*Number(a)/100,boldPrice:!0}),(null===n||void 0===n?void 0:n.sent_quote)&&!n.quote_payment_received&&!r&&(0,o.jsx)(Ke.V,{amount:n.deposit_received?Ye.R.getRestCost(n):Ye.R.getDepositCost(n),expiryDate:n.deposit_received?n.invoice_expire_date:n.deposit_expire_date,percent:n.deposit_received?void 0:a,text:n.deposit_received?"Balance due":"Deposit due"})]})]})}));rt.displayName="PaymentInfo";var it=n(77778),ot=n(80226),at=n(32891),st=n.n(at),lt=function(){var e=(0,d.GA)(),t=e.edditable,n=e.isInvoice,a=(0,s.o)().userStore,c=(0,l.X)().isMobile;return(0,o.jsxs)("div",{children:[(0,o.jsxs)(w.x,{className:st().text,fs:"18",fsm:"16",fw:"700",children:["Terms and Conditions"," ","".concat("tradie"===a.currentRole?"(optional)":"")]}),n?(0,o.jsx)(w.x,{children:"Terms and Conditions: As per Terms and Conditions accepted with associated quote."}):(0,o.jsx)(it.s,(0,i.Z)((0,r.Z)({},(0,ot.vT)()),{name:"termsAndConditions",placeholder:"Provide some basic terms and conditions for your quote that your new Customer must accept in order to proceed",minHeight:c?125:167,disabled:!t,highlightIfValid:!1,maxLength:5e3}))]})},ct=n(70393),ut=n(94085),dt=n.n(ut),pt=(0,f.Pi)((function(){var e=j().quoteCheckStore,t=(0,_.bc)({name:"merchantFeePayer"}).field;return e.withMerchantFee?(0,o.jsxs)("div",{className:dt().wrapper,children:[(0,o.jsxs)(w.x,{className:dt().text,fs:"18",fsm:"16",fw:"700",children:["Would you like to pass the merchant fee on to your customer?",(0,o.jsx)(k._,{className:dt().hint,description:"The system we use for online payments charges a fee and a processing charge for each transaction. You can choose to absorb this cost or you can pass this fee on to your customer."})]}),(0,o.jsxs)("div",{className:dt().radioBtns,children:[(0,o.jsxs)("label",{className:dt().label,children:[(0,o.jsx)(ct.E,{checked:"citizen"===t.value,onChange:function(){return t.onChange("citizen")}}),(0,o.jsx)(w.x,{fs:"14",text:"Pass on fee"})]}),(0,o.jsxs)("label",{className:dt().label,children:[(0,o.jsx)(ct.E,{checked:"tradie"===t.value,onChange:function(){return t.onChange("tradie")}}),(0,o.jsx)(w.x,{fs:"14",text:"Absorb fee"})]})]})]}):null}));pt.displayName="MerchantFeeRadio";var ft=n(54444),ht=n.n(ft),mt=function(){var e=(0,_.bc)({name:"withDigitalSignature"}).field,t=(0,s.o)().subscriptionStore;return(0,o.jsxs)("div",{className:ht().wrapper,children:[(0,o.jsx)(w.x,{className:ht().text,text:"Digital signature required",fs:"18",fsm:"16",fw:"700"}),(0,o.jsx)(k._,{className:ht().hint,description:"Toggle this option to enable your customers to provide a digital signature when they accept your quote. A digital signature is as good as a traditional signature for substantiating the creation of a contract, which is vital in instances where you aren\u2019t asking for payment up-front."}),(0,o.jsx)(y.j,{checked:e.value,onChange:function(){return e.onChange(!e.value)},disabled:"free"===t.subscriptionType})]})},vt=n(72833),_t=n(32689),xt=n(23536),gt=n(623),bt=n(41156),jt=n(8218),yt=n.n(jt),wt=function(){var e=(0,d.GA)(),t=e.edditable,n=e.quote,r=(0,s.o)().userStore,i=(0,_.Gc)(),a=i.setValue,l=i.getValues,c=(0,_t.l)((function(){return(0,xt.XJ)((null===n||void 0===n?void 0:n.tradie)||r.userPk)}),{onData:function(e){e&&a("bankDetails",{accountName:e.account_name,accountNumber:(0,oe.jm)(e.account_number,bt.Lm),bsb:(0,oe.jm)(e.bsb,de.Kf)})},autoRequest:!1}),u=c.request,p=c.isLoading;return(0,h.useEffect)((function(){var e=l().bankDetails||{},t=e.accountName,n=e.accountNumber,r=e.bsb;t||n||r||u()}),[l,u]),(0,o.jsxs)("div",{className:yt().wrapper,children:[(0,o.jsxs)(w.x,{className:yt().title,fs:"18",fsm:"16",fw:"700",children:["Bank details",p&&(0,o.jsx)(gt.$,{className:yt().spinner,w:13,h:13})]}),(0,o.jsxs)("div",{className:yt().flex,children:[(0,o.jsx)(vt.o,{name:"bankDetails.bsb",placeholder:"BSB",withError:!1,onInputChange:function(e){return(0,oe.jm)(e.target.value,de.Kf)},disabled:!t}),(0,o.jsx)(vt.o,{name:"bankDetails.accountNumber",placeholder:"Account number",withError:!1,onInputChange:function(e){return(0,oe.jm)(e.target.value,bt.Lm)},disabled:!t})]}),(0,o.jsx)(vt.o,{name:"bankDetails.accountName",placeholder:"Account name",withError:!1,disabled:!t})]})},Ct=n(95034),Pt=n(97887),kt=n(41182),Nt=n.n(kt),St=function(){var e,t,n=(0,s.o)().userStore,r=(0,Ct.B)(),i=(0,d.GA)().edditable,a=(0,_.Gc)().setValue,l=(0,_.bc)({name:"allowedOnlinePayment"}).field,c="active"===(null===(e=n.user)||void 0===e||null===(t=e.stripe_account)||void 0===t?void 0:t.status);return(0,o.jsxs)("div",{className:Nt().wrapper,children:[(0,o.jsx)(w.x,{className:Nt().text,fs:"18",fw:"700",fsm:"16",text:"Allow online payment"}),(0,o.jsx)(k._,{className:Nt().hint,title:"",description:"Toggle this option to enable online payments through one of our secure payment options. This is a good option if you want to receive payment before arriving on site to complete work. If you would rather be paid in person or by traditional bank transfer, toggle this option off."}),(0,o.jsx)(y.j,{checked:l.value,onChange:function(){if(i)if(c){var e=!l.value;l.onChange(e),e||a("merchantFeePayer","tradie")}else r.open({component:Pt.r})}})]})},It=n(96577),Zt=n.n(It),Dt=n(33420),qt=n.n(Dt),Tt=function(e){var t=e.src;return(0,o.jsxs)("div",{className:qt().wrapper,children:[(0,o.jsx)(w.x,{text:"Signature",fs:"18",fsm:"16",fw:"700"}),(0,o.jsx)(Zt(),{src:t,height:80,width:400,objectFit:"contain"})]})},Mt=n(65361),Bt=n(90133),At=n.n(Bt),Et=function(e){var t=e.field,n=e.onRemove,r=t.name,i=t.description,a=t.quantity,s=t.unit,l=t.cost,c=(0,m.rP)(t),u=(0,d.GA)().edditable;return(0,o.jsxs)("div",{className:"".concat(At().wrapper," ").concat(At().container),children:[(0,o.jsx)(w.x,{className:At().name,fw:"500",fs:"14",children:r}),u&&(0,o.jsx)(Mt.XH,{className:At().icon,type:"red",onClick:function(e){e.stopPropagation(),n()}}),(0,o.jsx)(w.x,{className:At().description,fs:"14",children:i}),(0,o.jsxs)("div",{className:At().footer,children:[(0,o.jsxs)("div",{className:At().footerInfo,children:[(0,o.jsx)("div",{className:At().quantity,children:(0,o.jsx)(w.x,{fs:"12",children:"".concat(a," ").concat(null===s||void 0===s?void 0:s.name)})}),(0,o.jsx)(w.x,{fs:"12",className:At().separator,children:"X"}),(0,o.jsx)(w.x,{fs:"12",children:(0,Ae.Q)(l)})]}),(0,o.jsx)(w.x,{className:At().total,fs:"14",fw:"600",children:(0,Ae.Q)(c)})]})]})},Ft=n(9576),zt=n(26361),Vt=n(6812),Ot=n(48601),Rt=n(9710),Lt=n(91300),Qt=n(27984),Wt=n.n(Qt),Ht=function(){var e=(0,_.bc)({name:"quantity"}).field;return(0,o.jsxs)("div",{className:Wt().wrapper,children:[(0,o.jsx)(ke.Y,(0,r.Z)({onWrapperClick:function(e){return e.preventDefault()}},e)),(0,o.jsx)(w.x,{className:Wt().resetQuantityBtn,onClick:function(){return e.onChange(0)},text:"Remove",color:"blue",centered:!0,pointer:!0})]})},Gt=n(22582),Ut=n.n(Gt),Xt=function(){var e=(0,_.bc)({name:"unit"}).field;return(0,o.jsx)("div",{className:Ut().wrapper,children:(0,o.jsx)(we.P,{data:Ce.uo,selectedItem:e.value,onSelectedItemChange:e.onChange,getName:function(e){return Ce.zh[e]},onBlur:e.onBlur,wrapperProps:{height:34,brRadius:8}})})},Kt=n(92682),Yt=n.n(Kt),Jt=function(){var e=(0,_.bc)({name:"tax_type"}).field;return(0,o.jsx)("div",{className:Yt().wrapper,children:(0,o.jsx)(we.P,{data:Ce.zQ,selectedItem:e.value,onSelectedItemChange:e.onChange,getName:function(e){return Ce._d[e]},onBlur:e.onBlur,wrapperProps:{height:40,brRadius:8}})})},$t=n(38016),en=n(4868),tn=n(34127),nn=n.n(tn),rn=function(e){var t=e.initialMaterial,n=e.onSubmit,s=void 0===n?en.Z:n,l=e.onRemove,c=(0,Ct.B)(),u=(0,Ft.A)().id;c.setProps(u,(0,zt.zJ)({backgroundStyle:{background:"transparent"},cross:"long"}));var d=(0,_.cI)({mode:Lt.Z,resolver:(0,Vt.X)((0,Ot.Ry)().shape({description:(0,Ot.Z_)().required(),price:(0,Ot.Rx)().required().min(1),name:(0,Ot.Z_)().required(),quantity:(0,Ot.Rx)().required().min(1),tax_type:(0,Ot.Ry)().required().nonNullable(),unit:(0,Ot.Ry)().required().nonNullable()})),defaultValues:t||{}}),p=d.handleSubmit,f={withFloatingLabel:!1};return(0,o.jsxs)("form",{className:nn().wrapper,onSubmit:p((function(e){s((0,i.Z)((0,r.Z)({},e),{cost:e.price})),c.close(u)})),children:[(0,o.jsx)(w.x,{className:nn().title,centered:!0,fw:"700",fs:"20",children:"Add"}),(0,o.jsx)(_.RV,(0,i.Z)((0,r.Z)({},d),{children:(0,o.jsxs)("div",{className:nn().form,children:[(0,o.jsxs)("div",{className:nn().input,children:[(0,o.jsx)(w.x,{children:"Name of goods, works or services"}),(0,o.jsx)(vt.o,(0,r.Z)({name:"name",placeholder:"Name"},f))]}),(0,o.jsxs)("div",{className:nn().input,children:[(0,o.jsx)(w.x,{children:"Description of goods, works or services"}),(0,o.jsx)(vt.o,(0,r.Z)({name:"description",placeholder:"Description"},f))]}),(0,o.jsxs)("div",{className:nn().row,children:[(0,o.jsxs)("div",{className:nn().input,children:[(0,o.jsx)(w.x,{children:"Unit of measurment"}),(0,o.jsx)(Xt,{})]}),(0,o.jsxs)("div",{className:nn().input,children:[(0,o.jsx)(w.x,{children:"Quantity"}),(0,o.jsx)(Ht,{})]})]}),(0,o.jsxs)("div",{className:nn().input,children:[(0,o.jsx)(w.x,{children:"Price"}),(0,o.jsx)(Rt.t,{})]}),(0,o.jsxs)("div",{className:nn().input,children:[(0,o.jsx)(w.x,{children:"Tax"}),(0,o.jsx)(Jt,{})]}),(0,o.jsxs)("div",{className:nn().buttons,children:[t&&(0,o.jsx)($t.U,{onClick:function(){l(),c.close(u)},className:nn().deleteButton,brColor:"br-c-danger",color:"c-danger",children:"Delete"}),(0,o.jsx)(a.M,{className:nn().button,w:"btn-w-md",children:"Save"})]})]})}))]})},on=n(94649),an=n.n(on),sn=function(){var e=(0,Ct.B)(),t=(0,d.GA)().edditable,n=(0,_.Dq)({name:"materials"}),r=n.append,i=n.remove,a=n.fields,s=n.update,l=function(t){var n=void 0!==t,o=n?a[t]:void 0;e.open({component:rn,props:{onSubmit:function(e){return n?s(t,e):r(e)},onRemove:n?function(){return i(t)}:en.Z,initialMaterial:o}})};return(0,o.jsxs)("div",{className:an().wrapper,children:[(0,o.jsx)(w.x,{fw:"700",fs:"16",children:"Goods, Works Or Services"}),!!a.length&&a.map((function(e,n){return(0,o.jsx)("div",{onClick:function(){return t?l(n):null},children:(0,o.jsx)(Et,{field:e,onRemove:function(){return i(n)}})},e.id)})),t&&(0,o.jsx)(w.x,{className:an().add,color:"blue",fs:"16",onClick:function(){return l()},children:"Add +"})]})},ln=n(63580),cn=n.n(ln),un=function(e){var t,n,p=e.buttonConfig,f=e.createQuoteBtnClassName,h=e.logo,m=e.tableProps,v=e.className,_=e.onQuoteUpdate,x=void 0===_?function(){}:_,g=(0,d.GA)(),j=g.quote,y=g.isCitizen,w=g.edditable,C=g.isInvoice,P=g.isAdminInvoice,k=g.isSelectedInvoice,S=(0,s.o)().subscriptionStore,I=(0,l.X)().isMobile,Z=ee.use({citizenPk:null===j||void 0===j?void 0:j.citizen,tradiePk:null===j||void 0===j?void 0:j.tradie}).data,D=(!j||"quote_request"===j.status&&!j.sent_quote)&&!y,M=!(null===j||void 0===j?void 0:j.paid_deposit)&&w&&!y&&!P&&!k,B=w&&!M&&"completed"!==(null===j||void 0===j?void 0:j.status),A=!k&&"free"!==S.subscriptionType;return(0,o.jsx)(b,{children:(0,o.jsxs)("div",{className:v,children:[C&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("header",{className:cn().invoiceHeader,children:[(0,o.jsx)("h5",{className:cn().invoiceTitle,children:"Invoice"}),h]}),!I&&(0,o.jsx)(he,{})]}),I?(0,o.jsx)(sn,{}):(0,o.jsx)(Xe,(0,r.Z)({},m)),(0,o.jsxs)("div",{className:cn().underTable,children:[!P&&(0,o.jsxs)("div",{children:[(0,o.jsx)(wt,{}),(null===j||void 0===j||null===(t=j.digital_signature_citizen)||void 0===t?void 0:t.url)&&!C&&(0,o.jsx)(Tt,{src:null===j||void 0===j||null===(n=j.digital_signature_citizen)||void 0===n?void 0:n.url})]}),M&&(0,o.jsxs)("div",{children:[(0,o.jsx)(Y,{}),(0,o.jsx)(F,{})]}),"completed"!==(null===j||void 0===j?void 0:j.status)&&!k&&(0,o.jsx)(lt,{}),w&&!P&&(0,o.jsxs)("div",{className:cn().rightBlock,children:[(0,o.jsx)(N,{}),(0,o.jsx)(St,{}),A&&(0,o.jsx)(mt,{}),(0,o.jsx)(pt,{})]}),B&&(0,o.jsx)(rt,{})]}),I&&C&&(0,o.jsx)("div",{className:cn().layout,children:(0,o.jsx)(he,{})}),!B&&(0,o.jsx)(rt,{}),(0,o.jsx)("div",{className:cn().layout,children:w?(0,o.jsx)(o.Fragment,{children:D?(0,o.jsx)(T,{className:f}):(0,o.jsx)(q,{single:!0,children:(0,o.jsx)(a.M,(0,i.Z)((0,r.Z)({},u.pV),{children:"Save"}))})}):j&&Z?(0,o.jsx)(c.C,{isCitizen:y,quote:j,buttonConfig:p,renderButtons:function(e,t){var n=t.type;return(0,o.jsx)(q,{single:"accept-decline"!==n,children:e})},buttons:["accept-decline","pay","pay-deposit"],isInvoice:C,onQuoteUpdate:x,citizen:Z}):null})]})})}},5067:function(e,t,n){"use strict";n.d(t,{k:function(){return a}});var r=n(26297),i=n(52322),o=n(99600),a=function(e){var t=e.children,n=(0,r.Z)(e,["children"]);return(0,i.jsx)(o.kf.Provider,{value:n,children:t})}},51009:function(e,t,n){"use strict";n.d(t,{FJ:function(){return r},lg:function(){return o},w:function(){return i}});var r="AUSTRALIA",i=[-33.8696,151.20691],o={lat:-25.412108,lng:134.66551}},70019:function(e,t,n){"use strict";n.d(t,{R:function(){return i}});var r=n(90581),i=new(function(){function e(){(0,r.Z)(this,e)}var t=e.prototype;return t.getTotalCost=function(e){return Number(e.total_price)+(e.allowed_online_payment&&"citizen"===e.merchant_fee_pays_role?Number(e.merchant_fee_amount):0)},t.getRestCost=function(e){return e.quote_payment_received?0:this.getTotalCost(e)-(e.deposit_received?Number(e.deposit_amount||0):0)},t.withDeposit=function(e){return 0!==e.deposit_percent},t.getDepositCost=function(e){return e.deposit_percent?this.getTotalCost(e)*(e.deposit_percent/100):0},t.isMeeting=function(e){return Boolean(e.meeting&&!e.sent_quote)},t.isReceipt=function(e,t){return t&&this.withDeposit(e)&&"inprogress"===e.status},e}())},83899:function(e,t,n){"use strict";n.d(t,{v:function(){return r}});var r=function(e){return navigator.clipboard.writeText(e)}},43101:function(e){e.exports={wrapper:"DistrictInput_wrapper__00ZW6",item:"DistrictInput_item__h2Paq"}},14777:function(e){e.exports={icon:"SelectTradieCitizens_icon___SJ4X",wrapper:"SelectTradieCitizens_wrapper__a_Cm4",dropdown:"SelectTradieCitizens_dropdown__h_BdB"}},17569:function(e){e.exports={wrapper:"User_wrapper__e4Cmj",selected:"User_selected__3nrXL",avatar:"User_avatar__KOe5y",name:"User_name__mjzEH",email:"User_email__WJRqI"}},7418:function(e){e.exports={wrapper:"useError_wrapper__P00_H"}},77551:function(e){e.exports={selectedItem:"Select_selectedItem__6ASdy"}},27984:function(e){e.exports={wrapper:"QuantityInput_wrapper__0_JvP",resetQuantityBtn:"QuantityInput_resetQuantityBtn__9kc7v"}},92682:function(e){e.exports={wrapper:"TaxInput_wrapper__Ns162"}},22582:function(e){e.exports={wrapper:"UnitInput_wrapper__2mATo"}},34127:function(e){e.exports={wrapper:"AddMaterialPopup_wrapper__eNkwH",form:"AddMaterialPopup_form__b___L",row:"AddMaterialPopup_row__nid3r",title:"AddMaterialPopup_title__ZTtGT",input:"AddMaterialPopup_input__iWE26",buttons:"AddMaterialPopup_buttons__kce42",deleteButton:"AddMaterialPopup_deleteButton__obs3A",button:"AddMaterialPopup_button__zQWVO"}},9750:function(e){e.exports={error:"Error_error___gNmf"}},49845:function(e){e.exports={wrapper:"RegisterBase_wrapper__mpp_Y",phoneHint:"RegisterBase_phoneHint___Dyw0"}},36653:function(e){e.exports={wrapper:"RegisterCode_wrapper__Mp_MP",title:"RegisterCode_title__CgnKu",codeHint:"RegisterCode_codeHint__p6rbx"}},37295:function(e){e.exports={button:"ThirdStep_button__mQPZ6"}},52188:function(e){e.exports={map:"MapPicker_map__1w8wG",textWrapper:"MapPicker_textWrapper__g7SQy",text:"MapPicker_text__2BuCy",spinner:"MapPicker_spinner__jyfFG"}},93686:function(e){e.exports={wrapper:"StreetInput_wrapper__N4MbW",item:"StreetInput_item__G6Kq9"}},17421:function(e){e.exports={showMapText:"ChooseAddress_showMapText__Jn0Ru"}},49612:function(e){e.exports={wrapper:"ChooseButton_wrapper__q_dDY",selected:"ChooseButton_selected__Mug_Y",disabled:"ChooseButton_disabled__KI_uw",title:"ChooseButton_title__HQIy3",text:"ChooseButton_text__rj1FS"}},85438:function(e){e.exports={wrapper:"ChooseDate_wrapper__PuCDU",buttons:"ChooseDate_buttons__UpAPG",datePicker:"ChooseDate_datePicker__GGZ8G",error:"ChooseDate_error__nQ9eK"}},80211:function(e){e.exports={buttons:"ChooseOnlineMode_buttons__FzhSA",container:"ChooseOnlineMode_container__AVvb8"}},805:function(e){e.exports={wrapper:"ContinueButton_wrapper__Ua4TX",buttonWrapper:"ContinueButton_buttonWrapper__LzPKY",button:"ContinueButton_button__6DgGC"}},5681:function(e){e.exports={flex:"Flex_flex__tE5E0"}},23110:function(e){e.exports={container:"Scroll_container__AkvN5",gradient:"Scroll_gradient___XwBv"}},69483:function(e){e.exports={button:"SelectUsers_button__JSq0r",buttonText:"SelectUsers_buttonText__eH7Ir"}},739:function(e){e.exports={wrapper:"SubmitButton_wrapper__DXHgT"}},99935:function(e){e.exports={tabSwitcher:"TabSwitcher_tabSwitcher__7SQ_J"}},70224:function(e){e.exports={title:"WithTitle_title__dIP_A"}},39544:function(e){e.exports={wrapper:"CreateQuotePopup_wrapper__aC8sx",quoteInfo:"CreateQuotePopup_quoteInfo__ZcJ_X",title:"CreateQuotePopup_title__aq6_J",dots:"CreateQuotePopup_dots__asXP6",arrow:"CreateQuotePopup_arrow__CsnVo",historyBack:"CreateQuotePopup_historyBack__S3JiQ"}},59328:function(e){e.exports={wrapper:"InviteCitizenPopup_wrapper__gs4F7",container:"InviteCitizenPopup_container__Y0LKV",item:"InviteCitizenPopup_item__Zhplh",input:"InviteCitizenPopup_input__8AUxR",title:"InviteCitizenPopup_title__PX8oW",megaTitle:"InviteCitizenPopup_megaTitle__COOy5",btn:"InviteCitizenPopup_btn__Vvgzc",skeleton:"InviteCitizenPopup_skeleton__FITx3",loading:"InviteCitizenPopup_loading__WpM7M"}},16255:function(e){e.exports={wrapper:"StripeConnectPopup_wrapper__oOIqp",title:"StripeConnectPopup_title__L69gK",icon:"StripeConnectPopup_icon__z1tX2",secondTitle:"StripeConnectPopup_secondTitle__mz9PX",description:"StripeConnectPopup_description__Szebc",benefits:"StripeConnectPopup_benefits__xZRIA",benefit:"StripeConnectPopup_benefit__TS0Pu",buttons:"StripeConnectPopup_buttons__ZEyxB",error:"StripeConnectPopup_error__2lphs"}},99128:function(e){e.exports={wrapper:"TradieBankInfoCopyPopup_wrapper__egfXC",title:"TradieBankInfoCopyPopup_title__AhzoQ",fields:"TradieBankInfoCopyPopup_fields__wEfMO",button:"TradieBankInfoCopyPopup_button__YIDnQ",submitButton:"TradieBankInfoCopyPopup_submitButton__mC5G4"}},27791:function(e){e.exports={wrapper:"BalanceDue_wrapper__X3ZED",title:"BalanceDue_title__v93Hu",date:"BalanceDue_date__q_jqA",money:"BalanceDue_money__f7_XQ"}},23089:function(e){e.exports={wrapper:"CounterButtonsWithInput_wrapper__Du7AV",block:"CounterButtonsWithInput_block__IxNOE",inputWrapper:"CounterButtonsWithInput_inputWrapper__Ie_Xr",input:"CounterButtonsWithInput_input__XzTqw"}},82864:function(e){e.exports={wrapper:"HintWithInfoIcon_wrapper__MZaN0",hint:"HintWithInfoIcon_hint__q_CSk",triangle:"HintWithInfoIcon_triangle__J3Gdv",showHint:"HintWithInfoIcon_showHint__VROti",description:"HintWithInfoIcon_description__dqdd1",icon:"HintWithInfoIcon_icon__WL8S0",boldType:"HintWithInfoIcon_boldType___hodb",isHitntOnRight:"HintWithInfoIcon_isHitntOnRight__MN6qq"}},12516:function(e){e.exports={overflow:"PointerDrawer_overflow__a8UKM"}},41158:function(e){e.exports={wrapper:"UserSign_wrapper__nyKFa",icon:"UserSign_icon__7LHKx",info:"UserSign_info__YPu70",label:"UserSign_label__JlfJd",by:"UserSign_by__DkkRh"}},78307:function(e){e.exports={item:"ChooseMode_item__Vugp5",sign:"ChooseMode_sign__hFDro"}},54093:function(e){e.exports={wrapper:"CreateDigitalSignaturePopup_wrapper__6CLln",inputs:"CreateDigitalSignaturePopup_inputs__msl7L",hint:"CreateDigitalSignaturePopup_hint__F4vjE",tabs:"CreateDigitalSignaturePopup_tabs__EW25X",tab:"CreateDigitalSignaturePopup_tab__zMxnl",selected:"CreateDigitalSignaturePopup_selected__gOzRF",saveBtn:"CreateDigitalSignaturePopup_saveBtn__k18Bs",title:"CreateDigitalSignaturePopup_title__P05zr"}},85735:function(e){e.exports={placeholder:"UsedBeforeSection_placeholder___jXcn"}},82981:function(e){e.exports={wrapper:"WriteMode_wrapper__G_Ou_",drawer:"WriteMode_drawer__yMAsu",img:"WriteMode_img__CBwWT",clear:"WriteMode_clear__h2E1h",history:"WriteMode_history__BXW8N",historyBtn:"WriteMode_historyBtn__sgxCF",rotate:"WriteMode_rotate__kCaQt"}},29880:function(e){e.exports={error:"Error_error__frdsE"}},5149:function(e){e.exports={wrapper:"AllowInPersonPayment_wrapper__mVL3h",text:"AllowInPersonPayment_text__PgjAW",hint:"AllowInPersonPayment_hint__84okb"}},41182:function(e){e.exports={wrapper:"AllowOnlinePayment_wrapper__NvKb_",text:"AllowOnlinePayment_text__MjjEU",hint:"AllowOnlinePayment_hint__J2cAb"}},8218:function(e){e.exports={wrapper:"BankDetails_wrapper__b5r1x",flex:"BankDetails_flex__CHw9N",title:"BankDetails_title__HOJhd",spinner:"BankDetails_spinner__Dqo4l"}},33420:function(e){e.exports={wrapper:"CitizenDigitalSignature_wrapper__a2PzK"}},96032:function(e){e.exports={picker:"DepositDate_picker__LBFtf"}},72796:function(e){e.exports={wrapper:"DepositSelect_wrapper__ULTho",selectWrapper:"DepositSelect_selectWrapper__1rB6f",select:"DepositSelect_select__bzsUg"}},63580:function(e){e.exports={invoiceHeader:"ExternalQuoteCheck_invoiceHeader__NeTIs",invoiceTitle:"ExternalQuoteCheck_invoiceTitle__63gbr",underTable:"ExternalQuoteCheck_underTable___m4u7",rightBlock:"ExternalQuoteCheck_rightBlock__UkcAe",layout:"ExternalQuoteCheck_layout__kN6cW",logo:"ExternalQuoteCheck_logo__FCk17",deposit:"ExternalQuoteCheck_deposit__N5UVe"}},81095:function(e){e.exports={wrapper:"Flex_wrapper__T4st1",single:"Flex_single___hrug"}},66130:function(e){e.exports={picker:"InvoiceExpiryDatePicker_picker__PV354"}},99630:function(e){e.exports={wrapper:"Section_wrapper__tkR9h",center:"Section_center__BdX5q",column:"Section_column__KXnlW",title:"Section_title__2y8Yv",text:"Section_text__jR09W"}},45059:function(e){e.exports={wrapper:"InvoiceInfo_wrapper__QrL33",leftBlock:"InvoiceInfo_leftBlock__Dm4VL",rightBlock:"InvoiceInfo_rightBlock__7ol4_",from:"InvoiceInfo_from__JZmdr"}},56142:function(e){e.exports={cell:"Cell_cell__d6XsD",centered:"Cell_centered__ZDcdq",border:"Cell_border__Witcf",invalid:"Cell_invalid__2IbyJ",focused:"Cell_focused__r7QOS"}},99371:function(e){e.exports={head:"Head_head__YyuaM"}},64818:function(e){e.exports={centered:"Material_centered__Lhk_F",trash:"Material_trash__bkpWn",resetQuantityBtn:"Material_resetQuantityBtn__vSrUj",totalPlaceholder:"Material_totalPlaceholder__NpQcZ"}},72674:function(e){e.exports={total:"Total_total__KVzZY",totalPrice:"Total_totalPrice__jn7OL"}},59935:function(e){e.exports={wrapper:"MaterialsTable_wrapper__NJDur",table:"MaterialsTable_table__fTqIN",fullWidth:"MaterialsTable_fullWidth__2lVre",add:"MaterialsTable_add__dRXT9"}},94085:function(e){e.exports={wrapper:"MerchantFeeRadio_wrapper__HAuyq",radioBtns:"MerchantFeeRadio_radioBtns__uwcn_",label:"MerchantFeeRadio_label__j8IX_",hint:"MerchantFeeRadio_hint__kpsdt",text:"MerchantFeeRadio_text__A_uem"}},90133:function(e){e.exports={wrapper:"Material_wrapper__3fkpJ",description:"Material_description__nZ8br",footer:"Material_footer__Ympzt",footerInfo:"Material_footerInfo__zaBTz",quantity:"Material_quantity__iBgky",separator:"Material_separator__sxn07",icon:"Material_icon__fwp5V"}},94649:function(e){e.exports={wrapper:"MobileMaterials_wrapper__aofIN",add:"MobileMaterials_add__g8Mce"}},39134:function(e){e.exports={wrapper:"Record_wrapper___4DpY",bold:"Record_bold__QOKu8"}},93861:function(e){e.exports={wrapper:"PaymentInfo_wrapper__RCBMD",list:"PaymentInfo_list___Mzr7",title:"PaymentInfo_title__baKjU"}},54444:function(e){e.exports={wrapper:"RequireDigitalSignature_wrapper__HXQsa",text:"RequireDigitalSignature_text__2kGmH",hint:"RequireDigitalSignature_hint__Iy8Kn"}},32891:function(e){e.exports={text:"TermsAndConditions_text__DTM6r"}},60892:function(e){e.exports={title:"PayExternalQuote_title__KyoVh",buttons:"PayExternalQuote_buttons__jDyX9",paymentOptionText:"PayExternalQuote_paymentOptionText__NueZA",balanceDue:"PayExternalQuote_balanceDue__cs0wC",error:"PayExternalQuote_error__xd_If",spinner:"PayExternalQuote_spinner__6rQeK",paypalPlace:"PayExternalQuote_paypalPlace__sgDCO",loaded:"PayExternalQuote_loaded__AIeQ4"}},51373:function(e){e.exports={wrapper:"PayExternalQuotePopup_wrapper__cVFFH"}}}]);