"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(60)),l=a(20),c=a(59),o=a(1),d=a(33),u=a(204),m=a(14),p=a(34),h=a(86),v=a(1),x=a(46),b=a(21),S=a(26),j=a(208),y=a(55),g=a(7),C=a(6),f=a(50);"undefined"!=typeof window&&(window.Buffer=x.Buffer);const{mainContainer:P,mainContainerVarietySet:k,categoryLabel:N,title:$,titleTwelvePack:I,starsContainer:w,starsRating:_,ratingNumber:B,varietySetContainer:E,linkVarietySet:A,buttonGiftSet:F,linkGiftSet:D,varietySetContainerHolidays:O,varietySetContainerForVarietySetPDP:T,description:V,freeFromContainer:R,freeFromContainerVarietySet:M,nutritionContainer:z,nutritionImageContainer:L,bundles:H,selected:U,price:Y,regularPrice:K,regularPriceContainer:G,regularPriceContainerTwelvePack:Z,saleText:q,priceVarietySet:W,productSubscription:J,productSubscriptionIsVariety:Q,subscriptionInfo:X,showContainer:ee,backgroundPopup:te,labelShip:ae,labelShipVarietySet:ie,labelShipContainer:ne,addButton:re,varietyHoverName:se,moreFlavorsAlert:le,disabled:ce,addButtonVarietySet:oe,nutritionArrowContainer:de,badgesContainer:ue,buttonLoading:me,buttonLoader:pe,freeHatContainer:he,plusSymbol:ve,priceContainer:xe,currencyCodeStyle:be,freeBadge:Se,brandHat:je,brandHatItalic:ye,hatFlex:ge,limitedEdition:Ce}=s.default,fe=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:he,setBundleSelected:ve,isSubscriptionEnabled:Se,featureSalePrice:je,isMobile:ye=!1,productsExpandYourPalate:ge,featureGoogleBadge:Pe,subscriptionClubData:ke}){const[Ne,$e]=(0,o.useState)(!1),[Ie,we]=(0,o.useState)("one-time"),[_e,Be]=(0,o.useState)(!1),[Ee,Ae]=(0,o.useState)(!1),[Fe,De]=(0,o.useState)([]),[Oe,Te]=(0,o.useState)(!1),[Ve,Re]=(0,o.useState)(!1),[Me,ze]=(0,o.useState)(!1),[Le,He]=(0,o.useState)(!1),Ue=e.handle===S.bundlePackVarietySetHandle,Ye=he===S.BundleSize["12 Pack"],Ke=e.handle===S.twelvePackHandle||e.handle===S.twelvePackStoreHandle,Ge=Ye&&s?(0,b.modifyTitle)(s.title):(0,b.modifyTitle)(e.title),Ze=(0,j.getCalculatedPrice)({productPage:e,selectedSubscription:Ie,bundleSelected:he,twelvePack:s,isVarietySet:Ue,priceFromVariant:i.priceFromVariant,subscriptionClubData:ke}),qe=je?(0,j.getCalculatedPrice)({productPage:e,selectedSubscription:Ie,bundleSelected:he,twelvePack:s,isVarietySet:Ue,regularPrice:!0,priceFromVariant:i.priceFromVariant,subscriptionClubData:ke}):0,We=(0,o.useMemo)((()=>Ye&&s?i.priceFromVariant(s.variants[0]):i.priceFromVariant(e.variants[he])),[e.variants,he,i.countryCode]),Je=(0,o.useMemo)((()=>We.currencySymbol),[We]),Qe=(0,o.useMemo)((()=>(0,g.currencyCodeIfneeded)({currencySymbol:We.currencySymbol,featureInternationalization:i.featureInternationalization,countryCode:i.countryCode,currencyCode:We.currencyCode})),[Je,We,i]),Xe=(0,o.useMemo)((()=>{const t="club"===Ie?(ke?.discount_percentage||0)/100:0,a=i.priceFromVariant(e.variants[Ue?0:1]),n=i.priceFromVariant(e.variants[Ue?1:2]);return[a.amount*(1-t)/20,n.amount*(1-t)/30]}),[e.variants,i.priceFromVariant,i.countryCode,Ie,Ue]),et=(e,t)=>{if(rt)return t?.preventDefault(),void we("one-time");we(e)},tt=()=>{Be(!_e)},at=(e.tags.includes("limited"),(0,b.limitedProductByVariety)({productsExpandYourPalate:ge,countryCode:i.countryCode,featureInternationalization:i.featureInternationalization})),it=(0,o.useMemo)((()=>ge.some((t=>t.handle===e.handle))||e.handle===S.bundlePackVarietySetHandle),[ge,e.handle]),nt=t=>{ve(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()}`)},rt=(0,o.useMemo)((()=>{const t=!!e.subscriptionEnabled,a=he===S.BundleSize["12 Pack"]&&(Ke||Ue),n=s?.subscriptionEnabled,r=i.countryCode!==g.DEFAULT_SHOPIFY_COUNTRY.countryCode,l=(e=>e.some((e=>{const t=ge[e].handle,a=ge.find((e=>e.handle===t));return!a?.subscriptionEnabled})))(Fe);return!Se||r||!t||l||a&&!n}),[Se,i.countryCode,e.subscriptionEnabled,Fe,Ke]),st=(0,o.useMemo)((()=>ge.some((e=>e.tags.includes("limited")))),[ge]),lt=(0,o.useMemo)((()=>!i.featureInternationalization||We.country===i.countryCode),[i.featureInternationalization,We.country,i.countryCode]);return(0,v.useEffect)((()=>{i.showCart&&Re(!1)}),[i.showCart]),(0,v.useEffect)((()=>{rt&&we("one-time")}),[rt]),(0,v.useEffect)((()=>{if(s&&Ye)return ze(s?.variants[0]?.currentlyNotInStock),He(!s?.variants[0]?.availableForSale),void we("one-time");ze((()=>0===e.variants[he].quantityAvailable||e.variants[he]?.currentlyNotInStock)),He(!e.variants[he]?.availableForSale),we("one-time")}),[he]),(0,v.useEffect)((()=>{nt(he)}),[he]),(0,n.jsxs)("div",{className:`${P} ProductDetailsContainer ${(Ue||Ke)&&k}`,children:[(0,n.jsx)("p",{className:`categoryLabel ${N}`,children:"Collagen Protein Bar"}),(0,n.jsx)("h1",{className:`${$} title ${I}`,dangerouslySetInnerHTML:{__html:Ge}}),(0,n.jsx)("div",{className:`starsContainer ${w}`,children:Ue||Ke||e.hideReviews||!e.reviews?.rating_average?null:(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)("a",{className:`starsRating ${_}`,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:B,children:["(",(0,m.truncateOneDecimal)(e?.reviews?.rating_average),")"]})]})}),(0,n.jsxs)("div",{className:`swatches varietySetContainer ${E} ${Ue&&T} ${st&&O}`,children:[ge.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:se,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})})]}),st&&(at?.length>0||x)?(0,n.jsxs)("div",{className:`varietySetContainer ${E} ${Ue&&T} ${st&&O}`,children:[ge.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:se,children:e.title})]})},t))),at?.length>0&&(0,n.jsx)("p",{class:`limitedEdition ${Ce}`,children:"LIMITED EDITION"})]}):null,x&&!st&&(0,n.jsx)("button",{className:`buttonGiftSet ${F}`,style:{marginBottom:"10px"},children:(0,n.jsx)("a",{className:`linkGiftSet ${D}`,href:t.mockProductDetailData.varsityHatButton.href,children:t.mockProductDetailData.varsityHatButton.text})}),(0,n.jsx)("p",{className:`description ${V}`,style:{fontSize:Ue?"12px":"14px",lineHeight:Ue?"18px":"21px",letterSpacing:Ue?"normal":"-0.02em;",marginTop:st?"8px":"0px"},children:Ye&&s?s.description:e.description}),(0,n.jsx)("div",{className:`freeFromContainer ${R} ${Ue&&M}`,children:Ue||Ke?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)))}),!Ue&&!Ke&&(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:z,onClick:()=>{$e(!Ne)},role:"button","aria-label":"Nutrition & Ingredients",children:[(0,n.jsx)("span",{children:"NUTRITION & INGREDIENTS"}),(0,n.jsx)("span",{className:de,children:(0,n.jsx)(c.Arrow,{})})]}),Ne&&(0,n.jsxs)("div",{className:L,children:[(0,n.jsx)("img",{src:e?.nutritionalImage?.reference.image.originalSrc,alt:`nutritional info for ${Ge} `,height:150,width:400}),(0,n.jsx)("p",{children:e?.nutritionalIngredients?.value}),(0,n.jsx)("div",{className:ue,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)))})]})]}),!Ue&&!Ke&&(0,n.jsxs)("div",{className:`bundles ${H}`,children:[e.options[0].values[0]&&(0,n.jsxs)("div",{onClick:()=>nt(S.BundleSize["20 Pack"]),role:"button","aria-label":"Select bundle",children:[(0,n.jsx)("button",{className:`${he===S.BundleSize["20 Pack"]&&U}`,children:e.options[0].values[0]}),(0,n.jsx)("span",{})]}),e.options[0].values[1]&&(0,n.jsxs)("div",{onClick:()=>nt(S.BundleSize["30 Pack"]),role:"button","aria-label":"Select bundle 2",children:[(0,n.jsx)("button",{className:`${he===S.BundleSize["30 Pack"]&&U}`,children:e.options[0].values[1]}),(0,n.jsxs)("span",{children:[`${Je}${Xe[0].toFixed(2)}`," EA."]})]}),e.options[0].values[2]&&(0,n.jsxs)("div",{onClick:()=>nt(S.BundleSize["12 Pack"]),role:"button","aria-label":"Select bundle 3",children:[(0,n.jsx)("button",{className:`${Ye&&U}`,children:e.options[0].values[2]}),(0,n.jsxs)("span",{children:[`${Je}${Xe[1].toFixed(2)}`," EA."]})]})]}),Ue&&(0,n.jsx)(h.StepSelection,{productPage:e,bundleSelected:he,setBundleSelected:ve,bundlePriceEach:Xe,varietySetIsComplete:Ee,setVarietySetIsComplete:Ae,selectedFlavorSet:Fe,setSelectedFlavorSet:De,currencySymbol:Je,productsExpandYourPalate:ge,countryCode:i.countryCode,featureInternationalization:i.featureInternationalization,twelvePackEnabled:x}),Ke&&(0,n.jsx)(y.TwelvePackDetails,{isMobile:ye,isVarietySet:Ue,productsExpandYourPalate:ge}),(0,n.jsxs)("div",{className:`priceContainer ${xe}`,children:[(0,n.jsxs)("div",{className:`price ${Y} ${Ue&&W}`,children:[i.featureInternationalization&&(0,n.jsx)("div",{className:`currencyCodeStyle ${be}`,children:`${Qe} `}),`${Je}${Ze.toFixed(2)}`]}),!!qe&&Ze!=qe&&(0,n.jsxs)("div",{className:`regularPriceContainer ${G} ${s&&Ye?Z:""} ${Ue&&W}`,children:[(0,n.jsxs)("span",{className:`regularPrice ${K}`,children:["$",qe.toFixed(2)]}),(0,n.jsx)("span",{className:`sale ${q}`,children:"Sale"})]})]}),(0,n.jsxs)("div",{className:`${J} productSubscription ${Ue&&Q}`,children:[(0,n.jsxs)("div",{onClick:e=>et("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"===Ie,readOnly:!0}),(0,n.jsx)("span",{htmlFor:"one-time",children:"ONE-TIME PURCHASE"})]}),(0,n.jsxs)("div",{onClick:e=>{et("club",e)},disabled:rt,role:"button","aria-label":"Subscription club",children:[(0,n.jsx)("input",{type:"radio",id:"club",name:"subscription",checked:"club"===Ie,readOnly:!0}),(0,n.jsx)("span",{htmlFor:"",children:"SUBSCRIPTION CLUB"}),(0,n.jsx)("label",{children:rt?"Not available":ke?.badge_text||"Save 10%"}),(0,n.jsxs)("button",{onClick:tt,role:"button","aria-label":"Subscription details",children:["Details",(0,n.jsxs)("div",{className:`subscriptionInfo ${X} ${_e&&ee}`,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 ${te} ${_e&&ee}`,onClick:tt,role:"button","aria-label":"Subscription details"})]}),(0,n.jsxs)("div",{className:`labelShipContainer ${ne}`,style:{justifyContent:"US"===i.countryCode?"space-between":"center"},children:[(0,n.jsx)("p",{className:`labelShip ${ae} ${Ue&&ie}`,children:"US"===i.countryCode&&(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)("span",{children:"★"})," Always Free Shipping"]})}),Pe&&(0,n.jsx)(f.GoogleBadge,{})]}),(0,n.jsxs)("div",{onClick:async()=>{if(Ve)return void console.log("loadingAddToCart");if(!it)return void console.log("handleIsInProductsExpandYourPalate");if(0===Ze)return Re(!1),void console.log("calculatedPrice === 0");if(!lt)return Re(!1),void console.log("!isProductAvailableInCurrentCountry");if(Re(!0),Ue&&!Ee&&!Ye)return Te(!0),Re(!1),setTimeout((()=>{Te(!1)}),2e3),void console.log("isVarietySet && !varietySetIsComplete && !isTwelvePackSelected");if(Me||Le)return Re(!1),void console.log("isOOS || isUnavailable");let a=e.variants[he];Ye&&s&&(a=s.variants[0]);const n={sku:a.sku||"",id:a.id,quantity:1,image:a.image.src,product_title:Ge?.replace(/<[^>]*>?/gm,""),variant_title:a.title,price:100*Ze,final_price:100*Ze,url:`https://starsandhoney.com/products/${e.handle}`,variant_id:Number(a.id),vendor:e.vendor,properties:{_compare_at_price:100*qe,_rc_bundle_status:"club"===Ie?"Subscription":"One-Time"}};"club"===Ie&&(n.selling_plan=ke?.selling_plan_id);let r=[n];if(Ue&&!Ye){const e=he===S.BundleSize["20 Pack"]?t.dynamicBoxId20pack:t.dynamicBoxId30pack,s=(new Date).getTime();let l;r=Fe.map((t=>{l=he===S.BundleSize["20 Pack"]&&"one-time"===Ie?ge[t].variants.find((e=>"10-PACK--"===e.title))?.id||"":he===S.BundleSize["30 Pack"]&&"one-time"===Ie?ge[t].variants.find((e=>"10-PACK---"===e.title))?.id||"":he===S.BundleSize["20 Pack"]&&"club"===Ie?ge[t].variants.find((e=>"10-PACK----"===e.title))?.id||"":he===S.BundleSize["30 Pack"]&&"club"===Ie?ge[t].variants.find((e=>"10-PACK-----"===e.title))?.id||"":ge[t].variants.find((e=>"10-PACK--"===e.title))?.id||"";const a={id:l,productId:ge[t].id,quantity:1,properties:{_dynamicBoxId:e,_dynamicBoxIndex:s,_rc_bundle_price:Ze.toString(),_rc_bundle_status:"club"===Ie?"Subscription":"One-Time",_rc_bundle_size:he===S.BundleSize["20 Pack"]?"20-PACK":"30-PACK",_compare_at_price:100*qe}};return Fe.forEach(((e,t)=>{a.properties[`_rc_bundle_flavor${t+1}`]=ge[e].title,a.properties[`_rc_bundle_flavor${t+1}_ID`]=ge[e].id,a.properties[`Flavor ${t+1}`]=ge[e].title})),"club"===Ie&&(a.selling_plan=ke?.selling_plan_id),a}));const c=(0,p.convertProductToPayload)({product:{...n,variant_title:1===he?"30-PACK":"20-PACK",title:"Signature Flavors Variety Set"},additionalProperties:{"Flavor 1":ge[Fe[0]].title,"Flavor 2":ge[Fe[1]].title,...1===he?{"Flavor 3":ge[Fe[2]].title}:{},_compare_at_price:100*qe,_rc_bundle_status:"club"===Ie?"Subscription":"One-Time"},quantity:1,variant:{...a,title:1===he?"30-PACK":"20-PACK",price:{...a.price,amount:fe(Ze).toString()}}});i.addFakeBundle({items:c?.items})}try{i.addToCart({items:r}),(0,C.logOutcome)("AddToBagFromProductPage")}catch(e){console.error(e),Re(!1)}},role:"button","aria-label":"Add to bag",className:`addButton ${re} \n\t\t\t\t${(Ue&&!Ee||!lt)&&!Ye&&ce}\n\t\t\t\t${(Me||Le)&&ce}\n\t\t\t\t${0===Ze&&ce}\n ${!it&&ce}\n\t\t\t\t${Ue&&oe}\n\t\t\t\t${Ve&&me}\n\t\t\t\t`,children:[(0,n.jsxs)("button",{children:[Le?"Unavailable":Me?"Out of Stock":"Add to bag",Ve&&(0,n.jsx)("span",{className:pe,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"})]})})]}),Oe&&(0,n.jsx)("div",{className:le,children:"Please add more flavors"})]})]})}},86: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(45)),l=a(1),c=a(135),o=a(5),d=a(21),u=a(55),m=a(26),p=a(21),{selected:h,bundles:v,step2Container:x,backButton:b,varietySetContainer:S,varietyItem:j,varietyName:y,title:g,selectedOptionsContainer:C,selectedImagesContainer:f,modifyButton:P,stepIndicatorTitleContainer:k,columnDisplay:N,imageContainer:$,yourVarietySet:I,chosenFlavors:w,varietySetLimitedEdition:_,limitedEditionContainer:B,selectedOptionsLimitedEdition:E,bundleSubheading:A,desktopOnly:F,mobileOnly:D}=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:O,setSelectedFlavorSet:T,currencySymbol:V,productsExpandYourPalate:R,countryCode:M,featureInternationalization:z,twelvePackEnabled:L})=>{const H=e=>{T((t=>[...t,e])),[...O,e].length===t+2&&o(!0)},U=(0,d.limitedProductByVariety)({productsExpandYourPalate:R,countryCode:M,featureInternationalization:z});return(0,l.useEffect)((()=>{T([]);let e=!1;t===m.BundleSize["12 Pack"]&&(e=!0),o(e)}),[t]),(0,l.useEffect)((()=>{T([]),o(!1)}),[M]),(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:`title ${g}`,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===m.BundleSize["12 Pack"]&&h}`,children:(0,p.toPackSize)("12 Pack")}),(0,n.jsx)("span",{className:A,children:"ALL FLAVORS"})]}),(0,n.jsxs)("div",{onClick:()=>a(0),children:[(0,n.jsx)("button",{className:`${t===m.BundleSize["20 Pack"]&&h}`,children:(0,p.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===m.BundleSize["30 Pack"]&&h}`,children:(0,p.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===m.BundleSize["12 Pack"]?(0,n.jsx)(u.TwelvePackDetails,{productsExpandYourPalate:R}):(0,n.jsxs)("div",{className:`step2Container ${x}`,children:[s?(0,n.jsxs)("div",{className:g,children:[(0,n.jsx)("span",{children:"BUNDLE SUMMARY"}),(0,n.jsx)("span",{})]}):(0,n.jsxs)("div",{className:g,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===O.length?"black":"#a0a0a0"},children:"FIRST FLAVOR"}),(0,n.jsx)(c.ArrowRight,{}),(0,n.jsx)("div",{style:{color:1===O.length?"black":"#a0a0a0"},children:"SECOND FLAVOR"}),(0,n.jsx)(c.ArrowRight,{}),t===m.BundleSize["30 Pack"]&&(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)("div",{style:{color:2===O.length?"black":"#a0a0a0"},children:"THIRD FLAVOR"}),(0,n.jsx)(c.ArrowRight,{})]}),(0,n.jsx)("div",{style:{color:s?"black":"#a0a0a0"},children:"SUMMARY"})]}),O.length>0&&(0,n.jsx)("button",{className:b,onClick:()=>{T((e=>e.slice(0,-1))),o(!1)},children:"Back"}),!s&&(0,n.jsx)("div",{className:`varietySetContainer ${S}`,style:{minHeight:"140px"},children:R.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:`${y} ${F}`,children:e.title}),(0,n.jsx)("div",{className:`${y} ${D}`,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 ${S} limitedEditionContainer ${B}`,children:R.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 ${y} ${F}`,children:e.title}),(0,n.jsx)("div",{className:`varietyName ${y} ${D}`,children:e.varietyNameMobile||e.title})]},e.handle)))})]}),(0,n.jsxs)("div",{className:`${C} ${U.length>0?E:""}`,style:{alignItems:s?"flex-start":"center"},children:[(0,n.jsx)("h3",{children:s?(0,n.jsx)("div",{className:I,children:"Your Variety Set"}):O.length>0?(0,n.jsx)("div",{className:w,children:"CHOSEN FALVORS"}):""}),(0,n.jsx)("div",{className:`${f} ${s&&N}`,children:O.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:R[e].swatchImage,alt:R[e].title})}),s&&(0,n.jsx)("span",{children:R[e].title})]},t)))}),s&&(0,n.jsx)("button",{className:P,onClick:()=>{T([]),o(!1)},children:"Modify"})]})]})})]})}},55: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(135)),s=i(a(45)),l=a(205),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]}))},135:(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"})})},205:(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"})]})},204:(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"})})}},208:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getCalculatedPrice=void 0;const i=a(26);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"])return Number(n?s?n.variants[0]?.compareAtPrice?.amount:n.variants[0]?.price?.amount: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)}}}}]);