export function verifyStartup() { const checks = []; checks.push({ name: 'LocalStorage Available', test: () => { try { const test = '__storage_test__'; localStorage.setItem(test, test); localStorage.removeItem(test); return true; } catch (e) { return false; } } }); checks.push({ name: 'Fetch API Available', test: () => typeof fetch === 'function' }); checks.push({ name: 'Promises Available', test: () => typeof Promise === 'function' }); checks.push({ name: 'Custom Elements Supported', test: () => 'customElements' in window }); checks.push({ name: 'ES6 Modules Supported', test: () => { try { new Function('import("")'); return true; } catch (e) { return false; } } }); const results = { passed: [], failed: [] }; for (const check of checks) { try { if (check.test()) { results.passed.push(check.name); } else { results.failed.push(check.name); } } catch (error) { results.failed.push(`${check.name} (Error: ${error.message})`); } } return results; } export function showCompatibilityError(results) { document.body.innerHTML = `

Browser Not Supported

Your browser does not support the required features for this application.

Failed Checks:

${results.passed.length > 0 ? `

Passed Checks:

` : ''}

Recommended browsers:
Chrome 90+, Firefox 88+, Safari 14+, Edge 90+

`; }