PageSourceSearch

https://www.belhaven.co.uk/dist/gk-jss-app/js/5136.780892e1.js

js belhaven.co.uk collected 2026-09-26 04:48:10 UTC 9,019 bytes, 2 lines download raw bytes

1"use strict";(globalThis["webpackChunkgk_jss_app"]=globalThis["webpackChunkgk_jss_app"]||[]).push([[5136],{35547:(e,a,o)=>{o.r(a),o.d(a,{default:()=>C});var l=o(20641),t=o(50953),r=o(90033),n=o(94626),i=o(99940),s=o(46810),u=o(34317),d=o(10434),m=o(82045),c=o(5418),p=o(6402);const v={class:"row promo-carousel-item__elem"},_={class:"col-12"},g={class:"promo-carousel-item__image"},b={class:"promo-carousel-item__image-ratio"},k={class:"row promo-carousel-item__elem"},f={class:"promo-carousel-item__wrapper"},h=(0,l.pM)({inheritAttrs:!1,__name:"PromoCarouselItem",props:{fields:{default:()=>({})},rendering:{},params:{default:()=>({})},isCarousel:{type:Boolean,default:!1},buttonVariant:{default:"secondary"},withoutMdMargins:{type:Boolean,default:!0},dataLayerComponentName:{},index:{}},setup(e){const a=(0,p.yI)(),o=e,h=o.isCarousel?(0,d.JO)():null,y=(0,c.S)(),C=()=>{y({component:o.dataLayerComponentName,event:m.V.categories.SELECT_PROMOTION,ecommerce:{items:[{promotion_id:o.fields?.heading?.value,promotion_name:o.fields?.heading?.value,creative_name:o.fields?.description?.value,creative_slot:(o.index??0)+1}]}})};return(o,d)=>e.fields.imageDesktop?.value?.src||!(0,t.R1)(i.isServer)()&&(0,t.R1)(i.isEditorActive)()?((0,l.uX)(),(0,l.CE)("div",{key:0,class:(0,r.C4)(["promo-carousel-item",o.$attrs["class"]])},[(0,l.Lk)("div",{class:(0,r.C4)(["container promo-carousel-item__container",e.withoutMdMargins&&"promo-carousel-item__container--without-md-margins"])},[(0,l.Lk)("div",v,[(0,l.Lk)("div",_,[(0,l.Lk)("div",g,[(0,l.Lk)("div",b,[(0,l.bF)(u.A,{"mobile-url":e.fields.imageMobile?.value?.src,"tablet-url":e.fields.imageTablet?.value?.src,"desktop-url":e.fields.imageDesktop?.value?.src,"mobile-alt":e.fields.imageMobile?.value?.alt,"tablet-alt":e.fields.imageTablet?.value?.alt,"desktop-alt":e.fields.imageDesktop?.value?.alt,"lazy-loading":"lazy","full-width":"","custom-params":{mobileS:445,tablet:768,desktop:1200,fullWidthDesktop:1540},"fallback-param":{mobileS:"s",mobile:"s"}},null,8,["mobile-url","tablet-url","desktop-url","mobile-alt","tablet-alt","desktop-alt"])])])])]),(0,l.Lk)("div",k,[(0,l.Lk)("div",f,[(0,l.Lk)("div",{class:(0,r.C4)(["promo-carousel-item__content",(0,t.R1)(a)((0,t.R1)(p.PW).PROMO_CAROUSEL_ITEM)])},[(0,l.bF)((0,t.R1)(n.E),{class:"promo-carousel-item__heading swiper-no-swiping",field:e.fields.heading,tag:"h2"},null,8,["field"]),(0,l.bF)((0,t.R1)(n.E),{class:"promo-carousel-item__rte swiper-no-swiping",field:e.fields.description,tag:"p"},null,8,["field"]),(0,l.RG)(o.$slots,"pubInfo",{slotFields:e.fields}),e.fields.link?.value?.text&&e.fields.link?.value?.href?((0,l.uX)(),(0,l.Wv)(s.A,{key:0,tabindex:!e.isCarousel||(0,t.R1)(h)?.isVisible?null:-1,link:e.fields.link?.value,variant:e.buttonVariant,type:"link",onClick:d[0]||(d[0]=e=>C())},null,8,["tabindex","link","variant"])):(0,l.Q3)("",!0)],2)])])],2)],2)):(0,l.Q3)("",!0)}}),y=h,C=y},55136:(e,a,o)=>{o.r(a),o.d(a,{default:()=>M});o(22489),o(61701);var l=o(20641),t=o(50953),r=o(90033),n=o(50258),i=o(99940),s=o(62004),u=o(7316),d=o(10434),m=o(11858),c=o(35547),p=o(82045),v=o(5418),_=o(37463),g=o(30843);const b={key:0,class:"promo-carousel__container promo-carousel__container--single-item"},k={key:1,class:"promo-carousel__container promo-carousel__container--slider"},f={key:0,class:"container"},h={class:"row"},y={class:"col-12"},C={class:"promo-carousel__navbar"},R=["id"],E=["id"],w=["id"],L={key:0,class:"error"},x=5,I=(0,l.pM)({__name:"PromoCarousel",props:{rendering:{},params:{default:()=>({})},dataLayerComponentName:{default:p.V.component.PROMO_CAROUSEL}},setup(e){const{t:a}=(0,n.s9)(),o=(0,g.B)(),I=[u.Vx,u.dK,u.Jq,u.s3,u._R,u.Ij],F=e,M=(0,t.KR)(F.rendering?.uid??(0,m.A)()),O=(0,t.KR)(!1),S=(0,l.rk)("promoCarouselSection"),N=(0,t.KR)(0),P=(0,t.KR)(null);(0,_.r)({componentName:p.V.component.PROMO_CAROUSEL},P);const W=(0,l.EW)((()=>["ChefBrewer"===o.brandName&&"top-green-border bottom-green-border","1"===F.params?.alternativeBackground&&"promo-carousel--alternative-bg","right"===F.params?.contentAlign&&"promo-carousel--right"])),$=(0,l.EW)((()=>["PubPartners"===o.brandName&&"1"===F.params?.alternativeBackgroun
1d&&"var-dark","Cornerstone"===o.brandName&&"1"===F.params?.alternativeBackground&&"var-dark"])),X=(0,l.EW)((()=>"WackyWarehouse"!==o.brandName)),A=(0,l.EW)((()=>["WackyWarehouse","FarmhouseInns","ChefBrewer","GreeneKingInns"].includes(o.brandName)?"primary":"secondary")),B=F.rendering?.placeholders?.["promo-carousel-placeholder"]?.filter((e=>"PromoCarouselItem"===e.componentName&&!!e.dataSource&&e.fields))??[],V=B.length,K=e=>{P.value=e,e.autoplay.stop()},T=e=>{O.value&&e?.activeIndex!==N.value&&(e.slides[e.activeIndex]?.focus({preventScroll:!0}),N.value=e.activeIndex)},Q=(0,v.S)(),G=()=>{V&&Q({component:F.dataLayerComponentName,event_type:p.V.categories.VIEW_PROMOTION,ecommerce:{items:B.map((({fields:e},a)=>({promotion_id:e?.heading?.value,promotion_name:e?.heading?.value,creative_name:e?.description?.value,creative_slot:a+1})))}})},D=()=>{S.value&&S.value.getBoundingClientRect().top<window.innerHeight/2&&(G(),document.removeEventListener("scroll",D))};return(0,l.sV)((()=>{O.value=!0,document.addEventListener("scroll",D)})),(0,l.hi)((()=>{document.removeEventListener("scroll",D)})),(o,n)=>(0,t.R1)(V)||o.$isPageEditing?((0,l.uX)(),(0,l.CE)("section",{key:0,ref_key:"promoCarouselSection",ref:S,class:(0,r.C4)(["promo-carousel",W.value])},[(0,t.R1)(i.isServer)()||o.$isPageEditing&&!e.params.skipPlaceholder?((0,l.uX)(),(0,l.CE)("div",{key:1,class:(0,r.C4)(["promo-carousel__container",{"promo-carousel__container--right":"right"==e.params.contentAlign}])},[o.$isPageEditing?((0,l.uX)(),(0,l.CE)(l.FK,{key:0},[(0,l.bF)((0,t.R1)(s.O),{name:"promo-carousel-placeholder",rendering:e.rendering,"button-variant":A.value,"without-md-margins":X.value,class:(0,r.C4)($.value)},null,8,["rendering","button-variant","without-md-margins","class"]),(0,t.R1)(V)>x?((0,l.uX)(),(0,l.CE)("h2",L," Warning! Only the first "+(0,r.v_)(x)+" items will be rendered! ")):(0,l.Q3)("",!0)],64)):((0,l.uX)(!0),(0,l.CE)(l.FK,{key:1},(0,l.pI)((0,t.R1)(B).slice(0,x),((a,t)=>
1((0,l.uX)(),(0,l.Wv)(c["default"],(0,l.v6)({key:t},{ref_for:!0},a,{index:t,"button-variant":A.value,"without-md-margins":X.value,class:$.value,"data-layer-component-name":e.dataLayerComponentName}),{pubInfo:(0,l.k6)((({slotFields:e})=>[(0,l.RG)(o.$slots,"pubInfo",{slotFields:e})])),_:3},16,["index","button-variant","without-md-margins","class","data-layer-component-name"])))),128))],2)):((0,l.uX)(),(0,l.CE)(l.FK,{key:0},[1===(0,t.R1)(V)?((0,l.uX)(),(0,l.CE)("div",b,[(0,l.bF)(c["default"],(0,l.v6)((0,t.R1)(B)[0],{index:0,"button-variant":A.value,"without-md-margins":X.value,class:$.value,"data-layer-component-name":e.dataLayerComponentName}),{pubInfo:(0,l.k6)((({slotFields:e})=>[(0,l.RG)(o.$slots,"pubInfo",{slotFields:e})])),_:3},16,["button-variant","without-md-margins","class","data-layer-component-name"])])):O.value?((0,l.uX)(),(0,l.CE)("div",k,[(0,l.bF)((0,t.R1)(d.RC),{modules:I,loop:!0,navigation:{prevEl:`#promo-carousel__navbar-btn__prev__${M.value}`,nextEl:`#promo-carousel__navbar-btn__next__${M.value}`},pagination:{el:`#promo-carousel__pagination__${M.value}`,type:"bullets",clickable:!0,bulletElement:"button"},a11y:{prevSlideMessage:(0,t.R1)(a)("slider-previous-button"),nextSlideMessage:(0,t.R1)(a)("slider-next-button"),paginationBulletMessage:`${(0,t.R1)(a)("slider-pagination")} {{index}}`,slideLabelMessage:"{{index}} of {{slidesLength}}"},effect:"fade","fade-effect":{crossFade:!0},autoplay:{delay:1e3},speed:500,"watch-slides-progress":"",onSlideChange:T,onSwiper:K},{default:(0,l.k6)((()=>[((0,l.uX)(!0),(0,l.CE)(l.FK,null,(0,l.pI)((0,t.R1)(B).slice(0,x),((a,r)=>((0,l.uX)(),(0,l.Wv)((0,t.R1)(d.qr),{key:r,tabindex:"-1"},{default:(0,l.k6)((({isActive:t,isVisible:n})=>[(0,l.bF)(c["default"],(0,l.v6)({ref_for:!0},a,{"is-carousel":!0,index:r,"aria-hidden":!(t&&n),"button-variant":A.value,"without-md-margins":X.value,class:$.value,"data-layer-component-name":e.dataLayerComponentName}),{pubInfo:(0,l.k6)((({slotFields:e})=>[(0,l.RG)(o.$slots,"pubInfo",{slotFields:e})])),_:3},16,["index","aria-hidden","button-variant","without-md-margins","class","data-layer-component-name"])])),_:2},1024)))),128))])),_:3},8,["navigation","pagination","a11y"]),(0,t.R1)(V)>1?((0,l.uX)(),(0,l.CE)("div",f,[(0,l.Lk)("div",h,[(0,l.Lk)("div",y,[(0,l.Lk)("div",C,[(0,l.Lk)("button",{id:`promo-carousel__navbar-btn__prev__${M.value}`,class:"promo-carousel__navbar-btn"},[...n[0]||(n[0]=[(0,l.Lk)("i",{class:"icon icon-Arrow-Back","aria-hidden":"true"},null,-1)])],8,R),(0,l.Lk)("div",{id:`promo-carousel__pagination__${M.value}`,class:"promo-carousel__pagination"},null,8,E),(0,l.Lk)("button",{id:`promo-carousel__navbar-btn__next__${M.value}`,class:"promo-carousel__navbar-btn"},[...n[1]||(n[1]=[(0,l.Lk)("i",{class:"icon icon-Arrow-Forward","aria-hidden":"true"},null,-1)])],8,w)])])])])):(0,l.Q3)("",!0)])):(0,l.Q3)("",!0)],64))],2)):(0,l.Q3)("",!0)}}),F=I,M=F}}]);
2//# sourceMappingURL=5136.780892e1.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.