PageSourceSearch

https://joinswapp.com/rental/_next/static/chunks/0-9c38ff079b0957ab.js

js joinswapp.com collected 2026-10-07 04:08:06 UTC 66,613 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="354d0494-89e7-433d-85af-c2bb0769d043",e._sentryDebugIdIdentifier="sentry-dbid-354d0494-89e7-433d-85af-c2bb0769d043")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[0],{20466:function(e,n,t){t.d(n,{Z:function(){return r}});var i=t(19013),o=t(13882);function r(e){return(0,o.Z)(1,arguments),(0,i.Z)(e).getDay()}},313:function(e,n,t){t.d(n,{Z:function(){return r}});var i=t(19013),o=t(13882);function r(e,n){(0,o.Z)(2,arguments);var t=(0,i.Z)(e),r=(0,i.Z)(n);return t.getTime()<r.getTime()}},25508:function(e,n,t){t.d(n,{h:function(){return I}});var i=t(85893);let o=()=>(0,i.jsx)("svg",{width:"19",height:"18",viewBox:"0 0 19 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M8.18311 0.362793C8.81199 -0.12096 9.68789 -0.120718 10.3169 0.362793L16.2036 4.89111L18.2007 6.38818C18.532 6.63672 18.5986 7.1076 18.3501 7.43896C18.1015 7.77005 17.6316 7.83683 17.3003 7.58838L16.5005 6.98877V15.9888C16.5004 16.9552 15.7169 17.7387 14.7505 17.7388H3.75049C2.78404 17.7388 2.00057 16.9552 2.00049 15.9888V6.98877L1.20068 7.58838C0.869321 7.8369 0.398434 7.77031 0.149902 7.43896C-0.0986241 7.10759 -0.0310791 6.63671 0.300293 6.38818L2.29639 4.89111L8.18311 0.362793ZM9.40283 1.55225C9.31298 1.48313 9.188 1.48315 9.09814 1.55225L3.50049 5.85791V15.9888C3.50057 16.1268 3.61247 16.2388 3.75049 16.2388H6.00049V9.98877C6.00049 9.02227 6.78399 8.23877 7.75049 8.23877H10.7505C11.7169 8.23886 12.5005 9.02233 12.5005 9.98877V16.2388H14.7505C14.8885 16.2387 15.0004 16.1267 15.0005 15.9888V5.85791L9.40283 1.55225ZM7.75049 9.73877C7.61242 9.73877 7.50049 9.8507 7.50049 9.98877V16.2388H11.0005V9.98877C11.0005 9.85075 10.8885 9.73886 10.7505 9.73877H7.75049Z",fill:"#28333E"})});var r=t(95795),a=t(82729),l=t(32125);function d(){let e=(0,a._)(["\n    border-radius: 12px;\n    border: 1px solid rgba(0, 0, 0, 0.15);\n    padding: 0.75rem;\n    display: flex;\n    flex-direction: column;\n    gap: 0.75rem 0.75rem;\n"]);return d=function(){return e},e}function s(){let e=(0,a._)(["\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    gap: 0.75rem; /* 12px / 16px = 0.75rem */\n    flex: 1 0 0;\n"]);return s=function(){return e},e}function c(){let e=(0,a._)(["\n    display: flex;\n    align-items: center;\n    gap: 0.25rem; /* 4px / 16px = 0.25rem */\n"]);return c=function(){return e},e}function u(){let e=(0,a._)(["\n    display: flex;\n    flex-direction: column;\n    align-items: flex-start;\n    gap: 0.25rem; /* 4px / 16px = 0.25rem */\n"]);return u=function(){return e},e}function f(){let e=(0,a._)(["\n    display: flex;\n    gap: 0.75rem;\n"]);return f=function(){return e},e}let g=l.default.div.withConfig({componentId:"sc-5736f7fd-0"})(d()),m=l.default.article.withConfig({componentId:"sc-5736f7fd-1"})(s()),h=l.default.div.withConfig({componentId:"sc-5736f7fd-2"})(c()),v=l.default.div.withConfig({componentId:"sc-5736f7fd-3"})(u()),p=l.default.div.withConfig({componentId:"sc-5736f7fd-4"})(f());var x=t(42647),y=t(30390),C=t(1922),b=t(10781);function j(){let e=(0,a._)(["\n    border-radius: 0.75rem;\n    background-color: ",";\n    padding: 0.25rem 0.5rem;\n"]);return j=function(){return e},e}let k=e=>{let{text:n,backgroundColor:t="rgb(105, 182, 34)",tagTextColor:o}=e;return(0,i.jsx)(w,{backgroundColor:t,children:(0,i.jsx)(x.P3,{...o?{color:o}:{},children:n})})},w=l.default.div.withConfig({componentId:"sc-d9c688a1-0"})(j(),e=>{let{backgroundColor:n}=e;return n});var T=t(11163);let I=e=>{let{userName:n,driverType:t,status:a,headingText:l,infoText:d,buttonStyles:s,buttonText:c,tagTextColor:u,infoMessageBackgroun
1dColor:f,verificationData:j}=e,{t:w}=(0,C.$G)(),I=(0,T.useRouter)(),{city:D}=I.query,E=()=>{var e,n,i,o,a;let l=(null==j?void 0:null===(e=j.MAIN)||void 0===e?void 0:e.isTourist)?"Tourist":"Resident",d=null==j?void 0:null===(n=j.MAIN)||void 0===n?void 0:null===(i=n.status)||void 0===i?void 0:i.toLowerCase(),s=null==j?void 0:null===(o=j.MAIN)||void 0===o?void 0:null===(a=o.infoReviewStatus)||void 0===a?void 0:a.toLowerCase();"pending"===s&&("submitted"===d||"approved"===d||"not_started"===d)?I.push("/".concat((0,r.HL)(D),"/contact/update-contact-info-form")):"pending"===s&&"started"===d?I.push("/".concat((0,r.HL)(D),"/contact/update-contact-info-form")):["submitted","approved","resubmission_requested","declined","started"].includes(d)?I.push({pathname:"/".concat((0,r.HL)(D),"/new-verification"),query:{step:"3",userType:l,driverType:t}}):I.push({pathname:"/".concat((0,r.HL)(D),"/new-verification"),query:{driverType:t}})};return(0,i.jsxs)(g,{children:[(0,i.jsxs)(m,{children:[(0,i.jsxs)(p,{children:[(0,i.jsx)(h,{children:(0,i.jsx)(o,{})}),(0,i.jsxs)(v,{children:[(0,i.jsx)(x.P2,{fontWeight:"600",children:n}),(0,i.jsx)(x.P2,{color:"#6A5E5F",children:w("autoKyc.verificationStatusPrimaryDriverLabel","Main driver")})]})]}),(0,i.jsx)(p,{children:(0,i.jsx)(k,{tagTextColor:u,text:a.text,backgroundColor:a.backgroundColor})})]}),(0,i.jsx)("div",{children:(0,i.jsx)(y.$J,{backgroundColor:f,padding:"8px",marginTop:"0",text:d||"",headingText:l||"",subTextColor:"#74808B"})}),(0,i.jsx)("div",{children:c&&(0,i.jsx)(b.z,{buttonText:c||w("autoKyc.verificationStatusStartVerificationButton","Start verification"),backgroundColor:"solid"===s?"#01342D":"#fff",buttonTextColor:"solid"===s?"#00E784":"#000000",onClick:E})})]})}},40721:function(e,n,t){t.d(n,{Z:function(){return y}});var i=t(85893),o=t(42647),r=t(82729),a=t(32125);function l(){let e=(0,r._)(["\n    border: 1px solid #e5e5e5;\n    border-radius: 0.75rem;\n    padding: 1rem;\n"]);return l=function(){return e},e}function d(){let e=(0,r._)(["\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n"]);return d=function(){return e},e}function s(){let e=(0,r._)([""]);return s=function(){return e},e}function c(){let e=(0,r._)(["\n    display: flex;\n    justify-content: space-between;\n    align-items: center;\n"]);return c=function(){return e},e}let u=a.default.div.withConfig({componentId:"sc-c8c7538d-0"})(l()),f=a.default.div.withConfig({componentId:"sc-c8c7538d-1"})(d()),g=a.default.div.withConfig({componentId:"sc-c8c7538d-2"})(s()),m=a.default.div.withConfig({componentId:"sc-c8c7538d-3"})(c());var h=t(91931),v=t(48127),p=t(80868),x=t(76395);function y(e){var n;let{paymentInfo:t,currency:r}=e,{t:a}=(0,x.$G)(),{isRTL:l}=(0,p.zT)(),{totalPaidTillNow:d=0,lastTransaction:s,amountOnHold:c=0,bookingStatus:y}=t;return(0,i.jsxs)(u,{"data-testid":"payment-widget-container",children:[(0,i.jsxs)(f,{"data-testid":"payment-widget-header",children:[(0,i.jsx)("div",{children:(0,i.jsx)(o.H4,{className:"mt-0 mb-1","data-testid":"payment-widget-header-title",children:y===h.i8.PENDING_APPROVAL?a("amountOnHold","Amount on Hold"):a("totalPaidTillNow","Total Paid till now")})}),(0,i.jsx)("div",{children:(0,i.jsxs)(o.H3,{className:"mt-0 mb-2","data-testid":"payment-widget-header-amount",children:[r," ",y===h.i8.PENDING_APPROVAL?null==c?void 0:c.toLocaleString():null==d?void 0:d.toLocaleString()]})})]}),s&&(0,i.jsxs)(g,{"data-testid":"payment-widget-body",children:[(0,i.jsxs)(o.P3,{margin:"0.5rem 0 0.3725rem 0","data-testid":"payment-widget-last-transaction-title",children:[" ",a("lastTransaction","Last Transaction")]}),(0,i.jsxs)(m,{"data-testid":"payment-widget-last-transaction-content",children:[(0,i.jsx)("div",{children:(0,i.jsxs)(o.P4,{className:"m-0","data-testid":"payment-widget-invoice-id",children:[a("invoice","Invoice")," #",s.id]})}),(0,i.jsx)("div",{children:(0,i.jsxs)(o.P4,{className:"m-0","data-testid":"payment-widget-invoice-amount",children:[r," ",null===(n=s.grossAmount)||void 0===n?void 0:n.toLocaleString()]})})]}),(0,i.jsx)(o.P4,{className:"m-0",color:"rgba(72, 72, 72, 1)","data-testid":"payment-widget-invoice-date",children:s.createdAt&&(0,v.SD)(s.createdAt,l)})]})]})}},78806:function(e,n,t){t.d(n,{q:function(){return c}});var i=t(82729),o=t(85893),r=t(64315);t(67294);var a=t(32125),l=t(5823),d=t(63843);function s(){let e=(0,i._)(["\n    z-index: 50;\n    inset: 0;\n    background: white;\n    border-radius: 24px 24px 0px 0px;\n"]);return s=function(){return e},e}let c=e=>{let{children:n}=e,{bookingState:t,bookingDispatch:i}=(0,r.j1)();return((0,d.Z)(()=>i((0,r.iC)(!1))),t.slideUpModalOpen)?(0,o.jsx)(l.u,{wrapperComponent:u,children:n}):null},u=a.default.div.attrs({className:"mobile-popup"}).withConfig({componentId:"sc-9db67ef8-0"})(s())},20712:function(e,n,t){t.d(n,{p:function(){return W}});var i=t(85893);t(67294);var o=t(11163),r=t(42647),a=t(78816),l=t(1922),d=t(73129),s=t(95795),c=t(6789),u=t(55519),f=t(91803),g=t(2942),m=t(81781),h=t(56757);let v=e=>{let{color:n="#28333E"}=e;return(0,i.jsxs)("svg",{width:"13.2",height:"13.2",viewBox:"0 0 13.2 13.2",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M6.6 12.6C9.91371 12.6 12.6 9.91371 12.6 6.6C12.6 3.28629 9.91371 0.6 6.6 0.6C3.28629 0.6 0.6 3.28629 0.6 6.6C0.6 9.91371 3.28629 12.6 6.6 12.6Z",stroke:n,strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M6.6 4.19998V6.59998",stroke:n,strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M6.6 9.00002H6.6065",stroke:n,strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})};var p=t(92547),x=t(92236),y=t(77716),C=t(11973),b=t(82729),j=t(32125);function k(){let e=(0,b._)(["\n    display: flex;\n    flex-direction: column;
1\n    align-items: flex-start;\n    gap: 1rem;\n    width: 100%;\n"]);return k=function(){return e},e}function w(){let e=(0,b._)(["\n    display: flex;\n    flex-direction: column;\n    align-items: flex-start;\n    gap: 0.5rem;\n    width: 100%;\n"]);return w=function(){return e},e}function T(){let e=(0,b._)(["\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    width: 1.5rem;\n    height: 1.5rem;\n    flex-shrink: 0;\n    border-radius: 50%;\n    background: ",";\n"]);return T=function(){return e},e}function I(){let e=(0,b._)(["\n    width: 100%;\n    padding: 0.6875rem 1rem;\n    border-radius: 0.5rem;\n    border: none;\n    background: #00342c;\n    color: #00e784;\n    font-family: var(--font-inter-600);\n    font-weight: 600;\n    font-size: 0.875rem;\n    line-height: 1.125rem;\n    cursor: pointer;\n"]);return I=function(){return e},e}function D(){let e=(0,b._)(["\n    display: flex;\n    align-items: flex-start;\n    gap: 0.25rem;\n    width: 100%;\n    padding: 0.25rem;\n    border-radius: 0.5rem;\n    background: #ffefea;\n"]);return D=function(){return e},e}function E(){let e=(0,b._)(["\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    width: 1.5rem;\n    height: 1.5rem;\n    flex-shrink: 0;\n"]);return E=function(){return e},e}function S(){let e=(0,b._)(["\n    display: flex;\n    flex: 1 0 0;\n    min-width: 0;\n    flex-direction: column;\n    align-items: flex-start;\n"]);return S=function(){return e},e}function P(){let e=(0,b._)(["\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n    height: 1.5rem;\n    width: 100%;\n"]);return P=function(){return e},e}let A=j.default.div.withConfig({componentId:"sc-a964746e-0"})(k()),H=j.default.div.withConfig({componentId:"sc-a964746e-1"})(w()),N=j.default.div.withConfig({componentId:"sc-a964746e-2"})(T(),e=>{let{background:n}=e;return n}),R=j.default.button.withConfig({componentId:"sc-a964746e-3"})(I()),L=j.default.div.withConfig({componentId:"sc-a964746e-4"})(D()),M=j.default.div.withConfig({componentId:"sc-a964746e-5"})(E()),_=j.default.div.withConfig({componentId:"sc-a964746e-6"})(S()),O=j.default.div.withConfig({componentId:"sc-a964746e-7"})(P()),F=(e,n)=>e&&e!==f.fH.NOT_STARTED?e===f.fH.IN_PROGRESS?y.p2.IN_PROGRESS:e===f.fH.REJECTED?y.p2.REJECTED:e===f.fH.NEEDS_RESUBMISSION?y.p2.ACTION_NEEDED:y.p2.RESOLVED:n===f.Fk.CONTINUE_VERIFICATION?y.p2.IN_PROGRESS:y.p2.NOT_STARTED,B=(e,n)=>e===f.fH.VERIFIED?{variant:y.hL.APPROVED,label:n("autoKyc.verificationStatusApprovedBadge","Approved")}:{variant:y.hL.UNDER_REVIEW,label:n("autoKyc.verificationStatusUnderReviewBadge","Under review")},Z=()=>{let{t:e}=(0,l.$G)();return(0,i.jsxs)(L,{children:[(0,i.jsx)(M,{children:(0,i.jsx)(v,{})}),(0,i.jsxs)(_,{children:[(0,i.jsx)(O,{children:(0,i.jsx)(r.P4,{fontWeight:"500",color:"#191c1f",children:e("kycCardVerificationFailed","Verification Failed")})}),(0,i.jsx)(r.P4,{fontWeight:"400",color:"#6a5e5f",children:e("kycCardRejectedMessage","Your KYC verification has been rejected. For assistance, please contact support.")})]})]})},V=e=>{let{onContinue:n}=e,{t}=(0,l.$G)();return(0,i.jsxs)(C.Zb,{children:[(0,i.jsx)(N,{background:"#F79009",children:(0,i.jsx)(h.$,{color:"#FFFFFF"})}),(0,i.jsxs)(A,{children:[(0,i.jsxs)(H,{children:[(0,i.jsx)(r.H3,{color:a.O.gray[900],children:t("kycCardActionNeededTitle","Action needed on your ID verification")}),(0,i.jsx)(r.P4,{color:a.O.gray[700],children:t("kycCardActionNeededBody","Some documents need to be uploaded again")})]}),(0,i.jsx)(R,{type:"button",onClick:n,children:t("kycCardContinueVerification","Continue verification")})]})]})},W=e=>{var n,t,h;let{bookingId:v,verificationId:b,secondaryVerificationId:j,handoverDate:k,infoReviewStatus:w}=e,{t:T}=(0,l.$G)(),I=(0,o.useRouter)(),{user:D}=(0,d.aC)(),{data:E}=(0,u.P4)(b),{data:S}=(0,u.P4)(null!=j?j:null),{data:P,isSuccess:N}=(0,u.tS)(b),{data:L,isSuccess:M}=(0,u.tS)(null!=j?j:null),{data:_}=(0,u.Pp)(),O=e=>{var n;return null===(n=null==_?void 0:_.find(n=>n.verificationId===e))||void 0===n?void 0:n.kind},W=(e,n)=>{I.push({pathname:"/".concat((0,s.HL)(I.query.city),"/auto-kyc/").concat(e,"/").concat(v),...n?{query:{step:n}}:{}})},G=()=>{if("PENDING"===w){I.push({pathname:"/".concat((0,s.HL)(I.query.city),"/contact/update-contact-info-form")});return}W(b)};if(!E||!N||j&&!M)return(0,i.jsx)(C.Zb,{style:{alignItems:"center",justifyContent:"center",minHeight:"5rem"},children:(0,i.jsx)(c.C,{color:"#00342c",height:24})});if(P.length>0)return(0,i.jsx)(V,{onContinue:()=>W(b,x.R.documentStatus)});let U=F(E.status,O(b));if(U===y.p2.NOT_STARTED)return(0,i.jsxs)(C.Zb,{children:[(0,i.jsx)(g.I,{}),(0,i.jsxs)(A,{children:[(0,i.jsxs)(H,{children:[(0,i.jsx)(r.H3,{color:a.O.gray[900],children:T("kycCardVerifyTitle","Verify your documents to get your car")}),(0,i.jsx)(r.P4,{color:a.O.gray[700],children:T("kycCardVerifyBody","We check your ID and licence before handover. Both drivers need to be verified, starting with you.")})]}),(0,i.jsx)(R,{type:"button",onClick:G,children:T("autoKyc.verificationStatusStartVerificationButton","Start verification")})]})]});if(U===y.p2.IN_PROGRESS)return(0,i.jsxs)(C.Zb,{children:[(0,i.jsx)(g.I,{}),(0,i.jsxs)(A,{children:[(0,i.jsxs)(H,{children:[(0,i.jsx)(r.H3,{color:a.O.gray[900],children:T("kycCardFinishTitle","Finish verifying your documents")}),(0,i.jsx)(r.P4,{color:a.O.gray[700],children:k?T("kycCardFinishBodyWithDate","We need this before your handover on {{date}}.",{date:k}):T("kycCardFinishBody","We need this before your handover.")})]}),(0,i.jsx)(R,{type:"button",onClick:()=>W(b),children:T("kycCardContinueVerification","Continue verification")})]})]});if(U===y.p2.ACTION_NEEDED)return(0,i.jsx)(V,{onContinue:()=>W(b)});let Y="".concat(null!==(n=null==D?void 0:D.firstName)&&void 0!==n?n:""," ").concat(null!==(t=null==D?void 0:D.lastName)&&void 0!==t?t:"").trim(),K=U===y.p2.REJECTED?{variant:y.hL.REJECTED,label:T("kycCardRejectedBadge","Rejected")}:B(E.status,T),z=(null!==(h=null==L?void 0:L.length)&&void 0!==h?h:0)>0,q=j?z?y.p2.ACTION_NEEDED:F(null==S?void 0:S.status,O(j)):null,$=O(b)===f.Fk.FINALIZING_BOOKING;return(0,i.jsxs)(C.Zb,{style:$?{gap:"1.25rem"}:void 0,children:[$&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m.u,{color:a.O.gray[900]}),(0,i.jsxs)(H,{children:[(0,i.jsx)(r.H4,{color:a.O.gray[900],children:T("kycBanner.finalizingBooking","We’re finalizing your booking")}),(0,i.jsx)(r.P4,{color:a.O.gray[600],children:T("kycCardFinalizingBody","No other documents required for your main driver. We’ll let you know as soon as your booking is ready.")})]})]}),(0,i.jsxs)(C.Am,{children:[(0,i.jsxs)(C.lG,{children:[(0,i.jsx)(C.qE,{children:Y.charAt(0).toUpperCase()}),(0,i.jsxs)("div",{children:[(0,i.jsx)(r.P3,{fontSize:"0.875rem",color:a.O.gray[900],children:Y}),(0,i.jsx)(r.P4,{fontWeight:"400",color:a.O.gray[700],children:T("autoKyc.verificationStatusPrimaryDriverLabel","Main driver")})]})]}),(0,i.jsx)(C.Ct,{variant:K.variant,children:K.label})]}),U===y.p2.REJECTED&&(0,i.jsx)(Z,{}),j&&q&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(C.nq,{}),(0,i.jsxs)(C.Am,{children:[(0,i.jsxs)(C.lG,{children:[(0,i.jsx)(C.tY,{children:(0,i.jsx)(p.w,{})}),(0,i.jsxs)("div",{children:[(0,i.jsx)(r.P3,{fontSize:"0.875rem",color:a.O.gray[900],children:T("autoKyc.verificationStatusSecondary
1DriverLabel","Secondary driver")}),(q===y.p2.NOT_STARTED||q===y.p2.IN_PROGRESS)&&(0,i.jsx)(r.P4,{fontWeight:"400",color:a.O.gray[700],children:T("kycCardSecondaryNeedsDocs","We need documents before they can drive")})]})]}),q===y.p2.RESOLVED&&S&&(0,i.jsx)(C.Ct,{variant:B(S.status,T).variant,children:B(S.status,T).label}),q===y.p2.ACTION_NEEDED&&(0,i.jsx)(C.Ct,{variant:y.hL.ACTION_NEEDED,children:T("kycCardActionNeededBadge","Action needed")}),q===y.p2.REJECTED&&(0,i.jsx)(C.Ct,{variant:y.hL.REJECTED,children:"Rejected"})]}),q===y.p2.REJECTED&&(0,i.jsx)(Z,{}),(q===y.p2.NOT_STARTED||q===y.p2.IN_PROGRESS||q===y.p2.ACTION_NEEDED)&&(0,i.jsx)(C.AD,{type:"button",onClick:()=>W(j,z?x.R.documentStatus:void 0),children:q===y.p2.NOT_STARTED?"Start verification":"Continue verification"})]})]})}},5e4:function(e,n,t){t.d(n,{s:function(){return eA},Z:function(){return eN}});var i,o,r=t(82729),a=t(85893),l=t(12127),d=t(96486),s=t(11163),c=t(88767),u=t(80868),f=t(30804),g=t(76395),m=t(68614),h=t(82708),v=t(13722),p=t(73712),x=t(84065),y=t(52246),C=t(89167),b=t(67294),j=t(2336),k=t(14802),w=t(45741),T=t(9593),I=t(91931),D=t(10574),E=t(32025),S=t(33604),P=t(11889),A=t(713),H=t(38836),N=t(43073),R=t(14370),L=t(75090),M=t(57868),_=t(32125),O=t(79554),F=t(32912),B=t(42647);function Z(){let e=(0,r._)(["\n    * {\n        color: black;\n        font-size: 14px;\n    }\n\n    padding-top: 6px;\n"]);return Z=function(){return e},e}(i=o||(o={})).date="date",i.location="location";let V=e=>{var n;let{fromTime:t,toTime:i,date:r,addressLine1:l,addressLine2:d,editedLocation:s=!1,editedTime:c=!1,textColor:m,onEdit:h,isModalDateTimePickerDesktop:v,isSelfPickup:p=!1,selfPickupHandbackLocation:x,dateTimeSelectorOverlayProps:y,specTime:C,isHandbackDateChangeMode:j}=e,{t:T}=(0,g.$G)(),{citySettings:I}=(0,u.zT)(),D=(0,N.a)(R.Uh.laptop),{toPickerTime:_,toDate:Z}=(0,f.Rx)(),V=(0,b.useMemo)(()=>{if(C===k.mY.from)return p?null==t?void 0:t.displayStartTime:null==t?void 0:t.displayTimeRange;if(C===k.mY.to){let e=j?_:i;return p?null==e?void 0:e.displayStartTime:null==e?void 0:e.displayTimeRange}return""},[null==t?void 0:t.displayStartTime,null==t?void 0:t.displayTimeRange,j,p,C,_,i]),G=e=>{h&&h(e)},U=(0,b.useMemo)(()=>C===k.mY.from?"delivery":"return",[C]),Y=(0,b.useMemo)(()=>p?"self-pickup":"door-to-door",[p]),K=(0,b.useMemo)(()=>{let e=p?null==_?void 0:_.startDate:null==_?void 0:_.endDate;if((null==x?void 0:x.openingHours)&&e&&Z)for(let n of x.openingHours){let t=(0,w.Qd)(n.openingTime),i=(0,w.Qd)(n.closingTime);if((0,F.Z)(Z,"EEEE").toUpperCase()===n.dayOfWeek.toUpperCase()&&t.getTime()<=(null==e?void 0:e.getTime())&&i.getTime()>=(null==e?void 0:e.getTime()))return!0}return!1},[p,null==_?void 0:_.startDate,null==_?void 0:_.endDate,Z,null==x?void 0:x.openingHours]),z=D&&!(null==y?void 0:y.datePickerOverlay)||!D,q=c&&!D||c&&D&&!(null==y?void 0:y.datePickerOverlay);return(0,a.jsxs)(M.BD,{children:[q&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(M.TT,{children:(0,a.jsxs)(M.be,{children:[(0,a.jsx)("div",{children:(0,a.jsx)(P.E,{width:21,height:21})}),(0,a.jsxs)(M.kb,{padding:"0 20px",children:[(0,a.jsx)(L.xv,{children:T("bookingHandbackDateChangeInfoText","You can change the return date and time if the date should be later than {{ handbackChangeAfterLimitHours }} hours from now",{handbackChangeAfterLimitHours:null==I?void 0:I.handbackChangeAfterLimitHours})}),x&&!K&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(L.xv,{style:{marginTop:"5px",fontWeight:"bold",color:"var(--primaryColor)"},children:T("bookingHandbackDateChangeInfoTextLocationClosed","The delivery location is closed at the selected time! Please select another time.")})})]})]})})}),z&&(0,a.jsxs)(M.TT,{children:[(0,a.jsxs)(M.be,{children:[(0,a.jsx)("div",{children:(0,a.jsx)(S.Q,{})}),(0,a.jsxs)(M.kb,{children:[(0,a.jsx)(B.H3,{margin:"0 0 0.3rem","data-testid":"booking_page_daily_".concat(Y,"_").concat(U,"_date"),children:r}),(0,a.jsx)(B.P2,{color:m,"data-testid":"booking_page_daily_".concat(Y,"_").concat(U,"_time"),children:V})]})]}),c&&(0,a.jsxs)(L.nR,{onClick:()=>G(o.date),"data-testid":"booking_page_daily_".concat(Y,"_").concat(U,"_datetime-button"),children:[(0,a.jsx)(A.z,{}),(0,a.jsx)("span",{children:T("bookingHandbackDateChangeEdit","Edit")})]})]}),y&&D&&(0,a.jsx)(E.I,{onDatePickerSave:y.onDateSelect,isModalDateTimePickerDesktop:v,infoBoxText:p?T("handbackDateChangeWarning","Handback date should be later than {{ hours }} hours from now and from",{hours:null==I?void 0:I.handbackChangeAfterLimitHours})+" ".concat((0,F.Z)(new Date(y.bookingData.handoverTime),"yyyy-MM-dd HH:mm:ss"))+". "+T("handbackDateChangeWarningSelfPickupOpeningHours","Handback time must be in opening hours."):T("handbackDateChangeWarning","Handback date should be later than {{ hours }} hours from now and from",{hours:null==I?void 0:I.handbackChangeAfterLimitHours})+" ".concat((0,F.Z)(new Date(y.bookingData.handoverTime),"yyyy-MM-dd HH:mm:ss")),onlyReturnDateChange:!0,minBookingDays:0,minBookingFromDate:y.minBookingFromDateHandler}),(0,a.jsx)(L.Z0,{}),(0,a.jsxs)(M.TT,{children:[(0,a.jsxs)(M.be,{children:[(0,a.jsx)("div",{children:(0,a.jsx)(H.U,{})}),(0,a.jsxs)(M.kb,{children:[(0,a.jsx)(B.H3,{margin:"0 0 0.3rem","data-testid":"booking_page_daily_".concat(Y,"_").concat(U,"_title"),children:l}),(0,a.jsx)(B.P2,{"data-testid":"booking_page_daily_".concat(Y,"_").concat(U,"_subtitle"),children:d})]})]}),s&&(0,a.jsx)(L.nR,{onClick:()=>G(o.location),children:(0,a.jsx)(A.z,{})})]}),p&&(null==x?void 0:null===(n=x.openingHours)||void 0===n?void 0:n.length)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L.Z0,{}),(0,a.jsx)(M.TT,{children:(0,a.jsxs)(M.be,{children:[(0,a.jsx)("div",{children:(0,a.jsx)(P.
1E,{width:21,height:21})}),(0,a.jsxs)(M.kb,{padding:"0 20px",children:[(0,a.jsx)(M.lx,{children:T("bookingHandbackDateChangeEditOpeningHoursTitle","Location Opening Hours")}),(0,a.jsx)(W,{children:Object.keys(k.eO).map(e=>{var n;let t=null===(n=x.openingHours)||void 0===n?void 0:n.find(n=>n.dayOfWeek.toLowerCase()===e.toLowerCase());return(0,a.jsx)(O.V,{day:e,openHours:t},e)})})]})]})})]})]})},W=_.default.div.withConfig({componentId:"sc-6dc7339e-0"})(Z());var G=t(89806),U=t(58545),Y=t(20466),K=t(313),z=t(3151),q=t(64315),$=t(38113),Q=t(36741),J=t(17618),X=t(10736),ee=t(20992),en=t(64366),et=t(90492),ei=t(57346),eo=t(78806),er=t(44960),ea=t(68807),el=t(63843),ed=t(52693),es=t(58651),ec=t(48127),eu=t(22413),ef=t(5152),eg=t.n(ef),em=t(62869),eh=t(95075),ev=t(73129),ep=t(72739),ex=t(6789),ey=t(76116),eC=t(40721),eb=t(55264),ej=t(67675),ek=t(25508),ew=t(51768),eT=t(19980),eI=t(20712),eD=t(10781);function eE(){let e=(0,r._)(["\n    display: flex;\n    justify-content: center;\n    width: 100%;\n"]);return eE=function(){return e},e}let eS="booking-handback-section",eP=eg()(()=>t.e(4821).then(t.bind(t,24821)).then(e=>{let{ContactUsModal:n}=e;return n}),{loadableGenerated:{webpack:()=>[24821]},ssr:!1,loading:()=>(0,a.jsx)(eu.$,{marginTopBottom:0})}),eA=_.default.div.withConfig({componentId:"sc-8a97d0e6-0"})(eE()),eH=eg()(()=>t.e(8368).then(t.bind(t,78368)).then(e=>{let{CancellationModal:n}=e;return n}),{loadableGenerated:{webpack:()=>[78368]},ssr:!1,loading:()=>(0,a.jsx)(eu.$,{marginTopBottom:0})});function eN(e){var n,t,i,o,r,S,P,A,H,M,_,O,Z,W,eu,ef,eg,eE,eN,eR,eL,eM,e_,eO,eF,eB,eZ,eV,eW,eG,eU,eY,eK,ez,eq;let{bookingData:e$,bookingId:eQ,selfPickupHandoverLocation:eJ,selfPickupHandbackLocation:eX}=e;(0,es.n)();let{t:e0}=(0,g.$G)(),e1=(0,X.T)(),e9=(0,$.o)(),{push:e2}=(0,s.useRouter)(),{changeProductTo:e4,handlerFullScreenLoaderState:e5}=(0,ee.G)(),{citySettings:e8,formatDate:e3,isRTL:e6}=(0,u.zT)(),{user:e7,isCareem:ne}=(0,ev.aC)(),nn=ne?ec.aL:(null==e8?void 0:e8.timezone)||ec.aL,nt=(0,b.useRef)(null),{openFreshChat:ni,hideFreshChat:no}=(0,l.U)(),{enabled:nr}=(0,ea.S)(er.zO),{refundBooking:na,chargeBooking:nl,error:nd,setError:ns,modal3DSUrl:nc,showTemporarySuccess:nu,paymentMethodUpdate:nf,finalizeBookingExtension:ng,fetchPaymentMethodDetails:nm}=(0,C.o)();(0,b.useMemo)(()=>(0,d.debounce)(na,2e3,{leading:!0,trailing:!1}),[na]),(0,b.useMemo)(()=>(0,d.debounce)(nl,2e3,{leading:!0,trailing:!1}),[nl]);let nh=(0,b.useMemo)(()=>(0,d.debounce)(nf,2e3,{leading:!0,trailing:!1}),[nf]),{bookingDispatch:nv,bookingState:np}=(0,q.j1)(),nx=(null==e7?void 0:e7.userId)||"",[ny,nC]=(0,b.useState)(!1),[nb,nj]=(0,b.useState)(),{datePickerOverlay:nk,setDatepickerOverlay:nw,setFromDate:nT,setToDate:nI,setToTime:nD,setToPickerTime:nE,setFromPickerTime:nS,onClickedTime:nP,setOnClickedTime:nA,setTimeOptions:nH,setClosedDates:nN,addressDispatch:nR,toPickerTime:nL}=(0,f.Rx)(),[nM,n_]=(0,b.useState)(!1),[nO,nF]=(0,b.useState)(0),[nB,nZ]=(0,b.useState)(null),[nV,nW]=(0,b.useState)("intro"),[nG,nU]=(0,b.useState)({message:null,isError:!1}),{data:nY,refetch:nK}=(0,c.useQuery)(["bookingData",eQ],async()=>{let e=await h.s.getCustomerBookingById(eQ);return null==e?void 0:e.data},{initialData:e$,enabled:!!eQ,onError:e=>{let n=e.message||"";e1("Get booking data error. ".concat(n),k.v9.error,k.jw.PostbookingPage,Q.kv.DAILY)}}),nz=null!=nY?nY:e$,nq=!!eJ,n$=(0,N.a)(R.Uh.laptop),nQ=(null==nz?void 0:nz.selfPickupHandbackLocationId)===null&&(null==nz?void 0:nz.selfPickupHandoverLocationId)===null,nJ=(null==nz?void 0:nz.listingId)||0,{data:nX}=(0,c.useQuery)(["car",nJ],()=>h.s.getListingById(Number(nJ)),{enabled:!!nJ}),n0=null==nX?void 0:nX.data,{nameModelGeneration:n1,generation:n9}=(0,ei.G)(n0),{data:n2}=(0,c.useQuery)(["dateCalculation",eQ],()=>h.s.dateCalculationForBooking(eQ),{enabled:!!eQ}),{data:n4}=(0,c.useQuery)(["getRentalDetails",eQ],()=>j.Zb.getRentalDetails(nx,+eQ),{enabled:!!nx}),{data:n5}=(0,c.useQuery)(["getBookingDocuments",eQ],async()=>await h.s.getBookingDocuments(eQ),{enabled:!!nx}),{data:n8,isFetching:n3}=(0,c.useQuery)(["getPaymentMethodDetails",eQ],async()=>await nm(eQ),{enabled:!!eQ}),{data:n6}=(0,c.useQuery)(["getBookingPaymentDetails",eQ],async()=>await em.I.getPaymentsByBookingId(eQ),{enabled:!!eQ}),n7=null==e9?void 0:e9.city,te=null==n5?void 0:n5.data,tn=null==n4?void 0:n4.data,tt=null==n2?void 0:n2.data,ti=null==tn?void 0:tn.priceDetails,to=(null==tn?void 0:tn.currency)||G.OM,tr=e0((0,w.Ro)(to,k.tO.currency),to),ta=(0,ec.jq)(null==nz?void 0:nz.cancellationCutOff,nn,e6,e0),tl=null==nz?void 0:nz.cancellationFee,[td,ts]=(0,b.useState)(),[tc,tu]=(0,b.useState)(""),tf=null==n6?void 0:n6.data,tg=null==nz?void 0:nz.status,tm=null==nz?void 0:nz.roadsideAssistanceNumber,th=(null==n0?void 0:n0.productType)===Q.kv.DAILY,tv=(0,b.useMemo)(()=>
1{if(void 0!==(null==td?void 0:td.differenceToOriginal.totalRentalFee))return(null==td?void 0:td.differenceToOriginal.totalRentalFee)>0?m.Vg:m.Yq},[null==td?void 0:td.differenceToOriginal.totalRentalFee]),tp=null==n0?void 0:n0.supplierLocations.find(e=>(null==nz?void 0:nz.selfPickupHandbackLocationId)===e.id),tx=(0,b.useMemo)(()=>new Date(null==nz?void 0:nz.handoverTime),[null==nz?void 0:nz.handoverTime]),ty=(0,b.useMemo)(()=>new Date(null==nz?void 0:nz.handbackTime),[null==nz?void 0:nz.handbackTime]),tC=(0,b.useMemo)(()=>new Date(null==tt?void 0:tt.firstAvailableHandbackDate),[null==tt?void 0:tt.firstAvailableHandbackDate]),{data:tb}=(0,c.useQuery)({queryKey:["kycStatus"],queryFn:async()=>{let{data:e}=await ew.D.getKycStatus();return e}}),tj=(null==e8?void 0:e8.handbackChangeAfterLimitHours)||24,tk=(0,et.V)({handbackTime:null!==(eZ=null==nz?void 0:nz.handbackTime)&&void 0!==eZ?eZ:void 0,handoverTime:null==nz?void 0:nz.handoverTime,bookingStatus:tg,productType:null==nz?void 0:nz.productType}),tw=(0,b.useMemo)(()=>!tk&&[I.i8.ACTIVE,I.i8.APPROVED,I.i8.PENDING_APPROVAL,I.i8.PENDING_PAYMENT].includes(tg),[tg,tk]),tT=(0,b.useMemo)(()=>(0,ed.lT)(tx,(0,U.Z)(tx,(null==e8?void 0:e8.deliveryIntervalLengthMinutes)||120),!0),[null==e8?void 0:e8.deliveryIntervalLengthMinutes,tx]),tI=(0,b.useMemo)(()=>ty?(0,ed.lT)(ty,(0,U.Z)(ty,(null==e8?void 0:e8.deliveryIntervalLengthMinutes)||120),!0):void 0,[null==e8?void 0:e8.deliveryIntervalLengthMinutes,ty]),tD={fromTime:tT,date:e3(null==nz?void 0:nz.handoverTime),time:(null==nz?void 0:nz.handoverTime)?(0,w.LV)(tx,nQ):"",originalDate:new Date(null==nz?void 0:nz.handoverTime),addressLine1:nQ?null==nz?void 0:null===(n=nz.d2dHandoverAddress)||void 0===n?void 0:n.addressLine1:null==eJ?void 0:eJ.addressLine1,addressLine2:nQ?null==nz?void 0:null===(t=nz.d2dHandoverAddress)||void 0===t?void 0:t.addressLine2:null==eJ?void 0:eJ.addressLine2},tE={toTime:tI,date:e3(null==nz?void 0:nz.handbackTime),time:(null==nz?void 0:nz.handbackTime)?(0,w.LV)(ty,nQ):"",originalDate:(null==nz?void 0:nz.handbackTime)?new Date(null==nz?void 0:nz.handbackTime):void 0,addressLine1:nQ?null==nz?void 0:null===(i=nz.d2dHandbackAddress)||void 0===i?void 0:i.addressLine1:null==eX?void 0:eX.addressLine1,addressLine2:nQ?null==nz?void 0:null===(o=nz.d2dHandbackAddress)||void 0===o?void 0:o.addressLine2:null==eX?void 0:eX.addressLine2},[tS,tP]=(0,b.useState)({date:ty,time:ty,originalDate:ty,displayDate:tE.date,displayTime:tE.time,addressLine1:tE.addressLine1,addressLine2:tE.addressLine2}),tA=(0,b.useCallback)(e=>{let n=m.Fj[(0,Y.Z)(e)];if(nq&&tp){var t;let e=null===(t=tp.openingHours)||void 0===t?void 0:t.find(e=>e.dayOfWeek.toLowerCase()===n.toLowerCase());return{openingTime:(null==e?void 0:e.openingTime)||G.oh,closingTime:(null==e?void 0:e.closingTime)||G.Hi}}let i=null==e8?void 0:e8.businessHours[n.toUpperCase()];return{openingTime:(null==i?void 0:i.start)||G.oh,closingTime:(null==i?void 0:i.end)||G.Hi}},[null==e8?void 0:e8.businessHours,nq,tp]),tH=(0,b.useCallback)((e,n)=>{let t=(0,w.M)(e8,!nq,e,n);return nH(t),t},[e8,nq,nH]),{mutate:tN}=(0,c.useMutation)({mutationFn:async e=>{let{cancelReason:n=m.wG.toUpperCase(),cancelReasonDescription:t}=e;if(nz)return nC(!0),h.s.cancelBooking(+eQ,{cancellationReasonType:n,message:t})},onSuccess:()=>tW(),onError:e=>{var n;tV(),nC(!1);let t=(null===(n=e.response)||void 0===n?void 0:n.data)||e.message||"";e1("Error during cancellation. ".concat(JSON.stringify(t)),k.v9.error,k.jw.PostbookingPage,Q.kv.DAILY)}}),tR=(0,b.useCallback)(()=>{ty&&e8&&nE((0,ed.lT)(ty,(0,U.Z)(ty,null==e8?void 0:e8.deliveryIntervalLengthMinutes),!0)),tx&&e8&&nS((0,ed.lT)(tx,(0,U.Z)(tx,null==e8?void 0:e8.deliveryIntervalLengthMinutes),!0))},[e8,tx,ty,nS,nE]);(0,el.Z)(()=>nA(void 0)),(0,b.useEffect)(()=>{nv({type:q.KT.CHANGE_DELIVERY_TYPE,value:nq?m.v$:m.RW}),e4(Q.kv.DAILY)},[nv,e4,nq]),(0,b.useEffect)(()=>{nN((null==tt?void 0:tt.unavailableDates)?null==tt?void 0:tt.unavailableDates.map(e=>new Date(e)):[])},[null==tt?void 0:tt.unavailableDates,nN]),(0,b.useEffect)(()=>{nP&&tP(e=>({...e,...(null==e?void 0:e.date)&&(0,K.Z)(null==e?void 0:e.date,tC)&&{date:tC},...(null==e?void 0:e.date)&&(0,K.Z)(null==e?void 0:e.date,tC)&&{displayDate:e3(tC)},time:nP,displayTime:(0,w.LV)(nP,nQ)}))},[tC,e3,nQ,nP]),(0,b.useEffect)(()=>{(null==tp?void 0:tp.openingHours)&&nR({type:f.Ux.SET,name:f.DL.HANDOVER_ADDRESS,value:{openingHours:tp.openingHours}})},[nR,tp]),(0,b.useEffect)(()=>{tS.date&&nj(tS.date)},[tS.date]),(0,b.useEffect)(()=>{tR()},[tR]),(0,b.useEffect)(()=>
1{if(nT(tx),null==tt?void 0:tt.firstAvailableHandbackDate){if(tS.date&&tS.time){let e=(0,z.Z)(tC,tS.date)||(0,K.Z)(tS.date,tC),n=e?tC:tS.date;nI(n),nD(tS.time);let t=tA(n);tH((0,w.b$)(n,null==t?void 0:t.openingTime,e),(0,w.b$)(n,null==t?void 0:t.closingTime,e))}else{let e=(0,z.Z)(ty,tx),n=e?tC:ty;nI(n),nD(n);let t=tA(n);tH((0,w.b$)(n,null==t?void 0:t.openingTime,e),(0,w.b$)(n,null==t?void 0:t.closingTime,e))}}else nI(ty)},[tS.date,tS.time,tx,tC,tH,tA,null==tt?void 0:tt.firstAvailableHandbackDate,ty,nT,nI,nD]);let tL=(0,b.useCallback)(()=>{e5(!0),e2("/".concat(n7,"/booking/").concat(eQ,"/handback-date-change")).then(()=>e5(!1))},[n7,eQ,e5,e2]),tM=(null==e9?void 0:e9.extend)==="true";(0,b.useEffect)(()=>{tM&&(setTimeout(()=>{var e;return null===(e=document.getElementById(eS))||void 0===e?void 0:e.scrollIntoView({behavior:"smooth"})},500),nw(!0))},[tM,nw]);let t_=[...null!==(eV=null==n0?void 0:n0.photos)&&void 0!==eV?eV:[]].sort((e,n)=>e.position-n.position),tO={make:e0(null!==(eG=null!==(eW=null==n0?void 0:n0.makeI18nKey)&&void 0!==eW?eW:null==n0?void 0:n0.make)&&void 0!==eG?eG:"make",null!==(eU=null==n0?void 0:n0.make)&&void 0!==eU?eU:""),model:e0(null!==(eK=null!==(eY=null==n0?void 0:n0.modelI18nKey)&&void 0!==eY?eY:null==n0?void 0:n0.model)&&void 0!==eK?eK:"model",null!==(ez=null==n0?void 0:n0.model)&&void 0!==ez?ez:""),generation:n9,price:th?null==ti?void 0:ti.dailyPrice:null==ti?void 0:ti.monthlyPrice,totalRentalFee:null==ti?void 0:ti.totalRentalFeeAfterDiscount,currency:to,picture:t_,status:tg,bookingId:null==nz?void 0:nz.bookingId,tags:null!==(eq=null==n0?void 0:n0.tags)&&void 0!==eq?eq:[],isDaily:th},tF="".concat(null==tO?void 0:tO.make," ").concat(null==tO?void 0:tO.model," ").concat(null==tO?void 0:tO.generation),tB=async()=>{try{let{data:e}=await j.Zb.getCancellationConfig(nx,+eQ);return nZ(null!=e?e:null),nF((null==e?void 0:e.cancellationFee)||0),nW((0,ec.Qp)(null==e?void 0:e.handoverTime,nn)?"handoverPassed":"intro"),n_(!0),e}catch(t){let e=(0,w.cy)(t),n=(null==e?void 0:e.i18nKey)||"errorWhileCancellingBooking";return nU({message:e0(n,"Unexpected error occurred while cancelling the booking, please try again!"),isError:!0}),e1("Error accourd during cancellation. ".concat(JSON.stringify(e)),k.v9.error,k.jw.PostbookingPage,Q.kv.DAILY),n_(!0),null}},tZ=async()=>{await tB()},tV=()=>nU({message:e0("errorWhileCancellingBooking","Unexpected error occurred while cancelling the booking, please try again!"),isError:!0}),tW=()=>{nC(!1),nU({message:e0("successfulBookingCancellation","Booking successfully cancelled!"),isError:!1})},tG=e=>{if(e){let n=tA(e),t=(0,z.Z)(tC,e),i=t?tC:e,o=tH((0,w.b$)(i,null==n?void 0:n.openingTime,t),(0,w.b$)(i,null==n?void 0:n.closingTime,t)),r={...tS,displayDate:e3(e),date:e};o[0]?(nD(o[0]),tP({...r,time:o[0],displayTime:(0,w.LV)(o[0],nQ)})):tP(r)}},tU=(0,b.useCallback)(()=>{ne&&nr&&tg!==I.i8.PENDING_PAYMENT?(no(),nv((0,q.iC)(!0))):ni()},[nv,tg,no,ne,nr,ni]);if(!n0)return null;let tY=async()=>{let e=window.location.href,n="".concat(window.location.origin,"/rental/").concat(n7,"/profile/update-payment-success/?redirect-link=").concat(e),t=await nh(nx,eQ),i=e0("careemCtaPaymentMethod","Authorize 1 AED"),o=null==t?void 0:t.careemInvoiceId;o&&await ng(o,eQ,to,1,Q.kv.DAILY,n,i)},tK=()=>(e5(!0),e2("/".concat(n7,"/booking/").concat(eQ,"/payment-center?carName=").concat(tF)).then(()=>e5(!1))),tz=tx?new Date(tx).toLocaleString("en-GB",{day:"numeric",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"}):"";return(0,a.jsxs)(p.Z,{children:[!n$&&(0,a.jsx)(E.I,{onDatePickerSave:tG,onlyReturnDateChange:!0,minBookingDays:0,minBookingFromDate:tC,scrollToDate:nb,infoBoxText:nq?e0("handbackDateChangeWarning","Handback date should be later than {{ hours }} hours from now and from",{hours:tj})+" ".concat((0,F.Z)(new Date(null==nz?void 0:nz.handoverTime),"yyyy-MM-dd HH:mm:ss"))+". "+e0("handbackDateChangeWarningSelfPickupOpeningHours","Handback time must be in opening hours."):e0("handbackDateChangeWarning","Handback date should be later than {{ hours }} hours from now and from",{hours:tj})+" ".concat((0,F.Z)(new Date(null==nz?void 0:nz.handoverTime),"yyyy-MM-dd HH:mm:ss"))}),(0,a.jsx)(J.jf,{children:(0,a.jsxs)(J.vs,{children:[n$&&(0,a.jsxs)(J.tn,{children:[(0,a.jsx)("h1",{children:n1}),(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{children:e0("bookingPageBookingId","Booking ID:")}),(0,a.jsx)("span",{children:" "}),(0,a.jsx)("span",{"data-testid":"booking_booking-id",children:null==nz?void 0:nz.bookingId})]})]}),(0,a.jsx)(J.im,{children:(0,a.jsx)(y.T,{car:tO,totalPriceShown:!1,showPriceDetails:!1,badgeShown:!0,customClass:n$?"post-booking-page":"",bookingId:null==nz?void 0:nz.bookingId,tagShown:!1})}),(0,a.jsx)(J.jW,{margin:"0.75rem 0 0"}),(null==nz?void 0:null===(r=nz.kyc)||void 0===r?void 0:r.autoKycEnabled)?(0,a.jsxs)(J.Uq,{style:{marginBottom:"1rem"},children:[(0,a.jsx)(B.H2,{margin:"0.5rem 0 1rem",children:e0("bookingDetailsDrivers","Drivers")}),(0,a.jsx)(eI.p,{bookingId:null==nz?void 0:nz.bookingId,verificationId:null==nz?void 0:null===(S=nz.kyc)||void 0===S?void 0:S.verificationId,secondaryVerificationId:null==nz?void 0:null===(P=nz.kyc)||void 0===P?void 0:P.secondaryVerificationId,handoverDate:tz,infoReviewStatus:null==e7?void 0:e7.infoReviewStatus})]}):(null==tb?void 0:null===(A=tb.MAIN)||void 0===A?void 0:A.status)&&(0,eT.Z2)(tb.MAIN.status,null==tb?void 0:null===(H=tb.MAIN)||void 0===H?void 0:H.infoReviewStatus)&&(0,a.jsxs)(J.Uq,{style:{marginBottom:"1rem"},children:[(0,a.jsx)(B.H2,{margin:"0.5rem 0 1rem",children:e0("bookingDetailsDriverProfileKyc","Driver Profile / KYC")}),(0,a.jsx)(ek.h,{userName:(null==e7?void 0:e7.firstName)||"",driverType:"MAIN",status:{text:null===(M=(0,eT.Z2)(tb.MAIN.status,null==tb?void 0:null===(_=tb.MAIN)||void 0===_?void 0:_.infoReviewStatus))||void 0===M?void 0:M.text,backgroundColor:null===(O=(0,eT.Z2)(tb.MAIN.status,null==tb?void 0:null===(Z=tb.MAIN)||void 0===Z?void 0:Z.infoReviewStatus))||void 0===O?void 0:O.backgroundColor},infoText:null===(W=(0,eT.Z2)(tb.MAIN.status,null==tb?void 0:null===(eu=tb.MAIN)||void 0===eu?void 0:eu.infoReviewStatus))||void 0===W?void 0:null===(ef=W.infoText)||void 0===ef?void 0:ef.call(W,tz),headingText:null===(eg=(0,eT.Z2)(tb.MAIN.status,null==tb?void 0:null===(eE=tb.MAIN)||void 0===eE?void 0:eE.infoReviewStatus))||void 0===eg?void 0:eg.headingText,buttonStyles:null===(eN=(0,eT.Z2)(tb.MAIN.status,null==tb?void 0:null===(eR=tb.MAIN)||void 0===eR?void 0:eR.infoReviewStatus))||void 0===eN?void 0:eN.buttonStyles,buttonText:null===(eL=(0,eT.Z2)(tb.MAIN.status,null==tb?void 0:null===(eM=tb.MAIN)||void 0===eM?void 0:eM.infoReviewStatus))||void 0===eL?void 0:eL.buttonText,tagTextColor:null===(e_=(0,eT.Z2)(tb.MAIN.status,null==tb?void 0:null===(eO=tb.MAIN)||void 0===eO?void 0:eO.infoReviewStatus))||void 0===e_?void 0:e_.tagTextColor,infoMessageBackgroun
1dColor:null===(eF=(0,eT.Z2)(tb.MAIN.status,null==tb?void 0:null===(eB=tb.MAIN)||void 0===eB?void 0:eB.infoReviewStatus))||void 0===eF?void 0:eF.infoMessageBackgroundColor,verificationData:tb})]}),(0,a.jsx)(J.jW,{margin:"0"}),(0,a.jsxs)(J.Ll,{children:[(0,a.jsxs)(J.Uq,{children:[(0,a.jsx)(B.H2,{margin:"0.5rem 0 1rem",children:nq?e0("bookingConfirmationSummaryDeliverySelfPickup","Self Pickup"):e0("bookingConfirmationSummaryDelivery","Delivery")}),(0,a.jsx)(V,{...tD,isSelfPickup:nq,specTime:k.mY.from}),(0,a.jsx)(B.H2,{id:eS,children:e0("bookingConfirmationSummaryReturn","Return")}),(tw||!tk)&&(0,a.jsx)(J.TS,{children:(0,a.jsx)(B.P2,{textAlign:"start",children:e0("bookingWidget.extendNotPossible","Booking collection has already started. Please contact customer care for any modifications.")})}),(0,a.jsx)(V,{isModalDateTimePickerDesktop:!0,...tE,isSelfPickup:nq,selfPickupHandbackLocation:eX,editedTime:tk,onEdit:tL,dateTimeSelectorOverlayProps:{onDateSelect:tG,bookingData:nz,deliveryDate:tx,hasD2dDelivery:nQ,minBookingFromDateHandler:tC,datePickerOverlay:nk},specTime:k.mY.to})]}),(null==nz?void 0:nz.allowedKms)!==null&&(null==nz?void 0:nz.surchargeExtraKmsPerUnit)!==null&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(J.jW,{margin:"1.5rem 0 0"}),(0,a.jsxs)(J.im,{style:{maxWidth:n$?"96%":"unset",padding:n$?"0 16px":"none"},children:[(0,a.jsx)(B.H2,{margin:"1.25rem 0 0.75rem","data-testid":"mileage-heading",children:e0("mileage","Mileage")}),(0,a.jsxs)(J.Iy,{children:[(0,a.jsxs)(J.ID,{children:[(0,a.jsx)(B.P2,{color:"#000",fontWeight:"500",children:e0("includedMileage","Included mileage")}),(0,a.jsx)(B.P2,{color:"#000",fontWeight:"500",children:(null==nz?void 0:nz.surchargeExtraKmsPerUnit)===0?e0("mileageUnlimited","Unlimited"):"".concat((0,G.T4)((null==nz?void 0:nz.allowedKms)||0)," ").concat(e0("kmPerMonth","km / day"))})]}),(null==nz?void 0:nz.surchargeExtraKmsPerUnit)!==0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(J.Pf,{}),(0,a.jsxs)(J.$g,{children:[(0,a.jsxs)(J.ID,{style:{padding:"1rem 0 0.25rem"},children:[(0,a.jsx)(B.P4,{fontSize:"12px",fontWeight:"400",children:e0("additionalKm","Additional km")}),(0,a.jsxs)(B.P4,{fontSize:"12px",fontWeight:"400",children:[to," ",(0,G.T4)((null==nz?void 0:nz.surchargeExtraKmsPerUnit)||0)," / km"]}
1)]}),(0,a.jsx)(J.o5,{children:e0("mileageDescription","Distance beyond the included monthly mileage is charged at return.")})]})]})]})]})]}),tf&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(J.jW,{margin:"1.5rem 0 0"}),(0,a.jsxs)(J.im,{style:{margin:"0.25rem auto 2rem",maxWidth:"93%"},children:[(0,a.jsxs)(J.FT,{children:[(0,a.jsx)(B.H2,{margin:"1.25rem 0 0.75rem","data-testid":"payments-heading",children:e0("payments","Payments")}),(0,a.jsx)("div",{style:{cursor:"pointer"},onClick:()=>tK(),children:(0,a.jsxs)(J.S9,{"data-testid":"view-all-daily-payments-link",children:[e0("viewAll","View All")," ",(0,a.jsx)(eb.K,{style:{marginInlineStart:"0.25rem"}})]})})]}),(0,a.jsx)(eC.Z,{paymentInfo:tf,currency:tr})]})]}),(0,a.jsx)(J.jW,{margin:"0"}),ne&&(0,eT.pf)(tg)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(J.im,{style:{margin:"0.25rem auto 2rem",maxWidth:"93%"},children:[(0,a.jsx)(B.H2,{margin:"1.25rem 0 0.75rem",children:e0("paymentMethod","Payment Method")}),(0,a.jsx)(B.P2,{textAlign:"start",children:e0("paymentMethodUpdateDescription","Update your payment method")}),n3?(0,a.jsx)(ep.U,{children:(0,a.jsx)(eA,{children:(0,a.jsx)(ex.C,{height:20})})}):(null==n8?void 0:n8.lastFourDigits)&&(0,a.jsx)(ep.U,{children:(0,a.jsx)(ey.u,{cardData:n8})}),(0,a.jsx)(L.W4,{marginTop:"20px",justifyContent:"left",padding:"0",children:(0,a.jsx)(eD.z,{colored:!0,onClick:()=>tY(),buttonText:e0("updatePaymentMethod","Update Payment Method")})})]}),(0,a.jsx)(J.jW,{margin:"0"})]}),tc||nd?(0,a.jsx)(D.A,{text:tc||nd,setIsActive:()=>{tu(""),ns("")},isInline:!0}):null,nu?(0,a.jsx)(eh.d,{text:e0("WaitForConfirmation","Please wait for confirmation. Our support team will c
1ontact you shortly."),isInline:!0}):null,!nu&&(0,a.jsx)(a.Fragment,{children:tv===m.Yq&&(0,a.jsx)(J.Uq,{marginBottom:"10px",marginTop:"20px",children:(0,a.jsx)(v.v,{boxShadow:!0,color:"#FFFFFF",textColor:"#000000",iconColor:"#000000",infoText:"{t('bookingDetailsRefundWithinFiveDays', 'You will receive the refund within 5 working days to the specified account number')}"})})}),(0,a.jsx)(T.a,{show:!!tm,title:e0("bookingRoadsideAssistanceTitle","Roadside Assistance"),description:e0("bookingRoadsideAssistanceDescription","Car broke down? We are here to help you right now."),children:(0,a.jsxs)(J.jN,{className:"phoneNumber",children:[(0,a.jsx)(x.L,{color:"var(--secondaryLightTextColor)"}),(0,a.jsx)(J.Fg,{style:{fontWeight:600},href:"tel:".concat(tm),children:(0,a.jsx)("span",{children:tm})})]})}),tg!==I.i8.CANCELLED&&tg!==I.i8.COMPLETED&&tg!==I.i8.ACTIVE&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(J.jW,{margin:"1rem 0"}),(0,a.jsxs)(J.$t,{children:[(0,a.jsx)(B.H2,{margin:"0",children:e0("bookingConfirmationCancellationHeadline","Cancellation policy")}),(0,a.jsx)(J.lW,{$preserveLineBreaks:!0,children:ta&&null!=tl?e0("dailyBookingCancellationPolicyWithFee","Don't need the car anymore? You can cancel your car rental for free before {{cutoffTime}}.\n\nCancelling your rental later than {{cutoffTime}} would result in a cancellation fee of {{currency}} {{fee}}.",{cutoffTime:ta,currency:tr,fee:tl.toLocaleString()}):e0("bookingConfirmationCancellationText","Changed your mind? You can cancel your subscription no later than x days prior to delivery date free of charge.")}),(0,a.jsx)(J.Fg,{color:"#B81919",style:{color:"#B81919",fontWeight:600,lineHeight:"1.5rem",textDecoration:"underline",display:"block"},onClick:()=>tZ(),children:(0,a.jsx)("span",{children:e0("bookingConfirmationCancellation","Cancel booking")})})]})]}),!!(null==te?void 0:te.length)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(J.jW,{margin:"1.5rem 0 0"}),(0,a.jsx)(T.a,{show:!!(null==te?void 0:te.length),title:e0("bookingDocumentsSection","Documents"),description:"",isBottomBorderRadius:!0,children:(0,a.jsx)(J.sg,{children:te&&(0,a.jsx)(ej.d,{documentsArray:te,queriedCity:n7})})})]}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(J.jW,{margin:"1.5rem 0 0"}),(0,a.jsx)(T.a,{title:e0("bookingConfirmationSupport","Support"),description:e0("bookingConfirmationSupportDescription","Any questions about subscription? We are at your service every day."),isBottomBorderRadius:!0,children:(0,a.jsx)(eD.z,{width:"50%",buttonText:e0("bookingConfirmationSupportButton","Go to Support"),onClick:tU,margin:"1rem 0"})})]}),(0,a.jsx)(J.Mv,{}),nM&&(0,a.jsx)(eH,{setModal:n_,node:nt,status:null==nz?void 0:nz.status,bookingCancellationFinishedMessage:nG,closeModal:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(nU({message:null,isError:!1}),nW("intro"),n_(!1),e){e2("/".concat(n7));return}nK()},surchargeAmount:nO,currencyTranslated:tr,cancellationConfig:nB,bookingId:+eQ,userId:nx,confirmBookingCancellation:tN,isCancellationInProgress:ny,initialSheetStep:nV}),nc&&(0,a.jsx)(en.A,{url:nc})]})]})}),(0,a.jsx)(eo.q,{children:(0,a.jsx)(eP,{})})]})}},19980:function(e,n,t){t.d(n,{Z2:function(){return r},pf:function(){return a}});var i=t(91931);let o={NOT_STARTED:{text:"Documents required",infoText:()=>"To process your booking and secure your car delivery, please upload the required documents immediately.",backgroundColor:"rgba(255, 239, 157, 1)",buttonStyles:"solid",buttonText:"Start verification"},STARTED:{text:"In progress",infoText:e=>"You're almost there! Complete all uploads before ".concat(e||"[date]"," to secure your booking."),backgroundColor:"rgba(224, 240, 255, 1)",buttonStyles:"solid",buttonText:"Continue verification"},SUBMITTED:{text:"Sent for approval",infoText:()=>"Your documents have been sent for approval. We'll notify you as soon as your verification is complete.",backgroundColor:"rgba(145, 208, 255, 1)",buttonStyles:"light",buttonText:"View documents"},RESUBMISSION_REQUESTED:{text:"Needs resubmission",infoText:()=>"Some documents need fixing! Re-upload before handover date to avoid delays.",backgroundColor:"rgba(255, 230, 0, 1)",buttonStyles:"solid",buttonText:"Re submit documents"},DECLINED:{text:"Rejected",infoText:()=>"Your KYC verification has been rejected. For assistance, please contact support.",backgroundColor:"rgba(229, 28, 0, 1)",buttonStyles:"solid",buttonText:"",tagTextColor:"white",infoMessageBackgroun
1dColor:"rgba(255, 239, 234, 1)"},APPROVED:{text:"Approved",infoText:()=>"Your documents are approved, but please confirm your contact information.",backgroundColor:"#CDFEE1",buttonStyles:"solid",buttonText:"Confirm contact information",tagTextColor:"#0C5132",infoMessageBackgroundColor:"rgba(255, 239, 234, 1)"}},r=(e,n)=>{let t=o[e];if(t){if("SUBMITTED"===e&&"PENDING"===n)return{...t,headingText:"Please confirm your contact information.",infoText:()=>"While we review your documents, please confirm your contact information",buttonText:"Confirm contact information",buttonStyles:"solid",infoMessageBackgroundColor:"#FFFAEB"};if("APPROVED"===e&&"PENDING"===n)return{...t,headingText:"Please confirm your contact information.",infoText:()=>"Your documents are approved, but please confirm your contact information.",buttonText:"Confirm contact information",infoMessageBackgroundColor:"#FFFAEB"};if("APPROVED"===e&&"REVIEWED"===n)return;return t}},a=e=>{if(!e)return!0;let n=[i.i8.PENDING_PAYMENT,i.i8.PENDING_APPROVAL,i.i8.CANCELLED,i.i8.COMPLETED];return!n.includes(e)}},9593:function(e,n,t){t.d(n,{a:function(){return s}});var i=t(82729),o=t(85893),r=t(42647),a=t(14370);t(67294);var l=t(32125);function d(){let e=(0,i._)(["\n    background: white;\n    padding: 0 var(--padding);\n    @media (min-width: ",") {\n        padding: calc(var(--padding) / 2) var(--padding);\n        border-radius: ",";\n    }\n"]);return d=function(){return e},e}let s=e=>{let{children:n,title:t,description:i,show:a=!0,isBottomBorderRadius:l}=e;return a?(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(c,{isBottomBorderRadius:l,children:[(0,o.jsx)(r.H2,{margin:"1rem 0 0.75rem",children:t}),(0,o.jsx)(r.P2,{textAlign:"start",children:i}),n]})}):null},c=l.default.div.withConfig({componentId:"sc-b4ea5aec-0"})(d(),a.dp.laptop,e=>e.isBottomBorderRadius?"0 0 16px 16px;":"")},67675:function(e,n,t){t.d(n,{d:function(){return p}});var i=t(82729),o=t(85893);t(67294);let r=()=>(0,o.jsxs)("svg",{width:"18",height:"16",viewBox:"0 0 18 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("path",{d:"M9 13C11.2091 13 13 11.2091 13 9C13 6.79086 11.2091 5 9 5C6.79086 5 5 6.79086 5 9C5 11.2091 6.79086 13 9 13Z",fill:"#FF5A5A"}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 1C4 0.447715 4.44772 0 5 0H13C13.5523 0 14 0.447715 14 1C14 1.55228 14.4477 2 15 2H16C17.1046 2 18 2.89543 18 4V14C18 15.1046 17.1046 16 16 16H2C0.89543 16 0 15.1046 0 14V4C0 2.89543 0.895431 2 2 2H3C3.55228 2 4 1.55228 4 1ZM9 14C11.7614 14 14 11.7614 14 9C14 6.23858 11.7614 4 9 4C6.23858 4 4 6.23858 4 9C4 11.7614 6.23858 14 9 14ZM16 5C16 5.55228 15.5523 6 15 6C14.4477 6 14 5.55228 14 5C14 4.44772 14.4477 4 15 4C15.5523 4 16 4.44772 16 5Z",fill:"#FF5A5A"})]});var a=t(95795);let l=()=>(0,o.jsx)("svg",{width:"16",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 0H9.17C9.7 0 10.21 0.21 10.58 0.59L15.41 5.42C15.79 5.79 16 6.3 16 6.83V18C16 19.1 15.1 20 14 20H2C0.9 20 0 19.1 0 18V2C0 0.9 0.9 0 2 0ZM3.4481 13.1569V11.9384H3.72059C4.0943 11.9384 4.28115 12.1415 4.28115 12.5476C4.28115 12.7577 4.23184 12.9118 4.13323 13.0098C4.0398 13.1078 3.90226 13.1569 3.72059 13.1569H3.4481ZM2 11V16H3.4481V14.0952H3.95416C4.55105 14.0952 5.00261 13.9669 5.30883 13.7101C5.62025 13.4486 5.77596 13.0588 5.77596 12.5406C5.77596 12.3212 5.74482 12.1181 5.68254 11.9314C5.62025 11.7446 5.52164 11.5836 5.38669 11.4482C5.25693 11.3081 5.09084 11.1984 4.88842 11.119C4.686 11.0397 4.44724 11 4.17215 11H2ZM6.23616 11V16H8.33824C8.75866 16 9.08565 15.9323 9.31922 15.7969C9.55278 15.6569 9.72666 15.4725 9.84084 15.2437C9.96022 15.0103 10.0329 14.7442 10.0588 14.4454C10.0848 14.1419 10.0978 13.8268 10.0978 13.5C10.0978 13.1732 10.0848 12.8604 10.0588 12.5616C10.0329 12.2582 9.96022 11.9921 9.84084 11.7633C9.72666 11.5299 9.55278 11.3455 9.31922 11.2101C9.08565 11.07 8.75866 11 8.33824 
111H6.23616ZM7.68426 15.0616V11.9384H7.97232C8.11246 11.9384 8.22406 11.957 8.3071 11.9944C8.39015 12.0271 8.45243 12.0994 8.49395 12.2115C8.54067 12.3235 8.56921 12.4823 8.57959 12.6877C8.59516 12.8931 8.60295 13.1639 8.60295 13.5C8.60295 13.8361 8.59516 14.1069 8.57959 14.3123C8.56921 14.5177 8.54067 14.6765 8.49395 14.7885C8.45243 14.9006 8.39015 14.9753 8.3071 15.0126C8.22406 15.0453 8.11246 15.0616 7.97232 15.0616H7.68426ZM12.1548 16H10.7067V11H14V12.0644H12.1548V12.9188H13.8832V13.9412H12.1548V16Z",fill:"#FF5A5A"})});var d=t(11163),s=t(75090),c=t(32125),u=t(14802),f=t(55840),g=t(10736);function m(){let e=(0,i._)(["\n    list-style-type: none;\n    padding: 0;\n"]);return m=function(){return e},e}function h(){let e=(0,i._)(["\n    display: flex;\n    margin-bottom: 28px;\n"]);return h=function(){return e},e}function v(){let e=(0,i._)(["\n    margin-right: 8px;\n"]);return v=function(){return e},e}let p=e=>{let{documentsArray:n,invoicesArray:t,creditNotesArray:i,queriedCity:r,isPaymentRevampBooking:a=!1}=e;return(0,o.jsxs)(y,{children:[t&&(()=>{let e=(0,g.T)();return t&&!t.map?(e("InvoicesArray is not an array: ".concat(JSON.stringify(t)),u.v9.info,u.jw.PostbookingPage),null):(0,o.jsxs)(o.Fragment,{children:[t&&t.map((e,n)=>a?(0,o.jsx)(o.Fragment,{children:"SUCCESS"===e.accountingStatus&&(0,o.jsx)(x,{comment:"Invoice-".concat(e.issueDate,": ").concat(e.grossTotalAmount," ").concat(e.currency),city:r,viewer:u.cQ.pdfViewer,query:{invoiceId:e.id,invoicingCase:f.P.INVOICE}},n)}):(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(x,{comment:"Invoice-".concat(e.invoiceDate,": ").concat(e.totalPrice," ").concat(e.currency),city:r,viewer:u.cQ.pdfViewer,query:{oldInvoiceId:e.id}},n)})),i&&i.map((e,n)=>(0,o.jsx)(o.Fragment,{children:"SUCCESS"===e.accountingStatus&&(0,o.jsx)(x,{comment:"CreditNote-".concat(e.issueDate,": ").concat(e.grossTotalAmount," ").concat(e.currency),city:r,viewer:u.cQ.pdfViewer,query:{invoiceId:e.id,invoicingCase:f.P.CREDIT_NOTE}},n)}))]})})(),n&&n&&n.map((e,n)=>{var t;let i=null===(t=null==e?void 0:e.documentKey.split(".").pop())||void 0===t?void 0:t.toLowerCase();return i?i===u.lm.pdf?(0,o.jsx)(x,{comment:(null==e?void 0:e.comment)||"",city:r,viewer:u.cQ.pdfViewer,query:{bookingId:e.bookingId,documentKey:e.documentKey}},n):[u.lm.jpeg,u.lm.jpg,u.lm.png].includes(i)?(0,o.jsx)(x,{comment:(null==e?void 0:e.comment)||"",city:r,viewer:u.cQ.imageViewer,query:{bookingId:e.bookingId,documentKey:e.documentKey}},n):null:null})]})},x=e=>{let{comment:n,city:t,viewer:i,query:c}=e,{push:f}=(0,d.useRouter)(),g=e=>{f({pathname:"/".concat((0,a.HL)(t),"/").concat(e),query:c})};return(0,o.jsxs)(C,{onClick:()=>g(i),children:[(0,o.jsxs)(b,{children:[i===u.cQ.imageViewer&&(0,o.jsx)(r,{}),i===u.cQ.pdfViewer&&(0,o.jsx)(l,{})]}),(0,o.jsx)(s.lG,{children:n})]})},y=c.default.ul.withConfig({componentId:"sc-8bf91a82-0"})(m()),C=c.default.li.withConfig({componentId:"sc-8bf91a82-1"})(h()),b=c.default.span.withConfig({componentId:"sc-8bf91a82-2"})(v())},79554:function(e,n,t){t.d(n,{V:function(){return R},O:function(){return H}});var i=t(82729),o=t(85893),r=t(11889);let a=()=>(0,o.jsxs)("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsxs)("mask",{id:"path-1-outside-1_142_28424",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"8",height:"12",fill:"black",children:[(0,o.jsx)("rect",{fill:"white",width:"8",height:"12"}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.99998 9.99994C3.99998 9.99994 6.99996 5.65682 6.99996 3.99998C6.99996 2.34314 5.65682 1 3.99998 1C2.34314 1 1 2.34314 1 3.99998C1 5.65682 3.99998 9.99994 3.99998 9.99994ZM4 5.49997C4.82842 5.49997 5.49999 4.8284 5.49999 3.99998C5.49999 3.17156 4.82842 2.49999 4 2.49999C3.17158 2.49999 2.50001 3.17156 2.50001 3.99998C2.50001 4.8284 3.17158 5.49997 4 5.49997Z"})]}),(0,o.jsx)("path",{d:"M3.99998 9.99994L3.17719 10.5683L3.99998 11.7594L4.82277 10.5683L3.99998 9.99994ZM5.99996 3.99998C5.99996 4.18707 5.89383 4.6011 5.61567 5.23422C5.35556 5.82628 5.00097 6.48857 4.63497 7.1195C4.27088 7.74714 3.90535 8.32691 3.63007 8.75077C3.49272 8.96227 3.3785 9.13392 3.29905 9.25208C3.25933 9.31114 3.22835 9.35678 3.20754 9.38728C3.19714 9.40253 3.18929 9.41399 3.18417 9.42145C3.18161 9.42518 3.17973 9.42791 3.17856 9.42961C3.17797 9.43046 3.17756 9.43105 3.17733 9.43139C3.17722 9.43155 3.17715 9.43165 3.17712 9.43169C3.17711 9.43171 3.17713 9.43168 3.17712 9.43169C3.17715 9.43165 3.17719 9.4316 3.99998 9.99994C4.82277 10.5683 4.82283 10.5682 4.82291 10.5681C4.82295 10.568 4.82303 10.5679 4.82311 10.5678C4.82327 10.5676 4.82347 10.5673 4.82372 10.5669C4.82422 10.5662 4.82489 10.5652 4.82575 10.564C4.82746 10.5615 4.82989 10.5579 4.833 10.5534C4.83924 10.5443 4.84823 10.5312 4.8598 10.5142C4.88294 10.4803 4.91641 10.431 4.95872 10.3681C5.04333 10.2423 5.16349 10.0617 5.30738 9.8401C5.5946 9.39785 5.97906 8.78829 6.36497 8.12305C6.74896 7.46109 7.14437 6.72695 7.44675 6.03869C7.73109 5.39149 7.99996 4.64131 7.99996 3.99998H5.99996ZM3.99998 2C5.10454 2 5.99996 2.89542 5.99996 3.99998H7.99996C7.99996 1.79085 6.20911 0 3.99998 0V2ZM2 3.99998C2 2.89542 2.89542 2 3.99998 2V0C1.79085 0 0 1.79085 0 3.99998H2ZM3.99998 9.99994C4.82277 9.4316 4.82281 9.43165 4.82284 9.43169C4.82283 9.43168 4.82285 9.43171 4.82284 9.43169C4.82281 9.43165 4.82274 9.43155 4.82263 9.43139C4.8224 9.43105 4.82199 9.43046 4.8214 9.42961C4.82023 9.42791 4.81835 9.42518 4.81579 9.42145C4.81067 9.41399 4.80282 9.40253 4.79242 9.38728C4.77161 9.35678 4.74063 9.31114 4.70091 9.25208C4.62146 9.13392 4.50724 8.96227 4.36989 8.75077C4.09461 8.32691 3.72908 7.74714 3.36499 7.1195C2.99899 6.48857 2.6444 5.82628 2.38428 5.23422C2.10613 4.6011 2 4.18707 2 3.99998H0C0 4.64131 0.268868 5.39149 0.553209 6.03869C0.85559 6.72695 1.25099 7.46109 1.63499 8.12305C2.0209 8.78829 2.40536 9.39785 2.69258 9.8401C2.83647 10.0617 2.95663 10.2423 3.04123 10.3681C3.08355 10.431 3.11702 10.4803 3.14016 10.5142C3.15173 10.5312 3.16072 10.5443 3.16695 10.5534C3.17007 10.5579 3.1725 10.5615 3.17421 10.564C3.17507 10.5652 3.17574 10.5662 3.17624 10.5669C3.17649 10.5673 3.17669 10.5676 3.17685 10.5678C3.17693 10.5679 3.17701 10.568 3.17705 10.5681C3.17712 10.5682 3.17719 10.5683 3.99998 9.99994ZM4.49999 3.99998C4.49999 4.27612 4.27613 4.49997 4 4.49997V6.49997C5.3807 6.49997 6.49999 5.38069 6.49999 3.99998H4.49999ZM4 3.49999C4.27613 3.49999 4.49999 3.72384 4.49999 3.99998H6.49999C6.49999 2.61927 5.3807 1.49999 4 1.49999V3.49999ZM3.50001 3.99998C3.50001 3.72384 3.72386 3.49999 4 3.49999V1.49999C2.61929 1.49999 1.50001 2.61927 1.50001 3.99998H3.50001ZM4 4.49997C3.72386 4.49997 3.50001 4.27612 3.50001 3.99998H1.50001C1.50001 5.38069 2.61929 6.49997 4 6.49997V4.49997Z",fill:"black",fillOpacity:"0.7",mask:"url(#path-1-outside-1_142_28424)"})]});
1var l=t(68614),d=t(14802),s=t(32912),c=t(76395),u=t(32125);function f(){let e=(0,i._)(["\n    line-height: 1.3;\n    max-width: 160px;\n"]);return f=function(){return e},e}function g(){let e=(0,i._)([""]);return g=function(){return e},e}function m(){let e=(0,i._)(["\n    font-weight: 500;\n    font-family: var(--font-inter-500);\n    font-size: 14px;\n    max-width: 120px;\n    color: var(--black);\n"]);return m=function(){return e},e}function h(){let e=(0,i._)(["\n    font-weight: 400;\n    font-family: var(--font-inter-400);\n    font-size: 12px;\n    padding-top: 4px;\n    display: flex;\n    color: rgba(0, 0, 0, 0.7);\n\n    div {\n        flex-shrink: 10;\n        flex-basis: 10;\n        padding-left: 7px;\n    }\n"]);return h=function(){return e},e}function v(){let e=(0,i._)(["\n    font-size: 11px;\n    padding-top: 6px;\n"]);return v=function(){return e},e}function p(){let e=(0,i._)(["\n    display: flex;\n    color: rgba(0, 0, 0, 0.5);\n"]);return p=function(){return e},e}function x(){let e=(0,i._)(["\n    font-size: 12px;\n    font-weight: 400;\n    font-family: var(--font-inter-400);\n    text-transform: lowercase;\n    width: 40px;\n\n    &::first-letter {\n        text-transform: uppercase;\n    }\n"]);return x=function(){return e},e}function y(){let e=(0,i._)(["\n    display: flex;\n    background: ",";\n    padding: 5px;\n    border-radius: 4px;\n    margin-top: 6px;\n"]);return y=function(){return e},e}function C(){let e=(0,i._)(["\n    padding-left: 5px;\n    font-size: 10px;\n    color: ",";\n    font-weight: 700;\n    font-family: var(--font-inter-700);\n"]);return C=function(){return e},e}function b(){let e=(0,i._)(["\n    flex-grow: 1;\n    font-size: 12px;\n    font-weight: 500;\n    font-family: var(--font-inter-500);\n"]);return b=function(){return e},e}let j=u.default.div.withConfig({componentId:"sc-6fe5ca4b-0"})(f()),k=u.default.div.withConfig({componentId:"sc-6fe5ca4b-1"})(g()),w=u.default.div.withConfig({componentId:"sc-6fe5ca4b-2"})(m()),T=u.default.div.withConfig({componentId:"sc-6fe5ca4b-3"})(h()),I=u.default.div.withConfig({componentId:"sc-6fe5ca4b-4"})(v()),D=u.default.div.withConfig({componentId:"sc-6fe5ca4b-5"})(p()),E=u.default.div.withConfig({componentId:"sc-6fe5ca4b-6"})(x()),S=u.default.div.withConfig({componentId:"sc-6fe5ca4b-7"})(y(),e=>{let{bgColor:n="rgb(18 146 255 / 10%)"}=e;return n}),P=u.default.div.withConfig({componentId:"sc-6fe5ca4b-8"})(C(),e=>{let{color:n="rgba(18, 141, 255, 1)"}=e;return n}),A=u.default.div.withConfig({componentId:"sc-6fe5ca4b-9"})(b()),H=e=>{let{marker:n}=e;return(0,o.jsxs)(j,{children:[(0,o.jsxs)(k,{children:[(0,o.jsx)(w,{children:n.addressLine1}),(null==n?void 0:n.addressLine2)&&(0,o.jsxs)(T,{children:[(0,o.jsx)(a,{}),(0,o.jsx)("div",{children:null==n?void 0:n.addressLine2})]})]}),n.type===d.y3.Closed&&(0,o.jsx)(N,{marker:n}),(0,o.jsx)(I,{children:Object.keys(d.eO).map(e=>{var t;let i=null===(t=n.openingHours)||void 0===t?void 0:t.find(n=>n.dayOfWeek.toLowerCase()===e.toLowerCase());return(0,o.jsx)(R,{day:e,openHours:i},e)})}),n.type!==d.y3.Closed&&(0,o.jsx)(N,{marker:n})]})},N=e=>{let{marker:n}=e;if(!(null==n?void 0:n.infoTex))return null;let t=n.type===d.y3.Closed?"#ff1212cc":"#128dff",i=n.type===d.y3.Closed?"#f9f0f0":"rgb(18 146 255 / 10%)";return(0,o.jsxs)(S,{bgColor:i,children:[(0,o.jsx)("div",{children:(0,o.jsx)(r.E,{width:18})}),(0,o.jsx)(P,{color:t,children:n.infoTex})]})},R=e=>{let{day:n,openHours:t}=e,{t:i}=(0,c.$G)();return(0,o.jsxs)(D,{children:[(0,o.jsx)(E,{children:n.substring(0,3)}),(0,o.jsx)(A,{children:(null==t?void 0:t.openingTime)&&(null==t?void 0:t.closingTime)?(0,o.jsxs)(o.Fragment,{children:[(0,s.Z)(new Date("".concat(l.aJ," ").concat(t.openingTime)),"HH:mm")," -"," ",(0,s.Z)(new Date("".concat(l.aJ," ").concat(t.closingTime)),"HH:mm")]}):(0,o.jsx)(o.Fragment,{children:i("closeInBusinessHour","Closed")})})]})}},95075:function(e,n,t){t.d(n,{d:function(){return m}});var i=t(82729),o=t(85893),r=t(32125),a=t(84004),l=t(67294);function d(){let e=(0,i._)(["\n    position: ",";\n    left: 0;\n    display: flex;\n    width: 100%;\n"]);return d=function(){return e},e}function s(){let e=(0,i._)(["\n    background-color: ",";\n    width: 100%;\n    max-width: ",";\n    justify-content: ",";\n    display: flex;\n    margin: ",";\n    padding: 1rem;\n    column-gap: 1rem;
1\n    align-items: center;\n    border-radius: 8px;\n"]);return s=function(){return e},e}function c(){let e=(0,i._)(["\n    font-style: normal;\n    font-weight: bold;\n    font-size: 12px;\n    color: #ffffff;\n    margin: 0;\n    flex-grow: 1;\n"]);return c=function(){return e},e}let u=r.default.div.withConfig({componentId:"sc-4e3faedc-0"})(d(),e=>e.inline?"relative":"absolute"),f=r.default.div.withConfig({componentId:"sc-4e3faedc-1"})(s(),e=>e.color,e=>e.inline?"none":"350px",e=>e.inline?"space-between":"center",e=>e.margin?e.margin:"1rem 1rem"),g=r.default.p.withConfig({componentId:"sc-4e3faedc-2"})(c()),m=e=>{let{text:n,isInline:t=!1,scrollToElement:i=!1,backgroundColor:r="#FF9100",margin:d,showIcon:s=!0}=e,c=(0,l.useRef)(null);return(0,l.useEffect)(()=>{if(i&&c.current&&n.length){var e;window.scrollTo({top:null===(e=c.current)||void 0===e?void 0:e.getBoundingClientRect().bottom})}return()=>{c.current=null}},[n.length,i]),(0,o.jsx)(u,{inline:t,children:(0,o.jsxs)(f,{margin:d,color:r,inline:t,ref:c,children:[s&&(0,o.jsx)(a.J,{}),(0,o.jsx)(g,{children:n})]})})}},90492:function(e,n,t){t.d(n,{V:function(){return h}});var i=t(95866),o=t(313),r=t(42699),a=t(78343),l=t(13882),d=t(83946);function s(e,n){(0,l.Z)(2,arguments);var t=(0,d.Z)(n);return(0,a.Z)(e,-t)}var c=t(80868),u=t(68807),f=t(44960),g=t(91931),m=t(36741);function h(e){var n;let{handbackTime:t,handoverTime:a,bookingStatus:l,productType:d}=e,{citySettings:h}=(0,c.zT)(),{enabled:v}=(0,u.S)(f.bl),p=void 0!==(null==h?void 0:h.handbackChangeBeforeLimitHours)?null==h?void 0:h.handbackChangeBeforeLimitHours:1,x=new Date(a),y=new Date,C=l===g.i8.ACTIVE||l===g.i8.APPROVED||l===g.i8.PENDING_APPROVAL,b=t?(0,i.Z)(t,null!==(n=null==h?void 0:h.timezone)&&void 0!==n?n:"Asia/Dubai"):void 0;return(!!b||d!==m.kv.DAILY)&&((0,o.Z)(y,x)?C:v?C&&(0,r.Z)(y,x)&&(!b||(0,o.Z)(y,s(b,p))):C&&(0,r.Z)(y,x)&&(!b||(0,o.Z)(y,s(b,1))))}},58651:function(e,n,t){t.d(n,{n:function(){return a}});var i=t(30804),o=t(11163),r=t(67294);let a=()=>{let{events:e}=(0,o.useRouter)(),{setToPickerTime:n,setFromPickerTime:t,setToDate:a,setFromDate:l,initializationByCitySettings:d}=(0,i.Rx)();(0,r.useEffect)(()=>{let i=()=>{n(void 0),t(void 0),a(null),l(null),d(!0)};return e.on("routeChangeStart",i),()=>{e.off("routeChangeStart",i)}},[e,d,l,t,a,n])}},62869:function(e,n,t){t.d(n,{I:function(){return a}});var i=t(51096),o=t(55840);let r="/invoicing",a={getBookingInformation:async function(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=arguments.length>4&&void 0!==arguments[4]&&arguments[4],d=arguments.length>5&&void 0!==arguments[5]?arguments[5]:o.b.CHARGE;return await i.od.get("".concat(r,"/bookings/").concat(e,"?invoices=").concat(n,"&creditNotes=").concat(t,"&customerCharges=").concat(a,"&accountPayables=").concat(l,"&chargeType=").concat(d))},getInvoicePdf:async(e,n)=>await i.od.get("".concat(r,"/payments/invoices/pdf/").concat(e,"?invoicingCase=").concat(n),{responseType:"blob"}),getChargeSummaryDocumentPdf:async(e,n)=>await i.od.get("".concat(r,"/charge-document/").concat(e,"/documents/").concat(n),{responseType:"blob"}),getPaymentCenterDetailInformation:async e=>await i.od.get("".concat(r,"/customer/booking/").concat(e,"/transactions")),getPaymentCenterInvoiceDetail:async(e,n)=>await i.od.get("".concat(r,"/payments/").concat(n,"/").concat(e)),getPaymentsByBookingId:async e=>await i.od.get("".concat(r,"/customer/invoice/booking/").concat(e,"/booking-calculation")),getOutstandingPayments:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["FAILED","PENDING"],o=t.map(e=>"statuses=".concat(e)).join("&");return await i.od.get("".concat(r,"/customer/invoices?").concat(o,"&pageSize=").concat(n,"&pageNumber=").concat(e))},getOutstandingPaymentsSummary:async()=>await i.od.get("".concat(r,"/customer/invoices/outstanding-summary"))}},55840:function(e,n,t){var i,o,r,a;t.d(n,{P:function(){return i},b:function(){return o}}),(r=i||(i={})).INVOICE="INVOICE",r.CREDIT_NOTE="CREDIT_NOTE",(a=o||(o={})).CHARGE="CHARGE",a.REFUND="REFUND"}}]);
2//# sourceMappingURL=0-9c38ff079b0957ab.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.