PageSourceSearch

https://www.poda.cz/business/_astro/ScrollingFeatureSection.astro_astro_type_script_index_0_lang.DsoTb4b-.js

js poda.cz collected 2026-10-04 13:26:02 UTC 5,283 bytes, 1 lines download raw bytes

1import{b as P}from"./breakpoints.CCZpTrDJ.js";const u={observer:{rootMargin:"-20% 0px -20% 0px",threshold:[0,.3,.7,1]},container:{rootMargin:"0px",threshold:[0,1]},scrollTolerance:{top:50,bottom:50,containerOffset:100},lgBreakpoint:parseInt(P.lg.value,10)},r={FULLY_VISIBLE:1,DIMMED:.2,BOUNDARY_ENHANCED:.7,INTERSECTION_MULTIPLIER:.6,BASE_OPACITY_OFFSET:.2,SECTION_SWITCH_THRESHOLD:.3,SECTION_SWITCH_ADVANTAGE:.15,LOW_VISIBILITY_THRESHOLD:.25};function A(){const S=document.querySelector("[data-feature-list]"),I=document.querySelectorAll("[data-feature-image]"),a=document.querySelectorAll("[data-feature-item]");if(!S||!I.length||!a.length){console.warn("ScrollingFeatureSection: Required elements not found");return}const m=Math.min(a.length,I.length);if(m===0){console.warn("ScrollingFeatureSection: No matching features and images found");return}const v=(()=>{const e=S.getBoundingClientRect(),i=window.innerHeight;if(e.bottom<0)return m-1;if(e.top>i)return 0;let n=0,o=0;return Array.from(a).forEach((l,c)=>{const s=l.getBoundingClientRect(),d=Math.max(0,s.top),f=Math.min(i,s.bottom),E=Math.max(0,f-d)*s.width;E>n&&(n=E,o=c)}),o})(),O=()=>Array.from(a).map(e=>{const i=Array.from(e.querySelectorAll("mark"));return i.forEach(n=>{const o=n.offsetWidth;n.style.setProperty("--mark-width",`${String(o)}px`)}),i}),t={activeSection:v,activeImage:v,sectionRatios:new Array(m).fill(0).map((e,i)=>i===v?1:0),container:{isAbove:!1,isBelow:!1,isIntersecting:!0},isEnabled:!1,observers:[],sectionMarks:O(),animatedMarks:new Set,rafId:null,lastOpacities:new Array(m).fill(-1)},C=()=>window.innerWidth>u.lgBreakpoint,b=()=>{const e=S.getBoundingClientRect(),{scrollY:i,innerHeight:n}=window,o=document.documentElement.scrollHeight;return{isAtTop:i<=u.scrollTolerance.top,isAtBottom:i+n>=o-u.scrollTolerance.bottom,isContainerAtTop:e.top>=-100,isContainerAtBottom:e.bottom<=n+u.scrollTolerance.containerOffset}},M=()=>{[...Array.from(I),...Array.from(a)].forEach(e=>{e.style.opacity="1"}),t.animatedMarks.forEach(e=>{e.classList.remove("is-visible")}),t.animatedMarks.clear(),t.lastOpacities.fill(-1),t.activeSection=0,t.activeImage=0},R=()=>{Array.from(I).forEach((e,i)=>{e.style.opacity=i===t.activeImage?"1":"0"}),Array.from(a).forEach((e,i)=>{e.style.opacity=i===t.activeSection?"1":r.DIMMED.toString()}),g(t.activeSection,!0)},y=()=>{const{isAtTop:e,isAtBottom:i,isContainerAtTop:n,isContainerAtBottom:o}=b(),{isAbove:l,isBelow:c}=t.container;if(e||n||l){t.activeSection=0;return}if(i||o||c){t.activeSection=m-1;return}const s=t.sectionRatios.reduce((T,E,x)=>E>(t.sectionRatios[T]??0)?x:T,0),d=t.sectionRatios[t.activeSection]??0,f=t.sectionRatios[s]??0;f>r.SECTION_SWITCH_THRESHOLD&&(f>d+r.SECTION_SWITCH_ADVANTAGE||d<r.LOW_VISIBILITY_THRESHOLD)&&(t.activeSection=s),d===0&&f>0&&(t.activeSection=s)},L=e=>{if(e===t.activeSection)return r.FULLY_VISIBLE;const i=t.sectionRatios[e]??0,{isAtTop:n,isAtBottom:o,isContainerAtTop:l,isContainerAtBottom:c}=b(),{isAbove:s,isBelow:d,isIntersecting:f}=t.container;return e===0&&(n||l||s)||e===m-1&&(o||c||d)?Math.max(r.BOUNDARY_ENHANCED,i*r.INTERSECTION_MULTIPLIER+r.BASE_OPACITY_OFFSET):f?Math.max(r.DIMMED,i*r.INTERSECTION_MULTIPLIER+r.BASE_OPACITY_OFFSET):r.DIMMED},B=e=>{const i=e.getBoundingClientRect(),n=window.innerHeight,o=n*.25,l=n*.75,c=i.top+i.height/2;return c>=o&&c<=l},g=(e,i=!1)=>{(t.sectionMarks[e]??[]).forEach(o=>{if(!t.animatedMarks.has(o)){if(i&&!B(o))return;o.classList.add("is-visible"),t.animatedMarks.add(o)}})},_=()=>{const e=t.activeSection;y(),g(t.activeSection,!0),t.activeSection!==e&&g(e,!0),Array.from(a).forEach((i,n)=>{const o=L(n);Math.abs(o-(t.lastOpacities[n]??-1))>.01&&(t.lastOpacities[n]=o,i.style.opacity=String(o))})},H=()=>{t.activeSection!==t.activeImage&&(t.activeImage=t.activeSection,Array.from(I).forEach((e,i)=>{e.style.opacity=i===t.activeImage?"1":"0"}))},w=()=>{t.rafId!==null&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(()=>{t.rafId=null,_(),H()})},N=e=>{const{boundingClientRect:i,isIntersecting:n}=e,{innerHeight:o}=window;t.container.isIntersecting=n,n?(t.container.isAbove=!1,t.container.isBelow=!1):(t.container.isAbove=i.bottom<0,t.container.isBelow=i.top>o),w()},D=e=>{e.forEach(i=>
1{const n=Array.from(a).indexOf(i.target);n!==-1&&(t.sectionRatios[n]=i.intersectionRatio)}),w()},F=()=>{const e=new IntersectionObserver(D,u.observer),i=new IntersectionObserver(n=>{n.forEach(N)},u.container);Array.from(a).forEach(n=>{e.observe(n)}),i.observe(S),t.observers=[e,i]},h=()=>{t.observers.forEach(e=>{e.disconnect()}),t.observers=[],t.rafId!==null&&(cancelAnimationFrame(t.rafId),t.rafId=null),t.isEnabled=!1},k=()=>{t.isEnabled||(t.isEnabled=!0,t.sectionMarks.flat().forEach(e=>{e.setAttribute("data-animation-disabled","true")}),R(),F())},Y=()=>{t.isEnabled&&(h(),M(),t.sectionMarks.flat().forEach(e=>{e.removeAttribute("data-animation-disabled")}),typeof window.initializeMarkAnimations=="function"&&window.initializeMarkAnimations())},p=()=>{C()?k():Y()};p(),window.addEventListener("resize",p),window.addEventListener("beforeunload",()=>{h(),window.removeEventListener("resize",p)}),window.addEventListener("pageshow",e=>{e.persisted&&(h(),A())})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",A):A();window.initScrollingFeatureSection=A;

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.