{% load static %}
{% load tt_chat %}

<!DOCTYPE html>
<html lang="{{ request.LANGUAGE_CODE }}">
<head>
    <meta charset="UTF-8">
{#    <meta name="viewport" content="width=100%,maximum-scale=5,minimum-scale=1,initial-scale=1">#}
    <meta name="viewport" content="width=device-width,maximum-scale=1,minimum-scale=1,initial-scale=1">

    <meta name="vapid-key" content="{{ vapid_key }}">

    {% include "inter/meta_names.html" %}
{#    <script src='{% static "js/jquery_v3_6_4.js" %}'> </script>#}

    <script type="text/javascript" src="{% static "js/jquery_3_2_1.js" %}"></script>
    <script type="text/javascript" src="{% static "js/moment_js.js" %}"></script>
    <script type="text/javascript" src="{% static "js/moment-with-locales.js" %}"></script>
    <script type="text/javascript" src="{% static "js/datarangepicker.js" %}"></script>
    <script type="text/javascript" src="{% static "js/push/registerSw.js" %}"></script>
    <script src="{% static "js/rangecalendartech.js" %}"></script>

    <link rel="stylesheet" href="{% static 'css/datarangepicker.css' %}" />
    <script src="{% static "js/global_js.js" %}"></script>
    <script src="{% static "js/chat_socket_start.js" %}"></script>
    {% if user and not user.is_anonymous %}
        <script src='{% static "js/chat_sockets.js" %}'></script>
        <script>

            {#var user_id = {{ user.id }}#}
            ws_url = `wss://{% get_ws_address %}/ws/socket-server/?user_id={{ user.id }}`;
            var chatSocket;
            init_ws()
            const beep = new Audio('/static/sounds/beep_2.mp3')
        </script>
        
    {% endif %}



    <link rel="stylesheet" href="{% static 'css/styles.css' %}">
    <link rel="stylesheet" href="{% static 'css/styles(boris).css' %}" >
    <link rel="stylesheet" href="{% static 'css/mobile_styles.css' %}">

    <script src='{% static "js/find_route.js" %}'></script>
    <script src="{% static "js/filters_functions_find_route.js" %}"></script>
    <script src="{% static "js/dynamic_loading_routes.js" %}"></script>
    <script src="{% static "js/user_profile.js" %}"></script>
    <script src="{% static "js/user_profile_2.js" %}"></script>
    <script src="{% static "js/ion.rangeSlider.min.js" %}"></script>
    <link rel="stylesheet" href="{% static "css/ion.rangeSlider.min.css" %}">


{#    <script src="{% static "js/range_calendar.js" %}"></script>#}
    <script src="{% static "js/range_calendar.js" %}"></script>

    {% block meta %}
    {% endblock %}

    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6320323599773844" crossorigin="anonymous"></script>

</head>

<body{% if page_type == 'routes' %} onscroll="scroll_ev(event,this)"{% endif %}>
    <div class="cookie_block">
        <div class="container_content_cookie_block">
            <div class="txt_cookie">Сайт использует файлы cookie. Просматривая этот сайт, Вы соглашаетесь
                <a class="a_cookie" href="#">с условиями использования cookie-файлов</a>
            </div>
            <button class="cookie_btn" onclick="setCokie()">Понятно</button>
        </div>
    </div>

    {% if page_type != 'routes' %}
        <script>
            let body = document.querySelector("body")
            body.style.display = 'none'
            body.style.transition = '1000ms'
        </script>
    {% endif %}
    {% if mobile == 'false' or mobile %}
    {% endif %}
        <div class="block_overlay  {% if page_type == 'profile' %}hidden{% elif page_type == 'routes' %} routes n_profile hidden{% else %}hidden n_profile{% endif %}" onclick="close_open_curtain()"></div>
        <div class="wrapper_main">

            {% include 'blocks/b_header.html' %}

                <div class="cut_width_f_curtain close{% if page_type == 'profile' %}{% else %} n_profile{% endif %} right" onclick="reAdressClickOnbackrground(event,this)">
                    <div class="menu_buttons curtain right {% if page_type == 'profile' %}{% if not mobile %}open{% else %}close{% endif %}{% else %} n_profile close{% endif %}" data-name="<img style='width: 15px;display: block;position: relative;bottom: 0;transform: rotate(270deg);' src='{% static "/img/svg/burger.svg" %}'>">

                        {% include "blocks/profile/b_buttons_menu_profile.html" %}
                        <div class="handler_menu close" onclick="open_curtain_w_btn_profile()">
                            <img class="btns_f_curtain close left" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
                            <div class="text_f_curtain left"><img style='width: 15px;display: block;position: relative;bottom: 0;transform: rotate(270deg);' src='{% static "/img/svg/burger.svg" %}'></div>
                            <img class="btns_f_curtain close right"  src="{% static 'img/svg/arrow_f_curtain.svg' %}">
                            <div class="clear_both"></div>
                        </div>
                    </div>
                </div>
            {% if page_type == 'routes' %}
                <div class="cut_width_f_curtain{% if page_type == 'profile' %}{% else %} n_profile{% endif %} left">
                    <div class="menu_buttons curtain left open first filters" data-name="<img style='width: 15px;display: block;position: relative;bottom: 0;transform: rotate(270deg);' src='{% static "/img/svg/filter.svg" %}'>">

                        {% include "forms/f_find_route_filters_form.html" %}
{#                        <div class="handler_menu close" onclick="open_curtain_w_contacts()">#}
{#                            <img class="btns_f_curtain close left" src="{% static 'img/svg/arrow_f_curtain.svg' %}">#}
{#                            <div class="text_f_curtain left"><img style='width: 15px;display: block;position: relative;bottom: 0;transform: rotate(270deg);' src='{% static "/img/svg/filter.svg" %}'></div>#}
{#                            <img class="btns_f_curtain close right"  src="{% static 'img/svg/arrow_f_curtain.svg' %}">#}
{#                            <div class="clear_both"></div>#}
{#                        </div>#}
                    </div>
                </div>
                <div class="handler_curtain_left close" onclick="open_curtain_w_contacts()">
                    <div class="container_content_handler_curtain_left">
                        <img class="arrows_handler_curtain_left" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
                        <img class="filter_img" src='{% static "/img/svg/filter.svg" %}'>
                        <img class="arrows_handler_curtain_left" src="{% static 'img/svg/arrow_f_curtain.svg' %}">
                    </div>
                </div>
            {% endif %}
            <div class="wrapper_content {% if page.url == 'customer_service'%} m_h_0 {% elif page.url == 'contacts' %}m_h_0{% elif request.path == '/test_404' %}m_h_0{% endif %}">

                {% block content %}
                {% endblock %}

                <div class="clear_both"></div>
            </div>

        </div>

        {% include 'blocks/b_footer.html' %}


</body>

</html>