"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[76],{46:(e,t,o)=>{o.d(t,{a:()=>r});const r={container:"C9VtQ9xK",mainTitle:"Xpg4TNVK",subTitle:"EYcD112D",optionsRow:"jXINhOsm",optionButton:"Y6e_uY66",active:"znv4P3xK",children:"wlNhqnBL"}},42:(e,t,o)=>{o.d(t,{a:()=>r});const r={container:"LixAkx1y",imageContainer:"gclOIT5L",image:"Y5wVMJ4Q",details:"A4FyDY7j",title:"cMcEwdYe",subDetails:"McFQUCvJ",stylesAvailable:"bAroljYu",inStock:"to5yoRvj",dropdownIcon:"dqjUwhJm",legend:"fFjN7VDe",swatchLabel:"nfY_i_Nk",checked:"uAsxnra9"}},11:(e,t,o)=>{o.d(t,{a:()=>r});const r={accordion:"fmJEoApf",noTopBorder:"Vkp0_3He",section:"ZJCsmW3Z",toggle:"NM_YOWAF",labelAccordian:"gMfWhlvk",arrow:"iVRau9iH",content:"Yn9kwIny",contentWithGap:"QZ6IQcPi",iconCaret:"UgDfblcC"}},28:(e,t,o)=>{o.d(t,{a:()=>r});const r={container:"O9IcGWrR",sizeGuideContainer:"Sjgd8MXw __bite_extend __bite_theme_sizeGuideContainer",compact:"PMfnO_UZ",sizeGuideLabel:"maXcOloV",modalOverlay:"o3JfeQ8Y",modal:"rDogYdZh",modalImage:"UWyRdhCC",modalBackground:"nsap7aGo",closeBtn:"LeKie3P2",closeIconSVG:"twjfhJqJ",optionLabels:"v26a1W51",optionLabelsMoreColors:"ffMQMNB_",small:"vzwk4W6S",colorOptionLabels:"sSQma0jm",styled:"uyfJAMOS",oneLine:"OXuRyDa7",scrollable:"HmwBzsc0",scrollContainer:"BOTReWr_",scrollIndicator:"Q9SKBA7T",left:"pzmk77FP",right:"RJxu02cY",scrollIndicatorRight:"sxGsPWUu",optionLabelsSlideUpModal:"KxvdnHon",colorOptionSlideUpModal:"sRhGufaC",moreColors:"TUQP7fb6",moreColorsHasSelection:"Z2pwKPx4",colorOption:"BSnU3jak __bite_extend __bite_theme_productHeroOptions_colorOption",colorOptionSmall:"ueI1yDi4 __bite_extend __bite_theme_productHeroOptions_colorOptionSmall",styleSelector:"iEeSm8vy",isStyleOption:"F9WAUe61",saleLabel:"V4w7fowI __bite_extend __bite_theme_saleLabel",priceLabel:"tczX4obk",noSwatchImage:"XSvSsyWQ",colorOptionSelected:"QMl69tAx __bite_extend __bite_theme_productHeroOptions_colorOptionSelected",styleOptionSelected:"G7hdFyhC",styleOptionNotSelected:"rxLxwecl",sizeOption:"MSGuc0os __bite_extend __bite_theme_sizeOption",sizeOptionSmall:"_LAImWda __bite_extend __bite_theme_sizeOptionSmall",soldOut:"z_5wn5b_",soldOutLineThrough:"tCLVYX2m sold-out-line-through",sizeOptionSelected:"UXdMckXt __bite_extend __bite_theme_sizeOptionSelected",swatch:"ac9ZfQJE __bite_extend __bite_theme_swatch",label:"EIfulk0V",smallOptionLabel:"UixcHeUq",optionContainer:"SJQFNexH",visuallyHidden:"zkx8p4KR",divider:"pWq23Myu",resetLinkStyles:"N1cHTXJ7",dropdown:"TkYtS_aR",notSelected:"tqz2GDVR",modalOptionVariantTitle:"S2HQLJv3",modalOptionVariantSubtitle:"jEgvypoO",modalOptionTag:"xFTwvVaz",preOrderTag:"S18UQ2my",priceChange:"QVHi26tH",preOrderPriceChange:"VmMY_ekm",sizeGuidePage:"H_xKFYaR","sizeGuide-cta":"tnXtDZXh","sizeGuide-desc":"YrAAd0Fq"}},65:(e,t,o)=>{o.d(t,{a:()=>r});const r={sizeSection:"LvNhPyG7",sizeHeader:"_MIj15Rh",sizeLabel:"G1UzdMZW",sizingSubtext:"DedkLd0y",sizeGuideLink:"xOQlbvvb",sizeDropdowns:"dzAhb8cT",dropdownContainerDesktop:"IuXKDY_b",dropdownContainerMobile:"xpsa_0kX",dropdownContainer:"dqIPTq5D",dropdownTrigger:"H_kzAmZq",placeholder:"H18MipTt",dropdownTriggerUnavailable:"Um57NEfF",dropdownTriggerText:"TMh552Wd",chevronIcon:"pRYV6hPe",chevronUp:"SNK6292f",dropdownOverlay:"p3ErsuMg",dropdownPanel:"ljh1KpG2",dropdownHeader:"GOeuiWuW",dropdownHeaderTitle:"aQYT9fHd",dropdownCloseBtn:"bLiZzMeM",dropdownOptions:"A_ihZz7N",dropdownOption:"zZiW2xwq",dropdownOptionSelected:"f4G1CQJx",dropdownOptionUnavailable:"g8wxdZbS",sizingBanner:"Q6rPgU8t",dropdownColumnHeader:"P4uQfzR4",dropdownOptionRow:"JfIEBoE_",usEquivalent:"o9WrhuPF",dropdownWrapper:"YYe1FmGZ",dropdown:"V4FNFvFd",notSelected:"hUblBNrf",dropdownArrow:"pt4F5fld",visuallyHidden:"DkljE7wj"}},47:(e,t,o)=>{o.d(t,{a:()=>r});const r={drawerBody:"tMqn4SDE",sizeGuide:"ZQyI2ABK",heading:"DAtXzW7T",tabs:"Igd6r_gc",tab:"mXHw8ef3",active:"OWsnWHan",content:"xjW5aPjH",imageWrapper:"eIfc67LG",imageDescription:"KZWcm0S3",image:"lPZy47WR",measurementInfo:"MFNX6UfK",description:"CRYJWq1V",fit:"kxt5nirV",staticSlider:"B3L5PNeJ",thumb:"__81auOz",sliderLabels:"knR9kYRM",sliderLabelsStrong:"fQQek48H",tableWrapper:"khwhlJbP",table:"jj9_9SdG",unit:"pmcLV3ib",colHover:"vJGDGOyU",rowHover:"p1kJN6rn",cellActive:"XOZBsEtn",toggleMobile:"W_b8LS3M",toggleDesktop:"vfb0QF4V",unitToggle:"agLBlxdF",selected:"G0YhMsDK",switch:"mR2g0p0l",sliderSwitch:"AXFKAlss",slider:"lds10kV9"}},25:(e,t,o)=>{o.d(t,{a:()=>r});const r={container:"lJdQwzYh",small:"FZXIRNTB",productPriceDefault:"R2JvcJin __bite_extend __bite_theme_productHeroPrice_productPriceDefault",productPrice:"pVzkKcC7 __bite_extend __bite_theme_productHeroPrice_productPrice",compareAtPrice:"f7Y7WbCg __bite_extend __bite_theme_productHeroPrice_compareAtPrice",competitorPrice:"aftQXg8T __bite_extend __bite_theme_productHeroPrice_compPrice",login:"IBT6ZD4a",memberLink:"NgDvddjN",pricePill:"hVEOmGAB",pricingPolicyLabel:"YOXiFwY8",pricingPolicyCheckbox:"rSlb7WVn",modalOverlay:"ZbyY7W6Y",modal:"pqAtdOx3",modalImage:"R32tPmBt",modalBackground:"kC5EZFzk",closeBtn:"cquYxt54",pricingPolicy:"zHE03LgR",pricingHeader:"BgIIdEbc",pricingText:"eFFesRir",pricePolicyInnercontainer:"MtaJsqe8",header:"kMgZV8eq",toggleButton:"JjXXJ26g",content:"mt3p8uus",afterpayContainer:"wAydGs49 __bite_extend __bite_theme_productHeroPrice_afterpay",afterpayText:"bZV9yDQ6",afterpayLogo:"v0eOLlo0",afterpayLink:"cy2sGp9N",traditionalLayout:"fOMJZwV_",traditionalPriceColumn:"nY257Bp9 __bite_extend __bite_theme_traditionalPriceColumn",traditionalCompareColumn:"UZO1lxhO __bite_extend __bite_theme_traditionalCompareColumn",traditionalCompareDisplay:"vgSHdAvB",savingsText:"JnJwLcGt __bite_extend __bite_theme_productHeroPrice_savingsText",traditionalRetailText:"sYvTWUx2 __bite_extend __bite_theme_productHeroPrice_traditionalRetailText"}},29:(e,t,o)=>{o.d(t,{a:()=>r});const r={gallery:"utYziQAE",imageContainer:"u7hALhRV",image:"HRX192Oq",imageMessage:"C0mfa5lU",review:"jT_XY_1t",reviewHeader:"c37mM92e",title:"pfrMrpCr",author:"EcdUmPEh",truncated:"YcyRuLBB",expanded:"IomlcWA2",modal:"EQpOtFeT",fadeIn:"sVWQQ9or",fadeOut:"sZfxzYzK",modalInner:"Lg4GX5Y4",modalContent:"OpbIhP35",modalOverlay:"iZzCdFwp",modalHeader:"wek3E8S1",fullBleedImage:"i2zolDuA",slideUp:"u96mNKND",slideDown:"jAr2PKY3",closeButton:"MvI_gVPT",modalTextContent:"bihC0FqM",modalBodyText:"ksR2mAtx",loadMoreButton:"QklUYRZO",reviewsHeader:"KjJxq4iV"}},23:(e,t,o)=>{o.d(t,{a:()=>r});const r={container:"kCnYDLzR",small:"m_LXTn8P",addButton:"YUeVwYml __bite_extend __bite_theme_addButton",unavailable:"BiamyoHG",outlined:"te3LRnKd",estimatedShipDate:"xxYynv3w",linethrough:"TekpRu6F",backinstockContainer:"FbAiPRNO",bsTitle:"a3V4YjS8",bsProductTitle:"bmYUJgr_",bsText:"DaMJ43Zi",divider:"dLTgkIzV",emailInput:"GSApYLCK",submitted:"ufaFAZ4c",error:"_vV9DpKA",notifyAvailableCheckbox:"KvvNSbB6",modalOverlay:"m2eqLb6A",modal:"HW1ddjw1",modalBackground:"JlvpZ9MA",closeBtn:"wlV5b2eI",message:"yiuO5iOX",quantityContainer:"rHzIKHF_",quantitySelector:"Y4BqWlxV",quantityButton:"XowLjPcM",quantityInput:"ArIe3lMr",addToCartForm:"C4NB_ZTo",messageMobile:"V5Z0NMQM"}},48:(e,t,o)=>{o.d(t,{a:()=>r});const r={overlay:"vmeqUaCA",overlayVisible:"cf6ygfG7",backdrop:"CMWNg6LH",overlayHidden:"bcQJu1zm",drawer:"AksvsL_M",drawerRight:"m1PQiRXi",drawerLeft:"z4QWGWao",drawerOpen:"ynKZs_wS",drawerHeader:"aM7Wpnhn",closeButton:"TbIQ7vqR",drawerContent:"iV4jkhA6"}},13:(e,t,o)=>{o.d(t,{a:()=>r});const r={modalOverlay:"pKklj6A7",modalOverlayHidden:"FbGOep4Z",modalBackground:"srpRGD58",modal:"L76vEo7G",fitContent:"dC1D3FxI",closeBtn:"E2U6v0rP",closeIconSVG:"SMOJf3ND",modalImage:"v3EoYlrW",sizeGuidePage:"tZxZJ5xu",modalOverlayBottomSheet:"aTeBB3HC",modalBottomSheet:"rRLnrN0A __bite_extend __bite_theme_modalBottomSheet",slideUp:"woWeB2Ks",fadeIn:"rXVUk9Yk",large:"shRTi3NB",closing:"oitbq3f8",slideDown:"GC4NNj4H",fadeOut:"jtefEfQd",bottomSheetHeader:"pfc5sVVL",bottomSheetTitle:"WYgR_YWU",bottomSheetCloseBtn:"Ti_CbCl8",bottomSheetCloseBtnFloating:"PDrsEZxz",bottomSheetContent:"VI6yo2BU"}},44:(e,t,o)=>{o.d(t,{a:()=>r});const r={modalContent:"wbh7Lh07",closeButton:"al8EqjqU",closeIcon:"BcalYeO_",sliderContainer:"oiuA3osK",arrowLeft:"u6XZhU7y",arrowRight:"lOjZKn2S",productsSlider:"XkiytDwR",sliderDots:"fZYzTc2n",dot:"DqvGcYil",dotActive:"R0W_aBjT",productCard:"dWAQOr2h",productImageContainer:"uQAtit98",imageGallery:"rZNn_nr2",imageSlide:"QIOSqz5b",productImage:"hNvWpVF8",imageArrow:"sfkGqxFG",imageArrowLeft:"VnQ7eMXG",imageArrowRight:"Az8THSnx",imageArrowDisabled:"pJpf8Vou",imageDots:"hgNcB9AJ",imageDot:"xIpvyz14",imageDotActive:"H5Zqh_RG",productDetails:"Chx1MTJJ",productBrand:"UWqUJvv_",productTitle:"ijER_CKY",productSubtitle:"p5pgJCoX",productPriceContainer:"pbU0tcgs",optionsLoading:"pSuMuzHi",productOptions:"po0Z889t",viewDetailsLink:"V2IFcSRI",skeletonBase:"YXiJEUNI",skeletonAddToCart:"Xul8NTsF",skeletonButton:"Hoa7sNEx",skeletonOptionLabel:"vT0tYPUl",skeletonPrice:"PxLBUuxr",shimmer:"mE5eQBuh",skeletonOptions:"IvchuGwD",skeletonOptionButtons:"SJ5zMEZV"}},273:(e,t,o)=>{var r=o(0),i=o(1);const n={progressHeader:"bd9LNuG5",progressLabelPrefix:"DfVtVtK_",shippingProgressContainer:"QQRi8I0o",thresholdHeaderLabel:"k9loRy1t",progressBar:"jCMsviCM",progressTicks:"cj9Duc82",progressTick:"OxF2caCy",progressOrb:"CJVsj7dS",orbUnlocked:"j5eY8nY3",orbLocked:"ClCTA9Sq",progressTickIcon:"zK0MWGP0",shippingProgressInfo:"s0YOfDex __bite_extend __bite_theme_freeGiftProgress_shippingProgressInfo",secondaryMessage:"ca2BCbAL __bite_extend __bite_theme_freeGiftProgress_secondaryMessage",noBorder:"stfhg_vY",giftCard:"xktanVBA",giftCardMessage:"VbGx_RyX",giftCardRow:"oQ4GG8cc",giftCardImage:"JTgO737u",giftCardImagePlaceholder:"YedrsaOm",giftCardDetails:"q7mgRWh6",giftCardLabel:"ADfQFQD2",giftCardTitle:"sLvFKYG9",giftCardButton:"mi9xCm8b",messageIcon:"v1sqM0qE",infoModalBody:"nwSQyDhn"};var l=o(115),a=o(22);function s(e,t,o=[]){return(null==e?void 0:e.items)&&0!==e.items.length?e.items.reduce(((e,t)=>{const r=`gid://shopify/ProductVariant/${t.variant_id}`;return o.includes(r)||t.discounted_price<=0?e:e+t.discounted_price*t.quantity}),0)/100:0}var d=o(74),c=o(92);function u({product:e,onClose:t,cartApp:o}){return(0,r.jsx)(c.a,{product:e,onClose:t,cartApp:o,buttonMessage:"Add Free Gift — $0.00",addToCartProperties:Object.assign({_free_gift:Math.round(1e3*Math.random()).toString(36)},e.compareAtRange.maxPrice?{_compareRetail:(100*e.compareAtRange.maxPrice).toFixed(2)}:{}),skipFetch:!0,hidePrice:!0})}var p=o(68),m=o(44);const h={modalContent:"FyGK8lTu",sliderContainer:"tmFXolFx",arrowLeft:"_bkh7Wm7",arrowRight:"fM8lWt5u",productsSlider:"F99Yhzf5",sliderDots:"esHcOCty",dot:"hz2c9zpB",dotActive:"lRSCuzO6",navigationRow:"QHt1usM1",dotsContainer:"WwfPAESk",navArrow:"JB8GZPRP",navArrowDisabled:"DozwgNjk"};var _=o(6);function g({isOpen:e,onClose:t,products:o,giftProductsByHandle:n,cartApp:l}){const[a,s]=(0,i.useState)(0),c=(0,i.useRef)(null),g=(0,i.useRef)(null),f=(0,i.useMemo)((()=>o.map((e=>e.handle&&(null==n?void 0:n[e.handle])?n[e.handle]:null)).filter(_.e)),[o,n]),v=e=>{const t=c.current;if(!t)return;const o=Array.from(t.children)[e];o&&o.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})},b=()=>{const e=c.current,t=g.current;if(!e||!t)return;const o=e.scrollLeft/(e.scrollWidth-e.clientWidth);t.style.setProperty("--scroll-progress",o.toString())},x=()=>{const e=c.current;if(!e)return;b();const t=e.getBoundingClientRect(),o=Array.from(e.children),r=o[o.length-1];if(!r)return;const i=r.getBoundingClientRect().right-t.right<45;let n=1/0;o.forEach(((e,o)=>{const r=e.getBoundingClientRect();if(i&&r.left<0)return;const l=Math.abs(r.left-t.left)+(r.left<0?20:0);l{const e=c.current;if(e)return e.addEventListener("scroll",x),b(),()=>{e.removeEventListener("scroll",x)}}),[c.current,f.length]),0===f.length)return null;const C=1===f.length;return(0,r.jsx)(d.a,{isOpen:e,onClose:t,size:"large",title:"Choose your free gift",children:(0,r.jsxs)("div",{className:m.a.modalContent,"data-single-product":C,children:[(0,r.jsx)("div",{className:m.a.sliderContainer,ref:g,children:(0,r.jsx)("div",{className:m.a.productsSlider,ref:c,"data-slider":"true","data-single-product":C,children:f.map((e=>(0,r.jsx)(u,{product:e,onClose:t,cartApp:l},e.handle)))})}),f.length>1&&(0,r.jsxs)("div",{className:h.navigationRow,children:[(0,r.jsx)(p.a,{direction:"left",onClick:()=>{a>0&&v(a-1)},disabled:0===a,className:[h.navArrow,0===a?h.navArrowDisabled:""].join(" "),ariaLabel:"Previous product"}),(0,r.jsx)("div",{className:h.dotsContainer,children:f.map(((e,t)=>(0,r.jsx)("button",{type:"button",className:[m.a.dot,t===a&&m.a.dotActive].join(" "),onClick:()=>v(t),"aria-label":`Go to product ${t+1}`},t)))}),(0,r.jsx)(p.a,{direction:"right",onClick:()=>{au&&d.push(e.slice(u,m)),"amount"===p)d.push(null!==(i=t.amount)&&void 0!==i?i:"");else if("ordinal"===p)d.push(null!==(n=t.ordinal)&&void 0!==n?n:"");else if("threshold_label"===p){const e=null!==(l=t.threshold_label)&&void 0!==l?l:"";t.modalContentHtml?d.push((0,r.jsx)("button",{type:"button",onClick:r=>{var i;r.preventDefault(),o(t.modalContentHtml,null!==(i=t.modalTitle)&&void 0!==i?i:e)},style:{color:"inherit",textDecoration:"underline",cursor:"pointer",border:"initial",background:"initial",padding:"initial"},children:e})):d.push(e)}else"icon"===p?d.push(null!==(a=t.iconElement)&&void 0!==a?a:""):d.push(s);u=m+s.length}return u=0;t--)if(/\d/.test(e[t]))return e.length-t-1;return e.length}(u))},children:l(e.amount)}),(0,r.jsx)("span",{className:[n.progressOrb,i?n.orbUnlocked:n.orbLocked].join(" "),children:(0,r.jsx)("img",{className:n.progressTickIcon,src:c.url,alt:c.altText})})]},`threshold-${t}-${e.type}-${e.amount}`);var u}function O({thresholds:e,maxThreshold:t,widthPercent:o,barColor:i,formatUSD:l,shippingUnlocked:a,giftsUnlockedCount:s,allGifts:d}){return(0,r.jsxs)("div",{className:n.shippingProgressContainer,"aria-hidden":"true",style:{"--progress-bar-color":i},children:[(0,r.jsx)("div",{className:n.progressBar,style:{width:`${o}%`,backgroundColor:i}}),(0,r.jsx)("div",{className:n.progressTicks,children:e.map(((o,i)=>{const n="free_shipping_threshold"===o.type?a:d.indexOf(o)>-1&&d.indexOf(o){const e=Array.from(new Set(t));u(e)},className:n.giftCardButton,style:{background:null!=c?c:"#111"},children:`ADD ${l||"FREE GIFT"}`})]})]})]})}function k({progressBar:e,giftProductsByHandle:t,showVendor:o,apps:{cart:d}}){var c,u,p;const m=d.cart.value,[h,_]=(0,i.useState)(!1),[b,x]=(0,i.useState)([]),[y,k]=(0,i.useState)(!1),[j,B]=(0,i.useState)(void 0),[T,P]=(0,i.useState)(void 0),A=(0,a.b)({currency:"USD"});if(!m||!(null==e?void 0:e.thresholds)||0===e.thresholds.length)return(0,r.jsx)(r.Fragment,{});const L=e.thresholds.map((e=>Object.assign(Object.assign({},e),{amount:parseFloat(e.threshold.amount)}))).sort(((e,t)=>e.amount-t.amount)),M=null!==(u=null===(c=L[L.length-1])||void 0===c?void 0:c.amount)&&void 0!==u?u:0;if(M<=0)return(0,r.jsx)(r.Fragment,{});const I=s(m,0,[]),H=function(e){return!(!(null==e?void 0:e.items)||0===e.items.length||e.items.some((e=>e.requires_shipping)))}(m),N=Math.max(0,Math.min(100,I/M*100)),D=L.find((e=>"free_shipping_threshold"===e.type)),R=L.filter((e=>"free_gift_threshold"===e.type)),G=!!D&&(H||I>=D.amount),z=function(e,t,o=[]){const r=s(e,0,o);return t.filter((e=>"free_gift_threshold"===e.type&&r>=e.amount)).length}(m,L,[]),V=R[z];function Y(e,t){e&&(B(t),P(e),k(!0))}const{unfulfilledGiftBlocks:F}=(0,i.useMemo)((()=>{var t;const o=R.filter((e=>I>=e.amount)),i=new Set((null!==(t=null==m?void 0:m.items)&&void 0!==t?t:[]).filter((e=>{var t;return 0===(null!==(t=e.discounted_price)&&void 0!==t?t:e.price)})).map((e=>e.product_id))),l=o.filter((e=>{var t,o;const r=null!==(o=null===(t=e.gift_products)||void 0===t?void 0:t.map((({id:e})=>function(e){if(!e)return;const t=e.split("/").pop(),o=t?Number(t):NaN;return Number.isFinite(o)?o:void 0}(e))).filter(Boolean))&&void 0!==o?o:[];return 0===r.length||!r.some((e=>i.has(e)))})),a=l.map((t=>{var o,i,l,a,s,d;const c=e.cart_item_success_icon&&"image"===e.cart_item_success_icon.type&&e.cart_item_success_icon.url?(0,r.jsx)("img",{src:e.cart_item_success_icon.url,alt:null!==(o=e.cart_item_success_icon.altText)&&void 0!==o?o:"icon",className:n.messageIcon}):void 0,u=w(e.cart_item_success_template,{threshold_label:t.threshold_label,modalContentHtml:null!==(i=t.threshold_label_modal_content)&&void 0!==i?i:void 0,modalTitle:t.threshold_label,iconElement:c},Y),p=(null!==(l=t.gift_products)&&void 0!==l?l:[]).map((e=>e.handle)).filter((e=>Boolean(e))),m=t.cart_image_override&&"image"===t.cart_image_override.type&&null!==(a=t.cart_image_override.url)&&void 0!==a?a:null;return{messageChildren:u,productHandles:p,previewTitleOverride:null!==(s=t.cart_title_override)&&void 0!==s?s:null,previewImageOverride:m,thresholdLabel:t.threshold_label,cartVendorOverride:null!==(d=t.cart_vendor_override)&&void 0!==d?d:null}}));return{unfulfilledGiftBlocks:a}}),[R,I,m,e.success_template]),U=(0,i.useMemo)((()=>{var e,o;const r=Array.from(new Set(F.map((e=>e.productHandles[0])).filter((e=>Boolean(e))))),i=[];for(const n of r){const r=null==t?void 0:t[n];if(!r)continue;const a=null!==(e=(0,l.c)(r))&&void 0!==e?e:r.variants[0],s=null===(o=(0,f.c)(r.imageMap,a)[0])||void 0===o?void 0:o.src;i.push([n,{title:r.title,image:s,vendor:r.vendor}])}return Object.fromEntries(i)}),[F,t]);let W,Q;if(D)if(G)W=w(e.shipping_success_template,{threshold_label:D.threshold_label,modalContentHtml:D.modal,modalTitle:D.threshold_label},Y);else{const t=Math.max(0,D.amount-I);W=w(e.shipping_progress_template,{amount:A(t),threshold_label:D.threshold_label,modalContentHtml:D.modal,modalTitle:D.threshold_label},Y)}if(G)if(V){const t=Math.max(0,V.amount-I);Q=w(e.progress_template,{amount:A(t),threshold_label:V.threshold_label,ordinal:C(z+1),modalContentHtml:null!==(p=V.threshold_label_modal_content)&&void 0!==p?p:void 0,modalTitle:V.threshold_label},Y)}else Q=z>0?w(e.success_template,{},Y):void 0;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:n.progressHeader,children:e.label_prefix&&(0,r.jsx)("span",{className:n.progressLabelPrefix,children:e.label_prefix})}),(0,r.jsx)(O,{thresholds:L,maxThreshold:M,widthPercent:N,barColor:e.bar_color,formatUSD:A,shippingUnlocked:G,giftsUnlockedCount:z,allGifts:R}),W&&(0,r.jsx)("div",{className:[n.shippingProgressInfo,"rich-text"].join(" "),children:W}),Q&&(0,r.jsx)("div",{className:[n.secondaryMessage,"rich-text"].join(" "),children:Q}),F.map(((t,i)=>{const n=t.productHandles[0],l=n?U[n]:void 0;return(0,r.jsx)(S,{messageChildren:t.messageChildren,productHandles:t.productHandles,previewImageOverride:t.previewImageOverride,previewTitleOverride:t.previewTitleOverride,thresholdLabel:t.thresholdLabel,preview:l,cartVendorOverride:t.cartVendorOverride,showVendor:o,barColor:e.bar_color,onAddGift:e=>{x(e.map((e=>({handle:e})))),_(!0)}},`unfulfilled-gift-${i}`)})),(0,r.jsx)(g,{isOpen:h,onClose:()=>_(!1),products:b,giftProductsByHandle:t,cartApp:d}),(0,r.jsx)(v.a,{isOpen:y,onClose:()=>k(!1),title:null!=j?j:"More information",children:(0,r.jsx)("div",{className:n.infoModalBody,children:(0,r.jsx)("div",{className:"rich-text",dangerouslySetInnerHTML:{__html:null!=T?T:""}})})})]})}var j=o(2),B=o(88),T=o(101),P=o(9);const A=[P.b];j.BentoUI.feature({featureId:"free_gift_progress_bar",variations:[j.BentoUI.variation({component:k,hydrate:!0,variationId:"default",apps:A,render(e){return t=this,o=arguments,i=function*({globalState:e,sectionIdFromRequest:t,context:o}){var r,i;const{props:n,initializationData:l}=yield e,a=(0,T.a)(n.cartSections,t);if("free_gift_progress_bar"!==(null==a?void 0:a.type))return{html:""};const s=Array.from(new Set((null!==(r=a.thresholds)&&void 0!==r?r:[]).filter((e=>"free_gift_threshold"===e.type)).flatMap((e=>{var t;return(null!==(t=e.gift_products)&&void 0!==t?t:[]).map((e=>e.handle))})).filter(_.e))),d=s.length>0?(yield Promise.all(s.map((e=>(0,B.b)({context:o,handle:e,isPDP:!0}))))).filter(_.e):[],c=(null!==(i=a.thresholds)&&void 0!==i?i:[]).filter((e=>"free_gift_threshold"===e.type)).flatMap((e=>{var t;return null!==(t=e.excluded_colors)&&void 0!==t?t:[]})),u=new Set(c.map((e=>e.id)).filter(_.e).map((e=>e.includes("/")?e.split("/").pop():e))),p=u.size>0?d.map((e=>{const t=new Set;for(const o of e.variants)if(u.has(o.variantId)){const e=o.selectedOptions.Color;e&&t.add(e)}if(0===t.size)return e;const o=e.variants.filter((e=>{const o=e.selectedOptions.Color;return!o||!t.has(o)})),r=e.options.map((e=>Object.assign(Object.assign({},e),{values:e.values.filter((t=>o.some((o=>o.selectedOptions[e.name]===t))))})));return Object.assign(Object.assign({},e),{variants:o,options:r})})):d,m=Object.fromEntries(p.map((e=>{var t;return[e.handle,Object.assign(Object.assign({},e),{combinedKey:null!==(t=e.combinedKey)&&void 0!==t?t:void 0})]})));return{props:{progressBar:a,giftProductsByHandle:m,showVendor:l.showVendor}}},new((r=void 0)||(r=Promise))((function(e,n){function l(e){try{s(i.next(e))}catch(e){n(e)}}function a(e){try{s(i.throw(e))}catch(e){n(e)}}function s(t){var o;t.done?e(t.value):(o=t.value,o instanceof r?o:new r((function(e){e(o)}))).then(l,a)}s((i=i.apply(t,o||[])).next())}));var t,o,r,i}})]}),(0,j.createEntrypoint)("free_gift_progress_bar",k,A)},33:(e,t,o)=>{o.d(t,{a:()=>i,b:()=>r,c:()=>n});const r=28,i="https://shalom-development-worker-may-2024.digitaloptgroup.workers.dev";function n(e){return function(e){return 100*Math.round(e)!==Math.round(100*e)?e.toFixed(2):Math.round(e).toString()}("number"==typeof e?e:parseFloat(e))}}},e=>{e.O(0,[1,2,3,4,5,6,7,8,9,10,11,12,14,17,16,19,18,27,29,30,31,33],(()=>e(e.s=273))),e.O()}]);