PageSourceSearch

https://ubbulls.com/_nuxt/CjIIh-EF2.js

js ubbulls.com collected 2026-10-02 05:21:45 UTC 13,959 bytes, 1 lines download raw bytes

1import{n as e}from"./hePW80VL.js";import{a as t}from"./DH_oPWig.js";import{D as n,Dt as r,E as i,Et as a,J as o,O as s,P as c,T as l,Y as u,_ as d,a as f,at as p,c as m,d as ee,dn as h,hn as g,i as _,l as v,mn as te,nt as y,qt as b,s as ne,u as re,ut as x,w as S,wt as C,zt as w}from"./BaBhFZm2.js";import{c as ie,l as ae}from"./Cm8_Znr6.js";import{t as T}from"./DtqEV2Pb.js";import{n as E}from"./CU89Zi3L.js";import{nt as D}from"./DGJ9b2SS.js";import{Ut as O}from"./CvPvsyIu.js";import{t as oe}from"./BTR1pb_e.js";import{t as k}from"./D4jAZI6Q.js";import{t as A}from"./DSQl5yOh.js";import{t as se}from"./C2ANWNt82.js";import{Dt as j}from"./Cv_8g1C12.js";import"./BTnq5aVT2.js";var M=[`href`,`aria-label`,`title`,`target`,`tabindex`],N={key:1,class:`sr-only`},ce={__name:`PromotionsItem`,props:{promotion:{type:Object,required:!0},adType:{type:String,required:!0},tabindex:{type:Number,required:!1,default:0},lazyload:{type:Boolean,required:!1},webp:{type:Boolean,required:!1,default:!0},slide:{type:Boolean,required:!1,default:!1}},setup(e){let t=e,r=w(null),a=e=>{};y(()=>{let{focusOnNextElement:e}=j(r);a=e});let o=S(()=>t.promotion.picture.images?.[0]?.alt?.length?t.promotion.picture.images[0].alt:t.promotion?.hover_text?.length?t.promotion.hover_text:t.promotion.title);return(t,c)=>{let l=T;return p(),s(`div`,{ref_key:`PromotionItemRef`,ref:r,class:h([`ad`,[e.adType,e.promotion.css_class,`relative`,{"multi-ad-slide":e.slide}]]),"data-test-id":`promotions-item__root`},[e.slide?n(``,!0):(p(),s(`a`,{key:0,href:`#`,class:`ad__skip-link sidearm-skip-link skip_link_promotions`,"data-test-id":`promotions-item__skip-ad-control`,onClick:c[0]||=(...e)=>b(a)&&b(a)(...e)},`Skip Ad`)),!e.promotion.link||e.promotion.link===`#`?(p(),s(d,{key:1},[e.promotion.picture.images.length?(p(),i(l,{key:0,lazyload:e.lazyload,alt:b(o),images:e.promotion.picture.images,webp:e.webp},null,8,[`lazyload`,`alt`,`images`,`webp`])):n(``,!0)],64)):(p(),s(`a`,{key:2,href:e.promotion.link,"aria-label":b(o),title:e.promotion.hover_text??e.promotion.title,target:e.promotion.open_in_new_window?`_blank`:``,tabindex:e.tabindex,class:h([`${e.adType}__link`,{"multi-ad-slide__link":e.slide}]),"data-test-id":`promotions-item__link-control`,onFocus:c[1]||=e=>t.$emit(`focus`)},[e.promotion.picture.images.length?(p(),i(l,{key:0,lazyload:e.lazyload,alt:b(o),images:e.promotion.picture.images,webp:e.webp},null,8,[`lazyload`,`alt`,`images`,`webp`])):n(``,!0),e.promotion.open_in_new_window?(p(),s(`span`,N,`, Opens in new window`)):n(``,!0)],42,M))],2)}}},P=class{fetch;url=`/api/v2/promotions`;constructor({fetch:e}){this.fetch=e}async get(e,t){let{props:n}=e,{name:r,sport_id:i}=n,a=i||i===0?`${this.url}/${r}/${i}`:`${this.url}/${r}`;if(i==null||Number.isNaN(i))throw Error(`supportStaffId must be a valid number`);if(r==null)throw Error(`locationName cannot be null`);return this.fetch(a,{onResponse:({response:e})=>{e.status===204&&(e._data=null)}}).then(e=>e?O(e,t):null).catch(e=>(console.error(`[PromoRepo] get() mapping failed`,e),null))}async registerAdsImpressions(e){let t={adIds:e.join(`,`)};return this.fetch(`${this.url}/counter`,{params:t}).then(()=>null).catch(e=>{console.error(`[PromoRepo] registerAdsImpressions() catch() fetch failed`,e)})}},le=E(`promotions`,{state:()=>({promotions:{},isLoading:{},impressions:{queue:[],timer:null,delay:2e3}}),actions:{async fetchPromotions(e){let{fetch:t,...n}=e;if(!(e.hash in this.promotions)){this.isLoading[e.hash]=!0;let r=k().bucket,i=await new P({fetch:t}).get(n,r);i&&(this.promotions[e.hash]=i),this.isLoading[e.hash]=!1}},async registerPromotionsImpressions({componentHash:e,fetch:t}){this.impressions.queue.push(e),this.impressions.timer&&clearTimeout(this.impressions.timer);let n=setTimeout(()=>{let e=new Set;this.impressions.queue.forEach(t=>{this.promotions[t]?.campaigns?.length&&this.promotions[t]?.campaigns.forEach(t=>e.add(t.id))}),e.size>0&&new P({fetch:t}).registerAdsImpressions([...e]).then(()=>{this.impressions.queue=[]}),this.impressions.timer=null},this.impressions.delay);this.impressions.timer=n}},getters:{getPromotions:e=>t=>t in e.promotions&&e.promotions[t]?e.promotions[t]:null,getLoadingFlag:e=>t=>t in e.isLoading?e.isLoading[t]??!1:!1}}),F={count:{type:Number,required:!1,default:10},dummy:{type:Boolean,required:!1,default:!1},extra:{type:Object,required:!1,default:()=>({})},name:{type:String,required:!1,default:``},sportId:{type:String,required:!1,default:`0`},start:{type:Number,required:!1,default:0},defaultSportTitle:{type:String,required:!1}},I=({props:e,fetch:t})=>{let n=w(),r=w(),i=w(0),a=w(e.sportId),o=w(e.count??0),s=w(e.start??0),c=w(e.name),l=w(e.extra),d=k(),f=()=>D([c.value,a.value,l.value]),p=async(e,r={})=>
1{if(n.value=e,r&&Object.keys(r).length&&(l.value={...l.value,...r}),typeof n.value==`function`)return await n.value({hash:f(),props:{count:o.value,start:s.value,sport_id:a.value,name:c.value,extra:l.value},fetch:t})};return C(()=>e.sportId,e=>{a.value=e,p(n.value)}),C(()=>e.count,e=>{e!==void 0&&(o.value=e,p(n.value))}),C(()=>e.start,e=>{e!==void 0&&(s.value=e,p(n.value))}),{loadMoreCount:i,initialize:e=>{r.value=e},loadMore:async(e,n)=>{let d=e??o.value??0;i.value>0?s.value=(s.value??0)+(d??0):s.value=(s.value??0)+(o.value??0),i.value+=1;let p=0;n&&(p=document?.querySelectorAll(n)?.length??0,console.info(`[Load more focus] --> currentNumberOfItems`,p));let m=await r.value({hash:f(),props:{count:d,start:s.value,sport_id:a.value,name:c.value,extra:l.value},fetch:t});if(await u(),n&&p)try{console.info(`[Load more focus] --> Focus goes to element index`,p);let e=document?.querySelectorAll(n)?.[p];if(e&&e instanceof HTMLElement){if([`button`,`a`].includes(e.tagName.toLowerCase()))console.info(`[Load more focus] --> The container itself is a focusable element, focus goes there`),e.focus();else{console.info(`[Load more focus] --> Focus goes to the first container child`);let t=e?.querySelector(`a,button`);t&&t instanceof HTMLElement&&t.focus()}}}catch(e){console.error(`[Load more focus] --> error, focus on element not applied`,e)}return m},getComponentData:p,currentSportId:a,currentCount:o,currentStart:s,currentName:c,config:d,hash:f}},ue=e=>{let{viewport:t}=A(),n=t.breakpoint,r=t.breakpointValue(n.value),i=(e,t)=>{let n=Object.keys(e).map(Number).sort((e,t)=>e-t),r=n[0];for(let e of n)if(t>=e)r=e;else break;return r!==void 0&&r in e?e[r]??{}:{}},a=S(()=>i(e.value?.swiper_options?.breakpoints??{},r)?.slidesPerView);
1return{getBreakpointConfig:i,slideWidth:S(()=>`${100/a.value}%`)}},L=e({default:()=>H}),de={key:0,class:`promotion__container promotion__container--single`,"data-test-id":`promotions-component__root--location-type-single`},R=[`innerHTML`],z={key:2,class:`promotion__container`,"data-test-id":`promotions-component__root--location-type-icons`,role:`list`},B={key:0,class:`icon-ads__link icon-ads__link--no-url`},V={key:1,class:`icons-ad__label`},fe=[`href`,`target`,`tabindex`],pe={key:1,class:`icons-ad__label`},me={key:2,class:`sr-only`},he={key:3,class:`sr-only`},ge={key:0,class:`promotion__container promotion__container--random`,"data-test-id":`promotions-component__root--location-type-multi-effect-random`},_e={key:1,class:`promotion-container`,"data-test-id":`promotions-component__root--location-type-multi-effect-none`},ve=[`id`],H={__name:`PromotionsComponent`,props:{...F,tabindex:{type:Number,required:!1,default:0},prevIcon:{type:String,required:!1,default:`icon-arrow-left`},nextIcon:{type:String,required:!1,default:`icon-arrow-right`},webp:{type:Boolean,required:!1,default:!0},defaultStyling:{type:Boolean,required:!1,default:!1}},emits:[`loadingChange`],async setup(e,{emit:T}){let E,D,O=S(()=>{let e=X.value?.swiper_options?.navigation,t=e&&Object.keys(e).length&&typeof e==`object`;return{modules:[m,ne,_,v,f],slidesPerView:X.value?.swiper_options?.slides_per_view,navigation:t?{...e,prevEl:e.prevEl?`${e.prevEl}-${X.value?.content_id}`:`.promotion__swiper-prev`,nextEl:e.nextEl?`${e.nextEl}-${X.value?.content_id}`:`.promotion__swiper-next`}:void 0,pagination:X.value?.swiper_options?.pagination,breakpoints:X.value?.swiper_options?.breakpoints,autoplay:X.value?.swiper_options?.autoplay,watchOverflow:!0,watchSlidesProgress:!0}}),k=le(),A=w(null),{$customFetch:M}=t(),N=w({isBeginning:!0,isEnd:!1});function P(e){A.value=e,N.value.isBeginning=e.isBeginning,N.value.isEnd=e.isEnd}function F(e){N.value.isBeginning=e.isBeginning,N.value.isEnd=e.isEnd}let L=e,H=T,U=w(`icon-pause`),W=w(!0),G=w(null),K=w(null),{getComponentData:ye,hash:q}=I({props:L,fetch:M}),J=e=>{let t=document.createElement(`div`);return t.innerHTML=e,t.textContent},Y=()=>{let e=document.getElementById(`swiper-container-${X.value?.content_id}`)?.getElementsByClassName(`swiper`)?.[0];if(e!==void 0){let t=e.swiper;t&&(t.autoplay.running?(t.autoplay.stop(),U.value=`icon-play`):(t.autoplay.start(),U.value=`icon-pause`))}},be=()=>{let e=document.getElementById(`swiper-container-${X.value?.content_id}`)?.getElementsByClassName(`swiper`)[0];if(e!==void 0){let t=e.swiper;t&&t.isBeginning&&t.isEnd&&(W.value=!1)}},xe=S(()=>U.value===`icon-play`?`paused`:``),X=S(()=>k.getPromotions(q()));C(()=>X.value?.campaigns,()=>{u(()=>{A.value?.update()})},{deep:!0});let Z=S(()=>k.getLoadingFlag(q())),Q=e=>{},{slideWidth:$}=ue(X),Se=e=>e.replace(/(^|\s)\p{L}/gu,e=>e.toUpperCase());return y(()=>{let{focusOnNextElement:e}=j(K);Q=e,k.registerPromotionsImpressions({componentHash:q(),fetch:M})}),[E,D]=a(()=>ye(k.fetchPromotions)),await E,D(),C(G,()=>{be()}),C(Z,e=>{H(`loadingChange`,e)}),(t,a)=>{let u=ce,f=oe,m=se,_=ee,v=re;return!b(Z)&&b(X)?.location?.type?(p(),s(d,{key:0},[b(X).location.type===`single`&&b(X)?.single?.picture?.images?.length?(p(),s(`div`,de,[c(u,{promotion:b(X).single,tabindex:e.tabindex,webp:e.webp,adType:`single-ad`},null,8,[`promotion`,`tabindex`,`webp`])])):b(X).location.type===`html`&&b(X)?.single?.html&&!String(b(X).single.html)?.includes(`c-mbonvoy`)?(p(),s(`div`,{key:1,class:h([`ad html-ad`,b(X).single.css_class]),"data-test-id":`promotions-component__root--location-type-html`},[c(f,null,{default:r(()=>[String(b(X).single.html)?.includes(`c-mbonvoy`)?n(``,!0):(p(),s(`div`,{key:0,innerHTML:J(b(X).single.html)},null,8,R))]),_:1})],2)):b(X).location.type===`icons`?(p(),s(`div`,z,[(p(!0),s(d,null,x(b(X).campaigns,t=>(p(),s(`div`,{key:t.id,class:h([`ad icons-ad`,t.css_class]),role:`listitem`},[!t.link||t.link===`#`?(p(),s(`span`,B,[t.icon||t.css_class?(p(),i(m,{key:0,name:t.icon??t.css_class??``,"aria-hidden":`true`}
1,null,8,[`name`])):n(``,!0),t.title?(p(),s(`span`,V,g(t.title),1)):n(``,!0)])):(p(),s(`a`,{key:1,class:`icons-ad__link`,href:t.link,target:t.open_in_new_window?`_blank`:``,tabindex:e.tabindex},[t.icon||t.css_class?(p(),i(m,{key:0,name:t.icon??t.css_class??``,"aria-hidden":`true`},null,8,[`name`])):n(``,!0),t.title?(p(),s(`span`,pe,g(t.title),1)):n(``,!0),t.hover_text&&t.hover_text!==t.title?(p(),s(`span`,me,g(`, ${Se(t.hover_text)}`),1)):n(``,!0),t.open_in_new_window?(p(),s(`span`,he,`, Opens in new window`)):n(``,!0)],8,fe))],2))),128))])):b(X).location.type===`multi`?(p(),s(d,{key:3},[b(X).location.effect===`random`?(p(),s(`div`,ge,[b(X).random_single?(p(),i(u,{key:0,promotion:b(X).random_single,tabindex:e.tabindex,webp:e.webp,adType:`multi-ad`},null,8,[`promotion`,`tabindex`,`webp`])):n(``,!0)])):n(``,!0),b(X).location.effect===`none`?(p(),s(`div`,_e,[(p(!0),s(d,null,x(b(X).campaigns,t=>(p(),i(u,{key:t.id,promotion:t,tabindex:e.tabindex,webp:e.webp,adType:`multi-ad`},null,8,[`promotion`,`tabindex`,`webp`]))),128))])):n(``,!0),b(X).location.effect===`slide`&&b($)?(p(),s(`div`,{key:2,id:`swiper-container-${b(X).content_id}`,ref_key:`promotionSliderRef`,ref:K,class:h([`promotion__container promotion__container--swiper relative ad`,{"no-navigation":!b(W),"promotion__default-styling":e.defaultStyling}]),"data-test-id":`promotions-component__root--location-type-multi-effect-slide`},[l(`a`,{href:`#`,class:`ad__skip-link sidearm-skip-link`,"data-test-id":`promotions-item__skip-ad-control`,onClick:a[0]||=(...e)=>b(Q)&&b(Q)(...e),onEnter:a[1]||=(...e)=>b(Q)&&b(Q)(...e)},`Skip Ad`,32),c(v,o(b(O),{keyboard:{enabled:!0,onlyInViewport:!1},a11y:{enabled:!0},observer:!0,observeParents:!0,onSwiper:P,onSlideChange:F}),{default:r(()=>[(p(!0),s(d,null,x(b(X).campaigns,t=>(p(),i(_,{key:t.id,style:te({"min-width":b($)})},{default:r(()=>[c(u,{lazyload:!0,promotion:t,adType:`multi-ad`,tabindex:e.tabindex,webp:e.webp,slide:``},null,8,[`promotion`,`tabindex`,`webp`])]),_:2},1032,[`style`]))),128))]),_:1},16),b(X).swiper_options?.navigation&&b(W)?(p(),s(`div`,{key:0,ref_key:`promoButtonContainer`,ref:G,class:`promotion__button-container`},[l(`button`,{class:h([`promotion__swiper-prev`,`${b(X).swiper_options?.navigation&&Object.keys(b(X).swiper_options?.navigation)?.length&&typeof b(X).swiper_options.navigation==`object`?b(X).swiper_options?.navigation?.prevEl?.replace(`.`,``)??`promotion__swiper-prev`:`promotion__swiper-prev`}-${b(X).content_id}`]),type:`button`},[a[4]||=l(`span`,{class:`sr-only`},`Go to previous slide`,-1),c(m,{name:e.prevIcon,"aria-hidden":`true`},null,8,[`name`])],2),b(X).swiper_options?.pausable?(p(),s(`button`,{key:0,class:h([`promotion__swiper-pause`,b(xe)]),type:`button`,onClick:a[2]||=ae(e=>Y(),[`prevent`]),onKeyup:a[3]||=ie(e=>Y(),[`enter`])},[a[5]||=l(`span`,{class:`sr-only`},`Play/Pause rotator`,-1),c(m,{name:b(U),"aria-hidden":`true`},null,8,[`name`])],34)):n(``,!0),l(`button`,{class:h([`promotion__swiper-next`,`${b(X).swiper_options?.navigation&&Object.keys(b(X).swiper_options?.navigation)?.length&&typeof b(X).swiper_options.navigation==`object`?b(X).swiper_options?.navigation?.nextEl?.replace(`.`,``)??`promotion__swiper-next`:`promotion__swiper-next`}-${b(X).content_id}`]),type:`button`},[a[6]||=l(`span`,{class:`sr-only`},`Go to next slide`,-1),c(m,{name:e.nextIcon,"aria-hidden":`true`},null,8,[`name`])],2)],512)):n(``,!0)],10,ve)):n(``,!0)],64)):n(``,!0)],64)):n(``,!0)}}};export{I as i,H as n,F as r,L as t};

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.