PageSourceSearch

https://befree.ru/_next/static/chunks/8904.4e3f442d10eb41c0.js

js befree.ru collected 2026-09-24 09:56:07 UTC 11,552 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8904],{4460:(e,t,i)=>{i.r(t),i.d(t,{default:()=>S});var n=i(54568),a=i(19664),o=i.n(a),d=i(52546),r=i(68791),c=i(67014),l=i(63922);let s=l.Ay.div.withConfig({componentId:"sc-2ed93596-0"})(["width:100%;position:relative;min-height:122px;"]),p=l.Ay.div.withConfig({componentId:"sc-2ed93596-1"})(["display:flex;flex-direction:column;padding-bottom:",";& > div:first-child a > div{padding-top:0;}@media ","{padding-bottom:0;gap:20px;}"],e=>e.$isMobileApp?0:"calc(".concat(e.theme.tabBarHeight,"px + env(safe-area-inset-bottom))"),e=>e.theme.device.laptop),h=l.Ay.div.withConfig({componentId:"sc-2ed93596-2"})(["width:100%;height:",";@media ","{height:",";}"],e=>e.$hasPaymentButton?"206px":"144px",e=>e.theme.device.laptop,e=>e.$hasPaymentButton?"264px":"190px");var x=i(92533),m=i(80455),g=i(82125),u=i(20355),y=i(80225);let f=l.Ay.div.withConfig({componentId:"sc-3d36ea06-0"})(["width:100%;height:",";padding:12px 16px;display:flex;flex-direction:column;gap:4px;position:relative;&::after{content:'';position:absolute;bottom:0;left:16px;right:16px;height:1px;background-color:",";}"],e=>e.$hasPaymentButton?"206px":"144px",e=>e.theme.color.gray_palette_level_4),v=l.Ay.div.withConfig({componentId:"sc-3d36ea06-1"})(["display:grid;grid-template-columns:1fr auto;gap:4px;align-items:start;"]),w=l.Ay.div.withConfig({componentId:"sc-3d36ea06-2"})(["display:flex;flex-direction:column;gap:4px;"]),_=l.Ay.div.withConfig({componentId:"sc-3d36ea06-3"})(["display:flex;flex-direction:column;align-items:flex-end;gap:4px;"]),A=l.Ay.div.withConfig({componentId:"sc-3d36ea06-4"})(["width:100%;overflow:hidden;position:relative;"]),j=l.Ay.div.withConfig({componentId:"sc-3d36ea06-5"})(["display:flex;gap:4px;"]),b=l.Ay.div.withConfig({componentId:"sc-3d36ea06-6"})(["width:53px;flex-shrink:0;position:relative;height:80px;"," ",""],e=>e.$isOrderCanceled&&(0,l.AH)(["picture img{opacity:0.5;}"]),e=>e.$isCanceled&&(0,l.AH)(["&::after{content:'';position:absolute;top:0;left:0;right:0;bottom:0;background-color:",";opacity:0.6;}"],e.theme.color.gray_palette_level_4)),C=l.Ay.img.withConfig({componentId:"sc-3d36ea06-7"})(["width:53px;height:80px;object-fit:cover;"]),I=l.Ay.div.withConfig({componentId:"sc-3d36ea06-8"})(["position:absolute;right:2px;bottom:2px;display:flex;padding:1px 4px;justify-content:center;align-items:center;background-color:",";"],e=>e.theme.utils.opacity(e.theme.color.primary_white,60)),k=l.Ay.div.withConfig({componentId:"sc-3d36ea06-9"})(["width:53px;height:80px;flex-shrink:0;background-color:",";display:flex;align-items:center;justify-content:center;"],e=>e.theme.color.gray_palette_level_6),$=(0,l.Ay)(m.A).withConfig({componentId:"sc-3d36ea06-10"})(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:",";"],e=>e.theme.zIndex.level1),P=l.Ay.div.withConfig({componentId:"sc-3d36ea06-11"})(["width:100%;margin-top:12px;"]),M=e=>{let{order:t,hasPaymentButton:i}=e,{formattedDate:a,deliveryDate:o,statusText:d,isPaymentWaiting:r,isStatusItemCanceled:c,deliveryMethod:l,hasImages:s,mobileImages:p,mobileRemainingItemsCount:h}=(0,y.A)(t);return(0,n.jsxs)(f,{$hasPaymentButton:i,"data-testid":"order-card-".concat(t.id),children:[(0,n.jsxs)(v,{"data-testid":"order-card-header",children:[(0,n.jsxs)(w,{"data-testid":"order-card-left",children:[(0,n.jsxs)(m.A,{variant:"text2","data-testid":"order-number-and-date",children:["№",t.number.toUpperCase()," ",a]}),o&&(0,n.jsxs)(m.A,{color:"typography_level_3",variant:"text3",lowercase:!0,"data-testid":"order-delivery-info",children:[l," • ",o]})]}),(0,n.jsxs)(_,{"data-testid":"order-card-right",children:[d&&(0,n.jsx)(g.A,{text:d,isPaymentWaiting:r,isCanceled:c,testId:"order-status"}),(0,n.jsxs)(m.A,{variant:"text3",lowercase:!0,"data-testid":"order-price",children:[t.calculated_total,"₽"]})]})]}),(0,n.jsx)(A,{"data-testid":"order-images-".concat(t.id),children:s?(0,n.jsxs)(j,{"data-testid":"order-images-container-".concat(t.id),children:[p.map((e,i)=>(0,n.jsxs)(b,{$isCanceled:e.canceled,$isOrderCanceled:c,"data-testid":"order-item-image-".concat(t.id,"-").concat(i),children:[(0,n.jsx)(x.A,{src:e.picture,alt:"",cdnWidth:320,width:53,height:80,priority:!1}),e.canceled&&(0,n.jsx)($,{variant:"text3",children:"отменен"}),e.totalQty>1&&(0,n.jsx)(I,{children:(0,n.jsx)(m.A,{variant:"caption_uppercase",children:e.totalQty})})]},"".concat(e.variation_id,"-").concat(e.product_id,"-").concat(e.sku))),h>0&&(0,n.jsx)(k,{"data-testid":"order-remaining-items",children:(0,n.jsxs)(m.A,{variant:"caption_uppercase",color:"typography_level_1",align:"center",children:["+ ",h," шт"]})})]}):(0,n.jsx)(C,{src:"/images/profile/defaultOrder.png",alt:""})}),i&&(0,n.jsx)(P,{children:(0,n.jsx)(u.A,{order:t,isOrderList:!0})})]})},B=l.Ay.div.withConfig({componentId:"sc-863d38ec-0"})(["width:100%;border-bottom:1px solid ",";height:",";@media ","{width:710px;padding-bottom:20px;&:hover{cursor:pointer;}}"],e=>e.theme.color.gray_palette_level_4,e=>e.$hasPaymentButton?"264px":"190px",e=>e.theme.device.laptop),O=l.Ay.div.withConfig({componentId:"sc-863d38ec-1"})(["display:flex;gap:24px;width:100%;"]),Q=l.Ay.div.withConfig({componentId:"sc-863d38ec-2"})(["width:220px;flex-shrink:0;display:flex;flex-direction:column;gap:24px;"]),D=l.Ay.div.withConfig({componentId:"sc-863d38ec-3"})(["display:flex;flex-direction:column;gap:2px;"]),H=l.Ay.div.withConfig({componentId:"sc-863d38ec-4"})(["width:100%;overflow:hidden;position:relative;"]),W=l.Ay.div.withConfig({componentId:"sc-863d38ec-5"})(["display:none;@media ","{display:flex;gap:5px;}"],e=>e.theme.device.laptop),z=l.Ay.div.withConfig({componentId:"sc-863d38ec-6"})(["width:113px;flex-shrink:0;position:relative;height:170px;"," ",""],e=>e.$isOrderCanceled&&(0,l.AH)(["picture img{opacity:0.5;}"]),e=>e.$isCanceled&&(0,l.AH)(["&::after{content:'';position:absolute;height:170px;top:0;left:0;right:0;bottom:0;background-color:",";opacity:0.6;}"],e.theme.color.gray_palette_level_4)),L=l.Ay.img.withConfig({componentId:"sc-863d38ec-7"})(["width:113px;height:auto;object-fit:cover;"]),F=l.Ay.div.withConfig({componentId:"sc-863d38ec-8"})(["position:absolute;
1left:2px;bottom:2px;display:flex;padding:0 2px;justify-content:center;align-items:center;background-color:",";"],e=>e.theme.utils.opacity(e.theme.color.primary_white,60)),U=l.Ay.div.withConfig({componentId:"sc-863d38ec-9"})(["width:113px;height:170px;flex-shrink:0;background-color:",";display:flex;align-items:center;justify-content:center;"],e=>e.theme.color.gray_palette_level_6),q=(0,l.Ay)(m.A).withConfig({componentId:"sc-863d38ec-10"})(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:",";"],e=>e.theme.zIndex.level1),E=l.Ay.div.withConfig({componentId:"sc-863d38ec-11"})(["width:357px;margin-top:24px;"]),N=e=>{let{order:t,hasPaymentButton:i}=e,{formattedDate:a,deliveryDate:o,statusText:d,deliveryMethod:r,hasImages:c,isPaymentWaiting:l,isStatusItemCanceled:s,desktopImages:p,desktopRemainingItemsCount:h}=(0,y.A)(t);return(0,n.jsxs)(B,{$hasPaymentButton:i,"data-testid":"order-card-".concat(t.id),children:[(0,n.jsxs)(O,{children:[(0,n.jsxs)(Q,{children:[(0,n.jsxs)(D,{children:[(0,n.jsxs)(m.A,{variant:"text2","data-testid":"order-number-and-date",children:["№",t.number.toUpperCase()," ",a]}),(r||o)&&(0,n.jsx)(m.A,{color:"typography_level_3",variant:"text3",lowercase:!0,"data-testid":"order-delivery-info",children:r&&o?"".concat(r," • ").concat(o):o||r}),(0,n.jsxs)(m.A,{variant:"text2_bold",lowercase:!0,"data-testid":"order-price",children:[t.calculated_total,"₽"]})]}),d&&(0,n.jsx)(g.A,{text:d,isPaymentWaiting:l,isCanceled:s,testId:"order-status"})]}),(0,n.jsx)(H,{"data-testid":"order-images-".concat(t.id),children:c?(0,n.jsxs)(W,{"data-testid":"order-images-container-".concat(t.id),children:[p.map((e,i)=>(0,n.jsxs)(z,{$isCanceled:e.canceled,$isOrderCanceled:s,"data-testid":"order-item-image-".concat(t.id,"-").concat(i),children:[(0,n.jsx)(x.A,{src:e.picture,alt:"",cdnWidth:320,width:113,height:170,priority:!1}),e.canceled&&(0,n.jsx)(q,{variant:"text3",children:"отменен"}),e.totalQty>1&&(0,n.jsx)(F,{children:(0,n.jsxs)(m.A,{variant:"text3",color:"typography_level_1",children:[e.totalQty," шт"]})})]},"".concat(e.variation_id,"-").concat(e.product_id,"-").concat(e.sku))),h>0&&(0,n.jsx)(U,{"data-testid":"order-remaining-items",children:(0,n.jsxs)(m.A,{variant:"caption_uppercase",color:"typography_level_1",align:"center",children:["+ ",h," шт"]})})]}):(0,n.jsx)(L,{src:"/images/profile/defaultOrder.png",alt:""})})]}),i&&(0,n.jsx)(E,{children:(0,n.jsx)(u.A,{order:t,isOrderList:!0})})]})},S=e=>{let{orders:t,isLoading:i}=e,{isMobile:a}=(0,r.A)(),l=(0,c.J)(e=>e.isMobileApp);return(0,n.jsxs)(s,{children:[(0,n.jsx)(d.A,{isVisible:i,variant:"backdrop"}),(0,n.jsx)(p,{$isMobileApp:l,children:t.map(e=>{var t;let i=(null==(t=e.status)?void 0:t.toLowerCase())||"",d="payment_waiting"===i||"unpaid"===i,r=!(!0===e.payment_processing&&d)&&"payment_waiting"===i&&!!e.payment_data,c=!0===e.repeat_available&&["unpaid","canceled"].includes(i),l=r||c;return(0,n.jsx)(h,{"data-testid":"order-container-".concat(e.id),$hasPaymentButton:l,children:(0,n.jsx)(o(),{href:"/account/orders/".concat(e.id),children:a?(0,n.jsx)(M,{order:e,hasPaymentButton:l}):(0,n.jsx)(N,{order:e,hasPaymentButton:l})})},e.id)})})]})}},50445:(e,t,i)=>{i.d(t,{w:()=>a});var n=i(69153);function a(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&n._P in e?e[n._P](t):e instanceof Date?new e.constructor(t):new Date(t)}},63009:(e,t,i)=>{i.d(t,{a:()=>a});var n=i(50445);function a(e,t){return(0,n.w)(t||e,e)}},69153:(e,t,i)=>{i.d(t,{Cg:()=>o,_P:()=>c,_m:()=>r,my:()=>n,s0:()=>d,w4:()=>a});let n=6048e5,a=864e5,o=6e4,d=36e5,r=1e3,c=Symbol.for("constructDateFrom")},80225:(e,t,i)=>{i.d(t,{A:()=>p});var n=i(7620),a=i(4030),o=i(10301),d=i(65167),r=i(60763);let c=["canceled","deliveryexpired","refunded"];var l=i(40170),s=i(17194);let p=e=>{var t,i,p,h;let x=((null==e?void 0:e.items)||[]).filter(e=>e.picture),m=(0,n.useMemo)(()=>Object.values(x.reduce((e,t)=>{let i=String(t.sku);return e[i]?e[i].totalQty+=t.qty:e[i]=(0,s._)((0,l._)({},t),{totalQty:t.qty}),e},{})),[x]),g=null!=(h=e.meta.shippingMethods[e.shipping_method_external])?h:"",u=(e=>{var t;if(!e)return"";let i=new Date(null==e||null==(t=e.split(" "))?void 0:t[0]);if(!(0,a.f)(i))return"";let n=new Date().getFullYear(),r=i.getFullYear(),c=(0,o.GP)(i,r!==n?"d MMM yyyy":"d MMM",{locale:d.sIU}).replace(".","");return"от ".concat(c)})(e.ordered_at),y=(e=>{if(!e)return"";let t=(0,r.A)(e);if(!t)return"";let{orderCreateDay:i,orderCreateMonth:n,shortWeekday:a}=t;return i&&n&&a?"".concat(i," ").concat(n,", ").concat(a):""})(e.date),f=(null==(t=e.status)?void 0:t.toLowerCase())||"",v="payment_waiting"===f||"unpaid"===f,w=!0===e.payment_processing&&v,_=w?"платеж в обработке":e.status_for_customer||null,A="payment_waiting"===f&&!w,j=c.includes(f)||"unpaid"===f&&!w,b=c.includes(f),C=m.length>0,I=null==(i=m[0])?void 0:i.picture,k=(null==(p=e.items)?void 0:p.length)||0,$=m.length<=4?m:m.slice(0,3),P=m.length>4?m.slice(3).reduce((e,t)=>
1e+t.totalQty,0):0,M=m.length<=6?m:m.slice(0,5),B=m.length>6?m.slice(5).reduce((e,t)=>e+t.totalQty,0):0;return{isPaymentWaiting:A,isStatusItemCanceled:j,formattedDate:u,deliveryDate:y,statusText:_,isCanceled:b,deliveryMethod:g,itemsWithImages:m,hasImages:C,firstImage:I,itemsCount:k,desktopImages:$,desktopRemainingItemsCount:P,mobileImages:M,mobileRemainingItemsCount:B}}}}]);
2//# sourceMappingURL=8904.4e3f442d10eb41c0.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.