From cf70f39903c73981a99d35da30e4a0a724009ef6 Mon Sep 17 00:00:00 2001 From: Jose Lago Date: Sat, 22 Aug 2026 19:47:22 +0200 Subject: [PATCH] Phase 2: Admin console (admin.appe.at) A desktop-first React app for organizers, guarded to the admin role. Backend (supabase/migrations/20260823000000_admin_app.sql): - Admin-only SELECT policies on preferences, connections, feedback - reset_qr_token RPC: regenerates a lanyard token, re-hashes it as the Auth password (old token stops working), and clears the attendee's sessions to force re-login App (apps/admin, port 3001): - Login: same QR+email flow, but non-admin sessions are rejected - Dashboard: live stats + top points + recent activity - Attendees: search, edit name/company/role, reset QR, adjust points - Schedule: manage slots + sessions (create/edit/delete) - Activity: check-ins / connections / feedback tables - Same-origin proxy (Vite dev / nginx in Docker), same design tokens Docker + scripts: - convivo-admin service in docker-compose.yml (:3001) - admin:dev / admin:build root scripts - fixed db:reset script (supabase reset -> supabase db reset) Docs: new frontend/admin-app.md; updated architecture, rls, rpcs, docker, next-steps, and READMEs. Verified: build clean, all views + flows browser-tested, Docker build + proxy + login + admin guard confirmed. DB reset to clean seed. --- .gitignore | 3 + README.md | 28 +- apps/admin/.dockerignore | 13 + apps/admin/.env.example | 9 + apps/admin/Dockerfile | 35 + apps/admin/docker-entrypoint.sh | 19 + apps/admin/index.html | 19 + apps/admin/nginx.conf.template | 77 + apps/admin/package-lock.json | 1910 +++++++++++++++++ apps/admin/package.json | 24 + apps/admin/public/favicon.svg | 10 + apps/admin/public/icon-192.png | Bin 0 -> 2848 bytes apps/admin/public/icon-512.png | Bin 0 -> 8355 bytes apps/admin/public/manifest.webmanifest | 13 + apps/admin/src/App.tsx | 95 + apps/admin/src/components/ui.tsx | 85 + apps/admin/src/context/AuthContext.tsx | 108 + apps/admin/src/context/ToastContext.tsx | 53 + apps/admin/src/lib/api.ts | 61 + apps/admin/src/lib/supabase.ts | 22 + apps/admin/src/lib/types.ts | 80 + apps/admin/src/main.tsx | 10 + apps/admin/src/screens/Login.tsx | 72 + apps/admin/src/styles.css | 219 ++ apps/admin/src/views/Activity.tsx | 186 ++ apps/admin/src/views/Attendees.tsx | 332 +++ apps/admin/src/views/Dashboard.tsx | 196 ++ apps/admin/src/views/Schedule.tsx | 332 +++ apps/admin/src/vite-env.d.ts | 10 + apps/admin/tsconfig.app.json | 21 + apps/admin/tsconfig.json | 7 + apps/admin/tsconfig.node.json | 13 + apps/admin/vite.config.ts | 20 + docker-compose.yml | 37 +- docs/README.md | 18 +- docs/architecture.md | 36 +- docs/backend/README.md | 1 + docs/backend/docker.md | 52 +- docs/backend/rls.md | 24 +- docs/backend/rpcs.md | 24 +- docs/frontend/README.md | 21 +- docs/frontend/admin-app.md | 90 + docs/next-steps.md | 42 +- package.json | 6 +- .../migrations/20260823000000_admin_app.sql | 79 + 45 files changed, 4425 insertions(+), 87 deletions(-) create mode 100644 apps/admin/.dockerignore create mode 100644 apps/admin/.env.example create mode 100644 apps/admin/Dockerfile create mode 100644 apps/admin/docker-entrypoint.sh create mode 100644 apps/admin/index.html create mode 100644 apps/admin/nginx.conf.template create mode 100644 apps/admin/package-lock.json create mode 100644 apps/admin/package.json create mode 100644 apps/admin/public/favicon.svg create mode 100644 apps/admin/public/icon-192.png create mode 100644 apps/admin/public/icon-512.png create mode 100644 apps/admin/public/manifest.webmanifest create mode 100644 apps/admin/src/App.tsx create mode 100644 apps/admin/src/components/ui.tsx create mode 100644 apps/admin/src/context/AuthContext.tsx create mode 100644 apps/admin/src/context/ToastContext.tsx create mode 100644 apps/admin/src/lib/api.ts create mode 100644 apps/admin/src/lib/supabase.ts create mode 100644 apps/admin/src/lib/types.ts create mode 100644 apps/admin/src/main.tsx create mode 100644 apps/admin/src/screens/Login.tsx create mode 100644 apps/admin/src/styles.css create mode 100644 apps/admin/src/views/Activity.tsx create mode 100644 apps/admin/src/views/Attendees.tsx create mode 100644 apps/admin/src/views/Dashboard.tsx create mode 100644 apps/admin/src/views/Schedule.tsx create mode 100644 apps/admin/src/vite-env.d.ts create mode 100644 apps/admin/tsconfig.app.json create mode 100644 apps/admin/tsconfig.json create mode 100644 apps/admin/tsconfig.node.json create mode 100644 apps/admin/vite.config.ts create mode 100644 docs/frontend/admin-app.md create mode 100644 supabase/migrations/20260823000000_admin_app.sql diff --git a/.gitignore b/.gitignore index ef4468f..31c5ef4 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,6 @@ npm-debug.log* Thumbs.db .vscode/ .idea/ + +# Browser test artifacts +.playwright-mcp/ diff --git a/README.md b/README.md index 84ac518..31dce02 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,12 @@ **Turn a conference into a game.** Convivo is a mobile-first web app (PWA) that gets attendees out of their seats: mark the sessions you want, scan lanyards to make connections, get checked in by staff, and climb the live leaderboard. The whole thing runs on a **Dockerized Supabase core** — no custom backend. -> **Status:** Phase 0 + Phase 1 complete. +> **Status:** Phase 0 + Phase 1 + Phase 2 complete. > - **Phase 0** — Dockerized Supabase core (Postgres + GoTrue + PostgREST + Realtime + Kong + Studio) with the full schema, RLS, and transactional points RPCs. > - **Phase 1** — Attendee web PWA: login (QR + email), Home, Agenda, Scan/Connect, staff Check-in, Feedback, live Leaderboard, Profile. +> - **Phase 2** — Admin console (desktop-first, admin-role only): Dashboard, Attendees (edit / reset QR / adjust points), Schedule (slots + sessions), Activity. > -> Next: Phase 2 (Admin app), Phase 3 (Pretix ticketing interface), Phase 4 (Sessionize interface). +> Next: Phase 3 (Pretix ticketing interface), Phase 4 (Sessionize interface). --- @@ -43,7 +44,7 @@ The schedule is **data-driven** (stored in Postgres), so times and sessions can |---|---| | **Attendee** | Log in, view agenda, mark preferences, scan peers to connect, get checked in, give feedback, view leaderboard | | **Staff** | Everything an attendee can do, **plus** a Check-in mode: pick a session, scan attendee lanyards to check them in | -| **Admin** | Staff powers **plus** full read/write on all event data (used by the future Admin app) | +| **Admin** | Staff powers **plus** full read/write on all event data (used by the Admin console) | Staff and attendees use the **same app** — the role is an attribute on the profile and changes the Scan tab into a Check-in tab. @@ -197,20 +198,21 @@ npm run db:start # 2. (Re)apply migrations + seed, then restart the stack npm run db:reset -# 3. Run the app (Vite dev server on :3000, proxies to the core) -npm run app:dev +# 3. Run the apps (Vite dev servers, proxy to the core) +npm run app:dev # attendee app on :3000 +npm run admin:dev # admin console on :3001 ``` -Open **http://localhost:3000**. Studio is at **http://localhost:54323** (user `postgres`, password `postgres`). +Open **http://localhost:3000** (attendee) and **http://localhost:3001** (admin). Studio is at **http://localhost:54323** (user `postgres`, password `postgres`). -### Option B — Docker (app as a sidecar) +### Option B — Docker (apps as sidecars) ```bash # 1. Start the Supabase core (creates the supabase_network_Convivo network) npm run db:start -# 2. Build + run the app container on :3000 (joins the Supabase network) +# 2. Build + run both app containers (joins the Supabase network) docker compose up --build ``` -Open **http://localhost:3000**. The app's nginx proxies the Supabase paths to the Kong container on the shared network. +Open **http://localhost:3000** (attendee) and **http://localhost:3001** (admin). Each app's nginx proxies the Supabase paths to the Kong container on the shared network. > **Reset the demo data at any time:** `npm run db:reset` (re-applies migrations + seed). @@ -218,7 +220,8 @@ Open **http://localhost:3000**. The app's nginx proxies the Supabase paths to th | Service | Port | |---|---| -| Convivo app | **3000** | +| Convivo app (attendee) | **3000** | +| Convivo admin | **3001** | | Supabase API (Kong) | 54321 | | Supabase Studio | 54323 | | Postgres | 54322 | @@ -249,6 +252,7 @@ Login = **QR code** (typed or scanned) + **email**. The QR token is the password 2. Scan **Marco** (`CVV-MRC-7712`) → send a connection request. 3. Log in as **Bruno** (staff) → the Scan tab becomes **Check-in** → pick a session → scan **Carla** (`CVV-CAR-6623`) → she gets +10. 4. Watch the **Leaderboard** update live. +5. Open the **admin console** on **:3001** → log in as **Convivo Admin** (`CVV-ADM-0001` / admin@appe.at) → see the Dashboard, reset an attendee's QR, adjust points, and edit the schedule. ## 13. Roadmap @@ -256,8 +260,8 @@ Login = **QR code** (typed or scanned) + **email**. The QR token is the password |---|---|---| | **0** | Dockerized Supabase core: schema, RLS, transactional points RPCs, seed | ✅ | | **1** | Attendee web PWA: login, Home, Agenda, Scan/Connect, Check-in, Feedback, Leaderboard, Profile | ✅ | -| **2** | **Admin app** (admin.appe.at) — manage attendees, sessions, points, event | ⬜ next | -| **3** | **Pretix** interface — sync tickets → attendees (QR tokens, roles) | ⬜ | +| **2** | **Admin app** (admin.appe.at) — manage attendees, sessions, points, event | ✅ | +| **3** | **Pretix** interface — sync tickets → attendees (QR tokens, roles) | ⬜ next | | **4** | **Sessionize** interface — sync the real agenda (slots, sessions, speakers) | ⬜ | > **Subdomains** (`convivo.appe.at`, `admin.appe.at`, `db.appe.at`, `pretix.eu`, `sessionize.com`) do not exist yet — everything runs on **localhost** for now. diff --git a/apps/admin/.dockerignore b/apps/admin/.dockerignore new file mode 100644 index 0000000..9b7c8b5 --- /dev/null +++ b/apps/admin/.dockerignore @@ -0,0 +1,13 @@ +# Keep the Docker build context small and avoid leaking local state. +# NOTE: nginx.conf.template and docker-entrypoint.sh are COPYed by the +# Dockerfile, so they must NOT be excluded here. +node_modules +dist +.env +.env.* +!.env.example +*.tsbuildinfo +.git +.gitignore +Dockerfile +.dockerignore diff --git a/apps/admin/.env.example b/apps/admin/.env.example new file mode 100644 index 0000000..a789941 --- /dev/null +++ b/apps/admin/.env.example @@ -0,0 +1,9 @@ +# Convivo Admin — Supabase local stack. +# +# Same-origin paths (/auth, /rest, /realtime, /storage) are proxied to the local +# Supabase stack (Vite dev server in dev, nginx in Docker). So no URL is needed — +# the client falls back to window.location.origin. Only the anon key is required. +# +# VITE_SUPABASE_URL is intentionally left unset (same-origin). +# The value below is the standard local Supabase anon key (not a secret). +VITE_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 diff --git a/apps/admin/Dockerfile b/apps/admin/Dockerfile new file mode 100644 index 0000000..3b7b9c0 --- /dev/null +++ b/apps/admin/Dockerfile @@ -0,0 +1,35 @@ +# Convivo Admin app — multi-stage build. +# +# Stage 1 (build): compile the Vite/React/TS app into static assets. +# Stage 2 (serve): nginx serves the static build and proxies the Supabase +# same-origin paths (/auth, /rest, /realtime, /storage) to the Supabase core. +# +# The Supabase core itself is NOT built here — it runs via the Supabase CLI +# (`supabase start`) or as a separate container. See the root docker-compose.yml. + +# ---- Build stage ------------------------------------------------------------- +FROM node:20-alpine AS build +WORKDIR /app + +# Install deps first for better layer caching (reproducible via lock file). +COPY package.json package-lock.json ./ +RUN npm ci + +# Copy sources and build. The anon key is baked in at build time (it is not a +# secret — it is the standard local Supabase anon key). Override with +# --build-arg VITE_SUPABASE_ANON_KEY=... if you use a custom key. +ARG VITE_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 +ENV VITE_SUPABASE_ANON_KEY=$VITE_SUPABASE_ANON_KEY +COPY . . +RUN npm run build + +# ---- Serve stage ------------------------------------------------------------- +FROM nginx:1.27-alpine AS serve +# nginx template: serve the SPA + proxy Supabase paths to the core. The proxy +# target is injected at container start (see docker-entrypoint.sh). +COPY nginx.conf.template /etc/nginx/conf.d/default.conf.template +COPY docker-entrypoint.sh /docker-entrypoint.sh +RUN chmod +x /docker-entrypoint.sh +COPY --from=build /app/dist /usr/share/nginx/html +EXPOSE 3001 +ENTRYPOINT ["/docker-entrypoint.sh"] diff --git a/apps/admin/docker-entrypoint.sh b/apps/admin/docker-entrypoint.sh new file mode 100644 index 0000000..b954f55 --- /dev/null +++ b/apps/admin/docker-entrypoint.sh @@ -0,0 +1,19 @@ +#!/bin/sh +# Convivo Admin app — container entrypoint. +# +# Injects the Supabase proxy target into the nginx config template, then starts +# nginx. The target defaults to the Kong container on the shared Supabase +# network (supabase_kong_Convivo:8000 — Kong's internal port; 54321 is the +# host-only mapping). Override with SUPABASE_PROXY_TARGET +# (e.g. host.docker.internal:54321) if the core is not on the shared network. +set -eu + +TARGET="${SUPABASE_PROXY_TARGET:-supabase_kong_Convivo:8000}" +TEMPLATE=/etc/nginx/conf.d/default.conf.template +CONF=/etc/nginx/conf.d/default.conf + +echo "[convivo-admin] Proxying Supabase paths to: ${TARGET}" +sed "s|__SUPABASE_PROXY_TARGET__|${TARGET}|g" "${TEMPLATE}" > "${CONF}" + +# Run nginx in the foreground. +exec nginx -g "daemon off;" diff --git a/apps/admin/index.html b/apps/admin/index.html new file mode 100644 index 0000000..e9acdb9 --- /dev/null +++ b/apps/admin/index.html @@ -0,0 +1,19 @@ + + + + + + + + + + + + + Convivo Admin + + +
+ + + diff --git a/apps/admin/nginx.conf.template b/apps/admin/nginx.conf.template new file mode 100644 index 0000000..7aa6f6b --- /dev/null +++ b/apps/admin/nginx.conf.template @@ -0,0 +1,77 @@ +# Convivo Admin app — nginx server block (template). +# +# Serves the built SPA and proxies the Supabase same-origin paths +# (/auth, /rest, /realtime, /storage) to the Supabase core. +# +# The proxy target is injected at container start by /docker-entrypoint.sh +# from the SUPABASE_PROXY_TARGET env var (default: supabase_kong_Convivo:8000, +# i.e. the Kong container on the shared Supabase network — Kong's internal port). +# +# The placeholder __SUPABASE_PROXY_TARGET__ is replaced before nginx starts. + +server { + listen 3001; + server_name _; + + root /usr/share/nginx/html; + index index.html; + + gzip on; + gzip_types text/plain text/css application/json application/javascript image/svg+xml; + + # SPA fallback: any non-file, non-proxied route serves index.html so the + # client-side router can take over. + location / { + try_files $uri $uri/ /index.html; + } + + # Long-cache immutable build assets. + location /assets/ { + expires 30d; + add_header Cache-Control "public, immutable"; + try_files $uri =404; + } + + # ---- Supabase same-origin proxy ------------------------------------- + # No trailing slash on proxy_pass => the original URI is passed through + # unchanged (e.g. /auth/v1/token -> http:///auth/v1/token). + + location /auth/ { + proxy_pass http://__SUPABASE_PROXY_TARGET__; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + location /rest/ { + proxy_pass http://__SUPABASE_PROXY_TARGET__; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + # Realtime uses WebSockets — enable the upgrade handshake. + location /realtime/ { + proxy_pass http://__SUPABASE_PROXY_TARGET__; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 3600s; + proxy_send_timeout 3600s; + } + + location /storage/ { + proxy_pass http://__SUPABASE_PROXY_TARGET__; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + client_max_body_size 50M; + } +} diff --git a/apps/admin/package-lock.json b/apps/admin/package-lock.json new file mode 100644 index 0000000..5787283 --- /dev/null +++ b/apps/admin/package-lock.json @@ -0,0 +1,1910 @@ +{ + "name": "@convivo/admin", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@convivo/admin", + "version": "0.1.0", + "dependencies": { + "@supabase/supabase-js": "^2.45.4", + "qrcode.react": "^4.0.1", + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@types/react": "^18.3.5", + "@types/react-dom": "^18.3.0", + "@vitejs/plugin-react": "^4.3.1", + "typescript": "^5.5.4", + "vite": "^5.4.8" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", + "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helpers": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.8.tgz", + "integrity": "sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.8", + "@babel/types": "^7.29.8", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", + "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", + "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", + "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.8.tgz", + "integrity": "sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.8" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.29.7.tgz", + "integrity": "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.29.7.tgz", + "integrity": "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.8.tgz", + "integrity": "sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.8", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.8", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.8", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.8", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz", + "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@napi-rs/lzma-linux-x64-gnu": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", + "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^22.20 || ^24.12 || >=25" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.27", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", + "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.62.5.tgz", + "integrity": "sha512-jfkGfTwhQpsiSckPF8r9bU3pn3vyd72NlWaO+TgEO6WPSDnUhXzrNYCHBMOYj0ACaUgjm6eERLF+XV9a6RstoA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.62.5.tgz", + "integrity": "sha512-oGVqyQlxnrz9/ty89oHpU857VUHEl5/Xu4R2lS+aivCTrNnSsbiENzTnNaBsjxH0CNWGPhzHArOLFwo+oKXveA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.62.5.tgz", + "integrity": "sha512-bW7B8xMEq8n99Q3ieEcPRGuphurdZAaFzQc9Efyyw3FL6DZO6pMy9xhdN+kBoD7Sy05xNXSr4OyPPnpkYriS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.62.5.tgz", + "integrity": "sha512-YSwBS86QeHOGlrxJ1PSOIZSkzRL/JmKeunhc+lV6M1a6En8QuVCD/T/qIA0J4Gd2Y86RIOBYrLcOUtqGh9+/1w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.62.5.tgz", + "integrity": "sha512-2fST8lILgl7cKbme/1KDdPCmbXbG+gqoV3bHp19L0ypX/3akYMBVdOunPleRCwonoLnXOZ/0F+Mt/v8POFmfcQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.62.5.tgz", + "integrity": "sha512-cpIxQCP9J+EVad0a6LO1kY3ZGODlk80VlI+2I96B8xMcdHZ4pLVhfQ49JFpYqjPF91FFkQWftf57YlDcTiw9yQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.62.5.tgz", + "integrity": "sha512-r9fGh3eFs3e/udWh5ZjXQtxiYK/xoFxQaYR/cELxac/Udkl5Th+IsFm0CX3Kl9hmUH/we7EoMpjJgeQNnE0+IA==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.62.5.tgz", + "integrity": "sha512-xdvFdp7OM6KLJviJT2g/YuRSUjnZgGHk4RNgwIbN7X6cPugOucV60DdHXWzsBVCUdrGb6qSXnJQrrAKMmQuj3Q==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.62.5.tgz", + "integrity": "sha512-rRqILAndyzHzP7T9NFQrq+4HFWNhqkqkKur7eiBpfLmz01PO0JKx5Vchu3YllE4YXI/Ftgq/szrDWg5GJ0mI8g==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.62.5.tgz", + "integrity": "sha512-Gf4X3qVMucayUvux6aXXPgXovocSFUC0rrffDuPI/S2nHhNMhjcZxsrAFYCOF350PRreW1XwzFj3CT/3bKsWCw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.62.5.tgz", + "integrity": "sha512-+s5qA0TNM0qm8PK/a5gt/1Hpx+NV08uSuCncvhziIlQzT6AEV2fnUQo7eBtFTFO0nA9scauvoR2HusfXmQnO4w==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.62.5.tgz", + "integrity": "sha512-ybb6QvWwWJCbBWqERpc8K3pYVGIrXlG8MEQ8IIuJY6Y9KdHQxoFoNyfkAOtKn1VHu3KuLidXvwrvGR1mEjeWCw==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.62.5.tgz", + "integrity": "sha512-nZb1DtnOyhCmYvsC8A2CwOkopVg+IS1+fPUa7rMOAXtNw5+lLCLLPqd6XAiNrGtoQKsbvIBOwsHnBH/3wnb4HQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.62.5.tgz", + "integrity": "sha512-yMbj63Sp89ryrXLWyz+sy+fYD2HpOnMCLGbe4Oa1smclFSUukdtD/BgdiHaAetJNb74URD8U4hM+qG5KVzMEkg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.62.5.tgz", + "integrity": "sha512-mhoan3OJw2kYV/e1jtIdmvUZgyBFeA6zGWsOswmR0Tg19TQbowZuR+JMLID6spbbBN7Zee2ejrgmy3+FxGrIdA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.62.5.tgz", + "integrity": "sha512-5ZTLmjWbb1VZdjuyhe83K/8QO0/h11midQCBP+X5OYn32ra7eOBoM0ZqtaY4nkgNsYgmdVhMYPoyVPTjUpHf3w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.62.5.tgz", + "integrity": "sha512-m53kG+br6PGxOTmgBEM2DHSDs9RVjsyEbUwjJPJGTFm1grWOG8EKJggDCTb60unD4Tjby8fi7/m9XfkEWasVWg==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.62.5.tgz", + "integrity": "sha512-6RHPJR1g/uvdYU8uXBnfq3nlqyZCP82Fr6NHgfGoaIeSh0YEqnX/x6uA9MmJJbnSH7swqX4F+CkGdUF+6doiQA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.62.5.tgz", + "integrity": "sha512-xs+OXQtEXgpXT0DmA5+U3qnRZHdCST/5HRQxS8wSPZTUZN/EMWeHuSIod32LQklTBZBV9DyfncKBQ8n5V3eFdw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.62.5.tgz", + "integrity": "sha512-e7hD+sl3s+mcLQDZ8pbudBVsdG6r5yN4w3LqG2TJ8sQHDpblWj5lrJs/3m01Cvlxbt4x13zu5thLjgypgtkYzw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.62.5.tgz", + "integrity": "sha512-GiyJaCf+WpMub/17aPcKk27QMl5W6f+KhdPTjlFOn5akH5Wa/DCM9Stdx5cDfmasyKB08MqpVQ1uJE2RkkpbXg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.62.5.tgz", + "integrity": "sha512-+OQ8U2DdoEfXl8T4Fb18AjmEwbXMerKDKCL8yCPAYhKCEEKoul7rkbeGCBFCbAlaGaa7pmtRTpkAJM2LE/i5FA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.62.5.tgz", + "integrity": "sha512-KanvAZrPKbDBFwrgiU9yEVpQoox9QPV1WZOXX7HudJQY+eSlu82CtWxDU8WtuRRvtN5EGkLczkd6Y6DTcvm9wA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.62.5.tgz", + "integrity": "sha512-1aC3UEWTtRl3RK3VpDJ/Tqk1XI4SLTmXIthAq6wRWo8XiSXJNd+VprJM4/1P4+i6HIaFEFlVi9sTTziniD2tOQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.62.5.tgz", + "integrity": "sha512-/gDJaRs4gl0NPIwqCz+6PkpmhhjRAD2j6P4rSNHBzUkO3naEx2mIU0pRle1vUNRQ7mE/+8OOeXLTv/J56FKiQg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@supabase/auth-js": { + "version": "2.112.3", + "resolved": "https://registry.npmjs.org/@supabase/auth-js/-/auth-js-2.112.3.tgz", + "integrity": "sha512-NA0rsgAlWZPvbhw8aUdmgfpHVgUAcd8zK5ov43l++o1bLIPXZhRiAlRobhwF5AatQuovpqxsMH50F4oyyV4XZw==", + "license": "MIT", + "dependencies": { + "tslib": "2.8.1" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@supabase/functions-js": { + "version": "2.112.3", + "resolved": "https://registry.npmjs.org/@supabase/functions-js/-/functions-js-2.112.3.tgz", + "integrity": "sha512-gfv481mTOVWtZIJgXupxZpni2V2UWPf6jeF/jOK7HdMHdH+mt6sU0sHHwf0POsPip8ltlulu9OUHgwVzl5ddRw==", + "license": "MIT", + "dependencies": { + "tslib": "2.8.1" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@supabase/phoenix": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/@supabase/phoenix/-/phoenix-0.4.5.tgz", + "integrity": "sha512-aAn9H9ovVyeApKy11OWOrrOGq8DV68yWeH4ud2lN9fzn4aO8Zb5GLL9m1pUg9nLqIcT+ZDfAcsZe0E/nqdv2lw==", + "license": "MIT" + }, + "node_modules/@supabase/postgrest-js": { + "version": "2.112.3", + "resolved": "https://registry.npmjs.org/@supabase/postgrest-js/-/postgrest-js-2.112.3.tgz", + "integrity": "sha512-+Mf6uCpzr00bqxwX8hTK2X2L9eAL/1vuOjdEjx6upz9ulb0RmQT16XeU/JkMUlVHw/B46ZnPa2busY4Kd9YCzw==", + "license": "MIT", + "dependencies": { + "tslib": "2.8.1" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@supabase/realtime-js": { + "version": "2.112.3", + "resolved": "https://registry.npmjs.org/@supabase/realtime-js/-/realtime-js-2.112.3.tgz", + "integrity": "sha512-E6wljXWs7DUOloyIB69i3YFInWE6IyCvgTAbQ0KYxOHv26FdA1KzEXTuzxrYEdf70t406Z9BRwUlGyclGF2FXA==", + "license": "MIT", + "dependencies": { + "@supabase/phoenix": "0.4.5", + "tslib": "2.8.1" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@supabase/storage-js": { + "version": "2.112.3", + "resolved": "https://registry.npmjs.org/@supabase/storage-js/-/storage-js-2.112.3.tgz", + "integrity": "sha512-oSK61tzlUvg+BWPqpKQCu9qqonsO26btaoAR9D6Gest2aj7xUqToj9rKyaoYOJczkhg9BjqA1REbYy9tPI4bDA==", + "license": "MIT", + "dependencies": { + "iceberg-js": "^0.8.1", + "tslib": "2.8.1" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@supabase/supabase-js": { + "version": "2.112.3", + "resolved": "https://registry.npmjs.org/@supabase/supabase-js/-/supabase-js-2.112.3.tgz", + "integrity": "sha512-Jv1bxVQmEJNkjvPEhFaKjPzsh+Ozyew6lWGD+SoYcsclDEP1z7yEvKvfUQfzy0DkxRIQnZNxmmWtAzw5XLTQoA==", + "license": "MIT", + "dependencies": { + "@supabase/auth-js": "2.112.3", + "@supabase/functions-js": "2.112.3", + "@supabase/postgrest-js": "2.112.3", + "@supabase/realtime-js": "2.112.3", + "@supabase/storage-js": "2.112.3" + }, + "engines": { + "node": ">=22.0.0" + }, + "peerDependencies": { + "@opentelemetry/api": ">=1.0.0" + }, + "peerDependenciesMeta": { + "@opentelemetry/api": { + "optional": true + } + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/prop-types": { + "version": "15.7.15", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", + "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/react": { + "version": "18.3.31", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.31.tgz", + "integrity": "sha512-vfEqpXTvwT91yhmwdfouStN2hSKwTvyRs8qpLfADyrq/kxDw0hZM7Wk9Ug1FELj8hIby+S/+kQCSRFF32nv2Qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.3.7", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.7.tgz", + "integrity": "sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^18.0.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", + "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.28.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-beta.27", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.17.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.18", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.18.tgz", + "integrity": "sha512-1iEmLEYSiE1SeBoAfPo/Mnx3PzfzHUkDK61ASkCpuk3YXugYLH5DYK1SzqV55F8FMI6s0F+/tCP7Polz1QRjxw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.28.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.8.tgz", + "integrity": "sha512-V2NpofLblG64mfOtSgDhOJESZEGogzDMBv/q+W6oc4LXWP/q75eOXoOaaOu1EOadB9U4Bwx/e0yzbvwKH8zalA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.11.12", + "caniuse-lite": "^1.0.30001809", + "electron-to-chromium": "^1.5.402", + "node-releases": "^2.0.53", + "update-browserslist-db": "^1.3.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001809", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001809.tgz", + "integrity": "sha512-xxWVywk6a6Arlk+hymeycyn/VgqEfLDxupvhH/xiY5SJ/18kmi9o6MiO320DCUzypORHLtvh0I4i04tUhCNHNQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.412", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.412.tgz", + "integrity": "sha512-z4rMe3esBzlzovKHj4gxJnsCGZRK5l4baUvm+gCGJBPE+gsyUMKsuU9tnEUtI1dOebXz1ytAPGjvXhmQ7rIPwA==", + "dev": true, + "license": "ISC" + }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/iceberg-js": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/iceberg-js/-/iceberg-js-0.8.1.tgz", + "integrity": "sha512-1dhVQZXhcHje7798IVM+xoo/1ZdVfzOMIc8/rgVSijRK38EDqOJoGula9N/8ZI5RD8QTxNQtK/Gozpr+qUqRRA==", + "license": "MIT", + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.53", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.53.tgz", + "integrity": "sha512-D9UOmYG3UH1V+ENW56t5QXBwJw1YEY18ruVeus89Rw+SyIgjPkCO84bRzO3uNIYosJbNwiabWVn48o3uJLjxFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/postcss": { + "version": "8.5.26", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz", + "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.17", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/qrcode.react": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/qrcode.react/-/qrcode.react-4.2.0.tgz", + "integrity": "sha512-QpgqWi8rD9DsS9EP3z7BT+5lY5SFhsqGjpgW5DY/i3mK4M9DTBNz3ErMi8BWYEfI3L0d8GIbGmcdFAS1uIRGjA==", + "license": "ISC", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-refresh": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", + "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.62.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.5.tgz", + "integrity": "sha512-/tqMfgP7GPA3PHhCmuiS4vIjrSVhHLgY++i+dhbG462euyAj7FpM4D9uq1X3BgjlqRdpcOrYhcQtfiQLNc8tqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@napi-rs/lzma-linux-x64-gnu": "1.5.1", + "@rollup/rollup-android-arm-eabi": "4.62.5", + "@rollup/rollup-android-arm64": "4.62.5", + "@rollup/rollup-darwin-arm64": "4.62.5", + "@rollup/rollup-darwin-x64": "4.62.5", + "@rollup/rollup-freebsd-arm64": "4.62.5", + "@rollup/rollup-freebsd-x64": "4.62.5", + "@rollup/rollup-linux-arm-gnueabihf": "4.62.5", + "@rollup/rollup-linux-arm-musleabihf": "4.62.5", + "@rollup/rollup-linux-arm64-gnu": "4.62.5", + "@rollup/rollup-linux-arm64-musl": "4.62.5", + "@rollup/rollup-linux-loong64-gnu": "4.62.5", + "@rollup/rollup-linux-loong64-musl": "4.62.5", + "@rollup/rollup-linux-ppc64-gnu": "4.62.5", + "@rollup/rollup-linux-ppc64-musl": "4.62.5", + "@rollup/rollup-linux-riscv64-gnu": "4.62.5", + "@rollup/rollup-linux-riscv64-musl": "4.62.5", + "@rollup/rollup-linux-s390x-gnu": "4.62.5", + "@rollup/rollup-linux-x64-gnu": "4.62.5", + "@rollup/rollup-linux-x64-musl": "4.62.5", + "@rollup/rollup-openbsd-x64": "4.62.5", + "@rollup/rollup-openharmony-arm64": "4.62.5", + "@rollup/rollup-win32-arm64-msvc": "4.62.5", + "@rollup/rollup-win32-ia32-msvc": "4.62.5", + "@rollup/rollup-win32-x64-gnu": "4.62.5", + "@rollup/rollup-win32-x64-msvc": "4.62.5", + "fsevents": "~2.3.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.1.tgz", + "integrity": "sha512-ZZ61DsRsOnakl74HAmp3oSN4aXUmEWXf+i/yv0h7tIBfICc3VdrFErQKUUKPgu3AMsTUMbcongALEN4l6GSUrQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/vite": { + "version": "5.4.21", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.21.tgz", + "integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/apps/admin/package.json b/apps/admin/package.json new file mode 100644 index 0000000..3bf1a82 --- /dev/null +++ b/apps/admin/package.json @@ -0,0 +1,24 @@ +{ + "name": "@convivo/admin", + "private": true, + "version": "0.1.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "preview": "vite preview" + }, + "dependencies": { + "@supabase/supabase-js": "^2.45.4", + "qrcode.react": "^4.0.1", + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@types/react": "^18.3.5", + "@types/react-dom": "^18.3.0", + "@vitejs/plugin-react": "^4.3.1", + "typescript": "^5.5.4", + "vite": "^5.4.8" + } +} diff --git a/apps/admin/public/favicon.svg b/apps/admin/public/favicon.svg new file mode 100644 index 0000000..65fa75d --- /dev/null +++ b/apps/admin/public/favicon.svg @@ -0,0 +1,10 @@ + + + + + + + + + C + diff --git a/apps/admin/public/icon-192.png b/apps/admin/public/icon-192.png new file mode 100644 index 0000000000000000000000000000000000000000..8c1e1f9e5e98ce2505aeb4684307c16e63ef683d GIT binary patch literal 2848 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'dashboard'); + + if (loading) { + return ( +
+ +
+ ); + } + + if (!profile) return ; + + return ( +
+ + +
+ {view === 'dashboard' && } + {view === 'attendees' && } + {view === 'schedule' && } + {view === 'activity' && } +
+
+ ); +} + +export function App() { + return ( + + + + + + ); +} diff --git a/apps/admin/src/components/ui.tsx b/apps/admin/src/components/ui.tsx new file mode 100644 index 0000000..3db11a0 --- /dev/null +++ b/apps/admin/src/components/ui.tsx @@ -0,0 +1,85 @@ +import { type ReactNode } from 'react'; +import { QRCodeSVG } from 'qrcode.react'; + +const AV_COLORS = ['#d50000', '#20b2aa', '#e11d48', '#0d9488', '#f59e0b', '#0ea5e9', '#dc2626', '#7c3aed', '#16a34a', '#ea580c', '#0891b2', '#db2777']; + +export function initials(name: string): string { + return name + .split(' ') + .map((w) => w[0]) + .slice(0, 2) + .join('') + .toUpperCase(); +} + +export function avColor(seed: string): string { + let h = 0; + for (const c of seed) h = (h * 31 + c.charCodeAt(0)) >>> 0; + return AV_COLORS[h % AV_COLORS.length]; +} + +export function Avatar({ name, id, size = 40, fs = 14 }: { name: string; id: string; size?: number; fs?: number }) { + return ( + + {initials(name)} + + ); +} + +export function Spinner() { + return ; +} + +export function Empty({ icon, text }: { icon: string; text: string }) { + return ( +
+
{icon}
+ {text} +
+ ); +} + +/** Centered modal dialog (desktop-first). */ +export function Modal({ + open, + onClose, + title, + children, + footer, +}: { + open: boolean; + onClose: () => void; + title: string; + children: ReactNode; + footer?: ReactNode; +}) { + if (!open) return null; + return ( +
e.target === e.currentTarget && onClose()}> +
+
+

{title}

+ +
+
{children}
+ {footer &&
{footer}
} +
+
+ ); +} + +/** Render a string (e.g. a QR token) as a scannable QR code. */ +export function QrImage({ value, size = 180 }: { value: string; size?: number }) { + return ( +
+ +
+ ); +} + +/** Small colored badge for a role. */ +export function RoleBadge({ role }: { role: string }) { + return {role}; +} diff --git a/apps/admin/src/context/AuthContext.tsx b/apps/admin/src/context/AuthContext.tsx new file mode 100644 index 0000000..2979ba3 --- /dev/null +++ b/apps/admin/src/context/AuthContext.tsx @@ -0,0 +1,108 @@ +import { createContext, useContext, useEffect, useState, type ReactNode } from 'react'; +import { supabase } from '../lib/supabase'; +import type { Profile } from '../lib/types'; + +interface AuthState { + profile: Profile | null; + loading: boolean; + signIn: (email: string, qrToken: string) => Promise; + signOut: () => Promise; +} + +const AuthContext = createContext(null); + +export function AuthProvider({ children }: { children: ReactNode }) { + const [profile, setProfile] = useState(null); + const [loading, setLoading] = useState(true); + + // On mount: restore any existing session and load the profile. If the + // session belongs to a non-admin, sign out immediately (admin-only app). + useEffect(() => { + let cancelled = false; + + async function init() { + const { data } = await supabase.auth.getSession(); + const session = data.session; + if (!session) { + if (!cancelled) setLoading(false); + return; + } + const { data: prof } = await supabase + .from('profiles') + .select('*') + .eq('id', session.user.id) + .maybeSingle(); + if (cancelled) return; + if (prof && prof.role === 'admin') { + setProfile(prof as Profile); + } else { + // Not an admin — clear the session. + await supabase.auth.signOut(); + } + setLoading(false); + } + + init(); + + const { data: sub } = supabase.auth.onAuthStateChange(async (_event, session) => { + if (!session) { + setProfile(null); + return; + } + const { data: prof } = await supabase + .from('profiles') + .select('*') + .eq('id', session.user.id) + .maybeSingle(); + if (prof && prof.role === 'admin') { + setProfile(prof as Profile); + } else { + await supabase.auth.signOut(); + setProfile(null); + } + }); + + return () => { + cancelled = true; + sub.subscription.unsubscribe(); + }; + }, []); + + async function signIn(email: string, qrToken: string) { + const { data, error } = await supabase.auth.signInWithPassword({ + email, + password: qrToken, + }); + if (error) throw new Error(error.message); + + const { data: prof } = await supabase + .from('profiles') + .select('*') + .eq('id', data.user.id) + .maybeSingle(); + + if (!prof || prof.role !== 'admin') { + // Signed in, but not an admin — reject and sign out. + await supabase.auth.signOut(); + throw new Error('This account is not an admin.'); + } + setProfile(prof as Profile); + } + + async function signOut() { + await supabase.auth.signOut(); + setProfile(null); + } + + return ( + + {children} + + ); +} + +export function useAuth(): AuthState { + const ctx = useContext(AuthContext); + if (!ctx) throw new Error('useAuth must be used within AuthProvider'); + return ctx; +} diff --git a/apps/admin/src/context/ToastContext.tsx b/apps/admin/src/context/ToastContext.tsx new file mode 100644 index 0000000..bfde4ad --- /dev/null +++ b/apps/admin/src/context/ToastContext.tsx @@ -0,0 +1,53 @@ +import { createContext, useCallback, useContext, useState, type ReactNode } from 'react'; + +type ToastKind = 'success' | 'error' | 'info'; +interface Toast { + id: number; + kind: ToastKind; + message: string; +} + +interface ToastState { + toasts: Toast[]; + push: (kind: ToastKind, message: string) => void; + dismiss: (id: number) => void; +} + +const ToastContext = createContext(null); +let nextId = 1; + +export function ToastProvider({ children }: { children: ReactNode }) { + const [toasts, setToasts] = useState([]); + + const dismiss = useCallback((id: number) => { + setToasts((t) => t.filter((x) => x.id !== id)); + }, []); + + const push = useCallback( + (kind: ToastKind, message: string) => { + const id = nextId++; + setToasts((t) => [...t, { id, kind, message }]); + window.setTimeout(() => dismiss(id), 3800); + }, + [dismiss], + ); + + return ( + + {children} +
+ {toasts.map((t) => ( +
dismiss(t.id)}> + {t.message} +
+ ))} +
+
+ ); +} + +export function useToast(): ToastState { + const ctx = useContext(ToastContext); + if (!ctx) throw new Error('useToast must be used within ToastProvider'); + return ctx; +} diff --git a/apps/admin/src/lib/api.ts b/apps/admin/src/lib/api.ts new file mode 100644 index 0000000..708bf6a --- /dev/null +++ b/apps/admin/src/lib/api.ts @@ -0,0 +1,61 @@ +import { supabase } from './supabase'; +import type { + Checkin, + Connection, + Feedback, + LeaderboardRow, + PointsLogRow, + Profile, + ResetQrResult, + Session, + Slot, +} from './types'; + +export class ApiError extends Error {} + +async function rpc(fn: string, args: Record): Promise { + const { data, error } = await supabase.rpc(fn, args); + if (error) throw new ApiError(error.message); + return data as T; +} + +async function all(table: string, order?: { col: string; asc?: boolean }): Promise { + let q = supabase.from(table).select('*'); + if (order) q = q.order(order.col, { ascending: order.asc ?? true }); + const { data, error } = await q; + if (error) throw new ApiError(error.message); + return data as T[]; +} + +// ---- Reads (admin can read all rows via RLS) -------------------------------- + +export const getAllProfiles = () => all('profiles', { col: 'points', asc: false }); +export const getAllSlots = () => all('slots', { col: 'id' }); +export const getAllSessions = () => all('sessions', { col: 'slot_id' }); +export const getAllConnections = () => all('connections', { col: 'created_at', asc: false }); +export const getAllCheckins = () => all('checkins', { col: 'created_at', asc: false }); +export const getAllFeedback = () => all('feedback', { col: 'created_at', asc: false }); +export const getAllPointsLog = () => all('points_log', { col: 'created_at', asc: false }); +export const getLeaderboard = () => all('leaderboard', { col: 'points', asc: false }); + +// ---- Writes (admin only) ---------------------------------------------------- + +/** Update an attendee's editable fields (name, company, role). */ +export async function updateProfile( + id: string, + patch: { full_name?: string; company?: string | null; role?: Profile['role'] }, +): Promise { + const { error } = await supabase.from('profiles').update(patch).eq('id', id); + if (error) throw new ApiError(error.message); +} + +/** Admin manual points adjustment (audited as 'admin'). */ +export async function adjustPoints(profileId: string, delta: number, reason: string): Promise { + await rpc('adjust_points', { p_profile_id: profileId, p_delta: delta, p_reason: reason }); +} + +/** Regenerate an attendee's QR token (syncs the auth password, forces re-login). */ +export async function resetQrToken(profileId: string): Promise { + const rows = await rpc('reset_qr_token', { p_profile_id: profileId }); + return rows[0]; +} diff --git a/apps/admin/src/lib/supabase.ts b/apps/admin/src/lib/supabase.ts new file mode 100644 index 0000000..b379376 --- /dev/null +++ b/apps/admin/src/lib/supabase.ts @@ -0,0 +1,22 @@ +import { createClient } from '@supabase/supabase-js'; + +// The app talks to Supabase through same-origin paths (/auth, /rest, /realtime, +// /storage). In dev the Vite server proxies them to the local Supabase stack; +// in Docker the app's nginx does the same. This avoids CORS entirely. +const url = import.meta.env.VITE_SUPABASE_URL || window.location.origin; +const anonKey = import.meta.env.VITE_SUPABASE_ANON_KEY; + +if (!anonKey) { + console.warn('[convivo-admin] VITE_SUPABASE_ANON_KEY is not set.'); +} + +export const supabase = createClient(url, anonKey, { + auth: { + persistSession: true, + autoRefreshToken: true, + detectSessionInUrl: false, + }, + realtime: { + params: { eventsPerSecond: 10 }, + }, +}); diff --git a/apps/admin/src/lib/types.ts b/apps/admin/src/lib/types.ts new file mode 100644 index 0000000..eb3a47e --- /dev/null +++ b/apps/admin/src/lib/types.ts @@ -0,0 +1,80 @@ +export type Role = 'attendee' | 'staff' | 'admin'; + +export interface Profile { + id: string; + email: string; + full_name: string; + company: string | null; + role: Role; + qr_token: string | null; + points: number; + created_at: string; +} + +export interface Slot { + id: number; + name: string; + slot_date: string; + start_time: string; + end_time: string; +} + +export interface Session { + id: string; + title: string; + description: string | null; + slot_id: number; + room: string | null; + capacity: number | null; + speakers: string | null; + created_at: string; +} + +export type ConnectionStatus = 'pending' | 'accepted' | 'rejected'; + +export interface Connection { + id: string; + from_id: string; + to_id: string; + status: ConnectionStatus; + created_at: string; + resolved_at: string | null; +} + +export interface Checkin { + id: string; + profile_id: string; + session_id: string; + staff_id: string; + created_at: string; +} + +export interface Feedback { + id: string; + profile_id: string; + session_id: string; + rating: number; + comment: string | null; + created_at: string; +} + +export interface LeaderboardRow { + profile_id: string; + full_name: string; + company: string | null; + points: number; + updated_at: string; +} + +export interface PointsLogRow { + id: string; + profile_id: string; + delta: number; + category: 'checkin' | 'connection' | 'feedback' | 'admin'; + created_at: string; +} + +export interface ResetQrResult { + profile_id: string; + qr_token: string; +} diff --git a/apps/admin/src/main.tsx b/apps/admin/src/main.tsx new file mode 100644 index 0000000..ed0dc63 --- /dev/null +++ b/apps/admin/src/main.tsx @@ -0,0 +1,10 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import { App } from './App'; +import './styles.css'; + +ReactDOM.createRoot(document.getElementById('root')!).render( + + + , +); diff --git a/apps/admin/src/screens/Login.tsx b/apps/admin/src/screens/Login.tsx new file mode 100644 index 0000000..670629b --- /dev/null +++ b/apps/admin/src/screens/Login.tsx @@ -0,0 +1,72 @@ +import { useState, type FormEvent } from 'react'; +import { useAuth } from '../context/AuthContext'; +import { useToast } from '../context/ToastContext'; + +export function Login() { + const { signIn } = useAuth(); + const { push } = useToast(); + const [email, setEmail] = useState(''); + const [token, setToken] = useState(''); + const [busy, setBusy] = useState(false); + const [error, setError] = useState(null); + + async function onSubmit(e: FormEvent) { + e.preventDefault(); + if (!email.trim() || !token.trim()) return; + setBusy(true); + setError(null); + try { + await signIn(email.trim(), token.trim().toUpperCase()); + push('success', 'Welcome back'); + } catch (err) { + const msg = err instanceof Error ? err.message : 'Sign in failed'; + setError(msg); + push('error', msg); + } finally { + setBusy(false); + } + } + + return ( +
+
+
+
C
+
+

Convivo Admin

+

Sign in with your admin QR token and email.

+
+
+
+
+ + setEmail(e.target.value)} + autoComplete="username" + required + /> +
+
+ + setToken(e.target.value)} + autoComplete="current-password" + required + /> +
+ {error &&
{error}
} + +
+
+
+ ); +} diff --git a/apps/admin/src/styles.css b/apps/admin/src/styles.css new file mode 100644 index 0000000..b686229 --- /dev/null +++ b/apps/admin/src/styles.css @@ -0,0 +1,219 @@ +* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; } +:root { + --bg: #f0f2f6; --surface: #ffffff; --surface-2: #f4f5f9; + --line: #e4e6ee; --text: #423c3c; --muted: #8a8484; + --accent: #d50000; --accent-2: #20b2aa; --accent-soft: rgba(213,0,0,.08); + --cyan: #20b2aa; --amber: #f59e0b; --green: #059669; --red: #d50000; + --sidebar: #1f1b1b; --sidebar-2: #2a2424; +} +html, body, #root { height: 100%; } +body { + background: radial-gradient(1100px 700px at 80% -10%, rgba(213,0,0,.05) 0%, var(--bg) 55%); + font-family: 'Poppins', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; + color: var(--text); +} + +/* ---------- App shell (sidebar + content) ---------- */ +.app { display: flex; height: 100dvh; overflow: hidden; } + +.sidebar { + width: 248px; flex-shrink: 0; background: var(--sidebar); color: #fff; + display: flex; flex-direction: column; padding: 22px 16px; gap: 6px; +} +.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; } +.brand .logo { + width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; + font-size: 22px; font-weight: 900; background: linear-gradient(135deg, var(--accent), #ff5a4e); + box-shadow: 0 8px 20px rgba(213,0,0,.4); color: #fff; +} +.brand .name { font-weight: 800; font-size: 17px; letter-spacing: -.3px; } +.brand .sub { font-size: 11px; color: rgba(255,255,255,.5); font-weight: 600; } + +.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; } +.nav-item { + display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; + background: none; border: none; color: rgba(255,255,255,.62); font-size: 14.5px; font-weight: 600; + cursor: pointer; font-family: inherit; text-align: left; transition: background .12s, color .12s; +} +.nav-item .ico { font-size: 19px; width: 22px; text-align: center; } +.nav-item:hover { background: var(--sidebar-2); color: #fff; } +.nav-item.active { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(213,0,0,.35); } + +.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); } +.admin-card { display: flex; align-items: center; gap: 10px; padding: 8px; } +.admin-card .who { min-width: 0; } +.admin-card .who .n { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.admin-card .who .e { font-size: 11px; color: rgba(255,255,255,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.signout { + margin-top: 10px; width: 100%; padding: 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.16); + background: none; color: rgba(255,255,255,.7); font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; +} +.signout:hover { background: rgba(255,255,255,.08); color: #fff; } + +.content { flex: 1; overflow-y: auto; padding: 30px 34px 60px; } +.content::-webkit-scrollbar { width: 10px; } +.content::-webkit-scrollbar-thumb { background: #d5d8e2; border-radius: 8px; } + +.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; } +.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.6px; } +.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 3px; } + +/* ---------- Primitives ---------- */ +.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: 0 8px 24px rgba(66,60,60,.06); } +.muted { color: var(--muted); } +.small { font-size: 12.5px; } +.h2 { font-size: 16px; font-weight: 700; } +.row { display: flex; align-items: center; gap: 10px; } +.row.between { justify-content: space-between; } +.grow { flex: 1; min-width: 0; } +.btn { + display: inline-flex; align-items: center; justify-content: center; gap: 8px; + padding: 11px 18px; border-radius: 12px; border: 1px solid var(--line); + background: var(--surface-2); color: var(--text); font-size: 14px; font-weight: 700; + cursor: pointer; transition: transform .08s ease, opacity .15s; font-family: inherit; white-space: nowrap; +} +.btn:active { transform: scale(.98); } +.btn.primary { background: var(--accent); border: none; color: #fff; box-shadow: 0 8px 20px rgba(213,0,0,.22); } +.btn.ghost { background: transparent; } +.btn.danger { background: rgba(213,0,0,.08); border-color: rgba(213,0,0,.35); color: var(--red); } +.btn.small { padding: 8px 12px; font-size: 12.5px; border-radius: 10px; } +.btn:disabled { opacity: .45; cursor: not-allowed; } +.icon-btn { + width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); + color: var(--muted); font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; +} +.icon-btn:hover { background: var(--surface-2); color: var(--text); } +.pill { + display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; + font-size: 11.5px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); text-transform: capitalize; +} +.pill.attendee { background: rgba(148,163,184,.14); border-color: rgba(148,163,184,.4); color: #64748b; } +.pill.staff { background: rgba(32,178,170,.13); border-color: rgba(32,178,170,.4); color: #0f766e; } +.pill.admin { background: var(--accent-soft); border-color: rgba(213,0,0,.35); color: var(--accent); } +.pill.amber { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.4); color: #b45309; } +.pill.green { background: rgba(5,150,105,.12); border-color: rgba(5,150,105,.35); color: var(--green); } +.pill.violet { background: var(--accent-soft); border-color: rgba(213,0,0,.35); color: var(--accent); } +.pill.cyan { background: rgba(32,178,170,.13); border-color: rgba(32,178,170,.4); color: #0f766e; } +.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 800; color: #fff; flex-shrink: 0; } +.input, select.input { + width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); + background: var(--surface-2); color: var(--text); font-size: 14px; outline: none; font-family: inherit; +} +.input:focus { border-color: var(--accent); } +textarea.input { resize: none; min-height: 84px; } +.field { display: flex; flex-direction: column; gap: 6px; } +.field label { font-size: 12.5px; font-weight: 700; color: var(--muted); } +.divider { height: 1px; background: var(--line); margin: 4px 0; } + +/* ---------- Stat cards ---------- */ +.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; } +.stat { + background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; + box-shadow: 0 8px 24px rgba(66,60,60,.06); display: flex; flex-direction: column; gap: 6px; +} +.stat .ico { font-size: 22px; } +.stat .val { font-size: 30px; font-weight: 900; letter-spacing: -1px; } +.stat .lbl { color: var(--muted); font-size: 13px; font-weight: 600; } +.stat.accent { background: linear-gradient(135deg, rgba(213,0,0,.1), rgba(32,178,170,.08)); border-color: rgba(213,0,0,.3); } + +/* ---------- Table ---------- */ +.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(66,60,60,.06); } +table.data { width: 100%; border-collapse: collapse; font-size: 14px; } +table.data th { + text-align: left; padding: 13px 16px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; + letter-spacing: .4px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); +} +table.data td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; } +table.data tr:last-child td { border-bottom: none; } +table.data tr:hover td { background: rgba(244,245,249,.6); } +.cell-person { display: flex; align-items: center; gap: 11px; } +.cell-person .n { font-weight: 700; } +.cell-person .e { font-size: 12px; color: var(--muted); } +.pts { font-weight: 800; color: #b45309; } +.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; } +.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; } + +/* ---------- Modal ---------- */ +.backdrop { position: fixed; inset: 0; background: rgba(5,5,10,.6); backdrop-filter: blur(3px); z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px; } +.modal { + width: 100%; max-width: 460px; background: var(--surface); border-radius: 20px; + border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(66,60,60,.35); + max-height: 88dvh; overflow-y: auto; animation: pop .18s ease; +} +@keyframes pop { from { transform: scale(.96); opacity: .4 } to { transform: none; opacity: 1 } } +.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 0; } +.modal-head h3 { font-size: 18px; font-weight: 800; letter-spacing: -.3px; } +.modal-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; } +.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 20px 20px; } +.modal-foot .btn { width: auto; } + +/* ---------- Segmented control ---------- */ +.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 4px; } +.seg button { + flex: 1; padding: 10px; border: none; border-radius: 10px; background: none; color: var(--muted); + font-weight: 700; font-size: 13.5px; cursor: pointer; font-family: inherit; white-space: nowrap; +} +.seg button.active { background: var(--accent-soft); color: var(--accent); } + +/* ---------- QR ---------- */ +.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; } +.qr-frame { background: #fff; border-radius: 12px; padding: 12px; border: 1px solid var(--line); } +.token-big { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 20px; font-weight: 800; letter-spacing: 1px; color: var(--accent); } + +/* ---------- Login ---------- */ +.login-wrap { height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 20px; } +.login-card { + width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); + border-radius: 24px; padding: 34px 30px; box-shadow: 0 30px 80px rgba(66,60,60,.2); + display: flex; flex-direction: column; gap: 18px; +} +.login-brand { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; } +.login-brand .logo { + width: 72px; height: 72px; border-radius: 20px; display: flex; align-items: center; justify-content: center; + font-size: 32px; font-weight: 900; background: linear-gradient(135deg, var(--accent), #ff5a4e); + box-shadow: 0 16px 40px rgba(213,0,0,.35); color: #fff; +} +.login-brand h1 { font-size: 24px; font-weight: 900; letter-spacing: -.5px; } +.login-brand p { color: var(--muted); font-size: 13.5px; } +.login-form { display: flex; flex-direction: column; gap: 14px; } +.login-err { color: var(--red); font-size: 13px; font-weight: 600; text-align: center; } + +/* ---------- Misc ---------- */ +.spinner { + width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--accent); + border-radius: 50%; animation: spin .8s linear infinite; +} +@keyframes spin { to { transform: rotate(360deg); } } +.center { display: flex; align-items: center; justify-content: center; } +.loading-screen { height: 100dvh; display: flex; align-items: center; justify-content: center; } +.empty { + text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px; + border: 1.5px dashed var(--line); border-radius: 16px; +} +.empty .big { font-size: 34px; margin-bottom: 10px; } +.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } +@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } } + +/* ---------- Toast ---------- */ +.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 10px; } +.toast { + background: #fff; border: 1px solid var(--line); border-radius: 14px; + padding: 13px 18px; font-size: 13.5px; font-weight: 600; min-width: 240px; max-width: 360px; + box-shadow: 0 12px 30px rgba(66,60,60,.22); animation: toast-in .25s ease; cursor: pointer; +} +@keyframes toast-in { from { transform: translateY(12px); opacity: 0 } to { transform: none; opacity: 1 } } +.toast-success { border-color: rgba(5,150,105,.5); } +.toast-error { border-color: rgba(213,0,0,.55); } +.toast-info { border-color: rgba(32,178,170,.5); } + +/* ---------- Responsive: collapse sidebar to top bar on narrow screens ---------- */ +@media (max-width: 760px) { + .app { flex-direction: column; } + .sidebar { width: 100%; flex-direction: row; align-items: center; padding: 12px 14px; gap: 10px; overflow-x: auto; } + .brand { padding: 0 8px 0 0; } + .brand .sub { display: none; } + .nav { flex-direction: row; margin-top: 0; } + .nav-item { padding: 9px 12px; white-space: nowrap; } + .sidebar-foot { display: none; } + .content { padding: 20px 16px 50px; } +} diff --git a/apps/admin/src/views/Activity.tsx b/apps/admin/src/views/Activity.tsx new file mode 100644 index 0000000..95113a9 --- /dev/null +++ b/apps/admin/src/views/Activity.tsx @@ -0,0 +1,186 @@ +import { useEffect, useMemo, useState } from 'react'; +import { getAllCheckins, getAllConnections, getAllFeedback, getAllProfiles, getAllSessions } from '../lib/api'; +import type { Checkin, Connection, Feedback, Profile, Session } from '../lib/types'; +import { Avatar, Empty, Spinner } from '../components/ui'; + +type Tab = 'checkins' | 'connections' | 'feedback'; + +export function Activity() { + const [profiles, setProfiles] = useState(null); + const [sessions, setSessions] = useState([]); + const [checkins, setCheckins] = useState([]); + const [connections, setConnections] = useState([]); + const [feedback, setFeedback] = useState([]); + const [error, setError] = useState(null); + const [tab, setTab] = useState('checkins'); + + useEffect(() => { + let cancelled = false; + (async () => { + try { + const [p, s, c, conn, f] = await Promise.all([ + getAllProfiles(), + getAllSessions(), + getAllCheckins(), + getAllConnections(), + getAllFeedback(), + ]); + if (cancelled) return; + setProfiles(p); + setSessions(s); + setCheckins(c); + setConnections(conn); + setFeedback(f); + } catch (e) { + if (!cancelled) setError(e instanceof Error ? e.message : 'Failed to load'); + } + })(); + return () => { + cancelled = true; + }; + }, []); + + const byId = useMemo(() => new Map((profiles ?? []).map((p) => [p.id, p])), [profiles]); + const sessById = useMemo(() => new Map(sessions.map((s) => [s.id, s])), [sessions]); + + if (error) return ; + if (!profiles) + return ( +
+ +
+ ); + + return ( +
+
+
+

Activity

+
Check-ins, connections, and feedback.
+
+
+ +
+ + + +
+ + {tab === 'checkins' && ( +
+ + + + + + + + + + + {checkins.map((c) => ( + + + + + + + ))} + +
AttendeeSessionChecked in byWhen
+ + {sessById.get(c.session_id)?.title ?? '—'}{byId.get(c.staff_id)?.full_name ?? '—'}{fmt(c.created_at)}
+ {checkins.length === 0 &&
} +
+ )} + + {tab === 'connections' && ( +
+ + + + + + + + + + + {connections.map((c) => ( + + + + + + + ))} + +
FromToStatusWhen
+ + + + + + {c.status} + + {fmt(c.resolved_at ?? c.created_at)}
+ {connections.length === 0 &&
} +
+ )} + + {tab === 'feedback' && ( +
+ + + + + + + + + + + + {feedback.map((f) => ( + + + + + + + + ))} + +
AttendeeSessionRatingCommentWhen
+ + {sessById.get(f.session_id)?.title ?? '—'} + {'★'.repeat(f.rating)} + + {f.comment ?? '—'} + {fmt(f.created_at)}
+ {feedback.length === 0 &&
} +
+ )} +
+ ); +} + +function PersonCell({ p }: { p: Profile | undefined }) { + if (!p) return —; + return ( +
+ +
{p.full_name}
+
+ ); +} + +function fmt(iso: string): string { + return new Date(iso).toLocaleString([], { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' }); +} diff --git a/apps/admin/src/views/Attendees.tsx b/apps/admin/src/views/Attendees.tsx new file mode 100644 index 0000000..c20220d --- /dev/null +++ b/apps/admin/src/views/Attendees.tsx @@ -0,0 +1,332 @@ +import { useEffect, useMemo, useState } from 'react'; +import { adjustPoints, getAllProfiles, resetQrToken, updateProfile } from '../lib/api'; +import type { Profile, Role } from '../lib/types'; +import { useToast } from '../context/ToastContext'; +import { Avatar, Empty, Modal, QrImage, RoleBadge, Spinner } from '../components/ui'; + +export function Attendees() { + const { push } = useToast(); + const [profiles, setProfiles] = useState(null); + const [error, setError] = useState(null); + const [query, setQuery] = useState(''); + + // Modal state + const [editing, setEditing] = useState(null); + const [qrFor, setQrFor] = useState(null); + const [newToken, setNewToken] = useState(null); + const [pointsFor, setPointsFor] = useState(null); + const [busy, setBusy] = useState(false); + + async function load() { + try { + setProfiles(await getAllProfiles()); + } catch (e) { + setError(e instanceof Error ? e.message : 'Failed to load'); + } + } + + useEffect(() => { + load(); + }, []); + + const filtered = useMemo(() => { + if (!profiles) return []; + const q = query.trim().toLowerCase(); + if (!q) return profiles; + return profiles.filter( + (p) => + p.full_name.toLowerCase().includes(q) || + (p.company ?? '').toLowerCase().includes(q) || + p.email.toLowerCase().includes(q) || + (p.qr_token ?? '').toLowerCase().includes(q), + ); + }, [profiles, query]); + + async function doResetQr(p: Profile) { + setBusy(true); + try { + const res = await resetQrToken(p.id); + setNewToken(res.qr_token); + setQrFor(p); + // refresh the list so the token column updates + await load(); + push('success', `New QR token issued for ${p.full_name}`); + } catch (e) { + push('error', e instanceof Error ? e.message : 'Reset failed'); + } finally { + setBusy(false); + } + } + + if (error) return ; + if (!profiles) + return ( +
+ +
+ ); + + return ( +
+
+
+

Attendees

+
{profiles.length} people · manage profiles, QR tokens, and points.
+
+ setQuery(e.target.value)} + /> +
+ +
+ + + + + + + + + + + + {filtered.map((p) => ( + + + + + + + + ))} + +
NameRoleQR tokenPointsActions
+
+ +
+
{p.full_name}
+
{p.email}
+
+
+
+ + + {p.qr_token ?? '—'} + + {p.points} + +
+ + + +
+
+ {filtered.length === 0 &&
} +
+ + {editing && ( + setEditing(null)} + onSaved={async (msg) => { + setEditing(null); + await load(); + push('success', msg); + }} + /> + )} + + {qrFor && ( + setQrFor(null)} + footer={ + <> + + + + } + > +
+ {newToken ? ( + <> + +
{newToken}
+

+ New token issued. The old token no longer works — the attendee must re-scan. +

+ + ) : ( + <> + +
{qrFor.qr_token ?? '—'}
+

Current token. Reset to issue a new one.

+ + )} +
+
+ )} + + {pointsFor && ( + setPointsFor(null)} + onSaved={async (msg) => { + setPointsFor(null); + await load(); + push('success', msg); + }} + /> + )} +
+ ); +} + +function EditProfileModal({ + profile, + onClose, + onSaved, +}: { + profile: Profile; + onClose: () => void; + onSaved: (msg: string) => void; +}) { + const [name, setName] = useState(profile.full_name); + const [company, setCompany] = useState(profile.company ?? ''); + const [role, setRole] = useState(profile.role); + const [busy, setBusy] = useState(false); + + async function save() { + setBusy(true); + try { + await updateProfile(profile.id, { + full_name: name.trim(), + company: company.trim() || null, + role, + }); + onSaved(`Updated ${name.trim()}`); + } catch (e) { + onSaved(e instanceof Error ? e.message : 'Update failed'); + } finally { + setBusy(false); + } + } + + return ( + + + + + } + > +
+ + setName(e.target.value)} /> +
+
+ + setCompany(e.target.value)} placeholder="—" /> +
+
+ + +
+
+ ); +} + +function AdjustPointsModal({ + profile, + onClose, + onSaved, +}: { + profile: Profile; + onClose: () => void; + onSaved: (msg: string) => void; +}) { + const [delta, setDelta] = useState('10'); + const [reason, setReason] = useState(''); + const [busy, setBusy] = useState(false); + + async function save() { + const d = parseInt(delta, 10); + if (Number.isNaN(d) || d === 0) return; + setBusy(true); + try { + await adjustPoints(profile.id, d, reason.trim() || 'manual adjustment'); + onSaved(`${d > 0 ? '+' : ''}${d} points for ${profile.full_name}`); + } catch (e) { + onSaved(e instanceof Error ? e.message : 'Adjustment failed'); + } finally { + setBusy(false); + } + } + + return ( + + + + + } + > +
+ +
+
{profile.full_name}
+
+ Current: {profile.points} +
+
+
+
+ + setDelta(e.target.value)} /> +
+
+ + setReason(e.target.value)} placeholder="e.g. prize, correction" /> +
+
+ ); +} diff --git a/apps/admin/src/views/Dashboard.tsx b/apps/admin/src/views/Dashboard.tsx new file mode 100644 index 0000000..baf5968 --- /dev/null +++ b/apps/admin/src/views/Dashboard.tsx @@ -0,0 +1,196 @@ +import { useEffect, useState } from 'react'; +import { + getAllCheckins, + getAllConnections, + getAllFeedback, + getAllProfiles, + getAllSessions, + getLeaderboard, +} from '../lib/api'; +import type { Checkin, Connection, Feedback, LeaderboardRow, Profile, Session } from '../lib/types'; +import { Avatar, Empty, Spinner } from '../components/ui'; + +type View = 'dashboard' | 'attendees' | 'schedule' | 'activity'; + +export function Dashboard({ onNavigate }: { onNavigate: (v: View) => void }) { + const [profiles, setProfiles] = useState(null); + const [checkins, setCheckins] = useState([]); + const [connections, setConnections] = useState([]); + const [feedback, setFeedback] = useState([]); + const [sessions, setSessions] = useState([]); + const [lb, setLb] = useState([]); + const [error, setError] = useState(null); + + useEffect(() => { + let cancelled = false; + (async () => { + try { + const [p, c, conn, f, s, l] = await Promise.all([ + getAllProfiles(), + getAllCheckins(), + getAllConnections(), + getAllFeedback(), + getAllSessions(), + getLeaderboard(), + ]); + if (cancelled) return; + setProfiles(p); + setCheckins(c); + setConnections(conn); + setFeedback(f); + setSessions(s); + setLb(l); + } catch (e) { + if (!cancelled) setError(e instanceof Error ? e.message : 'Failed to load'); + } + })(); + return () => { + cancelled = true; + }; + }, []); + + if (error) return ; + if (!profiles) + return ( +
+ +
+ ); + + const attendees = profiles.filter((p) => p.role === 'attendee'); + const accepted = connections.filter((c) => c.status === 'accepted').length; + const avgRating = feedback.length + ? (feedback.reduce((s, f) => s + f.rating, 0) / feedback.length).toFixed(1) + : '—'; + const top = lb.slice(0, 5); + + return ( +
+
+
+

Dashboard

+
Live overview of the event.
+
+
+ +
+
+ 👥 + {attendees.length} + Attendees +
+
+ ✅ + {checkins.length} + Check-ins +
+
+ 🤝 + {accepted} + Connections accepted +
+
+ ⭐ + {avgRating} + Avg. session rating +
+
+ 🏆 + {sessions.length} + Sessions scheduled +
+
+ +
+
+
+

🏆 Top points

+ +
+ {top.length === 0 ? ( + + ) : ( +
+ {top.map((r, i) => ( +
+ {i + 1} + +
+
{r.full_name}
+ {r.company &&
{r.company}
} +
+ {r.points} +
+ ))} +
+ )} +
+ +
+
+

⚡ Recent activity

+ +
+ +
+
+
+ ); +} + +function ActivityFeed({ + checkins, + connections, + feedback, + profiles, + limit, +}: { + checkins: Checkin[]; + connections: Connection[]; + feedback: Feedback[]; + profiles: Profile[]; + limit: number; +}) { + const byId = new Map(profiles.map((p) => [p.id, p])); + type Item = { at: string; icon: string; text: string }; + const items: Item[] = [ + ...checkins.map((c) => ({ + at: c.created_at, + icon: '✅', + text: `${byId.get(c.profile_id)?.full_name ?? 'Someone'} checked in`, + })), + ...connections + .filter((c) => c.status === 'accepted') + .map((c) => ({ + at: c.resolved_at ?? c.created_at, + icon: '🤝', + text: `${byId.get(c.from_id)?.full_name ?? 'Someone'} connected with ${byId.get(c.to_id)?.full_name ?? 'someone'}`, + })), + ...feedback.map((f) => ({ + at: f.created_at, + icon: '⭐', + text: `${byId.get(f.profile_id)?.full_name ?? 'Someone'} rated a session ${f.rating}★`, + })), + ] + .sort((a, b) => (a.at < b.at ? 1 : -1)) + .slice(0, limit); + + if (items.length === 0) return ; + return ( +
+ {items.map((it, i) => ( +
+ {it.icon} +
+ {it.text} +
+ {new Date(it.at).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })} +
+ ))} +
+ ); +} diff --git a/apps/admin/src/views/Schedule.tsx b/apps/admin/src/views/Schedule.tsx new file mode 100644 index 0000000..c33c9df --- /dev/null +++ b/apps/admin/src/views/Schedule.tsx @@ -0,0 +1,332 @@ +import { useEffect, useState } from 'react'; +import { supabase } from '../lib/supabase'; +import { getAllSessions, getAllSlots } from '../lib/api'; +import type { Session, Slot } from '../lib/types'; +import { useToast } from '../context/ToastContext'; +import { Empty, Modal, Spinner } from '../components/ui'; + +export function Schedule() { + const { push } = useToast(); + const [slots, setSlots] = useState(null); + const [sessions, setSessions] = useState([]); + const [error, setError] = useState(null); + + const [slotModal, setSlotModal] = useState<{ slot: Slot | null } | null>(null); + const [sessModal, setSessModal] = useState<{ session: Session | null; slotId: number } | null>(null); + const [busy, setBusy] = useState(false); + + async function load() { + try { + const [s, ss] = await Promise.all([getAllSlots(), getAllSessions()]); + setSlots(s); + setSessions(ss); + } catch (e) { + setError(e instanceof Error ? e.message : 'Failed to load'); + } + } + + useEffect(() => { + load(); + }, []); + + async function deleteSlot(slot: Slot) { + if (!confirm(`Delete "${slot.name}" and all its sessions?`)) return; + setBusy(true); + try { + const { error: err } = await supabase.from('slots').delete().eq('id', slot.id); + if (err) throw err; + await load(); + push('success', `Deleted ${slot.name}`); + } catch (e) { + push('error', e instanceof Error ? e.message : 'Delete failed'); + } finally { + setBusy(false); + } + } + + async function deleteSession(sess: Session) { + if (!confirm(`Delete session "${sess.title}"?`)) return; + setBusy(true); + try { + const { error: err } = await supabase.from('sessions').delete().eq('id', sess.id); + if (err) throw err; + await load(); + push('success', `Deleted ${sess.title}`); + } catch (e) { + push('error', e instanceof Error ? e.message : 'Delete failed'); + } finally { + setBusy(false); + } + } + + if (error) return ; + if (!slots) + return ( +
+ +
+ ); + + return ( +
+
+
+

Schedule

+
{slots.length} slots · {sessions.length} sessions.
+
+ +
+ +
+ {slots.map((slot) => { + const slotSessions = sessions.filter((s) => s.slot_id === slot.id); + return ( +
+
+
+
+
{slot.name}
+
+ {fmtDate(slot.slot_date)} · {fmtTime(slot.start_time)}–{fmtTime(slot.end_time)} +
+
+
+
+ + + +
+
+ + {slotSessions.length === 0 ? ( +
+ No sessions in this slot. +
+ ) : ( +
+ {slotSessions.map((s) => ( +
+
+
{s.title}
+
+ {[s.room, s.speakers, s.capacity ? `cap ${s.capacity}` : null].filter(Boolean).join(' · ') || '—'} +
+
+
+ + +
+
+ ))} +
+ )} +
+ ); + })} +
+ + {slotModal && ( + setSlotModal(null)} + onSaved={async (msg) => { + setSlotModal(null); + await load(); + push('success', msg); + }} + /> + )} + {sessModal && ( + setSessModal(null)} + onSaved={async (msg) => { + setSessModal(null); + await load(); + push('success', msg); + }} + /> + )} +
+ ); +} + +function SlotModal({ + slot, + onClose, + onSaved, +}: { + slot: Slot | null; + onClose: () => void; + onSaved: (msg: string) => void; +}) { + const [name, setName] = useState(slot?.name ?? ''); + const [date, setDate] = useState(slot ? slot.slot_date.slice(0, 10) : ''); + const [start, setStart] = useState(slot ? slot.start_time.slice(0, 5) : '09:00'); + const [end, setEnd] = useState(slot ? slot.end_time.slice(0, 5) : '10:00'); + const [busy, setBusy] = useState(false); + + async function save() { + if (!name.trim() || !date) return; + setBusy(true); + try { + const payload = { name: name.trim(), slot_date: date, start_time: start, end_time: end }; + if (slot) { + const { error: err } = await supabase.from('slots').update(payload).eq('id', slot.id); + if (err) throw err; + } else { + const { error: err } = await supabase.from('slots').insert(payload); + if (err) throw err; + } + onSaved(slot ? 'Slot updated' : 'Slot created'); + } catch (e) { + onSaved(e instanceof Error ? e.message : 'Save failed'); + } finally { + setBusy(false); + } + } + + return ( + + + + + } + > +
+ + setName(e.target.value)} placeholder="e.g. Morning keynote" /> +
+
+ + setDate(e.target.value)} /> +
+
+
+ + setStart(e.target.value)} /> +
+
+ + setEnd(e.target.value)} /> +
+
+
+ ); +} + +function SessionModal({ + session, + slotId, + onClose, + onSaved, +}: { + session: Session | null; + slotId: number; + onClose: () => void; + onSaved: (msg: string) => void; +}) { + const [title, setTitle] = useState(session?.title ?? ''); + const [room, setRoom] = useState(session?.room ?? ''); + const [speakers, setSpeakers] = useState(session?.speakers ?? ''); + const [capacity, setCapacity] = useState(session?.capacity?.toString() ?? ''); + const [description, setDescription] = useState(session?.description ?? ''); + const [busy, setBusy] = useState(false); + + async function save() { + if (!title.trim()) return; + setBusy(true); + try { + const payload = { + title: title.trim(), + room: room.trim() || null, + speakers: speakers.trim() || null, + capacity: capacity ? parseInt(capacity, 10) : null, + description: description.trim() || null, + slot_id: slotId, + }; + if (session) { + const { error: err } = await supabase.from('sessions').update(payload).eq('id', session.id); + if (err) throw err; + } else { + const { error: err } = await supabase.from('sessions').insert(payload); + if (err) throw err; + } + onSaved(session ? 'Session updated' : 'Session created'); + } catch (e) { + onSaved(e instanceof Error ? e.message : 'Save failed'); + } finally { + setBusy(false); + } + } + + return ( + + + + + } + > +
+ + setTitle(e.target.value)} placeholder="e.g. The future of networking" /> +
+
+
+ + setRoom(e.target.value)} placeholder="—" /> +
+
+ + setCapacity(e.target.value)} placeholder="—" /> +
+
+
+ + setSpeakers(e.target.value)} placeholder="—" /> +
+
+ +