{% load helpers %}
{% load plugins %}
{% load static %}

<script src="{% static 'jquery/jquery-3.6.0.min.js' %}"
        onerror="window.location='{% url 'media_failure' %}?filename=jquery/jquery-3.6.0.min.js'"></script>
<script src="{% static 'jquery-ui-1.13.1/jquery-ui.min.js' %}"
        onerror="window.location='{% url 'media_failure' %}?filename=jquery-ui-1.13.1/jquery-ui.min.js'"></script>
<script src="{% static 'bootstrap-3.4.1-dist/js/bootstrap.min.js' %}"
        onerror="window.location='{% url 'media_failure' %}?filename=bootstrap-3.4.1-dist/js/bootstrap.min.js'"></script>
<script src="{% static 'select2-4.0.13/select2.min.js' %}"
        onerror="window.location='{% url 'media_failure' %}?filename=select2-4.0.13/select2.min.js'"></script>
<script src="{% static 'clipboard.js-2.0.9/clipboard.min.js' %}"
        onerror="window.location='{% url 'media_failure' %}?filename=clipboard.js-2.0.9/clipboard.min.js'"></script>
<script src="{% static 'flatpickr-4.6.9/flatpickr.min.js' %}"
        onerror="window.location='{% url 'media_failure' %}?filename=flatpickr-4.6.9/flatpickr.min.js'"></script>
<script src="{% versioned_static 'js/forms.js' %}"
        onerror="window.location='{% url 'media_failure' %}?filename=js/forms.js'"></script>
<script src="{% versioned_static 'js/theme.js' %}"
        onerror="window.location='{% url 'media_failure' %}?filename=js/theme.js'"></script>
<script type="text/javascript">
    var nautobot_api_path = "{% url 'api-root' %}";
    var nautobot_csrf_token = "{{ csrf_token }}";
    var loading = $(".loading");
    $(document).ajaxStart(function() {
        loading.show();
    }).ajaxStop(function() {
        loading.hide();
    });
    // Applies bootstrap tooltip to all elements with the title attribute.
    $("[title]").tooltip();
</script>
