PageSourceSearch

https://www.swp.de/static/assets/ChEyweaC.js

js swp.de collected 2026-09-24 08:44:47 UTC 2,385 bytes, 1 lines download raw bytes

1import z from"./mkZzzYft.js";import{_ as B}from"./CPeRe0Bd.js";import{d as x,r as l,o as C,c,j as I,af as R,v as w,e as g,f as r,F as O,l as A,i as a,t as E,g as f,w as y,_ as $,aS as q,k as P,bP as N}from"./wGaC-Zcn.js";import{S as V}from"./DEHJaEqD.js";const j={class:"splide__track"},F={class:"splide__list u-image-slider__list"},H=["textContent"],W={class:"splide__arrows u-image-slider__arrows"},D=x({__name:"ImageSlider",props:{images:{}},setup(b){const v=b,_=l(null),u=l(1),m=l(16),d=l(9),k=N(()=>window&&"ResizeObserver"in window);return C(()=>{if(!(!v?.images||v?.images?.length<=1||!_.value)){var s=new V(_.value,{pagination:!1,autoHeight:!0});if(k.value){let p=function(t,e,n){const i=t?.querySelectorAll(".u-image-slider__slide");if(i&&i?.length>0){const h=i[e].querySelector(".u-base-image__wrapper");if(typeof n=="number"){const S=i[n].querySelector(".u-base-image__wrapper");S&&o.unobserve(S)}h&&o.observe(h)}};const o=new ResizeObserver(t=>{for(const e of t)if(e.contentBoxSize){const n=e.contentBoxSize[0];d.value=n.blockSize||9,m.value=n.inlineSize||16}else d.value=e.contentRect.height||9,m.value=e.contentRect.width||16});s.on("ready",function(){u.value=1,p(s.root,0,null)}),s.on("active",function(t){const e=t.slide.querySelector("figure");e&&t.slide.parentElement&&(t.slide.parentElement.style.height=e.getBoundingClientRect().height+"px")}),s.on("move",function(t,e){u.value=t+1,p(s.root,t,e)})}s.mount()}}),(s,p)=>{const o=z,t=B,e=$;return s.images?.length===1?(c(),I(o,R(w({key:0},s.images[0])),null,16)):s.images?.length>=2?(c(),g("div",{key:1,ref_key:"sliderRef",ref:_,class:"u-image-slider__slider splide u-content-width--medium px-0"},[r("div",j,[r("ul",F,[(c(!0),g(O,null,A(s.images,(n,i)=>(c(),g("li",{class:"u-image-slider__slide splide__slide",key:i},[a(o,w({ref_for:!0},n),null,16)]))),128))])]),r("div",{class:"u-image-slider__controls",style:q(`aspect-ratio: ${f(m)}/${f(d)}`)},[r("span",{class:"u-image-slider__counter",textContent:E(`${f(u)} / ${s.images?.length}`)},null,8,H),r("div",W,[a(e,{class:"splide__arrow splide__arrow--prev",version:"primary",title:"Zurück"},{default:y(()=>[a(t,{direction:"left"})]),_:1}),a(e,{class:"splide__arrow splide__arrow--next",version:"primary",title:"Weiter"},{default:y(()=>[a(t,{direction:"right"})]),_:1})])],4)],512)):P("",!0)}}}),G=Object.assign(D,{__name:"OrganismsImageSlider"});export{G 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.