"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[9],{31:function(e,t,a){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProductDetails=t.mockProductDetailData=t.dynamicBoxId30pack=t.dynamicBoxId20pack=void 0;const n=a(0),r=a(2),s=i(a(59)),l=a(19),c=a(58),o=a(1),d=a(32),u=a(179),p=a(13),h=a(33),m=a(70),v=a(1),x=a(39),b=a(20),g=a(30),j=a(185),S=a(50),y=a(7),C=a(6),f=a(51),P=a(191);"undefined"!=typeof window&&(window.Buffer=x.Buffer);const{mainContainer:k,mainContainerVarietySet:N,categoryLabel:$,title:I,titleTwelvePack:w,starsContainer:_,starsRating:B,ratingNumber:D,varietySetContainer:E,linkVarietySet:A,buttonGiftSet:T,linkGiftSet:F,varietySetContainerHolidays:O,varietySetContainerForVarietySetPDP:V,description:M,freeFromContainer:R,freeFromContainerVarietySet:z,nutritionContainer:L,nutritionImageContainer:H,bundles:U,selected:Y,price:K,regularPrice:G,regularPriceContainer:Z,regularPriceContainerTwelvePack:q,saleText:W,priceVarietySet:J,productSubscription:Q,productSubscriptionIsVariety:X,subscriptionInfo:ee,showContainer:te,backgroundPopup:ae,labelShip:ie,labelShipVarietySet:ne,labelShipContainer:re,addButton:se,varietyHoverName:le,moreFlavorsAlert:ce,disabled:oe,addButtonVarietySet:de,nutritionArrowContainer:ue,badgesContainer:pe,buttonLoading:he,buttonLoader:me,freeHatContainer:ve,plusSymbol:xe,priceContainer:be,currencyCodeStyle:ge,freeBadge:je,brandHat:Se,brandHatItalic:ye,hatFlex:Ce,limitedEdition:fe,shippingDate:Pe,shippingDateIcon:ke,shippingDateText:Ne}=s.default,$e=e=>98===e?98.01:e;t.dynamicBoxId20pack="640ff717-7950-4cd1-ac10-b096ebe57ac4",t.dynamicBoxId30pack="f665c7d6-7709-48ee-aa76-dff869b362e0",t.mockProductDetailData={rating:{reviewsHref:"https://starsandhoney.com/pages/reviews"},varietyButton:{href:"/products/signature-flavors-variety-set",text:"Variety Set"},varsityHatButton:{href:"/products/signature-tasting-gift-set-12-pack",text:"GIFT SET"},mockTagsForVarietySet:["⃠ GLUTEN","⃠ DAIRY","⃠ SOY","⃠ SUGAR ALCOHOLS"],bundlesIds:{variantId20packOneTime:{variantId:"47421908353257",productId:"8657724834025"},variantId30packOneTime:{variantId:"47460318839017",productId:"8671253332201"},variantId20packSubs:{variantId:"47421908353257",productId:"8657724834025"},variantId30packSubs:{variantId:"47460318839017",productId:"8671253332201"},variantId12PackOneTime:{variantId:"47723161420009",productId:"8747006623977"}},dynamicBundleCollectionId:"427067900137"},t.ProductDetails=function({productPage:e,variant:a,useSharedState:i,twelvePack:s,twelvePackEnabled:x,bundleSelected:ve,setBundleSelected:xe,isSubscriptionEnabled:je,featureSalePrice:Se,featureShippingDate:ye,isMobile:Ce=!1,productsExpandYourPalate:Ie,featureGoogleBadge:we,subscriptionClubData:_e}){const[Be,De]=(0,o.useState)(!1),[Ee,Ae]=(0,o.useState)("one-time"),[Te,Fe]=(0,o.useState)(!1),[Oe,Ve]=(0,o.useState)(!1),[Me,Re]=(0,o.useState)([]),[ze,Le]=(0,o.useState)(!1),[He,Ue]=(0,o.useState)(!1),[Ye,Ke]=(0,o.useState)(!1),[Ge,Ze]=(0,o.useState)(!1),qe=e.handle===g.bundlePackVarietySetHandle,We=ve===g.BundleSize["12 Pack"],Je=e.handle===g.twelvePackHandle||e.handle===g.twelvePackStoreHandle,Qe=We&&s?(0,b.modifyTitle)(s.title):(0,b.modifyTitle)(e.title),Xe=(0,j.getCalculatedPrice)({productPage:e,selectedSubscription:Ee,bundleSelected:ve,twelvePack:s,isVarietySet:qe,priceFromVariant:i.priceFromVariant,subscriptionClubData:_e}),et=Se?(0,j.getCalculatedPrice)({productPage:e,selectedSubscription:Ee,bundleSelected:ve,twelvePack:s,isVarietySet:qe,regularPrice:!0,priceFromVariant:i.priceFromVariant,subscriptionClubData:_e}):0,tt=(0,o.useMemo)((()=>We&&s?i.priceFromVariant(s.variants[0]):i.priceFromVariant(e.variants[ve])),[e.variants,ve,i.countryCode]),at=(0,o.useMemo)((()=>tt.currencySymbol),[tt]),it=(0,o.useMemo)((()=>(0,y.currencyCodeIfneeded)({currencySymbol:tt.currencySymbol,featureInternationalization:i.featureInternationalization,countryCode:i.countryCode,currencyCode:tt.currencyCode})),[at,tt,i]),nt=(0,o.useMemo)((()=>{const t="club"===Ee?(_e?.discount_percentage||0)/100:0,a=i.priceFromVariant(e.variants[qe?0:1]),n=i.priceFromVariant(e.variants[qe?1:2]);return[a.amount*(1-t)/20,n.amount*(1-t)/30]}),[e.variants,i.priceFromVariant,i.countryCode,Ee,qe]),rt=(e,t)=>{if(dt)return t?.preventDefault(),void Ae("one-time");Ae(e)},st=()=>{Fe(!Te)},lt=(e.tags.includes("limited"),(0,b.limitedProductByVariety)({productsExpandYourPalate:Ie,countryCode:i.countryCode,featureInternationalization:i.featureInternationalization})),ct=(0,o.useMemo)((()=>Ie.some((t=>t.handle===e.handle))||e.handle===g.bundlePackVarietySetHandle),[Ie,e.handle]),ot=t=>{xe(t);const a=new URLSearchParams(window.location.search),i=e.variants[t];let n=i?.id;i||(n=t.toString()),a.set("variant",n),window.history.replaceState({},"",`${window.location.pathname}?${a.toString()}`)},dt=(0,o.useMemo)((()=>{const t=!!e.subscriptionEnabled,a=ve===g.BundleSize["12 Pack"]&&(Je||qe),n=s?.subscriptionEnabled,r=i.countryCode!==y.DEFAULT_SHOPIFY_COUNTRY.countryCode,l=(e=>e.some((e=>{const t=Ie[e].handle,a=Ie.find((e=>e.handle===t));return!a?.subscriptionEnabled})))(Me);return!je||r||!t||l||a&&!n}),[je,i.countryCode,e.subscriptionEnabled,Me,Je]),ut=(0,o.useMemo)((()=>Ie.some((e=>e.tags.includes("limited")))),[Ie]),pt=(0,o.useMemo)((()=>!i.featureInternationalization||tt.country===i.countryCode),[i.featureInternationalization,tt.country,i.countryCode]);return(0,v.useEffect)((()=>{i.showCart&&Ue(!1)}),[i.showCart]),(0,v.useEffect)((()=>{dt&&Ae("one-time")}),[dt]),(0,v.useEffect)((()=>{if(s&&We)return Ke(s?.variants[0]?.currentlyNotInStock),Ze(!s?.variants[0]?.availableForSale),void Ae("one-time");Ke((()=>0===e.variants[ve].quantityAvailable||e.variants[ve]?.currentlyNotInStock)),Ze(!e.variants[ve]?.availableForSale),Ae("one-time")}),[ve]),(0,v.useEffect)((()=>{ot(ve)}),[ve]),(0,n.jsxs)("div",{className:`${k} ProductDetailsContainer ${(qe||Je)&&N}`,children:[(0,n.jsx)("p",{className:`categoryLabel ${$}`,children:"Collagen Protein Bar"}),(0,n.jsx)("h1",{className:`${I} title ${w}`,dangerouslySetInnerHTML:{__html:Qe}}),(0,n.jsx)("div",{className:`starsContainer ${_}`,children:qe||Je||e.hideReviews||!e.reviews?.rating_average?null:(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)("a",{className:`starsRating ${B}`,href:t.mockProductDetailData.rating.reviewsHref,children:(0,n.jsx)(l.RatingStars,{rating:e.reviews?.rating_average,numberOfStars:5,starDimension:"20px",starRatedColor:"#000000",starEmptyColor:"#00000055"})}),(0,n.jsxs)("p",{className:D,children:["(",(0,p.truncateOneDecimal)(e?.reviews?.rating_average),")"]})]})}),(0,n.jsxs)("div",{className:`swatches varietySetContainer ${E} ${qe&&V} ${ut&&O}`,children:[Ie.filter((e=>!e.tags.includes("limited"))).map(((e,t)=>(0,n.jsx)("div",{className:"varietyDataSelector",children:(0,n.jsxs)("a",{href:`/products/${e.handle}`,className:"varietyDataSelectorLink",children:[(0,n.jsx)("img",{src:e.swatchImage,alt:`swatch for ${e.title}`}),(0,n.jsx)("div",{className:le,children:e.title})]})},t))),(0,n.jsx)("button",{children:(0,n.jsx)("a",{className:`linkVarietySet ${A}`,href:t.mockProductDetailData.varietyButton.href,children:t.mockProductDetailData.varietyButton.text})})]}),ut&&(lt?.length>0||x)?(0,n.jsxs)("div",{className:`varietySetContainer ${E} ${qe&&V} ${ut&&O}`,children:[Ie.filter((e=>e.tags.includes("limited"))).map(((e,t)=>(0,n.jsx)("div",{className:"varietyDataSelector",children:(0,n.jsxs)("a",{href:`/products/${e.handle}`,className:"varietyDataSelectorLink",children:[(0,n.jsx)("img",{src:e.swatchImage,alt:`swatch for ${e.title}`}),(0,n.jsx)("div",{className:le,children:e.title})]})},t))),lt?.length>0&&(0,n.jsx)("p",{class:`limitedEdition ${fe}`,children:"LIMITED EDITION"})]}):null,x&&!ut&&(0,n.jsx)("button",{className:`buttonGiftSet ${T}`,style:{marginBottom:"10px"},children:(0,n.jsx)("a",{className:`linkGiftSet ${F}`,href:t.mockProductDetailData.varsityHatButton.href,children:t.mockProductDetailData.varsityHatButton.text})}),(0,n.jsx)("p",{className:`description ${M}`,style:{fontSize:qe?"12px":"14px",lineHeight:qe?"18px":"21px",letterSpacing:qe?"normal":"-0.02em;",marginTop:ut?"8px":"0px"},children:We&&s?s.description:e.description}),(0,n.jsx)("div",{className:`freeFromContainer ${R} ${qe&&z}`,children:qe||Je?t.mockProductDetailData.mockTagsForVarietySet.map(((e,t)=>(0,n.jsx)("span",{children:e.substring(1).toLowerCase().includes("sugar")?"STEVIA":e.substring(1)},t))):e.tagsBadge.map(((e,t)=>(0,n.jsx)("span",{children:e.substring(1).toLowerCase().includes("sugar")?"STEVIA":e.substring(1)},t)))}),!qe&&!Je&&(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:L,onClick:()=>{De(!Be)},role:"button","aria-label":"Nutrition & Ingredients",children:[(0,n.jsx)("span",{children:"NUTRITION & INGREDIENTS"}),(0,n.jsx)("span",{className:ue,children:(0,n.jsx)(c.Arrow,{})})]}),Be&&(0,n.jsxs)("div",{className:H,children:[(0,n.jsx)("img",{src:e?.nutritionalImage?.reference.image.originalSrc,alt:`nutritional info for ${Qe} `,height:150,width:400}),(0,n.jsx)("p",{children:e?.nutritionalIngredients?.value}),(0,n.jsx)("p",{children:e?.allergensPanelText?.value}),(0,n.jsx)("div",{className:pe,children:e?.nutritionalBadges?.references.edges?.map(((e,t)=>(0,n.jsx)("img",{src:e.node.image.originalSrc,alt:e.node.image.altText,style:{height:"30px"}},t)))})]})]}),!qe&&!Je&&(0,n.jsxs)("div",{className:`bundles ${U}`,children:[e.options[0].values[0]&&(0,n.jsxs)("div",{onClick:()=>ot(g.BundleSize["20 Pack"]),role:"button","aria-label":"Select bundle",children:[(0,n.jsx)("button",{className:`${ve===g.BundleSize["20 Pack"]&&Y}`,children:e.options[0].values[0]}),(0,n.jsx)("span",{})]}),e.options[0].values[1]&&(0,n.jsxs)("div",{onClick:()=>ot(g.BundleSize["30 Pack"]),role:"button","aria-label":"Select bundle 2",children:[(0,n.jsx)("button",{className:`${ve===g.BundleSize["30 Pack"]&&Y}`,children:e.options[0].values[1]}),(0,n.jsxs)("span",{children:[`${at}${nt[0].toFixed(2)}`," EA."]})]}),e.options[0].values[2]&&(0,n.jsxs)("div",{onClick:()=>ot(g.BundleSize["12 Pack"]),role:"button","aria-label":"Select bundle 3",children:[(0,n.jsx)("button",{className:`${We&&Y}`,children:e.options[0].values[2]}),(0,n.jsxs)("span",{children:[`${at}${nt[1].toFixed(2)}`," EA."]})]})]}),qe&&(0,n.jsx)(m.StepSelection,{productPage:e,bundleSelected:ve,setBundleSelected:xe,bundlePriceEach:nt,varietySetIsComplete:Oe,setVarietySetIsComplete:Ve,selectedFlavorSet:Me,setSelectedFlavorSet:Re,currencySymbol:at,productsExpandYourPalate:Ie,countryCode:i.countryCode,featureInternationalization:i.featureInternationalization,twelvePackEnabled:x}),Je&&(0,n.jsx)(S.TwelvePackDetails,{isMobile:Ce,isVarietySet:qe,productsExpandYourPalate:Ie}),(0,n.jsxs)("div",{className:`priceContainer ${be}`,children:[(0,n.jsxs)("div",{className:`price ${K} ${qe&&J}`,children:[i.featureInternationalization&&(0,n.jsx)("div",{className:`currencyCodeStyle ${ge}`,children:`${it} `}),`${at}${Xe.toFixed(2)}`]}),!!et&&Xe!=et&&(0,n.jsxs)("div",{className:`regularPriceContainer ${Z} ${s&&We?q:""} ${qe&&J}`,children:[(0,n.jsxs)("span",{className:`regularPrice ${G}`,children:["$",et.toFixed(2)]}),(0,n.jsx)("span",{className:`sale ${W}`,children:"Sale"})]})]}),(0,n.jsxs)("div",{className:`${Q} productSubscription ${qe&&X}`,children:[(0,n.jsxs)("div",{onClick:e=>rt("one-time",e),role:"button","aria-label":"One-time purchase",children:[(0,n.jsx)("input",{type:"radio",id:"one-time",name:"subscription",checked:"one-time"===Ee,readOnly:!0}),(0,n.jsx)("span",{htmlFor:"one-time",children:"ONE-TIME PURCHASE"})]}),(0,n.jsxs)("div",{onClick:e=>{rt("club",e)},disabled:dt,role:"button","aria-label":"Subscription club",children:[(0,n.jsx)("input",{type:"radio",id:"club",name:"subscription",checked:"club"===Ee,readOnly:!0}),(0,n.jsx)("span",{htmlFor:"",children:"SUBSCRIPTION CLUB"}),(0,n.jsx)("label",{children:dt?"Not available":_e?.badge_text||"Save 10%"}),(0,n.jsxs)("button",{onClick:st,role:"button","aria-label":"Subscription details",children:["Details",(0,n.jsxs)("div",{className:`subscriptionInfo ${ee} ${Te&&te}`,children:[(0,n.jsx)("div",{children:(0,n.jsx)(d.Cross,{})}),(0,n.jsxs)("ul",{children:[(0,n.jsxs)("li",{children:[(0,n.jsx)(u.ArrowRightPopup,{}),"Delivers every 1 month"]}),(0,n.jsxs)("li",{children:[(0,n.jsx)(u.ArrowRightPopup,{}),"Pause, change, or cancel anytime"]}),(0,n.jsxs)("li",{style:"margin-bottom:unset;",children:[(0,n.jsx)(u.ArrowRightPopup,{}),"Early access to new flavors"]})]})]})]})]}),(0,n.jsx)("div",{className:`backgroundPopup ${ae} ${Te&&te}`,onClick:st,role:"button","aria-label":"Subscription details"})]}),(0,n.jsxs)("div",{className:`labelShipContainer ${re}`,style:{justifyContent:"US"===i.countryCode?"space-between":"center"},children:[(0,n.jsx)("p",{className:`labelShip ${ie} ${qe&&ne}`,children:"US"===i.countryCode&&(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)("span",{children:"★"})," Always Free Shipping"]})}),we&&(0,n.jsx)(f.GoogleBadge,{})]}),(0,n.jsxs)("div",{onClick:async()=>{if(He)return void console.log("loadingAddToCart");if(!ct)return void console.log("handleIsInProductsExpandYourPalate");if(0===Xe)return Ue(!1),void console.log("calculatedPrice === 0");if(!pt)return Ue(!1),void console.log("!isProductAvailableInCurrentCountry");if(Ue(!0),qe&&!Oe&&!We)return Le(!0),Ue(!1),setTimeout((()=>{Le(!1)}),2e3),void console.log("isVarietySet && !varietySetIsComplete && !isTwelvePackSelected");if(Ye||Ge)return Ue(!1),void console.log("isOOS || isUnavailable");let a=e.variants[ve];We&&s&&(a=s.variants[0]);const n={sku:a.sku||"",id:a.id,quantity:1,image:a.image.src,product_title:Qe?.replace(/<[^>]*>?/gm,""),variant_title:a.title,price:100*Xe,final_price:100*Xe,url:`https://starsandhoney.com/products/${e.handle}`,variant_id:Number(a.id),vendor:e.vendor,properties:{_compare_at_price:100*et,_rc_bundle_status:"club"===Ee?"Subscription":"One-Time"}};"club"===Ee&&(n.selling_plan=_e?.selling_plan_id);let r=[n];if(qe&&!We){const e=ve===g.BundleSize["20 Pack"]?t.dynamicBoxId20pack:t.dynamicBoxId30pack,s=(new Date).getTime();let l;r=Me.map((t=>{l=ve===g.BundleSize["20 Pack"]&&"one-time"===Ee?Ie[t].variants.find((e=>"10-PACK--"===e.title))?.id||"":ve===g.BundleSize["30 Pack"]&&"one-time"===Ee?Ie[t].variants.find((e=>"10-PACK---"===e.title))?.id||"":ve===g.BundleSize["20 Pack"]&&"club"===Ee?Ie[t].variants.find((e=>"10-PACK----"===e.title))?.id||"":ve===g.BundleSize["30 Pack"]&&"club"===Ee?Ie[t].variants.find((e=>"10-PACK-----"===e.title))?.id||"":Ie[t].variants.find((e=>"10-PACK--"===e.title))?.id||"";const a={id:l,productId:Ie[t].id,quantity:1,properties:{_dynamicBoxId:e,_dynamicBoxIndex:s,_rc_bundle_price:Xe.toString(),_rc_bundle_status:"club"===Ee?"Subscription":"One-Time",_rc_bundle_size:ve===g.BundleSize["20 Pack"]?"20-PACK":"30-PACK",_compare_at_price:100*et}};return Me.forEach(((e,t)=>{a.properties[`_rc_bundle_flavor${t+1}`]=Ie[e].title,a.properties[`_rc_bundle_flavor${t+1}_ID`]=Ie[e].id,a.properties[`Flavor ${t+1}`]=Ie[e].title})),"club"===Ee&&(a.selling_plan=_e?.selling_plan_id),a}));const c=(0,h.convertProductToPayload)({product:{...n,variant_title:1===ve?"30-PACK":"20-PACK",title:"Signature Flavors Variety Set"},additionalProperties:{"Flavor 1":Ie[Me[0]].title,"Flavor 2":Ie[Me[1]].title,...1===ve?{"Flavor 3":Ie[Me[2]].title}:{},_compare_at_price:100*et,_rc_bundle_status:"club"===Ee?"Subscription":"One-Time"},quantity:1,variant:{...a,title:1===ve?"30-PACK":"20-PACK",price:{...a.price,amount:$e(Xe).toString()}}});i.addFakeBundle({items:c?.items})}try{i.addToCart({items:r}),(0,C.logOutcome)("AddToBagFromProductPage")}catch(e){console.error(e),Ue(!1)}},role:"button","aria-label":"Add to bag",className:`addButton ${se} \n\t\t\t\t${(qe&&!Oe||!pt)&&!We&&oe}\n\t\t\t\t${(Ye||Ge)&&oe}\n\t\t\t\t${0===Xe&&oe}\n ${!ct&&oe}\n\t\t\t\t${qe&&de}\n\t\t\t\t${He&&he}\n\t\t\t\t`,children:[(0,n.jsxs)("button",{children:[Ge?"Unavailable":Ye?"Out of Stock":"Add to bag",He&&(0,n.jsx)("span",{className:me,children:(0,n.jsxs)("svg",{height:"18",width:"18",children:[(0,n.jsx)("circle",{r:"7",cx:"9",cy:"9"}),(0,n.jsx)("circle",{"stroke-dasharray":"87.96459430051421 87.96459430051421",r:"7",cx:"9",cy:"9"})]})})]}),ze&&(0,n.jsx)("div",{className:ce,children:"Please add more flavors"})]}),ye&&(We&&s?.shippingDate||e?.shippingDate)&&(0,n.jsxs)("div",{className:`shippingDate ${Pe}`,children:[(0,n.jsx)("div",{className:`shippingDateIcon ${ke}`,children:(0,n.jsx)(P.TruckIcon,{})}),(0,n.jsx)("div",{className:`shippingDateText ${Ne}`,children:We?s?.shippingDate:e?.shippingDate})]})]})}},70:function(e,t,a){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StepSelection=void 0;const n=a(0),r=a(2),s=i(a(38)),l=a(1),c=a(120),o=a(5),d=a(20),u=a(50),p=a(30),h=a(20),{selected:m,bundles:v,step2Container:x,backButton:b,varietySetContainer:g,varietyItem:j,varietyName:S,title:y,selectedOptionsContainer:C,selectedImagesContainer:f,modifyButton:P,stepIndicatorTitleContainer:k,columnDisplay:N,imageContainer:$,yourVarietySet:I,chosenFlavors:w,varietySetLimitedEdition:_,limitedEditionContainer:B,selectedOptionsLimitedEdition:D,bundleSubheading:E,desktopOnly:A,mobileOnly:T}=s.default;(0,o.setConfig)([{folder:"stars-honey",template:"https://cdn.shopify.com/s/files/1/0664/6100/8105/"},{folder:"stars-honey",template:"https://starsandhoney.com/cdn/shop/files/"}]),t.StepSelection=({productPage:e,bundleSelected:t,setBundleSelected:a,bundlePriceEach:i,varietySetIsComplete:s,setVarietySetIsComplete:o,selectedFlavorSet:F,setSelectedFlavorSet:O,currencySymbol:V,productsExpandYourPalate:M,countryCode:R,featureInternationalization:z,twelvePackEnabled:L})=>{const H=e=>{O((t=>[...t,e])),[...F,e].length===t+2&&o(!0)},U=(0,d.limitedProductByVariety)({productsExpandYourPalate:M,countryCode:R,featureInternationalization:z});return(0,l.useEffect)((()=>{O([]);let e=!1;t===p.BundleSize["12 Pack"]&&(e=!0),o(e)}),[t]),(0,l.useEffect)((()=>{O([]),o(!1)}),[R]),(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:`title ${y}`,children:[(0,n.jsx)("span",{children:"STEP 1"}),(0,n.jsx)("span",{children:"CHOOSE YOUR PACK SIZE"})]}),(0,n.jsxs)("div",{className:`bundles ${v}`,children:[L&&(0,n.jsxs)("div",{onClick:()=>a(2),children:[(0,n.jsx)("button",{className:`${t===p.BundleSize["12 Pack"]&&m}`,children:(0,h.toPackSize)("12 Pack")}),(0,n.jsx)("span",{className:E,children:"ALL FLAVORS"})]}),(0,n.jsxs)("div",{onClick:()=>a(0),children:[(0,n.jsx)("button",{className:`${t===p.BundleSize["20 Pack"]&&m}`,children:(0,h.toPackSize)(e.options[0].values[0])}),(0,n.jsxs)("span",{children:[`${V}${i[0].toFixed(2)}`," EA."]})]}),(0,n.jsxs)("div",{onClick:()=>a(1),children:[(0,n.jsx)("button",{className:`${t===p.BundleSize["30 Pack"]&&m}`,children:(0,h.toPackSize)(e.options[0].values[1])}),(0,n.jsxs)("span",{children:[`${V}${i[1].toFixed(2)}`," EA."]})]})]}),(0,n.jsx)("div",{style:{minHeight:"200px"},children:t===p.BundleSize["12 Pack"]?(0,n.jsx)(u.TwelvePackDetails,{productsExpandYourPalate:M}):(0,n.jsxs)("div",{className:`step2Container ${x}`,children:[s?(0,n.jsxs)("div",{className:y,children:[(0,n.jsx)("span",{children:"BUNDLE SUMMARY"}),(0,n.jsx)("span",{})]}):(0,n.jsxs)("div",{className:y,children:[(0,n.jsx)("span",{children:"STEP 2"}),(0,n.jsx)("span",{children:"CHOOSE YOUR FLAVORS"})]}),(0,n.jsxs)("div",{className:k,children:[(0,n.jsx)("div",{style:{color:0===F.length?"black":"#a0a0a0"},children:"FIRST FLAVOR"}),(0,n.jsx)(c.ArrowRight,{}),(0,n.jsx)("div",{style:{color:1===F.length?"black":"#a0a0a0"},children:"SECOND FLAVOR"}),(0,n.jsx)(c.ArrowRight,{}),t===p.BundleSize["30 Pack"]&&(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)("div",{style:{color:2===F.length?"black":"#a0a0a0"},children:"THIRD FLAVOR"}),(0,n.jsx)(c.ArrowRight,{})]}),(0,n.jsx)("div",{style:{color:s?"black":"#a0a0a0"},children:"SUMMARY"})]}),F.length>0&&(0,n.jsx)("button",{className:b,onClick:()=>{O((e=>e.slice(0,-1))),o(!1)},children:"Back"}),!s&&(0,n.jsx)("div",{className:`varietySetContainer ${g}`,style:{minHeight:"140px"},children:M.map(((e,t)=>!e.tags.includes("limited")&&(0,n.jsxs)("div",{className:j,onClick:()=>H(t),children:[(0,n.jsx)("img",{src:e.swatchImage,alt:e.title}),(0,n.jsx)("div",{className:`${S} ${A}`,children:e.title}),(0,n.jsx)("div",{className:`${S} ${T}`,children:e.title.split(/(?=Chip)/).map(((e,t)=>(0,n.jsxs)("div",{children:[e,0===t&&(0,n.jsx)("br",{})]},t)))})]},e.handle)))}),!s&&U.length>0&&(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:_,children:"LIMITED EDITION"}),(0,n.jsx)("div",{className:`varietySetContainer ${g} limitedEditionContainer ${B}`,children:M.map(((e,t)=>e.tags.includes("limited")&&(0,n.jsxs)("div",{className:j,onClick:()=>H(t),children:[(0,n.jsx)("img",{src:e.swatchImage,alt:e.title}),(0,n.jsx)("div",{className:`varietyName ${S} ${A}`,children:e.title}),(0,n.jsx)("div",{className:`varietyName ${S} ${T}`,children:e.varietyNameMobile||e.title})]},e.handle)))})]}),(0,n.jsxs)("div",{className:`${C} ${U.length>0?D:""}`,style:{alignItems:s?"flex-start":"center"},children:[(0,n.jsx)("h3",{children:s?(0,n.jsx)("div",{className:I,children:"Your Variety Set"}):F.length>0?(0,n.jsx)("div",{className:w,children:"CHOSEN FALVORS"}):""}),(0,n.jsx)("div",{className:`${f} ${s&&N}`,children:F.map(((e,t)=>(0,n.jsxs)("div",{className:j,children:[(0,n.jsx)("div",{className:$,"data-index":t+1,children:(0,n.jsx)("img",{src:M[e].swatchImage,alt:M[e].title})}),s&&(0,n.jsx)("span",{children:M[e].title})]},t)))}),s&&(0,n.jsx)("button",{className:P,onClick:()=>{O([]),o(!1)},children:"Modify"})]})]})})]})}},50:function(e,t,a){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TwelvePackDetails=void 0;const n=a(0),r=(a(2),a(120)),s=i(a(38)),l=a(182),c={"Cacao Salt Caramel Peanut":2,"Espresso Vanilla Cinnamon":1,"Dark Chocolate Coconut":1,"The Raspberry Donut":1,"Birthday Cake Chocolate Chip":1,"Peanut Butter Blackberry":1,"Cookies and Cream":1,"Cherry Chocolate Waffle Cone":2,"Maple Blueberry Muffin":2};t.TwelvePackDetails=({isMobile:e=!1,isVarietySet:t=!1,productsExpandYourPalate:a})=>(a.filter((e=>e.tags.includes("limited"))),(0,n.jsxs)("div",{className:`step2Container ${s.default.step2Container} `,children:[(0,n.jsxs)("div",{className:`title ${s.default.title} titleFlavors ${s.default.titleFlavors} `,children:[(0,n.jsx)("span",{children:"FLAVORS INCLUDED"}),(0,n.jsx)("span",{})]}),(0,n.jsxs)("div",{className:`stepIndicatorTitleContainer ${s.default.stepIndicatorTitleContainer} `,children:[(0,n.jsx)("div",{className:`stepperTitle ${s.default.stepperTitle}`,children:"12 PACK | ALL FLAVORS"}),(0,n.jsx)(r.ArrowRight,{})]}),a.some((e=>c[e.title]>0))?(0,n.jsx)("div",{className:s.default.varietySetContainer,children:Object.keys(c).map((t=>a.filter((e=>e.title===t)).map((t=>(0,n.jsxs)("div",{className:s.default.varietyItem,children:[(0,n.jsxs)("div",{className:`${s.default.varietyItemImage} varietyItemImage`,children:[(0,n.jsx)("img",{src:t.swatchImage,alt:t.title}),(0,n.jsx)(l.RoundedNumber,{number:c[t.title]})]}),(0,n.jsx)("div",{className:`varietyName ${s.default.varietyName}`,style:{cursor:"default"},children:e&&t.title.includes("Chip")?t.title.split(/(?=Chip)/).map(((e,a)=>(0,n.jsxs)("div",{children:[e,0===a?(0,n.jsx)("br",{}):` (${c[t.title]})`]},a))):`${t.title}`})]},t.handle)))))}):null]}))},120:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowRight=void 0;const i=a(0);t.ArrowRight=()=>(0,i.jsx)("svg",{width:"7",height:"11",viewBox:"0 0 7 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M1 10.2002L5 5.6002L1 1.0002",stroke:"black","stroke-width":"2"})})},182:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RoundedNumber=void 0;const i=a(0);t.RoundedNumber=({number:e})=>1===e?(0,i.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M8 0.5C12.1421 0.5 15.5 3.85786 15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5Z",fill:"white"}),(0,i.jsx)("path",{d:"M8 0.5C12.1421 0.5 15.5 3.85786 15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5Z",stroke:"black"}),(0,i.jsx)("path",{d:"M7.87 11V6.08H6.19V5.41C7.06 5.4 7.78 4.91 7.99 4H8.79V11H7.87Z",fill:"black"})]}):(0,i.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M8 0.5C12.1421 0.5 15.5 3.85786 15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5Z",fill:"white"}),(0,i.jsx)("path",{d:"M8 0.5C12.1421 0.5 15.5 3.85786 15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5Z",stroke:"black"}),(0,i.jsx)("path",{d:"M5.43 11C5.47 9.53 6.1 8.62 7.53 7.79L8 7.51C8.96 6.94 9.39 6.56 9.39 5.84C9.39 5.1 8.81 4.64 8.07 4.64C7.16 4.64 6.59 5.2 6.59 6.1H5.62C5.62 4.69 6.66 3.85 8.07 3.85C9.43 3.85 10.36 4.75 10.36 5.85C10.36 6.85 9.72 7.49 8.78 8.04L8.12 8.43C7.15 9 6.61 9.48 6.46 10.13H10.41V11H5.43Z",fill:"black"})]})},179:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowRightPopup=void 0;const i=a(0);a(2),t.ArrowRightPopup=function({}){return(0,i.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon--wide icon-arrow-right-long",viewBox:"0 0 21 10",children:(0,i.jsx)("path",{d:"M14.982 1.01l.696-.717 3.803 3.691.011-.01.338.348.359.348-.012.01.012.011-.354.343-.343.353-.011-.011-3.803 3.692-.696-.718 3.266-3.17H.5v-1h17.748z"})})}},191:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TruckIcon=void 0;const i=a(0);t.TruckIcon=()=>(0,i.jsxs)("svg",{fill:"none",viewBox:"0 0 17 17",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("g",{"clip-path":"url(#a)",children:(0,i.jsx)("path",{d:"m9.2708 3.5064c0.17893 0 0.35054 0.07108 0.47707 0.19761 0.12652 0.12652 0.19761 0.29813 0.19761 0.47707h2.6987c0.1016 0 0.2019 0.02293 0.2934 0.06709 0.0914 0.04416 0.1717 0.1084 0.2349 0.18794l0.0499 0.07286 2.0241 3.3734 0.0371 0.06949 0.027 0.0722 0.0195 0.07354 0.0108 0.07421 0.0021 0.05735v4.0481c0 0.1789-0.0711 0.3505-0.1976 0.4771-0.1266 0.1265-0.2982 0.1976-0.4771 0.1976h-0.7901c-0.1396 0.3946-0.3982 0.7361-0.74 0.9777s-0.7501 0.3714-1.1686 0.3714c-0.4186 0-0.8269-0.1298-1.1687-0.3714s-0.6003-0.5831-0.74-0.9777h-2.9295c-0.13967 0.3946-0.3982 0.7361-0.74001 0.9777s-0.75009 0.3714-1.1687 0.3714c-0.41858 0-0.82686-0.1298-1.1687-0.3714s-0.60033-0.5831-0.74-0.9777h-0.79005c-0.17894 0-0.35055-0.0711-0.47708-0.1976-0.12652-0.1266-0.1976-0.2982-0.1976-0.4771v-7.4215c0-0.35787 0.14216-0.70109 0.39521-0.95414 0.25306-0.25306 0.59627-0.39522 0.95415-0.39522h6.0721zm-4.0481 8.0962c-0.17894 0-0.35055 0.0711-0.47707 0.1976-0.12653 0.1265-0.19761 0.2982-0.19761 0.4771s0.07108 0.3505 0.19761 0.4771c0.12652 0.1265 0.29813 0.1976 0.47707 0.1976 0.17893 0 0.35054-0.0711 0.47707-0.1976 0.12652-0.1266 0.19761-0.2982 0.19761-0.4771s-0.07109-0.3506-0.19761-0.4771c-0.12653-0.1265-0.29814-0.1976-0.47707-0.1976zm6.7468 0c-0.179 0-0.3506 0.0711-0.4771 0.1976s-0.1976 0.2982-0.1976 0.4771 0.0711 0.3505 0.1976 0.4771c0.1265 0.1265 0.2981 0.1976 0.4771 0.1976 0.1789 0 0.3505-0.0711 0.477-0.1976 0.1266-0.1266 0.1976-0.2982 0.1976-0.4771s-0.071-0.3506-0.1976-0.4771c-0.1265-0.1265-0.2981-0.1976-0.477-0.1976zm0.2928-6.0721h-2.3169v2.024h3.5313l-1.2144-2.024z",fill:"#000"})}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"a",children:(0,i.jsx)("rect",{transform:"translate(.5 .80762)",width:"16.192",height:"16.192",fill:"#fff"})})})]})},185:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getCalculatedPrice=void 0;const i=a(30);t.getCalculatedPrice=({productPage:e,selectedSubscription:t,bundleSelected:a,twelvePack:n,isVarietySet:r,regularPrice:s,priceFromVariant:l,subscriptionClubData:c})=>{if(r&&a===i.BundleSize["12 Pack"]){if(n){if(s)return Number(n.variants[0]?.compareAtPrice?.amount);if("club"===t){const e=l(n.variants[0]);return Number(e?.amount)*(1-(c?.discount_percentage||0)/100)}return Number(n.variants[0]?.price?.amount)}return Number(76)}if("club"===t){if(s)return Number(e.variants[a]?.compareAtPrice?.amount);const t=l(e.variants[a]);return Number(t?.amount)*(1-(c?.discount_percentage||0)/100)}{if(s)return Number(e.variants[a]?.compareAtPrice?.amount);const t=l(e.variants[a]);return Number(t?.amount)}}}}]);