1"use strict";(self.webpackChunkgoodnessme_app=self.webpackChunkgoodnessme_app||[]).push([[2053],{95303:function(n,e,t){t.d(e,{y:function(){return w}});var l=t(67294),i=t(74780),o=t(56348),r=t(34999),s=t(31312),u=t(85893),a=function(n){var e=n.title,t=(0,s.dF)().logoutCustomer;return(0,u.jsxs)(i.Ug,{justifyContent:"space-between",spacing:6,children:[(0,u.jsx)(i.X6,{as:"h2",size:"h4",children:e}),(0,u.jsx)(o.c,{below:"sm",children:(0,u.jsx)(r.zx,{py:"8px",px:"46px",variant:"outline",mt:4,onClick:t,children:"Sign Out"})}),(0,u.jsx)(o.di,{below:"sm",children:(0,u.jsx)(r.zx,{py:"8px",px:"46px",m:0,variant:"link",onClick:t,border:"none",color:"brand.avocado",children:"Sign Out"})})]})},d=(0,l.memo)(a),c=t(23343),x=t(99028),v=function(n){var e=n.location,i=(0,c.l)().helpers.ErrorBoundary,o=(0,x.G)().isBase,r=(0,l.lazy)((function(){return t.e(4262).then(t.bind(t,44262))})),s=(0,l.lazy)((function(){return t.e(6589).then(t.bind(t,46589))}));return(0,u.jsx)(i,{children:(0,u.jsx)(l.Suspense,{fallback:null,children:o?(0,u.jsx)(s,{location:e}):(0,u.jsx)(r,{})})})},h=(0,l.memo)(v),p=t(12963),f=t(57660),m=t(67473),j=t(62893),g=t(61933),b=function(){var n=(0,j.jt)().customer,e=(0,c.l)().helpers.capitalise,t=(0,g.t)(),l=t.loyaltyTierName,o=t.customerPoints,r=null!=n&&n.firstName?", "+e(null==n?void 0:n.firstName):"";return(0,u.jsxs)(i.Ug,{mt:[6,8],bg:"brand.lavender",justifyContent:"space-between",maxH:[28,44],overflow:"hidden",children:[(0,u.jsxs)(i.gC,{py:[4.5,4.5,9],pl:[5,5,12],alignItems:"flex-start",spacing:1,children:[(0,u.jsxs)(i.xv,{fontWeight:[400,700],fontSize:["md","xl"],children:["Welcome",r]}),(0,u.jsxs)(i.xv,{fontSize:["md","xl"],fontWeight:[700,400],children:["Youâre a GoodnessMe ",l,"!"]}),(0,u.jsxs)(i.xv,{fontSize:["md","xl"],display:["none","none","block"],children:["You have ",o," points"]})]}),(0,u.jsx)(i.xu,{children:(0,u.jsx)(f.Ee,{src:m.Z,w:[34,60],mr:[1,1,12]})})]})},y=(0,l.memo)(b),S=function(n){var e=n.content,t=n.subtitle,l=n.location,r=n.title,s=n.children,a=n.showRewardsBanner,c=void 0!==a&&a,x=(0,(0,p.r0)().getContent)({content:e});return(0,u.jsx)(i.W2,{pt:[16,16,27],pb:22,children:(0,u.jsxs)(i.kC,{flexDirection:["column","row"],gap:0,children:[(0,u.jsxs)(i.xu,{w:["100%",66],pr:[0,8],children:[(0,u.jsx)(o.c,{below:"sm",children:(0,u.jsx)(i.X6,{as:"h1",size:"h4",mb:9,children:r})}),(0,u.jsx)(o.di,{below:"sm",children:(0,u.jsx)(i.xu,{pb:6,children:(0,u.jsx)(d,{title:t})})}),(0,u.jsx)(h,{location:l})]}),(0,u.jsxs)(i.xu,{w:["100%","70%"],pl:[0,8],children:[(0,u.jsx)(o.c,{below:"sm",children:(0,u.jsx)(d,{title:t})}),c&&(0,u.jsx)(y,{}),(0,u.jsx)(i.xu,{my:6,sx:{p:{fontSize:"sm",lineHeight:"21px"}},children:x}),s]})]})})},w=(0,l.memo)(S)},52499:function(n,e,t){t.d(e,{O:function(){return a},t:function(){return d}});var l=t(63366),i=t(71562),o=t(23343),r=t(18205),s=t(85893),u=["location"],a=function(n){return function(e){var t=e.location,a=(0,l.Z)(e,u),d=(0,o.l)().helpers.isBrowser,c=(0,o.y)(),x=c.getStorage,v=c.removeStorage,h=(0,r.qt)().settings,p=h.keys,f=h.params,m=h.routes,j=x(p.customer);if(null==j||!j.accessToken||new Date(null==j?void 0:j.expiresAt)<=new Date){if(v(p.customer),d){var g=m.LOGIN_REGISTER+((null==t?void 0:t.pathname)!==m.DASHBOARD?"?"+f.continue+"="+(null==t?void 0:t.pathname):"");(0,i.c4)(g,{replace:!0})}return null}return(0,s.jsx)(n,Object.assign({},a,{location:t}))}},d=function(n){return function(e){var t=Object.assign({},e),l=(0,o.l)().helpers,u=l.getUrlParameter,a=l.isBrowser,d=(0,o.y)().getStorage,c=(0,r.qt)().settings,x=c.keys,v=c.params,h=c.routes,p=d(x.customer);if(null!=p&&p.accessToken&&new Date(null==p?void 0:p.expiresAt)>=new Date&&a){var f=u(v.continue),m=!!u(v.checkout)?h.CHECKOUT:f||h.DASHBOARD;(0,i.c4)(m,{replace:!0})}return(0,s.jsx)(n,Object.assign({},t))}}},95573:function(n,e,t){t.r(e),t.d(e,{Head:function(){return Q.F},default:function(){return G}});var l=t(63366),i=t(52499),o=t(62893),r=t(67294),s=t(74780),u=t(80177),a=t(31312),d=t(15861),c=t(64687),x=t.n(c),v=t(56045),h=t(34999),p=t(78538),f=t(23343),m=t(26679),j=t(1462),g=t(83515),b=t(93036),y=t(94762),S=t(85893),w=function(n){var e=n.outOfStockItems,t=void 0===e?[]:e,l=n.onClose,i=n.isOpen;return(0,S.jsx)(S.Fragment,{children:(0,S.jsxs)(y.u_,{isOpen:i,onClose:l,isCentered:!0,children:[(0,S.jsx)(y.ZA,{}),(0,S.jsxs)(y.hz,{borderRadius:"unset",border:"2px",bg:"brand.offWhite",children:[(0,S.jsx)(y.xB,{bg:"brand.lightSand",children:"These products are currently out of stock"}),(0,S.jsx)(y.fe,{children:null==t?void 0:t.map((function(n){var e=n.title,t=n.totalQty,l=n.oosQty;return(0,S.jsxs)(s.xv,{mb:3,children:[l," of ",t," "," â "," ",e]},e)}))}),(0,S.jsx)(y.mz,{justifyContent:"center",children:(0,S.jsx)(h.zx,{onClick:l,children:"Ok"})})]})]})})},k=(0,r.memo)(w),z=t(10847),C=t(97382),O=t(15610),q=function(n){var e=[],t=[];
1return null==n||n.forEach((function(n){var l,i,o,r,s,u,a;if(null!=n&&null!==(l=n.variant)&&void 0!==l&&l.availableForSale||!(null!=n&&null!==(i=n.variant)&&void 0!==i&&i.currentlyNotInStock||null==n||null===(o=n.variant)||void 0===o||!o.quantityAvailable||(null==n||null===(r=n.variant)||void 0===r?void 0:r.quantityAvailable)<=0)){if((null==n||null===(s=n.variant)||void 0===s||!s.availableForSale)&&(null==n||null===(u=n.variant)||void 0===u?void 0:u.quantityAvailable)<(null==n?void 0:n.quantity)){var d,c,x=(null==n?void 0:n.quantity)-(null==n||null===(d=n.variant)||void 0===d?void 0:d.quantityAvailable);return t.push({title:null==n?void 0:n.title,oosQty:x,totalQty:null==n?void 0:n.quantity}),void e.push({quantity:(null==n?void 0:n.quantity)-x,variantId:null==n||null===(c=n.variant)||void 0===c?void 0:c.id,attributes:(null==n?void 0:n.customAttributes)||[]})}e.push({quantity:null==n?void 0:n.quantity,variantId:null==n||null===(a=n.variant)||void 0===a?void 0:a.id,attributes:(null==n?void 0:n.customAttributes)||[]})}else t.push({oosQty:null==n?void 0:n.quantity,totalQty:null==n?void 0:n.quantity,title:null==n?void 0:n.title})})),{availableLineItems:e,outOfStockLineItems:t}},A=function(n){var e,t,l,i,o,a,c=n.order,y=(0,f.l)().helpers.decodeShopifyId,w=(0,g.G)().capitalizeWord,A=(0,r.useState)([]),I=A[0],H=A[1],W=(0,v.qY)(),D=W.isOpen,L=W.onOpen,T=W.onClose,B=(0,z.j)(),N=B.addToCartMultiple,Q=B.loading,E=(0,p.j)().formatMoney,G=(0,(0,j.Y)().getDayMonthLabel)(null==c?void 0:c.processedAt,"d LLL yyyy",!1).dayMonthLabel,R=(0,O.iQ)().cart,U=(0,C.bp)(),Z=U.state,F=U.dispatch,K=(0,r.useCallback)((function(){var n=function(){var n=(0,d.Z)(x().mark((function n(){var e,t,l,i,o,r,s,u;return x().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(l=0===(null==R||null===(e=R.lines)||void 0===e?void 0:e.length),i=null==c||null===(t=c.lineItems)||void 0===t?void 0:t.filter((function(n){var e,t;return!(null!=n&&null!==(e=n.customAttributes)&&void 0!==e&&null!==(t=e.map((function(n){return"isGift"===(null==n?void 0:n.key)&&"true"===(null==n?void 0:n.value)||"_isSample"===(null==n?void 0:n.key)&&"true"===(null==n?void 0:n.value)})))&&void 0!==t&&t.length)})),o=q(i),r=o.availableLineItems,null!=(s=o.outOfStockLineItems)&&s.length?H(s):H([]),null==(u=null==r?void 0:r.map((function(n){return{quantity:null==n?void 0:n.quantity,attributes:(null==n?void 0:n.attributes)||[],variantId:null==n?void 0:n.variantId}})))||!u.length){n.next=9;break}return n.next=8,N(u);case 8:l&&!Q&&F({type:"cart",payload:!Z.activeCart});case 9:null!=s&&s.length&&L();case 10:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();n()}),[null==R||null===(e=R.lines)||void 0===e?void 0:e.length,c,N,Q,F,Z.activeCart,L]);return null!=c&&c.id?(0,S.jsxs)(s.xu,{bg:"brand.offWhite",border:"1.5px",children:[(0,S.jsxs)(s.Kq,{direction:["column","column","column","row"],bg:"brand.lightSand",py:3.5,px:6,justifyContent:"space-between",children:[(0,S.jsx)(s.Ug,{children:(0,S.jsx)(m.x,{to:"/account/orders/"+y(null==c?void 0:c.id,"Order"),children:(0,S.jsxs)(s.X6,{fontSize:"xl",children:["Order #",null==c?void 0:c.orderNumber," -"," ",(0,S.jsx)(s.xv,{as:"span",fontSize:"xl",children:G})]})})}),(0,S.jsxs)(s.Kq,{direction:["column","column","row"],children:[(0,S.jsx)(m.x,{to:null==c?void 0:c.statusUrl,external:!0,styles:{minW:[25,49]},children:(0,S.jsx)(h.zx,{variant:"outline",size:"md",w:"full",children:"Track Order"})}),(0,S.jsx)(h.zx,{variant:"solid",onClick:K,size:"md",isLoading:Q,children:"Add All To Cart"})]})]}),(0,S.jsxs)(s.Kq,{direction:["column","column","row"],width:"full",py:3.5,px:4,spacing:4,children:[(0,S.jsxs)(s.xu,{flex:1,children:[(0,S.jsx)(s.xv,{fontWeight:700,fontSize:"16px",lineHeight:"24px",children:"Shipped to"}),(0,S.jsxs)(s.xv,{fontSize:"14px",lineHeight:"21px",children:[null==c||null===(l=c.shippingAddress)||void 0===l?void 0:l.address1,", ",null==c||null===(i=c.shippingAddress)||void 0===i?void 0:i.province]}),(0,S.jsx)(s.xu,{py:1,px:4,bg:"brand.yellow",mt:4,w:"fit-content",fontSize:"xs",lineHeight:"21px",children:w(null==c?void 0:c.fulfillmentStatus)})]}),(0,S.jsxs)(s.xu,{flex:1,children:[(0,S.jsx)(s.xv,{fontWeight:700,fontSize:"16px",lineHeight:"24px",children:"Items"}),null==c||null===(o=c.lineItems)||void 0===o?void 0:o.map((function(n){var e;return(0,S.jsxs)(s.xu,{sx:{"*":{fontSize:"14px",lineHeight:"21px"}},mb:2.5,children:[(0,S.jsx)(s.xv,{children:(0,S.jsx)(b.g,{item:null==n||null===(e=n.variant)||void 0===e?void 0:e.product,showDash:!1})}),(0,S.jsxs)(s.xv,{children:[null==n?void 0:n.title," x ",null==n?void 0:n.quantity]})]},null==n?void 0:n.id)}))]}),(0,S.jsxs)(s.xu,{flex:1,children:[(0,S.jsx)(s.xv,{fontWeight:700,fontSize:"16px",lineHeight:"24px",children:"Order Total"}),(0,S.jsx)(s.xv,{fontSize:"14px",lineHeight:"21px",children:E(null==c||null===(a=c.totalPriceV2)||void 0===a?void 0:a.amount,null==c?void 0:c.currencyCode)})]})]}),(0,S.jsx)(k,{outOfStockItems:I,onClose:T,isOpen:D})]},null==c||null===(t=c.id)||void 0===t?void 0:t.toString()):(0,S.jsx)(s.xu,{children:(0,S.jsx)(u.$,{})})},I=(0,r.memo)(A),H=function(n){var e=n.orders,t=n.loading;return!(null==e||!e.length)?(0,S.jsx)(s.Kq,{direction:"column",width:"full",spacing:0,children:null==e?void 0:e.map((function(n){var e;return(0,S.jsx)(I,{order:n},null==n||null===(e=n.id)||void 0===e?void 0:e.toString())}))}):t?(0,S.jsx)(s.xu,{children:(0,S.jsx)(u.$,{})}):(0,S.jsx)(s.xv,{fontWeight:700,children:"No orders"})},W=(0,r.memo)(H),D=function(n){var e,t=n.location,l=(0,a.Pc)(200),i=l.orders,o=l.loading,r=l.error,d=(null==t||null===(e=t.pathname)||void 0===e?void 0:e.split("/account/orders/")[1])||"",c=(0,a.ky)(d,(null==t?void 0:t.search)||""),x=c.order,v=c.loading,h=c.error;return o?(0,S.jsx)(s.xu,{children:(0,S.jsx)(u.$,{})}):d?(0,S.jsx)(I,{order:x,showItems:!0},d):(0,S.jsx)(W,{orders:i,loading:o||v,error:r||h})},L=(0,r.memo)(D),T=t(95303),B=function(n){var e=n.location,t=n.page,l=(0,o.jt)().customer;return(0,S.jsx)(T.y,{content:null==t?void 0:t.content,location:e,subtitle:null==t?void 0:t.subtitle,title:null==t?void 0:t.t
1itle,children:(null==l?void 0:l.id)&&(0,S.jsx)(L,{location:e})})},N=(0,r.memo)(B),Q=t(66027),E=["data"],G=(0,i.O)((function(n){var e=n.data,t=(0,l.Z)(n,E);return(0,S.jsx)(N,Object.assign({},t,e))}))},67473:function(n,e,t){e.Z=t.p+"static/food-box-c670a261cf63ec729303d8165da75c36.png"}}]); 2//# sourceMappingURL=component---src-pages-account-orders-tsx-858db9c47ee111fd67c2.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.