1import{d as C,L as M,v as h,M as x,e as v,x as o,f as y,N as f,l as m,m as k,o as w}from"./DOfMt3Vg.js";const B=["id"],I=["id"],g=C({__name:"BaseTrackSlider",props:{itemsCount:{},trackId:{},wrapClass:{default:"route-slider-wrap"},trackClass:{default:"route-track"},gap:{default:20},autoplayMs:{default:0},visibleDesktop:{default:3},visibleTablet:{default:2},visibleMobile:{default:1}},setup(a,{expose:b}){const t=a,l=m(null),e=m(0);let r=null;const d=k(()=>window.innerWidth<640?t.visibleMobile:window.innerWidth<1060?t.visibleTablet:t.visibleDesktop),i=k(()=>Math.max(0,t.itemsCount-d.value)),s=()=>{const n=l.value?.children[0];if(!(n instanceof HTMLElement)||!l.value)return;e.value=Math.min(e.value,i.value);const u=n.getBoundingClientRect().width+t.gap;l.value.style.transform=`translateX(${-e.value*u}px)`},p=()=>{e.value=Math.max(0,e.value-1),s()},c=()=>{e.value=e.value>=i.value?0:e.value+1,s()};return M(async()=>{await h(),s(),window.addEventListener("resize",s),t.autoplayMs>0&&(r=window.setInterval(c,t.autoplayMs))}),x(()=>{window.removeEventListener("resize",s),r!==null&&window.clearInterval(r)}),b({goPrev:p,goNext:c,render:s,currentIndex:e,visibleItems:d,maxIndex:i}),(n,u)=>a.wrapClass?(w(),v("div",{key:0,class:o(a.wrapClass)},[y("div",{id:a.trackId,ref_key:"trackElement",ref:l,class:o(a.trackClass)},[f(n.$slots,"default")],10,B)],2)):(w(),v("div",{key:1,id:a.trackId,ref_key:"trackElement",ref:l,class:o(a.trackClass)},[f(n.$slots,"default")],10,I))}}),T=Object.assign(g,{__name:"BaseTrackSlider"});export{T as B};
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.