1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[67821],{58600:function(e,i,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/quickly-order/complete",function(){return n(73224)}])},60751:function(e,i,n){"use strict";n.d(i,{wI:function(){return o.Z},XC:function(){return s.Z},Gq:function(){return l}});var s=n(64115),t=n(84851),l=(e,i)=>{let n=(0,t.Pi)(e);return(0,s.Z)(n,i)},o=n(64756)},64756:function(e,i,n){"use strict";var s=n(85893),t=n(25142),l=n(24344);let o=e=>{var i,n,o;let{appConfig:r}=(0,l.s6)(),a=(0,l.hU)();return(0,s.jsxs)(t.Ar,{children:[(0,s.jsx)(t.NV,{}),(0,s.jsxs)("div",{style:{paddingTop:(null==a?void 0:a.isMobile)?"calc(var(--m-l-h-height)":"calc(var(--l-h-height)"},children:[" ",e.children]}),(0,s.jsx)(t.q6,{isOpen:!!(null==r?void 0:null===(i=r.app)||void 0===i?void 0:i.drainageImageStatus)&&a.isPc,images:{pc:null==r?void 0:null===(n=r.app)||void 0===n?void 0:n.drainageImageLink,mobile:null==r?void 0:null===(o=r.app)||void 0===o?void 0:o.drainageImageMobileLink}}),(0,s.jsx)(t.Ar.Footer,{})]})},r=e=>{var i;return null!==(i=null==e?void 0:e.getLayout)&&void 0!==i?i:e=>(0,s.jsx)(o,{children:e})};i.Z=(e,i)=>{let n=r(i);return e.getLayout||(e.getLayout=n),e}},73224:function(e,i,n){"use strict";n.r(i),n.d(i,{Complete:function(){return x}});var s=n(85893),t=n(60751),l=n(10367),o=n.n(l),r=n(25142),a=n(24344),c=n(76213),d=n(88737),u=n(89798),_=n(47638),p=n(39142),m=n.n(p),v=n(67294),f=n(37066),b=n(32459);let x=()=>{var e;let{timeRemaining:i,startCountdown:n}=(0,a.au)(8),[t,l]=(0,v.useState)("loading"),p=(0,c.Z)(),x=(0,a.QT)(_.iX.getOrderDetail),y=(null==x?void 0:null===(e=x.data)||void 0===e?void 0:e.orderDto)||{};(0,v.useEffect)(()=>{(0,b.gL)("purchase_success"),h()},[]);let h=async()=>{let e=d.t.getItem("__complete_order_id");if(!e){l("missing");return}l("loading");try{var i;let s=await x.send({orderId:e});l((null==s?void 0:null===(i=s.data)||void 0===i?void 0:i.orderDto)&&Object.keys(s.data.orderDto).length>0?"ready":"error"),n()}catch(e){l("error")}};(0,v.useEffect)(()=>{i<=0&&N()},[i]);let N=()=>{p.push("/recent")},j=(0,v.useMemo)(()=>{var e;if((null===(e=Object.keys(y))||void 0===e?void 0:e.length)>0){let e=(null==y?void 0:y.billingList)||[],i=null==e?void 0:e.some(e=>{var i;return null==e?void 0:null===(i=e.paymentOrderEntityList)||void 0===i?void 0:i.some(e=>[18,19].includes(Number(e.payType)))});return i?"Order Placed":"Payment Successful"}},[y]),w=(0,v.useMemo)(()=>{let{pickupTime:e,shopTimeZone:i,asap:n,orderDeliveryDetail:s}=y,t="EEE, MMM dd t";return n?"ASAP":Number(y.type)===f.uB.DELIVERY&&(null==s?void 0:s.deliveryTime)?((0,u.JK)(s.deliveryTime,i)&&(t="t"),(0,u.Gb)(s.deliveryTime,i,t)):e?((0,u.JK)(e,i)&&(t="t"),(0,u.JK)(e,i)&&(t="t"),(0,u.Gb)(e,i,t)):null},[y]),g=(0,v.useMemo)(()=>Number(y.type)===f.uB.DELIVERY?"Your order will be ready for delivery around":Number(y.type===f.uB.PICKUP)?"Your order will be ready for pickup around":Number(y.type===f.uB.DINEIN)?"Your order will be ready for dine-in around":Number(y.type===f.uB.TAKEOUT)?"Your order will be ready for takeout around":void 0,[y]),E=(0,v.useMemo)(()=>{if(Number(y.type)===f.uB.DELIVERY){var e,i;if((0,f.A$)(Number(null==y?void 0:null===(e=y.orderDeliveryDetail)||void 0===e?void 0:e.upstreamType)))return"(An estimated time will soon be displayed)";let n=null===(i=y.orderDeliveryDetail)||void 0===i?void 0:i.estimatedTime;return null==n?null:(0,s.jsxs)("div",{children:["(Estimated delivery time is ",(0,s.jsxs)("span",{children:[n,n>1?"mins":"min"]}),", you will see a more accurate time once your order is accepted)"]})}return null},[y]);return(0,s.jsxs)("div",{className:m().complete,children:[(0,s.jsx)(r.$4,{title:(0,d.aR)("Order Complete")}),(0,s.jsxs)("div",{className:m().card,children:[(0,s.jsxs)("div",{className:m().success_layout,children:[(0,s.jsx)("div",{className:m().success_icon,"aria-hidden":"true",children:(0,s.jsx)("i",{className:"iconfont icon-result-ok"})}),(null==x?void 0:x.loading)||!j?(0,s.jsx)("div",{className:m().success_text}):(0,s.jsx)("h1",{className:m().success_text,children:j})]}),(0,s.jsxs)("p",{role:"status","aria-atomic":"true",className:m().ready_status,children:["loading"===t&&"Loading your order detailsâ¦","error"===t&&"Unable to load order details.","ready"===t&&j]}),(0,s.jsx)(r.uT,{isOpen:"ready"===t&&(null==y?void 0:y.rewardPoints)>0,children:(0,s.jsxs)("div",{className:m().benefit,children:[(0,s.jsxs)("span",{className:m().benefit_icon_wrap,children:[(0,s.jsx)("div",{className:m().benefit_price_icon}),(0,s.jsx)("span",{className:m().benefit_price,children:null==y?void 0:y.rewardPoints})]}),(0,s.jsxs)("span",{className:m().benefit_text,children:[" ",(null==y?void 0:y.pointsAllianceName)?"reward "+(null==y?void 0:y.pointsAllianceName)+" points earned":"reward points earned","! "]})]})}),(0,s.jsx)(r.uT,{isOpen:"ready"===t&&(null==y?void 0:y.promotionAmount)>0,children:(0,s.jsxs)("div",{className:m().benefit,children:[(0,s.jsxs)("span",{className:m().benefit_icon_wrap,children:[(0,s.jsx)("div",{className:m().benefit_price_icon}),(0,s.jsx)("span",{className:m().benefit_price,children:(0,s.jsx)(r.tA,{value:y.promotionAmount})})]}),(0,s.jsx)("span",{className:m().benefit_text,children:" saved by promotion!"})]})}),(0,s.jsx)(r.uT,{isOpen:"ready"===t&&(null==y?void 0:y.pointAmount)>0,children:(0,s.jsxs)("div",{className:m().benefit,children:[(0,s.jsxs)("span",{className:m().benefit_icon_wrap,children:[(0,s.jsx)("div",{className:m().benefit_price_icon}),(0,s.jsx)("span",{className:m().benefit_price,children:(0,s.jsx)(r.tA,{value:null==y?void 0:y.pointAmount})})]}),(0,s.jsxs)("span",{className:m().benefit_text,children:["saved by using ",(0,s.jsx)("span",{className:m().point_count,children:null==y?void 0:y.points})," ",(null==y?void 0:y.pointsAllianceName)?"reward "+(null==y?void 0:y.pointsAllianceName)+" points":"reward points","!"]})]})}),(0,s.jsx)("div",{className:m().line}),(0,s.jsxs)("div",{className:m().success_info,children:[(0,s.jsx)("div",{className:m().tip,children:g}),(0,s.jsx)(r.uT,{isOpen:!!w,children:(0,s.jsx)("div",{className:m().time,children:w})}),(0,s.jsx)("div",{className:m().sub_tips,children:E})]}),(0,s.jsx)("div",{className:m().done_wrap,children:(0,s.jsxs)(o(),{type:"primary",loading:i<=0,className:m().done_button,onClick:N,children:["Done (",i,")"]})})]})]})};i.default=(0,t.Gq)(x)},35584:function(e){e.exports={style:{fontFamily:"'__notoSans_59c820', '__notoSans_Fallback_59c820'",fontWeight:400,fontStyle:"normal"},className:"__className_59c820"}},27799:function(e){e.exports={style:{fontFamily:"'__openSans_1a267b', '__openSans_Fallback_1a267b'",fontStyle:"normal"},className:"__className_1a267b"}},39142:function(e){e.exports={complete:"complete_complete__lwfAd",card:"complete_card__g__ml",success_layout:"complete_success_layout__szdGa",success_icon:"complete_success_icon__XXjDG",success_text:"complete_success_text__lOGn3",benefit:"complete_benef
1it__lkK3o",benefit_icon_wrap:"complete_benefit_icon_wrap__LLVPm",benefit_icon:"complete_benefit_icon__WpJjb",benefit_price_icon:"complete_benefit_price_icon__DPSnW",benefit_price:"complete_benefit_price__Ml0x6",benefit_text:"complete_benefit_text__YVPww",line:"complete_line__fUzjN",success_info:"complete_success_info__UuxEh",tip:"complete_tip__i9WF6",time:"complete_time__Gv6sa",done_wrap:"complete_done_wrap__1qrRU",done_button:"complete_done_button__USfF7",sub_tips:"complete_sub_tips__M0xMB",point_count:"complete_point_count__5_Zkk",ready_status:"complete_ready_status__LkEGh","text-animation":"complete_text-animation__XKxpp"}}},function(e){e.O(0,[5634,47689,59495,49774,92888,40179],function(){return e(e.s=58600)}),_N_E=e.O()}]);
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.