1import{g as i}from"./lodash-86ed0c75.js";import{_ as q,a6 as N,a7 as G,K as T,O as K,j as A,X as H,a as J,a3 as R,a8 as U,e as X}from"./index-a0a0e1a1.js";import Q from"./FullScreenOverlay-37448887.js";import{f as e,D as l,E as d,J as g,G as L,P as n,F,a0 as Y,r as w,K as V,S as B,U as E,O as z,a8 as Z,I as P,a as ee,c4 as te,u as x}from"./vendor-a0789617.js";import"./axios-bb6ee5b8.js";import"./vee-validate-daa3561c.js";import"./swiper-ade697ba.js";import"./index-418555d9.js";import"./IconCircleCrossStroke-952d536b.js";/*! @license Third-party license notices: /dist/velux-marketing/client/THIRD_PARTY_NOTICES.txt */const ae={key:0,class:"aspect-w-16 aspect-h-9 overflow-hidden"},le=["src","data-id"],ie={__name:"DaylightEffectOverlayMedia",props:{image:{type:Object,required:!0},isShowVideo:{type:Boolean,required:!0},categoryVideoDataId:{type:String,default:""},categoryImageDataId:{type:String,default:""},categoryDataIdIndex:{type:Number,default:0}},setup(t){const o=t,p=e(()=>i(o,"image.fields['Category image']")),r=e(()=>i(p,"value")),b=e(()=>i(o,"image.fields['Category video']")),y=e(()=>i(b.value,"value")),c=e(()=>o.isShowVideo&&y.value),u=e(()=>y.value+N.hidePanelForVideoFrames||"");return(m,h)=>c.value?(l(),d("div",ae,[g(G,null,{default:L(()=>[n("iframe",{class:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full",allowfullscreen:"",allow:"autoplay",frameborder:"0",loading:"lazy",scrolling:"no",src:u.value,"data-id":`${t.categoryVideoDataId}-${t.categoryDataIdIndex}`},null,8,le)]),_:1})])):(l(),F(T,{key:1,media:r.value,"mobile-ratio":"16/9","desktop-ratio":"16/9",width:"960","data-id":`${t.categoryImageDataId}-${t.categoryDataIdIndex}`},null,8,["media","data-id"]))}},oe=q(ie,[["__scopeId","data-v-cb21233f"]]),se={key:0,class:"w-full h-full grid place-items-center old_md:place-items-start old_md:justify-center old_md:mt-24"},de={class:"flex flex-col gap-y-5 items-center"},ne={class:"aspect-w-16 aspect-h-9"},re={key:0},ce=["data-id","onClick"],ue=["data-id"],fe=Y({__name:"DaylightEffectOverlay",props:{images:{},isShowVideo:{type:Boolean,default:!1},mediaLabelDataId:{default:""},categoryVideoDataId:{default:""},categoryImageDataId:{default:""},pillTextDataId:{default:""}},setup(t){const o=K(),{orientation:p}=A(),r=t,{windowText:b,windowsText:y}=o.productLabels,c=w(Math.floor(r.images.length)),u=w(0),m=w(null),h=w(null),_=e(()=>i(r,`images[${u.value}].fields.["Media label"].value`)||""),I=e(()=>{if(!h.value)return;const a=parseInt(getComputedStyle(m.value,null).getPropertyValue("padding-left")),s=h.value[u.value],f=2,M=2,W=s.offsetWidth+a*f+M,j=s.offsetLeft-a;return{width:`${W}px`,left:`${j}px`}}),$=e(()=>r.images.some(a=>(i(a,'fields.["Category image"].value.src')||"").length)),O=e(()=>p.value==="landscape"?"w-[70vw]":"w-[70vh]"),S=a=>a===1?b:y,v=a=>{const D=i(r,`images[${a-1}].fields.["Pill text"].value`)||"";if(D.length)return D;if(!D.length){const s=S(a);return`${a} ${s} `}},k=a=>{u.value=a},C=a=>u.value===a-1;return(a,D)=>$.value?(l(),d("div",se,[n("div",de,[n("div",{class:V(["max-w-[560px] old_md:max-w-[960px]",O.value])},[n("div",ne,[(l(!0),d(B,null,E(t.images,(s,f)=>(l(),d("div",{key:f,class:V(["absolute top-0 left-0 w-full transition",{"opacity-100":C(f+1),"opacity-0":!C(f+1)}])},[g(oe,{image:s,"is-show-video":t.isShowVideo,"category-video-data-id":t.categoryVideoDataId,"category-image-data-id":t.categoryImageDataId,"category-data-id-index":f+1},null,8,["image","is-show-video","category-video-data-id","category-image-data-id","category-data-id-index"])],2))),128)),t.isShowVideo?P("",!0):(l(),d("div",re,[n("div",{ref_key:"imagePillContainer",ref:m,class:"absolute left-1/2 -translate-x-1/2 flex gap-x-8 bg-old_velux-grey-300 h-8 px-4 rounded-full bottom-8 text-13"},[(l(!0),d(B,null,E(c.value,(s,f)=>(l(),d("div",{ref_for:!0,ref_key:"imagePill",ref:h,key:s,class:V(["cursor-pointer h-full items-center flex transition-colors duration-150 z-10 whitespace-nowrap",[C(s)?"text-old_velux-white":"text-old_velux-black "]]),"data-id":`${t.pillTextDataId}-${f+1}`,onClick:M=>k(s-1)},z(v(s)),11,ce))),128)),n("div",{class:"absolute top-0 left-0 h-full bg-old_velux-black rounded-full transition-[left] duration-150",style:Z(I.value)},null,4)],512)]))])],2),n("p",{class:"text-center px-5","data-id":t.mediaLabelDataId},z(_.value),9,ue)])])):P("",!0)}}),ge=["data-section-name"],me={key:0},ve={class:"top-0 left-0 right-0 bottom-0"},pe={key:0,class:"absolute top-0 right-0 w-1/2 h-full"},Se={__name:"DaylightEffect",props:{rendering:{type:Object,required:!0}},setup(t){const o=t,p=H(),{renderingIndex:r}=J(),b=e(()=>i(o,"rendering.uid")||""),y=e(()=>i(o,"rendering.fields[Button text]")),c=w(!1);ee(()=>{const k=setInterval(()=>{typeof document>"u"||document.querySelector("#daylight-effect")&&(c.value=!0,clearInterval(k))},10)});const u=e(()=>c.value?"#daylight-effect":"#teleported"),m=e(()=>i(o,"rendering.fields[Show video].value")),h=e(()=>m.value?"w-full":"w-1/2"),_=w(!1);function I(){_.value=!_.value,_.value?p.disableScroll():p.enableScroll()}const $=e(()=>i(o,"rendering.fields[Media items]")),O=$.value?.length-1||0,S=e(()=>i($,`value[${O}].fields.["Category image"]`)||{}),{getDataId:v}=R(o.rendering);return(k,C)=>(l(),d("div",{"data-section-name":x(r)(b.value).id},[(l(),F(te,{to:u.value,disabled:!c.value},[c.value?(l(),d("div",me,[n("div",{class:"aspect-w-16 aspect-h-9 mb-4 cursor-pointer",onClick:I},[n("div",ve,[n("div",{class:V(["absolute top-0 left-0 h-full",h.value])},[g(T,{class:"h-full",media:S.value,position:"left","desktop-ratio":"16/9","mobile-ratio":"16/9",width:"438"},null,8,["media"])],2),m.value?P("",!0):(l(),d("div",pe,[g(T,{class:"h-full",media:S.value,position:"right",width:"438"},null,8,["media"])]))])]),g(U,{small:"",secondary:"","full-width":"",onHandleClick:I},{default:L(()=>[g(X,{"data-id":x(v)("GoButtonText"),field:y.value},null,8,["data-id","field"])]),_:1}),g(Q,{visible:_.value,"rotate-mobile-landscape":"",onCloseOverlay:I},{component:L(()=>
1[g(fe,{images:$.value,"is-show-video":m.value,"media-label-data-id":x(v)("MediaLabel"),"category-video-data-id":x(v)("CategoryVideo"),"category-image-data-id":x(v)("CategoryImage"),"pill-text-data-id":x(v)("PillText")},null,8,["images","is-show-video","media-label-data-id","category-video-data-id","category-image-data-id","pill-text-data-id"])]),_:1},8,["visible"])])):P("",!0)],8,["to","disabled"]))],8,ge))}};export{Se 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.