1import{d as be,u as Se,i as xe,a0 as ke,o as Ce,q as te,g as r,a1 as $e,p as ze,a2 as Ue,j as qe}from"./DlAt7rV2.js";import{_ as Me}from"./BdIM8Yja.js";import{u as Oe,_ as Te}from"./D5c1UXWz.js";import{_ as Ae,A as Ee}from"./JA8DTncW.js";import{d as Pe}from"./B-H_1WJt.js";import{_ as se}from"./DSbkVEwt.js";import{j as y,y as P,Z as Be,p as Fe,o as De,a2 as f,a5 as b,a3 as l,a6 as q,X as c,a8 as j,C as t,al as oe,a7 as ae,T as Ne,u as ie,W as Re,ai as Le,z as je}from"./DGxlnW41.js";import{g as B}from"./_CHoJ0K5.js";import{S as He,a as Ve}from"./cikaCsh0.js";import{u as We}from"./C6zcW3j7.js";import{s as Ge,u as Ke}from"./DGPC8NWJ.js";import{s as re}from"./Cjehrcwq.js";import"./BKGm1v_x.js";import"./-lj66z19.js";import"./D0XEv8Un.js";import"./CsOxpns_.js";import"./LbFrC1Lr.js";import"./CbAtIVSG.js";import"./DSxzYlsM.js";import"./Bk3DZBjq.js";import"./DsHY3dFW.js";import"./D9-i59qN.js";import"./CDMg8LQ1.js";import"./BOaQRIEw.js";import"./Bqsb4aKJ.js";import"./C8bGRPhk.js";import"./D7FfK5vn.js";const Ye={class:"d-flex mb-0-5 mb-xl-1"},Qe={class:"d-flex justify-content-md-end ml-auto"},H=1.3,V=2,Xe={__name:"CaseStudySlider",props:{headline:String,items:{type:[Object,Array],default:()=>[]}
1,caption:String,prioritizeBackground:{type:Boolean,default:!1}},setup(h){const{isDesktop:_}=We(),x=$e(),{isTouchDevice:u}=Oe(),M=h,W=y(!0),F=new Set,O={0:{h:760,w:750,q:80,fit:"fill"},768:{h:1050,w:1e3,q:80,fit:"fill"},1200:{h:1250,w:1850,q:80,fit:"fill"},1920:{h:1400,w:2e3,q:80,fit:"fill"}},G={0:{h:500,w:390,q:80,fit:"fill"},768:{h:1050,w:1e3,q:80,fit:"fill"},1200:{h:1250,w:1850,q:80,fit:"fill"},1920:{h:1400,w:2e3,q:80,fit:"fill"}},K={0:{h:Math.round(450*.6427),w:450,q:80,fit:"fill"},768:{h:Math.round(450*.578),w:450,q:80,fit:"fill"},1200:{h:Math.round(550*.641),w:550,q:80,fit:"fill"},1920:{h:Math.round(640*.641),w:640,q:80,fit:"fill"}};let D=null;const Y=e=>Array.isArray(e)?e:[],w=y(re([...Y(M.items)])),{currentIndex:ne,nextSlide:Q,prevSlide:le,activeItem:d}=Ke({items:w,confirmedIndex:y(!1)});P(()=>M.items,e=>{w.value=re([...Y(e)])},{immediate:!0});const k=()=>{clearInterval(D),D=null},C=()=>{k(),x.value!=="hidden"&&_&&!u.value&&(D=Ge(()=>{if(x.value==="hidden"){k();return}Q(!0)},4e3))},ce=()=>{C(),Q(!0)},ue=()=>{C(),le(!0)},X=Se(),{cursorVisible:S}=Be(X),de=X.$webp,{width:me}=Ue(),N=y(0),T=y(!1),g=y(!0),R=y(!1),$=y(null),pe=(e,s=1)=>{let o="?";return Object.entries(e).forEach(([a,n])=>{const m=["h","w"].includes(a)?Math.round(n*s):n;o+=`${a}=${m}&`}),o},A=(e,s,o=1)=>{if(!e)return null;const a=me.value||0,n=Object.keys(s).map(Number).sort((v,p)=>v-p).reduce((v,p)=>a>=p?p:v,0),m=s[n]||s[0];return ze({image:e,key:null,size:pe(m,o),webpSupported:de})},z=e=>r(e,"caseStudy"),L=e=>r(e,"backgroundImage"),Z=e=>r(z(e),"title"),J=e=>{const s=r(z(e),"sector");return r(s,"color")||"black"},ee=e=>{const s=r(z(e||d.value),"sector");return r(s,"title")},fe=je(()=>{if(!W.value)return[];const e=w.value||[];if(!e.length)return[];const s=_&&!u.value?O:G,o=_&&!u.value?H:V,a=[];return e.forEach(n=>{const m=te(n),v=L(n),p=r(n,"cardImage"),U=A(v,s),I=A(v,s,o),i=A(p,K),E=A(p,K,o);U&&a.push({key:`case-study-bg-${m}`,href:U,srcset:I?`${U} 1x, ${I} 2x`:void 0,fetchpriority:"high"}),i&&a.push({key:`case-study-card-${m}`,href:i,srcset:E?`${i} 1x, ${E} 2x`:void 0,fetchpriority:"high"})}),a}),he=e=>{if(!e?.href)return;const s=e.srcset?`${e.href}::${e.srcset}`:e.href;if(F.has(s))return;F.add(s);const o=new Image;e.fetchpriority&&"fetchPriority"in o&&(o.fetchPriority=e.fetchpriority),o.decoding="async",e.srcset&&(o.srcset=e.srcset),o.src=e.href};P(fe,e=>{e.forEach(he)},{immediate:!0});const ge=e=>{N.value=e.realIndex},ve=e=>{$.value=e},ye=()=>{R.value=!0,S.value=!1,k()},_e=()=>{R.value=!1,S.value=!0,C()};Fe(()=>{_&&!u.value&&C()}),De(()=>{S.value=!1,k(),setTimeout(()=>{S.value=!1},1e3)}),P(x,e=>{e==="hidden"?(k(),$.value?.autoplay&&$.value.autoplay.stop()):e==="visible"&&(R.value||(_&&!u.value&&C(),$.value?.autoplay&&$.value.autoplay.start()))}),P(ne,(e,s)=>{e==w.value.length-1&&s==0?g.value=!1:e>s||e==0&&s==w.value.length-1?g.value=!0:g.value=!1});const we=(e,s)=>{T.value=!0;const o=g.value?100:-100,a=g.value?"left center":"right center";B.from(e,{xPercent:o,duration:1.4,delay:.1,transformOrigin:a,ease:"Power3.easeInOut"}),B.from(e.querySelector(".case-study-card"),{xPercent:o,rotation:15,duration:1.4,delay:.1,ease:"Power3.easeInOut",onComplete:s})},Ie=(e,s)=>{e.classList.add("transitioning-out");const o=g.value?-100:100,a=g.value?"right center":"left center";B.to(e,{xPercent:o/2,duration:1.4,delay:.1,transformOrigin:a,ease:"Power3.easeInOut"}),B.to(e.querySelector(".case-study-card"),{xPercent:o,rotation:-15,duration:1.4,delay:.1,ease:"Power3.easeInOut",onComplete:()=>{T.value=!1,s()}})};return(e,s)=>{const o=ke,a=xe,n=Me,m=Te,v=Ae,p=Ce,U=Pe;return f(),b(U,{class:"case-study-slider px-1 px-md-0-875 px-xl-2-25 position-relative"},{default:l(({addToTimeline:I})=>[q("header",Ye,[c(a,{preset:"fadeUp",onUpdated:I,to:{delay:.2},class:"col col-md-11"},{default:l(()=>[c(o,{class:"case-study-headline bold text-uppercase lh-1 ls-02",tag:"h1",text:h.headline},null,8,["text"])]),_:1},8,["onUpdated"]),q("div",Qe,[c(a,{preset:"fadeUp",onUpdated:I,to:{delay:.25},class:"case-study-caption bold text-uppercase lh-09 gc16-2 p2-md gc13-2-xl"},{default:l(()=>[h.caption?(f(),b(o,{key:0,innerHTML:h.caption},null,8,["innerHTML"])):j("",!0)]),_:1},8,["onUpdated"])])]),c(p,null,{default:l(()=>
1[h.items&&e.$device.isDesktop&&!t(u)?(f(),b(a,{key:0,preset:"fadeUp",onUpdated:I,to:{delay:.3},onMouseenter:s[0]||(s[0]=i=>S.value=!0),onMouseleave:s[1]||(s[1]=i=>S.value=!1),class:"slider position-relative overflow-hidden"},{default:l(()=>[q("div",{class:ae(["position-absolute w-50 t-0 l-0 h-100 z-1",t(T)?"disabled":"enabled"]),onClick:oe(ue,["prevent"])},null,2),q("div",{class:ae([t(T)?"disabled":"enabled","position-absolute w-50 t-0 r-0 h-100 z-1"]),onClick:oe(ce,["prevent"])},null,2),c(Ne,{onEnter:we,onLeave:Ie,css:!1},{default:l(()=>[(f(),ie("div",{key:("getCmsId"in e?e.getCmsId:t(te))(t(d)),class:"slide position-relative d-flex flex-center disabled z-2"},[c(n,{imageSizes:O,class:"case-picture disabled",loading:"eager","fetch-priority":"high",x2ratio:H,fill:!0,hideAlt:!0,image:L(t(d))},null,8,["image"]),q("div",{onMouseenter:ye,onMouseleave:_e},[c(m,{title:Z(t(d)),text:("getCmsField"in e?e.getCmsField:t(r))(t(d),"content"),color:J(t(d)),image:("getCmsField"in e?e.getCmsField:t(r))(t(d),"cardImage"),"image-density-ratio":H,"prioritize-image":!0,url:("useResolveUrl"in e?e.useResolveUrl:t(se))(z(t(d))),item:t(d),buttonText:ee()},null,8,["title","text","color","image","url","item","buttonText"])],32)]))]),_:1})]),_:1},8,["onUpdated"])):j("",!0),h.items&&(!e.$device.isDesktop||t(u))?(f(),b(a,{key:1,preset:"fadeUp",onUpdated:I,to:{delay:.25},class:"position-relative overflow-hidden"},{default:l(()=>[c(v,{from:{scale:1,opacity:0,duration:1},to:{scale:1,opacity:1,duration:1,ease:"Power2.easeOut"},leave_to:{opacity:0,scale:1,duration:1,ease:"Power2.easeIn"}},{default:l(()=>[(f(),b(n,{key:t(N),imageSizes:G,class:"case-picture disabled slide-bgimg position-absolute t-0 l-0 w-100 h-100",loading:"eager","fetch-priority":"high",x2ratio:V,fill:!0,hideAlt:!0,image:L(t(w)[t(N)])},null,8,["image"]))]),_:1}),c(t(He),{onSwiper:ve,onSlideChange:ge,modules:[t(Ee)],autoplay:{delay:4e3,disableOnInteraction:!1},loop:!0,class:"t-0 z-2"},{default:l(()=>[(f(!0),ie(Re,null,Le(t(w),(i,E)=>(f(),b(t(Ve),{class:"swiper-slide overflow-hidden",key:E},{default:l(()=>[c(m,{title:Z(i),text:("getCmsField"in e?e.getCmsField:t(r))(i,"content"),color:J(i),image:("getCmsField"in e?e.getCmsField:t(r))(i,"cardImage"),"image-density-ratio":V,"prioritize-image":!0,url:("useResolveUrl"in e?e.useResolveUrl:t(se))(z(i)),buttonText:ee(i)},null,8,["title","text","color","image","url","buttonText"])]),_:2},1024))),128))]),_:1},8,["modules"])]),_:1},8,["onUpdated"])):j("",!0)]),_:2},1024)]),_:1})}}},Ze=be(Xe,[["__scopeId","data-v-d822de27"]]),Ct={__name:"cms",props:{data:{type:Object,required:!0}},setup(h){const _=h,{slides:x,headline:u,caption:M}=qe(_.data);return(W,F)=>{const O=Ze;return f(),b(O,{items:t(x),headline:t(u),caption:t(M)},null,8,["items","headline","caption"])}}};export{Ct as default};
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.