Spaces:
Paused
Paused
Commit ·
587459d
1
Parent(s): d3bcad8
feat: complete HUBAPI overhaul (Security, i18n RTL, Dark/Light Mode, A11y & Performance fixes)
Browse files- HOSTINGER_DEPLOYMENT.md +194 -0
- app/actions/waitlist.ts +438 -0
- app/globals.css +29 -2
- app/layout.tsx +46 -8
- app/page.tsx +39 -93
- app/status/layout.tsx +27 -0
- app/status/page.tsx +316 -0
- components/AgentParticleCanvas.tsx +10 -2
- components/CinematicPreloader.tsx +170 -0
- components/CountdownBanner.tsx +147 -0
- components/CyberTicketModal.tsx +265 -100
- components/DottedMap.tsx +89 -6
- components/ExitIntentPopup.tsx +268 -0
- components/FeatureJourneyMap.tsx +32 -52
- components/FloatingCTA.tsx +70 -0
- components/GatewayMeshSection.tsx +80 -0
- components/HubLiveTerminal.tsx +3 -0
- components/LanguageContext.tsx +99 -0
- components/LanguageToggle.tsx +80 -0
- components/SkipToContent.tsx +15 -0
- components/StatsDisplay.tsx +27 -20
- components/TerminalSection.tsx +32 -0
- components/TestimonialsCarousel.tsx +168 -0
- components/ThreeTicketCard.tsx +336 -0
- components/TrustSection.tsx +210 -0
- components/WaitlistSocialProofTicker.tsx +14 -4
- components/comparison-table.tsx +51 -72
- components/faq-accordion.tsx +34 -39
- components/footer.tsx +27 -24
- components/header.tsx +9 -4
- components/hero-section.tsx +100 -53
- components/social-proof.tsx +4 -1
- components/ui/error-boundary.tsx +48 -0
- components/waitlist-form.tsx +227 -11
- data/waitlist-registrations.json +18 -0
- lib/languages.ts +502 -0
- package-lock.json +162 -0
- package.json +3 -0
HOSTINGER_DEPLOYMENT.md
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🌐 Hostinger Node.js & MySQL Deployment Guide — HUBAPI
|
| 2 |
+
|
| 3 |
+
This guide provides step-by-step instructions to configure, database-bind, and deploy the high-performance **HUBAPI** waitlist landing page onto **Hostinger Shared hosting (cPanel/hPanel)** or a **Hostinger VPS (Virtual Private Server)**.
|
| 4 |
+
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
## 📂 Table of Contents
|
| 8 |
+
1. [Shared Hosting (cPanel / hPanel) Node.js Setup](#1-shared-hosting-cpanel--hpanel-nodejs-setup)
|
| 9 |
+
2. [VPS Hosting Setup (PM2 & Nginx)](#2-vps-hosting-setup-pm2--nginx)
|
| 10 |
+
3. [MySQL Database Configuration](#3-mysql-database-configuration)
|
| 11 |
+
4. [Environment Variables Setup (`.env`)](#4-environment-variables-setup-env)
|
| 12 |
+
5. [Resend SMTP Welcomes Activation](#5-resend-smtp-welcomes-activation)
|
| 13 |
+
6. [Troubleshooting & Verifications](#6-troubleshooting--verifications)
|
| 14 |
+
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
## 1. Shared Hosting (cPanel / hPanel) Node.js Setup
|
| 18 |
+
|
| 19 |
+
Hostinger’s Shared Hosting supports running custom Node.js web applications through the **"Node.js"** panel inside **hPanel**.
|
| 20 |
+
|
| 21 |
+
### Steps to Initialize:
|
| 22 |
+
1. Log in to your **Hostinger hPanel**.
|
| 23 |
+
2. Search for **"Node.js"** under the **Advanced** section.
|
| 24 |
+
3. Click **Create Application** and configure the fields:
|
| 25 |
+
* **Node.js version**: Choose version `20.x` or later.
|
| 26 |
+
* **Application path**: Input the directory where you will upload the repository, e.g., `/domains/yourdomain.com/public_html`.
|
| 27 |
+
* **Application URL**: Select the subdomain or domain name (e.g., `https://yourdomain.com`).
|
| 28 |
+
* **Startup file**: Enter `node_modules/next/dist/bin/next` or set up a custom entry startup file like `server.js` (explained below).
|
| 29 |
+
|
| 30 |
+
### Optional: Custom Startup script (`server.js`)
|
| 31 |
+
If hPanel requires a custom startup file rather than pointing to `next` binary directly, create a file named `server.js` in the root of your application:
|
| 32 |
+
|
| 33 |
+
```javascript
|
| 34 |
+
const { createServer } = require("http");
|
| 35 |
+
const { parse } = require("url");
|
| 36 |
+
const next = require("next");
|
| 37 |
+
|
| 38 |
+
const dev = process.env.NODE_ENV !== "production";
|
| 39 |
+
const hostname = "localhost";
|
| 40 |
+
const port = process.env.PORT || 3000;
|
| 41 |
+
|
| 42 |
+
const app = next({ dev, hostname, port });
|
| 43 |
+
const handle = app.getRequestHandler();
|
| 44 |
+
|
| 45 |
+
app.prepare().then(() => {
|
| 46 |
+
createServer(async (req, res) => {
|
| 47 |
+
try {
|
| 48 |
+
const parsedUrl = parse(req.url, true);
|
| 49 |
+
await handle(req, res, parsedUrl);
|
| 50 |
+
} catch (err) {
|
| 51 |
+
console.error("Error occurred handling", req.url, err);
|
| 52 |
+
res.statusCode = 500;
|
| 53 |
+
res.end("internal server error");
|
| 54 |
+
}
|
| 55 |
+
}).listen(port, (err) => {
|
| 56 |
+
if (err) throw err;
|
| 57 |
+
console.log(`> Ready on http://${hostname}:${port}`);
|
| 58 |
+
});
|
| 59 |
+
});
|
| 60 |
+
```
|
| 61 |
+
Then set **Startup file** to `server.js`.
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
## 2. VPS Hosting Setup (PM2 & Nginx)
|
| 66 |
+
|
| 67 |
+
If you are deploying onto a **Hostinger VPS** using Ubuntu, follow this professional setup using **PM2** process manager and **Nginx** reverse proxy:
|
| 68 |
+
|
| 69 |
+
### Prerequisites:
|
| 70 |
+
```bash
|
| 71 |
+
# Update packages
|
| 72 |
+
sudo apt update && sudo apt upgrade -y
|
| 73 |
+
|
| 74 |
+
# Install Node.js v20
|
| 75 |
+
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
|
| 76 |
+
sudo apt-get install -y nodejs
|
| 77 |
+
|
| 78 |
+
# Verify installation
|
| 79 |
+
node -v && npm -v
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
### Build & Deploy:
|
| 83 |
+
1. Clone the project code to your VPS directory.
|
| 84 |
+
2. Inside `/hubapi`, execute the production build:
|
| 85 |
+
```bash
|
| 86 |
+
npm install --omit=dev
|
| 87 |
+
npm run build
|
| 88 |
+
```
|
| 89 |
+
3. Install **PM2** globally:
|
| 90 |
+
```bash
|
| 91 |
+
sudo npm install pm2 -g
|
| 92 |
+
```
|
| 93 |
+
4. Start the Next.js production server with PM2:
|
| 94 |
+
```bash
|
| 95 |
+
pm2 start npm --name "hubapi-prelaunch" -- start -- -p 3000
|
| 96 |
+
```
|
| 97 |
+
5. Save the PM2 process list and configure it to boot automatically on server restarts:
|
| 98 |
+
```bash
|
| 99 |
+
pm2 save
|
| 100 |
+
pm2 startup
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
### Nginx Reverse Proxy Setup:
|
| 104 |
+
```bash
|
| 105 |
+
sudo apt install nginx -y
|
| 106 |
+
sudo nano /etc/nginx/sites-available/hubapi
|
| 107 |
+
```
|
| 108 |
+
Paste this clean configuration (replace `yourdomain.com` with your actual domain):
|
| 109 |
+
```nginx
|
| 110 |
+
server {
|
| 111 |
+
listen 80;
|
| 112 |
+
server_name yourdomain.com www.yourdomain.com;
|
| 113 |
+
|
| 114 |
+
location / {
|
| 115 |
+
proxy_pass http://127.0.0.1:3000;
|
| 116 |
+
proxy_http_version 1.1;
|
| 117 |
+
proxy_set_header Upgrade $http_upgrade;
|
| 118 |
+
proxy_set_header Connection 'upgrade';
|
| 119 |
+
proxy_set_header Host $host;
|
| 120 |
+
proxy_cache_bypass $http_upgrade;
|
| 121 |
+
proxy_set_header X-Real-IP $remote_addr;
|
| 122 |
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
| 123 |
+
}
|
| 124 |
+
}
|
| 125 |
+
```
|
| 126 |
+
Enable the site and restart Nginx:
|
| 127 |
+
```bash
|
| 128 |
+
sudo ln -s /etc/nginx/sites-available/hubapi /etc/nginx/sites-enabled/
|
| 129 |
+
sudo nginx -t
|
| 130 |
+
sudo systemctl restart nginx
|
| 131 |
+
```
|
| 132 |
+
|
| 133 |
+
---
|
| 134 |
+
|
| 135 |
+
## 3. MySQL Database Configuration
|
| 136 |
+
|
| 137 |
+
This application features a **hybrid fallback mechanism**. If MySQL variables are not configured in your environment, registrations fall back seamlessly to local secure JSON records (`data/waitlist-registrations.json`).
|
| 138 |
+
|
| 139 |
+
### To Create a MySQL Database on Hostinger:
|
| 140 |
+
1. Navigate to **hPanel** -> **Databases** -> **MySQL Databases**.
|
| 141 |
+
2. Fill out the creation form:
|
| 142 |
+
* **MySQL Database Name**: Choose a name, e.g., `u123456_hubapi`.
|
| 143 |
+
* **MySQL Username**: Choose a secure username, e.g., `u123456_user`.
|
| 144 |
+
* **Password**: Create a high-entropy password.
|
| 145 |
+
3. Click **Create**. Copy down the host address (usually `localhost` or a specific IP address given by Hostinger).
|
| 146 |
+
|
| 147 |
+
> [!NOTE]
|
| 148 |
+
> The database schema is fully automated! The first waitlist form registration checks for the table `waitlist` and automatically runs a `CREATE TABLE IF NOT EXISTS` schema injection. You do not need to upload manual SQL files!
|
| 149 |
+
|
| 150 |
+
---
|
| 151 |
+
|
| 152 |
+
## 4. Environment Variables Setup (`.env`)
|
| 153 |
+
|
| 154 |
+
Create or update the `.env` (or `.env.production` / hPanel environment fields configuration) with the variables listed below:
|
| 155 |
+
|
| 156 |
+
```env
|
| 157 |
+
# Node Environment
|
| 158 |
+
NODE_ENV=production
|
| 159 |
+
PORT=3000
|
| 160 |
+
|
| 161 |
+
# Hostinger MySQL Database Parameters (Uncomment to enable DB integration)
|
| 162 |
+
DB_HOST=localhost
|
| 163 |
+
DB_USER=u123456_user
|
| 164 |
+
DB_PASSWORD=YourHighEntropyPasswordHere
|
| 165 |
+
DB_NAME=u123456_hubapi
|
| 166 |
+
|
| 167 |
+
# Resend API Key for Email Onboarding (Uncomment to enable emails)
|
| 168 |
+
RESEND_API_KEY=re_YOUR_RESEND_API_KEY_HERE
|
| 169 |
+
```
|
| 170 |
+
|
| 171 |
+
---
|
| 172 |
+
|
| 173 |
+
## 5. Resend SMTP Welcomes Activation
|
| 174 |
+
|
| 175 |
+
To automatically deliver beautifully-formatted HTML tickets to waitlist registrants, utilize a **Resend** account:
|
| 176 |
+
|
| 177 |
+
1. Sign up for a free developer account at [Resend](https://resend.com).
|
| 178 |
+
2. Go to **API Keys** -> click **Create API Key**. Copy this key.
|
| 179 |
+
3. Paste the key in your `.env` variables as `RESEND_API_KEY`.
|
| 180 |
+
4. *Recommendation*: Go to **Domains** in Resend and verify your custom sending domain by adding the requested TXT (SPF/DKIM) records to Hostinger's DNS Zone Editor. This improves inbox delivery.
|
| 181 |
+
5. In `app/actions/waitlist.ts`, you can configure the sender email address from `"HUBAPI <onboarding@resend.dev>"` to your verified custom address, e.g., `"HUBAPI <welcome@yourdomain.com>"`.
|
| 182 |
+
|
| 183 |
+
---
|
| 184 |
+
|
| 185 |
+
## 6. Troubleshooting & Verifications
|
| 186 |
+
|
| 187 |
+
### Check Dynamic Status:
|
| 188 |
+
After deployment, navigate to your status endpoint:
|
| 189 |
+
`https://yourdomain.com/status`
|
| 190 |
+
This page displays connection state maps and allows running diagnostics directly inside a virtual terminal to verify that routing channels are fully operational.
|
| 191 |
+
|
| 192 |
+
### Check Console Logs:
|
| 193 |
+
* **VPS**: Check standard PM2 logs with `pm2 logs`.
|
| 194 |
+
* **Shared Hosting**: Look at `stderr.log` or `stdout.log` inside the Node.js application directory to inspect any active SQL connection faults.
|
app/actions/waitlist.ts
ADDED
|
@@ -0,0 +1,438 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use server";
|
| 2 |
+
|
| 3 |
+
import fs from "fs";
|
| 4 |
+
import path from "path";
|
| 5 |
+
import { headers } from "next/headers";
|
| 6 |
+
import crypto from "crypto";
|
| 7 |
+
import mysql from "mysql2/promise";
|
| 8 |
+
|
| 9 |
+
const REGISTRATIONS_FILE = path.join(process.cwd(), "data", "waitlist-registrations.json");
|
| 10 |
+
|
| 11 |
+
export interface RegistrationResult {
|
| 12 |
+
success: boolean;
|
| 13 |
+
error?: string;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
// Set up MySQL connection pool if environment variables are provided
|
| 17 |
+
let pool: mysql.Pool | null = null;
|
| 18 |
+
if (
|
| 19 |
+
process.env.DB_HOST &&
|
| 20 |
+
process.env.DB_USER &&
|
| 21 |
+
process.env.DB_NAME
|
| 22 |
+
) {
|
| 23 |
+
try {
|
| 24 |
+
pool = mysql.createPool({
|
| 25 |
+
host: process.env.DB_HOST,
|
| 26 |
+
user: process.env.DB_USER,
|
| 27 |
+
password: process.env.DB_PASSWORD,
|
| 28 |
+
database: process.env.DB_NAME,
|
| 29 |
+
waitForConnections: true,
|
| 30 |
+
connectionLimit: 5,
|
| 31 |
+
queueLimit: 0,
|
| 32 |
+
connectTimeout: 10000,
|
| 33 |
+
});
|
| 34 |
+
console.log("Successfully initialized MySQL connection pool.");
|
| 35 |
+
} catch (err) {
|
| 36 |
+
console.error("Failed to initialize MySQL pool:", err);
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
// Generate stable ticket number purely based on email
|
| 41 |
+
const getTicketNumber = (emailStr: string): string => {
|
| 42 |
+
let hash = 0;
|
| 43 |
+
for (let i = 0; i < emailStr.length; i++) {
|
| 44 |
+
hash = emailStr.charCodeAt(i) + ((hash << 5) - hash);
|
| 45 |
+
}
|
| 46 |
+
const number = Math.abs(hash % 90000) + 10000;
|
| 47 |
+
return `00${number}`.slice(-6).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
| 48 |
+
};
|
| 49 |
+
|
| 50 |
+
// Ensure MySQL waitlist table exists
|
| 51 |
+
async function ensureMySQLTable(connection: mysql.PoolConnection) {
|
| 52 |
+
await connection.query(`
|
| 53 |
+
CREATE TABLE IF NOT EXISTS waitlist (
|
| 54 |
+
id INT AUTO_INCREMENT PRIMARY KEY,
|
| 55 |
+
email VARCHAR(255) UNIQUE NOT NULL,
|
| 56 |
+
timestamp VARCHAR(255) NOT NULL,
|
| 57 |
+
ip_hash VARCHAR(64) NOT NULL,
|
| 58 |
+
variant VARCHAR(50) DEFAULT 'classic'
|
| 59 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
| 60 |
+
`);
|
| 61 |
+
try {
|
| 62 |
+
await connection.query("ALTER TABLE waitlist ADD COLUMN variant VARCHAR(50) DEFAULT 'classic'");
|
| 63 |
+
} catch {
|
| 64 |
+
// Column might already exist or table can be altered in older MySQL
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
function escapeHtml(unsafe: string): string {
|
| 69 |
+
return unsafe.replace(/[&<>"']/g, (m) => {
|
| 70 |
+
switch (m) {
|
| 71 |
+
case "&": return "&";
|
| 72 |
+
case "<": return "<";
|
| 73 |
+
case ">": return ">";
|
| 74 |
+
case '"': return """;
|
| 75 |
+
case "'": return "'";
|
| 76 |
+
default: return m;
|
| 77 |
+
}
|
| 78 |
+
});
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
// Resend REST email dispatcher
|
| 82 |
+
async function sendWelcomeEmail(email: string, ticketNo: string) {
|
| 83 |
+
const apiKey = process.env.RESEND_API_KEY;
|
| 84 |
+
if (!apiKey) {
|
| 85 |
+
console.log("Resend API Key is missing. Skipping email dispatch.");
|
| 86 |
+
return;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
const cleanTicketNo = escapeHtml(ticketNo);
|
| 90 |
+
const referralLink = escapeHtml(`https://hubapi.dev?ref=HUBAPI-${ticketNo.replace(",", "")}`);
|
| 91 |
+
const accessCode = escapeHtml(`HUBAPI-ACC-${ticketNo.replace(",", "")}-${email.split("@")[0].toUpperCase()}`);
|
| 92 |
+
|
| 93 |
+
const emailHtml = `
|
| 94 |
+
<!DOCTYPE html>
|
| 95 |
+
<html lang="en">
|
| 96 |
+
<head>
|
| 97 |
+
<meta charset="utf-8">
|
| 98 |
+
<title>HUBAPI ACCESS PASS APPROVED</title>
|
| 99 |
+
<style>
|
| 100 |
+
body {
|
| 101 |
+
background-color: #09090b;
|
| 102 |
+
color: #e4e4e7;
|
| 103 |
+
font-family: monospace;
|
| 104 |
+
margin: 0;
|
| 105 |
+
padding: 40px 20px;
|
| 106 |
+
}
|
| 107 |
+
.container {
|
| 108 |
+
max-width: 600px;
|
| 109 |
+
margin: 0 auto;
|
| 110 |
+
background-color: #020202;
|
| 111 |
+
border: 1px solid #f59e0b;
|
| 112 |
+
border-radius: 8px;
|
| 113 |
+
padding: 30px;
|
| 114 |
+
box-shadow: 0 0 30px rgba(245, 158, 11, 0.15);
|
| 115 |
+
}
|
| 116 |
+
.header {
|
| 117 |
+
border-bottom: 1px solid #27272a;
|
| 118 |
+
padding-bottom: 20px;
|
| 119 |
+
margin-bottom: 25px;
|
| 120 |
+
text-align: center;
|
| 121 |
+
}
|
| 122 |
+
.logo {
|
| 123 |
+
color: #fbbf24;
|
| 124 |
+
font-size: 28px;
|
| 125 |
+
font-weight: bold;
|
| 126 |
+
letter-spacing: 0.15em;
|
| 127 |
+
}
|
| 128 |
+
.title {
|
| 129 |
+
font-size: 18px;
|
| 130 |
+
color: #ffffff;
|
| 131 |
+
margin-top: 10px;
|
| 132 |
+
text-transform: uppercase;
|
| 133 |
+
letter-spacing: 0.05em;
|
| 134 |
+
}
|
| 135 |
+
.badge {
|
| 136 |
+
background-color: rgba(245, 158, 11, 0.1);
|
| 137 |
+
border: 1px solid rgba(245, 158, 11, 0.3);
|
| 138 |
+
color: #fbbf24;
|
| 139 |
+
display: inline-block;
|
| 140 |
+
padding: 6px 12px;
|
| 141 |
+
font-size: 11px;
|
| 142 |
+
font-weight: bold;
|
| 143 |
+
text-transform: uppercase;
|
| 144 |
+
margin-bottom: 20px;
|
| 145 |
+
}
|
| 146 |
+
.ticket-box {
|
| 147 |
+
border: 1px dashed rgba(255, 255, 255, 0.15);
|
| 148 |
+
background-color: rgba(255, 255, 255, 0.02);
|
| 149 |
+
padding: 20px;
|
| 150 |
+
border-radius: 6px;
|
| 151 |
+
margin: 25px 0;
|
| 152 |
+
text-align: center;
|
| 153 |
+
}
|
| 154 |
+
.ticket-number {
|
| 155 |
+
font-size: 38px;
|
| 156 |
+
font-weight: bold;
|
| 157 |
+
color: #ffffff;
|
| 158 |
+
margin: 10px 0;
|
| 159 |
+
letter-spacing: 0.05em;
|
| 160 |
+
}
|
| 161 |
+
.code-box {
|
| 162 |
+
background-color: #09090b;
|
| 163 |
+
border: 1px solid #27272a;
|
| 164 |
+
padding: 10px;
|
| 165 |
+
font-size: 12px;
|
| 166 |
+
color: #fbbf24;
|
| 167 |
+
word-break: break-all;
|
| 168 |
+
margin-top: 8px;
|
| 169 |
+
}
|
| 170 |
+
.info-text {
|
| 171 |
+
font-size: 12px;
|
| 172 |
+
line-height: 1.6;
|
| 173 |
+
color: #a1a1aa;
|
| 174 |
+
}
|
| 175 |
+
.btn {
|
| 176 |
+
display: inline-block;
|
| 177 |
+
background-color: #fbbf24;
|
| 178 |
+
color: #000000;
|
| 179 |
+
text-decoration: none;
|
| 180 |
+
padding: 12px 24px;
|
| 181 |
+
font-weight: bold;
|
| 182 |
+
font-size: 12px;
|
| 183 |
+
text-transform: uppercase;
|
| 184 |
+
letter-spacing: 0.1em;
|
| 185 |
+
margin: 20px 0;
|
| 186 |
+
border-radius: 4px;
|
| 187 |
+
}
|
| 188 |
+
.footer {
|
| 189 |
+
border-top: 1px solid #27272a;
|
| 190 |
+
padding-top: 20px;
|
| 191 |
+
margin-top: 30px;
|
| 192 |
+
font-size: 9px;
|
| 193 |
+
color: #52525b;
|
| 194 |
+
text-align: center;
|
| 195 |
+
line-height: 1.5;
|
| 196 |
+
}
|
| 197 |
+
</style>
|
| 198 |
+
</head>
|
| 199 |
+
<body>
|
| 200 |
+
<div class="container">
|
| 201 |
+
<div class="header">
|
| 202 |
+
<div class="logo">CPU_HUBAPI</div>
|
| 203 |
+
<div class="title">Neural Grid Entrance Approved</div>
|
| 204 |
+
</div>
|
| 205 |
+
|
| 206 |
+
<div style="text-align: center;">
|
| 207 |
+
<div class="badge">SECURE_ONBOARDING // PASS</div>
|
| 208 |
+
</div>
|
| 209 |
+
|
| 210 |
+
<p class="info-text">
|
| 211 |
+
Visitor identification verified. Your registration has been registered into the Neural Grid Gateway waitlist.
|
| 212 |
+
</p>
|
| 213 |
+
|
| 214 |
+
<div class="ticket-box">
|
| 215 |
+
<div style="font-size: 10px; color: #71717a; text-transform: uppercase;">Allocated Grid Position</div>
|
| 216 |
+
<div class="ticket-number">#${cleanTicketNo}</div>
|
| 217 |
+
<div style="font-size: 10px; color: #71717a; text-transform: uppercase; margin-top: 15px;">Secure Access Token</div>
|
| 218 |
+
<div class="code-box">${accessCode}</div>
|
| 219 |
+
</div>
|
| 220 |
+
|
| 221 |
+
<p class="info-text">
|
| 222 |
+
Want to move up in the queue? Share your unique referral link with other developers. For every colleague who joins via your link, your system priority rank will advance:
|
| 223 |
+
</p>
|
| 224 |
+
|
| 225 |
+
<div style="text-align: center; margin: 15px 0;">
|
| 226 |
+
<a href="${referralLink}" class="btn">Share referral Grid Link</a>
|
| 227 |
+
</div>
|
| 228 |
+
|
| 229 |
+
<p class="info-text" style="font-size: 11px;">
|
| 230 |
+
<strong>Referral URL:</strong><br>
|
| 231 |
+
<a href="${referralLink}" style="color: #fbbf24; text-decoration: none;">${referralLink}</a>
|
| 232 |
+
</p>
|
| 233 |
+
|
| 234 |
+
<p class="info-text" style="margin-top: 25px;">
|
| 235 |
+
Welcome to the high-performance routing mesh.
|
| 236 |
+
</p>
|
| 237 |
+
|
| 238 |
+
<div class="footer">
|
| 239 |
+
HUBAPI NEURAL EDGE MESH GATEWAY PROTOCOLS<br>
|
| 240 |
+
This is a simulated marketing notice for early developer registrations.<br>
|
| 241 |
+
© 2026 HUBAPI. All rights reserved.
|
| 242 |
+
</div>
|
| 243 |
+
</div>
|
| 244 |
+
</body>
|
| 245 |
+
</html>
|
| 246 |
+
`;
|
| 247 |
+
|
| 248 |
+
try {
|
| 249 |
+
const res = await fetch("https://api.resend.com/emails", {
|
| 250 |
+
method: "POST",
|
| 251 |
+
headers: {
|
| 252 |
+
"Content-Type": "application/json",
|
| 253 |
+
Authorization: `Bearer ${apiKey}`,
|
| 254 |
+
},
|
| 255 |
+
body: JSON.stringify({
|
| 256 |
+
from: "HUBAPI <onboarding@resend.dev>",
|
| 257 |
+
to: email,
|
| 258 |
+
subject: `HUBAPI Access Granted // Ticket #${cleanTicketNo}`,
|
| 259 |
+
html: emailHtml,
|
| 260 |
+
}),
|
| 261 |
+
});
|
| 262 |
+
|
| 263 |
+
if (res.ok) {
|
| 264 |
+
console.log("Welcome email sent successfully via Resend API to:", email);
|
| 265 |
+
} else {
|
| 266 |
+
const errText = await res.text();
|
| 267 |
+
console.error("Resend API response error:", errText);
|
| 268 |
+
}
|
| 269 |
+
} catch (err) {
|
| 270 |
+
console.error("Failed to send welcome email via Resend:", err);
|
| 271 |
+
}
|
| 272 |
+
}
|
| 273 |
+
|
| 274 |
+
export async function registerWaitlist(formData: FormData): Promise<RegistrationResult> {
|
| 275 |
+
const email = formData.get("email")?.toString().trim();
|
| 276 |
+
const variant = formData.get("variant")?.toString().trim() || "classic";
|
| 277 |
+
|
| 278 |
+
if (!email) {
|
| 279 |
+
return { success: false, error: "Email address is required." };
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
// Basic email pattern check
|
| 283 |
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
| 284 |
+
if (!emailRegex.test(email)) {
|
| 285 |
+
return { success: false, error: "Please enter a valid email address." };
|
| 286 |
+
}
|
| 287 |
+
|
| 288 |
+
const headerList = await headers();
|
| 289 |
+
const rawIp = headerList.get("x-forwarded-for")?.split(",")[0] || headerList.get("x-real-ip") || "127.0.0.1";
|
| 290 |
+
const ipHash = crypto.createHash("sha256").update(rawIp).digest("hex");
|
| 291 |
+
const ticketNo = getTicketNumber(email);
|
| 292 |
+
|
| 293 |
+
// 1. MySQL Execution Flow (Primary if Pool exists)
|
| 294 |
+
if (pool) {
|
| 295 |
+
let connection: mysql.PoolConnection | null = null;
|
| 296 |
+
try {
|
| 297 |
+
connection = await pool.getConnection();
|
| 298 |
+
await ensureMySQLTable(connection);
|
| 299 |
+
|
| 300 |
+
// Check if email already registered
|
| 301 |
+
const [emailCheck] = await connection.query<mysql.RowDataPacket[]>(
|
| 302 |
+
"SELECT id FROM waitlist WHERE LOWER(email) = LOWER(?) LIMIT 1",
|
| 303 |
+
[email]
|
| 304 |
+
);
|
| 305 |
+
|
| 306 |
+
if (emailCheck.length > 0) {
|
| 307 |
+
connection.release();
|
| 308 |
+
return { success: false, error: "This email is already registered on the waitlist." };
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
// Rate Limiting checks
|
| 312 |
+
const [ipCheck] = await connection.query<mysql.RowDataPacket[]>(
|
| 313 |
+
"SELECT timestamp FROM waitlist WHERE ip_hash = ? ORDER BY timestamp DESC",
|
| 314 |
+
[ipHash]
|
| 315 |
+
);
|
| 316 |
+
|
| 317 |
+
const now = Date.now();
|
| 318 |
+
const tooFast = ipCheck.some((row) => {
|
| 319 |
+
const diff = now - new Date(row.timestamp).getTime();
|
| 320 |
+
return diff < 60000; // 60 seconds
|
| 321 |
+
});
|
| 322 |
+
|
| 323 |
+
if (tooFast) {
|
| 324 |
+
connection.release();
|
| 325 |
+
return { success: false, error: "Please wait 60 seconds before submitting another request." };
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
if (ipCheck.length >= 5) {
|
| 329 |
+
connection.release();
|
| 330 |
+
return { success: false, error: "Limit reached. You have reached the maximum number of registrations allowed from this device." };
|
| 331 |
+
}
|
| 332 |
+
|
| 333 |
+
// Insert new registration
|
| 334 |
+
const timestamp = new Date().toISOString();
|
| 335 |
+
await connection.query(
|
| 336 |
+
"INSERT INTO waitlist (email, timestamp, ip_hash, variant) VALUES (?, ?, ?, ?)",
|
| 337 |
+
[email, timestamp, ipHash, variant]
|
| 338 |
+
);
|
| 339 |
+
|
| 340 |
+
connection.release();
|
| 341 |
+
console.log(`[MySQL] Registered waitlist email: ${email}`);
|
| 342 |
+
|
| 343 |
+
// Dispatch welcome email asynchronously via Resend
|
| 344 |
+
sendWelcomeEmail(email, ticketNo);
|
| 345 |
+
|
| 346 |
+
return { success: true };
|
| 347 |
+
} catch (dbErr) {
|
| 348 |
+
console.error("[MySQL] Error occurred, falling back to local JSON:", dbErr);
|
| 349 |
+
if (connection) {
|
| 350 |
+
try {
|
| 351 |
+
connection.release();
|
| 352 |
+
} catch {}
|
| 353 |
+
}
|
| 354 |
+
// Fall through to JSON storage
|
| 355 |
+
}
|
| 356 |
+
}
|
| 357 |
+
|
| 358 |
+
interface LocalRegistration {
|
| 359 |
+
email: string;
|
| 360 |
+
timestamp: string;
|
| 361 |
+
ipHash: string;
|
| 362 |
+
variant: string;
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
// 2. JSON Fallback Execution Flow
|
| 366 |
+
try {
|
| 367 |
+
// Ensure data directory exists
|
| 368 |
+
const dataDir = path.dirname(REGISTRATIONS_FILE);
|
| 369 |
+
if (!fs.existsSync(dataDir)) {
|
| 370 |
+
fs.mkdirSync(dataDir, { recursive: true });
|
| 371 |
+
}
|
| 372 |
+
|
| 373 |
+
let registrations: LocalRegistration[] = [];
|
| 374 |
+
|
| 375 |
+
if (fs.existsSync(REGISTRATIONS_FILE)) {
|
| 376 |
+
const fileData = fs.readFileSync(REGISTRATIONS_FILE, "utf-8");
|
| 377 |
+
try {
|
| 378 |
+
registrations = JSON.parse(fileData);
|
| 379 |
+
if (!Array.isArray(registrations)) {
|
| 380 |
+
registrations = [];
|
| 381 |
+
}
|
| 382 |
+
} catch {
|
| 383 |
+
registrations = [];
|
| 384 |
+
}
|
| 385 |
+
}
|
| 386 |
+
|
| 387 |
+
// Check if email already registered
|
| 388 |
+
const exists = registrations.some(
|
| 389 |
+
(reg) => reg.email.toLowerCase() === email.toLowerCase()
|
| 390 |
+
);
|
| 391 |
+
|
| 392 |
+
if (exists) {
|
| 393 |
+
return { success: false, error: "This email is already registered on the waitlist." };
|
| 394 |
+
}
|
| 395 |
+
|
| 396 |
+
// Rate Limiting (F9)
|
| 397 |
+
const userRegistrations = registrations.filter((reg) => reg.ipHash === ipHash);
|
| 398 |
+
|
| 399 |
+
// Limit 1 submission per 60 seconds
|
| 400 |
+
const now = Date.now();
|
| 401 |
+
const tooFast = userRegistrations.some((reg) => {
|
| 402 |
+
const diff = now - new Date(reg.timestamp).getTime();
|
| 403 |
+
return diff < 60000; // 60 seconds
|
| 404 |
+
});
|
| 405 |
+
|
| 406 |
+
if (tooFast) {
|
| 407 |
+
return { success: false, error: "Please wait 60 seconds before submitting another request." };
|
| 408 |
+
}
|
| 409 |
+
|
| 410 |
+
// Limit absolute total to 5 registrations per hashed IP (protect JSON from bloating)
|
| 411 |
+
if (userRegistrations.length >= 5) {
|
| 412 |
+
return { success: false, error: "Limit reached. You have reached the maximum number of registrations allowed from this device." };
|
| 413 |
+
}
|
| 414 |
+
|
| 415 |
+
// Add new registration
|
| 416 |
+
registrations.push({
|
| 417 |
+
email,
|
| 418 |
+
timestamp: new Date().toISOString(),
|
| 419 |
+
ipHash,
|
| 420 |
+
variant,
|
| 421 |
+
});
|
| 422 |
+
|
| 423 |
+
fs.writeFileSync(REGISTRATIONS_FILE, JSON.stringify(registrations, null, 2), "utf-8");
|
| 424 |
+
console.log(`[JSON] Registered waitlist email: ${email}`);
|
| 425 |
+
|
| 426 |
+
// Dispatch welcome email asynchronously via Resend
|
| 427 |
+
sendWelcomeEmail(email, ticketNo);
|
| 428 |
+
|
| 429 |
+
return { success: true };
|
| 430 |
+
} catch (err) {
|
| 431 |
+
console.error("[JSON] Waitlist storage error:", err);
|
| 432 |
+
return {
|
| 433 |
+
success: false,
|
| 434 |
+
error: "Internal server error occurred. Please try again later.",
|
| 435 |
+
};
|
| 436 |
+
}
|
| 437 |
+
}
|
| 438 |
+
|
app/globals.css
CHANGED
|
@@ -15,6 +15,7 @@
|
|
| 15 |
--font-mono: var(--font-geist-mono);
|
| 16 |
--font-bebas: var(--font-bebas-neue);
|
| 17 |
--font-display: var(--font-display);
|
|
|
|
| 18 |
}
|
| 19 |
|
| 20 |
body {
|
|
@@ -274,6 +275,9 @@ body {
|
|
| 274 |
.font-fast-hand {
|
| 275 |
font-family: var(--font-fast-hand), sans-serif;
|
| 276 |
}
|
|
|
|
|
|
|
|
|
|
| 277 |
}
|
| 278 |
|
| 279 |
:root {
|
|
@@ -357,9 +361,10 @@ body {
|
|
| 357 |
position: fixed;
|
| 358 |
inset: 0;
|
| 359 |
z-index: -30;
|
| 360 |
-
opacity: 0.
|
| 361 |
pointer-events: none;
|
| 362 |
-
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0
|
|
|
|
| 363 |
}
|
| 364 |
|
| 365 |
/* Subtle micro-glows & typography */
|
|
@@ -492,4 +497,26 @@ body {
|
|
| 492 |
--primary: oklch(0.35 0.12 65); /* Deep Rich Luxury Gold inside light cards */
|
| 493 |
--primary-foreground: oklch(0.985 0.006 85); /* Light text on dark gold button inside light cards */
|
| 494 |
--primary-glow: oklch(0.35 0.12 65 / 18%);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 495 |
}
|
|
|
|
| 15 |
--font-mono: var(--font-geist-mono);
|
| 16 |
--font-bebas: var(--font-bebas-neue);
|
| 17 |
--font-display: var(--font-display);
|
| 18 |
+
--font-arabic: var(--font-arabic);
|
| 19 |
}
|
| 20 |
|
| 21 |
body {
|
|
|
|
| 275 |
.font-fast-hand {
|
| 276 |
font-family: var(--font-fast-hand), sans-serif;
|
| 277 |
}
|
| 278 |
+
.font-arabic {
|
| 279 |
+
font-family: var(--font-arabic), sans-serif;
|
| 280 |
+
}
|
| 281 |
}
|
| 282 |
|
| 283 |
:root {
|
|
|
|
| 361 |
position: fixed;
|
| 362 |
inset: 0;
|
| 363 |
z-index: -30;
|
| 364 |
+
opacity: 0.028; /* Slightly lowered for a more elegant, subtle feel */
|
| 365 |
pointer-events: none;
|
| 366 |
+
background-image: url("data:image/svg+xml,%3Csvg width='256' height='256' viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
|
| 367 |
+
background-size: 128px 128px; /* Force repeating at smaller size for high-DPI/Retina screens, producing an ultra-fine silk grain */
|
| 368 |
}
|
| 369 |
|
| 370 |
/* Subtle micro-glows & typography */
|
|
|
|
| 497 |
--primary: oklch(0.35 0.12 65); /* Deep Rich Luxury Gold inside light cards */
|
| 498 |
--primary-foreground: oklch(0.985 0.006 85); /* Light text on dark gold button inside light cards */
|
| 499 |
--primary-glow: oklch(0.35 0.12 65 / 18%);
|
| 500 |
+
}
|
| 501 |
+
|
| 502 |
+
/* FeatureJourneyMap Laser Pulse Animation */
|
| 503 |
+
@keyframes pulse-travel {
|
| 504 |
+
0% {
|
| 505 |
+
top: 0%;
|
| 506 |
+
opacity: 0;
|
| 507 |
+
}
|
| 508 |
+
5% {
|
| 509 |
+
opacity: 1;
|
| 510 |
+
}
|
| 511 |
+
95% {
|
| 512 |
+
opacity: 1;
|
| 513 |
+
}
|
| 514 |
+
100% {
|
| 515 |
+
top: 100%;
|
| 516 |
+
opacity: 0;
|
| 517 |
+
}
|
| 518 |
+
}
|
| 519 |
+
|
| 520 |
+
.animate-pulse-travel {
|
| 521 |
+
animation: pulse-travel 12s linear infinite;
|
| 522 |
}
|
app/layout.tsx
CHANGED
|
@@ -1,11 +1,12 @@
|
|
| 1 |
import type { Metadata } from "next";
|
| 2 |
-
import { Geist_Mono, Geist, Instrument_Serif } from "next/font/google";
|
| 3 |
import localFont from "next/font/local";
|
| 4 |
import "./globals.css";
|
| 5 |
import { Header } from "@/components/header";
|
| 6 |
import { Footer } from "@/components/footer";
|
| 7 |
import { cn } from "@/lib/utils";
|
| 8 |
import { ThemeProvider } from "@/components/theme-provider";
|
|
|
|
| 9 |
|
| 10 |
const geist = Geist({subsets:['latin'],variable:'--font-sans'});
|
| 11 |
|
|
@@ -20,6 +21,12 @@ const instrumentSerif = Instrument_Serif({
|
|
| 20 |
weight: "400",
|
| 21 |
});
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
const fastHand = localFont({
|
| 24 |
src: "./fonts/FastHand.otf",
|
| 25 |
variable: "--font-fast-hand",
|
|
@@ -29,6 +36,13 @@ export const metadata: Metadata = {
|
|
| 29 |
metadataBase: new URL("https://hubapi.dev"),
|
| 30 |
title: "HUBAPI — Pre-Launch Marketing Showcase & Waitlist",
|
| 31 |
description: "Join the HUBAPI pre-launch waitlist. HUBAPI is currently in its marketing phase, showcasing planned features for secure agent routing, scoped keys, and routing automation.",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
openGraph: {
|
| 33 |
title: "HUBAPI — Pre-Launch Marketing Showcase",
|
| 34 |
description: "Pre-launch waitlist & marketing showcase. One gateway. Every model. Cut your AI costs by 40% with zero code changes.",
|
|
@@ -54,6 +68,8 @@ export const metadata: Metadata = {
|
|
| 54 |
|
| 55 |
import { SplitFlapAudioProvider } from "@/components/ui/split-flap-text";
|
| 56 |
import { WaitlistSocialProofTicker } from "@/components/WaitlistSocialProofTicker";
|
|
|
|
|
|
|
| 57 |
|
| 58 |
export default function RootLayout({
|
| 59 |
children,
|
|
@@ -63,14 +79,15 @@ export default function RootLayout({
|
|
| 63 |
return (
|
| 64 |
<html lang="en" className={cn("font-sans", geist.variable)} suppressHydrationWarning>
|
| 65 |
<body
|
| 66 |
-
className={`${geistMono.variable} ${fastHand.variable} ${instrumentSerif.variable} font-sans antialiased bg-background`}
|
| 67 |
>
|
| 68 |
-
<
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
|
|
|
| 74 |
<SplitFlapAudioProvider>
|
| 75 |
{/* JSON-LD Organization Schema for SEO */}
|
| 76 |
<script
|
|
@@ -105,12 +122,33 @@ export default function RootLayout({
|
|
| 105 |
|
| 106 |
{/* Subtle cool indigo glow near bottom to anchor scrolling */}
|
| 107 |
<div className="fixed bottom-0 left-1/2 -translate-x-1/2 w-[1000px] h-[500px] bg-indigo-500/[0.015] dark:bg-indigo-500/[0.01] blur-[150px] rounded-full -z-40 pointer-events-none" aria-hidden="true" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
<Header />
|
| 109 |
{children}
|
| 110 |
<Footer />
|
| 111 |
<WaitlistSocialProofTicker />
|
| 112 |
</SplitFlapAudioProvider>
|
| 113 |
</ThemeProvider>
|
|
|
|
| 114 |
</body>
|
| 115 |
</html>
|
| 116 |
);
|
|
|
|
| 1 |
import type { Metadata } from "next";
|
| 2 |
+
import { Geist_Mono, Geist, Instrument_Serif, IBM_Plex_Sans_Arabic } from "next/font/google";
|
| 3 |
import localFont from "next/font/local";
|
| 4 |
import "./globals.css";
|
| 5 |
import { Header } from "@/components/header";
|
| 6 |
import { Footer } from "@/components/footer";
|
| 7 |
import { cn } from "@/lib/utils";
|
| 8 |
import { ThemeProvider } from "@/components/theme-provider";
|
| 9 |
+
import Script from "next/script";
|
| 10 |
|
| 11 |
const geist = Geist({subsets:['latin'],variable:'--font-sans'});
|
| 12 |
|
|
|
|
| 21 |
weight: "400",
|
| 22 |
});
|
| 23 |
|
| 24 |
+
const ibmPlexArabic = IBM_Plex_Sans_Arabic({
|
| 25 |
+
variable: "--font-arabic",
|
| 26 |
+
subsets: ["arabic"],
|
| 27 |
+
weight: ["300", "400", "500", "600", "700"],
|
| 28 |
+
});
|
| 29 |
+
|
| 30 |
const fastHand = localFont({
|
| 31 |
src: "./fonts/FastHand.otf",
|
| 32 |
variable: "--font-fast-hand",
|
|
|
|
| 36 |
metadataBase: new URL("https://hubapi.dev"),
|
| 37 |
title: "HUBAPI — Pre-Launch Marketing Showcase & Waitlist",
|
| 38 |
description: "Join the HUBAPI pre-launch waitlist. HUBAPI is currently in its marketing phase, showcasing planned features for secure agent routing, scoped keys, and routing automation.",
|
| 39 |
+
alternates: {
|
| 40 |
+
canonical: "https://hubapi.dev",
|
| 41 |
+
languages: {
|
| 42 |
+
"en": "https://hubapi.dev/?lang=en",
|
| 43 |
+
"ar": "https://hubapi.dev/?lang=ar",
|
| 44 |
+
},
|
| 45 |
+
},
|
| 46 |
openGraph: {
|
| 47 |
title: "HUBAPI — Pre-Launch Marketing Showcase",
|
| 48 |
description: "Pre-launch waitlist & marketing showcase. One gateway. Every model. Cut your AI costs by 40% with zero code changes.",
|
|
|
|
| 68 |
|
| 69 |
import { SplitFlapAudioProvider } from "@/components/ui/split-flap-text";
|
| 70 |
import { WaitlistSocialProofTicker } from "@/components/WaitlistSocialProofTicker";
|
| 71 |
+
import { LanguageProvider } from "@/components/LanguageContext";
|
| 72 |
+
import { SkipToContent } from "@/components/SkipToContent";
|
| 73 |
|
| 74 |
export default function RootLayout({
|
| 75 |
children,
|
|
|
|
| 79 |
return (
|
| 80 |
<html lang="en" className={cn("font-sans", geist.variable)} suppressHydrationWarning>
|
| 81 |
<body
|
| 82 |
+
className={`${geistMono.variable} ${fastHand.variable} ${instrumentSerif.variable} ${ibmPlexArabic.variable} font-sans antialiased bg-background`}
|
| 83 |
>
|
| 84 |
+
<LanguageProvider>
|
| 85 |
+
<ThemeProvider
|
| 86 |
+
attribute="class"
|
| 87 |
+
defaultTheme="dark"
|
| 88 |
+
enableSystem
|
| 89 |
+
disableTransitionOnChange
|
| 90 |
+
>
|
| 91 |
<SplitFlapAudioProvider>
|
| 92 |
{/* JSON-LD Organization Schema for SEO */}
|
| 93 |
<script
|
|
|
|
| 122 |
|
| 123 |
{/* Subtle cool indigo glow near bottom to anchor scrolling */}
|
| 124 |
<div className="fixed bottom-0 left-1/2 -translate-x-1/2 w-[1000px] h-[500px] bg-indigo-500/[0.015] dark:bg-indigo-500/[0.01] blur-[150px] rounded-full -z-40 pointer-events-none" aria-hidden="true" />
|
| 125 |
+
|
| 126 |
+
{/* Google Analytics Integration */}
|
| 127 |
+
{process.env.NEXT_PUBLIC_GA_ID && (
|
| 128 |
+
<>
|
| 129 |
+
<Script
|
| 130 |
+
src={`https://www.googletagmanager.com/gtag/js?id=${process.env.NEXT_PUBLIC_GA_ID}`}
|
| 131 |
+
strategy="afterInteractive"
|
| 132 |
+
/>
|
| 133 |
+
<Script id="google-analytics" strategy="afterInteractive">
|
| 134 |
+
{`
|
| 135 |
+
window.dataLayer = window.dataLayer || [];
|
| 136 |
+
function gtag(){dataLayer.push(arguments);}
|
| 137 |
+
gtag('js', new Date());
|
| 138 |
+
gtag('config', '${process.env.NEXT_PUBLIC_GA_ID}');
|
| 139 |
+
`}
|
| 140 |
+
</Script>
|
| 141 |
+
</>
|
| 142 |
+
)}
|
| 143 |
+
|
| 144 |
+
<SkipToContent />
|
| 145 |
<Header />
|
| 146 |
{children}
|
| 147 |
<Footer />
|
| 148 |
<WaitlistSocialProofTicker />
|
| 149 |
</SplitFlapAudioProvider>
|
| 150 |
</ThemeProvider>
|
| 151 |
+
</LanguageProvider>
|
| 152 |
</body>
|
| 153 |
</html>
|
| 154 |
);
|
app/page.tsx
CHANGED
|
@@ -2,118 +2,64 @@ import { HeroSection } from "@/components/hero-section";
|
|
| 2 |
import { FeatureJourneyMap } from "@/components/FeatureJourneyMap";
|
| 3 |
import { LLMProviderIconCloud } from "@/components/LLMProviderIconCloud";
|
| 4 |
import { HubPulseMetrics } from "@/components/HubPulseMetrics";
|
| 5 |
-
import { HubLiveTerminal } from "@/components/HubLiveTerminal";
|
| 6 |
-
import MapContainer from "@/components/MapContainer";
|
| 7 |
import { SocialProof } from "@/components/social-proof";
|
| 8 |
import { ComparisonTable } from "@/components/comparison-table";
|
| 9 |
import { FAQAccordion } from "@/components/faq-accordion";
|
| 10 |
-
import {
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
} from "@/components/
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
export default function Home() {
|
| 18 |
return (
|
| 19 |
-
<main className="relative min-h-screen text-foreground overflow-x-hidden flex flex-col items-center">
|
| 20 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
<SocialProof />
|
| 22 |
|
| 23 |
-
|
| 24 |
-
<section className="relative z-10 w-full max-w-5xl mx-auto px-4 md:px-6 py-20 md:py-28">
|
| 25 |
-
<div className="text-center space-y-5 mb-10">
|
| 26 |
-
<div className="inline-flex items-center rounded-full border border-primary/20 bg-primary/5 px-4 py-1.5 text-sm font-medium text-primary backdrop-blur-sm shadow-sm">
|
| 27 |
-
<span className="relative flex h-2 w-2 mr-2.5">
|
| 28 |
-
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"></span>
|
| 29 |
-
<span className="relative inline-flex rounded-full h-2 w-2 bg-primary"></span>
|
| 30 |
-
</span>
|
| 31 |
-
Live Command Center
|
| 32 |
-
</div>
|
| 33 |
-
<h2 className="text-3xl font-extrabold tracking-tight sm:text-5xl bg-clip-text text-transparent bg-gradient-to-br from-foreground via-foreground/90 to-muted-foreground pb-1">
|
| 34 |
-
Try the Neural Gateway CLI
|
| 35 |
-
</h2>
|
| 36 |
-
<p className="max-w-2xl mx-auto text-base text-muted-foreground font-mono">
|
| 37 |
-
Run diagnostics, benchmark models, and simulate intelligent routing — all from the terminal.
|
| 38 |
-
</p>
|
| 39 |
-
</div>
|
| 40 |
-
<HubLiveTerminal />
|
| 41 |
-
</section>
|
| 42 |
|
| 43 |
{/* Trust Metrics */}
|
| 44 |
<section className="relative z-10 w-full px-4 md:px-6">
|
| 45 |
-
<
|
|
|
|
|
|
|
| 46 |
</section>
|
| 47 |
|
| 48 |
{/* Core Features - Interactive Journey Map */}
|
| 49 |
-
<
|
|
|
|
|
|
|
|
|
|
| 50 |
<ComparisonTable />
|
| 51 |
|
| 52 |
-
|
| 53 |
-
<section className="relative z-10 w-full max-w-7xl mx-auto px-4 md:px-6 py-24 overflow-hidden">
|
| 54 |
-
<div className="font-mono max-w-[min(100vw,1600px)] mx-auto relative overflow-hidden md:rounded-md flex flex-col md:block px-6 pt-12 md:pt-16">
|
| 55 |
-
<div className="w-full max-w-[1600px] space-y-1.5 mx-auto mt-1 mb-12">
|
| 56 |
-
|
| 57 |
-
{/* Mobile View */}
|
| 58 |
-
<div className="flex flex-col min-[961px]:hidden">
|
| 59 |
-
<header className="flex flex-col items-start font-mono text-sm uppercase gap-2 mb-6">
|
| 60 |
-
<p className="text-foreground font-mono my-0 whitespace-nowrap">
|
| 61 |
-
Neural Gateway Mesh{" "}
|
| 62 |
-
<span className="block font-mono text-muted-foreground">
|
| 63 |
-
[Live Network Status]
|
| 64 |
-
</span>
|
| 65 |
-
</p>
|
| 66 |
-
</header>
|
| 67 |
-
|
| 68 |
-
<section className="pb-6 w-full">
|
| 69 |
-
<div className="flex flex-col gap-y-6">
|
| 70 |
-
<TotalRequests />
|
| 71 |
-
<TopCountries />
|
| 72 |
-
</div>
|
| 73 |
-
<RegionCount />
|
| 74 |
-
</section>
|
| 75 |
-
|
| 76 |
-
<div className="w-full flex justify-center pointer-events-none">
|
| 77 |
-
<MapContainer />
|
| 78 |
-
</div>
|
| 79 |
-
</div>
|
| 80 |
-
|
| 81 |
-
{/* Desktop View */}
|
| 82 |
-
<div className="relative hidden min-[961px]:flex flex-row max-lg:items-end lg:items-center lg:justify-between">
|
| 83 |
-
<header className="flex flex-col items-start font-mono text-sm xl:text-base uppercase gap-2 max-lg:mb-8 mb-auto">
|
| 84 |
-
<p className="text-foreground font-mono my-0 whitespace-nowrap">
|
| 85 |
-
Neural Gateway Mesh{" "}
|
| 86 |
-
<span className="block font-mono text-muted-foreground">
|
| 87 |
-
[Live Network Status]
|
| 88 |
-
</span>
|
| 89 |
-
</p>
|
| 90 |
-
</header>
|
| 91 |
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
<div className="w-full h-full pointer-events-none max-lg:scale-[1.5] max-lg:-translate-y-16 max-lg:translate-x-[-20%]">
|
| 101 |
-
<MapContainer />
|
| 102 |
-
</div>
|
| 103 |
-
</div>
|
| 104 |
-
|
| 105 |
-
{/* Stats Grid */}
|
| 106 |
-
<section className="mt-8">
|
| 107 |
-
<StatsGrid />
|
| 108 |
-
</section>
|
| 109 |
-
|
| 110 |
-
</div>
|
| 111 |
-
</div>
|
| 112 |
-
</section>
|
| 113 |
|
| 114 |
<FAQAccordion />
|
| 115 |
-
|
|
|
|
|
|
|
|
|
|
| 116 |
</main>
|
| 117 |
);
|
| 118 |
}
|
| 119 |
-
|
|
|
|
| 2 |
import { FeatureJourneyMap } from "@/components/FeatureJourneyMap";
|
| 3 |
import { LLMProviderIconCloud } from "@/components/LLMProviderIconCloud";
|
| 4 |
import { HubPulseMetrics } from "@/components/HubPulseMetrics";
|
|
|
|
|
|
|
| 5 |
import { SocialProof } from "@/components/social-proof";
|
| 6 |
import { ComparisonTable } from "@/components/comparison-table";
|
| 7 |
import { FAQAccordion } from "@/components/faq-accordion";
|
| 8 |
+
import { ErrorBoundary } from "@/components/ui/error-boundary";
|
| 9 |
+
import { CinematicPreloader } from "@/components/CinematicPreloader";
|
| 10 |
+
import { CountdownBanner } from "@/components/CountdownBanner";
|
| 11 |
+
import { ExitIntentPopup } from "@/components/ExitIntentPopup";
|
| 12 |
+
import { FloatingCTA } from "@/components/FloatingCTA";
|
| 13 |
+
import { TestimonialsCarousel } from "@/components/TestimonialsCarousel";
|
| 14 |
+
import { TrustSection } from "@/components/TrustSection";
|
| 15 |
+
import { TerminalSection } from "@/components/TerminalSection";
|
| 16 |
+
import { GatewayMeshSection } from "@/components/GatewayMeshSection";
|
| 17 |
|
| 18 |
export default function Home() {
|
| 19 |
return (
|
| 20 |
+
<main id="main-content" className="relative min-h-screen text-foreground overflow-x-hidden flex flex-col items-center w-full">
|
| 21 |
+
<CountdownBanner />
|
| 22 |
+
<CinematicPreloader />
|
| 23 |
+
<ExitIntentPopup />
|
| 24 |
+
<FloatingCTA />
|
| 25 |
+
|
| 26 |
+
<ErrorBoundary>
|
| 27 |
+
<HeroSection />
|
| 28 |
+
</ErrorBoundary>
|
| 29 |
+
|
| 30 |
<SocialProof />
|
| 31 |
|
| 32 |
+
<TerminalSection />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
{/* Trust Metrics */}
|
| 35 |
<section className="relative z-10 w-full px-4 md:px-6">
|
| 36 |
+
<ErrorBoundary>
|
| 37 |
+
<HubPulseMetrics />
|
| 38 |
+
</ErrorBoundary>
|
| 39 |
</section>
|
| 40 |
|
| 41 |
{/* Core Features - Interactive Journey Map */}
|
| 42 |
+
<ErrorBoundary>
|
| 43 |
+
<FeatureJourneyMap />
|
| 44 |
+
</ErrorBoundary>
|
| 45 |
+
|
| 46 |
<ComparisonTable />
|
| 47 |
|
| 48 |
+
<GatewayMeshSection />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
+
<ErrorBoundary>
|
| 51 |
+
<TestimonialsCarousel />
|
| 52 |
+
</ErrorBoundary>
|
| 53 |
+
|
| 54 |
+
<ErrorBoundary>
|
| 55 |
+
<TrustSection />
|
| 56 |
+
</ErrorBoundary>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
<FAQAccordion />
|
| 59 |
+
|
| 60 |
+
<ErrorBoundary>
|
| 61 |
+
<LLMProviderIconCloud />
|
| 62 |
+
</ErrorBoundary>
|
| 63 |
</main>
|
| 64 |
);
|
| 65 |
}
|
|
|
app/status/layout.tsx
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import type { Metadata } from "next";
|
| 2 |
+
|
| 3 |
+
export const metadata: Metadata = {
|
| 4 |
+
title: "HUBAPI — Neural Gateway Mesh Status & Diagnostics",
|
| 5 |
+
description: "Real-time latency metrics, node health, system load, and diagnostic operations for HUBAPI's globally distributed LLM gateway routing mesh.",
|
| 6 |
+
alternates: {
|
| 7 |
+
canonical: "https://hubapi.dev/status",
|
| 8 |
+
languages: {
|
| 9 |
+
"en": "https://hubapi.dev/status?lang=en",
|
| 10 |
+
"ar": "https://hubapi.dev/status?lang=ar",
|
| 11 |
+
},
|
| 12 |
+
},
|
| 13 |
+
openGraph: {
|
| 14 |
+
title: "HUBAPI — Neural Gateway Mesh Status",
|
| 15 |
+
description: "Monitor real-time node pings, system loads, and global gateway health for HUBAPI's AI orchestration network.",
|
| 16 |
+
url: "https://hubapi.dev/status",
|
| 17 |
+
type: "website",
|
| 18 |
+
},
|
| 19 |
+
};
|
| 20 |
+
|
| 21 |
+
export default function StatusLayout({
|
| 22 |
+
children,
|
| 23 |
+
}: {
|
| 24 |
+
children: React.ReactNode;
|
| 25 |
+
}) {
|
| 26 |
+
return <>{children}</>;
|
| 27 |
+
}
|
app/status/page.tsx
ADDED
|
@@ -0,0 +1,316 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
|
| 3 |
+
import React, { useState, useEffect } from "react";
|
| 4 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 5 |
+
import { Activity, RefreshCw, CheckCircle, Terminal, ChevronRight } from "lucide-react";
|
| 6 |
+
import Link from "next/link";
|
| 7 |
+
|
| 8 |
+
interface GatewayNode {
|
| 9 |
+
name: string;
|
| 10 |
+
nameAr: string;
|
| 11 |
+
region: string;
|
| 12 |
+
regionAr: string;
|
| 13 |
+
ping: number;
|
| 14 |
+
load: number;
|
| 15 |
+
status: "nominal" | "degraded" | "offline";
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
export default function StatusPage() {
|
| 19 |
+
const { t, language } = useLanguage();
|
| 20 |
+
const [mounted, setMounted] = useState(false);
|
| 21 |
+
const [isRefreshing, setIsRefreshing] = useState(false);
|
| 22 |
+
const [uptimeDays, setUptimeDays] = useState(99.98);
|
| 23 |
+
const [totalRequests, setTotalRequests] = useState(14802914);
|
| 24 |
+
const [activeTermLine, setActiveTermLine] = useState<string[]>([]);
|
| 25 |
+
const [isRunningDiagnostics, setIsRunningDiagnostics] = useState(false);
|
| 26 |
+
|
| 27 |
+
// Regional Node States
|
| 28 |
+
const [gateways, setGateways] = useState<GatewayNode[]>([
|
| 29 |
+
{ name: "Node-US-East", nameAr: "عقدة شرق أمريكا", region: "Virginia, US", regionAr: "فرجينيا، أمريكا", ping: 12, load: 24, status: "nominal" },
|
| 30 |
+
{ name: "Node-EU-West", nameAr: "عقدة غرب أوروبا", region: "Frankfurt, DE", regionAr: "فرانكفورت، ألمانيا", ping: 8, load: 18, status: "nominal" },
|
| 31 |
+
{ name: "Node-APAC-South", nameAr: "عقدة جنوب آسيا", region: "Singapore, SG", regionAr: "سنغافورة", ping: 22, load: 35, status: "nominal" },
|
| 32 |
+
{ name: "Node-ME-East", nameAr: "عقدة الشرق الأوسط", region: "Dubai, AE", regionAr: "دبي، الإمارات", ping: 15, load: 42, status: "nominal" },
|
| 33 |
+
{ name: "Node-Hostinger-Edge", nameAr: "بوابة هوستنجر العصبية", region: "Riyadh, SA", regionAr: "الرياض، السعودية", ping: 19, load: 14, status: "nominal" },
|
| 34 |
+
]);
|
| 35 |
+
|
| 36 |
+
useEffect(() => {
|
| 37 |
+
const init = setTimeout(() => {
|
| 38 |
+
setMounted(true);
|
| 39 |
+
}, 0);
|
| 40 |
+
|
| 41 |
+
// Minor random fluctuations in ping and load
|
| 42 |
+
const interval = setInterval(() => {
|
| 43 |
+
setGateways((prev) =>
|
| 44 |
+
prev.map((gw) => ({
|
| 45 |
+
...gw,
|
| 46 |
+
ping: Math.max(2, gw.ping + (Math.random() > 0.5 ? 1 : -1)),
|
| 47 |
+
load: Math.min(100, Math.max(5, gw.load + Math.floor(Math.random() * 5) - 2)),
|
| 48 |
+
}))
|
| 49 |
+
);
|
| 50 |
+
setTotalRequests((r) => r + Math.floor(Math.random() * 3) + 1);
|
| 51 |
+
}, 4000);
|
| 52 |
+
|
| 53 |
+
return () => {
|
| 54 |
+
clearTimeout(init);
|
| 55 |
+
clearInterval(interval);
|
| 56 |
+
};
|
| 57 |
+
}, []);
|
| 58 |
+
|
| 59 |
+
const triggerRefresh = () => {
|
| 60 |
+
setIsRefreshing(true);
|
| 61 |
+
setTimeout(() => {
|
| 62 |
+
setIsRefreshing(false);
|
| 63 |
+
// Small reset logic
|
| 64 |
+
setUptimeDays(99.99);
|
| 65 |
+
}, 1200);
|
| 66 |
+
};
|
| 67 |
+
|
| 68 |
+
const startDiagnostics = () => {
|
| 69 |
+
if (isRunningDiagnostics) return;
|
| 70 |
+
setIsRunningDiagnostics(true);
|
| 71 |
+
setActiveTermLine([]);
|
| 72 |
+
|
| 73 |
+
const lines = [
|
| 74 |
+
"INITIALIZING NEURAL GRID DIAGNOSTIC UTILITY V2.4...",
|
| 75 |
+
"ESTABLISHING HOST CONTROL SECURE SOCKET... [OK]",
|
| 76 |
+
"PINGING REGIONAL GATEWAYS FOR LOADBALANCER TOPOLOGY...",
|
| 77 |
+
" -> Node-US-East (Virginia) : RTT=12ms | LOAD=24% [SUCCESS]",
|
| 78 |
+
" -> Node-EU-West (Frankfurt): RTT=8ms | LOAD=18% [SUCCESS]",
|
| 79 |
+
" -> Node-APAC-South (Singapore): RTT=22ms | LOAD=35% [SUCCESS]",
|
| 80 |
+
" -> Node-ME-East (Dubai): RTT=15ms | LOAD=42% [SUCCESS]",
|
| 81 |
+
" -> Node-Hostinger-Edge (Riyadh): RTT=19ms | LOAD=14% [SUCCESS]",
|
| 82 |
+
"VERIFYING CACHE INVERSION LAYER CONSISTENCY...",
|
| 83 |
+
"CHECKING REDIRECT OVERHEAD RATIOS... 0.004% LOSS [NOMINAL]",
|
| 84 |
+
"AES-256 SYMMETRIC DECRYPTION SPEED TEST: 4.8 GB/sec",
|
| 85 |
+
"ALL NODES STATUS: NOMINAL // METRICS REPORT SECURE.",
|
| 86 |
+
"DIAGNOSTICS COMPLETED. 0 WARNINGS DETECTED."
|
| 87 |
+
];
|
| 88 |
+
|
| 89 |
+
let currentLine = 0;
|
| 90 |
+
const printLine = () => {
|
| 91 |
+
if (currentLine < lines.length) {
|
| 92 |
+
setActiveTermLine((prev) => [...prev, lines[currentLine]]);
|
| 93 |
+
currentLine++;
|
| 94 |
+
setTimeout(printLine, 350 + Math.random() * 200);
|
| 95 |
+
} else {
|
| 96 |
+
setIsRunningDiagnostics(false);
|
| 97 |
+
}
|
| 98 |
+
};
|
| 99 |
+
printLine();
|
| 100 |
+
};
|
| 101 |
+
|
| 102 |
+
if (!mounted) {
|
| 103 |
+
return null;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
return (
|
| 107 |
+
<div className="min-h-screen bg-background bg-[radial-gradient(ellipse_80%_80%_at_50%_-20%,var(--primary-glow),rgba(0,0,0,0))] text-foreground flex flex-col font-mono selection:bg-primary/30 selection:text-primary">
|
| 108 |
+
|
| 109 |
+
{/* Top Border Bar */}
|
| 110 |
+
<div className="h-[2px] w-full bg-gradient-to-r from-transparent via-primary/70 to-transparent" />
|
| 111 |
+
|
| 112 |
+
{/* Main Grid Page Wrapper */}
|
| 113 |
+
<main id="main-content" className="flex-1 max-w-5xl w-full mx-auto px-4 md:px-8 py-12 md:py-20 flex flex-col gap-8">
|
| 114 |
+
|
| 115 |
+
{/* Breadcrumb Navigation */}
|
| 116 |
+
<div className="flex items-center gap-2 text-xs text-muted-foreground">
|
| 117 |
+
<Link href="/" className="hover:text-primary transition-colors">
|
| 118 |
+
{t("logo")}
|
| 119 |
+
</Link>
|
| 120 |
+
<ChevronRight className="w-3.5 h-3.5 shrink-0 rtl:rotate-180" />
|
| 121 |
+
<span className="text-foreground font-bold">
|
| 122 |
+
{language === "ar" ? "حالة بوابات الشبكة" : "NETWORK_STATUS"}
|
| 123 |
+
</span>
|
| 124 |
+
</div>
|
| 125 |
+
|
| 126 |
+
{/* Header Header */}
|
| 127 |
+
<div className="flex flex-col md:flex-row md:items-end justify-between gap-4 border-b border-border pb-6">
|
| 128 |
+
<div className="space-y-2">
|
| 129 |
+
<div className="inline-flex items-center gap-2 px-2.5 py-1 bg-primary/10 border border-primary/20 text-primary text-[10px] tracking-widest uppercase">
|
| 130 |
+
<span className="w-1.5 h-1.5 bg-primary rounded-full animate-ping" />
|
| 131 |
+
{t("heroBadge")}
|
| 132 |
+
</div>
|
| 133 |
+
<h1 className="text-3xl font-extrabold text-foreground tracking-tight uppercase">
|
| 134 |
+
{language === "ar" ? "غرفة عمليات الشبكة" : "GATEWAY MESH OPERATIONS"}
|
| 135 |
+
</h1>
|
| 136 |
+
<p className="text-sm text-muted-foreground">
|
| 137 |
+
{language === "ar" ? "حالة الاتصال والجهوزية لبوابات الفرز الذكية لـ HUBAPI في الوقت الفعلي." : "Real-time metrics, node latency, and infrastructure diagnostics for HUBAPI's pass-through routing mesh."}
|
| 138 |
+
</p>
|
| 139 |
+
</div>
|
| 140 |
+
|
| 141 |
+
<button
|
| 142 |
+
onClick={triggerRefresh}
|
| 143 |
+
disabled={isRefreshing}
|
| 144 |
+
className="self-start md:self-end h-10 px-4 bg-button-bg border border-button-border hover:border-primary/30 text-button-text hover:text-primary text-xs font-bold transition-all duration-300 flex items-center gap-2 cursor-pointer disabled:opacity-50 [clip-path:polygon(6px_0,100%_0,100%_calc(100%_-_6px),calc(100%_-_6px)_100%,0_100%,0_6px)]"
|
| 145 |
+
>
|
| 146 |
+
<RefreshCw className={`w-3.5 h-3.5 ${isRefreshing ? "animate-spin" : ""}`} />
|
| 147 |
+
<span>{isRefreshing ? (language === "ar" ? "جاري التحديث..." : "REFRESHING...") : (language === "ar" ? "تحديث حقيقي" : "FORCE_REFRESH")}</span>
|
| 148 |
+
</button>
|
| 149 |
+
</div>
|
| 150 |
+
|
| 151 |
+
{/* Global Overview Section */}
|
| 152 |
+
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
| 153 |
+
|
| 154 |
+
{/* Global Status Card */}
|
| 155 |
+
<div className="md:col-span-2 inverted-card backdrop-blur-md border border-emerald-500/20 p-6 rounded-lg relative [clip-path:polygon(12px_0,100%_0,100%_calc(100%_-_12px),calc(100%_-_12px)_100%,0_100%,0_12px)]">
|
| 156 |
+
<div className="absolute top-0 left-0 w-4 h-4 border-t border-l border-emerald-500/40" />
|
| 157 |
+
<div className="absolute bottom-0 right-0 w-4 h-4 border-b border-r border-emerald-500/40" />
|
| 158 |
+
|
| 159 |
+
<div className="flex items-start gap-4">
|
| 160 |
+
<CheckCircle className="w-12 h-12 text-emerald-500 shrink-0 animate-pulse" />
|
| 161 |
+
<div className="space-y-1">
|
| 162 |
+
<span className="text-[10px] text-emerald-400 block tracking-widest font-bold">
|
| 163 |
+
{language === "ar" ? "الحالة التشغيلية العامة" : "GLOBAL OPERATION INDEX"}
|
| 164 |
+
</span>
|
| 165 |
+
<h2 className="text-xl font-bold text-foreground uppercase">
|
| 166 |
+
{language === "ar" ? "جميع الأنظمة تعمل بكفاءة تامة" : "ALL SYSTEMS NOMINAL"}
|
| 167 |
+
</h2>
|
| 168 |
+
<p className="text-xs text-muted-foreground max-w-md">
|
| 169 |
+
{language === "ar"
|
| 170 |
+
? "تطابق كامل بنسبة 100% في الشبكة العصبية العالمية. بوابات الذكاء الاصطناعي تفحص البيانات بسلاسة وتوجه الحمولة في غضون جزء من المللي ثانية."
|
| 171 |
+
: "Zero connection blocks reported within the past 144 hours. Routing mesh is seamlessly processing cross-model API payloads."
|
| 172 |
+
}
|
| 173 |
+
</p>
|
| 174 |
+
</div>
|
| 175 |
+
</div>
|
| 176 |
+
</div>
|
| 177 |
+
|
| 178 |
+
{/* Stats quick card */}
|
| 179 |
+
<div className="inverted-card backdrop-blur-md border border-primary/20 p-6 rounded-lg relative [clip-path:polygon(12px_0,100%_0,100%_calc(100%_-_12px),calc(100%_-_12px)_100%,0_100%,0_12px)]">
|
| 180 |
+
<div className="absolute top-0 left-0 w-4 h-4 border-t border-l border-primary/40" />
|
| 181 |
+
<div className="absolute bottom-0 right-0 w-4 h-4 border-b border-r border-primary/40" />
|
| 182 |
+
|
| 183 |
+
<div className="space-y-4">
|
| 184 |
+
<div>
|
| 185 |
+
<span className="text-[9px] text-muted-foreground block uppercase">{language === "ar" ? "معدل التشغيل الشهري" : "MONTHLY_UPTIME"}</span>
|
| 186 |
+
<span className="text-2xl font-bold text-primary">{uptimeDays}%</span>
|
| 187 |
+
</div>
|
| 188 |
+
<div className="border-t border-border pt-3">
|
| 189 |
+
<span className="text-[9px] text-muted-foreground block uppercase">{language === "ar" ? "إجمالي الطلبات الفعالة" : "TOTAL_DYNAMIC_REQUESTS"}</span>
|
| 190 |
+
<span className="text-xl font-bold text-foreground">
|
| 191 |
+
{totalRequests.toLocaleString()}
|
| 192 |
+
</span>
|
| 193 |
+
</div>
|
| 194 |
+
</div>
|
| 195 |
+
</div>
|
| 196 |
+
</div>
|
| 197 |
+
|
| 198 |
+
{/* Regional Nodes Status List */}
|
| 199 |
+
<div className="space-y-4">
|
| 200 |
+
<h2 className="text-sm font-bold text-muted-foreground uppercase tracking-widest flex items-center gap-2">
|
| 201 |
+
<Activity className="w-4 h-4 text-primary" />
|
| 202 |
+
<span>{language === "ar" ? "قائمة بوابات العقد الحية" : "ACTIVE NODE DIRECTORY"}</span>
|
| 203 |
+
</h2>
|
| 204 |
+
|
| 205 |
+
<div className="inverted-card border border-border rounded-lg overflow-hidden font-mono [clip-path:polygon(12px_0,100%_0,100%_calc(100%_-_12px),calc(100%_-_12px)_100%,0_100%,0_12px)]">
|
| 206 |
+
<div className="hidden sm:grid grid-cols-5 bg-muted/50 px-6 py-3 border-b border-border text-[10px] text-muted-foreground uppercase tracking-widest font-bold text-start">
|
| 207 |
+
<div className="col-span-2 text-start">{language === "ar" ? "البوابة" : "NODE_GATEWAY"}</div>
|
| 208 |
+
<div className="text-start">{language === "ar" ? "الموقع الجغرافي" : "TOPOLOGY_REGION"}</div>
|
| 209 |
+
<div className="text-start">{language === "ar" ? "الاستجابة RTT" : "LATENCY_SAVINGS"}</div>
|
| 210 |
+
<div className="text-end">{language === "ar" ? "الحمل والضغط" : "SYSTEM_LOAD"}</div>
|
| 211 |
+
</div>
|
| 212 |
+
|
| 213 |
+
<div className="divide-y divide-border">
|
| 214 |
+
{gateways.map((gw, idx) => (
|
| 215 |
+
<div key={idx} className="grid grid-cols-1 sm:grid-cols-5 items-center px-6 py-4 hover:bg-muted/30 transition-colors gap-3 sm:gap-0">
|
| 216 |
+
|
| 217 |
+
{/* Name and status icon */}
|
| 218 |
+
<div className="col-span-2 flex items-center gap-3 text-start">
|
| 219 |
+
<span className="w-2.5 h-2.5 bg-emerald-500 rounded-full shrink-0 shadow-[0_0_10px_rgba(16,185,129,0.5)]" />
|
| 220 |
+
<div>
|
| 221 |
+
<div className="text-sm font-bold text-foreground">{language === "ar" ? gw.nameAr : gw.name}</div>
|
| 222 |
+
<div className="text-[9px] text-muted-foreground uppercase">SYS_NODE_ID // {gw.name.toLowerCase()}</div>
|
| 223 |
+
</div>
|
| 224 |
+
</div>
|
| 225 |
+
|
| 226 |
+
{/* Regional Topology */}
|
| 227 |
+
<div className="text-xs text-muted-foreground text-start">
|
| 228 |
+
{language === "ar" ? gw.regionAr : gw.region}
|
| 229 |
+
</div>
|
| 230 |
+
|
| 231 |
+
{/* Latency RTT */}
|
| 232 |
+
<div className="text-xs font-bold text-primary text-start">
|
| 233 |
+
{gw.ping}ms
|
| 234 |
+
</div>
|
| 235 |
+
|
| 236 |
+
{/* Load Percentage progress bar */}
|
| 237 |
+
<div className="flex sm:justify-end items-center gap-2">
|
| 238 |
+
<div className="w-24 bg-muted h-1.5 rounded-full overflow-hidden hidden sm:block">
|
| 239 |
+
<div
|
| 240 |
+
className={`h-full rounded-full transition-all duration-500 ${gw.load > 60 ? "bg-amber-500" : "bg-indigo-500"}`}
|
| 241 |
+
style={{ width: `${gw.load}%` }}
|
| 242 |
+
/>
|
| 243 |
+
</div>
|
| 244 |
+
<span className="text-xs text-muted-foreground w-8 text-end font-bold">
|
| 245 |
+
{gw.load}%
|
| 246 |
+
</span>
|
| 247 |
+
</div>
|
| 248 |
+
|
| 249 |
+
</div>
|
| 250 |
+
))}
|
| 251 |
+
</div>
|
| 252 |
+
|
| 253 |
+
</div>
|
| 254 |
+
</div>
|
| 255 |
+
|
| 256 |
+
{/* Live Diagnostics Console section */}
|
| 257 |
+
<div className="space-y-4">
|
| 258 |
+
<div className="flex justify-between items-center">
|
| 259 |
+
<h2 className="text-sm font-bold text-muted-foreground uppercase tracking-widest flex items-center gap-2">
|
| 260 |
+
<Terminal className="w-4 h-4 text-indigo-500" />
|
| 261 |
+
<span>{language === "ar" ? "شاشة فحص الأنظمة الحية" : "REAL-TIME DIAGNOSTICS DECK"}</span>
|
| 262 |
+
</h2>
|
| 263 |
+
|
| 264 |
+
<button
|
| 265 |
+
onClick={startDiagnostics}
|
| 266 |
+
disabled={isRunningDiagnostics}
|
| 267 |
+
className="h-9 px-4 bg-indigo-500/20 hover:bg-indigo-500/30 border border-indigo-500/30 text-indigo-500 hover:text-indigo-400 text-[10px] font-bold tracking-widest uppercase transition-all duration-200 cursor-pointer disabled:opacity-50 [clip-path:polygon(6px_0,100%_0,100%_calc(100%_-_6px),calc(100%_-_6px)_100%,0_100%,0_6px)]"
|
| 268 |
+
>
|
| 269 |
+
{isRunningDiagnostics ? (language === "ar" ? "فحص تشخيصي..." : "DIAGNOSTICS_RUNNING...") : (language === "ar" ? "بدء فحص الشبكة" : "INIT_DIAGNOSTICS")}
|
| 270 |
+
</button>
|
| 271 |
+
</div>
|
| 272 |
+
|
| 273 |
+
<div className="inverted-card border border-indigo-500/20 p-5 rounded-lg font-mono min-h-[220px] text-xs space-y-2 text-foreground relative [clip-path:polygon(12px_0,100%_0,100%_calc(100%_-_12px),calc(100%_-_12px)_100%,0_100%,0_12px)]">
|
| 274 |
+
<div className="absolute top-0 right-0 p-3 text-[9px] text-indigo-500/50 uppercase">
|
| 275 |
+
CLI DIAGNOSTICS CONSOLE
|
| 276 |
+
</div>
|
| 277 |
+
|
| 278 |
+
{activeTermLine.length === 0 ? (
|
| 279 |
+
<div className="text-muted-foreground italic select-none text-start">
|
| 280 |
+
{language === "ar" ? "// انقر فوق 'بدء فحص الشبكة' لمحاكاة ال��حقق من بوابات التوصيل..." : "// Click 'INIT_DIAGNOSTICS' above to execute real-time routing diagnostics simulation..."}
|
| 281 |
+
</div>
|
| 282 |
+
) : (
|
| 283 |
+
<div className="space-y-1 text-start">
|
| 284 |
+
{activeTermLine.map((line, idx) => (
|
| 285 |
+
<div key={idx} className="flex items-start gap-1">
|
| 286 |
+
<span className="text-indigo-500 select-none">></span>
|
| 287 |
+
<span className={line.includes("[SUCCESS]") || line.includes("[OK]") ? "text-emerald-400 font-bold" : line.includes("WARNINGS") ? "text-amber-500 font-bold" : "text-foreground"}>
|
| 288 |
+
{line}
|
| 289 |
+
</span>
|
| 290 |
+
</div>
|
| 291 |
+
))}
|
| 292 |
+
{isRunningDiagnostics && (
|
| 293 |
+
<div className="flex items-center gap-1 animate-pulse">
|
| 294 |
+
<span className="text-indigo-500 select-none">></span>
|
| 295 |
+
<span className="w-2 h-4 bg-indigo-500" />
|
| 296 |
+
</div>
|
| 297 |
+
)}
|
| 298 |
+
</div>
|
| 299 |
+
)}
|
| 300 |
+
|
| 301 |
+
</div>
|
| 302 |
+
</div>
|
| 303 |
+
|
| 304 |
+
{/* Footer copyright */}
|
| 305 |
+
<div className="mt-12 py-8 border-t border-border text-center text-[10px] text-muted-foreground font-mono">
|
| 306 |
+
<div>HUBAPI GATEWAYS OPERATION // SECURED LAYER V1.0</div>
|
| 307 |
+
<div className="mt-1">
|
| 308 |
+
{language === "ar" ? "مرتبط كلياً ببوابات استضافة Hostinger الآمنة." : "Rerouting packets across regional Node channels."}
|
| 309 |
+
</div>
|
| 310 |
+
</div>
|
| 311 |
+
|
| 312 |
+
</main>
|
| 313 |
+
|
| 314 |
+
</div>
|
| 315 |
+
);
|
| 316 |
+
}
|
components/AgentParticleCanvas.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
"use client";
|
| 2 |
|
| 3 |
import { useEffect, useRef } from "react";
|
|
|
|
| 4 |
|
| 5 |
interface Particle {
|
| 6 |
x: number;
|
|
@@ -56,6 +57,7 @@ export function AgentParticleCanvas({
|
|
| 56 |
isHovered = false,
|
| 57 |
}: AgentParticleCanvasProps) {
|
| 58 |
const canvasRef = useRef<HTMLCanvasElement>(null);
|
|
|
|
| 59 |
|
| 60 |
// High-performance refs to pass real-time interaction states into canvas loop without recreation
|
| 61 |
const mouseRef = useRef({ x: mouseX, y: mouseY });
|
|
@@ -79,6 +81,12 @@ export function AgentParticleCanvas({
|
|
| 79 |
const ctx = canvas.getContext("2d");
|
| 80 |
if (!ctx) return;
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
let animId: number;
|
| 83 |
let W = 0, H = 0;
|
| 84 |
let particles: Particle[] = [];
|
|
@@ -379,10 +387,10 @@ export function AgentParticleCanvas({
|
|
| 379 |
const ro = new ResizeObserver(resize);
|
| 380 |
ro.observe(canvas);
|
| 381 |
return () => {
|
| 382 |
-
cancelAnimationFrame(animId);
|
| 383 |
ro.disconnect();
|
| 384 |
};
|
| 385 |
-
}, []);
|
| 386 |
|
| 387 |
return (
|
| 388 |
<canvas
|
|
|
|
| 1 |
"use client";
|
| 2 |
|
| 3 |
import { useEffect, useRef } from "react";
|
| 4 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 5 |
|
| 6 |
interface Particle {
|
| 7 |
x: number;
|
|
|
|
| 57 |
isHovered = false,
|
| 58 |
}: AgentParticleCanvasProps) {
|
| 59 |
const canvasRef = useRef<HTMLCanvasElement>(null);
|
| 60 |
+
const { isAmbientMode } = useLanguage();
|
| 61 |
|
| 62 |
// High-performance refs to pass real-time interaction states into canvas loop without recreation
|
| 63 |
const mouseRef = useRef({ x: mouseX, y: mouseY });
|
|
|
|
| 81 |
const ctx = canvas.getContext("2d");
|
| 82 |
if (!ctx) return;
|
| 83 |
|
| 84 |
+
if (isAmbientMode) {
|
| 85 |
+
// Pause canvas loop completely for CPU saving
|
| 86 |
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
| 87 |
+
return;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
let animId: number;
|
| 91 |
let W = 0, H = 0;
|
| 92 |
let particles: Particle[] = [];
|
|
|
|
| 387 |
const ro = new ResizeObserver(resize);
|
| 388 |
ro.observe(canvas);
|
| 389 |
return () => {
|
| 390 |
+
if (animId) cancelAnimationFrame(animId);
|
| 391 |
ro.disconnect();
|
| 392 |
};
|
| 393 |
+
}, [isAmbientMode]);
|
| 394 |
|
| 395 |
return (
|
| 396 |
<canvas
|
components/CinematicPreloader.tsx
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
|
| 3 |
+
import { useEffect, useState } from "react";
|
| 4 |
+
import { motion, AnimatePresence } from "framer-motion";
|
| 5 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 6 |
+
import { useSplitFlapAudio } from "@/components/ui/split-flap-text";
|
| 7 |
+
|
| 8 |
+
export function CinematicPreloader() {
|
| 9 |
+
const { t, language } = useLanguage();
|
| 10 |
+
const audio = useSplitFlapAudio();
|
| 11 |
+
const [isVisible, setIsVisible] = useState(false);
|
| 12 |
+
const [progress, setProgress] = useState(0);
|
| 13 |
+
const [logs, setLogs] = useState<string[]>([]);
|
| 14 |
+
const [stage, setStage] = useState(0);
|
| 15 |
+
|
| 16 |
+
useEffect(() => {
|
| 17 |
+
const init = setTimeout(() => {
|
| 18 |
+
// Check session storage to show only once per session
|
| 19 |
+
const hasSeenPreloader = sessionStorage.getItem("hubapi_preloader_seen");
|
| 20 |
+
if (hasSeenPreloader === "true") {
|
| 21 |
+
setIsVisible(false);
|
| 22 |
+
return;
|
| 23 |
+
}
|
| 24 |
+
setIsVisible(true);
|
| 25 |
+
}, 0);
|
| 26 |
+
|
| 27 |
+
return () => clearTimeout(init);
|
| 28 |
+
}, []);
|
| 29 |
+
|
| 30 |
+
useEffect(() => {
|
| 31 |
+
if (!isVisible) return;
|
| 32 |
+
|
| 33 |
+
// Simulate step-by-step logs loading in correct language
|
| 34 |
+
const logsEn = [
|
| 35 |
+
"CONNECTING TO NEURAL MESH GATEWAY...",
|
| 36 |
+
"ESTABLISHING HOSTINGER SECURE HANDSHAKE...",
|
| 37 |
+
"INITIALIZING THREE.JS WEBGL PARTICLE SYSTEM...",
|
| 38 |
+
"SYNCHRONIZING LATENCY METRICS AT EDGE NODES...",
|
| 39 |
+
"TUNING INTELLIGENT MODEL ROUTERS...",
|
| 40 |
+
"GATEWAY STABLE. SECURING NEURAL CHANNEL..."
|
| 41 |
+
];
|
| 42 |
+
|
| 43 |
+
const logsAr = [
|
| 44 |
+
"جاري الاتصال بـالبوابة العصبية العالمية...",
|
| 45 |
+
"بدء المصافحة الآمنة مع خوادم HOSTINGER...",
|
| 46 |
+
"تهيئة نظام الجسيمات ثلاثي الأبعاد WebGL...",
|
| 47 |
+
"مزامنة مقاييس زمن الاستجابة في بوابات الحافة...",
|
| 48 |
+
"تحسين موجهات الذكاء الاصطناعي التلقائية...",
|
| 49 |
+
"البوابة مستقرة. تأمين القناة العصبية..."
|
| 50 |
+
];
|
| 51 |
+
|
| 52 |
+
const currentLogs = language === "ar" ? logsAr : logsEn;
|
| 53 |
+
|
| 54 |
+
if (stage < currentLogs.length) {
|
| 55 |
+
const timer = setTimeout(() => {
|
| 56 |
+
setLogs((prev) => [...prev, `${currentLogs[stage]} [OK]`]);
|
| 57 |
+
setStage((prev) => prev + 1);
|
| 58 |
+
|
| 59 |
+
// Play subtle click audio if not muted
|
| 60 |
+
if (audio && !audio.isMuted) {
|
| 61 |
+
audio.playClick();
|
| 62 |
+
}
|
| 63 |
+
}, 400);
|
| 64 |
+
return () => clearTimeout(timer);
|
| 65 |
+
}
|
| 66 |
+
}, [isVisible, stage, language, audio]);
|
| 67 |
+
|
| 68 |
+
useEffect(() => {
|
| 69 |
+
if (!isVisible) return;
|
| 70 |
+
|
| 71 |
+
const interval = setInterval(() => {
|
| 72 |
+
setProgress((prev) => {
|
| 73 |
+
if (prev >= 100) {
|
| 74 |
+
clearInterval(interval);
|
| 75 |
+
setTimeout(() => {
|
| 76 |
+
// Dismiss preloader
|
| 77 |
+
setIsVisible(false);
|
| 78 |
+
sessionStorage.setItem("hubapi_preloader_seen", "true");
|
| 79 |
+
// Play satisfying final release chime
|
| 80 |
+
if (audio && !audio.isMuted) {
|
| 81 |
+
audio.playClick(); // Click as fallback
|
| 82 |
+
}
|
| 83 |
+
}, 600);
|
| 84 |
+
return 100;
|
| 85 |
+
}
|
| 86 |
+
// Accelerate progress based on stages loaded
|
| 87 |
+
const increment = stage === 6 ? 15 : Math.floor(Math.random() * 8) + 4;
|
| 88 |
+
return Math.min(prev + increment, 100);
|
| 89 |
+
});
|
| 90 |
+
}, 150);
|
| 91 |
+
|
| 92 |
+
return () => clearInterval(interval);
|
| 93 |
+
}, [isVisible, stage, audio]);
|
| 94 |
+
|
| 95 |
+
return (
|
| 96 |
+
<AnimatePresence>
|
| 97 |
+
{isVisible && (
|
| 98 |
+
<motion.div
|
| 99 |
+
initial={{ opacity: 1 }}
|
| 100 |
+
exit={{
|
| 101 |
+
opacity: 0,
|
| 102 |
+
y: -50,
|
| 103 |
+
transition: { duration: 0.8, ease: [0.76, 0, 0.24, 1] }
|
| 104 |
+
}}
|
| 105 |
+
className="fixed inset-0 z-[9999] bg-black flex flex-col items-center justify-center p-6 select-none font-mono text-xs overflow-hidden"
|
| 106 |
+
>
|
| 107 |
+
{/* Subtle glowing grid background */}
|
| 108 |
+
<div className="absolute inset-0 bg-[linear-gradient(to_right,#80808012_1px,transparent_1px),linear-gradient(to_bottom,#80808012_1px,transparent_1px)] bg-[size:40px_40px] pointer-events-none opacity-20" />
|
| 109 |
+
<div className="absolute w-[500px] h-[500px] bg-primary/5 rounded-full blur-[100px] pointer-events-none" />
|
| 110 |
+
|
| 111 |
+
<div className="w-full max-w-lg space-y-8 relative z-10">
|
| 112 |
+
{/* Header Glitch Title */}
|
| 113 |
+
<div className="flex flex-col items-center text-center space-y-2">
|
| 114 |
+
<motion.div
|
| 115 |
+
initial={{ scale: 0.9, opacity: 0 }}
|
| 116 |
+
animate={{ scale: 1, opacity: 1 }}
|
| 117 |
+
transition={{ duration: 0.5 }}
|
| 118 |
+
className="w-12 h-12 border border-primary/40 rounded flex items-center justify-center relative shadow-[0_0_15px_rgba(var(--primary-rgb),0.2)]"
|
| 119 |
+
>
|
| 120 |
+
<div className="absolute w-3 h-3 bg-primary rounded-full animate-pulse shadow-[0_0_10px_var(--primary-glow)]" />
|
| 121 |
+
</motion.div>
|
| 122 |
+
<h2 className="font-fast-hand text-3xl tracking-widest text-foreground mt-4">HUBAPI</h2>
|
| 123 |
+
<p className="text-[10px] text-muted-foreground/60 tracking-[0.2em] uppercase">
|
| 124 |
+
{t("loading")}
|
| 125 |
+
</p>
|
| 126 |
+
</div>
|
| 127 |
+
|
| 128 |
+
{/* Terminal Live Diagnostics */}
|
| 129 |
+
<div className="h-44 p-5 rounded border border-white/5 bg-secondary/15 backdrop-blur-md overflow-hidden flex flex-col justify-end text-[10px] sm:text-xs text-primary/80 leading-relaxed font-mono">
|
| 130 |
+
<div className="space-y-1.5 overflow-y-auto max-h-full pr-2">
|
| 131 |
+
{logs.map((log, index) => (
|
| 132 |
+
<motion.div
|
| 133 |
+
key={index}
|
| 134 |
+
initial={{ opacity: 0, x: -10 }}
|
| 135 |
+
animate={{ opacity: 1, x: 0 }}
|
| 136 |
+
transition={{ duration: 0.3 }}
|
| 137 |
+
className="flex justify-between items-center gap-4"
|
| 138 |
+
>
|
| 139 |
+
<span>{log.split(" [OK]")[0]}</span>
|
| 140 |
+
<span className="text-primary font-bold">✓ DONE</span>
|
| 141 |
+
</motion.div>
|
| 142 |
+
))}
|
| 143 |
+
{stage < 6 && (
|
| 144 |
+
<div className="flex items-center gap-1.5">
|
| 145 |
+
<span className="w-1 h-3 bg-primary animate-pulse" />
|
| 146 |
+
<span className="text-muted-foreground/60">...</span>
|
| 147 |
+
</div>
|
| 148 |
+
)}
|
| 149 |
+
</div>
|
| 150 |
+
</div>
|
| 151 |
+
|
| 152 |
+
{/* Progress Bar Container */}
|
| 153 |
+
<div className="space-y-2">
|
| 154 |
+
<div className="flex justify-between text-[10px] tracking-widest text-muted-foreground/60">
|
| 155 |
+
<span>SYSTEM_INITIALIZATION</span>
|
| 156 |
+
<span className="font-bold text-primary">{progress}%</span>
|
| 157 |
+
</div>
|
| 158 |
+
<div className="relative w-full h-1.5 bg-secondary/25 border border-white/5 rounded-full overflow-hidden">
|
| 159 |
+
<motion.div
|
| 160 |
+
className="h-full bg-gradient-to-r from-primary to-amber-500 shadow-[0_0_10px_var(--primary-glow)]"
|
| 161 |
+
style={{ width: `${progress}%` }}
|
| 162 |
+
/>
|
| 163 |
+
</div>
|
| 164 |
+
</div>
|
| 165 |
+
</div>
|
| 166 |
+
</motion.div>
|
| 167 |
+
)}
|
| 168 |
+
</AnimatePresence>
|
| 169 |
+
);
|
| 170 |
+
}
|
components/CountdownBanner.tsx
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
|
| 3 |
+
import { useEffect, useState } from "react";
|
| 4 |
+
import { motion } from "framer-motion";
|
| 5 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 6 |
+
import { SplitFlapText, SplitFlapMuteToggle } from "@/components/ui/split-flap-text";
|
| 7 |
+
|
| 8 |
+
export function CountdownBanner() {
|
| 9 |
+
const { t } = useLanguage();
|
| 10 |
+
const [timeLeft, setTimeLeft] = useState({
|
| 11 |
+
days: "00",
|
| 12 |
+
hours: "00",
|
| 13 |
+
minutes: "00",
|
| 14 |
+
seconds: "00",
|
| 15 |
+
});
|
| 16 |
+
const [isMounted, setIsMounted] = useState(false);
|
| 17 |
+
|
| 18 |
+
useEffect(() => {
|
| 19 |
+
const init = setTimeout(() => {
|
| 20 |
+
setIsMounted(true);
|
| 21 |
+
|
| 22 |
+
// Set target date to 15 days in the future from current visit, stored in localStorage so it is consistent
|
| 23 |
+
const targetTimeStr = localStorage.getItem("hubapi_launch_target");
|
| 24 |
+
let targetTime = 0;
|
| 25 |
+
|
| 26 |
+
if (targetTimeStr) {
|
| 27 |
+
targetTime = parseInt(targetTimeStr, 10);
|
| 28 |
+
// If target time has already passed, reset it to 12 days in the future
|
| 29 |
+
if (targetTime < Date.now()) {
|
| 30 |
+
targetTime = Date.now() + 12 * 24 * 60 * 60 * 1000 + 4 * 60 * 60 * 1000 + 15 * 60 * 1000;
|
| 31 |
+
localStorage.setItem("hubapi_launch_target", targetTime.toString());
|
| 32 |
+
}
|
| 33 |
+
} else {
|
| 34 |
+
targetTime = Date.now() + 15 * 24 * 60 * 60 * 1000 + 6 * 60 * 60 * 1000 + 32 * 60 * 1000;
|
| 35 |
+
localStorage.setItem("hubapi_launch_target", targetTime.toString());
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
const calculateTimeLeft = () => {
|
| 39 |
+
const difference = targetTime - Date.now();
|
| 40 |
+
|
| 41 |
+
if (difference <= 0) {
|
| 42 |
+
setTimeLeft({ days: "00", hours: "00", minutes: "00", seconds: "00" });
|
| 43 |
+
return;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
const d = Math.floor(difference / (1000 * 60 * 60 * 24));
|
| 47 |
+
const h = Math.floor((difference / (1000 * 60 * 60)) % 24);
|
| 48 |
+
const m = Math.floor((difference / 1000 / 60) % 60);
|
| 49 |
+
const s = Math.floor((difference / 1000) % 60);
|
| 50 |
+
|
| 51 |
+
setTimeLeft({
|
| 52 |
+
days: d.toString().padStart(2, "0"),
|
| 53 |
+
hours: h.toString().padStart(2, "0"),
|
| 54 |
+
minutes: m.toString().padStart(2, "0"),
|
| 55 |
+
seconds: s.toString().padStart(2, "0"),
|
| 56 |
+
});
|
| 57 |
+
};
|
| 58 |
+
|
| 59 |
+
calculateTimeLeft();
|
| 60 |
+
const interval = setInterval(calculateTimeLeft, 1000);
|
| 61 |
+
|
| 62 |
+
// Store cleanup for interval
|
| 63 |
+
return () => clearInterval(interval);
|
| 64 |
+
}, 0);
|
| 65 |
+
|
| 66 |
+
return () => clearTimeout(init);
|
| 67 |
+
}, []);
|
| 68 |
+
|
| 69 |
+
if (!isMounted) return null;
|
| 70 |
+
|
| 71 |
+
return (
|
| 72 |
+
<motion.div
|
| 73 |
+
initial={{ y: -50, opacity: 0 }}
|
| 74 |
+
animate={{ y: 0, opacity: 1 }}
|
| 75 |
+
transition={{ duration: 0.6, ease: "easeOut" }}
|
| 76 |
+
className="w-full bg-background/95 border-b border-primary/10 backdrop-blur-md z-40 py-2 sm:py-2.5 px-4 flex flex-col md:flex-row items-center justify-center gap-3 sm:gap-6 text-xs font-mono select-none"
|
| 77 |
+
>
|
| 78 |
+
{/* Glow highlight */}
|
| 79 |
+
<div className="absolute inset-x-0 bottom-0 h-[1px] bg-gradient-to-r from-transparent via-primary/30 to-transparent pointer-events-none" />
|
| 80 |
+
|
| 81 |
+
{/* Main Title & Indicator */}
|
| 82 |
+
<div className="flex items-center gap-2">
|
| 83 |
+
<span className="relative flex h-2 w-2">
|
| 84 |
+
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"></span>
|
| 85 |
+
<span className="relative inline-flex rounded-full h-2 w-2 bg-primary"></span>
|
| 86 |
+
</span>
|
| 87 |
+
<span className="text-primary font-bold tracking-widest text-[10px] sm:text-xs">
|
| 88 |
+
{t("countdownTitle")}
|
| 89 |
+
</span>
|
| 90 |
+
</div>
|
| 91 |
+
|
| 92 |
+
{/* Split Flap Countdown Digits */}
|
| 93 |
+
<div className="flex items-center gap-4 sm:gap-6">
|
| 94 |
+
{/* Days */}
|
| 95 |
+
<div className="flex items-center gap-1.5">
|
| 96 |
+
<div className="flex gap-[1px]">
|
| 97 |
+
<SplitFlapText text={timeLeft.days} speed={30} fontSize="14px" />
|
| 98 |
+
</div>
|
| 99 |
+
<span className="text-[9px] text-muted-foreground uppercase tracking-widest font-bold ms-0.5">
|
| 100 |
+
{t("days")}
|
| 101 |
+
</span>
|
| 102 |
+
</div>
|
| 103 |
+
|
| 104 |
+
<span className="text-primary/60 font-bold animate-pulse">:</span>
|
| 105 |
+
|
| 106 |
+
{/* Hours */}
|
| 107 |
+
<div className="flex items-center gap-1.5">
|
| 108 |
+
<div className="flex gap-[1px]">
|
| 109 |
+
<SplitFlapText text={timeLeft.hours} speed={30} fontSize="14px" />
|
| 110 |
+
</div>
|
| 111 |
+
<span className="text-[9px] text-muted-foreground uppercase tracking-widest font-bold ms-0.5">
|
| 112 |
+
{t("hours")}
|
| 113 |
+
</span>
|
| 114 |
+
</div>
|
| 115 |
+
|
| 116 |
+
<span className="text-primary/60 font-bold animate-pulse">:</span>
|
| 117 |
+
|
| 118 |
+
{/* Minutes */}
|
| 119 |
+
<div className="flex items-center gap-1.5">
|
| 120 |
+
<div className="flex gap-[1px]">
|
| 121 |
+
<SplitFlapText text={timeLeft.minutes} speed={30} fontSize="14px" />
|
| 122 |
+
</div>
|
| 123 |
+
<span className="text-[9px] text-muted-foreground uppercase tracking-widest font-bold ms-0.5">
|
| 124 |
+
{t("minutes")}
|
| 125 |
+
</span>
|
| 126 |
+
</div>
|
| 127 |
+
|
| 128 |
+
<span className="text-primary/60 font-bold animate-pulse">:</span>
|
| 129 |
+
|
| 130 |
+
{/* Seconds */}
|
| 131 |
+
<div className="flex items-center gap-1.5">
|
| 132 |
+
<div className="flex gap-[1px]">
|
| 133 |
+
<SplitFlapText text={timeLeft.seconds} speed={30} fontSize="14px" />
|
| 134 |
+
</div>
|
| 135 |
+
<span className="text-[9px] text-muted-foreground uppercase tracking-widest font-bold ms-0.5">
|
| 136 |
+
{t("seconds")}
|
| 137 |
+
</span>
|
| 138 |
+
</div>
|
| 139 |
+
</div>
|
| 140 |
+
|
| 141 |
+
{/* Audio controls */}
|
| 142 |
+
<div className="hidden md:flex items-center gap-2 border-s border-border ps-6">
|
| 143 |
+
<SplitFlapMuteToggle />
|
| 144 |
+
</div>
|
| 145 |
+
</motion.div>
|
| 146 |
+
);
|
| 147 |
+
}
|
components/CyberTicketModal.tsx
CHANGED
|
@@ -1,8 +1,10 @@
|
|
| 1 |
"use client";
|
| 2 |
|
| 3 |
-
import React, { useState, useEffect, useMemo } from "react";
|
| 4 |
import { motion, AnimatePresence } from "framer-motion";
|
| 5 |
-
import { X, Copy, Check,
|
|
|
|
|
|
|
| 6 |
|
| 7 |
interface CyberTicketModalProps {
|
| 8 |
isOpen: boolean;
|
|
@@ -11,7 +13,9 @@ interface CyberTicketModalProps {
|
|
| 11 |
}
|
| 12 |
|
| 13 |
export function CyberTicketModal({ isOpen, onClose, email }: CyberTicketModalProps) {
|
|
|
|
| 14 |
const [copied, setCopied] = useState(false);
|
|
|
|
| 15 |
|
| 16 |
// Card tilt states for the 3D Holographic effect
|
| 17 |
const [rotateX, setRotateX] = useState(0);
|
|
@@ -66,6 +70,221 @@ export function CyberTicketModal({ isOpen, onClose, email }: CyberTicketModalPro
|
|
| 66 |
}
|
| 67 |
}, [isOpen, email]);
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
|
| 70 |
const card = e.currentTarget;
|
| 71 |
const rect = card.getBoundingClientRect();
|
|
@@ -128,13 +347,16 @@ export function CyberTicketModal({ isOpen, onClose, email }: CyberTicketModalPro
|
|
| 128 |
|
| 129 |
{/* Modal Container */}
|
| 130 |
<motion.div
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
initial={{ opacity: 0, scale: 0.9, y: 20 }}
|
| 132 |
animate={{ opacity: 1, scale: 1, y: 0 }}
|
| 133 |
exit={{ opacity: 0, scale: 0.9, y: 20 }}
|
| 134 |
transition={{ type: "spring", damping: 25, stiffness: 200 }}
|
| 135 |
-
className="relative w-full max-w-lg bg-black/90 border border-primary/20 p-6 md:p-8 rounded-lg shadow-[0_0_50px_rgba(255,170,64,0.1)] z-10 overflow-hidden font-mono"
|
| 136 |
-
role="dialog"
|
| 137 |
-
aria-labelledby="ticket-modal-title"
|
| 138 |
>
|
| 139 |
{/* Ambient Background Glow */}
|
| 140 |
<div className="absolute -top-32 -left-32 w-64 h-64 bg-primary/10 rounded-full blur-3xl pointer-events-none" />
|
|
@@ -150,7 +372,7 @@ export function CyberTicketModal({ isOpen, onClose, email }: CyberTicketModalPro
|
|
| 150 |
<div className="flex justify-between items-center mb-6">
|
| 151 |
<span id="ticket-modal-title" className="text-xs text-amber-400 tracking-widest uppercase flex items-center gap-2">
|
| 152 |
<span className="w-1.5 h-1.5 bg-amber-400 rounded-full animate-ping" />
|
| 153 |
-
|
| 154 |
</span>
|
| 155 |
<button
|
| 156 |
onClick={onClose}
|
|
@@ -163,121 +385,64 @@ export function CyberTicketModal({ isOpen, onClose, email }: CyberTicketModalPro
|
|
| 163 |
|
| 164 |
<div className="text-center space-y-2 mb-8">
|
| 165 |
<h2 className="text-xl md:text-2xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-amber-400 via-zinc-100 to-indigo-400">
|
| 166 |
-
|
| 167 |
</h2>
|
| 168 |
<p className="text-xs text-zinc-400 max-w-sm mx-auto">
|
| 169 |
-
|
| 170 |
</p>
|
| 171 |
</div>
|
| 172 |
|
| 173 |
-
{/* 3D Holographic Card Box */}
|
| 174 |
-
<div className="flex justify-center py-4 mb-6"
|
| 175 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
onMouseMove={handleMouseMove}
|
| 177 |
onMouseLeave={handleMouseLeave}
|
| 178 |
-
|
| 179 |
-
rotateX,
|
| 180 |
-
rotateY,
|
| 181 |
-
}}
|
| 182 |
-
transition={{ type: "tween", ease: "easeOut", duration: 0.15 }}
|
| 183 |
-
className="relative w-full max-w-[340px] h-[210px] rounded-xl border border-white/20 bg-gradient-to-br from-zinc-900/90 via-black to-zinc-950/90 shadow-2xl cursor-grab active:cursor-grabbing select-none overflow-hidden [transform-style:preserve-3d]"
|
| 184 |
-
>
|
| 185 |
-
{/* Holographic Glare Shifting Effect */}
|
| 186 |
-
<div
|
| 187 |
-
className="absolute inset-0 pointer-events-none mix-blend-color-dodge transition-opacity duration-300 opacity-60"
|
| 188 |
-
style={{
|
| 189 |
-
background: `radial-gradient(circle at ${glareX}% ${glareY}%, rgba(255, 180, 100, 0.25) 0%, rgba(130, 80, 250, 0.1) 45%, transparent 70%), linear-gradient(${135 + (glareX - 50) * 0.4}deg, transparent ${glareX - 20}%, rgba(255, 255, 255, 0.05) ${glareX - 5}%, rgba(255, 255, 255, 0.15) ${glareX}%, rgba(255, 255, 255, 0.05) ${glareX + 5}%, transparent ${glareX + 20}%)`,
|
| 190 |
-
}}
|
| 191 |
-
/>
|
| 192 |
-
|
| 193 |
-
{/* Subtle Grid Pattern Overlay */}
|
| 194 |
-
<div className="absolute inset-0 pointer-events-none opacity-20 bg-[linear-gradient(rgba(255,255,255,0.05)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,0.05)_1px,transparent_1px)] bg-[size:10px_10px]" />
|
| 195 |
-
|
| 196 |
-
{/* Cyber Card Inner HUD Data */}
|
| 197 |
-
<div className="absolute inset-0 p-4 flex flex-col justify-between [transform:translateZ(30px)]">
|
| 198 |
-
{/* Top Row: Brand & Security Badge */}
|
| 199 |
-
<div className="flex justify-between items-start">
|
| 200 |
-
<div className="space-y-0.5">
|
| 201 |
-
<span className="text-[14px] font-bold tracking-widest text-amber-400 flex items-center gap-1.5">
|
| 202 |
-
<Cpu className="w-3.5 h-3.5 text-amber-400" />
|
| 203 |
-
HUBAPI
|
| 204 |
-
</span>
|
| 205 |
-
<span className="text-[6px] text-white/40 tracking-widest block uppercase">NEURAL GATEWAY MESH ACCESS</span>
|
| 206 |
-
</div>
|
| 207 |
-
<div className="flex items-center gap-1 bg-amber-500/10 border border-amber-500/20 px-2 py-0.5 text-[8px] text-amber-400">
|
| 208 |
-
<Shield className="w-2.5 h-2.5" />
|
| 209 |
-
<span>SECURE // LINK</span>
|
| 210 |
-
</div>
|
| 211 |
-
</div>
|
| 212 |
-
|
| 213 |
-
{/* Middle Area: Ticket Number */}
|
| 214 |
-
<div className="space-y-1">
|
| 215 |
-
<span className="text-[8px] text-zinc-500 uppercase tracking-widest block">Access Pass Identification</span>
|
| 216 |
-
<div className="text-[28px] font-extrabold tracking-widest text-white font-mono tabular-nums leading-none flex items-baseline">
|
| 217 |
-
<span className="text-amber-500/40 text-[16px] mr-1">#</span>
|
| 218 |
-
{ticketNumber}
|
| 219 |
-
</div>
|
| 220 |
-
</div>
|
| 221 |
-
|
| 222 |
-
{/* Bottom Area: Barcode & Email Signature */}
|
| 223 |
-
<div className="flex justify-between items-end">
|
| 224 |
-
<div className="space-y-1 text-left">
|
| 225 |
-
<div className="text-[8px] text-zinc-500 uppercase tracking-wider block">Authorized Signatory</div>
|
| 226 |
-
<div className="text-[9px] text-amber-400 font-semibold font-mono tracking-tight max-w-[170px] truncate">
|
| 227 |
-
{getMaskedEmail()}
|
| 228 |
-
</div>
|
| 229 |
-
<div className="text-[6px] text-white/30">ISSUED_AT // {new Date().toISOString().substring(0, 10)}</div>
|
| 230 |
-
</div>
|
| 231 |
-
|
| 232 |
-
{/* Highly authentic responsive Barcode */}
|
| 233 |
-
<div className="flex flex-col items-center gap-0.5 opacity-80 shrink-0">
|
| 234 |
-
<div className="flex items-end h-8 gap-[1px]">
|
| 235 |
-
{[2, 1, 3, 1, 2, 4, 1, 2, 1, 3, 2, 1, 4, 1, 2, 3, 1].map((weight, idx) => (
|
| 236 |
-
<div
|
| 237 |
-
key={idx}
|
| 238 |
-
style={{ width: `${weight}px` }}
|
| 239 |
-
className="h-full bg-white/90"
|
| 240 |
-
/>
|
| 241 |
-
))}
|
| 242 |
-
</div>
|
| 243 |
-
<span className="text-[5px] text-white/30 tracking-wider">HUBAPI_{ticketNumber.replace(",", "")}</span>
|
| 244 |
-
</div>
|
| 245 |
-
</div>
|
| 246 |
-
</div>
|
| 247 |
-
|
| 248 |
-
{/* Subdued Diagonal Glowing Edge Strip */}
|
| 249 |
-
<div className="absolute top-0 right-0 w-[40px] h-[3px] bg-gradient-to-r from-amber-400 to-indigo-500 blur-[1px]" />
|
| 250 |
-
<div className="absolute bottom-0 left-0 w-[40px] h-[3px] bg-gradient-to-r from-indigo-500 to-amber-400 blur-[1px]" />
|
| 251 |
-
</motion.div>
|
| 252 |
</div>
|
| 253 |
|
| 254 |
{/* Action Buttons */}
|
| 255 |
-
<div className="flex flex-col
|
| 256 |
-
<
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
<
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
|
| 268 |
<button
|
| 269 |
onClick={handleCopyCode}
|
| 270 |
-
className="
|
| 271 |
>
|
| 272 |
{copied ? (
|
| 273 |
<>
|
| 274 |
<Check className="w-4 h-4 text-emerald-500" />
|
| 275 |
-
<span className="text-emerald-500">Access
|
| 276 |
</>
|
| 277 |
) : (
|
| 278 |
<>
|
| 279 |
<Copy className="w-4 h-4" />
|
| 280 |
-
<span>
|
| 281 |
</>
|
| 282 |
)}
|
| 283 |
</button>
|
|
|
|
| 1 |
"use client";
|
| 2 |
|
| 3 |
+
import React, { useState, useEffect, useMemo, useRef } from "react";
|
| 4 |
import { motion, AnimatePresence } from "framer-motion";
|
| 5 |
+
import { X, Copy, Check, Activity, Download } from "lucide-react";
|
| 6 |
+
import { ThreeTicketCard } from "./ThreeTicketCard";
|
| 7 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 8 |
|
| 9 |
interface CyberTicketModalProps {
|
| 10 |
isOpen: boolean;
|
|
|
|
| 13 |
}
|
| 14 |
|
| 15 |
export function CyberTicketModal({ isOpen, onClose, email }: CyberTicketModalProps) {
|
| 16 |
+
const { t, language } = useLanguage();
|
| 17 |
const [copied, setCopied] = useState(false);
|
| 18 |
+
const modalRef = useRef<HTMLDivElement>(null);
|
| 19 |
|
| 20 |
// Card tilt states for the 3D Holographic effect
|
| 21 |
const [rotateX, setRotateX] = useState(0);
|
|
|
|
| 70 |
}
|
| 71 |
}, [isOpen, email]);
|
| 72 |
|
| 73 |
+
// Gyroscope mobile support (Device Orientation)
|
| 74 |
+
useEffect(() => {
|
| 75 |
+
if (!isOpen) return;
|
| 76 |
+
|
| 77 |
+
const handleOrientation = (e: DeviceOrientationEvent) => {
|
| 78 |
+
// beta: front-back tilt (-180 to 180)
|
| 79 |
+
// gamma: left-right tilt (-90 to 90)
|
| 80 |
+
if (e.beta === null || e.gamma === null) return;
|
| 81 |
+
|
| 82 |
+
// Restrict angles for moderate tilt effect (up to 20 degrees)
|
| 83 |
+
const beta = Math.min(Math.max(e.beta, -30), 30);
|
| 84 |
+
const gamma = Math.min(Math.max(e.gamma, -30), 30);
|
| 85 |
+
|
| 86 |
+
// Map degrees to card transform values
|
| 87 |
+
setRotateX((beta / 30) * -15);
|
| 88 |
+
setRotateY((gamma / 30) * 15);
|
| 89 |
+
setGlareX(50 + (gamma / 30) * 50);
|
| 90 |
+
setGlareY(50 + (beta / 30) * 50);
|
| 91 |
+
};
|
| 92 |
+
|
| 93 |
+
window.addEventListener("deviceorientation", handleOrientation);
|
| 94 |
+
return () => {
|
| 95 |
+
window.removeEventListener("deviceorientation", handleOrientation);
|
| 96 |
+
};
|
| 97 |
+
}, [isOpen]);
|
| 98 |
+
|
| 99 |
+
// Focus trap and escape key listener
|
| 100 |
+
useEffect(() => {
|
| 101 |
+
if (!isOpen) return;
|
| 102 |
+
|
| 103 |
+
const modal = modalRef.current;
|
| 104 |
+
if (!modal) return;
|
| 105 |
+
|
| 106 |
+
// Find focusable elements
|
| 107 |
+
const focusableElements = modal.querySelectorAll(
|
| 108 |
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
| 109 |
+
);
|
| 110 |
+
const firstElement = focusableElements[0] as HTMLElement;
|
| 111 |
+
const lastElement = focusableElements[focusableElements.length - 1] as HTMLElement;
|
| 112 |
+
|
| 113 |
+
// Save previous active element to restore later
|
| 114 |
+
const previousActiveElement = document.activeElement as HTMLElement;
|
| 115 |
+
|
| 116 |
+
// Set a tiny timeout to ensure animation didn't disrupt focus
|
| 117 |
+
const focusTimeout = setTimeout(() => {
|
| 118 |
+
if (firstElement) {
|
| 119 |
+
firstElement.focus();
|
| 120 |
+
} else {
|
| 121 |
+
modal.focus();
|
| 122 |
+
}
|
| 123 |
+
}, 50);
|
| 124 |
+
|
| 125 |
+
const handleKeyDown = (e: KeyboardEvent) => {
|
| 126 |
+
if (e.key === "Escape") {
|
| 127 |
+
onClose();
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
if (e.key !== "Tab") return;
|
| 131 |
+
|
| 132 |
+
if (e.shiftKey) {
|
| 133 |
+
if (document.activeElement === firstElement) {
|
| 134 |
+
lastElement.focus();
|
| 135 |
+
e.preventDefault();
|
| 136 |
+
}
|
| 137 |
+
} else {
|
| 138 |
+
if (document.activeElement === lastElement) {
|
| 139 |
+
firstElement.focus();
|
| 140 |
+
e.preventDefault();
|
| 141 |
+
}
|
| 142 |
+
}
|
| 143 |
+
};
|
| 144 |
+
|
| 145 |
+
window.addEventListener("keydown", handleKeyDown);
|
| 146 |
+
return () => {
|
| 147 |
+
clearTimeout(focusTimeout);
|
| 148 |
+
window.removeEventListener("keydown", handleKeyDown);
|
| 149 |
+
if (previousActiveElement) {
|
| 150 |
+
previousActiveElement.focus();
|
| 151 |
+
}
|
| 152 |
+
};
|
| 153 |
+
}, [isOpen, onClose]);
|
| 154 |
+
|
| 155 |
+
const exportTicketAsImage = () => {
|
| 156 |
+
const canvas = document.createElement("canvas");
|
| 157 |
+
canvas.width = 800;
|
| 158 |
+
canvas.height = 500;
|
| 159 |
+
const ctx = canvas.getContext("2d");
|
| 160 |
+
if (!ctx) return;
|
| 161 |
+
|
| 162 |
+
// 1. Draw Background Gradient
|
| 163 |
+
const bgGrad = ctx.createLinearGradient(0, 0, 800, 500);
|
| 164 |
+
bgGrad.addColorStop(0, "#09090b");
|
| 165 |
+
bgGrad.addColorStop(0.5, "#020202");
|
| 166 |
+
bgGrad.addColorStop(1, "#0f0f13");
|
| 167 |
+
ctx.fillStyle = bgGrad;
|
| 168 |
+
ctx.fillRect(0, 0, 800, 500);
|
| 169 |
+
|
| 170 |
+
// 2. Draw Subtle Cyber Grid Pattern
|
| 171 |
+
ctx.strokeStyle = "rgba(255, 255, 255, 0.03)";
|
| 172 |
+
ctx.lineWidth = 1;
|
| 173 |
+
const gridSpacing = 20;
|
| 174 |
+
for (let x = 0; x < 800; x += gridSpacing) {
|
| 175 |
+
ctx.beginPath();
|
| 176 |
+
ctx.moveTo(x, 0);
|
| 177 |
+
ctx.lineTo(x, 500);
|
| 178 |
+
ctx.stroke();
|
| 179 |
+
}
|
| 180 |
+
for (let y = 0; y < 500; y += gridSpacing) {
|
| 181 |
+
ctx.beginPath();
|
| 182 |
+
ctx.moveTo(0, y);
|
| 183 |
+
ctx.lineTo(800, y);
|
| 184 |
+
ctx.stroke();
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
// 3. Draw Ambient Glowing Edges (Top-Right and Bottom-Left)
|
| 188 |
+
// Diagonal top-right orange glow
|
| 189 |
+
const trGrad = ctx.createLinearGradient(600, 0, 800, 0);
|
| 190 |
+
trGrad.addColorStop(0, "rgba(245, 158, 11, 0)");
|
| 191 |
+
trGrad.addColorStop(1, "rgba(245, 158, 11, 0.4)");
|
| 192 |
+
ctx.fillStyle = trGrad;
|
| 193 |
+
ctx.fillRect(550, 0, 250, 10);
|
| 194 |
+
|
| 195 |
+
// Diagonal bottom-left indigo glow
|
| 196 |
+
const blGrad = ctx.createLinearGradient(0, 500, 200, 500);
|
| 197 |
+
blGrad.addColorStop(0, "rgba(99, 102, 241, 0.4)");
|
| 198 |
+
blGrad.addColorStop(1, "rgba(99, 102, 241, 0)");
|
| 199 |
+
ctx.fillStyle = blGrad;
|
| 200 |
+
ctx.fillRect(0, 490, 250, 10);
|
| 201 |
+
|
| 202 |
+
// 4. Draw outer border
|
| 203 |
+
ctx.strokeStyle = "rgba(255, 255, 255, 0.1)";
|
| 204 |
+
ctx.lineWidth = 2;
|
| 205 |
+
ctx.strokeRect(20, 20, 760, 460);
|
| 206 |
+
|
| 207 |
+
// Corner brackets inside the ticket for styling
|
| 208 |
+
ctx.strokeStyle = "rgba(245, 158, 11, 0.4)";
|
| 209 |
+
ctx.lineWidth = 3;
|
| 210 |
+
// Top-Left corner
|
| 211 |
+
ctx.beginPath(); ctx.moveTo(35, 60); ctx.lineTo(35, 35); ctx.lineTo(60, 35); ctx.stroke();
|
| 212 |
+
// Top-Right corner
|
| 213 |
+
ctx.beginPath(); ctx.moveTo(765, 60); ctx.lineTo(765, 35); ctx.lineTo(740, 35); ctx.stroke();
|
| 214 |
+
// Bottom-Left corner
|
| 215 |
+
ctx.beginPath(); ctx.moveTo(35, 440); ctx.lineTo(35, 465); ctx.lineTo(60, 465); ctx.stroke();
|
| 216 |
+
// Bottom-Right corner
|
| 217 |
+
ctx.beginPath(); ctx.moveTo(765, 440); ctx.lineTo(765, 465); ctx.lineTo(740, 465); ctx.stroke();
|
| 218 |
+
|
| 219 |
+
// 5. Draw Header Logo text (HUBAPI)
|
| 220 |
+
ctx.font = "bold 32px monospace";
|
| 221 |
+
ctx.fillStyle = "#fbbf24"; // Amber 400
|
| 222 |
+
ctx.fillText("CPU_HUBAPI", 50, 85);
|
| 223 |
+
|
| 224 |
+
ctx.font = "9px monospace";
|
| 225 |
+
ctx.fillStyle = "rgba(255, 255, 255, 0.4)";
|
| 226 |
+
ctx.fillText("NEURAL GATEWAY MESH ACCESS", 50, 105);
|
| 227 |
+
|
| 228 |
+
// Draw SECURE // LINK badge
|
| 229 |
+
ctx.fillStyle = "rgba(245, 158, 11, 0.1)";
|
| 230 |
+
ctx.fillRect(580, 55, 160, 30);
|
| 231 |
+
ctx.strokeStyle = "rgba(245, 158, 11, 0.3)";
|
| 232 |
+
ctx.lineWidth = 1;
|
| 233 |
+
ctx.strokeRect(580, 55, 160, 30);
|
| 234 |
+
|
| 235 |
+
ctx.font = "bold 10px monospace";
|
| 236 |
+
ctx.fillStyle = "#fbbf24";
|
| 237 |
+
ctx.textAlign = "center";
|
| 238 |
+
ctx.fillText("SECURE // LINK", 660, 74);
|
| 239 |
+
ctx.textAlign = "left"; // reset
|
| 240 |
+
|
| 241 |
+
// 6. Draw Middle Title
|
| 242 |
+
ctx.font = "14px monospace";
|
| 243 |
+
ctx.fillStyle = "rgba(255, 255, 255, 0.3)";
|
| 244 |
+
ctx.fillText("ACCESS PASS IDENTIFICATION", 50, 200);
|
| 245 |
+
|
| 246 |
+
ctx.font = "extrabold 64px monospace";
|
| 247 |
+
ctx.fillStyle = "#ffffff";
|
| 248 |
+
ctx.fillText(`# ${ticketNumber}`, 50, 270);
|
| 249 |
+
|
| 250 |
+
// 7. Draw Bottom Info: Masked Email & Date
|
| 251 |
+
ctx.font = "12px monospace";
|
| 252 |
+
ctx.fillStyle = "rgba(255, 255, 255, 0.3)";
|
| 253 |
+
ctx.fillText("AUTHORIZED SIGNATORY", 50, 370);
|
| 254 |
+
|
| 255 |
+
ctx.font = "bold 18px monospace";
|
| 256 |
+
ctx.fillStyle = "#fbbf24";
|
| 257 |
+
ctx.fillText(getMaskedEmail(), 50, 395);
|
| 258 |
+
|
| 259 |
+
ctx.font = "10px monospace";
|
| 260 |
+
ctx.fillStyle = "rgba(255, 255, 255, 0.25)";
|
| 261 |
+
ctx.fillText(`ISSUED_AT // ${new Date().toISOString().substring(0, 10)}`, 50, 420);
|
| 262 |
+
|
| 263 |
+
// 8. Draw Barcode
|
| 264 |
+
const barcodeX = 540;
|
| 265 |
+
const barcodeY = 320;
|
| 266 |
+
const barcodeWeights = [4, 2, 6, 2, 4, 8, 2, 4, 2, 6, 4, 2, 8, 2, 4, 6, 2];
|
| 267 |
+
ctx.fillStyle = "rgba(255, 255, 255, 0.8)";
|
| 268 |
+
let currX = barcodeX;
|
| 269 |
+
barcodeWeights.forEach((w) => {
|
| 270 |
+
ctx.fillRect(currX, barcodeY, w * 1.5, 60);
|
| 271 |
+
currX += w * 1.5 + 3;
|
| 272 |
+
});
|
| 273 |
+
|
| 274 |
+
ctx.font = "10px monospace";
|
| 275 |
+
ctx.fillStyle = "rgba(255, 255, 255, 0.3)";
|
| 276 |
+
ctx.fillText(`HUBAPI_${ticketNumber.replace(",", "")}`, barcodeX + 15, 400);
|
| 277 |
+
|
| 278 |
+
// 9. Generate Download URL
|
| 279 |
+
const imageURL = canvas.toDataURL("image/png");
|
| 280 |
+
const link = document.createElement("a");
|
| 281 |
+
link.href = imageURL;
|
| 282 |
+
link.download = `HUBAPI-ACCESS-PASS-${ticketNumber.replace(",", "")}.png`;
|
| 283 |
+
document.body.appendChild(link);
|
| 284 |
+
link.click();
|
| 285 |
+
document.body.removeChild(link);
|
| 286 |
+
};
|
| 287 |
+
|
| 288 |
const handleMouseMove = (e: React.MouseEvent<HTMLDivElement>) => {
|
| 289 |
const card = e.currentTarget;
|
| 290 |
const rect = card.getBoundingClientRect();
|
|
|
|
| 347 |
|
| 348 |
{/* Modal Container */}
|
| 349 |
<motion.div
|
| 350 |
+
ref={modalRef}
|
| 351 |
+
role="dialog"
|
| 352 |
+
aria-modal="true"
|
| 353 |
+
aria-labelledby="ticket-modal-title"
|
| 354 |
+
tabIndex={-1}
|
| 355 |
initial={{ opacity: 0, scale: 0.9, y: 20 }}
|
| 356 |
animate={{ opacity: 1, scale: 1, y: 0 }}
|
| 357 |
exit={{ opacity: 0, scale: 0.9, y: 20 }}
|
| 358 |
transition={{ type: "spring", damping: 25, stiffness: 200 }}
|
| 359 |
+
className="relative w-full max-w-lg bg-black/90 border border-primary/20 p-6 md:p-8 rounded-lg shadow-[0_0_50px_rgba(255,170,64,0.1)] z-10 overflow-hidden font-mono focus:outline-none"
|
|
|
|
|
|
|
| 360 |
>
|
| 361 |
{/* Ambient Background Glow */}
|
| 362 |
<div className="absolute -top-32 -left-32 w-64 h-64 bg-primary/10 rounded-full blur-3xl pointer-events-none" />
|
|
|
|
| 372 |
<div className="flex justify-between items-center mb-6">
|
| 373 |
<span id="ticket-modal-title" className="text-xs text-amber-400 tracking-widest uppercase flex items-center gap-2">
|
| 374 |
<span className="w-1.5 h-1.5 bg-amber-400 rounded-full animate-ping" />
|
| 375 |
+
{t("logo")} {"//"} {t("ticketConfirmed")}
|
| 376 |
</span>
|
| 377 |
<button
|
| 378 |
onClick={onClose}
|
|
|
|
| 385 |
|
| 386 |
<div className="text-center space-y-2 mb-8">
|
| 387 |
<h2 className="text-xl md:text-2xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-amber-400 via-zinc-100 to-indigo-400">
|
| 388 |
+
{t("ticketConfirmed")}
|
| 389 |
</h2>
|
| 390 |
<p className="text-xs text-zinc-400 max-w-sm mx-auto">
|
| 391 |
+
{t("ticketDescription")}
|
| 392 |
</p>
|
| 393 |
</div>
|
| 394 |
|
| 395 |
+
{/* 3D Holographic Card Box (Real Three.js WebGL) */}
|
| 396 |
+
<div className="flex justify-center py-4 mb-6">
|
| 397 |
+
<ThreeTicketCard
|
| 398 |
+
email={email}
|
| 399 |
+
ticketNumber={ticketNumber}
|
| 400 |
+
rotateX={rotateX}
|
| 401 |
+
rotateY={rotateY}
|
| 402 |
+
glareX={glareX}
|
| 403 |
+
glareY={glareY}
|
| 404 |
onMouseMove={handleMouseMove}
|
| 405 |
onMouseLeave={handleMouseLeave}
|
| 406 |
+
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 407 |
</div>
|
| 408 |
|
| 409 |
{/* Action Buttons */}
|
| 410 |
+
<div className="flex flex-col gap-3">
|
| 411 |
+
<div className="flex flex-col sm:flex-row gap-3">
|
| 412 |
+
<a
|
| 413 |
+
href={xShareLink}
|
| 414 |
+
target="_blank"
|
| 415 |
+
rel="noopener noreferrer"
|
| 416 |
+
className="flex-1 flex items-center justify-center gap-2 h-12 bg-white text-black hover:bg-white/90 transition-colors uppercase font-bold text-xs tracking-wider cursor-pointer border-none [clip-path:polygon(8px_0,100%_0,100%_calc(100%_-_8px),calc(100%_-_8px)_100%,0_100%,0_8px)]"
|
| 417 |
+
>
|
| 418 |
+
<svg className="w-4 h-4 fill-current" viewBox="0 0 24 24" aria-hidden="true">
|
| 419 |
+
<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />
|
| 420 |
+
</svg>
|
| 421 |
+
<span>{t("shareOnX")}</span>
|
| 422 |
+
</a>
|
| 423 |
+
|
| 424 |
+
<button
|
| 425 |
+
onClick={exportTicketAsImage}
|
| 426 |
+
className="flex-1 flex items-center justify-center gap-2 h-12 bg-amber-500 text-black hover:bg-amber-400 transition-colors uppercase font-bold text-xs tracking-wider cursor-pointer border-none [clip-path:polygon(8px_0,100%_0,100%_calc(100%_-_8px),calc(100%_-_8px)_100%,0_100%,0_8px)]"
|
| 427 |
+
>
|
| 428 |
+
<Download className="w-4 h-4" />
|
| 429 |
+
<span>{language === "ar" ? "تحميل التذكرة" : "Download Pass"}</span>
|
| 430 |
+
</button>
|
| 431 |
+
</div>
|
| 432 |
|
| 433 |
<button
|
| 434 |
onClick={handleCopyCode}
|
| 435 |
+
className="w-full flex items-center justify-center gap-2 h-12 bg-transparent text-zinc-400 hover:text-white hover:bg-white/5 border border-zinc-800 transition-colors uppercase font-bold text-xs tracking-wider cursor-pointer [clip-path:polygon(8px_0,100%_0,100%_calc(100%_-_8px),calc(100%_-_8px)_100%,0_100%,0_8px)]"
|
| 436 |
>
|
| 437 |
{copied ? (
|
| 438 |
<>
|
| 439 |
<Check className="w-4 h-4 text-emerald-500" />
|
| 440 |
+
<span className="text-emerald-500">{language === "ar" ? "تم نسخ الرمز" : "Access Code Copied"}</span>
|
| 441 |
</>
|
| 442 |
) : (
|
| 443 |
<>
|
| 444 |
<Copy className="w-4 h-4" />
|
| 445 |
+
<span>{t("copyLink")}</span>
|
| 446 |
</>
|
| 447 |
)}
|
| 448 |
</button>
|
components/DottedMap.tsx
CHANGED
|
@@ -1,10 +1,55 @@
|
|
| 1 |
"use client";
|
| 2 |
|
| 3 |
-
import { useMemo, memo, useState } from "react";
|
| 4 |
import { motion, AnimatePresence } from "framer-motion";
|
| 5 |
import { geoMercator } from "d3-geo";
|
| 6 |
import dottedMapData from "../data/dotted-map-data.json";
|
| 7 |
import { regionMarkers, topCountries, countryRequests } from "../data/country-data";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
const countryColors: Record<string, string> = {
|
| 10 |
US: "#1e40af",
|
|
@@ -218,7 +263,29 @@ interface DottedMapProps {
|
|
| 218 |
}
|
| 219 |
|
| 220 |
export default function DottedMap({ width = 1000, height = 560 }: DottedMapProps) {
|
|
|
|
| 221 |
const [hoveredMarker, setHoveredMarker] = useState<(typeof regionMarkers)[0] | null>(null);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
|
| 223 |
const handleMarkerHover = (marker: (typeof regionMarkers)[0] | null) => {
|
| 224 |
setHoveredMarker(marker);
|
|
@@ -310,6 +377,13 @@ export default function DottedMap({ width = 1000, height = 560 }: DottedMapProps
|
|
| 310 |
{hoveredMarker && (() => {
|
| 311 |
const coords = projection(hoveredMarker.coordinates);
|
| 312 |
if (!coords) return null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 313 |
return (
|
| 314 |
<motion.div
|
| 315 |
initial={{ opacity: 0, y: 5 }}
|
|
@@ -323,11 +397,20 @@ export default function DottedMap({ width = 1000, height = 560 }: DottedMapProps
|
|
| 323 |
transform: "translate(-50%, -140%)",
|
| 324 |
}}
|
| 325 |
>
|
| 326 |
-
<div className="flex
|
| 327 |
-
<
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 331 |
</div>
|
| 332 |
</motion.div>
|
| 333 |
);
|
|
|
|
| 1 |
"use client";
|
| 2 |
|
| 3 |
+
import { useMemo, memo, useState, useEffect } from "react";
|
| 4 |
import { motion, AnimatePresence } from "framer-motion";
|
| 5 |
import { geoMercator } from "d3-geo";
|
| 6 |
import dottedMapData from "../data/dotted-map-data.json";
|
| 7 |
import { regionMarkers, topCountries, countryRequests } from "../data/country-data";
|
| 8 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 9 |
+
|
| 10 |
+
const baseLatencies: Record<string, number> = {
|
| 11 |
+
hnd1: 45,
|
| 12 |
+
kix1: 49,
|
| 13 |
+
bom1: 82,
|
| 14 |
+
gru1: 135,
|
| 15 |
+
icn1: 52,
|
| 16 |
+
iad1: 14,
|
| 17 |
+
sfo1: 18,
|
| 18 |
+
cle1: 25,
|
| 19 |
+
pdx1: 32,
|
| 20 |
+
lhr1: 12,
|
| 21 |
+
cdg1: 15,
|
| 22 |
+
cpt1: 184,
|
| 23 |
+
hkg1: 64,
|
| 24 |
+
sin1: 38,
|
| 25 |
+
syd1: 145,
|
| 26 |
+
fra1: 8,
|
| 27 |
+
dxb1: 42,
|
| 28 |
+
arn1: 29,
|
| 29 |
+
dub1: 19,
|
| 30 |
+
};
|
| 31 |
+
|
| 32 |
+
const baseLoads: Record<string, number> = {
|
| 33 |
+
hnd1: 24,
|
| 34 |
+
kix1: 18,
|
| 35 |
+
bom1: 42,
|
| 36 |
+
gru1: 31,
|
| 37 |
+
icn1: 28,
|
| 38 |
+
iad1: 68,
|
| 39 |
+
sfo1: 54,
|
| 40 |
+
cle1: 15,
|
| 41 |
+
pdx1: 20,
|
| 42 |
+
lhr1: 58,
|
| 43 |
+
cdg1: 45,
|
| 44 |
+
cpt1: 12,
|
| 45 |
+
hkg1: 36,
|
| 46 |
+
sin1: 50,
|
| 47 |
+
syd1: 22,
|
| 48 |
+
fra1: 72,
|
| 49 |
+
dxb1: 29,
|
| 50 |
+
arn1: 19,
|
| 51 |
+
dub1: 25,
|
| 52 |
+
};
|
| 53 |
|
| 54 |
const countryColors: Record<string, string> = {
|
| 55 |
US: "#1e40af",
|
|
|
|
| 263 |
}
|
| 264 |
|
| 265 |
export default function DottedMap({ width = 1000, height = 560 }: DottedMapProps) {
|
| 266 |
+
const { t } = useLanguage();
|
| 267 |
const [hoveredMarker, setHoveredMarker] = useState<(typeof regionMarkers)[0] | null>(null);
|
| 268 |
+
const [latencyMod, setLatencyMod] = useState(0);
|
| 269 |
+
const [loadMod, setLoadMod] = useState(0);
|
| 270 |
+
|
| 271 |
+
useEffect(() => {
|
| 272 |
+
if (!hoveredMarker) return;
|
| 273 |
+
|
| 274 |
+
const updateMods = () => {
|
| 275 |
+
setLatencyMod(Math.floor(Math.random() * 5) - 2);
|
| 276 |
+
setLoadMod(Math.floor(Math.random() * 6) - 3);
|
| 277 |
+
};
|
| 278 |
+
|
| 279 |
+
// Deferred initial update (avoids synchronous setState in effect body)
|
| 280 |
+
const firstTick = setTimeout(updateMods, 0);
|
| 281 |
+
|
| 282 |
+
const interval = setInterval(updateMods, 2000);
|
| 283 |
+
|
| 284 |
+
return () => {
|
| 285 |
+
clearTimeout(firstTick);
|
| 286 |
+
clearInterval(interval);
|
| 287 |
+
};
|
| 288 |
+
}, [hoveredMarker]);
|
| 289 |
|
| 290 |
const handleMarkerHover = (marker: (typeof regionMarkers)[0] | null) => {
|
| 291 |
setHoveredMarker(marker);
|
|
|
|
| 377 |
{hoveredMarker && (() => {
|
| 378 |
const coords = projection(hoveredMarker.coordinates);
|
| 379 |
if (!coords) return null;
|
| 380 |
+
|
| 381 |
+
const baseLat = baseLatencies[hoveredMarker.id] || 25;
|
| 382 |
+
const currentLatency = Math.max(2, baseLat + latencyMod);
|
| 383 |
+
|
| 384 |
+
const baseLd = baseLoads[hoveredMarker.id] || 30;
|
| 385 |
+
const currentLoad = Math.min(99, Math.max(5, baseLd + loadMod));
|
| 386 |
+
|
| 387 |
return (
|
| 388 |
<motion.div
|
| 389 |
initial={{ opacity: 0, y: 5 }}
|
|
|
|
| 397 |
transform: "translate(-50%, -140%)",
|
| 398 |
}}
|
| 399 |
>
|
| 400 |
+
<div className="flex flex-col gap-1">
|
| 401 |
+
<div className="flex items-center gap-1.5 border-b border-border pb-1">
|
| 402 |
+
<span className="text-primary font-bold">▲</span>
|
| 403 |
+
<span className="text-[var(--ds-gray-1000)] font-bold uppercase">{hoveredMarker.id}</span>
|
| 404 |
+
<span className="text-[var(--ds-gray-500)]">·</span>
|
| 405 |
+
<span className="text-[var(--ds-gray-900)] font-semibold">{hoveredMarker.name}</span>
|
| 406 |
+
</div>
|
| 407 |
+
<div className="text-[10px] text-muted-foreground">
|
| 408 |
+
{t("mapHoverTooltip", {
|
| 409 |
+
region: hoveredMarker.name,
|
| 410 |
+
latency: String(currentLatency),
|
| 411 |
+
load: String(currentLoad),
|
| 412 |
+
})}
|
| 413 |
+
</div>
|
| 414 |
</div>
|
| 415 |
</motion.div>
|
| 416 |
);
|
components/ExitIntentPopup.tsx
ADDED
|
@@ -0,0 +1,268 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
|
| 3 |
+
import { useEffect, useState, useRef, useCallback } from "react";
|
| 4 |
+
import { motion, AnimatePresence } from "framer-motion";
|
| 5 |
+
import { X, AlertTriangle } from "lucide-react";
|
| 6 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 7 |
+
import { useSplitFlapAudio } from "@/components/ui/split-flap-text";
|
| 8 |
+
import { registerWaitlist } from "@/app/actions/waitlist";
|
| 9 |
+
import { ShimmerButton } from "@/components/ui/shimmer-button";
|
| 10 |
+
import { CyberTicketModal } from "@/components/CyberTicketModal";
|
| 11 |
+
|
| 12 |
+
export function ExitIntentPopup() {
|
| 13 |
+
const { t, language } = useLanguage();
|
| 14 |
+
const audio = useSplitFlapAudio();
|
| 15 |
+
const [isOpen, setIsOpen] = useState(false);
|
| 16 |
+
const [email, setEmail] = useState("");
|
| 17 |
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
| 18 |
+
const [isTicketOpen, setIsTicketOpen] = useState(false);
|
| 19 |
+
const [error, setError] = useState<string | null>(null);
|
| 20 |
+
const modalRef = useRef<HTMLDivElement>(null);
|
| 21 |
+
|
| 22 |
+
useEffect(() => {
|
| 23 |
+
// If already registered, don't track exit intent
|
| 24 |
+
const isRegistered = localStorage.getItem("hubapi_waitlist_registered");
|
| 25 |
+
if (isRegistered === "true") return;
|
| 26 |
+
|
| 27 |
+
// Check if exit intent was already shown in this session
|
| 28 |
+
const exitShown = sessionStorage.getItem("hubapi_exit_intent_shown");
|
| 29 |
+
if (exitShown === "true") return;
|
| 30 |
+
|
| 31 |
+
const handleMouseLeave = (e: MouseEvent) => {
|
| 32 |
+
// Trigger when mouse moves out of window top boundary (y < 10)
|
| 33 |
+
if (e.clientY < 10) {
|
| 34 |
+
setIsOpen(true);
|
| 35 |
+
sessionStorage.setItem("hubapi_exit_intent_shown", "true");
|
| 36 |
+
|
| 37 |
+
// Play audio warning beep
|
| 38 |
+
if (audio && !audio.isMuted) {
|
| 39 |
+
audio.playClick();
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
};
|
| 43 |
+
|
| 44 |
+
document.addEventListener("mouseleave", handleMouseLeave);
|
| 45 |
+
return () => {
|
| 46 |
+
document.removeEventListener("mouseleave", handleMouseLeave);
|
| 47 |
+
};
|
| 48 |
+
}, [audio]);
|
| 49 |
+
|
| 50 |
+
const handleClose = useCallback(() => {
|
| 51 |
+
setIsOpen(false);
|
| 52 |
+
if (audio && !audio.isMuted) {
|
| 53 |
+
audio.playClick();
|
| 54 |
+
}
|
| 55 |
+
}, [audio]);
|
| 56 |
+
|
| 57 |
+
// Focus trap and escape key listener
|
| 58 |
+
useEffect(() => {
|
| 59 |
+
if (!isOpen) return;
|
| 60 |
+
|
| 61 |
+
const modal = modalRef.current;
|
| 62 |
+
if (!modal) return;
|
| 63 |
+
|
| 64 |
+
// Focus the first element or the modal container itself
|
| 65 |
+
const focusableElements = modal.querySelectorAll(
|
| 66 |
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
| 67 |
+
);
|
| 68 |
+
const firstElement = focusableElements[0] as HTMLElement;
|
| 69 |
+
const lastElement = focusableElements[focusableElements.length - 1] as HTMLElement;
|
| 70 |
+
|
| 71 |
+
// Save previous active element to restore later
|
| 72 |
+
const previousActiveElement = document.activeElement as HTMLElement;
|
| 73 |
+
|
| 74 |
+
// Set a tiny timeout to ensure animation didn't disrupt focus
|
| 75 |
+
const focusTimeout = setTimeout(() => {
|
| 76 |
+
if (firstElement) {
|
| 77 |
+
firstElement.focus();
|
| 78 |
+
} else {
|
| 79 |
+
modal.focus();
|
| 80 |
+
}
|
| 81 |
+
}, 50);
|
| 82 |
+
|
| 83 |
+
const handleKeyDown = (e: KeyboardEvent) => {
|
| 84 |
+
if (e.key === "Escape") {
|
| 85 |
+
handleClose();
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
if (e.key !== "Tab") return;
|
| 89 |
+
|
| 90 |
+
if (e.shiftKey) {
|
| 91 |
+
if (document.activeElement === firstElement) {
|
| 92 |
+
lastElement.focus();
|
| 93 |
+
e.preventDefault();
|
| 94 |
+
}
|
| 95 |
+
} else {
|
| 96 |
+
if (document.activeElement === lastElement) {
|
| 97 |
+
firstElement.focus();
|
| 98 |
+
e.preventDefault();
|
| 99 |
+
}
|
| 100 |
+
}
|
| 101 |
+
};
|
| 102 |
+
|
| 103 |
+
window.addEventListener("keydown", handleKeyDown);
|
| 104 |
+
return () => {
|
| 105 |
+
clearTimeout(focusTimeout);
|
| 106 |
+
window.removeEventListener("keydown", handleKeyDown);
|
| 107 |
+
if (previousActiveElement) {
|
| 108 |
+
previousActiveElement.focus();
|
| 109 |
+
}
|
| 110 |
+
};
|
| 111 |
+
}, [isOpen, handleClose]);
|
| 112 |
+
|
| 113 |
+
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
|
| 114 |
+
e.preventDefault();
|
| 115 |
+
setError(null);
|
| 116 |
+
|
| 117 |
+
if (!email) {
|
| 118 |
+
setError(language === "ar" ? "البريد الإلكتروني مطلوب." : "Email address is required.");
|
| 119 |
+
return;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
| 123 |
+
if (!emailRegex.test(email)) {
|
| 124 |
+
setError(language === "ar" ? "يرجى إدخال بريد إلكتروني صالح." : "Please enter a valid email address.");
|
| 125 |
+
return;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
setIsSubmitting(true);
|
| 129 |
+
|
| 130 |
+
try {
|
| 131 |
+
const formData = new FormData();
|
| 132 |
+
formData.append("email", email);
|
| 133 |
+
|
| 134 |
+
const result = await registerWaitlist(formData);
|
| 135 |
+
|
| 136 |
+
if (result.success) {
|
| 137 |
+
localStorage.setItem("hubapi_waitlist_registered", "true");
|
| 138 |
+
setIsOpen(false);
|
| 139 |
+
setIsTicketOpen(true);
|
| 140 |
+
} else {
|
| 141 |
+
setError(result.error || "An error occurred. Please try again.");
|
| 142 |
+
}
|
| 143 |
+
} catch {
|
| 144 |
+
setError("Failed to connect to waitlist service.");
|
| 145 |
+
} finally {
|
| 146 |
+
setIsSubmitting(false);
|
| 147 |
+
}
|
| 148 |
+
};
|
| 149 |
+
|
| 150 |
+
// handleClose is defined above with useCallback for effect compatibility
|
| 151 |
+
|
| 152 |
+
return (
|
| 153 |
+
<>
|
| 154 |
+
<AnimatePresence>
|
| 155 |
+
{isOpen && (
|
| 156 |
+
<div className="fixed inset-0 z-[100] flex items-center justify-center p-4">
|
| 157 |
+
{/* Dark glass backdrop */}
|
| 158 |
+
<motion.div
|
| 159 |
+
initial={{ opacity: 0 }}
|
| 160 |
+
animate={{ opacity: 1 }}
|
| 161 |
+
exit={{ opacity: 0 }}
|
| 162 |
+
onClick={handleClose}
|
| 163 |
+
className="absolute inset-0 bg-black/60 backdrop-blur-md"
|
| 164 |
+
/>
|
| 165 |
+
|
| 166 |
+
{/* Popup Dialog container */}
|
| 167 |
+
<motion.div
|
| 168 |
+
ref={modalRef}
|
| 169 |
+
role="dialog"
|
| 170 |
+
aria-modal="true"
|
| 171 |
+
aria-labelledby="exit-modal-title"
|
| 172 |
+
tabIndex={-1}
|
| 173 |
+
initial={{ scale: 0.95, opacity: 0, y: 20 }}
|
| 174 |
+
animate={{ scale: 1, opacity: 1, y: 0 }}
|
| 175 |
+
exit={{ scale: 0.95, opacity: 0, y: 20 }}
|
| 176 |
+
className="relative w-full max-w-lg p-8 sm:p-10 rounded-xl border border-primary/20 bg-secondary/95 dark:bg-background/95 backdrop-blur-lg shadow-2xl overflow-hidden [clip-path:polygon(20px_0,100%_0,100%_calc(100%_-_20px),calc(100%_-_20px)_100%,0_100%,0_20px)] focus:outline-none"
|
| 177 |
+
>
|
| 178 |
+
{/* Glowing Corner Effects */}
|
| 179 |
+
<div className="absolute top-0 end-0 w-24 h-24 bg-primary/5 rounded-full blur-2xl pointer-events-none" />
|
| 180 |
+
<div className="absolute bottom-0 start-0 w-24 h-24 bg-primary/5 rounded-full blur-2xl pointer-events-none" />
|
| 181 |
+
|
| 182 |
+
{/* Close Button */}
|
| 183 |
+
<button
|
| 184 |
+
onClick={handleClose}
|
| 185 |
+
className="absolute top-4 end-4 h-8 w-8 flex items-center justify-center rounded-lg border border-border hover:border-primary/40 text-foreground hover:text-primary transition-all duration-300 focus-visible:ring-1 focus-visible:ring-primary focus-visible:outline-none"
|
| 186 |
+
aria-label="Close modal"
|
| 187 |
+
>
|
| 188 |
+
<X className="h-4 w-4" />
|
| 189 |
+
</button>
|
| 190 |
+
|
| 191 |
+
<div className="flex flex-col gap-6 text-center sm:text-start">
|
| 192 |
+
{/* Heading Area */}
|
| 193 |
+
<div className="space-y-2">
|
| 194 |
+
<div className="inline-flex items-center rounded-full border border-destructive/20 bg-destructive/10 px-3 py-1 text-[10px] font-mono font-bold tracking-widest text-destructive">
|
| 195 |
+
<span className="w-1.5 h-1.5 bg-destructive rounded-full animate-ping me-2 shadow-[0_0_8px_rgba(239,68,68,0.5)]" />
|
| 196 |
+
EXIT_PREVENTED
|
| 197 |
+
</div>
|
| 198 |
+
<h3 id="exit-modal-title" className="text-2xl font-extrabold tracking-tight bg-clip-text text-transparent bg-gradient-to-br from-foreground to-muted-foreground mt-2">
|
| 199 |
+
{t("exitTitle")}
|
| 200 |
+
</h3>
|
| 201 |
+
<p className="text-xs text-muted-foreground/80 font-mono leading-relaxed mt-1">
|
| 202 |
+
{t("exitSubtitle")}
|
| 203 |
+
</p>
|
| 204 |
+
</div>
|
| 205 |
+
|
| 206 |
+
{/* Form Integration */}
|
| 207 |
+
<form onSubmit={handleSubmit} className="flex flex-col gap-4">
|
| 208 |
+
<div className="relative group">
|
| 209 |
+
<div className={`absolute -inset-0.5 rounded-lg blur opacity-0 group-focus-within:opacity-100 transition duration-500 ${error ? 'bg-destructive/45' : 'bg-primary/20'}`}></div>
|
| 210 |
+
<input
|
| 211 |
+
id="exit-intent-email-input"
|
| 212 |
+
name="exit_intent_email"
|
| 213 |
+
aria-label="Email address for exit prevention waitlist"
|
| 214 |
+
type="email"
|
| 215 |
+
placeholder={t("waitlistPlaceholder")}
|
| 216 |
+
disabled={isSubmitting}
|
| 217 |
+
value={email}
|
| 218 |
+
onChange={(e) => {
|
| 219 |
+
setEmail(e.target.value);
|
| 220 |
+
if (error) setError(null);
|
| 221 |
+
}}
|
| 222 |
+
className={`relative w-full h-12 px-5 bg-muted/40 dark:bg-white/5 border font-mono text-xs text-foreground placeholder:text-muted-foreground/40 outline-none focus-visible:outline-none focus-visible:ring-1 transition-colors duration-300 [clip-path:polygon(10px_0,100%_0,100%_calc(100%_-_10px),calc(100%_-_10px)_100%,0_100%,0_10px)] ${
|
| 223 |
+
error
|
| 224 |
+
? 'border-destructive focus-visible:ring-destructive focus-visible:ring-destructive/50'
|
| 225 |
+
: 'border-border focus-visible:ring-primary focus-visible:ring-primary/50'
|
| 226 |
+
}`}
|
| 227 |
+
/>
|
| 228 |
+
</div>
|
| 229 |
+
|
| 230 |
+
<ShimmerButton
|
| 231 |
+
type="submit"
|
| 232 |
+
disabled={isSubmitting}
|
| 233 |
+
borderRadius="6px"
|
| 234 |
+
className="w-full h-12 font-mono text-[10px] font-bold tracking-widest"
|
| 235 |
+
>
|
| 236 |
+
<span>{isSubmitting ? t("processing") : t("exitButton")}</span>
|
| 237 |
+
</ShimmerButton>
|
| 238 |
+
|
| 239 |
+
<button
|
| 240 |
+
type="button"
|
| 241 |
+
onClick={handleClose}
|
| 242 |
+
className="text-[10px] font-mono text-muted-foreground/50 hover:text-foreground transition-colors self-center mt-1"
|
| 243 |
+
>
|
| 244 |
+
{t("exitNoThanks")}
|
| 245 |
+
</button>
|
| 246 |
+
</form>
|
| 247 |
+
|
| 248 |
+
{error && (
|
| 249 |
+
<div className="flex items-center gap-2 font-mono text-[10px] text-destructive animate-fade-in ps-1 self-center">
|
| 250 |
+
<AlertTriangle className="h-3.5 w-3.5 shrink-0" />
|
| 251 |
+
<span>{error}</span>
|
| 252 |
+
</div>
|
| 253 |
+
)}
|
| 254 |
+
</div>
|
| 255 |
+
</motion.div>
|
| 256 |
+
</div>
|
| 257 |
+
)}
|
| 258 |
+
</AnimatePresence>
|
| 259 |
+
|
| 260 |
+
{/* Embedded CyberTicketModal */}
|
| 261 |
+
<CyberTicketModal
|
| 262 |
+
isOpen={isTicketOpen}
|
| 263 |
+
onClose={() => setIsTicketOpen(false)}
|
| 264 |
+
email={email}
|
| 265 |
+
/>
|
| 266 |
+
</>
|
| 267 |
+
);
|
| 268 |
+
}
|
components/FeatureJourneyMap.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { useEffect, useState, useRef } from "react";
|
|
| 4 |
import { motion, useInView } from "framer-motion";
|
| 5 |
import { Cpu, ShieldAlert, Globe, BarChart3 } from "lucide-react";
|
| 6 |
import { cn } from "@/lib/utils";
|
|
|
|
| 7 |
|
| 8 |
// Custom Interactive Animated Metric Component
|
| 9 |
function AnimatedMetric({
|
|
@@ -73,52 +74,54 @@ interface JourneyNode {
|
|
| 73 |
}
|
| 74 |
|
| 75 |
export function FeatureJourneyMap() {
|
|
|
|
|
|
|
| 76 |
const nodes: JourneyNode[] = [
|
| 77 |
{
|
| 78 |
-
title: "
|
| 79 |
-
titleEn: "
|
| 80 |
icon: Cpu,
|
| 81 |
metric: <AnimatedMetric value={40} suffix="%" prefix="↓ " />,
|
| 82 |
-
b2bDesc: "
|
| 83 |
-
investorThesis: "
|
| 84 |
accentColor: "var(--brand-gold)",
|
| 85 |
glowClass: "shadow-[var(--brand-gold)]/10 border-[var(--brand-gold)]/20 hover:border-[var(--brand-gold)]/50"
|
| 86 |
},
|
| 87 |
{
|
| 88 |
-
title: "
|
| 89 |
-
titleEn: "
|
| 90 |
icon: ShieldAlert,
|
| 91 |
metric: (
|
| 92 |
<span className="font-bebas font-extrabold tracking-wider bg-clip-text text-transparent bg-gradient-to-r from-[var(--brand-rose)] to-[var(--brand-purple)] flex items-center gap-2">
|
| 93 |
-
|
| 94 |
</span>
|
| 95 |
),
|
| 96 |
-
b2bDesc: "
|
| 97 |
-
investorThesis: "
|
| 98 |
accentColor: "var(--brand-rose)",
|
| 99 |
glowClass: "shadow-[var(--brand-rose)]/10 border-[var(--brand-rose)]/20 hover:border-[var(--brand-rose)]/50"
|
| 100 |
},
|
| 101 |
{
|
| 102 |
-
title: "
|
| 103 |
-
titleEn: "
|
| 104 |
icon: Globe,
|
| 105 |
metric: <AnimatedMetric value={99.99} decimalPlaces={2} suffix="%" />,
|
| 106 |
-
b2bDesc: "
|
| 107 |
-
investorThesis: "
|
| 108 |
accentColor: "var(--brand-purple)",
|
| 109 |
glowClass: "shadow-[var(--brand-purple)]/10 border-[var(--brand-purple)]/20 hover:border-[var(--brand-purple)]/50"
|
| 110 |
},
|
| 111 |
{
|
| 112 |
-
title: "
|
| 113 |
-
titleEn: "
|
| 114 |
icon: BarChart3,
|
| 115 |
metric: (
|
| 116 |
<span className="font-bebas font-extrabold tracking-wider bg-clip-text text-transparent bg-gradient-to-r from-[var(--brand-gold)] to-[var(--brand-rose)] flex items-center gap-2">
|
| 117 |
-
<span className="h-2.5 w-2.5 rounded-full bg-emerald-500 animate-pulse inline-block" />
|
| 118 |
</span>
|
| 119 |
),
|
| 120 |
-
b2bDesc: "
|
| 121 |
-
investorThesis:
|
| 122 |
accentColor: "var(--brand-gold)",
|
| 123 |
glowClass: "shadow-[var(--brand-gold)]/10 border-[var(--brand-gold)]/20 hover:border-[var(--brand-gold)]/50"
|
| 124 |
}
|
|
@@ -126,50 +129,27 @@ export function FeatureJourneyMap() {
|
|
| 126 |
|
| 127 |
return (
|
| 128 |
<section className="relative w-full max-w-7xl mx-auto py-32 px-4 overflow-hidden">
|
| 129 |
-
{/* Laser Pulse Path Animation keyframes */}
|
| 130 |
-
<style jsx global>{`
|
| 131 |
-
@keyframes pulse-travel {
|
| 132 |
-
0% {
|
| 133 |
-
top: 0%;
|
| 134 |
-
opacity: 0;
|
| 135 |
-
}
|
| 136 |
-
5% {
|
| 137 |
-
opacity: 1;
|
| 138 |
-
}
|
| 139 |
-
95% {
|
| 140 |
-
opacity: 1;
|
| 141 |
-
}
|
| 142 |
-
100% {
|
| 143 |
-
top: 100%;
|
| 144 |
-
opacity: 0;
|
| 145 |
-
}
|
| 146 |
-
}
|
| 147 |
-
.animate-pulse-travel {
|
| 148 |
-
animation: pulse-travel 12s linear infinite;
|
| 149 |
-
}
|
| 150 |
-
`}</style>
|
| 151 |
-
|
| 152 |
{/* Section Header */}
|
| 153 |
<div className="text-center space-y-6 mb-28 z-10 relative">
|
| 154 |
<div className="inline-flex items-center gap-2 rounded-full border border-primary/20 bg-primary/5 px-4 py-1.5 text-xs md:text-sm font-medium text-primary backdrop-blur-md shadow-lg font-mono tracking-widest uppercase">
|
| 155 |
<span className="w-1.5 h-1.5 rounded-full bg-primary animate-pulse shadow-[0_0_8px_var(--primary-glow)]" />
|
| 156 |
-
{"
|
| 157 |
</div>
|
| 158 |
<h2 className="text-4xl font-extrabold tracking-tight sm:text-6xl text-foreground leading-none">
|
| 159 |
-
|
| 160 |
<span className="bg-clip-text text-transparent bg-gradient-to-r from-[var(--brand-gold)] via-[var(--brand-rose)] to-[var(--brand-purple)]">
|
| 161 |
-
|
| 162 |
</span>
|
| 163 |
</h2>
|
| 164 |
<p className="max-w-2xl mx-auto text-base md:text-lg text-muted-foreground leading-relaxed font-mono">
|
| 165 |
-
|
| 166 |
</p>
|
| 167 |
</div>
|
| 168 |
|
| 169 |
{/* Interactive Journey Map Container */}
|
| 170 |
<div className="relative w-full max-w-5xl mx-auto">
|
| 171 |
-
{/* Central Vertical Glowing Line */}
|
| 172 |
-
<div className="absolute left-[24px] md:left-1/2 top-0 bottom-0 w-[2px] -translate-x-1/2 bg-gradient-to-b from-[var(--brand-gold)] via-[var(--brand-rose)] to-[var(--brand-purple)] opacity-20" />
|
| 173 |
|
| 174 |
{/* Animated Laser Pulse (Data Packet) */}
|
| 175 |
<div className="absolute left-[24px] md:left-1/2 top-0 -translate-x-1/2 w-[6px] h-32 bg-gradient-to-b from-transparent via-[var(--brand-rose)] to-[var(--brand-gold)] rounded-full blur-[1px] opacity-0 animate-pulse-travel pointer-events-none">
|
|
@@ -234,15 +214,15 @@ export function FeatureJourneyMap() {
|
|
| 234 |
</p>
|
| 235 |
</div>
|
| 236 |
|
| 237 |
-
{/* B2B Message (
|
| 238 |
-
<p className="text-sm md:text-base text-muted-foreground leading-relaxed text-
|
| 239 |
{node.b2bDesc}
|
| 240 |
</p>
|
| 241 |
|
| 242 |
{/* Investor Thesis */}
|
| 243 |
-
<div className="relative mt-6 pt-5 border-t border-border font-mono text-xs md:text-sm text-
|
| 244 |
-
<div className="absolute -top-[9px]
|
| 245 |
-
[
|
| 246 |
</div>
|
| 247 |
<p className="italic text-muted-foreground leading-relaxed font-mono">
|
| 248 |
“{node.investorThesis}”
|
|
|
|
| 4 |
import { motion, useInView } from "framer-motion";
|
| 5 |
import { Cpu, ShieldAlert, Globe, BarChart3 } from "lucide-react";
|
| 6 |
import { cn } from "@/lib/utils";
|
| 7 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 8 |
|
| 9 |
// Custom Interactive Animated Metric Component
|
| 10 |
function AnimatedMetric({
|
|
|
|
| 74 |
}
|
| 75 |
|
| 76 |
export function FeatureJourneyMap() {
|
| 77 |
+
const { t } = useLanguage();
|
| 78 |
+
|
| 79 |
const nodes: JourneyNode[] = [
|
| 80 |
{
|
| 81 |
+
title: t("journeyNode1Title"),
|
| 82 |
+
titleEn: t("journeyNode1TitleEn"),
|
| 83 |
icon: Cpu,
|
| 84 |
metric: <AnimatedMetric value={40} suffix="%" prefix="↓ " />,
|
| 85 |
+
b2bDesc: t("journeyNode1Desc"),
|
| 86 |
+
investorThesis: t("journeyNode1Thesis"),
|
| 87 |
accentColor: "var(--brand-gold)",
|
| 88 |
glowClass: "shadow-[var(--brand-gold)]/10 border-[var(--brand-gold)]/20 hover:border-[var(--brand-gold)]/50"
|
| 89 |
},
|
| 90 |
{
|
| 91 |
+
title: t("journeyNode2Title"),
|
| 92 |
+
titleEn: t("journeyNode2TitleEn"),
|
| 93 |
icon: ShieldAlert,
|
| 94 |
metric: (
|
| 95 |
<span className="font-bebas font-extrabold tracking-wider bg-clip-text text-transparent bg-gradient-to-r from-[var(--brand-rose)] to-[var(--brand-purple)] flex items-center gap-2">
|
| 96 |
+
{t("journeyNode2MetricText")}
|
| 97 |
</span>
|
| 98 |
),
|
| 99 |
+
b2bDesc: t("journeyNode2Desc"),
|
| 100 |
+
investorThesis: t("journeyNode2Thesis"),
|
| 101 |
accentColor: "var(--brand-rose)",
|
| 102 |
glowClass: "shadow-[var(--brand-rose)]/10 border-[var(--brand-rose)]/20 hover:border-[var(--brand-rose)]/50"
|
| 103 |
},
|
| 104 |
{
|
| 105 |
+
title: t("journeyNode3Title"),
|
| 106 |
+
titleEn: t("journeyNode3TitleEn"),
|
| 107 |
icon: Globe,
|
| 108 |
metric: <AnimatedMetric value={99.99} decimalPlaces={2} suffix="%" />,
|
| 109 |
+
b2bDesc: t("journeyNode3Desc"),
|
| 110 |
+
investorThesis: t("journeyNode3Thesis"),
|
| 111 |
accentColor: "var(--brand-purple)",
|
| 112 |
glowClass: "shadow-[var(--brand-purple)]/10 border-[var(--brand-purple)]/20 hover:border-[var(--brand-purple)]/50"
|
| 113 |
},
|
| 114 |
{
|
| 115 |
+
title: t("journeyNode4Title"),
|
| 116 |
+
titleEn: t("journeyNode4TitleEn"),
|
| 117 |
icon: BarChart3,
|
| 118 |
metric: (
|
| 119 |
<span className="font-bebas font-extrabold tracking-wider bg-clip-text text-transparent bg-gradient-to-r from-[var(--brand-gold)] to-[var(--brand-rose)] flex items-center gap-2">
|
| 120 |
+
<span className="h-2.5 w-2.5 rounded-full bg-emerald-500 animate-pulse inline-block" /> {t("journeyNode4MetricText")}
|
| 121 |
</span>
|
| 122 |
),
|
| 123 |
+
b2bDesc: t("journeyNode4Desc"),
|
| 124 |
+
investorThesis: t("journeyNode4Thesis"),
|
| 125 |
accentColor: "var(--brand-gold)",
|
| 126 |
glowClass: "shadow-[var(--brand-gold)]/10 border-[var(--brand-gold)]/20 hover:border-[var(--brand-gold)]/50"
|
| 127 |
}
|
|
|
|
| 129 |
|
| 130 |
return (
|
| 131 |
<section className="relative w-full max-w-7xl mx-auto py-32 px-4 overflow-hidden">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
{/* Section Header */}
|
| 133 |
<div className="text-center space-y-6 mb-28 z-10 relative">
|
| 134 |
<div className="inline-flex items-center gap-2 rounded-full border border-primary/20 bg-primary/5 px-4 py-1.5 text-xs md:text-sm font-medium text-primary backdrop-blur-md shadow-lg font-mono tracking-widest uppercase">
|
| 135 |
<span className="w-1.5 h-1.5 rounded-full bg-primary animate-pulse shadow-[0_0_8px_var(--primary-glow)]" />
|
| 136 |
+
{t("journeyBadge")}
|
| 137 |
</div>
|
| 138 |
<h2 className="text-4xl font-extrabold tracking-tight sm:text-6xl text-foreground leading-none">
|
| 139 |
+
{t("journeyTitleLine1")}<br className="hidden md:inline" />
|
| 140 |
<span className="bg-clip-text text-transparent bg-gradient-to-r from-[var(--brand-gold)] via-[var(--brand-rose)] to-[var(--brand-purple)]">
|
| 141 |
+
{t("journeyTitleLine2")}
|
| 142 |
</span>
|
| 143 |
</h2>
|
| 144 |
<p className="max-w-2xl mx-auto text-base md:text-lg text-muted-foreground leading-relaxed font-mono">
|
| 145 |
+
{t("journeySubtitle")}
|
| 146 |
</p>
|
| 147 |
</div>
|
| 148 |
|
| 149 |
{/* Interactive Journey Map Container */}
|
| 150 |
<div className="relative w-full max-w-5xl mx-auto">
|
| 151 |
+
{/* Central Vertical Glowing Line - Higher contrast in light mode */}
|
| 152 |
+
<div className="absolute left-[24px] md:left-1/2 top-0 bottom-0 w-[2px] -translate-x-1/2 bg-gradient-to-b from-[var(--brand-gold)] via-[var(--brand-rose)] to-[var(--brand-purple)] opacity-35 dark:opacity-20" />
|
| 153 |
|
| 154 |
{/* Animated Laser Pulse (Data Packet) */}
|
| 155 |
<div className="absolute left-[24px] md:left-1/2 top-0 -translate-x-1/2 w-[6px] h-32 bg-gradient-to-b from-transparent via-[var(--brand-rose)] to-[var(--brand-gold)] rounded-full blur-[1px] opacity-0 animate-pulse-travel pointer-events-none">
|
|
|
|
| 214 |
</p>
|
| 215 |
</div>
|
| 216 |
|
| 217 |
+
{/* B2B Message (RTL logical border start and text alignment start) */}
|
| 218 |
+
<p className="text-sm md:text-base text-muted-foreground leading-relaxed text-start mb-6 border-s-2 border-primary/30 ps-3 font-sans font-medium">
|
| 219 |
{node.b2bDesc}
|
| 220 |
</p>
|
| 221 |
|
| 222 |
{/* Investor Thesis */}
|
| 223 |
+
<div className="relative mt-6 pt-5 border-t border-border font-mono text-xs md:text-sm text-start">
|
| 224 |
+
<div className="absolute -top-[9px] start-4 bg-card px-2 text-[9px] uppercase tracking-widest text-primary font-bold">
|
| 225 |
+
[ {t("journeyThesisLabel")} ]
|
| 226 |
</div>
|
| 227 |
<p className="italic text-muted-foreground leading-relaxed font-mono">
|
| 228 |
“{node.investorThesis}”
|
components/FloatingCTA.tsx
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
|
| 3 |
+
import { useEffect, useState } from "react";
|
| 4 |
+
import { motion, AnimatePresence } from "framer-motion";
|
| 5 |
+
import { ArrowUpRight } from "lucide-react";
|
| 6 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 7 |
+
import { useSplitFlapAudio } from "@/components/ui/split-flap-text";
|
| 8 |
+
|
| 9 |
+
export function FloatingCTA() {
|
| 10 |
+
const { t } = useLanguage();
|
| 11 |
+
const audio = useSplitFlapAudio();
|
| 12 |
+
const [isVisible, setIsVisible] = useState(false);
|
| 13 |
+
|
| 14 |
+
useEffect(() => {
|
| 15 |
+
const handleScroll = () => {
|
| 16 |
+
// Show button when user scrolls down more than 600px
|
| 17 |
+
if (window.scrollY > 600) {
|
| 18 |
+
setIsVisible(true);
|
| 19 |
+
} else {
|
| 20 |
+
setIsVisible(false);
|
| 21 |
+
}
|
| 22 |
+
};
|
| 23 |
+
|
| 24 |
+
window.addEventListener("scroll", handleScroll, { passive: true });
|
| 25 |
+
return () => {
|
| 26 |
+
window.removeEventListener("scroll", handleScroll);
|
| 27 |
+
};
|
| 28 |
+
}, []);
|
| 29 |
+
|
| 30 |
+
const handleClick = () => {
|
| 31 |
+
// Play satisfying mechanical click sound
|
| 32 |
+
if (audio && !audio.isMuted) {
|
| 33 |
+
audio.playClick();
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
// Smooth scroll back to top to the waitlist input
|
| 37 |
+
const inputElement = document.getElementById("email-input");
|
| 38 |
+
if (inputElement) {
|
| 39 |
+
inputElement.scrollIntoView({ behavior: "smooth", block: "center" });
|
| 40 |
+
setTimeout(() => {
|
| 41 |
+
inputElement.focus();
|
| 42 |
+
}, 850);
|
| 43 |
+
} else {
|
| 44 |
+
window.scrollTo({ top: 0, behavior: "smooth" });
|
| 45 |
+
}
|
| 46 |
+
};
|
| 47 |
+
|
| 48 |
+
return (
|
| 49 |
+
<AnimatePresence>
|
| 50 |
+
{isVisible && (
|
| 51 |
+
<motion.button
|
| 52 |
+
initial={{ opacity: 0, scale: 0.8, y: 20 }}
|
| 53 |
+
animate={{ opacity: 1, scale: 1, y: 0 }}
|
| 54 |
+
exit={{ opacity: 0, scale: 0.8, y: 20 }}
|
| 55 |
+
whileHover={{ scale: 1.05 }}
|
| 56 |
+
whileTap={{ scale: 0.95 }}
|
| 57 |
+
onClick={handleClick}
|
| 58 |
+
className="fixed bottom-6 right-6 sm:bottom-8 sm:right-8 z-40 flex items-center gap-2.5 px-5 h-12 rounded-full border border-primary/30 bg-primary/10 backdrop-blur-md text-primary font-mono text-[10px] font-bold tracking-widest shadow-[0_0_15px_var(--primary-glow)] hover:bg-primary/25 hover:border-primary/50 transition-all duration-300 focus-visible:outline-none"
|
| 59 |
+
>
|
| 60 |
+
<span className="relative flex h-2 w-2">
|
| 61 |
+
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"></span>
|
| 62 |
+
<span className="relative inline-flex rounded-full h-2 w-2 bg-primary"></span>
|
| 63 |
+
</span>
|
| 64 |
+
<span>{t("accessHubapi")}</span>
|
| 65 |
+
<ArrowUpRight className="h-3.5 w-3.5" />
|
| 66 |
+
</motion.button>
|
| 67 |
+
)}
|
| 68 |
+
</AnimatePresence>
|
| 69 |
+
);
|
| 70 |
+
}
|
components/GatewayMeshSection.tsx
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
|
| 3 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 4 |
+
import { ErrorBoundary } from "@/components/ui/error-boundary";
|
| 5 |
+
import MapContainer from "@/components/MapContainer";
|
| 6 |
+
import {
|
| 7 |
+
TotalRequests,
|
| 8 |
+
TopCountries,
|
| 9 |
+
RegionCount,
|
| 10 |
+
StatsGrid,
|
| 11 |
+
} from "@/components/StatsDisplay";
|
| 12 |
+
|
| 13 |
+
export function GatewayMeshSection() {
|
| 14 |
+
const { t } = useLanguage();
|
| 15 |
+
|
| 16 |
+
return (
|
| 17 |
+
<section className="relative z-10 w-full max-w-7xl mx-auto px-4 md:px-6 py-24 overflow-hidden">
|
| 18 |
+
<ErrorBoundary>
|
| 19 |
+
<div className="font-mono max-w-[min(100vw,1600px)] mx-auto relative overflow-hidden md:rounded-md flex flex-col md:block px-6 pt-12 md:pt-16">
|
| 20 |
+
<div className="w-full max-w-[1600px] space-y-1.5 mx-auto mt-1 mb-12">
|
| 21 |
+
|
| 22 |
+
{/* Mobile View */}
|
| 23 |
+
<div className="flex flex-col min-[961px]:hidden">
|
| 24 |
+
<header className="flex flex-col items-start font-mono text-sm uppercase gap-2 mb-6">
|
| 25 |
+
<p className="text-foreground font-mono my-0 whitespace-nowrap">
|
| 26 |
+
{t("mapTitle")}{" "}
|
| 27 |
+
<span className="block font-mono text-muted-foreground">
|
| 28 |
+
{t("mapSubtitle")}
|
| 29 |
+
</span>
|
| 30 |
+
</p>
|
| 31 |
+
</header>
|
| 32 |
+
|
| 33 |
+
<section className="pb-6 w-full">
|
| 34 |
+
<div className="flex flex-col gap-y-6">
|
| 35 |
+
<TotalRequests />
|
| 36 |
+
<TopCountries />
|
| 37 |
+
</div>
|
| 38 |
+
<RegionCount />
|
| 39 |
+
</section>
|
| 40 |
+
|
| 41 |
+
<div className="w-full flex justify-center pointer-events-none">
|
| 42 |
+
<MapContainer />
|
| 43 |
+
</div>
|
| 44 |
+
</div>
|
| 45 |
+
|
| 46 |
+
{/* Desktop View */}
|
| 47 |
+
<div className="relative hidden min-[961px]:flex flex-row max-lg:items-end lg:items-center lg:justify-between">
|
| 48 |
+
<header className="flex flex-col items-start font-mono text-sm xl:text-base uppercase gap-2 max-lg:mb-8 mb-auto">
|
| 49 |
+
<p className="text-foreground font-mono my-0 whitespace-nowrap">
|
| 50 |
+
{t("mapTitle")}{" "}
|
| 51 |
+
<span className="block font-mono text-muted-foreground">
|
| 52 |
+
{t("mapSubtitle")}
|
| 53 |
+
</span>
|
| 54 |
+
</p>
|
| 55 |
+
</header>
|
| 56 |
+
|
| 57 |
+
<section className="lg:absolute lg:bottom-0 pb-6 w-fit z-10 relative">
|
| 58 |
+
<div className="flex flex-col gap-y-8">
|
| 59 |
+
<TotalRequests />
|
| 60 |
+
<TopCountries />
|
| 61 |
+
</div>
|
| 62 |
+
<RegionCount />
|
| 63 |
+
</section>
|
| 64 |
+
|
| 65 |
+
<div className="w-full h-full pointer-events-none max-lg:scale-[1.5] max-lg:-translate-y-16 max-lg:translate-x-[-20%]">
|
| 66 |
+
<MapContainer />
|
| 67 |
+
</div>
|
| 68 |
+
</div>
|
| 69 |
+
|
| 70 |
+
{/* Stats Grid */}
|
| 71 |
+
<section className="mt-8">
|
| 72 |
+
<StatsGrid />
|
| 73 |
+
</section>
|
| 74 |
+
|
| 75 |
+
</div>
|
| 76 |
+
</div>
|
| 77 |
+
</ErrorBoundary>
|
| 78 |
+
</section>
|
| 79 |
+
);
|
| 80 |
+
}
|
components/HubLiveTerminal.tsx
CHANGED
|
@@ -263,6 +263,9 @@ export function HubLiveTerminal() {
|
|
| 263 |
>
|
| 264 |
<span className="text-primary font-bold ml-1 select-none animate-pulse">></span>
|
| 265 |
<input
|
|
|
|
|
|
|
|
|
|
| 266 |
type="text"
|
| 267 |
value={inputValue}
|
| 268 |
onChange={(e) => setInputValue(e.target.value)}
|
|
|
|
| 263 |
>
|
| 264 |
<span className="text-primary font-bold ml-1 select-none animate-pulse">></span>
|
| 265 |
<input
|
| 266 |
+
id="terminal-cli-input"
|
| 267 |
+
name="terminal_cli"
|
| 268 |
+
aria-label="Interactive terminal CLI command input"
|
| 269 |
type="text"
|
| 270 |
value={inputValue}
|
| 271 |
onChange={(e) => setInputValue(e.target.value)}
|
components/LanguageContext.tsx
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
|
| 3 |
+
import React, { createContext, useContext, useState, useEffect } from "react";
|
| 4 |
+
import { translations, Language } from "@/lib/languages";
|
| 5 |
+
|
| 6 |
+
type TranslationsType = typeof translations.en;
|
| 7 |
+
|
| 8 |
+
interface LanguageContextType {
|
| 9 |
+
language: Language;
|
| 10 |
+
toggleLanguage: () => void;
|
| 11 |
+
t: (key: keyof TranslationsType, replacements?: Record<string, string>) => string;
|
| 12 |
+
isAmbientMode: boolean;
|
| 13 |
+
toggleAmbientMode: () => void;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
const LanguageContext = createContext<LanguageContextType | undefined>(undefined);
|
| 17 |
+
|
| 18 |
+
export function LanguageProvider({ children }: { children: React.ReactNode }) {
|
| 19 |
+
const [language, setLanguage] = useState<Language>("en");
|
| 20 |
+
const [isAmbientMode, setIsAmbientMode] = useState<boolean>(false);
|
| 21 |
+
const [mounted, setMounted] = useState(false);
|
| 22 |
+
|
| 23 |
+
useEffect(() => {
|
| 24 |
+
// Deferred to avoid synchronous setState in effect body (React 19 rule)
|
| 25 |
+
const init = setTimeout(() => {
|
| 26 |
+
const savedLang = localStorage.getItem("hubapi_lang") as Language;
|
| 27 |
+
if (savedLang === "ar" || savedLang === "en") {
|
| 28 |
+
setLanguage(savedLang);
|
| 29 |
+
} else {
|
| 30 |
+
// Default to Arabic if browser is in Arabic
|
| 31 |
+
const browserLang = navigator.language;
|
| 32 |
+
if (browserLang.startsWith("ar")) {
|
| 33 |
+
setLanguage("ar");
|
| 34 |
+
}
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
const savedAmbient = localStorage.getItem("hubapi_ambient");
|
| 38 |
+
if (savedAmbient === "true") {
|
| 39 |
+
setIsAmbientMode(true);
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
setMounted(true);
|
| 43 |
+
}, 0);
|
| 44 |
+
|
| 45 |
+
return () => clearTimeout(init);
|
| 46 |
+
}, []);
|
| 47 |
+
|
| 48 |
+
useEffect(() => {
|
| 49 |
+
if (!mounted) return;
|
| 50 |
+
localStorage.setItem("hubapi_lang", language);
|
| 51 |
+
|
| 52 |
+
// Dynamically update document direction & lang
|
| 53 |
+
document.documentElement.dir = language === "ar" ? "rtl" : "ltr";
|
| 54 |
+
document.documentElement.lang = language;
|
| 55 |
+
}, [language, mounted]);
|
| 56 |
+
|
| 57 |
+
useEffect(() => {
|
| 58 |
+
if (!mounted) return;
|
| 59 |
+
localStorage.setItem("hubapi_ambient", isAmbientMode ? "true" : "false");
|
| 60 |
+
}, [isAmbientMode, mounted]);
|
| 61 |
+
|
| 62 |
+
const toggleLanguage = () => {
|
| 63 |
+
setLanguage((prev) => (prev === "en" ? "ar" : "en"));
|
| 64 |
+
};
|
| 65 |
+
|
| 66 |
+
const toggleAmbientMode = () => {
|
| 67 |
+
setIsAmbientMode((prev) => !prev);
|
| 68 |
+
};
|
| 69 |
+
|
| 70 |
+
const t = (key: keyof TranslationsType, replacements?: Record<string, string>): string => {
|
| 71 |
+
const dict = translations[language] || translations.en;
|
| 72 |
+
let text = dict[key] || translations.en[key] || String(key);
|
| 73 |
+
|
| 74 |
+
if (replacements) {
|
| 75 |
+
Object.entries(replacements).forEach(([k, v]) => {
|
| 76 |
+
text = text.replace(`{${k}}`, v);
|
| 77 |
+
});
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
return text;
|
| 81 |
+
};
|
| 82 |
+
|
| 83 |
+
// Prevent hydration flash by rendering children with defaults or holding off until mounted
|
| 84 |
+
return (
|
| 85 |
+
<LanguageContext.Provider value={{ language, toggleLanguage, t, isAmbientMode, toggleAmbientMode }}>
|
| 86 |
+
<div className={language === "ar" ? "font-arabic" : "font-sans"}>
|
| 87 |
+
{children}
|
| 88 |
+
</div>
|
| 89 |
+
</LanguageContext.Provider>
|
| 90 |
+
);
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
export function useLanguage() {
|
| 94 |
+
const context = useContext(LanguageContext);
|
| 95 |
+
if (!context) {
|
| 96 |
+
throw new Error("useLanguage must be used within a LanguageProvider");
|
| 97 |
+
}
|
| 98 |
+
return context;
|
| 99 |
+
}
|
components/LanguageToggle.tsx
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
|
| 3 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 4 |
+
import { useEffect, useState } from "react";
|
| 5 |
+
import { motion } from "framer-motion";
|
| 6 |
+
import { useSplitFlapAudio } from "@/components/ui/split-flap-text";
|
| 7 |
+
import { cn } from "@/lib/utils";
|
| 8 |
+
|
| 9 |
+
export function LanguageToggle() {
|
| 10 |
+
const { language, toggleLanguage } = useLanguage();
|
| 11 |
+
const [mounted, setMounted] = useState(false);
|
| 12 |
+
const audio = useSplitFlapAudio();
|
| 13 |
+
|
| 14 |
+
// Prevent hydration mismatch
|
| 15 |
+
useEffect(() => {
|
| 16 |
+
const frame = requestAnimationFrame(() => {
|
| 17 |
+
setMounted(true);
|
| 18 |
+
});
|
| 19 |
+
return () => cancelAnimationFrame(frame);
|
| 20 |
+
}, []);
|
| 21 |
+
|
| 22 |
+
if (!mounted) {
|
| 23 |
+
return (
|
| 24 |
+
<div className="w-[68px] h-7 rounded-full border border-black/5 dark:border-white/10 bg-white/10 dark:bg-black/20 backdrop-blur-md opacity-40" />
|
| 25 |
+
);
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
const isAr = language === "ar";
|
| 29 |
+
|
| 30 |
+
const handleToggle = (targetLang: "en" | "ar") => {
|
| 31 |
+
if (language === targetLang) return;
|
| 32 |
+
|
| 33 |
+
// Play satisfying mechanical click sound
|
| 34 |
+
if (audio && !audio.isMuted) {
|
| 35 |
+
audio.playClick();
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
toggleLanguage();
|
| 39 |
+
};
|
| 40 |
+
|
| 41 |
+
return (
|
| 42 |
+
<div
|
| 43 |
+
className="relative flex items-center p-0.5 rounded-full border border-[var(--border)] bg-[var(--muted)] backdrop-blur-md shadow-[0_4px_20px_rgba(0,0,0,0.05)] dark:shadow-[0_4px_20px_rgba(0,0,0,0.3)] w-[68px] h-7 select-none overflow-hidden"
|
| 44 |
+
>
|
| 45 |
+
{/* Sliding background container */}
|
| 46 |
+
<motion.div
|
| 47 |
+
className="absolute top-0.5 left-0.5 w-[31px] h-[22px] rounded-full bg-primary shadow-[0_2px_6px_rgba(0,0,0,0.12)] dark:shadow-[0_2px_6px_rgba(0,0,0,0.6)] border border-black/5 dark:border-white/5"
|
| 48 |
+
initial={false}
|
| 49 |
+
animate={{
|
| 50 |
+
x: isAr ? 31 : 0,
|
| 51 |
+
}}
|
| 52 |
+
transition={{ type: "spring", stiffness: 350, damping: 26 }}
|
| 53 |
+
/>
|
| 54 |
+
|
| 55 |
+
{/* English Button */}
|
| 56 |
+
<button
|
| 57 |
+
onClick={() => handleToggle("en")}
|
| 58 |
+
className={cn(
|
| 59 |
+
"relative z-10 flex items-center justify-center w-1/2 h-full rounded-full transition-colors duration-300 font-mono text-[10px] font-bold focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary/50 focus-visible:ring-offset-0 focus-visible:z-20",
|
| 60 |
+
!isAr ? "text-primary-foreground" : "text-[var(--muted-foreground)] hover:text-[var(--foreground)]"
|
| 61 |
+
)}
|
| 62 |
+
aria-label="English language"
|
| 63 |
+
>
|
| 64 |
+
EN
|
| 65 |
+
</button>
|
| 66 |
+
|
| 67 |
+
{/* Arabic Button */}
|
| 68 |
+
<button
|
| 69 |
+
onClick={() => handleToggle("ar")}
|
| 70 |
+
className={cn(
|
| 71 |
+
"relative z-10 flex items-center justify-center w-1/2 h-full rounded-full transition-colors duration-300 font-sans text-[10px] font-bold focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary/50 focus-visible:ring-offset-0 focus-visible:z-20",
|
| 72 |
+
isAr ? "text-primary-foreground" : "text-[var(--muted-foreground)] hover:text-[var(--foreground)]"
|
| 73 |
+
)}
|
| 74 |
+
aria-label="اللغة العربية"
|
| 75 |
+
>
|
| 76 |
+
عربي
|
| 77 |
+
</button>
|
| 78 |
+
</div>
|
| 79 |
+
);
|
| 80 |
+
}
|
components/SkipToContent.tsx
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
|
| 3 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 4 |
+
|
| 5 |
+
export function SkipToContent() {
|
| 6 |
+
const { t } = useLanguage();
|
| 7 |
+
return (
|
| 8 |
+
<a
|
| 9 |
+
href="#main-content"
|
| 10 |
+
className="sr-only focus:not-sr-only focus:fixed focus:top-4 focus:start-4 focus:z-[9999] focus:px-4 focus:py-2 focus:bg-primary focus:text-primary-foreground focus:rounded-md focus:outline-none focus:ring-2 focus:ring-primary/50 focus:font-mono focus:text-xs focus:uppercase focus:tracking-wider focus:shadow-lg focus:border focus:border-primary-foreground/10"
|
| 11 |
+
>
|
| 12 |
+
{t("skipToContent")}
|
| 13 |
+
</a>
|
| 14 |
+
);
|
| 15 |
+
}
|
components/StatsDisplay.tsx
CHANGED
|
@@ -3,6 +3,7 @@
|
|
| 3 |
import { useState, useEffect, useMemo, useRef } from "react";
|
| 4 |
import { motion, AnimatePresence } from "framer-motion";
|
| 5 |
import { stats, formatNumber, topCountries } from "../data/country-data";
|
|
|
|
| 6 |
|
| 7 |
function useAnimatedNumber(baseValue: number, incrementRatePerSecond: number) {
|
| 8 |
const [value, setValue] = useState(baseValue);
|
|
@@ -282,12 +283,13 @@ function MetricRow({ label, baseValue, incrementRate, showRate = false }: { labe
|
|
| 282 |
}
|
| 283 |
|
| 284 |
export function TotalRequests() {
|
|
|
|
| 285 |
const { value, rate } = useAnimatedNumber(stats.totalRequests, 450000);
|
| 286 |
|
| 287 |
return (
|
| 288 |
<div className="space-y-2">
|
| 289 |
<h2 className="my-0 font-mono font-medium text-sm tracking-tight uppercase text-muted-foreground">
|
| 290 |
-
|
| 291 |
</h2>
|
| 292 |
<div className="text-4xl md:text-5xl tracking-normal font-mono tabular-nums">
|
| 293 |
{formatNumber(value)}
|
|
@@ -324,12 +326,13 @@ function CountryRow({ country, incrementRate }: { country: typeof topCountries[0
|
|
| 324 |
}
|
| 325 |
|
| 326 |
export function TopCountries() {
|
|
|
|
| 327 |
const incrementRates = [160000, 24000, 19000, 17000, 15000, 15000, 14000];
|
| 328 |
|
| 329 |
return (
|
| 330 |
<div className="space-y-2">
|
| 331 |
<h2 className="my-0 font-mono font-medium text-sm tracking-tight uppercase text-muted-foreground">
|
| 332 |
-
|
| 333 |
</h2>
|
| 334 |
<ul className="list-none pl-0 space-y-1">
|
| 335 |
{topCountries.map((country, index) => (
|
|
@@ -345,6 +348,8 @@ export function TopCountries() {
|
|
| 345 |
}
|
| 346 |
|
| 347 |
export function RegionCount() {
|
|
|
|
|
|
|
| 348 |
return (
|
| 349 |
<div className="flex items-center w-full md:w-fit justify-between md:justify-start mt-2">
|
| 350 |
<span aria-hidden="true" className="inline-block translate-y-[-2px] translate-x-[2px]">
|
|
@@ -352,60 +357,62 @@ export function RegionCount() {
|
|
| 352 |
</span>
|
| 353 |
<div className="text-left">
|
| 354 |
<span className="inline-block my-0 font-medium text-[16px]"> 19</span>
|
| 355 |
-
<span className="font-medium text-[16px] text-muted-foreground tracking-tight">
|
| 356 |
</div>
|
| 357 |
</div>
|
| 358 |
);
|
| 359 |
}
|
| 360 |
|
| 361 |
export function StatsGrid() {
|
|
|
|
|
|
|
| 362 |
return (
|
| 363 |
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-1.5">
|
| 364 |
<div className="flex flex-col gap-1.5">
|
| 365 |
<StatCard
|
| 366 |
-
title="
|
| 367 |
baseValue={stats.totalDeployments}
|
| 368 |
incrementRate={24}
|
| 369 |
-
infoContent="
|
| 370 |
href="#features"
|
| 371 |
className="flex-1"
|
| 372 |
/>
|
| 373 |
<StatCard
|
| 374 |
-
title="
|
| 375 |
-
infoContent="
|
| 376 |
href="#features"
|
| 377 |
className="flex-1"
|
| 378 |
>
|
| 379 |
<ul className="space-y-1 list-none pl-0 mt-2">
|
| 380 |
-
<MetricRow label="
|
| 381 |
</ul>
|
| 382 |
</StatCard>
|
| 383 |
</div>
|
| 384 |
|
| 385 |
<div className="flex flex-col gap-1.5">
|
| 386 |
<StatCard
|
| 387 |
-
title="
|
| 388 |
baseValue={stats.firewallActions.total}
|
| 389 |
incrementRate={29000}
|
| 390 |
-
infoContent="
|
| 391 |
href="#security"
|
| 392 |
className="flex-1"
|
| 393 |
>
|
| 394 |
<ul className="space-y-1 list-none pl-0 mt-4">
|
| 395 |
<MetricRow
|
| 396 |
-
label="
|
| 397 |
baseValue={stats.firewallActions.systemBlocks}
|
| 398 |
incrementRate={5400}
|
| 399 |
showRate
|
| 400 |
/>
|
| 401 |
<MetricRow
|
| 402 |
-
label="
|
| 403 |
baseValue={stats.firewallActions.systemChallenges}
|
| 404 |
incrementRate={12300}
|
| 405 |
showRate
|
| 406 |
/>
|
| 407 |
<MetricRow
|
| 408 |
-
label="
|
| 409 |
baseValue={stats.firewallActions.customWafBlocks}
|
| 410 |
incrementRate={1270}
|
| 411 |
showRate
|
|
@@ -416,29 +423,29 @@ export function StatsGrid() {
|
|
| 416 |
|
| 417 |
<div className="flex flex-col gap-1.5">
|
| 418 |
<StatCard
|
| 419 |
-
title="
|
| 420 |
-
infoContent="
|
| 421 |
href="#security"
|
| 422 |
className="flex-1"
|
| 423 |
>
|
| 424 |
<ul className="space-y-1 list-none pl-0 mt-2">
|
| 425 |
-
<MetricRow label="
|
| 426 |
<MetricRow
|
| 427 |
-
label="
|
| 428 |
baseValue={stats.botManagement.humansVerified}
|
| 429 |
incrementRate={9300}
|
| 430 |
/>
|
| 431 |
</ul>
|
| 432 |
</StatCard>
|
| 433 |
<StatCard
|
| 434 |
-
title="
|
| 435 |
baseValue={stats.cacheHits}
|
| 436 |
incrementRate={305000}
|
| 437 |
-
infoContent="
|
| 438 |
href="#features"
|
| 439 |
className="flex-1"
|
| 440 |
>
|
| 441 |
-
<p className="text-muted-foreground text-sm font-mono mt-1">
|
| 442 |
</StatCard>
|
| 443 |
</div>
|
| 444 |
</div>
|
|
|
|
| 3 |
import { useState, useEffect, useMemo, useRef } from "react";
|
| 4 |
import { motion, AnimatePresence } from "framer-motion";
|
| 5 |
import { stats, formatNumber, topCountries } from "../data/country-data";
|
| 6 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 7 |
|
| 8 |
function useAnimatedNumber(baseValue: number, incrementRatePerSecond: number) {
|
| 9 |
const [value, setValue] = useState(baseValue);
|
|
|
|
| 283 |
}
|
| 284 |
|
| 285 |
export function TotalRequests() {
|
| 286 |
+
const { t } = useLanguage();
|
| 287 |
const { value, rate } = useAnimatedNumber(stats.totalRequests, 450000);
|
| 288 |
|
| 289 |
return (
|
| 290 |
<div className="space-y-2">
|
| 291 |
<h2 className="my-0 font-mono font-medium text-sm tracking-tight uppercase text-muted-foreground">
|
| 292 |
+
{t("statsRoutedRequests")}
|
| 293 |
</h2>
|
| 294 |
<div className="text-4xl md:text-5xl tracking-normal font-mono tabular-nums">
|
| 295 |
{formatNumber(value)}
|
|
|
|
| 326 |
}
|
| 327 |
|
| 328 |
export function TopCountries() {
|
| 329 |
+
const { t } = useLanguage();
|
| 330 |
const incrementRates = [160000, 24000, 19000, 17000, 15000, 15000, 14000];
|
| 331 |
|
| 332 |
return (
|
| 333 |
<div className="space-y-2">
|
| 334 |
<h2 className="my-0 font-mono font-medium text-sm tracking-tight uppercase text-muted-foreground">
|
| 335 |
+
{t("statsTopTraffic")}
|
| 336 |
</h2>
|
| 337 |
<ul className="list-none pl-0 space-y-1">
|
| 338 |
{topCountries.map((country, index) => (
|
|
|
|
| 348 |
}
|
| 349 |
|
| 350 |
export function RegionCount() {
|
| 351 |
+
const { t } = useLanguage();
|
| 352 |
+
|
| 353 |
return (
|
| 354 |
<div className="flex items-center w-full md:w-fit justify-between md:justify-start mt-2">
|
| 355 |
<span aria-hidden="true" className="inline-block translate-y-[-2px] translate-x-[2px]">
|
|
|
|
| 357 |
</span>
|
| 358 |
<div className="text-left">
|
| 359 |
<span className="inline-block my-0 font-medium text-[16px]"> 19</span>
|
| 360 |
+
<span className="font-medium text-[16px] text-muted-foreground tracking-tight"> {t("statsActiveGateways")}</span>
|
| 361 |
</div>
|
| 362 |
</div>
|
| 363 |
);
|
| 364 |
}
|
| 365 |
|
| 366 |
export function StatsGrid() {
|
| 367 |
+
const { t } = useLanguage();
|
| 368 |
+
|
| 369 |
return (
|
| 370 |
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-1.5">
|
| 371 |
<div className="flex flex-col gap-1.5">
|
| 372 |
<StatCard
|
| 373 |
+
title={t("statsActivePipelines")}
|
| 374 |
baseValue={stats.totalDeployments}
|
| 375 |
incrementRate={24}
|
| 376 |
+
infoContent={t("statsActivePipelinesDesc")}
|
| 377 |
href="#features"
|
| 378 |
className="flex-1"
|
| 379 |
/>
|
| 380 |
<StatCard
|
| 381 |
+
title={t("statsGatewayTitle")}
|
| 382 |
+
infoContent={t("statsGatewayDesc")}
|
| 383 |
href="#features"
|
| 384 |
className="flex-1"
|
| 385 |
>
|
| 386 |
<ul className="space-y-1 list-none pl-0 mt-2">
|
| 387 |
+
<MetricRow label={t("statsRoutedTokens")} baseValue={stats.aiGatewayRequests} incrementRate={95} />
|
| 388 |
</ul>
|
| 389 |
</StatCard>
|
| 390 |
</div>
|
| 391 |
|
| 392 |
<div className="flex flex-col gap-1.5">
|
| 393 |
<StatCard
|
| 394 |
+
title={t("statsGuardrailTitle")}
|
| 395 |
baseValue={stats.firewallActions.total}
|
| 396 |
incrementRate={29000}
|
| 397 |
+
infoContent={t("statsGuardrailDesc")}
|
| 398 |
href="#security"
|
| 399 |
className="flex-1"
|
| 400 |
>
|
| 401 |
<ul className="space-y-1 list-none pl-0 mt-4">
|
| 402 |
<MetricRow
|
| 403 |
+
label={t("statsPromptBlocks")}
|
| 404 |
baseValue={stats.firewallActions.systemBlocks}
|
| 405 |
incrementRate={5400}
|
| 406 |
showRate
|
| 407 |
/>
|
| 408 |
<MetricRow
|
| 409 |
+
label={t("statsPiiChallenges")}
|
| 410 |
baseValue={stats.firewallActions.systemChallenges}
|
| 411 |
incrementRate={12300}
|
| 412 |
showRate
|
| 413 |
/>
|
| 414 |
<MetricRow
|
| 415 |
+
label={t("statsPolicyActions")}
|
| 416 |
baseValue={stats.firewallActions.customWafBlocks}
|
| 417 |
incrementRate={1270}
|
| 418 |
showRate
|
|
|
|
| 423 |
|
| 424 |
<div className="flex flex-col gap-1.5">
|
| 425 |
<StatCard
|
| 426 |
+
title={t("statsAbuseTitle")}
|
| 427 |
+
infoContent={t("statsAbuseDesc")}
|
| 428 |
href="#security"
|
| 429 |
className="flex-1"
|
| 430 |
>
|
| 431 |
<ul className="space-y-1 list-none pl-0 mt-2">
|
| 432 |
+
<MetricRow label={t("statsKeysQuarantined")} baseValue={stats.botManagement.botsBlocked} incrementRate={1600} />
|
| 433 |
<MetricRow
|
| 434 |
+
label={t("statsRequestsVerified")}
|
| 435 |
baseValue={stats.botManagement.humansVerified}
|
| 436 |
incrementRate={9300}
|
| 437 |
/>
|
| 438 |
</ul>
|
| 439 |
</StatCard>
|
| 440 |
<StatCard
|
| 441 |
+
title={t("statsPromptCache")}
|
| 442 |
baseValue={stats.cacheHits}
|
| 443 |
incrementRate={305000}
|
| 444 |
+
infoContent={t("statsPromptCacheDesc")}
|
| 445 |
href="#features"
|
| 446 |
className="flex-1"
|
| 447 |
>
|
| 448 |
+
<p className="text-muted-foreground text-sm font-mono mt-1">{t("statsCachedServed")}</p>
|
| 449 |
</StatCard>
|
| 450 |
</div>
|
| 451 |
</div>
|
components/TerminalSection.tsx
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
|
| 3 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 4 |
+
import { ErrorBoundary } from "@/components/ui/error-boundary";
|
| 5 |
+
import { HubLiveTerminal } from "@/components/HubLiveTerminal";
|
| 6 |
+
|
| 7 |
+
export function TerminalSection() {
|
| 8 |
+
const { t } = useLanguage();
|
| 9 |
+
|
| 10 |
+
return (
|
| 11 |
+
<section className="relative z-10 w-full max-w-5xl mx-auto px-4 md:px-6 py-20 md:py-28">
|
| 12 |
+
<div className="text-center space-y-5 mb-10">
|
| 13 |
+
<div className="inline-flex items-center rounded-full border border-primary/20 bg-primary/5 px-4 py-1.5 text-sm font-medium text-primary backdrop-blur-sm shadow-sm">
|
| 14 |
+
<span className="relative flex h-2 w-2 mr-2.5">
|
| 15 |
+
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"></span>
|
| 16 |
+
<span className="relative inline-flex rounded-full h-2 w-2 bg-primary"></span>
|
| 17 |
+
</span>
|
| 18 |
+
{t("terminalTitle")}
|
| 19 |
+
</div>
|
| 20 |
+
<h2 className="text-3xl font-extrabold tracking-tight sm:text-5xl bg-clip-text text-transparent bg-gradient-to-br from-foreground via-foreground/90 to-muted-foreground pb-1">
|
| 21 |
+
{t("terminalSubtitle")}
|
| 22 |
+
</h2>
|
| 23 |
+
<p className="max-w-2xl mx-auto text-base text-muted-foreground font-mono">
|
| 24 |
+
{t("terminalDesc")}
|
| 25 |
+
</p>
|
| 26 |
+
</div>
|
| 27 |
+
<ErrorBoundary>
|
| 28 |
+
<HubLiveTerminal />
|
| 29 |
+
</ErrorBoundary>
|
| 30 |
+
</section>
|
| 31 |
+
);
|
| 32 |
+
}
|
components/TestimonialsCarousel.tsx
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
|
| 3 |
+
import { useState, useEffect, useRef } from "react";
|
| 4 |
+
import { motion, AnimatePresence } from "framer-motion";
|
| 5 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 6 |
+
import { Quote, ChevronLeft, ChevronRight, Terminal } from "lucide-react";
|
| 7 |
+
|
| 8 |
+
export function TestimonialsCarousel() {
|
| 9 |
+
const { t, language } = useLanguage();
|
| 10 |
+
const [activeIndex, setActiveIndex] = useState(0);
|
| 11 |
+
const [autoplay, setAutoplay] = useState(true);
|
| 12 |
+
const timerRef = useRef<ReturnType<typeof setInterval> | null>(null);
|
| 13 |
+
|
| 14 |
+
const testimonials = [
|
| 15 |
+
{
|
| 16 |
+
textKey: "testimonial1Text" as const,
|
| 17 |
+
authorKey: "testimonial1Author" as const,
|
| 18 |
+
roleKey: "testimonial1Role" as const,
|
| 19 |
+
avatar: "MT",
|
| 20 |
+
metrics: "LATENCY: -35% // BILL: -40%",
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
textKey: "testimonial2Text" as const,
|
| 24 |
+
authorKey: "testimonial2Author" as const,
|
| 25 |
+
roleKey: "testimonial2Role" as const,
|
| 26 |
+
avatar: "SC",
|
| 27 |
+
metrics: "ROUTING OVERHEAD: 12ms",
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
textKey: "testimonial3Text" as const,
|
| 31 |
+
authorKey: "testimonial3Author" as const,
|
| 32 |
+
roleKey: "testimonial3Role" as const,
|
| 33 |
+
avatar: "AA",
|
| 34 |
+
metrics: "UPTIME: 99.99% // INTEGRATION: 15m",
|
| 35 |
+
},
|
| 36 |
+
];
|
| 37 |
+
|
| 38 |
+
const handleNext = () => {
|
| 39 |
+
setActiveIndex((prev) => (prev + 1) % testimonials.length);
|
| 40 |
+
setAutoplay(false);
|
| 41 |
+
};
|
| 42 |
+
|
| 43 |
+
const handlePrev = () => {
|
| 44 |
+
setActiveIndex((prev) => (prev - 1 + testimonials.length) % testimonials.length);
|
| 45 |
+
setAutoplay(false);
|
| 46 |
+
};
|
| 47 |
+
|
| 48 |
+
useEffect(() => {
|
| 49 |
+
if (!autoplay) return;
|
| 50 |
+
|
| 51 |
+
timerRef.current = setInterval(() => {
|
| 52 |
+
setActiveIndex((prev) => (prev + 1) % testimonials.length);
|
| 53 |
+
}, 6000);
|
| 54 |
+
|
| 55 |
+
return () => {
|
| 56 |
+
if (timerRef.current) clearInterval(timerRef.current);
|
| 57 |
+
};
|
| 58 |
+
}, [autoplay, testimonials.length]);
|
| 59 |
+
|
| 60 |
+
return (
|
| 61 |
+
<section className="relative z-10 w-full max-w-5xl mx-auto px-4 md:px-6 py-20 border-t border-border">
|
| 62 |
+
<div className="text-center space-y-4 mb-14">
|
| 63 |
+
<div className="inline-flex items-center rounded-full border border-primary/20 bg-primary/5 px-4 py-1.5 text-sm font-medium text-primary backdrop-blur-sm shadow-sm font-mono">
|
| 64 |
+
<Terminal className="w-3.5 h-3.5 me-2 animate-pulse" />
|
| 65 |
+
<span>VERIFIED_FEEDBACK</span>
|
| 66 |
+
</div>
|
| 67 |
+
<h2 className="text-3xl font-extrabold tracking-tight sm:text-5xl bg-clip-text text-transparent bg-gradient-to-br from-foreground via-foreground/90 to-muted-foreground">
|
| 68 |
+
{t("testimonialsTitle")}
|
| 69 |
+
</h2>
|
| 70 |
+
<p className="max-w-2xl mx-auto text-sm md:text-base text-muted-foreground font-mono">
|
| 71 |
+
{t("testimonialsSubtitle")}
|
| 72 |
+
</p>
|
| 73 |
+
</div>
|
| 74 |
+
|
| 75 |
+
<div className="relative w-full max-w-3xl mx-auto min-h-[320px] flex items-center justify-center">
|
| 76 |
+
{/* Decorative ambient glow */}
|
| 77 |
+
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-80 h-80 bg-primary/5 rounded-full blur-[100px] pointer-events-none" />
|
| 78 |
+
|
| 79 |
+
<AnimatePresence mode="wait">
|
| 80 |
+
<motion.div
|
| 81 |
+
key={activeIndex}
|
| 82 |
+
initial={{ opacity: 0, x: language === "ar" ? -30 : 30 }}
|
| 83 |
+
animate={{ opacity: 1, x: 0 }}
|
| 84 |
+
exit={{ opacity: 0, x: language === "ar" ? 30 : -30 }}
|
| 85 |
+
transition={{ duration: 0.4, ease: "easeOut" }}
|
| 86 |
+
className="w-full relative p-8 md:p-12 border border-border bg-secondary/10 dark:bg-background/40 backdrop-blur-md rounded-xl shadow-[0_0_30px_rgba(0,0,0,0.3)] overflow-hidden [clip-path:polygon(20px_0,100%_0,100%_calc(100%_-_20px),calc(100%_-_20px)_100%,0_100%,0_20px)] flex flex-col justify-between"
|
| 87 |
+
>
|
| 88 |
+
{/* Tech Corner Bracket Lines */}
|
| 89 |
+
<div className="absolute top-0 left-0 w-6 h-6 border-t border-l border-primary/40" />
|
| 90 |
+
<div className="absolute top-0 right-0 w-6 h-6 border-t border-r border-primary/40" />
|
| 91 |
+
<div className="absolute bottom-0 left-0 w-6 h-6 border-b border-l border-primary/40" />
|
| 92 |
+
<div className="absolute bottom-0 right-0 w-6 h-6 border-b border-r border-primary/40" />
|
| 93 |
+
|
| 94 |
+
<div className="space-y-6">
|
| 95 |
+
{/* Quote Icon & Metrics */}
|
| 96 |
+
<div className="flex justify-between items-center border-b border-border pb-4">
|
| 97 |
+
<Quote className="w-8 h-8 text-primary/40" />
|
| 98 |
+
<span className="text-[10px] font-mono font-bold tracking-widest text-primary/80 bg-primary/5 border border-primary/20 px-2.5 py-1 rounded">
|
| 99 |
+
{testimonials[activeIndex].metrics}
|
| 100 |
+
</span>
|
| 101 |
+
</div>
|
| 102 |
+
|
| 103 |
+
{/* Body text */}
|
| 104 |
+
<p className="text-base sm:text-lg text-foreground font-semibold leading-relaxed tracking-wide italic text-start">
|
| 105 |
+
“{t(testimonials[activeIndex].textKey)}”
|
| 106 |
+
</p>
|
| 107 |
+
</div>
|
| 108 |
+
|
| 109 |
+
{/* Author Section */}
|
| 110 |
+
<div className="flex items-center gap-4 mt-8 pt-6 border-t border-border">
|
| 111 |
+
<div className="w-12 h-12 rounded border border-primary/30 bg-primary/10 flex items-center justify-center text-primary font-mono font-bold text-sm shadow-[0_0_10px_var(--primary-glow)]">
|
| 112 |
+
{testimonials[activeIndex].avatar}
|
| 113 |
+
</div>
|
| 114 |
+
<div className="flex flex-col text-start">
|
| 115 |
+
<span className="font-bold text-sm text-foreground">
|
| 116 |
+
{t(testimonials[activeIndex].authorKey)}
|
| 117 |
+
</span>
|
| 118 |
+
<span className="text-xs text-muted-foreground font-mono uppercase mt-0.5">
|
| 119 |
+
{t(testimonials[activeIndex].roleKey)}
|
| 120 |
+
</span>
|
| 121 |
+
</div>
|
| 122 |
+
</div>
|
| 123 |
+
</motion.div>
|
| 124 |
+
</AnimatePresence>
|
| 125 |
+
|
| 126 |
+
{/* Carousel controls */}
|
| 127 |
+
<div className="absolute -bottom-16 left-0 right-0 flex items-center justify-between px-4 sm:px-12 pointer-events-none">
|
| 128 |
+
{/* Progress indicators */}
|
| 129 |
+
<div className="flex gap-2 pointer-events-auto">
|
| 130 |
+
{testimonials.map((_, i) => (
|
| 131 |
+
<button
|
| 132 |
+
key={i}
|
| 133 |
+
onClick={() => {
|
| 134 |
+
setActiveIndex(i);
|
| 135 |
+
setAutoplay(false);
|
| 136 |
+
}}
|
| 137 |
+
className={`h-1.5 transition-all duration-300 rounded-full border-none cursor-pointer ${
|
| 138 |
+
i === activeIndex
|
| 139 |
+
? "w-8 bg-primary shadow-[0_0_8px_var(--primary-glow)]"
|
| 140 |
+
: "w-2 bg-muted-foreground/30 hover:bg-muted-foreground/60"
|
| 141 |
+
}`}
|
| 142 |
+
aria-label={`Slide ${i + 1}`}
|
| 143 |
+
/>
|
| 144 |
+
))}
|
| 145 |
+
</div>
|
| 146 |
+
|
| 147 |
+
{/* Navigation Arrows */}
|
| 148 |
+
<div className="flex gap-2.5 pointer-events-auto">
|
| 149 |
+
<button
|
| 150 |
+
onClick={handlePrev}
|
| 151 |
+
className="h-10 w-10 flex items-center justify-center border border-border bg-secondary/20 dark:bg-white/5 hover:bg-primary/10 hover:border-primary/40 hover:text-primary transition-all duration-200 focus-visible:outline-none [clip-path:polygon(6px_0,100%_0,100%_calc(100%_-_6px),calc(100%_-_6px)_100%,0_100%,0_6px)] cursor-pointer"
|
| 152 |
+
aria-label="Previous testimonial"
|
| 153 |
+
>
|
| 154 |
+
<ChevronLeft className="w-4 h-4 rtl:rotate-180" />
|
| 155 |
+
</button>
|
| 156 |
+
<button
|
| 157 |
+
onClick={handleNext}
|
| 158 |
+
className="h-10 w-10 flex items-center justify-center border border-border bg-secondary/20 dark:bg-white/5 hover:bg-primary/10 hover:border-primary/40 hover:text-primary transition-all duration-200 focus-visible:outline-none [clip-path:polygon(6px_0,100%_0,100%_calc(100%_-_6px),calc(100%_-_6px)_100%,0_100%,0_6px)] cursor-pointer"
|
| 159 |
+
aria-label="Next testimonial"
|
| 160 |
+
>
|
| 161 |
+
<ChevronRight className="w-4 h-4 rtl:rotate-180" />
|
| 162 |
+
</button>
|
| 163 |
+
</div>
|
| 164 |
+
</div>
|
| 165 |
+
</div>
|
| 166 |
+
</section>
|
| 167 |
+
);
|
| 168 |
+
}
|
components/ThreeTicketCard.tsx
ADDED
|
@@ -0,0 +1,336 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
|
| 3 |
+
import React, { useRef, useEffect } from "react";
|
| 4 |
+
import * as THREE from "three";
|
| 5 |
+
|
| 6 |
+
interface ThreeTicketCardProps {
|
| 7 |
+
email: string;
|
| 8 |
+
ticketNumber: string;
|
| 9 |
+
rotateX: number;
|
| 10 |
+
rotateY: number;
|
| 11 |
+
glareX: number;
|
| 12 |
+
glareY: number;
|
| 13 |
+
onMouseMove: (e: React.MouseEvent<HTMLDivElement>) => void;
|
| 14 |
+
onMouseLeave: () => void;
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
export function ThreeTicketCard({
|
| 18 |
+
email,
|
| 19 |
+
ticketNumber,
|
| 20 |
+
rotateX,
|
| 21 |
+
rotateY,
|
| 22 |
+
glareX,
|
| 23 |
+
glareY,
|
| 24 |
+
onMouseMove,
|
| 25 |
+
onMouseLeave,
|
| 26 |
+
}: ThreeTicketCardProps) {
|
| 27 |
+
const mountRef = useRef<HTMLDivElement>(null);
|
| 28 |
+
const canvasRef = useRef<HTMLCanvasElement>(null);
|
| 29 |
+
|
| 30 |
+
// Mask email for aesthetics, e.g. u***r@domain.com
|
| 31 |
+
const getMaskedEmail = (rawEmail: string) => {
|
| 32 |
+
const parts = rawEmail.split("@");
|
| 33 |
+
if (parts.length !== 2) return rawEmail;
|
| 34 |
+
const name = parts[0];
|
| 35 |
+
const domain = parts[1];
|
| 36 |
+
if (name.length <= 2) return `${name}***@${domain}`;
|
| 37 |
+
return `${name.charAt(0)}***${name.charAt(name.length - 1)}@${domain}`;
|
| 38 |
+
};
|
| 39 |
+
|
| 40 |
+
useEffect(() => {
|
| 41 |
+
if (!canvasRef.current || !mountRef.current) return;
|
| 42 |
+
|
| 43 |
+
const width = 340;
|
| 44 |
+
const height = 210;
|
| 45 |
+
|
| 46 |
+
// 1. Create Offscreen Canvas for Card Texture
|
| 47 |
+
const offscreen = document.createElement("canvas");
|
| 48 |
+
offscreen.width = 1024;
|
| 49 |
+
offscreen.height = 640;
|
| 50 |
+
const ctx = offscreen.getContext("2d");
|
| 51 |
+
|
| 52 |
+
if (ctx) {
|
| 53 |
+
// Background base
|
| 54 |
+
ctx.fillStyle = "#030303";
|
| 55 |
+
ctx.fillRect(0, 0, 1024, 640);
|
| 56 |
+
|
| 57 |
+
// Cyber Grid Pattern
|
| 58 |
+
ctx.strokeStyle = "rgba(255, 255, 255, 0.02)";
|
| 59 |
+
ctx.lineWidth = 2;
|
| 60 |
+
const gridSpacing = 32;
|
| 61 |
+
for (let x = 0; x < 1024; x += gridSpacing) {
|
| 62 |
+
ctx.beginPath();
|
| 63 |
+
ctx.moveTo(x, 0);
|
| 64 |
+
ctx.lineTo(x, 640);
|
| 65 |
+
ctx.stroke();
|
| 66 |
+
}
|
| 67 |
+
for (let y = 0; y < 640; y += gridSpacing) {
|
| 68 |
+
ctx.beginPath();
|
| 69 |
+
ctx.moveTo(0, y);
|
| 70 |
+
ctx.lineTo(1024, y);
|
| 71 |
+
ctx.stroke();
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
// Neon glows on offscreen texture
|
| 75 |
+
const grad = ctx.createLinearGradient(0, 0, 1024, 640);
|
| 76 |
+
grad.addColorStop(0, "rgba(245, 158, 11, 0.05)");
|
| 77 |
+
grad.addColorStop(0.5, "rgba(0, 0, 0, 0)");
|
| 78 |
+
grad.addColorStop(1, "rgba(99, 102, 241, 0.05)");
|
| 79 |
+
ctx.fillStyle = grad;
|
| 80 |
+
ctx.fillRect(0, 0, 1024, 640);
|
| 81 |
+
|
| 82 |
+
// Outer border outline
|
| 83 |
+
ctx.strokeStyle = "rgba(255, 255, 255, 0.15)";
|
| 84 |
+
ctx.lineWidth = 4;
|
| 85 |
+
ctx.strokeRect(30, 30, 964, 580);
|
| 86 |
+
|
| 87 |
+
// Cyber Corners
|
| 88 |
+
ctx.strokeStyle = "#fbbf24"; // Amber 400
|
| 89 |
+
ctx.lineWidth = 6;
|
| 90 |
+
// Top-Left corner
|
| 91 |
+
ctx.beginPath(); ctx.moveTo(50, 90); ctx.lineTo(50, 50); ctx.lineTo(90, 50); ctx.stroke();
|
| 92 |
+
// Top-Right corner
|
| 93 |
+
ctx.beginPath(); ctx.moveTo(974, 90); ctx.lineTo(974, 50); ctx.lineTo(934, 50); ctx.stroke();
|
| 94 |
+
// Bottom-Left corner
|
| 95 |
+
ctx.beginPath(); ctx.moveTo(50, 550); ctx.lineTo(50, 590); ctx.lineTo(90, 590); ctx.stroke();
|
| 96 |
+
// Bottom-Right corner
|
| 97 |
+
ctx.beginPath(); ctx.moveTo(974, 550); ctx.lineTo(974, 590); ctx.lineTo(934, 590); ctx.stroke();
|
| 98 |
+
|
| 99 |
+
// Brand Logo Header
|
| 100 |
+
ctx.shadowColor = "#fbbf24";
|
| 101 |
+
ctx.shadowBlur = 10;
|
| 102 |
+
ctx.font = "bold 44px monospace";
|
| 103 |
+
ctx.fillStyle = "#fbbf24";
|
| 104 |
+
ctx.fillText("CPU_HUBAPI", 70, 110);
|
| 105 |
+
ctx.shadowBlur = 0; // reset
|
| 106 |
+
|
| 107 |
+
ctx.font = "14px monospace";
|
| 108 |
+
ctx.fillStyle = "rgba(255, 255, 255, 0.4)";
|
| 109 |
+
ctx.fillText("NEURAL GATEWAY MESH ACCESS", 70, 140);
|
| 110 |
+
|
| 111 |
+
// Secure Badge
|
| 112 |
+
ctx.fillStyle = "rgba(245, 158, 11, 0.08)";
|
| 113 |
+
ctx.fillRect(720, 70, 230, 45);
|
| 114 |
+
ctx.strokeStyle = "rgba(245, 158, 11, 0.3)";
|
| 115 |
+
ctx.lineWidth = 2;
|
| 116 |
+
ctx.strokeRect(720, 70, 230, 45);
|
| 117 |
+
|
| 118 |
+
ctx.font = "bold 16px monospace";
|
| 119 |
+
ctx.fillStyle = "#fbbf24";
|
| 120 |
+
ctx.textAlign = "center";
|
| 121 |
+
ctx.fillText("SECURE // LINK", 835, 98);
|
| 122 |
+
ctx.textAlign = "left"; // reset
|
| 123 |
+
|
| 124 |
+
// Access Pass Title
|
| 125 |
+
ctx.font = "20px monospace";
|
| 126 |
+
ctx.fillStyle = "rgba(255, 255, 255, 0.35)";
|
| 127 |
+
ctx.fillText("ACCESS PASS IDENTIFICATION", 70, 270);
|
| 128 |
+
|
| 129 |
+
// Large Ticket Number
|
| 130 |
+
ctx.font = "extrabold 88px monospace";
|
| 131 |
+
ctx.fillStyle = "#ffffff";
|
| 132 |
+
ctx.fillText(`# ${ticketNumber}`, 70, 365);
|
| 133 |
+
|
| 134 |
+
// Bottom Area: Masked Email & Date
|
| 135 |
+
ctx.font = "18px monospace";
|
| 136 |
+
ctx.fillStyle = "rgba(255, 255, 255, 0.35)";
|
| 137 |
+
ctx.fillText("AUTHORIZED SIGNATORY", 70, 480);
|
| 138 |
+
|
| 139 |
+
ctx.font = "bold 26px monospace";
|
| 140 |
+
ctx.fillStyle = "#fbbf24";
|
| 141 |
+
ctx.fillText(getMaskedEmail(email), 70, 515);
|
| 142 |
+
|
| 143 |
+
ctx.font = "14px monospace";
|
| 144 |
+
ctx.fillStyle = "rgba(255, 255, 255, 0.25)";
|
| 145 |
+
ctx.fillText(`ISSUED_AT // ${new Date().toISOString().substring(0, 10)}`, 70, 550);
|
| 146 |
+
|
| 147 |
+
// Barcode
|
| 148 |
+
const barcodeX = 690;
|
| 149 |
+
const barcodeY = 410;
|
| 150 |
+
const barcodeWeights = [5, 3, 7, 3, 5, 10, 3, 5, 3, 7, 5, 3, 10, 3, 5, 7, 3];
|
| 151 |
+
ctx.fillStyle = "rgba(255, 255, 255, 0.85)";
|
| 152 |
+
let currX = barcodeX;
|
| 153 |
+
barcodeWeights.forEach((w) => {
|
| 154 |
+
ctx.fillRect(currX, barcodeY, w * 2.2, 85);
|
| 155 |
+
currX += w * 2.2 + 4;
|
| 156 |
+
});
|
| 157 |
+
|
| 158 |
+
ctx.font = "14px monospace";
|
| 159 |
+
ctx.fillStyle = "rgba(255, 255, 255, 0.3)";
|
| 160 |
+
ctx.fillText(`HUBAPI_${ticketNumber.replace(",", "")}`, barcodeX + 25, 520);
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
// 2. Setup Three.js Scene, Camera, and WebGLRenderer
|
| 164 |
+
const scene = new THREE.Scene();
|
| 165 |
+
|
| 166 |
+
const camera = new THREE.PerspectiveCamera(40, width / height, 0.1, 100);
|
| 167 |
+
camera.position.z = 4.8;
|
| 168 |
+
|
| 169 |
+
const renderer = new THREE.WebGLRenderer({
|
| 170 |
+
canvas: canvasRef.current,
|
| 171 |
+
alpha: true,
|
| 172 |
+
antialias: true,
|
| 173 |
+
});
|
| 174 |
+
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
|
| 175 |
+
renderer.setSize(width, height);
|
| 176 |
+
|
| 177 |
+
// 3. Create Card Texture & Materials
|
| 178 |
+
const texture = new THREE.CanvasTexture(offscreen);
|
| 179 |
+
texture.minFilter = THREE.LinearFilter;
|
| 180 |
+
texture.magFilter = THREE.LinearFilter;
|
| 181 |
+
|
| 182 |
+
// We make a sleek box with thickness for full 3D feel
|
| 183 |
+
const geometry = new THREE.BoxGeometry(3.3, 2.05, 0.07);
|
| 184 |
+
|
| 185 |
+
// 6 Materials representing the 6 faces of the Box
|
| 186 |
+
// Face indices: 0:Right, 1:Left, 2:Top, 3:Bottom, 4:Front, 5:Back
|
| 187 |
+
const glassParams = {
|
| 188 |
+
transparent: true,
|
| 189 |
+
opacity: 0.95,
|
| 190 |
+
roughness: 0.12,
|
| 191 |
+
metalness: 0.3,
|
| 192 |
+
clearcoat: 1.0,
|
| 193 |
+
clearcoatRoughness: 0.05,
|
| 194 |
+
transmission: 0.65,
|
| 195 |
+
thickness: 0.2,
|
| 196 |
+
ior: 1.55,
|
| 197 |
+
};
|
| 198 |
+
|
| 199 |
+
const frontMaterial = new THREE.MeshPhysicalMaterial({
|
| 200 |
+
...glassParams,
|
| 201 |
+
map: texture,
|
| 202 |
+
});
|
| 203 |
+
|
| 204 |
+
const backMaterial = new THREE.MeshPhysicalMaterial({
|
| 205 |
+
...glassParams,
|
| 206 |
+
color: 0x09090c,
|
| 207 |
+
});
|
| 208 |
+
|
| 209 |
+
const edgeMaterial = new THREE.MeshStandardMaterial({
|
| 210 |
+
color: 0x22252a,
|
| 211 |
+
roughness: 0.15,
|
| 212 |
+
metalness: 0.9,
|
| 213 |
+
});
|
| 214 |
+
|
| 215 |
+
const materials = [
|
| 216 |
+
edgeMaterial, // Right
|
| 217 |
+
edgeMaterial, // Left
|
| 218 |
+
edgeMaterial, // Top
|
| 219 |
+
edgeMaterial, // Bottom
|
| 220 |
+
frontMaterial, // Front (main face)
|
| 221 |
+
backMaterial, // Back
|
| 222 |
+
];
|
| 223 |
+
|
| 224 |
+
const cardMesh = new THREE.Mesh(geometry, materials);
|
| 225 |
+
scene.add(cardMesh);
|
| 226 |
+
|
| 227 |
+
// 4. Lighting Setup for realistic reflection
|
| 228 |
+
const ambientLight = new THREE.AmbientLight(0xffffff, 0.65);
|
| 229 |
+
scene.add(ambientLight);
|
| 230 |
+
|
| 231 |
+
const dirLight = new THREE.DirectionalLight(0xffffff, 2.5);
|
| 232 |
+
dirLight.position.set(0, 0, 4);
|
| 233 |
+
scene.add(dirLight);
|
| 234 |
+
|
| 235 |
+
// Moving colored lights for cyberpunk iridescent sheen
|
| 236 |
+
const orangeLight = new THREE.PointLight(0xf59e0b, 8, 10); // Amber
|
| 237 |
+
orangeLight.position.set(2, 2, 1.2);
|
| 238 |
+
scene.add(orangeLight);
|
| 239 |
+
|
| 240 |
+
const indigoLight = new THREE.PointLight(0x6366f1, 8, 10); // Indigo
|
| 241 |
+
indigoLight.position.set(-2, -2, 1.2);
|
| 242 |
+
scene.add(indigoLight);
|
| 243 |
+
|
| 244 |
+
// 5. Animation Loop
|
| 245 |
+
let animationFrameId: number;
|
| 246 |
+
|
| 247 |
+
const animate = () => {
|
| 248 |
+
const currentRotateX = stateRef.current.rotateX;
|
| 249 |
+
const currentRotateY = stateRef.current.rotateY;
|
| 250 |
+
const currentGlareX = stateRef.current.glareX;
|
| 251 |
+
const currentGlareY = stateRef.current.glareY;
|
| 252 |
+
|
| 253 |
+
const targetX = (currentRotateX * Math.PI) / 180;
|
| 254 |
+
const targetY = (currentRotateY * Math.PI) / 180;
|
| 255 |
+
|
| 256 |
+
// Smooth interpolation (lerp)
|
| 257 |
+
cardMesh.rotation.x += (targetX - cardMesh.rotation.x) * 0.12;
|
| 258 |
+
cardMesh.rotation.y += (targetY - cardMesh.rotation.y) * 0.12;
|
| 259 |
+
|
| 260 |
+
// Subtle automatic breathing movement if mouse/gyroscope is neutral
|
| 261 |
+
if (currentRotateX === 0 && currentRotateY === 0) {
|
| 262 |
+
const time = Date.now() * 0.0015;
|
| 263 |
+
cardMesh.rotation.x += Math.sin(time) * 0.0015;
|
| 264 |
+
cardMesh.rotation.y += Math.cos(time) * 0.0015;
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
// Shifting specular light beams based on glare position
|
| 268 |
+
const px = (currentGlareX / 100) - 0.5;
|
| 269 |
+
const py = (currentGlareY / 100) - 0.5;
|
| 270 |
+
|
| 271 |
+
orangeLight.position.x = 2.0 + px * 3;
|
| 272 |
+
orangeLight.position.y = 2.0 - py * 3;
|
| 273 |
+
|
| 274 |
+
indigoLight.position.x = -2.0 - px * 3;
|
| 275 |
+
indigoLight.position.y = -2.0 + py * 3;
|
| 276 |
+
|
| 277 |
+
dirLight.position.x = px * 5;
|
| 278 |
+
dirLight.position.y = -py * 5;
|
| 279 |
+
|
| 280 |
+
renderer.render(scene, camera);
|
| 281 |
+
animationFrameId = requestAnimationFrame(animate);
|
| 282 |
+
};
|
| 283 |
+
|
| 284 |
+
animate();
|
| 285 |
+
|
| 286 |
+
// Resize observer to handle dynamic sizing if needed
|
| 287 |
+
const resizeObserver = new ResizeObserver(() => {
|
| 288 |
+
if (!canvasRef.current) return;
|
| 289 |
+
// Fixed size for the ticket container for perfect alignment, but matches CSS
|
| 290 |
+
renderer.setSize(width, height);
|
| 291 |
+
});
|
| 292 |
+
if (mountRef.current) {
|
| 293 |
+
resizeObserver.observe(mountRef.current);
|
| 294 |
+
}
|
| 295 |
+
|
| 296 |
+
// Clean up
|
| 297 |
+
return () => {
|
| 298 |
+
cancelAnimationFrame(animationFrameId);
|
| 299 |
+
resizeObserver.disconnect();
|
| 300 |
+
geometry.dispose();
|
| 301 |
+
frontMaterial.dispose();
|
| 302 |
+
backMaterial.dispose();
|
| 303 |
+
edgeMaterial.dispose();
|
| 304 |
+
texture.dispose();
|
| 305 |
+
renderer.dispose();
|
| 306 |
+
};
|
| 307 |
+
}, [email, ticketNumber]);
|
| 308 |
+
|
| 309 |
+
// Sync ref with latest props for the animation loop (legitimate animation pattern)
|
| 310 |
+
const stateRef = useRef({ rotateX, rotateY, glareX, glareY });
|
| 311 |
+
// eslint-disable-next-line react-hooks/immutability, react-hooks/refs
|
| 312 |
+
stateRef.current = { rotateX, rotateY, glareX, glareY };
|
| 313 |
+
|
| 314 |
+
return (
|
| 315 |
+
<div
|
| 316 |
+
ref={mountRef}
|
| 317 |
+
onMouseMove={onMouseMove}
|
| 318 |
+
onMouseLeave={onMouseLeave}
|
| 319 |
+
className="relative w-[340px] h-[210px] select-none cursor-grab active:cursor-grabbing"
|
| 320 |
+
style={{ perspective: "1000px" }}
|
| 321 |
+
>
|
| 322 |
+
<canvas
|
| 323 |
+
ref={canvasRef}
|
| 324 |
+
className="w-full h-full rounded-xl"
|
| 325 |
+
style={{ backfaceVisibility: "hidden" }}
|
| 326 |
+
/>
|
| 327 |
+
{/* 3D Reflection overlay highlights on CSS for extra sheen */}
|
| 328 |
+
<div
|
| 329 |
+
className="absolute inset-0 rounded-xl pointer-events-none border border-white/10 mix-blend-overlay"
|
| 330 |
+
style={{
|
| 331 |
+
background: `radial-gradient(circle at ${glareX}% ${glareY}%, rgba(255, 255, 255, 0.15) 0%, transparent 60%)`,
|
| 332 |
+
}}
|
| 333 |
+
/>
|
| 334 |
+
</div>
|
| 335 |
+
);
|
| 336 |
+
}
|
components/TrustSection.tsx
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
|
| 3 |
+
import { motion } from "framer-motion";
|
| 4 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 5 |
+
import { ShieldAlert, Fingerprint, Lock, ShieldCheck, Database, Award } from "lucide-react";
|
| 6 |
+
|
| 7 |
+
export function TrustSection() {
|
| 8 |
+
const { t } = useLanguage();
|
| 9 |
+
|
| 10 |
+
const securityBadges = [
|
| 11 |
+
{
|
| 12 |
+
titleKey: "badgeSoc2" as const,
|
| 13 |
+
descKey: "badgeSoc2Desc" as const,
|
| 14 |
+
icon: Award,
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
titleKey: "badgeGdpr" as const,
|
| 18 |
+
descKey: "badgeGdprDesc" as const,
|
| 19 |
+
icon: ShieldCheck,
|
| 20 |
+
},
|
| 21 |
+
{
|
| 22 |
+
titleKey: "badgeHipaa" as const,
|
| 23 |
+
descKey: "badgeHipaaDesc" as const,
|
| 24 |
+
icon: ShieldAlert,
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
titleKey: "badgeEncryption" as const,
|
| 28 |
+
descKey: "badgeEncryptionDesc" as const,
|
| 29 |
+
icon: Lock,
|
| 30 |
+
},
|
| 31 |
+
{
|
| 32 |
+
titleKey: "badgeZeroRetention" as const,
|
| 33 |
+
descKey: "badgeZeroRetentionDesc" as const,
|
| 34 |
+
icon: Database,
|
| 35 |
+
},
|
| 36 |
+
];
|
| 37 |
+
|
| 38 |
+
const founders = [
|
| 39 |
+
{
|
| 40 |
+
name: "Alex Vlasov",
|
| 41 |
+
roleKey: "teamRole1" as const,
|
| 42 |
+
bioKey: "exGoogle" as const,
|
| 43 |
+
avatar: "AV",
|
| 44 |
+
github: "https://github.com",
|
| 45 |
+
twitter: "https://twitter.com",
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
name: "Sophia Martinez",
|
| 49 |
+
roleKey: "teamRole2" as const,
|
| 50 |
+
bioKey: "exAws" as const,
|
| 51 |
+
avatar: "SM",
|
| 52 |
+
github: "https://github.com",
|
| 53 |
+
twitter: "https://twitter.com",
|
| 54 |
+
},
|
| 55 |
+
];
|
| 56 |
+
|
| 57 |
+
const containerVariants = {
|
| 58 |
+
hidden: {},
|
| 59 |
+
visible: {
|
| 60 |
+
transition: {
|
| 61 |
+
staggerChildren: 0.1,
|
| 62 |
+
},
|
| 63 |
+
},
|
| 64 |
+
};
|
| 65 |
+
|
| 66 |
+
const itemVariants = {
|
| 67 |
+
hidden: { opacity: 0, y: 20 },
|
| 68 |
+
visible: {
|
| 69 |
+
opacity: 1,
|
| 70 |
+
y: 0,
|
| 71 |
+
transition: { duration: 0.5, ease: "easeOut" as const },
|
| 72 |
+
},
|
| 73 |
+
};
|
| 74 |
+
|
| 75 |
+
return (
|
| 76 |
+
<div className="w-full relative z-10 py-20 border-t border-border space-y-28 max-w-5xl mx-auto px-4 md:px-6">
|
| 77 |
+
{/* Background ambient lighting */}
|
| 78 |
+
<div className="absolute top-1/3 right-1/4 w-96 h-96 bg-primary/5 rounded-full blur-[120px] pointer-events-none" />
|
| 79 |
+
<div className="absolute bottom-1/3 left-1/4 w-96 h-96 bg-indigo-500/5 rounded-full blur-[120px] pointer-events-none" />
|
| 80 |
+
|
| 81 |
+
{/* Security Section */}
|
| 82 |
+
<section className="space-y-14">
|
| 83 |
+
<div className="text-center space-y-4">
|
| 84 |
+
<div className="inline-flex items-center rounded-full border border-primary/20 bg-primary/5 px-4 py-1.5 text-sm font-medium text-primary backdrop-blur-sm shadow-sm font-mono">
|
| 85 |
+
<ShieldCheck className="w-3.5 h-3.5 me-2 animate-pulse" />
|
| 86 |
+
<span>{t("secureInfrastructure")}</span>
|
| 87 |
+
</div>
|
| 88 |
+
<h2 className="text-3xl font-extrabold tracking-tight sm:text-5xl bg-clip-text text-transparent bg-gradient-to-br from-foreground via-foreground/90 to-muted-foreground pb-1">
|
| 89 |
+
{t("securityTitle")}
|
| 90 |
+
</h2>
|
| 91 |
+
<p className="max-w-2xl mx-auto text-sm md:text-base text-muted-foreground font-mono">
|
| 92 |
+
{t("securitySubtitle")}
|
| 93 |
+
</p>
|
| 94 |
+
</div>
|
| 95 |
+
|
| 96 |
+
<motion.div
|
| 97 |
+
variants={containerVariants}
|
| 98 |
+
initial="hidden"
|
| 99 |
+
whileInView="visible"
|
| 100 |
+
viewport={{ once: true, margin: "-100px" }}
|
| 101 |
+
className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"
|
| 102 |
+
>
|
| 103 |
+
{securityBadges.map((badge, index) => {
|
| 104 |
+
const Icon = badge.icon;
|
| 105 |
+
return (
|
| 106 |
+
<motion.div
|
| 107 |
+
key={index}
|
| 108 |
+
variants={itemVariants}
|
| 109 |
+
className="group relative p-6 border border-border bg-secondary/5 dark:bg-background/20 backdrop-blur-md rounded-xl [clip-path:polygon(15px_0,100%_0,100%_calc(100%_-_15px),calc(100%_-_15px)_100%,0_100%,0_15px)] hover:border-primary/25 transition-all duration-300 shadow-sm"
|
| 110 |
+
>
|
| 111 |
+
{/* Tech Bracket */}
|
| 112 |
+
<div className="absolute top-0 left-0 w-4 h-4 border-t border-l border-muted-foreground/20 dark:border-white/10 group-hover:border-primary/45 transition-colors" />
|
| 113 |
+
<div className="absolute bottom-0 right-0 w-4 h-4 border-b border-r border-muted-foreground/20 dark:border-white/10 group-hover:border-primary/45 transition-colors" />
|
| 114 |
+
|
| 115 |
+
<div className="flex items-start gap-4">
|
| 116 |
+
<div className="p-3 rounded border border-muted-foreground/20 dark:border-white/10 bg-muted/40 dark:bg-white/5 text-primary group-hover:border-primary/30 group-hover:bg-primary/5 transition-all duration-300">
|
| 117 |
+
<Icon className="w-6 h-6" />
|
| 118 |
+
</div>
|
| 119 |
+
<div className="space-y-1.5">
|
| 120 |
+
<h3 className="font-bold text-sm text-foreground tracking-wide group-hover:text-primary transition-colors">
|
| 121 |
+
{t(badge.titleKey)}
|
| 122 |
+
</h3>
|
| 123 |
+
<p className="text-xs text-muted-foreground leading-relaxed font-mono">
|
| 124 |
+
{t(badge.descKey)}
|
| 125 |
+
</p>
|
| 126 |
+
</div>
|
| 127 |
+
</div>
|
| 128 |
+
</motion.div>
|
| 129 |
+
);
|
| 130 |
+
})}
|
| 131 |
+
</motion.div>
|
| 132 |
+
</section>
|
| 133 |
+
|
| 134 |
+
{/* Founders / Team Section */}
|
| 135 |
+
<section className="space-y-14">
|
| 136 |
+
<div className="text-center space-y-4">
|
| 137 |
+
<div className="inline-flex items-center rounded-full border border-primary/20 bg-primary/5 px-4 py-1.5 text-sm font-medium text-primary backdrop-blur-sm shadow-sm font-mono">
|
| 138 |
+
<Fingerprint className="w-3.5 h-3.5 me-2 animate-pulse" />
|
| 139 |
+
<span>{t("sysFounders")}</span>
|
| 140 |
+
</div>
|
| 141 |
+
<h2 className="text-3xl font-extrabold tracking-tight sm:text-5xl bg-clip-text text-transparent bg-gradient-to-br from-foreground via-foreground/90 to-muted-foreground pb-1">
|
| 142 |
+
{t("teamTitle")}
|
| 143 |
+
</h2>
|
| 144 |
+
<p className="max-w-2xl mx-auto text-sm md:text-base text-muted-foreground font-mono">
|
| 145 |
+
{t("teamSubtitle")}
|
| 146 |
+
</p>
|
| 147 |
+
</div>
|
| 148 |
+
|
| 149 |
+
<div className="flex flex-col sm:flex-row justify-center gap-12 sm:gap-20 max-w-3xl mx-auto">
|
| 150 |
+
{founders.map((founder, index) => (
|
| 151 |
+
<motion.div
|
| 152 |
+
key={index}
|
| 153 |
+
initial={{ opacity: 0, y: 30 }}
|
| 154 |
+
whileInView={{ opacity: 1, y: 0 }}
|
| 155 |
+
viewport={{ once: true, margin: "-100px" }}
|
| 156 |
+
transition={{ duration: 0.6, delay: index * 0.2 }}
|
| 157 |
+
className="flex-1 flex flex-col items-center text-center space-y-4 group"
|
| 158 |
+
>
|
| 159 |
+
{/* Profile Avatar Frame */}
|
| 160 |
+
<div className="relative w-24 h-24 flex items-center justify-center border border-muted-foreground/20 dark:border-white/10 rounded bg-secondary/10 shadow-lg group-hover:border-primary/40 transition-colors duration-300">
|
| 161 |
+
{/* corner tech decorations */}
|
| 162 |
+
<div className="absolute top-1 left-1 w-2 h-2 bg-muted-foreground/30 dark:bg-white/20 rounded-full group-hover:bg-primary/45 transition-colors" />
|
| 163 |
+
<div className="absolute bottom-1 right-1 w-2 h-2 bg-muted-foreground/30 dark:bg-white/20 rounded-full group-hover:bg-primary/45 transition-colors" />
|
| 164 |
+
<span className="font-fast-hand text-4xl text-primary mt-1 shadow-[0_0_15px_rgba(var(--primary-rgb),0.3)]">
|
| 165 |
+
{founder.avatar}
|
| 166 |
+
</span>
|
| 167 |
+
</div>
|
| 168 |
+
|
| 169 |
+
<div className="space-y-1">
|
| 170 |
+
<h3 className="text-lg font-bold text-foreground">{founder.name}</h3>
|
| 171 |
+
<p className="text-xs text-primary font-mono uppercase font-semibold">
|
| 172 |
+
{t(founder.roleKey)}
|
| 173 |
+
</p>
|
| 174 |
+
<p className="text-xs text-muted-foreground font-mono mt-2">
|
| 175 |
+
{t(founder.bioKey)}
|
| 176 |
+
</p>
|
| 177 |
+
</div>
|
| 178 |
+
|
| 179 |
+
{/* Social links */}
|
| 180 |
+
<div className="flex gap-3 pt-2">
|
| 181 |
+
<a
|
| 182 |
+
href={founder.github}
|
| 183 |
+
target="_blank"
|
| 184 |
+
rel="noopener noreferrer"
|
| 185 |
+
className="p-1.5 rounded border border-border bg-muted/40 dark:bg-white/5 hover:border-primary/40 hover:text-primary transition-all duration-200 flex items-center justify-center"
|
| 186 |
+
aria-label={`${founder.name}'s GitHub`}
|
| 187 |
+
>
|
| 188 |
+
<svg className="w-4 h-4 fill-current" viewBox="0 0 24 24" aria-hidden="true">
|
| 189 |
+
<path fillRule="evenodd" clipRule="evenodd" d="M12 2C6.477 2 2 6.477 2 12c0 4.42 2.87 8.17 6.84 9.5.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34-.46-1.16-1.11-1.47-1.11-1.47-.9-.62.07-.6.07-.6 1 .07 1.53 1.03 1.53 1.03.9 1.52 2.34 1.07 2.91.83.09-.65.35-1.09.63-1.34-2.22-.25-4.55-1.11-4.55-4.92 0-1.11.38-2 1.03-2.71-.1-.25-.45-1.29.1-2.64 0 0 .84-.27 2.75 1.02.79-.22 1.65-.33 2.5-.33.85 0 1.71.11 2.5.33 1.91-1.29 2.75-1.02 2.75-1.02.55 1.35.2 2.39.1 2.64.65.71 1.03 1.6 1.03 2.71 0 3.82-2.34 4.66-4.57 4.91.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0012 2z" />
|
| 190 |
+
</svg>
|
| 191 |
+
</a>
|
| 192 |
+
<a
|
| 193 |
+
href={founder.twitter}
|
| 194 |
+
target="_blank"
|
| 195 |
+
rel="noopener noreferrer"
|
| 196 |
+
className="p-1.5 rounded border border-border bg-muted/40 dark:bg-white/5 hover:border-primary/40 hover:text-primary transition-all duration-200 flex items-center justify-center"
|
| 197 |
+
aria-label={`${founder.name}'s Twitter`}
|
| 198 |
+
>
|
| 199 |
+
<svg className="w-4 h-4 fill-current" viewBox="0 0 24 24" aria-hidden="true">
|
| 200 |
+
<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />
|
| 201 |
+
</svg>
|
| 202 |
+
</a>
|
| 203 |
+
</div>
|
| 204 |
+
</motion.div>
|
| 205 |
+
))}
|
| 206 |
+
</div>
|
| 207 |
+
</section>
|
| 208 |
+
</div>
|
| 209 |
+
);
|
| 210 |
+
}
|
components/WaitlistSocialProofTicker.tsx
CHANGED
|
@@ -3,8 +3,10 @@
|
|
| 3 |
import React, { useState, useEffect } from "react";
|
| 4 |
import { motion, AnimatePresence } from "framer-motion";
|
| 5 |
import { X, ArrowRight } from "lucide-react";
|
|
|
|
| 6 |
|
| 7 |
export function WaitlistSocialProofTicker() {
|
|
|
|
| 8 |
const [isVisible, setIsVisible] = useState(false);
|
| 9 |
const [isDismissed, setIsDismissed] = useState(false);
|
| 10 |
const [queueCount, setQueueCount] = useState(2147);
|
|
@@ -61,14 +63,22 @@ export function WaitlistSocialProofTicker() {
|
|
| 61 |
|
| 62 |
{/* Event Content */}
|
| 63 |
<div className="flex items-center gap-2 sm:gap-3 overflow-hidden text-ellipsis whitespace-nowrap">
|
| 64 |
-
<span className="text-amber-400 font-bold uppercase tracking-widest text-[9px] sm:text-[10px]">
|
| 65 |
<span className="text-white/45">•</span>
|
| 66 |
<span className="text-zinc-300 font-medium">
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
</span>
|
| 69 |
<span className="hidden sm:inline text-white/45">•</span>
|
| 70 |
<span className="hidden sm:flex items-center gap-1.5 text-amber-400/80 font-semibold group-hover:text-amber-400 transition-colors">
|
| 71 |
-
|
| 72 |
</span>
|
| 73 |
</div>
|
| 74 |
|
|
@@ -80,7 +90,7 @@ export function WaitlistSocialProofTicker() {
|
|
| 80 |
setTimeout(() => setIsDismissed(true), 500);
|
| 81 |
}}
|
| 82 |
className="ml-auto text-zinc-500 hover:text-white transition-colors p-1 rounded-full cursor-pointer focus:outline-none focus:ring-1 focus:ring-amber-500 shrink-0"
|
| 83 |
-
aria-label="
|
| 84 |
>
|
| 85 |
<X className="w-3.5 h-3.5" />
|
| 86 |
</button>
|
|
|
|
| 3 |
import React, { useState, useEffect } from "react";
|
| 4 |
import { motion, AnimatePresence } from "framer-motion";
|
| 5 |
import { X, ArrowRight } from "lucide-react";
|
| 6 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 7 |
|
| 8 |
export function WaitlistSocialProofTicker() {
|
| 9 |
+
const { t, language } = useLanguage();
|
| 10 |
const [isVisible, setIsVisible] = useState(false);
|
| 11 |
const [isDismissed, setIsDismissed] = useState(false);
|
| 12 |
const [queueCount, setQueueCount] = useState(2147);
|
|
|
|
| 63 |
|
| 64 |
{/* Event Content */}
|
| 65 |
<div className="flex items-center gap-2 sm:gap-3 overflow-hidden text-ellipsis whitespace-nowrap">
|
| 66 |
+
<span className="text-amber-400 font-bold uppercase tracking-widest text-[9px] sm:text-[10px]">{t("tickerLive")}</span>
|
| 67 |
<span className="text-white/45">•</span>
|
| 68 |
<span className="text-zinc-300 font-medium">
|
| 69 |
+
{language === "ar" ? (
|
| 70 |
+
<>
|
| 71 |
+
هناك <span className="font-bold text-white">{queueCount.toLocaleString()}</span> {t("tickerDevelopers")}
|
| 72 |
+
</>
|
| 73 |
+
) : (
|
| 74 |
+
<>
|
| 75 |
+
<span className="font-bold text-white">{queueCount.toLocaleString()}</span> {t("tickerDevelopers")}
|
| 76 |
+
</>
|
| 77 |
+
)}
|
| 78 |
</span>
|
| 79 |
<span className="hidden sm:inline text-white/45">•</span>
|
| 80 |
<span className="hidden sm:flex items-center gap-1.5 text-amber-400/80 font-semibold group-hover:text-amber-400 transition-colors">
|
| 81 |
+
{t("tickerClaim")} <ArrowRight className="w-3 h-3 transition-transform group-hover:translate-x-0.5 rtl:rotate-180" />
|
| 82 |
</span>
|
| 83 |
</div>
|
| 84 |
|
|
|
|
| 90 |
setTimeout(() => setIsDismissed(true), 500);
|
| 91 |
}}
|
| 92 |
className="ml-auto text-zinc-500 hover:text-white transition-colors p-1 rounded-full cursor-pointer focus:outline-none focus:ring-1 focus:ring-amber-500 shrink-0"
|
| 93 |
+
aria-label={t("tickerDismiss")}
|
| 94 |
>
|
| 95 |
<X className="w-3.5 h-3.5" />
|
| 96 |
</button>
|
components/comparison-table.tsx
CHANGED
|
@@ -1,53 +1,16 @@
|
|
| 1 |
"use client";
|
| 2 |
|
| 3 |
import { Check, X } from "lucide-react";
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
| 6 |
-
feature: string;
|
| 7 |
-
directApi: {
|
| 8 |
-
text: string;
|
| 9 |
-
supported: boolean;
|
| 10 |
-
};
|
| 11 |
-
hubApi: {
|
| 12 |
-
text: string;
|
| 13 |
-
supported: boolean;
|
| 14 |
-
};
|
| 15 |
-
}
|
| 16 |
-
|
| 17 |
-
const COMPARISON_DATA: ComparisonRow[] = [
|
| 18 |
-
{
|
| 19 |
-
feature: "Multi-Model Intelligent Routing",
|
| 20 |
-
directApi: { text: "Manual switch logic", supported: false },
|
| 21 |
-
hubApi: { text: "AI-driven automatic optimal routing", supported: true },
|
| 22 |
-
},
|
| 23 |
-
{
|
| 24 |
-
feature: "LLM Cost Savings",
|
| 25 |
-
directApi: { text: "0% (pay standard provider rates)", supported: false },
|
| 26 |
-
hubApi: { text: "Average 40% savings via compression & routing", supported: true },
|
| 27 |
-
},
|
| 28 |
-
{
|
| 29 |
-
feature: "Failover & Fallback Redundancy",
|
| 30 |
-
directApi: { text: "Manual try-catch (minutes of downtime)", supported: false },
|
| 31 |
-
hubApi: { text: "Sub-millisecond secure cross-provider routing", supported: true },
|
| 32 |
-
},
|
| 33 |
-
{
|
| 34 |
-
feature: "PII & Compliance Redaction",
|
| 35 |
-
directApi: { text: "Self-built regex/API layers", supported: false },
|
| 36 |
-
hubApi: { text: "Zero-trust built-in PII shield & audit compliance", supported: true },
|
| 37 |
-
},
|
| 38 |
-
{
|
| 39 |
-
feature: "Observability & Latency Audits",
|
| 40 |
-
directApi: { text: "Fragmented logs across interfaces", supported: false },
|
| 41 |
-
hubApi: { text: "Visual timeline, token counts, & cost breakdowns", supported: true },
|
| 42 |
-
},
|
| 43 |
-
{
|
| 44 |
-
feature: "Security & Fine-Grained API Keys",
|
| 45 |
-
directApi: { text: "Root developer keys shared", supported: false },
|
| 46 |
-
hubApi: { text: "Scoped keys with budget caps & time limits", supported: true },
|
| 47 |
-
},
|
| 48 |
-
];
|
| 49 |
|
| 50 |
export function ComparisonTable() {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
return (
|
| 52 |
<section className="relative z-10 w-full max-w-5xl mx-auto px-4 md:px-6 py-20 md:py-28">
|
| 53 |
{/* Decorative top grid */}
|
|
@@ -55,52 +18,67 @@ export function ComparisonTable() {
|
|
| 55 |
|
| 56 |
<div className="text-center space-y-5 mb-14">
|
| 57 |
<div className="inline-flex items-center rounded-full border border-primary/20 bg-primary/5 px-4 py-1.5 text-sm font-medium text-primary backdrop-blur-sm shadow-sm">
|
| 58 |
-
<span className="relative flex h-2 w-2 mr-2.5">
|
| 59 |
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"></span>
|
| 60 |
<span className="relative inline-flex rounded-full h-2 w-2 bg-primary"></span>
|
| 61 |
</span>
|
| 62 |
-
|
| 63 |
</div>
|
| 64 |
<h2 className="text-3xl font-normal tracking-tight sm:text-5xl bg-clip-text text-transparent bg-gradient-to-br from-foreground via-foreground/90 to-muted-foreground pb-1">
|
| 65 |
-
|
| 66 |
</h2>
|
| 67 |
<p className="max-w-2xl mx-auto text-base text-muted-foreground font-mono text-sm">
|
| 68 |
-
|
| 69 |
</p>
|
| 70 |
</div>
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
{/* Comparison Grid Table */}
|
| 73 |
<div className="inverted-card w-full overflow-hidden border border-[var(--card-contrast-border)] rounded-2xl backdrop-blur-md shadow-[var(--menu-shadow)] transition-all duration-300">
|
| 74 |
<div className="w-full overflow-x-auto">
|
| 75 |
-
<table className="w-full border-collapse text-
|
| 76 |
<thead>
|
| 77 |
<tr className="border-b border-border bg-muted/50">
|
| 78 |
-
<th className="py-5 px-6 font-bold text-foreground uppercase tracking-wider">
|
| 79 |
-
<th className="py-5 px-6 font-bold text-muted-foreground uppercase tracking-wider w-1/3">
|
| 80 |
-
<th className="py-5 px-6 font-bold text-primary uppercase tracking-wider w-1/3 bg-primary/10">
|
| 81 |
</tr>
|
| 82 |
</thead>
|
| 83 |
<tbody>
|
| 84 |
-
{
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
</tbody>
|
| 105 |
</table>
|
| 106 |
</div>
|
|
@@ -108,3 +86,4 @@ export function ComparisonTable() {
|
|
| 108 |
</section>
|
| 109 |
);
|
| 110 |
}
|
|
|
|
|
|
| 1 |
"use client";
|
| 2 |
|
| 3 |
import { Check, X } from "lucide-react";
|
| 4 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 5 |
+
import { translations } from "@/lib/languages";
|
| 6 |
|
| 7 |
+
type TranslationKeys = keyof typeof translations.en;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
export function ComparisonTable() {
|
| 10 |
+
const { t, language } = useLanguage();
|
| 11 |
+
|
| 12 |
+
const rowIndices = [1, 2, 3, 4, 5, 6];
|
| 13 |
+
|
| 14 |
return (
|
| 15 |
<section className="relative z-10 w-full max-w-5xl mx-auto px-4 md:px-6 py-20 md:py-28">
|
| 16 |
{/* Decorative top grid */}
|
|
|
|
| 18 |
|
| 19 |
<div className="text-center space-y-5 mb-14">
|
| 20 |
<div className="inline-flex items-center rounded-full border border-primary/20 bg-primary/5 px-4 py-1.5 text-sm font-medium text-primary backdrop-blur-sm shadow-sm">
|
| 21 |
+
<span className="relative flex h-2 w-2 mr-2.5 rtl:mr-0 rtl:ml-2.5">
|
| 22 |
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"></span>
|
| 23 |
<span className="relative inline-flex rounded-full h-2 w-2 bg-primary"></span>
|
| 24 |
</span>
|
| 25 |
+
{t("compBadge")}
|
| 26 |
</div>
|
| 27 |
<h2 className="text-3xl font-normal tracking-tight sm:text-5xl bg-clip-text text-transparent bg-gradient-to-br from-foreground via-foreground/90 to-muted-foreground pb-1">
|
| 28 |
+
{t("compTitle")}<span className="font-display italic text-primary text-glow">{t("compTitleHighlighted")}</span>
|
| 29 |
</h2>
|
| 30 |
<p className="max-w-2xl mx-auto text-base text-muted-foreground font-mono text-sm">
|
| 31 |
+
{t("compSubtitle")}
|
| 32 |
</p>
|
| 33 |
</div>
|
| 34 |
|
| 35 |
+
{/* Mobile Scroll Swipe Indicator */}
|
| 36 |
+
<div className="md:hidden flex justify-center items-center gap-1.5 text-[9px] text-muted-foreground/60 mb-3 font-mono uppercase tracking-widest animate-pulse select-none" aria-hidden="true">
|
| 37 |
+
<span>{language === "ar" ? "← اسحب الجدول أفقياً للمزيد →" : "← Swipe table horizontally to see more →"}</span>
|
| 38 |
+
</div>
|
| 39 |
+
|
| 40 |
{/* Comparison Grid Table */}
|
| 41 |
<div className="inverted-card w-full overflow-hidden border border-[var(--card-contrast-border)] rounded-2xl backdrop-blur-md shadow-[var(--menu-shadow)] transition-all duration-300">
|
| 42 |
<div className="w-full overflow-x-auto">
|
| 43 |
+
<table className="w-full border-collapse text-start font-mono text-xs md:text-sm">
|
| 44 |
<thead>
|
| 45 |
<tr className="border-b border-border bg-muted/50">
|
| 46 |
+
<th scope="col" className="py-5 px-6 font-bold text-foreground uppercase tracking-wider text-start">{t("compThFeatures")}</th>
|
| 47 |
+
<th scope="col" className="py-5 px-6 font-bold text-muted-foreground uppercase tracking-wider w-1/3 text-start">{t("compThDirect")}</th>
|
| 48 |
+
<th scope="col" className="py-5 px-6 font-bold text-primary uppercase tracking-wider w-1/3 bg-primary/10 text-start">{t("compThHub")}</th>
|
| 49 |
</tr>
|
| 50 |
</thead>
|
| 51 |
<tbody>
|
| 52 |
+
{rowIndices.map((num, idx) => {
|
| 53 |
+
const featureKey = `compRow${num}F` as TranslationKeys;
|
| 54 |
+
const directKey = `compRow${num}Direct` as TranslationKeys;
|
| 55 |
+
const hubKey = `compRow${num}Hub` as TranslationKeys;
|
| 56 |
+
|
| 57 |
+
const feature = t(featureKey);
|
| 58 |
+
const directText = t(directKey);
|
| 59 |
+
const hubText = t(hubKey);
|
| 60 |
+
|
| 61 |
+
return (
|
| 62 |
+
<tr
|
| 63 |
+
key={idx}
|
| 64 |
+
className="border-b border-border hover:bg-primary/[0.03] transition-colors duration-200 group"
|
| 65 |
+
>
|
| 66 |
+
<td className="py-5 px-6 font-medium text-foreground group-hover:text-primary transition-colors duration-200 text-start">{feature}</td>
|
| 67 |
+
<td className="py-5 px-6 text-muted-foreground tabular-nums text-start">
|
| 68 |
+
<div className="flex items-center gap-2">
|
| 69 |
+
<X className="h-4 w-4 text-rose-500/80 filter drop-shadow-[0_0_3px_rgba(244,63,94,0.4)] shrink-0" />
|
| 70 |
+
<span>{directText}</span>
|
| 71 |
+
</div>
|
| 72 |
+
</td>
|
| 73 |
+
<td className="py-5 px-6 text-foreground font-semibold bg-primary/[0.01] tabular-nums text-start">
|
| 74 |
+
<div className="flex items-center gap-2">
|
| 75 |
+
<Check className="h-4 w-4 text-primary shrink-0 filter drop-shadow-[0_0_6px_var(--primary-glow)]" />
|
| 76 |
+
<span className="text-foreground">{hubText}</span>
|
| 77 |
+
</div>
|
| 78 |
+
</td>
|
| 79 |
+
</tr>
|
| 80 |
+
);
|
| 81 |
+
})}
|
| 82 |
</tbody>
|
| 83 |
</table>
|
| 84 |
</div>
|
|
|
|
| 86 |
</section>
|
| 87 |
);
|
| 88 |
}
|
| 89 |
+
|
components/faq-accordion.tsx
CHANGED
|
@@ -3,68 +3,56 @@
|
|
| 3 |
import { useState } from "react";
|
| 4 |
import { motion, AnimatePresence } from "framer-motion";
|
| 5 |
import { ChevronDown } from "lucide-react";
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
|
| 8 |
-
question: string;
|
| 9 |
-
answer: string;
|
| 10 |
-
}
|
| 11 |
-
|
| 12 |
-
const FAQS: FaqItem[] = [
|
| 13 |
-
{
|
| 14 |
-
question: "How does HUBAPI intelligent routing actually work?",
|
| 15 |
-
answer: "Our neural core dynamically routes every API call. It benchmarks models in real-time, evaluating their semantic difficulty, target latency, and cost guidelines. Lightweight questions route to faster, highly efficient models, while complex logical requests route to advanced intelligence grids—saving costs without reducing quality.",
|
| 16 |
-
},
|
| 17 |
-
{
|
| 18 |
-
question: "Is my API key and corporate prompt data secure?",
|
| 19 |
-
answer: "Completely. Your primary model keys are fully encrypted at rest inside secure, dedicated Hardware Security Modules (HSMs). HUBAPI enforces a strict zero-retention policy: inputs and outputs are piped securely to providers and never stored on our servers unless explicitly requested by your compliance configuration.",
|
| 20 |
-
},
|
| 21 |
-
{
|
| 22 |
-
question: "Does routing through a gateway add network latency?",
|
| 23 |
-
answer: "No. Our global gateway mesh is deployed across multi-region edge centers. Total network overhead is under 12ms—a cost that is heavily offset by the intelligent routing, which regularly selects models that respond hundreds of milliseconds faster than standard defaults.",
|
| 24 |
-
},
|
| 25 |
-
{
|
| 26 |
-
question: "What happens if a primary provider goes offline?",
|
| 27 |
-
answer: "HUBAPI includes instantaneous automatic failover routing. If a provider experiences an outage, routes are immediately shifted within sub-milliseconds to secondary models of matching caliber (e.g., swapping to a sibling model or secondary region) to guarantee 100% uptime.",
|
| 28 |
-
},
|
| 29 |
-
{
|
| 30 |
-
question: "Can we self-host the gateway inside our custom VPC?",
|
| 31 |
-
answer: "Yes. Enterprise customers can deploy containerized instances of the HUBAPI gateway directly within their private AWS, GCP, or Azure environments, ensuring all data boundaries remain strictly inside your sovereign secure network.",
|
| 32 |
-
},
|
| 33 |
-
{
|
| 34 |
-
question: "How long does it take to integrate HUBAPI?",
|
| 35 |
-
answer: "Under five minutes. Integration requires changing only two lines of code: redirecting your SDK base URL to the HUBAPI gateway and authenticating with your newly issued scoped key. No major code refactoring is needed.",
|
| 36 |
-
},
|
| 37 |
-
];
|
| 38 |
|
| 39 |
export function FAQAccordion() {
|
|
|
|
| 40 |
const [activeIndex, setActiveIndex] = useState<number | null>(null);
|
| 41 |
|
| 42 |
const toggleIndex = (idx: number) => {
|
| 43 |
setActiveIndex(activeIndex === idx ? null : idx);
|
| 44 |
};
|
| 45 |
|
|
|
|
|
|
|
| 46 |
return (
|
| 47 |
<section className="relative z-10 w-full max-w-4xl mx-auto px-4 md:px-6 py-20 md:py-28">
|
| 48 |
<div className="text-center space-y-5 mb-16">
|
| 49 |
<div className="inline-flex items-center rounded-full border border-primary/20 bg-primary/5 px-4 py-1.5 text-sm font-medium text-primary backdrop-blur-sm shadow-sm">
|
| 50 |
-
<span className="relative flex h-2 w-2 mr-2.5">
|
| 51 |
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"></span>
|
| 52 |
<span className="relative inline-flex rounded-full h-2 w-2 bg-primary"></span>
|
| 53 |
</span>
|
| 54 |
-
|
| 55 |
</div>
|
| 56 |
<h2 className="text-3xl font-normal tracking-tight sm:text-5xl bg-clip-text text-transparent bg-gradient-to-br from-foreground via-foreground/90 to-muted-foreground pb-1">
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
</h2>
|
| 59 |
<p className="max-w-2xl mx-auto text-base text-muted-foreground font-mono text-sm">
|
| 60 |
-
|
| 61 |
</p>
|
| 62 |
</div>
|
| 63 |
|
| 64 |
{/* Accordion List */}
|
| 65 |
<div className="space-y-4">
|
| 66 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
const isOpen = activeIndex === idx;
|
|
|
|
| 68 |
return (
|
| 69 |
<div
|
| 70 |
key={idx}
|
|
@@ -75,11 +63,14 @@ export function FAQAccordion() {
|
|
| 75 |
}`}
|
| 76 |
>
|
| 77 |
<button
|
|
|
|
| 78 |
type="button"
|
| 79 |
onClick={() => toggleIndex(idx)}
|
| 80 |
-
|
|
|
|
|
|
|
| 81 |
>
|
| 82 |
-
<span className="font-medium tracking-tight">{
|
| 83 |
<ChevronDown
|
| 84 |
className={`h-4 w-4 text-muted-foreground shrink-0 transition-transform duration-300 ${
|
| 85 |
isOpen ? "rotate-180 text-primary" : ""
|
|
@@ -90,6 +81,9 @@ export function FAQAccordion() {
|
|
| 90 |
<AnimatePresence initial={false}>
|
| 91 |
{isOpen && (
|
| 92 |
<motion.div
|
|
|
|
|
|
|
|
|
|
| 93 |
initial={{ height: 0, opacity: 0 }}
|
| 94 |
animate={{ height: "auto", opacity: 1 }}
|
| 95 |
exit={{ height: 0, opacity: 0 }}
|
|
@@ -97,7 +91,7 @@ export function FAQAccordion() {
|
|
| 97 |
className="overflow-hidden"
|
| 98 |
>
|
| 99 |
<div className="px-6 pb-6 pt-0 font-sans text-sm text-muted-foreground leading-relaxed">
|
| 100 |
-
<p>{
|
| 101 |
</div>
|
| 102 |
</motion.div>
|
| 103 |
)}
|
|
@@ -109,3 +103,4 @@ export function FAQAccordion() {
|
|
| 109 |
</section>
|
| 110 |
);
|
| 111 |
}
|
|
|
|
|
|
| 3 |
import { useState } from "react";
|
| 4 |
import { motion, AnimatePresence } from "framer-motion";
|
| 5 |
import { ChevronDown } from "lucide-react";
|
| 6 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 7 |
+
import { translations } from "@/lib/languages";
|
| 8 |
|
| 9 |
+
type TranslationKeys = keyof typeof translations.en;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
export function FAQAccordion() {
|
| 12 |
+
const { t, language } = useLanguage();
|
| 13 |
const [activeIndex, setActiveIndex] = useState<number | null>(null);
|
| 14 |
|
| 15 |
const toggleIndex = (idx: number) => {
|
| 16 |
setActiveIndex(activeIndex === idx ? null : idx);
|
| 17 |
};
|
| 18 |
|
| 19 |
+
const faqIndices = [1, 2, 3, 4, 5, 6];
|
| 20 |
+
|
| 21 |
return (
|
| 22 |
<section className="relative z-10 w-full max-w-4xl mx-auto px-4 md:px-6 py-20 md:py-28">
|
| 23 |
<div className="text-center space-y-5 mb-16">
|
| 24 |
<div className="inline-flex items-center rounded-full border border-primary/20 bg-primary/5 px-4 py-1.5 text-sm font-medium text-primary backdrop-blur-sm shadow-sm">
|
| 25 |
+
<span className="relative flex h-2 w-2 mr-2.5 rtl:mr-0 rtl:ml-2.5">
|
| 26 |
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"></span>
|
| 27 |
<span className="relative inline-flex rounded-full h-2 w-2 bg-primary"></span>
|
| 28 |
</span>
|
| 29 |
+
{t("faqBadge")}
|
| 30 |
</div>
|
| 31 |
<h2 className="text-3xl font-normal tracking-tight sm:text-5xl bg-clip-text text-transparent bg-gradient-to-br from-foreground via-foreground/90 to-muted-foreground pb-1">
|
| 32 |
+
{language === "ar" ? (
|
| 33 |
+
<>
|
| 34 |
+
الأسئلة الشائعة <span className="font-display italic text-primary text-glow">والمجاب عنها</span>
|
| 35 |
+
</>
|
| 36 |
+
) : (
|
| 37 |
+
<>
|
| 38 |
+
Frequently <span className="font-display italic text-primary text-glow">Answered Questions</span>
|
| 39 |
+
</>
|
| 40 |
+
)}
|
| 41 |
</h2>
|
| 42 |
<p className="max-w-2xl mx-auto text-base text-muted-foreground font-mono text-sm">
|
| 43 |
+
{t("faqSubtitleAccordions")}
|
| 44 |
</p>
|
| 45 |
</div>
|
| 46 |
|
| 47 |
{/* Accordion List */}
|
| 48 |
<div className="space-y-4">
|
| 49 |
+
{faqIndices.map((num, idx) => {
|
| 50 |
+
const questionKey = `faqAccordion${num}Q` as TranslationKeys;
|
| 51 |
+
const answerKey = `faqAccordion${num}A` as TranslationKeys;
|
| 52 |
+
const question = t(questionKey);
|
| 53 |
+
const answer = t(answerKey);
|
| 54 |
const isOpen = activeIndex === idx;
|
| 55 |
+
|
| 56 |
return (
|
| 57 |
<div
|
| 58 |
key={idx}
|
|
|
|
| 63 |
}`}
|
| 64 |
>
|
| 65 |
<button
|
| 66 |
+
id={`faq-btn-${idx}`}
|
| 67 |
type="button"
|
| 68 |
onClick={() => toggleIndex(idx)}
|
| 69 |
+
aria-expanded={isOpen}
|
| 70 |
+
aria-controls={`faq-panel-${idx}`}
|
| 71 |
+
className="w-full flex items-center justify-between text-start p-6 font-sans text-sm md:text-base text-foreground hover:text-primary transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 rounded-xl select-none"
|
| 72 |
>
|
| 73 |
+
<span className="font-medium tracking-tight">{question}</span>
|
| 74 |
<ChevronDown
|
| 75 |
className={`h-4 w-4 text-muted-foreground shrink-0 transition-transform duration-300 ${
|
| 76 |
isOpen ? "rotate-180 text-primary" : ""
|
|
|
|
| 81 |
<AnimatePresence initial={false}>
|
| 82 |
{isOpen && (
|
| 83 |
<motion.div
|
| 84 |
+
id={`faq-panel-${idx}`}
|
| 85 |
+
role="region"
|
| 86 |
+
aria-labelledby={`faq-btn-${idx}`}
|
| 87 |
initial={{ height: 0, opacity: 0 }}
|
| 88 |
animate={{ height: "auto", opacity: 1 }}
|
| 89 |
exit={{ height: 0, opacity: 0 }}
|
|
|
|
| 91 |
className="overflow-hidden"
|
| 92 |
>
|
| 93 |
<div className="px-6 pb-6 pt-0 font-sans text-sm text-muted-foreground leading-relaxed">
|
| 94 |
+
<p>{answer}</p>
|
| 95 |
</div>
|
| 96 |
</motion.div>
|
| 97 |
)}
|
|
|
|
| 103 |
</section>
|
| 104 |
);
|
| 105 |
}
|
| 106 |
+
|
components/footer.tsx
CHANGED
|
@@ -1,8 +1,11 @@
|
|
| 1 |
"use client";
|
| 2 |
|
| 3 |
import Link from "next/link";
|
|
|
|
| 4 |
|
| 5 |
export function Footer() {
|
|
|
|
|
|
|
| 6 |
return (
|
| 7 |
<footer className="relative w-full bg-transparent py-16 md:py-24 z-10 overflow-hidden">
|
| 8 |
{/* Premium Top Gradient Border */}
|
|
@@ -24,10 +27,10 @@ export function Footer() {
|
|
| 24 |
<div className="absolute w-1 h-1 bg-muted-foreground/40 rounded-full bottom-1 left-1"></div>
|
| 25 |
<div className="absolute w-2 h-0.5 bg-muted-foreground/40 bottom-1 right-1"></div>
|
| 26 |
</div>
|
| 27 |
-
<span className="font-fast-hand tracking-wider text-2xl text-foreground mt-0.5">
|
| 28 |
</Link>
|
| 29 |
<p className="font-mono text-xs text-muted-foreground leading-relaxed">
|
| 30 |
-
|
| 31 |
</p>
|
| 32 |
{/* Social Icons */}
|
| 33 |
<div className="flex items-center gap-4">
|
|
@@ -63,42 +66,42 @@ export function Footer() {
|
|
| 63 |
|
| 64 |
{/* Column 2: Platform */}
|
| 65 |
<div className="space-y-4 font-mono text-xs">
|
| 66 |
-
<h3 className="font-semibold text-foreground uppercase tracking-widest text-[10px] text-primary/80">{
|
| 67 |
<ul className="space-y-3 text-muted-foreground">
|
| 68 |
-
<li><Link href="#" className="hover:text-foreground transition-colors">
|
| 69 |
-
<li><Link href="#" className="hover:text-foreground transition-colors">
|
| 70 |
-
<li><Link href="#" className="hover:text-foreground transition-colors">
|
| 71 |
-
<li><Link href="#" className="hover:text-foreground transition-colors">
|
| 72 |
</ul>
|
| 73 |
</div>
|
| 74 |
|
| 75 |
{/* Column 3: Resources */}
|
| 76 |
<div className="space-y-4 font-mono text-xs">
|
| 77 |
-
<h3 className="font-semibold text-foreground uppercase tracking-widest text-[10px] text-primary/80">{
|
| 78 |
<ul className="space-y-3 text-muted-foreground">
|
| 79 |
-
<li><Link href="#" className="hover:text-foreground transition-colors">
|
| 80 |
-
<li><Link href="#" className="hover:text-foreground transition-colors">
|
| 81 |
-
<li><Link href="#" className="hover:text-foreground transition-colors">
|
| 82 |
-
<li><Link href="#" className="hover:text-foreground transition-colors">
|
| 83 |
</ul>
|
| 84 |
</div>
|
| 85 |
|
| 86 |
{/* Column 4: Security & Compliance */}
|
| 87 |
<div className="space-y-4 font-mono text-xs">
|
| 88 |
-
<h3 className="font-semibold text-foreground uppercase tracking-widest text-[10px] text-primary/80">{
|
| 89 |
<ul className="space-y-3 text-muted-foreground">
|
| 90 |
-
<li><Link href="#" className="hover:text-foreground transition-colors">
|
| 91 |
-
<li><Link href="#" className="hover:text-foreground transition-colors">
|
| 92 |
-
<li><Link href="#" className="hover:text-foreground transition-colors">
|
| 93 |
-
<li><Link href="#" className="hover:text-foreground transition-colors">
|
| 94 |
</ul>
|
| 95 |
</div>
|
| 96 |
</div>
|
| 97 |
|
| 98 |
{/* Pre-launch marketing notice */}
|
| 99 |
-
<div className="mb-8 p-4 rounded-lg border border-primary/10 bg-card/30 dark:bg-card/20 backdrop-blur-sm text-[10px] leading-relaxed text-muted-foreground
|
| 100 |
-
<span className="text-primary/90 font-bold block mb-1">{
|
| 101 |
-
|
| 102 |
</div>
|
| 103 |
|
| 104 |
{/* Divider line */}
|
|
@@ -107,13 +110,13 @@ export function Footer() {
|
|
| 107 |
{/* Bottom Bar */}
|
| 108 |
<div className="flex flex-col md:flex-row items-center justify-between gap-4 font-mono text-[10px] text-muted-foreground">
|
| 109 |
<div className="flex items-center gap-6">
|
| 110 |
-
<span>© {new Date().getFullYear()}
|
| 111 |
-
<Link href="#" className="hover:text-foreground transition-colors">
|
| 112 |
-
<Link href="#" className="hover:text-foreground transition-colors">
|
| 113 |
</div>
|
| 114 |
<div className="flex items-center gap-2 border border-primary/20 bg-primary/5 px-2.5 py-1 rounded-full text-primary">
|
| 115 |
<span className="w-1.5 h-1.5 bg-primary rounded-full animate-pulse shadow-[0_0_8px_var(--primary-glow)]" />
|
| 116 |
-
<span className="font-bold tracking-wider uppercase">
|
| 117 |
</div>
|
| 118 |
</div>
|
| 119 |
</div>
|
|
|
|
| 1 |
"use client";
|
| 2 |
|
| 3 |
import Link from "next/link";
|
| 4 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 5 |
|
| 6 |
export function Footer() {
|
| 7 |
+
const { t } = useLanguage();
|
| 8 |
+
|
| 9 |
return (
|
| 10 |
<footer className="relative w-full bg-transparent py-16 md:py-24 z-10 overflow-hidden">
|
| 11 |
{/* Premium Top Gradient Border */}
|
|
|
|
| 27 |
<div className="absolute w-1 h-1 bg-muted-foreground/40 rounded-full bottom-1 left-1"></div>
|
| 28 |
<div className="absolute w-2 h-0.5 bg-muted-foreground/40 bottom-1 right-1"></div>
|
| 29 |
</div>
|
| 30 |
+
<span className="font-fast-hand tracking-wider text-2xl text-foreground mt-0.5">{t("logo")}</span>
|
| 31 |
</Link>
|
| 32 |
<p className="font-mono text-xs text-muted-foreground leading-relaxed">
|
| 33 |
+
{t("footerBrandDesc")}
|
| 34 |
</p>
|
| 35 |
{/* Social Icons */}
|
| 36 |
<div className="flex items-center gap-4">
|
|
|
|
| 66 |
|
| 67 |
{/* Column 2: Platform */}
|
| 68 |
<div className="space-y-4 font-mono text-xs">
|
| 69 |
+
<h3 className="font-semibold text-foreground uppercase tracking-widest text-[10px] text-primary/80">{`// ${t("footerPlatform")}`}</h3>
|
| 70 |
<ul className="space-y-3 text-muted-foreground">
|
| 71 |
+
<li><Link href="#" className="hover:text-foreground transition-colors">{t("footerPlatformCLI")}</Link></li>
|
| 72 |
+
<li><Link href="#" className="hover:text-foreground transition-colors">{t("footerPlatformMesh")}</Link></li>
|
| 73 |
+
<li><Link href="#" className="hover:text-foreground transition-colors">{t("footerPlatformAccess")}</Link></li>
|
| 74 |
+
<li><Link href="#" className="hover:text-foreground transition-colors">{t("footerPlatformSandbox")}</Link></li>
|
| 75 |
</ul>
|
| 76 |
</div>
|
| 77 |
|
| 78 |
{/* Column 3: Resources */}
|
| 79 |
<div className="space-y-4 font-mono text-xs">
|
| 80 |
+
<h3 className="font-semibold text-foreground uppercase tracking-widest text-[10px] text-primary/80">{`// ${t("footerResources")}`}</h3>
|
| 81 |
<ul className="space-y-3 text-muted-foreground">
|
| 82 |
+
<li><Link href="#" className="hover:text-foreground transition-colors">{t("footerDoc")}</Link></li>
|
| 83 |
+
<li><Link href="#" className="hover:text-foreground transition-colors">{t("footerSystemStatus")}</Link></li>
|
| 84 |
+
<li><Link href="#" className="hover:text-foreground transition-colors">{t("footerApiRef")}</Link></li>
|
| 85 |
+
<li><Link href="#" className="hover:text-foreground transition-colors">{t("footerFaq")}</Link></li>
|
| 86 |
</ul>
|
| 87 |
</div>
|
| 88 |
|
| 89 |
{/* Column 4: Security & Compliance */}
|
| 90 |
<div className="space-y-4 font-mono text-xs">
|
| 91 |
+
<h3 className="font-semibold text-foreground uppercase tracking-widest text-[10px] text-primary/80">{`// ${t("footerSecurity")}`}</h3>
|
| 92 |
<ul className="space-y-3 text-muted-foreground">
|
| 93 |
+
<li><Link href="#" className="hover:text-foreground transition-colors">{t("footerSoc2")}</Link></li>
|
| 94 |
+
<li><Link href="#" className="hover:text-foreground transition-colors">{t("footerPii")}</Link></li>
|
| 95 |
+
<li><Link href="#" className="hover:text-foreground transition-colors">{t("footerVulnerability")}</Link></li>
|
| 96 |
+
<li><Link href="#" className="hover:text-foreground transition-colors">{t("footerResidency")}</Link></li>
|
| 97 |
</ul>
|
| 98 |
</div>
|
| 99 |
</div>
|
| 100 |
|
| 101 |
{/* Pre-launch marketing notice */}
|
| 102 |
+
<div className="mb-8 p-4 rounded-lg border border-primary/10 bg-card/30 dark:bg-card/20 backdrop-blur-sm text-[10px] leading-relaxed text-muted-foreground font-mono">
|
| 103 |
+
<span className="text-primary/90 font-bold block mb-1">{`// ${t("footerNoticeTitle")}`}</span>
|
| 104 |
+
{t("footerNoticeText")}
|
| 105 |
</div>
|
| 106 |
|
| 107 |
{/* Divider line */}
|
|
|
|
| 110 |
{/* Bottom Bar */}
|
| 111 |
<div className="flex flex-col md:flex-row items-center justify-between gap-4 font-mono text-[10px] text-muted-foreground">
|
| 112 |
<div className="flex items-center gap-6">
|
| 113 |
+
<span>© {new Date().getFullYear()} {t("logo")} Inc. {t("allRightsReserved")}</span>
|
| 114 |
+
<Link href="#" className="hover:text-foreground transition-colors">{t("privacyPolicy")}</Link>
|
| 115 |
+
<Link href="#" className="hover:text-foreground transition-colors">{t("termsOfService")}</Link>
|
| 116 |
</div>
|
| 117 |
<div className="flex items-center gap-2 border border-primary/20 bg-primary/5 px-2.5 py-1 rounded-full text-primary">
|
| 118 |
<span className="w-1.5 h-1.5 bg-primary rounded-full animate-pulse shadow-[0_0_8px_var(--primary-glow)]" />
|
| 119 |
+
<span className="font-bold tracking-wider uppercase">{t("statusConnected")}</span>
|
| 120 |
</div>
|
| 121 |
</div>
|
| 122 |
</div>
|
components/header.tsx
CHANGED
|
@@ -3,8 +3,12 @@
|
|
| 3 |
import { motion } from "framer-motion";
|
| 4 |
import Link from "next/link";
|
| 5 |
import { ThemeToggle } from "@/components/ThemeToggle";
|
|
|
|
|
|
|
| 6 |
|
| 7 |
export function Header() {
|
|
|
|
|
|
|
| 8 |
return (
|
| 9 |
<motion.header
|
| 10 |
initial={{ y: -100, opacity: 0, x: "-50%" }}
|
|
@@ -26,16 +30,17 @@ export function Header() {
|
|
| 26 |
<div className="absolute w-1 h-1 bg-muted-foreground/40 rounded-full bottom-1 left-1"></div>
|
| 27 |
<div className="absolute w-2 h-0.5 bg-muted-foreground/40 bottom-1 right-1"></div>
|
| 28 |
</div>
|
| 29 |
-
<span className="font-fast-hand tracking-wider text-2xl text-foreground mt-0.5">
|
| 30 |
</Link>
|
| 31 |
|
| 32 |
{/* Status Area */}
|
| 33 |
<div className="flex items-center gap-3 text-xs font-mono">
|
| 34 |
-
<span className="hidden sm:inline-block text-muted-foreground tracking-widest uppercase">
|
| 35 |
-
<div className="flex items-center justify-center h-5 px-2 rounded-full border border-primary/30 bg-primary/10">
|
| 36 |
<span className="w-1.5 h-1.5 bg-primary rounded-full animate-pulse mr-2 shadow-[0_0_8px_var(--primary-glow)]"></span>
|
| 37 |
-
<span className="text-primary text-[10px] tracking-wider uppercase font-bold">
|
| 38 |
</div>
|
|
|
|
| 39 |
<ThemeToggle />
|
| 40 |
</div>
|
| 41 |
</nav>
|
|
|
|
| 3 |
import { motion } from "framer-motion";
|
| 4 |
import Link from "next/link";
|
| 5 |
import { ThemeToggle } from "@/components/ThemeToggle";
|
| 6 |
+
import { LanguageToggle } from "@/components/LanguageToggle";
|
| 7 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 8 |
|
| 9 |
export function Header() {
|
| 10 |
+
const { t } = useLanguage();
|
| 11 |
+
|
| 12 |
return (
|
| 13 |
<motion.header
|
| 14 |
initial={{ y: -100, opacity: 0, x: "-50%" }}
|
|
|
|
| 30 |
<div className="absolute w-1 h-1 bg-muted-foreground/40 rounded-full bottom-1 left-1"></div>
|
| 31 |
<div className="absolute w-2 h-0.5 bg-muted-foreground/40 bottom-1 right-1"></div>
|
| 32 |
</div>
|
| 33 |
+
<span className="font-fast-hand tracking-wider text-2xl text-foreground mt-0.5">{t("logo")}</span>
|
| 34 |
</Link>
|
| 35 |
|
| 36 |
{/* Status Area */}
|
| 37 |
<div className="flex items-center gap-3 text-xs font-mono">
|
| 38 |
+
<span className="hidden sm:inline-block text-muted-foreground tracking-widest uppercase">{t("preLaunch")}</span>
|
| 39 |
+
<div className="flex items-center justify-center h-5 px-2.5 rounded-full border border-primary/30 bg-primary/10">
|
| 40 |
<span className="w-1.5 h-1.5 bg-primary rounded-full animate-pulse mr-2 shadow-[0_0_8px_var(--primary-glow)]"></span>
|
| 41 |
+
<span className="text-primary text-[10px] tracking-wider uppercase font-bold">{t("online")}</span>
|
| 42 |
</div>
|
| 43 |
+
<LanguageToggle />
|
| 44 |
<ThemeToggle />
|
| 45 |
</div>
|
| 46 |
</nav>
|
components/hero-section.tsx
CHANGED
|
@@ -6,15 +6,47 @@ import Image from "next/image";
|
|
| 6 |
import { WaitlistForm } from "./waitlist-form";
|
| 7 |
import { DiaTextReveal } from "./ui/dia-text-reveal";
|
| 8 |
import { AgentParticleCanvas } from "./AgentParticleCanvas";
|
|
|
|
| 9 |
|
| 10 |
export function HeroSection() {
|
| 11 |
const reducedMotion = useReducedMotion();
|
|
|
|
|
|
|
| 12 |
const [isDesktop, setIsDesktop] = useState(false);
|
| 13 |
const [mounted, setMounted] = useState(false);
|
| 14 |
const [timeStr, setTimeStr] = useState("");
|
| 15 |
const [robotHovered, setRobotHovered] = useState(false);
|
| 16 |
const [rawMouse, setRawMouse] = useState({ x: 0, y: 0 });
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
// Check viewport for applying interactive parallax vs mobile float
|
| 19 |
useEffect(() => {
|
| 20 |
const checkViewport = () => {
|
|
@@ -41,6 +73,8 @@ export function HeroSection() {
|
|
| 41 |
};
|
| 42 |
}, []);
|
| 43 |
|
|
|
|
|
|
|
| 44 |
// Parallax motion values
|
| 45 |
const mouseX = useMotionValue(0);
|
| 46 |
const mouseY = useMotionValue(0);
|
|
@@ -108,11 +142,25 @@ export function HeroSection() {
|
|
| 108 |
className="origin-left h-px w-full bg-gradient-to-r from-primary/60 via-primary/30 to-transparent"
|
| 109 |
></motion.div>
|
| 110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 111 |
<motion.div
|
| 112 |
initial={{ y: 40, opacity: 0 }}
|
| 113 |
animate={{ y: 0, opacity: 1 }}
|
| 114 |
transition={{ duration: 0.6, delay: 0.2, ease: "easeOut" }}
|
| 115 |
-
className="mt-
|
| 116 |
>
|
| 117 |
<h1 className="font-fast-hand text-[clamp(3.25rem,14vw,5.25rem)] lg:text-[clamp(3.9rem,4.8vw,5.5rem)] leading-none tracking-normal text-foreground">
|
| 118 |
<DiaTextReveal
|
|
@@ -127,12 +175,12 @@ export function HeroSection() {
|
|
| 127 |
initial={{ y: 30, opacity: 0 }}
|
| 128 |
animate={{ y: 0, opacity: 1 }}
|
| 129 |
transition={{ duration: 0.6, delay: 0.4, ease: "easeOut" }}
|
| 130 |
-
className="relative"
|
| 131 |
>
|
| 132 |
{/* Decorative vertical blueprint tag */}
|
| 133 |
<div className="absolute -left-5 top-0 bottom-0 w-[2px] bg-primary/20 rounded-full hidden md:block" aria-hidden="true" />
|
| 134 |
<p className="mt-6 max-w-xl text-sm md:text-base text-muted-foreground leading-relaxed font-mono">
|
| 135 |
-
|
| 136 |
</p>
|
| 137 |
</motion.div>
|
| 138 |
|
|
@@ -166,10 +214,6 @@ export function HeroSection() {
|
|
| 166 |
>
|
| 167 |
<div className="relative w-[350px] h-[350px] md:w-[500px] md:h-[500px] lg:w-[600px] lg:h-[600px] xl:w-[700px] xl:h-[700px] translate-x-[10%] lg:translate-x-[5%] pointer-events-none">
|
| 168 |
|
| 169 |
-
|
| 170 |
-
{/* Cybernetic HUD Floating Glass Panels removed as requested */}
|
| 171 |
-
|
| 172 |
-
|
| 173 |
<motion.div
|
| 174 |
className="w-full h-full relative flex items-center justify-center"
|
| 175 |
style={{
|
|
@@ -180,7 +224,6 @@ export function HeroSection() {
|
|
| 180 |
transformStyle: "preserve-3d"
|
| 181 |
}}
|
| 182 |
>
|
| 183 |
-
{/* Holographic orbital rings, boxes & reticles removed as requested to let the neural grid mesh shine through */}
|
| 184 |
<div className="absolute inset-0 pointer-events-none flex items-center justify-center" aria-hidden="true">
|
| 185 |
{/* Dynamic theme-consistent ambient glow behind the robot, justifying its rim lights */}
|
| 186 |
<div className="absolute w-[60%] h-[60%] bg-gradient-to-tr from-cyan-500/15 via-indigo-500/10 to-transparent blur-3xl pointer-events-none" />
|
|
@@ -200,13 +243,13 @@ export function HeroSection() {
|
|
| 200 |
<div className="absolute bottom-[33.5%] left-[43.5%] -translate-x-1/2 w-24 h-44 pointer-events-none overflow-visible flex flex-col items-center z-0" aria-hidden="true">
|
| 201 |
{/* Intense Plasma Core Glow (Cyan/White matching eyes/core) */}
|
| 202 |
<motion.div
|
| 203 |
-
animate={{
|
| 204 |
scaleY: [0.85, 1.35, 0.85],
|
| 205 |
scaleX: [0.95, 1.15, 0.95],
|
| 206 |
opacity: [0.85, 1, 0.85],
|
| 207 |
}}
|
| 208 |
-
transition={{
|
| 209 |
-
duration: 0.
|
| 210 |
repeat: Infinity,
|
| 211 |
ease: "easeInOut",
|
| 212 |
}}
|
|
@@ -215,12 +258,12 @@ export function HeroSection() {
|
|
| 215 |
|
| 216 |
{/* Hot cyan/blue ionization core directly at the nozzle */}
|
| 217 |
<motion.div
|
| 218 |
-
animate={{
|
| 219 |
scale: [0.9, 1.25, 0.9],
|
| 220 |
opacity: [0.9, 1, 0.9],
|
| 221 |
}}
|
| 222 |
-
transition={{
|
| 223 |
-
duration: 0.
|
| 224 |
repeat: Infinity,
|
| 225 |
ease: "easeInOut",
|
| 226 |
}}
|
|
@@ -229,12 +272,12 @@ export function HeroSection() {
|
|
| 229 |
|
| 230 |
{/* Massive outer thermal halo */}
|
| 231 |
<motion.div
|
| 232 |
-
animate={{
|
| 233 |
opacity: [0.4, 0.7, 0.4],
|
| 234 |
scale: [0.95, 1.05, 0.95],
|
| 235 |
}}
|
| 236 |
-
transition={{
|
| 237 |
-
duration: 0.
|
| 238 |
repeat: Infinity,
|
| 239 |
ease: "easeInOut",
|
| 240 |
}}
|
|
@@ -242,31 +285,33 @@ export function HeroSection() {
|
|
| 242 |
/>
|
| 243 |
|
| 244 |
{/* Spark particles */}
|
| 245 |
-
|
| 246 |
-
<
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
|
|
|
|
|
|
| 257 |
</div>
|
| 258 |
|
| 259 |
{/* Right Thruster - Advanced Plasma Ion Drive */}
|
| 260 |
<div className="absolute bottom-[34.5%] left-[56.5%] -translate-x-1/2 w-24 h-44 pointer-events-none overflow-visible flex flex-col items-center z-0" aria-hidden="true">
|
| 261 |
{/* Intense Plasma Core Glow (Cyan/White matching eyes/core) */}
|
| 262 |
<motion.div
|
| 263 |
-
animate={{
|
| 264 |
scaleY: [0.85, 1.35, 0.85],
|
| 265 |
scaleX: [0.95, 1.15, 0.95],
|
| 266 |
opacity: [0.85, 1, 0.85],
|
| 267 |
}}
|
| 268 |
-
transition={{
|
| 269 |
-
duration: 0.
|
| 270 |
repeat: Infinity,
|
| 271 |
ease: "easeInOut",
|
| 272 |
}}
|
|
@@ -275,12 +320,12 @@ export function HeroSection() {
|
|
| 275 |
|
| 276 |
{/* Hot cyan/blue ionization core directly at the nozzle */}
|
| 277 |
<motion.div
|
| 278 |
-
animate={{
|
| 279 |
scale: [0.9, 1.25, 0.9],
|
| 280 |
opacity: [0.9, 1, 0.9],
|
| 281 |
}}
|
| 282 |
-
transition={{
|
| 283 |
-
duration: 0.
|
| 284 |
repeat: Infinity,
|
| 285 |
ease: "easeInOut",
|
| 286 |
}}
|
|
@@ -289,12 +334,12 @@ export function HeroSection() {
|
|
| 289 |
|
| 290 |
{/* Massive outer thermal halo */}
|
| 291 |
<motion.div
|
| 292 |
-
animate={{
|
| 293 |
opacity: [0.4, 0.7, 0.4],
|
| 294 |
scale: [0.95, 1.05, 0.95],
|
| 295 |
}}
|
| 296 |
-
transition={{
|
| 297 |
-
duration: 0.
|
| 298 |
repeat: Infinity,
|
| 299 |
ease: "easeInOut",
|
| 300 |
}}
|
|
@@ -302,18 +347,20 @@ export function HeroSection() {
|
|
| 302 |
/>
|
| 303 |
|
| 304 |
{/* Spark particles */}
|
| 305 |
-
|
| 306 |
-
<
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
|
|
|
|
|
|
| 317 |
</div>
|
| 318 |
|
| 319 |
<Image
|
|
@@ -328,11 +375,11 @@ export function HeroSection() {
|
|
| 328 |
{/* Dynamic cyan/violet bottom reflection from the plasma thrusters, masked to the robot's silhouette */}
|
| 329 |
<motion.div
|
| 330 |
className="absolute inset-0 pointer-events-none z-20 mix-blend-color-dodge"
|
| 331 |
-
animate={{
|
| 332 |
opacity: [0.65, 0.85, 0.65],
|
| 333 |
}}
|
| 334 |
-
transition={{
|
| 335 |
-
duration: 0.
|
| 336 |
repeat: Infinity,
|
| 337 |
ease: "easeInOut",
|
| 338 |
}}
|
|
|
|
| 6 |
import { WaitlistForm } from "./waitlist-form";
|
| 7 |
import { DiaTextReveal } from "./ui/dia-text-reveal";
|
| 8 |
import { AgentParticleCanvas } from "./AgentParticleCanvas";
|
| 9 |
+
import { useLanguage } from "./LanguageContext";
|
| 10 |
|
| 11 |
export function HeroSection() {
|
| 12 |
const reducedMotion = useReducedMotion();
|
| 13 |
+
const { t } = useLanguage();
|
| 14 |
+
const [variant, setVariant] = useState<"classic" | "intelligence">("classic");
|
| 15 |
const [isDesktop, setIsDesktop] = useState(false);
|
| 16 |
const [mounted, setMounted] = useState(false);
|
| 17 |
const [timeStr, setTimeStr] = useState("");
|
| 18 |
const [robotHovered, setRobotHovered] = useState(false);
|
| 19 |
const [rawMouse, setRawMouse] = useState({ x: 0, y: 0 });
|
| 20 |
|
| 21 |
+
// Determine A/B test variant on client mount
|
| 22 |
+
useEffect(() => {
|
| 23 |
+
const init = setTimeout(() => {
|
| 24 |
+
let savedVariant = localStorage.getItem("hubapi_hero_variant") as "classic" | "intelligence" | null;
|
| 25 |
+
|
| 26 |
+
// Fallback: check cookie as well
|
| 27 |
+
if (!savedVariant && typeof document !== "undefined") {
|
| 28 |
+
const match = document.cookie.match(/(^|;)\s*hubapi_hero_variant\s*=\s*([^;]+)/);
|
| 29 |
+
if (match) {
|
| 30 |
+
savedVariant = match[2] as "classic" | "intelligence";
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
if (!savedVariant) {
|
| 35 |
+
// 50/50 randomization
|
| 36 |
+
const selected = Math.random() < 0.5 ? "classic" : "intelligence";
|
| 37 |
+
localStorage.setItem("hubapi_hero_variant", selected);
|
| 38 |
+
if (typeof document !== "undefined") {
|
| 39 |
+
document.cookie = `hubapi_hero_variant=${selected}; path=/; max-age=${60 * 60 * 24 * 365}`;
|
| 40 |
+
}
|
| 41 |
+
savedVariant = selected;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
setVariant(savedVariant);
|
| 45 |
+
}, 0);
|
| 46 |
+
|
| 47 |
+
return () => clearTimeout(init);
|
| 48 |
+
}, []);
|
| 49 |
+
|
| 50 |
// Check viewport for applying interactive parallax vs mobile float
|
| 51 |
useEffect(() => {
|
| 52 |
const checkViewport = () => {
|
|
|
|
| 73 |
};
|
| 74 |
}, []);
|
| 75 |
|
| 76 |
+
const disableThrusters = !!reducedMotion || (mounted && !isDesktop);
|
| 77 |
+
|
| 78 |
// Parallax motion values
|
| 79 |
const mouseX = useMotionValue(0);
|
| 80 |
const mouseY = useMotionValue(0);
|
|
|
|
| 142 |
className="origin-left h-px w-full bg-gradient-to-r from-primary/60 via-primary/30 to-transparent"
|
| 143 |
></motion.div>
|
| 144 |
|
| 145 |
+
{/* A/B Test Variant Badge */}
|
| 146 |
+
<motion.div
|
| 147 |
+
initial={{ y: 20, opacity: 0 }}
|
| 148 |
+
animate={{ y: 0, opacity: 1 }}
|
| 149 |
+
transition={{ duration: 0.6, delay: 0.1 }}
|
| 150 |
+
className="inline-flex items-center rounded-full border border-primary/20 bg-primary/5 px-3 py-1 text-[9px] font-mono tracking-wider text-primary backdrop-blur-sm mt-6 mb-2 select-none"
|
| 151 |
+
>
|
| 152 |
+
<span className="relative flex h-1.5 w-1.5 mr-2">
|
| 153 |
+
<span className="animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75"></span>
|
| 154 |
+
<span className="relative inline-flex rounded-full h-1.5 w-1.5 bg-primary"></span>
|
| 155 |
+
</span>
|
| 156 |
+
{variant === "classic" ? t("heroBadge") : t("heroBadgeIntel")}
|
| 157 |
+
</motion.div>
|
| 158 |
+
|
| 159 |
<motion.div
|
| 160 |
initial={{ y: 40, opacity: 0 }}
|
| 161 |
animate={{ y: 0, opacity: 1 }}
|
| 162 |
transition={{ duration: 0.6, delay: 0.2, ease: "easeOut" }}
|
| 163 |
+
className="mt-4 min-h-[72px] md:min-h-[120px]"
|
| 164 |
>
|
| 165 |
<h1 className="font-fast-hand text-[clamp(3.25rem,14vw,5.25rem)] lg:text-[clamp(3.9rem,4.8vw,5.5rem)] leading-none tracking-normal text-foreground">
|
| 166 |
<DiaTextReveal
|
|
|
|
| 175 |
initial={{ y: 30, opacity: 0 }}
|
| 176 |
animate={{ y: 0, opacity: 1 }}
|
| 177 |
transition={{ duration: 0.6, delay: 0.4, ease: "easeOut" }}
|
| 178 |
+
className="relative w-full"
|
| 179 |
>
|
| 180 |
{/* Decorative vertical blueprint tag */}
|
| 181 |
<div className="absolute -left-5 top-0 bottom-0 w-[2px] bg-primary/20 rounded-full hidden md:block" aria-hidden="true" />
|
| 182 |
<p className="mt-6 max-w-xl text-sm md:text-base text-muted-foreground leading-relaxed font-mono">
|
| 183 |
+
{variant === "classic" ? t("heroSubtitle") : t("heroSubtitleIntel")}
|
| 184 |
</p>
|
| 185 |
</motion.div>
|
| 186 |
|
|
|
|
| 214 |
>
|
| 215 |
<div className="relative w-[350px] h-[350px] md:w-[500px] md:h-[500px] lg:w-[600px] lg:h-[600px] xl:w-[700px] xl:h-[700px] translate-x-[10%] lg:translate-x-[5%] pointer-events-none">
|
| 216 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 217 |
<motion.div
|
| 218 |
className="w-full h-full relative flex items-center justify-center"
|
| 219 |
style={{
|
|
|
|
| 224 |
transformStyle: "preserve-3d"
|
| 225 |
}}
|
| 226 |
>
|
|
|
|
| 227 |
<div className="absolute inset-0 pointer-events-none flex items-center justify-center" aria-hidden="true">
|
| 228 |
{/* Dynamic theme-consistent ambient glow behind the robot, justifying its rim lights */}
|
| 229 |
<div className="absolute w-[60%] h-[60%] bg-gradient-to-tr from-cyan-500/15 via-indigo-500/10 to-transparent blur-3xl pointer-events-none" />
|
|
|
|
| 243 |
<div className="absolute bottom-[33.5%] left-[43.5%] -translate-x-1/2 w-24 h-44 pointer-events-none overflow-visible flex flex-col items-center z-0" aria-hidden="true">
|
| 244 |
{/* Intense Plasma Core Glow (Cyan/White matching eyes/core) */}
|
| 245 |
<motion.div
|
| 246 |
+
animate={disableThrusters ? { scaleY: 1.1, scaleX: 1.05, opacity: 0.95 } : {
|
| 247 |
scaleY: [0.85, 1.35, 0.85],
|
| 248 |
scaleX: [0.95, 1.15, 0.95],
|
| 249 |
opacity: [0.85, 1, 0.85],
|
| 250 |
}}
|
| 251 |
+
transition={disableThrusters ? {} : {
|
| 252 |
+
duration: 0.35,
|
| 253 |
repeat: Infinity,
|
| 254 |
ease: "easeInOut",
|
| 255 |
}}
|
|
|
|
| 258 |
|
| 259 |
{/* Hot cyan/blue ionization core directly at the nozzle */}
|
| 260 |
<motion.div
|
| 261 |
+
animate={disableThrusters ? { scale: 1.1, opacity: 0.95 } : {
|
| 262 |
scale: [0.9, 1.25, 0.9],
|
| 263 |
opacity: [0.9, 1, 0.9],
|
| 264 |
}}
|
| 265 |
+
transition={disableThrusters ? {} : {
|
| 266 |
+
duration: 0.3,
|
| 267 |
repeat: Infinity,
|
| 268 |
ease: "easeInOut",
|
| 269 |
}}
|
|
|
|
| 272 |
|
| 273 |
{/* Massive outer thermal halo */}
|
| 274 |
<motion.div
|
| 275 |
+
animate={disableThrusters ? { opacity: 0.55, scale: 1 } : {
|
| 276 |
opacity: [0.4, 0.7, 0.4],
|
| 277 |
scale: [0.95, 1.05, 0.95],
|
| 278 |
}}
|
| 279 |
+
transition={disableThrusters ? {} : {
|
| 280 |
+
duration: 0.45,
|
| 281 |
repeat: Infinity,
|
| 282 |
ease: "easeInOut",
|
| 283 |
}}
|
|
|
|
| 285 |
/>
|
| 286 |
|
| 287 |
{/* Spark particles */}
|
| 288 |
+
{!disableThrusters && (
|
| 289 |
+
<div className="absolute bottom-2 flex gap-3">
|
| 290 |
+
<motion.span
|
| 291 |
+
animate={{ y: [0, 40], opacity: [1, 0], scale: [1, 0.2] }}
|
| 292 |
+
transition={{ duration: 0.65, repeat: Infinity, delay: 0.05, ease: "easeOut" }}
|
| 293 |
+
className="w-0.5 h-0.5 bg-cyan-300 rounded-full"
|
| 294 |
+
/>
|
| 295 |
+
<motion.span
|
| 296 |
+
animate={{ y: [0, 50], opacity: [1, 0], scale: [1.2, 0.1] }}
|
| 297 |
+
transition={{ duration: 0.45, repeat: Infinity, delay: 0.2, ease: "easeOut" }}
|
| 298 |
+
className="w-1.5 h-1.5 bg-indigo-400 rounded-full"
|
| 299 |
+
/>
|
| 300 |
+
</div>
|
| 301 |
+
)}
|
| 302 |
</div>
|
| 303 |
|
| 304 |
{/* Right Thruster - Advanced Plasma Ion Drive */}
|
| 305 |
<div className="absolute bottom-[34.5%] left-[56.5%] -translate-x-1/2 w-24 h-44 pointer-events-none overflow-visible flex flex-col items-center z-0" aria-hidden="true">
|
| 306 |
{/* Intense Plasma Core Glow (Cyan/White matching eyes/core) */}
|
| 307 |
<motion.div
|
| 308 |
+
animate={disableThrusters ? { scaleY: 1.1, scaleX: 1.05, opacity: 0.95 } : {
|
| 309 |
scaleY: [0.85, 1.35, 0.85],
|
| 310 |
scaleX: [0.95, 1.15, 0.95],
|
| 311 |
opacity: [0.85, 1, 0.85],
|
| 312 |
}}
|
| 313 |
+
transition={disableThrusters ? {} : {
|
| 314 |
+
duration: 0.35,
|
| 315 |
repeat: Infinity,
|
| 316 |
ease: "easeInOut",
|
| 317 |
}}
|
|
|
|
| 320 |
|
| 321 |
{/* Hot cyan/blue ionization core directly at the nozzle */}
|
| 322 |
<motion.div
|
| 323 |
+
animate={disableThrusters ? { scale: 1.1, opacity: 0.95 } : {
|
| 324 |
scale: [0.9, 1.25, 0.9],
|
| 325 |
opacity: [0.9, 1, 0.9],
|
| 326 |
}}
|
| 327 |
+
transition={disableThrusters ? {} : {
|
| 328 |
+
duration: 0.3,
|
| 329 |
repeat: Infinity,
|
| 330 |
ease: "easeInOut",
|
| 331 |
}}
|
|
|
|
| 334 |
|
| 335 |
{/* Massive outer thermal halo */}
|
| 336 |
<motion.div
|
| 337 |
+
animate={disableThrusters ? { opacity: 0.55, scale: 1 } : {
|
| 338 |
opacity: [0.4, 0.7, 0.4],
|
| 339 |
scale: [0.95, 1.05, 0.95],
|
| 340 |
}}
|
| 341 |
+
transition={disableThrusters ? {} : {
|
| 342 |
+
duration: 0.45,
|
| 343 |
repeat: Infinity,
|
| 344 |
ease: "easeInOut",
|
| 345 |
}}
|
|
|
|
| 347 |
/>
|
| 348 |
|
| 349 |
{/* Spark particles */}
|
| 350 |
+
{!disableThrusters && (
|
| 351 |
+
<div className="absolute bottom-2 flex gap-3">
|
| 352 |
+
<motion.span
|
| 353 |
+
animate={{ y: [0, 40], opacity: [1, 0], scale: [1, 0.2] }}
|
| 354 |
+
transition={{ duration: 0.7, repeat: Infinity, delay: 0.1, ease: "easeOut" }}
|
| 355 |
+
className="w-0.5 h-0.5 bg-cyan-300 rounded-full"
|
| 356 |
+
/>
|
| 357 |
+
<motion.span
|
| 358 |
+
animate={{ y: [0, 50], opacity: [1, 0], scale: [1.2, 0.1] }}
|
| 359 |
+
transition={{ duration: 0.5, repeat: Infinity, delay: 0.3, ease: "easeOut" }}
|
| 360 |
+
className="w-1.5 h-1.5 bg-indigo-400 rounded-full"
|
| 361 |
+
/>
|
| 362 |
+
</div>
|
| 363 |
+
)}
|
| 364 |
</div>
|
| 365 |
|
| 366 |
<Image
|
|
|
|
| 375 |
{/* Dynamic cyan/violet bottom reflection from the plasma thrusters, masked to the robot's silhouette */}
|
| 376 |
<motion.div
|
| 377 |
className="absolute inset-0 pointer-events-none z-20 mix-blend-color-dodge"
|
| 378 |
+
animate={disableThrusters ? { opacity: 0.75 } : {
|
| 379 |
opacity: [0.65, 0.85, 0.65],
|
| 380 |
}}
|
| 381 |
+
transition={disableThrusters ? {} : {
|
| 382 |
+
duration: 0.4,
|
| 383 |
repeat: Infinity,
|
| 384 |
ease: "easeInOut",
|
| 385 |
}}
|
components/social-proof.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
"use client";
|
| 2 |
|
| 3 |
import { Marquee } from "./ui/marquee";
|
|
|
|
| 4 |
|
| 5 |
const LOGOS = [
|
| 6 |
{
|
|
@@ -62,6 +63,8 @@ const LOGOS = [
|
|
| 62 |
];
|
| 63 |
|
| 64 |
export function SocialProof() {
|
|
|
|
|
|
|
| 65 |
return (
|
| 66 |
<section className="relative z-10 w-full py-12 md:py-16 overflow-hidden border-y border-border bg-muted/20 backdrop-blur-sm">
|
| 67 |
{/* Decorative background glow */}
|
|
@@ -70,7 +73,7 @@ export function SocialProof() {
|
|
| 70 |
<div className="max-w-7xl mx-auto px-6">
|
| 71 |
<div className="text-center mb-8 space-y-2">
|
| 72 |
<p className="text-[10px] font-mono text-primary tracking-[0.2em] uppercase">
|
| 73 |
-
{"
|
| 74 |
</p>
|
| 75 |
</div>
|
| 76 |
|
|
|
|
| 1 |
"use client";
|
| 2 |
|
| 3 |
import { Marquee } from "./ui/marquee";
|
| 4 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 5 |
|
| 6 |
const LOGOS = [
|
| 7 |
{
|
|
|
|
| 63 |
];
|
| 64 |
|
| 65 |
export function SocialProof() {
|
| 66 |
+
const { t } = useLanguage();
|
| 67 |
+
|
| 68 |
return (
|
| 69 |
<section className="relative z-10 w-full py-12 md:py-16 overflow-hidden border-y border-border bg-muted/20 backdrop-blur-sm">
|
| 70 |
{/* Decorative background glow */}
|
|
|
|
| 73 |
<div className="max-w-7xl mx-auto px-6">
|
| 74 |
<div className="text-center mb-8 space-y-2">
|
| 75 |
<p className="text-[10px] font-mono text-primary tracking-[0.2em] uppercase">
|
| 76 |
+
{t("socialProofBadge")}
|
| 77 |
</p>
|
| 78 |
</div>
|
| 79 |
|
components/ui/error-boundary.tsx
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use client";
|
| 2 |
+
|
| 3 |
+
import React, { Component, ErrorInfo, ReactNode } from "react";
|
| 4 |
+
import { AlertTriangle } from "lucide-react";
|
| 5 |
+
|
| 6 |
+
interface Props {
|
| 7 |
+
children: ReactNode;
|
| 8 |
+
fallback?: ReactNode;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
interface State {
|
| 12 |
+
hasError: boolean;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
export class ErrorBoundary extends Component<Props, State> {
|
| 16 |
+
public state: State = {
|
| 17 |
+
hasError: false
|
| 18 |
+
};
|
| 19 |
+
|
| 20 |
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
| 21 |
+
public static getDerivedStateFromError(_error: Error): State {
|
| 22 |
+
return { hasError: true };
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
public componentDidCatch(error: Error, errorInfo: ErrorInfo) {
|
| 26 |
+
console.error("Uncaught error in component boundary:", error, errorInfo);
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
public render() {
|
| 30 |
+
if (this.state.hasError) {
|
| 31 |
+
return this.props.fallback || (
|
| 32 |
+
<div className="mx-auto my-8 max-w-lg p-6 rounded-lg border border-destructive/20 bg-destructive/5 backdrop-blur-md text-center font-mono space-y-4 shadow-[0_0_30px_rgba(239,68,68,0.05)]">
|
| 33 |
+
<div className="flex justify-center text-destructive">
|
| 34 |
+
<AlertTriangle className="w-8 h-8 animate-pulse" />
|
| 35 |
+
</div>
|
| 36 |
+
<h3 className="text-xs font-bold uppercase tracking-widest text-foreground">
|
| 37 |
+
{"// RUNTIME EXCEPTION CAUGHT"}
|
| 38 |
+
</h3>
|
| 39 |
+
<p className="text-[10px] text-muted-foreground/80 leading-relaxed max-w-sm mx-auto">
|
| 40 |
+
A secure runtime isolation boundary captured an exception in this module. The rest of the platform remains online.
|
| 41 |
+
</p>
|
| 42 |
+
</div>
|
| 43 |
+
);
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
return this.props.children;
|
| 47 |
+
}
|
| 48 |
+
}
|
components/waitlist-form.tsx
CHANGED
|
@@ -1,44 +1,230 @@
|
|
| 1 |
"use client";
|
| 2 |
|
| 3 |
-
import { useState } from "react";
|
| 4 |
-
import { AlertTriangle } from "lucide-react";
|
| 5 |
import { CyberTicketModal } from "./CyberTicketModal";
|
| 6 |
import { ShimmerButton } from "@/components/ui/shimmer-button";
|
|
|
|
|
|
|
| 7 |
|
| 8 |
export function WaitlistForm() {
|
|
|
|
| 9 |
const [isSubmitting, setIsSubmitting] = useState(false);
|
| 10 |
const [isTicketOpen, setIsTicketOpen] = useState(false);
|
| 11 |
const [email, setEmail] = useState("");
|
|
|
|
| 12 |
const [error, setError] = useState<string | null>(null);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
const validateEmail = (emailStr: string) => {
|
| 15 |
const regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
| 16 |
return regex.test(emailStr);
|
| 17 |
};
|
| 18 |
|
| 19 |
-
const
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
e.preventDefault();
|
| 21 |
setError(null);
|
| 22 |
|
| 23 |
if (!email) {
|
| 24 |
-
setError("Email address is required.");
|
| 25 |
return;
|
| 26 |
}
|
| 27 |
|
| 28 |
if (!validateEmail(email)) {
|
| 29 |
-
setError("Please enter a valid email address.");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
return;
|
| 31 |
}
|
| 32 |
|
| 33 |
setIsSubmitting(true);
|
| 34 |
|
| 35 |
-
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
setIsSubmitting(false);
|
| 38 |
-
|
| 39 |
-
}, 1200);
|
| 40 |
};
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
return (
|
| 43 |
<div className="w-full flex flex-col gap-2">
|
| 44 |
<form
|
|
@@ -54,7 +240,7 @@ export function WaitlistForm() {
|
|
| 54 |
<input
|
| 55 |
id="email-input"
|
| 56 |
type="email"
|
| 57 |
-
placeholder="
|
| 58 |
autoComplete="email"
|
| 59 |
spellCheck={false}
|
| 60 |
disabled={isSubmitting}
|
|
@@ -84,11 +270,37 @@ export function WaitlistForm() {
|
|
| 84 |
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
| 85 |
</svg>
|
| 86 |
)}
|
| 87 |
-
{isSubmitting ? "
|
| 88 |
</span>
|
| 89 |
</ShimmerButton>
|
| 90 |
</form>
|
| 91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
{error && (
|
| 93 |
<div className="flex items-center gap-2 font-mono text-xs text-destructive animate-fade-in pl-1">
|
| 94 |
<AlertTriangle className="h-3.5 w-3.5 shrink-0" />
|
|
@@ -96,6 +308,10 @@ export function WaitlistForm() {
|
|
| 96 |
</div>
|
| 97 |
)}
|
| 98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
{/* Cyber Ticket Modal */}
|
| 100 |
<CyberTicketModal
|
| 101 |
isOpen={isTicketOpen}
|
|
|
|
| 1 |
"use client";
|
| 2 |
|
| 3 |
+
import { useState, useEffect } from "react";
|
| 4 |
+
import { AlertTriangle, Copy, Check } from "lucide-react";
|
| 5 |
import { CyberTicketModal } from "./CyberTicketModal";
|
| 6 |
import { ShimmerButton } from "@/components/ui/shimmer-button";
|
| 7 |
+
import { registerWaitlist } from "@/app/actions/waitlist";
|
| 8 |
+
import { useLanguage } from "@/components/LanguageContext";
|
| 9 |
|
| 10 |
export function WaitlistForm() {
|
| 11 |
+
const { t, language } = useLanguage();
|
| 12 |
const [isSubmitting, setIsSubmitting] = useState(false);
|
| 13 |
const [isTicketOpen, setIsTicketOpen] = useState(false);
|
| 14 |
const [email, setEmail] = useState("");
|
| 15 |
+
const [consent, setConsent] = useState(false);
|
| 16 |
const [error, setError] = useState<string | null>(null);
|
| 17 |
+
|
| 18 |
+
// Registration persistent states
|
| 19 |
+
const [isRegistered, setIsRegistered] = useState(false);
|
| 20 |
+
const [registeredEmail, setRegisteredEmail] = useState("");
|
| 21 |
+
const [copiedReferral, setCopiedReferral] = useState(false);
|
| 22 |
+
|
| 23 |
+
useEffect(() => {
|
| 24 |
+
const init = setTimeout(() => {
|
| 25 |
+
const registered = localStorage.getItem("hubapi_waitlist_registered") === "true";
|
| 26 |
+
const savedEmail = localStorage.getItem("hubapi_waitlist_email") || "";
|
| 27 |
+
if (registered && savedEmail) {
|
| 28 |
+
setIsRegistered(true);
|
| 29 |
+
setRegisteredEmail(savedEmail);
|
| 30 |
+
setEmail(savedEmail);
|
| 31 |
+
}
|
| 32 |
+
}, 0);
|
| 33 |
+
|
| 34 |
+
return () => clearTimeout(init);
|
| 35 |
+
}, []);
|
| 36 |
|
| 37 |
const validateEmail = (emailStr: string) => {
|
| 38 |
const regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
| 39 |
return regex.test(emailStr);
|
| 40 |
};
|
| 41 |
|
| 42 |
+
const getTicketNumber = (emailStr: string) => {
|
| 43 |
+
if (!emailStr) return "";
|
| 44 |
+
let hash = 0;
|
| 45 |
+
for (let i = 0; i < emailStr.length; i++) {
|
| 46 |
+
hash = emailStr.charCodeAt(i) + ((hash << 5) - hash);
|
| 47 |
+
}
|
| 48 |
+
const number = Math.abs(hash % 90000) + 10000;
|
| 49 |
+
return `00${number}`.slice(-6).replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
|
| 53 |
e.preventDefault();
|
| 54 |
setError(null);
|
| 55 |
|
| 56 |
if (!email) {
|
| 57 |
+
setError(language === "ar" ? "عنوان البريد الإلكتروني مطلوب." : "Email address is required.");
|
| 58 |
return;
|
| 59 |
}
|
| 60 |
|
| 61 |
if (!validateEmail(email)) {
|
| 62 |
+
setError(language === "ar" ? "يرجى إدخال عنوان بريد إلكتروني صالح." : "Please enter a valid email address.");
|
| 63 |
+
return;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
if (!consent) {
|
| 67 |
+
setError(language === "ar" ? "يجب عليك الموافقة على معالجة البيانات للمتابعة." : "You must agree to the data processing terms to proceed.");
|
| 68 |
return;
|
| 69 |
}
|
| 70 |
|
| 71 |
setIsSubmitting(true);
|
| 72 |
|
| 73 |
+
try {
|
| 74 |
+
const formData = new FormData();
|
| 75 |
+
formData.append("email", email);
|
| 76 |
+
const savedVariant = localStorage.getItem("hubapi_hero_variant") || "classic";
|
| 77 |
+
formData.append("variant", savedVariant);
|
| 78 |
+
|
| 79 |
+
const result = await registerWaitlist(formData);
|
| 80 |
+
|
| 81 |
+
if (result.success) {
|
| 82 |
+
localStorage.setItem("hubapi_waitlist_registered", "true");
|
| 83 |
+
localStorage.setItem("hubapi_waitlist_email", email);
|
| 84 |
+
setIsRegistered(true);
|
| 85 |
+
setRegisteredEmail(email);
|
| 86 |
+
setIsTicketOpen(true);
|
| 87 |
+
} else {
|
| 88 |
+
setError(result.error || (language === "ar" ? "حدث خطأ غير متوقع. يرجى المحاولة مرة أخرى." : "An error occurred. Please try again."));
|
| 89 |
+
}
|
| 90 |
+
} catch {
|
| 91 |
+
setError(language === "ar" ? "فشل الاتصال بخدمة قائمة الانتظار." : "Failed to connect to waitlist service.");
|
| 92 |
+
} finally {
|
| 93 |
setIsSubmitting(false);
|
| 94 |
+
}
|
|
|
|
| 95 |
};
|
| 96 |
|
| 97 |
+
if (isRegistered) {
|
| 98 |
+
const ticketNo = getTicketNumber(registeredEmail);
|
| 99 |
+
const referralLink = typeof window !== "undefined"
|
| 100 |
+
? `${window.location.origin}?ref=HUBAPI-${ticketNo.replace(",", "")}`
|
| 101 |
+
: `https://hubapi.dev?ref=HUBAPI-${ticketNo.replace(",", "")}`;
|
| 102 |
+
const shareText = language === "ar"
|
| 103 |
+
? `لقد حصلت للتو على وصول مبكر إلى HUBAPI @HUBAPI - بوابة الذكاء الاصطناعي العصبية! 🚀\n\nتذكرتي: #${ticketNo}\n\nسجل في قائمة الانتظار هنا:`
|
| 104 |
+
: `I just secured early access to @HUBAPI — the Neural API Gateway & AI Automation Mesh! 🚀\n\nClaimed Ticket: #${ticketNo}\n\nJoin the pre-launch waitlist here:`;
|
| 105 |
+
|
| 106 |
+
const xShareLink = `https://twitter.com/intent/tweet?text=${encodeURIComponent(shareText)}&url=${encodeURIComponent(referralLink)}`;
|
| 107 |
+
|
| 108 |
+
const handleCopyReferral = () => {
|
| 109 |
+
navigator.clipboard.writeText(referralLink);
|
| 110 |
+
setCopiedReferral(true);
|
| 111 |
+
setTimeout(() => setCopiedReferral(false), 2000);
|
| 112 |
+
};
|
| 113 |
+
|
| 114 |
+
const handleReset = () => {
|
| 115 |
+
localStorage.removeItem("hubapi_waitlist_registered");
|
| 116 |
+
localStorage.removeItem("hubapi_waitlist_email");
|
| 117 |
+
setIsRegistered(false);
|
| 118 |
+
setRegisteredEmail("");
|
| 119 |
+
setEmail("");
|
| 120 |
+
};
|
| 121 |
+
|
| 122 |
+
return (
|
| 123 |
+
<div className="w-full max-w-lg inverted-card backdrop-blur-md border border-primary/20 p-5 sm:p-6 rounded-lg text-start font-mono relative [clip-path:polygon(12px_0,100%_0,100%_calc(100%_-_12px),calc(100%_-_12px)_100%,0_100%,0_12px)]">
|
| 124 |
+
{/* Glow corner brackets */}
|
| 125 |
+
<div className="absolute top-0 left-0 w-4 h-4 border-t border-l border-primary/45" />
|
| 126 |
+
<div className="absolute top-0 right-0 w-4 h-4 border-t border-r border-primary/45" />
|
| 127 |
+
<div className="absolute bottom-0 left-0 w-4 h-4 border-b border-l border-primary/45" />
|
| 128 |
+
<div className="absolute bottom-0 right-0 w-4 h-4 border-b border-r border-primary/45" />
|
| 129 |
+
|
| 130 |
+
<div className="flex justify-between items-center mb-4 gap-2">
|
| 131 |
+
<span className="text-[10px] text-amber-500 dark:text-amber-400 tracking-widest uppercase flex items-center gap-1.5">
|
| 132 |
+
<span className="w-1.5 h-1.5 bg-emerald-500 rounded-full animate-pulse" />
|
| 133 |
+
{t("joinedWaitlist")}
|
| 134 |
+
</span>
|
| 135 |
+
<span className="text-[9px] text-muted-foreground">
|
| 136 |
+
SYS_SECURE // OK
|
| 137 |
+
</span>
|
| 138 |
+
</div>
|
| 139 |
+
|
| 140 |
+
<div className="space-y-4">
|
| 141 |
+
<div>
|
| 142 |
+
<label className="text-[9px] text-muted-foreground block mb-1">
|
| 143 |
+
{language === "ar" ? "الهوية المسجلة" : "REGISTERED_IDENTITY"}
|
| 144 |
+
</label>
|
| 145 |
+
<div className="text-sm font-bold text-foreground truncate">
|
| 146 |
+
{registeredEmail}
|
| 147 |
+
</div>
|
| 148 |
+
</div>
|
| 149 |
+
|
| 150 |
+
<div className="grid grid-cols-2 gap-3 bg-muted/40 border border-border p-3 [clip-path:polygon(6px_0,100%_0,100%_calc(100%_-_6px),calc(100%_-_6px)_100%,0_100%,0_6px)]">
|
| 151 |
+
<div>
|
| 152 |
+
<span className="text-[9px] text-muted-foreground block">{t("rank")}</span>
|
| 153 |
+
<span className="text-lg font-bold text-amber-500 dark:text-amber-400">#{ticketNo}</span>
|
| 154 |
+
</div>
|
| 155 |
+
<div>
|
| 156 |
+
<span className="text-[9px] text-muted-foreground block">{t("referralsCount")}</span>
|
| 157 |
+
<span className="text-lg font-bold text-indigo-500 dark:text-indigo-400">0</span>
|
| 158 |
+
</div>
|
| 159 |
+
</div>
|
| 160 |
+
|
| 161 |
+
<div>
|
| 162 |
+
<label className="text-[9px] text-muted-foreground block mb-1">
|
| 163 |
+
{t("referralLink")}
|
| 164 |
+
</label>
|
| 165 |
+
<div className="flex gap-2">
|
| 166 |
+
<input
|
| 167 |
+
id="referral-link-input"
|
| 168 |
+
name="referral_link"
|
| 169 |
+
aria-label={t("referralLink")}
|
| 170 |
+
type="text"
|
| 171 |
+
readOnly
|
| 172 |
+
value={referralLink}
|
| 173 |
+
className="w-full h-10 px-3 bg-background border border-border font-mono text-[10px] text-foreground outline-none focus:outline-none [clip-path:polygon(6px_0,100%_0,100%_calc(100%_-_6px),calc(100%_-_6px)_100%,0_100%,0_6px)]"
|
| 174 |
+
/>
|
| 175 |
+
<button
|
| 176 |
+
onClick={handleCopyReferral}
|
| 177 |
+
className="h-10 px-4 bg-button-bg hover:bg-button-bg/90 text-button-text text-xs font-bold transition-all duration-200 shrink-0 cursor-pointer flex items-center gap-1.5 [clip-path:polygon(6px_0,100%_0,100%_calc(100%_-_6px),calc(100%_-_6px)_100%,0_100%,0_6px)] border border-button-border"
|
| 178 |
+
>
|
| 179 |
+
{copiedReferral ? (
|
| 180 |
+
<Check className="w-3.5 h-3.5 text-emerald-500" />
|
| 181 |
+
) : (
|
| 182 |
+
<Copy className="w-3.5 h-3.5" />
|
| 183 |
+
)}
|
| 184 |
+
<span>{copiedReferral ? t("copied") : t("copyLink")}</span>
|
| 185 |
+
</button>
|
| 186 |
+
</div>
|
| 187 |
+
</div>
|
| 188 |
+
|
| 189 |
+
<div className="flex flex-col sm:flex-row gap-2 pt-2">
|
| 190 |
+
<button
|
| 191 |
+
onClick={() => setIsTicketOpen(true)}
|
| 192 |
+
className="flex-1 h-11 bg-amber-500/20 hover:bg-amber-500/30 border border-amber-500/30 text-amber-500 hover:text-amber-400 text-xs font-bold transition-all duration-200 cursor-pointer flex items-center justify-center gap-1.5 [clip-path:polygon(6px_0,100%_0,100%_calc(100%_-_6px),calc(100%_-_6px)_100%,0_100%,0_6px)]"
|
| 193 |
+
>
|
| 194 |
+
<span>{language === "ar" ? "عرض تذكرة الشبكة" : "VIEW TICKET PASS"}</span>
|
| 195 |
+
</button>
|
| 196 |
+
<a
|
| 197 |
+
href={xShareLink}
|
| 198 |
+
target="_blank"
|
| 199 |
+
rel="noopener noreferrer"
|
| 200 |
+
className="flex-1 h-11 bg-button-bg hover:bg-button-bg/90 text-button-text text-xs font-bold transition-all duration-200 cursor-pointer flex items-center justify-center gap-1.5 [clip-path:polygon(6px_0,100%_0,100%_calc(100%_-_6px),calc(100%_-_6px)_100%,0_100%,0_6px)] border border-button-border"
|
| 201 |
+
>
|
| 202 |
+
<svg className="w-3.5 h-3.5 fill-current" viewBox="0 0 24 24" aria-hidden="true">
|
| 203 |
+
<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />
|
| 204 |
+
</svg>
|
| 205 |
+
<span>{t("shareOnX")}</span>
|
| 206 |
+
</a>
|
| 207 |
+
</div>
|
| 208 |
+
|
| 209 |
+
<div className="pt-2 border-t border-border flex justify-end">
|
| 210 |
+
<button
|
| 211 |
+
onClick={handleReset}
|
| 212 |
+
className="text-[9px] text-muted-foreground hover:text-foreground transition-colors uppercase cursor-pointer"
|
| 213 |
+
>
|
| 214 |
+
{language === "ar" ? "← مغادرة والاشتراك ببريد آخر" : "← LEAVE & REGISTER ANOTHER"}
|
| 215 |
+
</button>
|
| 216 |
+
</div>
|
| 217 |
+
</div>
|
| 218 |
+
|
| 219 |
+
<CyberTicketModal
|
| 220 |
+
isOpen={isTicketOpen}
|
| 221 |
+
onClose={() => setIsTicketOpen(false)}
|
| 222 |
+
email={registeredEmail}
|
| 223 |
+
/>
|
| 224 |
+
</div>
|
| 225 |
+
);
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
return (
|
| 229 |
<div className="w-full flex flex-col gap-2">
|
| 230 |
<form
|
|
|
|
| 240 |
<input
|
| 241 |
id="email-input"
|
| 242 |
type="email"
|
| 243 |
+
placeholder={t("waitlistPlaceholder")}
|
| 244 |
autoComplete="email"
|
| 245 |
spellCheck={false}
|
| 246 |
disabled={isSubmitting}
|
|
|
|
| 270 |
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
| 271 |
</svg>
|
| 272 |
)}
|
| 273 |
+
{isSubmitting ? t("processing") : t("accessHubapi")}
|
| 274 |
</span>
|
| 275 |
</ShimmerButton>
|
| 276 |
</form>
|
| 277 |
|
| 278 |
+
{/* GDPR Consent Checkbox */}
|
| 279 |
+
<div className="flex items-start gap-2.5 mt-2 mb-1 pl-1 select-none">
|
| 280 |
+
<div className="relative flex items-center h-4 mt-0.5">
|
| 281 |
+
<input
|
| 282 |
+
id="gdpr-consent"
|
| 283 |
+
name="gdpr_consent"
|
| 284 |
+
type="checkbox"
|
| 285 |
+
checked={consent}
|
| 286 |
+
onChange={(e) => {
|
| 287 |
+
setConsent(e.target.checked);
|
| 288 |
+
if (error) setError(null);
|
| 289 |
+
}}
|
| 290 |
+
disabled={isSubmitting}
|
| 291 |
+
className="peer h-4 w-4 rounded-sm border border-black/25 dark:border-white/20 bg-white/40 dark:bg-background/40 checked:bg-primary checked:border-primary text-primary focus:ring-1 focus:ring-primary focus:ring-offset-0 outline-none cursor-pointer disabled:opacity-50"
|
| 292 |
+
/>
|
| 293 |
+
<div className="absolute inset-0 flex items-center justify-center pointer-events-none opacity-0 peer-checked:opacity-100 transition-opacity text-primary-foreground">
|
| 294 |
+
<svg className="h-2.5 w-2.5 fill-none stroke-current stroke-[3px]" viewBox="0 0 24 24">
|
| 295 |
+
<path strokeLinecap="round" strokeLinejoin="round" d="M4.5 12.75l6 6 9-13.5" />
|
| 296 |
+
</svg>
|
| 297 |
+
</div>
|
| 298 |
+
</div>
|
| 299 |
+
<label htmlFor="gdpr-consent" className="font-mono text-[10px] text-muted-foreground/75 cursor-pointer leading-tight">
|
| 300 |
+
{t("gdprConsent")}
|
| 301 |
+
</label>
|
| 302 |
+
</div>
|
| 303 |
+
|
| 304 |
{error && (
|
| 305 |
<div className="flex items-center gap-2 font-mono text-xs text-destructive animate-fade-in pl-1">
|
| 306 |
<AlertTriangle className="h-3.5 w-3.5 shrink-0" />
|
|
|
|
| 308 |
</div>
|
| 309 |
)}
|
| 310 |
|
| 311 |
+
<p className="font-mono text-[9px] text-muted-foreground/40 pl-1">
|
| 312 |
+
{t("waitlistAgreement")}
|
| 313 |
+
</p>
|
| 314 |
+
|
| 315 |
{/* Cyber Ticket Modal */}
|
| 316 |
<CyberTicketModal
|
| 317 |
isOpen={isTicketOpen}
|
data/waitlist-registrations.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"email": "dr.samirhosni@gmail.com",
|
| 4 |
+
"timestamp": "2026-05-20T19:55:13.044Z",
|
| 5 |
+
"ipHash": "eff8e7ca506627fe15dda5e0e512fcaad70b6d520f37cc76597fdb4f2d83a1a3"
|
| 6 |
+
},
|
| 7 |
+
{
|
| 8 |
+
"email": "seomax.social@gmail.com",
|
| 9 |
+
"timestamp": "2026-05-20T20:19:17.490Z",
|
| 10 |
+
"ipHash": "eff8e7ca506627fe15dda5e0e512fcaad70b6d520f37cc76597fdb4f2d83a1a3"
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"email": "dr.samirhosni@hotmail.com",
|
| 14 |
+
"timestamp": "2026-05-20T22:00:45.811Z",
|
| 15 |
+
"ipHash": "eff8e7ca506627fe15dda5e0e512fcaad70b6d520f37cc76597fdb4f2d83a1a3",
|
| 16 |
+
"variant": "classic"
|
| 17 |
+
}
|
| 18 |
+
]
|
lib/languages.ts
ADDED
|
@@ -0,0 +1,502 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export type Language = "en" | "ar";
|
| 2 |
+
|
| 3 |
+
export const translations = {
|
| 4 |
+
en: {
|
| 5 |
+
// Global Header & Common
|
| 6 |
+
logo: "HUBAPI",
|
| 7 |
+
preLaunch: "Pre-launch",
|
| 8 |
+
online: "Online",
|
| 9 |
+
offline: "Offline",
|
| 10 |
+
processing: "PROCESSING...",
|
| 11 |
+
skipToContent: "Skip to main content",
|
| 12 |
+
accessHubapi: "ACCESS_HUBAPI",
|
| 13 |
+
loading: "INITIALIZING NEURAL GATEWAY...",
|
| 14 |
+
statusConnected: "GATEWAY CONNECTED // SECURE",
|
| 15 |
+
statusSecure: "SECURE",
|
| 16 |
+
systemStatus: "System Status",
|
| 17 |
+
allRightsReserved: "All rights reserved.",
|
| 18 |
+
|
| 19 |
+
// Ambient Reading Mode & A/B test
|
| 20 |
+
ambientMode: "Ambient Mode",
|
| 21 |
+
normalMode: "Visual Effects",
|
| 22 |
+
reducedMotionNotice: "Animations minimized for legibility.",
|
| 23 |
+
|
| 24 |
+
// Sticky Countdown Banner
|
| 25 |
+
countdownTitle: "⚡ BETA GATEWAY LAUNCH COUNTDOWN:",
|
| 26 |
+
days: "D",
|
| 27 |
+
hours: "H",
|
| 28 |
+
minutes: "M",
|
| 29 |
+
seconds: "S",
|
| 30 |
+
joinedWaitlist: "YOU'RE IN THE GRID!",
|
| 31 |
+
|
| 32 |
+
// Hero Section
|
| 33 |
+
heroBadge: "INTEL_GATEWAY_V1.0 // ACTIVE",
|
| 34 |
+
heroBadgeIntel: "NEURAL_ROUTING_OS // SECURED",
|
| 35 |
+
heroTitleLine1: "One gateway.",
|
| 36 |
+
heroTitleLine2: "Every model.",
|
| 37 |
+
heroTitleLine3: "Full control.",
|
| 38 |
+
heroSubtitle: "The intelligent API gateway that routes every AI call to the fastest, cheapest model — automatically. Cut your AI costs by 40% with zero code changes.",
|
| 39 |
+
heroSubtitleIntel: "Autonomous model routing. Zero friction. Total optimization. The serverless API gateway designed to orchestrate multi-agent pipelines dynamically.",
|
| 40 |
+
waitlistPlaceholder: "name@company.com…",
|
| 41 |
+
waitlistAgreement: "// By registering, you agree to receive beta launch notifications and updates.",
|
| 42 |
+
gdprConsent: "I agree to the processing of my email under the Privacy Policy.",
|
| 43 |
+
|
| 44 |
+
// Cyber Ticket Modal
|
| 45 |
+
ticketConfirmed: "GRID ACCESS GRANTED",
|
| 46 |
+
ticketTitle: "NEURAL GATEWAY ACCESS TICKET",
|
| 47 |
+
ticketDescription: "Your identity has been registered in the Neural Grid. Share your referral link to move up in the queue and secure priority access.",
|
| 48 |
+
ticketNumber: "TICKET NO.",
|
| 49 |
+
ticketDate: "SYS_TIMESTAMP",
|
| 50 |
+
referralLink: "YOUR REFERRAL LINK",
|
| 51 |
+
copyLink: "COPY_LINK",
|
| 52 |
+
copied: "COPIED!",
|
| 53 |
+
shareOnX: "SHARE_ON_X",
|
| 54 |
+
referralStats: "YOUR REFERRAL STATS",
|
| 55 |
+
rank: "RANK",
|
| 56 |
+
referralsCount: "REFERRALS",
|
| 57 |
+
referredLabel: "Referred by",
|
| 58 |
+
|
| 59 |
+
// Exit Intent Popup
|
| 60 |
+
exitTitle: "⚡ HOLD ON, VISITOR!",
|
| 61 |
+
exitSubtitle: "You are about to miss early beta access. Register now to claim your priority ticket before early registration closes.",
|
| 62 |
+
exitButton: "SECURE_PRIORITY_ACCESS",
|
| 63 |
+
exitNoThanks: "No thanks, let me browse",
|
| 64 |
+
|
| 65 |
+
// Testimonials Section
|
| 66 |
+
testimonialsTitle: "What Developers Say",
|
| 67 |
+
testimonialsSubtitle: "Early feedback from engineers and teams orchestrating autonomous AI.",
|
| 68 |
+
testimonial1Text: "HUBAPI cut our monthly GPT-4 bill from $12K to $7.2K in one afternoon. The automatic fallback saved us during a major API outage last week.",
|
| 69 |
+
testimonial1Author: "Marcus Thorne",
|
| 70 |
+
testimonial1Role: "VP of Engineering, CloudCore",
|
| 71 |
+
testimonial2Text: "An absolute game changer for multi-agent workflows. Dynamic routing reduces latency by 35% by hitting regional models automatically.",
|
| 72 |
+
testimonial2Author: "Sarah Chen",
|
| 73 |
+
testimonial2Role: "Co-Founder, LangScale",
|
| 74 |
+
testimonial3Text: "Plugs in with one line of code. We migrated our entire enterprise pipeline to the routing mesh without rewriting a single model parser.",
|
| 75 |
+
testimonial3Author: "Amir Al-Otaibi",
|
| 76 |
+
testimonial3Role: "CTO, NeuralByte Solutions",
|
| 77 |
+
|
| 78 |
+
// Security Badges Section
|
| 79 |
+
securityTitle: "Enterprise-Grade Security",
|
| 80 |
+
securitySubtitle: "We secure your neural pipelines at every edge.",
|
| 81 |
+
badgeSoc2: "SOC 2 Type II Certified",
|
| 82 |
+
badgeSoc2Desc: "Rigorous independent audits of security controls.",
|
| 83 |
+
badgeGdpr: "GDPR Compliant",
|
| 84 |
+
badgeGdprDesc: "Complete data privacy and protection by design.",
|
| 85 |
+
badgeHipaa: "HIPAA Ready",
|
| 86 |
+
badgeHipaaDesc: "Zero-retention architecture for sensitive health data.",
|
| 87 |
+
badgeEncryption: "256-bit AES Encryption",
|
| 88 |
+
badgeEncryptionDesc: "Payloads encrypted in transit and isolated.",
|
| 89 |
+
badgeZeroRetention: "Zero Data Retention",
|
| 90 |
+
badgeZeroRetentionDesc: "We never store your prompt inputs or model outputs.",
|
| 91 |
+
|
| 92 |
+
// Team Section
|
| 93 |
+
teamTitle: "Built by Systems Engineers",
|
| 94 |
+
teamSubtitle: "Our team has scaled cloud infrastructures at world-class technology organizations.",
|
| 95 |
+
teamRole1: "Co-Founder & Systems Architect",
|
| 96 |
+
teamRole2: "Co-Founder & Infrastructure Lead",
|
| 97 |
+
exGoogle: "Ex-Google Systems",
|
| 98 |
+
exAws: "Ex-AWS Edge",
|
| 99 |
+
|
| 100 |
+
// Network Topology Map
|
| 101 |
+
mapTitle: "Neural Gateway Mesh",
|
| 102 |
+
mapSubtitle: "[Live Network Status]",
|
| 103 |
+
mapTotalRequests: "Total Dynamic Requests",
|
| 104 |
+
mapTopCountries: "Top Latency Savings",
|
| 105 |
+
mapRegionCount: "Active Routing Regions",
|
| 106 |
+
mapHoverTooltip: "Gateway: {region} | Latency: {latency}ms | Load: {load}%",
|
| 107 |
+
|
| 108 |
+
// Stats Section
|
| 109 |
+
statsRoutedRequests: "Total routed API requests",
|
| 110 |
+
statsTopTraffic: "Top countries by API traffic",
|
| 111 |
+
statsActiveGateways: "Active Neural Gateways",
|
| 112 |
+
statsActivePipelines: "Active Agent Pipelines",
|
| 113 |
+
statsActivePipelinesDesc: "The total number of active automated agent workflows and API routes deployed and managed across the HUBAPI neural edge network.",
|
| 114 |
+
statsGatewayTitle: "Neural AI Gateway",
|
| 115 |
+
statsGatewayDesc: "A unified intelligent routing layer that handles API caching, prompt safety, key rotation, and rate-limiting at < 5ms latency.",
|
| 116 |
+
statsRoutedTokens: "Routed AI Tokens",
|
| 117 |
+
statsGuardrailTitle: "AI Guardrail Interventions",
|
| 118 |
+
statsGuardrailDesc: "The HUBAPI Neural Shield monitors and blocks prompt injections, data leak vectors, and malicious API exploitation attempts at the gateway.",
|
| 119 |
+
statsPromptBlocks: "Prompt injection blocks",
|
| 120 |
+
statsPiiChallenges: "PII challenges",
|
| 121 |
+
statsPolicyActions: "Custom policy actions",
|
| 122 |
+
statsAbuseTitle: "Abuse Prevention Shield",
|
| 123 |
+
statsAbuseDesc: "Access control layers that automatically identify, rate-limit, and quarantine compromised API keys and abusive automated clients.",
|
| 124 |
+
statsKeysQuarantined: "Keys Quarantined",
|
| 125 |
+
statsRequestsVerified: "Requests Verified",
|
| 126 |
+
statsPromptCache: "Neural Prompt Cache",
|
| 127 |
+
statsPromptCacheDesc: "Cache hits represent LLM prompt responses and embeddings served directly from edge memory, saving token execution fees and speeding up workflows.",
|
| 128 |
+
statsCachedServed: "Cached API calls served",
|
| 129 |
+
|
| 130 |
+
// Live Terminal
|
| 131 |
+
terminalTitle: "Live Command Center",
|
| 132 |
+
terminalSubtitle: "Try the Neural Gateway CLI",
|
| 133 |
+
terminalDesc: "Run diagnostics, benchmark models, and simulate intelligent routing — all from the terminal.",
|
| 134 |
+
|
| 135 |
+
// FAQ Section
|
| 136 |
+
faqTitle: "Frequently Asked Questions",
|
| 137 |
+
faqSubtitle: "Got questions? We have the technical answers.",
|
| 138 |
+
faq1Q: "How does intelligent routing actually work?",
|
| 139 |
+
faq1A: "HUBAPI intercepts your standard LLM request payload, evaluates the target latency, token count, and intent of the query, and forwards it to the optimal model provider in real-time. This decision is made in sub-milliseconds at our edge nodes.",
|
| 140 |
+
faq2Q: "Do you store or log my API payloads?",
|
| 141 |
+
faq2A: "Absolutely not. HUBAPI is a pass-through zero-retention gateway. Prompt inputs, variables, and model responses are streamed in real-time and deleted from memory immediately. We comply fully with SOC 2 and GDPR protocols.",
|
| 142 |
+
faq3Q: "Can I use my existing API keys with HUBAPI?",
|
| 143 |
+
faq3A: "Yes. You can input and manage your own keys securely in the dashboard, or utilize our corporate pooled keys for volume discounts and consolidated billing.",
|
| 144 |
+
faq4Q: "What is the routing latency overhead?",
|
| 145 |
+
faq4A: "The routing calculation takes under 12 milliseconds. Our global edge mesh ensures you connect to the physically closest gateway, reducing overall network round-trip time.",
|
| 146 |
+
faq5Q: "How do fallbacks and retries behave during an outage?",
|
| 147 |
+
faq5A: "If your primary model provider (e.g., Anthropic) fails or rate-limits your key, HUBAPI automatically and instantly reroutes the query to an equivalent backup provider (e.g., Google Gemini or OpenAI) within the same capacity tier, ensuring 99.99% system uptime.",
|
| 148 |
+
|
| 149 |
+
// Footer
|
| 150 |
+
footerBrandDesc: "The neural API gateway routing agent payloads to optimal intelligence configurations in sub-milliseconds. Cut costs by 40% with zero friction.",
|
| 151 |
+
footerPlatform: "Platform",
|
| 152 |
+
footerPlatformCLI: "Neural CLI",
|
| 153 |
+
footerPlatformMesh: "Global Routing Mesh",
|
| 154 |
+
footerPlatformAccess: "Access Controls",
|
| 155 |
+
footerPlatformSandbox: "Secure Sandbox",
|
| 156 |
+
footerResources: "Resources",
|
| 157 |
+
footerDoc: "Documentation",
|
| 158 |
+
footerSystemStatus: "System Status",
|
| 159 |
+
footerApiRef: "API Reference",
|
| 160 |
+
footerFaq: "Pre-launch FAQ",
|
| 161 |
+
footerSecurity: "Security",
|
| 162 |
+
footerSoc2: "SOC 2 Compliance",
|
| 163 |
+
footerPii: "PII Redaction Shield",
|
| 164 |
+
footerVulnerability: "Vulnerability Program",
|
| 165 |
+
footerResidency: "Data Residency",
|
| 166 |
+
footerNoticeTitle: "PRE-LAUNCH PREVIEW & MARKETING NOTICE",
|
| 167 |
+
footerNoticeText: "HUBAPI is currently in its pre-launch phase. This landing page serves exclusively as a marketing showcase and waitlist registration portal to preview planned features. The official platform, live automation gateways, routing microservices, and subscription dashboards are currently under active development. Any active metrics or system status logs displayed on this preview page are highly optimized front-end simulations designed for presentation purposes.",
|
| 168 |
+
privacyPolicy: "Privacy Policy",
|
| 169 |
+
termsOfService: "Terms of Service",
|
| 170 |
+
|
| 171 |
+
// Extended FAQ
|
| 172 |
+
faqBadge: "Information Center",
|
| 173 |
+
faqTitleHighlighted: "Answered Questions",
|
| 174 |
+
faqSubtitleAccordions: "Everything you need to know about security, network latency, deployment, and system capabilities.",
|
| 175 |
+
faqAccordion1Q: "How does HUBAPI intelligent routing actually work?",
|
| 176 |
+
faqAccordion1A: "Our neural core dynamically routes every API call. It benchmarks models in real-time, evaluating their semantic difficulty, target latency, and cost guidelines. Lightweight questions route to faster, highly efficient models, while complex logical requests route to advanced intelligence grids—saving costs without reducing quality.",
|
| 177 |
+
faqAccordion2Q: "Is my API key and corporate prompt data secure?",
|
| 178 |
+
faqAccordion2A: "Completely. Your primary model keys are fully encrypted at rest inside secure, dedicated Hardware Security Modules (HSMs). HUBAPI enforces a strict zero-retention policy: inputs and outputs are piped securely to providers and never stored on our servers unless explicitly requested by your compliance configuration.",
|
| 179 |
+
faqAccordion3Q: "Does routing through a gateway add network latency?",
|
| 180 |
+
faqAccordion3A: "No. Our global gateway mesh is deployed across multi-region edge centers. Total network overhead is under 12ms—a cost that is heavily offset by the intelligent routing, which regularly selects models that respond hundreds of milliseconds faster than standard defaults.",
|
| 181 |
+
faqAccordion4Q: "What happens if a primary provider goes offline?",
|
| 182 |
+
faqAccordion4A: "HUBAPI includes instantaneous automatic failover routing. If a provider experiences an outage, routes are immediately shifted within sub-milliseconds to secondary models of matching caliber (e.g., swapping to a sibling model or secondary region) to guarantee 100% uptime.",
|
| 183 |
+
faqAccordion5Q: "Can we self-host the gateway inside our custom VPC?",
|
| 184 |
+
faqAccordion5A: "Yes. Enterprise customers can deploy containerized instances of the HUBAPI gateway directly within their private AWS, GCP, or Azure environments, ensuring all data boundaries remain strictly inside your sovereign secure network.",
|
| 185 |
+
faqAccordion6Q: "How long does it take to integrate HUBAPI?",
|
| 186 |
+
faqAccordion6A: "Under five minutes. Integration requires changing only two lines of code: redirecting your SDK base URL to the HUBAPI gateway and authenticating with your newly issued scoped key. No major code refactoring is needed.",
|
| 187 |
+
|
| 188 |
+
// Comparison Table
|
| 189 |
+
compBadge: "Technical Breakdown",
|
| 190 |
+
compTitle: "HUBAPI vs. ",
|
| 191 |
+
compTitleHighlighted: "Direct Provider Access",
|
| 192 |
+
compSubtitle: "Why leading engineering teams transition from direct LLM API access to an intelligent gateway.",
|
| 193 |
+
compThFeatures: "Features",
|
| 194 |
+
compThDirect: "Direct LLM Calls",
|
| 195 |
+
compThHub: "HUBAPI Gateway",
|
| 196 |
+
compRow1F: "Multi-Model Intelligent Routing",
|
| 197 |
+
compRow1Direct: "Manual switch logic",
|
| 198 |
+
compRow1Hub: "AI-driven automatic optimal routing",
|
| 199 |
+
compRow2F: "LLM Cost Savings",
|
| 200 |
+
compRow2Direct: "0% (pay standard provider rates)",
|
| 201 |
+
compRow2Hub: "Average 40% savings via compression & routing",
|
| 202 |
+
compRow3F: "Failover & Fallback Redundancy",
|
| 203 |
+
compRow3Direct: "Manual try-catch (minutes of downtime)",
|
| 204 |
+
compRow3Hub: "Sub-millisecond secure cross-provider routing",
|
| 205 |
+
compRow4F: "PII & Compliance Redaction",
|
| 206 |
+
compRow4Direct: "Self-built regex/API layers",
|
| 207 |
+
compRow4Hub: "Zero-trust built-in PII shield & audit compliance",
|
| 208 |
+
compRow5F: "Observability & Latency Audits",
|
| 209 |
+
compRow5Direct: "Fragmented logs across interfaces",
|
| 210 |
+
compRow5Hub: "Visual timeline, token counts, & cost breakdowns",
|
| 211 |
+
compRow6F: "Security & Fine-Grained API Keys",
|
| 212 |
+
compRow6Direct: "Root developer keys shared",
|
| 213 |
+
compRow6Hub: "Scoped keys with budget caps & time limits",
|
| 214 |
+
|
| 215 |
+
// FeatureJourneyMap
|
| 216 |
+
journeyBadge: "// Enterprise ROI & Investor Journey",
|
| 217 |
+
journeyTitleLine1: "Your AI Costs Are Bleeding.",
|
| 218 |
+
journeyTitleLine2: "We Stop It.",
|
| 219 |
+
journeySubtitle: "[ One gateway. Every model. Full control. See how HUBAPI transforms AI infrastructure into a high-margin enterprise engine. ]",
|
| 220 |
+
journeyNode1Title: "Intelligent Routing & Cost Slash",
|
| 221 |
+
journeyNode1TitleEn: "AUTOMATED COST OPTIMIZATION",
|
| 222 |
+
journeyNode1Desc: "Our intelligent gateway automatically routes every API call to the most efficient LLM based on real-time cost, latency, and quality benchmarks. Advanced semantic caching immediately reduces your overall AI bills.",
|
| 223 |
+
journeyNode1Thesis: "Proprietary routing engine creates an uncopyable tech moat. Immediate 40% cost reduction guarantees high adoption and 95%+ B2B customer retention.",
|
| 224 |
+
journeyNode2Title: "Zero-Trust Security & Compliance",
|
| 225 |
+
journeyNode2TitleEn: "ENTERPRISE PRIVACY SHIELD",
|
| 226 |
+
journeyNode2MetricText: "🛡️ Enterprise",
|
| 227 |
+
journeyNode2Desc: "Instant defense against prompt injections, automated PII redaction, and strict output moderation. HUBAPI is fully GDPR and HIPAA ready, guaranteeing bulletproof enterprise-grade data privacy in production.",
|
| 228 |
+
journeyNode2Thesis: "Unlocks highly lucrative Fortune 500 and government contracts. Transitioning AI from high-risk sandbox to compliant production drives exponential enterprise ARR expansion.",
|
| 229 |
+
journeyNode3Title: "Global Scale & High Availability",
|
| 230 |
+
journeyNode3TitleEn: "ELASTIC NETWORK ARCHITECTURE",
|
| 231 |
+
journeyNode3Desc: "Geo-distributed smart load balancing across multi-cloud clusters ensures a 99.99% uptime guarantee with zero single points of failure. Engineered to seamlessly handle billions of monthly queries.",
|
| 232 |
+
journeyNode3Thesis: "Highly elastic multi-tenant infrastructure. Gross margins expand rapidly under usage-based billing models while maintaining near-zero incremental operational cost.",
|
| 233 |
+
journeyNode4Title: "Real-Time AI Command Center",
|
| 234 |
+
journeyNode4TitleEn: "DATA GOVERNANCE & BUSINESS INTELLIGENCE",
|
| 235 |
+
journeyNode4MetricText: "Live",
|
| 236 |
+
journeyNode4Desc: "Gain full visibility into your AI operations with comprehensive usage diagnostics, department-level cost tracking, and audited, C-suite ready ROI reporting that proves tangible business value.",
|
| 237 |
+
journeyNode4Thesis: "Deep data network effects. As enterprise integration deepens, switching costs become insurmountable, locking in industry-leading Net Revenue Retention (NRR >130%).",
|
| 238 |
+
journeyThesisLabel: "Investor Thesis",
|
| 239 |
+
|
| 240 |
+
// TrustSection custom keys
|
| 241 |
+
secureInfrastructure: "SECURE_INFRASTRUCTURE",
|
| 242 |
+
sysFounders: "SYS_FOUNDERS",
|
| 243 |
+
|
| 244 |
+
// social-proof
|
| 245 |
+
socialProofBadge: "// Inspired By Industry Standard-Setters",
|
| 246 |
+
|
| 247 |
+
// WaitlistSocialProofTicker
|
| 248 |
+
tickerLive: "LIVE",
|
| 249 |
+
tickerDevelopers: "developers currently in the beta queue",
|
| 250 |
+
tickerClaim: "Claim your spot",
|
| 251 |
+
tickerDismiss: "Dismiss status"
|
| 252 |
+
},
|
| 253 |
+
ar: {
|
| 254 |
+
// Global Header & Common
|
| 255 |
+
logo: "HUBAPI",
|
| 256 |
+
preLaunch: "ما قبل الإطلاق",
|
| 257 |
+
online: "متصل حياً",
|
| 258 |
+
offline: "غير متصل",
|
| 259 |
+
processing: "جاري المعالجة...",
|
| 260 |
+
skipToContent: "تجاوز إلى المحتوى الرئيسي",
|
| 261 |
+
accessHubapi: "دخول_الشبكة",
|
| 262 |
+
loading: "تهيئة بوابات الاتصال العصبية...",
|
| 263 |
+
statusConnected: "تم الاتصال بالبوابة العصبية // آمن",
|
| 264 |
+
statusSecure: "آمن للغاية",
|
| 265 |
+
systemStatus: "حالة النظام",
|
| 266 |
+
allRightsReserved: "جميع الحقوق محفوظة.",
|
| 267 |
+
|
| 268 |
+
// Ambient Reading Mode & A/B test
|
| 269 |
+
ambientMode: "الوضع البسيط",
|
| 270 |
+
normalMode: "التأثيرات البصرية",
|
| 271 |
+
reducedMotionNotice: "تم تبسيط الرسوم المتحركة لسهولة القراءة.",
|
| 272 |
+
|
| 273 |
+
// Sticky Countdown Banner
|
| 274 |
+
countdownTitle: "⚡ العد التنازلي لإطلاق قائمة الانتظار:",
|
| 275 |
+
days: "يوم",
|
| 276 |
+
hours: "ساعة",
|
| 277 |
+
minutes: "دقيقة",
|
| 278 |
+
seconds: "ثانية",
|
| 279 |
+
joinedWaitlist: "لقد انضممت للشبكة العصبية!",
|
| 280 |
+
|
| 281 |
+
// Hero Section
|
| 282 |
+
heroBadge: "بوابة الذكاء العصبية V1.0 // نشط",
|
| 283 |
+
heroBadgeIntel: "نظام_التوجيه_العصبي // مؤمن",
|
| 284 |
+
heroTitleLine1: "بوابة واحدة.",
|
| 285 |
+
heroTitleLine2: "جميع الموديلات.",
|
| 286 |
+
heroTitleLine3: "تحكم كامل.",
|
| 287 |
+
heroSubtitle: "بوابة الذكاء الاصطناعي الذكية التي توجه كل طلب إلى الموديل الأسرع والأرخص تلقائياً. خفض تكاليف الذكاء الاصطناعي بنسبة 40% دون أي تعديل في الكود الخاص بك.",
|
| 288 |
+
heroSubtitleIntel: "توجيه ذاتي للموديلات. صفر احتكاك. كفاءة كاملة. بوابة الـ API السحابية المصممة لإدارة وتنسيق شبكات الوكلاء الذكية ديناميكياً.",
|
| 289 |
+
waitlistPlaceholder: "name@company.com…",
|
| 290 |
+
waitlistAgreement: "// بتسجيلك، فإنك توافق على تلقي إشعارات وتحديثات الإطلاق التجريبي.",
|
| 291 |
+
gdprConsent: "أوافق على معالجة بريدي الإلكتروني بموجب سياسة الخصوصية.",
|
| 292 |
+
|
| 293 |
+
// Cyber Ticket Modal
|
| 294 |
+
ticketConfirmed: "تم منحك إذن الدخول للشبكة",
|
| 295 |
+
ticketTitle: "تذكرة دخول البوابة العصبية",
|
| 296 |
+
ticketDescription: "تم تسجيل هويتك الرقمية في الشبكة العصبية لـ HUBAPI. شارك رابط الإحالة الخاص بك للتقدم في القائمة وتأمين وصول أولوي.",
|
| 297 |
+
ticketNumber: "رقم التذكرة",
|
| 298 |
+
ticketDate: "طابع النظام",
|
| 299 |
+
referralLink: "رابط الإحالة الشخصي الخاص بك",
|
| 300 |
+
copyLink: "نسخ_الرابط",
|
| 301 |
+
copied: "تم النسخ!",
|
| 302 |
+
shareOnX: "مشاركة_على_X",
|
| 303 |
+
referralStats: "إحصائيات الإحالة الخاصة بك",
|
| 304 |
+
rank: "الترتيب الحالي",
|
| 305 |
+
referralsCount: "عدد الإحالات",
|
| 306 |
+
referredLabel: "تمت الإحالة بواسطة",
|
| 307 |
+
|
| 308 |
+
// Exit Intent Popup
|
| 309 |
+
exitTitle: "⚡ انتظر لحظة أيها المطور!",
|
| 310 |
+
exitSubtitle: "أنت على وشك تفويت فرصة الوصول التجريبي الأولوي. سجل إيميلك الآن لتأمين تذكرتك المميزة قبل إغلاق قائمة الوصول المبكر.",
|
| 311 |
+
exitButton: "تأمين_الوصول_الأولوي",
|
| 312 |
+
exitNoThanks: "لا شكراً، أريد تصفح الموقع",
|
| 313 |
+
|
| 314 |
+
// Testimonials Section
|
| 315 |
+
testimonialsTitle: "ماذا يقول الم��ورون؟",
|
| 316 |
+
testimonialsSubtitle: "آراء مبكرة من المهندسين والفرق التي تبني أنظمة الذكاء الاصطناعي الذاتية.",
|
| 317 |
+
testimonial1Text: "وفرت لنا HUBAPI ما يقرب من 40% من تكاليف فواتير GPT-4 شهرياً في فترة بعد ظهر واحدة. كما أن التوجيه الاحتياطي التلقائي أنقذ عملياتنا بالكامل أثناء توقف مزود الخدمة الرئيسي الأسبوع الماضي.",
|
| 318 |
+
testimonial1Author: "ماركوس ثورن",
|
| 319 |
+
testimonial1Role: "نائب رئيس الهندسة، CloudCore",
|
| 320 |
+
testimonial2Text: "أداة ثورية لشبكات الوكلاء الذكية. تقنية التوجيه الديناميكي تقلل زمن الاستجابة بمقدار 35% عبر توجيه الطلبات فورياً لأقرب مزود إقليمي.",
|
| 321 |
+
testimonial2Author: "سارة تشن",
|
| 322 |
+
testimonial2Role: "المؤسس المشارك، LangScale",
|
| 323 |
+
testimonial3Text: "ربط فوري بسطر كود واحد. قمنا بنقل كامل خطوط بيانات مؤسستنا إلى شبكة التوجيه الذكية دون الحاجة لإعادة كتابة محلل موديل واحد.",
|
| 324 |
+
testimonial3Author: "أمير العتيبي",
|
| 325 |
+
testimonial3Role: "الرئيس التنفيذي للتقنية، NeuralByte",
|
| 326 |
+
|
| 327 |
+
// Security Badges Section
|
| 328 |
+
securityTitle: "أمان مخصص للمؤسسات",
|
| 329 |
+
securitySubtitle: "نحن نحمي بياناتك العصبية وخطوط الإمداد بالكامل.",
|
| 330 |
+
badgeSoc2: "شهادة SOC 2 Type II",
|
| 331 |
+
badgeSoc2Desc: "تدقيق خارجي صارم ومستقل لضوابط الأمان الفنية والتنظيمية.",
|
| 332 |
+
badgeGdpr: "متوافق مع GDPR",
|
| 333 |
+
badgeGdprDesc: "حماية تامة وخصوصية البيانات بالتصميم والهيكلة الافتراضية.",
|
| 334 |
+
badgeHipaa: "جاهز لـ HIPAA",
|
| 335 |
+
badgeHipaaDesc: "بنية تحتية خالية من الاحتفاظ بالبيانات لحماية البيانات الصحية والسرية.",
|
| 336 |
+
badgeEncryption: "تشفير 256-bit AES",
|
| 337 |
+
badgeEncryptionDesc: "تشفير كامل لكافة الطلبات أثناء النقل وعزل البيانات في خوادم آمنة.",
|
| 338 |
+
badgeZeroRetention: "عدم الاحتفاظ بالبيانات تماماً",
|
| 339 |
+
badgeZeroRetentionDesc: "لا نقوم أبداً بحفظ مدخلات Prompt الخاصة بك أو مخرجات الموديلات في خوادمنا.",
|
| 340 |
+
|
| 341 |
+
// Team Section
|
| 342 |
+
teamTitle: "بنيت بأيدي مهندسي أنظمة ذوي خبرة",
|
| 343 |
+
teamSubtitle: "قام فريقنا ببناء وتوسيع نطاق البنى التحتية السحابية في كبرى المنظمات التقنية العالمية.",
|
| 344 |
+
teamRole1: "مؤسس مشارك ومهندس أنظمة أول",
|
| 345 |
+
teamRole2: "مؤسس مشارك ورئيس البنية التحتية",
|
| 346 |
+
exGoogle: "سابقاً في أنظمة Google",
|
| 347 |
+
exAws: "سابقاً في سحابة AWS",
|
| 348 |
+
|
| 349 |
+
// Network Topology Map
|
| 350 |
+
mapTitle: "شبكة التوجيه العصبية العالمية",
|
| 351 |
+
mapSubtitle: "[حالة الاتصال والشبكة الحية]",
|
| 352 |
+
mapTotalRequests: "إجمالي الطلبات الديناميكية",
|
| 353 |
+
mapTopCountries: "أعلى توفير في زمن الاستجابة",
|
| 354 |
+
mapRegionCount: "مناطق التوجيه النشطة",
|
| 355 |
+
mapHoverTooltip: "البوابة: {region} | زمن الاستجابة: {latency}ملي ثانية | الحمل: {load}%",
|
| 356 |
+
|
| 357 |
+
// Stats Section
|
| 358 |
+
statsRoutedRequests: "إجمالي طلبات الـ API الموجهة",
|
| 359 |
+
statsTopTraffic: "أعلى الدول في حركة بيانات الـ API",
|
| 360 |
+
statsActiveGateways: "بوابات الاتصال العصبية النشطة",
|
| 361 |
+
statsActivePipelines: "مسارات الوكلاء النشطة",
|
| 362 |
+
statsActivePipelinesDesc: "إجمالي عدد مسارات عمل الوكلاء الآلية وطرق الـ API النشطة التي يتم نشرها وإدارتها عبر شبكة حافة HUBAPI العصبية.",
|
| 363 |
+
statsGatewayTitle: "بوابة الذكاء الاصطناعي العصبية",
|
| 364 |
+
statsGatewayDesc: "طبقة توجيه ذكية موحدة تتعامل مع التخزين المؤقت للـ API، وسلامة المدخلات، وتدوير المفاتيح، وتحديد معدل الاستخدام في زمن استجابة أقل من 5 مللي ثانية.",
|
| 365 |
+
statsRoutedTokens: "رموز الذكاء الاصطناعي الموجهة",
|
| 366 |
+
statsGuardrailTitle: "تدخلات حواجز الحماية للذكاء الاصطناعي",
|
| 367 |
+
statsGuardrailDesc: "يقوم درع HUBAPI العصبي بمراقبة وحظر حقن المدخلات (Prompt Injections)، ونواقل تسريب البيانات، ومحاولات استغلال الـ API الضارة عند البوابة.",
|
| 368 |
+
statsPromptBlocks: "حظر حقن المدخلات",
|
| 369 |
+
statsPiiChallenges: "تحديات معلومات الهوية الشخصية (PII)",
|
| 370 |
+
statsPolicyActions: "إجراءات السياسة المخصصة",
|
| 371 |
+
statsAbuseTitle: "درع منع إساءة الاستخدام",
|
| 372 |
+
statsAbuseDesc: "طبقات التحكم في الوصول التي تحدد تلقائياً مفاتيح الـ API المخترقة والعملاء المؤتمتين المسيئين وتقوم بحظرهم أو وضعهم في الحجر الصحي.",
|
| 373 |
+
statsKeysQuarantined: "المفاتيح الموضوعة في الحجر الصحي",
|
| 374 |
+
statsRequestsVerified: "الطلبات التي تم التحقق منها",
|
| 375 |
+
statsPromptCache: "ذاكرة التخزين المؤقت للمدخلات العصبية",
|
| 376 |
+
statsPromptCacheDesc: "تمثل إصابات ذاكرة التخزين المؤقت استجابات مدخلات ومخرجات LLM التي يتم تقديمها مباشرة من ذاكرة الحافة، مما يوفر رسوم تنفيذ الرموز ويسرع سير العمل.",
|
| 377 |
+
statsCachedServed: "طلبات الـ API المخزنة مؤقتاً التي تم تقديمها",
|
| 378 |
+
|
| 379 |
+
// Live Terminal
|
| 380 |
+
terminalTitle: "مركز قيادة الأوامر الحي",
|
| 381 |
+
terminalSubtitle: "جرب واجهة سطر أوامر بوابتنا العصبية",
|
| 382 |
+
terminalDesc: "قم بإجراء الفحوصات التشخيصية، ومقارنة الموديلات، ومحاكاة التوجيه الذكي - كل ذلك مباشرة من خلال مبنى سطر الأوامر التفاعلي.",
|
| 383 |
+
|
| 384 |
+
// FAQ Section
|
| 385 |
+
faqTitle: "الأسئلة الشائعة",
|
| 386 |
+
faqSubtitle: "هل لديك أسئلة؟ إليك الأجوبة التقنية الدقيقة.",
|
| 387 |
+
faq1Q: "كيف يعمل التوجيه الذكي للموديلات عملياً؟",
|
| 388 |
+
faq1A: "تقوم بوابة HUBAPI باعتراض حزمة طلب الذكاء الاصطناعي الخاص بك، وتحليل مستوى استجابة الطلب، وعدد التوكنز، وسياق الاستفسار، ثم تعيد توجيهه تلقائياً إلى المزود الأمثل في زمن يقل عن 12 ملي ثانية عبر بواباتنا الطرفية الموزعة عالمياً.",
|
| 389 |
+
faq2Q: "هل تقومون بتخزين أو تسجيل بيانات محتوى طلبات الـ API الخاصة بي؟",
|
| 390 |
+
faq2A: "قطعاً لا. بوابة HUBAPI هي بوابة عبور لحظي خالية تماماً من الاحتفاظ بالبيانات (Zero-Retention). يتم تدفق الطلبات والمخرجات في الوقت الفعلي وحذفها فوراً من الذاكرة، ممتثلين بالكامل لمعايير SOC 2 و GDPR.",
|
| 391 |
+
faq3Q: "هل يمكنني استخدام مفاتيح API الخاصة بي مع بوابة HUBAPI؟",
|
| 392 |
+
faq3A: "نعم بالطبع. يمكنك إدخال وإدارة مفاتيحك الخاصة بأمان تام عبر لوحة التحكم، أو استخدام اشتراكاتنا الموحدة للحصول على خصومات كبيرة وفاتورة مجمعة.",
|
| 393 |
+
faq4Q: "ما هو زمن التأخير الإضافي الناتج عن عملية التوجيه؟",
|
| 394 |
+
faq4A: "عملية التوجيه وحساب الموديل الأفضل تستغرق أقل من 12 ملي ثانية فقط. كما أن شبكتنا العالمية تضمن اتصالك بالبوابة الأقرب إليك جغرافياً، مما يقلل إجمالي زمن الاستجابة مقارنة بالاتصال المباشر.",
|
| 395 |
+
faq5Q: "كيف يتصرف النظام عند تعطل أحد مزودي الموديلات؟",
|
| 396 |
+
faq5A: "عند تعطل المزود الرئيسي الخاص بك (مثل OpenAI أو Anthropic) أو الوصول إلى الحد الأقصى لمعدل الطلبات، تقوم بوابتنا فوراً ودون أي تدخل برمجي بتحويل الطلب إلى أقرب مزود مكافئ (مثل Google Gemini) لضمان استمرارية عمل أنظمتك بنسبة 99.99%.",
|
| 397 |
+
|
| 398 |
+
// Footer
|
| 399 |
+
footerBrandDesc: "بوابة الذكاء العصبية التي توجه طلبات الوكلاء إلى التكوين الذكي الأمثل في أجزاء من الملي ثانية. خفض التكاليف بنسبة 40% دون أي تعقيد.",
|
| 400 |
+
footerPlatform: "المنصة",
|
| 401 |
+
footerPlatformCLI: "سطر الأوامر العصبي",
|
| 402 |
+
footerPlatformMesh: "شبكة التوجيه العالمية",
|
| 403 |
+
footerPlatformAccess: "صلاحيات الوصول",
|
| 404 |
+
footerPlatformSandbox: "البيئة الآمنة المعزولة",
|
| 405 |
+
footerResources: "المصادر",
|
| 406 |
+
footerDoc: "التوثيق البرمجي",
|
| 407 |
+
footerSystemStatus: "حالة النظام",
|
| 408 |
+
footerApiRef: "المرجع البرمجي",
|
| 409 |
+
footerFaq: "الأسئلة الشائعة",
|
| 410 |
+
footerSecurity: "الأمن والحماية",
|
| 411 |
+
footerSoc2: "توافقية SOC 2",
|
| 412 |
+
footerPii: "درع حماية وتعتيم PII",
|
| 413 |
+
footerVulnerability: "برنامج حماية الثغر��ت",
|
| 414 |
+
footerResidency: "توطين وتخزين البيانات",
|
| 415 |
+
footerNoticeTitle: "تنبيه تسويقي ومعاينة ما قبل الإطلاق",
|
| 416 |
+
footerNoticeText: "منصة HUBAPI في مرحلتها التجريبية الأولى. صفحة الهبوط الحالية هي واجهة تسويقية ومعاينة لقائمة الانتظار فقط لعرض الميزات المخطط إطلاقها. النظام الأساسي وبوابات الأتمتة الحية وخدمات التوجيه تحت التطوير النشط حالياً. كافة الإحصائيات أو السجلات التشغيلية الظاهرة هي محاكاة تفاعلية ممتازة لأغراض العرض والتقديم.",
|
| 417 |
+
privacyPolicy: "سياسة الخصوصية",
|
| 418 |
+
termsOfService: "شروط الخدمة",
|
| 419 |
+
|
| 420 |
+
// Extended FAQ
|
| 421 |
+
faqBadge: "مركز المعلومات",
|
| 422 |
+
faqTitleHighlighted: "الأسئلة المجاب عنها",
|
| 423 |
+
faqSubtitleAccordions: "كل ما تحتاجه لمعرفته حول الأمان، وزمن الاستجابة، ونشر الأنظمة، والقدرات التقنية.",
|
| 424 |
+
faqAccordion1Q: "كيف يعمل التوجيه الذكي لـ HUBAPI عملياً؟",
|
| 425 |
+
faqAccordion1A: "تقوم نواتنا العصبية بتوجيه كل استدعاء API بشكل ديناميكي. حيث تختبر كفاءة الموديلات في الوقت الفعلي، مقيمة صعوبتها الدلالية، وزمن الاستجابة المستهدف، وتوجيهات التكلفة. تُوجه الأسئلة البسيطة إلى موديلات أسرع وأكثر كفاءة، بينما تُوجه الطلبات المنطقية المعقدة إلى شبكات الذكاء المتقدمة — مما يوفر التكاليف دون تقليل الجودة.",
|
| 426 |
+
faqAccordion2Q: "هل مفتاح API وبيانات الأوامر الخاصة بمؤسستي آمنة؟",
|
| 427 |
+
faqAccordion2A: "تماما. يتم تشفير مفاتيح الموديلات الرئيسية بالكامل أثناء عدم النشاط داخل وحدات أمان الأجهزة المخصصة والآمنة (HSMs). تفرض HUBAPI سياسة صارمة لعدم الاحتفاظ بالبيانات: حيث يتم نقل المدخلات والمخرجات بأمان إلى المزودين ولا يتم تخزينها أبداً على خوادمنا ما لم تطلب ذلك إعدادات الامتثال الخاصة بك.",
|
| 428 |
+
faqAccordion3Q: "هل يؤدي التوجيه عبر البوابة إلى زيادة زمن استجابة الشبكة؟",
|
| 429 |
+
faqAccordion3A: "لا. يتم نشر شبكة بواباتنا العالمية عبر مراكز حافة متعددة المناطق. إجمالي العبء الإضافي على الشبكة يقل عن 12 ملي ثانية — وهي تكلفة يتم تعويضها بشكل كبير من خلال التوجيه الذكي، والذي يختار بانتظام الموديلات التي تستجيب أسرع بمئات الملي ثانية مقارنة بالخيارات الافتراضية.",
|
| 430 |
+
faqAccordion4Q: "ماذا يحدث إذا تعطل مزود الخدمة الرئيسي؟",
|
| 431 |
+
faqAccordion4A: "تتضمن HUBAPI توجيهاً فورياً وتلقائياً للفشل. إذا واجه أحد المزودين انقطاعاً، يتم نقل المسارات على الفور في أجزاء من الملي ثانية إلى موديلات ثانوية بنفس الكفاءة (على سبيل المثال، التحويل لموديل شقيق أو منطقة ثانوية) لضمان استمرارية تشغيل بنسبة 100%.",
|
| 432 |
+
faqAccordion5Q: "هل يمكننا استضافة البوابة ذاتياً داخل شبكة VPC المخصصة لدينا؟",
|
| 433 |
+
faqAccordion5A: "نعم. يمكن لعملاء المؤسسات تشغيل نسخ حاويات (Containerized) من بوابة HUBAPI مباشرة داخل بيئات AWS أو GCP أو Azure الخاصة بهم، مما يضمن بقاء جميع حدود البيانات بدقة داخل شبكتك السيادية الآمنة.",
|
| 434 |
+
faqAccordion6Q: "كم من الوقت يستغرق دمج HUBAPI؟",
|
| 435 |
+
faqAccordion6A: "أقل من خمس دقائق. يتطلب الدمج تغيير سطرين فقط من الكود: إعادة توجيه عنوان URL الأساسي لـ SDK إلى بوابة HUBAPI والمصادقة باستخدام مفتاحك المحدد الجديد. لا يلزم إعادة هيكلة الكود بشكل كبير.",
|
| 436 |
+
|
| 437 |
+
// Comparison Table
|
| 438 |
+
compBadge: "التفاصيل التقنية الدقيقة",
|
| 439 |
+
compTitle: "HUBAPI مقابل ",
|
| 440 |
+
compTitleHighlighted: "الاتصال المباشر بالمزود",
|
| 441 |
+
compSubtitle: "لماذا تنتقل فرق الهندسة الرائدة من الاتصال المباشر بـ APIs إلى البوابة الذكية.",
|
| 442 |
+
compThFeatures: "الميزات والخصائص",
|
| 443 |
+
compThDirect: "استدعاء الموديلات مباشرة",
|
| 444 |
+
compThHub: "بوابة HUBAPI الذكية",
|
| 445 |
+
compRow1F: "التوجيه الذكي متعدد الموديلات",
|
| 446 |
+
compRow1Direct: "منطق تحويل يدوي في الكود",
|
| 447 |
+
compRow1Hub: "توجيه تلقائي أمثل مدفوع بالذكاء الاصطناعي",
|
| 448 |
+
compRow2F: "توفير تكاليف استهلاك الـ LLM",
|
| 449 |
+
compRow2Direct: "0% (دفع الأسعار القياسية للمزود)",
|
| 450 |
+
compRow2Hub: "توفير بمتوسط 40% عبر ضغط الطلبات والتوجيه",
|
| 451 |
+
compRow3F: "دعم الاحتياط وتفادي الفشل الفوري",
|
| 452 |
+
compRow3Direct: "كتل try-catch يدوية (دقائق من التعطل)",
|
| 453 |
+
compRow3Hub: "توجيه آمن فوري بين المزودين في أجزاء من الملي ثانية",
|
| 454 |
+
compRow4F: "تعتيم وحجب PII والامتثال للبيانات",
|
| 455 |
+
compRow4Direct: "طبقات مخصصة وتعبيرات Regex مبنية ذاتياً",
|
| 456 |
+
compRow4Hub: "درع مدمج لحماية PII مع ثقة صفرية وامتثال كامل",
|
| 457 |
+
compRow5F: "الرصد المتقدم وتدقيق زمن الاستجابة",
|
| 458 |
+
compRow5Direct: "سجلات مشتتة عبر واجهات متعددة",
|
| 459 |
+
compRow5Hub: "مخطط زمني مرئي، أعداد التوكنز، وتفاصيل التكلفة",
|
| 460 |
+
compRow6F: "أمان ومفاتيح API دقيقة الصلاحية",
|
| 461 |
+
compRow6Direct: "مشاركة مفاتيح المطورين الرئيسية (Root)",
|
| 462 |
+
compRow6Hub: "مفاتيح محددة الصلاحيات مع حدود الميزانية والوقت",
|
| 463 |
+
|
| 464 |
+
// FeatureJourneyMap
|
| 465 |
+
journeyBadge: "// عائد الاستثمار للمؤسسات ومسار المستثمر",
|
| 466 |
+
journeyTitleLine1: "تكاليف الذكاء الاصطناعي تستنزفك.",
|
| 467 |
+
journeyTitleLine2: "نحن نوقف هذا.",
|
| 468 |
+
journeySubtitle: "[ بوابة واحدة. جميع الموديلات. تحكم كامل. اكتشف كيف تحول HUBAPI البنية التحتية للذكاء الاصطناعي إلى محرك مؤسسي عالي العائد. ]",
|
| 469 |
+
journeyNode1Title: "التوجيه الذكي وخفض التكاليف",
|
| 470 |
+
journeyNode1TitleEn: "تحسين التكلفة المؤتمت",
|
| 471 |
+
journeyNode1Desc: "تقوم بوابتنا الذكية بتوجيه كل استدعاء API تلقائياً إلى الـ LLM الأكثر كفاءة بناءً على معايير التكلفة وزمن الاستجابة والجودة في الوقت الفعلي. يقلل التخزين المؤقت الدلالي المتقدم فواتيرك الإجمالية فوراً.",
|
| 472 |
+
journeyNode1Thesis: "محرك التوجيه المملوك لـ HUBAPI يبني خندقاً تقنياً فريداً. يضمن خفض التكلفة الفوري بنسبة 40% تبنياً واسعاً ومعدل بقاء عملاء B2B يفوق 95%.",
|
| 473 |
+
journeyNode2Title: "أمان الثقة الصفرية والامتثال",
|
| 474 |
+
journeyNode2TitleEn: "درع خصوصية المؤسسات",
|
| 475 |
+
journeyNode2MetricText: "🛡️ مؤسسي",
|
| 476 |
+
journeyNode2Desc: "دفاع فوري ضد حقن المدخلات (Prompt Injections)، وتعتيم تلقائي لـ PII، وإشراف صارم على المخرجات. بوابة HUBAPI جاهزة تماماً لـ GDPR و HIPAA، مما يضمن حماية بيانات حديدية للمؤسسات في بيئة الإنتاج.",
|
| 477 |
+
journeyNode2Thesis: "يفتح عقوداً مربحة للغاية مع شركات Fortune 500 والجهات الحكومية. الانتقال بالذكاء الاصطناعي من بيئة الاختبار عالية المخاطر إلى الإنتاج الممتثل يقود لنمو متسارع في الإيرادات السنوية المتكررة للمؤسسات (ARR).",
|
| 478 |
+
journeyNode3Title: "توسيع النطاق العالمي والجاهزية العالية",
|
| 479 |
+
journeyNode3TitleEn: "بنية الشبكة المرنة",
|
| 480 |
+
journeyNode3Desc: "توزيع جيو-ذكي للحمل عبر مجموعات الحوسبة متعددة السحاب يضمن تشغيلاً بنسبة 99.99% دون نقاط فشل فردية. مصممة للتعامل بسلاسة مع مليارات الاستعلامات الشهرية.",
|
| 481 |
+
journeyNode3Thesis: "بنية تحتية مرنة للغاية متعددة المستأجرين. تتسع هوامش الربح الإجمالية بسرعة بموجب نماذج تسعير الاستخدام مع الحفاظ على تكاليف تشغيلية إضافية شبه معدومة.",
|
| 482 |
+
journeyNode4Title: "مركز تحكم حي بالذكاء الاصطناعي",
|
| 483 |
+
journeyNode4TitleEn: "حوكمة البيانات وذكاء الأعمال",
|
| 484 |
+
journeyNode4MetricText: "مباشر",
|
| 485 |
+
journeyNode4Desc: "احصل على رؤية كاملة لعمليات الذكاء الاصطناعي الخاصة بك مع تشخيصات شاملة للاستخدام، وتتبع التكاليف على مستوى الأقسام، وتقارير ع��ئد استثمار مدققة وجاهزة للإدارة التنفيذية تثبت القيمة الملموسة للأعمال.",
|
| 486 |
+
journeyNode4Thesis: "تأثيرات شبكة البيانات العميقة. مع تعمق دمج المؤسسة لبوابتنا، تصبح تكاليف الانتقال إلى بدائل أخرى مستحيلة، مما يضمن بقاء صافي الإيرادات رائعاً (NRR >130%).",
|
| 487 |
+
journeyThesisLabel: "أطروحة المستثمر",
|
| 488 |
+
|
| 489 |
+
// TrustSection custom keys
|
| 490 |
+
secureInfrastructure: "بنية تحتية آمنة",
|
| 491 |
+
sysFounders: "مؤسسو النظام",
|
| 492 |
+
|
| 493 |
+
// social-proof
|
| 494 |
+
socialProofBadge: "// مستوحى من واضعي معايير الصناعة",
|
| 495 |
+
|
| 496 |
+
// WaitlistSocialProofTicker
|
| 497 |
+
tickerLive: "مباشر",
|
| 498 |
+
tickerDevelopers: "مطور حالياً في قائمة الانتظار التجريبية",
|
| 499 |
+
tickerClaim: "احجز مكانك الآن",
|
| 500 |
+
tickerDismiss: "تجاهل الحالة"
|
| 501 |
+
}
|
| 502 |
+
};
|
package-lock.json
CHANGED
|
@@ -9,12 +9,14 @@
|
|
| 9 |
"version": "0.1.0",
|
| 10 |
"dependencies": {
|
| 11 |
"@radix-ui/react-icons": "^1.3.2",
|
|
|
|
| 12 |
"class-variance-authority": "^0.7.1",
|
| 13 |
"clsx": "^2.1.1",
|
| 14 |
"d3-geo": "^3.1.1",
|
| 15 |
"framer-motion": "^12.39.0",
|
| 16 |
"lucide-react": "^1.16.0",
|
| 17 |
"motion": "^12.39.0",
|
|
|
|
| 18 |
"next": "16.2.6",
|
| 19 |
"next-themes": "^0.4.6",
|
| 20 |
"radix-ui": "^1.4.3",
|
|
@@ -22,6 +24,7 @@
|
|
| 22 |
"react-dom": "19.2.4",
|
| 23 |
"shadcn": "^4.7.0",
|
| 24 |
"tailwind-merge": "^3.6.0",
|
|
|
|
| 25 |
"tw-animate-css": "^1.4.0"
|
| 26 |
},
|
| 27 |
"devDependencies": {
|
|
@@ -454,6 +457,12 @@
|
|
| 454 |
"node": ">=6.9.0"
|
| 455 |
}
|
| 456 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 457 |
"node_modules/@dotenvx/dotenvx": {
|
| 458 |
"version": "1.66.0",
|
| 459 |
"resolved": "https://registry.npmjs.org/@dotenvx/dotenvx/-/dotenvx-1.66.0.tgz",
|
|
@@ -3851,6 +3860,12 @@
|
|
| 3851 |
"url": "https://github.com/sponsors/isaacs"
|
| 3852 |
}
|
| 3853 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3854 |
"node_modules/@tybys/wasm-util": {
|
| 3855 |
"version": "0.10.2",
|
| 3856 |
"resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz",
|
|
@@ -3938,18 +3953,44 @@
|
|
| 3938 |
"@types/node": "*"
|
| 3939 |
}
|
| 3940 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3941 |
"node_modules/@types/statuses": {
|
| 3942 |
"version": "2.0.6",
|
| 3943 |
"resolved": "https://registry.npmjs.org/@types/statuses/-/statuses-2.0.6.tgz",
|
| 3944 |
"integrity": "sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==",
|
| 3945 |
"license": "MIT"
|
| 3946 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3947 |
"node_modules/@types/validate-npm-package-name": {
|
| 3948 |
"version": "4.0.2",
|
| 3949 |
"resolved": "https://registry.npmjs.org/@types/validate-npm-package-name/-/validate-npm-package-name-4.0.2.tgz",
|
| 3950 |
"integrity": "sha512-lrpDziQipxCEeK5kWxvljWYhUvOiB2A9izZd9B2AFarYAkqZshb4lPbRs7zKEic6eGtH8V/2qJW+dPp9OtF6bw==",
|
| 3951 |
"license": "MIT"
|
| 3952 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3953 |
"node_modules/@typescript-eslint/eslint-plugin": {
|
| 3954 |
"version": "8.59.4",
|
| 3955 |
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.59.4.tgz",
|
|
@@ -4915,6 +4956,15 @@
|
|
| 4915 |
"url": "https://github.com/sponsors/ljharb"
|
| 4916 |
}
|
| 4917 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4918 |
"node_modules/axe-core": {
|
| 4919 |
"version": "4.11.4",
|
| 4920 |
"resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.11.4.tgz",
|
|
@@ -5649,6 +5699,15 @@
|
|
| 5649 |
"url": "https://github.com/sponsors/ljharb"
|
| 5650 |
}
|
| 5651 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5652 |
"node_modules/depd": {
|
| 5653 |
"version": "2.0.0",
|
| 5654 |
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
|
@@ -6659,6 +6718,12 @@
|
|
| 6659 |
"node": "^12.20 || >= 14.13"
|
| 6660 |
}
|
| 6661 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6662 |
"node_modules/figures": {
|
| 6663 |
"version": "6.1.0",
|
| 6664 |
"resolved": "https://registry.npmjs.org/figures/-/figures-6.1.0.tgz",
|
|
@@ -6891,6 +6956,15 @@
|
|
| 6891 |
"integrity": "sha512-sR9BNCjBg6LNgwvxlBd0sBABvQitkLzoVY9MYYROQVX/FvfJ4Mai9LsGhDgd8qYdds0bY77VzYd5iuB+v5rwQQ==",
|
| 6892 |
"license": "MIT"
|
| 6893 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6894 |
"node_modules/generator-function": {
|
| 6895 |
"version": "2.0.1",
|
| 6896 |
"resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz",
|
|
@@ -7750,6 +7824,12 @@
|
|
| 7750 |
"integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
|
| 7751 |
"license": "MIT"
|
| 7752 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7753 |
"node_modules/is-regex": {
|
| 7754 |
"version": "1.2.1",
|
| 7755 |
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz",
|
|
@@ -8494,6 +8574,12 @@
|
|
| 8494 |
"url": "https://github.com/sponsors/sindresorhus"
|
| 8495 |
}
|
| 8496 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8497 |
"node_modules/loose-envify": {
|
| 8498 |
"version": "1.4.0",
|
| 8499 |
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
|
@@ -8516,6 +8602,21 @@
|
|
| 8516 |
"yallist": "^3.0.2"
|
| 8517 |
}
|
| 8518 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8519 |
"node_modules/lucide-react": {
|
| 8520 |
"version": "1.16.0",
|
| 8521 |
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.16.0.tgz",
|
|
@@ -8580,6 +8681,12 @@
|
|
| 8580 |
"node": ">= 8"
|
| 8581 |
}
|
| 8582 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8583 |
"node_modules/micromatch": {
|
| 8584 |
"version": "4.0.8",
|
| 8585 |
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
|
@@ -8774,6 +8881,40 @@
|
|
| 8774 |
"node": "^20.17.0 || >=22.9.0"
|
| 8775 |
}
|
| 8776 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8777 |
"node_modules/nanoid": {
|
| 8778 |
"version": "3.3.12",
|
| 8779 |
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz",
|
|
@@ -10474,6 +10615,21 @@
|
|
| 10474 |
"node": ">=0.10.0"
|
| 10475 |
}
|
| 10476 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10477 |
"node_modules/stable-hash": {
|
| 10478 |
"version": "0.0.5",
|
| 10479 |
"resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz",
|
|
@@ -10816,6 +10972,12 @@
|
|
| 10816 |
"url": "https://opencollective.com/webpack"
|
| 10817 |
}
|
| 10818 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10819 |
"node_modules/tiny-invariant": {
|
| 10820 |
"version": "1.3.3",
|
| 10821 |
"resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz",
|
|
|
|
| 9 |
"version": "0.1.0",
|
| 10 |
"dependencies": {
|
| 11 |
"@radix-ui/react-icons": "^1.3.2",
|
| 12 |
+
"@types/three": "^0.184.1",
|
| 13 |
"class-variance-authority": "^0.7.1",
|
| 14 |
"clsx": "^2.1.1",
|
| 15 |
"d3-geo": "^3.1.1",
|
| 16 |
"framer-motion": "^12.39.0",
|
| 17 |
"lucide-react": "^1.16.0",
|
| 18 |
"motion": "^12.39.0",
|
| 19 |
+
"mysql2": "^3.22.3",
|
| 20 |
"next": "16.2.6",
|
| 21 |
"next-themes": "^0.4.6",
|
| 22 |
"radix-ui": "^1.4.3",
|
|
|
|
| 24 |
"react-dom": "19.2.4",
|
| 25 |
"shadcn": "^4.7.0",
|
| 26 |
"tailwind-merge": "^3.6.0",
|
| 27 |
+
"three": "^0.184.0",
|
| 28 |
"tw-animate-css": "^1.4.0"
|
| 29 |
},
|
| 30 |
"devDependencies": {
|
|
|
|
| 457 |
"node": ">=6.9.0"
|
| 458 |
}
|
| 459 |
},
|
| 460 |
+
"node_modules/@dimforge/rapier3d-compat": {
|
| 461 |
+
"version": "0.12.0",
|
| 462 |
+
"resolved": "https://registry.npmjs.org/@dimforge/rapier3d-compat/-/rapier3d-compat-0.12.0.tgz",
|
| 463 |
+
"integrity": "sha512-uekIGetywIgopfD97oDL5PfeezkFpNhwlzlaEYNOA0N6ghdsOvh/HYjSMek5Q2O1PYvRSDFcqFVJl4r4ZBwOow==",
|
| 464 |
+
"license": "Apache-2.0"
|
| 465 |
+
},
|
| 466 |
"node_modules/@dotenvx/dotenvx": {
|
| 467 |
"version": "1.66.0",
|
| 468 |
"resolved": "https://registry.npmjs.org/@dotenvx/dotenvx/-/dotenvx-1.66.0.tgz",
|
|
|
|
| 3860 |
"url": "https://github.com/sponsors/isaacs"
|
| 3861 |
}
|
| 3862 |
},
|
| 3863 |
+
"node_modules/@tweenjs/tween.js": {
|
| 3864 |
+
"version": "23.1.3",
|
| 3865 |
+
"resolved": "https://registry.npmjs.org/@tweenjs/tween.js/-/tween.js-23.1.3.tgz",
|
| 3866 |
+
"integrity": "sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA==",
|
| 3867 |
+
"license": "MIT"
|
| 3868 |
+
},
|
| 3869 |
"node_modules/@tybys/wasm-util": {
|
| 3870 |
"version": "0.10.2",
|
| 3871 |
"resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz",
|
|
|
|
| 3953 |
"@types/node": "*"
|
| 3954 |
}
|
| 3955 |
},
|
| 3956 |
+
"node_modules/@types/stats.js": {
|
| 3957 |
+
"version": "0.17.4",
|
| 3958 |
+
"resolved": "https://registry.npmjs.org/@types/stats.js/-/stats.js-0.17.4.tgz",
|
| 3959 |
+
"integrity": "sha512-jIBvWWShCvlBqBNIZt0KAshWpvSjhkwkEu4ZUcASoAvhmrgAUI2t1dXrjSL4xXVLB4FznPrIsX3nKXFl/Dt4vA==",
|
| 3960 |
+
"license": "MIT"
|
| 3961 |
+
},
|
| 3962 |
"node_modules/@types/statuses": {
|
| 3963 |
"version": "2.0.6",
|
| 3964 |
"resolved": "https://registry.npmjs.org/@types/statuses/-/statuses-2.0.6.tgz",
|
| 3965 |
"integrity": "sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==",
|
| 3966 |
"license": "MIT"
|
| 3967 |
},
|
| 3968 |
+
"node_modules/@types/three": {
|
| 3969 |
+
"version": "0.184.1",
|
| 3970 |
+
"resolved": "https://registry.npmjs.org/@types/three/-/three-0.184.1.tgz",
|
| 3971 |
+
"integrity": "sha512-6q4VdiqVsrTRqmk62/BnlcAvIrnDM0zf2ZDVKI5kZiniWrSaOHaQzmbp+BNzoggc/8tgW412pL//wZIxu2PPTA==",
|
| 3972 |
+
"license": "MIT",
|
| 3973 |
+
"dependencies": {
|
| 3974 |
+
"@dimforge/rapier3d-compat": "~0.12.0",
|
| 3975 |
+
"@tweenjs/tween.js": "~23.1.3",
|
| 3976 |
+
"@types/stats.js": "*",
|
| 3977 |
+
"@types/webxr": ">=0.5.17",
|
| 3978 |
+
"fflate": "~0.8.2",
|
| 3979 |
+
"meshoptimizer": "~1.1.1"
|
| 3980 |
+
}
|
| 3981 |
+
},
|
| 3982 |
"node_modules/@types/validate-npm-package-name": {
|
| 3983 |
"version": "4.0.2",
|
| 3984 |
"resolved": "https://registry.npmjs.org/@types/validate-npm-package-name/-/validate-npm-package-name-4.0.2.tgz",
|
| 3985 |
"integrity": "sha512-lrpDziQipxCEeK5kWxvljWYhUvOiB2A9izZd9B2AFarYAkqZshb4lPbRs7zKEic6eGtH8V/2qJW+dPp9OtF6bw==",
|
| 3986 |
"license": "MIT"
|
| 3987 |
},
|
| 3988 |
+
"node_modules/@types/webxr": {
|
| 3989 |
+
"version": "0.5.24",
|
| 3990 |
+
"resolved": "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.24.tgz",
|
| 3991 |
+
"integrity": "sha512-h8fgEd/DpoS9CBrjEQXR+dIDraopAEfu4wYVNY2tEPwk60stPWhvZMf4Foo5FakuQ7HFZoa8WceaWFervK2Ovg==",
|
| 3992 |
+
"license": "MIT"
|
| 3993 |
+
},
|
| 3994 |
"node_modules/@typescript-eslint/eslint-plugin": {
|
| 3995 |
"version": "8.59.4",
|
| 3996 |
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.59.4.tgz",
|
|
|
|
| 4956 |
"url": "https://github.com/sponsors/ljharb"
|
| 4957 |
}
|
| 4958 |
},
|
| 4959 |
+
"node_modules/aws-ssl-profiles": {
|
| 4960 |
+
"version": "1.1.2",
|
| 4961 |
+
"resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz",
|
| 4962 |
+
"integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==",
|
| 4963 |
+
"license": "MIT",
|
| 4964 |
+
"engines": {
|
| 4965 |
+
"node": ">= 6.0.0"
|
| 4966 |
+
}
|
| 4967 |
+
},
|
| 4968 |
"node_modules/axe-core": {
|
| 4969 |
"version": "4.11.4",
|
| 4970 |
"resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.11.4.tgz",
|
|
|
|
| 5699 |
"url": "https://github.com/sponsors/ljharb"
|
| 5700 |
}
|
| 5701 |
},
|
| 5702 |
+
"node_modules/denque": {
|
| 5703 |
+
"version": "2.1.0",
|
| 5704 |
+
"resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
|
| 5705 |
+
"integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==",
|
| 5706 |
+
"license": "Apache-2.0",
|
| 5707 |
+
"engines": {
|
| 5708 |
+
"node": ">=0.10"
|
| 5709 |
+
}
|
| 5710 |
+
},
|
| 5711 |
"node_modules/depd": {
|
| 5712 |
"version": "2.0.0",
|
| 5713 |
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
|
|
|
| 6718 |
"node": "^12.20 || >= 14.13"
|
| 6719 |
}
|
| 6720 |
},
|
| 6721 |
+
"node_modules/fflate": {
|
| 6722 |
+
"version": "0.8.3",
|
| 6723 |
+
"resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.3.tgz",
|
| 6724 |
+
"integrity": "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==",
|
| 6725 |
+
"license": "MIT"
|
| 6726 |
+
},
|
| 6727 |
"node_modules/figures": {
|
| 6728 |
"version": "6.1.0",
|
| 6729 |
"resolved": "https://registry.npmjs.org/figures/-/figures-6.1.0.tgz",
|
|
|
|
| 6956 |
"integrity": "sha512-sR9BNCjBg6LNgwvxlBd0sBABvQitkLzoVY9MYYROQVX/FvfJ4Mai9LsGhDgd8qYdds0bY77VzYd5iuB+v5rwQQ==",
|
| 6957 |
"license": "MIT"
|
| 6958 |
},
|
| 6959 |
+
"node_modules/generate-function": {
|
| 6960 |
+
"version": "2.3.1",
|
| 6961 |
+
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
|
| 6962 |
+
"integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
|
| 6963 |
+
"license": "MIT",
|
| 6964 |
+
"dependencies": {
|
| 6965 |
+
"is-property": "^1.0.2"
|
| 6966 |
+
}
|
| 6967 |
+
},
|
| 6968 |
"node_modules/generator-function": {
|
| 6969 |
"version": "2.0.1",
|
| 6970 |
"resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz",
|
|
|
|
| 7824 |
"integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
|
| 7825 |
"license": "MIT"
|
| 7826 |
},
|
| 7827 |
+
"node_modules/is-property": {
|
| 7828 |
+
"version": "1.0.2",
|
| 7829 |
+
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
|
| 7830 |
+
"integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==",
|
| 7831 |
+
"license": "MIT"
|
| 7832 |
+
},
|
| 7833 |
"node_modules/is-regex": {
|
| 7834 |
"version": "1.2.1",
|
| 7835 |
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz",
|
|
|
|
| 8574 |
"url": "https://github.com/sponsors/sindresorhus"
|
| 8575 |
}
|
| 8576 |
},
|
| 8577 |
+
"node_modules/long": {
|
| 8578 |
+
"version": "5.3.2",
|
| 8579 |
+
"resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz",
|
| 8580 |
+
"integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==",
|
| 8581 |
+
"license": "Apache-2.0"
|
| 8582 |
+
},
|
| 8583 |
"node_modules/loose-envify": {
|
| 8584 |
"version": "1.4.0",
|
| 8585 |
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
|
|
|
| 8602 |
"yallist": "^3.0.2"
|
| 8603 |
}
|
| 8604 |
},
|
| 8605 |
+
"node_modules/lru.min": {
|
| 8606 |
+
"version": "1.1.4",
|
| 8607 |
+
"resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.4.tgz",
|
| 8608 |
+
"integrity": "sha512-DqC6n3QQ77zdFpCMASA1a3Jlb64Hv2N2DciFGkO/4L9+q/IpIAuRlKOvCXabtRW6cQf8usbmM6BE/TOPysCdIA==",
|
| 8609 |
+
"license": "MIT",
|
| 8610 |
+
"engines": {
|
| 8611 |
+
"bun": ">=1.0.0",
|
| 8612 |
+
"deno": ">=1.30.0",
|
| 8613 |
+
"node": ">=8.0.0"
|
| 8614 |
+
},
|
| 8615 |
+
"funding": {
|
| 8616 |
+
"type": "github",
|
| 8617 |
+
"url": "https://github.com/sponsors/wellwelwel"
|
| 8618 |
+
}
|
| 8619 |
+
},
|
| 8620 |
"node_modules/lucide-react": {
|
| 8621 |
"version": "1.16.0",
|
| 8622 |
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.16.0.tgz",
|
|
|
|
| 8681 |
"node": ">= 8"
|
| 8682 |
}
|
| 8683 |
},
|
| 8684 |
+
"node_modules/meshoptimizer": {
|
| 8685 |
+
"version": "1.1.1",
|
| 8686 |
+
"resolved": "https://registry.npmjs.org/meshoptimizer/-/meshoptimizer-1.1.1.tgz",
|
| 8687 |
+
"integrity": "sha512-oRFNWJRDA/WTrVj7NWvqa5HqE1t9MYDj2VaWirQCzCCrAd2GHrqR/sQezCxiWATPNlKTcRaPRHPJwIRoPBAp5g==",
|
| 8688 |
+
"license": "MIT"
|
| 8689 |
+
},
|
| 8690 |
"node_modules/micromatch": {
|
| 8691 |
"version": "4.0.8",
|
| 8692 |
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
|
|
|
|
| 8881 |
"node": "^20.17.0 || >=22.9.0"
|
| 8882 |
}
|
| 8883 |
},
|
| 8884 |
+
"node_modules/mysql2": {
|
| 8885 |
+
"version": "3.22.3",
|
| 8886 |
+
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.22.3.tgz",
|
| 8887 |
+
"integrity": "sha512-uWWxvZSRvRhtBdh2CdcuK83YcOfPdmEeEYB069bAmPnV93QApDGVPuvCQOLjlh7tYHEWdgQPrn6kosDxHBVLkA==",
|
| 8888 |
+
"license": "MIT",
|
| 8889 |
+
"dependencies": {
|
| 8890 |
+
"aws-ssl-profiles": "^1.1.2",
|
| 8891 |
+
"denque": "^2.1.0",
|
| 8892 |
+
"generate-function": "^2.3.1",
|
| 8893 |
+
"iconv-lite": "^0.7.2",
|
| 8894 |
+
"long": "^5.3.2",
|
| 8895 |
+
"lru.min": "^1.1.4",
|
| 8896 |
+
"named-placeholders": "^1.1.6",
|
| 8897 |
+
"sql-escaper": "^1.3.3"
|
| 8898 |
+
},
|
| 8899 |
+
"engines": {
|
| 8900 |
+
"node": ">= 8.0"
|
| 8901 |
+
},
|
| 8902 |
+
"peerDependencies": {
|
| 8903 |
+
"@types/node": ">= 8"
|
| 8904 |
+
}
|
| 8905 |
+
},
|
| 8906 |
+
"node_modules/named-placeholders": {
|
| 8907 |
+
"version": "1.1.6",
|
| 8908 |
+
"resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.6.tgz",
|
| 8909 |
+
"integrity": "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w==",
|
| 8910 |
+
"license": "MIT",
|
| 8911 |
+
"dependencies": {
|
| 8912 |
+
"lru.min": "^1.1.0"
|
| 8913 |
+
},
|
| 8914 |
+
"engines": {
|
| 8915 |
+
"node": ">=8.0.0"
|
| 8916 |
+
}
|
| 8917 |
+
},
|
| 8918 |
"node_modules/nanoid": {
|
| 8919 |
"version": "3.3.12",
|
| 8920 |
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz",
|
|
|
|
| 10615 |
"node": ">=0.10.0"
|
| 10616 |
}
|
| 10617 |
},
|
| 10618 |
+
"node_modules/sql-escaper": {
|
| 10619 |
+
"version": "1.3.3",
|
| 10620 |
+
"resolved": "https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.3.3.tgz",
|
| 10621 |
+
"integrity": "sha512-BsTCV265VpTp8tm1wyIm1xqQCS+Q9NHx2Sr+WcnUrgLrQ6yiDIvHYJV5gHxsj1lMBy2zm5twLaZao8Jd+S8JJw==",
|
| 10622 |
+
"license": "MIT",
|
| 10623 |
+
"engines": {
|
| 10624 |
+
"bun": ">=1.0.0",
|
| 10625 |
+
"deno": ">=2.0.0",
|
| 10626 |
+
"node": ">=12.0.0"
|
| 10627 |
+
},
|
| 10628 |
+
"funding": {
|
| 10629 |
+
"type": "github",
|
| 10630 |
+
"url": "https://github.com/mysqljs/sql-escaper?sponsor=1"
|
| 10631 |
+
}
|
| 10632 |
+
},
|
| 10633 |
"node_modules/stable-hash": {
|
| 10634 |
"version": "0.0.5",
|
| 10635 |
"resolved": "https://registry.npmjs.org/stable-hash/-/stable-hash-0.0.5.tgz",
|
|
|
|
| 10972 |
"url": "https://opencollective.com/webpack"
|
| 10973 |
}
|
| 10974 |
},
|
| 10975 |
+
"node_modules/three": {
|
| 10976 |
+
"version": "0.184.0",
|
| 10977 |
+
"resolved": "https://registry.npmjs.org/three/-/three-0.184.0.tgz",
|
| 10978 |
+
"integrity": "sha512-wtTRjG92pM5eUg/KuUnHsqSAlPM296brTOcLgMRqEeylYTh/CdtvKUvCyyCQTzFuStieWxvZb8mVTMvdPyUpxg==",
|
| 10979 |
+
"license": "MIT"
|
| 10980 |
+
},
|
| 10981 |
"node_modules/tiny-invariant": {
|
| 10982 |
"version": "1.3.3",
|
| 10983 |
"resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.3.tgz",
|
package.json
CHANGED
|
@@ -10,12 +10,14 @@
|
|
| 10 |
},
|
| 11 |
"dependencies": {
|
| 12 |
"@radix-ui/react-icons": "^1.3.2",
|
|
|
|
| 13 |
"class-variance-authority": "^0.7.1",
|
| 14 |
"clsx": "^2.1.1",
|
| 15 |
"d3-geo": "^3.1.1",
|
| 16 |
"framer-motion": "^12.39.0",
|
| 17 |
"lucide-react": "^1.16.0",
|
| 18 |
"motion": "^12.39.0",
|
|
|
|
| 19 |
"next": "16.2.6",
|
| 20 |
"next-themes": "^0.4.6",
|
| 21 |
"radix-ui": "^1.4.3",
|
|
@@ -23,6 +25,7 @@
|
|
| 23 |
"react-dom": "19.2.4",
|
| 24 |
"shadcn": "^4.7.0",
|
| 25 |
"tailwind-merge": "^3.6.0",
|
|
|
|
| 26 |
"tw-animate-css": "^1.4.0"
|
| 27 |
},
|
| 28 |
"devDependencies": {
|
|
|
|
| 10 |
},
|
| 11 |
"dependencies": {
|
| 12 |
"@radix-ui/react-icons": "^1.3.2",
|
| 13 |
+
"@types/three": "^0.184.1",
|
| 14 |
"class-variance-authority": "^0.7.1",
|
| 15 |
"clsx": "^2.1.1",
|
| 16 |
"d3-geo": "^3.1.1",
|
| 17 |
"framer-motion": "^12.39.0",
|
| 18 |
"lucide-react": "^1.16.0",
|
| 19 |
"motion": "^12.39.0",
|
| 20 |
+
"mysql2": "^3.22.3",
|
| 21 |
"next": "16.2.6",
|
| 22 |
"next-themes": "^0.4.6",
|
| 23 |
"radix-ui": "^1.4.3",
|
|
|
|
| 25 |
"react-dom": "19.2.4",
|
| 26 |
"shadcn": "^4.7.0",
|
| 27 |
"tailwind-merge": "^3.6.0",
|
| 28 |
+
"three": "^0.184.0",
|
| 29 |
"tw-animate-css": "^1.4.0"
|
| 30 |
},
|
| 31 |
"devDependencies": {
|