"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[54],{190:(r,e,a)=>{var s=a(0),i=a(1),c=a(194),t=a(2),n=a(8);function l(r){return e=>{e.on("animationStarted",(()=>{const a=e.track.details.minIdx,s=e.track.details.maxIdx,i=e.animator.targetIdx||0;r({min:a,max:s,current:i})}))}}const o={priceColor:"#000000",grayscaleColor:"#000000",regularPriceColor:"#000000",redPriceColor:"#B70111"},{wrapper:d,wrapperBiggerFont:p,wrapperTitle:u,wrapperCrossedPrice:m,wrapperImageContainer:g,wrapperPricesContainer:x,wrapperPricesContainerActualPrice:h,wrapperPricesContainerComparePrice:b,wrapperPricesContainerActualPriceFrom:j}={wrapper:"XVE4a_x6",wrapperBiggerFont:"UZD5BLPz",wrapperTitle:"KnBlmDgn",wrapperPricesContainer:"porhBVvV",wrapperPricesContainerActualPrice:"X_cnGBX7",wrapperPricesContainerComparePrice:"kJ1Jk066",wrapperPricesContainerActualPriceFrom:"opxcR35r",wrapperCrossedPrice:"q9v2TRya",wrapperImageContainer:"zsq43s5w"},w=({product:{productTitle:r,productLink:e,reviewsRating:a,featuredImage:i,variants:n},currencySymbol:l="$"})=>{const{maxComparePrice:w,maxVariantPrice:v}=(r=>{var e,a;let s=0,i=0;const c=r.sort(((r,e)=>Number(r.price)-Number(e.price))),t=r.sort(((r,e)=>(r.crossedPrice?Number(r.crossedPrice):Number(r.price))-(e.crossedPrice?Number(e.crossedPrice):Number(e.price))));return c.length>0&&(s=Number(null===(e=c[0])||void 0===e?void 0:e.price)),t.length>0&&(i=Number(null===(a=t[0])||void 0===a?void 0:a.crossedPrice)),{maxVariantPrice:s,maxComparePrice:i}})(n),P=(r=>(0,t.useMemo)((()=>{if(!r||0===r.length)return!1;const e=r[0],a=null==e?void 0:e.price;let s=!1,i=!1,c=!1;for(const{price:e,crossedPrice:t}of r)if(void 0!==a&&e!==a&&(s=!0),e{var e,a;const s=r.map((r=>({variantId:r.variantId,colorUrl:r.colorUrl,colorValue:r.colorValue,colorSwatch:r.colorSwatch,isValidUrl:r.isValidUrl}))),[i,c]=(0,t.useState)(s[0]?null===(e=s[0])||void 0===e?void 0:e.colorValue:""),[n,l]=(0,t.useState)(s[0]?null===(a=s[0])||void 0===a?void 0:a.variantId:"");return{colors:[...new Map(s.map((r=>[r.colorValue,r]))).values()],currentColor:i,currentVariantId:n,setCurrentVariantId:l,setCurrentColor:c}})(n),[f,N]=(0,t.useState)(i);(0,t.useEffect)((()=>{N((()=>{const r=n.find((r=>r.variantId===C));return r?r.image:i}))}),[C]);const O=w!==v,y=Object.assign({},o),k=`${e}?variant=${C}`;return(0,s.jsxs)("div",Object.assign({className:d},{children:[(0,s.jsx)("a",Object.assign({href:k},{children:(0,s.jsx)("div",Object.assign({className:g},{children:(0,s.jsx)("img",{width:13,height:18,src:f.src,alt:f.alt})}))})),(0,s.jsx)("div",{children:(0,s.jsxs)("div",{children:[(0,s.jsx)("p",Object.assign({className:u},{children:r})),P&&(0,s.jsx)("div",Object.assign({className:x},{children:(0,s.jsx)("p",Object.assign({className:j},{children:`From ${l}${v}`}))})),!P&&(0,s.jsxs)("div",Object.assign({className:x},{children:[O&&(0,s.jsx)("p",Object.assign({className:(0,c.a)(b,m),style:{color:y.regularPriceColor}},{children:`${l}${w}`})),(0,s.jsx)("p",Object.assign({className:(0,c.a)(h,!O&&p),style:{color:O?y.redPriceColor:y.grayscaleColor}},{children:` ${l}${v}`}))]}))]})})]}))};var v=a(4);const P={initial:0,mode:"free",slides:{perView:2.5},breakpoints:{"(min-width: 794px)":{slides:{perView:3.5}},"(min-width: 990px)":{slides:{perView:5}}},loop:!1},{wrapper:C,wrapperTitle:f,arrowLeft:N,arrowRight:O,disable:y}={wrapper:"Cdjy91o4",wrapperTitle:"Uewe5ukr",arrowLeft:"DWwxLDym",arrowRight:"lnpvxOJp",disable:"hmcTl94H"},k=({title:r,slides:e,currencySymbol:a})=>{const{carouselRef:i,isJsDisabled:o,handleSlideNext:d,handleSlidePrev:p,slideIdx:{current:u,min:m,max:g}}=function(r){const[e,a]=(0,t.useState)(!0),[s,i]=(0,t.useState)({min:0,max:1,current:0}),[c,o]=(0,n.a)(r,[l(i)]);var d,p;(0,t.useEffect)((d=o,p=r,()=>(d.current&&d.current.update(Object.assign({},p)),()=>{d.current&&d.current.destroy()})),[o.current]);const u=(0,t.useCallback)((r=>{r.stopPropagation(),o.current&&o.current.prev()}),[o.current]),m=(0,t.useCallback)((r=>{r.stopPropagation(),o.current&&o.current.next()}),[o.current]);return(0,t.useEffect)((()=>{a(!1)}),[]),{carouselRef:c,handleSlideNext:m,handleSlidePrev:u,isJsDisabled:e,instanceRef:o,slideIdx:s}}(P);return(0,s.jsxs)("div",Object.assign({className:(0,c.a)(C,o&&"noJsProductSlider")},{children:[(0,s.jsx)("h3",Object.assign({className:f},{children:r})),(0,s.jsx)("a",Object.assign({className:(0,c.a)(N,u===m?y:""),onClick:p},{children:(0,s.jsx)(v.r,{})})),(0,s.jsx)("a",Object.assign({className:(0,c.a)(O,u===g?y:""),onClick:d},{children:(0,s.jsx)(v.s,{})})),(0,s.jsx)("div",Object.assign({ref:i,class:(0,c.a)("keen-slider")},{children:e.length>0&&e.map(((r,e)=>(0,s.jsx)("div",Object.assign({className:`keen-slider__slide number-slide${e}`},{children:(0,s.jsx)(w,{currencySymbol:a,product:r},r.productTitle)}),r.productTitle)))}))]}))};(0,a(3).createEntrypoint)("shipping-policy-slider",(r=>(0,s.jsx)(i.Fragment,{children:(0,s.jsx)(k,Object.assign({},r.products,{currencySymbol:r.currencySymbol}))})))}},r=>{r.O(0,[1,2,3,4,5,6],(()=>(190,r(r.s=190)))),r.O()}]);