1import{aE as M,E as l,ax as g,aF as h,a2 as x,s as b,c as d,f as w,u as s,d as n,a as y,F as k,x as v,av as F}from"./OIgKrfzE.js";const B={key:0},D=["media","srcset"],A=["alt","src"],I={__name:"MediaResponsiveImage",props:{nameDesktop:{type:String,default:"image_desktop"},nameMobile:{type:String,default:"image_mobile"},mediaFiles:{type:[Object,Array],required:!0},height:{type:Number,default:null},preset:{type:String,default:"default"},preload:{type:Boolean,default:!1},imgAttrs:{type:Object,default:null}},setup(o){const a=o,f=M(),u=l(()=>({imageDesktop:g(h(a.mediaFiles,a.nameDesktop,[])),imageMobile:g(h(a.mediaFiles,a.nameMobile,[]))})),_=l(()=>{const e=x(u);return e.imageMobile?i(640,e.imageMobile.url):i(640)}),t=l(()=>({sm:_.value,md:i(768),lg:i(1024),xl:i()}));function i(e,c){return f(c||r.value.url,{width:e,height:a.height},{preset:a.preset})}const r=l(()=>{const e=x(u);return e.imageDesktop||e.imageMobile}),p=l(()=>[{url:t.value.xl,media:"(min-width: 1024px)",preloadMedia:"(min-width: 1024px)"},{url:t.value.lg,media:"(min-width: 768px)",preloadMedia:"(min-width: 768px and max-width: 1023px)"},{url:t.value.md,media:"(min-width: 500px)",preloadMedia:"(min-width: 500px and max-width: 767px)"},{url:t.value.sm,media:"(min-width: 0px)",preloadMedia:"(min-width: 0px and max-width: 499px)"}]);return a.preload&&b(()=>({link:p.value.map(e=>({rel:"preload",href:e.url,as:"image",media:e.preloadMedia}))})),(e,c)=>s(r)?(n(),d("picture",B,[(n(!0),d(k,null,v(s(p),m=>(n(),d("source",{key:m.media,media:m.media,srcset:m.url,type:"image/webp"},null,8,D))),128)),y("img",F({alt:s(r).alt_attribute,src:s(t).sm},o.imgAttrs),null,16,A)])):w("",!0)}};export{I as _};
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.