
  <!-- <script src="/static/assets/vendor/jquery/dist/jquery.min.js"></script> -->
  <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  <script src="/static/assets/vendor/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
  <script src="/static/assets/vendor/js-cookie/js.cookie.js"></script>
  <script src="/static/assets/vendor/jquery.scrollbar/jquery.scrollbar.min.js"></script>
  <script src="/static/assets/vendor/jquery-scroll-lock/dist/jquery-scrollLock.min.js"></script>
  <script src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script>
  <script>
    let inactivityTimeout = 30 * 60 * 1000; // 10 seconds
    let lastActivity = Date.now();

    // Detect when the user interacts with the page
    window.addEventListener('click', () => {
        lastActivity = Date.now();
    });
    window.addEventListener('mousemove', () => {
        lastActivity = Date.now();
    });

    // Check for inactivity and redirect to logout page
    setInterval(() => {
        let now = Date.now();
        if (now - lastActivity > inactivityTimeout) {
            window.location.href = '/logout';
        }
    }, 1000);
</script>


