<!doctype html>
<html lang="en" class="dark">
  <head>
    <!-- Build: 2025-10-28-cache-bust -->
    <meta charset="UTF-8" />
    <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="icon" type="image/x-icon" href="/favicons/favicon.ico" />
    <link rel="icon" type="image/svg+xml" href="/favicons/favicon.svg" />
    <link rel="icon" type="image/png" sizes="96x96" href="/favicons/favicon-96x96.png" />
    <link rel="apple-touch-icon" href="/favicons/apple-touch-icon.png" />
    <link rel="manifest" href="/manifest.json" />
    <meta name="theme-color" content="#0000fe" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <!-- Instagram in-app browser compatibility -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <!-- Disable social preview -->
    <meta name="robots" content="noindex,nofollow" />
    <meta property="og:type" content="website" />
    <meta property="og:title" content="" />
    <meta property="og:description" content="" />
    <meta property="og:image" content="" />
    <meta name="twitter:card" content="none" />
    <meta name="twitter:title" content="" />
    <meta name="twitter:description" content="" />
    <meta name="twitter:image" content="" />
    <!-- End disable social preview -->
    <base href="/" />
    <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=Work+Sans:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    <title>SwipeUp</title>
    
    <!-- Emergency cache clear script - runs before anything else -->
    <script>
      (function() {
        // Check if we need to force clear (version mismatch)
        const CURRENT_VERSION = 'v11-20251028';
        const storedVersion = localStorage.getItem('app_version');
        
        if (storedVersion !== CURRENT_VERSION) {
          console.log('🔥 Version mismatch detected, clearing all caches...');
          
          // Clear all service workers
          if ('serviceWorker' in navigator) {
            navigator.serviceWorker.getRegistrations().then(function(registrations) {
              for (let registration of registrations) {
                registration.unregister();
                console.log('🗑️ Unregistered service worker');
              }
              
              // Clear all caches
              if ('caches' in window) {
                caches.keys().then(function(names) {
                  for (let name of names) {
                    caches.delete(name);
                    console.log('🗑️ Deleted cache:', name);
                  }
                  
                  // Update version and force reload
                  localStorage.setItem('app_version', CURRENT_VERSION);
                  console.log('✅ Cache cleared, reloading page...');
                  
                  // Force hard reload after clearing
                  setTimeout(function() {
                    window.location.reload(true);
                  }, 500);
                });
              }
            });
          } else {
            // No service worker support, just update version
            localStorage.setItem('app_version', CURRENT_VERSION);
          }
        }
        
        // Global error handler to catch syntax errors from old cached files
        window.addEventListener('error', function(event) {
          if (event.message && event.message.includes('Unexpected token')) {
            console.error('🚨 Syntax error detected - likely old cached file. Force clearing...');
            
            // Mark that we need to clear
            localStorage.setItem('force_clear', 'true');
            
            // Unregister service workers and reload
            if ('serviceWorker' in navigator) {
              navigator.serviceWorker.getRegistrations().then(function(registrations) {
                for (let registration of registrations) {
                  registration.unregister();
                }
                
                // Clear caches
                if ('caches' in window) {
                  caches.keys().then(function(names) {
                    for (let name of names) {
                      caches.delete(name);
                    }
                    // Hard reload
                    window.location.reload(true);
                  });
                } else {
                  window.location.reload(true);
                }
              });
            } else {
              window.location.reload(true);
            }
          }
        }, true);
      })();
    </script>
    
    <!-- Fix for Vite HMR variables -->
    <script>
      window.__HMR_CONFIG_NAME__ = 'default';
      window.__BASE__ = '/';
      window.__HMR_BASE__ = '/';
      window.__SERVER_HOST__ = 'localhost:3000';
      window.__HMR_PROTOCOL__ = window.location.protocol === 'https:' ? 'wss' : 'ws';
      window.__HMR_HOSTNAME__ = 'localhost';
      window.__HMR_PORT__ = 3000;
      window.__HMR_DIRECT_TARGET__ = 'localhost:3000';
      window.__HMR_ENABLE_OVERLAY__ = true;
      window.__HMR_TIMEOUT__ = 30000;
    </script>
    <script type="module" crossorigin src="/assets/index-f-qsrf3l-1767721360290.js"></script>
    <link rel="modulepreload" crossorigin href="/assets/vendor-C0rdoFWB-1767721360290.js">
    <link rel="modulepreload" crossorigin href="/assets/ui-DQs02kqh-1767721360290.js">
    <link rel="stylesheet" crossorigin href="/assets/index-5hcuRuzC-1767721360290.css">
  </head>
  <body>
    <div id="root"></div>
  </body>
</html>