"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[6],{85:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CartItem=void 0;const a=r(0),o=(r(1),r(6)),i=r(217),s=n(r(17)),c=r(218),l=r(28),u=r(2),d=r(21),p=r(22),m=r(24),h=r(20),{productItem:f,itemImage:y,itemImageGreater:v,itemDetails:C,itemTitle:_,itemSubtitle:g,itemPriceContainer:x,itemPrice:j,itemOriginalPriceContainer:b,itemOriginalPrice:S,itemOriginalPriceSale:$,itemDelivery:I,trashIcon:k,quantityControls:N,noArrows:M,disabled:w,itemFlavor:P,currencyCodeStyle:T}=s.default,B=async({updateCart:e,ids:t,item:r,quantity:n,operationType:a,changeToCart:o})=>{if(Array.isArray(t))await(async({updateCart:e,ids:t,item:r,quantity:n,operationType:a})=>{const o=t.reduce(((e,t)=>{const r=t.toString();return e[r]=(e[r]||0)+1,e}),{}),i={};r.bundleItems.map((e=>{const t=o[e.key];let r=n*t;switch(a){case"increment":r+=t;break;case"decrement":r-=t;break;case"remove":r=0}i[e.key]={final_price:e.price,image:e.image,price:e.price,product_title:e.product_title,url:e.url,variant_id:e.variant_id,variant_title:e.variant_title,vendor:e.vendor,quantity:r}})),await e(i)})({updateCart:e,ids:t,item:r,quantity:n,operationType:a});else{let e=n;switch(a){case"change":e=n;break;case"decrement":e=n-1;break;case"increment":e=n+1;break;case"remove":e=0}await o({id:t.toString(),quantity:e})}};t.CartItem=({item:e,useSharedState:t,inputLoading:r,setInputLoading:n,featureAutomaticDiscount:s,featureCompareAtText:D,featureFullPriceCompare:F,featureCartImageGreater:A,productPage:O,automaticSiteWideDiscount:z})=>{const{changeToCart:E,updateCart:q,cart:L}=t,H=!1,G=(0,u.useMemo)((()=>{const t=e.price,r=!("Subscription"===e.properties?._rc_bundle_status);return isNaN(t)?" - ":t?r&&s&&(e.variant_options||e.properties["Flavor 1"]&&e.original_price)?(t*(1-z/100)/100).toFixed(2):(t/100).toFixed(2):"0.00"}),[e.price,H]),V=(0,u.useMemo)((()=>t?.findSymbol(L.currency)?.currencySymbol),[L.currency]),K=(0,u.useMemo)((()=>(0,d.currencyCodeIfneeded)({currencySymbol:V,featureInternationalization:t.featureInternationalization,countryCode:t.countryCode,currencyCode:L.currency})),[V,L.currency,t]),R=(0,u.useMemo)((()=>{if(O){const r=(0,m.getCalculatedPrice)({productPage:O,selectedSubscription:"Subscription"===e.properties?._rc_bundle_status?h.PurchaseType.subscription:h.PurchaseType.oneTime,bundleSelected:"10-PACK"===e.properties?._size?0:"20-PACK"===e.properties?._size?1:2,twelvePack:void 0,isVarietySet:!1,regularPrice:!0,priceFromVariant:t.priceFromVariant,subscriptionClubData:t.subscriptionClubData,twelvePackVariantId:"",featureTwelvePackDesign:!1,featureAutomaticDiscount:s,featureFullPriceCompare:F,defaultProductData:O,automaticSiteWideDiscount:z});if(r&&!isNaN(r))return Number(r).toFixed(2)}return isNaN(e?.properties?._compare_at_price)?"":e.properties?._compare_at_price?(e?.properties?._compare_at_price/100).toFixed(2):""}),[e.properties?._compare_at_price,H]),Z=(()=>{let t;return(...r)=>{t&&clearTimeout(t),t=window.setTimeout((()=>{(async t=>{n(!0);try{B({ids:t,quantity:0,item:e,operationType:"remove",changeToCart:E,updateCart:q})}catch(e){console.error("Error remove item from cart:",e)}finally{n(!1)}})(...r)}),250)}})(),U=(0,u.useMemo)((()=>"fullprice"===D?"Full Price":"Sale"),[D]);return(0,a.jsxs)("div",{className:`productItem ${f}`,children:[(0,a.jsx)("a",{href:(0,l.sanitizeUrl)(e.url),className:"linkProductItem",children:(0,a.jsx)("img",{src:(0,o.getFastImage)((0,c.imageResize)(e?.featured_image?.url||e?.image?.url||e?.image||"",180)),alt:e?.featured_image?.alt,className:`itemImage ${y} ${A?v:""}`})}),(0,a.jsxs)("div",{className:`itemDetails ${C}`,children:[(0,a.jsx)("a",{href:(0,l.sanitizeUrl)(e.url),className:`itemTitle ${_}`,children:e.product_title}),(0,a.jsxs)("p",{className:`itemSubtitle ${g}`,children:[(0,p.fixVariantTitle)(e.variant_title),(e.selling_plan_allocation||"Subscription"===e?.properties?._rc_bundle_status)&&" | Subscription"]}),(e.selling_plan_allocation||"Subscription"===e?.properties?._rc_bundle_status)&&(0,a.jsx)("p",{className:`itemDelivery ${I}`,children:"Delivers Every 30 Days"}),e.properties?.["Flavor 1"]&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:P,children:["Flavor 1: ",e.properties["Flavor 1"]]}),(0,a.jsxs)("p",{className:P,children:["Flavor 2: ",e.properties["Flavor 2"]]})]}),e.properties?.["Flavor 3"]&&(0,a.jsx)("div",{children:(0,a.jsxs)("p",{className:P,children:["Flavor 3: ",e.properties["Flavor 3"]]})}),(0,a.jsxs)("p",{className:`itemPriceContainer ${x}`,children:[(0,a.jsxs)("span",{className:`itemPrice ${j}`,children:[!!K&&(0,a.jsx)("span",{className:`currencyCodeStyle ${T}`,children:`${K} `}),`${V}${G}`]}),!!R&&!(0,m.isSimilarPrice)(Number(G),Number(R))&&(0,a.jsxs)("span",{className:`itemOriginalPriceContainer ${b}`,children:[(0,a.jsx)("span",{className:`itemOriginalPrice ${S}`,children:`${V}${R}`}),(0,a.jsx)("span",{className:`itemOriginalPriceSale ${$}`,children:U})]})]}),(0,a.jsxs)("div",{className:`quantityControls ${N} ${r&&w}`,children:[(0,a.jsx)("button",{onClick:()=>(async(t,r)=>{n(!0);try{B({ids:t,quantity:r,item:e,operationType:"decrement",changeToCart:E,updateCart:q})}catch(e){console.error("Error incrementing item quantity:",e)}finally{n(!1)}})(e.key||e.bundleItemsKeys,e.quantity),disabled:r,children:"−"}),(0,a.jsx)("input",{className:`noArrows ${M} ${r&&w}`,type:"number",value:e.quantity,onChange:t=>{const r=t.target;if(r){const t=parseInt(r.value,10)||1;(async(t,r)=>{n(!0);try{B({ids:t,quantity:r,item:e,operationType:"change",changeToCart:E,updateCart:q})}catch(e){console.error("Error updating cart:",e)}finally{n(!1)}})(e.key||e.bundleItemsKeys,t)}},min:"1"}),(0,a.jsx)("button",{onClick:()=>(async(t,r)=>{n(!0);try{B({ids:t,quantity:r,item:e,operationType:"increment",changeToCart:E,updateCart:q})}catch(e){console.error("Error incrementing item quantity:",e)}finally{n(!1)}})(e.key||e.bundleItemsKeys,e.quantity),disabled:r,children:"+"})]})]}),(0,a.jsx)("button",{className:`${k} trashIcon`,onClick:()=>Z(e.key||e.bundleItemsKeys),disabled:r,children:(0,a.jsx)(i.Trash,{})})]})}},12:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CartMenu=void 0;const a=r(0),o=(r(1),n(r(16))),i=r(2),s=r(0),c=r(41),l=r(151),u=r(6),d=r(85),p=n(r(18)),m=r(21),h=r(42),f=r(40),y=r(3),{cartMenu:v,cartDiscountContainer:C,cartDiscount:_,cartMenuOpen:g,cartMenuClose:x,cartMenuContainer:j,topTitle:b,crossIcon:S,labelShip:$,labelShipGoogleBadge:I,buttonsContainers:k,allItemsContainer:N,emptyCartContainer:M,emptyIconContainer:w,hoverContainer:P,continueBrowsing:T,checkoutButton:B,continueShopButton:D,googleBadgeContainer:F}=o.default,{loadBar:A}=p.default;(0,u.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/"}]);const O=({loadingAddToCart:e,setShowCart:t})=>(0,a.jsxs)("div",{className:`emptyCartContainer ${M}\n\t\t\tflex\n\t\t\t`,children:[e&&(0,a.jsx)("div",{className:`loadBar ${A}`}),(0,a.jsx)("p",{children:"Your cart is empty."}),(0,a.jsxs)("div",{className:`hoverContainer ${P}`,onClick:()=>t(!1),children:[(0,a.jsx)("div",{className:`emptyIconContainer ${w}`,children:(0,a.jsx)(l.Bag,{})}),(0,a.jsx)("div",{className:`continueBrowsing ${T}`,children:(0,a.jsx)("span",{children:"CONTINUE BROWSING"})})]})]});function z(e,t){return 0==e?.items?.length&&(!t?.items||0==t?.items?.length)}const E=({updatedCartItems:e,useSharedState:t,inputLoading:r,featureGoogleBadge:n,currency:o,currencySymbol:i,totalPrice:c,discountText:l,handleCheckoutSubmit:u,setShowCart:p,featureAutomaticDiscount:m,featureCompareAtText:y,products:v,featureFullPriceCompare:g,automaticSiteWideDiscount:x,featureCartImageGreater:j})=>{const{fakeBundle:b}=t;return(0,a.jsxs)("div",{className:"itemsSection",children:[(0,a.jsxs)("div",{className:`allItemsContainer ${N}`,children:[b?.items?.[0]&&b?.items?.[0]?.id!==h.SHIPPING_ITEM_ID?(0,a.jsx)(d.CartItem,{item:b?.items?.[0],useSharedState:t,setInputLoading:()=>{},inputLoading:!1,featureAutomaticDiscount:m,featureCompareAtText:y,featureFullPriceCompare:g,featureCartImageGreater:j,productPage:v[0],automaticSiteWideDiscount:x}):null,!!e&&e?.map((e=>{const n=v?.find((t=>t.handle===e.handle||Number(t.id)===Number(e.id)));return(0,a.jsx)(d.CartItem,{item:e,useSharedState:t,setInputLoading:()=>{},inputLoading:r,featureAutomaticDiscount:m,featureCompareAtText:y,featureFullPriceCompare:g,featureCartImageGreater:j,productPage:n,automaticSiteWideDiscount:x},e.key)})),(0,a.jsx)("p",{className:`labelShip ${$} ${n&&I}`,children:"US"===t.countryCode&&(0,a.jsxs)(s.Fragment,{children:[(0,a.jsx)("span",{children:"★"})," Always Free Shipping"]})})]}),(0,a.jsxs)("div",{className:k,children:[(0,a.jsx)("button",{className:`continueShopButton ${D}`,onClick:()=>p(!1),children:"Continue Shopping →"}),l&&(0,a.jsx)("div",{className:`cartDiscountContainer ${C}`,children:(0,a.jsx)("div",{className:`cartDiscount ${_}`,children:l})}),(0,a.jsx)("form",{id:"form",action:"/checkout",method:"post",onSubmit:u,children:(0,a.jsxs)("button",{className:`checkoutButton ${B}`,children:["CHECKOUT • ",`${o} ${i}${c}`]})}),n&&(0,a.jsx)("div",{className:`googleBadgeContainer ${F}`,children:(0,a.jsx)(f.GoogleBadge,{})})]})]})};t.CartMenu=({useSharedState:e,featureGoogleBadge:t,featureAutomaticDiscount:r,featureCompareAtText:n,products:o,featureFullPriceCompare:s,automaticSiteWideDiscount:l,featureCartImageGreater:u})=>{const{cart:d,setShowCart:p,showCart:f,loadingAddToCart:C,fakeBundle:_}=e,$=(0,i.useMemo)((()=>d?.items?.reduce(((e,t)=>{const r=t?.properties?._dynamicBoxIndex;return r&&(e[r]||(e[r]=[]),e[r].push(t)),e}),{})),[d.items]),I=(0,i.useMemo)((()=>{const e=[];for(const t in $){const r=$[t],n="10-PACK---"===r[0]?.variant_title||"10-PACK-----"===r[0]?.variant_title?30:20,a=20===n?"20-PACK":"30-PACK",o=r.reduce(((e,t)=>e+10*t.quantity),0),i=Math.ceil(o/n),s=r.reduce(((e,t)=>e+t?.price*t.quantity),0)/i,c=r.reduce(((e,t)=>e+t.original_price*t.quantity),0)/i,l=r[0]?.product_title,u=r[1]?.product_title||r[0]?.product_title,d=r[2]?.product_title||(r[1]?.quantity>r[0]?.quantity?u:l),p={"Flavor 1":u,"Flavor 2":l,_compare_at_price:r[0]?.properties?._compare_at_price,_rc_bundle_status:r[0]?.properties?._rc_bundle_status};30===n&&(r[2]?(p["Flavor 1"]=d,p["Flavor 2"]=u,p["Flavor 3"]=l):(p["Flavor 1"]=l,p["Flavor 2"]=d,p["Flavor 3"]=u));let m=[];m[0]=r[0]?.key,m[1]=r[1]?.key||r[0]?.key,30===n&&(m[2]=r[2]?.key||(r[0]?.quantity>r[1]?.quantity?r[0]?.key:r[1]?.key)||r[0]?.key);const h={properties:p,quantity:i,product_title:"Signature Flavors Variety Set",price:s,original_price:c,url:"/products/signature-flavors-variety-set",featured_image:{alt:"Variety Set",url:"/fast-image/fl_progressive:steep/stars-honey/files/varietySet_1.jpg?v=1739929316"},image:"/fast-image/fl_progressive:steep/stars-honey/files/varietySet_1.jpg?v=1739929316",variant_title:a,bundleItems:r,bundleItemsKeys:m};r.some((e=>e.selling_plan_allocation))&&(h.selling_plan_allocation="true"),e.push(h)}return e}),[$]),k=[],N=d?.items?.map((e=>{if(e?.id===h.SHIPPING_ITEM_ID)return null;if(0===e?.quantity)return null;if(!e?.properties?._dynamicBoxIndex)return e;if(k.includes(e?.properties?._dynamicBoxIndex))return null;return I.find((t=>t?.bundleItems?.[0]?.properties?._dynamicBoxIndex===e?.properties?._dynamicBoxIndex?(k.push(e?.properties?._dynamicBoxIndex),t):null))||void 0})).filter((e=>!!e)),M=(0,i.useMemo)((()=>{const e=_?.items?.[0]?.final_price;let t=d.total_price;return e&&(t+=e),t?(t/100).toFixed(2):"0.00"}),[d.total_price,_?.items?.[0]?.final_price]),w=(0,i.useMemo)((()=>{if(!d?.cart_level_discount_applications?.[0])return"";let e=d?.cart_level_discount_applications?.[0]?.discount_application||d?.cart_level_discount_applications?.[0];return`${e?.title}: -$${(e?.total_allocated_amount/100).toFixed(2)}`}),[d?.cart_level_discount_applications]),P=(0,i.useMemo)((()=>e?.findSymbol(d.currency)?.currencySymbol),[d.currency]),T=(0,i.useMemo)((()=>(0,m.currencyCodeIfneeded)({currencySymbol:P,featureInternationalization:e.featureInternationalization,countryCode:e.countryCode,currencyCode:d.currency})),[P,d.currency,e]);return(0,i.useEffect)((()=>(document.documentElement.style.overflow=f?"hidden":"",()=>{document.documentElement.style.overflow=""})),[f]),f?(0,a.jsx)("div",{className:`${v} cartMenu ${f?g:x}`,onClick:()=>p(!1),children:(0,a.jsxs)("div",{className:`cartMenuContainer ${j} ${f?g:x}`,onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:`topTitle ${b}`,children:["CART",(0,a.jsx)("div",{className:`crossIcon ${S}`,role:"button",onClick:()=>p(!1),children:(0,a.jsx)(c.Cross,{})})]}),z(d,_)?(0,a.jsx)(O,{loadingAddToCart:C,setShowCart:p}):(0,a.jsx)(E,{updatedCartItems:N,useSharedState:e,inputLoading:!1,featureGoogleBadge:t,currency:T,currencySymbol:P,totalPrice:M,discountText:w,handleCheckoutSubmit:e=>{e.preventDefault();const t=d?.items?.filter((e=>!!e?.selling_plan||e?.selling_plan_allocation)).reduce(((e,t)=>e+(t.quantity||0)),0);for(let e=0;e{Object.defineProperty(t,"__esModule",{value:!0}),t.Trash=void 0;const n=r(0);t.Trash=()=>(0,n.jsxs)("svg",{"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon-bin",viewBox:"0 0 11 14",children:[(0,n.jsx)("path",{d:"M10 2v10a2 2 0 01-2 2H3a2 2 0 01-2-2V2h9zM9 3H2v9a1 1 0 00.883.993L3 13h5a1 1 0 00.993-.883L9 12V3z"}),(0,n.jsx)("path",{d:"M10.5 2a.5.5 0 110 1H.5a.5.5 0 010-1h10zm-3-2a.5.5 0 010 1h-4a.5.5 0 010-1h4z"})]})},84:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Dropdown=void 0;const a=r(0),o=r(2),i=n(r(14)),s=r(21),c=r(153);t.Dropdown=({selectedCountry:e,setSelectedCountry:t,localizations:r})=>{const[n,u]=(0,o.useState)(!1);return(0,a.jsxs)("div",{className:`dropdownContainer ${i.default.dropdownContainer}`,role:"button",children:[(0,a.jsxs)("div",{className:`dropdown ${i.default.dropdown}`,children:[!n&&(0,a.jsx)(l,{country:e,isPlaceholder:!0,onClick:()=>{1!==r.length&&u(!0)}}),n&&(0,a.jsx)("div",{className:`flags ${i.default.flags}`,children:s.SHOPIFY_COUNTRIES.filter((e=>r.find((t=>t.isoCode===e.countryCode)))).map((e=>(0,a.jsx)(l,{country:e,onClick:()=>{t(e),u(!1)}},e.countryCode)))})]}),!n&&(0,a.jsx)(c.ArrowDown,{color:"#000",className:i.default.dropdownArrow})]})};const l=({country:e,isPlaceholder:t,onClick:r})=>(0,a.jsxs)("div",{className:`flag ${i.default.flag}`,onClick:r,role:"button",children:[(0,a.jsx)("img",{src:e.flag,alt:e.country,width:36,height:27}),(0,a.jsx)("p",{children:t?`(${e?.currencyCode}) Select you country`:`${e?.country} ${e?.currencyCode}`})]})},83:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.InternationalizationPopup=void 0;const a=r(0),o=r(2),i=n(r(14)),s=r(23),c=r(84);t.InternationalizationPopup=({onClose:e,countryCode:t,changeCountryCode:r,syncCart:n,country:l,localizations:u})=>{const[d,p]=(0,o.useState)(l);return(0,o.useEffect)((()=>{p(l)}),[l]),(0,a.jsxs)(s.Popup,{children:[(0,a.jsxs)("div",{className:`InternationalizationPopup mainContainer ${i.default.mainContainer}`,children:[(0,a.jsx)("p",{children:"Now shipping worldwide"}),(0,a.jsx)("label",{children:"Shipping to:"}),(0,a.jsx)(c.Dropdown,{selectedCountry:d,setSelectedCountry:p,localizations:u})]}),(0,a.jsxs)("div",{className:`buttonContainer ${i.default.buttonContainer}`,children:[(0,a.jsx)("button",{className:`cancelButton ${i.default.cancelButton}`,onClick:t=>{t.preventDefault(),e()},children:"Cancel"}),(0,a.jsx)("button",{className:`primaryButton ${i.default.primaryButton}`,onClick:async t=>{t.preventDefault(),r(d.countryCode),n(d.currencyCode,d.countryCode),e()},children:"Shop now"})]})]})}},153:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowDown=void 0;const n=r(0);r(1),t.ArrowDown=function({color:e="#FFF",...t}){return(0,n.jsx)("svg",{width:"10",height:"7",viewBox:"0 0 10 7",fill:"none",className:t.className,children:(0,n.jsx)("path",{d:"M0.977539 1.43628L4.99875 5.45749C5.05736 5.5161 5.15239 5.5161 5.211 5.45749L9.23221 1.43628",stroke:e,strokeWidth:"1.50085",strokeLinecap:"round"})})}},23:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Popup=void 0;const a=r(0),o=n(r(4));t.Popup=({children:e})=>(0,a.jsx)("div",{className:`backdrop ${o.default.backdrop}`,children:(0,a.jsx)("div",{className:`popup ${o.default.popup}`,children:e})})},11:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TopBanner=void 0;const a=r(0),o=(r(1),n(r(15))),i=r(152),{topBanner:s,topBannerDesktop:c,topBannerMobile:l,hidden:u}=o.default;t.TopBanner=function({topBanner:e}){const{scrollStyle:t}=(0,i.useTopBarHook)();return e&&e.desktop_html&&e.show?(0,a.jsxs)("div",{class:`${s} topBanner ${"hidden"===t&&u}`,children:[(0,a.jsx)("a",{className:`${c} topBannerDesktop`,dangerouslySetInnerHTML:{__html:e.desktop_html},href:e.cta}),(0,a.jsx)("a",{className:`${l} topBannerMobile`,dangerouslySetInnerHTML:{__html:e.mobile_html},href:e.cta})]}):null}},10:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TopBar=void 0;const a=r(0),o=(r(1),n(r(13))),i=r(2),s=r(210),c=r(211),l=r(151),u=r(41),d=r(212),p=r(152),m=r(82),h=r(83),f=r(21),y=r(213),v=r(42),C=e=>e.replace("https://starsandhoney.com",""),{navbar:_,topBarContainer:g,topBarContainerOpen:x,hasTopBanner:j,mobileMenuIcon:b,mobileMenu:S,mobileMenuOpen:$,mobileMenuClose:I,mobileMenuContainer:k,mobileMenuItem:N,desktopMenu:M,desktopLinks:w,desktopIcons:P,logoSVG:T,crossIcon:B,desktopIconsShadow:D,hidden:F,blured:A,background:O,cartItemCount:z,bagIcon:E,intl:q}=o.default;t.TopBar=function({menu:e,bgTransparency:t,useSharedState:r,hasTopBanner:n}){const{setShowCart:L,showCart:H,cart:G,removeFromCart:V,featureInternationalization:K,countryCode:R,contextCountry:Z,changeCountryCode:U,syncCart:W,country:Y,localizations:J}=r,[Q,X]=(0,i.useState)(!1),{scrollStyle:ee}=(0,p.useTopBarHook)(),te=(0,y.useCookieListener)("localization"),re=()=>{X(!Q)},ne=async e=>{try{const t=e.filter((e=>e?.variant_id!==v.SHIPPING_ITEM_ID)),r=Array.from(new Set(t.map((e=>e?.handle||(e?.url?e.url.replace("/products/","").split("?")[0]:null))).filter(Boolean)));if(!r.length)return;const n=await Promise.all(r.map((async e=>{try{const t=await fetch(`/.outsmartly/cache?handle=products/${e}`);if(!t.ok)return[e,!1];const r=await t.json();return[e,r&&!1!==r.live]}catch{return[e,!1]}}))),a=Object.fromEntries(n);t.filter((e=>{const t=e?.handle||(e?.url?e.url.replace("/products/","").split("?")[0]:null);return!!t&&!1===a[t]})).length}catch{}};(0,i.useEffect)((()=>(document.documentElement.style.overflow=Q?"hidden":"",()=>{document.documentElement.style.overflow=""})),[Q]),(0,i.useEffect)((()=>{te&&"undefined"!=typeof document&&"https://starsandhoney.com/"===document.referrer&&"AT"!==te&&U(te)}),[te]),(0,i.useEffect)((()=>{W(Y?.currencyCode,Y?.countryCode)}),[Y]),(0,i.useEffect)((()=>{const e=G?.items||[];e.length&&(async()=>{ne(e)})()}),[G?.items]);const ae=(0,i.useMemo)((()=>{const e=G?.items||[];if(!e.length)return 0;const t=e.filter((e=>e?.variant_id!==v.SHIPPING_ITEM_ID)),r={},n=[];for(const e of t){const t=e?.properties?._dynamicBoxIndex;t?(r[t]||(r[t]=[]),r[t].push(e)):n.push(e)}const a=n.reduce(((e,t)=>e+(t?.quantity||0)),0);let o=0;for(const e in r){const t=r[e];if(!t?.length)continue;const n=t[0]?.variant_title,a="10-PACK---"===n||"10-PACK-----"===n?30:20,i=t.reduce(((e,t)=>e+10*(t?.quantity||0)),0);o+=Math.ceil(i/a)}return a+o}),[G?.items]),[oe,ie]=(0,i.useState)(!1),se=e=>{e.preventDefault(),ie(!0)},ce=(0,i.useMemo)((()=>!!K&&(R!==Z||Z!==f.DEFAULT_SHOPIFY_COUNTRY.countryCode)),[K,R,Z]);return(0,a.jsxs)("div",{className:`topBarContainer ${g} ${Q?x:null}`,children:[oe&&(0,a.jsx)(h.InternationalizationPopup,{onClose:()=>ie(!1),countryCode:R,changeCountryCode:U,syncCart:W,country:Y,localizations:J}),(0,a.jsxs)("nav",{className:`navbar ${_} ${"blured"===ee?`blured ${A}`:""} ${"hidden"===ee&&F} ${n?j:null} ${t?`bgTransparency ${o.default.bgTransparency}`:null} `+(ce?`intl ${q}`:""),children:[(0,a.jsx)("div",{className:`mobileMenuIcon ${b} ${t?`bgTransparency ${o.default.bgTransparency}`:null}`,onClick:re,children:(0,a.jsx)(s.Drawer,{})}),(0,a.jsx)("div",{className:`mobileMenu ${S} ${Q?$:I}`,onClick:re,role:"button","aria-label":"Menu",children:(0,a.jsxs)("div",{className:`mobileMenuContainer ${k} ${Q?$:I}`,onClick:e=>e.stopPropagation(),role:"button","aria-label":"Menu items",children:[(0,a.jsxs)("div",{className:`mobileMenuItem ${N}`,children:[(0,a.jsx)("a",{href:"https://starsandhoney.com/account/login",role:"button","aria-label":"Account",children:(0,a.jsx)(c.Account,{})}),ce&&(0,a.jsx)(m.TopBarFlag,{insideMenu:!0,country:Y,bgTransparency:t,onClickOpenPopup:se}),(0,a.jsx)("div",{className:B,onClick:re,children:(0,a.jsx)(u.Cross,{})})]}),e.items.map((e=>(0,a.jsx)("a",{className:"mobileMenuItemItem",href:C(e.url),role:"button","aria-label":e.title,children:e.title})))]})}),(0,a.jsx)("a",{href:"/",className:`logoSVG ${T}`,role:"button","aria-label":"Home",alt:"Home",children:(0,a.jsx)(d.Logo,{})}),(0,a.jsxs)("div",{className:`desktopMenu ${M}`,children:[(0,a.jsx)("div",{className:`desktopLinks ${w}`,children:e.items.slice(0,4).map((e=>(0,a.jsx)("a",{className:"desktopMenuItemItem",href:C(e.url),role:"button","aria-label":e.title,children:e.title})))}),ce&&(0,a.jsx)(m.TopBarFlag,{country:Y,bgTransparency:t,onClickOpenPopup:se}),(0,a.jsxs)("div",{className:`desktopIcons ${P}`,children:[(0,a.jsxs)("a",{href:"https://starsandhoney.com/account/login",role:"button","aria-label":"Desktop Account",children:[(0,a.jsx)(c.Account,{}),(0,a.jsx)("div",{className:`desktopIconsShadow ${D}`})]}),(0,a.jsxs)("div",{className:`bagIcon ${E}`,onClick:()=>{setTimeout((()=>{ne(G?.items||[])}),6e3),L(!H)},children:[(0,a.jsx)(l.Bag,{}),(0,a.jsx)("div",{className:`desktopIconsShadow ${D}`}),(0,a.jsx)("div",{className:`cartItemCount ${z}`,children:ae>0?ae:""})]})]})]})]}),(0,a.jsx)("div",{className:`background ${O} ${n?j:null} ${t?`bgTransparency ${o.default.bgTransparency}`:null}`})]})}},82:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.TopBarFlag=void 0;const a=r(0),o=r(153),i=n(r(13));t.TopBarFlag=({insideMenu:e,country:t,bgTransparency:r,onClickOpenPopup:n})=>(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("button",{className:`TopBarFlag ${i.default.topBarFlag} ${e?i.default.insideMenu:""}`,onClick:n,children:[(0,a.jsx)("img",{src:t.flag,alt:t.country,width:36,height:27}),(0,a.jsx)(o.ArrowDown,{color:r?"#FFF":"#000",className:i.default.arrowDown})]})})},152:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useTopBarHook=void 0;const n=r(2);t.useTopBarHook=()=>{const[e,t]=(0,n.useState)("");return(0,n.useEffect)((()=>{let e=100;function r(){let r=document.documentElement.scrollTop;t(r>e?"hidden":"blured"),r<20&&t(""),e=r<=0?0:r}return 0===document?.documentElement?.scrollTop||t("blured"),window.addEventListener("scroll",r),()=>{window.removeEventListener("scroll",r)}}),[]),{scrollStyle:e}}},211:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Account=void 0;const n=r(0);r(1),t.Account=function({}){return(0,n.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon-account",width:"100%",height:"100%",viewBox:"0 0 17 19",style:"fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;",children:(0,n.jsx)("path",{d:"M4.785,11.486C1.95,12.841 0,15.699 0,19L2,19C2,15.486 4.916,12.648 8.5,12.648C12.084,12.648 15,15.486 15,19L17,19C17,15.699 15.049,12.841 12.215,11.485C13.859,10.338 14.931,8.451 14.931,6.324C14.931,2.839 12.055,0 8.5,0C4.945,0 2.069,2.839 2.069,6.324C2.069,8.451 3.141,10.338 4.785,11.486ZM8.5,2C10.94,2 12.931,3.932 12.931,6.324C12.931,8.716 10.94,10.648 8.5,10.648C6.06,10.648 4.069,8.716 4.069,6.324C4.069,3.932 6.06,2 8.5,2Z",style:"fill:currentColor;"})})}},151:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Bag=void 0;const n=r(0);r(1),t.Bag=function(){return(0,n.jsx)("svg",{class:"cartsvgpath",clipRule:"evenodd",fillRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2",viewBox:"0 0 21 24",children:(0,n.jsx)("path",{d:"m4.96 8.322h-4.453v15.588h19.987v-15.588h-4.454v-1.779c0-3.091-2.5-5.606-5.54-5.606-3.047 0-5.54 2.521-5.54 5.606v1.779zm13.534 2v11.588h-15.987v-11.588h15.987zm-4.454-2v-1.779c0-1.982-1.591-3.606-3.54-3.606-1.954 0-3.54 1.628-3.54 3.606v1.779h7.08z",fill:"currentColor"})})}},210:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Drawer=void 0;const n=r(0);r(1),t.Drawer=function({}){return(0,n.jsx)("svg",{"aria-hidden":"true",focusable:"false",role:"presentation",class:"icon icon-nav",viewBox:"0 0 25 25",children:(0,n.jsx)("path",{d:"M0 4.062h25v2H0zm0 7h25v2H0zm0 7h25v2H0z"})})}},212:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0;const n=r(0);r(1),t.Logo=function(){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",id:"Calque_1","data-name":"Calque 1",version:"1.1",viewBox:"0 0 1920.7 841.9",children:[(0,n.jsx)("defs",{children:(0,n.jsx)("style",{children:".cls-1 {\n fill: #000;\n stroke-width: 0px;\n }"})}),(0,n.jsx)("path",{class:"cls-1",d:"M61.9,184.9v-65c0-48,14-69,54-69s54,18,54,67v154h39V97.9c0-57-36-81-93-81S21.9,41.9,21.9,116.9v81c0,91,31,148,78,217,48,70,72,108,72,231v77c0,46-15,68-56,68s-57-11-57-72v-141H19.9v145c0,79,32,102,96,102s96-32,96-106v-91c0-97-14-144-71-227-48-69-79-114-79-216Z"}),(0,n.jsx)("path",{class:"cls-1",d:"M802.9,545.9c53,0,75-22,75-70v-59c0-70-17-104-57-154-32-41-55-77-55-137v-32c0-31,9-45,37-45s39,12,39,44v91h35v-111c0-38-25-56-74-56s-74,26-74,69v50c0,63,27,103,59,143,39,48,53,79,53,151v40c0,30-10,44-38,44s-41-7-41-47v-83h-35v94c0,47,22,68,76,68Z"}),(0,n.jsx)("path",{class:"cls-1",d:"M1282.9,355.9c63,0,84-31,84-81V97.9c0-50-21-81-84-81s-84,31-84,81v177c0,50,21,81,84,81ZM1235.9,96.9c0-36,16-48,47-48s47,12,47,48v179c0,36-16,48-47,48s-47-12-47-48V96.9Z"}),(0,n.jsx)("polygon",{class:"cls-1",points:"327.9 355.9 366.9 355.9 366.9 59.9 444.9 59.9 444.9 24.9 250.9 24.9 250.9 59.9 327.9 59.9 327.9 355.9"}),(0,n.jsx)("polygon",{class:"cls-1",points:"1582.9 405.9 1677.9 405.9 1677.9 368.9 1582.9 368.9 1582.9 61.9 1705.9 61.9 1705.9 24.9 1582.9 24.9 1557.9 24.9 1543.9 24.9 1543.9 816.9 1557.9 816.9 1582.9 816.9 1711.9 816.9 1711.9 777.9 1582.9 777.9 1582.9 405.9"}),(0,n.jsx)("polygon",{class:"cls-1",points:"1444.9 740.3 1235.9 405.9 1197.9 405.9 1197.9 816.9 1235.9 816.9 1235.9 483.4 1443.9 816.9 1482.9 816.9 1482.9 24.9 1444.9 24.9 1444.9 740.3"}),(0,n.jsx)("polygon",{class:"cls-1",points:"1098.9 391.9 974.9 391.9 974.9 24.9 935.9 24.9 935.9 816.9 974.9 816.9 974.9 426.9 1098.9 426.9 1098.9 816.9 1137.9 816.9 1137.9 24.9 1098.9 24.9 1098.9 391.9"}),(0,n.jsx)("polygon",{class:"cls-1",points:"1862.9 24.9 1772.1 347.4 1705.9 110.9 1664.9 110.9 1750.9 406.9 1750.9 816.9 1789.9 816.9 1789.9 406.9 1900.9 24.9 1862.9 24.9"}),(0,n.jsx)("polygon",{class:"cls-1",points:"818.9 595.9 784.9 595.9 784.9 689.9 705.9 689.9 705.9 721.9 784.9 721.9 784.9 816.9 818.9 816.9 818.9 721.9 898.9 721.9 898.9 689.9 818.9 689.9 818.9 595.9"}),(0,n.jsx)("path",{class:"cls-1",d:"M327.9,405.9l-81,411h37l25.3-135h72.2l25.5,135h39l-79-411h-39ZM315.4,648.9l29.8-159,30,159h-59.8Z"}),(0,n.jsx)("path",{class:"cls-1",d:"M670.9,473.9c0-33.7-15.3-55.1-45.3-63.2,31.2-9.5,47.3-34.9,47.3-75.8V108.9c0-49-21-84-80-84h-108v792h39v-389h56c39,0,52,26,52,67v276c0,19,1,37,11,46h40c-9-13-12-27-12-54v-289ZM578.9,391.9h-55V58.9h48c36,0,62,11,62,66v199c0,47-3,68-55,68Z"})]})}},213:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useCookieListener=void 0;const n=r(2);t.useCookieListener=function(e,t=1e3){const[r,a]=(0,n.useState)(null);return(0,n.useEffect)((()=>{const n=e=>{const t=`; ${document.cookie}`.split(`; ${e}=`);return 2===t.length&&t.pop()?.split(";").shift()||null};a(n(e));const o=setInterval((()=>{const t=n(e);t!==r&&a(t)}),t);return()=>clearInterval(o)}),[e,t]),r}},218:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.imageResize=void 0,t.imageResize=(e,t)=>{if(!e)return e;let[r,n]=e.split("?"),a=r.split("/"),o=a.pop();if(!o)throw new Error("Invalid URL format");let i=o?.replace(".webp",`_${t}x.webp`),s=[...a,i].join("/");return n&&(s+="?"+n),s}}}]);