"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[15],{79:function(e,l,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l,"__esModule",{value:!0}),l.StyleSelector=function({imageSrc:e,title:l,stylesAvailable:t,children:a}){const[p,v]=(0,o.useState)(!1),[f,h]=(0,o.useState)(!1),m=()=>{v(!0),window.matchMedia("(max-width: 600px)").matches||(h(!1),u(!0)),setTimeout((()=>{h(!1),v(!1),u(!0)}),300),document.body.style.overflow="auto"},x=e=>{e.target===e.currentTarget&&m()};return(0,i.jsxs)("div",{id:"style-selector",class:d.default.reviewContainer,children:[f&&(0,i.jsxs)(n.Fragment,{children:[(0,i.jsx)("div",{class:[d.default.modal,p?d.default.fadeOut:""].join(" "),onClick:x}),(0,i.jsx)("div",{class:[d.default.modalInner,s.default.modalInnerExtra].join(" "),onClick:x,children:(0,i.jsxs)("div",{class:[d.default.modalContent,p?d.default.slideDown:"",s.default.modalContentExtra].join(" "),onClick:e=>e.stopPropagation(),children:[(0,i.jsx)("div",{class:d.default.modalHeader,children:(0,i.jsx)("button",{class:d.default.closeButton,onClick:m,children:"X"})}),(0,i.jsxs)("div",{class:d.default.modalTextContent,onClick:m,style:"background-color: #f8f8f8;",children:["SELECT YOUR STYLE",a]})]})})]}),(0,i.jsxs)("div",{class:s.default.container,onClick:()=>{h(!0),document.body.style.overflow="hidden",u(!1)},children:[(0,i.jsx)("div",{class:s.default.imageContainer,children:e&&(0,i.jsx)(c.LazyImage,{src:e,alt:l,cssClass:s.default.image,initialWidth:250})}),(0,i.jsxs)("div",{class:s.default.details,children:[(0,i.jsx)("div",{class:s.default.title,children:l}),(0,i.jsx)("div",{class:s.default.subDetails,children:(0,i.jsxs)("span",{class:s.default.stylesAvailable,children:["+",t," Styles"]})})]}),(0,i.jsx)("div",{class:s.default.dropdownIcon,children:(0,i.jsx)(r.Arrow,{})})]})]})};const i=t(0),n=t(1),o=t(3),s=a(t(15)),d=a(t(8)),r=t(47),c=t(4);function u(e){const l=document.getElementById("stamped-main-widget");l&&(null==l||l.setAttribute("style",`position: relative; z-index: ${e?"1":"-1"};`))}},18:function(e,l,t){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(l,"__esModule",{value:!0}),l.ProductOption=function({productHandle:e,option:l,maxItems:t,getHexForOptionColor:a,selectedVariant:i,findProductVariantWithOption:o,setSelectedVariantId:u,sizeGuide:p,showVariantTitle:v,hideLabel:h,small:m,selectType:y}){var g;const b=null==i?void 0:i.selectedOptions.find((e=>e.name===l.name&&l.values.includes(e.value))),S=null==b?void 0:b.value,I=null!==(g=null==b?void 0:b.displayValue)&&void 0!==g?g:S;"Size"!==l.name&&(p=null);const{displayedOptionsRef:V,displayedOptions:F}=function({selectedVariant:e,selectedValue:l,productHandle:t,small:a,setSelectedVariantId:i,getHexForOptionColor:n,option:o,maxItems:s,findProductVariantWithOption:c}){null!=s||(s=o.values.length);const u="Color"===o.name,p=[...o.values],v=p.filter((e=>{var l;return null===(l=o.preOrderOnlyValues)||void 0===l?void 0:l.includes(e)})),{isIntersecting:h,ref:m}=(0,r.useIntersectionObserver)({freezeOnceVisible:!0,threshold:.5});(0,d.useEffect)((()=>{h&&v.forEach(((e,l)=>{var a,i,n,o;if(l>=3)return;const s=window.location.pathname.includes("/products/")?"pdp_":"";null===(i=null===(a=window.__APP_CONFIG__)||void 0===a?void 0:a.postExposure)||void 0===i||i.call(a,`${s}newColor_${l}`,e),null===(o=null===(n=window.__APP_CONFIG__)||void 0===n?void 0:n.postExposure)||void 0===o||o.call(n,`${s}newColor_${t}_${l}`,e)}))}),[h]);const x=p.map((e=>{var s;const d=null===(s=o.preOrderOnlyValues)||void 0===s?void 0:s.includes(e),r={"data-orly-type":u?"colorSwatch":`${o.name}Option`,"data-orly-handle":d?`PreOrder ${null==v?void 0:v.indexOf(e)}`:"coreOption","data-orly-parent-handle":t},p=l===e,h=c({name:o.name,value:e}),m=c({name:o.name,value:e,exactMatch:!0}),x=(null==m?void 0:m.variantId)===(null==h?void 0:h.variantId)&&((null==h?void 0:h.availableForSale)||Boolean(null==h?void 0:h.preorderVariant));return{value:e,href:(0,f.getVariantUrl)({handle:t},h),variant:h,isColorOption:u,isSelected:p,availableForSale:x,dataOrlyProps:r,small:a,option:o,getHexForOptionColor:n,setSelectedVariantId:i}})).filter((l=>{var t;return l.isSelected||(null===(t=l.variant)||void 0===t?void 0:t.variantId)!==(null==e?void 0:e.variantId)}));return s&&x.length>s&&(x.length=s-1),{displayedOptionsRef:m,displayedOptions:x}}({selectedVariant:i,selectedValue:S,productHandle:e,small:m,setSelectedVariantId:u,getHexForOptionColor:a,option:l,maxItems:t,findProductVariantWithOption:o});return 0===F.length?(0,n.jsx)(s.Fragment,{}):(0,n.jsxs)("fieldset",{class:[c.default.optionContainer,m?c.default.small:""].join(" "),children:[v?(0,n.jsx)(C,{selectedVariant:i,selectedDisplayValue:I,option:l}):h?(0,n.jsx)(s.Fragment,{}):(0,n.jsx)(w,{sizeGuide:p,selectedDisplayValue:I,option:l,small:m}),"renderDropdown"===y?(0,n.jsx)(x,{displayedOptions:F,displayedOptionsRef:V,option:l,findProductVariantWithOption:o,selectedVariant:i,setSelectedVariantId:u}):"styleSelector"===y?(0,n.jsx)(j,{selectedVariant:i,displayedOptions:F,displayedOptionsRef:V,option:l,maxItems:t}):(0,n.jsx)(O,{displayedOptions:F,displayedOptionsRef:V,option:l,maxItems:t})]},l.name)},l.VariantTitleLabel=C,l.ProductOptionLabel=w;const i=t(1),n=t(0),o=t(38),s=t(1),d=t(3),r=t(41),c=a(t(12)),u=t(51),p=t(79),v=t(11),f=t(42),h=t(16),m=t(2);function x({displayedOptions:e,displayedOptionsRef:l,option:t,findProductVariantWithOption:a,selectedVariant:i,setSelectedVariantId:o}){var s;const d=null===(s=null==i?void 0:i.selectedOptions.find((e=>e.name===t.name&&t.values.includes(e.value))))||void 0===s?void 0:s.value;return(0,n.jsx)("div",{children:(0,n.jsx)("select",{ref:l,name:t.name,value:d,onChange:e=>{const l=e.target.value,i=a({name:t.name,value:l});o(null==i?void 0:i.variantId)},class:c.default.dropdown,children:e.map((e=>(0,n.jsx)(g,Object.assign({},e))))})})}function O({displayedOptions:e,displayedOptionsRef:l,option:t,maxItems:a}){return(0,n.jsx)("div",{class:c.default.optionLabels,ref:l,children:(0,n.jsxs)(s.Fragment,{children:[e.map((e=>(0,n.jsx)(S,Object.assign({},e)))),a&&ae.availableForSale)).map((e=>(0,n.jsx)(b,Object.assign({},e)))),e.filter((e=>!e.availableForSale)).map((e=>(0,n.jsx)(b,Object.assign({},e))))]})}function g({value:e,isColorOption:l,option:t,dataOrlyProps:a,availableForSale:n,getHexForOptionColor:o}){const{hexColor:s,swatchStyle:d}=l?o(e):{hexColor:void 0,swatchStyle:void 0},r=I({value:e,option:t,availableForSale:n,featureId:"selectOption"});return(0,i.createElement)("option",Object.assign({},a,{key:e,value:e,class:[`${d?"":c.default.noSwatchImage}`,r].join(""),style:Object.assign({color:s},null!=d?d:{})}),!l&&e)}function b({value:e,href:l,variant:t,isColorOption:a,isSelected:i,availableForSale:s,dataOrlyProps:d,option:r,getHexForOptionColor:u,setSelectedVariantId:p}){var v;const{swatchStyle:f}=(0,o.useSwatchStyle)({value:e,isColorOption:a,hasSwatch:!0,swatchImage:null===(v=null==t?void 0:t.image)||void 0===v?void 0:v.src,getHexForOptionColor:u}),h=I({value:e,option:r,availableForSale:s,featureId:"slideUpModal"});return(0,n.jsxs)("label",{style:"width: 100%; height: 100%;",children:[(0,n.jsx)("a",Object.assign({},d,{href:l,class:c.default.resetLinkStyles,style:"width: 100%; height: 100%;",onClick:e=>{e.preventDefault(),p(null==t?void 0:t.variantId)},children:(0,n.jsx)("span",{class:[c.default.colorOptionSlideUpModal,i?c.default.colorOptionSelected:"",h].join(" "),style:Object.assign({},f)})})),(0,n.jsx)("input",{type:"radio",name:r.name,value:e,checked:i,class:c.default.visuallyHidden})]},e)}function S({value:e,href:l,variant:t,isColorOption:a,isSelected:i,availableForSale:s,dataOrlyProps:d,small:r,option:u,getHexForOptionColor:p,setSelectedVariantId:v}){var f,h;const m="Color"===u.name||"childProductHandle"===u.name,{hexColor:x,swatchStyle:O}=(0,o.useSwatchStyle)({value:e,isColorOption:a,hasSwatch:"childProductHandle"===u.name,swatchImage:null===(f=null==t?void 0:t.image)||void 0===f?void 0:f.src,getHexForOptionColor:p}),j=null===(h=null==O?void 0:O.backgroundImage)||void 0===h?void 0:h.startsWith("linear-gradient(45deg"),y=m&&!j?`${c.default.colorOption} ${r&&a?c.default.colorOptionSmall:""}`:`${c.default.sizeOption} ${r?c.default.sizeOptionSmall:""}`,g=m&&!j?c.default.colorOptionSelected:c.default.sizeOptionSelected,b=I({value:e,option:u,availableForSale:s,featureId:"radioOption"});return(0,n.jsxs)("label",{children:[(0,n.jsx)("a",Object.assign({},d,{href:l,class:c.default.resetLinkStyles,onClick:e=>{e.preventDefault(),v(null==t?void 0:t.variantId)},children:(0,n.jsx)("span",{class:[O?"":c.default.noSwatchImage,y,i?g:"",b,"childProductHandle"===u.name?c.default.isStyleOption:""].join(" "),style:Object.assign({color:x},j?{}:null!=O?O:{}),children:(j||!x&&!O)&&e})})),(0,n.jsx)("input",{type:"radio",name:u.name,value:e,checked:i,class:c.default.visuallyHidden})]},e)}function C({selectedVariant:e,option:l,selectedDisplayValue:t}){const{title:a,subtitle:i}=(0,v.splitTitle)(null==e?void 0:e.productTitle);return a?(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)("div",{class:c.default.label,children:a}),(0,n.jsxs)("div",{class:`${c.default.label} ${c.default.smallOptionLabel}`,children:[(0,n.jsxs)("span",{children:[i," "]}),!i||(null==e?void 0:e.availableForSale)||(null==e?void 0:e.preorderVariant)?(0,n.jsx)(s.Fragment,{}):(0,n.jsx)(h.PricePill,{message:"Sold Out"})]})]}):(0,n.jsx)(w,{selectedDisplayValue:t,option:l})}function w({option:e,selectedDisplayValue:l,sizeGuide:t,small:a}){var i;function o(){document.body.style.overflow="auto"}return(0,n.jsxs)("div",{class:c.default.sizeGuideContainer,children:[(0,n.jsxs)("div",{class:`${c.default.label} ${a?c.default.smallOptionLabel:""}`,children:[null!==(i=e.optionName)&&void 0!==i?i:e.name,": ",l]}),t&&(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)("label",{class:c.default.sizeGuideLabel,for:"sizeGuideCheckbox",onClick:function(){document.body.style.overflow="hidden"},children:"Size Guide"}),(0,n.jsx)("input",{type:"checkbox",id:"sizeGuideCheckbox",class:c.default.sizeGuideCheckbox}),(0,n.jsxs)("div",{class:c.default.modalOverlay,children:[(0,n.jsx)("label",{htmlFor:"sizeGuideCheckbox",class:c.default.modalBackground,onClick:o}),(0,n.jsxs)("div",{class:c.default.modal,children:[(0,n.jsx)("label",{for:"sizeGuideCheckbox",class:c.default.closeBtn,onClick:o,children:(0,n.jsx)(u.CloseIcon,{iconClass:c.default.closeIconSVG})}),t&&(0,n.jsx)("img",{src:t,alt:"Size Guide Image",class:c.default.modalImage})]})]})]})]})}function I({value:e,availableForSale:l,option:t,featureId:a}){var i;return l?"":(null===(i=t.soldOutValues)||void 0===i?void 0:i.includes(e))?c.default.soldOut:"dontFadeSoldOut"===(0,m.getAssignment)(a)?"":c.default.soldOut}},51:(e,l,t)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CloseIcon=function({size:e,iconClass:l}){return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",role:"presentation",class:l,style:e?`width:${e};height:${e}`:"",fill:"none",viewBox:"0 0 18 17",children:(0,a.jsx)("path",{d:"M.865 15.978a.5.5 0 00.707.707l7.433-7.431 7.579 7.282a.501.501 0 00.846-.37.5.5 0 00-.153-.351L9.712 8.546l7.417-7.416a.5.5 0 10-.707-.708L8.991 7.853 1.413.573a.5.5 0 10-.693.72l7.563 7.268-7.418 7.417z",fill:"currentColor"})})};const a=t(0);t(1)},42:(e,l,t)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.useProductUrl=function(e,l){return(0,a.useMemo)((()=>i(e,l)),[l,e])},l.getVariantUrl=i;const a=t(3);function i(e,l){var t;const a=null==l?void 0:l.selectedOptions.find((e=>"childProductHandle"===e.name)),i=`/products/${null!==(t=null==a?void 0:a.value)&&void 0!==t?t:e.handle}`,n=new URLSearchParams;return l?(n.set("variant",l.variantId),`${i}?${n.toString()}`):i}},11:(e,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.splitTitle=function(e){const l=null==e?void 0:e.split("|").map((e=>e.trim()));if(!l)return{title:e};return{title:l.shift(),subtitle:l.length>0?l.join(" | "):void 0}}}}]);