PageSourceSearch

https://www.dunkindonuts.com/_next/static/chunks/428.4dcc6b4a28de4bca.js

js dunkindonuts.com collected 2026-09-24 08:29:03 UTC 6,347 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[428],{54281:function(e,l,t){"use strict";var s=t(67294),r=t(2185),n=t(14802),i=t(80839),o=t(35657),c=t(83404);l.Z=e=>{let{placement:l,section:t,listName:_,correlationId:a,experience:d,crossSellTypeOverride:u}=e,p=(0,r.I0)(),{trackCrossSell:S}=(0,c.Z)(),m=null!=u?u:i.wz[t],{handleProductCardInteraction:E}=(0,n.s)(),I=(0,s.useCallback)((e,t,s)=>{S({$opt_event_properties:{cross_sell_engagement:e,cross_sell_item_name:t,cross_sell_placement:l,cross_sell_index:s,cross_sell_type:m}})},[S,l,m]);return{trackCTAClick:(e,t)=>{p({type:i.eQ,payload:{cross_sell_engagement:o.GS.CROSS_SELL_CTA,cross_sell_item_name:e,cross_sell_type:m,cross_sell_placement:l,cross_sell_index:t,correlation_id:a,experience:d}}),I(o.GS.CROSS_SELL_CTA,e,t)},trackAddToBag:(e,t)=>{p({type:i.eQ,payload:{cross_sell_engagement:o.GS.CROSS_SELL_ADD,cross_sell_item_name:e,cross_sell_type:m,cross_sell_placement:l,cross_sell_index:t,correlation_id:a,experience:d}}),I(o.GS.CROSS_SELL_ADD,e,t)},trackViewItem:function(e,l){let t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];E({...e,index:l,isFavorite:t},_),I(o.GS.CROSS_SELL_VIEW_ITEM,e.displayName,l)},trackModify:(e,t)=>{p({type:i.eQ,payload:{cross_sell_engagement:o.GS.CROSS_SELL_MODIFY,cross_sell_item_name:e.displayName,cross_sell_type:m,cross_sell_placement:l,cross_sell_index:t,correlation_id:a,experience:d}}),I(o.GS.CROSS_SELL_MODIFY,e.displayName,t)},trackSelect:(e,t)=>{p({type:i.eQ,payload:{cross_sell_engagement:o.GS.CROSS_SELL_SELECT,cross_sell_item_name:e,cross_sell_type:m,cross_sell_placement:l,cross_sell_index:t,correlation_id:a,experience:d}})},trackImpression:(0,s.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;e.forEach((e,s)=>{p({type:i.eQ,payload:{cross_sell_engagement:o.GS.CROSS_SELL_IMPRESSION,cross_sell_item_name:e.label,cross_sell_type:m,cross_sell_placement:l,cross_sell_index:t+s+1,correlation_id:a,experience:d}})})},[p,m,l,a,d]),trackCrossSellEvent:I}}},14290:function(e,l,t){"use strict";t.d(l,{K:function(){return c}});var s=t(67294),r=t(29925),n=t(78857);let i=(e,l,t)=>t&&(null==l?void 0:l.length)?e+l.reduce((e,l)=>{let{data:s}=l;return e+(0,n.vY)(s,t)},0):e;var o=t(88915);let c=()=>{let{isPricedDefaultEnabled:e}=(0,o.I)(),{actions:{getProductGroupsByProductId:l}}=(0,r.Z)();return(0,s.useCallback)((t,s)=>{let r=l(s),n=i(t,r,e);return e&&(null==r?void 0:r.length)&&r.forEach(t=>{let{data:s}=t;Object.values((null==s?void 0:s.childRefs)||{}).forEach(t=>{if(t.isDefault&&t.id&&t.ingredientRefs){let s=l(t.id);n+=i(0,s,e)}})}),n},[l])}},15609:function(e,l,t){"use strict";t.d(l,{W:function(){return i}});var s=t(85893),r=t(67294),n=t(56434);function i(e){let{items:l,onImpression:t,resetKey:i,threshold:o=.1,rootMargin:c,className:_,children:a}=e,d=(0,r.useRef)(null),u=(0,r.useRef)(!1),p=(0,r.useRef)(l);p.current=l;let S=(0,r.useRef)(t);return(0,n.L)(()=>{S.current=t}),(0,r.useEffect)(()=>{u.current=!1},[i]),(0,r.useEffect)(()=>{let e=d.current;if(!e)return;let l=new IntersectionObserver(t=>{let[s]=t;s.isIntersecting&&!u.current&&p.current.length>0&&(u.current=!0,S.current(p.current),l.unobserve(e))},{threshold:o,rootMargin:c});return l.observe(e),()=>l.disconnect()},[i,o,c]),(0,s.jsx)("div",{ref:d,className:_,children:a})}},20428:function(e,l,t){"use strict";t.r(l);var s=t(85893),r=t(83814),n=t(67294),i=t(37154),o=t(5354),c=t(54281),_=t(14290),a=t(32249),d=t(35657),u=t(15749),p=t(69993),S=t(48322),m=t(23630),E=t(29925),I=t(44358),f=t(56494),O=t(27439),L=t(85941),v=t(84584),C=t(1954),g=t(15609),y=t(61882),A=t(60542),T=t(69832),h=t.n(T);l.default=e=>{let{maxItems:l,headerText:t,addToBagVisible:T,minItemsToRender:N,productsBySection:M,viewItemLabel:R}=e,{isDesktop:b}=(0,a.E)(),{actions:{redirectToPdp:G}}=(0,L.Z)(),{actions:{handleProductClick:k}}=(0,v.i)(),{actions:{getProduct:x}}=(0,E.Z)(),{actions:{getCompleteProductData:w}}=(0,m.i)(),{isItemFavorite:Y}=(0,I.Z)(),{currentLocation:D}=(0,O.Z)(),K=!!D,P=(0,_.K)(),{getActiveCategory:Z}=(0,f.Z)(),{error:U,correlationId:F}=(0,C.Z)(),H=(0,o.J9)(M,i.RECOMMENDATION_SECTION.YMAL),j=(0,n.useMemo)(()=>H.slice(0,l),[H,l]),B=(0,n.useRef)(!1);(0,n.useEffect)(()=>{j.length>0&&!B.current&&((0,p.oF)(S.o.YOU_MIGHT_ALSO_LIKE_PAGE_VIEWS_TOTAL,1,{appSection:u.SECTION_NAME.YOU_MIGHT_ALSO_LIKE}),B.current=!0),0===j.length&&(B.current=!1)},[j.length]),(0,n.useEffect)(()=>{U&&(0,p.oF)(S.o.YOU_MIGHT_ALSO_LIKE_ERRORS_TOTAL,1,{appSection:u.SECTION_NAME.YOU_MIGHT_ALSO_LIKE})},[U]);let{trackImpression:W,trackViewItem:Q,trackModify:V,trackAddToBag:z}
1=(0,c.Z)({placement:d.eP.PDP,section:i.RECOMMENDATION_SECTION.YMAL,listName:A.AP,correlationId:F,experience:y.D4}),J=(0,n.useMemo)(()=>j.map(e=>e.productId).join("|"),[j]),$=R||void 0,q=(0,n.useMemo)(()=>j.map(e=>{let l=w(e.productId);return{productCardKey:e.productId,value:e.productId,imageUrl:e.imageUrl,imageAlt:e.label,label:e.label,price:Number.isFinite(e.price)?String(P(e.price,e.productId)):void 0,calories:e.calories||void 0,isLocationSelected:K,shouldRedirect:!1,showCtaControls:!0,isAddToBagButtonVisible:T&&e.canAddToBag,isModifyButtonVisible:T&&e.canModify,isUnavailable:!T||void 0,isFavoriteProduct:!!l&&Y(l),...$&&{modifyText:$},...$&&{viewItemText:$}}}),[j,Y,K,T,$]),X=(0,n.useCallback)(e=>{var l,t,s,r;let{value:n,index:i=0,actionType:o}=e.detail,c=x(n);if(!(null==c?void 0:c.id))return;if((0,p.oF)(S.o.YOU_MIGHT_ALSO_LIKE_ACTION_TOTAL,1,{appSection:u.SECTION_NAME.YOU_MIGHT_ALSO_LIKE}),o===y.wO||o===y.LG||o===y.Wl){let l=w(c.id);if(l){let n=q.find(e=>e.productCardKey===c.id);o===y.Wl?V({...l,displayName:null!==(t=null==n?void 0:n.label)&&void 0!==t?t:c.displayName},i+1):z(null!==(r=null!==(s=null==n?void 0:n.label)&&void 0!==s?s:c.displayName)&&void 0!==r?r:"",i+1),k(e,l,y.uh,!0,A.AP)}return}let _=w(c.id);_&&Q(_,i+1,Y(_)),G({isPreset:!1,productId:c.id,categoryId:null===(l=Z({productId:c.id}))||void 0===l?void 0:l.id,productIndex:i+1,listName:A.AP},y.uh)},[x,w,Q,V,z,q,Y,G,Z,k]);return!q.length||q.length<N?null:(0,s.jsx)("div",{className:h().wrapper,children:(0,s.jsx)(g.W,{items:j,onImpression:W,resetKey:J,threshold:1,children:(0,s.jsx)(r.G88,{label:t,productList:q,bannerSize:"medium",onProductCardClicked:X,showChevron:b})})})}},69832:function(e){e.exports={wrapper:"YmalSection_wrapper__Hd7RB"}}}]);
2//# sourceMappingURL=428.4dcc6b4a28de4bca.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.