<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;500;600;700&family=Allura&display=swap" rel="stylesheet">
    <title>SpiralLearn from TDW</title>
    
    <!-- Matomo -->
    <script>
      var _paq = window._paq = window._paq || [];
      /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
      _paq.push(['trackPageView']);
      _paq.push(['enableLinkTracking']);
      (function() {
        var u="https://techdataworld.innocraft.cloud/";
        _paq.push(['setTrackerUrl', u+'matomo.php']);
        _paq.push(['setSiteId', '19']);
        var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
        g.async=true; g.src='https://cdn.matomo.cloud/techdataworld.innocraft.cloud/matomo.js'; s.parentNode.insertBefore(g,s);
      })();
    </script>
    <!-- End Matomo Code -->
    <script type="module" crossorigin src="/assets/index-d0q7g0a6.js"></script>
    <link rel="stylesheet" crossorigin href="/assets/index-BNkWyVmh.css">
  </head>
  <body>
    <div id="root"></div>
    <script>
      // Detect if we're getting HTML instead of JS (cached asset issue)
      window.addEventListener('error', function(e) {
        if (e.message && e.message.includes("Unexpected token '<'")) {
          // Clear all caches
          if ('caches' in window) {
            caches.keys().then(function(names) {
              names.forEach(function(name) {
                caches.delete(name);
              });
            });
          }
          // Force hard reload without cache
          window.location.href = window.location.href.split('?')[0] + '?v=' + Date.now();
        }
      }, true);
      
      // Also check on script load errors
      document.addEventListener('DOMContentLoaded', function() {
        const scripts = document.querySelectorAll('script[type="module"]');
        scripts.forEach(function(script) {
          script.addEventListener('error', function() {
            // If script fails to load, clear cache and reload
            if ('caches' in window) {
              caches.keys().then(function(names) {
                names.forEach(function(name) {
                  caches.delete(name);
                });
                window.location.href = window.location.href.split('?')[0] + '?v=' + Date.now();
              });
            } else {
              window.location.href = window.location.href.split('?')[0] + '?v=' + Date.now();
            }
          });
        });
      });
    </script>
  </body>
</html>
