PageSourceSearch

https://vulpes-moto.netlify.app/static/js/204.bac4ad62.chunk.js

js vulpes-moto.netlify.app collected 2026-10-03 11:35:45 UTC 25,308 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkvulpes_storage=self.webpackChunkvulpes_storage||[]).push([[204],{381:function(e,t,n){n.d(t,{N:function(){return c}});var i=n(3439),r=n(7948),a=n.n(r),s="PopUp_modalCloseButton__dgT-x",o="PopUp_menuIcon__6pYtP",l=n(184),c=function(e){var t=e.isOpen,n=e.close,r=e.body;return(0,l.jsxs)(a(),{isOpen:t,onRequestClose:n,style:{overlay:{backgroundColor:"rgba(9, 9, 9, 0.75)",position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",justifyContent:"center",alignItems:"center",zIndex:2},content:{position:"relative",top:"auto",left:"auto",right:"auto",bottom:"auto",minWidth:"300px",maxWidth:"90%",width:"auto",maxHeight:"80%",padding:"50px 20px",borderRadius:"12px",border:"2px solid black",backgroundColor:"FFF",transition:"top 0.3s ease-in-out"}},ariaHideApp:!1,bodyOpenClassName:"modal-open",children:[(0,l.jsx)("button",{className:s,type:"button",onClick:n,children:(0,l.jsx)("svg",{className:o,children:(0,l.jsx)("use",{href:"".concat(i.Z,"#icon-close-circle")})})}),r]})}},2204:function(e,t,n){n.r(t),n.d(t,{default:function(){return I}});var i=n(3050),r=n(3433),a=n(1413),s=n(5861),o=n(9439),l=n(4687),c=n.n(l),u={searchArea:"ProductsList_searchArea__yIf-b",searchInput:"ProductsList_searchInput__G-lB3",limitInput:"ProductsList_limitInput__YS6Mc",productList:"ProductsList_productList__JY1yP",productCard:"ProductsList_productCard__NM8Na",productImg:"ProductsList_productImg__bBD4l",pagination:"ProductsList_pagination__nTuLm",currentPage:"ProductsList_currentPage__s+rr4",prevButton:"ProductsList_prevButton__MzWk7",nextButton:"ProductsList_nextButton__9axXX",btn:"ProductsList_btn__jSS8D",filterBlock:"ProductsList_filterBlock__pr8rX",filterRow:"ProductsList_filterRow__+Lxil",sortInput:"ProductsList_sortInput__hK1zL",modelFilter:"ProductsList_modelFilter__kgrAD",modelItem:"ProductsList_modelItem__B4ZEe",modelLabel:"ProductsList_modelLabel__8HFDJ",open:"ProductsList_open__Rj+Xh",filterLabel:"ProductsList_filterLabel__eKmIU",filterCheck:"ProductsList_filterCheck__7Ep3L",checked:"ProductsList_checked__XjjYu",activeProductWrapper:"ProductsList_activeProductWrapper__n3oi1",prevProductBtn:"ProductsList_prevProductBtn__EnKn2",nextProductBtn:"ProductsList_nextProductBtn__ey1aF",listItem:"ProductsList_listItem__Z7ZrS"},d=n(5294),p=n(9654),v=n(4217),h=n(5612),m=n(4420),x=n(6070),g=n(9230),f=n(2791),_=n(8865),j=n(5618),b=n(381),k=n(478),P=n(4942),y={container:"ActiveProductDetails_container__Rw9Mf",article:"ActiveProductDetails_article__U+ekR",imageWrapper:"ActiveProductDetails_imageWrapper__V611Z",image:"ActiveProductDetails_image__hI-lf",imgBtn:"ActiveProductDetails_imgBtn__yUv4J",leftBtn:"ActiveProductDetails_leftBtn__TPKbP",rightBtn:"ActiveProductDetails_rightBtn__z-7LV",paramsBlock:"ActiveProductDetails_paramsBlock__lm15h",descriptionEditor:"ActiveProductDetails_descriptionEditor__QIl78",price:"ActiveProductDetails_price__s69-W",description:"ActiveProductDetails_description__F0LQ-",translateBtn:"ActiveProductDetails_translateBtn__HHUzo",buttons:"ActiveProductDetails_buttons__XaQsH",btn:"ActiveProductDetails_btn__ocaX1",hidden:"ActiveProductDetails_hidden__Gakwy",save:"ActiveProductDetails_save__P8Kul",horoshopWrapper:"ActiveProductDetails_horoshopWrapper__BsxXw",progress:"ActiveProductDetails_progress__FFIfU",progressLine:"ActiveProductDetails_progressLine__j2Tre",progressPoint:"ActiveProductDetails_progressPoint__huLCz",progressMiddlePoint:"ActiveProductDetails_progressMiddlePoint__+1Cw6",progressRightPoint:"ActiveProductDetails_progressRightPoint__5kicZ",green:"ActiveProductDetails_green__EXqpD",infoBlock:"ActiveProductDetails_infoBlock__ut+Dp"},Z=n(4845),N=n(184),C=(0,Z.Z)((0,N.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),U=(0,Z.Z)((0,N.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft"),L=n(5926),w=(0,Z.Z)((0,N.jsx)("path",{d:"M21 4H11l-1-3H3c-1.1 0-2 .9-2 2v15c0 1.1.9 2 2 2h8l1 3h9c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2M7 16c-2.76 0-5-2.24-5-5s2.24-5 5-5c1.35 0 2.48.5 3.35 1.3L9.03 8.57c-.38-.36-1.04-.78-2.03-.78-1.74 0-3.15 1.44-3.15 3.21S5.26 14.21 7 14.21c2.01 0 2.84-1.44 2.92-2.41H7v-1.71h4.68c.07.31.12.61.12 1.02C11.8 13.97 9.89 16 7 16m6.17-5.42h3.7c-.43 1.25-1.11 2.43-2.05 3.47-.31-.35-.6-.72-.86-1.1zm8.33 9.92c0 .55-.45 1-1 1H14l2-2.5-1.04-3.1 3.1 3.1.92-.92-3.3-3.25.02-.02c1.13-1.25 1.93-2.69 2.4-4.22H20v-1.3h-4.53V8h-1.29v1.29h-1.44L11.46 5.5h9.04c.55 0 1 .45 1 1z"}),"GTranslate"),A=n(4723),B=n(5218),R=function(e){var t,n,i,r=e.editMode,s=e.setE
1ditMode,l=e.setDetailsModal,c=e.user,u=e.streaming,d=e.setStreaming,_=e.setNext,b=(0,m.I0)(),k=(0,m.v9)(p.KY),Z=(0,m.v9)(p._7),R=(0,m.v9)(v.Qb),S=(0,g.$G)(),I=S.t,D=S.i18n.language,M="ru"===D?null===(t=k.description)||void 0===t?void 0:t.RU:"uk"===D?null===(n=k.description)||void 0===n?void 0:n.UA:null===(i=k.description)||void 0===i?void 0:i.DE,E=!1;"owner"!==c&&"administrator"!==c&&"manager"!==c||(E=!0);var z,O,H,W,K,F,T,X,q,Q,V,Y=(0,f.useState)(0),G=(0,o.Z)(Y,2),J=G[0],$=G[1],ee=(0,f.useState)({}),te=(0,o.Z)(ee,2),ne=te[0],ie=te[1],re=function(){Object.keys(ne).length>0?(b((0,h.nM)((0,a.Z)((0,a.Z)({},ne),{},{_id:k._id}))),s(!1),u&&(l(!1),_(!0))):B.ZP.error("\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0445\u043e\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432 \u0442\u043e\u0432\u0430\u0440\u0435.")};return(0,f.useEffect)((function(){var e=function(e){"Enter"===e.key&&r&&re()};return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}})),k._id?(0,N.jsxs)("div",{className:y.container,children:[(0,N.jsx)("p",{className:y.article,children:k.article}),(0,N.jsxs)("div",{className:y.infoBlock,children:[(0,N.jsxs)("div",{className:y.imageWrapper,children:[(null===k||void 0===k||null===(z=k.images)||void 0===z?void 0:z.length)>1&&(0,N.jsx)("div",{className:"".concat(y.imgBtn," ").concat(y.leftBtn),onClick:function(){var e;$(0===J?(null===k||void 0===k||null===(e=k.images)||void 0===e?void 0:e.length)-1:J-1)},children:(0,N.jsx)(U,{fontSize:"large",color:"#000"})}),(0,N.jsx)("img",{src:null!==k&&void 0!==k&&k.images?null===k||void 0===k?void 0:k.images[J]:x,alt:k.name.UA,className:y.image,onError:function(e){e.currentTarget.src=x}}),(null===k||void 0===k||null===(O=k.images)||void 0===O?void 0:O.length)>1&&(0,N.jsx)("div",{className:"".concat(y.imgBtn," ").concat(y.rightBtn),onClick:function(){var e;J===(null===k||void 0===k||null===(e=k.images)||void 0===e?void 0:e.length)-1?$(0):$(J+1)},children:(0,N.jsx)(C,{fontSize:"large",color:"#000"})})]}),r?(0,N.jsxs)("div",{className:y.paramsBlock,children:[(0,N.jsxs)("label",{children:["RU",(0,N.jsx)("textarea",{className:"".concat((!k.description.RU||""===k.description.RU)&&y.green),onChange:function(e){e.target.style.height="auto",e.target.style.height=e.target.scrollHeight+"px",b((0,A.sz)({path:["name","RU"],value:e.target.value})),ie((function(t){return(0,a.Z)((0,a.Z)({},t),{},{"name.RU":e.target.value})}))},value:null!==(T=k.name)&&void 0!==T&&T.RU&&""!==k.name.RU?k.name.RU:k.name.translatedRU}),""===k.name.RU&&!Z&&(0,N.jsx)("button",{className:y.translateBtn,onClick:function(){return b((0,h.R6)({_id:k._id,article:k.article,name:k.name,description:k.description}))},children:(0,N.jsx)(w,{})})]}),(0,N.jsxs)("label",{children:["UA",(0,N.jsx)("textarea",{className:"".concat((!k.description.UA||""===k.description.UA)&&y.green),onChange:function(e){e.target.style.height="auto",e.target.style.height=e.target.scrollHeight+"px",b((0,A.sz)({path:["name","UA"],value:e.target.value})),ie((function(t){return(0,a.Z)((0,a.Z)({},t),{},{"name.UA":e.target.value})}))},value:null!==(X=k.name)&&void 0!==X&&X.UA&&""!==k.name.UA?k.name.UA:k.name.translatedUA})]}),(0,N.jsxs)("div",{className:y.paramsWrapper,children:[(0,N.jsxs)("label",{children:["Color",(0,N.jsx)("textarea",{onChange:function(e){e.target.style.height="auto",e.target.style.height=e.target.scrollHeight+"px",b((0,A.sz)({path:["color"],value:e.target.value})),ie((function(t){return(0,a.Z)((0,a.Z)({},t),{},{color:e.target.value})}))},value:(null===k||void 0===k?void 0:k.color)||"",rows:1})]}),(0,N.jsx)(j.ZP,{name:"destination",options:[{value:"\u0434\u043b\u044f \u043c\u043e\u0442\u043e\u0446\u0438\u043a\u043b\u0430",label:"\u0434\u043b\u044f \u043c\u043e\u0442\u043e\u0446\u0438\u043a\u043b\u0430"},{value:"\u0434\u043b\u044f \u043a\u0432\u0430\u0434\u0440\u043e\u0446\u0438\u043a\u043b\u0430",label:"\u0434\u043b\u044f \u043a\u0432\u0430\u0434\u0440\u043e\u0446\u0438\u043a\u043b\u0430"}],placeholder:k.params.destination,value:k.params.destination,onChange:function(e){b((0,A.sz)({path:["params","destination"],value:e.value})),ie((function(t){return(0,a.Z)((0,a.Z)({},t),{},{"params.destination":e.value})}))}}),(0,N.jsxs)("label",{children:[I("keywords")," RU:",(0,N.jsx)("textarea",{onChange:function(e){e.target.style.height="auto",e.target.style.height=e.target.scrollHeight+"px",b((0,A.sz)({path:["metaKeywords","RU"],value:e.target.value})),ie((function(t){return(0,a.Z)((0,a.Z)({},t),{},{"metaKeywords.RU":e.target.value})}))},value:k.metaKeywords.RU})]}),(0,N.jsxs)("label",{children:[I("keywords")," UA:",(0,N.jsx)("textarea",{onChange:function(e){e.target.style.height="auto",e.target.style.height=e.target.scrollHeight+"px",b((0,A.sz)({path:["metaKeywords","UA"],value:e.target.value})),ie((function(t){return(0,a.Z)((0,a.Z)({},t),{},{"metaKeywords.UA":e.target.value})}))},value:k.metaKeywords.UA})]}),(null===k||void 0===k?void 0:k.marketplaces)&&Object.entries(k.marketplaces).map((function(e){return(0,N.jsxs)("div",{className:y.horoshopWra
1pper,onClick:function(){return function(e){var t=!(null!==k&&void 0!==k&&k.marketplaces[e]);b((0,A.sz)({path:["marketplaces",e],value:t})),ie((function(n){return(0,a.Z)((0,a.Z)({},n),{},(0,P.Z)({},"marketplaces.".concat(e),t))}))}(e[0])},children:[e[0].toUpperCase(),(0,N.jsx)("div",{className:y.progress,children:(0,N.jsx)("div",{className:y.progressLine,children:(0,N.jsx)("div",{className:"".concat(y.progressPoint," ").concat(e[1]&&y.progressRightPoint)})})})]},e[0])}))]})]}):(0,N.jsxs)("div",{className:y.paramsBlock,children:[(0,N.jsx)("p",{children:"ru"===D?(null===(H=k.name)||void 0===H?void 0:H.RU)||"no_name":"uk"===D?(null===(W=k.name)||void 0===W?void 0:W.UA)||"no_name":(null===(K=k.name)||void 0===K?void 0:K.DE)||"no_name"}),(0,N.jsxs)("p",{className:y.price,children:[k.price.UAH||"-","\u0433\u0440\u043d."]}),R&&(0,N.jsxs)("div",{className:y.paramsWrapper,children:[(0,N.jsxs)("p",{children:[I("quantity in stock"),": ",k.quantityInStock]}),(0,N.jsxs)("p",{children:[I("params"),":"]}),(null===k||void 0===k?void 0:k.color)&&(0,N.jsxs)("p",{children:[I("color"),": ",null===k||void 0===k?void 0:k.color]}),(0,N.jsxs)("p",{children:[I("price in Motea"),": ",null===k||void 0===k||null===(F=k.moteaPrice)||void 0===F?void 0:F.UAH,"\u0433\u0440\u043d"," ",null!==k&&void 0!==k&&k.availabilityInMotea?"("+(null===k||void 0===k?void 0:k.availabilityInMotea)+")":"("+I("unknown")+")"]}),(0,N.jsxs)("p",{children:[I("vendor price"),": ",Math.round(null===k||void 0===k?void 0:k.vendorprice),"\u0433\u0440\u043d"]}),(0,N.jsxs)("p",{children:[I("keywords"),":"," ","ru"===D?k.metaKeywords.RU:k.metaKeywords.UA]}),(0,N.jsxs)("p",{children:[I("dimensions"),":"]}),(0,N.jsxs)("p",{children:[k.dimensions.width," x ",k.dimensions.height," x"," ",k.dimensions.length]}),(0,N.jsxs)("p",{children:[k.dimensions.weight,"kg"]}),(0,N.jsxs)("p",{children:[I("set"),":"]}),k.isSet&&null!==k.isSet[0]?(0,N.jsx)("ul",{children:k.isSet.map((function(e,t){return(0,N.jsx)("li",{children:(0,N.jsxs)("p",{children:[e.sku,": ",e.count,"\u0448\u0442."]})},e+t)}))}):(0,N.jsx)("p",{children:I("not set")}),(null===k||void 0===k?void 0:k.bikeList)&&null!==k.bikeList[0]&&(0,N.jsxs)("ul",{children:[(0,N.jsxs)("li",{children:[I("bike list"),":"]},"1"),k.bikeList.map((function(e,t){return(0,N.jsx)("li",{children:(0,N.jsxs)("p",{children:[null===e||void 0===e?void 0:e.make," ",null===e||void 0===e?void 0:e.model," ",null===e||void 0===e?void 0:e.year]})},e+t)}))]})]})]})]}),r?(0,N.jsxs)("div",{className:y.descriptionEditor,children:[(0,N.jsxs)("label",{children:[I("description")," RU:",(0,N.jsx)("textarea",{className:"".concat((!k.description.RU||""===k.description.RU)&&y.green),onChange:function(e){e.target.style.height="auto",e.target.style.height=e.target.scrollHeight+"px",b((0,A.sz)({path:["description","RU"],value:e.target.value})),ie((function(t){return(0,a.Z)((0,a.Z)({},t),{},{"description.RU":e.target.value})}))},rows:8,value:null!==(q=k.description)&&void 0!==q&&q.RU&&""!==k.description.RU?k.description.RU:k.description.translatedRU}),(!(null!==k&&void 0!==k&&null!==(Q=k.description)&&void 0!==Q&&Q.RU)||""===k.description.RU)&&!Z&&(0,N.jsx)("button",{className:y.translateBtn,onClick:function(){return b((0,h.R6)({_id:k._id,article:k.article,name:k.name,description:k.description}))},children:(0,N.jsx)(w,{})})]}),(0,N.jsxs)("label",{children:[I("description")," UA:",(0,N.jsx)("textarea",{onChange:function(e){e.target.style.height="auto",e.target.style.height=e.target.scrollHeight+"px",b((0,A.sz)({path:["description","UA"],value:e.target.value})),ie((function(t){return(0,a.Z)((0,a.Z)({},t),{},{"description.UA":e.target.value})}))},rows:8,value:k.description.UA}),(!(null!==k&&void 0!==k&&null!==(V=k.description)&&void 0!==V&&V.UA)||""===k.description.UA)&&!Z&&(0,N.jsx)("button",{className:y.translateBtn,onClick:function(){return b((0,h.R6)({_id:k._id,article:k.article,name:k.name,description:k.description}))},children:(0,N.jsx)(w,{})})]})]}):(0,N.jsxs)("div",{children:[(0,N.jsxs)("p",{className:y.description,children:[I("description"),":"]}),(0,N.jsx)("div",{className:y.descriptionBody,dangerouslySetInnerHTML:{__html:M||"no_description"}})]}),R&&E&&(0,N.jsxs)("div",{className:y.buttons,children:[(0,N.jsx)("button",{className:"".concat(y.btn," ").concat(r&&y.hidden),onClick:function(){return s((function(e){return!e}))},children:(0,N.jsx)(L.Z,{})}),(0,N.jsx)("button",{className:"".concat(y.btn," ").concat(y.save," ").concat(!r&&y.hidden),onClick:function(){return re()},children:I("save")}),(0,N.jsx)("button",{className:"".concat(y.btn," ").concat(!r&&y.hidden),onClick:function(){s((function(e){return!e})),d(!1)},children:I("cancel")})]})]}):(0,N.jsx)(N.Fragment,{})},S=function(){var e,t=null===(e=(0,m.v9)(p.qr))||void 0===e?void 0:e.products,n=(0,m.v9)(v.dy),i=(0,f.useRef)(null),l=(0,m.v9)((function(e){return e.products.items.pagination})),P=(null===l||void 0===l?void 0:l.currentPage)||1,y=(null===l||void 0===l?void 0:l.totalPages)||1,Z=(0,m.I0)(),C=(0,g.$G)().t,U=(0,f.useState)(0),L=(0,o.Z)(U,2),w=L[0],A=L[1],S=(0,f.useState)(!1),I=(0,o.Z)(S,2),D=I[0],M=I[1],E=(0,f.useState)(!1),z=(0,o.Z)(E,2),O=z[0],H=z[1],W=(0,f.useState)(!1),K=(0,o.Z)(W,2),F=K[0],T=K[1],X=(0,f.useState)({search:"",page:1,limit:20,inStock:!1,sort:"null"}),q=(0,o.Z)(X,2),Q=q[0],V=q[1],Y=(0,f.useState)(!1),G=(0,o.Z)(Y,2),J=G[0],$=G[1],ee=(0,f.useState)(!1),te=(0,o.Z)(ee,2),ne=te[0],ie=te[1],re=(0,f.useState)(!1),ae=(0,o.Z)(re,2),se=ae[0],oe=ae[1],le=(0,f.useState)([{value:"",label:"Brand"}]),ce=(0,o.Z)(le,2),ue=ce[0],de=ce[1],pe=(0,f.useState)([]),ve=(0,o.Z)(pe,2),he=ve[0],me=ve[1],xe=(0,f.useState)([{value:"",label:"Model"}]),ge=(0,o.Z)(xe,2),fe=ge[0],_e=ge[1],je=(0,f.useState)([{value:"",label:"Year"}]),be=(0,o.Z)(je,2),ke=be[0],Pe=be[1],ye=[{value:"null",label:C("default")},{value:"availability",label:C("availability")}
1],Ze=!1;function Ne(e){return new Promise((function(t){return setTimeout(t,e)}))}"owner"!==n.role&&"administrator"!==n.role&&"manager"!==n.role||(Ze=!0);var Ce=function(){A((function(e){return e-1})),oe(!0)},Ue=function(){A((function(e){return e+1})),oe(!0)};(0,f.useEffect)((function(){function e(){return(e=(0,s.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==Q.search){e.next=5;break}return e.next=3,Z((0,h.aP)((0,a.Z)({filter:{inStock:Q.inStock}},Q)));case 3:e.next=7;break;case 5:return e.next=7,Z((0,h.dC)((0,a.Z)({value:Q.search,filter:{inStock:Q.inStock}},Q)));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function t(){return(t=(0,s.Z)(c().mark((function e(){var t,n,i;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==he.length){e.next=15;break}if(Q.brand&&""!==Q.brand){e.next=8;break}return e.next=4,d.Z.get("/products/bikes");case 4:(null===(t=e.sent)||void 0===t?void 0:t.data.length)>0&&de((0,r.Z)(null===t||void 0===t?void 0:t.data.map((function(e){return{value:e,label:e.toUpperCase()}})))),e.next=13;break;case 8:if(!Q.brand||""===Q.brand){e.next=13;break}return e.next=11,d.Z.get("/products/bikes?brand=".concat(Q.brand));case 11:(null===(n=e.sent)||void 0===n?void 0:n.data.length)>0&&(me(null===n||void 0===n?void 0:n.data),_e((0,r.Z)(null===n||void 0===n?void 0:n.data.map((function(e){return{value:e.name,label:e.name.toUpperCase()}})))));case 13:e.next=16;break;case 15:null!==Q&&void 0!==Q&&Q.model&&""!==Q.model&&(i=he.find((function(e){return e.name===Q.model})),Pe((0,r.Z)(i.years.map((function(e){return{value:e,label:e}})))));case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}M(!0),function(){e.apply(this,arguments)}(),function(){t.apply(this,arguments)}(),M(!1)}),[Q,he,Z]),(0,f.useEffect)((function(){function e(){return(e=(0,s.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ne(100);case 2:if(!((null===t||void 0===t?void 0:t.length)>=w+1)){e.next=11;break}return Z((0,h.Qb)(t[w])),e.next=6,Ne(100);case 6:$(!0),H(!0),oe(!1),e.next=16;break;case 11:A(0),$(!1),H(!1),oe(!1),B.ZP.success(C("open the next page"));case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}ne&&se&&function(){e.apply(this,arguments)}()}),[ne,t,Z,se,w,C]),(0,f.useEffect)((function(){var e=function(e){"ArrowLeft"===e.key&&Ce(),"ArrowRight"===e.key&&Ue()};return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[w]);var Le=function(e){var t;V((function(t){return(0,a.Z)((0,a.Z)({},t),{},{page:e})})),null===(t=i.current)||void 0===t||t.scrollIntoView({behavior:"smooth",block:"start"})};return(0,N.jsxs)("div",{className:u.container,children:[(0,N.jsxs)("div",{className:u.wrapper,children:[(0,N.jsxs)("div",{className:u.searchArea,ref:i,children:[(0,N.jsx)("input",{placeholder:"".concat(C("search"),"..."),value:Q.search,onChange:function(e){return t=e.target.value,void V((function(e){return(0,a.Z)((0,a.Z)({},e),{},{search:t,page:1})}));var t},className:u.searchInput}),D&&(0,N.jsx)(_.Z,{color:"#c04545",size:"30px",cssOverride:{marginLeft:"auto"}}),(0,N.jsx)("button",{className:u.btn,onClick:function(){T(!F)},children:C("filter")}),(0,N.jsx)(j.ZP,{name:"limit",options:[{value:20,label:"20"},{value:80,label:"80"},{value:160,label:"160"}],placeholder:Q.limit,value:Q.limit,onChange:function(e){return V((function(t){return(0,a.Z)((0,a.Z)({},t),{},{limit:e.value})}))},className:u.limitInput})]}),(0,N.jsxs)("div",{className:"".concat(u.filterBlock," ").concat(F?u.open:""),children:[(0,N.jsxs)("div",{className:u.filterRow,children:[(0,N.jsxs)("label",{className:u.filterLabel,onClick:function(){V((function(e){return(0,a.Z)((0,a.Z)({},e),{},{inStock:!e.inStock,page:1})}))},children:[C("in stock"),(0,N.jsx)(k.Z,{className:"".concat(u.filterCheck," ").concat(Q.inStock&&u.checked)})]}),Ze&&(0,N.jsxs)("label",{className:u.filterLabel,onClick:function(){A(0),ie((function(e){return!e})),oe(!0)},children:[C("streaming editing"),(0,N.jsx)(k.Z,{className:"".concat(u.filterCheck," ").concat(ne&&u.checked)})]}),(0,N.jsx)(j.ZP,{name:"sort",options:ye,onChange:function(e){return V((function(t){return(0,a.Z)((0,a.Z)({},t),{},{sort:e.value})}))},className:u.sortInput})]}),(0,N.jsxs)("div",{className:u.modelFilter,children:[(0,N.jsxs)("div",{className:u.modelItem,children:[(0,N.jsx)("span",{className:u.modelLabel,children:C("make")}),(0,N.jsx)(j.ZP,{name:"brand",options:ue,onChange:function(e){me([]),V((function(t){return(0,a.Z)((0,a.Z)({},t),{},{brand:e.value,model:null,year:null})}))}})]}),(0,N.jsxs)("div",{className:u.modelItem,children:[(0,N.jsx)("span",{className:u.modelLabel,children:C("model")}),(0,N.jsx)(j.ZP,{name:"model",options:fe,onChange:function(e){return V((function(t){return(0,a.Z)((0,a.Z)({},t),{},{model:e.value})}))},isDisabled:""===fe[0].value})]}),(0,N.jsxs)("div",{className:u.modelItem,children:[(0,N.jsx)("span",{className:u.modelLabel,children:C("year")}),(0,N.jsx)(j.ZP,{name:"year",options:ke,onChange:function(e){return V((function(t){return(0,a.Z)((0,a.Z)({},t),{},{year:e.value})}))},isDisabled:""===ke[0].value})]})]})]}),(0,N.jsx)("ul",{className:u.productList,children:t&&t.map((function(e,t){var i,r;return(0,N.jsx)("li",{className:u.listItem,onClick:function(){A(t),Z((0,h.Qb)(e)),H(!0)},children:(0,N.jsxs)("div",{className:u.productCard,children:[(0,N.jsx)("img",{className:u.productImg,src:(null===(i=e.images)||void 0===i?void 0:i[0])||x,onError:function(e){e.currentTarget.src=x}
1,alt:(null===(r=e.name)||void 0===r?void 0:r.UA)||"\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435"}),(0,N.jsxs)("p",{children:["(".concat(null===e||void 0===e?void 0:e.article,") "),""!==e.name.UA&&null!==e.name.UA?e.name.UA:e.name.DE]}),("owner"===n.role||"administrator"===n.role||"manager"===n.role)&&(0,N.jsxs)("div",{children:[(0,N.jsxs)("p",{children:[C("quantity in stock"),": ",e.quantityInStock]}),(0,N.jsxs)("p",{children:[C("availability in motea"),": ",C(e.availabilityInMotea)||C("unknown")]})]})]})},"".concat(e.article,"-").concat(t))}))}),(0,N.jsxs)("div",{className:u.pagination,children:[P-3>0&&(0,N.jsx)("button",{className:u.prevButton,onClick:function(){return Le(1)},children:C("first page")}),P-2>0&&(0,N.jsx)("button",{className:u.prevButton,onClick:function(){return Le(P-2)},children:P-2}),P-1>0&&(0,N.jsx)("button",{className:u.prevButton,onClick:function(){return Le(P-1)},children:P-1}),(0,N.jsx)("button",{className:u.currentPage,children:P}),P<y&&(0,N.jsx)("button",{className:u.nextButton,onClick:function(){return Le(P+1)},children:P+1}),P+1<y&&(0,N.jsx)("button",{className:u.nextButton,onClick:function(){return Le(P+2)},children:P+2}),P<y&&(0,N.jsx)("button",{className:u.nextButton,onClick:function(){return Le(y)},children:C("last page")})]})]}),(0,N.jsx)(b.N,{isOpen:O,close:function(){H(!1),$(!1),Z((0,h.Qb)({}))},body:(0,N.jsxs)("div",{className:u.activeProductWrapper,children:[(0,N.jsx)(R,{editMode:J,setEditMode:$,setDetailsModal:H,user:null===n||void 0===n?void 0:n.role,streaming:ne,setStreaming:ie,setNext:oe}),ne&&(0,N.jsx)("button",{className:u.prevProductBtn,onClick:Ce,children:"<"}),ne&&(0,N.jsx)("button",{className:u.nextProductBtn,onClick:Ue,children:">"})]})})]})};function I(){var e=(0,m.I0)();return(0,f.useEffect)((function(){e((0,h.aP)({page:1,limit:20}))}),[e]),(0,N.jsx)(i.B6,{children:(0,N.jsxs)("div",{children:[(0,N.jsx)(i.ql,{children:(0,N.jsx)("title",{children:"Products"})}),(0,N.jsx)("div",{children:(0,N.jsx)(S,{})})]})})}},8865:function(e,t,n){var i=n(2791),r=n(5617),a=n(6707),s=function(){return s=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},s.apply(this,arguments)},o=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n},l=(0,a.i)("ClockLoader","100% { transform: rotate(360deg) }","rotate");t.Z=function(e){var t=e.loading,n=void 0===t||t,a=e.color,c=void 0===a?"#000000":a,u=e.speedMultiplier,d=void 0===u?1:u,p=e.cssOverride,v=void 0===p?{}:p,h=e.size,m=void 0===h?50:h,x=o(e,["loading","color","speedMultiplier","cssOverride","size"]),g=(0,r.h)(m),f=g.value,_=g.unit,j=s({display:"inherit",position:"relative",width:"".concat(f).concat(_),height:"".concat(f).concat(_),backgroundColor:"transparent",boxShadow:"inset 0px 0px 0px 2px ".concat(c),borderRadius:"50%"},v),b={position:"absolute",backgroundColor:c,width:"".concat(f/3,"px"),height:"2px",top:"".concat(f/2-1,"px"),left:"".concat(f/2-1,"px"),transformOrigin:"1px 1px",animation:"".concat(l," ").concat(8/d,"s linear infinite")},k={position:"absolute",backgroundColor:c,width:"".concat(f/2.4,"px"),height:"2px",top:"".concat(f/2-1,"px"),left:"".concat(f/2-1,"px"),transformOrigin:"1px 1px",animation:"".concat(l," ").concat(2/d,"s linear infinite")};return n?i.createElement("span",s({style:j},x),i.createElement("span",{style:k}),i.createElement("span",{style:b})):null}},478:function(e,t,n){var i=n(4845),r=n(184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"CheckCircleOutline")},5926:function(e,t,n){var i=n(4845),r=n(184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit")}}]);
2//# sourceMappingURL=204.bac4ad62.chunk.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.