"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[18],{144:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DisruptorCard=function({disruptor:e}){var t;return(0,a.jsxs)("div",{class:l.default.card,style:{color:e.text_color},children:[(0,a.jsx)(s,{media:e.media}),(0,a.jsx)("div",{class:l.default.title,dangerouslySetInnerHTML:{__html:e.title}}),(0,a.jsx)("div",{class:l.default.body,dangerouslySetInnerHTML:{__html:null!==(t=e.body_text)&&void 0!==t?t:""}}),(0,a.jsx)(d,{disruptor:e})]})};const a=r(0),o=r(3),l=i(r(41)),n=r(4);function s({media:e}){var t;const r=null===(t=(0,n.convertImageMedia)(e))||void 0===t?void 0:t.url;if(r){const e={"background-image":`url(${r});`};return(0,a.jsx)("div",{class:l.default.media,style:e})}return"video"===e.type&&e.sources.length>0?(0,a.jsx)("div",{class:l.default.media,children:(0,a.jsx)("video",{loop:!0,autoplay:!0,playsinline:!0,muted:!0,children:e.sources.map((e=>(0,a.jsx)("source",{src:e.url,type:e.mimeType})))})}):(0,a.jsx)(o.Fragment,{})}function d({disruptor:e}){var t;return e.cta_url?(0,a.jsx)("a",{href:e.cta_url,children:null!==(t=e.cta_label)&&void 0!==t?t:"Shop Now"}):(0,a.jsx)(o.Fragment,{})}},48:function(e,t,r){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProductCard=function({product:e,sharedStateStore:t,collectionHandle:r,replaceStateEnabled:i}){return(null==e?void 0:e.handle)?"type"in(o=e)&&"disruptor"===o.type?(0,a.jsx)(f.DisruptorCard,{disruptor:e}):(0,a.jsx)(g,{product:e,sharedStateStore:t,collectionHandle:r,replaceStateEnabled:i}):null;var o};const a=r(0),o=i(r(20)),l=r(2),n=r(6),s=r(30),d=r(17),c=r(18),u=r(24),p=r(1),h=r(51),f=r(144),m=r(201),x=r(75);function g({product:e,sharedStateStore:t,collectionHandle:r,replaceStateEnabled:i}){const{getHexForOptionColor:f,findProductVariantWithOption:g,EXCLUDE_TAGS:v,product_image_height:_,product_image_width:P,disable_color_swatches:j,showVendor:b}=t((e=>({getHexForOptionColor:e.getHexForOptionColor,findProductVariantWithOption:e.findProductVariantWithOption,EXCLUDE_TAGS:e.config.exclude_tags,product_image_width:e.config.product_image_width,product_image_height:e.config.product_image_height,disable_color_swatches:e.config.disable_color_swatches,showVendor:e.showVendor}))),S=e.options.find((e=>"Color"===e.name)),{priceText:y,showCompareAtPrice:O,isOnSale:C,compareAtPriceRange:I}=function(e){const t=(0,m.getCompareAtPrice)(e);if(e.priceTextOverride)return{priceText:e.priceTextOverride,showCompareAtPrice:!0,isOnSale:!0,compareAtPriceRange:t};const{minPrice:r,maxPrice:i}=(0,m.getPriceRange)(p.getAssignment,e);return{priceText:r!==i?`From $${(0,c.formatPrice)(r)}`:`$${(0,c.formatPrice)(r)}`,showCompareAtPrice:t.maxPrice&&t.maxPrice>r,isOnSale:t.maxPrice&&rt.variantId===e.defaultVariantId)),[A,F]=(0,l.useState)(null!=w?w:e.variants[0]),M=(0,d.getImagesForVariant)(e.imageMap,A)[0],V=(0,h.useProductUrl)(e,A);if(!M)return null;const T=(0,l.useMemo)((()=>{var t,r;return v&&(null==v?void 0:v.length)>0?e.tags.find((e=>!(null==v?void 0:v.includes(e)))):(null===(t=e.promoInfo)||void 0===t?void 0:t.badgeOverride)?e.promoInfo.badgeOverride:(null===(r=e.promoInfo)||void 0===r?void 0:r.badgeLabel)?e.promoInfo.badgeLabel:A.oos&&!A.preorderVariant?"Sold Out":A.compareAtPrice&&parseFloat(A.price){i&&(e.preventDefault(),location.replace(V))},class:o.default.link,"data-orly-type":r,"data-orly-handle":e.handle,children:[(0,a.jsx)("div",{className:o.default.heroImageContainer,children:(0,a.jsx)(n.LazyImage,{src:M.src,initialWidth:300,cssClass:o.default.heroImage,alt:`${e.title}: ${M.model}`,height:_,width:P,fullSizeWidth:L})}),(0,a.jsxs)("div",{class:o.default.textWrapper,children:[b&&(0,a.jsx)("div",{class:o.default.vendor,children:e.vendor}),(0,a.jsx)("div",{class:o.default.title,children:W}),H&&(0,a.jsx)("div",{class:o.default.subtitle,children:H}),(0,a.jsxs)("div",{class:o.default.price,children:[O&&I.maxPrice&&(0,a.jsxs)("span",{class:o.default.originalPrice,children:["$",(0,c.formatPrice)(I.maxPrice)]}),(0,a.jsx)("span",{class:C?o.default.salePrice:"",children:y})]})]})]}),(0,a.jsx)("div",{class:o.default.colorSwatchContainer,children:!j&&S&&(0,a.jsx)(s.ProductOption,{product:e,small:!0,maxItems:12,hideLabel:!0,option:S,getHexForOptionColor:f,selectedVariant:A,findProductVariantWithOption:t=>g(t,e,w),setSelectedVariantId:t=>{const r=e.variants.find((e=>e.variantId===t));r&&F(r)}})})]})}},75:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useMaxFullSizeWidth=function(){return(0,a.useMemo)((()=>{const e=(0,i.getAssignment)("maxFullSizeWidth");if(e)try{const t=parseInt(e);if(Number.isNaN(t))return;return t}catch(e){return}}),[])};const i=r(1),a=r(2)}}]);