PageSourceSearch

https://barutlara.com/build/assets/homeHeroSlider-B0bOiPju.js

js barutlara.com collected 2026-10-04 05:26:46 UTC 5,122 bytes, 1 lines download raw bytes

1import{g as D,S as j}from"./app-DztengEh.js";import{E as R,P as V}from"./effect-fade-D_w-AlR-.js";import"./preload-helper-An3MBO2X.js";function W(E){let{swiper:e,extendParams:m,on:a,emit:r,params:l}=E;e.autoplay={running:!1,paused:!1,timeLeft:0},m({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let d,w,S=l&&l.autoplay?l.autoplay.delay:3e3,v=l&&l.autoplay?l.autoplay.delay:3e3,n,p=new Date().getTime,L,h,c,I,b,s;function q(t){!e||e.destroyed||!e.wrapperEl||t.target===e.wrapperEl&&(e.wrapperEl.removeEventListener("transitionend",q),u())}const O=()=>{if(e.destroyed||!e.autoplay.running)return;e.autoplay.paused?L=!0:L&&(v=n,L=!1);const t=e.autoplay.paused?n:p+v-new Date().getTime();e.autoplay.timeLeft=t,r("autoplayTimeLeft",t,t/S),w=requestAnimationFrame(()=>{O()})},N=()=>{let t;return e.virtual&&e.params.virtual.enabled?t=e.slides.filter(i=>i.classList.contains("swiper-slide-active"))[0]:t=e.slides[e.activeIndex],t?parseInt(t.getAttribute("data-swiper-autoplay"),10):void 0},g=t=>{if(e.destroyed||!e.autoplay.running)return;cancelAnimationFrame(w),O();let o=typeof t>"u"?e.params.autoplay.delay:t;S=e.params.autoplay.delay,v=e.params.autoplay.delay;const i=N();!Number.isNaN(i)&&i>0&&typeof t>"u"&&(o=i,S=i,v=i),n=o;const f=e.params.speed,M=()=>{!e||e.destroyed||(e.params.autoplay.reverseDirection?!e.isBeginning||e.params.loop||e.params.rewind?(e.slidePrev(f,!0,!0),r("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(e.slides.length-1,f,!0,!0),r("autoplay")):!e.isEnd||e.params.loop||e.params.rewind?(e.slideNext(f,!0,!0),r("autoplay")):e.params.autoplay.stopOnLastSlide||(e.slideTo(0,f,!0,!0),r("autoplay")),e.params.cssMode&&(p=new Date().getTime(),requestAnimationFrame(()=>{g()})))};return o>0?(clearTimeout(d),d=setTimeout(()=>{M()},o)):requestAnimationFrame(()=>{M()}),o},x=()=>{e.autoplay.running=!0,g(),r("autoplayStart")},T=()=>{e.autoplay.running=!1,clearTimeout(d),cancelAnimationFrame(w),r("autoplayStop")},y=(t,o)=>{if(e.destroyed||!e.autoplay.running)return;clearTimeout(d),t||(s=!0);const i=()=>{r("autoplayPause"),e.params.autoplay.waitForTransition?e.wrapperEl.addEventListener("transitionend",q):u()};if(e.autoplay.paused=!0,o){b&&(n=e.params.autoplay.delay),b=!1,i();return}n=(n||e.params.autoplay.delay)-(new Date().getTime()-p),!(e.isEnd&&n<0&&!e.params.loop)&&(n<0&&(n=0),i())},u=()=>{e.isEnd&&n<0&&!e.params.loop||e.destroyed||!e.autoplay.running||(p=new Date().getTime(),s?(s=!1,g(n)):g(),e.autoplay.paused=!1,r("autoplayResume"))},A=()=>{if(e.destroyed||!e.autoplay.running)return;const t=D();t.visibilityState==="hidden"&&(s=!0,y(!0)),t.visibilityState==="visible"&&u()},F=t=>{t.pointerType==="mouse"&&(s=!0,!(e.animating||e.autoplay.paused)&&y(!0))},P=t=>{t.pointerType==="mouse"&&e.autoplay.paused&&u()},C=()=>{e.params.autoplay.pauseOnMouseEnter&&(e.el.addEventListener("pointerenter",F),e.el.addEventListener("pointerleave",P))},H=()=>{e.el.removeEventListener("pointerenter",F),e.el.removeEventListener("pointerleave",P)},B=()=>{D().addEventListener("visibilitychange",A)},k=()=>{D().removeEventListener("visibilitychange",A)};a("init",()=>{e.params.autoplay.enabled&&(C(),B(),p=new Date().getTime(),x())}),a("destroy",()=>{H(),k(),e.autoplay.running&&T()}),a("beforeTransitionStart",(t,o,i)=>{e.destroyed||!e.autoplay.running||(i||!e.params.autoplay.disableOnInteraction?y(!0,!0):T())}),a("sliderFirstMove",()=>{if(!(e.destroyed||!e.autoplay.running)){if(e.params.autoplay.disableOnInteraction){T();return}h=!0,c=!1,s=!1,I=setTimeout(()=>{s=!0,c=!0,y(!0)},200)}}),a("touchEnd",()=>{if(!(e.destroyed||!e.autoplay.running||!h)){if(clearTimeout(I),clearTimeout(d),e.params.autoplay.disableOnInteraction){c=!1,h=!1;return}c&&e.params.cssMode&&u(),c=!1,h=!1}}),a("slideChange",()=>{e.destroyed||!e.autoplay.running||(b=!0)}),Object.assign(e.autoplay,{start:x,stop:T,pause:y,resume:u})}function J(){let E=document.querySelector(".homeHeroSlider");document.querySelector(".scanner-line");let e=document.querySelector(".heroTitle"),m=document.querySelector(".heroDownArrow");m&&m.addEventListener("click",()=>{let a=document.querySelector(".hero").offsetHeight;window.innerWidth<768&&(a=document.querySelector(".hero").offsetHeight-90),window.scrollTo({top:a,behavior:"smooth"})}),new j(E,{loop:!0,effect:"fade",speed:1e3,modules:[W,R,V],fadeEffect:{crossFade:!0},pagination:{el:".swiper-pagination",clickable:!0},autoplay:{delay:5e3,disableOnInteraction:!1},on:{transitionStart:function(){},afterInit:function(){if(setTimeout(()=>{e.classList.add("show")},400),this.slides[this.activeIndex].classList.contains("video")){this.autoplay.stop();let a=this.slides[this.activeIndex].querySelector("video");a.play(),a.addEventListener("ended",()=>{this.slideNext()})}},slideChangeTransitionStart:function(){if(this.slides[this.activeIndex].classList.contains("video")){let a=this.slides[this.activeIndex].querySelector("video");this.autoplay.stop(),a.play(),a.addEventListener("ended",()=>{this.autoplay.start(),this.slideNext()})}else this.autoplay.start()}}})}export{J as homeHeroSlider};

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.