1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[248],{83311:function(e,r,t){"use strict";t.d(r,{N:function(){return el}});var n=t(85893),l=t(55065),i=t(11949),o=t(2516),a=t(10227),s=t(78021),d=t(85551),c=t(82057),u=t(83663),v=t(17555),p=t.n(v);function m(e){let{actions:r}=e,{t}=(0,i.q)(),l=24/r.length;return(0,n.jsxs)(o.Z,{className:p().contact,gap:16,vertical:!0,children:[(0,n.jsx)(u.F,{level:5,children:t("label.contact.support")}),(0,n.jsx)(a.Z,{gutter:[16,16],children:r.map(e=>(0,n.jsx)(s.Z,{xs:24,xl:l,children:(0,n.jsx)(d.ZP,{className:p().action,href:e.href,size:"large",color:"default",variant:"outlined",block:!0,children:(0,n.jsxs)(o.Z,{vertical:!0,align:"flex-start",className:p().actionBody,children:[(0,n.jsx)(c._,{strong:!0,children:e.label}),(0,n.jsx)(c._,{type:"secondary",className:p().actionValue,children:e.value})]})})},e.key))})]})}var f=t(99638),_=t(67190),x=t(67294),h=t(87464),E=t(54164),y=t(13754),j=t(93411),T=t(57032),b=t(69166),C=t(66340),I=t(83846),N=t(35515),g=t(87672),R=t(99519),O=t(53656);function D(e){var r,t;let{currentStatus:l,orderItem:a,deliveryTrackingInfo:s}=e,{t:d}=(0,i.q)(),{isMobile:v}=(0,j.p)(),{mapTrackingMsg:p}=(0,R.A)(),{isShowTrackingView:m,trackingLink:f,hourString:_,eta:x,isVROMOVendor:h}=null!=s?s:{},{getOrderConfirmationStatusColor:E}=(0,y.i)(),T=E(l);if(l===b.Z.REJECTED){let e=(null==a?void 0:a.orderConfirmationStatusMessage)?"".concat(d("label.order.rejected.reason")," ").concat(null==a?void 0:a.orderConfirmationStatusMessage):d("label.order.rejected");return(0,n.jsx)(u.F,{level:v?5:3,className:"no-margin",style:{color:T},children:e})}return l===b.Z.FAILED?(0,n.jsx)(u.F,{level:v?5:3,className:"no-margin",children:(null==a?void 0:null===(t=a.deliveryJob)||void 0===t?void 0:t.deliveryStatus)?p(a.deliveryJob.deliveryStatus):""}):l===b.Z.CANCELLED?(0,n.jsx)(u.F,{level:v?5:3,className:"no-margin",style:{color:T},children:d("label.order.cancelled")}):(null==a?void 0:null===(r=a.deliveryJob)||void 0===r?void 0:r.deliveryStatus)===O.$.DRIVER_AT_DROP_OFF?(0,n.jsxs)(o.Z,{vertical:!0,justify:"flex-end",children:[(0,n.jsx)(c._,{className:"text-small",children:d("label.at.the.address")}),(0,n.jsx)(u.F,{level:v?5:3,className:"no-margin",children:d("label.arriving.now")})]}):m&&h&&_?(0,n.jsxs)(o.Z,{vertical:!0,justify:"flex-end",children:[(0,n.jsx)(c._,{className:"text-small",children:d("label.estimated.arrival")}),(0,n.jsx)(u.F,{level:3,className:"no-margin",children:x})]}):f?(0,n.jsx)(n.Fragment,{}):(0,n.jsxs)(o.Z,{vertical:!0,justify:"flex-end",children:[(0,n.jsx)(c._,{className:"text-small",children:d("label.estimated.arrival")}),(0,n.jsx)(u.F,{level:3,className:"no-margin",children:(null==a?void 0:a.preOrdered)?a.orderTime:(null==a?void 0:a.orderTimeMins)!=null?d("asap.minutes",[a.orderTimeMins]):(0,n.jsx)(n.Fragment,{children:"\xa0"})})]})}var A=t(47063),P=t.n(A);let Z=[b.Z.REJECTED,b.Z.CANCELLED],S=e=>{let{title:r,description:t}=e,{isDesktop:l}=(0,j.p)();return(0,n.jsxs)(o.Z,{justify:"space-between",gap:l?24:12,children:[(0,n.jsx)(u.F,{level:5,className:"semi-bold no-margin",style:{minWidth:l?"150px":"100px"},children:r}),(0,n.jsx)(u.F,{level:5,className:"bold no-margin",style:{textAlign:"right"},children:t})]})};function F(e){var r;let{orderItem:t,expectedAt:l,orderStatus:a,isServedAtTable:s,deliveryTrackingInfo:d}=e,{t:v}=(0,i.q)(),{formatDate:p}=(0,h.a)(),{mapTrackingMsg:m,getStatusMessage:f}=(0,R.A)(),{getOrderConfirmationStatusColor:_}=(0,y.i)(),{fromLabel:j,toLabel:O,fromContent:A,toContent:F,isEatIn:L,tableNumberLabel:w,tableNumberContent:k,pickupPointLabel:M,pickupPointContent:V}=(0,E.p)({order:t}),U=_(null==t?void 0:t.orderConfirmationStatus),G=p(null==t?void 0:t.orderDate,C.lv.SHORT_DATE_TIME),{items:q,currentStep:K}=function(e,r){let{getOrderConfirmationStatusIcon:t}=(0,R.A)();return(0,x.useMemo)(()=>{var l,i,o;if(!e)return{items:[],currentStep:-1};let a=null!==(o=null==e?void 0:null===(l=e.items)||void 0===l?void 0:l.indexOf(null==e?void 0:e.current))&&void 0!==o?o:-1;return{items:null==e?void 0:null===(i=e.items)||void 0===i?void 0:i.map((e,l)=>{let i=t(e,r);return{icon:(0,n.jsx)(i,{style:{color:a>=l?"#82C444":"#EEEEEE"}})}}),currentStep:a}},[e,t])}(a,null==t?void 0:t.orderType),Y=null==t?void 0:t.deliveryJob,$=Z.includes(null==t?void 0:t.orderConfirmationStatus),J=L&&s&&w&&k,z=L&&!s,B=(0,x.useMemo)(()=>{let e=(0,I.K9)(null==t?void 0:t.orderType);return(null==a?void 0:a.current)===b.Z.READY_TO_PICKUP&&e?b.Z.ACCEPTED:null==a?void 0:a.current},[a,t]),W=(0,x.useMemo)(()=>{var e;return m(null==Y?void 0:Y.deliveryStatus,null==Y?void 0:null===(e=Y.driver)||void 0===e?void 0:e.firstName)||f(B,null==t?void 0:t.orderType,null==t?void 0:t.preOrdered,s,null==t?void 0:t.orderTracking)},[m,f,null==Y?void 0:Y.deliveryStatus,null==Y?void 0:null===(r=Y.driver)||void 0===r?void 0:r.firstName,B,null==t?void 0:t.orderType,null==t?void 0:t.preOrdered,s,null==t?void 0:t.orderTracking]);return(0,n.jsxs)(o.Z,{className:P().container,gap:24,vertical:!0,children:[(0,n.jsxs)(u.F,{level:3,children:[(0,I.fm)(v("label.order.capital").toLocaleLowerCase())," #",null==t?void 0:t.id]}),(0,n.jsxs)(o.Z,{className:P().tracking,vertical:!0,children:[(0,n.jsx)(o.Z,{justify:"space-between",gap:24,align:"flex-start",children:(0,n.jsx)(D,{currentStatus:B,deliveryTrackingInfo:d,orderItem:t})}),!$&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(N.Z,{current:K,size:"default",items:q,responsive:!1}),(0,n.jsx)(c._,{type:"secondary",children:W})]})]}),(0,n.jsxs)(o.Z,{vertical:!0,gap:16,children:[(0,n.jsx)(S,{title:v("label.status"),description:(0,n.jsxs)(o.Z,{gap:4,children:[(0,n.jsx)(T.V,{style:{color:U}}),(0,n.jsx)("span",{children:(null==t?void 0:t.orderConfirmationStatus)&&v("orders.statuses.".concat(null==t?void 0:t.orderConfirmationStatus.toLowerCase())).toUpperCase()})]})}),(0,n.jsx)(S,{title:v("label.order.placeat"),description:G}),(0,n.jsx)(S,{title:v("label.order.expectedat"),description:l}),(0,n.jsx)(g.Z,{className:"dash"}),(0,n.jsx)(S,{title:j,description:A}),J&&(0,n.jsx)(S,{title:w,description:k}),z&&(0,n.jsx)(S,{title:M,description:V}),!z&&!J&&O&&F&&(0,n.jsx)(S,{title:O,description:F}),!!(null==t?void 0:t.specialInstructions)&&(0,n.jsx)(S,{title:v("label.specialinstructions"),description:null==t?void 0:t.specialInstructions})]})]})}let L=(e,r,t,n)=>
1{let l=(t-e)*Math.PI/180,i=(n-r)*Math.PI/180,o=Math.sin(l/2)*Math.sin(l/2)+Math.cos(e*Math.PI/180)*Math.cos(t*Math.PI/180)*Math.sin(i/2)*Math.sin(i/2);return 2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))*6371},w=e=>e<.5?16:e<1?15:e<2?14:e<5?13:e<10?12:11;var k=t(36422),M=t(88390);function V(e){let{classNames:r,driverName:t,driverTrackingLink:l,vendorName:a}=e,{t:s}=(0,i.q)();return(0,n.jsxs)(o.Z,{className:r,align:"center",justify:"space-between",children:[(0,n.jsxs)(o.Z,{gap:8,align:"center",children:[(0,n.jsx)(M.Z,{size:60,icon:(0,n.jsx)(k.Z,{})}),(0,n.jsxs)(o.Z,{vertical:!0,justify:"flex-start",children:[(0,n.jsx)(u.F,{level:5,children:t}),(0,n.jsx)(c._,{children:s("label.delivery.driver")})]})]}),(0,n.jsx)(o.Z,{gap:8,children:(0,n.jsx)(d.ZP,{type:"primary",href:l,target:"_blank",children:s("label.track.driver",[a])})})]})}var U=t(44784),G=t(57307);function q(e){let{driverPhone:r,driverPinCode:t}=e,{t:l}=(0,i.q)();return r&&t?(0,n.jsx)(G.Z,{message:(0,n.jsx)(c._,{children:l("label.call.driver",[(0,n.jsx)(U.r,{href:"tel:".concat(r),children:r},r),t])}),type:"info"}):null}var K=t(54647),Y=t(92238),$=t(37054);function J(e){let{position:r,iconUrl:t,infoCustomText:l,animationDuration:i=1e3}=e,{isMarkerReady:o}=(0,Y.S)(),[a,s]=(0,x.useState)(r),d=(0,x.useRef)(),c=(0,x.useRef)(r),u=(0,x.useRef)(r),v=(0,x.useRef)(),p=(0,x.useRef)(0);(0,x.useEffect)(()=>{let e=c.current;u.current=r;let t=Math.abs(r.lat-e.lat),n=Math.abs(r.lng-e.lng);if(1e-4>Math.sqrt(t*t+n*n)){s(r),c.current=r;return}d.current&&cancelAnimationFrame(d.current),v.current=Date.now();let l=()=>{let t=Date.now(),n=Math.min((t-(v.current||t))/i,1);if(t-p.current>=33||n>=1){let l={lat:e.lat+(r.lat-e.lat)*n,lng:e.lng+(r.lng-e.lng)*n};c.current=l,s(l),p.current=t}n<1?d.current=requestAnimationFrame(l):(c.current=r,s(r))};return d.current=requestAnimationFrame(l),()=>{d.current&&cancelAnimationFrame(d.current)}},[r,i]);let m=(0,x.useMemo)(()=>({url:t,scaledSize:new window.google.maps.Size(64,64),anchor:new window.google.maps.Point(32,32)}),[t]),f=(0,x.useMemo)(()=>(e,r)=>({x:-e/2,y:-r-64}),[]);return o?(0,n.jsx)($.jC,{position:a,icon:m,options:{optimized:!1,zIndex:100},children:l&&(0,n.jsx)(K.V,{mapPaneName:$.xT.OVERLAY_MOUSE_TARGET,position:a,getPixelPositionOffset:f,children:l})}):null}var z=t(8213),B=t(18446),W=t.n(B);function H(e){let{position:r,type:t="customer",infoCustomText:l}=e,{isMarkerReady:i}=(0,Y.S)();return i?(0,n.jsx)($.jC,{position:r,icon:{url:"driver"===t?"/driver-marker.svg":"/customer-maker.svg",scaledSize:new window.google.maps.Size(64,64)},children:l&&(0,n.jsx)(K.V,{mapPaneName:$.xT.OVERLAY_MOUSE_TARGET,position:r,getPixelPositionOffset:(e,r)=>({x:-e/2,y:-r-64}),children:l})}):null}let Q=(0,x.memo)(function(e){let{markers:r,calculatedZoom:t,mapContainerClassName:l}=e;return(0,n.jsx)(z.P,{mapContainerClassName:l,options:{streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1},zoom:t,center:r[1].position,children:r.map(e=>"driver"===e.type?(0,n.jsx)(J,{position:e.position,iconUrl:"/driver-marker.svg",infoCustomText:e.infoCustomText,animationDuration:2e3},"driver-marker"):(0,n.jsx)(H,{position:e.position,type:e.type,infoCustomText:e.infoCustomText},"customer-marker"))})},W());var X=t(80348),ee=t.n(X);function er(e){var r,t;let{orderItem:l,deliveryTrackingInfo:i}=e,{isMobile:a}=(0,j.p)(),{showCallView:s,markers:d}=null!=i?i:{},c=null==l?void 0:l.deliveryJob,u=(0,x.useMemo)(()=>{if(!d||d.length<2)return 13;let e=d[0].position,r=d[1].position;return w(L(e.lat,e.lng,r.lat,r.lng))},[d]);return(0,n.jsxs)(o.Z,{vertical:!0,gap:12,children:[(0,n.jsx)(q,{driverPhone:null==c?void 0:null===(r=c.driver)||void 0===r?void 0:r.phone,driverPinCode:null==c?void 0:c.pinCode}),(0,n.jsxs)(o.Z,{className:ee().container,vertical:!0,gap:12,children:[!a&&s&&(0,n.jsx)(V,{classNames:ee().driver,driverName:null==c?void 0:null===(t=c.driver)||void 0===t?void 0:t.name,driverTrackingLink:null==c?void 0:c.trackingLink,vendorName:null==c?void 0:c.vendor}),d&&(null==d?void 0:d.length)>0&&(0,n.jsx)(Q,{markers:d,calculatedZoom:u,mapContainerClassName:ee().map})]})]})}var et=t(39469),en=t.n(et);function el(e){let{orderSelectedItem:r,isServedAtTable:t,orderStatus:i,expectedAt:d,deliveryTrackingInfo:c,supportActions:u}=e;return(0,n.jsx)(l.v,{children:(0,n.jsxs)(a.Z,{gutter:[24,24],className:"no-margin",children:[(0,n.jsx)(s.Z,{md:14,xs:24,children:(0,n.jsxs)(o.Z,{gap:24,vertical:!0,children:[(0,n.jsx)(F,{orderItem:r,expectedAt:d,isServedAtTable:t,orderStatus:i,deliveryTrackingInfo:c}),(0,n.jsx)(er,{orderItem:r,deliveryTrackingInfo:c})]})}),(0,n.jsx)(s.Z,{md:10,xs:24,children:(0,n.jsxs)(o.Z,{vertical:!0,gap:24,children:[(0,n.jsx)(o.Z,{className:en().content,style:{padding:24,paddingTop:0},children:(0,n.jsx)(_.H,{item:r,quantityStyle:"text"})}),(null==r?void 0:r.paymentType)&&(0,n.jsx)(o.Z,{className:en().content,style:{padding:24},children:(0,n.jsx)(f.X,{paymentType:null==r?void 0:r.paymentType})}),u.length>0&&(0,n.jsx)(o.Z,{className:en().content,style:{padding:24},children:(0,n.jsx)(m,{actions:u})})]})})]})})}},99519:function(e,r,t){"use strict";t.d(r,{A:function(){return f}});var n=t(67294),l=t(67936),i=t(11949),o=t(99e3),a=t(69166),s=t(53656),d=t(83846),c=t(86900),u=t(66340),v=t(30381),p=t.n(v);let m=/^(\d{4}-\d{2}-\d{2})(.*)$/;function f(){let{t:e}=(0,i.q)(),{getCompanyCountry:r}=(0,l.f)(),t=(0,n.useCallback)((r,t,n,l,i)=>{let o=(0,d.K9)(t),s=t===a.m["EAT-IN"];switch(r){case a.Z.AUTO_CONFIRMED:return e("label.order.accepted");case a.Z.COMPLETED:return e("label.order.completed");case a.Z.ON_ITS_WAY:return e("label.order.on.the.way");case a.Z.PENDING:return e("label.order.pending");case a.Z.ACCEPTED:if(s&&l)return e("label.order.prepared");if(!o)return e("label.order.accepted");if(n)return e("label.order.preorder.confirmed");return e("label.order.prepared");default:if(o){if(n)return e("label.order.preorder.confirmed");return o?e("label.order.ready.to.pickup.counter"):e("label.order.prepared")}if(t===a.m["EAT-IN"]&&!l&&i)return e("label.order.ready.to.pickup.counter");return e("label.order.ready.to.pickup")}},[e]),v=(0,n.useCallback)((r,t)=>{switch(r){case s.$.DRIVER_EN_ROUTE_TO_PICKUP:return e("label.order.driver.en.route");case s.$.DRIVER_DEPART_PICKUP:case s.$.DRIVER_AT_PICKUP:return e("label.order.driver.arrived");case s.$.DRIVER_AT_DROP_OFF:if(t&&""!==t.trim())return e("label.order.driver.at.drop.off",[t]);return e("label.order.driver.at.drop.off.no.name");case s.$.FAILED:return e("label.order.driver.failed");default:return""}},[]),f=(0,n.useCallback)((e,r)=>{let t=(0,d.K9)(r),n=r===a.m["EAT-IN"];switch(e){case a.Z.ACCEPTED:case a.Z.AUTO_CONFIRMED:return o.eD;case a.Z.ON_ITS_WAY:case a.Z.READY_TO_PICKUP:if(!t||n)return o.eD;return o.tM;case a.Z.PENDING:return o.TE;case a.Z.COMPLETED:if(t)return o.tv;if(n)return o.l;return o.wZ;case a.Z.DRIVER_AT_DROP_OFF:return o.wT;case a.Z.REJECTED:case a.Z.FAILED:case a.Z.CANCELLED:}return c.Z},[]),_=(0,n.useCallback)(t=>{let n=r();switch(t){case a.m.CATERING:return{from:e("label.order.catering.from"),to:e("label.order.catering.to")};case a.m.COLLECTION:return"GB"===n?{from:e("label.order.collection.from"),to:e("label.order.collection.location")}:{from:e("label.order.pickup.from"),to:e("label.order.pickup.location")};case a.m["CURB-SIDE"]:return{from:e("label.order.curbside.from"),to:e("label.order.curbside.location")};case a.m.DELIVERY:return{from:e("label.order.delivery.from"),to:e("label.order.delivery.to")};
1case a.m["EAT-IN"]:return{from:e("label.order.eat.in.at"),to:""};default:return{from:"",to:""}}},[r,e]);return{getExpectedAt:(0,n.useCallback)(r=>{if(!r)return"";let{deliveryJob:t,orderType:n,orderConfirmationStatus:l,orderTime:i,preOrdered:o,orderTimeMins:c}=r,v=(0,d.XJ)(n);if(t&&!v&&l===a.Z.ON_ITS_WAY){let{eta:r,deliveryStatus:n,vendor:l}=t;if(n===s.$.IN_TRANSIT&&(null==r?void 0:r.dropoff)&&(null==l?void 0:l.toLowerCase())==="vromo")return r.dropoff;if(n===s.$.DRIVER_AT_DROP_OFF)return e("label.arriving.now")}return o?function(e){if(!e)return"";let r=e.match(m);if(!r)return e;let[,t,n]=r,l=p()(t,"YYYY-MM-DD",!0);if(!l.isValid())return e;let i=l.format(u.lv.SHORT_DATE);return"".concat(i).concat(n)}(i):e("asap.minutes",[c])},[e]),getStatusMessage:t,mapTrackingMsg:v,getOrderConfirmationStatusIcon:f,getOrderTypeLabels:_}}},81672:function(e,r,t){"use strict";t.d(r,{e:function(){return I}});var n=t(67294),l=t(32435),i=t(70751),o=t(32351),a=t(66340);let s=e=>{let{data:r,error:t,isLoading:n,isSuccess:l}=(0,o.z)({queryKey:["GET_BRANCH_STATUS_BY_ID",e],queryFn:()=>(0,i.wp)(null!=e?e:0),enabled:!!e,...a.lb});return{data:r,error:t,isLoading:n,isSuccess:l}};var d=t(97454),c=t(69166),u=t(53656),v=t(83846),p=t(6350),m=t(14640);let f=(e,r)=>{let t=(0,m.useLocale)(),{data:n,error:l,isFetching:i,refetch:a}=(0,o.z)({queryKey:["GET_ORDER_BY_ID",e,t],queryFn:()=>(0,p.co)(null!=e?e:0,t),enabled:!!e&&!!r,staleTime:0,refetchInterval:1e4,refetchIntervalInBackground:!0});return{data:n,error:l,isFetching:i,refetch:a}};var _=t(99519),x=t(11949),h=t(8952),E=t(70244),y=t(50820),j=t(5366);let T=e=>{let{data:r,isLoading:t,isSuccess:n}=(0,o.z)({queryKey:["GET_ORDER_CONFIRMATION_SUPPORT_SETTING",e],queryFn:()=>(0,j.J)(e),enabled:!!e,...a.lb});return{data:r,isLoading:t,isSuccess:n}},b=(e,r)=>{if(e)return{entityId:e,entityType:E.Fk.COMPANY,settingCategory:E.ZA.CHECKOUT,settingSubCategory:E.IZ.ORDERCONFIRMATION,settingName:r,limit:1}},C=e=>{var r,t;return(null==e?void 0:null===(t=e[0])||void 0===t?void 0:null===(r=t.settingValue)||void 0===r?void 0:r.trim())||void 0};function I(e){let[r,t]=(0,n.useState)(!0),i=(0,l.Z)(),{data:o,isFetching:a}=f(e,r),{data:p}=s(null==o?void 0:o.branchId),{getBranchServedAtTable:m}=(0,d.v)(),{getExpectedAt:j}=(0,_.A)(),I=m(p),{supportActions:N}=function(e){var r;let{t}=(0,x.q)(),{company:l}=(0,y.Z)(e=>e),i=(null==l?void 0:l.companyType)===h.Q.PORTAL,o=(null==l?void 0:l.companyType)===h.Q.RESTAURANT,a=i?null==l?void 0:l.id:void 0,s=null==e?void 0:null===(r=e.locationPhone)||void 0===r?void 0:r.trim(),d=(0,n.useMemo)(()=>b(a,E.EO.SUPPORT_EMAIL),[a]),c=(0,n.useMemo)(()=>b(a,E.EO.SUPPORT_NUMBER),[a]),{data:u}=T(d),{data:v}=T(c);return{supportActions:(0,n.useMemo)(()=>{if(o)return s?[{key:"call-store",label:t("label.call.store"),value:s,href:"tel:".concat(s)}]:[];if(!i)return[];let e=C(u),r=C(v),n=[];return e&&n.push({key:"email-us",label:t("label.email.us"),value:e,href:"mailto:".concat(e)}),r&&n.push({key:"call-us",label:t("label.call.us"),value:r,href:"tel:".concat(r)}),n},[o,i,s,u,v,t])}}(o),g=function(e){var r,t,n,l,i,o,a,s,d,p,m,f,_,x,h;let{orderItem:E}=e,y=!1,j=null!==(l=null==E?void 0:null===(r=E.deliveryJob)||void 0===r?void 0:r.trackingLink)&&void 0!==l?l:null,T=!1,b=!1,C=[],I=null==E?void 0:E.deliveryJob,N=null==I?void 0:I.deliveryStatus,g=(0,v.K9)(null==E?void 0:E.orderType),R=(null==I?void 0:I.vendor)==="VROMO",O=null!==(i=null==I?void 0:null===(t=I.eta)||void 0===t?void 0:t.dropoff)&&void 0!==i?i:"",D=null==I?void 0:null===(n=I.eta)||void 0===n?void 0:n.dropoff;if(I&&N&&(null==E?void 0:E.orderTracking)&&(null==E?void 0:E.outsourcedDelivery)&&g&&(null==E?void 0:E.orderConfirmationStatus)===c.Z.ON_ITS_WAY){if(y=!0,[u.$.IN_TRANSIT,u.$.DRIVER_AT_DROP_OFF,u.$.CANCELLED].includes(N)){let e=null==E?void 0:null===(s=E.customerOrderAddress)||void 0===s?void 0:null===(a=s.customerOrderAddressFields.find(e=>"coordinates"===e.fieldName))||void 0===a?void 0:a.fieldValue,[r,t]=(null!=e?e:"").split(",").map(e=>e.trim()),n=parseFloat(r),l=parseFloat(t),i=null===(p=I.driver)||void 0===p?void 0:null===(d=p.location)||void 0===d?void 0:d.latitude,o=null===(f=I.driver)||void 0===f?void 0:null===(m=f.location)||void 0===m?void 0:m.longitude;if(!isNaN(n)&&!isNaN(l)&&!isNaN(i)&&!isNaN(o)){let e={position:{lat:n,lng:l},type:"customer",infoCustomText:N===u.$.IN_TRANSIT&&(null==I?void 0:null===(x=I.eta)||void 0===x?void 0:x.dropoff)&&(null==I?void 0:null===(h=I.eta)||void 0===h?void 0:h.dropoffMinutes)&&R?"".concat(null===(_=I.eta)||void 0===_?void 0:_.dropoffMinutes," min away"):void 0};C.push({position:{lat:i,lng:o},type:"driver"},e),T=!0}}else I.trackingLink&&I.displayTrackingLink&&(j=I.trackingLink,T=N!==u.$.IN_TRANSIT);T&&(null===(o=I.driver)||void 0===o?void 0:o.phone)&&(b=!0)}return{markers:C,haveDeliveryJob:y,trackingLink:j,isShowTrackingView:T,showCallView:b,isVROMOVendor:R,hourString:O,eta:D}}({orderItem:o}),R=j(o),O=function(e,r,t){let n=[c.Z.PENDING];if(!e)return{current:c.Z.PENDING,items:n};let l=e.orderConfirmationStatus,i=(0,v.K9)(e.orderType),o=e.orderType===c.m["EAT-IN"];if(null==e?void 0:e.orderTracking){if(n.push(c.Z.ACCEPTED),i){var a;let t=null===(a=e.deliveryJob)||void 0===a?void 0:a.deliveryStatus;if(r&&l!==c.Z.REJECTED)switch(n.push(c.Z.ON_ITS_WAY,c.Z.DRIVER_AT_DROP_OFF),t){case u.$.DRIVER_EN_ROUTE_TO_PICKUP:case u.$.DRIVER_AT_PICKUP:case u.$.DRIVER_UNASSIGNED:case u.$.DRIVER_ASSIGNED:l=c.Z.ACCEPTED;break;case u.$.IN_TRANSIT:l=c.Z.ON_ITS_WAY;break;case u.$.DRIVER_AT_DROP_OFF:l=c.Z.DRIVER_AT_DROP_OFF;break;
1case u.$.SUCCESS:l=c.Z.COMPLETED;break;case u.$.FAILED:l=c.Z.FAILED}else{let e=[c.Z.READY_TO_PICKUP,c.Z.ACCEPTED].includes(l)?c.Z.READY_TO_PICKUP:c.Z.ON_ITS_WAY;n.push(e,c.Z.DRIVER_AT_DROP_OFF)}}else l!==c.Z.PENDING&&l!==c.Z.COMPLETED&&n.splice(1,1,l),t&&o&&(n.splice(1,1),l!==c.Z.COMPLETED&&(l=c.Z.PENDING))}else l!==c.Z.COMPLETED&&n.splice(0,1,l);return n.push(c.Z.COMPLETED),{current:l,items:n}}(o,g.haveDeliveryJob,I);return(0,n.useEffect)(()=>{[c.Z.COMPLETED,c.Z.CANCELLED,c.Z.REJECTED].includes(null==o?void 0:o.orderConfirmationStatus)&&t(!1)},[null==o?void 0:o.orderConfirmationStatus]),{dataSource:o,isServedAtTable:I,expectedAt:R,orderStatus:O,isLoading:i&&a,deliveryTrackingInfo:g,supportActions:N}}},67190:function(e,r,t){"use strict";t.d(r,{H:function(){return V}});var n=t(85893),l=t(69289),i=t(11949),o=t(2516),a=t(87672),s=t(67294),d=t(29208),c=t.n(d),u=t(31468),v=t.n(u);let p=(e,r,t)=>{c()(e,r)||v()(e,r,t)},m=(e,r)=>e?e.map(e=>{let t={},n={},l=1,i=(e,r,n,l,i,o)=>{p(t,"".concat(r),{...e.parentOption,options:{}}),p(t,"".concat(r,".options.").concat(n),{...o,options:{}}),p(t,"".concat(r,".options.").concat(n,".options.").concat(l),{...i})},o=(e,r,i,o)=>{v()(n,"".concat(l),{...e.parentOptionGroup,options:{}});let a=c()(t,i);a?v()(n,"".concat(l,".options"),{...a}):v()(n,"".concat(l,".options"),{...o}),l++};return e.orderItemOptions.forEach(e=>{let r=c()(e,"parentOptionGroup.id",null),t=c()(e,"parentOption.id",null),n=c()(e,"option.id",null),l=c()(e,"option",null),o=c()(e,"parentOption",null),a=c()(e,"parentOptionGroup",null);null!==o&&i(e,t,r,n,l,a)}),e.orderItemOptions.forEach(e=>{let r=c()(e,"parentOptionGroup.id",null),t=c()(e,"option.id",null),n=c()(e,"option",null);null===c()(e,"parentOption",null)&&o(e,r,t,n)}),{parent:{...e.product,purchaseSubTotal:e.purchaseSubTotal,currencyCode:r,quantity:e.quantity,instructions:e.instructions,productPhotoUrl:e.product.productPhotoUrl},children:n}}):[];var f=t(65139),_=t(4982),x=t(5695),h=t(93411),E=t(22453),y=t(18446),j=t.n(y),T=t(81763),b=t.n(T),C=t(88104),I=t.n(C);function N(e){var r,t,l,s;let{item:d}=e,{t:c}=(0,i.q)(),{isDesktop:u}=(0,h.p)(),{formatCurrencyByCurrencyCode:v}=(0,_.U)(),{formatPromotionName:p,getFilteredPromotions:m}=(0,x.f)(),y=!["DELIVERY","CATERING"].includes(null!==(r=null==d?void 0:d.orderType)&&void 0!==r?r:""),T=m(null==d?void 0:d.discounts);return(0,n.jsxs)(o.Z,{className:I().container,vertical:!0,gap:u?16:8,children:[T&&T.length>0&&T.map(e=>(0,n.jsx)(f.w,{label:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(E.Z,{style:{width:18,height:18,paddingRight:4}}),p(e)]}),value:"-".concat(v(e.discountAmount,null==d?void 0:d.currencyCode))},e.promotionId)),!!(null==d?void 0:d.amount)&&(0,n.jsx)(f.w,{label:c("label.subtotal"),value:v(null!==(t=null==d?void 0:d.amount)&&void 0!==t?t:0,null==d?void 0:d.currencyCode),priceAfterDiscount:b()(null==d?void 0:d.subTotalAfterDiscount)&&!j()(d.subTotalAfterDiscount,null==d?void 0:d.amount)?v(null==d?void 0:d.subTotalAfterDiscount,null==d?void 0:d.currencyCode):void 0}),!!(null==d?void 0:d.serviceFee)&&(0,n.jsx)(f.w,{label:c("label.service.fee"),value:v(null!==(l=null==d?void 0:d.serviceFee)&&void 0!==l?l:0,null==d?void 0:d.currencyCode)}),!!(null==d?void 0:d.orderDiscount)&&b()(null==d?void 0:d.orderDiscount)&&(0,n.jsx)(f.w,{label:c("label.discount"),value:v(null!==(s=null==d?void 0:d.orderDiscount)&&void 0!==s?s:-0,null==d?void 0:d.currencyCode)}),!!(null==d?void 0:d.promoCodeDiscount)&&b()(null==d?void 0:d.promoCodeDiscount)&&(0,n.jsx)(f.w,{label:c("label.promocodediscount")+" (".concat(d.promoCode,")"),value:v(-1*d.promoCodeDiscount,d.currencyCode)}),!!(null==d?void 0:d.surCharge)&&(0,n.jsx)(f.w,{label:"Card Fee",value:v(d.surCharge,d.currencyCode)}),!!(null==d?void 0:d.deliveryCharge)&&(0,n.jsx)(f.w,{label:c("label.delivery.fee"),value:v(d.deliveryCharge,d.currencyCode)}),!!(null==d?void 0:d.customerOrderTaxes)&&d.customerOrderTaxes.map(e=>(0,n.jsx)(f.w,{label:e.taxLabel,value:v(e.taxAmount,d.currencyCode)},e.id)),y&&!!(null==d?void 0:d.tip)&&(0,n.jsx)(f.w,{label:c("order.details.tip"),value:v(d.tip,d.currencyCode)}),!!(null==d?void 0:d.driverTip)&&(0,n.jsx)(f.w,{label:c("label.drivertip"),value:v(d.driverTip,d.currencyCode)}),(0,n.jsx)(a.Z,{className:"dash"}),b()(null==d?void 0:d.subTotal)&&(null==d?void 0:d.subTotal)>=0&&(0,n.jsx)(f.w,{isBold:!0,isPrimary:!0,label:c("label.total").toUpperCase(),value:v(d.subTotal,d.currencyCode)})]})}
1var g=t(43644),R=t(31394),O=t(82057),D=t(83663),A=t(23240),P=t(22177),Z=t(52232),S=t.n(Z);let F=e=>{let{quantity:r,itemName:t,price:l,imageUrl:i,quantityStyle:a="button"}=e;return(0,n.jsxs)(o.Z,{className:S().content,justify:"space-between",align:"center",children:[(0,n.jsxs)(o.Z,{gap:12,style:{width:"100%"},children:[(0,n.jsx)(P.J,{quantity:r,quantityStyle:a}),(0,n.jsxs)(o.Z,{gap:4,vertical:!0,style:{width:"100%"},children:[(0,n.jsx)(D.F,{level:5,children:t}),(0,n.jsx)(O._,{children:l})]})]}),(0,n.jsx)(A.I,{imageUrl:i})]})},L=e=>{let{description:r,price:t,children:l,icon:i}=e;return(0,n.jsxs)(o.Z,{vertical:!0,justify:"space-between",style:{width:"100%",paddingLeft:4},gap:4,children:[(0,n.jsxs)(o.Z,{justify:"space-between",gap:6,children:[r&&(0,n.jsxs)(o.Z,{gap:6,children:[(0,n.jsx)(O._,{children:i}),(0,n.jsx)(O._,{children:r})]}),t&&(0,n.jsx)(O._,{children:t})]}),(0,n.jsx)(o.Z,{vertical:!0,gap:4,children:l})]})};function w(e){var r,t;let{item:l,quantityStyle:a="button"}=e,{t:s}=(0,i.q)(),{formatCurrencyByCurrencyCode:d}=(0,_.U)();return(0,n.jsxs)(o.Z,{className:S().container,vertical:!0,children:[(0,n.jsx)(F,{quantity:l.parent.quantity,itemName:l.parent.name1,price:d(l.parent.purchaseSubTotal,l.parent.currencyCode),imageUrl:null!==(r=l.parent.productPhotoUrl)&&void 0!==r?r:void 0,quantityStyle:a}),l.children&&Object.keys(l.children).length>0&&(0,n.jsxs)(o.Z,{className:S().additional,vertical:!0,gap:8,children:[(0,n.jsx)(O._,{children:s("label.additional")}),(0,n.jsx)(o.Z,{vertical:!0,children:(t=l.children)?Object.keys(t).map((e,r)=>{let l=c()(t,e+".options",null);return(0,n.jsx)(L,{icon:"+",children:l&&function e(r,t){var l;if(!r)return(0,n.jsx)(n.Fragment,{});let i="OPTION_OPTIONGROUP"!==r.optionGroupType?null==r?void 0:r.name:"",o=Object.keys(null!==(l=r.options)&&void 0!==l?l:{}).map((l,i)=>{var o;let a=c()(r.options,l,null);return(0,n.jsx)(L,{description:null===(o=r[l])||void 0===o?void 0:o.name,icon:t,children:a&&e(a,"+")},"option-".concat(r.id,"-").concat(l,"-").concat(i))});return(0,n.jsx)(L,{description:i,icon:t,children:o})}(l,"-")},"option-group-".concat(t.id,"-").concat(e,"-").concat(r))}):(0,n.jsx)(n.Fragment,{})}),(0,n.jsx)(R.v,{description:l.parent.instructions})]})]})}var k=t(93797),M=t.n(k);function V(e){var r;let{item:t,quantityStyle:d="button"}=e,{t:c}=(0,i.q)(),u=function(e){let{orderItems:r,currencyCode:t}=e;return(0,s.useMemo)(()=>m(r,t),[r,t])}({orderItems:null==t?void 0:t.orderItems,currencyCode:null==t?void 0:t.currencyCode}),v=(null==t?void 0:t.discounts)||[],p=null!==(r=null==t?void 0:t.lineItems)&&void 0!==r?r:[],f=p.length>0;return(0,n.jsxs)(o.Z,{className:M().summary,vertical:!0,children:[(0,n.jsx)(g.B,{title:c("page.title.ordersummary")}),(0,n.jsx)(o.Z,{className:M().content,vertical:!0,gap:12,children:f?p.map(e=>(0,n.jsx)(l.D,{shoppingCartItem:e,quantityStyle:d,discounts:v},e.entityId)):u.map((e,r)=>(0,n.jsx)(w,{item:e,quantityStyle:d},"".concat(e.parent.id,"-").concat(r)))}),(0,n.jsx)(a.Z,{className:"dash"}),(0,n.jsx)(N,{item:t})]})}},54647:function(e,r,t){"use strict";t.d(r,{V:function(){return i}});var n=t(85893),l=t(37054);function i(e){let{children:r,...t}=e;return(0,n.jsx)(l.xT,{...t,children:(0,n.jsx)("div",{style:{position:"absolute",left:"50%",transform:"translate(-50%, -100%)"},children:(0,n.jsx)("div",{style:{width:"fit-content",background:"white",padding:"6px 12px",borderRadius:"8px",boxShadow:"0 2px 6px rgba(0,0,0,0.15)",border:"1px solid #ddd",fontSize:"13px",fontWeight:500,whiteSpace:"nowrap"},children:r})})})}},99638:function(e,r,t){"use strict";t.d(r,{X:function(){return m}});var n=t(85893),l=t(67294),i=t(83846),o=t(99e3),a=t(11949),s=t(2516),d=t(87672),c=t(23721),u=t(83663),v=t(35859),p=t.n(v);function m(e){let{paymentType:r}=e,{t}=(0,a.q)(),{formatPaymentMethod:v}=function(){let{t:e}=(0,a.q)(),r=(0,l.useMemo)(()=>({CASH:{title:(0,i.fm)(e("CASH").toLocaleLowerCase()),icon:(0,n.jsx)(o.E9,{style:{height:36,color:"var(--ant-color-text-base)"}})},CARD:{title:(0,i.fm)(e("CARD").toLocaleLowerCase()),icon:(0,n.jsx)(o.ON,{style:{height:36,color:"var(--ant-color-text-base)"}})},CARDTERMINAL:{title:(0,i.fm)(e("CARDTERMINAL").toLocaleLowerCase()),icon:(0,n.jsx)(o.U5,{style:{height:36,color:"var(--ant-color-text-base)"}})}}),[e]),t=(0,l.useCallback)(e=>{var t;return null!==(t=r[e])&&void 0!==t?t:r.CASH},[]);return{paymentTypes:r,formatPaymentMethod:t}}(),{icon:m,title:f}=v(r);return(0,n.jsxs)(s.Z,{className:p().payment,vertical:!0,children:[(0,n.jsx)(u.F,{level:5,children:t("label.paymentmethod")}),(0,n.jsx)(d.Z,{className:"dash"}),(0,n.jsx)(c.Z,{className:p().content,styles:{body:{padding:0,margin:0}},children:(0,n.jsxs)(s.Z,{justify:"space-between",align:"center",children:[(0,n.jsx)(u.F,{level:5,children:f}),m]})})]})}},54164:function(e,r,t){"use strict";t.d(r,{p:function(){return u}});var n=t(85893),l=t(67294),i=t(99519),o=t(60486),a=t(83846),s=t(69166),d=t(11949),c=t(93411);let u=e=>{let{order:r}=e,{t}=(0,d.q)(),{getOrderTypeLabels:u}=(0,i.A)(),{isDesktop:v}=(0,c.p)();return(0,l.useMemo)(()=>{var e;if(!r)return{fromLabel:"",toLabel:"",fromContent:"",toContent:"",toPhoneNumber:"",tableNumberLabel:"",tableNumberContent:"",pickupPointLabel:"",pickupPointContent:"",isEatIn:!1};let l=(0,a.K9)(null==r?void 0:r.orderType),i=(null==r?void 0:r.orderType)===s.m["EAT-IN"],d=u(null==r?void 0:r.orderType),c=d.from,p=d.to,m=v?null==r?void 0:r.locationAddress:"",f=v?(0,o.Mh)(null==r?void 0:null===(e=r.customerOrderAddress)||void 0===e?void 0:e.customerOrderAddressFields):"",_=l?(0,n.jsxs)(n.Fragment,{children:[null==r?void 0:r.location," ",(0,n.jsx)("br",{}),m]}):(0,n.jsx)(n.Fragment,{children:null==r?void 0:r.location}),x=l?(0,n.jsxs)(n.Fragment,{children:[null==r?void 0:r.customerFirstName," ",null==r?void 0:r.customerLastName,(0,n.jsx)("br",{}),f]}):(0,n.jsx)(n.Fragment,{children:null==r?void 0:r.locationAddress}),h=i?t("label.table.number"):void 0,E=i?null==r?void 0:r.tableNumber:void 0,y=t("label.pickup.point"),j=t("label.pickup.at.counter");return{fromLabel:c,toLabel:p,fromContent:_,toContent:x,toPhoneNumber:l?null==r?void 0:r.customerPhone:"",tableNumberLabel:h,tableNumberContent:E,pickupPointLabel:y,pickupPointContent:j,isEatIn:i}},[r,u,v,t])}},53656:function(e,r,t){"use strict";var n,l;t.d(r,{$:function(){return n}}),(l=n||(n={})).PENDING="PENDING",l.LOOKING_FOR_DRIVER="LOOKING_FOR_DRIVER",l.DRIVER_DEPART_PICKUP="DRIVER_DEPART_PICKUP",l.DRIVER_EN_ROUTE_TO_PICKUP="DRIVER_EN_ROUTE_TO_PICKUP",l.DRIVER_UNASSIGNED="DRIVER_UNASSIGNED",l.DRIVER_ASSIGNED="DRIVER_ASSIGNED",l.DRIVER_AT_PICKUP="DRIVER_AT_PICKUP",l.IN_TRANSIT="IN_TRANSIT",l.DRIVER_AT_DROP_OFF="DRIVER_AT_DROPOFF",l.SUCCESS="SUCCESS",l.FAILED="FAILED",l.CANCELLED="CANCELLED"},39469:function(e){e.exports={content:"OrderConfirmation_content__gdqhp"}},47063:function(e){e.exports={container:"OrderConfirmationInfo_container__4FwNm",tracking:"OrderConfirmationInfo_tracking__cBJN_"}},80348:function(e){e.exports={container:"OrderConfirmationProgress_container__teEv_",driver:"OrderConfirmationProgress_driver__8L5qw",map:"OrderConfirmationProgress_map__TU7lO",iframe:"OrderConfirmationProgress_iframe__lu5fL"}},93797:function(e){e.exports={summary:"OrderSummary_summary__uWlrE",content:"OrderSummary_content__1Fg4J"}},88104:function(e){e.exports={container:"OrderSummaryPrice_container__hWJi6",item:"OrderSummaryPrice_item__GboAx",title:"OrderSummaryPrice_title__OEjlw"}},52232:function(e){e.exports={container:"OrderSummaryViewItem_container__THKkG",content:"OrderSummaryViewItem_content__ROMrG",count:"OrderSummaryViewItem_count__13ZOo",label:"OrderSummaryViewItem_label___q5zm",price:"OrderSummaryViewItem_price__LxtDY",additional:"OrderSummaryViewItem_additional__SJjIG"}}
1,17555:function(e){e.exports={contact:"ContactSupport_contact__eaGvG",action:"ContactSupport_action__Z8aLN",actionBody:"ContactSupport_actionBody__8GKdQ",actionValue:"ContactSupport_actionValue__kStil"}},35859:function(e){e.exports={payment:"PaymentMethod_payment__0WufV",content:"PaymentMethod_content__fIb5E"}}}]);
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.