<!DOCTYPE html>
<head>
  <meta charset="utf-8">
  <title>Logout</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <style>
    iframe{visibility:hidden;position:absolute;left:0;top:0;height:0;width:0;border:none}
  </style>
</head>
<body>
  <script>
    var loaded = 0;
    var iframes = {{ size }};
    function redirect() {
      window.location.replace("{{ postLogoutRedirectUri }}");
    }
    function frameOnLoad() {
      loaded += 1;
      if (loaded === iframes) {
        redirect();
      }
    }
    Array.prototype.slice.call(document.querySelectorAll('iframe')).forEach(function (element) {
      element.onload = frameOnLoad;
    });
    setTimeout(redirect, {{ timeout }});
  </script>
  {{ frames|safe }}
</body>
</html>