удаление хуйни лишней
This commit is contained in:
		@@ -1,119 +0,0 @@
 | 
			
		||||
#mail>:is(form, div) {
 | 
			
		||||
    display       : flex;
 | 
			
		||||
    flex-direction: column;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#mail .exit {
 | 
			
		||||
    margin-top: 25px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#mail p {
 | 
			
		||||
    margin : 0;
 | 
			
		||||
    display: flex;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#mail p>span {
 | 
			
		||||
    margin-left: auto;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#mail>form>input:is([type=text], [type=password]) {
 | 
			
		||||
    margin-bottom: 12px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#mail>form>input:last-child {
 | 
			
		||||
    margin-bottom: unset;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#mail>form>.submit {
 | 
			
		||||
    margin-top   : 6px;
 | 
			
		||||
    margin-bottom: 10px;
 | 
			
		||||
    display      : flex;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#mail>form>.submit>label {
 | 
			
		||||
    padding      : 10px 20px;
 | 
			
		||||
    border       : unset;
 | 
			
		||||
    border-radius: 3px 0 0 3px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#mail>form>.submit>input {
 | 
			
		||||
    padding      : 10px 20px;
 | 
			
		||||
    flex-grow    : 1;
 | 
			
		||||
    border       : unset;
 | 
			
		||||
    border-radius: 0 3px 3px 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#mail>form>input[type=submit].registration {
 | 
			
		||||
    padding         : 7px 20px;
 | 
			
		||||
    background-color: #86781C;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#mail>form>input[type=submit].registration:hover {
 | 
			
		||||
    background-color: #9e8d20;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#mail>form>input[type=submit].registration:is(:active, :focus) {
 | 
			
		||||
    background-color: #776b19;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#mail>form>ul.errors {
 | 
			
		||||
    margin-top      : 18px;
 | 
			
		||||
    margin-bottom   : 0px;
 | 
			
		||||
    padding         : 10px;
 | 
			
		||||
    text-align      : center;
 | 
			
		||||
    list-style      : none;
 | 
			
		||||
    background-color: #ae8f8f;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#account {
 | 
			
		||||
    display           : grid;
 | 
			
		||||
    grid-template-rows: auto auto;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#account>button#login {
 | 
			
		||||
    z-index : 1500;
 | 
			
		||||
    grid-row: 2;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#account>section.tab {
 | 
			
		||||
    z-index         : 1000;
 | 
			
		||||
    position        : relative;
 | 
			
		||||
    bottom          : -100%;
 | 
			
		||||
    padding         : 1.5rem 10%;
 | 
			
		||||
    display         : flex;
 | 
			
		||||
    flex-direction  : column;
 | 
			
		||||
    align-self      : end;
 | 
			
		||||
    text-align      : center;
 | 
			
		||||
    gap             : .8rem;
 | 
			
		||||
    background-color: var(--background-light-2);
 | 
			
		||||
    transition      : .2s ease-in;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#account>button.active+section.tab {
 | 
			
		||||
    bottom: 0%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#account>section.tab h3:first-of-type {
 | 
			
		||||
    margin-bottom: 0.5rem;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#account>section.tab>* {
 | 
			
		||||
    margin: unset;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#account>section#mail.tab {
 | 
			
		||||
    grid-row          : 1;
 | 
			
		||||
    display           : grid;
 | 
			
		||||
    grid-template-rows: auto auto;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#account>section#mail.tab>#profile {
 | 
			
		||||
    grid-row          : 1;
 | 
			
		||||
    display           : grid;
 | 
			
		||||
    grid-template-rows: auto auto;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#account>section#mail.tab>input[type=mail] {
 | 
			
		||||
    grid-row          : 2;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,52 +0,0 @@
 | 
			
		||||
main>section#books {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex-flow: row wrap;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main>section#books>* {
 | 
			
		||||
    margin-bottom: 20px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main>section#books>form.upload {
 | 
			
		||||
    width: calc(100% / 3 - 20px - 9px * 2);
 | 
			
		||||
    height: calc(220px - 9px * 2);
 | 
			
		||||
    margin: 5px;
 | 
			
		||||
    margin-right: 20px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main>section#books>form.upload>p {
 | 
			
		||||
    font-size: 3rem;
 | 
			
		||||
    height: 0.3rem;
 | 
			
		||||
    line-height: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main>section#books>article.book {
 | 
			
		||||
    width: calc(100% / 3 - 20px);
 | 
			
		||||
    margin-right: 20px;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    flex-direction: column;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main>section#books>article.book:nth-child(3) {
 | 
			
		||||
    width: calc(100% / 3);
 | 
			
		||||
    margin-right: unset;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main>section#books>article.book>img {
 | 
			
		||||
    height: 220px;
 | 
			
		||||
    object-fit: cover;
 | 
			
		||||
    object-position: right;
 | 
			
		||||
    overflow: hidden;
 | 
			
		||||
    clip-path: polygon(5px calc(100% - 5px), calc(100% - 5px) calc(100% - 5px), calc(100% - 5px) 5px, 5px 5px);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main>section#books>article.book>h4 {
 | 
			
		||||
    margin-top: 5px;
 | 
			
		||||
    margin-bottom: 10px;
 | 
			
		||||
    height: 50px;
 | 
			
		||||
    text-align: center;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main>section#books>article.book>p {
 | 
			
		||||
    margin: unset;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,31 +0,0 @@
 | 
			
		||||
section.hotline {
 | 
			
		||||
    display: inline-flex;
 | 
			
		||||
    height : 100%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
section.hotline * {
 | 
			
		||||
    transition: unset;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
section.hotline:last-child {
 | 
			
		||||
    margin-bottom: unset;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
section.hotline>article {
 | 
			
		||||
    margin-right    : 18px;
 | 
			
		||||
    width           : 140px;
 | 
			
		||||
    height          : 190px;
 | 
			
		||||
    display         : flex;
 | 
			
		||||
    align-self      : flex-end;
 | 
			
		||||
    border-radius   : 3px;
 | 
			
		||||
    background-color: var(--background-light-1);
 | 
			
		||||
    box-shadow      : 0px -6px 6px rgba(0, 0, 0, 0.3);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
section.hotline>article:last-child {
 | 
			
		||||
    margin-right: unset;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
section.hotline>article>* {
 | 
			
		||||
    margin: auto;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,40 +0,0 @@
 | 
			
		||||
header>div#logo {
 | 
			
		||||
    position          : relative;
 | 
			
		||||
    height            : 260px;
 | 
			
		||||
    display           : flex;
 | 
			
		||||
    flex-direction    : column;
 | 
			
		||||
    justify-content   : center;
 | 
			
		||||
    gap               : unset;
 | 
			
		||||
    border-right      : 1px solid;
 | 
			
		||||
    border-right-color: #ccc;
 | 
			
		||||
    border-right-color: rgba(255, 255, 255, 0.2);
 | 
			
		||||
    background-color  : rgba(255, 255, 255, 0.2);
 | 
			
		||||
    overflow          : hidden;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
header>div#logo>h4 {
 | 
			
		||||
    z-index: 10;
 | 
			
		||||
    margin : 0 20px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
header>div#logo>h1 {
 | 
			
		||||
    z-index      : 50;
 | 
			
		||||
    margin       : 0 37px;
 | 
			
		||||
    margin-bottom: -5px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
header>div#logo>#hotline_logo {
 | 
			
		||||
    z-index            : -50;
 | 
			
		||||
    position           : absolute;
 | 
			
		||||
    -webkit-filter     : blur(2px) brightness(1.3);
 | 
			
		||||
    filter             : blur(2px) brightness(1.3);
 | 
			
		||||
    /* background-color: var(--background); */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
header>div#logo>#hotline_logo>article {
 | 
			
		||||
    margin-bottom: 30px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
aside>section#hotline {
 | 
			
		||||
    clip-path: inset(0 0 0 250px);
 | 
			
		||||
}
 | 
			
		||||
@@ -1,17 +0,0 @@
 | 
			
		||||
#what_image {
 | 
			
		||||
    z-index: 9999999;
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    width: 100vw;
 | 
			
		||||
    height: 100vh;
 | 
			
		||||
    display: none;
 | 
			
		||||
    transition: unset;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#what_image.active {
 | 
			
		||||
    display: block;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.hide {
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    display: none;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,33 +0,0 @@
 | 
			
		||||
form.upload {
 | 
			
		||||
    width: 100%;
 | 
			
		||||
    height: 100px;
 | 
			
		||||
    position: relative;
 | 
			
		||||
    display: flex;
 | 
			
		||||
    border: 4px dashed #e5ddd1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
form.upload:hover {
 | 
			
		||||
    background-color: #ccc6bd;
 | 
			
		||||
    border: 4px dashed #fff7ea;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
form.upload>p {
 | 
			
		||||
    margin: auto;
 | 
			
		||||
    font-weight: bold;
 | 
			
		||||
    color: #eee6d9;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
form.upload:hover>p {
 | 
			
		||||
    color: #fff7ea;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
form.upload>input {
 | 
			
		||||
    width: 100%;
 | 
			
		||||
    height: 100%;
 | 
			
		||||
    position: absolute;
 | 
			
		||||
    opacity: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
form.upload:hover>input {
 | 
			
		||||
    cursor: pointer;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,139 +0,0 @@
 | 
			
		||||
"use strict";
 | 
			
		||||
 | 
			
		||||
class account {
 | 
			
		||||
    static async initialization() {
 | 
			
		||||
        // Запрос
 | 
			
		||||
        return fetch('https://rules.mirzaev.sexy/account/initialization', {
 | 
			
		||||
            method: 'PUT'
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static authentication(button) {
 | 
			
		||||
        if (button instanceof HTMLElement) {
 | 
			
		||||
            // Получены обязательные входные параметры
 | 
			
		||||
 | 
			
		||||
            if (button.classList.contains('active')) {
 | 
			
		||||
                // Кнопка активна (подразумевается)
 | 
			
		||||
 | 
			
		||||
                if (window.vk !== undefined) {
 | 
			
		||||
                    // Найдена инстанция окна
 | 
			
		||||
 | 
			
		||||
                    // Закрытие окна
 | 
			
		||||
                    window.vk.close();
 | 
			
		||||
 | 
			
		||||
                    // Удаление окна
 | 
			
		||||
                    window.vk = undefined;
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                // Генерация панели
 | 
			
		||||
                this.panel(button.parentElement);
 | 
			
		||||
 | 
			
		||||
                // Вызов троллера
 | 
			
		||||
                troller.what.single();
 | 
			
		||||
            } else {
 | 
			
		||||
                // Кнопка неактивна (подразумевается)
 | 
			
		||||
 | 
			
		||||
                // Инициализация активного статуса
 | 
			
		||||
                button.classList.add('active');
 | 
			
		||||
                button.innerText = 'Закрыть';
 | 
			
		||||
 | 
			
		||||
                // Настройка окна
 | 
			
		||||
                const width = 500;
 | 
			
		||||
                const height = 500;
 | 
			
		||||
                const left = (window.screen.width / 2) - ((width / 2) + 10);
 | 
			
		||||
                const top = (window.screen.height / 2) - ((height / 2) + 50);
 | 
			
		||||
 | 
			
		||||
                // Инициализация аккаунта
 | 
			
		||||
                this.initialization()
 | 
			
		||||
                    .then(
 | 
			
		||||
                        (response) => {
 | 
			
		||||
                            if (response.status === 401 && typeof response.headers.get('session') === 'string') {
 | 
			
		||||
                                // Получен код ответа 401 (не аутентифицирован) и инициализирован аккаунт
 | 
			
		||||
 | 
			
		||||
                                // Открытие окна с аунтентификацией ВКонтакте
 | 
			
		||||
                                window.vk = window.open(
 | 
			
		||||
                                    'https://oauth.vk.com/authorize?client_id=51447080&redirect_uri=https://rules.mirzaev.sexy/account/vk/connect&display=popup&response_type=code&scope=4521990&state=' + response.headers.get('session'),
 | 
			
		||||
                                    'rules_vk',
 | 
			
		||||
                                    'left=' + left + ',top=' + top + ',width=' + width + ',height=' + height + ',resizable=no,status=no,toolbar=no,menubar=no,scrollbars=no,location=no,directories=no'
 | 
			
		||||
                                );
 | 
			
		||||
 | 
			
		||||
                                // Инициализация ссылки на ядро
 | 
			
		||||
                                const _this = this;
 | 
			
		||||
 | 
			
		||||
                                // Инициализация интервала проверки закрытия окна с аунтентификацией ВКонтакте
 | 
			
		||||
                                const interval = setInterval(function () {
 | 
			
		||||
                                    if (window.vk.closed || window.vk === undefined) {
 | 
			
		||||
                                        // Окно с аутентификацией закрыто
 | 
			
		||||
 | 
			
		||||
                                        // Удаление интервала
 | 
			
		||||
                                        clearInterval(interval);
 | 
			
		||||
 | 
			
		||||
                                        // Генерация панели
 | 
			
		||||
                                        _this.panel(button.parentElement);
 | 
			
		||||
                                    }
 | 
			
		||||
                                }, 100);
 | 
			
		||||
                            } else if (response.status === 200) {
 | 
			
		||||
                                // Получен код ответа 200 (аутентифицирован)
 | 
			
		||||
 | 
			
		||||
                                // Генерация панели
 | 
			
		||||
                                this.panel(button.parentElement);
 | 
			
		||||
                            }
 | 
			
		||||
                        }
 | 
			
		||||
                    );
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static deauthentication() {
 | 
			
		||||
        if (shell instanceof HTMLElement) {
 | 
			
		||||
            // Получены обязательные входные параметры
 | 
			
		||||
 | 
			
		||||
            fetch('https://rules.mirzaev.sexy/account/panel', {
 | 
			
		||||
                method: 'GET'
 | 
			
		||||
            }).then(
 | 
			
		||||
                (response) => {
 | 
			
		||||
                    if (response.status === 200) {
 | 
			
		||||
                        // Получен код ответа 200
 | 
			
		||||
 | 
			
		||||
                        response.text().then(
 | 
			
		||||
                            (text) => {
 | 
			
		||||
                                console.log(text);
 | 
			
		||||
 | 
			
		||||
                                // Запись панели в оболочку
 | 
			
		||||
                                shell.outerHTML = text;
 | 
			
		||||
                            }
 | 
			
		||||
                        );
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            );
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static async panel(shell) {
 | 
			
		||||
        if (shell instanceof HTMLElement) {
 | 
			
		||||
            // Получены обязательные входные параметры
 | 
			
		||||
 | 
			
		||||
            fetch('https://rules.mirzaev.sexy/account/panel', {
 | 
			
		||||
                method: 'GET'
 | 
			
		||||
            }).then(
 | 
			
		||||
                (response) => {
 | 
			
		||||
                    if (response.status === 200) {
 | 
			
		||||
                        // Получен код ответа 200
 | 
			
		||||
 | 
			
		||||
                        response.text().then(
 | 
			
		||||
                            (text) => {
 | 
			
		||||
                                console.log(text);
 | 
			
		||||
 | 
			
		||||
                                // Запись панели в оболочку
 | 
			
		||||
                                shell.outerHTML = text;
 | 
			
		||||
                            }
 | 
			
		||||
                        );
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            );
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,668 +0,0 @@
 | 
			
		||||
"use strict";
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Бегущая строка
 | 
			
		||||
 *
 | 
			
		||||
 * @description
 | 
			
		||||
 * Простой, но мощный класс для создания бегущих строк. Поддерживает
 | 
			
		||||
 * перемещение мышью и прокрутку колесом, полностью настраивается очень гибок
 | 
			
		||||
 * для настроек в CSS и подразумевается, что отлично индексируется поисковыми роботами.
 | 
			
		||||
 * Имеет свой препроцессор, благодаря которому можно создавать бегущие строки
 | 
			
		||||
 * без программирования - с помощью HTML-аттрибутов, а так же возможность
 | 
			
		||||
 * изменять параметры (data-hotline-* аттрибуты) на лету. Есть возможность вызывать
 | 
			
		||||
 * события при выбранных действиях для того, чтобы пользователь имел возможность
 | 
			
		||||
 * дорабатывать функционал без изучения и изменения моего кода
 | 
			
		||||
 *
 | 
			
		||||
 * @example
 | 
			
		||||
 * сonst hotline = new hotline();
 | 
			
		||||
 * hotline.step = '-5';
 | 
			
		||||
 * hotline.start();
 | 
			
		||||
 *
 | 
			
		||||
 * @todo
 | 
			
		||||
 * 1. Бесконечный режим - элементы не удаляются если видны на экране (будут дубликаты)
 | 
			
		||||
 *
 | 
			
		||||
 * @copyright WTFPL
 | 
			
		||||
 * @author Arsen Mirzaev Tatyano-Muradovich <arsen@mirzaev.sexy>
 | 
			
		||||
 */
 | 
			
		||||
class hotline {
 | 
			
		||||
  // Идентификатор
 | 
			
		||||
  #id = 0;
 | 
			
		||||
 | 
			
		||||
  // Оболочка (instanceof HTMLElement)
 | 
			
		||||
  #shell = document.getElementById("hotline");
 | 
			
		||||
 | 
			
		||||
  // Инстанция горячей строки
 | 
			
		||||
  #instance = null;
 | 
			
		||||
 | 
			
		||||
  // Перемещение
 | 
			
		||||
  #transfer = true;
 | 
			
		||||
 | 
			
		||||
  // Движение
 | 
			
		||||
  #move = true;
 | 
			
		||||
 | 
			
		||||
  // Наблюдатель
 | 
			
		||||
  #observer = null;
 | 
			
		||||
 | 
			
		||||
  // Наблюдатель
 | 
			
		||||
  #block = new Set(["events"]);
 | 
			
		||||
 | 
			
		||||
  // Настраиваемые параметры
 | 
			
		||||
  transfer = null;
 | 
			
		||||
  move = null;
 | 
			
		||||
  delay = 10;
 | 
			
		||||
  step = 1;
 | 
			
		||||
  hover = true;
 | 
			
		||||
  movable = true;
 | 
			
		||||
  sticky = false;
 | 
			
		||||
  wheel = false;
 | 
			
		||||
  delta = null;
 | 
			
		||||
  vertical = false;
 | 
			
		||||
  observe = false;
 | 
			
		||||
  events = new Map([
 | 
			
		||||
    ["start", false],
 | 
			
		||||
    ["stop", false],
 | 
			
		||||
    ["move", false],
 | 
			
		||||
    ["move.block", false],
 | 
			
		||||
    ["move.unblock", false],
 | 
			
		||||
    ["offset", false],
 | 
			
		||||
    ["transfer.start", true],
 | 
			
		||||
    ["transfer.end", true],
 | 
			
		||||
    ["onmousemove", false]
 | 
			
		||||
  ]);
 | 
			
		||||
 | 
			
		||||
  constructor(id, shell) {
 | 
			
		||||
    // Запись идентификатора
 | 
			
		||||
    if (typeof id === "string" || typeof id === "number") this.#id = id;
 | 
			
		||||
 | 
			
		||||
    // Запись оболочки
 | 
			
		||||
    if (shell instanceof HTMLElement) this.#shell = shell;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  start() {
 | 
			
		||||
    if (this.#instance === null) {
 | 
			
		||||
      // Нет запущенной инстанции бегущей строки
 | 
			
		||||
 | 
			
		||||
      // Инициализация ссылки на ядро
 | 
			
		||||
      const _this = this;
 | 
			
		||||
 | 
			
		||||
      // Запуск движения
 | 
			
		||||
      this.#instance = setInterval(function () {
 | 
			
		||||
        if (_this.#shell.childElementCount > 1) {
 | 
			
		||||
          // Найдено содержимое бегущей строки (2 и более)
 | 
			
		||||
 | 
			
		||||
          // Инициализация буфера для временных данных
 | 
			
		||||
          let buffer;
 | 
			
		||||
 | 
			
		||||
          // Инициализация данных первого элемента в строке
 | 
			
		||||
          const first = {
 | 
			
		||||
            element: (buffer = _this.#shell.firstElementChild),
 | 
			
		||||
            coords: buffer.getBoundingClientRect()
 | 
			
		||||
          };
 | 
			
		||||
 | 
			
		||||
          if (_this.vertical) {
 | 
			
		||||
            // Вертикальная бегущая строка
 | 
			
		||||
 | 
			
		||||
            // Инициализация сдвига у первого элемента (движение)
 | 
			
		||||
            first.offset = isNaN(
 | 
			
		||||
              (buffer = parseFloat(first.element.style.marginTop))
 | 
			
		||||
            )
 | 
			
		||||
              ? 0
 | 
			
		||||
              : buffer;
 | 
			
		||||
 | 
			
		||||
            // Инициализация отступа до второго элемента у первого элемента (разделение)
 | 
			
		||||
            first.separator = isNaN(
 | 
			
		||||
              (buffer = parseFloat(
 | 
			
		||||
                getComputedStyle(first.element).marginBottom
 | 
			
		||||
              ))
 | 
			
		||||
            )
 | 
			
		||||
              ? 0
 | 
			
		||||
              : buffer;
 | 
			
		||||
 | 
			
		||||
            // Инициализация крайнего с конца ребра первого элемента в строке
 | 
			
		||||
            first.end = first.coords.y + first.coords.height + first.separator;
 | 
			
		||||
          } else {
 | 
			
		||||
            // Горизонтальная бегущая строка
 | 
			
		||||
 | 
			
		||||
            // Инициализация отступа у первого элемента (движение)
 | 
			
		||||
            first.offset = isNaN(
 | 
			
		||||
              (buffer = parseFloat(first.element.style.marginLeft))
 | 
			
		||||
            )
 | 
			
		||||
              ? 0
 | 
			
		||||
              : buffer;
 | 
			
		||||
 | 
			
		||||
            // Инициализация отступа до второго элемента у первого элемента (разделение)
 | 
			
		||||
            first.separator = isNaN(
 | 
			
		||||
              (buffer = parseFloat(getComputedStyle(first.element).marginRight))
 | 
			
		||||
            )
 | 
			
		||||
              ? 0
 | 
			
		||||
              : buffer;
 | 
			
		||||
 | 
			
		||||
            // Инициализация крайнего с конца ребра первого элемента в строке
 | 
			
		||||
            first.end = first.coords.x + first.coords.width + first.separator;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          if (
 | 
			
		||||
            (_this.vertical &&
 | 
			
		||||
              Math.round(first.end) < _this.#shell.offsetTop) ||
 | 
			
		||||
            (!_this.vertical && Math.round(first.end) < _this.#shell.offsetLeft)
 | 
			
		||||
          ) {
 | 
			
		||||
            // Элемент (вместе с отступом до второго элемента) вышел из области видимости (строки)
 | 
			
		||||
 | 
			
		||||
            if (
 | 
			
		||||
              (_this.transfer === null && _this.#transfer) ||
 | 
			
		||||
              _this.transfer === true
 | 
			
		||||
            ) {
 | 
			
		||||
              // Перенос разрешен
 | 
			
		||||
 | 
			
		||||
              if (_this.vertical) {
 | 
			
		||||
                // Вертикальная бегущая строка
 | 
			
		||||
 | 
			
		||||
                // Удаление отступов (движения)
 | 
			
		||||
                first.element.style.marginTop = null;
 | 
			
		||||
              } else {
 | 
			
		||||
                // Горизонтальная бегущая строка
 | 
			
		||||
 | 
			
		||||
                // Удаление отступов (движения)
 | 
			
		||||
                first.element.style.marginLeft = null;
 | 
			
		||||
              }
 | 
			
		||||
 | 
			
		||||
              // Копирование первого элемента в конец строки
 | 
			
		||||
              _this.#shell.appendChild(first.element);
 | 
			
		||||
 | 
			
		||||
              if (_this.events.get("transfer.end")) {
 | 
			
		||||
                // Запрошен вызов события: "перемещение в конец"
 | 
			
		||||
 | 
			
		||||
                // Вызов события: "перемещение в конец"
 | 
			
		||||
                document.dispatchEvent(
 | 
			
		||||
                  new CustomEvent(`hotline.${_this.#id}.transfer.end`, {
 | 
			
		||||
                    detail: {
 | 
			
		||||
                      element: first.element,
 | 
			
		||||
                      offset: -(
 | 
			
		||||
                        (_this.vertical
 | 
			
		||||
                          ? first.coords.height
 | 
			
		||||
                          : first.coords.width) + first.separator
 | 
			
		||||
                      )
 | 
			
		||||
                    }
 | 
			
		||||
                  })
 | 
			
		||||
                );
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
          } else if (
 | 
			
		||||
            (_this.vertical &&
 | 
			
		||||
              Math.round(first.coords.y) > _this.#shell.offsetTop) ||
 | 
			
		||||
            (!_this.vertical &&
 | 
			
		||||
              Math.round(first.coords.x) > _this.#shell.offsetLeft)
 | 
			
		||||
          ) {
 | 
			
		||||
            // Передняя (движущая) граница первого элемента вышла из области видимости
 | 
			
		||||
 | 
			
		||||
            if (
 | 
			
		||||
              (_this.transfer === null && _this.#transfer) ||
 | 
			
		||||
              _this.transfer === true
 | 
			
		||||
            ) {
 | 
			
		||||
              // Перенос разрешен
 | 
			
		||||
 | 
			
		||||
              // Инициализация отступа у последнего элемента (разделение)
 | 
			
		||||
              const separator =
 | 
			
		||||
                (buffer = isNaN(
 | 
			
		||||
                  (buffer = parseFloat(
 | 
			
		||||
                    getComputedStyle(_this.#shell.lastElementChild)[
 | 
			
		||||
                    _this.vertical ? "marginBottom" : "marginRight"
 | 
			
		||||
                    ]
 | 
			
		||||
                  ))
 | 
			
		||||
                )
 | 
			
		||||
                  ? 0
 | 
			
		||||
                  : buffer) === 0
 | 
			
		||||
                  ? first.separator
 | 
			
		||||
                  : buffer;
 | 
			
		||||
 | 
			
		||||
              // Инициализация координат первого элемента в строке
 | 
			
		||||
              const coords = _this.#shell.lastElementChild.getBoundingClientRect();
 | 
			
		||||
 | 
			
		||||
              if (_this.vertical) {
 | 
			
		||||
                // Вертикальная бегущая строка
 | 
			
		||||
 | 
			
		||||
                // Удаление отступов (движения)
 | 
			
		||||
                _this.#shell.lastElementChild.style.marginTop =
 | 
			
		||||
                  -coords.height - separator + "px";
 | 
			
		||||
              } else {
 | 
			
		||||
                // Горизонтальная бегущая строка
 | 
			
		||||
 | 
			
		||||
                // Удаление отступов (движения)
 | 
			
		||||
                _this.#shell.lastElementChild.style.marginLeft =
 | 
			
		||||
                  -coords.width - separator + "px";
 | 
			
		||||
              }
 | 
			
		||||
 | 
			
		||||
              // Копирование последнего элемента в начало строки
 | 
			
		||||
              _this.#shell.insertBefore(
 | 
			
		||||
                _this.#shell.lastElementChild,
 | 
			
		||||
                first.element
 | 
			
		||||
              );
 | 
			
		||||
 | 
			
		||||
              // Удаление отступов у второго элемента в строке (движения)
 | 
			
		||||
              _this.#shell.children[1].style[
 | 
			
		||||
                _this.vertical ? "marginTop" : "marginLeft"
 | 
			
		||||
              ] = null;
 | 
			
		||||
 | 
			
		||||
              if (_this.events.get("transfer.start")) {
 | 
			
		||||
                // Запрошен вызов события: "перемещение в начало"
 | 
			
		||||
 | 
			
		||||
                // Вызов события: "перемещение в начало"
 | 
			
		||||
                document.dispatchEvent(
 | 
			
		||||
                  new CustomEvent(`hotline.${_this.#id}.transfer.start`, {
 | 
			
		||||
                    detail: {
 | 
			
		||||
                      element: _this.#shell.lastElementChild,
 | 
			
		||||
                      offset:
 | 
			
		||||
                        (_this.vertical ? coords.height : coords.width) +
 | 
			
		||||
                        separator
 | 
			
		||||
                    }
 | 
			
		||||
                  })
 | 
			
		||||
                );
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
          } else {
 | 
			
		||||
            // Элемент в области видимости
 | 
			
		||||
 | 
			
		||||
            if ((_this.move === null && _this.#move) || _this.move === true) {
 | 
			
		||||
              // Движение разрешено
 | 
			
		||||
 | 
			
		||||
              // Запись новых координат сдвига
 | 
			
		||||
              const offset = first.offset + _this.step;
 | 
			
		||||
 | 
			
		||||
              // Запись сдвига (движение)
 | 
			
		||||
              _this.offset(offset);
 | 
			
		||||
 | 
			
		||||
              if (_this.events.get("move")) {
 | 
			
		||||
                // Запрошен вызов события: "движение"
 | 
			
		||||
 | 
			
		||||
                // Вызов события: "движение"
 | 
			
		||||
                document.dispatchEvent(
 | 
			
		||||
                  new CustomEvent(`hotline.${_this.#id}.move`, {
 | 
			
		||||
                    detail: {
 | 
			
		||||
                      from: first.offset,
 | 
			
		||||
                      to: offset
 | 
			
		||||
                    }
 | 
			
		||||
                  })
 | 
			
		||||
                );
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }, _this.delay);
 | 
			
		||||
 | 
			
		||||
      if (this.hover) {
 | 
			
		||||
        // Запрошена возможность останавливать бегущую строку
 | 
			
		||||
 | 
			
		||||
        // Инициализация сдвига
 | 
			
		||||
        let offset = 0;
 | 
			
		||||
 | 
			
		||||
        // Инициализация слушателя события при перемещении элемента в бегущей строке
 | 
			
		||||
        const listener = function (e) {
 | 
			
		||||
          // Увеличение сдвига
 | 
			
		||||
          offset += e.detail.offset ?? 0;
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        // Инициализация обработчика наведения курсора (остановка движения)
 | 
			
		||||
        this.#shell.onmouseover = function (e) {
 | 
			
		||||
          // Курсор наведён на бегущую строку
 | 
			
		||||
 | 
			
		||||
          // Блокировка движения
 | 
			
		||||
          _this.#move = false;
 | 
			
		||||
 | 
			
		||||
          if (_this.events.get("move.block")) {
 | 
			
		||||
            // Запрошен вызов события: "блокировка движения"
 | 
			
		||||
 | 
			
		||||
            // Вызов события: "блокировка движения"
 | 
			
		||||
            document.dispatchEvent(
 | 
			
		||||
              new CustomEvent(`hotline.${_this.#id}.move.block`)
 | 
			
		||||
            );
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          if (_this.movable) {
 | 
			
		||||
            // Запрошена возможность двигать бегущую строку
 | 
			
		||||
 | 
			
		||||
            _this.#shell.onmousedown = function (onmousedown) {
 | 
			
		||||
              // Курсор активирован
 | 
			
		||||
 | 
			
		||||
              // Инициализация слушателей события перемещения элемента в бегущей строке
 | 
			
		||||
              document.addEventListener(
 | 
			
		||||
                `hotline.${_this.#id}.transfer.start`,
 | 
			
		||||
                listener
 | 
			
		||||
              );
 | 
			
		||||
              document.addEventListener(
 | 
			
		||||
                `hotline.${_this.#id}.transfer.end`,
 | 
			
		||||
                listener
 | 
			
		||||
              );
 | 
			
		||||
 | 
			
		||||
              // Инициализация буфера для временных данных
 | 
			
		||||
              let buffer;
 | 
			
		||||
 | 
			
		||||
              // Инициализация данных первого элемента в строке
 | 
			
		||||
              const first = {
 | 
			
		||||
                offset: isNaN(
 | 
			
		||||
                  (buffer = parseFloat(
 | 
			
		||||
                    _this.vertical
 | 
			
		||||
                      ? _this.#shell.firstElementChild.style.marginTop
 | 
			
		||||
                      : _this.#shell.firstElementChild.style.marginLeft
 | 
			
		||||
                  ))
 | 
			
		||||
                )
 | 
			
		||||
                  ? 0
 | 
			
		||||
                  : buffer
 | 
			
		||||
              };
 | 
			
		||||
 | 
			
		||||
              document.onmousemove = function (onmousemove) {
 | 
			
		||||
                // Курсор движется
 | 
			
		||||
 | 
			
		||||
                if (_this.vertical) {
 | 
			
		||||
                  // Вертикальная бегущая строка
 | 
			
		||||
 | 
			
		||||
                  // Инициализация буфера местоположения
 | 
			
		||||
                  const from = _this.#shell.firstElementChild.style.marginTop;
 | 
			
		||||
                  const to = onmousemove.pageY - (onmousedown.pageY + offset - first.offset);
 | 
			
		||||
 | 
			
		||||
                  // Движение
 | 
			
		||||
                  _this.#shell.firstElementChild.style.marginTop = to +
 | 
			
		||||
                    "px";
 | 
			
		||||
 | 
			
		||||
                  if (_this.events.get("onmousemove")) {
 | 
			
		||||
                    // Запрошен вызов события: "перемещение мышью"
 | 
			
		||||
 | 
			
		||||
                    // Вызов события: "перемещение мышью"
 | 
			
		||||
                    document.dispatchEvent(
 | 
			
		||||
                      new CustomEvent(`hotline.${_this.#id}.onmousemove`, {
 | 
			
		||||
                        detail: { from, to }
 | 
			
		||||
                      })
 | 
			
		||||
                    );
 | 
			
		||||
                  }
 | 
			
		||||
                } else {
 | 
			
		||||
                  // Горизонтальная бегущая строка
 | 
			
		||||
 | 
			
		||||
                  // Инициализация буфера местоположения
 | 
			
		||||
                  const from = _this.#shell.firstElementChild.style.marginLeft;
 | 
			
		||||
                  const to = onmousemove.pageX - (onmousedown.pageX + offset - first.offset);
 | 
			
		||||
 | 
			
		||||
                  // Движение
 | 
			
		||||
                  _this.#shell.firstElementChild.style.marginLeft = to + "px";
 | 
			
		||||
 | 
			
		||||
                  if (_this.events.get("onmousemove")) {
 | 
			
		||||
                    // Запрошен вызов события: "перемещение мышью"
 | 
			
		||||
 | 
			
		||||
                    // Вызов события: "перемещение мышью"
 | 
			
		||||
                    document.dispatchEvent(
 | 
			
		||||
                      new CustomEvent(`hotline.${_this.#id}.onmousemove`, {
 | 
			
		||||
                        detail: { from, to }
 | 
			
		||||
                      })
 | 
			
		||||
                    );
 | 
			
		||||
                  }
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                // Запись курсора
 | 
			
		||||
                _this.#shell.style.cursor = "grabbing";
 | 
			
		||||
              };
 | 
			
		||||
            };
 | 
			
		||||
 | 
			
		||||
            // Перещапись событий браузера (чтобы не дёргалось)
 | 
			
		||||
            _this.#shell.ondragstart = null;
 | 
			
		||||
 | 
			
		||||
            _this.#shell.onmouseup = function () {
 | 
			
		||||
              // Курсор деактивирован
 | 
			
		||||
 | 
			
		||||
              // Остановка обработки движения
 | 
			
		||||
              document.onmousemove = null;
 | 
			
		||||
 | 
			
		||||
              // Сброс сдвига
 | 
			
		||||
              offset = 0;
 | 
			
		||||
 | 
			
		||||
              document.removeEventListener(
 | 
			
		||||
                `hotline.${_this.#id}.transfer.start`,
 | 
			
		||||
                listener
 | 
			
		||||
              );
 | 
			
		||||
              document.removeEventListener(
 | 
			
		||||
                `hotline.${_this.#id}.transfer.end`,
 | 
			
		||||
                listener
 | 
			
		||||
              );
 | 
			
		||||
 | 
			
		||||
              // Восстановление курсора
 | 
			
		||||
              _this.#shell.style.cursor = null;
 | 
			
		||||
            };
 | 
			
		||||
          }
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
        // Инициализация обработчика отведения курсора (остановка движения)
 | 
			
		||||
        this.#shell.onmouseleave = function (onmouseleave) {
 | 
			
		||||
          // Курсор отведён от бегущей строки
 | 
			
		||||
 | 
			
		||||
          if (!_this.sticky) {
 | 
			
		||||
            // Отключено прилипание
 | 
			
		||||
 | 
			
		||||
            // Остановка обработки движения
 | 
			
		||||
            document.onmousemove = null;
 | 
			
		||||
 | 
			
		||||
            document.removeEventListener(
 | 
			
		||||
              `hotline.${_this.#id}.transfer.start`,
 | 
			
		||||
              listener
 | 
			
		||||
            );
 | 
			
		||||
            document.removeEventListener(
 | 
			
		||||
              `hotline.${_this.#id}.transfer.end`,
 | 
			
		||||
              listener
 | 
			
		||||
            );
 | 
			
		||||
 | 
			
		||||
            // Восстановление курсора
 | 
			
		||||
            _this.#shell.style.cursor = null;
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          // Сброс сдвига
 | 
			
		||||
          offset = 0;
 | 
			
		||||
 | 
			
		||||
          // Разблокировка движения
 | 
			
		||||
          _this.#move = true;
 | 
			
		||||
 | 
			
		||||
          if (_this.events.get("move.unblock")) {
 | 
			
		||||
            // Запрошен вызов события: "разблокировка движения"
 | 
			
		||||
 | 
			
		||||
            // Вызов события: "разблокировка движения"
 | 
			
		||||
            document.dispatchEvent(
 | 
			
		||||
              new CustomEvent(`hotline.${_this.#id}.move.unblock`)
 | 
			
		||||
            );
 | 
			
		||||
          }
 | 
			
		||||
        };
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      if (this.wheel) {
 | 
			
		||||
        // Запрошена возможность прокручивать колесом мыши
 | 
			
		||||
 | 
			
		||||
        // Инициализация обработчика наведения курсора (остановка движения)
 | 
			
		||||
        this.#shell.onwheel = function (e) {
 | 
			
		||||
          // Курсор наведён на бегущую
 | 
			
		||||
 | 
			
		||||
          // Инициализация буфера для временных данных
 | 
			
		||||
          let buffer;
 | 
			
		||||
 | 
			
		||||
          // Перемещение
 | 
			
		||||
          _this.offset(
 | 
			
		||||
            (isNaN(
 | 
			
		||||
              (buffer = parseFloat(
 | 
			
		||||
                _this.#shell.firstElementChild.style[
 | 
			
		||||
                _this.vertical ? "marginTop" : "marginLeft"
 | 
			
		||||
                ]
 | 
			
		||||
              ))
 | 
			
		||||
            )
 | 
			
		||||
              ? 0
 | 
			
		||||
              : buffer) +
 | 
			
		||||
            (_this.delta === null
 | 
			
		||||
              ? e.wheelDelta
 | 
			
		||||
              : e.wheelDelta > 0
 | 
			
		||||
                ? _this.delta
 | 
			
		||||
                : -_this.delta)
 | 
			
		||||
          );
 | 
			
		||||
        };
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (this.observe) {
 | 
			
		||||
      // Запрошено наблюдение за изменениями аттрибутов элемента бегущей строки
 | 
			
		||||
 | 
			
		||||
      if (this.#observer === null) {
 | 
			
		||||
        // Отсутствует наблюдатель
 | 
			
		||||
 | 
			
		||||
        // Инициализация ссылки на ядро
 | 
			
		||||
        const _this = this;
 | 
			
		||||
 | 
			
		||||
        // Инициализация наблюдателя
 | 
			
		||||
        this.#observer = new MutationObserver(function (mutations) {
 | 
			
		||||
          for (const mutation of mutations) {
 | 
			
		||||
            if (mutation.type === "attributes") {
 | 
			
		||||
              // Запись параметра в инстанцию бегущей строки
 | 
			
		||||
              _this.write(mutation.attributeName);
 | 
			
		||||
            }
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          // Перезапуск бегущей строки
 | 
			
		||||
          _this.restart();
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        // Активация наблюдения
 | 
			
		||||
        this.#observer.observe(this.#shell, {
 | 
			
		||||
          attributes: true
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    } else if (this.#observer instanceof MutationObserver) {
 | 
			
		||||
      // Запрошено отключение наблюдения
 | 
			
		||||
 | 
			
		||||
      // Деактивация наблюдения
 | 
			
		||||
      this.#observer.disconnect();
 | 
			
		||||
 | 
			
		||||
      // Удаление наблюдателя
 | 
			
		||||
      this.#observer = null;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (this.events.get("start")) {
 | 
			
		||||
      // Запрошен вызов события: "запуск"
 | 
			
		||||
 | 
			
		||||
      // Вызов события: "запуск"
 | 
			
		||||
      document.dispatchEvent(new CustomEvent(`hotline.${this.#id}.start`));
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  stop() {
 | 
			
		||||
    // Остановка бегущей строки
 | 
			
		||||
    clearInterval(this.#instance);
 | 
			
		||||
 | 
			
		||||
    // Удаление инстанции интервала
 | 
			
		||||
    this.#instance = null;
 | 
			
		||||
 | 
			
		||||
    if (this.events.get("stop")) {
 | 
			
		||||
      // Запрошен вызов события: "остановка"
 | 
			
		||||
 | 
			
		||||
      // Вызов события: "остановка"
 | 
			
		||||
      document.dispatchEvent(new CustomEvent(`hotline.${this.#id}.stop`));
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  restart() {
 | 
			
		||||
    // Остановка бегущей строки
 | 
			
		||||
    this.stop();
 | 
			
		||||
 | 
			
		||||
    // Запуск бегущей строки
 | 
			
		||||
    this.start();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  write(attribute) {
 | 
			
		||||
    // Инициализация названия параметра
 | 
			
		||||
    const parameter = (/^data-hotline-(\w+)$/.exec(attribute) ?? [, null])[1];
 | 
			
		||||
 | 
			
		||||
    if (typeof parameter === "string") {
 | 
			
		||||
      // Параметр найден
 | 
			
		||||
 | 
			
		||||
      // Проверка на разрешение изменения
 | 
			
		||||
      if (this.#block.has(parameter)) return;
 | 
			
		||||
 | 
			
		||||
      // Инициализация значения параметра
 | 
			
		||||
      const value = this.#shell.getAttribute(attribute);
 | 
			
		||||
 | 
			
		||||
      // Инициализация буфера для временных данных
 | 
			
		||||
      let buffer;
 | 
			
		||||
 | 
			
		||||
      // Запись параметра
 | 
			
		||||
      this[parameter] = isNaN((buffer = parseFloat(value)))
 | 
			
		||||
        ? value === "true"
 | 
			
		||||
          ? true
 | 
			
		||||
          : value === "false"
 | 
			
		||||
            ? false
 | 
			
		||||
            : value
 | 
			
		||||
        : buffer;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  offset(value) {
 | 
			
		||||
    // Запись отступа
 | 
			
		||||
    this.#shell.firstElementChild.style[
 | 
			
		||||
      this.vertical ? "marginTop" : "marginLeft"
 | 
			
		||||
    ] = value + "px";
 | 
			
		||||
 | 
			
		||||
    if (this.events.get("offset")) {
 | 
			
		||||
      // Запрошен вызов события: "сдвиг"
 | 
			
		||||
 | 
			
		||||
      // Вызов события: "сдвиг"
 | 
			
		||||
      document.dispatchEvent(
 | 
			
		||||
        new CustomEvent(`hotline.${this.#id}.offset`, {
 | 
			
		||||
          detail: {
 | 
			
		||||
            to: value
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      );
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  static preprocessing(event = false) {
 | 
			
		||||
    // Инициализация счётчиков инстанций горячей строки
 | 
			
		||||
    const success = new Set();
 | 
			
		||||
    let error = 0;
 | 
			
		||||
 | 
			
		||||
    for (const element of document.querySelectorAll('*[data-hotline="true"]')) {
 | 
			
		||||
      // Перебор бегущих строк
 | 
			
		||||
 | 
			
		||||
      if (typeof element.id === "string") {
 | 
			
		||||
        // Найден идентификатор
 | 
			
		||||
 | 
			
		||||
        // Инициализация инстанции бегущей строки
 | 
			
		||||
        const hotline = new this(element.id, element);
 | 
			
		||||
 | 
			
		||||
        for (const attribute of element.getAttributeNames()) {
 | 
			
		||||
          // Перебор аттрибутов
 | 
			
		||||
 | 
			
		||||
          // Запись параметра в инстанцию бегущей строки
 | 
			
		||||
          hotline.write(attribute);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Запуск бегущей строки
 | 
			
		||||
        hotline.start();
 | 
			
		||||
 | 
			
		||||
        // Запись инстанции бегущей строки в элемент
 | 
			
		||||
        element.hotline = hotline;
 | 
			
		||||
 | 
			
		||||
        // Запись в счётчик успешных инициализаций
 | 
			
		||||
        success.add(hotline);
 | 
			
		||||
      } else ++error;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (event) {
 | 
			
		||||
      // Запрошен вызов события: "предварительная подготовка"
 | 
			
		||||
 | 
			
		||||
      // Вызов события: "предварительная подготовка"
 | 
			
		||||
      document.dispatchEvent(
 | 
			
		||||
        new CustomEvent(`hotline.preprocessed`, {
 | 
			
		||||
          detail: {
 | 
			
		||||
            success,
 | 
			
		||||
            error
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      );
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
document.dispatchEvent(
 | 
			
		||||
  new CustomEvent("hotline.loaded", {
 | 
			
		||||
    detail: { hotline }
 | 
			
		||||
  })
 | 
			
		||||
);
 | 
			
		||||
@@ -1,2 +0,0 @@
 | 
			
		||||
/*! js-cookie v3.0.1 | MIT */
 | 
			
		||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,(function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}return function t(n,o){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=e({},o,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=t+"="+n.write(r,t)+c}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],o={},r=0;r<t.length;r++){var i=t[r].split("="),c=i.slice(1).join("=");try{var u=decodeURIComponent(i[0]);if(o[u]=n.read(c,u),e===u)break}catch(e){}}return e?o[e]:o}},remove:function(t,n){r(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}));
 | 
			
		||||
@@ -1,127 +0,0 @@
 | 
			
		||||
"use strict";
 | 
			
		||||
 | 
			
		||||
class troller {
 | 
			
		||||
    static what = {
 | 
			
		||||
        enable() {
 | 
			
		||||
            document.body.onmouseleave = function () {
 | 
			
		||||
                // if (Math.random() > 0.90) {
 | 
			
		||||
                // 10%
 | 
			
		||||
 | 
			
		||||
                troller.what.start();
 | 
			
		||||
                // }
 | 
			
		||||
            };
 | 
			
		||||
 | 
			
		||||
            document.body.onmouseenter = function () {
 | 
			
		||||
                troller.what.end();
 | 
			
		||||
            };
 | 
			
		||||
        },
 | 
			
		||||
        disable() {
 | 
			
		||||
            document.body.onmouseleave = document.body.onmouseenter = undefined;
 | 
			
		||||
        },
 | 
			
		||||
        start() {
 | 
			
		||||
            // Отображение изображения
 | 
			
		||||
            document.getElementById('what_image').classList.add('active');
 | 
			
		||||
 | 
			
		||||
            // Инициализация элемента со звуком
 | 
			
		||||
            const what_sound = document.getElementById('what_sound');
 | 
			
		||||
 | 
			
		||||
            // Воспроизведение звука
 | 
			
		||||
            what_sound.currentTime = 0;
 | 
			
		||||
            what_sound.play();
 | 
			
		||||
        },
 | 
			
		||||
        end() {
 | 
			
		||||
            // Сокрытие изображения
 | 
			
		||||
            document.getElementById('what_image').classList.remove('active');
 | 
			
		||||
 | 
			
		||||
            // Остановка звука
 | 
			
		||||
            document.getElementById('what_sound').pause();
 | 
			
		||||
        },
 | 
			
		||||
        single(event = 'onmouseleave') {
 | 
			
		||||
            if (typeof event === 'string') {
 | 
			
		||||
                // Получены обязательные входные параметры
 | 
			
		||||
                // Отображение изображения
 | 
			
		||||
                document.getElementById('what_image').classList.add('active');
 | 
			
		||||
 | 
			
		||||
                // Инициализация элемента со звуком
 | 
			
		||||
                const what_sound = document.getElementById('what_sound');
 | 
			
		||||
 | 
			
		||||
                // Воспроизведение звука
 | 
			
		||||
                what_sound.currentTime = 0;
 | 
			
		||||
                what_sound.play();
 | 
			
		||||
 | 
			
		||||
                document.body[event] = function () {
 | 
			
		||||
                    troller.what.end();
 | 
			
		||||
 | 
			
		||||
                    document.body[event] = undefined;
 | 
			
		||||
                };
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static vk() {
 | 
			
		||||
        setInterval(function () {
 | 
			
		||||
            const sound = document.getElementById('sound_vk');
 | 
			
		||||
 | 
			
		||||
            if (Math.random() > 0.95) {
 | 
			
		||||
                // 5%
 | 
			
		||||
 | 
			
		||||
                // Воспроизведение звука
 | 
			
		||||
                sound.currentTime = 0;
 | 
			
		||||
                sound.play();
 | 
			
		||||
            }
 | 
			
		||||
        }, 85000);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static whatsapp() {
 | 
			
		||||
        setInterval(function () {
 | 
			
		||||
            const sound = document.getElementById('sound_whatsup');
 | 
			
		||||
 | 
			
		||||
            if (Math.random() > 0.97) {
 | 
			
		||||
                // 3%
 | 
			
		||||
 | 
			
		||||
                // Воспроизведение звука
 | 
			
		||||
                sound.currentTime = 0;
 | 
			
		||||
                sound.play();
 | 
			
		||||
            }
 | 
			
		||||
        }, 125000);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    static iphone() {
 | 
			
		||||
        setInterval(function () {
 | 
			
		||||
            const sound = document.getElementById('sound_iphone');
 | 
			
		||||
 | 
			
		||||
            if (Math.random() > 0.98) {
 | 
			
		||||
                // 2%
 | 
			
		||||
 | 
			
		||||
                // Воспроизведение звука
 | 
			
		||||
                sound.currentTime = 0;
 | 
			
		||||
                sound.play();
 | 
			
		||||
            }
 | 
			
		||||
        }, 265000);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if (Math.random() > 0.90) {
 | 
			
		||||
    // 10%
 | 
			
		||||
 | 
			
		||||
    troller.what.enable();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if (Math.random() > 0.90) {
 | 
			
		||||
    // 10%
 | 
			
		||||
 | 
			
		||||
    troller.vk();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if (Math.random() > 0.90) {
 | 
			
		||||
    // 10%
 | 
			
		||||
 | 
			
		||||
    troller.whatsapp();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if (Math.random() > 0.90) {
 | 
			
		||||
    // 10%
 | 
			
		||||
 | 
			
		||||
    troller.iphone();
 | 
			
		||||
}
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 16 KiB  | 
@@ -1,14 +0,0 @@
 | 
			
		||||
{% block body %}
 | 
			
		||||
<section id="panel">
 | 
			
		||||
    {% if account %}
 | 
			
		||||
    {{ account.getKey() }}
 | 
			
		||||
    {% if vk %}
 | 
			
		||||
    {{ vk.mail }}
 | 
			
		||||
    {% endif %}
 | 
			
		||||
    {% else %}
 | 
			
		||||
    <button id="login" onclick="return account.authentication(this)">
 | 
			
		||||
        Войти в аккаунт
 | 
			
		||||
    </button>
 | 
			
		||||
    {% endif %}
 | 
			
		||||
</section>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
@@ -1,11 +0,0 @@
 | 
			
		||||
{% block body %}
 | 
			
		||||
<img src="/images/truth.jpg" alt="никому не показывай" style="position: absolute; left: 0; top: 0; width: 100%; height: 100%;">
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block js_init %}
 | 
			
		||||
<script>
 | 
			
		||||
    setTimeout(fn => {
 | 
			
		||||
        window.opener.vk.close();
 | 
			
		||||
    }, 2000);
 | 
			
		||||
</script>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
{% use 'hotline/index.html' with css as hotline_css, body as hotline_body, js as hotline_js, js_init as hotline_js_init %}
 | 
			
		||||
 | 
			
		||||
{% block css %}
 | 
			
		||||
{# {{ block('hotline_css') }} #}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block body %}
 | 
			
		||||
<aside>
 | 
			
		||||
    {{ block('hotline_body') }}
 | 
			
		||||
</aside>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block js %}
 | 
			
		||||
{# {{ block('hotline_js') }} #}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block js_init %}
 | 
			
		||||
{# {{ block('hotline_js_init') }} #}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
@@ -1,4 +0,0 @@
 | 
			
		||||
<footer>
 | 
			
		||||
    <!-- <p><a href="http://www.anybrowser.org/campaign/"><img src="/img/logos/any_browser.gif" width="278" height="44" alt="Доступно на любом браузере" /></a></p> -->
 | 
			
		||||
    <!-- <p><a href="/browsers"><img src="/img/logos/any_browser.gif" width="278" height="44" alt="Доступно на любом браузере" /></a></p> -->
 | 
			
		||||
</footer>
 | 
			
		||||
@@ -25,8 +25,6 @@
 | 
			
		||||
  {% endfor %}
 | 
			
		||||
	{% endblock %}
 | 
			
		||||
</main>
 | 
			
		||||
 | 
			
		||||
{# {% include 'footer.html' %} #}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block js %}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,2 @@
 | 
			
		||||
{% block js %}
 | 
			
		||||
<script type="text/javascript" src="/js/js.cookie.min.js" defer></script>
 | 
			
		||||
<script type="text/javascript" src="/js/account.js" defer></script>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,56 +0,0 @@
 | 
			
		||||
{% use 'hotline/index.html' with css as hotline_css, body as hotline_body, js as hotline_js %}
 | 
			
		||||
 | 
			
		||||
{% block css %}
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="/css/logo.css" />
 | 
			
		||||
{{ block('hotline_css') }}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block body %}
 | 
			
		||||
<div id="logo" class="unselectable">
 | 
			
		||||
    <h1>VIRUS</h1>
 | 
			
		||||
    <h4>Скачать вирусы бесплатно</h4>
 | 
			
		||||
 | 
			
		||||
    {% with %}
 | 
			
		||||
    {% set hotline = hotline|merge({'id': 'hotline_logo'}) %}
 | 
			
		||||
    {{ block('hotline_body') }}
 | 
			
		||||
    {% endwith %}
 | 
			
		||||
</div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
{% block js %}
 | 
			
		||||
{{ block('hotline_js') }}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block js_init %}
 | 
			
		||||
{{ block('hotline_js_init') }}
 | 
			
		||||
<script>
 | 
			
		||||
    document.addEventListener('hotline.loaded', function (e) {
 | 
			
		||||
        // Запуск препроцессора бегущих строк
 | 
			
		||||
 | 
			
		||||
        // Инициализация элемента бегущей строки
 | 
			
		||||
        const element_hotline = document.getElementById('hotline');
 | 
			
		||||
        const element_hotline_logo = document.getElementById('hotline_logo');
 | 
			
		||||
 | 
			
		||||
        // Инициализация слушателя
 | 
			
		||||
        element_hotline.hotline.events.set('move.block', true);
 | 
			
		||||
        element_hotline.hotline.events.set('move.unblock', true);
 | 
			
		||||
        element_hotline.hotline.events.set('onmousemove', true);
 | 
			
		||||
 | 
			
		||||
        document.addEventListener(`hotline.${element_hotline.id}.move.block`, function (e) {
 | 
			
		||||
            // Копирование блокировки
 | 
			
		||||
            element_hotline_logo.hotline.move = false;
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        document.addEventListener(`hotline.${element_hotline.id}.move.unblock`, function (e) {
 | 
			
		||||
            // Копирование блокировки
 | 
			
		||||
            element_hotline_logo.hotline.move = true;
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        document.addEventListener(`hotline.${element_hotline.id}.onmousemove`, function (e) {
 | 
			
		||||
            // Копирование перемещения
 | 
			
		||||
            element_hotline_logo.hotline.offset(e.detail.to);
 | 
			
		||||
        });
 | 
			
		||||
    });
 | 
			
		||||
</script>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Reference in New Issue
	
	Block a user