<commit_before>/**
 * Application entry point
 */

// Load application styles
import 'scss/main.scss';
import hljs from 'highlight.js';
import 'lightbox2';
import Swiper from 'swiper';
import scrollMonitor from 'scrollmonitor';
import CountUp from 'countup';

import "intersection-observer";
import lozad from 'lozad';

hljs.initHighlightingOnLoad();

var swipers = []
swipers.push(new Swiper('#stack .swiper-container', {
    spaceBetween: 32,
    init:false,
    slidesPerView: 'auto',
    direction: 'horizontal',
    //loop: true, //looping makes weird things
    //loopedSlides: 1,
    //centeredSlides: true,
    breakpoints: {
        320: {
            slidesPerView: 1
        },
        512: {
            slidesPerView: 2
        },
        768: {
            slidesPerView: 3
        },
        1024: {
            slidesPerView: 4
        }

    },
    navigation: {
        nextEl: '#stack .swiper-next',
        prevEl: '#stack .swiper-prev',
    }
}))


swipers.push(new Swiper('#customers .swiper-container', {
    slidesPerView: 5,
    init:false,
    direction: 'horizontal',
    loop: true,
    breakpoints: {
        1024: {
            slidesPerView: 1,
        },
        1280: {
            slidesPerView: 3,
        }
    },

    navigation: {
        nextEl: '#customers .swiper-next',
        prevEl: '#customers .swiper-prev',
    }
}))

window.onload = function () {
    lozad('.lozad',{
        rootMargin: '200px 0'
    }).observe();
    var elements = document.getElementsByClassName("count-up");
    for (var el of elements) {
        var options = {
            useEasing: true,
            useGrouping: true,
            separator: ',',
            decimal: '.'
        };
        scrollMonitor.create(el).enterViewport(function () {
            var demo = new CountUp(this.watchItem, 0, this.watchItem.getAttribute('data-count'), 0, 3, options);
            if (!demo.error) {
                demo.start();
            } else {
                console.error(demo.error);
            }
            this.destroy();
        });<commit_msg>feat(hugov2): Chore lozad rootMargin expression<commit_after>/**
 * Application entry point
 */

// Load application styles
import 'scss/main.scss';
import hljs from 'highlight.js';
import 'lightbox2';
import Swiper from 'swiper';
import scrollMonitor from 'scrollmonitor';
import CountUp from 'countup';

import "intersection-observer";
import lozad from 'lozad';

hljs.initHighlightingOnLoad();

var swipers = []
swipers.push(new Swiper('#stack .swiper-container', {
    spaceBetween: 32,
    init:false,
    slidesPerView: 'auto',
    direction: 'horizontal',
    //loop: true, //looping makes weird things
    //loopedSlides: 1,
    //centeredSlides: true,
    breakpoints: {
        320: {
            slidesPerView: 1
        },
        512: {
            slidesPerView: 2
        },
        768: {
            slidesPerView: 3
        },
        1024: {
            slidesPerView: 4
        }

    },
    navigation: {
        nextEl: '#stack .swiper-next',
        prevEl: '#stack .swiper-prev',
    }
}))


swipers.push(new Swiper('#customers .swiper-container', {
    slidesPerView: 5,
    init:false,
    direction: 'horizontal',
    loop: true,
    breakpoints: {
        1024: {
            slidesPerView: 1,
        },
        1280: {
            slidesPerView: 3,
        }
    },

    navigation: {
        nextEl: '#customers .swiper-next',
        prevEl: '#customers .swiper-prev',
    }
}))

window.onload = function () {
    lozad('.lozad',{
        rootMargin: '200px'
    }).observe();
    var elements = document.getElementsByClassName("count-up");
    for (var el of elements) {
        var options = {
            useEasing: true,
            useGrouping: true,
            separator: ',',
            decimal: '.'
        };
        scrollMonitor.create(el).enterViewport(function () {
            var demo = new CountUp(this.watchItem, 0, this.watchItem.getAttribute('data-count'), 0, 3, options);
            if (!demo.error) {
                demo.start();
            } else {
                console.error(demo.error);
            }
            this.destroy();
        });
{'fraction_non_alphanumeric': 0.13338122605363983, 'fraction_numerical': 0.01867816091954023, 'mean_word_length': 1.908774373259053, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1622082', 'n_tokens_mistral': 1337, 'n_tokens_neox': 1270, 'n_words': 281}