"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5505],{75505:function(e,t,r){r.d(t,{UT:function(){return me},tw:function(){return Se},St:function(){return we},P0:function(){return _e},WA:function(){return o},QV:function(){return S},xb:function(){return J},GV:function(){return te},Sf:function(){return Fe}});var n=r(2784),i=r(7307),s=r(93065);const a=(0,i.default)(s.He).withConfig({componentId:"sc-1lwtses-0"})(["margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[40]}));var l=r(52322);var o=function(e){let{children:t}=e;return(0,l.jsx)(a,{children:t})},c=r(8077),d=r(51855),p=r(45396),u=r(70510),h=r(32899),m=r(90643),g=r(86743),f=r(97224),x=r(64897),j=r(67868),y=r(34323),w=r(39446);const b=i.default.span.withConfig({componentId:"sc-aicnew-0"})(["","{display:none;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),v=i.default.span.withConfig({componentId:"sc-aicnew-1"})(["display:none;","{display:inline;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),C=(0,i.default)(s.He).attrs({as:"section"}).withConfig({componentId:"sc-aicnew-2"})(["display:flex;align-items:center;position:relative;"]),I=i.default.div.withConfig({componentId:"sc-aicnew-3"})(["display:flex;flex-direction:column;","{flex:0 0 ",";}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.pxToRem(300)})),k=i.default.div.withConfig({componentId:"sc-aicnew-4"})(["width:100%;"]),N=i.default.div.withConfig({componentId:"sc-aicnew-5"})(["display:flex;flex:1 1 auto;flex-direction:column;padding:"," 0;","{flex-direction:row;align-items:center;padding:"," 0;}"],(e=>{let{theme:t}=e;return t.spacing[24]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.spacing[24]})),O=i.default.div.withConfig({componentId:"sc-aicnew-6"})(["&::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;}"]),P=i.default.div.withConfig({componentId:"sc-aicnew-7"})(["color:",";flex-shrink:0;"],(e=>{let{theme:t}=e;return t.color.primary})),L=(0,i.default)(j.H).attrs({large:!0,variant:"h2"}).withConfig({componentId:"sc-aicnew-8"})(["margin-top:0;margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[4]})),T=(0,i.default)(y.T).attrs({variant:"body"}).withConfig({componentId:"sc-aicnew-9"})(["margin-top:0;margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[4]})),Z=(0,i.default)(w.P).attrs((e=>({regPrice:e.regPrice}))).withConfig({componentId:"sc-aicnew-10"})(["font-size:16px;"]);var S=e=>{let{purchase:t}=e;const r=(0,h.i1)(),{text:n}=r,i=(0,x.Z)(),s=new Date(t.date).toLocaleString(i.locale,{month:"long",day:"2-digit",year:"numeric"}),a=(0,g.T4)(t.amount,t.currency,r);let o=(0,l.jsx)(c.d_,{status:t.status}),j=(0,l.jsxs)(T,{children:[n("Ship to:")," ",t.shipping?.firstName," ",t.shipping?.lastName]});return"digital"===t.type&&(o=null,j=(0,l.jsx)(T,{children:n(t.platform||"")})),(0,l.jsxs)(C,{children:[(0,l.jsxs)(N,{children:[(0,l.jsxs)(I,{children:[(0,l.jsx)(L,{children:s}),(0,l.jsx)(Z,{regPrice:`${a}`}),(0,l.jsxs)(T,{children:[n("Purchase type:")," ",n((0,m.zf)(t.type))]}),j,n("Order Number:")," ",t.id]}),(0,l.jsxs)(k,{children:[o,(0,l.jsx)(J,{purchase:t})]})]}),(0,l.jsxs)(P,{children:[(0,l.jsxs)(b,{children:[(0,l.jsx)(f.Z,{href:`/orders/${t.id}`,children:(0,l.jsx)(O,{})}),(0,l.jsx)(d.Z,{})]}),(0,l.jsx)(v,{children:(0,l.jsx)(p.D,{href:`/orders/${t.id}`,icon:u.Z,locale:i.locale,children:n("View details")})})]})]})},z=r(95235);const A=i.default.div.withConfig({componentId:"sc-2cetgr-0"})(["display:flex;gap:",";align-items:center;margin-top:",";flex:1 0 auto;"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.spacing[16]})),$=i.default.span.withConfig({componentId:"sc-2cetgr-1"})(["display:none;","{display:inline;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),H=i.default.span.withConfig({componentId:"sc-2cetgr-2"})(["","{display:none;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),q=(0,i.default)(A).withConfig({componentId:"sc-2cetgr-3"})(["align-items:flex-start;"]),Q=i.default.div.withConfig({componentId:"sc-2cetgr-4"})(["display:none;","{display:flex;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),M=i.default.div.withConfig({componentId:"sc-2cetgr-5"})(["font-weight:bold;display:block;"]),B=i.default.div.withConfig({componentId:"sc-2cetgr-6"})(["overflow:hidden;flex-shrink:0;"]),D=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-2cetgr-7"})(["margin-top:0;text-overflow:ellipsis;overflow:hidden;"]),R=i.default.div.withConfig({componentId:"sc-2cetgr-8"})(["font-size:",";&:first-of-type{margin-top:4px;}"],(e=>{let{theme:t}=e;return t.font.size.legalDesktop}));var E=r(87136);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(e){for(var t=1;t{const{amount:t}=e;return(0,l.jsx)($,{children:(0,l.jsxs)(M,{children:["+",t]})})},V=e=>{const{amount:t}=e;return(0,l.jsx)(H,{children:(0,l.jsxs)(M,{children:["+",t]})})},W=3,K=2,Y=e=>{const{items:t}=e,r=t.slice(0,K),[i]=t.slice(K,K+1);return(0,l.jsxs)(A,{children:[r.map((e=>(0,l.jsxs)(n.Fragment,{children:[(0,l.jsx)(c.qN,{alt:e.name,publicId:e.image||E.BY}),1===t.length&&(0,l.jsxs)("div",{children:[(0,l.jsx)(D,{children:e.name}),!!e.bundleOptions?.length&&(0,l.jsx)("div",{children:e.bundleOptions.map((e=>(0,l.jsx)(R,{children:e.values?.[0]?.product?.name},e.id)))})]})]},`item-${e.sku}`))),t.length>W?(0,l.jsx)(Q,{children:(0,l.jsx)(c.qN,{alt:i.name,publicId:i.image||E.BY})}):null,t.length>W?(0,l.jsx)(G,{amount:t.length-W}):null,t.length>K?(0,l.jsx)(V,{amount:t.length-K}):null]})},U=e=>{let{image:t,name:r}=e;return(0,l.jsxs)(q,{children:[(0,l.jsx)(B,{children:(0,l.jsx)(c.qN,{alt:"Product art",publicId:t||E.BY})}),(0,l.jsx)(D,{children:r})]})};var J=e=>{let{purchase:t}=e;return"physical"===t.type?(0,l.jsx)(Y,F({},t)):(0,l.jsx)(U,F({},t))},X=r(30737);const ee=(0,i.default)(X.S).withConfig({componentId:"sc-19mpt7o-0"})(["> div{height:175px;margin-bottom:50px;}"]);var te=()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h8,{}),(0,l.jsxs)(s.$0,{constrained:!0,children:[(0,l.jsx)(ee,{}),(0,l.jsx)(ee,{}),(0,l.jsx)(ee,{})]})]}),re=r(51750),ne=r(42107),ie=r(1505);i.default.div.withConfig({componentId:"sc-1wh0o51-0"})(["display:flex;justify-content:center;align-items:center;flex-direction:column;margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[64]})),(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-1wh0o51-1"})(["display:flex;flex-direction:column;margin-top:",";","{display:block;}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}));const se=i.default.div.withConfig({componentId:"sc-1wh0o51-2"})(["margin-top:",";display:flex;justify-content:center;"],(e=>{let{theme:t}=e;return t.spacing[24]})),ae=(0,i.default)(ne.B).withConfig({componentId:"sc-1wh0o51-3"})(["min-width:150px;"]),le=(0,i.default)(s.He).withConfig({componentId:"sc-1wh0o51-4"})(["display:flex;flex-direction:column;","{align-items:flex-end;flex-direction:row;justify-content:space-between;gap:",";}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>e.theme.spacing[20])),oe=(i.default.div.withConfig({componentId:"sc-1wh0o51-5"})(["","{width:100%;max-width:",";}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.pxToRem(260)})),i.default.div.withConfig({componentId:"sc-1wh0o51-6"})(["display:flex;flex-direction:row;gap:",";align-items:center;"],(e=>{let{theme:t}=e;return t.spacing[16]}))),ce=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-1wh0o51-7"})(["margin-right:",";margin-bottom:",";","{display:flex;align-items:center;margin-bottom:0;}"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.spacing[8]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),de=i.default.div.withConfig({componentId:"sc-1wh0o51-8"})(["margin-bottom:",";","{display:flex;align-items:center;}"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),pe=i.default.span.withConfig({componentId:"sc-1wh0o51-9"})(["display:none;","{display:inline;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop}));var ue=r(92167);function he(e){if(!e)return[];return e.map((e=>(0,ue.ZP)(e)))}var me=e=>{let{fetchMore:t,refetch:r,purchases:i,loading:a,totals:c}=e;const{text:d}=(0,h.i1)(),p=(0,x.Z)(),{0:u,1:m}=(0,n.useState)(he(i)),{0:g,1:j}=(0,n.useState)(!1),{0:y,1:w}=(0,n.useState)(2),{0:b,1:v}=(0,n.useState)(null),{0:C,1:I}=(0,n.useState)(0),k=(0,n.useCallback)((e=>{v(e),j(!0);r({page:1,where:{type:{eq:e}}}).then((e=>{const t=he(e.data?.customer?.orderHistory?.orders);m(t),w(2),j(!1)}))}),[r]);return(0,n.useEffect)((()=>{null===b?I(c.digital+c.physical):"DIGITAL"===b?I(c.digital):"PHYSICAL"===b&&I(c.physical)}),[c.digital,c.physical,b]),a?null:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h5,{title:"Purchase history",children:(0,l.jsxs)(re.B,{currentPage:p.pathname,children:[(0,l.jsx)(f.Z,{href:"/",children:(0,l.jsx)("a",{children:d("Home")})}),(0,l.jsx)(f.Z,{href:"/orders",children:(0,l.jsx)("a",{children:d("Purchase history")})})]})}),u.length||null!==b?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(le,{children:(0,l.jsxs)(de,{children:[(0,l.jsx)(ce,{children:d("Category:")}),(0,l.jsxs)(oe,{children:[(0,l.jsxs)(ne.B,{still:!0,size:"small",variant:"quaternary",round:!0,selected:null===b,onClick:()=>k(null),children:[d("Show all")," ",(0,l.jsxs)(pe,{children:["(",c.digital+c.physical,")"]})]}),(0,l.jsxs)(ne.B,{still:!0,size:"small",variant:"quaternary",round:!0,selected:"DIGITAL"===b,disabled:0===c.digital,onClick:()=>k("DIGITAL"),children:[d("Digital")," ",(0,l.jsxs)(pe,{children:["(",c.digital,")"]})]}),(0,l.jsxs)(ne.B,{still:!0,size:"small",variant:"quaternary",round:!0,selected:"PHYSICAL"===b,disabled:0===c.physical,onClick:()=>k("PHYSICAL"),children:[d("Physical")," ",(0,l.jsxs)(pe,{children:["(",c.physical,")"]})]})]})]})}),(0,l.jsx)(s.He,{children:u.map((e=>(0,l.jsxs)(n.Fragment,{children:[(0,l.jsx)(s.Hr,{}),(0,l.jsx)(S,{purchase:e})]},`purchase-${e.id}`)))}),(0,l.jsxs)(o,{children:[(0,l.jsx)(s.Hr,{}),u.length(j(!0),void t({variables:{page:y}}).then((e=>{const t=he(e.data?.customer?.orderHistory?.orders);m([...u,...t]),w(y+1),j(!1)}))),children:d("Load more")})}):null]})]}):(0,l.jsx)(we,{})]})},ge=r(60629),fe=r(92951);const xe=i.default.div.withConfig({componentId:"sc-1bq8esa-0"})(["display:flex;justify-content:center;align-items:center;flex-direction:column;margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[64]})),je=(0,i.default)(fe.Z).withConfig({componentId:"sc-1bq8esa-1"})(["height:",";width:auto;"],(e=>{let{theme:t}=e;return t.spacing[48]})),ye=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-1bq8esa-2"})(["display:flex;flex-direction:column;margin-top:",";","{display:block;}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}));var we=function(){const{text:e}=(0,h.i1)(),t=(0,x.Z)();return(0,l.jsx)(s.$0,{constrained:!0,children:(0,l.jsxs)(xe,{children:[(0,l.jsx)(je,{}),(0,l.jsxs)(ye,{children:[(0,l.jsx)("span",{children:e("No purchase history to show.")})," ",(0,l.jsxs)("span",{children:[e("Why not add")," ",(0,l.jsx)(ge.L,{href:"/store",locale:t.locale,children:e("something fun")}),"?"]})]})]})})},be=r(3946),ve=r(38555),Ce=r(15820);const Ie=i.default.div.withConfig({componentId:"sc-au0dvl-0"})(["display:flex;flex-direction:column;margin-bottom:",";","{flex-direction:row;justify-content:space-between;align-items:center;}"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),ke=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-au0dvl-1"})(["margin-top:0;"]),Ne=(0,i.default)(y.T).attrs({variant:"caption"}).withConfig({componentId:"sc-au0dvl-2"})(["margin:0;font-weight:bold;"]),Oe=i.default.div.withConfig({componentId:"sc-au0dvl-3"})(["display:grid;grid-template-columns:1fr;column-gap:",";margin-bottom:",";max-width:",";width:100%;","{grid-template-columns:1fr 1fr;}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.pxToRem(800)}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),Pe=i.default.div.withConfig({componentId:"sc-au0dvl-4"})(["","{grid-column:1 / 3;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),Le=i.default.div.withConfig({componentId:"sc-au0dvl-5"})(["margin-bottom:",";","{grid-column:1 / 3;}"],(e=>{let{theme:t}=e;return t.spacing[48]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),Te=(0,i.default)(s.$0).attrs({constrained:!0}).withConfig({componentId:"sc-au0dvl-6"})(["margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[64]})),Ze=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-au0dvl-7"})(["margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[16]}));var Se=()=>{const{text:e}=(0,h.i1)(),t=(0,h.xe)(),r=(0,x.Z)(),[n,{loading:i,error:a,data:o}]=(0,Ce.td)(Ce.o$.LN);if(o?.guestOrder&&!a){const e=(0,ue.ZP)(o.guestOrder,r.locale);return(0,l.jsx)(_e,{order:e})}return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s.h5,{title:"Track order status",children:(0,l.jsxs)(re.B,{currentPage:r.pathname,children:[(0,l.jsx)(f.Z,{href:"/",children:(0,l.jsx)("a",{children:e("Home")})}),(0,l.jsx)(f.Z,{href:"/orders",children:(0,l.jsx)("a",{children:e("Track order status")})})]})}),(0,l.jsx)(s.$0,{constrained:!0,children:(0,l.jsxs)("form",{onSubmit:e=>{e.preventDefault();const t=e.currentTarget.elements.number,i=e.currentTarget.elements.postcode,s=e.currentTarget.elements.lastname;n({orderNumber:t.value,postcode:i.value,lastname:s.value,locale:r.locale})},children:[(0,l.jsxs)(Oe,{children:[(a||null===o?.guestOrder)&&(0,l.jsx)(Le,{children:(0,l.jsx)(be.N,{type:"error",children:e("Sorry, but we could not find that order. Please check your entry and try again.")})}),(0,l.jsx)(Pe,{children:(0,l.jsxs)(Ie,{children:[(0,l.jsx)(ke,{children:e("Order information")}),(0,l.jsx)(Ne,{children:e("* Required fields")})]})}),(0,l.jsx)(ve.I,{placeholder:e("Order number"),label:e("Order number"),name:"number",required:!0}),(0,l.jsx)(ve.I,{placeholder:e("Billing Zip/postal code"),label:e("Billing Zip/postal code"),name:"postcode",required:!0}),(0,l.jsx)(Pe,{children:(0,l.jsx)(ve.I,{placeholder:e("Billing last name"),label:e("Billing last name"),name:"lastname",required:!0})}),o?.guestOrder&&!a&&(0,l.jsx)(Le,{children:(0,l.jsx)(be.N,{type:"success",children:e("Order found!")})})]}),(0,l.jsx)(ne.B,{isLoading:i,children:e("Continue")})]})}),(0,l.jsxs)(Te,{children:[(0,l.jsx)(Ze,{children:e("Can't find your order number? Log in to access your order history.")}),(0,l.jsx)(ne.B,{variant:"secondary",onClick:()=>t.promptLogin(),children:e("Log in")})]})]})},ze=r(6248),Ae=r(43499);const $e=i.default.div.withConfig({componentId:"sc-l9j285-0"})(["border-radius:",";"],(e=>{let{theme:t}=e;return t.borderRadius})),He=(0,i.default)(s.h5).withConfig({componentId:"sc-l9j285-1"})(["margin-bottom:",";","{margin-bottom:",";}"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.spacing[24]})),qe=i.default.div.withConfig({componentId:"sc-l9j285-2"})(["display:flex;flex-direction:column;margin:0 0 ",";gap:",";"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.spacing[8]})),Qe=i.default.div.withConfig({componentId:"sc-l9j285-3"})(["display:flex;gap:",";flex-direction:column;","{gap:",";align-items:flex-end;flex-direction:row;}"],(e=>{let{theme:t}=e;return t.spacing[8]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.spacing[32]})),Me=((0,i.default)($e).withConfig({componentId:"sc-l9j285-4"})(["display:flex;flex-direction:column;margin-bottom:",";"," & > *{flex:1;padding:",";&:not(:last-child){border-bottom:solid 1px ",";}}","{flex-direction:row;& > *{&:not(:last-child){border-bottom:0;border-right:solid 1px ",";}}}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return(0,i.css)(["border:solid 1px ",";"],t.color.lightGray2)}),(e=>{let{theme:t}=e;return t.spacing[24]}),(e=>{let{theme:t}=e;return t.color.lightGray2}),(e=>{let{theme:t}=e;return t.mediaQuery.tablet}),(e=>{let{theme:t}=e;return t.color.lightGray2})),i.default.div.withConfig({componentId:"sc-l9j285-5"})(["display:flex;margin-bottom:",";font-weight:bold;svg{margin-right:",";}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.spacing[8]}))),Be=(0,i.default)($e).withConfig({componentId:"sc-l9j285-6"})(["margin-bottom:",";& > *{&:first-child{border-bottom:solid 1px ",";padding-bottom:",";}}","{"," & > *{padding:",";&:first-child{padding:",";margin:0;border-bottom:solid 1px ",";}}}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.color.lightGray2}),(e=>{let{theme:t}=e;return t.spacing[8]}),(e=>{let{theme:t}=e;return t.mediaQuery.tablet}),(e=>{let{theme:t}=e;return(0,i.css)(["border:solid 1px ",";margin-bottom:",";"],t.color.lightGray2,t.spacing[32])}),(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.color.lightGray2})),De=i.default.div.withConfig({componentId:"sc-l9j285-7"})(["display:flex;justify-content:space-between;flex-direction:column;","{flex-direction:row;}"],(e=>{let{theme:t}=e;return t.mediaQuery.tablet})),Re=(0,i.default)(y.T).attrs({variant:"caption"}).withConfig({componentId:"sc-l9j285-8"})(["display:flex;align-items:center;margin-top:",";","{margin-top:0;}"],(e=>{let{theme:t}=e;return t.spacing[4]}),(e=>{let{theme:t}=e;return t.mediaQuery.tablet})),Ee=(i.default.div.withConfig({componentId:"sc-l9j285-9"})(["margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[16]})),i.default.span.withConfig({componentId:"sc-l9j285-10"})(["font-weight:bold;"]));var _e=e=>{let{order:t,customer:r}=e;const n=(0,h.i1)(),{text:i}=n,a=(0,x.Z)(),d=(0,h.xe)(),u=new Date(t.date).toLocaleString(a.locale,{month:"2-digit",day:"2-digit",year:"numeric"}),{currency:m,totals:j,type:y}=t,w=(0,g.T4)(j.grand,m,n);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(He,{title:"Order details",children:(0,l.jsxs)(re.B,{currentPage:a.asPath,children:[(0,l.jsx)(f.Z,{href:"/",children:(0,l.jsx)("a",{children:i("Home")})}),(0,l.jsx)(f.Z,{href:"/orders",children:(0,l.jsx)("a",{children:i("Purchase history")})}),(0,l.jsx)(f.Z,{href:`/orders/${t.id}/`,children:(0,l.jsx)("a",{children:`${i("Order #")} ${t.id}`})})]})}),(0,l.jsxs)(s.He,{children:["physical"===y?(0,l.jsx)(qe,{children:(0,l.jsxs)(Qe,{children:[(0,l.jsx)("div",{children:(0,l.jsx)(c.d_,{status:t.status})}),(0,l.jsxs)("div",{children:[(0,l.jsx)(Ee,{children:i("Transaction date:")})," ",u]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(Ee,{children:i("Order total:")})," ",w]})]})}):(0,l.jsxs)(qe,{children:[(0,l.jsxs)(Qe,{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(Ee,{children:i("Transaction date:")})," ",u]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(Ee,{children:i("Order total:")})," ",w]})]}),(0,l.jsxs)(Qe,{children:[t.platform&&(0,l.jsxs)("div",{children:[(0,l.jsx)(Ee,{children:i("Device type:")})," ",t.platform]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(Ee,{children:i("Associated Nintendo Account:")})," ",r?.email]})]})]}),"physical"===y?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.qR,{billingAddress:t.billing,shippingAddress:t.shipping,paymentMethod:t.payment,shippingMethod:t.shipping.method,shipments:t.shipments}),(0,l.jsx)(ze.S,{size:32})]}):null,(0,l.jsxs)(Me,{children:[i("Need a hand?"),(0,l.jsx)(ze.S,{size:4,axis:"horizontal"}),(0,l.jsx)(ge.L,{href:"https://en-americas-support.nintendo.com/app/contact",target:"_blank",children:i("Contact Customer Support")})]}),t.shipments.map(((e,r)=>{const{items:n}=e,[s]=e.tracking;return(0,l.jsxs)(Be,{children:[(0,l.jsxs)(De,{children:[(0,l.jsx)(Fe,{tracking:s,variant:"title"}),(0,l.jsxs)(Re,{children:[i("{0} of {1}",{args:[r+1,t.shipments.length]})," ","(",n.length,")"]})]}),(0,l.jsx)("div",{children:n.map((e=>{const r=e.bundleName||e.name,n=e.bundleName?e.name:null;return(0,l.jsx)(c.Dd,{locale:a.locale,finalprice:e.finalPricePerItem,quantity:e.quantity,name:r,subtitle:n,publicId:e.image,currency:t.currency,type:y,title:e.name||e.product?.name,urlKey:e.urlKey||e.product?.urlKey,hidePrice:!0},`order-${e.sku}`)}))})]},e.number)})),(0,l.jsx)(c.a3,{couponCode:t.couponCode,currency:t.currency,shippingMethod:t.shipping.method,totals:j,type:y}),(0,l.jsx)(c.iQ,{items:t.items,currency:m,locale:a.locale,type:y}),(0,l.jsx)(ze.S,{size:32})]}),(0,l.jsx)(o,{children:d.isLoggedIn?(0,l.jsx)(p.D,{href:"/orders",icon:Ae.Z,locale:a.locale,children:i("Back to purchase history")}):(0,l.jsx)(p.D,{onClick:()=>a.reload(window.location.pathname),icon:Ae.Z,locale:a.locale,children:i("Look up another order")})})]})};var Fe=e=>{let{tracking:t,variant:r}=e;const{text:n}=(0,h.i1)();return(0,l.jsxs)(y.T,{variant:r,children:[n("{0} tracking",{args:[t?.carrier?.toUpperCase()]})," ",(0,l.jsx)(ge.L,{href:t.url,target:"_blank",children:t.number})]})}},92167:function(e,t,r){r.d(t,{ZP:function(){return c}});var n=r(95235),i=r(90643);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t({sku:e.product?.sku,bundleOptions:e.bundleOptions,name:e.product?.name,image:e.product?.productImage?.publicId,isDiscounted:e.product?.prices?.minimum?.discounted,finalPricePerItem:e.productSalePrice,regularPricePerItem:e.product?.prices?.minimum?.regularPrice,platform:e.product?.platform?.label,quantity:e.quantityOrdered,amount:e.productSalePrice,platinumPoints:e.product?.platinumPoints,urlKey:e.product?.urlKey}),o=e=>(e.items||[]).reduce(((t,r)=>{let{orderItem:n,parentSku:i}=r;if(n.productSku.split("-").length>2)return t;const s=e.items.find((e=>{let{orderItem:t}=e;return t.productSku===i}));return[...t,a(a({},l(a(a({},n),{},{productSalePrice:s?.orderItem?.product?.prices?.minimum?.regularPrice||n?.product?.prices?.minimum?.regularPrice}))),{},{image:s?s.orderItem?.product?.productImage?.publicId:n?.product?.productImage?.publicId,quantity:n.quantityShipped,parentSku:i,bundleName:s?.orderItem?.product?.name})]}),[]);function c(e,t){const r=e.items.map(l),n=e.shipments?.map((e=>((e,t)=>{const r=(0,i.$w)(t);return{number:e.number,items:o(e),tracking:e.tracking.map((e=>((e,t)=>{const r={en:{fedex:`https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber=${e.number}`,ups:`https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=${e.number}`,"ups mi":`https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=${e.number}`,usps:`https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=${e.number}`,puro:`https://www.purolator.com/${t}/shipping/tracker?pin=${e.number}`,"canada post":`https://www.canadapost-postescanada.ca/track-reperage/${t}#/search?searchFor=${e.number}`},fr:{fedex:`https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber=${e.number}`,ups:`https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=${e.number}`,"ups mi":`https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=${e.number}`,usps:`https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=${e.number}`,puro:`https://www.purolator.com/${t}/expedition/faire-le-suivi-dun-envoi?pin=${e.number}`,"canada post":`https://www.canadapost-postescanada.ca/track-reperage/${t}#/search?searchFor=${e.number}`}};return{title:e.title,number:e.number,carrier:e.carrier,url:r[t][e.carrier]||"#"}})(e,r)))}})(e,t)));return{id:e.id||e.number,couponCode:e.couponCode,name:r[0].name||e.contentName,type:"StoreOrder"==e.__typename||"GuestOrder"==e.__typename?"physical":"digital",date:e.orderDate,amount:e.total.grandTotal,platform:r[0].platform,image:r[0].image,status:e.status||null,billing:{firstName:e.billingAddress?.firstName,lastName:e.billingAddress?.lastName,street:e.billingAddress?.street,city:e.billingAddress?.city,postcode:e.billingAddress?.postcode,region:e.billingAddress?.region?.name,country:e.billingAddress?.country?.fillNameEnglish,telephone:e.billingAddress?.telephone},shipping:{firstName:e.shippingAddress?.firstName,lastName:e.shippingAddress?.lastName,street:e.shippingAddress?.street,city:e.shippingAddress?.city,postcode:e.shippingAddress?.postcode,region:e.shippingAddress?.region?.name,country:e.shippingAddress?.country?.fillNameEnglish,telephone:e.shippingAddress?.telephone,method:e.shippingMethod,carrier:e.shipments?.tracking?.carrier,number:e.shipments?.tracking?.number,title:e.shipments?.tracking?.title},payment:{method:e.paymentMethod?.method,type:e.paymentMethod?.type,last4:e.paymentMethod?.last4},totals:{discounts:e.total.discounts,grand:e.total.grandTotal,sub:e.total.subtotal,tax:e.total.totalTax,taxes:e.total.taxes,shipping:e.total.totalShipping},shipments:n||[],items:r}}},51750:function(e,t,r){r.d(t,{B:function(){return h}});var n=r(2784),i=r(13980),s=r.n(i),a=r(51855),l=r(52322),o="KtKAX",c="eIa-f",d="d2PBj";const p=({currentPage:e,children:t})=>{const r=(0,n.useMemo)((()=>n.Children.count(t)-1),[t]),i=(0,n.useMemo)((()=>n.Children.map(t,((t,n)=>{const i=n===r,s=e&&e===t.props.href,o="a"===t.type?t.props.children:"a"===t.props.children.type?t.props.children.props.children:null;return(0,l.jsxs)("li",{className:d,children:[s&&o?(0,l.jsx)("span",{"aria-current":"page",children:o}):t,i?null:(0,l.jsx)(a.Z,{size:10})]},t.props.href||n)}))),[e,t,r]);return(0,l.jsx)("nav",{className:o,"aria-label":"Breadcrumb",children:(0,l.jsx)("ol",{className:c,children:i})})},u=s().shape({props:s().shape({href:s().string.isRequired,children:s().node})});p.propTypes={children:s().oneOfType([s().arrayOf(u),u]).isRequired,currentPage:s().string};var h=p},28108:function(e,t,r){r.d(t,{Z:function(){return a}});r(2784);var n=r(13980),i=r.n(n),s=r(52322);const a=e=>(0,s.jsxs)("svg",{"data-name":"Layer 2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:e.className,width:e.size,role:"presentation",alt:"","data-testid":"CheckmarkCircleIcon",...e,children:[(0,s.jsx)("polygon",{points:"22.918 8.348 13.35 18.909 10.825 16.648 10.827 16.646 8.618 14.668 6.618 17.109 13.595 23.563 15.298 21.683 15.299 21.684 25.382 10.552 22.918 8.348",fill:e.color}),(0,s.jsx)("path",{d:"M15.95555,2A13.95555,13.95555,0,1,1,2,15.95555,13.97134,13.97134,0,0,1,15.95555,2m0-2A15.95555,15.95555,0,1,0,31.91109,15.95555,15.95556,15.95556,0,0,0,15.95555,0Z",fill:e.color})]});a.propTypes={className:i().string,color:i().string,size:i().oneOfType([i().number,i().string])},a.defaultProps={color:"currentColor",size:24}},38555:function(e,t,r){r.d(t,{I:function(){return b}});var n=r(2784),i=r(13980),s=r.n(i),a=r(40489),l=r(52322),o="zupv2",c="-qU5Y",d="wmZ7J",p="gn6dZ",u="a6oPm",h="JABWX",m="imR4n",g="zDFQk",f="TL-zQ",x="_0cZc1";const j=n.forwardRef((function(e,t){const{actionElement:r,errorMessage:n,flat:i,hasError:s,label:d,labelHidden:x,onChange:j,placeholder:b,required:v,value:C,className:I,...k}=e,N=`${b}-${d}`;return(0,l.jsxs)("div",{className:(0,a.Z)(o,s&&c,I),children:[(0,l.jsx)("label",{className:(0,a.Z)(m,x&&g),required:v,htmlFor:N,"aria-label":d,children:d}),(0,l.jsxs)("div",{className:f,children:[(0,l.jsx)("input",{className:(0,a.Z)(p,"left"==i&&u,"right"==i&&h),ref:t,name:d,"aria-invalid":s,id:N,placeholder:b,onChange:j,value:C,required:v,...k}),r]}),(0,l.jsx)(y,{children:(0,l.jsx)(w,{role:"alert",children:n})})]})})),y=({children:e})=>(0,l.jsx)("div",{className:x,children:e}),w=({children:e})=>(0,l.jsx)("div",{className:d,role:"alert",children:e});j.defaultProps={placeholder:"placeholder",label:"input label",labelHidden:!1},j.propTypes={className:s().string,actionElement:s().element,errorMessage:s().string,flat:s().oneOf(["left","right"]),hasError:s().bool,label:s().string.isRequired,labelHidden:s().bool,onChange:s().func,placeholder:s().string.isRequired,required:s().bool,value:s().string};var b=j},11059:function(e,t,r){r.d(t,{Z:function(){return a}});r(2784);var n=r(13980),i=r.n(n),s=r(52322);const a=e=>(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",xmlSpace:"preserve",className:e.className,width:e.size,role:"presentation",alt:"","data-testid":"MegaphoneIcon",...e,children:(0,s.jsx)("path",{fill:e.color,d:"M31.6 13.8h-3.4c-.2 0-.4.2-.4.4s.2.4.4.4h3.4c.2 0 .4-.2.4-.4s-.2-.4-.4-.4zm-8.6-3h-.2V4.9c0-.7-.6-1.4-1.4-1.4L13.8 9H2.5C1.1 9 0 10.2 0 11.7v5.4c0 1.5 1.1 2.7 2.5 2.7h2l.8 6.3c0 1.3 1.1 2.3 2.4 2.3h1.2c1.3 0 2.4-1 2.4-2.3l-.8-6.3h3.3l7.7 5.4c.8 0 1.4-.6 1.4-1.4v-5.9h.1c1.9 0 3.5-1.6 3.5-3.6v-.1c.1-1.8-1.5-3.4-3.5-3.4zM8.9 26.7H7.7c-.4 0-.7-.3-.7-.5V26l-.8-6h2.5l.8 6.3c0 .1-.3.4-.6.4zm5.4-8.5c-.1 0-.2-.1-.4-.1H2.5c-.4 0-.7-.4-.7-.9v-5.4c0-.5.3-.9.7-.9h11.4c.1 0 .2 0 .4-.1v7.4zm6.8 4.7l-6-4.2v-8.5l6-4.2v16.9zm3.7-8.4c0 1-.8 1.8-1.8 1.8h-.2v-3.7h.2c1 0 1.8.8 1.8 1.8v.1zm3.3 4.2c-.2-.2-.4-.2-.6 0-.2.2-.2.4 0 .6l3 3.4c.1.1.2.1.3.1.1 0 .2 0 .3-.1.2-.2.2-.4 0-.6l-3-3.4zm-.4-8.8c.1 0 .2 0 .3-.1l3-3.4c.2-.2.1-.5 0-.6-.2-.2-.5-.2-.6 0l-3 3.4c-.2.2-.1.5 0 .6.1 0 .2.1.3.1z"})});a.propTypes={className:i().string,color:i().string,size:i().oneOfType([i().number,i().string])},a.defaultProps={color:"currentColor",size:24}},3946:function(e,t,r){r.d(t,{N:function(){return w}});var n=r(2784),i=r(13980),s=r.n(i),a=r(7307),l=r(52322);const o=e=>(0,l.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:e.className,width:e.size,role:"presentation",alt:"","data-testid":"AlertErrorOutlineIcon",...e,children:[(0,l.jsx)("path",{d:"M7.33959 23.88C7.13696 23.88 6.94934 23.7974 6.80675 23.6623L0.217636 17.0732C0.0750469 16.9306 0 16.743 0 16.5404V7.21956C0 7.01693 0.0825516 6.82932 0.217636 6.68673L6.81426 0.0976104C6.95685 -0.0449787 7.14446 -0.120026 7.34709 -0.120026H16.6679C16.8705 -0.120026 17.0582 -0.0374741 17.2008 0.0976104L23.7899 6.68673C23.9325 6.82932 24.0075 7.01693 24.0075 7.21956V16.5404C24.0075 16.743 23.925 16.9306 23.7899 17.0732L17.2008 23.6623C17.0582 23.8049 16.8705 23.88 16.6679 23.88H7.33959ZM7.65478 22.379H16.3527L22.5066 16.2252V7.52725L16.3527 1.38091H7.65478L1.50094 7.53476V16.2327L7.65478 22.3865V22.379Z",fill:e.color}),(0,l.jsx)("path",{d:"M17.5719 7.90247L15.98 6.31048L6.42805 15.8624L8.02004 17.4544L17.5719 7.90247Z",fill:e.color}),(0,l.jsx)("path",{d:"M8.02249 6.30803L6.43051 7.90001L15.9824 17.4519L17.5744 15.8599L8.02249 6.30803Z",fill:e.color})]});o.propTypes={className:s().string,color:s().string,size:s().oneOfType([s().number,s().string])},o.defaultProps={color:"currentColor",size:24};var c=r(11059),d=r(28108);const p=e=>(0,l.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:e.className,width:e.size,role:"presentation",alt:"","data-testid":"WarningOutlineIcon",...e,children:[(0,l.jsx)("path",{d:"M12.729 0.65625C13.0408 0.803937 13.2963 1.04866 13.4573 1.35375L23.859 21.252C23.9539 21.4362 24.0103 21.6378 24.0248 21.8445C24.0394 22.0512 24.0117 22.2587 23.9435 22.4544C23.8753 22.65 23.768 22.8298 23.6282 22.9827C23.4883 23.1356 23.3188 23.2584 23.13 23.3438C22.9024 23.4525 22.6533 23.5088 22.401 23.5088H1.59826C1.38881 23.5133 1.18052 23.4766 0.985268 23.4007C0.790016 23.3248 0.611629 23.2111 0.460293 23.0663C0.308956 22.9214 0.187634 22.7482 0.103253 22.5564C0.018872 22.3647 -0.0269151 22.1582 -0.0314941 21.9488C-0.0310798 21.706 0.0281062 21.4669 0.141006 21.252L10.542 1.3545C10.7474 0.97982 11.089 0.69845 11.4961 0.568618C11.9032 0.438785 12.3446 0.469679 12.729 0.65625ZM12.0518 2.07225C12.0347 2.06457 12.0161 2.0606 11.9974 2.0606C11.9786 2.0606 11.9601 2.06457 11.943 2.07225L11.9325 2.0805L1.55251 21.9375L1.59826 21.9398H22.401L22.4288 21.9368L22.443 21.9323L12.066 2.0805L12.0518 2.07225Z",fill:e.color}),(0,l.jsx)("path",{d:"M10.9928 15.6008L11.0303 15.8648H12.906L12.9435 15.6C13.0185 15.074 13.0803 14.5763 13.1288 14.1068C13.1785 13.6223 13.2033 13.1357 13.203 12.6488V7.7715H10.7348V12.6488C10.7342 13.1357 10.7584 13.6223 10.8075 14.1068C10.856 14.5768 10.9178 15.0748 10.9928 15.6008ZM13.3695 17.9528C13.2933 17.7717 13.1819 17.6075 13.0418 17.4698C12.9023 17.3353 12.7393 17.2275 12.561 17.1518C12.3721 17.0724 12.1692 17.0315 11.9643 17.0316C11.7594 17.0318 11.5566 17.0729 11.3678 17.1525C11.1893 17.2281 11.0264 17.3359 10.887 17.4705C10.7464 17.6091 10.6356 17.775 10.5615 17.958C10.4854 18.1444 10.4464 18.3439 10.4468 18.5453C10.4454 18.749 10.4846 18.9509 10.5623 19.1393C10.6368 19.3196 10.7473 19.483 10.887 19.6193C11.0272 19.7555 11.1925 19.8632 11.3738 19.9365C11.7532 20.0893 12.1771 20.0893 12.5565 19.9365C12.7371 19.8635 12.9019 19.7563 13.0418 19.6208C13.2573 19.4076 13.4038 19.1346 13.4622 18.8372C13.5207 18.5397 13.4884 18.2316 13.3695 17.9528Z",fill:e.color})]});p.propTypes={className:s().string,color:s().string,size:s().oneOfType([s().number,s().string])},p.defaultProps={color:"currentColor",size:24};var u=r(96051);const h={error:"#fde6e7",info:"#dfe3fb",success:"#d4f2c4",warning:"#fffbb1",maintenance:"#efefef"},m={error:"#e60012",info:"#3946a0",success:"#2d8513",warning:"#bea000",maintenance:"#484848"},g=a.default.div.withConfig({componentId:"sc-oo0sbi-0"})(["display:flex;align-items:center;width:100%;min-height:",";"," "," ",""],(({theme:e})=>e.spacing[48]),(({theme:e})=>(0,a.css)(["padding:"," ",";font-size:",";border-radius:",";"],e.spacing[12],e.spacing[14],e.font.size.p,e.borderRadius)),(({$type:e,theme:t})=>(0,a.css)(["color:",";background-color:",";svg{color:",";}"],t.color.darkGray2,h[e],m[e])),(({theme:e})=>(0,a.css)(["","{padding:"," ",";}"],e.mediaQuery.tabletSmall,e.spacing[12],e.spacing[16]))),f=a.default.div.withConfig({componentId:"sc-oo0sbi-1"})(["margin-right:",";height:1.5rem;width:1.5rem;svg{height:auto;width:auto;}","{margin-right:",";}"],(({theme:e})=>e.spacing[12]),(({theme:e})=>e.mediaQuery.tabletSmall),(({theme:e})=>e.spacing[16])),x={ERROR:"error",INFO:"info",SUCCESS:"success",WARNING:"warning",MAINTENANCE:"maintenance"},j={[x.ERROR]:o,[x.INFO]:c.Z,[x.SUCCESS]:d.Z,[x.WARNING]:p,[x.MAINTENANCE]:u.Z},y=n.forwardRef((function(e,t){const{children:r,className:n,role:i,type:s}=e,a=e.Icon??j[s];return(0,l.jsxs)(g,{ref:t,$type:s,role:i,className:n,children:[a?(0,l.jsx)(f,{children:(0,l.jsx)(a,{})}):"",(0,l.jsx)("div",{children:r})]})}));y.propTypes={className:s().string,children:s().node,role:s().oneOf(["alert"]),type:s().oneOf(Object.values(x)).isRequired,Icon:s().oneOfType([s().element,s().elementType])};var w=y},92951:function(e,t,r){r.d(t,{Z:function(){return a}});r(2784);var n=r(13980),i=r.n(n),s=r(52322);const a=e=>(0,s.jsxs)("svg",{"data-name":"Layer 3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:e.className,width:e.size,role:"presentation",alt:"","data-testid":"ShoppingCartOutlineIcon",...e,children:[(0,s.jsx)("path",{d:"M25.315 20.556a1.1 1.1 0 0 0 1-.64l5.444-11.829a1.1 1.1 0 0 0-1-1.56H7.772L7.25 3.411a1.1 1.1 0 0 0-1.085-.918H1.168a1.1 1.1 0 1 0 0 2.2h4.065L7.72 19.53l-.983 4.87a1.1 1.1 0 0 0 1.078 1.318h18.673a1.1 1.1 0 0 0 0-2.2H9.16l.599-2.963zm3.728-11.828l-4.433 9.628H9.754L8.14 8.728z",fill:e.color}),(0,s.jsx)("circle",{cx:9.55,cy:27.917,r:2.271,fill:e.color}),(0,s.jsx)("circle",{cx:24.805,cy:27.917,r:2.271,fill:e.color})]});a.propTypes={className:i().string,color:i().string,size:i().oneOfType([i().number,i().string])},a.defaultProps={color:"currentColor",size:24}}}]);