"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[19],{95:(e,t,a)=>{a.d(t,{a:()=>p});var s,n=a(2);!function(e){e.INIT="INIT",e.GO_TO_PAGE="GO_TO_PAGE",e.CHANGE_BY_ONE="CHANGE_BY_ONE"}(s||(s={}));const i=(e,{type:t,payload:a})=>{switch(t){case s.INIT:return g(e,a.overallEntriesNumber);case s.GO_TO_PAGE:return o(e,a.activePageNumber);case s.CHANGE_BY_ONE:return c(e,a.page);default:return e}},r=(Object.assign(Object.assign({},{label:"",isEllipsis:!1}),{label:"1"}),{siblingCount:1,visibleEntriesPerPage:10,paginationProgress:"start",pagesCount:0,activePageNumber:1}),g=(e,t)=>{const{visibleEntriesPerPage:a}=e,s=Math.ceil(t/a);return Object.assign(Object.assign({},e),{pagesCount:s})},l=(e,t)=>{const{pagesCount:a,siblingCount:s}=e;return(t-2*s<1?"start":"")||(a-(t+s)<=1?"end":"")},o=(e,t)=>{const a=l(e,t);return"undefined"!=typeof window&&window.scrollTo(0,0),Object.assign(Object.assign({},e),{activePageNumber:t,paginationProgress:a})},c=(e,t)=>{const a="next"===t?e.activePageNumber+1:e.activePageNumber-1,s=l(e,a);return"undefined"!=typeof window&&window.scrollTo({top:0,behavior:"smooth"}),Object.assign(Object.assign({},e),{activePageNumber:a,paginationProgress:s})},p=(e,t,a,g)=>{const[l,o]=(0,n.useState)(!1),[c,p]=(0,n.useReducer)(i,Object.assign(Object.assign({},r),{activePageNumber:e.activePageNumber,siblingCount:e.siblingCount,visibleEntriesPerPage:e.visibleEntriesPerPage})),[u,b]=(0,n.useState)([]),h=c.activePageNumber,d=c.pagesCount;(0,n.useEffect)((()=>{b((e=>{e=[];const t=t=>e.push({text:t.toString(),page:t,isCurrent:t===h});if(h>1&&e.push({text:' \n \n ',page:h-1}),h)if(d<=5)for(let e=1;e<=d;e++)t(e);else{let e=Math.max(1,h-Math.floor(2.5)),a=Math.min(d,e+5-1);for(let e=1;e<=a;e++)t(e)}return h\n \n ',page:h+1}),e.some((({page:e})=>1===e))||e.splice(1,0,{page:1,text:"1"}),e.some((({page:e})=>2===e))||e.splice(2,0,{isSpacer:!0,page:0,text:"⋯"}),e.some((({page:e})=>e===d-1))||e.splice(e.length-1,0,{isSpacer:!0,page:0,text:"⋯"}),e.some((({page:e})=>e===d))||e.splice(e.length-1,0,{page:d,text:d.toString()}),e}))}),[c.activePageNumber,c.pagesCount,t.length]),(0,n.useEffect)((()=>{const e=t.length;p({type:s.INIT,payload:{overallEntriesNumber:e}})}),[t.length,e.siblingCount,e.visibleEntriesPerPage]),(0,n.useEffect)((()=>{o(!0)}),[]),(0,n.useEffect)((()=>{l&&(e=>{const t=new URL(window.location.href);t.searchParams.set("page",`${e}`),window.history.replaceState({},"",t.toString())})(c.activePageNumber)}),[l,c.activePageNumber]);const v=(0,n.useMemo)((()=>{const{visibleEntriesPerPage:e,activePageNumber:a}=c;if(e>=t.length)return t;const s=e*a,n=s-e;return t.slice(n,s)}),[c.activePageNumber,t,a,g]);return{paginationLabels:u,activePageNumber:c.activePageNumber,pagesCount:c.pagesCount,itemsToDisplay:v,handleChangePageByOne:e=>{p({type:s.CHANGE_BY_ONE,payload:{page:e}})},handlePageChange:e=>{p({type:s.GO_TO_PAGE,payload:{activePageNumber:e}})}}}},93:(e,t,a)=>{a.d(t,{a:()=>p});var s=a(0),n=a(194),i=a(94);const{bar:r,barButton:g,barButtonUnderline:l,barEllipsis:o,barDots:c}=i.a,p=({items:e,handlePageChange:t})=>(0,s.jsx)("div",Object.assign({className:r},{children:e.map((({page:e,text:a,isCurrent:i,isSpacer:r})=>(0,s.jsx)("button",{dangerouslySetInnerHTML:{__html:a},onClick:()=>!r&&t(e),className:(0,n.a)(g,!i&&o,"⋯"===a&&c),disabled:i||r})))}))},96:(e,t,a)=>{a.d(t,{a:()=>P});var s=a(0),n=a(1),i=a(2),r=a(194),g=a(97),l=a(28),o=a(7);const{wrapper:c,wrapperActive:p,wrapperHeading:u,wrapperLabel:b,wrapperLabelActive:h,overlay:d,overlayActive:v,wrapperLabels:m,wrapperRight:w}=g.a,P=({activeSortBy:e,sortOptions:t,isSortOpened:a,handleAddSorting:g,right:P=!1,sortLabel:N,handleSortClose:E})=>{const[f,O]=(0,i.useState)(e||"price-ascending"),{width:C}=(0,o.a)(),j=C<700;(0,l.b)(j&&a),(0,i.useEffect)((()=>{O(e)}),[e]);const x=(0,i.useRef)(null);return(0,s.jsxs)(n.Fragment,{children:[(0,s.jsx)("div",{onClick:E,className:(0,r.a)(d,a&&v)}),(0,s.jsxs)("div",Object.assign({className:(0,r.a)(c,a&&p,P&&w)},{children:[(0,s.jsxs)("div",Object.assign({className:u},{children:[(0,s.jsx)("p",{children:N}),(0,s.jsx)("svg",Object.assign({onClick:E,xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},{children:(0,s.jsx)("path",{d:"M0 0.742294L0.742294 0L9 8.25771L17.2577 0L18 0.742294L9.74229 9L18 17.2577L17.2577 18L9 9.74229L0.742294 18L0 17.2577L8.25771 9L0 0.742294Z",fill:"black"})}))]})),(0,s.jsx)("div",Object.assign({ref:x,className:m},{children:t.length>0&&t.map((({key:e,label:t})=>(0,s.jsx)("div",Object.assign({onClick:()=>(e=>{g(e),E()})(e),className:(0,r.a)(b,f===e&&h)},{children:(0,s.jsx)("p",{children:t})}))))}))]}))]})}}}]);