PageSourceSearch

https://www.yoco.com/components-StoryBlok-V2-Layout-ProductShowCase-dc937c64168a8b5af70d.js

js yoco.com collected 2026-09-24 08:40:48 UTC 9,665 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"c83f02910c831d5c731b90dcdd19f361e85fc8b6"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="465be974-989f-4bc9-940b-71d8c6b4f581",e._sentryDebugIdIdentifier="sentry-dbid-465be974-989f-4bc9-940b-71d8c6b4f581")}catch(e){}}(),(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[8742],{7816:function(e,t,r){r.d(t,{t:function(){return o}});var n=r(6251),a=r(80381);const o=e=>{var t,r;const o=(0,n.DP)(e)?e:void 0,l=(0,n.DP)(e)?void 0:e,i=e.thumbnail,c=(0,n.Ih)(null==o?void 0:o.price),s=(0,n.Ih)(null==o?void 0:o.originalPrice),d=null!==(t=c?(0,a.nL)(c,s):e.badge)&&void 0!==t?t:void 0,u=c&&s&&s>c?s:void 0;return{productName:e.name,imageUrl:null!==(r=null==i?void 0:i.filename)&&void 0!==r?r:"",imageAlt:(null==i?void 0:i.alt)||e.name+"-image",priceValue:c,priceLabelOverride:null==l?void 0:l.priceLabelOverride,shortDescription:e.shortDescription,ctaText:e.ctaText,ctaLink:e.ctaLink,learnMoreButtonUrl:e.detailsLink,filterTags:e.filterTags,badge:d,wasPrice:u,purchasableItem:o,reviewSkus:null==o?void 0:o.reviewSkus}}},34353:function(e,t,r){r.r(t);var n=r(77539),a=r(96147),o=r(86630),l=r(96706),i=r(42023),c=r(897),s=r(7816),d=r(96540);t.default=e=>{let{blok:t}=e;const{catalogueItems:r}=(0,i.I)(t.useInternalItems),u=t.display||"ALL",m="ALL"===u?r:r.filter((e=>e.filterTags.includes(u)));return 0===m.length?null:d.createElement(a.A,Object.assign({id:t.id,sectionId:t._uid,headingSize:t.headingSize,headingText:t.headingText,subheadingText:t.subheadingText,overrideHeadingColor:t.overrideHeadingColor,cardWidth:t.cardWidth,primaryBackgroundColor:t.primaryBackgroundColor,secondaryBackgroundColor:t.secondaryBackgroundColor,ctaType:t.ctaType,ctaText:t.ctaText,ctaColor:t.ctaColor,ctaLink:(0,c.RO)(t.ctaLink),trackingEvent:t.trackingEvent,trackingEventKey:t.trackingEventKey,trackingEventValue:t.trackingEventValue,autoplay:t.autoplay},(0,n.K1)(t)),m.map((e=>{const r=(0,s.t)(e);return d.createElement(o.A,{key:e.storyblokUuid,productName:r.productName,imageUrl:r.imageUrl,imageAlt:r.imageAlt,priceValue:r.priceValue,priceLabelOverride:r.priceLabelOverride,shortDescription:r.shortDescription,ctaText:r.ctaText,ctaLink:r.ctaLink,learnMoreButtonUrl:t.showLearnMoreCTA?r.learnMoreButtonUrl:void 0,purchasableItem:r.purchasableItem,reviewSkus:r.reviewSkus,badge:r.badge,wasPrice:r.wasPrice,backgroundColor:t.cardBackgroundColor||l.Q.White,isSliderChild:!0})})))}},42023:function(e,t,r){r.d(t,{I:function(){return y}});r(26910);
1var n=r(54506),a=r(77539),o=r(51278),l=r(36964),i=r(94481),c=r(55609),s=r(72854),d=r(96540);const u=/^settings\/[^/]+\/internal\//,m=["product","bundle","onlineProduct"],p=e=>"object"==typeof e&&null!==e,g=e=>{if(!p(e))return!1;const t=e.content;return!!p(t)&&("string"==typeof e.uuid&&"string"==typeof e.full_slug&&("product"===t.component||"bundle"===t.component||"onlineProduct"===t.component))},v=e=>(t,r)=>{const n=e(t),a=e(r);return n!==a?void 0===n?1:void 0===a?-1:n-a:t.storyblokUuid.localeCompare(r.storyblokUuid)},f=(e,t)=>{const r=e=>{const t=m.indexOf(e.item.type);return-1===t?m.length:t};return r(e)-r(t)||e.fullSlug.localeCompare(t.fullSlug)},w=v((e=>e.orderPriority)),x=v((e=>{var t;return null!==(t=e.heroOrderPriority)&&void 0!==t?t:e.orderPriority})),y=function(e){void 0===e&&(e=!1);const t=(0,a.LA)(),r=(0,o.q)(),m=(0,i.bI)(),p=(0,l._)(),{0:v,1:y}=(0,d.useState)(),h=(0,d.useCallback)((e=>{const t=e.content,r=t.uuid||e.uuid;if("product"===t.component){const e=m(t.sku,t.storefront);return e?(0,c.consolidateProduct)(t,e,r):void 0}if("bundle"===t.component){const e=p(t.code,t.storefront);return e?(0,c.consolidateBundle)(t,e,r):void 0}return(0,c.consolidateOnlineProduct)(t,r)}),[m,p]);return(0,d.useEffect)((()=>{if(!t||!(0,s.A)())return;(async()=>{const e=[];for(const r of c.STORYBLOK_ITEM_PATHS){const n=await t.getAll("cdn/stories",{starts_with:r,version:"draft",per_page:100});for(const t of Array.isArray(n)?n:[]){if(!g(t))continue;const r=h(t);r&&e.push({item:r,isInternal:u.test(t.full_slug),fullSlug:t.full_slug})}}y(e)})().catch((e=>{console.error("Error loading draft shop items: ",e)}))}),[t,h]),(0,d.useMemo)((()=>{const t=null!=v?v:r;if(e){const e=t.filter((e=>e.isInternal)).sort(f).map((e=>e.item));return{heroItems:e,catalogueItems:e}}const a=t.map((e=>e.item)).filter((e=>e.isListed));return{heroItems:a.filter((e=>e.showInHero)).sort(x),catalogueItems:(0,n.A)(a).sort(w)}}),[v,r,e])}},75034:function(e,t,r){var n=r(46942),a=r.n(n),o=r(96540),l=r(82019),i=r(3409);const c={small:"lead-lg",medium:"h3",large:"h2"},s={small:"body-lg",medium:"body-lg",large:"lead-md"};t.A=e=>{let{sectionId:t,size:r,headingText:n,subheadingText:d,color:u}=e;return o.createElement("div",{className:"mb-2xl flex flex-col justify-between gap-20 sm:flex-row md:gap-[224px]"},o.createElement("div",{className:"flex max-w-full flex-col gap-y-16 md:w-[448px] lg:w-[600px]"},n?o.createElement(i.A,{color:u,text:n,font:"grotesk",weight:"book",element:"h2",size:c[r]}):null,d?o.createElement(i.A,{color:u,text:d,font:"grotesk",weight:"book",size:s[r]}):null),o.createElement("div",{className:"flex items-end gap-12"},o.createElement(l.A,{style:"bordered",color:u,className:a()("swiper-prev-"+t,"z-10 rotate-180 transform")}),o.createElement(l.A,{style:"bordered",color:u,className:a()("swiper-next-"+t,"z-10")})))}},96147:function(e,t,r){r.d(t,{A:function(){return g}});var n=r(98587),a=r(75034),o=r(41118),l=r(46942),i=r.n(l),c=r(90150),s=r(63325),d=r(96540);var u=e=>{let{sectionId:t,cardWidth:r,children:n,autoplay:a=!1,centerCardsWhenTheyFit:o=!1}=e;const{0:l,1:u}=(0,d.useState)(null),{0:m,1:p}=(0,d.useState)(!1),g=o&&!a&&m;return(0,d.useEffect)((()=>{if(!l)return;const e=()=>{const e=document.querySelector(".swiper-prev-"+t),r=document.querySelector(".swiper-next-"+t);if(e&&r){const t=e.classList.contains("swiper-button-disabled"),n=r.classList.contains("swiper-button-disabled");e.style.display=t&&n?"none":"block",r.style.display=t&&n?"none":"block"}};return l.on("resize",e),o&&(l.on("lock",e),l.on("unlock",e)),e(),()=>{l.off("resize",e),l.off("lock",e),l.off("unlock",e)}}),[l,t,o]),(0,d.useEffect)((()=>{if(!l||!a)return;const e=document.querySelector(".swiper-prev-"+t),r=document.querySelector(".swiper-next-"+t);if(!e||!r)return;const n=e=>()=>{l.autoplay.stop(),l.slideTo(l.activeIndex,0,!1),l.animating=!1,"next"===e?l.slideNext(300):l.slidePrev(300)},o=n("next"),i=n("prev");return r.addEventListener("click",o),e.addEventListener("click",i),()=>{r.removeEventListener("click",o),e.removeEventListener("click",i)}}),[l,t,a]),(0,d.useEffect)((()=>{if(!l||!o||a)return;const e=()=>{const{slides:e,params:t,width:r,el:n}=l;if(!e.length)return;const a=Number(t.spaceBetween)||0,o=e.reduce(((e,t)=>e+t.offsetWidth),0)+a*(e.length-1),i=Number.parseFloat(getComputedStyle(n).marginRight)||0;p(o<=r+i)};return e(),l.on("resize",e),()=>{l.off("resize",e)}}),[l,o,a]),(0,d.useEffect)((()=>
1{l&&o&&!a&&l.update()}),[l,o,a,g]),d.createElement(s.RC,{modules:[c.U1,c.Vx,c.Ij],spaceBetween:20,slidesPerView:"auto",freeMode:!0,grabCursor:!0,className:i()("xl:!pr-0",{"-mr-gutter-xs sm:-mr-gutter-sm md:-mr-gutter-md lg:-mr-gutter-lg xl:-mr-gutter-xl 4k:-mr-gutter-4k":!g},{"[&>.swiper-wrapper]:!ease-linear":a}),centerInsufficientSlides:g,navigation:!a&&{nextEl:".swiper-next-"+t,prevEl:".swiper-prev-"+t},watchOverflow:!0,breakpoints:{900:{spaceBetween:24},1200:{spaceBetween:32}},onSwiper:u,speed:a?5e3:300,loop:a,loopPreventsSliding:!1,autoplay:!!a&&{delay:0}},d.Children.map(n,((e,t)=>d.createElement(s.qr,{key:"swiper-slide-"+t,className:i()("grid h-auto w-[280px]",{"last:mr-[calc(100vw-5.33vw-280px)] last:sm:mr-[calc(100vw-4.17vw-580px)] md:w-[390px] last:md:mr-[calc(100vw-4.17vw-810px)] lg:w-[495px] last:lg:mr-[calc(100vw-7.22vw-1026px)] last:xl:mr-[calc(100vw-9.76vw-1024px)] last:4k:mr-0":"normal"===r},{"last:mr-[calc(100vw-5.33vw-280px)] last:sm:mr-[calc(100vw-4.17vw-580px)] md:w-[340px] last:md:mr-[calc(100vw-4.17vw-710px)] lg:w-[390px] last:lg:mr-[calc(100vw-7.22vw-1234px)] last:xl:mr-[calc(100vw-9.76vw-1234px)] last:4k:mr-0":"slim"===r},{"last:mr-[calc(100vw-5.33vw-260px)] last:sm:mr-[calc(100vw-4.17vw-540px)] md:w-[270px] last:md:mr-[calc(100vw-4.17vw-570px)] lg:w-[320px] last:lg:mr-[calc(100vw-7.22vw-894px)] last:xl:mr-[calc(100vw-9.76vw-894px)] last:4k:mr-0":"extra-slim"===r},{"last:!mr-0":g})},e))))},m=r(99798);const p=["id","sectionId","headingSize","headingText","subheadingText","overrideHeadingColor","cardWidth","primaryBackgroundColor","secondaryBackgroundColor","ctaType","ctaColor","ctaText","ctaLink","trackingEvent","trackingEventKey","trackingEventValue","autoplay","centerCardsWhenTheyFit","children"];var g=e=>{let{id:t,sectionId:r,headingSize:l="medium",headingText:i,subheadingText:c,overrideHeadingColor:s,cardWidth:g,primaryBackgroundColor:v,secondaryBackgroundColor:f,ctaType:w,ctaColor:x,ctaText:y,ctaLink:h,trackingEvent:k,trackingEventKey:b,trackingEventValue:E,autoplay:T,centerCardsWhenTheyFit:C,children:L}=e,I=(0,n.A)(e,p);return d.createElement(o.A,Object.assign({id:t,ctaType:w,ctaText:y,ctaLink:h,ctaColor:x,trackingEvent:k,trackingEventKey:b,trackingEventValue:E,primaryBackgroundColor:v,secondaryBackgroundColor:f},I),i||c?d.createElement(a.A,{sectionId:r,size:l,headingText:i,subheadingText:c,color:s||(0,m.q8)(v)}):null,d.createElement(u,{sectionId:r,cardWidth:g,autoplay:T,centerCardsWhenTheyFit:C},L))}}}]);
2//# sourceMappingURL=components-StoryBlok-V2-Layout-ProductShowCase-dc937c64168a8b5af70d.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.