1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[86103],{80323:function(e,l,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/quickly-order/recent",function(){return t(42463)}])},60751:function(e,l,t){"use strict";t.d(l,{wI:function(){return d.Z},XC:function(){return n.Z},Gq:function(){return i}});var n=t(64115),o=t(84851),i=(e,l)=>{let t=(0,o.Pi)(e);return(0,n.Z)(t,l)},d=t(64756)},64756:function(e,l,t){"use strict";var n=t(85893),o=t(25142),i=t(24344);let d=e=>{var l,t,d;let{appConfig:r}=(0,i.s6)(),a=(0,i.hU)();return(0,n.jsxs)(o.Ar,{children:[(0,n.jsx)(o.NV,{}),(0,n.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,n.jsx)(o.q6,{isOpen:!!(null==r?void 0:null===(l=r.app)||void 0===l?void 0:l.drainageImageStatus)&&a.isPc,images:{pc:null==r?void 0:null===(t=r.app)||void 0===t?void 0:t.drainageImageLink,mobile:null==r?void 0:null===(d=r.app)||void 0===d?void 0:d.drainageImageMobileLink}}),(0,n.jsx)(o.Ar.Footer,{})]})},r=e=>{var l;return null!==(l=null==e?void 0:e.getLayout)&&void 0!==l?l:e=>(0,n.jsx)(d,{children:e})};l.Z=(e,l)=>{let t=r(l);return e.getLayout||(e.getLayout=t),e}},42463:function(e,l,t){"use strict";t.r(l),t.d(l,{default:function(){return L}});var n=t(85893),o=t(67294),i=t(60751),d=t(24344),r=t(25142),a=t(80814),s=t(47638),u=t(93967),c=t.n(u),v=t(56099),_=t.n(v),p=t(76213),h=t(54331),m=t(88737),g=t(38711);let b=e=>{if(!e||!Array.isArray(e))return[];console.log(e);try{return e.map(e=>({...e,count:null==e?void 0:e.comboCount,comboPrice:null==e?void 0:e.price,comboSubTotalPrice:null==e?void 0:e.subTotalAmount,selectCombo:e.comboGroupList.map(e=>({comboGroupId:e.comboGroupId,dishList:e.dishList.map(e=>({...e,originDish:{...e,tasteItemList:null==e?void 0:e.tasteList,addOnGroupList:f(null==e?void 0:e.addOnList),note:null==e?void 0:e.describe},count:null==e?void 0:e.dishCount,tasteItemList:null==e?void 0:e.tasteList,addOnGroupList:f(null==e?void 0:e.addOnList),note:null==e?void 0:e.describe}))}))}))}catch(e){return[]}},f=e=>{let l={};return e.forEach(e=>{let{groupId:t,groupName:n,addOnId:o,addOnPrice:i,addOnName:d,addOnCount:r}=e;l[t]||(l[t]={groupId:t,groupName:n,addOnList:[]}),l[t].addOnList.push({addOnId:o,addOnPrice:i,addOnName:d,groupId:t,count:r})}),Object.values(l)},{staticAddGoods:x}=r.GoodsDetail;var y=()=>{let{storeId:e,set:l}
1=(0,d.oR)(),t=(0,p.Z)(),{updateCart:n,deleteCart:o}=h.orderStore,{comboList:i,addCombo:a,changeComboCount:u,changeCombo:c,deleteCombo:v}=h.comboStore,_=(0,d.QT)({url:s.VV.getReorderData,method:"get"}),f=()=>{"delivery"===sessionStorage.getItem("__dining_type")?t.push("/order?type=delivery"):t.push("/order")},y=e=>{let l=[];return null==e||e.forEach(e=>{let t=l.findIndex(l=>(null==l?void 0:l.groupId)===(null==e?void 0:e.groupId));if(t>-1){var n,o;null===(o=l[t])||void 0===o||null===(n=o.addOnList)||void 0===n||n.push({...e,count:null==e?void 0:e.addOnCount})}else l.push({groupId:null==e?void 0:e.groupId,addOnList:[{...e,count:null==e?void 0:e.addOnCount}]})}),l},O=e=>{let l=[];return null==e||e.forEach(e=>{let t=l.findIndex(l=>(null==l?void 0:l.groupId)===(null==e?void 0:e.groupId));if(t>-1){var n,o;null===(o=l[t])||void 0===o||null===(n=o.tasteList)||void 0===n||n.push({...e})}else l.push({groupId:null==e?void 0:e.groupId,id:null==e?void 0:e.groupId,tasteList:[{...e,id:null==e?void 0:e.tasteId}]})}),l},L=(e,l)=>{null==l||l.forEach(e=>{null==e||e.selectCombo.forEach(e=>{e.dishList.forEach(e=>{e.tasteItemList=O(null==e?void 0:e.tasteList)})}),a(e)}),null==e||e.forEach(e=>{var l;let t=O(null==e?void 0:e.tasteList),n=y(null==e?void 0:e.addOnList),o={...e,count:null==e?void 0:e.dishCount,tasteItemList:t,specialInstructions:null!==(l=null==e?void 0:e.notes)&&void 0!==l?l:"",addOnGroupList:n};I({...x(o)})})},I=e=>{n(e.token,l=>l?{...l,count:l.count+e.count,subTotalPrice:(0,m.HG)((null==l?void 0:l.price)||0,l.count||1)}:{...e})},j=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];1===e?(t&&(o(),v()),t&&l(t),L(n,i),f()):2===e?r.u_.alert({title:null===g.bb||void 0===g.bb?void 0:g.bb.title,content:null===g.bb||void 0===g.bb?void 0:g.bb.content,onOk:()=>{t&&(o(),v()),t&&l(t),L(n,i),f()},onOkText:null===g.bb||void 0===g.bb?void 0:g.bb.onOkText}):3===e&&r.u_.info({title:null===g._M||void 0===g._M?void 0:g._M.title,content:null===g._M||void 0===g._M?void 0:g._M.content,onOkText:null===g._M||void 0===g._M?void 0:g._M.onOkText,titleStyle:{color:"var(--color-primary-ink, var(--color-primary))"},closable:!1,footerProps:{ghost:!1}})},k=async function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)return;let t=await _.send({orderId:e}),n=t.data;if(n){n.comboAvailable=b(null==n?void 0:n.comboAvailable);let e=[...null==n?void 0:n.comboUnAvailable,...null==n?void 0:n.dishUnAvailable],t=[...null==n?void 0:n.comboAvailable,...null==n?void 0:n.dishAvailable];(null==e?void 0:e.length)>0&&(null==t?void 0:t.length)<=0?j(3):(null==e?void 0:e.length)>0&&(null==t?void 0:t.length)>0?j(2,l,n.dishAvailable,n.comboAvailable):(null==e?void 0:e.length)<=0&&(null==t?void 0:t.length)>0&&j(1,l,n.dishAvailable,n.comboAvailable)}},N=async l=>{if(e===(null==l?void 0:l.shopId))return await k(null==l?void 0:l.id);r.u_.alert({title:null===g.pK||void 0===g.pK?void 0:g.pK.title,content:null===g.pK||void 0===g.pK?void 0:g.pK.content,onOkText:null===g.pK||void 0===g.pK?void 0:g.pK.onOkText,onOk:async()=>await k(null==l?void 0:l.id,null==l?void 0:l.shopId),onCancelText:null===g.pK||void 0===g.pK?void 0:g.pK.onCancelText})};return{toReorder:N}},O=t(32459),L=(0,i.XC)(()=>{let{appConfig:e}=(0,d.s6)(),l=(0,p.Z)(),t=(0,d.hU)(),i=(0,d.QT)(s.VV.getOnOrderList),u=(0,d.QT)({url:s.VV.getOrderList,method:"post"}),[v,h]=(0,o.useState)(!0),g=(null==i?void 0:i.data)||[],b=(null==u?void 0:u.data)||[],f=(0,o.useRef)(null),{toReorder:x}=y();(0,o.useEffect)(()=>()=>{f.current&&clearTimeout(f.current)},[]);let L=async()=>{Promise.all([i.send(),u.send({pageNo:0,pageSize:20})]).then(()=>{h(!1),f.current=setTimeout(L,1e4)})},I=async e=>{if(e)return await l.push("/order-detail?id=".concat(e))},j=async e=>{if(e)return await l.push("/order-pay?id=".concat(e))},k=async e=>await x(e);(0,o.useEffect)(()=>{(0,O.gL)("recent_order_list"),v&&L()},[]);let N=(0,o.useMemo)(()=>v&&(i.loading||u.loading),[v,i.loading,u.loading]);return(0,n.jsxs)("div",{className:c()(_().recent,{}),children:[(0,n.jsx)(r.$4,{title:(0,m.aR)("Order History")}),(0,n.jsx)("h1",{className:_().visually_hidden,children:"Order History"}),N?(0,n.jsx)(n.Fragment,{children:t.isPc?(0,n.jsx)(n.Fragment,{children:[void 0,void 0].map((e,l)=>(0,n.jsx)(a.default,{loading:!0,active:!0,className:_().skeleton,title:!1,paragraph:{rows:4}},l))}):(0,n.jsx)(n.Fragment,{children:[void 0,void 0,void 0].map((e,l)=>(0,n.jsx)(a.default,{loading:!0,active:!0,className:_().skeleton,title:!1,paragraph:{rows:4}},l))})}):(0,n.jsxs)(n.Fragment,{children:[((null==g?void 0:g.length)>0||(null==b?void 0:b.length)>0)&&(0,n.jsxs)(n.Fragment,{children:[!!(null==g?void 0:g.length)&&(0,n.jsx)("div",{className:_().order_list,children:null==g?void 0:g.map((e,l)=>(0,n.jsx)(r.Fk.Online,{dataSource:e,handleGoDetail:I,handlePayNow:j,className:_().order_item},l))}),!!(null==b?void 0:b.length)&&(0,n.jsx)("div",{className:_().order_list,children:null==b?void 0:b.map((e,l)=>(0,n.jsx)(r.Fk.Completed,{dataSource:e,handleGoDetail:I,handleReorder:k,className:_().order_item},l))}),(0,n.jsx)("div",{className:_().tip_page_three_orders,children:(0,n.jsx)("p",{children:"Only orders from the past three months are displayed."})})]}),(null==g?void 0:g.length)<=0&&(null==b?void 0:b.length)<=0&&(0,n.jsxs)("div",{className:_().tip_page,children:[(0,n.jsx)("i",{className:"iconfont icon-empty","aria-hidden":"true"}),(0,n.jsx)("p",{children:"No recent orders were found"})]})]})]})})},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"}},56099:function(e){e.exports={recent:"recent_recent__mq8SY",order_list:"recent_order_list__OpmId",order_item:"recent_order_item__255Mw",skeleton:"recent_skeleton__pPTw_",recent_loading:"recent_recent_loading__6YyOt",tip_page:"recent_tip_page__Vo_7v",tip_page_three_orders:"recent_tip_page_three_orders__VulMx",visually_hidden:"recent_visually_hidden__YIZvM","text-animation":"recent_text-animation__ZEEE2"}}},function(e){e.O(0,[5634,47689,59495,49774,92888,40179],function(){return e(e.s=80323)}),_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.