{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/m4GjdZuMjdNzYV8auh1b/YW9kbkYjvpqi2aybtT0F/siteMetadata.js"],
  "sourcesContent": ["// Generated by Framer (d74aa50)\nexport default function metadata(params,activeLocale){return{customHTMLHeadEnd:\"<!-- head-global.html -->\\n<script src=\\\"https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2\\\"></script>\\n<script>\\n(function() {\\n  // Constants\\n  const SUPABASE_URL = 'https://pzyibcmienrysnctzttx.supabase.co';\\n  const SUPABASE_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InB6eWliY21pZW5yeXNuY3R6dHR4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDg1NjIxMzYsImV4cCI6MjA2NDEzODEzNn0.6dsKFWpk2XOyotN5buubDHzE8hAQXVcG4VYu9sa8Abc';\\n  \\n  // Page access mappings\\n  window.PAGE_ACCESS = {\\n    '/private/calculators': ['calculator', 'library', 'admin'],\\n    '/private/library': ['library', 'admin'],\\n    '/private/admin': ['admin']\\n  };\\n  \\n  // Initialize once globally\\n  if (!window.globalSupabaseClient) {\\n    window.globalSupabaseClient = window.supabase.createClient(SUPABASE_URL, SUPABASE_KEY);\\n  }\\n  \\n  // Auth state manager\\n  window.authManager = {\\n    session: null,\\n    profile: null,\\n    \\n    async checkAuth() {\\n      try {\\n        const { data: { session } } = await window.globalSupabaseClient.auth.getSession();\\n        this.session = session;\\n        \\n        if (session) {\\n          // Get profile data\\n          const { data: profile } = await window.globalSupabaseClient\\n            .from('user_profiles')\\n            .select('*')\\n            .eq('id', session.user.id)\\n            .single();\\n          \\n          this.profile = profile;\\n        }\\n        \\n        return { session: this.session, profile: this.profile };\\n      } catch (error) {\\n        console.error('Auth check failed:', error);\\n        return { session: null, profile: null };\\n      }\\n    },\\n    \\n    getAccessLevel() {\\n      return this.profile?.access_level || \\n             this.session?.user?.user_metadata?.access_level || \\n             null;\\n    },\\n    \\n    canAccess(requiredLevels) {\\n      const userLevel = this.getAccessLevel();\\n      return userLevel && requiredLevels.includes(userLevel);\\n    },\\n    \\n    redirect(url) {\\n      // Single, clean redirect\\n      window.location.replace(url);\\n    }\\n  };\\n  \\n  // Handle auth params in URL (magic links) - improved version\\n  window.authManager.handleAuthParams = async function() {\\n    const params = new URLSearchParams(window.location.search);\\n    const hashParams = new URLSearchParams(window.location.hash.substring(1));\\n    \\n    const hasAuthParams = \\n      params.has('access_token') || \\n      hashParams.has('access_token') || \\n      params.has('code') ||\\n      hashParams.has('type'); // Also check for type=magiclink\\n    \\n    if (hasAuthParams) {\\n      console.log('\uD83D\uDD17 Magic link detected, processing...');\\n      \\n      // Wait for Supabase to process the auth params\\n      await new Promise(resolve => setTimeout(resolve, 2000));\\n      \\n      // Clean URL\\n      window.history.replaceState({}, document.title, window.location.pathname);\\n      console.log('\u2705 Magic link processing complete');\\n    }\\n    \\n    return hasAuthParams;\\n  };\\n})();\\n\\n// Smart auth prefetching - fast for normal users, careful for magic links\\nwindow.authPromise = (async () => {\\n  if (window.authManager) {\\n    // Quick check: is this a magic link?\\n    const url = window.location.href;\\n    const isMagicLink = url.includes('access_token') || url.includes('type=magiclink') || url.includes('#access_token');\\n    \\n    if (isMagicLink) {\\n      console.log('\uD83D\uDD17 Magic link page - using careful timing');\\n      // For magic links: handle auth params first, then check\\n      const hadAuthParams = await window.authManager.handleAuthParams();\\n      if (hadAuthParams) {\\n        // Small additional wait after processing\\n        await new Promise(resolve => setTimeout(resolve, 500));\\n      }\\n    } else {\\n      console.log('\u26A1 Normal page - fast auth check');\\n      // For normal pages: no delay, check immediately\\n    }\\n    \\n    return await window.authManager.checkAuth();\\n  }\\n})();\\n</script>\",description:\"Thermobreak is the industry leader in high-performance thermal and acoustic insulation. Engineered with cutting-edge technology, delivering superior energy efficiency, durability, and reliability across commercial, industrial, and HVAC applications.\",favicon:\"https://framerusercontent.com/assets/kpKxWbV2u5Jwy95MAIPg8iGMdhw.svg\",robots:\"max-image-preview:large\",title:\"Thermobreak | Industry Leading Thermal & Acoustic Insulation\"};}export const metadataVersion=1;\nexport const __FramerMetadata__ = {\"exports\":{\"metadataVersion\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"default\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],
  "mappings": "AACe,SAARA,EAA0BC,EAAOC,EAAa,CAAC,MAAM,CAAC,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAo2H,YAAY,4PAA4P,QAAQ,uEAAuE,OAAO,0BAA0B,MAAM,8DAA8D,CAAE",
  "names": ["metadata", "params", "activeLocale"]
}
