PageSourceSearch

https://www.vistaprint.nl/assets/ubik/web/@vp/fragment-homepage-fr…/categoryRowTrackOnClick-C5khYnab.js

js vistaprint.nl collected 2026-10-03 21:20:40 UTC 25,600 bytes, 2 lines download raw bytes

1System.register(["react/jsx-runtime","@vp/swan","react","@vp/price-platform","react-dom","@vp/ubik-context","@vp/tracking","./trackingConfig-sYxD1j1E.js","./trackingUtils-2BuBiGlP.js","./trackingSchemas-0N-__QE1.js"],(function(R){"use strict";var o,p,U,D,pe,v,z,w,f,H,G,me,ee,te,he,x,fe,Te,O,re,W,K,ye,ae,F,ve,N,Ce,be,Se,we,Le,Ee,ke,P,$,Ie,xe,Pe,oe,ne,Me,Ne,L,b,_,Ae,Z,u,se,Y,j,Be,Re,Oe,Fe,ie,_e,Ve,Ue,De,ze;return{setters:[function(s){o=s.jsx,p=s.jsxs,U=s.Fragment},function(s){D=s.BaseTileHeader,pe=s.BaseTileTargetImage,v=s.FlexBox,z=s.Spinner,w=s.Icon,f=s.Typography,H=s.BaseTileImage,G=s.BaseTile,me=s.className,ee=s.BaseTileBody,te=s.BaseTileName,he=s.BaseTileTargetCovering,x=s.Link,fe=s.AdaptiveCarousel,Te=s.AdaptiveCarouselSlide,O=s.Button,re=s.GridContainer,W=s.Row,K=s.Column,ye=s.H2,ae=s.Visible,F=s.useExpansionPackI18nContext,ve=s.RatingsStars,N=s.Box,Ce=s.InputWithFloatingLabel,be=s.FloatingLabel,Se=s.Dropdown,we=s.DropdownOption,Le=s.Popover,Ee=s.PopoverLauncher,ke=s.PopoverContent,P=s.SWAN_STYLE_KEY_MAP,$=s.useScreenClass,Ie=s.getRootClassNames,xe=s.AlertBox,Pe=s.Checkbox,oe=s.Span,ne=s.BaseTileOverlay,Me=s.Callout,Ne=s.BaseTileFooter},function(s){L=s.forwardRef,b=s.useState,_=s.useMemo,Ae=s.Component,Z=s.createContext,u=s.default,se=s.useRef,Y=s.useEffect,j=s.useContext,Be=s.useLayoutEffect},function(s){Re=s.PriceDisplay,Oe=s.DisplayVariant},function(s){Fe=s.default},function(s){ie=s.useIdentity,_e=s.track},null,function(s){Ve=s.a,Ue=s.r},function(s){De=s.v},function(s){ze=s.C}],execute:(function(){function s(e){var r,a,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(r=0;r<n;r++)e[r]&&(a=s(e[r]))&&(t&&(t+=" "),t+=a)}else for(a in e)e[a]&&(t&&(t+=" "),t+=a);return t}function E(){for(var e,r,a=0,t="",n=arguments.length;a<n;a++)(e=arguments[a])&&(r=s(e))&&(t&&(t+=" "),t+=r);return t}var k={templateTile:"ep-tiles-module-template-tile-dGVtc",templateTileImage:"ep-tiles-module-template-tile-image-dGVtc",templateTileImageDefault:"ep-tiles-module-template-tile-image-default-dGVtc",templateTileImageLarge:"ep-tiles-module-template-tile-image-large-dGVtc",templateTileImageHide:"ep-tiles-module-template-tile-image-hide-dGVtc",templateTileSpinner:"ep-tiles-module-template-tile-spinner-dGVtc",templateTileFallbackPreview:"ep-tiles-module-template-tile-fallback-preview-dGVtc",fallbackPreviewLarge:"ep-tiles-module-fallback-preview-large-ZmFsb"};L((e,r)=>{const{alt:a,isLoading:t=!1,accessibleTextForLoadingState:n,isError:i=!1,onError:c,onLoad:d,src:l,srcSet:m,size:h="Default",emptyPreviewText:g,className:T,constrainHeight:y=!0,renderComponent:S}=e;return o(D,{className:T,children:p(pe,{render:S,children:[t&&o(v,{backgroundColor:"strong",alignItems:"center",justifyContent:"center",className:k.templateTileSpinner,children:o(z,{accessibleText:n,size:"standard"})}),i&&p(v,{flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"strong",className:E(k.templateTileFallbackPreview,{[k.fallbackPreviewLarge]:h==="Large"}),children:[o(w,{iconType:"image",size:"60p"}),o(f,{as:"span",fontSkin:"body-standard-bold",py:"3",children:g})]}),o(H,{aspectRatio:1,alt:a,className:E(k.templateTileImage,{[k.templateTileImageLarge]:y&&h==="Large",[k.templateTileImageDefault]:y&&h==="Default",[k.templateTileImageHide]:i}),ref:r,src:l,srcSet:m,onError:c,onLoad:d,...!y&&{pt:2}})]})})}),L((e,r)=>{const{className:a,children:t,...n}=e,i=E(a,{[k.templateTile]:!0});return o(G,{ref:r,className:i,p:"3",pb:"6",skin:"card",bgc:"strong",...n,children:t})});var A=R("a",(e=>(e.ROOT="Root",e.NEXT="Next",e.SKIP="Skip",e.UNIVERSAL="Universal",e))(A||{})),le=(e=>(e.AdaptiveCarousel="adaptive-carousel",e.StackedGrid="stacked-grid",e))(le||{});const Ye={Root:{component:"adaptive-carousel",slidesToShow:3},Next:{component:"stacked-grid",slidesToShow:2,showMoreButton:!1},Skip:{component:"stacked-grid",slidesToShow:3,showMoreButton:!0},Universal:{component:"adaptive-carousel",slidesToShow:3}},je={Root:{component:"adaptive-carousel",slidesToShow:8},Next:{component:"adaptive-carousel",slidesToShow:6}
1,Skip:{component:"adaptive-carousel",slidesToShow:8},Universal:{component:"adaptive-carousel",slidesToShow:8}},qe=(e,r)=>(r?Ye:je)[e],Qe={[A.SKIP]:15,[A.ROOT]:30,[A.NEXT]:30,[A.UNIVERSAL]:30},Xe=e=>Qe[e],Je=(e,r,a)=>{const t=a??Xe(r);return e.slice(0,t)};var ce={categoryTile:"ep-tiles-module-category-tile-Y2F0Z",categoryTileWrapper:"ep-tiles-module-category-tile-wrapper-Y2F0Z",categoryTileError:"ep-tiles-module-category-tile-error-Y2F0Z"};const et=e=>{const{alt:r,src:a,srcSet:t,emptyPreviewText:n="Image not available"}=e,[i,c]=b(!1),d="4/5",l=()=>{c(!0)};return i?p(v,{style:{aspectRatio:d},flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"strong",className:ce.categoryTileError,children:[o(w,{iconType:"image",size:"60p"}),o(f,{as:"span",fontSkin:"body-small-bold",py:"3",textAlign:"center",children:n})]}):o("div",{className:ce.categoryTileWrapper,style:{aspectRatio:d,position:"relative"},children:o(H,{alt:r,src:a,srcSet:t,aspectRatio:d,onError:l})})};function tt(e,r,a,t){return!!e&&!!r&&!!a?.src&&!!t}const He=L((e,r)=>{const{categoryId:a,categoryTileTitle:t,categoryTileImage:n,categoryTileUrl:i,categoryTileImageEmptyPreviewText:c,trackOnClick:d}=e;if(!tt(a,t,n,i))return null;const l=E(me,{[ce.categoryTile]:!0}),m={categoryId:a,categoryTileTitle:t,categoryTileImage:n,categoryTileUrl:i};return p(G,{className:l,children:[o(ee,{children:o(te,{children:o(he,{children:o(x,{href:i,onClick:()=>{d&&d(m)},children:t})})})}),o(D,{children:o(et,{alt:n?.altTextOverride,src:n?.src,srcSet:n?.srcSet,emptyPreviewText:c})})]})});var rt={"expandButton.showMore":"Vis mere","expandButton.showLess":"Vis mindre","ariaLabels.showLessCategories":"Vis f\xE6rre kategorier","ariaLabels.showMoreCategories":"Vis flere kategorier","ariaLabels.categoryCarousel":"Kategori-karrusel"},at={"expandButton.showMore":"Mehr anzeigen","expandButton.showLess":"Weniger anzeigen","ariaLabels.showLessCategories":"Weniger Kategorien anzeigen","ariaLabels.showMoreCategories":"Mehr Kategorien anzeigen","ariaLabels.categoryCarousel":"Kategorienkarussell"},ot={"expandButton.showMore":"Show more","expandButton.showLess":"Show less","ariaLabels.showLessCategories":"Show fewer categories","ariaLabels.showMoreCategories":"Show more categories","ariaLabels.categoryCarousel":"Category Carousel"},de={"expandButton.showMore":"Show more","expandButton.showLess":"Show less","ariaLabels.showLessCategories":"Show less categories","ariaLabels.showMoreCategories":"Show more categories","ariaLabels.categoryCarousel":"Category Carousel"},nt={"expandButton.showMore":"Mostrar m\xE1s","expandButton.showLess":"Mostrar menos","ariaLabels.showLessCategories":"Mostrar menos categor\xEDas","ariaLabels.showMoreCategories":"Mostrar m\xE1s categor\xEDas","ariaLabels.categoryCarousel":"Carrusel de categor\xEDas"},st={"expandButton.showMore":"Mostrar m\xE1s","expandButton.showLess":"Mostrar menos","ariaLabels.showLessCategories":"Mostrar menos categor\xEDas","ariaLabels.showMoreCategories":"Mostrar m\xE1s categor\xEDa","ariaLabels.categoryCarousel":"Carrusel de categor\xEDas"},it={"expandButton.showMore":"N\xE4yt\xE4 enemm\xE4n","expandButton.showLess":"N\xE4yt\xE4 v\xE4hemm\xE4n","ariaLabels.showLessCategories":"N\xE4yt\xE4 useampia yritysluokkia","ariaLabels.showMoreCategories":"N\xE4yt\xE4 v\xE4hemm\xE4n yritysluokkia","ariaLabels.categoryCarousel":"Luokkakaruselli"},lt={"expandButton.showMore":"Afficher plus","expandButton.showLess":"Afficher moins","ariaLabels.showLessCategories":"Afficher moins de cat\xE9gories","ariaLabels.showMoreCategories":"Afficher plus de cat\xE9gories","ariaLabels.categoryCarousel":"Carrousel de cat\xE9gories"},ct={"expandButton.showMore":"Afficher plus","expandButton.showLess":"Afficher moins","ariaLabels.showLessCategories":"Afficher moins de cat\xE9gories","ariaLabels.showMoreCategories":"Afficher plus de cat\xE9gories","ariaLabels.categoryCarousel":"Carrousel des cat\xE9gories"},dt={"expandButton.showMore":"Mostra altro","expandButton.showLess":"Mostra meno","ariaLabels.showLessCategories":"Mostra meno categorie","ariaLabels.showMoreCategories":"Mostra altre categorie","ariaLabels.categoryCarousel":"Carosello categorie"},ut={"expandButton.showMore":"Vis mer","expandButton.showLess":"Vis mindre","ariaLabels.showLessCategories":"Vis f\xE6rre kategorier","ariaLabels.showMoreCategories":"Vis flere kategorier","ariaLabels.categoryCarousel":"Kategorikarusell"},gt={"expandButton.showMore":"Meer weergeven","expandButton.showLess":"Minder weergeven","ariaLabels.showLessCategories":"Minder categorie\xEBn weergeven","ariaLabels.showMoreCategories":"Meer categorie\xEBn weergeven","ariaLabels.categoryCarousel":"Categoriecarrousel"},pt={"expandButton.showMore":"Mostrar mais","expandButton.showLess":"Mostrar menos","ariaLabels.showLessCategories":"Mostrar menos categorias","ariaLabels.showMoreCategories":"Mostrar mais categorias","ariaLabels.categoryCarousel":"Carrossel de categorias"},mt={"expandButton.showMore":"Visa mer","expandButton.showLess":"Visa mindre","ariaLabels.showLessCategories":"Visa f\xE4rre kategorier","ariaLabels.showMoreCategories":"Visa fler kategorier","ariaLabels.categoryCarousel":"Kategorikarusell"};const Ge={"da-DK":rt,"de-DE":at,"en-GB":ot,"en-US":de,"es-ES":nt,"es-US":st,"fi-FI":it,"fr-CA":lt,"fr-FR":ct,"it-IT":dt,"nb-NO":ut,"nl-NL":gt,"pt-PT":pt,"sv-SE":mt},ht={"fr-CH":"fr-FR","fr-BE":"fr-FR","de-CH":"de-DE","de-AT":"de-DE","en-AU":"en-GB","en-NZ":"en-GB","en-SG":"en-GB","en-IE":"en-GB","en-CA":"en-US","en-IN":"en-US","nl-BE":"nl-NL","it-CH":"it-IT"},ft=e=>{const r=new Intl.Locale(e).toString();let a=Ge[r];if(!a){const t=ht[r];return t&&(a=Ge[t],a)?(console.warn(`Localization file for locale "${e}" not found, using fallback locale "${t}"`),a):(console.warn(`Localization file for locale "${e}" not found, falling back to en-US translations`),de)}return a},We=(e="en-US")=>{const r=_(()=>ft(e),[e]);return{translate:t=>{const n=r[t];if(!n){const i=de[t];return i?(console.warn(`Localization for key "${t}" not found for locale "${e}", using en-US fallback`),i):(console.warn(`Localization for key "${t}" not found for locale "${e}" or fallback locale "en-US"`),t)}return n}}},Tt=({tiles:e,slidesToShow:r,locale:a,trackOnClick:t})=>{const{translate:n}=We(a);return o(fe,{"aria-label":n("ariaLabels.categoryCarousel"),slidesToShow:r,children:e.map((i,c)=>o(Te,{children:o(He,{...i,trackOnClick:t})},c))})},yt=2,vt=(e,r)=>{const a=[];for(let t=0;t<e.length;t+=r)a.push(e.slice(t,t+r));return a},Ct=e=>Math.floor(12/e),bt=(e,r,a,t)=>{if(!a||t)return{visibleTiles:e,hasMoreTiles:!1};const n=r*yt;return{visibleTiles:e.slice(0,n),hasMoreTiles:e.length>n}},St=(e,r,a)=>({shouldShow:e&&(a||r)}),wt=({isExpanded:e,onToggle:r,locale:a})=>{const{translate:t}=We(a),n=d=>t(d?"ariaLabels.showLessCategories":"ariaLabels.showMoreCategories"),i=t(e?"expandButton.showLess":"expandButton.showMore"),c=e?"caretUp":"caretDown";return p(O,{width:"full-width",onClick:r,"aria-label":n(e),children:[i,o(w,{iconType:c})]})},Lt=({tiles:e,slidesToShow:r,showMoreButton:a,locale:t,trackOnClick:n})=>{const[i,c]=b(!1),d=Ct(r),{visibleTiles:l,hasMoreTiles:m}=_(()=>bt(e,r,a,i),[e,r,a,i]),h=_(()=>vt(l,r),[l,r]),g=St(a,i,m);return p(U,{children:[o(re,{as:"ul",children:h.map((T,y)=>o(W,{mb:4,as:"li",children:T.map((S,C)=>o(K,{spanXs:d,span:d,children:o(He,{...S,trackOnClick:n})},C))},y))}),g.shouldShow&&o(wt,{isExpanded:i,hasMoreTiles:m,locale:t,onToggle:()=>c(!i)})]})},Et=({layoutConfig:e,tiles:r,locale:a,trackOnClick:t})=>{switch(e.component){case le.AdaptiveCarousel:return o(Tt,{tiles:r,slidesToShow:e.slidesToShow,locale:a,trackOnClick:t});case le.StackedGrid:return o(Lt,{tiles:r,slidesToShow:e.slidesToShow,showMoreButton:e.showMoreButton??!1,locale:a,trackOnClick:t});default:return null}};var kt={categoryRow:"ep-tiles-module-category-row-Y2F0Z"};const It=new Set(Object.values(A));function xt(e,r,a,t){return!(!It.has(e)||!Array.isArray(r)||typeof a!="boolean"||t!==void 0&&(!Number.isFinite(t)||t<=0))}const Pt=L((e,r)=>{const{className:a,categoryDestinationLevel:t,tiles:n,title:i,isMobile:c,locale:d,trackOnClick:l,limit:m}=e;if(!xt(t,n,c,m))return null;const h=Je(n,t,m),g=qe(t,c),T=E(a,{[kt.categoryRow]:!0});return o("div",{ref:r,className:T,children:p(re,{children:[i&&o(W,{marginBottom:5,children:o(K,{span:12,children:o(ye,{fontSkin:"title-section",children:i})})}),o(W,{children:o(K,{span:12,children:o(Et,{layoutConfig:g,tiles:h,locale:d,trackOnClick:l})})})]})})}),Ke=L((e,r)=>o(Pt,{...e,ref:r})),Cr=R("C",L((e,r)=>p(U,{children:[o(ae,{xs:!0,children:o(Ke,{...e,isMobile:!0,ref:r})}),o(ae,{sm:!0,md:!0,lg:!0,xl:!0,children:o(Ke,{...e,isMobile:!1,ref:r})})]})));var V={productTile:"ep-tiles-module-product-tile-cHJvZ",productTileImageWrapper:"ep-tiles-module-product-tile-image-wrapper-cHJvZ",productTileImageFallback:"ep-tiles-module-product-tile-image-fallback-cHJvZ",productTileImageOutOfStock:"ep-tiles-module-product-tile-image-out-of-stock-cHJvZ"};const Mt=["productKey","mpvId","productVersion","productUrl"],Nt=e=>Mt.filter(r=>{const a=e[r];return a==null||a===""}).map(r=>({severity:"fatal",component:"tile",message:`ProductTile: missing required prop "product.${r}"`})),At=(e,r)=>{const a=[];return e.name||a.push({severity:"degraded",component:"name",message:'ProductTile: empty required prop "product.name"'}
1),r!==void 0&&!r.label&&a.push({severity:"degraded",component:"cta",message:"ProductTile: cta.label is missing; CTA will not render"}),a},Bt=e=>e.some(r=>r.severity==="fatal");class I extends Ae{constructor(r){super(r),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r,a){const{componentName:t,severity:n,onError:i}=this.props;i?.([{component:t,severity:n,message:r.message}])}render(){return this.state.hasError?null:this.props.children}}const ue="1",Rt={aspectRatio:ue},Ot={aspectRatio:ue,position:"relative"},Ft={width:"100%",height:"100%",objectFit:"cover"},_t=L((e,r)=>{const{product:a,config:t,productUrl:n,onTileClick:i,children:c,onError:d}=e,{t:l}=F(),m=a.inStock===!1,h=!!a.image.personalizationUrl,[g,T]=b(!1),[y,S]=b(!a.image.src),C=h&&!g,B=C?a.image.personalizationUrl??a.image.src:a.image.src,Q=C?void 0:a.image.srcSet,X=(!h||g)&&y,J=()=>{C?T(!0):S(!0)},M=a.image.alt??a.name;return o(I,{componentName:"image",severity:"degraded",onError:d,children:p(D,{children:[o(x,{href:n,onClick:i,skin:"unstyled",tabIndex:-1,"aria-hidden":"true",display:"block",children:X?p(v,{className:E(V.productTileImageFallback,{[V.productTileImageOutOfStock]:m}),style:Rt,flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"strong",children:[o(w,{iconType:"image",size:"60p"}),o(f,{as:"span",fontSkin:"body-small-bold",py:"3",textAlign:"center",children:l("ep-tiles.product-tile.imageNotAvailable")})]}):o(v,{className:E(V.productTileImageWrapper,{[V.productTileImageOutOfStock]:m}),style:Ot,children:o(H,{ref:r,aspectRatio:ue,alt:M,src:B,srcSet:Q,loading:t?.imageLoadType??"lazy",onError:J,style:Ft})})}),c]})})}),Vt=({name:e,productUrl:r,onTileClick:a})=>o(x,{href:r,onClick:a,skin:"unstyled",children:o(te,{children:e})}),Ut=({ratingSummary:e,onError:r})=>o(I,{componentName:"ratings",severity:"degraded",onError:r,children:o(f,{fontSkin:"body-small","data-testid":"product-tile-rating",children:o(ve,{ratingValue:e.averageRating,reviews:e.reviewsCount})})}),Dt=({description:e})=>o(f,{children:e}),zt=({cta:e,onError:r})=>{const{t:a}=F();return o(I,{componentName:"cta",severity:"degraded",onError:r,children:o(O,{skin:e.variant==="secondary"?"secondary":"primary",width:"full-width",onClick:e.onClick,disabled:e.disabled||e.isLoading,"aria-label":e.isLoading?e.label:void 0,children:e.isLoading?o(z,{size:"tiny",accessibleText:a("ep-tiles.product-tile.loading")}):e.label})})},Ht=({quantitySelector:e,onError:r})=>{const{t:a}=F(),{quantities:t,selectedQuantity:n,disabled:i,onChange:c}=e,d=l=>{const m=parseInt(l.target.value,10);c(m)};return o(I,{componentName:"quantitySelector",severity:"degraded",onError:r,children:o(N,{mb:4,children:p(Ce,{children:[o(be,{children:a("ep-tiles.product-tile.quantity")}),o(Se,{disabled:i||t.length<=1,fullWidth:!0,onChange:d,value:n.toString(),children:t.map(l=>o(we,{value:l.toString(),children:l},l))})]})})})},Gt=({localization:e})=>p(v,{alignItems:"center",gap:"2",mt:4,children:[o(w,{iconType:"deliveryFast",size:"16p","aria-hidden":"true"}),o(f,{fontSkin:"footnote-bold",children:e.localizedValue})]}),Wt=({localization:e})=>{const r=e.localizedValue,a=e.metadata?.description,t=e.metadata?.pageUrl,n=e.metadata?.pageUrlText,i=e.metadata?.pageUrlAriaLabel;return p(v,{alignItems:"flex-end",gap:"2",mt:2,children:[o(w,{iconType:"sustainability",size:"16p","data-testid":"sustainability-icon","aria-hidden":"true"}),o(f,{fontSkin:"footnote-bold","data-testid":"sustainability-title",children:r}),a&&p(Le,{children:[o(Ee,{children:o(O,{skin:"unstyled","aria-label":r,children:o(w,{iconType:"info",size:"16p","data-testid":"sustainability-info-icon","aria-hidden":"true"})})}),p(ke,{"aria-label":r,children:[p(v,{alignItems:"center",marginBottom:2,children:[o(w,{iconType:"sustainability",marginRight:2,"data-testid":"sustainability-popover-icon","aria-hidden":"true"}),o(f,{fontSkin:"title-item",marginRight:2,"data-testid":"sustainability-popover-title",children:r})]}),p(f,{fontSkin:"body-small",marginRight:2,"data-testid":"sustainability-popover-description",children:[a,t&&n&&p(U,{children:["\xA0",o(x,{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":i,children:n})]})]})]})]})]})},Kt=({product:e,onError:r})=>{const a=_(()=>{const t={...e.selectedOptions};return e.quantity!=null&&(t.quantity=String(e.quantity)),t},[e.selectedOptions,e.quantity]);return o(I,{componentName:"pricing",severity:"degraded",onError:r,children:o(N,{mt:4,children:o(Re,{productId:e.productKey,version:e.productVersion,mpvId:e.mpvId,selections:a,alwaysShowMOQInfo:!0,isTile:!0,displayVariant:Oe.FROM})})})},$t=Z({}),ge=()=>j($t),Zt=Z({}),q=()=>j(Zt),$e=()=>{const{translate:e}=q(),{favoritesPageRoute:r}=ge(),a=$()==="xs",[t,n]=e("added-to-my-favorites").split("{my-favorites}");
1return u.createElement(f,{display:a?"block":"inline"},t,u.createElement(oe,null,u.createElement(x,{href:r},e("my-favorites"))),n)},Yt="favorite-added",jt=()=>{const{translate:e}=q(),{auth:r}=ie(),a=$()==="xs",[t,n]=e("sign-in-to-save").split("{sign-in}");return u.createElement(f,{display:a?"block":"inline"},t,u.createElement(oe,null,u.createElement(x,{render:i=>u.createElement(O,{skin:"link",className:i.className,onClick:()=>r?.signIn(void 0,void 0,{trackingCaller:Yt})},i.children)},e("sign-in"))),n)},qt=({isFavoriteChecked:e,displayError:r})=>{const{translate:a}=q(),{isSignedIn:t}=ie();if(r)return u.createElement(f,null,a(e?"remove-favorite-error":"add-favorite-error"));if(e){if(t)return u.createElement($e,null);if(!t)return u.createElement(u.Fragment,null,u.createElement($e,null)," ",u.createElement(jt,null))}else return u.createElement(f,null,a("removed-from-my-favorites"))},Qt=({isFavoriteChecked:e,displayError:r})=>{const a=$()==="xs",[t,n]=b(100);Be(()=>{if(typeof window<"u"){const c=document.getElementById("bookendsHeader"),d=document.querySelectorAll('[class*="promobar"]');if(c&&c.offsetHeight>0){let l=c.offsetHeight;d.length===0?a||(l-=40):a||(l+=30),n(l)}}},[]);const i=r?"error":e?"success":"info";return Fe.createPortal(u.createElement(N,{mx:a?3:"auto",style:{position:"fixed",top:t,left:0,right:0,zIndex:100,backgroundColor:"transparent"},className:Ie()},u.createElement(xe,{skin:i,toast:!0},u.createElement(qt,{isFavoriteChecked:e,displayError:r}))),document.body)},Xt=({isLoading:e,isFavoriteChecked:r,onChangeHandler:a})=>{const{translate:t}=q(),{isFavoriteDataReady:n}=ge();return u.createElement(N,{ml:"auto",mb:"auto"},e?u.createElement(v,{my:3,pr:3},u.createElement(z,{accessibleText:t("loading")})):u.createElement(Pe,{skin:"favorite",checked:r,disabled:!n,onChange:a,"aria-label":t("heart-accessibility-label"),onClick:i=>{i.stopPropagation()}}))};u.createContext({});const Jt=u.createContext(void 0),er=()=>{const e=j(Jt);if(e===void 0)throw new Error("useTrackingContext must be used within a TrackingProvider");return e},tr=7e3,rr=({productKey:e,productVersion:r,selectedOptions:a,documentUrl:t,productName:n,mpvId:i,pageZone:c,productPosition:d})=>{const{favoriteService:l,favoriteProducts:m}=ge(),{trackProductAddedToWishlist:h,trackProductRemovedFromWishlist:g}=er(),[T,y]=b(!1),[S,C]=b(!1),[B,Q]=b(!1),[X,J]=b(!1),M=se(null);Y(()=>()=>{M.current&&clearTimeout(M.current)},[]),Y(()=>{y(m.some(vr=>vr.productKey===e))},[m]);const yr=async()=>{M.current&&(clearTimeout(M.current),C(!1));try{Q(!1),J(!0),T?(await l?.removeFavoriteProduct(e),g(e,i,n,c,d)):(await l?.addFavoriteProduct(e,r,a,t),h(e,i,n,a||{},c,d)),y(!T)}catch{Q(!0)}finally{C(!0),M.current=setTimeout(()=>{C(!1)},tr),J(!1)}};return u.createElement(u.Fragment,null,S&&!X&&u.createElement(Qt,{isFavoriteChecked:T,displayError:B}),u.createElement(Xt,{isLoading:X,isFavoriteChecked:T,onChangeHandler:yr}))};P.core,P.utility,P.alertBox,P.button,P.icon,P.spinner;const ar=({product:e,favourite:r,onError:a})=>o(I,{componentName:"favourites",severity:"degraded",onError:a,children:o(ne,{position:"top-right",inset:"action",children:o(rr,{productKey:e.productKey,productVersion:e.productVersion,mpvId:e.mpvId,productName:e.name??"",selectedOptions:e.selectedOptions,pageZone:r.pageZone,productPosition:r.productPosition})})}),or=({product:e,onError:r})=>{const a={...e.selectedOptions};return o(I,{componentName:"coupon",severity:"warning",onError:r,children:o(N,{mt:4,children:o(Ve,{productId:e.productKey,version:e.productVersion,mpvId:e.mpvId,selections:a,quantity:e.quantity})})})};function Ze(e,r){try{return e(r)}catch{return null}}function nr(e,r,a,t){return[{isActive:()=>e===!1,resolve:()=>{const n=Ze(t,"ep-tiles.product-tile.callout.outOfStock");return n?{label:n,skin:"info",emphasis:"low"}:null}},{isActive:()=>!!r?.campaignCallout,resolve:()=>({label:r?.campaignCallout,skin:"promo"})},{isActive:()=>r?.newLowPrice===!0,resolve:()=>{const n=a.NEW_LOW_PRICE?.localizedValue;return n?{label:n,skin:"promo"}:null}},{isActive:()=>r?.bestSeller===!0,resolve:()=>{const n=Ze(t,"ep-tiles.product-tile.callout.bestSeller");return n?{label:n,skin:"accent"}:null}},{isActive:()=>r?.new===!0,resolve:()=>{const n=a.NEW?.localizedValue;return n?{label:n,skin:"accent"}:null}},{isActive:()=>r?.newOptions===!0,resolve:()=>{const n=a.NEW_OPTIONS?.localizedValue;return n?{label:n,skin:"accent"}:null}}]}function sr(e,r,a,t){const n=nr(e,r,a,t);for(const i of n)if(i.isActive())return i.resolve();return null}const ir=({product:e,callout:r,calloutsLocalization:a,onError:t})=>{const{t:n}=F(),i=sr(e.inStock,r,a,n);return i?o(I,{componentName:"callout",severity:"warning",onError:t,children:o(ne,{position:"top-left",children:o(Me,{skin:i.skin,emphasis:i.emphasis,"data-testid":"product-tile-callout",children:i.label})})}):null};L((e,r)=>{const{className:a,product:t,callout:n,calloutsLocalization:i,ratingSummary:c,favourite:d,cta:l,quantitySelector:m,config:h,callbacks:g,...T}=e,y=Nt(t),S=se(g?.onError);if(S.current=g?.onError,Y(()=>{const B=[...y,...At(t,l)];B.length>0&&S.current?.(B)},[t.productKey,t.mpvId,t.productVersion,t.productUrl,t.name,l?.label]),Bt(y))return null;const C=E(a,{[V.productTile]:!0});return p(G,{ref:r,className:C,...T,evenHeight:!0,children:[p(_t,{product:t,config:h,productUrl:t.productUrl,onTileClick:g?.onTileClick,onError:g?.onError,children:[o(ir,{product:t,callout:n,calloutsLocalization:i,onError:g?.onError}),d&&o(ar,{product:t,favourite:d,onError:g?.onError})]}),p(ee,{children:[t.name&&o(Vt,{name:t.name,productUrl:t.productUrl,onTileClick:g?.onTileClick}),c&&o(Ut,{ratingSummary:c,onError:g?.onError}),t.description&&o(Dt,{description:t.description}),o(Kt,{product:t,onError:g?.onError}),h?.showCouponCallout&&o(or,{product:t,onError:g?.onError}),n?.expressShipping&&i.EXPRESS_SHIPPING?.localizedValue&&o(Gt,{localization:i.EXPRESS_SHIPPING}),n?.sustainable&&i.SUSTAINABLE?.localizedValue&&o(Wt,{localization:i.SUSTAINABLE})]}),l?.label&&o(Ne,{children:p(v,{flexDirection:"column",children:[m&&o(Ht,{quantitySelector:m,onError:g?.onError}),o(zt,{cta:l})]})})]})}),Z(null);var br=R("s",".ep-tiles-module-category-tile-Y2F0Z{background:none}.ep-tiles-module-category-tile-error-Y2F0Z,.ep-tiles-module-category-tile-wrapper-Y2F0Z{border-radius:var(--swan-sem-border-radius-container);overflow:hidden}");const lr="Personalization",cr="Home Page|other:home|Category Section|Personalized Categories",dr="personalized_categories",ur="manually-defined",gr="L1",pr="model-driven:unknown",Sr=R("b",e=>e?`model-driven:${e}`:pr),mr=e=>`personalized-category-click-${e}`,hr="Category Section",fr="/",Tr=(e,r,a,t)=>{const n={category:lr,placementType:dr,placementId:cr,decisionMaker:ur,category_id:r.categoryId,position:a,assortmentDecisionMaker:t.assortmentDecisionMaker,assortmentCategoryType:gr};try{_e({triggerId:mr(r.categoryId),eventType:"click",eventData:{subtype:"personalization",data:n}})}catch(i){e.error("Failed to fire Personalization Clicked event",{error:i})}},wr=R("c",(e,r,a)=>t=>{const n=r.findIndex(g=>g.categoryId===t.categoryId)+1,i=t.categoryTileTitle.trim(),c=t.categoryTileUrl,d=Ue(c),l=hr,m=`${fr};${d};${l};${i}`,h=`${i}:${n}`;
1De("Navigation Clicked",{category:"Home Page",label:`Content:${l}`,eventDetail:m,navigationDetail:h},ze,e),a&&Tr(e,t,n,a)})})}}));
2//# sourceMappingURL=categoryRowTrackOnClick-BGW4zHub.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.