"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 i=e.getBoundingClientRect();if(n&&i.left<0)return;const r=Math.abs(i.left-t.left)+(i.left<0?20:0);r{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===v.length?(0,s.jsx)(c.Empty,{}):(t=function(e,t){return 1===e||"1.5"===t?"1.5":2===e?"disabled":t}(v.length,t),(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)("div",{class:r.default.container,children:(0,s.jsx)("div",{class:[r.default.collectionItems,"disabled"!==l&&r.default.desktopItemsSlider,"disabled"!==t&&r.default.mobileItemsSlider].join(" "),style:{"--collection-desktop-slider-size":l,"--collection-mobile-slider-size":t},ref:f,children:v.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&&v.length>=parseFloat(t)&&(0,s.jsx)("div",{class:r.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:[r.default.dot,t===n&&r.default.dotActive].join(" ")},t)))})]}))};const s=l(0),i=l(3),r=n(l(24)),o=l(51),d=l(49),u=l(2),c=l(139)},139: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,t]=(0,i.useState)([]),l=(0,i.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,i.useEffect)((()=>{const e=e=>{t(e.detail.filterList)};if("undefined"!=typeof window){window.addEventListener("bento-filter-list",e);const l=window.bentoFilterList;return l&&t(l),()=>{window.removeEventListener("bento-filter-list",e)}}}),[]),(0,s.jsxs)("div",{class:r.default.empty,children:[(0,s.jsx)("h2",{children:"No Results"}),(0,s.jsx)("button",{"data-has-selected-filters":l,onClick:()=>{(0,o.clearAllFiltersFromUrl)(e)},children:"Clear Filters"})]})};const s=l(0),i=l(2),r=n(l(24)),o=l(85)}}]);