PageSourceSearch

https://ananas.mk/_next/static/chunks/2017-30332a236f685c7f.js

js ananas.mk collected 2026-10-02 22:20:00 UTC 42,741 bytes, 160 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2017],{92693:function(e,r,t){t.d(r,{e:function(){return eH}});var o=t(11163),i=t(67294),n=t(4328),s=t(38043),l=t(6327),a=t(79521),d=t(59499),c=t(4730),p=t(97827),u=t(85893);let x=["headers"];function m(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function g(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?m(Object(t),!0).forEach(function(r){(0,d.Z)(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function h(e){let{tableInstance:r}=e,{rows:t,prepareRow:o,headerGroups:i}=r;return(0,u.jsxs)(p.GH,{children:[i.map(e=>{let{headers:r}=e,t=(0,c.Z)(e,x);return(0,u.jsx)(p.KJ,g(g({},t.getHeaderGroupProps()),{},{children:r.map(e=>{let{getHeaderProps:r,render:t}=e;return(0,u.jsx)(p.UQ,g(g({},r()),{},{children:t("Header")}))})}))}),t.map((e,r)=>(o(e),(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(p.os,{children:e.cells.map((e,r)=>(0,u.jsx)(p.$y,g(g({},e.getCellProps()),{},{children:e.render("Cell")})))})})))]})}var b=t(11529),j=t(56037),f=t(25682),y=t(72870),v=t(85866),w=t(33379),C=t(3737),P=t(51106),O=t(10988),I=t(98774),Z=t(22486),H=t(91694);let D=e=>{var r;let{t}=(0,O.Z)(),{formatNumber:i}=(0,P.Gb)(),{route:s,query:l}=(0,o.useRouter)(),{token:a}=l,{translateProductUrl:d}=(0,I.ZP)(),c=(0,w.w)(),x=(0,C.V)();return(0,u.jsxs)(p.CJ,{children:[(0,u.jsx)(p.DV,{children:(0,u.jsx)(b.x,{fontWeight:600,paddingLeft:"12px",medium:!0,children:t("app.orderHistory.childOrderBodyMobile.products")})}),null===(r=e.subOrderItems)||void 0===r?void 0:r.map((r,o)=>{var m,g,h,w,C,P;let O=(0,f.Rk)(r.image,r.thumbnailBaseUrl,"thumbnail")||"";return(0,u.jsxs)(p.sh,{children:[(0,u.jsx)(n.Z,{shouldRender:s==v.Z5.orderHistorySingleProductPage,children:(0,u.jsxs)(p.x8,{children:[(0,u.jsx)(p._y,{src:O,alt:"product-image"}),(0,u.jsx)(b.x,{fontWeight:600,children:r.productName})]})}),(0,u.jsx)(n.Z,{shouldRender:s==v.Z5.orderHistory,children:(0,u.jsxs)(p.Hb,{children:[(0,u.jsx)(p._y,{src:O,alt:"product-image"}),(0,u.jsx)(b.x,{fontWeight:600,children:r.productName})]})}),(0,u.jsxs)(p.Gq,{children:[(0,u.jsx)(p.FD,{children:t("app.orderHistory.childOrderBodyMobile.merchant")}),(0,u.jsx)(p.Zf,{children:r.merchant.name})]}),(0,u.jsxs)(p.Gq,{children:[(0,u.jsx)(p.FD,{children:t("app.orderHistory.childOrderBodyMobile.eanCode")}),(0,u.jsx)(p.Zf,{children:r.productEan})]}),(0,u.jsxs)(p.Gq,{children:[(0,u.jsx)(p.FD,{children:t("app.orderHistory.childOrderBodyMobile.unitPrice")}),(0,u.jsx)(p.Zf,{children:i(r.basePrice)})]}),(0,u.jsxs)(p.Gq,{children:[(0,u.jsx)(p.FD,{children:t("app.orderHistory.childOrderBodyMobile.ordered")}),(0,u.jsx)(p.Zf,{children:r.quantity})]}),r.confirmedQuantity&&(0,u.jsxs)(p.Gq,{children:[(0,u.jsx)(p.FD,{children:t("app.orderHistory.childOrderBodyMobile.confirmed")}),(0,u.jsx)(p.Zf,{children:r.confirmedQuantity})]}),(0,u.jsxs)(p.Gq,{children:[(0,u.jsx)(p.FD,{children:t("app.orderHistory.childOrderBodyMobile.totalPrice")}),(0,u.jsx)(p.Zf,{children:i(r.grandTotal)})]}),(0,u.jsx)(p.Hb,{children:(0,u.jsx)(y.Z,{prefetch:!1,href:d("detalji",null==r?void 0:null===(m=r.merchantInventory)||void 0===m?void 0:m.id),passHref:!0,children:(0,u.jsx)(H.D,{width:"100%",children:t("app.orderHistory.suborder.item.buyAgain")})})}),(0,u.jsx)(p.Hb,{children:(0,u.jsx)(n.Z,{shouldRender:s==v.Z5.orderHistory||s==v.Z5.exactOrderHistory&&Boolean(a),children:(0,u.jsx)(y.Z,{prefetch:!1,href:v.$P.singleProductHistory(e.orderId,null===(g=r.merchantInventory)||void 0===g?void 0:g.id,l.page||"1",a,e.suborderId),passHref:!0,children:(0,u.jsx)(j.u,{width:"100%",padding:"7px 13px",small:!0,children:t("app.orderHistory.suborder.item.manage")})})})}),(0,u.jsx)(p.Hb,{children:(0,u.jsx)(n.Z,{shouldRender:s==v.Z5.orderHistorySingleProductPage&&r.eligibleItemsForReturn>0,children:(0,u.jsx)(y.Z,{prefetch:!1,href:v.$P.createClaimReturnPerItem(e.orderId,e.suborderId,null===(h=r.merchantInventory)||void 0===h?void 0:h.id,"return",a),passHref:!0,children:(0,u.jsx)(j.u,{width:"100%",padding:"7px 13px",small:!0,children:t("app.orderHistory.suborder.item.return")})})})}),(0,u.jsx)(p.Hb,{children:x&&(0,u.jsx)(Z.Z,{merchantInventoryId:null===(w=r.merchantInventory)||void 0===w?void 0:null===(C=w.id
1)||void 0===C?void 0:C.toString(),isReviewEnabled:r.canSubmitReview,fullWidth:!0})}),c&&(0,u.jsx)(p.Hb,{children:(0,u.jsx)(n.Z,{shouldRender:s==v.Z5.orderHistorySingleProductPage&&r.eligibleItemsForReturn>0,children:(0,u.jsx)(y.Z,{prefetch:!1,href:v.$P.createClaimReturnPerItem(e.orderId,e.suborderId,null===(P=r.merchantInventory)||void 0===P?void 0:P.id,"claim",a),passHref:!0,children:(0,u.jsx)(j.u,{width:"100%",padding:"7px 13px",small:!0,children:t("app.returnsClaims.startClaim.text")})})})})]},o)})]})};var B=t(88264),k=t(44012);let S=()=>(0,u.jsxs)("svg",{width:"7",height:"12",viewBox:"0 0 7 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,u.jsx)("path",{d:"M3.29263 10.4418C2.34647 10.4418 1.85447 10.1 1.85447 9.41625C1.85447 8.61858 2.42216 8.27672 3.63324 8.27672H4.99571C5.0714 8.27672 5.10925 8.31471 5.10925 8.39068V9.03641C5.10925 9.98602 4.46586 10.4418 3.29263 10.4418ZM6.77448 11.8093C6.88802 11.8093 6.96372 11.7713 6.96372 11.6573V6.22557C6.96372 4.17442 6.01756 3.30078 3.48186 3.30078C2.11939 3.30078 1.21108 3.64264 0.529848 4.09845C0.454155 4.13644 0.454155 4.25039 0.492002 4.32636L1.13539 5.46589C1.17323 5.54186 1.28677 5.57984 1.36247 5.50387C1.74093 5.2 2.34647 4.93411 3.25478 4.93411C4.65509 4.93411 5.10925 5.35193 5.10925 6.30154V6.68138C5.10925 6.75735 5.0714 6.79534 4.99571 6.79534H3.33047C1.28677 6.79534 0 7.63099 0 9.45424C0 11.2015 1.28677 11.9992 2.80063 11.9992C3.97386 11.9992 4.76863 11.6193 5.14709 11.0116V11.6193C5.14709 11.7333 5.22279 11.8093 5.33633 11.8093H6.77448Z",fill:"#212121"}),(0,u.jsx)("path",{d:"M0.642356 2.20148H6.8113C6.92484 2.20148 7.00053 2.12551 7.00053 2.01156V0.682109C7.00053 0.568156 6.92484 0.492188 6.8113 0.492188H0.642356C0.528818 0.492188 0.453125 0.568156 0.453125 0.682109V2.04954C0.453125 2.12551 0.528818 2.20148 0.642356 2.20148Z",fill:"#212121"})]}),q=()=>(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(k.Z,{id:"app.ean"})," / ","\xa0",(0,u.jsx)(k.Z,{id:"app.aCode",values:{aIcon:()=>(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(S,{}),"\xa0"]})}})]});var $=t(62138),R=t(3879);let T=(e,r,t,o)=>{let{t:n}=(0,$.$)(),{formatNumber:s}=(0,P.Gb)(),l=n("app.orderHistory.suborder.grandTotal"),a=n("app.orderHistory.suborder.productCaption"),d=n("app.orderHistory.suborder.basePrice"),c=n("app.orderHistory.suborder.confirmedQuantity"),x=n("app.orderHistory.suborder.quantity");return(0,i.useMemo)(()=>[{Header:(0,u.jsx)(p.eB,{children:a}),accessor:"productName",Cell:function(i){let{row:n}=i;return(0,u.jsx)(R.S,{orderId:e,suborderId:r,customerCaseItem:n.original,availableCtas:t,deliveredDate:o})}},{Header:(0,u.jsx)(p.VY,{children:(0,u.jsx)(q,{})}),accessor:"productEan",Cell(e){var r,t;let{row:o}=e;return(0,u.jsx)(B.T,{label:"",value:o.original.productEan||(null===(r=o.original.merchantInventory)||void 0===r?void 0:null===(t=r.product)||void 0===t?void 0:t.ananasCode)})}},{Header:(0,u.jsx)(p.eB,{textAlign:"right",children:d}),accessor:"basePrice",Cell(e){let{row:r}=e;return(0,u.jsx)(B.T,{textAlign:"right",label:"",value:s(r.original.basePrice)})}},{Header:(0,u.jsx)(p.eB,{textAlign:"right",children:x}),accessor:"quantity",Cell(e){let{row:r}=e;return(0,u.jsx)(B.T,{textAlign:"right",label:"",value:r.original.quantity})}},{Header:(0,u.jsx)(p.eB,{textAlign:"right",children:c}),accessor:"confirmedQuantity",Cell(e){let{row:r}=e;return(0,u.jsx)(B.T,{textAlign:"right",label:"",value:r.original.confirmedQuantity})}},{Header:(0,u.jsx)(p.eB,{textAlign:"right",children:l}),accessor:"grandTotal",Cell(e){let{row:r}=e;return(0,u.jsx)(B.T,{textAlign:"right",label:"",value:s(r.original.grandTotal)})}}],[])};var N=t(29339),M=t(87379),F=t(99343);let A=M.ZP.button.withConfig({componentId:"sc-120gze-0"})(["border-radius:50px;border:1px solid ",";color:",";background-color:",';font-size:12px;font-weight:bold;padding:9px 16px;cursor:pointer;transform:translate(0px,-18px);display:block;margin:0 auto;&:after{content:"";border-bottom:2px solid ',";border-right:2px solid ",";width:8px;height:8px;transform:rotate(",") translate(-1px,-1px);display:inline-block;margin-left:5px;}"],N.r.color.alto,N.r.color.indigoBlue,N.r.color.white,N.r.color.indigoBlue,N.r.color.indigoBlue,(0,F.fq)("toggled","225deg","45deg")),E=e=>{var r;let{orderId:t,subOrder:o,useAccordion:n}=e,s=T(t,o.suborderId,o.availableCtas,o.deliveredDate),{t:l}=(0,O.Z)(),{0:d,1:c}=(0,i.useState)(!1),p=n&&(null==o?void 0:null===(r=o.items)||void 0===r?void 0:r.length)>3,x=(0,i.useCallback)(()=>{c(e=>!e)},[c]),m=(0,i.useMemo)(()=>!d&&p?o.items.slice(0,3):o.items,[d,p,o]),g=(0,a.useTable)({columns:s,data:m});return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(h,{tableInstance:g}),(0,u.jsx)(D,{orderId:t,suborderId:o.suborderId,subOrderItems:m}),p?(0,u.jsx)(A,{toggled:d,onClick:()=>x(),children:l(d?"app.orderHistory.suborder.showLessItems":"app.orderHistory.suborder.showMoreItems")}):null]})};var L=t(55147);let z=M.ZP.div.withConfig({componentId:"sc-7t0vq4-0"})(["display:flex;padding:12px 0;flex-direction:column;button{padding-left:0;padding-right:0;}",";
1"],N.r.useBreakpoint.md((0,M.iv)(["flex-direction:row;justify-content:space-between;"]))),V=M.ZP.div.withConfig({componentId:"sc-7t0vq4-1"})(["width:100%;",";"],N.r.useBreakpoint.md((0,M.iv)(["justify-content:flex-end;display:flex;align-items:center;width:auto;"]))),G=M.ZP.div.withConfig({componentId:"sc-7t0vq4-2"})(["display:flex;justify-content:space-between;align-items:center;&:not(:last-child){p{color:",";}}p{margin-bottom:8px;&:last-child{margin-left:12px;}}&:last-child{p{font-weight:",";margin-bottom:0;}}&:empty{display:none;}",";"],N.r.color.silver,N.r.font.weight.semiBold,N.r.useBreakpoint.md((0,M.iv)(["display:inline-flex;margin-left:24px;p{margin-bottom:0;}"])));var K=t(16384);let U=e=>{let{shouldRender:r,children:t}=e;return r?(0,u.jsx)(u.Fragment,{children:t}):null},W=(e,r,t,o)=>[{node:(0,u.jsx)(K.e,{label:r("app.payment.subtotal").toUpperCase(),value:`${t(e.basePrice)} ${o}`})},{node:(0,u.jsx)(U,{shouldRender:Boolean(Number(e.discount)),children:(0,u.jsx)(K.e,{label:r("app.payment.discount").toUpperCase(),value:`${t(e.discount)} ${o}`})})},{node:(0,u.jsx)(K.e,{label:r("app.payment.shipping.cost").toUpperCase(),value:`${t(e.shippingCost)} ${o}`})},{node:(0,u.jsx)(U,{shouldRender:(null==e?void 0:e.paidByVoucher)>0,children:(0,u.jsx)(K.e,{label:r("app.payment.totalPayment").toUpperCase(),value:`${t(null==e?void 0:e.paidByVoucher)} ${o}`})})},{node:(0,u.jsx)(K.e,{label:r("app.payment.grandTotal").toUpperCase(),value:`${t(e.grandTotal)} ${o}`})}],_=e=>{let{subOrder:r,footerCTA:t}=e,{t:o}=(0,O.Z)(),{formatNumber:i}=(0,P.Gb)(),{currency:n}=(0,L.Z)(),s=W(r,o,i,n);return(0,u.jsxs)(z,{children:[(0,u.jsx)("div",{children:t}),(0,u.jsx)(V,{children:s.map((e,r)=>{let{node:t}=e;return(0,u.jsx)(G,{children:t},r)})})]})};var Q=t(51376),J=t(61752),X=t(90820),Y=t(57193);let ee=M.ZP.div.withConfig({componentId:"sc-1qe480b-0"})(["padding:12px 0;",";
1"],N.r.useBreakpoint.md((0,M.iv)(["display:grid;grid-gap:0 12px;padding:24px 0 9px;grid-template-columns:auto 1fr;"]))),er=M.ZP.div.withConfig({componentId:"sc-1qe480b-1"})(["display:grid;grid-auto-flow:row;grid-gap:0;",";"],N.r.useBreakpoint.md((0,M.iv)(["grid-auto-columns:minmax(max-content,250px);grid-gap:0 40px;grid-auto-flow:column;"]))),et=M.ZP.div.withConfig({componentId:"sc-1qe480b-2"})(["display:grid;align-content:space-between;justify-items:flex-start;margin:32px 0 0 -7px;",";"],N.r.useBreakpoint.md((0,M.iv)(["grid-auto-columns:max-content;grid-auto-rows:1fr;grid-auto-flow:column;justify-content:end;align-items:end;margin:0;"]))),eo=M.ZP.div.withConfig({componentId:"sc-1qe480b-3"})(["display:flex;align-items:center;flex-wrap:wrap;margin-bottom:4px;",";"],N.r.useBreakpoint.md((0,M.iv)(["flex-wrap:nowrap;"]))),ei=M.ZP.div.withConfig({componentId:"sc-1qe480b-4"})(["display:flex;flex-direction:column;"]),en=M.ZP.div.withConfig({componentId:"sc-1qe480b-5"})(["width:1px;height:16px;background-color:",";margin:0 12px;"," ",""],N.r.color.stroke,(0,F.fq)("hidden",(0,M.iv)(["display:none;"])),(0,F.fq)("hideOnMobile",(0,M.iv)(["display:none;",";
1"],N.r.useBreakpoint.md((0,M.iv)(["display:block;"]))))),es=M.ZP.div.withConfig({componentId:"sc-1qe480b-6"})(["margin:12px 0;",";"],N.r.useBreakpoint.md((0,M.iv)(["margin:0;"]))),el=M.ZP.div.withConfig({componentId:"sc-1qe480b-7"})(["flex:1 1 100%;button{white-space:nowrap;}",";"],N.r.useBreakpoint.md((0,M.iv)(["flex:0;"]))),ea=(0,M.ZP)(Y.H6).withConfig({componentId:"sc-1qe480b-8"})(["font-size:","px;margin-left:12px;"],N.r.font.size.xs),ed=(0,M.ZP)(Y.H6).withConfig({componentId:"sc-1qe480b-9"})(["font-size:","px;margin-left:12px;color:",";",""],N.r.font.size.xs,N.r.color.carolinaBlue,(0,F.fq)("statusFinal",`
2      color: ${N.r.color.pistachio};
3    `));var ec=t(80511),ep=t(59184),eu=t(70686);let ex="UNKNOWN_STATUS",em=[ec.gKS.Delivered,ec.gKS.CompletedPudo,ec.gKS.CompletedLocker],eg=function(e){let r=!(arguments.length>1)||void 0===arguments[1]||arguments[1],{t}=(0,$.$)(),{locale:o}=(0,L.Z)();return(0,i.useMemo)(()=>{let i=e=>e.statusHistory.map(e=>{let r=eu.y[e.status]?t(eu.y[e.status]):ex;return()=>(0,u.jsx)(J.a,{timeStamp:new Date(e.timestamp).toLocaleString(o),status:r},e.status)});return[{render(o){var n;let s=eu.y[o.status]?t(eu.y[o.status]):ex;return(0,u.jsxs)(ei,{children:[(0,u.jsxs)(eo,{children:[(0,u.jsx)(b.x,{medium:!0,color:N.r.color.gray,children:`${t("app.thankYou.order")} ${e}`}),(0,u.jsxs)(ea,{id:`suborder-header-${o.suborderId}`,children:["#",o.suborderId]})]}),o.suborderType!==ec.No5.Dgt&&(0,u.jsxs)(eo,{children:[(0,u.jsx)(b.x,{medium:!0,color:N.r.color.gray,children:t("app.orderHistory.details.status")}),(0,u.jsx)(ed,{statusFinal:em.includes(o.status),children:s}),r?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(en,{hideOnMobile:!0}),(0,u.jsx)(el,{children:(0,u.jsx)(Q.Q,{dataTestId:"status-history-dropdown",items:i(o),type:"statusHistory",Cta(e){let{onClick:r}=e;return(0,u.jsx)(es,{children:(0,u.jsx)(X.Z,{onClick:r,children:t("app.orderHistory.showHistory")})})}})})]}):null]}),(0,u.jsxs)(eo,{children:[(0,u.jsx)(b.x,{medium:!0,color:N.r.color.gray,children:t("app.orderHistory.suborder.sender")}),(0,u.jsx)(b.x,{marginLeft:"12px",medium:!0,children:o.suborderType===ec.No5.Fba?t("app.orderHistory.suborder.sender.aDirect"):null==o?void 0:null===(n=o.merchant)||void 0===n?void 0:n.name})]})]})}},{render(e){var r;return(0,u.jsx)(ei,{children:e.suborderType===ec.No5.Dgt?(0,u.jsxs)(eo,{children:[(0,u.jsx)(b.x,{medium:!0,color:N.r.color.gray,children:t("app.digitalOrder.deliverTo")}),(0,u.jsx)(b.x,{marginLeft:"12px",medium:!0,children:[...new Set((null===(r=e.items[0].deliveryInfo)||void 0===r?void 0:r.deliverTo)??[])].join(", ")})]}):(0,u.jsxs)(u.Fragment,{children:[e.deliveredDate?(0,u.jsxs)(eo,{children:[(0,u.jsx)(b.x,{medium:!0,color:N.r.color.gray,children:t("app.orderHistory.suborder.delivered")}),(0,u.jsx)(b.x,{marginLeft:"12px",medium:!0,color:N.r.color.redOrange,fontWeight:700,children:new Date(e.deliveredDate).toLocaleDateString("sr-Cyrl-RS")})]}):(0,u.jsxs)(eo,{children:[(0,u.jsx)(b.x,{medium:!0,color:N.r.color.gray,children:t("app.orderHistory.details.deliveryTime")}),(0,u.jsx)(b.x,{marginLeft:"12px",medium:!0,color:N.r.color.redOrange,fontWeight:700,children:(0,ep._Q)(new Date(e.deliveryDateLower),new Date(e.deliveryDateUpper))})]}),(0,u.jsxs)(eo,{children:[(0,u.jsx)(b.x,{medium:!0,color:N.r.color.gray,children:t("app.orderHistory.details.courier")}),(0,u.jsx)(b.x,{marginLeft:"12px",medium:!0,children:e.courier?e.courier:t("app.orderHistory.details.courierMissing")})]})]})})}}]},[t,e,r])};function eh(e){let{counter:r,data:t,cta:o,showHistory:i}=e,n=eg(r,i);return(0,u.jsxs)(ee,{children:[(0,u.jsx)(er,{children:n.map(e=>e.render(t))}),(0,u.jsx)(et,{children:o})]})}
3var eb=t(72088),ej=t(27152),ef=t(25708),ey=t(87438),ev=t(1913);function ew(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function eC(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ew(Object(t),!0).forEach(function(r){(0,d.Z)(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ew(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}let eP=M.ZP.div.withConfig({componentId:"sc-1nv53sn-0"})(["display:flex;justify-content:center;align-items:center;margin:0 0 12px;margin:36px 0 40px;@media screen and (min-aspect-ratio:13/9) and (max-width:","px){margin:23px 0 30px;}"],N.r.breakpoint.md),eO=e=>{let{onClose:r,onCancel:t,suborder:n}=e,{mutate:s,isLoading:l}=(0,ev.H)(),{t:a}=(0,O.Z)(),{isMobileViewport:d}=(0,ey.u)(),{0:c,1:p}=(0,i.useState)(null),x=(0,o.useRouter)(),m=()=>{let{token:e}=x.query;s({suborderId:n.suborderId,orderToken:e},{onSuccess(){p({severity:"success",contentTitle:a("app.order.cancelOrder.success.title"),contentSubtitle:""})},onError(){p({severity:"error",contentTitle:a("app.order.cancelOrder.error.title"),contentSubtitle:""})}})};return(0,u.jsx)(ef.Z,eC(eC({isOpen:!0,variant:"small",severity:"warning",icon:(0,u.jsx)(ej.Z,{}),onClose:r,closable:!!c,contentTitle:a("app.order.cancelOrder.confirmation.title")},c||{}),{},{style:{minHeight:"324px"},footerNode:(0,u.jsx)(eP,{children:!c&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(j.u,{medium:d,marginRight:"12px",width:"50%",onClick:t,children:a("app.order.cancelOrder.confirmation.cancel")}),(0,u.jsx)(eb.p,{medium:d,disabled:l,width:"50%",onClick:m,children:a("app.order.cancelOrder.confirmation.submit")})]})})}))};var eI=t(90433),eZ=t(74530);let eH=e=>{let{order:r,showHistory:t,useAccordion:a,showFooter:d=!0,suborderActions:c=[]}=e,{t:p}=(0,$.$)(),x=(0,o.useRouter)(),{0:m,1:g}=(0,i.useState)(!1),{0:h,1:b}=(0,i.useState)(null),j=e=>{b(e),g(!0)},f=()=>{g(!1),b(null),setTimeout(()=>{x.reload()},300)},y=(0,i.useCallback)(e=>{let r=e.availableCtas.includes(ec.vxD.Cancel);return(0,u.jsxs)(u.Fragment,{children:[r?(0,u.jsx)(eZ.l,{onClick:()=>j(e),children:p("app.orderHistory.details.cancelOrder")}):null,(0,u.jsx)(n.Z,{shouldRender:c.includes("DOWNLOAD_DOCUMENTS"),children:(0,u.jsx)(eI.C,{suborder:e})})]})},[p,c]);return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(s.ft,{}),m&&(0,u.jsx)(eO,{onClose:f,onCancel:f,suborder:h}),null==r?void 0:r.suborders.map((e,o)=>{let i=`${o+1}/${r.suborders.length}`;return(0,u.jsxs)(l.x,{children:[(0,u.jsx)(eh,{counter:i,showHistory:t,data:e,cta:y(e)}),(0,u.jsx)(E,{subOrder:e,useAccordion:a,orderId:null==r?void 0:r.id}),d?(0,u.jsx)(_,{subOrder:e}):null]},e.id)})]})}},6327:function(e,r,t){t.d(r,{x:function(){return n}});var o=t(29339),i=t(87379);let n=i.ZP.div.withConfig({componentId:"sc-qc9vjq-0"})(["border-bottom:1px solid ",";&:last-of-type{border-bottom:none;}"],o.r.color.alto)},21532:function(e,r,t){t.d(r,{h:function(){return i}});var o=t(67294);let i=e=>{let{totalItems:r=0,initialPage:t=0,pageSize:i=20}=e,{0:n,1:s}=(0,o.useState)(t),l=Math.ceil(r/i),a=e=>{s(e)};return{currentPage:n,totalPages:l,canNextPage:n<l-1,canPreviousPage:n>0,gotoPage:a}}},62017:function(e,r,t){t.r(r),t.d(r,{StyledPanel:function(){return e0},default:function(){return e3}});var o=t(59499),i=t(4730),n=t(29339),s=t(12822),l=t(36260),a=t(74975),d=t(11163),c=t(67294),p=t(29186),u=t(38043),x=t(9379),m=t(21532),g=t(98774),h=t(25675),b=t.n(h),j=t(92099);t(92693);var f=t(37076),y=t(87379);let v=y.ZP.div.withConfig({componentId:"sc-1gzxo65-0"})(["border-radius:"," "," 0 0;background:",";padding:24px 24px 8px 24px;",""],n.r.size.radius.soft,n.r.size.radius.soft,n.r.color.white,n.r.useBreakp
3oint.md((0,y.iv)(["padding:32px 32px 8px 32px;"])));n.r.color.white,n.r.color.alto,n.r.useBreakpoint.sm((0,y.iv)(["flex-direction:row;justify-content:space-between;"]));let w=y.ZP.div.withConfig({componentId:"sc-1gzxo65-3"})(["display:flex;flex-direction:column;",";&:first-child{& span{padding-right:0;}}& span{font-weight:bold;}"],n.r.useBreakpoint.sm((0,y.iv)(["&{flex-direction:row;& span{padding-right:24px;}}"])));var C=t(88767),P=t(4107);let O=`
4    query GetCustomerOrdersV2($pageable: PageInput) {
5  response: getCustomerOrdersV2(pageable: $pageable) {
6    number
7    numberOfElements
8    totalPages
9    totalElements
10    size
11    content {
12      id
13      availableCtas
14      currency
15      basePrice
16      shippingCost
17      grandTotal
18      createdDate
19      reservedAmount
20      capturedAmount
21      basePriceBeforeDeductions
22      discount
23      cashHandlingFee
24      paidByVoucher
25      deliveryType
26      paymentMethods
27      chargedPrice
28      addresses {
29        type
30        firstName
31        lastName
32        city
33        postcode
34        email
35        streetName
36        streetNumber
37        apartmentNumber
38        additionalInfo
39        phone
40      }
41      transactionData {
42        transactionAuthCode
43        transactionDate
44        transactionId
45        transactionRefId
46      }
47      bnplDetails {
48        applicationId
49        applicationLink
50        creditStatus
51        disbursedAmount
52        rejectionReason
53      }
54      suborders {
55        id
56        suborderId
57        merchant {
58          id
59          name
60        }
61        fba
62        suborderType
63        packedAt
64        basePrice
65        shippingCost
66        chargedPrice
67        discount
68        paidByVoucher
69        insurancePrice
70        courier
71        grandTotal
72        deliveryDateLower
73        deliveryDateUpper
74        deliveredDate
75        availableCtas
76        status
77        documents {
78          id
79          name
80          type
81          workaround
82        }
83        statusHistory {
84          status
85          timestamp
86        }
87        items {
88          id
89          dgtDataType
90          productId
91          productApid
92          productEan
93          productName
94          specifications
95          canSubmitReview
96          deliveryInfo {
97            deliverTo
98          }
99          image
100          thumbnailBaseUrl
101          assetRootUrl
102          quantity
103          confirmedQuantity
104          basePrice
105          grandTotal
106          merchantInventory {
107            id
108            product {
109              slug
110              ananasCode
111            }
112          }
113          merchant {
114            id
115            name
116          }
117        }
118      }
119    }
120  }
121}
122    `,I=(e,r)=>(0,C.useQuery)(void 0===e?["GetCustomerOrdersV2"]:["GetCustomerOrdersV2",e],(0,P.NV)(O,e),r);I.document=O,I.getKey=e=>void 0===e?["GetCustomerOrdersV2"]:["GetCustomerOrdersV2",e],I.fetcher=(e,r)=>(0,P.NV)(O,e,r);var Z=t(10988);t(51106);var H=t(85893);let D=()=>(0,H.jsx)(j.Z,{titleKey:"app.emptyState.emptyOrdersTitle",descriptionKey:"app.emptyState.emptyOrdersDescription",ctaKey:"app.emptyState.emptyOrdersCta",errorImage:(0,H.jsx)(f.OM,{children:(0,H.jsx)(b(),{src:j.a.orders,alt:"Greška",width:"181",height:"270"})}),emptyStateIdentifier:"order-history-empty-state-identifier"});var B=t(12834),k=t(87438),S=t(69826),q=t(29973);let $=e=>{let{gotoPage:r,canNextPage:t,canPreviousPage:o,currentPage:i,totalPages:s}=e,{width:l}=(0,k.u)(),{t:a}=(0,Z.Z)(),d=l>n.r.breakpoint.md,c=d?a("app.pagination.nextPage"):(0,H.jsx)(q.Z,{htmlColor:n.r.color.silver}),p=d?a("app.pagination.prevPage"):(0,H.jsx)(S.Z,{htmlColor:n.r.color.silver});return(0,H.jsx)(B.t,{gotoPage:r,pageIndex:i,pageCount:s,canNextPage:t,canPreviousPage:o,pageNeighbors:d?1:0,nextLabel:c,previousLabel:p})};var R=t(3779);function T(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function N(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};
122r%2?T(Object(t),!0).forEach(function(r){(0,o.Z)(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}let M=()=>{var e;let r=(0,d.useRouter)(),{translateUrl:t}=(0,g._B)(),{0:o,1:i}=(0,c.useState)(Number(r.query.page)-1||0),{data:n,isLoading:s,refetch:l}=I({pageable:{page:o,size:4}},{refetchOnWindowFocus:!1,enabled:!1}),{currentPage:a,totalPages:h,canNextPage:b,canPreviousPage:j,gotoPage:f}=(0,m.h)({totalItems:null==n?void 0:n.response.totalElements,pageSize:4});(0,c.useEffect)(()=>{f(o),l()},[o]),(0,c.useEffect)(()=>{i(Number(r.query.page)-1||0)},[r.query]);let y=e=>{r.push({pathname:t(r.pathname),query:N(N({},r.query),{},{page:e+1})}),i(e)};return s?(0,H.jsx)(p.Q,{}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(u.V9,{}),(null==n?void 0:null===(e=n.response)||void 0===e?void 0:e.content.length)!==0?(0,H.jsxs)(H.Fragment,{children:[null==n?void 0:n.response.content.map(e=>(0,H.jsx)(R.D,{order:e,refetch:l},e.id)),(0,H.jsx)($,{gotoPage:y,currentPage:a,totalPages:h,canNextPage:b,canPreviousPage:j})]}):(0,H.jsx)(v,{children:(0,H.jsx)(D,{})}),!s&&(0,H.jsx)(x.S_,{})]})};var F=t(1169),A=t(61500),E=t(16237),L=t(11529),z=t(55288),V=t(42298),G=t(6327);let K=y.ZP.div.withConfig({componentId:"sc-1ujgdo5-0"})(["margin:16px 0;border-radius:8px;background-color:",";padding:12px 16px;"],n.r.color.white),U=y.ZP.div.withConfig({componentId:"sc-1ujgdo5-1"})(["display:flex;flex-direction:column;padding-bottom:7px;border-bottom:1px solid ",";",";
122"],n.r.color.alto,n.r.useBreakpoint.sm((0,y.iv)(["flex-direction:row;justify-content:space-between;"])));var W=t(79521),_=t(20452),Q=t(80511),J=t(62138),X=t(97827),Y=t(25682),ee=t(57193),er=t(99343);let et=y.ZP.div.withConfig({componentId:"sc-3e5lto-0"})(["border:var(--border);border-radius:8px;border:1px solid ",";display:none;",";"],n.r.color.alto,n.r.useBreakpoint.md((0,y.iv)(["display:block;"]))),eo=y.ZP.div.withConfig({componentId:"sc-3e5lto-1"})(["display:grid;align-content:space-between;justify-items:flex-start;button{padding-left:0;}",";"],n.r.useBreakpoint.md((0,y.iv)(["grid-auto-columns:max-content;grid-auto-flow:column;grid-gap:0 16px;justify-content:flex-end;align-items:center;"]))),ei=y.ZP.div.withConfig({componentId:"sc-3e5lto-2"})(["display:flex;align-items:center;flex-wrap:wrap;margin-bottom:4px;",";"],n.r.useBreakpoint.md((0,y.iv)(["flex-wrap:nowrap;"]))),en=y.ZP.div.withConfig({componentId:"sc-3e5lto-3"})(["display:flex;flex-direction:column;"]),es=(0,y.ZP)(ee.H6).withConfig({componentId:"sc-3e5lto-4"})(["font-size:","px;margin-left:12px;"],n.r.font.size.xs),el=y.ZP.div.withConfig({componentId:"sc-3e5lto-5"})(["padding:12px 0;",";
122"],n.r.useBreakpoint.md((0,y.iv)(["display:grid;grid-gap:0 12px;padding:24px 0 9px;grid-template-columns:auto 1fr;"]))),ea=y.ZP.div.withConfig({componentId:"sc-3e5lto-6"})(["display:grid;grid-auto-flow:row;grid-gap:0;",";"],n.r.useBreakpoint.md((0,y.iv)(["grid-auto-columns:minmax(max-content,250px);grid-gap:0 40px;grid-auto-flow:column;"]))),ed=(0,y.ZP)(et).withConfig({componentId:"sc-3e5lto-7"})(["display:block;",";"],n.r.useBreakpoint.md((0,y.iv)(["display:none;"]))),ec=(0,y.ZP)(L.x).withConfig({componentId:"sc-3e5lto-8"})(["font-weight:",";font-size:","px;margin:4px 0;"],n.r.font.weight.semiBold,n.r.font.size.xs),ep=y.ZP.div.withConfig({componentId:"sc-3e5lto-9"})(["padding:0;height:39px;background-color:",";border-radius:8px 8px 0 0;display:flex;align-items:center;"],n.r.color.porcelain),eu=y.ZP.div.withConfig({componentId:"sc-3e5lto-10"})(["display:grid;position:relative;padding:12px;border-bottom:1px solid ",";&:last-child{border-bottom:none;}",";"],n.r.color.alto,n.r.useBreakpoint.md((0,y.iv)(["padding:0;"]))),ex=y.ZP.div.withConfig({componentId:"sc-3e5lto-11"})(["display:flex;flex-direction:column;margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid ",";& > img{height:auto;width:100%;}"],n.r.color.gray),em=y.ZP.div.withConfig({componentId:"sc-3e5lto-12"})(["display:flex;justify-content:space-between;margin-bottom:8px;&:last-child{margin-bottom:0;}"]),eg=y.ZP.p.withConfig({componentId:"sc-3e5lto-13"})(["font-weight:600;font-size:12px;margin-bottom:0;"]),eh=y.ZP.p.withConfig({componentId:"sc-3e5lto-14"})(["font-size:12px;margin-bottom:0;"]),eb=y.ZP.div.withConfig({componentId:"sc-3e5lto-15"})(["display:grid;background-color:",";border-radius:8px 8px 0 0;",";
122"],n.r.color.porcelain,n.r.useBreakpoint.lg((0,y.iv)(["grid-auto-flow:column;grid-template-columns:2fr repeat(3,1fr);position:sticky;top:0;z-index:1;"]))),ej=y.ZP.div.withConfig({componentId:"sc-3e5lto-16"})(["display:grid;position:relative;padding:12px;border-bottom:1px solid ",";&:last-child{border-bottom:none;}",";",";"],n.r.color.alto,n.r.useBreakpoint.md((0,y.iv)(["padding:0;"])),n.r.useBreakpoint.lg((0,y.iv)(["grid-auto-flow:column;grid-template-columns:2fr repeat(3,1fr);"]))),ef=y.ZP.div.withConfig({componentId:"sc-3e5lto-17"})(["display:grid;padding:12px;"]),ey=y.ZP.div.withConfig({componentId:"sc-3e5lto-18"})(["padding:12px;"]),ev=y.ZP.div.withConfig({componentId:"sc-3e5lto-19"})(["display:flex;",""],(0,er.fq)("disabled",(0,y.iv)(["opacity:0.4;cursor:not-allowed;"]))),ew=y.ZP.img.withConfig({componentId:"sc-3e5lto-20"})(["width:42px;height:42px;object-fit:cover;margin-bottom:10px;margin-right:16px;border:1px solid ",";border-radius:4px;",""],n.r.color.alto,n.r.useBreakpoint.md((0,y.iv)(["margin-bottom:0;"]))),eC=y.ZP.div.withConfig({componentId:"sc-3e5lto-21"})(["flex:1;"]),eP=y.ZP.p.withConfig({componentId:"sc-3e5lto-22"})(["margin-bottom:4px;color:",";font-size:","px;text-align:right;"],n.r.color.silver,n.r.font.size.xs),eO=e=>{let{productName:r,image:t,imageBaseUrl:o}=e,i=(0,Y.Rk)(t,o,"thumbnail")||"";return(0,H.jsxs)(ev,{children:[(0,H.jsx)(ew,{src:i,alt:"product-image"}),(0,H.jsx)(eC,{children:(0,H.jsx)(L.x,{color:n.r.color.dune,marginBottom:"4px",fontWeight:400,children:r})})]})},eI=()=>{let{t:e}=(0,J.$)(),r=e("app.order.reason.caption"),t=e("app.orderHistory.suborder.productCaption"),o=e("app.orderHistory.details.status"),i=e("app.orderHistory.details.serial");return(0,c.useMemo)(()=>[{Header:(0,H.jsx)(X.eB,{children:t}),accessor:"product",Cell:function(e){let{row:r}=e;return(0,H.jsx)(eO,{productName:r.original.product.name,image:r.original.product.image,imageBaseUrl:r.original.product.thumbnailBaseUrl})}},{Header:(0,H.jsx)(X.eB,{children:i}),accessor:"serial",Cell(e){let{row:r}=e;return(0,H.jsx)(_.Km,{children:(0,H.jsxs)(_.Sy,{children:[r.original.serial??"-","."]})})}},{Header:(0,H.jsx)(X.eB,{children:r}),accessor:"reason",Cell(e){var r;let{row:t}=e;return(0,H.jsx)(_.Km,{children:(0,H.jsxs)(_.Sy,{children:[null===(r=t.original.reason)||void 0===r?void 0:r.label,"."]})})}},{Header:(0,H.jsx)(X.eB,{children:o}),accessor:"status",Cell(e){var r,t,o,i;let{row:s}=e,l=n.r.color.redOrange;return(null===(r=s.original.status)||void 0===r?void 0:r.value)===Q.GvN.Resolved&&(l=-1!=[Q.KBp.Rejected,Q.KBp.AutomaticallyRejected].indexOf(s.original.decision)?n.r.color.cardinal:n.r.color.pistachio),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X.eB,{color:l,margin:"0!important",children:null===(t=s.original.status)||void 0===t?void 0:t.label}),(0,H.jsx)(_.Km,{children:(0,H.jsxs)(_.Sy,{children:[null===(o=s.original.status)||void 0===o?void 0:o.description,null!==(i=s.original.status)&&void 0!==i&&i.description.length?".":""]})})]})}}],[t,r,o,i])},eZ=["headers"];function eH(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function eD(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?eH(Object(t),!0).forEach(function(r){(0,o.Z)(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):eH(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function eB(e){let{tableInstance:r}=e,{rows:t,prepareRow:o,headerGroups:n}=r;return(0,H.jsxs)(et,{children:[n.map(e=>{let{headers:r}=e,t=(0,i.Z)(e,eZ);return(0,H.jsx)(eb,eD(eD({},t.getHeaderGroupProps()),{},{children:r.map(e=>{let{getHeaderProps:r,render:t}=e;return(0,H.jsx)(ef,eD(eD({},r()),{},{children:t("Header")}))})}))}),t.map((e,r)=>(o(e),(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(ej,{children:e.cells.map((e,r)=>(0,H.jsx)(ey,eD(eD({},e.getCellProps()),{},{children:e.render("Cell")})))})})))]})}let ek=e=>{var r,t,o,i;let{customerCase:s}
122=e,{t:l}=(0,Z.Z)(),a=(0,Y.Rk)(s.product.image,s.product.thumbnailBaseUrl,"thumbnail")||"";return(0,H.jsxs)(ed,{children:[(0,H.jsx)(ep,{children:(0,H.jsx)(L.x,{fontWeight:600,paddingLeft:"12px",medium:!0,children:l("app.orderHistory.childOrderBodyMobile.products")})}),(0,H.jsxs)(eu,{children:[(0,H.jsxs)(ex,{children:[(0,H.jsx)(ew,{src:a,alt:"product-image"}),(0,H.jsx)(L.x,{fontWeight:600,children:s.product.name})]}),(0,H.jsxs)(em,{children:[(0,H.jsx)(eg,{children:l("app.orderHistory.details.serial")}),(0,H.jsx)(eh,{children:(0,H.jsx)(_.Km,{children:(0,H.jsxs)(eP,{textAlign:"right",children:[s.serial??"-","."]})})})]}),(0,H.jsxs)(em,{children:[(0,H.jsx)(eg,{children:l("app.order.reason.caption")}),(0,H.jsx)(eh,{children:(0,H.jsx)(_.Km,{children:(0,H.jsxs)(eP,{textAlign:"right",children:[null===(r=s.reason)||void 0===r?void 0:r.label,"."]})})})]}),(0,H.jsxs)(em,{children:[(0,H.jsx)(eg,{children:l("app.orderHistory.details.status")}),(0,H.jsxs)(eh,{children:[(0,H.jsx)(ec,{textAlign:"right",margin:"0!important",color:n.r.color.redOrange,children:null===(t=s.status)||void 0===t?void 0:t.label}),(0,H.jsx)(_.Km,{children:(0,H.jsxs)(eP,{textAlign:"right",children:[null===(o=s.status)||void 0===o?void 0:o.description,null!==(i=s.status)&&void 0!==i&&i.description.length?".":""]})})]})]})]})]})},eS=e=>{let{customerCase:r}=e,t=eI(),o=(0,W.useTable)({columns:t,data:[r]});return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(eB,{tableInstance:o}),(0,H.jsx)(ek,{customerCase:r})]})};var eq=t(4328),e$=t(91981);function eR(e){let{data:r}=e,{t}=(0,Z.Z)(),{isLoading:o,downloadLpnSpecification:i}=(0,e$.j)(r.caseItemId);return(0,H.jsxs)(el,{children:[(0,H.jsxs)(ea,{children:[(0,H.jsx)(en,{children:(0,H.jsxs)(ei,{children:[(0,H.jsxs)(L.x,{medium:!0,color:n.r.color.gray,children:[t(r.type==Q.u3X.Return?"app.orderHistory.details.page.return":"app.orderHistory.details.page.claim"),":"]}),(0,H.jsxs)(es,{children:["#",r.caseItemId]})]})}),(0,H.jsx)(en,{children:(0,H.jsxs)(ei,{children:[(0,H.jsxs)(L.x,{medium:!0,color:n.r.color.gray,children:[t(r.type==Q.u3X.Return?"app.orderHistory.details.page.return.date":"app.orderHistory.details.page.claim.date"),":"]}),(0,H.jsx)(L.x,{marginLeft:"12px",medium:!0,fontWeight:700,children:new Date(r.createdAt).toLocaleDateString("sr-Cyrl-RS")})]})})]}),(0,H.jsx)(eq.Z,{shouldRender:Boolean(r.lpnDocumentKey),children:(0,H.jsx)(eo,{children:(0,H.jsx)(L.x,{onClick:()=>i(),fontWeight:600,disabled:o,color:n.r.color.indigoBlue,style:{display:"flex",cursor:"pointer"},medium:!0,children:t("app.orderHistory.details.page.lpn.download")})})})]})}let eT=e=>{let{customerCase:r}=e,{t}=(0,Z.Z)();return(0,H.jsx)(H.Fragment,{children:(0,H.jsxs)(K,{children:[(0,H.jsxs)(U,{children:[(0,H.jsx)(w,{children:(0,H.jsxs)(L.x,{children:[(0,H.jsx)("span",{children:`${t("app.orderHistory.details.page.title")} `}),"\xa0#",null==r?void 0:r.suborderId]})}),(0,H.jsx)(w,{children:(0,H.jsxs)(L.x,{medium:!0,children:[`${t("app.orderHistory.details.page.order.date")}`,":","\xa0",(0,H.jsx)("span",{children:(0,V.Z)(new Date(r.orderCreatedAt),"dd.MM.yyyy")})]})})]}),(0,H.jsxs)(G.x,{children:[(0,H.jsx)(eR,{data:r}),(0,H.jsx)(eS,{customerCase:r})]})]},r.suborderId)})},eN=y.ZP.div.withConfig({componentId:"sc-1c5xyie-0"})(["border-radius:"," "," 0 0;background:",";padding:24px 24px 8px 24px;",""],n.r.size.radius.soft,n.r.size.radius.soft,n.r.color.white,n.r.useBreakp
122oint.md((0,y.iv)(["padding:32px 32px 8px 32px;"]))),eM=`
123    query GetAllCustomerCases($pageable: PageInput!) {
124  response: getAllCustomerCases(pageable: $pageable) {
125    number
126    numberOfElements
127    size
128    totalElements
129    totalPages
130    content {
131      caseItemId
132      decision
133      lpnDocumentKey
134      merchantInventoryId
135      orderCreatedAt
136      createdAt
137      product {
138        name
139        image
140        assetRootUrl
141        thumbnailBaseUrl
142      }
143      reason {
144        label
145        value
146      }
147      resolutionMethod
148      status {
149        description
150        label
151        value
152      }
153      suborderId
154      type
155      serial
156    }
157  }
158}
159    `,eF=(e,r)=>(0,C.useQuery)(["GetAllCustomerCases",e],(0,P.NV)(eM,e),r);function eA(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function eE(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?eA(Object(t),!0).forEach(function(r){(0,o.Z)(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):eA(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}eF.document=eM,eF.getKey=e=>["GetAllCustomerCases",e],eF.fetcher=(e,r)=>(0,P.NV)(eM,e,r);let eL=e=>{let{paginationProps:{gotoPage:r,canNextPage:t,canPreviousPage:o,currentPage:i,totalPages:s}}=e,{width:l}=(0,k.u)(),{t:a}=(0,Z.Z)(),d=l>=n.r.breakpoint.md,c=d?a("app.pagination.nextPage"):(0,H.jsx)(q.Z,{htmlColor:n.r.color.silver}),p=d?a("app.pagination.prevPage"):(0,H.jsx)(S.Z,{htmlColor:n.r.color.silver});return(0,H.jsx)(B.t,{gotoPage:r,pageIndex:i,pageCount:s,canNextPage:t,canPreviousPage:o,pageNeighbors:d?1:0,nextLabel:c,previousLabel:p})},ez=()=>{var e,r,t,o;let i=(0,d.useRouter)(),{translateUrl:n}=(0,g._B)(),{t:s}=(0,Z.Z)(),{0:l,1:a}=(0,c.useState)(Number(i.query.page)-1||0),{isLoading:u,data:x,refetch:h}=eF({pageable:{page:l,size:4}},{refetchOnWindowFocus:!1,refetchOnMount:!1}),{currentPage:b,totalPages:j,canNextPage:f,canPreviousPage:y,gotoPage:v}=(0,m.h)({totalItems:null==x?void 0:x.response.totalElements,pageSize:4});if((0,c.useEffect)(()=>{v(l),h()},[l]),(0,c.useEffect)(()=>{a(Number(i.query.page)-1||0)},[i.query]),u)return(0,H.jsx)(p.Q,{});let w=e=>{i.push({pathname:n(i.pathname),query:eE(eE({},i.query),{},{page:e+1})}),a(e)};return null!=x&&null!==(e=x.response)&&void 0!==e&&null!==(r=e.content)&&void 0!==r&&r.length?(0,H.jsxs)(H.Fragment,{children:[null===(t=x.response)||void 0===t?void 0:null===(o=t.content)||void 0===o?void 0:o.map(e=>(0,H.jsx)(eT,{customerCase:e},e.caseItemId)),(0,H.jsx)(eL,{paginationProps:{gotoPage:w,currentPage:b,totalPages:j,canNextPage:f,canPreviousPage:y}})]}):(0,H.jsxs)(eN,{children:[(0,H.jsxs)(L.x,{textAlign:"center",children:[(0,H.jsx)("b",{children:s("app.returnsClaims.createFlow.tabindex1.paragraph1")}),(0,H.jsx)("br",{}),s("app.returnsClaims.createFlow.tabindex1.paragraph2")]}),(0,H.jsx)(z.f,{step:0})]})};var eV=t(57288),eG=t(83242),eK=t(32212);let eU=["children","value","index"];function eW(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function e_(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?eW(Object(t),!0).forEach(function(r){(0,o.Z)(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):eW(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function eQ(e){return{id:`orders-and-claims-tab-${e}`,"aria-controls":`orders-and-claims-tabpanel-${e}`}}function eJ(e){let{children:r,value:t,index:o}=e,n=(0,i.Z)(e,eU);return(0,H.jsx)(e0,e_(e_({role:"tabpanel",style:{backgroundColor:"transparent"},hidden:t!==o,id:`returns-claims-tabpanel-${o}`,"aria-labelledby":`returns-claims-tab-${o}`},n),{},{children:t===o&&r}))}
159let eX={root:{marginBottom:"16px",borderBottom:`4px solid ${n.r.color.stroke}`,borderRadius:"3px",overflow:"visible"},fixed:{overflow:"visible !important"}},eY={root:{textTransform:"none",borderBottom:`4px solid ${n.r.color.stroke}`,borderRadius:"3px",bottom:"-4px"},selected:{borderBottom:`4px solid ${n.r.color.redOrange}`,borderRadius:"3px",bottom:"-4px"}},e0=y.ZP.div.withConfig({componentId:"sc-jqnyo0-0"})(["background-color:",";border-radius:",";padding-bottom:24px;"],n.r.color.white,n.r.size.radius.soft),e1=()=>{let{t:e}=(0,J.$)(),{query:r,replace:t,pathname:o}=(0,d.useRouter)(),{translateUrl:i}=(0,g._B)(),{0:n,1:p}=(0,c.useState)(null!=r&&r.tabIndex?Number(r.tabIndex):0),u=(0,c.useCallback)(e=>{p(e);let n=Object.assign({},r);delete n.page;let s=i(o);t({pathname:s,query:e_(e_({},n),{},{tabIndex:e})},void 0,{shallow:!0})},[r,o,t]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(eK.Is,{seoConfig:{nofollow:!0,noindex:!0},typicalPageTitle:e("app.seo.orderHistory")}),(0,H.jsx)(eG.o,{children:(0,H.jsxs)(E.Z,{children:[(0,H.jsx)(eV.pU,{greaterThan:"md",children:(0,H.jsx)(s.H4,{marginBottom:"50px",children:e("app.orders.and.returns")})}),(0,H.jsxs)(l.m,{extendDefaultStyles:eX,value:n,onChange:(e,r)=>u(r),"aria-label":"my orders and claims",children:[(0,H.jsx)(a.O,e_(e_({label:e("app.orders.claims.tab.my.orders")},eQ(0)),{},{extendDefaultStyles:eY})),(0,H.jsx)(a.O,e_(e_({label:e("app.orders.claims.tab.my.returns")},eQ(1)),{},{extendDefaultStyles:eY}))]}),(0,H.jsx)(eJ,{value:n,index:0,children:(0,H.jsx)(M,{})}),(0,H.jsx)(eJ,{value:n,index:1,children:(0,H.jsx)(ez,{})})]})})]})},e2=()=>(0,H.jsx)(F.c,{children:(0,H.jsx)(e1,{})});e2.getLayout=A.G;var e3=e2},59184:function(e,r,t){t.d(r,{J_:function(){return l},NK:function(){return p},Tu:function(){return u},_Q:function(){return a},p6:function(){return c},zK:function(){return d}});var o=t(12274),i=t(49160),n=t(42298),s=t(47717);let l=e=>(0,o.Z)(new Date(e)),a=(e,r)=>{let t=(0,i.Z)(new Date(e),new Date(r));return t?`${(0,n.Z)(new Date(e),"dd.")} - ${(0,n.Z)(new Date(r),"dd.LLL",{locale:s.Z})}`.toLocaleLowerCase():`${(0,n.Z)(new Date(e),"dd. MMM")} - ${(0,n.Z)(new Date(r),"dd. MMM",{locale:s.Z})}`.toLocaleLowerCase()},d=e=>e.slice(0,-3),c=e=>{try{return(0,n.Z)(new Date(e),"dd.MM.yy")}catch{return""}},p=e=>e%10==1&&e%100!=11,u=e=>{try{return(0,n.Z)(new Date(e),"dd.MM.yyyy.")}catch{return""}}}}]);
160//# sourceMappingURL=2017-30332a236f685c7f.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.