1"use strict";(globalThis.webpackChunkcore||=[]).push([[8200],{22326(e,t,a){a.r(t),a.d(t,{default:()=>ca});var s=a(74848),i=a(96540),r=a(14671),o=a(71468),n=a(38401),l=a(47767),d=a(57413),c=a(93045),u=a(47153),m=a(32100),p=a(3863),g=a(51041),x=a(21978),f=a(30751),h=a(66033),b=a(81106);const y=(0,n.YK)({addToOrder:{id:"ordering.productDetails.addToOrderButton",defaultMessage:"Add to Order"},backToOrder:{id:"ordering.productDetails.backToOrder",defaultMessage:"Back to order"},updateItem:{id:"ordering.productDetails.updateItem",defaultMessage:"Update item"},backToPreviousOrFavorites:{id:"ordering.productDetails.backToPreviousOrFavorites",defaultMessage:"Back to {isComingFromPrevious, select, true {previous} other {favorites}}"}}),N=()=>{const{formatMessage:e}=(0,n.tz)(),t=(0,o.d4)(p.Xi),a=(0,o.d4)(p.Kv),r=(0,o.d4)(p.jO),l=(0,o.wA)(),{showOrderTypeModal:d}=(0,b.A)(),{handleAddToCartClick:N=()=>{},handleBackToCartClick:j=()=>{},handleEditCartItemClick:v=()=>{},handleFavoriteClick:_=()=>{},isComingFromCart:C=!1,isComingFromFav:z=!1,isComingFromPrev:A=!1,isFavorite:k=!1,product:M={}}=(0,h.H)?.()??{};if(M?.error||M?.loading)return null;const S=z?"back-to-favorites-button":"back-to-previous-button";return(0,s.jsx)(m.A,{className:"frap___kOgCf",children:(0,s.jsx)("div",{className:"flex flex-column items-end",children:C?(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)("div",{"data-e2e":"back-to-order-button",onClick:j,children:(0,s.jsx)(u.A,{className:"mb3",mini:!0,children:e(y.backToOrder)})}),(0,s.jsx)("div",{"data-e2e":"update-item-button",onClick:v,children:(0,s.jsx)(u.A,{children:e(y.updateItem)})})]}):(0,s.jsxs)(i.Fragment,{children:[t&&!z&&!A&&(0,s.jsx)("div",{"data-e2e":"favorite-product-button",onClick:()=>{_()},children:(0,s.jsx)(u.A,{circular:!0,className:"mb3",mini:!0,children:(0,s.jsx)(f.A,{isFavorite:k})})}),z||A?(0,s.jsxs)(u.A,{className:"mb3","data-e2e":S,mini:!0,onClick:()=>{l(z?(0,c.VC)("/menu/favorites"):(0,c.VC)("/menu/previous"))},children:[e(y.backToPreviousOrFavorites,{isComingFromPrevious:A})," "]}):null,(0,s.jsx)("div",{"data-e2e":"add-to-order-button",onClick:async e=>{if(!t&&!a&&!r){const e=await(0,g.If)();l((0,x.Vq)({reputation:e}))}N(e),d()},children:(0,s.jsx)(u.A,{children:e(y.addToOrder)})})]})})})};var j=a(79607),v=a(49774),_=a(31431),C=a(42723),z=a(86570),A=a(89077),k=a(59083),M=a(55184),S=a(82934);const O=(0,n.YK)({available:{defaultMessage:"Available at {store}",id:"ordering.productPage.available"},notOrderable:{defaultMessage:"Unavailable to purchase online",id:"ordering.productPage.notOrderable"},selectStoreForAvailability:{defaultMessage:"Select a café to view availability",id:"ordering.productPage.selectStoreForAvailability"},temporarilyUnavailable:{defaultMessage:"Sold out at {store}",id:"ordering.productPage.temporarilyUnavailable"},unavailable:{defaultMessage:"This item is unavailable",id:"ordering.productPage.unavailable"},unavailableHere:{defaultMessage:"Not sold at {store}",id:"ordering.productPage.unavailableHere"}});var I=a(83607),L=a(65754);const P=(e,t)=>"not orderable"===e?(0,s.jsx)(d.In,{className:"color-red mr2",path:I.A}):t&&"available"===e||!t?(0,s.jsx)(d.In,{className:(t?"color-black":"color-black60")+" mr2",path:L.A}):(0,s.jsx)(d.In,{className:"color-red mr2",path:I.A}),T=(e,t)=>"notorderable"===e?(0,s.jsx)("span",{className:"text-bold","data-e2e":"product-unavailable-message",children:(0,s.jsx)(n.sA,{...O.notOrderable})}):t?"available"===e?(0,s.jsx)(n.sA,{...O.available,values:{store:t.name}}):"temporarilyunavailable"===e?(0,s.jsx)("span",{className:"text-bold","data-e2e":"product-unavailable-message",children:(0,s.jsx)(n.sA,{...O.temporarilyUnavailable,values:{store:t.name}})}):"notavailablehere"===e?(0,s.jsx)("span",{className:"text-bold","data-e2e":"product-unavailable-message",children:(0,s.jsx)(n.sA,{...O.unavailableHere,values:{store:t.name}})}):(0,s.jsx)("span",{className:"text-bold","data-e2e":"product-unavailable-message",children:(0,s.jsx)(n.sA,{...O.unavailable})}):(0,s.jsx)("span",{className:"color-textBlackSoft","data-e2e":"store-not-selected-message",children:(0,s.jsx)(n.sA,{...O.selectStoreForAvailability})}),F=({className:e})=>{const t=(0,o.d4)(p.Xi),{product:a,selectedStore:i,sizeInfo:{selectedSize:r}}=(0,h.H)(),{store:l}=i??{}
1,{openModal:c}=(0,d.k3)(),u=(0,o.d4)(C.pS),m=()=>{c({ariaLabelledBy:S.Px,component:S.Ay,componentProps:{outOfStockItem:{formCode:a?.formCode,productNumber:a?.productNumber,sizeCode:r?.sizeCode},source:"pdp"},id:S.fC})};if(a?.error||!a?.productOptions)return null;const g=a?.availability?.toLowerCase();return(0,s.jsxs)("div",{className:e,children:[(0,s.jsxs)("div",{className:"flex items-center","data-e2e":"availabilityStatus",children:[P(g,l)," ",T(g,l)]}),"available"!==g&&t&&l&&u&&(0,s.jsx)(d._9,{percentVisible:50,unobserveOnIntersection:!0,children:({elementRef:e})=>(0,s.jsx)(d.$n,{className:"mt3 ml5",onClick:m,ref:e,children:(0,s.jsx)(n.sA,{...M.A.similarItemsCta})})})]})},w="column___E5yKt",B="columnLeft___URdz6",$="columnRight___V2tpA",V=({className:e="",isNutritionPage:t=!1,leftColumn:a=null,leftColumnClassName:i="",rightColumn:r=null,rightColumnClassName:o="",rightColumnMaxWidth:n})=>(0,s.jsxs)("div",{className:`lg-flex ${e}`,children:[(0,s.jsx)("div",{className:`flex-grow ${w} ${t?`order-2 ${$}`:String(B)} ${i}`,children:a}),(0,s.jsx)("div",{className:`flex-grow ${w} ${t?`order-1 ${B}`:String($)} ${o}`,style:n?{maxWidth:n}:void 0,children:r})]}),R=(0,n.YK)({sizeLabel:{id:"ordering.productDetails.customizations.sizeLabel",defaultMessage:"Size"},sizeOptionsTitle:{id:"ordering.productDetails.sizeOptionsTitle",defaultMessage:"Size Options"},sizeWholeBeanLabel:{id:"ordering.productDetails.sizeWholeBeanLabel",defaultMessage:"Whole bean coffee"}}),D=()=>{},H=({onClick:e=D})=>{const{onSizeSelect:t,sizeInfo:a}=(0,h.H)(),{formatMessage:i}=(0,n.tz)();return(0,s.jsx)(d.l6,{className:"mb5","data-e2e":"size-selector",id:"sizeSelector",label:i(R.sizeLabel),onChange:e=>t(e.target.value),onClick:e,selectedOptionFormatter:e=>e?.text,value:a?.selectedSizeName,children:a?.sizeNames?.map((e,t)=>(0,s.jsxs)("option",{value:e,children:[e,a?.sizeAmounts[t]]},e))})};var U=a(46942),K=a.n(U);const W={sizeImage:"sizeImage___W8FSt",sizeItem:"sizeItem___uTNjF",activeCircle:"activeCircle___b0PHM",radioButton:"radioButton___qUguZ",wholeBean:"wholeBean___yCxdF",active:"active___ye2vx","grande-cold":"grande-cold____Emti sizeImage___W8FSt","grande-frapp":"grande-frapp___HgteG sizeImage___W8FSt","grande-hot":"grande-hot___UpEyP sizeImage___W8FSt","short-hot":"short-hot___PefwG sizeImage___W8FSt","tall-cold":"tall-cold____nGKQ sizeImage___W8FSt","tall-frapp":"tall-frapp___RO3kB sizeImage___W8FSt","tall-hot":"tall-hot___cRf4N sizeImage___W8FSt","trenta-cold":"trenta-cold___JVKtP sizeImage___W8FSt","venti-cold":"venti-cold___zxfu4 sizeImage___W8FSt","venti-frapp":"venti-frapp___ugcID sizeImage___W8FSt","venti-hot":"venti-hot___o2lA_ sizeImage___W8FSt","kids-hot":"kids-hot___CRYoA sizeImage___W8FSt",wholeBeanImage:"wholeBeanImage___L2p7m sizeImage___W8FSt"},E=()=>{},Q=({onClick:e=E})=>{const{onSizeSelect:t,sizeInfo:a}=(0,h.H)(),{isWholeBean:i}=a||{};return(0,s.jsx)("form",{className:"grid grid--alignCenter grid--compactGutter mb5","data-e2e":"size-selector",children:(0,s.jsxs)("fieldset",{children:[(0,s.jsx)("legend",{className:"hiddenVisually",children:"Size options"}),a?.sizeNames?.map((r,o)=>{const l=W[`${a?.sizeCodes?.[o]?.toLowerCase()}-${a?.productType}`],d=i?40:0,c=8+72*a?.selectedSizeIndex+d;return(0,s.jsxs)("div",{className:K()("gridItem px0 my2 position-relative",W.sizeItem,{[W.active]:a?.selectedSizeName===r,[W.wholeBean]:i}),children:[0===o?(0,s.jsx)("div",{className:W.activeCircle,style:{marginLeft:c}}):null,(0,s.jsxs)("label",{children:[(0,s.jsx)("input",{checked:a?.selectedSizeIndex===o,className:W.radioButton,"data-e2e":r,id:r,name:"size",onChange:e=>{t(e.target.value)},onClick:e,type:"radio",value:r}),(0,s.jsx)("div",{className:K()("cursor-pointer mx4 my2",{[l]:!i,[W.wholeBeanImage]:i})}),i?(0,s.jsxs)("div",{className:"text-xs text-center",children:[(0,s.jsx)("p",{className:"text-semibold",children:(0,s.jsx)(n.sA,{...R.sizeWholeBeanLabel})}),(0,s.jsx)("p",{children:r})]}):(0,s.jsxs)("div",{className:"text-xs text-center",children:[(0,s.jsx)("p",{className:"text-semibold",children:r}),(0,s.jsx)("p",{children:a?.sizeAmounts?.[o]})]})]})]},r)})]})})},q=()=>{const{product:{productType:e},sizeInfo:t}=(0,h.H)(),a=t?.isWholeBean||"beverages"===e&&t?.sizeNames?.length>1;if(!a)return null;const r=!t?.hasUnsupportedIconSizeCodes||t?.isWholeBean,o=a&&!r;return(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(d.DZ,{bottomBorder:!0,className:"mb5 text-semibold",size:"md",tagName:"h2",children:(0,s.jsx)(n.sA,{...R.sizeOptionsTitle})}),o&&(0,s.jsx)(H,{}),r&&(0,s.jsx)(Q,{})]})};var Y=a(69239),Z=a(55059);const G=(0,n.YK)({toppingsAppliedCount:{id:"ordering.productDetails.holidayToppingsBar.to
1ppingsAppliedCount",defaultMessage:"{count} {count, plural, one {topping} other {toppings}} applied"},modUnavailable:{id:"ordering.productDetails.holidayToppingsBar.overlay.modUnavailable",defaultMessage:"Sold out"}}),J=({count:e})=>(0,s.jsx)("div",{"aria-live":"polite","data-e2e":"applied-modifiers-count",children:(0,s.jsxs)("span",{className:"text-semibold text-xxs mb2",children:[(0,s.jsx)("span",{className:"hiddenVisually",children:(0,s.jsx)(n.sA,{...G.toppingsAppliedCount,values:{count:e}})}),(0,s.jsx)("span",{"aria-hidden":!0,children:e>0&&(0,s.jsx)(n.sA,{...G.toppingsAppliedCount,values:{count:e}})})]})}),X=({headerName:e,modifiers:t,shouldShowModifiersAppliedCountLabel:a=!1,containerOverrideStyle:r,onCheckedItemsChange:o})=>{const[l,c]=(0,i.useState)([]);return(0,s.jsxs)("div",{className:`flex flex-column items-center bg-colorSurfacePrimary borderRadius-lg modifiersContainer___doZHl ${r||""}`,children:[(0,s.jsx)(d.DZ,{tagName:"h2",className:K()("typeface-serif pt3 pr2 pl2",{pb3:!a||0===l?.length}),size:"xl",children:e}),a&&(0,s.jsx)(J,{count:l?.length}),(0,s.jsx)("ul",{className:K()("flex flex-column width-100",{mt3:a&&l?.length>0}),children:t.map(t=>(0,s.jsx)("li",{className:"width-100 text-sm toppingCheckboxWrapper___ioLbk",children:(0,s.jsx)(d.Sc,{className:"toppingCheckbox___i6Uhk",name:t.name,disabled:"unavailable"===t.status,onChange:t=>{(t=>{const a=t.checked?[...l,t.name]:l.filter(e=>e!==t.name);c(a),o?.({categoryName:e,checkedItems:a})})(t.target)},children:(0,s.jsxs)("span",{className:"flex flex-column items-center justify-center childSpan___KwHQY",children:[t.name,"unavailable"===t.status&&(0,s.jsx)("span",{className:"text-xxs color-errorOnPrimary",children:(0,s.jsx)(n.sA,{...G.modUnavailable})})]})})},t.name))})]})},ee=(0,n.YK)({exploreCTA:{id:"ordering.productDetails.holidayToppingsBar.exploreCTA",defaultMessage:"Explore holiday toppings"},favoritesHeader:{id:"ordering.productDetails.holidayToppingsBar.favoritesHeader",defaultMessage:"Our Favorites"}}),te=()=>(0,s.jsx)(X,{headerName:(0,s.jsx)(n.sA,{...ee.favoritesHeader}),shouldShowModifiersAppliedCountLabel:!0,modifiers:[{name:"Velvet Mascarpone Cream Cold Foam",status:"available"},{name:"Melted Marshmallow Cream Cold Foam",status:"available"},{name:"Red & Green Sprinkles",status:"available"}]}),ae=({onClick:e})=>(0,s.jsx)("button",{className:"exploreCTA___jimWj",onClick:e,children:(0,s.jsx)(n.sA,{...ee.exploreCTA})}),se=(0,n.YK)({header:{id:"ordering.productDetails.holidayToppingsBar.header",defaultMessage:"Holiday Toppings Bar"}});var ie=a(74088),re=a(54497);const oe=(0,n.YK)({closeButtonA11yLabel:{id:"ordering.productDetails.holidayToppingsBar.overlay.closeButtonA11yLabel",defaultMessage:"Close toppings dialog"},body:{id:"ordering.productDetails.holidayToppingsBar.overlay.body",defaultMessage:"Add a bit of holiday cheer to your drink."},saveFrapA11yLabel:{id:"ordering.productDetails.holidayToppingsBar.overlay.saveFrapA11yLabel",defaultMessage:"We have saved your toppings"}}),ne=({closeModal:e})=>{const t=(0,o.d4)(Z.xJ),a=(0,o.d4)(_.ax),[r,l]=(0,i.useState)({}),{formatMessage:c}=(0,n.tz)(),u=[{categoryName:"Holiday Cold Foams",toppings:[{name:"Velvet Mascarpone",status:"available"},{name:"Sugar Cookie",status:"available"},{name:"Caramel Brulée",status:"available"},{name:"Gingerbread",status:"available"},{name:"Peppermint Chocolate",status:"unavailable"},{name:"Melted Marshmallow",status:"available"}]},{categoryName:"Holiday Toppings",toppings:[{name:"Red & Green Sprinkles",status:"available"},{name:"Crispy Cookie Topping",status:"available"},{name:"Dark Chocolate Curls",status:"available"}]}],m=({categoryName:e,checkedItems:t})=>{l(a=>({...a,[e]:t}))},p=Object.values(r).some(e=>e.length>0);return(0,s.jsxs)(ie.A,{alignment:a?"rightCrate":"rightThird","data-e2e":"holiday-toppings-overlay",contentProps:{className:"flex flex-column bg-backgroundSnowPine frapPadding pt5 overlayContent___XlUjZ"},renderCloseButton:!1,children:[(0,s.jsx)("div",{className:"garlandImg___Iwv52","aria-hidden":"true"}),(0,s.jsxs)("div",{className:"headingContainer___a60vd flex flex-column items-center px4 pt9",children:[(0,s.jsx)(d.Jn,{alignment:"right",className:"bg-white borderRadius-xl position-absolute closeButton___mh0Kv",ariaLabel:c(oe.closeButtonA11yLabel),onClick:()=>{e()}}),(0,s.jsx)(d.DZ,{tagName:"h2",id:"holiday-toppings-overlay",className:"hiddenVisually",size:"xl",children:(0,s.jsx)(n.sA,{...se.header})}),(0,s.jsx)(d.$N,{className:"px0 md-px3",src:`${t}/holiday-toppings-bar/htb-header.svg`,alt:""}),(0,s.jsx)("p",{className:"mt3",children:(0,s.jsx)(n.sA,{...oe.body})}),(0,s.jsx)(d.$N,{className:"block",src:`${t}/holiday-toppings-bar/product-collage.png`,alt:""})]}),(0,s.jsx)("div",{className:"flex flex-column items-center px4 lg-px5 toppingsContainer___sz2wv",children:u.map(e=>(0,s.jsx)("div",{className:"mb3 flex justify-center width-100 self-stretch",children:(0,s.jsx)(X,{headerName:e.categoryName,modifiers:e.toppings,containerOverrideStyle:"modifiersWidthOverride___Z2CnC",onCheckedItemsChange:m})},e.categoryName))}),(0,s.jsx)(d.yU,{animation:"fade",children:p&&(0,s.jsx)(d.OS,{className:"position-fixed saveFrap____vWhT","aria-label":c(oe.saveFrapA11yLabel),children:(0,s.jsx)(n.sA,{...re.G.save})})})]})},le=()=>{const e=(0,o.d4)(Z.xJ),t=(0,o.d4)(_.yM),{openModal:a,closeModal:i}=(0,d.k3)(),r=()=>{a({component:ne,ariaLabelledBy:"holiday-toppings-overlay",componentProps:{closeModal:i},onEscape:()=>{i()}})};return(0,s.jsxs)("div",{"data-e2e":"holiday-toppings-entry-point",className:"position-relative overflow-hidden flex flex-column borderRadius-lg bg-backgroundSnowPine pt4 lg-pt9 pb9 root___J0S7u",children:[(0,s.jsx)("div",{className:"headerImg___MDKVS"}),(0,s.jsx)(V,{className:"items-center width-100 px3 lg-px0",leftColumnClassName:"flex items-center justify-center",leftColumn:(0,s.jsxs)("div",{className:"headingContainer___dg1lR flex flex-column items-center justify-center",children:[(0,s.jsxs)("button",{onClick:r,children:[(0,s.jsx)(d.DZ,{tagName:"h1",className:"hiddenVisually",size:"xl",children:(0,s.jsx)(n.sA,{...se.header})}),(0,s.jsx)(d.$N,{className:"htbLockup___bRuVr px0 md-px3",src:`${e}/holiday-toppings-bar/htb-header.svg`,alt:""})]}),!t&&(0,s.jsx)(ae,{onClick:r})]}),rightColumn:(0,s.jsx)("div",{className:"flex rightColumn___uPBnj",children:(0,s.jsx)(te,{})}),rightColumnMaxWidth:"none"}),t&&(0,s.jsx)("div",{className:"flex items-center justify-center mt3",children:(0,s.jsx)(ae,{onClick:r})}),(0,s.jsx)("img",{src:`${e}/holiday-toppings-bar/product-collage.png`,className:K()("position-absolute productC
1ollageImg___Fm40Z",{"absoluteCenter-x":t}),alt:""})]})};var de=a(32694),ce=a(10097),ue=a(48653);const me=()=>({type:ue.VA});var pe=a(96989);const ge="selectedBorder___wP2Tq",xe="headerText___VhWcA",fe="fadedText___lCuEF",he=({nutritionBadge:e})=>(0,s.jsx)("div",{className:`proteinBadge___ZlTTA ${xe} text-xxs text-semibold py1 px2 whiteSpace-noWrap`,"data-e2e":"nutrition-badge",children:e}),be=(0,n.YK)({apply:{id:"ordering.quickMod.apply",defaultMessage:"Apply"},modApplied:{id:"ordering.quickMod.modApplied",defaultMessage:"Mod applied"},applyA11yLabel:{id:"ordering.quickMod.applyA11yLabel",defaultMessage:"Apply {modName}"},resetMod:{id:"ordering.quickMod.reset",defaultMessage:"Reset"},sectionHeader:{id:"ordering.quickMod.sectionHeader",defaultMessage:"Quick Mods"}}),ye=({headingText:e,nutritionBadge:t,description:a,isApplied:i,onApply:r,onReset:o})=>(0,s.jsx)("div",{className:K()("mt2 cardComponent___nVT3k",{[ge]:i}),children:(0,s.jsxs)("div",{className:"innerContent___WCl4H",children:[(0,s.jsx)(d.DZ,{className:K()(`text-bold text-sm ${xe}`,{pb2:t}),tagName:"h3",children:e}),t&&(0,s.jsx)(he,{nutritionBadge:t}),(0,s.jsx)("p",{className:`${fe} py2 text-xs`,children:a}),(0,s.jsx)("div",{className:"position-relative quickModStateButtonsContainer___JE0pL",children:(0,s.jsx)(d.yU,{animation:"fade",children:i?(0,s.jsx)("div",{className:"position-absolute width-100",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsx)(d.In,{className:"mt1 color-black",path:pe.A,size:"16px",style:{stroke:"currentColor",strokeWidth:"0.75"}}),(0,s.jsx)("p",{className:fe,children:(0,s.jsx)(n.sA,{...be.modApplied})})]}),(0,s.jsx)("div",{className:"resetButtonFadeIn___wMo8Z",children:(0,s.jsx)(d.$n,{"data-e2e":"undo-button",onClick:o,children:(0,s.jsx)(n.sA,{...be.resetMod})})})]})},"reset"):(0,s.jsxs)(d.$n,{"data-e2e":"apply-quick-mod-button",onClick:r,className:"position-absolute",children:[(0,s.jsx)("span",{"aria-hidden":"true",children:(0,s.jsx)(n.sA,{...be.apply})}),(0,s.jsx)("span",{className:"hiddenVisually",children:(0,s.jsx)(n.sA,{...be.applyA11yLabel,values:{modName:e}})})]},"apply")})})]})});var Ne=a(3394);const je=()=>{const{updateProductOptionFromQuickMod:e,appliedQuickModId:t,product:a,sizeInfo:r,clearSelectedOptions:l}=(0,h.H)(),c=(0,o.d4)(_.yM),u=Y.qM[a.productNumber],m=Y.TC[a.productNumber],{selectedSize:p}=r,g=(0,o.wA)(),x=(e,t)=>{(0,z.QM)({productNumber:a.productNumber,quickModName:e?.headingText[p.name],clickType:t})},f=t=>{const a=m[t.id];e(t.id,a.map(e=>({categoryKeypath:e.categoryKeypath,optionProductNumber:e.optionProductNumber,formCode:e.formCode,size:e.size,exclusiveCategoryNum:e.exclusiveCategoryNum,topLevelCategoryNumber:e.topLevelCategoryNumber,value:(0,Ne.z)(e,p.name)}))),x(t,"APPLY")},b=e=>{l(),g(me()),x(e,"RESET")};return(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(d.DZ,{bottomBorder:!0,className:"mb2 text-semibold","data-e2e":"quick-mods-section-heading",size:"md",tagName:"h2",children:(0,s.jsx)(n.sA,{...be.sectionHeader})}),c?(0,s.jsx)(de.A,{activePaginatorClassName:"carouselActivePageControl___s45YD",carouselClassName:"mainContainerCarousel___PErHw width-100",controlClassName:"carouselPageControls___cPxp0",showPagerButtons:!1,showPaginator:!0,slideItemClassName:"carouselSlideItem___f3Kyn mx1",sliderClassName:"carouselSlider___dkqzd width-100",slidesPerPage:1,children:u.map(e=>(0,s.jsx)("div",{children:(0,s.jsx)(ye,{headingText:e.headingText[p.name],nutritionBadge:e.nutritionBadge[p.name],description:"object"==typeof e.description?e.description[p.name]:e.description,isApplied:t===e.id,onApply:()=>f(e),onReset:()=>b(e)})},e.id))}):(0,s.jsx)("div",{className:"mainContainerStack___So4h2 items-center",children:u.map(e=>(0,s.jsx)("div",{children:(0,s.jsx)(ye,{headingText:e.headingText[p.name],nutritionBadge:e.nutritionBadge[p.name],description:"object"==typeof e.description?e.description[p.name]:e.description,isApplied:t===e.id,onApply:()=>f(e),onReset:()=>b(e)})},e.id))})]})};var ve=a(22730),_e=a(43166),Ce=a(76318);const ze=(0,n.YK)({resetRecipe:{id:"ordering.pdp.resetRecipe",defaultMessage:"Reset to standard recipe"}}),Ae=({onResetRecipeRef:e})=>{const{formatMessage:t}=(0,n.tz)(),{clearSelectedOptions:a}=(0,h.H)(),i=(0,o.wA)();return(0,s.jsx)(d.$n,{onClick:()=>{a(),i(me()),e?.current?.focus()},children:t(ze.resetRecipe)}
1)},ke=(0,n.YK)({doneCustomizingLabel:{id:"ordering.productDetails.customizations.doneCustomizingLabel",defaultMessage:"Done customizing"}}),Me=()=>{const{formatMessage:e}=(0,n.tz)(),t=(0,i.useRef)(null),{selectedOptions:a,setIsCustomizing:r}=(0,h.H)(),o=(0,Ce.L)(a);return(0,s.jsxs)("div",{className:"flex flex-column items-center pt6",children:[(0,s.jsx)(_e.A,{message:e(ke.doneCustomizingLabel),onClick:()=>{r(!1)},ref:t}),o?.length?(0,s.jsx)("div",{className:"pt6",children:(0,s.jsx)(Ae,{onResetRecipeRef:t})}):null]})},Se=(e,t)=>t.find(t=>t.productNumber===e.productNumber),Oe=(0,n.YK)({addProductOption:{id:"ordering.customizations.addProductOptions",defaultMessage:"Add {productOptionName}"},none:{id:"ordering.pdp.selectWrapper.none",defaultMessage:"None"}}),Ie=({category:e,categoryKeyPath:t,productOptions:a,topLevelCategoryName:i,topLevelCategoryNumber:r})=>{const{formatMessage:o}=(0,n.tz)(),{updateProductOption:l,productOptionDefaults:c,setMoveFocusToNewPicker:u,appliedQuickModId:m,updateProductOptionFromQuickMod:p,selectedOptions:g}=(0,h.H)(),x=a.filter(e=>!g.some(t=>t.optionProductNumber===e.productNumber)),f=`${i}-${e.name}-inactive-options`;return(0,s.jsx)("div",{className:"pb2",children:(0,s.jsx)(d.l6,{"aria-label":o(Oe.addProductOption,{productOptionName:e.name}),"data-e2e":"other-options",id:f,label:o(Oe.addProductOption,{productOptionName:e.name}),onChange:e=>{const s=e.target.value,i=a.find(e=>e.form.name===s),o=i.productNumber,n=i?.form?.formCode,d={categoryKeypath:t,formCode:n,optionProductNumber:o,size:"modifier"===n?i.form.sizes.find(e=>"regular"===e.sizeCode):"qty"===n?i.form.sizes.find(e=>"add"===e.sizeCode):void 0,topLevelCategoryNumber:r,value:(()=>{if("qty"===n){const e=c[o];return e?.defaultValue??1}})()};l(d),m&&p(null,[d]),u(o)},useInactiveStyle:!0,value:null,children:(b=x,b.map(e=>{const t=e?.form?.name;return(0,s.jsx)("option",{"aria-label":t,value:t,children:t},t)}))},f)});var b},Le=({elementRef:e,productOptionNumber:t})=>{const{moveFocusToNewPicker:a,setMoveFocusToNewPicker:s}=(0,h.H)();(0,i.useEffect)(()=>{let i;return a&&a===t&&(i=setTimeout(()=>{e?.current?.focus?.(),s(null)},500)),()=>clearTimeout(i)},[])};var Pe=a(32779);const Te=({addNoneOption:e,children:t,id:a,modified:r,options:o,onSelection:l,productOptionNumber:c,useInactiveStyle:u,value:m,...p})=>{const g=(0,i.useRef)(),{formatMessage:x}=(0,n.tz)(),[f]=(0,i.useState)("");return Le({productOptionNumber:c,elementRef:g}),(0,s.jsx)("div",{className:"pb2",...p,children:(0,s.jsxs)(d.l6,{"aria-label":`${t} ${f}`,enableValidationMessage:!1,id:a,label:t,modified:r,onChange:e=>l(e.target.value),ref:g,secondaryLabel:r?x(Pe.o.customized):null,selectedOptionFormatter:e=>e?.value,useInactiveStyle:u,value:m??"",children:[e?(0,s.jsx)("option",{value:"NONE",children:x(Oe.none)},`none-${t}`):null,Array.from(o).map(([,{name:e}])=>(0,s.jsx)("option",{"aria-label":e,value:e,children:e},e))]})})},Fe=({categoryKeyPath:e,productOptionForm:t,productOptionNumber:a,topLevelCategoryName:i,topLevelCategoryNumber:r,useInactiveStyle:o})=>{const{formatMessage:l}=(0,n.tz)(),{productOptionDefaults:d={},selectedOptions:c=[],updateProductOption:u,updateProductOptionFromQuickMod:m,appliedQuickModId:p}=(0,h.H)(),g=d[a],x=c?.find(e=>e.optionProductNumber===a),f=x&&!o&&x?.size?.sizeCode!==g?.defaultSizeCode,b=x?.size?.sizeCode||g?.inRecipe&&g?.defaultSizeCode,y=(t?.sizes||[]).find(e=>e.sizeCode===b),N=y?.name,j=new Map,v=t?.sizes||[];if(v.length)for(const{sku:e,name:t,sizeCode:a}of v)j.set(e,{name:t,sizeCode:a});return(0,s.jsx)(Te,{"data-e2e":"modifier-select",id:`${a}-modifier-select`,modified:f,onSelection:s=>{const i=(t.sizes||[]).find(e=>e.name===s);if(s){const s={categoryKeypath:e,formCode:t.formCode,optionProductNumber:a,size:i,topLevelCategoryNumber:r};u(s),p&&m(null,[s])}},options:j,productOptionNumber:a,useInactiveStyle:o,value:o&&"no"===b?null:N,children:o?l(Oe.addProductOption,{productOptionName:t?.name}):i})},we=({categoryKeyPath:e,topLevelCategoryName:t,topLevelCategoryNumber:a,productOptionCategory:i,useInactiveStyle:r})=>{const{formatMessage:o}=(0,n.tz)(),{productOptionDefaults:l={},selectedOptions:d=[],updateProductOption:c=()=>{},appliedQuickModId:u,updateProductOptionFromQuickMod:m=()=>{}}=(0,h.H)()??{};let p="",g=!1,x="";const f=new Map,b=(i?.products??[]).reduce((e,t)=>
1{p=p||l[t?.productNumber]&&t,l[t?.productNumber]?.inRecipe&&(g=!0),x=x||d?.find(e=>e.optionProductNumber===t.productNumber)&&t;const a=t?.form?.sizes?.[0]?.sku,s=t?.form?.sizes?.[0]?.sizeCode,i=t?.form?.name;return a&&i&&f.set(a,{name:i,sizeCode:s}),e[t?.form?.name]=t,e},{}),y=p?.form?.name,N=x?.form?.name,j=N&&y!==N;return(0,s.jsx)(Te,{addNoneOption:!g,"data-e2e":"one-select",id:`${i?.name?.replace(/\s+/g,"-")?.toLowerCase()}-one-select`,modified:j,onSelection:t=>{const s=b[t],r="NONE"===t?"NONE":s?.productNumber,o=s?.form?.sizes?.[0],n=s?.form?.formCode,l={categoryKeypath:e,optionProductNumber:r,formCode:n,size:o,topLevelCategoryNumber:a,exclusiveCategoryNum:i.categoryNumber};c(l),u&&m(null,[l])},options:f,useInactiveStyle:r,value:N||y,children:r?o(Oe.addProductOption,{productOptionName:i?.name}):t})},Be=({optionDefaults:e,product:t})=>{const a=t?.sizes||[],s=e?.inRecipe,i=a.find(e=>"no"===e.sizeCode);return Boolean(!s||s&&i)};var $e=a(66076),Ve=a(20742);const Re=({ariaDescribedBy:e,ariaLabel:t,ariaLabelledBy:a,onClick:i,path:r,ref:o})=>(0,s.jsx)("button",{"aria-describedby":e,"aria-label":t,"aria-labelledby":a,className:"color-greenAccent",onClick:i,ref:o,children:(0,s.jsx)(d.In,{path:r,size:"24px"})}),De=(0,n.YK)({addQuantityText:{id:"ordering.stepper.addQuantityText",defaultMessage:"Add {productOptionName}"}
1,decreaseQuantityMessage:{id:"ordering.stepper.decreaseQuantityMessage",defaultMessage:"Quantity minus"},increaseQuantityMessage:{id:"ordering.stepper.increaseQuantityMessage",defaultMessage:"Quantity add"}}),He=()=>{},Ue=({ariaDescribedBy:e,currentQuantity:t,modifiedFromDefault:a,onClick:i=He,onValueChange:r,ref:o})=>{const{formatMessage:l}=(0,n.tz)();return(0,s.jsx)(Re,{ariaDescribedBy:e,ariaLabel:l(De.decreaseQuantityMessage),onClick:()=>{r?.(t-1),i()},path:a?$e.A:Ve.A,ref:o})};var Ke=a(43956),We=a(33406);const Ee=()=>{},Qe=({accessibleLabelId:e,currentQuantity:t,defaultQuantity:a,inRecipe:i,modifiedFromDefault:r,onClick:o=Ee,onValueChange:l,productOptionName:d,ref:c})=>{const{formatMessage:u}=(0,n.tz)();return(0,s.jsx)(Re,{ariaDescribedBy:t||i?e:void 0,ariaLabel:t?u(De.increaseQuantityMessage):i?u(De.addQuantityText,{productOptionName:d}):void 0,ariaLabelledBy:t||i?void 0:e,onClick:()=>{l?.(t?t+1:a||1),o()},path:r?Ke.A:We.A,ref:c})},qe=({className:e="",currentQuantity:t=0,defaultQuantity:a=0,inRecipe:r,isRemovable:l,onValueChange:c,productOptionForm:u,productOptionName:m="",productOptionNumber:p,topLevelCategoryName:g,unit:x,useInactiveStyle:f,validationId:h})=>{const{formatMessage:b}=(0,n.tz)(),y=(0,i.useRef)(null),N=(0,i.useRef)(null),[j,v]=(0,i.useState)(!1),_=r?t!==a:t>0,z=l?t>0:t>1,A=(0,o.d4)(C.fl),k=t>=A;Le({productOptionNumber:p,elementRef:y}),(0,i.useEffect)(()=>!z&&j?y?.current?.focus():k?N?.current?.focus():void 0,[t,z,j,k]);const M=()=>{j||v(!0)},S=`${m.replace(/\s+/g,"")}HiddenLabel`,O=(({currentQuantity:e,inRecipe:t,productOptionForm:a,productOptionName:s,unit:i})=>{const{formatMessage:r}=(0,n.tz)(),o=(a.sizes||[]).find(e=>"no"===e.sizeCode);let l=r(De.addQuantityText,{productOptionName:s});return!e&&t&&Boolean(o)?l=o.name:e>0&&(l=((e,t)=>{if(e.includes("(s)")){const a=/\s*\(s\)/;return 1===t?e.replace(a,""):e.replace(a,"s")}return e})(i,e)),l})({currentQuantity:t,inRecipe:r,productOptionForm:u,productOptionName:m,unit:x});return(0,s.jsx)("div",{"aria-label":`${g??""}, ${O}`,className:e,"data-e2e":"stepper",role:"group",children:(0,s.jsxs)(d.E4,{floatLabelActive:!0,floatLabelActiveText:g,floatLabelText:g,secondaryLabel:_?b(Pe.o.customized):null,useInactiveStyle:f,validationId:h,children:[(0,s.jsx)(d.yU,{"aria-hidden":!0,className:"text-sm flex-grow",children:(0,s.jsx)("div",{className:"flex justify-between items-center",children:(0,s.jsx)("span",{children:O})})}),(0,s.jsx)("div",{"aria-live":j?"polite":"off",className:"hiddenVisually",id:S,children:(()=>{const e=b(Pe.o.customized);if(!t)return _?`${O}, ${e}`:O;const a=`${t} ${O}`;return _?`${a}, ${e}${k?`, ${b(Pe.o.maximumReached)}`:""}`:`${a}, ${b(Pe.o.default)}`})()}),(0,s.jsxs)("div",{className:"flex",children:[z&&(0,s.jsx)(Ue,{ariaDescribedBy:S,currentQuantity:t,modifiedFromDefault:_,onClick:M,onValueChange:c,ref:N}),t?(0,s.jsx)("span",{"aria-hidden":!0,className:"text-sm px2",children:t}):null,k?(0,s.jsx)("div",{style:{width:"24px"}}):(0,s.jsx)(Qe,{accessibleLabelId:S,currentQuantity:t,defaultQuantity:a,inRecipe:r,modifiedFromDefault:_,onClick:M,onValueChange:c,productOptionName:m,ref:y})]})]})})},Ye=({categoryKeyPath:e,topLevelCategoryName:t,topLevelCategoryNumber:a,productOptionCategory:i,productOptionForm:r,productOptionNumber:o,useInactiveStyle:n})=>{const{productOptionDefaults:l,selectedOptions:d,updateProductOption:c,updateProductOptionFromQuickMod:u,appliedQuickModId:m}=(0,h.H)(),p=l[o],g=d?.find(e=>e.optionProductNumber===o),x=r?.name,f=i?.attributes?.unitOfMeasure?`${x} ${i.attributes.unitOfMeasure}`:String(x),b="number"==typeof g?.value?g.value:p?.inRecipe&&p?.defaultValue;return(0,s.jsx)(qe,{className:"pb2",currentQuantity:b,defaultQuantity:p?.defaultValue,inRecipe:p?.inRecipe,isRemovable:Be({optionDefaults:p,product:r}),onValueChange:t=>{const s=(r?.sizes||[]).find(e=>"no"===e.sizeCode),i=!t&&s?s:r?.sizes?.[0],n={categoryKeypath:e,formCode:r.formCode,optionProductNumber:o,size:i,topLevelCategoryNumber:a,value:t};c(n),m&&u(null,[n])},productOptionForm:r,productOptionName:x,productOptionNumber:o,topLevelCategoryName:n?null:t,unit:f,useInactiveStyle:n,validationId:`stepper-${o}`})},Ze=({categoryKeyPath:e,productOption:t,topLevelCategoryName:a,topLevelCategoryNumber:r})=>{const{isCustomizing:o,productOptionDefaults:n,selectedOptions:l,updateProductOption:c,appliedQuickModId:u,updateProductOptionFromQuickMod:m}=(0,h.H)(),p=t?.productNumber,g=t?.form?.name,x=t?.form?.sizes?.[0],f=(0,i.useCallback)(()=>{const e=n?.[p]?.defaultValue;return e??!1},[n,p]),b=g.replace(/\s+/g,""),y=(0,i.useMemo)(()=>{const e=l?.find(e=>e.optionProductNumber===p);return"boolean"==typeof e?.value?e?.value:f()},[l,p,f]);return(0,s.jsx)(d.Yh,{checkboxId:`${b}-checkbox`,checked:y,label:(0,s.jsx)("div",{className:"flex justify-between flex-auto items-center mr2",children:(0,s.jsx)("span",{children:g})}
1),onUpdate:t=>{const a={categoryKeypath:e,formCode:"yes-no",optionProductNumber:p,size:x,topLevelCategoryNumber:r,value:t};c(a),u&&m(null,[a])},secondaryLabel:o?void 0:a,useInactiveStyle:!y})},Ge=({category:e,categoryKeyPath:t,formCode:a,productOption:i,topLevelCategoryName:r,topLevelCategoryNumber:o,useInactiveStyle:n})=>"one"===a?(0,s.jsx)(we,{categoryKeyPath:t,productOptionCategory:e,topLevelCategoryName:r,topLevelCategoryNumber:o,useInactiveStyle:n},i.productNumber):"modifier"===a?(0,s.jsx)(Fe,{categoryKeyPath:t,productOptionForm:i.form,productOptionNumber:i.productNumber,topLevelCategoryName:r,topLevelCategoryNumber:o,useInactiveStyle:n},i.productNumber):"qty"===a?(0,s.jsx)(Ye,{categoryKeyPath:t,productOptionCategory:e,productOptionForm:i.form,productOptionNumber:i.productNumber,topLevelCategoryName:r,topLevelCategoryNumber:o,useInactiveStyle:n},i.productNumber):"yes-no"===a?(0,s.jsx)(Ze,{categoryKeyPath:t,productOption:i,topLevelCategoryName:r,topLevelCategoryNumber:o}):void 0,Je=({category:e,topLevelCategory:t})=>{const{customerRecipe:a}=(0,h.H)(),r=(0,i.useMemo)(()=>((e,t)=>{if("one"===e.products[0]?.form?.formCode)return((e,t)=>{let a,s=!1;for(const i of e.products){const e=Se(i,t);e&&(s=!0,a=e)}return{singlePickerOptions:[{option:s?a:e.products[0],isInRecipe:s}],otherOptions:[]}})(e,t);if(1===e.products.length)return((e,t)=>{const a=Se(e,t);return{singlePickerOptions:[{option:a||e,isInRecipe:Boolean(a)}],otherOptions:[]}})(e.products[0],t);const a=[],s=[];for(const i of e.products){const e=Se(i,t);e?a.push(e):s.push(i)}const i=[];let r=[];for(const e of a)i.push({option:e,isInRecipe:!0});return 1===s.length?i.push({option:s[0],isInRecipe:!1}):r=s,{singlePickerOptions:i,otherOptions:r}})(e,a),[e,a]);if(e.children?.length>0)return e.children.map(t=>(0,s.jsx)(Je,{category:t,topLevelCategory:e},t.name));const o=t?t.name:e.name,n=t?t.categoryNumber:e.categoryNumber,l=t?[t.categoryNumber,e.categoryNumber]:[e.categoryNumber];return(0,s.jsxs)(i.Fragment,{children:[r.singlePickerOptions.map(({option:t,isInRecipe:a})=>{const i=a?t?.formCode:t?.form?.formCode,r=a?t?.productOption:t;return(0,s.jsx)(Ge,{category:e,categoryKeyPath:l,formCode:i,productOption:r,topLevelCategoryName:o,topLevelCategoryNumber:n,useInactiveStyle:a&&t.deselected||!a},`${r?.productNumber}-${i}`)}),r.otherOptions.length>1?(0,s.jsx)(Ie,{category:e,categoryKeyPath:l,productOptions:r.otherOptions,topLevelCategoryName:o,topLevelCategoryNumber:n},r.otherOptions[0]?.formCode??"empty-options"):null]})},Xe=Je,et=()=>{const{formatMessage:e}=(0,n.tz)(),t=(0,i.useRef)(null),{product:{productOptions:a},setIsCustomizing:r}=(0,h.H)(),o=a.length,l=Math.ceil(o/2);(0,i.useEffect)(()=>{t.current?.focus()},[]);const c=(e,t)=>a.slice(e,t).map(e=>{const t=e.name;return(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(d.DZ,{bottomBorder:!0,className:"pt3 pb3",size:"md",tagName:"h2",children:t}),(0,s.jsx)(Xe,{category:e},`${e.categoryNumber}-${t}`)]},`${e.categoryNumber}-${t}`)});return(0,s.jsxs)("div",{children:[(0,s.jsxs)(d.$n,{className:"alignmentLeft___pimFR mr4 text-sm flex content-center",color:"black","data-e2e":"done-customizing-button",onClick:()=>{r(!1)},ref:t,visualStyle:"textOnly",children:[(0,s.jsx)(d.In,{className:"pr5",path:ve.A,size:"24px"}),e(ke.doneCustomizingLabel)]}),(0,s.jsx)(V,{leftColumn:c(0,l),rightColumn:c(l)}),(0,s.jsx)(Me,{})]})};var tt=a(94058),at=a(64211);const st=(0,n.YK)({customizedHeader:{id:"ordering.includedSection.customizedHeader",defaultMessage:"Customized Recipe"},customizeLabel:{id:"ordering.includedSection.customizeLabel",defaultMessage:"Customize"},defaultHeader:{id:"ordering.includedSection.defaultHeader",defaultMessage:"What's Included"}}),it=({filteredSelectedOptions:e})=>{const{formatMessage:t}=(0,n.tz)(),a=(0,i.useRef)(null),{doneCustomizing:r,product:o,setIsCustomizing:l}=(0,h.H)(),{productOptions:d}=o??{};return(0,i.useEffect)(()=>{r&&a.current?.focus()},[r]),(0,s.jsxs)(i.Fragment,{children:[d?.length?(0,s.jsx)("div",{className:"pt5 text-center md-text-left",children:(0,s.jsx)(_e.A,{message:t(st.customizeLabel),onClick:()=>{l(!0)},ref:a})}):null,e?.length?(0,s.jsx)("div",{className:"pt6 text-center md-text-left",children:(0,s.jsx)(Ae,{onResetRecipeRef:a})}):null]})},rt=()=>{const{formatMessage:e}=(0,n.tz)(),{product:t,customerRecipe:a,selectedOptions:r}=(0,h.H)(),{error:l,errorMessage:c,productOptions:u}=t||{},m=(0,o.d4)(at.Du);if(l&&!m)return(0,s.jsx)("p",{children:e(c)});if(!u)return(0,s.jsx)("div",{children:(0,s.jsx)(tt.A,{})});const p=(0,Ce.L)(r),g=p?.length?st.customizedHeader:st.defaultHeader;return(0,s.jsxs)(i.Fragment,{children:[a?.length?(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(d.DZ,{bottomBorder:!0,className:"mb3 text-semibold","data-e2e":"included-section-heading",size:"md",tagName:"h2",children:e(g)}),a.map(e=>{const{categoryKeyPath:t,deselected:a,formCode:i,topLevelCategoryName:r,topLevelCategoryNumber:o,productNumber:n,productOptionCategory:l,productOption:d}=e;return(0,s.jsx)(Ge,{category:l,categoryKeyPath:t,formCode:i,productOption:d,topLevelCategoryName:r,topLevelCategoryNumber:o,useInactiveStyle:a},`${n}-${i}`)})]}):null,(0,s.jsx)(it,{filteredSelectedOptions:p})]})};var ot=a(471);const nt=()=>{const{isCustomizing:e,product:t,sizeInfo:a}=(0,h.H)(),{isPdpQuickModEnabled:r}=(0,A.A)(),{isHolidayToppingsBarEnabled:n}=(0,ot.A)(),l=(0,o.d4)(C.mn).showHolidayToppingsBar,c=n&&l,u=(0,o.d4)(j.K3),m=(0,o.d4)(v.kx),[p,g]=(0,i.useState)(!1),x=(0,o.d4)(C.ML),f=(0,o.d4)(_.yM),b=(0,k.A)(t),y=r&&x&&Y.vt.includes(b);return(0,i.useEffect)(()=>{const e=setTimeout(()=>{p||t?.loading||((0,z._1)({sizeInfo:a,product:t,currencyCode:u,selectedStore:m}),g(!0))},200);return()=>clearTimeout(e)},[a]),(0,s.jsx)(d.yU,{animation:"fadeGrow",children:e?(0,s.jsx)(et,{},"customization"):(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(V,{leftColumn:(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(q,{}),y?(0,s.jsxs)(s.Fragment,{children:[f&&(0,s.jsx)(je,{}),(0,s.jsx)(F,{className:"pb5"}),(0,s.jsx)(rt,{})]}):(0,s.jsx)(F,{className:"pb5"})]}),rightColumn:(0,s.jsx)(i.Fragment,{children:y?!f&&(0,s.jsx)("div",{className:"overrideRightGutter___QJG9O",children:(0,s.jsx)(je,{})}):(0,s.jsx)(rt,{})})},"mainPDPContent"),c&&(0,s.jsx)(le,{})]})})};var lt=a(84976);const dt=(0,n.YK)({allergenDisclaimer:{id:"ordering.productInfo.allergenDisclaimer",defaultMessage:"We cannot guarantee that any unpackaged products served in our cafés are allergen-free because we use shared equipment to café, prepare, and serve them. Customers with allergies can find ingredient information for products on the labels of our packaged products or online at Starbucks.com/menu."},allergensTitle:{id:"ordering.shared.allergensTitle",defaultMessage:"Allergens"},backToContent:{id:"ordering.shared.backToContent",defaultMessage:"Back to content"},caffeineDisclaimer:{id:"ordering.menu.caffeine.disclaimer",defaultMessage:"** Caffeine is an approximate value."},disclaimerHeading:{id:"ordering.menu.nutrition.disclaimerHeading",defaultMessage:"Nutrition disclaimers"},generalNutritionDisclaimer:{id:"ordering.menu.nutrition.disclaimer",defaultMessage:"Nutrition information is calculated based on our standard recipes. Because our products may be customized, exact information may vary."},dailyValuesDisclaimer:{id:"ordering.menu.dailyValues.disclaimer",defaultMessage:"2,000 calories a day is used for general nutrition advice, but calorie needs vary."},ingredientsTitle:{id:"ordering.ingredients.title",defaultMessage:"Ingredients"},nutritionTitle:{id:"ordering.menu.nutrition.title",defaultMessage:"Nutrition"},nutritionNotAvailable:{id:"ordering.menu.nutrition.notAvailable",defaultMessage:"See ingredient statement or package for allergens"}
1,beveragesPdfBlurb:{id:"ordering.menu.nutrition.beveragesPdfBlurb",defaultMessage:"This guide doesnât just tell you about the caffeine content; it contains nutritional information on many of our classic beverages you enjoy at Starbucks. But weâve included the caffeine info as well, in case you were wondering."},foodPdfBlurb:{id:"ordering.menu.nutrition.foodPdfBlurb",defaultMessage:"This guide contains nutritional information â including protein, sugar, and carbohydrate content â for many of the fresh food products available in Starbucks cafés in the UK and Ireland."}}),ct=()=>{const e=(0,h.H)().sizeInfo?.selectedSize?.allergens??{};return(0,s.jsxs)("div",{"data-e2e":"allergensSection",children:[(0,s.jsx)(d.DZ,{bottomBorder:!0,className:"mb3 text-semibold",size:"md",tagName:"h2",children:(0,s.jsx)(n.sA,{...dt.allergensTitle})}),e.shouldDisplay&&e.text?(0,s.jsx)("p",{className:"my1",children:e.text}):(0,s.jsx)("p",{className:"my1",children:(0,s.jsx)(n.sA,{...dt.nutritionNotAvailable})}),(0,s.jsx)("div",{className:"color-textBlackSoft mt1 pt3",children:(0,s.jsx)(n.sA,{...dt.allergenDisclaimer})})]})},ut=(e,t,a)=>t?e:(0,s.jsx)("span",{className:"text-bold",children:e},a),mt=()=>{const e=(0,h.H)().sizeInfo?.selectedSize?.ingredients??[],t=(e=>{const t=[],a=(e,s,i)=>{if(t.push(ut(s&&!e?.name?.startsWith(".")?`, ${e.name}`:e.name,i,s)),e.children.length){t.push((e=>ut(e?" (":" [",e+1))(i));for(const[t,s]of e.children.entries())a(s,t,i+1);t.push((e=>ut(e?")":"]",e+1))(i))}};for(const[t,s]of e.entries())a(s,t,0);return t})(e);return(0,s.jsxs)("div",{className:"pb5","data-e2e":"ingredientsSection",children:[(0,s.jsx)(d.DZ,{bottomBorder:!0,className:"mb3 text-semibold",size:"md",tagName:"h2",children:(0,s.jsx)(n.sA,{...dt.ingredientsTitle})}),(0,s.jsx)("p",{className:"my1",children:e.length?t:(0,s.jsx)(n.sA,{...dt.nutritionNotAvailable})})]})},pt="offset___GF0NP",gt="target___hkBdl",xt=({caffeineDisclaimerId:e,caffeineElementId:t,caffeineRangeMax:a,caffeineRangeMaxUnits:i,className:r,disclaimerTitleId:o,displayValue:n,isCaffeine:l})=>l?(0,s.jsx)("p",{className:`inline ${pt} ${gt}`,id:t,children:(0,s.jsxs)("span",{className:r,children:[n,a&&` - ${a} ${i}`,(0,s.jsx)("a",{"aria-labelledby":o,className:"text-noUnderline ",href:`#${e}`,children:"**"})]})}):(0,s.jsx)("span",{className:r,children:n}),ft=({caffeineDisclaimerId:e,caffeineElementId:t,disclaimerTitleId:a,fact:i,isSubfact:r=!1})=>{const o="Caffeine Range",n="Gamme de Caféine",{id:l,displayName:d,displayValue:c,dailyValue:u,subfacts:m}=i,p=r?"color-textBlackSoft":"text-semibold",g=r?"":"text-semibold",x="Caffeine"===d||"Caféine"===d,f=i?.maximum?.displayName===o||i?.maximum?.displayName===n?i?.maximum?.value:null,h=i?.maximum?.displayName===o||i?.maximum?.displayName===n?i?.maximum?.unitOfMeasure:null,b=m?"ul":"div",y=m?"li":"div";return(0,s.jsx)("li",{children:(0,s.jsxs)(b,{children:[(0,s.jsxs)(y,{className:r?"subContainer___bT9WA hasBorder___mCRuR spaceBetween___i4Wrw flexRow___qup4i":"container___Ds7kK hasBorder___mCRuR spaceBetween___i4Wrw flexRow___qup4i yPadding___YXplK",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:`${p} pr1`,children:d}),(0,s.jsx)(xt,{caffeineDisclaimerId:e,caffeineElementId:t,caffeineRangeMax:f,caffeineRangeMaxUnits:h,className:p,disclaimerTitleId:a,displayValue:c,isCaffeine:x})]}),(0,s.jsx)("span",{className:g,children:u})]}),m?m.map(e=>(0,s.jsx)(ft,{fact:e,isSubfact:!0},e.id)):null]})},l)},ht=ft,bt="disclaimerTitleId",yt=({nutrition:e,nutritionHeadingId:t,showCaloriesFromFat:a})=>{const{formatMessage:r}=(0,n.tz)(),{calories:o,caloriesFromFat:l,additionalFacts:d}=e,c="caffeineDisclaimer",u="caffeineElement",m=(0,i.useMemo)(()=>d.some(e=>"Caffeine"===e?.displayName||"Caféine"===e?.displayName),[d]),p=d.map((e,t)=>(0,s.jsx)(ht,{caffeineDisclaimerId:c,caffeineElementId:u,disclaimerTitleId:bt,fact:e},e?.id??t)),g=a?"ul":"span",x=a?"li":"span";return(0,s.jsxs)("div",{"data-e2e":"nutritionTable",children:[(0,s.jsxs)("ul",{children:[(0,s.jsx)("li",{className:"calories___HqGcu yPadding___YXplK hasBorder___mCRuR",children:(0,s.jsxs)(g,{className:"flex justify-between",children:[(0,s.jsxs)(x,{className:"text-semibold",children:[(0,s.jsx)("span",{className:"pr1",children:o.displayName}),(0,s.jsx)("span",{children:o.displayValue})]}),a&&(0,s.jsxs)("li",{className:"text-semibold pl2 whiteSpace-noWrap",children:[(0,s.jsx)("span",{className:"pr1",children:l.displayName}),(0,s.jsx)("span",{children:l.displayValue})]})]})}),p]}),(0,s.jsx)("h3",{className:"hiddenVisually",id:bt,children:r(dt.disclaimerHeading)}),(0,s.jsxs)("ul",{className:"color-textBlackSoft",children:[(0,s.jsx)("li",{className:"mt3",children:r(dt.dailyValuesDisclaimer)}),m?(0,s.jsxs)("li",{className:`mt3 ${pt} ${gt}`,id:c,children:[r(dt.caffeineDisclaimer),(0,s.jsx)("a",{"aria-describedby":t,"aria-label":r(dt.backToContent),className:"text-noUnderline",href:`#${u}`,children:"â©"})]}):null,(0,s.jsx)("li",{className:"mt3",children:r(dt.generalNutritionDisclaimer)})]})]})},Nt="nutritionHeadingId",jt=(0,o.Ng)(e=>({showCaloriesFromFat:(0,C.yt)(e)}))(({className:e,showCaloriesFromFat:t})=>{const{sizeInfo:a}=(0,h.H)(),{selectedSize:i}=a,{nutrition:r}=i||{};return(0,s.jsxs)("div",{className:`pb5 ${e||""}`,"data-e2e":"nutritionSection",children:[(0,s.jsx)(d.DZ,{bottomBorder:!0,className:"mb3 text-semibold",id:Nt,size:"md",tagName:"h2",children:(0,s.jsx)(n.sA,{...dt.nutritionTitle})}),r?(0,s.jsx)(yt,{nutrition:r,nutritionHeadingId:Nt,showCaloriesFromFat:t}):(0,s.jsx)(n.sA,{...dt.nutritionNotAvailable})]})}),vt=()=>{const{product:{name:e,productType:t}}=(0,h.H)(),a=(0,l.zy)(),o=a?.pathname?.split("/nutrition")?.[0],c=(0,n.tz)(),u=(0,s.jsx)(jt,{}),m="coffees"!==t&&(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(mt,{}),(0,s.jsx)(ct,{})]});return(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(r.A,{children:`${e}: ${c.formatMessage(dt.nutritionTitle)}`}),(0,s.jsxs)(lt.N_,{className:"block mb5 text-noUnderline text-semibold ","data-e2e":"backLink",to:o,children:[(0,s.jsx)(d.In,{className:"pr1",path:ve.A,size:"24px"}),(0,s.jsx)(n.sA,{...re.G.back})]}),(0,s.jsx)(V,{isNutritionPage:!0,leftColumn:u,rightColumn:m})]})};var _t=a(88573),Ct=a(19784);
1const zt=(0,n.YK)({caloriesDisclaimer:{id:"ordering.productDetailsHeader.caloriesDisclaimer",defaultMessage:"Nutrition information is based on standard recipes and does not reflect customizations"},caloriesDisclaimerAriaLabel:{id:"ordering.productDetailsHeader.caloriesDisclaimerAriaLabel",defaultMessage:"See calories disclaimer"}});var At=a(93517);const kt=({innerClassName:e,iconClassName:t})=>{const{formatMessage:a}=(0,n.tz)();return(0,s.jsx)("span",{className:"position-relative","data-e2e":"calories-disclaimer-tooltip",children:(0,s.jsx)("span",{className:K()("position-absolute",e),children:(0,s.jsx)(d.m_,{bodyText:a(zt.caloriesDisclaimer),closeButtonAriaLabel:a(re.G.closeLabel),tooltipClassName:"text-left",children:(0,s.jsx)(d.K0,{ariaLabel:a(zt.caloriesDisclaimerAriaLabel),className:`color-textWhiteSoft ${t??""}`,path:At.A,size:"16px"})})})})},Mt="auxiliaryProductInfoFont___dnBJo",St=({productNameClass:e})=>{const{isCustomizing:t,sizeInfo:a={}}=(0,h.H)(),{selectedSize:r,selectedSizeName:n}=a||{},{nutrition:l}=r||{},d=(0,o.d4)(Ct.AU),c=Boolean(d?.pathname?.includes("/nutrition")),u=l?.servingSize?.displayValue,m=l?.calories?.displayValue,p=l?.calories?.displayName,g=(t||c)&&n&&u,x=(m||!m)&&p,f=n?.trim()===u?.trim()?n:`${n} ${u}`,b=e;return(0,s.jsxs)(i.Fragment,{children:[g&&(0,s.jsx)("div",{className:`flex items-center color-textWhiteSoft mt2 ${Mt}`,children:(0,s.jsx)("span",{children:f})}),(0,s.jsx)("div",{className:`flex items-center color-textWhite mt2 text-bold ${Mt} ${b}`,children:x&&(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)("span",{"data-e2e":"calories",children:m}),(0,s.jsx)("span",{className:"pl1",children:p.toLowerCase()}),(0,s.jsx)(kt,{innerClassName:"text-normal caloriesIconWrapper___DL47o"})]})})]})};var Ot=a(57144);const It={"1by1_wide_topcrop_630":"180,360,1440,1440&wid=630&hei=630&qlt=85","1by1_medium_630":"351,351,1098,1098&wid=630&hei=630&qlt=85"},Lt=(0,o.Ng)(e=>({imagesUrl:(0,Ot.xJ)(e)}),null)(({imagesUrl:e})=>{const{product:t}=(0,h.H)();return(0,s.jsx)(d.$N,{alt:"",includeFallback:{enabled:!0,wrapperClassName:String("imageMask___DxgNU")},lazyLoad:{enabled:!1},placeholder:{src:`${e}/product-placeholder.png`},src:(()=>{if(t?.loading)return null;const e=t?.imageURL;if(!e)return null;const a=(e=>{let t="";const a=(e?.productType||"").toLowerCase(),s=(e?.formCode||"").toLowerCase();return"beverages"===a&&"packaged"===s||"coffees"===a||"food"===a?t="1by1_medium_630":"beverages"===a&&(t="1by1_wide_topcrop_630"),t})(t);return`${e}?impolicy=${a}&crop=${It[a]}`})(),wrapInFlex:{enabled:!0,flexEmbedWrapperClassName:"imageBlock___R_fJZ mx-auto"}})}),Pt=()=>(0,s.jsx)(Lt,{}),Tt=({product:e})=>{const t=(0,o.d4)(Z.mn)?.pdpMatchTitleAndCaloriesFont,a=t?"productNameSmall___G3jqj":"productName___NApyx";return(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(_t.A,{className:`text-bold color-textWhite ${a}`,"data-e2e":"product-name",children:e?.name||""}),(0,s.jsx)(St,{productNameClass:a})]})},Ft=()=>{const{product:e}=(0,h.H)();return(0,s.jsx)(d.d3,{className:String("headerContainer___LIfnq"),children:(0,s.jsx)(V,{className:"items-center",leftColumn:(0,s.jsx)(Pt,{}),leftColumnClassName:"py3",rightColumn:(0,s.jsx)(Tt,{product:e}),rightColumnClassName:"pb5 lg-pb0 text-center lg-text-left"})})},wt=()=>{const e=(0,h.H)().product?.description;return e?(0,s.jsx)("p",{className:"respectTextLineBreaks___qTxzH color-textWhiteSoft text-xxs","data-e2e":"productDescription",children:e}):null};var Bt=a(54630),$t=a(46996);const Vt=(0,a(25508).Mz)(e=>e?.ordering?.productNutrition,e=>({...e,error:Boolean(e?.lastError)&&e?.error,data:e?.data?.nutritionValues??null}));var Rt=a(52129),Dt=a(48301),Ht=a(62315);const Ut=(e,t)=>(0,Dt.A)(e,e=>e.id===t),Kt=e=>null!=e,Wt=(e,t)=>(0,$t.A)(e.categoryKeypath,t.categoryKeypath),Et=e=>{const t=e?.calories,a=Ut(e?.additionalFacts,"totalFat"),s=Ut(e?.additionalFacts,"totalCarbs"),i=Ut(s?.subfacts,"sugars"),r=Ut(e?.additionalFacts,"protein"),[o,n,l]=[a,i,r].map(e=>(0,Ht.A)(e,["value","unitOfMeasure","displayValue"]));return{fat:o,sugars:n,protein:l,calories:t}},Qt=({currentRecipeModifierForSelectedOption:e,defaultSku:t,selectedOptions:a})=>{if(!e)return null;const s=e.sizes?.find(e=>e.default)?.sku;return s===t?null:"qty"===e.formCode?a.find(t=>"qty"===t.formCode&&Wt(t,e)&&"no"===t.size.sizeCode)?s:null:s},qt=e=>"qty"===e.formCode&&e.value>0?e.value:1;var Yt=a(12318),Zt=a(56760);const Gt=(0,n.YK)({fullNutritionLink:{defaultMessage:"Full nutrition & ingredients list",id:"ordering.pdp.nutritionLink"},nutritionSummary:{id:"ordering.pdp.nutritionSummary",defaultMessage:"{caloriesValue} calories, {sugarValue} sugar, {fatValue} fat"},nutritionSummaryWithProtein:{id:"ordering.pdp.nutritionSummaryWithProtein",defaultMessage:"{caloriesValue} calories, {sugarValue} sugar, {fatValue} fat, {proteinValue} protein"},summaryLabel:{id:"ordering.pdp.summaryLabel",defaultMessage:"Product summary"},caloriesValue:{id:"ordering.pdp.caloriesValue",defaultMessage:"Calories"},sugarValue:{id:"ordering.pdp.sugarValue",defaultMessage:"Sugar"}
1,fatValue:{id:"ordering.pdp.fatValue",defaultMessage:"Fat"},proteinValue:{id:"ordering.pdp.proteinValue",defaultMessage:"Protein"},customizationAffectsNutrition:{id:"ordering.pdp.customizationAffectsNutrition",defaultMessage:"Your customizations will affect your beverage's nutrition"},loadingNutrients:{id:"ordering.pdp.loadingNutrients",defaultMessage:"Loading nutrients..."},nutritionUpdated:{id:"ordering.pdp.nutritionUpdated",defaultMessage:"Nutrition updated"},nutritionNotUpdated:{id:"ordering.pdp.nutritionNotUpdated",defaultMessage:"Weâre testing this featureâupdated nutrition unavailable at this time."},updateCTA:{id:"ordering.pdp.updateCTA",defaultMessage:"Update"}}),Jt={caloriesIconWrapper:"caloriesIconWrapper___b6Ujz",updateButton:"updateButton___rO3cI",yellowTextColor:"yellowTextColor___cMgJq",yellowIconColor:"yellowIconColor___o3L2H",greenAccentTextColor:"greenAccentTextColor___ekbqn",nutritionSummary:"nutritionSummary___XmSLG",nutritionValuesEnlarged:"nutritionValuesEnlarged___kNTbf",nutritionValuesDefault:"nutritionValuesDefault___FvhzC",nutritionSummaryLarge:"nutritionSummaryLarge___SG0tY",caloriesIconWrapperNextToFat:"caloriesIconWrapperNextToFat___mfXN7",nutritionUpdatedPending:"nutritionUpdatedPending___SedNn",nutritionUpdated:"nutritionUpdated___tJkWJ",nutritionUpdatedSlideUp:"nutritionUpdatedSlideUp___wSSZi"},Xt=({onUpdateTriggered:e,isLoading:t,isPostUpdate:a,shouldUpdate:r,error:o,enlargedKeys:l,updatedNutritionSummary:c})=>{const[u,m]=(0,i.useState)(-1),p=(0,i.useRef)(0),g=(0,i.useRef)(null),x=(0,i.useRef)(!1),f=(0,i.useRef)(null),h=(0,i.useId)(),b=Object.keys(l).length>0,y=a&&!r&&!t&&!o,N=u===p.current&&y;return(0,i.useEffect)(()=>{if(!y)return p.current++,x.current=!1,void clearTimeout(g.current);const e=p.current;return b?(x.current=!0,clearTimeout(g.current)):x.current?(clearTimeout(g.current),g.current=setTimeout(()=>m(e),300)):(clearTimeout(g.current),g.current=setTimeout(()=>{x.current||m(e)},0)),()=>clearTimeout(g.current)},[y,b]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{"aria-live":"polite",role:"status",tabIndex:-1,ref:f,children:[t?(0,s.jsx)("div",{className:`pt4 pb2 ${Jt.greenAccentTextColor}`,children:(0,s.jsx)(n.sA,{...Gt.loadingNutrients})}):y&&(0,s.jsxs)("div",{className:`${Jt.greenAccentTextColor} ${N?Jt.nutritionUpdated:Jt.nutritionUpdatedPending}`,"data-e2e":"nutrition-updated",children:[(0,s.jsx)(d.In,{className:"mr2",path:pe.A,size:"16px"}),(0,s.jsx)(n.sA,{...Gt.nutritionUpdated}),c&&(0,s.jsx)("span",{className:"hiddenVisually",children:c})]}),o&&!r&&!t&&(0,s.jsxs)("div",{className:"pt4 pb2","data-e2e":"nutrition-not-updated",children:[(0,s.jsx)("span",{className:Jt.yellowIconColor,children:(0,s.jsx)(d.In,{className:"mr2",path:Yt.A,size:"18px"})}),(0,s.jsx)("span",{className:Jt.yellowTextColor,children:(0,s.jsx)(n.sA,{...Gt.nutritionNotUpdated})})]})]}),!t&&r&&(0,s.jsxs)("div",{className:"pt3 flex flex-row text-xxs","data-e2e":"update-component",children:[(0,s.jsx)("div",{children:(0,s.jsx)(d.$n,{className:Jt.updateButton,color:"white","aria-describedby":h,onClick:()=>{f.current?.focus(),e()},visualStyle:"positive",children:(0,s.jsxs)("span",{className:"color-greenStarbucks",children:[(0,s.jsx)(d.In,{className:"pb1",path:Zt.A}),(0,s.jsx)(n.sA,{...Gt.updateCTA})]})})}),(0,s.jsx)("div",{className:"pl3",id:h,children:(0,s.jsx)(n.sA,{...Gt.customizationAffectsNutrition})})]})]})},ea=["406/hot","407/hot","408/hot","413/hot"],ta=()=>{const[e,t]=(0,i.useState)({}),a=(0,i.useRef)(null),{formatMessage:r}=(0,n.tz)(),l=(0,i.useRef)(null),c=(0,i.useRef)(null),{isDynamicNutritionEnabled:u}=(0,Bt.A)(),{sizeInfo:m,product:p,selectedOptions:g}=(0,h.H)(),x=m?.selectedSize?.nutrition,{productNumber:f,formCode:b}=p,y=(0,k.A)({productNumber:f,formCode:b}),N=u&&ea.includes(y),{nutritionData:j,nutritionError:v,isNutritionLoading:_,hasFetchedAtLeastOnce:C,shouldShowUpdateButton:A,shouldShowPostUpdateState:M,onUpdateNutrition:S}=(()=>{const{data:e,error:t,loading:a,lastFetch:s,lastError:r}=(0,o.d4)(Vt),{product:n,sizeInfo:l,selectedOptions:d}=(0,h.H)(),c=(0,o.wA)(),[u,m]=(0,i.useState)(d),p=(0,i.useMemo)(()=>l?.selectedSize?.recipe?.default??[],[l]),g=Boolean(s||r),x=d?.length&&!g||Boolean(d?.length)&&!(0,$t.A)(u,d)&&!a,f=g,b=(0,i.useMemo)(()=>(0,Rt.Je)(p,n.optionsByProductNumber),[p]),y=(0,i.useMemo)(()=>(p||[]).map((e={},t)=>({sizes:e.productOption?.form.sizes,optionProductNumber:e.productOption?.productNumber,formCode:e.formCode,categoryKeypath:b[t]?.categoryKeyPath,skuName:e.skuName})),[p,b]),N=(0,i.useMemo)(()=>y.filter(e=>d.find(t=>"one"===t.formCode?(0,$t.A)(e.categoryKeypath,t.categoryKeypath):e.optionProductNumber===t.optionProductNumber)),[d,y]),j=(0,i.useCallback)(()=>d.map(e=>{const t=((e,t)=>{switch(e.formCode){case"one":case"qty":return t.find(t=>Wt(e,t));case"yes-no":case"modifier":return t.find(t=>e.optionProductNumber===t.optionProductNumber)}})(e,N);
1return{sku:e.size.sku,quantity:qt(e),replacedSku:Qt({currentRecipeModifierForSelectedOption:t,defaultSku:e.size.sku,selectedOptions:d})}}),[d,N]);return(0,i.useEffect)(()=>{0===d.length&&e&&c(me())},[d,c,e]),(0,i.useEffect)(()=>()=>{c(me())},[]),{nutritionData:e,nutritionError:t,isNutritionLoading:a,hasFetchedAtLeastOnce:g,shouldShowUpdateButton:x,shouldShowPostUpdateState:f,buildModifiers:j,onUpdateNutrition:()=>{const{productNumber:e,formCode:t,defaultSize:a}=n,s=l?.selectedSize?.sku,i=s||a?.sku,r=j();c((({productNumber:e,formCode:t,baseProductSku:a,modifiersList:s,trackingAttributes:i})=>(r,o,{apiFetch:n})=>(r({type:ue._O}),n(`/apiproxy/v1/ordering/${e}/${t}/nutrition/calculate`,{method:"POST",body:{sku:a,modifiers:s}}).then(e=>{(0,ce.A)(()=>r({type:ue.qg,payload:e}),()=>(0,z.p8)({successData:e.nutritionValues,input:{baseProductSku:a,modifiersList:s},baseNutrition:i?.baseNutrition}))}).catch(e=>{(0,ce.A)(()=>r({type:ue.Pf,error:e}),()=>(0,z.qw)({input:{baseProductSku:a,modifiersList:s},baseNutrition:i?.baseNutrition}))})))({productNumber:e,formCode:t?.toLowerCase(),baseProductSku:i,modifiersList:r,trackingAttributes:{baseNutrition:Et(l?.selectedSize?.nutrition)}})),m(d.map(e=>({...e})))}}})(),O=(0,i.useMemo)(()=>{if(!j){const{fat:e,sugars:t,protein:a,calories:s}=Et(x);return{fat:e,sugars:t,protein:a,calories:{...s,value:s?.displayValue,unitOfMeasure:""}}}return{fat:j?.fat,sugars:j?.sugars,protein:j?.protein,calories:{...j?.calories,unitOfMeasure:""}}},[j,x]);(0,i.useEffect)(()=>()=>{clearTimeout(l.current),clearTimeout(c.current)},[]),(0,i.useEffect)(()=>{0===g?.length&&(a.current=null)},[g]),(0,i.useEffect)(()=>{if(null===a.current&&x){const{fat:e,sugars:t,protein:s,calories:i}=Et(x);a.current={caloriesValue:`${i?.displayValue}`,sugarValue:`${t?.value}`,fatValue:`${e?.value}`,proteinValue:`${s?.value}`}}},[x,g]),(0,i.useEffect)(()=>{if(!j||v||!C)return;clearTimeout(l.current),clearTimeout(c.current);const e={caloriesValue:j.calories?.value,sugarValue:j.sugars?.value,fatValue:j.fat?.value,proteinValue:j.protein?.value},s=a.current,i=s?Object.fromEntries(Object.entries(e).filter(([e,t])=>s[e]!==t)):{};Object.keys(i).length>0&&(l.current=setTimeout(()=>{t(i),c.current=setTimeout(()=>t({}),3e3)},0)),a.current=e},[j,v,C]);const{calories:I,fat:L,sugars:P,protein:T}=Object.entries(O).map(([e,t])=>((e,t)=>{if(!t||!Kt(t?.value))return;const{unitOfMeasure:a,value:s}=t;return{[e]:`${s}${a}`}})(e,t)).reduce((e,t)=>({...e,...t}),{});if(!Kt(O.calories?.value)||!Kt(O.sugars?.value)||!Kt(O.fat?.value))return null;const F=O?.protein.value>=10,w=F?"nutritionSummaryWithProtein":"nutritionSummary",B=F?{caloriesValue:I,fatValue:L,sugarValue:P,proteinValue:T}:{caloriesValue:I,fatValue:L,sugarValue:P},$=F?["caloriesValue","sugarValue","fatValue","proteinValue"]:["caloriesValue","sugarValue","fatValue"],V=F?[I,P,L,T]:[I,P,L],R=K()("px2",{"justify-around":F,"justify-between px6":!F});return(0,s.jsx)("div",{className:K()("color-textWhite pt3"),"data-e2e":"nutrition-summary",children:(0,s.jsxs)("span",{className:"text-xxs",children:[(0,s.jsx)(d.jO,{className:"pb3",visualStyle:"negative"}),(0,s.jsx)("div",{className:K()(`flex flex-row ${R}`),children:V.map((t,a)=>{const r=F?"proteinValue"===$[a]:"fatValue"===$[a];return(0,s.jsx)(i.Fragment,{children:(0,s.jsxs)("span",{className:"flex flex-column items-center","data-e2e":`nutrition-${$[a]}`,children:[(0,s.jsxs)("span",{className:"flex items-center",children:[(0,s.jsx)(n.sA,{...Gt[$[a]]}),r&&(0,s.jsx)(kt,{innerClassName:Jt.caloriesIconWrapperNextToFat})]}),(0,s.jsx)("span",{className:K()("text-semibold flex",{[`${Jt.nutritionValuesEnlarged} text-md`]:e[$[a]],[Jt.nutritionValues]:!e[$[a]],"text-xxs":!e[$[a]]}),children:t})]})},`nutrition-${$[a]}`)})}),N&&(0,s.jsx)(Xt,{onUpdateTriggered:S,shouldUpdate:A,isPostUpdate:M,error:v,isLoading:_,enlargedKeys:e,updatedNutritionSummary:r(Gt[w],B)})]})})};var aa=a(66531);const sa=()=>{const{product:e}=(0,h.H)(),{pathname:t}=(0,o.d4)(Ct.AU)||{},a=Boolean(t?.includes("/nutrition"));return e?.error?null:!a&&t?(0,s.jsx)(lt.N_,{className:"sb-button sb-button--default sb-button--w
1hite mt3","data-e2e":"fullNutritionLink",to:`${t}/nutrition`,children:(0,s.jsx)(n.sA,{...Gt.fullNutritionLink})}):null},ia=()=>{const{formatMessage:e}=(0,n.tz)(),t=(0,h.H)().product?.starCost,a=(0,s.jsxs)(i.Fragment,{children:[Boolean(t)&&(0,s.jsx)(aa.A,{className:K()("starCost___OtofZ","inline-block px2 mb3 color-gold text-xxs"),starCost:t}),(0,s.jsx)(wt,{}),(0,s.jsx)(ta,{}),(0,s.jsx)(sa,{})]});return(0,s.jsx)(d.d3,{className:"bg-houseGreen py5 mt9",children:(0,s.jsx)("aside",{"aria-label":e(Gt.summaryLabel),children:(0,s.jsx)(V,{leftColumn:a})})})};var ra=a(35359),oa=a(40889),na=a(91397),la=a(2760),da=a(65162);const ca=()=>{const{formatMessage:e}=(0,n.tz)(),t=(0,o.d4)(na.R)||{},a=(0,o.d4)(la.S),c=(0,o.d4)(Ct.AU),{description:u,name:m}=t,p=(t?.inCatalog||void 0===t?.inCatalog)&&Boolean(u)&&Boolean(m);return t?.loading?(0,s.jsx)(tt.A,{}):(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(ra.A,{}),(0,s.jsx)(r.A,{children:m}),!p&&(0,s.jsx)("meta",{content:"noindex",name:"robots"}),(0,s.jsx)("meta",{content:u,name:"description"}),a&&(0,s.jsx)("link",{href:a,rel:"canonical"}),p?(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(da.A,{breadcrumbBarStyling:!0,className:"sb-global-gutters sb-global-gutters--logoOffset text-xxs"}),(0,s.jsxs)(h.A,{product:t,children:[(0,s.jsx)(Ft,{}),(0,s.jsx)(d.d3,{className:"pt5",children:(0,s.jsxs)("div",{className:"position-relative",children:[(0,s.jsx)(l.BV,{location:c,children:(0,s.jsxs)(l.qh,{path:"/menu/product",children:[(0,s.jsx)(l.qh,{element:(0,s.jsx)(nt,{}),path:":productNumber/:formCode"}),(0,s.jsx)(l.qh,{element:(0,s.jsx)(vt,{}),path:":productNumber/:formCode/nutrition"})]})}),(0,s.jsx)(N,{})]})}),(0,s.jsx)(ia,{})]})]}):(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(Ft,{}),(0,s.jsx)("p",{className:"pt5 pl5","data-e2e":"invalid-product-message",children:e(oa.A.emptyProduct)})]})]})}},65162(e,t,a){a.d(t,{A:()=>b});var s=a(74848),i=a(71468),r=a(38401),o=a(13673),n=a(32779),l=a(9703),d=a(28989),c=a(84220),u=a(25508),m=a(19784),p=a(64211),g=a(53174),x=a(91397);const f=({breadcrumbUri:e},t,a)=>{const s=(0,l.A)(e)?(0,d.A)(e,"/"):null,i=s?(0,c.A)(["menu","category","subcategory"],s.split("/")):{menu:null,category:null,subcategory:null};return t.find(e=>e.id===i[a])},h=(0,u.Mz)(g.zY,p.Vm,p.e7,g.Al,x.R,m.ng,g.Ro,(e,t,a,s,i,r,o)=>{const n=!s?.name&&i?f(i,a,"menu"):s,l=!e?.name&&i?.breadcrumbUri?f(i,t,"category"):e;if("/menu/:menu/:category"===r)return{categoryName:l?.name,menuName:n?.name};const d={text:l?.name,to:`/menu${l?.uri}`};return"/menu/:menu/:category/:subcategory"===r?{categoryCrumb:d,selectedName:o?.name,menuName:n?.name}:{categoryCrumb:d,selectedName:i?.name,menuName:n?.name}}),b=({className:e,breadcrumbBarStyling:t})=>{const a=(0,i.d4)(h),{categoryCrumb:l,selectedName:d="",categoryName:c=""}=a||{},u=[{text:(0,s.jsx)(r.sA,{...n.o.menuLabel}),link:"/menu"}];return l?(l.text&&u.push({text:l?.text,link:l?.to}),d&&u.push({text:d})):c&&u.push({text:c}),(0,s.jsx)(o.A,{breadcrumbBarStyling:t,breadcrumbs:u,className:e})}},81106(e,t,a){a.d(t,{A:()=>A});var s=a(71468),i=a(66401),r=a(57413),o=a(37893),n=a(74848),l=a(96540),d=a(38401),c=a(84976),u=a(27144),m=a(57144),p=a(31431),g=a(74088),x=a(32779),f=a(13809),h=a(86570);const b="background___MGir5",y="highContrastOutline___TzoLM";var N=a(55184),j=a(8796),v=a(84902);const _="OrderTypeModalId",C=()=>{const e=(0,s.wA)(),t=(0,s.d4)(p.yM),a=t?"fullscreen":"dialog-lg",{closeModal:i}=(0,r.k3)(),o=`${(0,s.d4)(m.xJ)}/delivery/order-type.png`;return(0,l.useEffect)(()=>{(0,h.uc)()},[]),(0,n.jsx)(g.A,{alignment:a,childrenContainerClassName:t?"":String(b),className:t?String(b):"",closeProps:{highContrast:!0},children:(0,n.jsxs)(r.Mx,{size:"md",children:[(0,n.jsx)(r.$N,{alt:"",className:"mt4 md-mt7",src:o}),(0,n.jsx)(r.DZ,{className:"text-center text-bold my3 md-my4 mx6 color-white text-lg",id:_,tagName:"h2",children:(0,n.jsx)(d.sA,{...N.A.orderType})}),(0,n.jsx)("div",{className:"mb3",children:(0,n.jsx)(f.u,{className:`text-sm ${y}`,color:"white",icon:(0,n.jsx)(r.In,{path:j.A}),onClick:()=>{e((0,u.L)()),(0,h.w9)(),i()},tagName:c.N_,to:"/store-locator?source=menu",visualStyle:"positive",children:(0,n.jsx)(d.sA,{...x.o.pickupLabel})})}),(0,n.jsx)("div",{className:"mb3",children:(0,n.jsx)(f.u,{className:`text-sm ${y}`,color:"white",icon:(0,n.jsx)(r.In,{path:v.A}),onClick:()=>{e((0,u.L)()),(0,h.wh)(),i()},tagName:c.N_,to:"/store-locator/delivery?source=menu",children:(0,n.jsx)(d.sA,{...x.o.deliveryLabel})})}),(0,n.jsx)(r.$n,{className:`text-noUnderline my2 mx3 md-mb7 color-white text-semibold ${y}`,onClick:()=>i(),visualStyle:"textLink",children:(0,n.jsx)(d.sA,{...N.A.justBrowsing})})]})})};var z=a(53174);const A=()=>{const{openModal:e}=(0,r.k3)(),t=(0,s.d4)(z.EA),a=(0,o.Hd)(o.y1);return{showOrderTypeModal:()=>{t&&(0,i.A)(a)&&(e({component:C,ariaLabelledBy:_}),(0,o.J2)(o.y1,!0))}}}},53174(e,t,a){var s=a(25508),i=a(64211),r=a(2760),o=a(55059),n=a(18191);const l=(0,s.Mz)(r.Y,i.e7,(e,t)=>t?.find(t=>
1t.id===e?.menu)),d=(0,s.Mz)(r.Y,i.Vm,(e,t)=>t?.find(t=>t.id===e.category)),c=(0,s.Mz)(d,e=>e?.children),u=(0,s.Mz)(r.Y,c,(e,t)=>t?.find(t=>t.id===e.subcategory)),m=(0,s.Mz)(d,e=>e?.name),p=(0,s.Mz)(o.mn,i.tc,n.sK,(e,t,a)=>{const{enableInAppDelivery:s}=e;return!t&&!a&&s});a.d(t,["Al",0,l,"EA",0,p,"Ro",0,u,"lF",0,m,"zY",0,d,"zh",0,c])}}]); 2//# sourceMappingURL=ordering-pdp.700621df5b0a1341d4e4.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.