"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[5],{79:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.sellingPlans=a.convertProductToPayload=void 0,a.convertProductToPayload=({product:e,variant:a,quantity:t=1,additionalProperties:i})=>{let r=100*parseFloat(a.price.amount);return isNaN(r)&&(r="--"),{items:[{id:a.id,quantity:t,image:a.image?.src??"",product_title:e.title,price:r,variant_title:a.title.includes("Default")||a.title===e.title?"":a.title,properties:{...i},final_price:r,variant_id:Number(a.id),url:`/products/${e.handle}`,vendor:e.vendor,sku:a.sku}]}},a.sellingPlans={"peanut-butter-blackberry":3397714153,"the-raspberry-donut":3397746921,"cookies-and-cream":3397681385,"birthday-cake-chocolate-chip":3397517545,"dark-chocolate-coconut":3311567081,"espresso-vanilla-cinnamon":3311599849,"cacao-salt-caramel-peanut":3311468777,"signature-flavors-variety-set":3320348905,"peppermint-mocha":3723198697,"gingerbread-cookie":3723231465,"cherry-chocolate-waffle-cone":4219338985}},22:function(e,a,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.ProductDetails=a.mockProductDetailData=void 0;const r=t(0),s=(t(1),i(t(157))),n=t(38),l=t(77),c=t(2),o=t(78),d=t(361),u=t(16),m=t(79),p=t(127),v=t(338),h=t(338),y=t(2),b=t(75),k=t(159),g=t(81),f=t(6),x=t(61);"undefined"!=typeof window&&(window.Buffer=b.Buffer);const{mainContainer:j,mainContainerVarietySet:I,categoryLabel:D,title:S,titleTwelvePack:P,starsContainer:N,starsRating:C,ratingNumber:_,varietySetContainer:$,linkVarietySet:T,buttonGiftSet:w,linkGiftSet:O,varietySetContainerHolidays:F,varietySetContainerForVarietySetPDP:B,description:E,freeFromContainer:A,freeFromContainerVarietySet:L,nutritionContainer:V,nutritionImageContainer:H,bundles:R,selected:M,price:z,regularPrice:U,regularPriceContainer:G,regularPriceContainerTwelvePack:K,saleText:q,priceVarietySet:Y,productSubscription:W,productSubscriptionIsVariety:Z,subscriptionInfo:J,showContainer:Q,backgroundPopup:X,labelShip:ee,labelShipVarietySet:ae,addButton:te,varieryHoverName:ie,moreFlavorsAlert:re,disabled:se,addButtonVarietySet:ne,nutritionArrowContainer:le,badgesContainer:ce,buttonLoading:oe,buttonLoader:de,freeHatContainer:ue,plusSymbol:me,priceContainer:pe,freeBadge:ve,brandHat:he,brandHatItalic:ye,hatFlex:be,limitedEdition:ke}=s.default,ge=e=>98===e?98.01:e;a.mockProductDetailData={rating:{reviewsHref:"https://starsandhoney.com/pages/reviews"},varietyData:[{handle:"cacao-salt-caramel-peanut",isLimited:!1,key:0,productId:"7979585765609",sellingPlan:"3311468777",variantId20packOneTime:"47528498233577",variantId20packSubs:"47531488510185",variantId30packOneTime:"47531487789289",variantId30packSubs:"47531491033321",varietyHref:"/products/cacao-salt-caramel-peanut",varietyImage:(0,f.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/product-ser-cscp.webp?v=1679889773"),varietyName:"Cacao Salt Caramel Peanut"},{handle:"espresso-vanilla-cinnamon",isLimited:!1,key:1,productId:"7979587338473",sellingPlan:"3311599849",variantId20packOneTime:"47531592351977",variantId20packSubs:"47531592909033",variantId30packOneTime:"47531592679657",variantId30packSubs:"47531593892073",varietyHref:"/products/espresso-vanilla-cinnamon",varietyImage:(0,f.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/product-ser-evc.webp?v=1679889773"),varietyName:"Espresso Vanilla Cinnamon"},{handle:"dark-chocolate-coconut",isLimited:!1,key:2,productId:"7974127075561",sellingPlan:"3311567081",variantId20packOneTime:"47531585470697",variantId20packSubs:"47531586715881",variantId30packOneTime:"47531585732841",variantId30packSubs:"47531586945257",varietyHref:"/products/dark-chocolate-coconut",varietyImage:(0,f.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/product-ser-dcc.webp?v=1679889773"),varietyName:"Dark Chocolate Coconut"},{handle:"the-raspberry-donut",isLimited:!1,key:3,productId:"8175526805737",sellingPlan:"3397746921",variantId20packOneTime:"47531597332713",variantId20packSubs:"47531597791465",variantId30packOneTime:"47531597529321",variantId30packSubs:"47531597889769",varietyHref:"/products/the-raspberry-donut",varietyImage:(0,f.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/Screenshot_2023-08-28_at_0.08.57.png?v=1693170564"),varietyName:"The Raspberry Donut"},{handle:"birthday-cake-chocolate-chip",isLimited:!1,key:4,productId:"8175526543593",sellingPlan:"3397517545",variantId20packOneTime:"47531549065449",variantId20packSubs:"47531552669929",variantId30packOneTime:"47531551555817",variantId30packSubs:"47531554046185",varietyHref:"/products/birthday-cake-chocolate-chip",varietyImage:(0,f.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/flavorBirthdayCake.webp?v=1737547811"),varietyName:"Birthday Cake Chocolate Chip"},{handle:"peanut-butter-blackberry",isLimited:!1,key:5,productId:"8175527264489",sellingPlan:"3397714153",variantId20packOneTime:"47531595399401",variantId20packSubs:"47531595792617",variantId30packOneTime:"47531595727081",variantId30packSubs:"47531595890921",varietyHref:"/products/peanut-butter-blackberry",varietyImage:(0,f.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/Screenshot_2023-08-28_at_0.06.22.png?v=1693170402"),varietyName:"Peanut Butter Blackberry"},{handle:"cookies-and-cream",isLimited:!1,key:6,productId:"8175526936809",sellingPlan:"3397681385",variantId20packOneTime:"47531582554345",variantId20packSubs:"47531583013097",variantId30packOneTime:"47531582750953",variantId30packSubs:"47531583209705",varietyHref:"/products/cookies-and-cream",varietyImage:(0,f.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/flavorCookies.webp?v=1737548094"),varietyName:"Cookies and Cream"},{handle:"peppermint-mocha",isLimited:!0,key:7,productId:"8215147774185",sellingPlan:"3397681385",variantId20packOneTime:"47852450709737",variantId20packSubs:"47852450775273",variantId30packOneTime:"47852450742505",variantId30packSubs:"47852450808041",varietyHref:"/products/peppermint-mocha",varietyImage:(0,f.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/product-ser-cscp_a786edca-5e00-48b8-9b27-d6a428c27aa4.webp?v=1729177302"),varietyName:"Peppermint Mocha"},{handle:"gingerbread-cookie",isLimited:!0,key:8,productId:"8778176594153",sellingPlan:"3397681385",variantId20packOneTime:"47852164317417",variantId20packSubs:"47852164382953",variantId30packOneTime:"47852164350185",variantId30packSubs:"47852164415721",varietyHref:"/products/gingerbread-cookie",varietyImage:(0,f.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/gingerbread-thumb.webp?v=1729264305"),varietyName:"Gingerbread Cookie"},{handle:"cherry-chocolate-waffle-cone",isLimited:!0,key:8,productId:"8838921027817",sellingPlan:"4219338985",variantId20packOneTime:"48059240415465",variantId20packSubs:"48059240481001",variantId30packOneTime:"48059240448233",variantId30packSubs:"48059240513769",varietyHref:"/products/cherry-chocolate-waffle-cone",varietyImage:(0,f.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/cherry-chocolate.webp?v=1737726665"),varietyName:"Cherry Chocolate Waffle Cone"}],varietyButton:{href:"/products/signature-flavors-variety-set",text:"Variety Set"},varsityHatButton:{href:"/products/signature-tasting-gift-set-12-pack",text:"GIFT SET"},clubDiscount:.1,mockTagsForVarierySet:["⃠ 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"};const fe=({productPage:e,selectedSubscription:t,bundleSelected:i,twelvePack:r,isVarietySet:s,regularPrice:n})=>i===g.BundleSize["12 Pack"]&&s?Number(r?n?r.variants[0]?.compareAtPrice?.amount:r.variants[0]?.price?.amount:76):"club"===t?n?Number(e.variants[i]?.compareAtPrice?.amount):Number(e.variants[i]?.price?.amount)*(1-a.mockProductDetailData.clubDiscount):Number(n?e.variants[i]?.compareAtPrice?.amount:e.variants[i]?.price?.amount);a.ProductDetails=function({productPage:e,useSharedState:t,limitedEditionFlags:i,twelvePack:s,twelvePackEnabled:b,bundleSelected:ve,setBundleSelected:xe,isSubscriptionEnabled:je,featureSalePrice:Ie,isMobile:De=!1}){const[Se,Pe]=(0,c.useState)(!1),[Ne,Ce]=(0,c.useState)("one-time"),[_e,$e]=(0,c.useState)(!1),[Te,we]=(0,c.useState)(!1),[Oe,Fe]=(0,c.useState)([]),[Be,Ee]=(0,c.useState)(!1),[Ae,Le]=(0,c.useState)(!1),[Ve,He]=(0,c.useState)(!1),[Re,Me]=(0,c.useState)(!1),[ze,Ue]=(0,c.useState)(e.title),Ge="signature-flavors-variety-set"===e.handle,Ke="signature-tasting-gift-set-12-pack"===e.handle,qe=fe({productPage:e,selectedSubscription:Ne,bundleSelected:ve,twelvePack:s,isVarietySet:Ge}),Ye=Ie?fe({productPage:e,selectedSubscription:Ne,bundleSelected:ve,twelvePack:s,isVarietySet:Ge,regularPrice:!0}):0,We=["club"===Ne?Number(e.variants[Ge?0:1]?.price?.amount)*(1-a.mockProductDetailData.clubDiscount)/20:Number(e.variants[Ge?0:1]?.price?.amount)/20,"club"===Ne?Number(e.variants[Ge?1:2]?.price?.amount)*(1-a.mockProductDetailData.clubDiscount)/30:Number(e.variants[Ge?1:2]?.price?.amount)/30],Ze=(e,a)=>{if(ta)return a?.preventDefault(),void Ce("one-time");Ce(e)},Je=()=>{$e(!_e)},Qe=e.tags.includes("limited"),Xe=(0,k.limitedProductByVariety)({varietyData:a.mockProductDetailData.varietyData,limitedEditionFlags:i}),ea=e=>"peppermint-mocha"===e||"gingerbread-cookie"===e||"cherry-chocolate-waffle-cone"===e,aa=(0,c.useMemo)((()=>ea(e.handle)||(e=>{let t=!1;return e.forEach((e=>{ea(a.mockProductDetailData.varietyData[e].handle)&&(t=!0)})),t})(Oe)),[e.handle,Oe]),ta=(0,c.useMemo)((()=>!je||Ke||aa),[Ke,aa,je]),ia=(0,c.useMemo)((()=>i.peppermintMochaEnabled||i.gingerbreadCookieEnabled||i.cherryChocolateWaffleConeEnabled),[i]);return(0,y.useEffect)((()=>{t.showCart&&Le(!1)}),[t.showCart]),(0,y.useEffect)((()=>{ta&&Ce("one-time")}),[ta]),(0,y.useEffect)((()=>{(0,h.initRecharge)({storeIdentifier:"starsandhoney.com",storefrontAccessToken:"strfnt_ed701156261903dde869c2dfe5e8d4b3f8065f5a7b17a056a93dd15700fa8a94",loginRetryFn:async()=>await(0,h.loginShopifyAppProxy)()}),(0,v.loginWithShopifyStorefront)("strfnt_ed701156261903dde869c2dfe5e8d4b3f8065f5a7b17a056a93dd15700fa8a94").then((e=>{console.log("response",e)})).catch((e=>{console.log(e)}))}),[]),(0,y.useEffect)((()=>{if(Ce("one-time"),s)return He(s?.variants[0]?.currentlyNotInStock),Me(!s?.variants[0]?.availableForSale),void Ue("Special Edition 12 Pack | All Flavors + Varsity Hat");He(e.variants[ve]?.currentlyNotInStock),Me(!e.variants[ve]?.availableForSale),Ue(e.title)}),[ve]),(0,r.jsxs)("div",{className:`${j} ${(Ge||Ke)&&I}`,children:[(0,r.jsx)("p",{className:D,children:"Collagen Protein Bar"}),(0,r.jsx)("h1",{className:`${S} title ${P}`,dangerouslySetInnerHTML:{__html:ze}}),Ge||Ke||Qe||!e.reviews?.rating_average?null:(0,r.jsxs)("div",{className:`starsContainer ${N}`,children:[(0,r.jsx)("a",{className:C,href:a.mockProductDetailData.rating.reviewsHref,children:(0,r.jsx)(n.RatingStars,{rating:e.reviews?.rating_average,numberOfStars:5,starDimension:"20px",starRatedColor:"#000000",starEmptyColor:"#00000055"})}),(0,r.jsxs)("p",{className:_,children:["(",(0,u.truncateOneDecimal)(e?.reviews?.rating_average),")"]})]}),(0,r.jsxs)("div",{className:`varietySetContainer ${$} ${Ge&&B} ${ia&&F}`,children:[a.mockProductDetailData.varietyData.filter((e=>!e.isLimited)).map(((e,a)=>(0,r.jsx)("div",{children:(0,r.jsxs)("a",{href:e.varietyHref,children:[(0,r.jsx)("img",{src:e.varietyImage,alt:"variety"}),(0,r.jsx)("div",{className:ie,children:e.varietyName})]})},a))),(0,r.jsx)("button",{children:(0,r.jsx)("a",{className:`linkVarietySet ${T}`,href:a.mockProductDetailData.varietyButton.href,children:a.mockProductDetailData.varietyButton.text})})]}),ia?(0,r.jsxs)("div",{className:`varietySetContainer ${$} ${Ge&&B} ${ia&&F}`,children:[Xe.map(((e,a)=>(0,r.jsx)("div",{children:(0,r.jsxs)("a",{href:e.varietyHref,children:[(0,r.jsx)("img",{src:e.varietyImage,alt:"variety"}),(0,r.jsx)("div",{className:ie,children:e.varietyName})]})},a))),b&&(0,r.jsx)("button",{className:`buttonGiftSet ${w}`,children:(0,r.jsx)("a",{className:`linkGiftSet ${O}`,href:a.mockProductDetailData.varsityHatButton.href,children:a.mockProductDetailData.varsityHatButton.text})}),(0,r.jsx)("p",{class:`limitedEdition ${ke}`,children:"LIMITED EDITION"})]}):null,b&&!ia&&(0,r.jsx)("button",{className:`buttonGiftSet ${w}`,style:{marginBottom:"10px"},children:(0,r.jsx)("a",{className:`linkGiftSet ${O}`,href:a.mockProductDetailData.varsityHatButton.href,children:a.mockProductDetailData.varsityHatButton.text})}),(0,r.jsx)("p",{className:E,style:{fontSize:Ge?"12px":"14px",lineHeight:Ge?"18px":"21px",letterSpacing:Ge?"normal":"-0.02em;",marginTop:ia?"8px":"0px"},children:e.description}),(0,r.jsx)("div",{className:`freeFromContainer ${A} ${Ge&&L}`,children:Ge||Ke?a.mockProductDetailData.mockTagsForVarierySet.map(((e,a)=>(0,r.jsx)("span",{children:e.substring(1).toLowerCase().includes("sugar")?"STEVIA":e.substring(1)},a))):e.tagsBadge.map(((e,a)=>(0,r.jsx)("span",{children:e.substring(1).toLowerCase().includes("sugar")?"STEVIA":e.substring(1)},a)))}),!Ge&&!Ke&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:V,onClick:()=>{Pe(!Se)},role:"button","aria-label":"Nutrition & Ingredients",children:[(0,r.jsx)("span",{children:"NUTRITION & INGREDIENTS"}),(0,r.jsx)("span",{className:le,children:(0,r.jsx)(l.Arrow,{})})]}),Se&&(0,r.jsxs)("div",{className:H,children:[(0,r.jsx)("img",{src:e?.nutritionalImage?.reference.image.originalSrc,alt:`nutritional info for ${ze} `,height:150,width:400}),(0,r.jsx)("p",{children:e?.nutritionalIngredients?.value}),(0,r.jsx)("div",{className:ce,children:e?.nutritionalBadges?.references.edges?.map(((e,a)=>(0,r.jsx)("img",{src:e.node.image.originalSrc,alt:e.node.image.altText,style:{height:"30px"}},a)))})]})]}),!Ge&&!Ke&&(0,r.jsxs)("div",{className:`bundles ${R}`,children:[(0,r.jsxs)("div",{onClick:()=>xe(0),role:"button","aria-label":"Select bundle",children:[(0,r.jsx)("button",{className:`${0===ve&&M}`,children:e.options[0].values[0]}),(0,r.jsx)("span",{})]}),(0,r.jsxs)("div",{onClick:()=>xe(1),role:"button","aria-label":"Select bundle 2",children:[(0,r.jsx)("button",{className:`${1===ve&&M}`,children:e.options[0].values[1]}),(0,r.jsxs)("span",{children:["$",We[0].toFixed(2)," EA."]})]}),(0,r.jsxs)("div",{onClick:()=>xe(2),role:"button","aria-label":"Select bundle 3",children:[(0,r.jsx)("button",{className:`${2===ve&&M}`,children:e.options[0].values[2]}),(0,r.jsxs)("span",{children:["$",We[1].toFixed(2)," EA."]})]})]}),Ge&&(0,r.jsx)(p.StepSelection,{productPage:e,bundleSelected:ve,setBundleSelected:xe,bundlePriceEach:We,varietySetIsComplete:Te,setVarietySetIsComplete:we,selectedFlavorSet:Oe,setSelectedFlavorSet:Fe,limitedEditionFlags:i}),Ke&&(0,r.jsx)(x.TwelvePackDetails,{isMobile:De,mockDataStepper:a.mockProductDetailData}),(0,r.jsxs)("div",{className:`priceContainer ${pe}`,children:[(0,r.jsxs)("div",{className:`price ${z} ${Ge&&Y}`,children:["$",qe.toFixed(2)]}),!!Ye&&(0,r.jsxs)("div",{className:`regularPriceContainer ${G} ${s&&ve===g.BundleSize["12 Pack"]?K:""} ${Ge&&Y}`,children:[(0,r.jsx)("span",{className:`sale ${q}`,children:"Sale"}),(0,r.jsxs)("span",{className:`regularPrice ${U}`,children:["$",Ye.toFixed(2)]})]}),ve===g.BundleSize["12 Pack"]&&Ge&&(0,r.jsx)("div",{className:`plusSymbol ${me}`,children:"+"}),ve===g.BundleSize["12 Pack"]&&Ge&&(0,r.jsxs)("div",{className:`hatFlex ${be}`,children:[(0,r.jsx)("div",{className:`free ${ue}`,children:(0,r.jsx)("img",{src:(0,f.getFastImage)("https://cdn.shopify.com/s/files/1/0664/6100/8105/files/hat.webp?v=1729711429",150),alt:"brand hat",height:46,width:46})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:`brandHat ${he}`,children:"Varsity Hat"}),(0,r.jsx)("div",{className:`brandHat ${ye}`,children:"+ embroidered logo"})]})]})]}),(0,r.jsxs)("div",{className:`${W} productSubscription ${Ge&&Z}`,children:[(0,r.jsxs)("div",{onClick:e=>Ze("one-time",e),role:"button","aria-label":"One-time purchase",children:[(0,r.jsx)("input",{type:"radio",id:"one-time",name:"subscription",checked:"one-time"===Ne,readOnly:!0}),(0,r.jsx)("span",{htmlFor:"one-time",children:"ONE-TIME PURCHASE"})]}),(0,r.jsxs)("div",{onClick:e=>{Ze("club",e)},disabled:ta,role:"button","aria-label":"Subscription club",children:[(0,r.jsx)("input",{type:"radio",id:"club",name:"subscription",checked:"club"===Ne,readOnly:!0}),(0,r.jsx)("span",{htmlFor:"",children:"SUBSCRIPTION CLUB"}),(0,r.jsx)("label",{children:ta?"Not available":`Save ${100*a.mockProductDetailData.clubDiscount}%`}),(0,r.jsxs)("button",{onClick:Je,role:"button","aria-label":"Subscription details",children:["Details",(0,r.jsxs)("div",{className:`subscriptionInfo ${J} ${_e&&Q}`,children:[(0,r.jsx)("div",{children:(0,r.jsx)(o.Cross,{})}),(0,r.jsxs)("ul",{children:[(0,r.jsxs)("li",{children:[(0,r.jsx)(d.ArrowRightPopup,{}),"Delivers every 1 month"]}),(0,r.jsxs)("li",{children:[(0,r.jsx)(d.ArrowRightPopup,{}),"Pause, change, or cancel anytime"]}),(0,r.jsxs)("li",{style:"margin-bottom:unset;",children:[(0,r.jsx)(d.ArrowRightPopup,{}),"Early access to new flavors"]})]})]})]})]}),(0,r.jsx)("div",{className:`backgroundPopup ${X} ${_e&&Q}`,onClick:Je,role:"button","aria-label":"Subscription details"})]}),(0,r.jsxs)("p",{className:`labelShip ${ee} ${Ge&&ae}`,children:[(0,r.jsx)("span",{children:"★"})," Always Free Shipping"]}),(0,r.jsxs)("div",{onClick:async()=>{if(Ae)return;if(0===qe)return void Le(!1);if(Le(!0),Ge&&!Te)return Ee(!0),Le(!1),void setTimeout((()=>{Ee(!1)}),2e3);if(Ve||Re)return void Le(!1);let i=e.variants[ve];ve===g.BundleSize["12 Pack"]&&s&&(i=s.variants[0]);const r={sku:i.sku||"",id:i.id,quantity:1,image:i.image.src,product_title:ze?.replace(/<[^>]*>?/gm,""),variant_title:i.title,price:100*qe,final_price:100*qe,url:`https://starsandhoney.com/products/${e.handle}`,variant_id:Number(i.id),vendor:e.vendor,properties:{_compare_at_price:100*Ye}};"club"===Ne&&(r.selling_plan=m.sellingPlans[e.handle]||null);let n=[r];if(Ge&&ve!==g.BundleSize["12 Pack"]){let e;e=0===ve&&"one-time"===Ne?"variantId20packOneTime":1===ve&&"one-time"===Ne?"variantId30packOneTime":0===ve&&"club"===Ne?"variantId20packSubs":1===ve&&"club"===Ne?"variantId30packSubs":"variantId20packOneTime";let s={externalVariantId:a.mockProductDetailData.bundlesIds[e].variantId,externalProductId:a.mockProductDetailData.bundlesIds[e].productId,selections:[{collectionId:a.mockProductDetailData.dynamicBundleCollectionId,externalProductId:a.mockProductDetailData.varietyData[Oe[0]].productId,externalVariantId:a.mockProductDetailData.varietyData[Oe[0]][e],sellingPlan:"club"===Ne?Number(a.mockProductDetailData.varietyData[Oe[0]].sellingPlan):void 0,quantity:1},{collectionId:a.mockProductDetailData.dynamicBundleCollectionId,externalProductId:a.mockProductDetailData.varietyData[Oe[1]].productId,externalVariantId:a.mockProductDetailData.varietyData[Oe[1]][e],sellingPlan:"club"===Ne?Number(a.mockProductDetailData.varietyData[Oe[1]].sellingPlan):void 0,quantity:1}]};1===ve&&s.selections.push({collectionId:a.mockProductDetailData.dynamicBundleCollectionId,externalProductId:a.mockProductDetailData.varietyData[Oe[2]].productId,externalVariantId:a.mockProductDetailData.varietyData[Oe[2]][e],sellingPlan:"club"===Ne?Number(a.mockProductDetailData.varietyData[Oe[2]].sellingPlan):void 0,quantity:1});try{n=(0,m.convertProductToPayload)({product:{...r,variant_title:1===ve?"30-PACK":"20-PACK",title:"Signature Flavors Variety Set"},additionalProperties:{"Flavor 1":a.mockProductDetailData.varietyData[Oe[0]].varietyName,"Flavor 2":a.mockProductDetailData.varietyData[Oe[1]].varietyName,...1===ve?{"Flavor 3":a.mockProductDetailData.varietyData[Oe[2]].varietyName}:{},_compare_at_price:100*Ye},quantity:1,variant:{...i,title:1===ve?"30-PACK":"20-PACK",price:{...i.price,amount:ge(qe).toString()}}})?.items.map((e=>({...e,selling_plan_allocation:!!r?.selling_plan}))),t.addFakeBundle({items:n});const e=(0,v.getDynamicBundleItems)(s,"dynamic-bundle");e[0].properties["Flavor 1"]=a.mockProductDetailData.varietyData[Oe[0]].varietyName;const l={_rc_bundle_flavor1:a.mockProductDetailData.varietyData[Oe[0]].varietyName,_rc_bundle_flavor1_ID:a.mockProductDetailData.varietyData[Oe[0]].productId,_rc_bundle_flavor2:a.mockProductDetailData.varietyData[Oe[1]].varietyName,_rc_bundle_flavor2_ID:a.mockProductDetailData.varietyData[Oe[1]].productId,_rc_bundle_price:qe.toString(),_rc_bundle_status:"club"===Ne?"Subscription":"One-Time",_rc_bundle_size:0===ve?"20-PACK":"30-PACK",_compare_at_price:100*Ye};1===ve&&(l._rc_bundle_flavor3=a.mockProductDetailData.varietyData[Oe[2]].varietyName,l._rc_bundle_flavor3_ID=a.mockProductDetailData.varietyData[Oe[2]].productId),e[0].properties={...e[0].properties,...l},e[1].properties["Flavor 2"]=a.mockProductDetailData.varietyData[Oe[1]].varietyName,e[1].properties={...e[1].properties,...l},1===ve&&(e[2].properties["Flavor 3"]=a.mockProductDetailData.varietyData[Oe[2]].varietyName,e[2].properties={...e[2].properties,...l}),n=e}catch(e){console.error("getBundleId",e)}}try{t.addToCart({items:n})}catch(e){console.error(e),Le(!1)}},role:"button","aria-label":"Add to bag",className:`addButton ${te} \n\t\t\t\t${Ge&&!Te&&se}\n\t\t\t\t${(Ve||Re)&&se}\n\t\t\t\t${0===qe&&se}\n\t\t\t\t${Ge&&ne}\n\t\t\t\t${Ae&&oe}\n\t\t\t\t`,children:[(0,r.jsxs)("button",{children:[Re?"Unavailable":Ve?"Out of Stock":"Add to bag",Ae&&(0,r.jsx)("span",{className:de,children:(0,r.jsxs)("svg",{height:"18",width:"18",children:[(0,r.jsx)("circle",{r:"7",cx:"9",cy:"9"}),(0,r.jsx)("circle",{"stroke-dasharray":"87.96459430051421 87.96459430051421",r:"7",cx:"9",cy:"9"})]})})]}),Be&&(0,r.jsx)("div",{className:re,children:"Please add more flavors"})]})]})}},127:function(e,a,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.StepSelection=void 0;const r=t(0),s=t(1),n=i(t(80)),l=t(2),c=t(158),o=t(6),d=t(159),u=t(61),m=t(81),p=t(22),{selected:v,bundles:h,step2Container:y,backButton:b,varietySetContainer:k,varietyItem:g,varietyName:f,title:x,selectedOptionsContainer:j,selectedImagesContainer:I,modifyButton:D,stepIndicatorTitleContainer:S,columnDisplay:P,imageContainer:N,yourVarietySet:C,chosenFlavors:_,varietySetLimitedEdition:$,limitedEditionContainer:T,selectedOptionsLimitedEdition:w,bundleSubheading:O,desktopOnly:F,mobileOnly:B}=n.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/"}]),a.StepSelection=({productPage:e,bundleSelected:a,setBundleSelected:t,bundlePriceEach:i,varietySetIsComplete:n,setVarietySetIsComplete:o,selectedFlavorSet:O,setSelectedFlavorSet:E,limitedEditionFlags:A})=>{const L=e=>{E((a=>[...a,e])),[...O,e].length===a+2&&o(!0)},V=(0,d.limitedProductByVariety)({varietyData:p.mockProductDetailData.varietyData,limitedEditionFlags:A});return(0,l.useEffect)((()=>{E([]);let e=!1;a===m.BundleSize["12 Pack"]&&(e=!0),o(e)}),[a]),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:x,children:[(0,r.jsx)("span",{children:"STEP 1"}),(0,r.jsx)("span",{children:"CHOOSE YOUR PACK SIZE"})]}),(0,r.jsxs)("div",{className:h,children:[(0,r.jsxs)("div",{onClick:()=>t(0),children:[(0,r.jsx)("button",{className:`${a===m.BundleSize["20 Pack"]&&v}`,children:e.options[0].values[0]}),(0,r.jsxs)("span",{children:["$",i[0].toFixed(2)," EA."]})]}),(0,r.jsxs)("div",{onClick:()=>t(1),children:[(0,r.jsx)("button",{className:`${a===m.BundleSize["30 Pack"]&&v}`,children:e.options[0].values[1]}),(0,r.jsxs)("span",{children:["$",i[1].toFixed(2)," EA."]})]})]}),(0,r.jsx)("div",{style:{minHeight:"200px"},children:a===m.BundleSize["12 Pack"]?(0,r.jsx)(u.TwelvePackDetails,{mockDataStepper:p.mockProductDetailData}):(0,r.jsxs)("div",{className:`step2Container ${y}`,children:[n?(0,r.jsxs)("div",{className:x,children:[(0,r.jsx)("span",{children:"BUNDLE SUMMARY"}),(0,r.jsx)("span",{})]}):(0,r.jsxs)("div",{className:x,children:[(0,r.jsx)("span",{children:"STEP 2"}),(0,r.jsx)("span",{children:"CHOOSE YOUR FLAVORS"})]}),(0,r.jsxs)("div",{className:S,children:[(0,r.jsx)("div",{style:{color:0===O.length?"black":"#a0a0a0"},children:"FIRST FLAVOR"}),(0,r.jsx)(c.ArrowRight,{}),(0,r.jsx)("div",{style:{color:1===O.length?"black":"#a0a0a0"},children:"SECOND FLAVOR"}),(0,r.jsx)(c.ArrowRight,{}),a===m.BundleSize["30 Pack"]&&(0,r.jsxs)(s.Fragment,{children:[(0,r.jsx)("div",{style:{color:2===O.length?"black":"#a0a0a0"},children:"THIRD FLAVOR"}),(0,r.jsx)(c.ArrowRight,{})]}),(0,r.jsx)("div",{style:{color:n?"black":"#a0a0a0"},children:"SUMMARY"})]}),O.length>0&&(0,r.jsx)("button",{className:b,onClick:()=>{E((e=>e.slice(0,-1))),o(!1)},children:"Back"}),!n&&(0,r.jsx)("div",{className:`varietySetContainer ${k}`,style:{minHeight:"140px"},children:p.mockProductDetailData.varietyData.filter((e=>!e.isLimited)).map((e=>(0,r.jsxs)("div",{className:g,onClick:()=>L(e.key),children:[(0,r.jsx)("img",{src:e.varietyImage,alt:e.varietyName}),(0,r.jsx)("div",{className:`${f} ${F}`,children:e.varietyName}),(0,r.jsx)("div",{className:`${f} ${B}`,children:e.varietyName.split(/(?=Chip)/).map(((e,a)=>(0,r.jsxs)("div",{children:[e,0===a&&(0,r.jsx)("br",{})]},a)))})]},e.key)))}),!n&&V.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:$,children:"LIMITED EDITION"}),(0,r.jsx)("div",{className:`varietySetContainer ${k} limitedEditionContainer ${T}`,children:V.map((e=>(0,r.jsxs)("div",{className:g,onClick:()=>L(e.key),children:[(0,r.jsx)("img",{src:e.varietyImage,alt:e.varietyName}),(0,r.jsx)("div",{className:`varietyName ${f} ${F}`,children:e.varietyName}),(0,r.jsx)("div",{className:`varietyName ${f} ${B}`,children:e.varietyNameMobile||e.varietyName})]},e.key)))})]}),(0,r.jsxs)("div",{className:`${j} ${V.length>0?w:""}`,style:{alignItems:n?"flex-start":"center"},children:[(0,r.jsx)("h3",{children:n?(0,r.jsx)("div",{className:C,children:"Your Variery Set"}):O.length>0?(0,r.jsx)("div",{className:_,children:"CHOSEN FALVORS"}):""}),(0,r.jsx)("div",{className:`${I} ${n&&P}`,children:O.map(((e,a)=>(0,r.jsxs)("div",{className:g,children:[(0,r.jsx)("div",{className:N,"data-index":a+1,children:(0,r.jsx)("img",{src:p.mockProductDetailData.varietyData[e].varietyImage,alt:p.mockProductDetailData.varietyData[e].varietyName})}),n&&(0,r.jsx)("span",{children:p.mockProductDetailData.varietyData[e].varietyName})]},a)))}),n&&(0,r.jsx)("button",{className:D,onClick:()=>{E([]),o(!1)},children:"Modify"})]})]})})]})}},61:function(e,a,t){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.TwelvePackDetails=void 0;const r=t(0),s=(t(1),t(158)),n=i(t(80)),l=t(22),c={"Cacao Salt Caramel Peanut":2,"Espresso Vanilla Cinnamon":1,"Dark Chocolate Coconut":2,"The Raspberry Donut":2,"Birthday Cake Chocolate Chip":1,"Peanut Butter Blackberry":2,"Cookies and Cream":2};a.TwelvePackDetails=({mockDataStepper:e,isMobile:a=!1})=>{const t=e.varietyData.filter((e=>!e.isLimited));return(0,r.jsxs)("div",{className:`step2Container ${n.default.step2Container} `,children:[(0,r.jsxs)("div",{className:`title ${n.default.title} `,children:[(0,r.jsx)("span",{children:"LIMITED EDITION SET"}),(0,r.jsx)("span",{children:"12 BARS + HAT"})]}),(0,r.jsxs)("div",{className:`stepIndicatorTitleContainer ${n.default.stepIndicatorTitleContainer} `,children:[(0,r.jsx)("div",{className:`flavorsIncluded ${n.default.flavorsIncluded}`,children:l.mockProductDetailData.varietyData.filter((e=>!e.isLimited)).map(((e,a)=>(0,r.jsx)("div",{className:n.default.varietyItem,children:(0,r.jsx)("img",{src:e.varietyImage,alt:"variety"})},a)))}),(0,r.jsxs)("span",{className:`bars ${n.default.bars}`,children:[(0,r.jsx)("b",{children:"12"}),(0,r.jsx)("span",{children:"Bars"})]}),(0,r.jsx)("div",{className:`plus ${n.default.plus}`,children:"+"}),(0,r.jsxs)("div",{className:`hat ${n.default.hat}`,children:[(0,r.jsx)("img",{src:"https://cdn.shopify.com/s/files/1/0664/6100/8105/files/empty-hat.webp?v=1733423560",alt:"hat"}),(0,r.jsx)("p",{children:"Varsity Hat"})]})]}),(0,r.jsxs)("div",{className:`title ${n.default.title} titleFlavors ${n.default.titleFlavors} `,children:[(0,r.jsx)("span",{children:"FLAVORS INCLUDED"}),(0,r.jsx)("span",{})]}),(0,r.jsxs)("div",{className:`stepIndicatorTitleContainer ${n.default.stepIndicatorTitleContainer} `,children:[(0,r.jsx)("div",{className:`stepperTitle ${n.default.stepperTitle}`,children:"12 PACK | ALL FLAVORS"}),(0,r.jsx)(s.ArrowRight,{})]}),(0,r.jsx)("div",{className:n.default.varietySetContainer,children:t.map((e=>(0,r.jsxs)("div",{className:n.default.varietyItem,children:[(0,r.jsx)("img",{src:e.varietyImage,alt:e.varietyName}),(0,r.jsx)("div",{className:`varietyName ${n.default.varietyName}`,style:{cursor:"default"},children:a&&e.varietyName.includes("Chip")?e.varietyName.split(/(?=Chip)/).map(((a,t)=>(0,r.jsxs)("div",{children:[a,0===t?(0,r.jsx)("br",{}):` (${c[e.varietyName]})`]},t))):`${e.varietyName} (${c[e.varietyName]})`})]},e.key)))})]})}},158:(e,a,t)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ArrowRight=void 0;const i=t(0);a.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"})})},361:(e,a,t)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ArrowRightPopup=void 0;const i=t(0);t(1),a.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"})})}},81:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BundleSize=void 0,a.BundleSize={"20 Pack":0,"30 Pack":1,"12 Pack":2}},159:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.limitedProductByVariety=void 0,a.limitedProductByVariety=({varietyData:e,limitedEditionFlags:a})=>e.filter((e=>!(!a.peppermintMochaEnabled&&"Peppermint Mocha"===e.varietyName)&&!(!a.gingerbreadCookieEnabled&&"Gingerbread Cookie"===e.varietyName)&&!(!a.cherryChocolateWaffleConeEnabled&&"Cherry Chocolate Waffle Cone"===e.varietyName)&&e.isLimited))}}]);