1import{r as l}from"./index-D8feyLDW.js";import{u as h,i as c,n as r,t as d,e as i}from"./fluorescent-dom.es-w46pwioq.js";import"./evx.es-D_-Lbk8t.js";import{g}from"./media-queries-CokWIw5y.js";import{d as p}from"./delay-offset-BbI2-Y8X.js";import{s as b}from"./shouldAnimate-Dkf8ta0P.js";const u={animation:"animation--image-compare"},t={introductionItems:".animation--section-introduction > *",image:".image_compare__image-wrapper .image__img",labels:".image-compare__label-container",sliderLine:".image-compare__slider-line",sliderButton:".image-compare__slider-button"},_=e=>{p(e,[t.introductionItems,t.image,t.labels,t.sliderLine,t.sliderButton]);const s=window.matchMedia(g("above-720")).matches?200:100,n=Math.min(s/e.offsetHeight,.5),a=new IntersectionObserver(([{isIntersecting:m}])=>{m&&(h(e,"is-visible"),setTimeout(()=>{c(e,u.animation)},1200),a.disconnect())},{threshold:n});return a.observe(e),{destroy(){a.destroy()}}},o={imageContainer:".image-compare__image-container",labelContainer:".image-compare__label-container",slider:".image-compare__slider"};l("image-compare",{onLoad(){this.events=[],this._initSliders(),b(this.container)&&(this.animateImageCompare=_(this.container))},_initSliders(){this.imageContainer=r(o.imageContainer,this.container),this.labelContainers=d(o.labelContainer,this.container),this.slider=r(o.slider,this.container),this.slider&&this.events.push(i(this.slider,"input",e=>this.imageContainer.style.setProperty("--position",`${e.target.value}%`)),i(this.slider,"mousedown",()=>this.hideLabelContainers()),i(this.slider,"touchstart",()=>this.hideLabelContainers()),i(this.slider,"mouseup",()=>this.showLabelContainers()),i(this.slider,"touchend",()=>this.showLabelContainers()))},hideLabelContainers(){this.labelContainers.forEach(e=>{e.style.setProperty("opacity","0")})},showLabelContainers(){this.labelContainers.forEach(e=>{e.style.setProperty("opacity","1")})},onUnload(){var e;this.events.forEach(s=>s()),(e=this.animateImageCompare)==null||e.destroy()}});
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.