1import{s as ce}from"./DHAeczLT.js";import{J as oe,Q as ie,N as se,ai as re,af as de,o as h,b as y,n as z,h as $,e as R,w as J,F as Q,r as G,b0 as ue,u as x,d as O,a as K,c as fe,t as ne,v as te,ab as ae,f as he}from"./CO3rmisD.js";import{_ as ye}from"./Cb5Zzlfc.js";import"./LcFuntGO.js";try{let f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},w=new f.Error().stack;w&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[w]="0f9289db-e643-43ca-a37a-58c3ac6e7288",f._sentryDebugIdIdentifier="sentry-dbid-0f9289db-e643-43ca-a37a-58c3ac6e7288")}catch{}const ge={__name:"Typewriter",props:{content:{type:String,default:""},speed:{type:Number,default:28},cursor:{type:Boolean,default:!0},loop:{type:Boolean,default:!1},startDelay:{type:Number,default:0},removeShadow:{type:Boolean,default:!1}},emits:["done"],setup(f,{emit:w}){const u=f,p=w,v=$(null),P=$(!1);let a=[],T=[],N=0,A=0,S=null,E=null,_=null,C=!1,U=!1,r=null,b=null,H=!0;function j(){E&&(clearTimeout(E),E=null),S&&(cancelAnimationFrame(S),S=null),_&&(_.disconnect(),_=null),b&&(clearInterval(b),b=null)}ie(()=>{U=!0,j(),r&&r.parentNode&&r.parentNode.removeChild(r)});
1function M(t,n=[]){if(t.nodeType===3)n.push(t);else if(t.nodeType===1)for(const o of t.childNodes)M(o,n);return n}function W(){if(u.cursor)return r||(r=document.createElement("span"),r.className="c-typewriter-html__cursor",r.setAttribute("aria-hidden","true"),r.textContent="|",Object.assign(r.style,{display:"inline-block",marginLeft:"2px",verticalAlign:"baseline",transition:"opacity 0.1s linear"})),r}function i(){if(!u.cursor)return;b&&clearInterval(b),H=!0,r&&(r.style.opacity="1");const n=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?1200:900;b=ce(()=>{H=!H,r&&(r.style.opacity=H?"1":"0")},n/2)}function s(){b&&(clearInterval(b),b=null),r&&(r.style.opacity="1")}function m(t){if(!u.cursor||P.value)return;const n=a[t];if(!n||!n.parentNode)return;const o=W();n.parentNode.insertBefore(o,n.nextSibling)}function g(){if(v.value.innerHTML=u.content||"",a=M(v.value),T=a.map(t=>t.nodeValue??""),N=T.reduce((t,n)=>t+n.length,0),A=0,P.value=!1,a.forEach(t=>{t.nodeValue=""}),u.cursor){const t=W(),n=a[0];n&&n.parentNode?n.parentNode.insertBefore(t,n.nextSibling):v.value.appendChild(t),i()}}function B(t){let n=t,o=0;for(let d=0;d<a.length;d++){const I=T[d];if(n<=0){a[d].nodeValue="";continue}n>=I.length?(a[d].nodeValue=I,n-=I.length,o=d):(a[d].nodeValue=I.slice(0,n),n=0,o=d)}return o}function e(){if(!U)if(A<N){A++;const t=B(A);m(t),E=setTimeout(()=>{S=requestAnimationFrame(e)},u.speed)}else u.loop?E=setTimeout(()=>{a.forEach(t=>t.nodeValue=""),A=0,u.cursor&&a.length&&m(0),S=requestAnimationFrame(e)},1200):(P.value=!0,s(),r&&r.parentNode&&r.parentNode.removeChild(r),p("done"))}function c(){return v.value?v.value.closest(".c-dynamic-top-section__promo"):null}function V(t){if(!t)return!1;const n=t.getBoundingClientRect(),o=n.width>0&&n.height>0&&n.bottom>0&&n.right>0&&n.left<window.innerWidth&&n.top<window.innerHeight,d=getComputedStyle(t),I=parseFloat(d.opacity||"1")>.5;return o&&I}function L(){U||C||(C=!0,E=setTimeout(()=>{S=requestAnimationFrame(e)},Math.max(0,u.startDelay)))}function F(){const t=c()||v.value,n=o=>{((o==null?void 0:o.animationName)||"").toLowerCase().includes("fadein")&&!C&&(t.removeEventListener("animationstart",n,!0),L())};t.addEventListener("animationstart",n,!0),_=new IntersectionObserver(o=>{const d=o[0];d!=null&&d.isIntersecting&&V(t)&&!C&&(t.removeEventListener("animationstart",n,!0),_.disconnect(),L())},{threshold:.2}),_.observe(t),setTimeout(()=>{!C&&V(t)&&(t.removeEventListener("animationstart",n,!0),_&&_.disconnect(),L())},50)}return se(async()=>{await re(),g(),F()}),de(()=>u.content,()=>{j(),C=!1,v.value&&(r&&r.parentNode&&r.parentNode.removeChild(r),r=null,g(),F())}),(t,n)=>(h(),y("div",{class:z(["c-typewriter-html",f.removeShadow?"-remove-shadow":""]),ref_key:"rootEl",ref:v},null,2))}},ve=oe(ge,[["__scopeId","data-v-01f50ae2"]]),me=["id"],_e=["page","externalUrl","target","anchor","onAnimationstart"],be=["src"],we=["autoplay","loop","poster"],pe=["src"],xe=["src","type"],Te=["src"],Ve={key:2,class:"mx-auto c-dynamic-top-section__image-placeholder"},Ie={key:3,class:"c-dynamic-top-section__text u-intro-text"},Ne=["innerHTML"],Se={key:0,class:"c-dynamic-top-section__quicklinks"},He={__name:"DynamicTop",props:{promoPool:{required:!1,type:Object},quicklinks:{required:!1,type:Object},id:{required:!1,type:String}},setup(f){const w=f,u=[];if(w.promoPool&&Array.isArray(w.promoPool)&&w.promoPool.length>0){const i=Math.floor(Math.random()*w.promoPool.length);u.push(w.promoPool[i])}const p=he(),v=p.public.brand,P=$({}),a=$({}),T=$({});let N;function A(i,s){i?a.value[s]=i:delete a.value[s]}function S(i,s){i?T.value[s]=i:delete T.value[s]}function E(i){if(!i)return!1;const s=window.getComputedStyle(i);return s.display!=="none"&&s.visibility!=="hidden"&&Number(s.opacity)>.01}function _(i){const s=T.value[i];if(!s)return;const m=s.play();m&&m.catch(()=>{})}function C(i){const s=T.value[i];s&&s.pause()}function U(i){var m;return(((m=u[0])==null?void 0:m.promoSlide)||[]).length===1?i===0:i===1}function r(){Object.entries(T.value).forEach(([i])=>{const s=Number(i);E(a.value[s])?_(s):C(s)})}function b(){N&&window.clearTimeout(N),N=window.setTimeout(r)}function H(i,s){i.animationName==="fadeIn"&&_(s)}function j(){b()}se(async()=>{await re(),r()}),ie(()=>{N&&window.clearTimeout(N)});function M(i){if(!i)return{headline:"",body:""};const s=document.createElement("div");s.innerHTML=i;const m=["H1","H2","H3","H4","H5","H6"];let g=null;for(const c of Array.from(s.childNodes))if(c.nodeType===1&&m.includes(c.nodeName)){g=c;break}if(!g)for(const c of Array.from(s.childNodes)){if(c.nodeType===1&&["P","DIV","LI","SPAN"].includes(c.nodeName)){g=c;break}if(c.nodeType===3&&c.nodeValue.trim()){const V=document.createElement("p");V.textContent=c.nodeValue,c.replaceWith(V),g=V;break}}if(!g)return{headline:"",body:i};const B=g.outerHTML;g.remove();const e=s.innerHTML;return{headline:B,body:e}}function W(i){if(!i)return"video/mp4";switch(i.replace(".","").toLowerCase()){case"webm":return"video/webm";case"mp4":return"video/mp4";case"ogg":return"video/ogg";default:return"video/mp4"}}return(i,s)=>{const m=ve,g=ye,B=ae;return h(),y("div",{class:"c-dynamic-top-section",id:f.id?"anchor-"+f.id:void 0},[R(B,null,{default:J(()=>[u.length>0?(h(!0),y(Q,{key:0},G(u[0].promoSlide,(e,c)=>{var V,L,F,t,n,o,d,I,X,Y,Z,q,k,D,ee;return h(),y("div",{key:(e==null?void 0:e.id)||c,ref_for:!0,ref:l=>A(l,c),class:z(["c-dynamic-top-section__promo no-underline container mx-auto",{"-remove-shadow":e==null?void 0:e.removeShadow,"-single-slide":u[0].promoSlide.length===1}]),page:(V=e==null?void 0:e.link)==null?void 0:V[`${x(v)}_page`],externalUrl:(L=e==null?void 0:e.link)==null?void 0:L.externalUrl,target:(F=e==null?void 0:e.link)==null?void 0:F.target,anchor:(t=e==null?void 0:e.link)==null?void 0:t.anchor,style:ue("--backgrund-image: url("+x(p).public.mediaUrl+((n=e==null?void 0:e.backgroundImage)==null?void 0:n.hash)+((o=e==null?void 0:e.backgroundImage)==null?void 0:o.ext)+");--backgrund-image-mobile: url("+x(p).public.mediaUrl+((d=e==null?void 0:e.backgroundImageMobile)==null?void 0:d.hash)+((I=e==null?void 0:e.backgroundImageMobile)==null?void 0:I.ext)+");"),onAnimationstart:l=>H(l,c),onAnimationend:j},[e!=null&&e.promoImage?(h(),y("img",{key:0,width:"530",height:"339",class:"m-auto c-dynamic-top-section__image",src:x(p).public.mediaUrl+((X=e==null?void 0:e.promoImage)==null?void 0:X.hash)+((Y=e==null?void 0:e.promoImage)==null?void 0:Y.ext)},null,8,be)):e!=null&&e.promoVideo?(h(),y("video",{key:1,ref_for:!0,ref:l=>S(l,c),class:"m-auto c-dynamic-top-section__image",width:"600",height:"600",autoplay:U(c),loop:!(e!=null&&e.removeVideoLoop),muted:"",playsinline:"",preload:"metadata",poster:e!=null&&e.promoImage?x(p).public.mediaUrl+e.promoImage.hash+e.promoImage.ext:null},[e!=null&&e.promoVideoHevc?(h(),y("source",{key:0,src:x(p).public.mediaUrl+((Z=e==null?void 0:e.promoVideoHevc)==null?void 0:Z.hash)+((q=e==null?void 0:e.promoVideoHevc)==null?void 0:q.ext),type:'video/mp4; codecs="hvc1"'},null,8,pe)):O("",!0),K("source",{src:x(p).public.mediaUrl+((k=e==null?void 0:e.promoVideo)==null?void 0:k.hash)+((D=e==null?void 0:e.promoVideo)==null?void 0:D.ext),type:W((ee=e==null?void 0:e.promoVideo)==null?void 0:ee.ext)},null,8,xe),e!=null&&e.promoImage?(h(),y("img",{key:1,src:x(p).public.mediaUrl+e.promoImage.hash+e.promoImage.ext,width:"530",height:"339"},null,8,Te)):O("",!0)],8,we)):(h(),y("div",Ve,"Â ")),e.text?(h(),y("div",Ie,[R(m,{content:M(e.text).headline,speed:28,cursor:!0,loop:!1,startDelay:c===0?1e3:1500,removeShadow:(e==null?void 0:e.removeShadow)||!1,onDone:l=>P.value[c]=!0},null,8,["content","startDelay","removeShadow","onDone"]),K("div",{class:z(["c-dynamic-top-section__body",{"is-visible":P.value[c]}]),innerHTML:M(e.text).body}
1,null,10,Ne),K("div",{class:z(["c-dynamic-top-section__buttons flex gap-lg flex-wrap",{"is-visible":P.value[c]}])},[(h(!0),y(Q,null,G(e==null?void 0:e.link,(l,le)=>(h(),fe(g,{key:(l==null?void 0:l.id)||le,class:"mt-2xl c-dynamic-top-section__button",variation:"button",page:l==null?void 0:l[`${x(v)}_page`],externalUrl:l==null?void 0:l.externalUrl,target:l==null?void 0:l.target,anchor:l==null?void 0:l.anchor,color:l==null?void 0:l.color},{default:J(()=>[ne(te(l==null?void 0:l.text),1)]),_:2},1032,["page","externalUrl","target","anchor","color"]))),128))],2)])):O("",!0)],46,_e)}),128)):O("",!0)]),_:1}),f.quicklinks.length>0?(h(),y("ul",Se,[(h(!0),y(Q,null,G(f.quicklinks,e=>(h(),y("li",{key:e.id},[R(g,{variation:"button",color:e==null?void 0:e.color,page:e==null?void 0:e[`${x(v)}_page`],externalUrl:e.externalUrl,target:e.target,anchor:e.anchor},{default:J(()=>[ne(te(e.text),1)]),_:2},1032,["color","page","externalUrl","target","anchor"])]))),128))])):O("",!0)],8,me)}}};export{He 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.