Skip to Content

JavaScript File

URL: https://astramedika.com.ua/theme/js/main.min.js?v=1.02
HTTP Status: 200 OK
MIME Type: application/javascript
Last Modified: Mon, 03 Feb 2025 20:27:49 GMT
Download Time: Less than a second
Cookies: None
Size: 9 KB
HTTP Headers:  6 headers
Links In:  1 pages
Links Out:  0 links
Images:  0 images
CSS:  0 files
JavaScript:  0 files
OK Issues: No issues found

1const observerArray=[],options={root:null,rootMargin:"0px",threshold:.25}

2,callback=function(e,t){e.forEach((e,t)=>{e.isIntersecting?"map"===e.target.id?(e.target.innerHTML=__maps,observerArray[1].unobserve(e.target)):document.querySelector("#root > header").classList.remove("__opaque"):document.querySelector("#root > header").classList.add("__opaque")}

3)}

4;function setColor(e){document.documentElement.style.setProperty("--"+e.parentElement.id,e.value),e.parentElement.dataset.value=e.value}

5document.addEventListener("DOMContentLoaded",e=>{"object"==typeof lSlider&&"function"==typeof lSlider.init&&lSlider.init(),"object"==typeof imgZoom&&"function"==typeof imgZoom.init&&imgZoom.init(),"object"==typeof FBmodule&&"function"==typeof FBmodule.init&&FBmodule.init(),document.getElementById("linkedin")&&document.getElementById("linkedin").addEventListener("click",e=>{fetch("/api/linkedin.php?click")}

6),document.querySelectorAll(".faq-question").forEach(e=>{e.addEventListener("click",e=>{e.target.classList.toggle("__show")&&e.target.closest(".faq-list").querySelectorAll(".faq-question").forEach(t=>{t!==e.target&&t.classList.remove("__show")}

7)}

8)}

9),setTimeout(()=>{let e=document.getElementById("observe-element");e&&(observerArray[0]=new IntersectionObserver(callback,{root:null,rootMargin:"100px",threshold:1}

10),observerArray[0].observe(e)),e=document.getElementById("map"),e&&(observerArray[1]=new IntersectionObserver(callback,{root:null,rootMargin:"0px",threshold:0}

11),observerArray[1].observe(e))}

12,150),document.querySelectorAll('input[name="tabSwitch"]').forEach(e=>{e.addEventListener("change",e=>{document.querySelector(`label[for="${e.target.id}

13"]`).closest("ul").querySelectorAll("label[for]").forEach(t=>{t.classList.toggle("checked",t.getAttribute("for")===e.target.id&&e.target.checked),window.scrollTo({top:0,behavior:"smooth"}

14)}

15)}

16)}

17);let t=document.getElementById("price-guide");t&&window.innerWidth<768&&t.classList.add("__show"),document.body.classList.remove("__loading"),document.getElementById("preloader")&&document.getElementById("preloader").remove()}

18),window.addEventListener("load",e=>{vSearch.init()}

19);const hero=new uSlider({id:"hero"}

20),promo=new uSlider({id:"promo"}

21);function showAnswer(e){e.classList.toggle("__show")&&e.parentElement.querySelectorAll(".faq-item").forEach(t=>{t!==e&&t.classList.remove("__show")}

22)}

23function moveToUp(e){e.parentElement.querySelectorAll("img").forEach(t=>{t===e?t.classList.add("__up"):t.classList.remove("__up")}

24)}

25function dropDown(e){e.classList.toggle("__open")&&document.querySelectorAll(".dropdown").forEach(t=>{t!==e&&t.classList.remove("__open")}

26)}

27const advice2={element:null,text:[],timer:null,duration:2e4,index:0,init(e){if(void 0!==e&&void 0!==e.data){try{if(this.text=JSON.parse(e.data),!this.text.length)return}

28catch(e){return void console.warn(e)}

29"number"==typeof e.duration&&(this.duration=1e3*e.duration+4e3),this.element=document.getElementById("advice"),setInterval(e=>this.slide(),this.duration),this.slide()}

30}

31,slide(){this.element.children[2].classList.remove("show"),setTimeout(e=>{this.element.classList.remove("progress"),this.element.children[2].innerHTML=this.text[this.index++],this.index>=this.text.length&&(this.index=0),setTimeout(e=>{this.element.children[2].classList.add("show"),this.element.classList.add("progress")}

32,2e3)}

33,2e3)}

34}

35,advice={element:null,infocus:!1,text:[],index:0,timer:{write:null,next:null}

36,duration:20500,init(e){if(void 0!==e&&void 0!==e.data){try{if(this.text=JSON.parse(e.data),!this.text.length)return}

37catch(e){return void console.warn(e)}

38"number"==typeof e.duration&&(this.duration=1e3*e.duration+500),this.element=document.getElementById("advice"),this.element&&("number"==typeof duration&&(duration*=1e3,this.duration=duration+500,this.element.style.setProperty("--advice-duration",duration+"ms")),this.text.length>0&&(this.index=~~(Math.random()*this.text.length),this.index>=this.text.length&&(this.index=0),window.addEventListener("blur",()=>advice.blur()),window.addEventListener("focus",()=>advice.focus()),this.focus()))}

39}

40,focus(){this.infocus||(this.infocus=!0,this.index>=this.text.length&&(this.index=0),this.element.classList.add("progress"),this.typeWriter(this.element.children[2],this.text[this.index++],25),this.index>=this.text.length&&(this.index=0),clearInterval(this.timer.next),this.timer.next=setInterval(()=>{this.element.classList.remove("progress"),this.typeWriter(this.element.children[2],this.text[this.index++],25),this.index>=this.text.length&&(this.index=0),setTimeout(()=>this.element.classList.add("progress"),100)}

...

</html>