"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[29],{68:function(e,t,l){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=function({collection:e,mobile_slider:t="disabled",desktop_slider:l="disabled"}){(0,o.useLogCollection)(e);const[n,a]=(0,u.useState)(0),f=(0,u.useRef)(null),h=()=>{const e=f.current;if(!e)return;const t=e.getBoundingClientRect(),l=Array.from(e.children),n=l[l.length-1].getBoundingClientRect().right-t.right<45;let s=1/0;l.forEach(((e,l)=>{const r=e.getBoundingClientRect();if(n&&r.left<0)return;const i=Math.abs(r.left-t.left)+(r.left<0?20:0);i{var t;const l=null===(t=e.transformedMetafields)||void 0===t?void 0:t.disruptors;return l?e.products.flatMap(((e,t)=>{const n=l.find((e=>e.position===t+1));return n?[n,e]:e})):e.products}),[e]);return(0,u.useEffect)((()=>{var e;return null===(e=f.current)||void 0===e||e.addEventListener("scroll",h),()=>{var e;null===(e=f.current)||void 0===e||e.removeEventListener("scroll",h)}}),[f.current]),0===p.length?(0,s.jsx)(c.Empty,{}):(t=function(e,t){return 1===e||"1.5"===t?"1.5":2===e?"disabled":t}(p.length,t),(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)("div",{class:i.default.container,children:(0,s.jsx)("div",{class:[i.default.collectionItems,"disabled"!==l&&i.default.desktopItemsSlider,"disabled"!==t&&i.default.mobileItemsSlider].join(" "),style:{"--collection-desktop-slider-size":l,"--collection-mobile-slider-size":t},ref:f,children:p.map(((t,l)=>{if(!t)return null;const n="defaultVariantId"in t?`${t.handle}${t.defaultVariantId}`:`${t.handle}${l}`;return(0,s.jsx)(d.ProductCard,{product:t,collectionHandle:e.handle},n)}))})}),"disabled"!==t&&p.length>=parseFloat(t)&&(0,s.jsx)("div",{class:i.default.sliderDots,children:e.products.slice(0,["2.0","2.5"].includes(t)?e.products.length-1:e.products.length).map(((e,t)=>(0,s.jsx)("div",{class:[i.default.dot,t===n&&i.default.dotActive].join(" ")},t)))})]}))};const s=l(0),r=l(3),i=n(l(24)),o=l(51),d=l(49),u=l(2),c=l(140)},140:function(e,t,l){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Empty=function(){const e=(0,d.useFilterStore)((e=>e.filterList)),t=(0,r.useMemo)((()=>function(e){return e.some((e=>{var t;return null===(t=e.values)||void 0===t?void 0:t.some((e=>e.selected))}))}(e)),[e]);return(0,s.jsxs)("div",{class:i.default.empty,children:[(0,s.jsx)("h2",{children:"No Results"}),(0,s.jsx)("button",{"data-has-selected-filters":t,onClick:()=>{(0,o.clearAllFiltersFromUrl)(e)},children:"Clear Filters"})]})};const s=l(0),r=l(2),i=n(l(24)),o=l(85),d=l(86)}}]);